From f6abc8c724eed706487b7616bc6c816e5db5c939 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期二, 09 十二月 2025 20:13:48 +0800
Subject: [PATCH] 数量检测页面提交

---
 fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap-red.jpg              |    0 
 fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts-gl.min.js         |    1 
 fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java |   29 +
 fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min.js            |   17 
 fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.js                |   22 +
 fzzy-igdss-web/src/main/resources/static/security/quantity.js                         |  144 ++++++++
 fzzy-igdss-web/src/main/resources/static/security/quantity.css                        |  559 +++++++++++++++++++++++++++++++
 fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap.jpg                  |    0 
 fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min-4.7.js        |   18 +
 fzzy-igdss-web/src/main/resources/templates/security/quantity.html                    |  264 ++++++++++++++
 10 files changed, 1,054 insertions(+), 0 deletions(-)

diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java
index c51a6d2..6403b53 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/security/SecurityController.java
@@ -19,6 +19,7 @@
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -124,4 +125,32 @@
         return secManager.updatePos(params);
     }
 
+
+
+    /**
+     * 棣栭〉鎬昏
+     *
+     * @return
+     */
+    @RequestMapping("/quantity")
+    public String infrared(
+            @RequestParam(value = "type", required = false) String type,
+            ModelMap view) {
+
+        SysUser user = ContextUtil.getLoginUser();
+        view.put(Constant.MODEL_KEY_LOGIN_USER, user);
+
+        String deptId = ContextUtil.subDeptId(user);
+        view.put("deptId", deptId);
+//        List<InfraredCamera> listCamera = infraredManager.listCamera(deptId, user.getCompanyId());
+//
+//        if(null == listCamera){
+//            listCamera = new ArrayList<>();
+//            listCamera.add(new InfraredCamera());
+//        }
+//        view.put("listCamera", listCamera);
+
+        return prefix + "/quantity";
+    }
+
 }
diff --git a/fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap-red.jpg b/fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap-red.jpg
new file mode 100644
index 0000000..5e2521e
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap-red.jpg
Binary files differ
diff --git a/fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap.jpg b/fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap.jpg
new file mode 100644
index 0000000..a86258e
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/img/web/security/p-snap.jpg
Binary files differ
diff --git a/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts-gl.min.js b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts-gl.min.js
new file mode 100644
index 0000000..8d6fd8f
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts-gl.min.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],t):"object"==typeof exports?exports["echarts-gl"]=t(require("echarts")):e["echarts-gl"]=t(e.echarts)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=106)}([function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e){return!e||"none"===e}function i(e){return e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof Image}function a(e){return e.getZr&&e.setOption}function o(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))}function s(e){if((e.wrapS===c.a.REPEAT||e.wrapT===c.a.REPEAT)&&e.image){var t=o(e.width),r=o(e.height);if(t!==e.width||r!==e.height){var n=document.createElement("canvas");n.width=t,n.height=r;n.getContext("2d").drawImage(e.image,0,0,t,r),e.image=n}}}var u=r(40),l=r(52),h=r(5),c=r(4),d=r(8),f=r(19),p=r(35),m=r(15),g=r(0),_=r.n(g),v=r(36),y=r(60),x=r.n(y),T=r(61),b=r(124),w=r(125),E=r(129),S=r(130),A=r(2),M=r(132),C=r(43),L=r(76),D=r(133),N=r(134),R=r(135),P=r(136),I=r(41),O=r(37),F=r(26),B=r(3),U=r(137),z=r(56),G=r(138),H=r(139),V=r(140),k=r(9),W=r(74),j=r(54),X=r(18),q=r(59),Z=r(141),Y=r(146),K=r(71),Q=r(147),J=r(148),$=r(149),ee=r(150),te=r(151),re=r(152);_.a.util.extend(p.a.prototype,Z.a),d.a.import(Y.a),d.a.import(K.a),d.a.import(Q.a),d.a.import(J.a),d.a.import($.a),d.a.import(ee.a),d.a.import(te.a),d.a.import(re.a);var ne=v.a.prototype.addToScene,ie=v.a.prototype.removeFromScene;v.a.prototype.addToScene=function(e){if(ne.call(this,e),this.__zr){var t=this.__zr;e.traverse(function(e){e.__zr=t,e.addAnimatorsToZr&&e.addAnimatorsToZr(t)})}},v.a.prototype.removeFromScene=function(e){ie.call(this,e),e.traverse(function(e){var t=e.__zr;e.__zr=null,t&&e.removeAnimatorsFromZr&&e.removeAnimatorsFromZr(t)})},f.a.prototype.setTextureImage=function(e,t,r,i){if(this.shader){var a,o=r.getZr(),s=this;return s.autoUpdateTextureStatus=!1,s.disableTexture(e),n(t)||(a=ae.loadTexture(t,r,i,function(t){s.enableTexture(e),o&&o.refresh()}),s.set(e,a)),a}};var ae={};ae.Renderer=l.a,ae.Node=p.a,ae.Mesh=u.a,ae.Shader=d.a,ae.Material=f.a,ae.Texture=c.a,ae.Texture2D=h.a,ae.Geometry=m.a,ae.SphereGeometry=M.a,ae.PlaneGeometry=C.a,ae.CubeGeometry=L.a,ae.AmbientLight=D.a,ae.DirectionalLight=N.a,ae.PointLight=R.a,ae.SpotLight=P.a,ae.PerspectiveCamera=I.a,ae.OrthographicCamera=O.a,ae.Vector2=F.a,ae.Vector3=B.a,ae.Vector4=U.a,ae.Quaternion=z.a,ae.Matrix2=G.a,ae.Matrix2d=H.a,ae.Matrix3=V.a,ae.Matrix4=k.a,ae.Plane=W.a,ae.Ray=j.a,ae.BoundingBox=X.a,ae.Frustum=q.a;var oe=T.a.createBlank("rgba(255,255,255,0)").image;ae.loadTexture=function(e,t,r,n){"function"==typeof r&&(n=r,r={}),r=r||{};for(var o=Object.keys(r).sort(),u="",l=0;l<o.length;l++)u+=o[l]+"_"+r[o[l]]+"_";var h=t.__textureCache=t.__textureCache||new x.a(20);if(a(e)){var c=e.__textureid__,d=h.get(u+c);if(d)d.texture.surface.setECharts(e),n&&n(d.texture);else{var f=new b.a(e);f.onupdate=function(){t.getZr().refresh()},d={texture:f.getTexture()};for(var l=0;l<o.length;l++)d.texture[o[l]]=r[o[l]];c=e.__textureid__||"__ecgl_ec__"+d.texture.__uid__,e.__textureid__=c,h.put(u+c,d),n&&n(d.texture)}return d.texture}if(i(e)){var c=e.__textureid__,d=h.get(u+c);if(!d){d={texture:new ae.Texture2D({image:e})};for(var l=0;l<o.length;l++)d.texture[o[l]]=r[o[l]];c=e.__textureid__||"__ecgl_image__"+d.texture.__uid__,e.__textureid__=c,h.put(u+c,d),s(d.texture),n&&n(d.texture)}return d.texture}var d=h.get(u+e);if(d)d.callbacks?d.callbacks.push(n):n&&n(d.texture);else if(e.match(/.hdr$|^data:application\/octet-stream/)){d={callbacks:[n]};var p=T.a.loadTexture(e,{exposure:r.exposure,fileType:"hdr"},function(){p.dirty(),d.callbacks.forEach(function(e){e&&e(p)}),d.callbacks=null});d.texture=p,h.put(u+e,d)}else{for(var p=new ae.Texture2D({image:new Image}),l=0;l<o.length;l++)p[o[l]]=r[o[l]];d={texture:p,callbacks:[n]};var m=p.image;m.onload=function(){p.image=m,s(p),p.dirty(),d.callbacks.forEach(function(e){e&&e(p)}),d.callbacks=null},m.src=e,p.image=oe,h.put(u+e,d)}return d.texture},ae.createAmbientCubemap=function(e,t,r,n){e=e||{};var i=e.texture,a=A.a.firstNotNull(e.exposure,1),o=new w.a({intensity:A.a.firstNotNull(e.specularIntensity,1)}),s=new E.a({intensity:A.a.firstNotNull(e.diffuseIntensity,1),coefficients:[.844,.712,.691,-.037,.083,.167,.343,.288,.299,-.041,-.021,-.009,-.003,-.041,-.064,-.011,-.007,-.004,-.031,.034,.081,-.06,-.049,-.06,.046,.056,.05]});return o.cubemap=ae.loadTexture(i,r,{exposure:a},function(){o.cubemap.flipY=!1;o.prefilter(t,32);s.coefficients=S.a.projectEnvironmentMap(t,o.cubemap,{lod:1}),n&&n()}),{specular:o,diffuse:s}},ae.createBlankTexture=T.a.createBlank,ae.isImage=i,ae.additiveBlend=function(e){e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE)},ae.parseColor=function(e,t){return e instanceof Array?(t||(t=[]),t[0]=e[0],t[1]=e[1],t[2]=e[2],e.length>3?t[3]=e[3]:t[3]=1,t):(t=_.a.color.parse(e||"#000",t)||[0,0,0,0],t[0]/=255,t[1]/=255,t[2]/=255,t)},ae.directionFromAlphaBeta=function(e,t){var r=e/180*Math.PI+Math.PI/2,n=-t/180*Math.PI+Math.PI/2,i=[],a=Math.sin(r);return i[0]=a*Math.cos(n),i[1]=-Math.cos(r),i[2]=a*Math.sin(n),i},ae.getShadowResolution=function(e){var t=1024;switch(e){case"low":t=512;break;case"medium":break;case"high":t=2048;break;case"ultra":t=4096}return t},ae.COMMON_SHADERS=["lambert","color","realistic","hatching"],ae.createShader=function(e){var t=d.a.source(e+".vertex"),r=d.a.source(e+".fragment");t||console.error("Vertex shader of '%s' not exits",e),r||console.error("Fragment shader of '%s' not exits",e);var n=new d.a(t,r);return n.name=e,n},ae.createMaterial=function(e,t){t instanceof Array||(t=[t]);var r=ae.createShader(e),n=new f.a({shader:r});return t.forEach(function(e){"string"==typeof e&&n.define(e)}),n},ae.setMaterialFromModel=function(e,t,r,n){t.autoUpdateTextureStatus=!1;var i=r.getModel(e+"Material"),a=i.get("detailTexture"),o=A.a.firstNotNull(i.get("textureTiling"),1),s=A.a.firstNotNull(i.get("textureOffset"),0);"number"==typeof o&&(o=[o,o]),"number"==typeof s&&(s=[s,s]);var u=o[0]>1||o[1]>1?ae.Texture.REPEAT:ae.Texture.CLAMP_TO_EDGE,l={anisotropic:8,wrapS:u,wrapT:u};if("realistic"===e){var h=i.get("roughness"),c=i.get("metalness");null!=c?isNaN(c)&&(t.setTextureImage("metalnessMap",c,n,l),c=A.a.firstNotNull(i.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(t.setTextureImage("roughnessMap",h,n,l),h=A.a.firstNotNull(i.get("roughnessAdjust"),.5)):h=.5;var d=i.get("normalTexture");t.setTextureImage("detailMap",a,n,l),t.setTextureImage("normalMap",d,n,l),t.set({roughness:h,metalness:c,detailUvRepeat:o,detailUvOffset:s})}else if("lambert"===e)t.setTextureImage("detailMap",a,n,l),t.set({detailUvRepeat:o,detailUvOffset:s});else if("color"===e)t.setTextureImage("detailMap",a,n,l),t.set({detailUvRepeat:o,detailUvOffset:s});else if("hatching"===e){for(var f=i.get("hatchingTextures")||[],p=0;p<6;p++)t.setTextureImage("hatch"+(p+1),f[p],n,{anisotropic:8,wrapS:ae.Texture.REPEAT,wrapT:ae.Texture.REPEAT});t.set({detailUvRepeat:o,detailUvOffset:s})}},ae.updateVertexAnimation=function(e,t,r,n){var i=n.get("animation"),a=n.get("animationDurationUpdate"),o=n.get("animationEasingUpdate"),s=r.shadowDepthMaterial;if(i&&t&&a>0&&t.geometry.vertexCount===r.geometry.vertexCount){r.material.define("vertex","VERTEX_ANIMATION"),r.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var u=0;u<e.length;u++)r.geometry.attributes[e[u][0]].value=t.geometry.attributes[e[u][1]].value;r.geometry.dirty(),r.__percent=0,r.material.set("percent",0),r.stopAnimation(),r.animate().when(a,{__percent:1}).during(function(){r.material.set("percent",r.__percent),s&&s.set("percent",r.__percent)}).done(function(){r.ignorePreZ=!1,r.material.undefine("vertex","VERTEX_ANIMATION"),s&&s.undefine("vertex","VERTEX_ANIMATION")}).start(o)}else r.material.undefine("vertex","VERTEX_ANIMATION"),s&&s.undefine("vertex","VERTEX_ANIMATION")},t.a=ae},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a={firstNotNull:function(){for(var e=0,t=arguments.length;e<t;e++)if(null!=arguments[e])return arguments[e]},queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?i.a.util.isArray(t.dataIndex)?i.a.util.map(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?i.a.util.isArray(t.name)?i.a.util.map(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}};t.a=a},function(e,t,r){"use strict";function n(e,t,r){return e<t?t:e>r?r:e}var i=r(12),a=function(e,t,r){e=e||0,t=t||0,r=r||0,this.array=i.a.fromValues(e,t,r),this._dirty=!0};a.prototype={constructor:a,add:function(e){return i.a.add(this.array,this.array,e.array),this._dirty=!0,this},set:function(e,t,r){return this.array[0]=e,this.array[1]=t,this.array[2]=r,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this.array[2]=e[2],this._dirty=!0,this},clone:function(){return new a(this.x,this.y,this.z)},copy:function(e){return i.a.copy(this.array,e.array),this._dirty=!0,this},cross:function(e,t){return i.a.cross(this.array,e.array,t.array),this._dirty=!0,this},dist:function(e){return i.a.dist(this.array,e.array)},distance:function(e){return i.a.distance(this.array,e.array)},div:function(e){return i.a.div(this.array,this.array,e.array),this._dirty=!0,this},divide:function(e){return i.a.divide(this.array,this.array,e.array),this._dirty=!0,this},dot:function(e){return i.a.dot(this.array,e.array)},len:function(){return i.a.len(this.array)},length:function(){return i.a.length(this.array)},lerp:function(e,t,r){return i.a.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},min:function(e){return i.a.min(this.array,this.array,e.array),this._dirty=!0,this},max:function(e){return i.a.max(this.array,this.array,e.array),this._dirty=!0,this},mul:function(e){return i.a.mul(this.array,this.array,e.array),this._dirty=!0,this},multiply:function(e){return i.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},negate:function(){return i.a.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return i.a.normalize(this.array,this.array),this._dirty=!0,this},random:function(e){return i.a.random(this.array,e),this._dirty=!0,this},scale:function(e){return i.a.scale(this.array,this.array,e),this._dirty=!0,this},scaleAndAdd:function(e,t){return i.a.scaleAndAdd(this.array,this.array,e.array,t),this._dirty=!0,this},sqrDist:function(e){return i.a.sqrDist(this.array,e.array)},squaredDistance:function(e){return i.a.squaredDistance(this.array,e.array)},sqrLen:function(){return i.a.sqrLen(this.array)},squaredLength:function(){return i.a.squaredLength(this.array)},sub:function(e){return i.a.sub(this.array,this.array,e.array),this._dirty=!0,this},subtract:function(e){return i.a.subtract(this.array,this.array,e.array),this._dirty=!0,this},transformMat3:function(e){return i.a.transformMat3(this.array,this.array,e.array),this._dirty=!0,this},transformMat4:function(e){return i.a.transformMat4(this.array,this.array,e.array),this._dirty=!0,this},transformQuat:function(e){return i.a.transformQuat(this.array,this.array,e.array),this._dirty=!0,this},applyProjection:function(e){var t=this.array;if(e=e.array,0===e[15]){var r=-1/t[2];t[0]=e[0]*t[0]*r,t[1]=e[5]*t[1]*r,t[2]=(e[10]*t[2]+e[14])*r}else t[0]=e[0]*t[0]+e[12],t[1]=e[5]*t[1]+e[13],t[2]=e[10]*t[2]+e[14];return this._dirty=!0,this},eulerFromQuat:function(e,t){a.eulerFromQuat(this,e,t)},eulerFromMat3:function(e,t){a.eulerFromMat3(this,e,t)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var o=Object.defineProperty;if(o){var s=a.prototype;o(s,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),o(s,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}}),o(s,"z",{get:function(){return this.array[2]},set:function(e){this.array[2]=e,this._dirty=!0}})}a.add=function(e,t,r){return i.a.add(e.array,t.array,r.array),e._dirty=!0,e},a.set=function(e,t,r,n){i.a.set(e.array,t,r,n),e._dirty=!0},a.copy=function(e,t){return i.a.copy(e.array,t.array),e._dirty=!0,e},a.cross=function(e,t,r){return i.a.cross(e.array,t.array,r.array),e._dirty=!0,e},a.dist=function(e,t){return i.a.distance(e.array,t.array)},a.distance=a.dist,a.div=function(e,t,r){return i.a.divide(e.array,t.array,r.array),e._dirty=!0,e},a.divide=a.div,a.dot=function(e,t){return i.a.dot(e.array,t.array)},a.len=function(e){return i.a.length(e.array)},a.lerp=function(e,t,r,n){return i.a.lerp(e.array,t.array,r.array,n),e._dirty=!0,e},a.min=function(e,t,r){return i.a.min(e.array,t.array,r.array),e._dirty=!0,e},a.max=function(e,t,r){return i.a.max(e.array,t.array,r.array),e._dirty=!0,e},a.mul=function(e,t,r){return i.a.multiply(e.array,t.array,r.array),e._dirty=!0,e},a.multiply=a.mul,a.negate=function(e,t){return i.a.negate(e.array,t.array),e._dirty=!0,e},a.normalize=function(e,t){return i.a.normalize(e.array,t.array),e._dirty=!0,e},a.random=function(e,t){return i.a.random(e.array,t),e._dirty=!0,e},a.scale=function(e,t,r){return i.a.scale(e.array,t.array,r),e._dirty=!0,e},a.scaleAndAdd=function(e,t,r,n){return i.a.scaleAndAdd(e.array,t.array,r.array,n),e._dirty=!0,e},a.sqrDist=function(e,t){return i.a.sqrDist(e.array,t.array)},a.squaredDistance=a.sqrDist,a.sqrLen=function(e){return i.a.sqrLen(e.array)},a.squaredLength=a.sqrLen,a.sub=function(e,t,r){return i.a.subtract(e.array,t.array,r.array),e._dirty=!0,e},a.subtract=a.sub,a.transformMat3=function(e,t,r){return i.a.transformMat3(e.array,t.array,r.array),e._dirty=!0,e},a.transformMat4=function(e,t,r){return i.a.transformMat4(e.array,t.array,r.array),e._dirty=!0,e},a.transformQuat=function(e,t,r){return i.a.transformQuat(e.array,t.array,r.array),e._dirty=!0,e};var u=Math.atan2,l=Math.asin,h=Math.abs;a.eulerFromQuat=function(e,t,r){e._dirty=!0,t=t.array;var i=e.array,a=t[0],o=t[1],s=t[2],h=t[3],c=a*a,d=o*o,f=s*s,p=h*h,r=(r||"XYZ").toUpperCase();switch(r){case"XYZ":i[0]=u(2*(a*h-o*s),p-c-d+f),i[1]=l(n(2*(a*s+o*h),-1,1)),i[2]=u(2*(s*h-a*o),p+c-d-f);break;case"YXZ":i[0]=l(n(2*(a*h-o*s),-1,1)),i[1]=u(2*(a*s+o*h),p-c-d+f),i[2]=u(2*(a*o+s*h),p-c+d-f);break;case"ZXY":i[0]=l(n(2*(a*h+o*s),-1,1)),i[1]=u(2*(o*h-s*a),p-c-d+f),i[2]=u(2*(s*h-a*o),p-c+d-f);break;case"ZYX":i[0]=u(2*(a*h+s*o),p-c-d+f),i[1]=l(n(2*(o*h-a*s),-1,1)),i[2]=u(2*(a*o+s*h),p+c-d-f);break;case"YZX":i[0]=u(2*(a*h-s*o),p-c+d-f),i[1]=u(2*(o*h-a*s),p+c-d-f),i[2]=l(n(2*(a*o+s*h),-1,1));break;case"XZY":i[0]=u(2*(a*h+o*s),p-c+d-f),i[1]=u(2*(a*s+o*h),p+c-d-f),i[2]=l(n(2*(s*h-a*o),-1,1));break;default:console.warn("Unkown order: "+r)}return e},a.eulerFromMat3=function(e,t,r){var i=t.array,a=i[0],o=i[3],s=i[6],c=i[1],d=i[4],f=i[7],p=i[2],m=i[5],g=i[8],_=e.array,r=(r||"XYZ").toUpperCase();switch(r){case"XYZ":_[1]=l(n(s,-1,1)),h(s)<.99999?(_[0]=u(-f,g),_[2]=u(-o,a)):(_[0]=u(m,d),_[2]=0);break;case"YXZ":_[0]=l(-n(f,-1,1)),h(f)<.99999?(_[1]=u(s,g),_[2]=u(c,d)):(_[1]=u(-p,a),_[2]=0);break;case"ZXY":_[0]=l(n(m,-1,1)),h(m)<.99999?(_[1]=u(-p,g),_[2]=u(-o,d)):(_[1]=0,_[2]=u(c,a));break;case"ZYX":_[1]=l(-n(p,-1,1)),h(p)<.99999?(_[0]=u(m,g),_[2]=u(c,a)):(_[0]=0,_[2]=u(-o,d));break;case"YZX":_[2]=l(n(c,-1,1)),h(c)<.99999?(_[0]=u(-f,d),_[1]=u(-p,a)):(_[0]=0,_[1]=u(s,g));break;case"XZY":_[2]=l(-n(o,-1,1)),h(o)<.99999?(_[0]=u(m,d),_[1]=u(s,a)):(_[0]=u(-f,g),_[1]=0);break;default:console.warn("Unkown order: "+r)}return e._dirty=!0,e},Object.defineProperties(a,{POSITIVE_X:{get:function(){return new a(1,0,0)}},NEGATIVE_X:{get:function(){return new a(-1,0,0)}},POSITIVE_Y:{get:function(){return new a(0,1,0)}},NEGATIVE_Y:{get:function(){return new a(0,-1,0)}},POSITIVE_Z:{get:function(){return new a(0,0,1)}},NEGATIVE_Z:{get:function(){return new a(0,0,-1)}},UP:{get:function(){return new a(0,1,0)}},ZERO:{get:function(){return new a}}}),t.a=a},function(e,t,r){"use strict";var n=r(7),i=r(11),a=r(57),o=n.a.extend({width:512,height:512,type:i.a.UNSIGNED_BYTE,format:i.a.RGBA,wrapS:i.a.REPEAT,wrapT:i.a.REPEAT,minFilter:i.a.LINEAR_MIPMAP_LINEAR,magFilter:i.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,sRGB:!0,unpackAlignment:4,premultiplyAlpha:!1,dynamic:!1,NPOT:!1,__used:0},function(){this._cache=new a.a},{getWebGLTexture:function(e){var t=e.gl,r=this._cache;return r.use(e.__uid__),r.miss("webgl_texture")&&r.put("webgl_texture",t.createTexture()),this.dynamic?this.update(e):r.isDirty()&&(this.update(e),r.fresh()),r.get("webgl_texture")},bind:function(){},unbind:function(){},dirty:function(){this._cache&&this._cache.dirtyAll()},update:function(e){},updateCommon:function(e){var t=e.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,this.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,this.unpackAlignment),this.format===i.a.DEPTH_COMPONENT&&(this.useMipmap=!1);var r=e.getGLExtension("EXT_sRGB");this.format!==o.SRGB||r||(this.format=o.RGB),this.format!==o.SRGB_ALPHA||r||(this.format=o.RGBA),this.NPOT=!this.isPowerOfTwo()},getAvailableWrapS:function(){return this.NPOT?i.a.CLAMP_TO_EDGE:this.wrapS},getAvailableWrapT:function(){return this.NPOT?i.a.CLAMP_TO_EDGE:this.wrapT},getAvailableMinFilter:function(){var e=this.minFilter;return this.NPOT||!this.useMipmap?e===i.a.NEAREST_MIPMAP_NEAREST||e===i.a.NEAREST_MIPMAP_LINEAR?i.a.NEAREST:e===i.a.LINEAR_MIPMAP_LINEAR||e===i.a.LINEAR_MIPMAP_NEAREST?i.a.LINEAR:e:e},getAvailableMagFilter:function(){return this.magFilter},nextHighestPowerOfTwo:function(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1},dispose:function(e){var t=this._cache;t.use(e.__uid__);var r=t.get("webgl_texture");r&&e.gl.deleteTexture(r),t.deleteContext(e.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(o.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e}}),Object.defineProperty(o.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e}}),o.BYTE=i.a.BYTE,o.UNSIGNED_BYTE=i.a.UNSIGNED_BYTE,o.SHORT=i.a.SHORT,o.UNSIGNED_SHORT=i.a.UNSIGNED_SHORT,o.INT=i.a.INT,o.UNSIGNED_INT=i.a.UNSIGNED_INT,o.FLOAT=i.a.FLOAT,o.HALF_FLOAT=36193,o.UNSIGNED_INT_24_8_WEBGL=34042,o.DEPTH_COMPONENT=i.a.DEPTH_COMPONENT,o.DEPTH_STENCIL=i.a.DEPTH_STENCIL,o.ALPHA=i.a.ALPHA,o.RGB=i.a.RGB,o.RGBA=i.a.RGBA,o.LUMINANCE=i.a.LUMINANCE,o.LUMINANCE_ALPHA=i.a.LUMINANCE_ALPHA,o.SRGB=35904,o.SRGB_ALPHA=35906,o.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,o.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,o.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,o.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,o.NEAREST=i.a.NEAREST,o.LINEAR=i.a.LINEAR,o.NEAREST_MIPMAP_NEAREST=i.a.NEAREST_MIPMAP_NEAREST,o.LINEAR_MIPMAP_NEAREST=i.a.LINEAR_MIPMAP_NEAREST,o.NEAREST_MIPMAP_LINEAR=i.a.NEAREST_MIPMAP_LINEAR,o.LINEAR_MIPMAP_LINEAR=i.a.LINEAR_MIPMAP_LINEAR,o.REPEAT=i.a.REPEAT,o.CLAMP_TO_EDGE=i.a.CLAMP_TO_EDGE,o.MIRRORED_REPEAT=i.a.MIRRORED_REPEAT,t.a=o},function(e,t,r){"use strict";function n(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))}function i(e,t){var r=n(e.width),i=n(e.height);return t=t||document.createElement("canvas"),t.width=r,t.height=i,t.getContext("2d").drawImage(e.image,0,0,r,i),t}var a=r(4),o=r(11),s=r(14),u=r(73),l=u.a.isPowerOfTwo,h=a.a.extend(function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}},{textureType:"texture2D",update:function(e){var t=e.gl;t.bindTexture(t.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(e);var r=this.format,n=this.type,i=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==a.a.REPEAT&&this.wrapT!==a.a.REPEAT||!this.NPOT);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,i?this.wrapS:this.getAvailableWrapS()),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,i?this.wrapT:this.getAvailableWrapT()),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,i?this.magFilter:this.getAvailableMagFilter()),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,i?this.minFilter:this.getAvailableMinFilter());var s=e.getGLExtension("EXT_texture_filter_anisotropic");if(s&&this.anisotropic>1&&t.texParameterf(t.TEXTURE_2D,s.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===n){e.getGLExtension("OES_texture_half_float")||(n=o.a.FLOAT)}if(this.mipmaps.length)for(var u=this.width,l=this.height,h=0;h<this.mipmaps.length;h++){var c=this.mipmaps[h];this._updateTextureData(t,c,h,u,l,r,n,!1),u/=2,l/=2}else this._updateTextureData(t,this,0,this.width,this.height,r,n,i),!this.useMipmap||this.NPOT&&!i||t.generateMipmap(t.TEXTURE_2D);t.bindTexture(t.TEXTURE_2D,null)},_updateTextureData:function(e,t,r,n,o,s,u,l){if(t.image){var h=t.image;l&&(this._potCanvas=i(this,this._potCanvas),h=this._potCanvas),e.texImage2D(e.TEXTURE_2D,r,s,s,u,h)}else s<=a.a.COMPRESSED_RGBA_S3TC_DXT5_EXT&&s>=a.a.COMPRESSED_RGB_S3TC_DXT1_EXT?e.compressedTexImage2D(e.TEXTURE_2D,r,s,n,o,0,t.pixels):e.texImage2D(e.TEXTURE_2D,r,s,n,o,0,s,u,t.pixels)},generateMipmap:function(e){var t=e.gl;this.useMipmap&&!this.NPOT&&(t.bindTexture(t.TEXTURE_2D,this._cache.get("webgl_texture")),t.generateMipmap(t.TEXTURE_2D))},isPowerOfTwo:function(){return l(this.width)&&l(this.height)},isRenderable:function(){return this.image?"CANVAS"===this.image.nodeName||"VIDEO"===this.image.nodeName||this.image.complete:!(!this.width||!this.height)},bind:function(e){e.gl.bindTexture(e.gl.TEXTURE_2D,this.getWebGLTexture(e))},unbind:function(e){e.gl.bindTexture(e.gl.TEXTURE_2D,null)},load:function(e,t){var r=s.a.createImage();t&&(r.crossOrigin=t);var n=this;return r.onload=function(){n.dirty(),n.trigger("success",n),r.onload=null},r.onerror=function(){n.trigger("error",n),r.onerror=null},r.src=e,this.image=r,this}});Object.defineProperty(h.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(e){this.image?console.warn("Texture from image can't set width"):(this._width!==e&&this.dirty(),this._width=e)}}),Object.defineProperty(h.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(e){this.image?console.warn("Texture from image can't set height"):(this._height!==e&&this.dirty(),this._height=e)}}),t.a=h},function(e,t,r){"use strict";var n=r(161);t.a=n.a},function(e,t,r){"use strict";var n=r(110),i=r(53),a=r(23),o=function(){this.__uid__=a.a.genGUID()};o.__initializers__=[function(e){a.a.extend(this,e)}],a.a.extend(o,n.a),a.a.extend(o.prototype,i.a),t.a=o},function(e,t,r){"use strict";function n(e){for(var t=[],r=0;r<e;r++)t[r]=0;return t}function i(e,t){var r="vertex:"+e+"fragment:"+t;if(x[r])return x[r];var n=l.a.genGUID();return x[r]=n,T[n]={vertex:e,fragment:t},n}function a(e){return e.replace(/[ \t]*\/\/.*\n/g,"").replace(/[ \t]*\/\*[\s\S]*?\*\//g,"")}function o(){console.error("Wrong uniform/attributes syntax")}function s(e,t){function r(e){e||o();var t=e.match(/\[(.*?)\]/);u=e.replace(/\[(.*?)\]/,""),c[u]={},t&&(c[u].isArray=!0,c[u].arraySize=t[1])}for(var n=/[,=\(\):]/,i=t.replace(/:\s*\[\s*(.*)\s*\]/g,"="+e+"($1)").replace(/\s+/g,"").split(/(?=[,=\(\):])/g),a=[],s=0;s<i.length;s++)i[s].match(n)?a.push(i[s].charAt(0),i[s].slice(1)):a.push(i[s]);i=a;var u,l=0,c={},d=null;r(i[0]);for(var s=1;s<i.length;s++){var f=i[s];if(f)if("="!==f)if(":"!==f)if(","!==f)if(")"!==f)if("("!==f)if(f.indexOf("vec")>=0){if(1!==l&&4!==l){o();break}l=2,d=[]}else if(1!==l)if(4!==l)r(f),l=0;else{var p=f;g.indexOf(p)>=0||_.indexOf(p)>=0||v.indexOf(p)>=0?c[u].semantic=p:"ignore"===p||"unconfigurable"===p?c[u].ignore=!0:c[u].value="bool"===e?"true"===p:parseFloat(p)}else c[u].value="bool"===e?"true"===f:parseFloat(f),d=null;else{if(2!==l){o();break}if(!(d instanceof Array)){o();break}d.push(+i[++s])}else c[u].value=new h.a.Float32Array(d),d=null,l=5;else if(2===l){if(!(d instanceof Array)){o();break}d.push(+i[++s])}else l=5;else l=4;else{if(0!==l&&3!==l){o();break}l=1}}return c}function u(e,t){"object"==typeof e&&(t=e.fragment,e=e.vertex),e=a(e),t=a(t),this._shaderID=i(e,t),this._vertexCode=u.parseImport(e),this._fragmentCode=u.parseImport(t),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}var l=r(23),h=r(14),c=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g,d=/attribute\s+(float|int|vec2|vec3|vec4)\s+([\s\S]*?);/g,f=/#define\s+(\w+)?(\s+[\d-.]+)?\s*;?\s*\n/g,p={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"},m={bool:function(){return!0},int:function(){return 0},float:function(){return 0},sampler2D:function(){return null},samplerCube:function(){return null},vec2:function(){return n(2)},vec3:function(){return n(3)},vec4:function(){return n(4)},ivec2:function(){return n(2)},ivec3:function(){return n(3)},ivec4:function(){return n(4)},mat2:function(){return n(4)},mat3:function(){return n(9)},mat4:function(){return n(16)},array:function(){return[]}},g=["POSITION","NORMAL","BINORMAL","TANGENT","TEXCOORD","TEXCOORD_0","TEXCOORD_1","COLOR","JOINT","WEIGHT"],_=["SKIN_MATRIX","VIEWPORT_SIZE","VIEWPORT","DEVICEPIXELRATIO","WINDOW_SIZE","NEAR","FAR","TIME"],v=["WORLD","VIEW","PROJECTION","WORLDVIEW","VIEWPROJECTION","WORLDVIEWPROJECTION","WORLDINVERSE","VIEWINVERSE","PROJECTIONINVERSE","WORLDVIEWINVERSE","VIEWPROJECTIONINVERSE","WORLDVIEWPROJECTIONINVERSE","WORLDTRANSPOSE","VIEWTRANSPOSE","PROJECTIONTRANSPOSE","WORLDVIEWTRANSPOSE","VIEWPROJECTIONTRANSPOSE","WORLDVIEWPROJECTIONTRANSPOSE","WORLDINVERSETRANSPOSE","VIEWINVERSETRANSPOSE","PROJECTIONINVERSETRANSPOSE","WORLDVIEWINVERSETRANSPOSE","VIEWPROJECTIONINVERSETRANSPOSE","WORLDVIEWPROJECTIONINVERSETRANSPOSE"],y={vec4:4,vec3:3,vec2:2,float:1},x={},T={};u.prototype={constructor:u,createUniforms:function(){var e={};for(var t in this.uniformTemplates){var r=this.uniformTemplates[t];e[t]={type:r.type,value:r.value()}}return e},_parseImport:function(){this._vertexCode=u.parseImport(this.vertex),this._fragmentCode=u.parseImport(this.fragment)},_addSemanticUniform:function(e,t,r){if(g.indexOf(r)>=0)this.attributeSemantics[r]={symbol:e,type:t};else if(v.indexOf(r)>=0){var n=!1,i=r;r.match(/TRANSPOSE$/)&&(n=!0,i=r.slice(0,-9)),this.matrixSemantics[r]={symbol:e,type:t,isTranspose:n,semanticNoTranspose:i}}else _.indexOf(r)>=0&&(this.uniformSemantics[r]={symbol:e,type:t})},_addMaterialUniform:function(e,t,r,n,i,a){a[e]={type:r,value:i?m.array:n||m[t],semantic:null}},_parseUniforms:function(){function e(e){return null!=e?function(){return e}:null}function t(t,a,o){var u=s(a,o),l=[];for(var h in u){var c=u[h],d=c.semantic,f=h,m=p[a],g=e(u[h].value);u[h].isArray&&(f+="["+u[h].arraySize+"]",m+="v"),l.push(f),n._uniformList.push(h),c.ignore||("sampler2D"!==a&&"samplerCube"!==a||(n.textures[h]={shaderType:i,type:a}),d?n._addSemanticUniform(h,m,d):n._addMaterialUniform(h,a,m,g,u[h].isArray,r))}return l.length>0?"uniform "+a+" "+l.join(",")+";\n":""}var r={},n=this,i="vertex";this._uniformList=[],this._vertexCode=this._vertexCode.replace(c,t),i="fragment",this._fragmentCode=this._fragmentCode.replace(c,t),n.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=r},_parseAttributes:function(){function e(e,n,i){var a=s(n,i),o=y[n]||1,u=[];for(var l in a){var h=a[l].semantic;if(t[l]={type:"float",size:o,semantic:h||null},h){if(g.indexOf(h)<0)throw new Error('Unkown semantic "'+h+'"');r.attributeSemantics[h]={symbol:l,type:n}}u.push(l)}return"attribute "+n+" "+u.join(",")+";\n"}var t={},r=this;this._vertexCode=this._vertexCode.replace(d,e),this.attributes=t},_parseDefines:function(){function e(e,n,i){var a="vertex"===r?t.vertexDefines:t.fragmentDefines;return a[n]||(a[n]="false"!==i&&("true"===i||(i?isNaN(parseFloat(i))?i.trim():parseFloat(i):null))),""}var t=this,r="vertex";this._vertexCode=this._vertexCode.replace(f,e),r="fragment",this._fragmentCode=this._fragmentCode.replace(f,e)},clone:function(){var e=T[this._shaderID];return new u(e.vertex,e.fragment)}},Object.defineProperty&&(Object.defineProperty(u.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(u.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(u.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(u.prototype,"uniforms",{get:function(){return this._uniformList}}));var b=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;u.parseImport=function(e){return e=e.replace(b,function(e,t,r){var e=u.source(r);return e?u.parseImport(e):(console.error('Shader chunk "'+r+'" not existed in library'),"")})};var w=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;u.import=function(e){e.replace(w,function(e,t,r,n){var n=n.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"");if(n){for(var i,a=r.split("."),o=u.codes,s=0;s<a.length-1;)i=a[s++],o[i]||(o[i]={}),o=o[i];i=a[s],o[i]=n}return n})},u.codes={},u.source=function(e){for(var t=e.split("."),r=u.codes,n=0;r&&n<t.length;){r=r[t[n++]]}return"string"!=typeof r?(console.error('Shader "'+e+'" not existed in library'),""):r},t.a=u},function(e,t,r){"use strict";var n=r(21),i=r(12),a=r(55),o=r(34),s=r(3),u=function(){this._axisX=new s.a,this._axisY=new s.a,this._axisZ=new s.a,this.array=n.a.create(),this._dirty=!0};u.prototype={constructor:u,setArray:function(e){for(var t=0;t<this.array.length;t++)this.array[t]=e[t];return this._dirty=!0,this},adjoint:function(){return n.a.adjoint(this.array,this.array),this._dirty=!0,this},clone:function(){return(new u).copy(this)},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},determinant:function(){return n.a.determinant(this.array)},fromQuat:function(e){return n.a.fromQuat(this.array,e.array),this._dirty=!0,this},fromRotationTranslation:function(e,t){return n.a.fromRotationTranslation(this.array,e.array,t.array),this._dirty=!0,this},fromMat2d:function(e){return u.fromMat2d(this,e),this},frustum:function(e,t,r,i,a,o){return n.a.frustum(this.array,e,t,r,i,a,o),this._dirty=!0,this},identity:function(){return n.a.identity(this.array),this._dirty=!0,this},invert:function(){return n.a.invert(this.array,this.array),this._dirty=!0,this},lookAt:function(e,t,r){return n.a.lookAt(this.array,e.array,t.array,r.array),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return n.a.mul(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return n.a.multiply(this.array,e.array,this.array),this._dirty=!0,this},ortho:function(e,t,r,i,a,o){return n.a.ortho(this.array,e,t,r,i,a,o),this._dirty=!0,this},perspective:function(e,t,r,i){return n.a.perspective(this.array,e,t,r,i),this._dirty=!0,this},rotate:function(e,t){return n.a.rotate(this.array,this.array,e,t.array),this._dirty=!0,this},rotateX:function(e){return n.a.rotateX(this.array,this.array,e),this._dirty=!0,this},rotateY:function(e){return n.a.rotateY(this.array,this.array,e),this._dirty=!0,this},rotateZ:function(e){return n.a.rotateZ(this.array,this.array,e),this._dirty=!0,this},scale:function(e){return n.a.scale(this.array,this.array,e.array),this._dirty=!0,this},translate:function(e){return n.a.translate(this.array,this.array,e.array),this._dirty=!0,this},transpose:function(){return n.a.transpose(this.array,this.array),this._dirty=!0,this},decomposeMatrix:function(){var e=i.a.create(),t=i.a.create(),r=i.a.create(),n=o.a.create();return function(s,u,l){var h=this.array;i.a.set(e,h[0],h[1],h[2]),i.a.set(t,h[4],h[5],h[6]),i.a.set(r,h[8],h[9],h[10]);var c=i.a.length(e),d=i.a.length(t),f=i.a.length(r);this.determinant()<0&&(c=-c),s&&s.set(c,d,f),l.set(h[12],h[13],h[14]),o.a.fromMat4(n,h),n[0]/=c,n[1]/=c,n[2]/=c,n[3]/=d,n[4]/=d,n[5]/=d,n[6]/=f,n[7]/=f,n[8]/=f,a.a.fromMat3(u.array,n),a.a.normalize(u.array,u.array),u._dirty=!0,l._dirty=!0}}(),toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var l=Object.defineProperty;if(l){var h=u.prototype;l(h,"z",{get:function(){var e=this.array;return this._axisZ.set(e[8],e[9],e[10]),this._axisZ},set:function(e){var t=this.array;e=e.array,t[8]=e[0],t[9]=e[1],t[10]=e[2],this._dirty=!0}}),l(h,"y",{get:function(){var e=this.array;return this._axisY.set(e[4],e[5],e[6]),this._axisY},set:function(e){var t=this.array;e=e.array,t[4]=e[0],t[5]=e[1],t[6]=e[2],this._dirty=!0}}),l(h,"x",{get:function(){var e=this.array;return this._axisX.set(e[0],e[1],e[2]),this._axisX},set:function(e){var t=this.array;e=e.array,t[0]=e[0],t[1]=e[1],t[2]=e[2],this._dirty=!0}})}u.adjoint=function(e,t){return n.a.adjoint(e.array,t.array),e._dirty=!0,e},u.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},u.determinant=function(e){return n.a.determinant(e.array)},u.identity=function(e){return n.a.identity(e.array),e._dirty=!0,e},u.ortho=function(e,t,r,i,a,o,s){return n.a.ortho(e.array,t,r,i,a,o,s),e._dirty=!0,e},u.perspective=function(e,t,r,i,a){return n.a.perspective(e.array,t,r,i,a),e._dirty=!0,e},u.lookAt=function(e,t,r,i){return n.a.lookAt(e.array,t.array,r.array,i.array),e._dirty=!0,e},u.invert=function(e,t){return n.a.invert(e.array,t.array),e._dirty=!0,e},u.mul=function(e,t,r){return n.a.mul(e.array,t.array,r.array),e._dirty=!0,e},u.multiply=u.mul,u.fromQuat=function(e,t){return n.a.fromQuat(e.array,t.array),e._dirty=!0,e},u.fromRotationTranslation=function(e,t,r){return n.a.fromRotationTranslation(e.array,t.array,r.array),e._dirty=!0,e},u.fromMat2d=function(e,t){e._dirty=!0;var t=t.array,e=e.array;return e[0]=t[0],e[4]=t[2],e[12]=t[4],e[1]=t[1],e[5]=t[3],e[13]=t[5],e},u.rotate=function(e,t,r,i){return n.a.rotate(e.array,t.array,r,i.array),e._dirty=!0,e},u.rotateX=function(e,t,r){return n.a.rotateX(e.array,t.array,r),e._dirty=!0,e},u.rotateY=function(e,t,r){return n.a.rotateY(e.array,t.array,r),e._dirty=!0,e},u.rotateZ=function(e,t,r){return n.a.rotateZ(e.array,t.array,r),e._dirty=!0,e},u.scale=function(e,t,r){return n.a.scale(e.array,t.array,r.array),e._dirty=!0,e},u.transpose=function(e,t){return n.a.transpose(e.array,t.array),e._dirty=!0,e},u.translate=function(e,t,r){return n.a.translate(e.array,t.array,r.array),e._dirty=!0,e},t.a=u},function(e,t,r){"use strict";var n=r(7),i=r(4),a=(r(27),r(11)),o=r(57),s=a.a.FRAMEBUFFER,u=a.a.RENDERBUFFER,l=a.a.DEPTH_ATTACHMENT,h=a.a.COLOR_ATTACHMENT0,c=n.a.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},function(){this._cache=new o.a,this._textures={}},{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(e){if(e.__currentFrameBuffer){if(e.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}e.__currentFrameBuffer=this;var t=e.gl;t.bindFramebuffer(s,this._getFrameBufferGL(e)),this._boundRenderer=e;var r=this._cache;r.put("viewport",e.viewport);var n,i,a=!1;for(var o in this._textures){a=!0;var h=this._textures[o];h&&(n=h.texture.width,i=h.texture.height,this._doAttach(e,h.texture,o,h.target))}this._width=n,this._height=i,!a&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?e.setViewport(this.viewport):e.setViewport(0,0,n,i,1);var c=r.get("attached_textures");if(c)for(var o in c)if(!this._textures[o]){var d=c[o];this._doDetach(t,o,d)}if(!r.get("depthtexture_attached")&&this.depthBuffer){r.miss("renderbuffer")&&r.put("renderbuffer",t.createRenderbuffer());var f=r.get("renderbuffer");n===r.get("renderbuffer_width")&&i===r.get("renderbuffer_height")||(t.bindRenderbuffer(u,f),t.renderbufferStorage(u,t.DEPTH_COMPONENT16,n,i),r.put("renderbuffer_width",n),r.put("renderbuffer_height",i),t.bindRenderbuffer(u,null)),r.get("renderbuffer_attached")||(t.framebufferRenderbuffer(s,l,u,f),r.put("renderbuffer_attached",!0))}},unbind:function(e){e.__currentFrameBuffer=null,e.gl.bindFramebuffer(s,null),this._boundRenderer=null,this._cache.use(e.__uid__);var t=this._cache.get("viewport");t&&e.setViewport(t),this.updateMipmap(e)},updateMipmap:function(e){var t=e.gl;for(var r in this._textures){var n=this._textures[r];if(n){var o=n.texture;if(!o.NPOT&&o.useMipmap&&o.minFilter===i.a.LINEAR_MIPMAP_LINEAR){var s="textureCube"===o.textureType?a.a.TEXTURE_CUBE_MAP:a.a.TEXTURE_2D;t.bindTexture(s,o.getWebGLTexture(e)),t.generateMipmap(s),t.bindTexture(s,null)}}}},checkStatus:function(e){return e.checkFramebufferStatus(s)},_getFrameBufferGL:function(e){var t=this._cache;return t.use(e.__uid__),t.miss("framebuffer")&&t.put("framebuffer",e.gl.createFramebuffer()),t.get("framebuffer")},attach:function(e,t,r){if(!e.width)throw new Error("The texture attached to color buffer is not a valid.");t=t||h,r=r||a.a.TEXTURE_2D;var n,i=this._boundRenderer,o=i&&i.gl;if(o){var s=this._cache;s.use(i.__uid__),n=s.get("attached_textures")}var u=this._textures[t];if(!u||u.target!==r||u.texture!==e||!n||null==n[t]){var l=!0;i&&(l=this._doAttach(i,e,t,r),this.viewport||i.setViewport(0,0,e.width,e.height,1)),l&&(this._textures[t]=this._textures[t]||{},this._textures[t].texture=e,this._textures[t].target=r)}},_doAttach:function(e,t,r,n){var i=e.gl,o=t.getWebGLTexture(e),h=this._cache.get("attached_textures");if(h&&h[r]){var c=h[r];if(c.texture===t&&c.target===n)return}r=+r;var d=!0;if(r===l||r===a.a.DEPTH_STENCIL_ATTACHMENT){if(e.getGLExtension("WEBGL_depth_texture")||(console.error("Depth texture is not supported by the browser"),d=!1),t.format!==a.a.DEPTH_COMPONENT&&t.format!==a.a.DEPTH_STENCIL&&(console.error("The texture attached to depth buffer is not a valid."),d=!1),d){var f=this._cache.get("renderbuffer");f&&(i.framebufferRenderbuffer(s,l,u,null),i.deleteRenderbuffer(f),this._cache.put("renderbuffer",!1)),this._cache.put("renderbuffer_attached",!1),this._cache.put("depthtexture_attached",!0)}}return i.framebufferTexture2D(s,r,n,o,0),h||(h={},this._cache.put("attached_textures",h)),h[r]=h[r]||{},h[r].texture=t,h[r].target=n,d},_doDetach:function(e,t,r){e.framebufferTexture2D(s,t,r,null,0);var n=this._cache.get("attached_textures");n&&n[t]&&(n[t]=null),t!==l&&t!==a.a.DEPTH_STENCIL_ATTACHMENT||this._cache.put("depthtexture_attached",!1)},detach:function(e,t){if(this._textures[e]=null,this._boundRenderer){this._cache.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,e,t)}},dispose:function(e){var t=e.gl,r=this._cache;r.use(e.__uid__);var n=r.get("renderbuffer");n&&t.deleteRenderbuffer(n);var i=r.get("framebuffer");i&&t.deleteFramebuffer(i),r.deleteContext(e.__uid__),this._textures={}}});c.DEPTH_ATTACHMENT=l,c.COLOR_ATTACHMENT0=h,c.STENCIL_ATTACHMENT=a.a.STENCIL_ATTACHMENT,c.DEPTH_STENCIL_ATTACHMENT=a.a.DEPTH_STENCIL_ATTACHMENT,t.a=c},function(e,t,r){"use strict";t.a={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444}},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(3);return e[0]=0,e[1]=0,e[2]=0,e},i.clone=function(e){var t=new n.a(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},i.fromValues=function(e,t,r){var i=new n.a(3);return i[0]=e,i[1]=t,i[2]=r,i},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},i.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},i.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},i.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},i.sub=i.subtract,i.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e},i.mul=i.multiply,i.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},i.div=i.divide,i.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},i.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},i.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e},i.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e},i.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)},i.dist=i.distance,i.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i},i.sqrDist=i.squaredDistance,i.length=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)},i.len=i.length,i.squaredLength=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n},i.sqrLen=i.squaredLength,i.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},i.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},i.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e},i.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},i.cross=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2];return e[0]=i*u-a*s,e[1]=a*o-n*u,e[2]=n*s-i*o,e},i.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e},i.random=function(e,t){t=t||1;var r=2*Object(n.c)()*Math.PI,i=2*Object(n.c)()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=i*t,e},i.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e},i.transformMat3=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e},i.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],l=r[3],h=l*n+s*a-u*i,c=l*i+u*n-o*a,d=l*a+o*i-s*n,f=-o*n-s*i-u*a;return e[0]=h*l+f*-o+c*-u-d*-s,e[1]=c*l+f*-s+d*-o-h*-u,e[2]=d*l+f*-u+h*-s-c*-o,e},i.rotateX=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},i.rotateY=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},i.rotateZ=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},i.forEach=function(){var e=i.create();return function(t,r,n,i,a,o){var s,u;for(r||(r=3),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}}(),i.angle=function(e,t){var r=i.fromValues(e[0],e[1],e[2]),n=i.fromValues(t[0],t[1],t[2]);i.normalize(r,r),i.normalize(n,n);var a=i.dot(r,n);return a>1?0:Math.acos(a)},t.a=i},function(e,t){function r(e,t){"createCanvas"===e&&(J=null),K[e]=t}function n(e){if(null==e||"object"!=typeof e)return e;var t=e,r=k.call(e);if("[object Array]"===r){if(!F(e)){t=[];for(var i=0,a=e.length;i<a;i++)t[i]=n(e[i])}}else if(V[r]){if(!F(e)){var o=e.constructor;if(e.constructor.from)t=o.from(e);else{t=new o(e.length);for(var i=0,a=e.length;i<a;i++)t[i]=n(e[i])}}}else if(!H[r]&&!F(e)&&!A(e)){t={};for(var s in e)e.hasOwnProperty(s)&&(t[s]=n(e[s]))}return t}function i(e,t,r){if(!w(t)||!w(e))return r?n(t):e;for(var a in t)if(t.hasOwnProperty(a)){var o=e[a],s=t[a];!w(s)||!w(o)||x(s)||x(o)||A(s)||A(o)||E(s)||E(o)||F(s)||F(o)?!r&&a in e||(e[a]=n(t[a],!0)):i(o,s,r)}return e}function a(e,t){for(var r=e[0],n=1,a=e.length;n<a;n++)r=i(r,e[n],t);return r}function o(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function s(e,t,r){for(var n in t)t.hasOwnProperty(n)&&(r?null!=t[n]:null==e[n])&&(e[n]=t[n]);return e}function u(){return J||(J=Q().getContext("2d")),J}function l(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r}return-1}function h(e,t){function r(){}var n=e.prototype;r.prototype=t.prototype,e.prototype=new r;for(var i in n)e.prototype[i]=n[i];e.prototype.constructor=e,e.superClass=t}function c(e,t,r){e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,s(e,t,r)}function d(e){if(e)return"string"!=typeof e&&"number"==typeof e.length}function f(e,t,r){if(e&&t)if(e.forEach&&e.forEach===j)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)}function p(e,t,r){if(e&&t){if(e.map&&e.map===Z)return e.map(t,r);for(var n=[],i=0,a=e.length;i<a;i++)n.push(t.call(r,e[i],i,e));return n}}function m(e,t,r,n){if(e&&t){if(e.reduce&&e.reduce===Y)return e.reduce(t,r,n);for(var i=0,a=e.length;i<a;i++)r=t.call(n,r,e[i],i,e);return r}}function g(e,t,r){if(e&&t){if(e.filter&&e.filter===X)return e.filter(t,r);for(var n=[],i=0,a=e.length;i<a;i++)t.call(r,e[i],i,e)&&n.push(e[i]);return n}}function _(e,t,r){if(e&&t)for(var n=0,i=e.length;n<i;n++)if(t.call(r,e[n],n,e))return e[n]}function v(e,t){var r=q.call(arguments,2);return function(){return e.apply(t,r.concat(q.call(arguments)))}}function y(e){var t=q.call(arguments,1);return function(){return e.apply(this,t.concat(q.call(arguments)))}}function x(e){return"[object Array]"===k.call(e)}function T(e){return"function"==typeof e}function b(e){return"[object String]"===k.call(e)}function w(e){var t=typeof e;return"function"===t||!!e&&"object"==t}function E(e){return!!H[k.call(e)]}function S(e){return!!V[k.call(e)]}function A(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function M(e){return e!==e}function C(e){for(var t=0,r=arguments.length;t<r;t++)if(null!=arguments[t])return arguments[t]}function L(e,t){return null!=e?e:t}function D(e,t,r){return null!=e?e:null!=t?t:r}function N(){return Function.call.apply(q,arguments)}function R(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function P(e,t){if(!e)throw new Error(t)}function I(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function O(e){e[$]=!0}function F(e){return e[$]}function B(e){function t(e,t){r?n.set(e,t):n.set(t,e)}var r=x(e),n=this;e instanceof B?e.each(t):e&&f(e,t)}function U(e){return new B(e)}function z(e,t){for(var r=new e.constructor(e.length+t.length),n=0;n<e.length;n++)r[n]=e[n];var i=e.length;for(n=0;n<t.length;n++)r[n+i]=t[n];return r}function G(){}var H={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},V={"[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},k=Object.prototype.toString,W=Array.prototype,j=W.forEach,X=W.filter,q=W.slice,Z=W.map,Y=W.reduce,K={},Q=function(){return K.createCanvas()};K.createCanvas=function(){return document.createElement("canvas")};var J,$="__ec_primitive__";B.prototype={constructor:B,get:function(e){return this.hasOwnProperty(e)?this[e]:null},set:function(e,t){return this[e]=t},each:function(e,t){void 0!==t&&(e=v(e,t));for(var r in this)this.hasOwnProperty(r)&&e(this[r],r)},removeKey:function(e){delete this[e]}},t.$override=r,t.clone=n,t.merge=i,t.mergeAll=a,t.extend=o,t.defaults=s,t.createCanvas=Q,t.getContext=u,t.indexOf=l,t.inherits=h,t.mixin=c,t.isArrayLike=d,t.each=f,t.map=p,t.reduce=m,t.filter=g,t.find=_,t.bind=v,t.curry=y,t.isArray=x,t.isFunction=T,t.isString=b,t.isObject=w,t.isBuiltInObject=E,t.isTypedArray=S,t.isDom=A,t.eqNaN=M,t.retrieve=C,t.retrieve2=L,t.retrieve3=D,t.slice=N,t.normalizeCssArray=R,t.assert=P,t.trim=I,t.setAsPrimitive=O,t.isPrimitive=F,t.createHashMap=U,t.concatArray=z,t.noop=G},function(e,t,r){"use strict";(function(e){var n,i=r(112),a={};a.supportWebGL=function(){if(null==n)try{var e=document.createElement("canvas");if(!(e.getContext("webgl")||e.getContext("experimental-webgl")))throw new Error}catch(e){n=!1}return n},a.Int8Array="undefined"==typeof Int8Array?Array:Int8Array,a.Uint8Array="undefined"==typeof Uint8Array?Array:Uint8Array,a.Uint16Array="undefined"==typeof Uint16Array?Array:Uint16Array,a.Uint32Array="undefined"==typeof Uint32Array?Array:Uint32Array,a.Int16Array="undefined"==typeof Int16Array?Array:Int16Array,a.Float32Array="undefined"==typeof Float32Array?Array:Float32Array,a.Float64Array="undefined"==typeof Float64Array?Array:Float64Array;var o={};"undefined"!=typeof window?o=window:void 0!==e&&(o=e),a.requestAnimationFrame=o.requestAnimationFrame||o.msRequestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},a.createCanvas=function(){return document.createElement("canvas")},a.createImage=function(){return new o.Image},a.request={get:i.a.get},t.a=a}).call(t,r(68))},function(e,t,r){"use strict";var n=r(14),i=r(12),a=r(21),o=r(18),s=r(118),u=i.a.create,l=i.a.add,h=i.a.set,c=s.a.Attribute,d=s.a.extend(function(){return{attributes:{position:new c("position","float",3,"POSITION"),texcoord0:new c("texcoord0","float",2,"TEXCOORD_0"),texcoord1:new c("texcoord1","float",2,"TEXCOORD_1"),normal:new c("normal","float",3,"NORMAL"),tangent:new c("tangent","float",4,"TANGENT"),color:new c("color","float",4,"COLOR"),weight:new c("weight","float",3,"WEIGHT"),joint:new c("joint","float",4,"JOINT"),barycentric:new c("barycentric","float",3,null)},boundingBox:null}},{mainAttribute:"position",updateBoundingBox:function(){var e=this.boundingBox;e||(e=this.boundingBox=new o.a);var t=this.attributes.position.value;if(t&&t.length){var r=e.min,n=e.max,a=r.array,s=n.array;i.a.set(a,t[0],t[1],t[2]),i.a.set(s,t[0],t[1],t[2]);for(var u=3;u<t.length;){var l=t[u++],h=t[u++],c=t[u++];l<a[0]&&(a[0]=l),h<a[1]&&(a[1]=h),c<a[2]&&(a[2]=c),l>s[0]&&(s[0]=l),h>s[1]&&(s[1]=h),c>s[2]&&(s[2]=c)}r._dirty=!0,n._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var e=this.indices,t=this.attributes,r=t.position.value,a=t.normal.value;if(a&&a.length===r.length)for(var o=0;o<a.length;o++)a[o]=0;else a=t.normal.value=new n.a.Float32Array(r.length);for(var s,l,c,d=u(),f=u(),p=u(),m=u(),g=u(),_=u(),v=e?e.length:this.vertexCount,y=0;y<v;){e?(s=e[y++],l=e[y++],c=e[y++]):(s=y++,l=y++,c=y++),h(d,r[3*s],r[3*s+1],r[3*s+2]),h(f,r[3*l],r[3*l+1],r[3*l+2]),h(p,r[3*c],r[3*c+1],r[3*c+2]),i.a.sub(m,d,f),i.a.sub(g,f,p),i.a.cross(_,m,g);for(var o=0;o<3;o++)a[3*s+o]=a[3*s+o]+_[o],a[3*l+o]=a[3*l+o]+_[o],a[3*c+o]=a[3*c+o]+_[o]}for(var o=0;o<a.length;)h(_,a[o],a[o+1],a[o+2]),i.a.normalize(_,_),a[o++]=_[0],a[o++]=_[1],a[o++]=_[2];this.dirty()}},generateFaceNormals:function(){if(this.vertexCount){this.isUniqueVertex()||this.generateUniqueVertex();var e=this.indices,t=this.attributes,r=t.position.value,n=t.normal.value,a=u(),o=u(),s=u(),l=u(),c=u(),d=u();n||(n=t.normal.value=new Float32Array(r.length));for(var f,p,m,g=e?e.length:this.vertexCount,_=0;_<g;){e?(f=e[_++],p=e[_++],m=e[_++]):(f=_++,p=_++,m=_++),h(a,r[3*f],r[3*f+1],r[3*f+2]),h(o,r[3*p],r[3*p+1],r[3*p+2]),h(s,r[3*m],r[3*m+1],r[3*m+2]),i.a.sub(l,a,o),i.a.sub(c,o,s),i.a.cross(d,l,c),i.a.normalize(d,d);for(var v=0;v<3;v++)n[3*f+v]=d[v],n[3*p+v]=d[v],n[3*m+v]=d[v]}this.dirty()}},generateTangents:function(){if(this.vertexCount){var e=this.vertexCount,t=this.attributes;t.tangent.value||(t.tangent.value=new Float32Array(4*e));var r=t.texcoord0.value,n=t.position.value,a=t.tangent.value,o=t.normal.value;if(!r)return void console.warn("Geometry without texcoords can't generate tangents.");for(var s=[],h=[],c=0;c<e;c++)s[c]=[0,0,0],h[c]=[0,0,0];for(var d,f,p,m=[0,0,0],g=[0,0,0],_=this.indices,v=_?_.length:this.vertexCount,c=0;c<v;){_?(d=_[c++],f=_[c++],p=_[c++]):(d=c++,f=c++,p=c++);var y=r[2*d],x=r[2*f],T=r[2*p],b=r[2*d+1],w=r[2*f+1],E=r[2*p+1],S=n[3*d],A=n[3*f],M=n[3*p],C=n[3*d+1],L=n[3*f+1],D=n[3*p+1],N=n[3*d+2],R=n[3*f+2],P=n[3*p+2],I=A-S,O=M-S,F=L-C,B=D-C,U=R-N,z=P-N,G=x-y,H=T-y,V=w-b,k=E-b,W=1/(G*k-V*H);m[0]=(k*I-V*O)*W,m[1]=(k*F-V*B)*W,m[2]=(k*U-V*z)*W,g[0]=(G*O-H*I)*W,g[1]=(G*B-H*F)*W,g[2]=(G*z-H*U)*W,l(s[d],s[d],m),l(s[f],s[f],m),l(s[p],s[p],m),l(h[d],h[d],g),l(h[f],h[f],g),l(h[p],h[p],g)}for(var j=u(),X=u(),q=u(),c=0;c<e;c++){q[0]=o[3*c],q[1]=o[3*c+1],q[2]=o[3*c+2];var Z=s[c];i.a.scale(j,q,i.a.dot(q,Z)),i.a.sub(j,Z,j),i.a.normalize(j,j),i.a.cross(X,q,Z),a[4*c]=j[0],a[4*c+1]=j[1],a[4*c+2]=j[2],a[4*c+3]=i.a.dot(X,h[c])<0?-1:1}this.dirty()}},isUniqueVertex:function(){return!this.isUseIndices()||this.vertexCount===this.indices.length},generateUniqueVertex:function(){if(this.vertexCount&&this.indices){this.indices.length>65535&&(this.indices=new n.a.Uint32Array(this.indices));for(var e=this.attributes,t=this.indices,r=this.getEnabledAttributes(),i={},a=0;a<r.length;a++){var o=r[a];i[o]=e[o].value,e[o].init(this.indices.length)}for(var s=0,u=0;u<t.length;u++){for(var l=t[u],a=0;a<r.length;a++)for(var o=r[a],h=e[o].value,c=e[o].size,d=0;d<c;d++)h[s*c+d]=i[o][l*c+d];t[u]=s,s++}this.dirty()}},generateBarycentric:function(){if(this.vertexCount){this.isUniqueVertex()||this.generateUniqueVertex();var e=this.attributes,t=e.barycentric.value,r=this.indices;if(!t||t.length!==3*r.length){t=e.barycentric.value=new Float32Array(3*r.length);for(var n=0;n<(r?r.length:this.vertexCount/3);)for(var i=0;i<3;i++){var a=r?r[n++]:3*n+i;t[3*a+i]=1}this.dirty()}}},applyTransform:function(e){var t=this.attributes,r=t.position.value,n=t.normal.value,o=t.tangent.value;e=e.array;var s=a.a.create();a.a.invert(s,e),a.a.transpose(s,s);var u=i.a.transformMat4,l=i.a.forEach;l(r,3,0,null,u,e),n&&l(n,3,0,null,u,s),o&&l(o,4,0,null,u,s),this.boundingBox&&this.updateBoundingBox()},dispose:function(e){var t=this._cache;t.use(e.__uid__);var r=t.get("chunks");if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=0;a<i.attributeBuffers.length;a++){var o=i.attributeBuffers[a];e.gl.deleteBuffer(o.buffer)}i.indicesBuffer&&e.gl.deleteBuffer(i.indicesBuffer.buffer)}if(this.__vaoCache){var s=e.getGLExtension("OES_vertex_array_object");for(var u in this.__vaoCache){var l=this.__vaoCache[u].vao;l&&s.deleteVertexArrayOES(l)}}this.__vaoCache={},t.deleteContext(e.__uid__)}});d.STATIC_DRAW=s.a.STATIC_DRAW,d.DYNAMIC_DRAW=s.a.DYNAMIC_DRAW,d.STREAM_DRAW=s.a.STREAM_DRAW,d.AttributeBuffer=s.a.AttributeBuffer,d.IndicesBuffer=s.a.IndicesBuffer,d.Attribute=c,t.a=d},function(e,t,r){"use strict";var n=r(7),i=r(37),a=r(43),o=r(8),s=r(19),u=r(40),l=r(11),h=r(126);o.a.import(h.a);var c=new a.a,d=new u.a({geometry:c,frustumCulling:!1}),f=new i.a,p=n.a.extend(function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}},function(){var e=new o.a(o.a.source("clay.compositor.vertex"),this.fragment),t=new s.a({shader:e});t.enableTexturesAll(),this.material=t},{setUniform:function(e,t){this.material.setUniform(e,t)},getUniform:function(e){var t=this.material.uniforms[e];if(t)return t.value},attachOutput:function(e,t){this.outputs||(this.outputs={}),t=t||l.a.COLOR_ATTACHMENT0,this.outputs[t]=e},detachOutput:function(e){for(var t in this.outputs)this.outputs[t]===e&&(this.outputs[t]=null)},bind:function(e,t){if(this.outputs)for(var r in this.outputs){var n=this.outputs[r];n&&t.attach(n,r)}t&&t.bind(e)},unbind:function(e,t){t.unbind(e)},render:function(e,t){var r=e.gl;if(t){this.bind(e,t);var n=e.getGLExtension("EXT_draw_buffers");if(n&&this.outputs){var i=[];for(var a in this.outputs)(a=+a)>=r.COLOR_ATTACHMENT0&&a<=r.COLOR_ATTACHMENT0+8&&i.push(a);n.drawBuffersEXT(i)}}this.trigger("beforerender",this,e);var o=this.clearDepth?r.DEPTH_BUFFER_BIT:0;if(r.depthMask(!0),this.clearColor){o|=r.COLOR_BUFFER_BIT,r.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&r.clearColor(s[0],s[1],s[2],s[3])}r.clear(o),this.blendWithPrevious?(r.enable(r.BLEND),this.material.transparent=!0):(r.disable(r.BLEND),this.material.transparent=!1),this.renderQuad(e),this.trigger("afterrender",this,e),t&&this.unbind(e,t)},renderQuad:function(e){d.material=this.material,e.renderPass([d],f)},dispose:function(e){}});t.a=p},function(e,t,r){"use strict";t.a=function(e,t,r){return{seriesType:e,reset:function(e,t){function r(e,t){var r=e.getItemModel(t),n=r.get(i,!0);null!=n&&e.setItemVisual(t,"opacity",n)}var n=e.getData(),i=e.visualColorAccessPath.split(".");i[i.length-1]="opacity";var a=e.get(i);return n.setVisual("opacity",null==a?1:a),{dataEach:n.hasItemOption?r:null}}}}},function(e,t,r){"use strict";var n=r(3),i=r(12),a=i.a.set,o=i.a.copy,s=function(e,t){this.min=e||new n.a(1/0,1/0,1/0),this.max=t||new n.a(-1/0,-1/0,-1/0),this.vertices=null};s.prototype={constructor:s,updateFromVertices:function(e){if(e.length>0){var t=this.min,r=this.max,n=t.array,i=r.array;o(n,e[0]),o(i,e[0]);for(var a=1;a<e.length;a++){var s=e[a];s[0]<n[0]&&(n[0]=s[0]),s[1]<n[1]&&(n[1]=s[1]),s[2]<n[2]&&(n[2]=s[2]),s[0]>i[0]&&(i[0]=s[0]),s[1]>i[1]&&(i[1]=s[1]),s[2]>i[2]&&(i[2]=s[2])}t._dirty=!0,r._dirty=!0}},union:function(e){var t=this.min,r=this.max;return i.a.min(t.array,t.array,e.min.array),i.a.max(r.array,r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},intersection:function(e){var t=this.min,r=this.max;return i.a.max(t.array,t.array,e.min.array),i.a.min(r.array,r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},intersectBoundingBox:function(e){var t=this.min.array,r=this.max.array,n=e.min.array,i=e.max.array;return!(t[0]>i[0]||t[1]>i[1]||t[2]>i[2]||r[0]<n[0]||r[1]<n[1]||r[2]<n[2])},containBoundingBox:function(e){var t=this.min.array,r=this.max.array,n=e.min.array,i=e.max.array;return t[0]<=n[0]&&t[1]<=n[1]&&t[2]<=n[2]&&r[0]>=i[0]&&r[1]>=i[1]&&r[2]>=i[2]},containPoint:function(e){var t=this.min.array,r=this.max.array,n=e.array;return t[0]<=n[0]&&t[1]<=n[1]&&t[2]<=n[2]&&r[0]>=n[0]&&r[1]>=n[1]&&r[2]>=n[2]},isFinite:function(){var e=this.min.array,t=this.max.array;return isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])&&isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])},applyTransform:function(e){this.transformFrom(this,e)},transformFrom:function(){var e=i.a.create(),t=i.a.create(),r=i.a.create(),n=i.a.create(),a=i.a.create(),o=i.a.create();return function(i,s){var u=i.min.array,l=i.max.array,h=s.array;return e[0]=h[0]*u[0],e[1]=h[1]*u[0],e[2]=h[2]*u[0],t[0]=h[0]*l[0],t[1]=h[1]*l[0],t[2]=h[2]*l[0],r[0]=h[4]*u[1],r[1]=h[5]*u[1],r[2]=h[6]*u[1],n[0]=h[4]*l[1],n[1]=h[5]*l[1],n[2]=h[6]*l[1],a[0]=h[8]*u[2],a[1]=h[9]*u[2],a[2]=h[10]*u[2],o[0]=h[8]*l[2],o[1]=h[9]*l[2],o[2]=h[10]*l[2],u=this.min.array,l=this.max.array,u[0]=Math.min(e[0],t[0])+Math.min(r[0],n[0])+Math.min(a[0],o[0])+h[12],u[1]=Math.min(e[1],t[1])+Math.min(r[1],n[1])+Math.min(a[1],o[1])+h[13],u[2]=Math.min(e[2],t[2])+Math.min(r[2],n[2])+Math.min(a[2],o[2])+h[14],l[0]=Math.max(e[0],t[0])+Math.max(r[0],n[0])+Math.max(a[0],o[0])+h[12],l[1]=Math.max(e[1],t[1])+Math.max(r[1],n[1])+Math.max(a[1],o[1])+h[13],l[2]=Math.max(e[2],t[2])+Math.max(r[2],n[2])+Math.max(a[2],o[2])+h[14],this.min._dirty=!0,this.max._dirty=!0,this}}(),applyProjection:function(e){var t=this.min.array,r=this.max.array,n=e.array,i=t[0],a=t[1],o=t[2],s=r[0],u=r[1],l=t[2],h=r[0],c=r[1],d=r[2];if(1===n[15])t[0]=n[0]*i+n[12],t[1]=n[5]*a+n[13],r[2]=n[10]*o+n[14],r[0]=n[0]*h+n[12],r[1]=n[5]*c+n[13],t[2]=n[10]*d+n[14];else{var f=-1/o;t[0]=n[0]*i*f,t[1]=n[5]*a*f,r[2]=(n[10]*o+n[14])*f,f=-1/l,r[0]=n[0]*s*f,r[1]=n[5]*u*f,f=-1/d,t[2]=(n[10]*d+n[14])*f}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var e=this.vertices;if(!e){e=[];for(var t=0;t<8;t++)e[t]=i.a.fromValues(0,0,0);this.vertices=e}var r=this.min.array,n=this.max.array;return a(e[0],r[0],r[1],r[2]),a(e[1],r[0],n[1],r[2]),a(e[2],n[0],r[1],r[2]),a(e[3],n[0],n[1],r[2]),a(e[4],r[0],r[1],n[2]),a(e[5],r[0],n[1],n[2]),a(e[6],n[0],r[1],n[2]),a(e[7],n[0],n[1],n[2]),this},copy:function(e){var t=this.min,r=this.max;return o(t.array,e.min.array),o(r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},clone:function(){var e=new s;return e.copy(this),e}},t.a=s},function(e,t,r){"use strict";function n(e){var t=Object.keys(e);t.sort();for(var r=[],n=0;n<t.length;n++){var i=t[n],a=e[i];null===a?r.push(i):r.push(i+" "+a.toString())}return r.join("\n")}function i(e,t,r){r.sort();for(var i=[],a=0;a<r.length;a++){var s=r[a];i.push(s)}var u=n(e)+"\n"+n(t)+"\n"+i.join("\n");if(l[u])return l[u];var h=o.a.genGUID();return l[u]=h,h}var a=r(7),o=r(23),s=r(113),u=s.a.parseToFloat,l={},h=a.a.extend(function(){return{name:"",depthTest:!0,depthMask:!0,transparent:!1,blend:null,autoUpdateTextureStatus:!0,uniforms:{},vertexDefines:{},fragmentDefines:{},_textureStatus:{},_enabledUniforms:null}},function(){this.name||(this.name="MATERIAL_"+this.__uid__),this.shader&&this.attachShader(this.shader,!0)},{precision:"highp",setUniform:function(e,t){void 0===t&&console.warn('Uniform value "'+e+'" is undefined');var r=this.uniforms[e];r&&("string"==typeof t&&(t=u(t)||t),r.value=t,this.autoUpdateTextureStatus&&"t"===r.type&&(t?this.enableTexture(e):this.disableTexture(e)))},setUniforms:function(e){for(var t in e){var r=e[t];this.setUniform(t,r)}},isUniformEnabled:function(e){return this._enabledUniforms.indexOf(e)>=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(e,t){if("object"==typeof e)for(var r in e){var n=e[r];this.setUniform(r,n)}else this.setUniform(e,t)},get:function(e){var t=this.uniforms[e];if(t)return t.value},attachShader:function(e,t){var r=this.uniforms;this.uniforms=e.createUniforms(),this.shader=e;var n=this.uniforms;this._enabledUniforms=Object.keys(n),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter(function(e){var t=this.uniforms[e].type;return"t"===t||"tv"===t},this);var i=this.vertexDefines,a=this.fragmentDefines;if(this.vertexDefines=o.a.clone(e.vertexDefines),this.fragmentDefines=o.a.clone(e.fragmentDefines),t){for(var s in r)n[s]&&(n[s].value=r[s].value);o.a.defaults(this.vertexDefines,i),o.a.defaults(this.fragmentDefines,a)}var u={};for(var l in e.textures)u[l]={shaderType:e.textures[l].shaderType,type:e.textures[l].type,enabled:!(!t||!this._textureStatus[l])&&this._textureStatus[l].enabled};this._textureStatus=u,this._programKey=""},clone:function(){var e=new this.constructor({name:this.name,shader:this.shader});for(var t in this.uniforms)e.uniforms[t].value=this.uniforms[t].value;return e.depthTest=this.depthTest,e.depthMask=this.depthMask,e.transparent=this.transparent,e.blend=this.blend,e.vertexDefines=o.a.clone(this.vertexDefines),e.fragmentDefines=o.a.clone(this.fragmentDefines),e.enableTexture(this.getEnabledTextures()),e.precision=this.precision,e},define:function(e,t,r){var n=this.vertexDefines,i=this.fragmentDefines;"vertex"!==e&&"fragment"!==e&&"both"!==e&&arguments.length<3&&(r=t,t=e,e="both"),r=null!=r?r:null,"vertex"!==e&&"both"!==e||n[t]!==r&&(n[t]=r,this._programKey=""),"fragment"!==e&&"both"!==e||i[t]!==r&&(i[t]=r,"both"!==e&&(this._programKey=""))},undefine:function(e,t){"vertex"!==e&&"fragment"!==e&&"both"!==e&&arguments.length<2&&(t=e,e="both"),"vertex"!==e&&"both"!==e||this.isDefined("vertex",t)&&(delete this.vertexDefines[t],this._programKey=""),"fragment"!==e&&"both"!==e||this.isDefined("fragment",t)&&(delete this.fragmentDefines[t],"both"!==e&&(this._programKey=""))},isDefined:function(e,t){switch(e){case"vertex":return void 0!==this.vertexDefines[t];case"fragment":return void 0!==this.fragmentDefines[t]}},getDefine:function(e,t){switch(e){case"vertex":return this.vertexDefines[t];case"fragment":return this.fragmentDefines[t]}},enableTexture:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.enableTexture(e[t]);else{var r=this._textureStatus[e];if(r){r.enabled||(r.enabled=!0,this._programKey="")}}},enableTexturesAll:function(){var e=this._textureStatus;for(var t in e)e[t].enabled=!0;this._programKey=""},disableTexture:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.disableTexture(e[t]);else{var r=this._textureStatus[e];if(r){!r.enabled||(r.enabled=!1,this._programKey="")}}},disableTexturesAll:function(){var e=this._textureStatus;for(var t in e)e[t].enabled=!1;this._programKey=""},isTextureEnabled:function(e){var t=this._textureStatus;return!!t[e]&&t[e].enabled},getEnabledTextures:function(){var e=[],t=this._textureStatus;for(var r in t)t[r].enabled&&e.push(r);return e},dirtyDefines:function(){this._programKey=""},getProgramKey:function(){return this._programKey||(this._programKey=i(this.vertexDefines,this.fragmentDefines,this.getEnabledTextures())),this._programKey}});t.a=h},function(e,t,r){"use strict";r.d(t,"b",function(){return n}),r.d(t,"a",function(){return i}),r.d(t,"c",function(){return a});var n=1e-6,i=Array,a=Math.random},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},i.clone=function(e){var t=new n.a(16);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[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},i.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},i.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},i.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],h=t[8],c=t[9],d=t[10],f=t[11],p=t[12],m=t[13],g=t[14],_=t[15],v=r*s-n*o,y=r*u-i*o,x=r*l-a*o,T=n*u-i*s,b=n*l-a*s,w=i*l-a*u,E=h*m-c*p,S=h*g-d*p,A=h*_-f*p,M=c*g-d*m,C=c*_-f*m,L=d*_-f*g,D=v*L-y*C+x*M+T*A-b*S+w*E;return D?(D=1/D,e[0]=(s*L-u*C+l*M)*D,e[1]=(i*C-n*L-a*M)*D,e[2]=(m*w-g*b+_*T)*D,e[3]=(d*b-c*w-f*T)*D,e[4]=(u*A-o*L-l*S)*D,e[5]=(r*L-i*A+a*S)*D,e[6]=(g*x-p*w-_*y)*D,e[7]=(h*w-d*x+f*y)*D,e[8]=(o*C-s*A+l*E)*D,e[9]=(n*A-r*C-a*E)*D,e[10]=(p*b-m*x+_*v)*D,e[11]=(c*x-h*b-f*v)*D,e[12]=(s*S-o*M-u*E)*D,e[13]=(r*M-n*S+i*E)*D,e[14]=(m*y-p*T-g*v)*D,e[15]=(h*T-c*y+d*v)*D,e):null},i.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],h=t[8],c=t[9],d=t[10],f=t[11],p=t[12],m=t[13],g=t[14],_=t[15];return e[0]=s*(d*_-f*g)-c*(u*_-l*g)+m*(u*f-l*d),e[1]=-(n*(d*_-f*g)-c*(i*_-a*g)+m*(i*f-a*d)),e[2]=n*(u*_-l*g)-s*(i*_-a*g)+m*(i*l-a*u),e[3]=-(n*(u*f-l*d)-s*(i*f-a*d)+c*(i*l-a*u)),e[4]=-(o*(d*_-f*g)-h*(u*_-l*g)+p*(u*f-l*d)),e[5]=r*(d*_-f*g)-h*(i*_-a*g)+p*(i*f-a*d),e[6]=-(r*(u*_-l*g)-o*(i*_-a*g)+p*(i*l-a*u)),e[7]=r*(u*f-l*d)-o*(i*f-a*d)+h*(i*l-a*u),e[8]=o*(c*_-f*m)-h*(s*_-l*m)+p*(s*f-l*c),e[9]=-(r*(c*_-f*m)-h*(n*_-a*m)+p*(n*f-a*c)),e[10]=r*(s*_-l*m)-o*(n*_-a*m)+p*(n*l-a*s),e[11]=-(r*(s*f-l*c)-o*(n*f-a*c)+h*(n*l-a*s)),e[12]=-(o*(c*g-d*m)-h*(s*g-u*m)+p*(s*d-u*c)),e[13]=r*(c*g-d*m)-h*(n*g-i*m)+p*(n*d-i*c),e[14]=-(r*(s*g-u*m)-o*(n*g-i*m)+p*(n*u-i*s)),e[15]=r*(s*d-u*c)-o*(n*d-i*c)+h*(n*u-i*s),e},i.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],h=e[9],c=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15];return(t*o-r*a)*(c*g-d*m)-(t*s-n*a)*(h*g-d*p)+(t*u-i*a)*(h*m-c*p)+(r*s-n*o)*(l*g-d*f)-(r*u-i*o)*(l*m-c*f)+(n*u-i*s)*(l*p-h*f)},i.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],h=t[7],c=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],_=t[14],v=t[15],y=r[0],x=r[1],T=r[2],b=r[3];return e[0]=y*n+x*s+T*c+b*m,e[1]=y*i+x*u+T*d+b*g,e[2]=y*a+x*l+T*f+b*_,e[3]=y*o+x*h+T*p+b*v,y=r[4],x=r[5],T=r[6],b=r[7],e[4]=y*n+x*s+T*c+b*m,e[5]=y*i+x*u+T*d+b*g,e[6]=y*a+x*l+T*f+b*_,e[7]=y*o+x*h+T*p+b*v,y=r[8],x=r[9],T=r[10],b=r[11],e[8]=y*n+x*s+T*c+b*m,e[9]=y*i+x*u+T*d+b*g,e[10]=y*a+x*l+T*f+b*_,e[11]=y*o+x*h+T*p+b*v,y=r[12],x=r[13],T=r[14],b=r[15],e[12]=y*n+x*s+T*c+b*m,e[13]=y*i+x*u+T*d+b*g,e[14]=y*a+x*l+T*f+b*_,e[15]=y*o+x*h+T*p+b*v,e},i.multiplyAffine=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[4],s=t[5],u=t[6],l=t[8],h=t[9],c=t[10],d=t[12],f=t[13],p=t[14],m=r[0],g=r[1],_=r[2];return e[0]=m*n+g*o+_*l,e[1]=m*i+g*s+_*h,e[2]=m*a+g*u+_*c,m=r[4],g=r[5],_=r[6],e[4]=m*n+g*o+_*l,e[5]=m*i+g*s+_*h,e[6]=m*a+g*u+_*c,m=r[8],g=r[9],_=r[10],e[8]=m*n+g*o+_*l,e[9]=m*i+g*s+_*h,e[10]=m*a+g*u+_*c,m=r[12],g=r[13],_=r[14],e[12]=m*n+g*o+_*l+d,e[13]=m*i+g*s+_*h+f,e[14]=m*a+g*u+_*c+p,e},i.mul=i.multiply,i.mulAffine=i.multiplyAffine,i.translate=function(e,t,r){var n,i,a,o,s,u,l,h,c,d,f,p,m=r[0],g=r[1],_=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*_+t[12],e[13]=t[1]*m+t[5]*g+t[9]*_+t[13],e[14]=t[2]*m+t[6]*g+t[10]*_+t[14],e[15]=t[3]*m+t[7]*g+t[11]*_+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],h=t[7],c=t[8],d=t[9],f=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=l,e[7]=h,e[8]=c,e[9]=d,e[10]=f,e[11]=p,e[12]=n*m+s*g+c*_+t[12],e[13]=i*m+u*g+d*_+t[13],e[14]=a*m+l*g+f*_+t[14],e[15]=o*m+h*g+p*_+t[15]),e},i.scale=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},i.rotate=function(e,t,r,i){var a,o,s,u,l,h,c,d,f,p,m,g,_,v,y,x,T,b,w,E,S,A,M,C,L=i[0],D=i[1],N=i[2],R=Math.sqrt(L*L+D*D+N*N);return Math.abs(R)<n.b?null:(R=1/R,L*=R,D*=R,N*=R,a=Math.sin(r),o=Math.cos(r),s=1-o,u=t[0],l=t[1],h=t[2],c=t[3],d=t[4],f=t[5],p=t[6],m=t[7],g=t[8],_=t[9],v=t[10],y=t[11],x=L*L*s+o,T=D*L*s+N*a,b=N*L*s-D*a,w=L*D*s-N*a,E=D*D*s+o,S=N*D*s+L*a,A=L*N*s+D*a,M=D*N*s-L*a,C=N*N*s+o,e[0]=u*x+d*T+g*b,e[1]=l*x+f*T+_*b,e[2]=h*x+p*T+v*b,e[3]=c*x+m*T+y*b,e[4]=u*w+d*E+g*S,e[5]=l*w+f*E+_*S,e[6]=h*w+p*E+v*S,e[7]=c*w+m*E+y*S,e[8]=u*A+d*M+g*C,e[9]=l*A+f*M+_*C,e[10]=h*A+p*M+v*C,e[11]=c*A+m*M+y*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)},i.rotateX=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],l=t[8],h=t[9],c=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+l*n,e[5]=o*i+h*n,e[6]=s*i+c*n,e[7]=u*i+d*n,e[8]=l*i-a*n,e[9]=h*i-o*n,e[10]=c*i-s*n,e[11]=d*i-u*n,e},i.rotateY=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[8],h=t[9],c=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-l*n,e[1]=o*i-h*n,e[2]=s*i-c*n,e[3]=u*i-d*n,e[8]=a*n+l*i,e[9]=o*n+h*i,e[10]=s*n+c*i,e[11]=u*n+d*i,e},i.rotateZ=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[4],h=t[5],c=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+l*n,e[1]=o*i+h*n,e[2]=s*i+c*n,e[3]=u*i+d*n,e[4]=l*i-a*n,e[5]=h*i-o*n,e[6]=c*i-s*n,e[7]=d*i-u*n,e},i.fromRotationTranslation=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,l=a+a,h=n*s,c=n*u,d=n*l,f=i*u,p=i*l,m=a*l,g=o*s,_=o*u,v=o*l;return e[0]=1-(f+m),e[1]=c+v,e[2]=d-_,e[3]=0,e[4]=c-v,e[5]=1-(h+m),e[6]=p+g,e[7]=0,e[8]=d+_,e[9]=p-g,e[10]=1-(h+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},i.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,l=r*o,h=n*o,c=n*s,d=i*o,f=i*s,p=i*u,m=a*o,g=a*s,_=a*u;return e[0]=1-c-p,e[1]=h+_,e[2]=d-g,e[3]=0,e[4]=h-_,e[5]=1-l-p,e[6]=f+m,e[7]=0,e[8]=d+g,e[9]=f-m,e[10]=1-l-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},i.frustum=function(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),l=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*l,e[15]=0,e},i.perspective=function(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e},i.ortho=function(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),l=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*l,e[15]=1,e},i.lookAt=function(e,t,r,a){var o,s,u,l,h,c,d,f,p,m,g=t[0],_=t[1],v=t[2],y=a[0],x=a[1],T=a[2],b=r[0],w=r[1],E=r[2];return Math.abs(g-b)<n.b&&Math.abs(_-w)<n.b&&Math.abs(v-E)<n.b?i.identity(e):(d=g-b,f=_-w,p=v-E,m=1/Math.sqrt(d*d+f*f+p*p),d*=m,f*=m,p*=m,o=x*p-T*f,s=T*d-y*p,u=y*f-x*d,m=Math.sqrt(o*o+s*s+u*u),m?(m=1/m,o*=m,s*=m,u*=m):(o=0,s=0,u=0),l=f*u-p*s,h=p*o-d*u,c=d*s-f*o,m=Math.sqrt(l*l+h*h+c*c),m?(m=1/m,l*=m,h*=m,c*=m):(l=0,h=0,c=0),e[0]=o,e[1]=l,e[2]=d,e[3]=0,e[4]=s,e[5]=h,e[6]=f,e[7]=0,e[8]=u,e[9]=c,e[10]=p,e[11]=0,e[12]=-(o*g+s*_+u*v),e[13]=-(l*g+h*_+c*v),e[14]=-(d*g+f*_+p*v),e[15]=1,e)},i.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2)+Math.pow(e[9],2)+Math.pow(e[10],2)+Math.pow(e[11],2)+Math.pow(e[12],2)+Math.pow(e[13],2)+Math.pow(e[14],2)+Math.pow(e[15],2))},t.a=i},function(e,t,r){"use strict";function n(e){e=e||"perspective",this.layer=null,this.scene=new o.a,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(e),this._compositor=new p.a,this._temporalSS=new m.a,this._shadowMapPass=new s.a;for(var t=[],r=0,n=0;n<30;n++){for(var i=[],a=0;a<6;a++)i.push(4*Object(g.a)(r,2)-2),i.push(4*Object(g.a)(r,3)-2),r++;t.push(i)}this._pcfKernels=t,this.scene.on("beforerender",function(e,t,r){this.needsTemporalSS()&&this._temporalSS.jitterProjection(e,r)},this)}var i=r(0),a=r.n(i),o=r(36),s=r(174),u=r(41),l=r(37),h=r(9),c=r(3),d=r(26),f=r(53),p=r(176),m=r(200),g=r(49);n.prototype.setProjection=function(e){var t=this.camera;t&&t.update(),"perspective"===e?this.camera instanceof u.a||(this.camera=new u.a,t&&this.camera.setLocalTransform(t.localTransform)):this.camera instanceof l.a||(this.camera=new l.a,t&&this.camera.setLocalTransform(t.localTransform)),this.camera.near=.1,this.camera.far=2e3},n.prototype.setViewport=function(e,t,r,n,i){this.camera instanceof u.a&&(this.camera.aspect=r/n),i=i||1,this.viewport.x=e,this.viewport.y=t,this.viewport.width=r,this.viewport.height=n,this.viewport.devicePixelRatio=i,this._compositor.resize(r*i,n*i),this._temporalSS.resize(r*i,n*i)},n.prototype.containPoint=function(e,t){var r=this.viewport;return t=this.layer.renderer.getHeight()-t,e>=r.x&&t>=r.y&&e<=r.x+r.width&&t<=r.y+r.height};var _=new d.a;n.prototype.castRay=function(e,t,r){var n=this.layer.renderer,i=n.viewport;return n.viewport=this.viewport,n.screenToNDC(e,t,_),this.camera.castRay(_,r),n.viewport=i,r},n.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var e=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var t=0;t<e.transparent.length;t++){var r=e.transparent[t],n=r.geometry;n.needsSortVerticesProgressively&&n.needsSortVerticesProgressively()&&(this._needsSortProgressively=!0),n.needsSortTrianglesProgressively&&n.needsSortTrianglesProgressively()&&(this._needsSortProgressively=!0)}this._frame=0,this._temporalSS.resetFrame()},n.prototype.render=function(e,t){this._doRender(e,t,this._frame),this._frame++},n.prototype.needsAccumulate=function(){return this.needsTemporalSS()||this._needsSortProgressively},n.prototype.needsTemporalSS=function(){var e=this._enableTemporalSS;return"auto"===e&&(e=this._enablePostEffect),e},n.prototype.hasDOF=function(){return this._enableDOF},n.prototype.isAccumulateFinished=function(){return this.needsTemporalSS()?this._temporalSS.isFinished():this._frame>30},n.prototype._doRender=function(e,t,r){var n=this.scene,i=this.camera;r=r||0,this._updateTransparent(e,n,i,r),t||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(e,n,i,!0)),this._updateShadowPCFKernel(r);var a=e.clearColor;if(e.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(e,i),this._compositor.updateNormal(e,n,i,this._temporalSS.getFrame())),this._updateSSAO(e,n,i,this._temporalSS.getFrame()),this._enablePostEffect){var o=this._compositor.getSourceFrameBuffer();o.bind(e),e.gl.clear(e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT),e.render(n,i,!0,!0),o.unbind(e),this.needsTemporalSS()&&t?(this._compositor.composite(e,n,i,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),e.setViewport(this.viewport),this._temporalSS.render(e)):(e.setViewport(this.viewport),this._compositor.composite(e,n,i,null,0))}else if(this.needsTemporalSS()&&t){var o=this._temporalSS.getSourceFrameBuffer();o.bind(e),e.saveClear(),e.clearBit=e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT,e.render(n,i,!0,!0),e.restoreClear(),o.unbind(e),e.setViewport(this.viewport),this._temporalSS.render(e)}else e.setViewport(this.viewport),e.render(n,i,!0,!0)},n.prototype._updateTransparent=function(e,t,r,n){for(var i=new c.a,a=new h.a,o=r.getWorldPosition(),s=t.getRenderList(r).transparent,u=0;u<s.length;u++){var l=s[u],d=l.geometry;h.a.invert(a,l.worldTransform),c.a.transformMat4(i,o,a),d.needsSortTriangles&&d.needsSortTriangles()&&d.doSortTriangles(i,n),d.needsSortVertices&&d.needsSortVertices()&&d.doSortVertices(i,n)}},n.prototype._updateSSAO=function(e,t,r){var n=this._enableSSAO&&this._enablePostEffect;n&&this._compositor.updateSSAO(e,t,r,this._temporalSS.getFrame());for(var i=t.getRenderList(r),a=0;a<i.opaque.length;a++){var o=i.opaque[a];o.renderNormal&&o.material[n?"enableTexture":"disableTexture"]("ssaoMap"),n&&o.material.set("ssaoMap",this._compositor.getSSAOTexture())}},n.prototype._updateShadowPCFKernel=function(e){for(var t=this._pcfKernels[e%this._pcfKernels.length],r=this.scene.getRenderList(this.camera),n=r.opaque,i=0;i<n.length;i++)n[i].receiveShadow&&(n[i].material.set("pcfKernel",t),n[i].material.define("fragment","PCF_KERNEL_SIZE",t.length/2))},n.prototype.dispose=function(e){this._compositor.dispose(e.gl),this._temporalSS.dispose(e.gl),this._shadowMapPass.dispose(e)},n.prototype.setPostEffect=function(e,t){var r=this._compositor;this._enablePostEffect=e.get("enable");var n=e.getModel("bloom"),i=e.getModel("edge"),a=e.getModel("DOF",e.getModel("depthOfField")),o=e.getModel("SSAO",e.getModel("screenSpaceAmbientOcclusion")),s=e.getModel("SSR",e.getModel("screenSpaceReflection")),u=e.getModel("FXAA"),l=e.getModel("colorCorrection");n.get("enable")?r.enableBloom():r.disableBloom(),a.get("enable")?r.enableDOF():r.disableDOF(),s.get("enable")?r.enableSSR():r.disableSSR(),l.get("enable")?r.enableColorCorrection():r.disableColorCorrection(),i.get("enable")?r.enableEdge():r.disableEdge(),u.get("enable")?r.enableFXAA():r.disableFXAA(),this._enableDOF=a.get("enable"),this._enableSSAO=o.get("enable"),this._enableSSAO?r.enableSSAO():r.disableSSAO(),r.setBloomIntensity(n.get("intensity")),r.setEdgeColor(i.get("color")),r.setColorLookupTexture(l.get("lookupTexture"),t),r.setExposure(l.get("exposure")),["radius","quality","intensity"].forEach(function(e){r.setSSAOParameter(e,o.get(e))}),["quality","maxRoughness","physical"].forEach(function(e){r.setSSRParameter(e,s.get(e))}),["quality","focalDistance","focalRange","blurRadius","fstop"].forEach(function(e){r.setDOFParameter(e,a.get(e))}),["brightness","contrast","saturation"].forEach(function(e){r.setColorCorrection(e,l.get(e))})},n.prototype.setDOFFocusOnPoint=function(e){if(this._enablePostEffect){if(e>this.camera.far||e<this.camera.near)return;return this._compositor.setDOFParameter("focalDistance",e),!0}},n.prototype.setTemporalSuperSampling=function(e){this._enableTemporalSS=e.get("enable")},n.prototype.isLinearSpace=function(){return this._enablePostEffect},n.prototype.setRootNode=function(e){if(this.rootNode!==e){for(var t=this.rootNode.children(),r=0;r<t.length;r++)e.add(t[r]);e!==this.scene&&this.scene.add(e),this.rootNode=e}},n.prototype.add=function(e){this.rootNode.add(e)},n.prototype.remove=function(e){this.rootNode.remove(e)},n.prototype.removeAll=function(e){this.rootNode.removeAll(e)},a.a.util.extend(n.prototype,f.a),t.a=n},function(e,t,r){"use strict";var n=0,i=Array.prototype,a=i.forEach,o={genGUID:function(){return++n},relative2absolute:function(e,t){if(!t||e.match(/^\//))return e;for(var r=e.split("/"),n=t.split("/"),i=r[0];"."===i||".."===i;)".."===i&&n.pop(),r.shift(),i=r[0];return n.join("/")+"/"+r.join("/")},extend:function(e,t){if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},defaults:function(e,t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},extendWithPropList:function(e,t,r){if(t)for(var n=0;n<r.length;n++){var i=r[n];e[i]=t[i]}return e},defaultsWithPropList:function(e,t,r){if(t)for(var n=0;n<r.length;n++){var i=r[n];null==e[i]&&(e[i]=t[i])}return e},each:function(e,t,r){if(e&&t)if(e.forEach&&e.forEach===a)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o,e)},isObject:function(e){return e===Object(e)},isArray:function(e){return Array.isArray(e)},isArrayLike:function(e){return!!e&&e.length===+e.length},clone:function(e){if(o.isObject(e)){if(o.isArray(e))return e.slice();if(o.isArrayLike(e)){for(var t=new e.constructor(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}return o.extend({},e)}return e}};t.a=o},function(e,t,r){"use strict";var n=r(35),i=r(8),a=r(119);i.a.import(a.a);var o=n.a.extend(function(){return{color:[1,1,1],intensity:1,castShadow:!0,shadowResolution:512,group:0}},{type:"",clone:function(){var e=n.a.prototype.clone.call(this);return e.color=Array.prototype.slice.call(this.color),e.intensity=this.intensity,e.castShadow=this.castShadow,e.shadowResolution=this.shadowResolution,e}});t.a=o},function(e,t,r){"use strict";var n=r(15),i=r(0),a=r.n(i),o=r(38),s=r(6),u=s.a.vec3,l=[[0,0],[1,1]],h=n.a.extend(function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new n.a.Attribute("position","float",3,"POSITION"),positionPrev:new n.a.Attribute("positionPrev","float",3),positionNext:new n.a.Attribute("positionNext","float",3),prevPositionPrev:new n.a.Attribute("prevPositionPrev","float",3),prevPosition:new n.a.Attribute("prevPosition","float",3),prevPositionNext:new n.a.Attribute("prevPositionNext","float",3),offset:new n.a.Attribute("offset","float",1),color:new n.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(e){var t=this.attributes;this.vertexCount!==e&&(t.position.init(e),t.color.init(e),this.useNativeLine||(t.positionPrev.init(e),t.positionNext.init(e),t.offset.init(e)),e>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(e){this.triangleCount!==e&&(this.indices=0===e?null:this.vertexCount>65535?new Uint32Array(3*e):new Uint16Array(3*e))},_getCubicCurveApproxStep:function(e,t,r,n){return 1/(u.dist(e,t)+u.dist(r,t)+u.dist(n,r)+1)*this.segmentScale},getCubicCurveVertexCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(l)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(l)},getPolylineVertexCount:function(e){var t;if("number"==typeof e)t=e;else{t="number"!=typeof e[0]?e.length:e.length/3}return this.useNativeLine?2*(t-1):2*(t-1)+2},getPolylineTriangleCount:function(e){var t;if("number"==typeof e)t=e;else{t="number"!=typeof e[0]?e.length:e.length/3}return this.useNativeLine?0:2*Math.max(t-1,0)},addCubicCurve:function(e,t,r,n,i,a){null==a&&(a=1);for(var o=e[0],s=e[1],u=e[2],l=t[0],h=t[1],c=t[2],d=r[0],f=r[1],p=r[2],m=n[0],g=n[1],_=n[2],v=this._getCubicCurveApproxStep(e,t,r,n),y=v*v,x=y*v,T=3*v,b=3*y,w=6*y,E=6*x,S=o-2*l+d,A=s-2*h+f,M=u-2*c+p,C=3*(l-d)-o+m,L=3*(h-f)-s+g,D=3*(c-p)-u+_,N=o,R=s,P=u,I=(l-o)*T+S*b+C*x,O=(h-s)*T+A*b+L*x,F=(c-u)*T+M*b+D*x,B=S*w+C*E,U=A*w+L*E,z=M*w+D*E,G=C*E,H=L*E,V=D*E,k=0,W=0,j=Math.ceil(1/v),X=new Float32Array(3*(j+1)),X=[],q=0,W=0;W<j+1;W++)X[q++]=N,X[q++]=R,X[q++]=P,N+=I,R+=O,P+=F,I+=B,O+=U,F+=z,B+=G,U+=H,z+=V,(k+=v)>1&&(N=I>0?Math.min(N,m):Math.max(N,m),R=O>0?Math.min(R,g):Math.max(R,g),P=F>0?Math.min(P,_):Math.max(P,_));return this.addPolyline(X,i,a)},addLine:function(e,t,r,n){return this.addPolyline([e,t],r,n)},addPolyline:function(e,t,r,n,i){if(e.length){var a="number"!=typeof e[0];if(null==i&&(i=a?e.length:e.length/3),!(i<2)){null==n&&(n=0),null==r&&(r=1),this._itemVertexOffsets.push(this._vertexOffset);var o,s,a="number"!=typeof e[0],u=a?"number"!=typeof t[0]:t.length/4===i,l=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,f=this.attributes.offset,p=this.indices,m=this._vertexOffset;r=Math.max(r,.01);for(var g=n;g<i;g++){if(a)o=e[g],s=u?t[g]:t;else{var _=3*g;if(o=o||[],o[0]=e[_],o[1]=e[_+1],o[2]=e[_+2],u){var v=4*g;s=s||[],s[0]=t[v],s[1]=t[v+1],s[2]=t[v+2],s[3]=t[v+3]}else s=t}if(this.useNativeLine?g>1&&(l.copy(m,m-1),d.copy(m,m-1),m++):(g<i-1&&(h.set(m+2,o),h.set(m+3,o)),g>0&&(c.set(m-2,o),c.set(m-1,o)),l.set(m,o),l.set(m+1,o),d.set(m,s),d.set(m+1,s),f.set(m,r/2),f.set(m+1,-r/2),m+=2),this.useNativeLine)d.set(m,s),l.set(m,o),m++;else if(g>0){var y=3*this._triangleOffset,p=this.indices;p[y]=m-4,p[y+1]=m-3,p[y+2]=m-2,p[y+3]=m-3,p[y+4]=m-1,p[y+5]=m-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,T=this._vertexOffset+2*i;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(T-1,T-3),c.copy(T-2,T-4)}return this._vertexOffset=m,this._vertexOffset}}},setItemColor:function(e,t){for(var r=this._itemVertexOffsets[e],n=e<this._itemVertexOffsets.length-1?this._itemVertexOffsets[e+1]:this._vertexOffset,i=r;i<n;i++)this.attributes.color.set(i,t);this.dirty("color")},currentTriangleOffset:function(){return this._triangleOffset},currentVertexOffset:function(){return this._vertexOffset}});a.a.util.defaults(h.prototype,o.a),t.a=h},function(e,t,r){"use strict";var n=r(70),i=function(e,t){e=e||0,t=t||0,this.array=n.a.fromValues(e,t),this._dirty=!0};if(i.prototype={constructor:i,add:function(e){return n.a.add(this.array,this.array,e.array),this._dirty=!0,this},set:function(e,t){return this.array[0]=e,this.array[1]=t,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this._dirty=!0,this},clone:function(){return new i(this.x,this.y)},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},cross:function(e,t){return n.a.cross(e.array,this.array,t.array),e._dirty=!0,this},dist:function(e){return n.a.dist(this.array,e.array)},distance:function(e){return n.a.distance(this.array,e.array)},div:function(e){return n.a.div(this.array,this.array,e.array),this._dirty=!0,this},divide:function(e){return n.a.divide(this.array,this.array,e.array),this._dirty=!0,this},dot:function(e){return n.a.dot(this.array,e.array)},len:function(){return n.a.len(this.array)},length:function(){return n.a.length(this.array)},lerp:function(e,t,r){return n.a.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},min:function(e){return n.a.min(this.array,this.array,e.array),this._dirty=!0,this},max:function(e){return n.a.max(this.array,this.array,e.array),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},negate:function(){return n.a.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return n.a.normalize(this.array,this.array),this._dirty=!0,this},random:function(e){return n.a.random(this.array,e),this._dirty=!0,this},scale:function(e){return n.a.scale(this.array,this.array,e),this._dirty=!0,this},scaleAndAdd:function(e,t){return n.a.scaleAndAdd(this.array,this.array,e.array,t),this._dirty=!0,this},sqrDist:function(e){return n.a.sqrDist(this.array,e.array)},squaredDistance:function(e){return n.a.squaredDistance(this.array,e.array)},sqrLen:function(){return n.a.sqrLen(this.array)},squaredLength:function(){return n.a.squaredLength(this.array)},sub:function(e){return n.a.sub(this.array,this.array,e.array),this._dirty=!0,this},subtract:function(e){return n.a.subtract(this.array,this.array,e.array),this._dirty=!0,this},transformMat2:function(e){return n.a.transformMat2(this.array,this.array,e.array),this._dirty=!0,this},transformMat2d:function(e){return n.a.transformMat2d(this.array,this.array,e.array),this._dirty=!0,this},transformMat3:function(e){return n.a.transformMat3(this.array,this.array,e.array),this._dirty=!0,this},transformMat4:function(e){return n.a.transformMat4(this.array,this.array,e.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},Object.defineProperty){var a=i.prototype;Object.defineProperty(a,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),Object.defineProperty(a,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}})}i.add=function(e,t,r){return n.a.add(e.array,t.array,r.array),e._dirty=!0,e},i.set=function(e,t,r){return n.a.set(e.array,t,r),e._dirty=!0,e},i.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},i.cross=function(e,t,r){return n.a.cross(e.array,t.array,r.array),e._dirty=!0,e},i.dist=function(e,t){return n.a.distance(e.array,t.array)},i.distance=i.dist,i.div=function(e,t,r){return n.a.divide(e.array,t.array,r.array),e._dirty=!0,e},i.divide=i.div,i.dot=function(e,t){return n.a.dot(e.array,t.array)},i.len=function(e){return n.a.length(e.array)},i.lerp=function(e,t,r,i){return n.a.lerp(e.array,t.array,r.array,i),e._dirty=!0,e},i.min=function(e,t,r){return n.a.min(e.array,t.array,r.array),e._dirty=!0,e},i.max=function(e,t,r){return n.a.max(e.array,t.array,r.array),e._dirty=!0,e},i.mul=function(e,t,r){return n.a.multiply(e.array,t.array,r.array),e._dirty=!0,e},i.multiply=i.mul,i.negate=function(e,t){return n.a.negate(e.array,t.array),e._dirty=!0,e},i.normalize=function(e,t){return n.a.normalize(e.array,t.array),e._dirty=!0,e},i.random=function(e,t){return n.a.random(e.array,t),e._dirty=!0,e},i.scale=function(e,t,r){return n.a.scale(e.array,t.array,r),e._dirty=!0,e},i.scaleAndAdd=function(e,t,r,i){return n.a.scaleAndAdd(e.array,t.array,r.array,i),e._dirty=!0,e},i.sqrDist=function(e,t){return n.a.sqrDist(e.array,t.array)},i.squaredDistance=i.sqrDist,i.sqrLen=function(e){return n.a.sqrLen(e.array)},i.squaredLength=i.sqrLen,i.sub=function(e,t,r){return n.a.subtract(e.array,t.array,r.array),e._dirty=!0,e},i.subtract=i.sub,i.transformMat2=function(e,t,r){return n.a.transformMat2(e.array,t.array,r.array),e._dirty=!0,e},i.transformMat2d=function(e,t,r){return n.a.transformMat2d(e.array,t.array,r.array),e._dirty=!0,e},i.transformMat3=function(e,t,r){return n.a.transformMat3(e.array,t.array,r.array),e._dirty=!0,e},i.transformMat4=function(e,t,r){return n.a.transformMat4(e.array,t.array,r.array),e._dirty=!0,e},t.a=i},function(e,t,r){"use strict";function n(e){return"CANVAS"===e.nodeName||"VIDEO"===e.nodeName||e.complete}var i=r(4),a=r(11),o=r(23),s=r(73),u=r(14),l=s.a.isPowerOfTwo,h=["px","nx","py","ny","pz","nz"],c=i.a.extend(function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}},{textureType:"textureCube",update:function(e){var t=e.gl;t.bindTexture(t.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(e);var r=this.format,n=this.type;t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,this.getAvailableWrapS()),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,this.getAvailableWrapT()),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var i=e.getGLExtension("EXT_texture_filter_anisotropic");if(i&&this.anisotropic>1&&t.texParameterf(t.TEXTURE_CUBE_MAP,i.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===n){e.getGLExtension("OES_texture_half_float")||(n=a.a.FLOAT)}if(this.mipmaps.length)for(var o=this.width,s=this.height,u=0;u<this.mipmaps.length;u++){var l=this.mipmaps[u];this._updateTextureData(t,l,u,o,s,r,n),o/=2,s/=2}else this._updateTextureData(t,this,0,this.width,this.height,r,n),!this.NPOT&&this.useMipmap&&t.generateMipmap(t.TEXTURE_CUBE_MAP);t.bindTexture(t.TEXTURE_CUBE_MAP,null)},_updateTextureData:function(e,t,r,n,i,a,o){for(var s=0;s<6;s++){var u=h[s],l=t.image&&t.image[u];l?e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,r,a,a,o,l):e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,r,a,n,i,0,a,o,t.pixels&&t.pixels[u])}},generateMipmap:function(e){var t=e.gl;this.useMipmap&&!this.NPOT&&(t.bindTexture(t.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),t.generateMipmap(t.TEXTURE_CUBE_MAP))},bind:function(e){e.gl.bindTexture(e.gl.TEXTURE_CUBE_MAP,this.getWebGLTexture(e))},unbind:function(e){e.gl.bindTexture(e.gl.TEXTURE_CUBE_MAP,null)},isPowerOfTwo:function(){return this.image.px?l(this.image.px.width)&&l(this.image.px.height):l(this.width)&&l(this.height)},isRenderable:function(){return this.image.px?n(this.image.px)&&n(this.image.nx)&&n(this.image.py)&&n(this.image.ny)&&n(this.image.pz)&&n(this.image.nz):!(!this.width||!this.height)},load:function(e,t){var r=0,n=this;return o.a.each(e,function(e,i){var a=u.a.createImage();t&&(a.crossOrigin=t),a.onload=function(){r--,0===r&&(n.dirty(),n.trigger("success",n)),a.onload=null},a.onerror=function(){r--,a.onerror=null},r++,a.src=e,n.image[i]=a}),this}});Object.defineProperty(c.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(e){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==e&&this.dirty(),this._width=e)}}),Object.defineProperty(c.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(e){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==e&&this.dirty(),this._height=e)}}),t.a=c},function(e,t,r){"use strict";t.a={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}}},function(e,t,r){"use strict";t.a={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}}},function(e,t,r){"use strict";function n(){}var i=r(1),a=r(42),o=r(0),s=r.n(o);n.prototype={constructor:n,setScene:function(e){this._scene=e,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(e){this._lightRoot=e,this.mainLight=new i.a.DirectionalLight({shadowBias:.005}),this.ambientLight=new i.a.AmbientLight,e.add(this.mainLight),e.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(e){var t=this.mainLight,r=this.ambientLight,n=e.getModel("light"),a=n.getModel("main"),o=n.getModel("ambient");t.intensity=a.get("intensity"),r.intensity=o.get("intensity"),t.color=i.a.parseColor(a.get("color")).slice(0,3),r.color=i.a.parseColor(o.get("color")).slice(0,3);var s=a.get("alpha")||0,u=a.get("beta")||0;t.position.setArray(i.a.directionFromAlphaBeta(s,u)),t.lookAt(i.a.Vector3.ZERO),t.castShadow=a.get("shadow"),t.shadowResolution=i.a.getShadowResolution(a.get("shadowQuality"))},updateAmbientCubemap:function(e,t,r){var n=t.getModel("light.ambientCubemap"),a=n.get("texture");if(a){this._cubemapLightsCache=this._cubemapLightsCache||{};var o=this._cubemapLightsCache[a];if(!o){var s=this;o=this._cubemapLightsCache[a]=i.a.createAmbientCubemap(n.option,e,r,function(){s._isSkyboxFromAmbientCubemap&&s._skybox.setEnvironmentMap(o.specular.cubemap),r.getZr().refresh()})}this._lightRoot.add(o.diffuse),this._lightRoot.add(o.specular),this._currentCubemapLights=o}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(e,t,r){var n=t.get("environment"),o=this,u=function(){return o._skybox=o._skybox||new a.a,o._skybox}();if(n&&"none"!==n)if("auto"===n)if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var l=this._currentCubemapLights.specular.cubemap;u.setEnvironmentMap(l),this._scene&&u.attachScene(this._scene),u.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if("object"==typeof n&&n.colorStops||"string"==typeof n&&s.a.color.parse(n)){this._isSkyboxFromAmbientCubemap=!1;var h=new i.a.Texture2D({anisotropic:8,flipY:!1});u.setEnvironmentMap(h);var c=h.image=document.createElement("canvas");c.width=c.height=16;var d=c.getContext("2d"),f=new s.a.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:n}});f.brush(d),u.attachScene(this._scene)}else{this._isSkyboxFromAmbientCubemap=!1;var h=i.a.loadTexture(n,r,{anisotropic:8,flipY:!1});u.setEnvironmentMap(h),u.attachScene(this._scene)}else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var p=t.coordinateSystem;if(this._skybox)if(!p||!p.viewGL||"auto"===n||n.match&&n.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var m=p.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[m]("fragment","SRGB_DECODE")}}},t.a=n},function(e,t,r){"use strict";t.a={defaultOption:{shading:null,realisticMaterial:{textureTiling:1,textureOffset:0,detailTexture:null},lambertMaterial:{textureTiling:1,textureOffset:0,detailTexture:null},colorMaterial:{textureTiling:1,textureOffset:0,detailTexture:null},hatchingMaterial:{textureTiling:1,textureOffset:0,paperColor:"#fff"}}}},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a={};a.getFormattedLabel=function(e,t,r,n,a){r=r||"normal";var o=e.getData(n),s=o.getItemModel(t),u=e.getDataParams(t,n);null!=a&&u.value instanceof Array&&(u.value=u.value[a]);var l=s.get("normal"===r?["label","formatter"]:["emphasis","label","formatter"]);null==l&&(l=s.get(["label","formatter"]));var h;return"function"==typeof l?(u.status=r,h=l(u)):"string"==typeof l&&(h=i.a.format.formatTpl(l,u)),h},a.normalizeToArray=function(e){return e instanceof Array?e:null==e?[]:[e]},t.a=a},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e},i.clone=function(e){var t=new n.a(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.fromValues=function(e,t,r,i){var a=new n.a(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.set=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e},i.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},i.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e},i.sub=i.subtract,i.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},i.mul=i.multiply,i.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e},i.div=i.divide,i.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},i.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},i.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},i.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},i.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)},i.dist=i.distance,i.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a},i.sqrDist=i.squaredDistance,i.length=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)},i.len=i.length,i.squaredLength=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i},i.sqrLen=i.squaredLength,i.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},i.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},i.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*o),e},i.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},i.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e},i.random=function(e,t){return t=t||1,e[0]=Object(n.c)(),e[1]=Object(n.c)(),e[2]=Object(n.c)(),e[3]=Object(n.c)(),i.normalize(e,e),i.scale(e,e,t),e},i.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e},i.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],l=r[3],h=l*n+s*a-u*i,c=l*i+u*n-o*a,d=l*a+o*i-s*n,f=-o*n-s*i-u*a;return e[0]=h*l+f*-o+c*-u-d*-s,e[1]=c*l+f*-s+d*-o-h*-u,e[2]=d*l+f*-u+h*-s-c*-o,e},i.forEach=function(){var e=i.create();return function(t,r,n,i,a,o){var s,u;for(r||(r=4),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}(),t.a=i},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},i.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e},i.clone=function(e){var t=new n.a(9);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[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},i.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},i.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e},i.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],h=t[8],c=h*o-s*l,d=-h*a+s*u,f=l*a-o*u,p=r*c+n*d+i*f;return p?(p=1/p,e[0]=c*p,e[1]=(-h*n+i*l)*p,e[2]=(s*n-i*o)*p,e[3]=d*p,e[4]=(h*r-i*u)*p,e[5]=(-s*r+i*a)*p,e[6]=f*p,e[7]=(-l*r+n*u)*p,e[8]=(o*r-n*a)*p,e):null},i.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],h=t[8];return e[0]=o*h-s*l,e[1]=i*l-n*h,e[2]=n*s-i*o,e[3]=s*u-a*h,e[4]=r*h-i*u,e[5]=i*a-r*s,e[6]=a*l-o*u,e[7]=n*u-r*l,e[8]=r*o-n*a,e},i.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8];return t*(l*a-o*u)+r*(-l*i+o*s)+n*(u*i-a*s)},i.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],h=t[7],c=t[8],d=r[0],f=r[1],p=r[2],m=r[3],g=r[4],_=r[5],v=r[6],y=r[7],x=r[8];return e[0]=d*n+f*o+p*l,e[1]=d*i+f*s+p*h,e[2]=d*a+f*u+p*c,e[3]=m*n+g*o+_*l,e[4]=m*i+g*s+_*h,e[5]=m*a+g*u+_*c,e[6]=v*n+y*o+x*l,e[7]=v*i+y*s+x*h,e[8]=v*a+y*u+x*c,e},i.mul=i.multiply,i.translate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],h=t[7],c=t[8],d=r[0],f=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=d*n+f*o+l,e[7]=d*i+f*s+h,e[8]=d*a+f*u+c,e},i.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],h=t[7],c=t[8],d=Math.sin(r),f=Math.cos(r);return e[0]=f*n+d*o,e[1]=f*i+d*s,e[2]=f*a+d*u,e[3]=f*o-d*n,e[4]=f*s-d*i,e[5]=f*u-d*a,e[6]=l,e[7]=h,e[8]=c,e},i.scale=function(e,t,r){var n=r[0],i=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},i.fromMat2d=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},i.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,l=r*o,h=n*o,c=n*s,d=i*o,f=i*s,p=i*u,m=a*o,g=a*s,_=a*u;return e[0]=1-c-p,e[3]=h-_,e[6]=d+g,e[1]=h+_,e[4]=1-l-p,e[7]=f-m,e[2]=d-g,e[5]=f+m,e[8]=1-l-c,e},i.normalFromMat4=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],h=t[8],c=t[9],d=t[10],f=t[11],p=t[12],m=t[13],g=t[14],_=t[15],v=r*s-n*o,y=r*u-i*o,x=r*l-a*o,T=n*u-i*s,b=n*l-a*s,w=i*l-a*u,E=h*m-c*p,S=h*g-d*p,A=h*_-f*p,M=c*g-d*m,C=c*_-f*m,L=d*_-f*g,D=v*L-y*C+x*M+T*A-b*S+w*E;return D?(D=1/D,e[0]=(s*L-u*C+l*M)*D,e[1]=(u*A-o*L-l*S)*D,e[2]=(o*C-s*A+l*E)*D,e[3]=(i*C-n*L-a*M)*D,e[4]=(r*L-i*A+a*S)*D,e[5]=(n*A-r*C-a*E)*D,e[6]=(m*w-g*b+_*T)*D,e[7]=(g*x-p*w-_*y)*D,e[8]=(p*b-m*x+_*v)*D,e):null},i.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2))},t.a=i},function(e,t,r){"use strict";var n=r(7),i=r(3),a=r(56),o=r(9),s=r(21),u=r(18),l=0,h=n.a.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},function(){this.name||(this.name=(this.type||"NODE")+"_"+l++),this.position||(this.position=new i.a),this.rotation||(this.rotation=new a.a),this.scale||(this.scale=new i.a(1,1,1)),this.worldTransform=new o.a,this.localTransform=new o.a,this._children=[]},{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(e){var t=this._scene;if(t){var r=t._nodeRepository;delete r[this.name],r[e]=this}this.name=e},add:function(e){var t=e._parent;if(t!==this){t&&t.remove(e),e._parent=this,this._children.push(e);var r=this._scene;r&&r!==e.scene&&e.traverse(this._addSelfToScene,this),e._needsUpdateWorldTransform=!0}},remove:function(e){var t=this._children,r=t.indexOf(e);r<0||(t.splice(r,1),e._parent=null,this._scene&&e.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var e=this._children,t=0;t<e.length;t++)e[t]._parent=null,this._scene&&e[t].traverse(this._removeSelfFromScene,this);this._children=[]},getScene:function(){return this._scene},getParent:function(){return this._parent},_removeSelfFromScene:function(e){e._scene.removeFromScene(e),e._scene=null},_addSelfToScene:function(e){this._scene.addToScene(e),e._scene=this._scene},isAncestor:function(e){for(var t=e._parent;t;){if(t===this)return!0;t=t._parent}return!1},children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},getChildByName:function(e){for(var t=this._children,r=0;r<t.length;r++)if(t[r].name===e)return t[r]},getDescendantByName:function(e){for(var t=this._children,r=0;r<t.length;r++){var n=t[r];if(n.name===e)return n;var i=n.getDescendantByName(e);if(i)return i}},queryNode:function(e){if(e){for(var t=e.split("/"),r=this,n=0;n<t.length;n++){var i=t[n];if(i){for(var a=!1,o=r._children,s=0;s<o.length;s++){var u=o[s];if(u.name===i){r=u,a=!0;break}}if(!a)return}}return r}},getPath:function(e){if(!this._parent)return"/";for(var t=this._parent,r=this.name;t._parent&&(r=t.name+"/"+r,t._parent!=e);)t=t._parent;return!t._parent&&e?null:r},traverse:function(e,t){e.call(t,this);for(var r=this._children,n=0,i=r.length;n<i;n++)r[n].traverse(e,t)},eachChild:function(e,t){for(var r=this._children,n=0,i=r.length;n<i;n++){var a=r[n];e.call(t,a,n)}},setLocalTransform:function(e){s.a.copy(this.localTransform.array,e.array),this.decomposeLocalTransform()},decomposeLocalTransform:function(e){var t=e?null:this.scale;this.localTransform.decomposeMatrix(t,this.rotation,this.position)},setWorldTransform:function(e){s.a.copy(this.worldTransform.array,e.array),this.decomposeWorldTransform()},decomposeWorldTransform:function(){var e=s.a.create();return function(t){var r=this.localTransform,n=this.worldTransform;this._parent?(s.a.invert(e,this._parent.worldTransform.array),s.a.multiply(r.array,e,n.array)):s.a.copy(r.array,n.array);var i=t?null:this.scale;r.decomposeMatrix(i,this.rotation,this.position)}}(),transformNeedsUpdate:function(){return this.position._dirty||this.rotation._dirty||this.scale._dirty},updateLocalTransform:function(){var e=this.position,t=this.rotation,r=this.scale;if(this.transformNeedsUpdate()){var n=this.localTransform.array;s.a.fromRotationTranslation(n,t.array,e.array),s.a.scale(n,n,r.array),t._dirty=!1,r._dirty=!1,e._dirty=!1,this._needsUpdateWorldTransform=!0}},_updateWorldTransformTopDown:function(){var e=this.localTransform.array,t=this.worldTransform.array;this._parent?s.a.multiplyAffine(t,this._parent.worldTransform.array,e):s.a.copy(t,e)},updateWorldTransform:function(){for(var e=this;e&&e.getParent()&&e.getParent().transformNeedsUpdate();)e=e.getParent();e.update()},update:function(e){this.autoUpdateLocalTransform?this.updateLocalTransform():e=!0,(e||this._needsUpdateWorldTransform)&&(this._updateWorldTransformTopDown(),e=!0,this._needsUpdateWorldTransform=!1);for(var t=this._children,r=0,n=t.length;r<n;r++)t[r].update(e)},getBoundingBox:function(){function e(e){return!e.invisible&&e.geometry}var t=new u.a,r=new o.a,n=new o.a;return function(i,a){return a=a||new u.a,i=i||e,this._parent?o.a.invert(n,this._parent.worldTransform):o.a.identity(n),this.traverse(function(e){e.geometry&&e.geometry.boundingBox&&(t.copy(e.geometry.boundingBox),o.a.multiply(r,n,e.worldTransform),t.applyTransform(r),a.union(t))},this,e),a}}(),getWorldPosition:function(e){this.transformNeedsUpdate()&&this.updateWorldTransform();var t=this.worldTransform.array;if(e){var r=e.array;return r[0]=t[12],r[1]=t[13],r[2]=t[14],e}return new i.a(t[12],t[13],t[14])},clone:function(){var e=new this.constructor,t=this._children;e.setName(this.name),e.position.copy(this.position),e.rotation.copy(this.rotation),e.scale.copy(this.scale);for(var r=0;r<t.length;r++)e.add(t[r].clone());return e},rotateAround:function(){var e=new i.a,t=new o.a;return function(r,n,i){e.copy(this.position).subtract(r);var a=this.localTransform;a.identity(),a.translate(r),a.rotate(i,n),t.fromRotationTranslation(this.rotation,e),a.multiply(t),a.scale(this.scale),this.decomposeLocalTransform(),this._needsUpdateWorldTransform=!0}}(),lookAt:function(){var e=new o.a;return function(t,r){e.lookAt(this.position,t,r||this.localTransform.y).invert(),this.setLocalTransform(e),this.target=t}}()});t.a=h},function(e,t,r){"use strict";function n(e){var t=[],r=Object.keys(e);r.sort();for(var n=0;n<r.length;n++){var i=r[n];t.push(i+" "+e[i])}var a=t.join("\n");if(g[a])return g[a];var o=h.a.genGUID();return g[a]=o,o}function i(){this.opaque=[],this.transparent=[],this._opaqueCount=0,this._transparentCount=0}function a(e,t){if(t.castShadow&&!e.castShadow)return!0}var o=r(35),s=r(24),u=r(58),l=r(18),h=r(23),c=r(21),d=r(69),f=r(9),p=c.a.create(),m=c.a.create(),g={};i.prototype.startCount=function(){this._opaqueCount=0,this._transparentCount=0},i.prototype.add=function(e,t){t?this.transparent[this._transparentCount++]=e:this.opaque[this._opaqueCount++]=e},i.prototype.endCount=function(){this.transparent.length=this._transparentCount,this.opaque.length=this._opaqueCount};var _=o.a.extend(function(){return{material:null,lights:[],viewBoundingBoxLastFrame:new l.a,shadowUniforms:{},_cameraList:[],_lightUniforms:{},_previousLightNumber:{},_lightNumber:{},_lightProgramKeys:{},_nodeRepository:{},_renderLists:new d.a(20)}},function(){this._scene=this},{addToScene:function(e){e instanceof u.a?(this._cameraList.length>0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(e)):e instanceof s.a&&this.lights.push(e),e.name&&(this._nodeRepository[e.name]=e)},removeFromScene:function(e){var t;e instanceof u.a?(t=this._cameraList.indexOf(e))>=0&&this._cameraList.splice(t,1):e instanceof s.a&&(t=this.lights.indexOf(e))>=0&&this.lights.splice(t,1),e.name&&delete this._nodeRepository[e.name]},getNode:function(e){return this._nodeRepository[e]},setMainCamera:function(e){var t=this._cameraList.indexOf(e);t>=0&&this._cameraList.splice(t,1),this._cameraList.unshift(e)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var e=this.lights;this._previousLightNumber=this._lightNumber;for(var t={},r=0;r<e.length;r++){var i=e[r];if(!i.invisible){var a=i.group;t[a]||(t[a]={}),t[a][i.type]=t[a][i.type]||0,t[a][i.type]++}}this._lightNumber=t;for(var o in t)this._lightProgramKeys[o]=n(t[o]);this._updateLightUniforms()},cloneNode:function(e){function t(e,r){n[e.__uid__]=r;for(var i=0;i<e._children.length;i++){t(e._children[i],r._children[i])}}var r=e.clone(),n={};return t(e,r),r.traverse(function(e){e.skeleton&&(e.skeleton=e.skeleton.clone(n)),e.material&&(e.material=e.material.clone())}),r},updateRenderList:function(e,t){var r=e.__uid__,n=this._renderLists.get(r);n||(n=new i,this._renderLists.put(r,n)),n.startCount(),t&&(this.viewBoundingBoxLastFrame.min.set(1/0,1/0,1/0),this.viewBoundingBoxLastFrame.max.set(-1/0,-1/0,-1/0));var a=this.material&&this.material.transparent||!1;return this._doUpdateRenderList(this,e,a,n,t),n.endCount(),n},getRenderList:function(e){return this._renderLists.get(e.__uid__)},_doUpdateRenderList:function(e,t,r,n,i){if(!e.invisible)for(var a=0;a<e._children.length;a++){var o=e._children[a];if(o.isRenderable()){var s=o.isSkinnedMesh()?p:o.worldTransform.array,u=o.geometry;c.a.multiplyAffine(m,t.viewMatrix.array,s),(i&&!u.boundingBox||!this.isFrustumCulled(o,t,m))&&n.add(o,o.material.transparent||r)}o._children.length>0&&this._doUpdateRenderList(o,t,r,n,i)}},isFrustumCulled:function(){var e=new l.a,t=new f.a;return function(r,n,i){var a=r.boundingBox;if(a||(a=r.skeleton&&r.skeleton.boundingBox?r.skeleton.boundingBox:r.geometry.boundingBox),!a)return!1;if(t.array=i,e.transformFrom(a,t),r.castShadow&&this.viewBoundingBoxLastFrame.union(e),r.frustumCulling){if(!e.intersectBoundingBox(n.frustum.boundingBox))return!0;t.array=n.projectionMatrix.array,e.max.array[2]>0&&e.min.array[2]<0&&(e.max.array[2]=-1e-20),e.applyProjection(t);var o=e.min.array,s=e.max.array;if(s[0]<-1||o[0]>1||s[1]<-1||o[1]>1||s[2]<-1||o[2]>1)return!0}return!1}}(),_updateLightUniforms:function(){var e=this.lights;e.sort(a);var t=this._lightUniforms;for(var r in t)for(var n in t[r])t[r][n].value.length=0;for(var i=0;i<e.length;i++){var o=e[i];if(!o.invisible){var r=o.group;for(var n in o.uniformTemplates){var s=o.uniformTemplates[n],u=s.value(o);if(null!=u){t[r]||(t[r]={}),t[r][n]||(t[r][n]={type:"",value:[]});var l=t[r][n];switch(l.type=s.type+"v",s.type){case"1i":case"1f":case"t":l.value.push(u);break;case"2f":case"3f":case"4f":for(var h=0;h<u.length;h++)l.value.push(u[h]);break;default:console.error("Unkown light uniform type "+s.type)}}}}}},getLightGroups:function(){var e=[];for(var t in this._lightNumber)e.push(t);return e},getNumberChangedLightGroups:function(){var e=[];for(var t in this._lightNumber)this.isLightNumberChanged(t)&&e.push(t);return e},isLightNumberChanged:function(e){var t=this._previousLightNumber,r=this._lightNumber;for(var n in r[e]){if(!t[e])return!0;if(r[e][n]!==t[e][n])return!0}for(var n in t[e]){if(!r[e])return!0;if(r[e][n]!==t[e][n])return!0}return!1},getLightsNumbers:function(e){return this._lightNumber[e]},getProgramKey:function(e){return this._lightProgramKeys[e]},setLightUniforms:function(){function e(e,t,r){for(var n in e){var i=e[n];if("tv"===i.type){if(!t.hasUniform(n))continue;for(var a=[],o=0;o<i.value.length;o++){var s=i.value[o],u=t.takeCurrentTextureSlot(r,s);a.push(u)}t.setUniform(r.gl,"1iv",n,a)}else t.setUniform(r.gl,i.type,n,i.value)}}return function(t,r,n){e(this._lightUniforms[r],t,n),e(this.shadowUniforms,t,n)}}(),dispose:function(){this.material=null,this._opaqueList=[],this._transparentList=[],this.lights=[],this._lightUniforms={},this._lightNumber={},this._nodeRepository={}}});t.a=_},function(e,t,r){"use strict";var n=r(58),i=n.a.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var e=this.projectionMatrix.array;this.left=(-1-e[12])/e[0],this.right=(1-e[12])/e[0],this.top=(1-e[13])/e[5],this.bottom=(-1-e[13])/e[5],this.near=-(-1-e[14])/e[10],this.far=-(1-e[14])/e[10]},clone:function(){var e=n.a.prototype.clone.call(this);return e.left=this.left,e.right=this.right,e.near=this.near,e.far=this.far,e.top=this.top,e.bottom=this.bottom,e}});t.a=i},function(e,t,r){"use strict";t.a={convertToDynamicArray:function(e){e&&this.resetOffset();var t=this.attributes;for(var r in t)e||!t[r].value?t[r].value=[]:t[r].value=Array.prototype.slice.call(t[r].value);e||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var e=this.attributes;for(var t in e)e[t].value&&e[t].value.length>0?e[t].value=new Float32Array(e[t].value):e[t].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}}},function(e,t,r){"use strict";function n(e,t){var r=[];return a.a.util.each(e.dimensions,function(n){var i=e.getDimensionInfo(n),a=i.otherDims,o=a[t];null!=o&&!1!==o&&(r[o]=i.name)}),r}var i=r(0),a=r.n(i);t.a=function(e,t,r){var i=e.getData(),o=e.getRawValue(t),s=a.a.util.isArray(o)?function(e){function o(e,t){var n=i.getDimensionInfo(t);if(n&&!1!==n.otherDims.tooltip){var o=n.type,l=(s?"- "+(n.tooltipName||n.name)+": ":"")+("ordinal"===o?e+"":"time"===o?r?"":a.a.format.formatTime("yyyy/MM/dd hh:mm:ss",e):a.a.format.addCommas(e));l&&u.push(a.a.format.encodeHTML(l))}}var s=!0,u=[],l=n(i,"tooltip");return l.length?a.a.util.each(l,function(e){o(i.get(e,t),e)}):a.a.util.each(e,o),(s?"<br/>":"")+u.join(s?"<br/>":", ")}(o):a.a.format.encodeHTML(a.a.format.addCommas(o)),u=i.getName(t),l=i.getItemVisual(t,"color");a.a.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var h=a.a.format.getTooltipMarker(l),c=e.name;return"\0-"===c&&(c=""),c=c?a.a.format.encodeHTML(c)+(r?": ":"<br/>"):"",r?h+c+s:c+h+(u?a.a.format.encodeHTML(u)+": "+s:s)}},function(e,t,r){"use strict";var n=r(72),i=r(11),a=n.a.extend({skeleton:null,joints:null,useSkinMatricesTexture:!1},function(){this.joints||(this.joints=[])},{isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var e=n.a.prototype.clone.call(this);return e.skeleton=this.skeleton,this.joints&&(e.joints=this.joints.slice()),e}});a.POINTS=i.a.POINTS,a.LINES=i.a.LINES,a.LINE_LOOP=i.a.LINE_LOOP,a.LINE_STRIP=i.a.LINE_STRIP,a.TRIANGLES=i.a.TRIANGLES,a.TRIANGLE_STRIP=i.a.TRIANGLE_STRIP,a.TRIANGLE_FAN=i.a.TRIANGLE_FAN,a.BACK=i.a.BACK,a.FRONT=i.a.FRONT,a.FRONT_AND_BACK=i.a.FRONT_AND_BACK,a.CW=i.a.CW,a.CCW=i.a.CCW,t.a=a},function(e,t,r){"use strict";var n=r(58),i=n.a.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var e=this.fov/180*Math.PI;this.projectionMatrix.perspective(e,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var e=this.projectionMatrix.array,t=2*Math.atan(1/e[5]);this.fov=t/Math.PI*180,this.aspect=e[5]/e[0],this.near=e[14]/(e[10]-1),this.far=e[14]/(e[10]+1)},clone:function(){var e=n.a.prototype.clone.call(this);return e.fov=this.fov,e.aspect=this.aspect,e.near=this.near,e.far=this.far,e}});t.a=i},function(e,t,r){"use strict";var n=r(40),i=r(76),a=r(8),o=r(19),s=r(4),u=r(121);a.a.import(u.a);var l=n.a.extend(function(){var e=new a.a({vertex:a.a.source("clay.skybox.vertex"),fragment:a.a.source("clay.skybox.fragment")}),t=new o.a({shader:e,depthMask:!1});return{scene:null,geometry:new i.a,material:t,environmentMap:null,culling:!1}},function(){var e=this.scene;e&&this.attachScene(e),this.environmentMap&&this.setEnvironmentMap(this.environmentMap)},{attachScene:function(e){this.scene&&this.detachScene(),e.skybox=this,this.scene=e,e.on("beforerender",this._beforeRenderScene,this)},detachScene:function(){this.scene&&(this.scene.off("beforerender",this._beforeRenderScene),this.scene.skybox=null),this.scene=null},dispose:function(e){this.detachScene(),this.geometry.dispose(e)},setEnvironmentMap:function(e){"texture2D"===e.textureType?(this.material.define("EQUIRECTANGULAR"),e.minFilter=s.a.LINEAR):this.material.undefine("EQUIRECTANGULAR"),this.material.set("environmentMap",e)},getEnvironmentMap:function(){return this.material.get("environmentMap")},_beforeRenderScene:function(e,t,r){this.renderSkybox(e,r)},renderSkybox:function(e,t){this.position.copy(t.getWorldPosition()),this.update(),e.gl.disable(e.gl.BLEND),this.material.get("lod")>0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),e.renderPass([this],t)}});t.a=l},function(e,t,r){"use strict";var n=r(15),i=r(18),a=n.a.extend({dynamic:!1,widthSegments:1,heightSegments:1},function(){this.build()},{build:function(){for(var e=this.heightSegments,t=this.widthSegments,r=this.attributes,n=[],a=[],o=[],s=[],u=0;u<=e;u++)for(var l=u/e,h=0;h<=t;h++){var c=h/t;if(n.push([2*c-1,2*l-1,0]),a&&a.push([c,l]),o&&o.push([0,0,1]),h<t&&u<e){var d=h+u*(t+1);s.push([d,d+1,d+t+1]),s.push([d+t+1,d+1,d+t+2])}}r.position.fromArray(n),r.texcoord0.fromArray(a),r.normal.fromArray(o),this.initIndicesFromArray(s),this.boundingBox=new i.a,this.boundingBox.min.set(-1,-1,0),this.boundingBox.max.set(1,1,0)}});t.a=a},function(e,t,r){"use strict";t.a={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(e){e=e||{},this.option.viewControl=this.option.viewControl||{},null!=e.alpha&&(this.option.viewControl.alpha=e.alpha),null!=e.beta&&(this.option.viewControl.beta=e.beta),null!=e.distance&&(this.option.viewControl.distance=e.distance),null!=e.center&&(this.option.viewControl.center=e.center)}}},function(e,t,r){"use strict";function n(e){return e instanceof Array||(e=[e,e]),e}var i=r(7),a=r(26),o=r(3),s=(r(56),r(2)),u=s.a.firstNotNull,l={left:0,middle:1,right:2},h=i.a.extend(function(){return{zr:null,viewGL:null,_center:new o.a,minDistance:.5,maxDistance:1.5,maxOrthographicSize:300,minOrthographicSize:30,minAlpha:-90,maxAlpha:90,minBeta:-1/0,maxBeta:1/0,autoRotateAfterStill:0,autoRotateDirection:"cw",autoRotateSpeed:60,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",_mode:"rotate",_camera:null,_needsUpdate:!1,_rotating:!1,_phi:0,_theta:0,_mouseX:0,_mouseY:0,_rotateVelocity:new a.a,_panVelocity:new a.a,_distance:500,_zoomSpeed:0,_stillTimeout:0,_animators:[]}},function(){["_mouseDownHandler","_mouseWheelHandler","_mouseMoveHandler","_mouseUpHandler","_pinchHandler","_contextMenuHandler","_update"].forEach(function(e){this[e]=this[e].bind(this)},this)},{init:function(){var e=this.zr;e&&(e.on("mousedown",this._mouseDownHandler),e.on("globalout",this._mouseUpHandler),e.on("mousewheel",this._mouseWheelHandler),e.on("pinch",this._pinchHandler),e.animation.on("frame",this._update),e.dom.addEventListener("contextmenu",this._contextMenuHandler))},dispose:function(){var e=this.zr;e&&(e.off("mousedown",this._mouseDownHandler),e.off("mousemove",this._mouseMoveHandler),e.off("mouseup",this._mouseUpHandler),e.off("mousewheel",this._mouseWheelHandler),e.off("pinch",this._pinchHandler),e.off("globalout",this._mouseUpHandler),e.dom.removeEventListener("contextmenu",this._contextMenuHandler),e.animation.off("frame",this._update)),this.stopAllAnimation()},getDistance:function(){return this._distance},setDistance:function(e){this._distance=e,this._needsUpdate=!0},getOrthographicSize:function(){return this._orthoSize},setOrthographicSize:function(e){this._orthoSize=e,this._needsUpdate=!0},getAlpha:function(){return this._theta/Math.PI*180},getBeta:function(){return-this._phi/Math.PI*180},getCenter:function(){return this._center.toArray()},setAlpha:function(e){e=Math.max(Math.min(this.maxAlpha,e),this.minAlpha),this._theta=e/180*Math.PI,this._needsUpdate=!0},setBeta:function(e){e=Math.max(Math.min(this.maxBeta,e),this.minBeta),this._phi=-e/180*Math.PI,this._needsUpdate=!0},setCenter:function(e){this._center.setArray(e)},setViewGL:function(e){this.viewGL=e},getCamera:function(){return this.viewGL.camera},setFromViewControlModel:function(e,t){t=t||{};var r=t.baseDistance||0,n=t.baseOrthoSize||1,i=e.get("projection");"perspective"!==i&&"orthographic"!==i&&"isometric"!==i&&(i="perspective"),this._projection=i,this.viewGL.setProjection(i);var a=e.get("distance")+r,o=e.get("orthographicSize")+n;[["damping",.8],["autoRotate",!1],["autoRotateAfterStill",3],["autoRotateDirection","cw"],["autoRotateSpeed",10],["minDistance",30],["maxDistance",400],["minOrthographicSize",30],["maxOrthographicSize",300],["minAlpha",-90],["maxAlpha",90],["minBeta",-1/0],["maxBeta",1/0],["rotateSensitivity",1],["zoomSensitivity",1],["panSensitivity",1],["panMouseButton","left"],["rotateMouseButton","middle"]].forEach(function(t){this[t[0]]=u(e.get(t[0]),t[1])},this),this.minDistance+=r,this.maxDistance+=r,this.minOrthographicSize+=n,this.maxOrthographicSize+=n;var s=e.ecModel,l={};["animation","animationDurationUpdate","animationEasingUpdate"].forEach(function(t){l[t]=u(e.get(t),s&&s.get(t))});var h=u(t.alpha,e.get("alpha"))||0,c=u(t.beta,e.get("beta"))||0,d=u(t.center,e.get("center"))||[0,0,0];l.animation&&l.animationDurationUpdate>0&&this._notFirst?this.animateTo({alpha:h,beta:c,center:d,distance:a,targetOrthographicSize:o,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(a),this.setAlpha(h),this.setBeta(c),this.setCenter(d),this.setOrthographicSize(o)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(e){var t=this.zr,r=this,n={},i={};return null!=e.distance&&(n.distance=this.getDistance(),i.distance=e.distance),null!=e.orthographicSize&&(n.orthographicSize=this.getOrthographicSize(),i.orthographicSize=e.orthographicSize),null!=e.alpha&&(n.alpha=this.getAlpha(),i.alpha=e.alpha),null!=e.beta&&(n.beta=this.getBeta(),i.beta=e.beta),null!=e.center&&(n.center=this.getCenter(),i.center=e.center),this._addAnimator(t.animation.animate(n).when(e.duration||1e3,i).during(function(){null!=n.alpha&&r.setAlpha(n.alpha),null!=n.beta&&r.setBeta(n.beta),null!=n.distance&&r.setDistance(n.distance),null!=n.center&&r.setCenter(n.center),null!=n.orthographicSize&&r.setOrthographicSize(n.orthographicSize),r._needsUpdate=!0})).start(e.easing||"linear")},stopAllAnimation:function(){for(var e=0;e<this._animators.length;e++)this._animators[e].stop();this._animators.length=0},update:function(){this._needsUpdate=!0,this._update(20)},_isAnimating:function(){return this._animators.length>0},_update:function(e){if(this._rotating){var t=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=t*e/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(e=Math.min(e,50),this._updateDistanceOrSize(e),this._updatePan(e),this._updateRotate(e),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(e){var t=this._rotateVelocity;this._phi=t.y*e/20+this._phi,this._theta=t.x*e/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(t,Math.pow(this.damping,e/16))},_updateDistanceOrSize:function(e){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*e/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*e/20),this._zoomSpeed*=Math.pow(this.damping,e/16)},_setDistance:function(e){this._distance=Math.max(Math.min(e,this.maxDistance),this.minDistance)},_setOrthoSize:function(e){this._orthoSize=Math.max(Math.min(e,this.maxOrthographicSize),this.minOrthographicSize);var t=this.getCamera(),r=this._orthoSize,n=r/this.viewGL.viewport.height*this.viewGL.viewport.width;t.left=-n/2,t.right=n/2,t.top=r/2,t.bottom=-r/2},_updatePan:function(e){var t=this._panVelocity,r=this._distance,n=this.getCamera(),i=n.worldTransform.y,a=n.worldTransform.x;this._center.scaleAndAdd(a,-t.x*r/200).scaleAndAdd(i,-t.y*r/200),this._vectorDamping(t,0)},_updateTransform:function(){var e=this.getCamera(),t=new o.a,r=this._theta+Math.PI/2,n=this._phi+Math.PI/2,i=Math.sin(r);t.x=i*Math.cos(n),t.y=-Math.cos(r),t.z=i*Math.sin(n),e.position.copy(this._center).scaleAndAdd(t,this._distance),e.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var e=this.autoRotateAfterStill,t=this;!isNaN(e)&&e>0&&(this._stillTimeout=setTimeout(function(){t._rotating=!0},1e3*e))},_vectorDamping:function(e,t){var r=e.len();r*=t,r<1e-4&&(r=0),e.normalize().scale(r)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var e=this.getCamera().worldTransform.z,t=Math.asin(e.y),r=Math.atan2(e.x,e.z);this._theta=t,this._phi=-r,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(e){if(!e.target&&!this._isAnimating()){var t=e.offsetX,r=e.offsetY;this.viewGL&&!this.viewGL.containPoint(t,r)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),e.event.targetTouches?1===e.event.targetTouches.length&&(this._mode="rotate"):e.event.button===l[this.rotateMouseButton]?this._mode="rotate":e.event.button===l[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=e.offsetX,this._mouseY=e.offsetY)}},_mouseMoveHandler:function(e){if(!(e.target&&e.target.__isGLToZRProxy||this._isAnimating())){var t=n(this.panSensitivity),r=n(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(e.offsetX-this._mouseX)/this.zr.getHeight()*2*r[0],this._rotateVelocity.x=(e.offsetY-this._mouseY)/this.zr.getWidth()*2*r[1]):"pan"===this._mode&&(this._panVelocity.x=(e.offsetX-this._mouseX)/this.zr.getWidth()*t[0]*400,this._panVelocity.y=(-e.offsetY+this._mouseY)/this.zr.getHeight()*t[1]*400),this._mouseX=e.offsetX,this._mouseY=e.offsetY,e.event.preventDefault()}},_mouseWheelHandler:function(e){if(!this._isAnimating()){var t=e.event.wheelDelta||-e.event.detail;this._zoomHandler(e,t)}},_pinchHandler:function(e){this._isAnimating()||(this._zoomHandler(e,e.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(e,t){if(0!==t){var r=e.offsetX,n=e.offsetY;if(!this.viewGL||this.viewGL.containPoint(r,n)){var i;i="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(t>0?-1:1)*i*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),e.event.preventDefault()}}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(e){this._isRightMouseButtonUsed()&&e.preventDefault()},_addAnimator:function(e){var t=this._animators;return t.push(e),e.done(function(){var r=t.indexOf(e);r>=0&&t.splice(r,1)}),e}});Object.defineProperty(h.prototype,"autoRotate",{get:function(e){return this._autoRotate},set:function(e){this._autoRotate=e,this._rotating=e}}),t.a=h},function(e,t,r){"use strict";t.a="@export ecgl.lines3D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, 1.0);\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n}\n@end\n\n\n\n@export ecgl.lines3D.clipNear\n\nvec4 clipNear(vec4 p1, vec4 p2) {\n float n = (p1.w - near) / (p1.w - p2.w);\n return vec4(mix(p1.xy, p2.xy, n), -near, near);\n}\n\n@end\n\n@export ecgl.lines3D.expandLine\n#ifdef VERTEX_ANIMATION\n vec4 prevProj = worldViewProjection * vec4(mix(prevPositionPrev, positionPrev, percent), 1.0);\n vec4 currProj = worldViewProjection * vec4(mix(prevPosition, position, percent), 1.0);\n vec4 nextProj = worldViewProjection * vec4(mix(prevPositionNext, positionNext, percent), 1.0);\n#else\n vec4 prevProj = worldViewProjection * vec4(positionPrev, 1.0);\n vec4 currProj = worldViewProjection * vec4(position, 1.0);\n vec4 nextProj = worldViewProjection * vec4(positionNext, 1.0);\n#endif\n\n if (currProj.w < 0.0) {\n if (nextProj.w > 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(e,t,r){function n(e,t,r,n,i){var a=0,o=0;null==n&&(n=1/0),null==i&&(i=1/0);var s=0;t.eachChild(function(u,l){var h,c,d=u.position,f=u.getBoundingRect(),p=t.childAt(l+1),m=p&&p.getBoundingRect();if("horizontal"===e){var g=f.width+(m?-m.x+f.x:0);h=a+g,h>n||u.newline?(a=0,h=g,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var _=f.height+(m?-m.y+f.y:0);c=o+_,c>i||u.newline?(a+=s+r,o=0,c=_,s=f.width):s=Math.max(s,f.width)}u.newline||(d[0]=a,d[1]=o,"horizontal"===e?a=h+r:o=c+r)})}function i(e,t,r){var n=t.width,i=t.height,a=p(e.x,n),o=p(e.y,i),s=p(e.x2,n),u=p(e.y2,i);return(isNaN(a)||isNaN(parseFloat(e.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(u)||isNaN(parseFloat(e.y2)))&&(u=i),r=m.normalizeCssArray(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(u-o-r[0]-r[2],0)}}function a(e,t,r){r=m.normalizeCssArray(r||0);var n=t.width,i=t.height,a=p(e.left,n),o=p(e.top,i),s=p(e.right,n),u=p(e.bottom,i),l=p(e.width,n),h=p(e.height,i),c=r[2]+r[0],f=r[1]+r[3],g=e.aspect;switch(isNaN(l)&&(l=n-s-f-a),isNaN(h)&&(h=i-u-c-o),null!=g&&(isNaN(l)&&isNaN(h)&&(g>n/i?l=.8*n:h=.8*i),isNaN(l)&&(l=g*h),isNaN(h)&&(h=l/g)),isNaN(a)&&(a=n-s-l-f),isNaN(o)&&(o=i-u-h-c),e.left||e.right){case"center":a=n/2-l/2-r[3];break;case"right":a=n-l-f}switch(e.top||e.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-c}a=a||0,o=o||0,isNaN(l)&&(l=n-f-a-(s||0)),isNaN(h)&&(h=i-c-o-(u||0));var _=new d(a+r[3],o+r[0],l,h);return _.margin=r,_}function o(e,t,r,n,i){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if(o||s){var l;if("raw"===u)l="group"===e.type?new d(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var h=e.getLocalTransform();l=l.clone(),l.applyTransform(h)}t=a(c.defaults({width:l.width,height:l.height},t),r,n);var f=e.position,p=o?t.x-l.x:0,m=s?t.y-l.y:0;e.attr("position","raw"===u?[p,m]:[f[0]+p,f[1]+m])}}function s(e,t){return null!=e[v[t][0]]||null!=e[v[t][1]]&&null!=e[v[t][2]]}function u(e,t,r){function n(r,n){var o={},u=0,l={},h=0;if(g(r,function(t){l[t]=e[t]}),g(r,function(e){i(t,e)&&(o[e]=l[e]=t[e]),a(o,e)&&u++,a(l,e)&&h++}),s[n])return a(t,r[1])?l[r[2]]=null:a(t,r[2])&&(l[r[1]]=null),l;if(2!==h&&u){if(u>=2)return o;for(var c=0;c<r.length;c++){var d=r[c];if(!i(o,d)&&i(e,d)){o[d]=e[d];break}}return o}return l}function i(e,t){return e.hasOwnProperty(t)}function a(e,t){return null!=e[t]&&"auto"!==e[t]}function o(e,t,r){g(e,function(e){t[e]=r[e]})}!c.isObject(r)&&(r={});var s=r.ignoreSize;!c.isArray(s)&&(s=[s,s]);var u=n(v[0],0),l=n(v[1],1);o(v[0],e,u),o(v[1],e,l)}function l(e){return h({},e)}function h(e,t){return t&&e&&g(_,function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}var c=r(13),d=r(82),f=r(85),p=f.parsePercent,m=r(171),g=c.each,_=["left","right","top","bottom","width","height"],v=[["width","left","right"],["height","top","bottom"]],y=n,x=c.curry(n,"vertical"),T=c.curry(n,"horizontal");t.LOCATION_PARAMS=_,t.HV_NAMES=v,t.box=y,t.vbox=x,t.hbox=T,t.getAvailableSize=i,t.getLayoutRect=a,t.positionElement=o,t.sizeCalculable=s,t.mergeLayoutParam=u,t.getLayoutParams=l,t.copyLayoutParams=h},function(e,t,r){"use strict";var n=r(7),i=n.a.extend(function(){return{name:"",inputLinks:{},outputLinks:{},_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}},{updateParameter:function(e,t){var r=this.outputs[e],n=r.parameters,i=r._parametersCopy;if(i||(i=r._parametersCopy={}),n)for(var a in n)"width"!==a&&"height"!==a&&(i[a]=n[a]);var o,s;return o=n.width instanceof Function?n.width.call(this,t):n.width,s=n.height instanceof Function?n.height.call(this,t):n.height,i.width===o&&i.height===s||this._outputTextures[e]&&this._outputTextures[e].dispose(t.gl),i.width=o,i.height=s,i},setParameter:function(e,t){},getParameter:function(e){},setParameters:function(e){for(var t in e)this.setParameter(t,e[t])},render:function(){},getOutput:function(e,t){if(null==t)return t=e,this._outputTextures[t];var r=this.outputs[t];if(r)return this._rendered?r.outputLastFrame?this._prevOutputTextures[t]:this._outputTextures[t]:this._rendering?(this._prevOutputTextures[t]||(this._prevOutputTextures[t]=this._compositor.allocateTexture(r.parameters||{})),this._prevOutputTextures[t]):(this.render(e),this._outputTextures[t])},removeReference:function(e){if(0===--this._outputReferences[e]){this.outputs[e].keepLastFrame?(this._prevOutputTextures[e]&&this._compositor.releaseTexture(this._prevOutputTextures[e]),this._prevOutputTextures[e]=this._outputTextures[e]):this._compositor.releaseTexture(this._outputTextures[e])}},link:function(e,t,r){this.inputLinks[e]={node:t,pin:r},t.outputLinks[r]||(t.outputLinks[r]=[]),t.outputLinks[r].push({node:this,pin:e}),this.pass.material.enableTexture(e)},clear:function(){this.inputLinks={},this.outputLinks={}},updateReference:function(e){if(!this._rendering){this._rendering=!0;for(var t in this.inputLinks){var r=this.inputLinks[t];r.node.updateReference(r.pin)}this._rendering=!1}e&&this._outputReferences[e]++},beforeFrame:function(){this._rendered=!1;for(var e in this.outputLinks)this._outputReferences[e]=0},afterFrame:function(){for(var e in this.outputLinks)if(this._outputReferences[e]>0){var t=this.outputs[e];t.keepLastFrame?(this._prevOutputTextures[e]&&this._compositor.releaseTexture(this._prevOutputTextures[e]),this._prevOutputTextures[e]=this._outputTextures[e]):this._compositor.releaseTexture(this._outputTextures[e])}}});t.a=i},function(e,t,r){"use strict";function n(e,t){for(var r=0,n=1/t,i=e;i>0;)r+=n*(i%t),i=Math.floor(i/t),n/=t;return r}t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n);t.a=function(e,t,r){r=r||e.getSource();var n=t||i.a.getCoordinateSystemDimensions(e.get("coordinateSystem"))||["x","y","z"],a=i.a.helper.createDimensions(r,{dimensionsDefine:r.dimensionsDefine||e.get("dimensions"),encodeDefine:r.encodeDefine||e.get("encode"),coordDimensions:n.map(function(t){var r=e.getReferringComponents(t+"Axis3D")[0];return{type:r&&"category"===r.get("type")?"ordinal":"float",name:t}})});"cartesian3D"===e.get("coordinateSystem")&&a.forEach(function(t){if(n.indexOf(t.coordDim)>=0){var r=e.getReferringComponents(t.coordDim+"Axis3D")[0];r&&"category"===r.get("type")&&(t.ordinalMeta=r.getOrdinalMeta())}});var o=i.a.helper.dataStack.enableDataStack(e,a,{byIndex:!0,stackedCoordDimension:"z"}),s=new i.a.List(a,e);return s.setCalculationInfo(o),s.initData(r),s}},function(e,t){function r(e,t,r){return{seriesType:e,performRawSeries:!0,reset:function(e,n,i){function a(t,r){if("function"==typeof u){var n=e.getRawValue(r),i=e.getDataParams(r);t.setItemVisual(r,"symbolSize",u(n,i))}if(t.hasItemOption){var a=t.getItemModel(r),o=a.getShallow("symbol",!0),s=a.getShallow("symbolSize",!0),l=a.getShallow("symbolKeepAspect",!0);null!=o&&t.setItemVisual(r,"symbol",o),null!=s&&t.setItemVisual(r,"symbolSize",s),null!=l&&t.setItemVisual(r,"symbolKeepAspect",l)}}var o=e.getData(),s=e.get("symbol")||t,u=e.get("symbolSize"),l=e.get("symbolKeepAspect");if(o.setVisual({legendSymbol:r||s,symbol:s,symbolSize:u,symbolKeepAspect:l}),!n.isSeriesFiltered(e)){var h="function"==typeof u;return{dataEach:o.hasItemOption||h?a:null}}}}}e.exports=r},function(e,t,r){"use strict";function n(e){return e.material}function i(e,t,r){return t.uniforms[r].value}function a(e,t,r,n){return r!==n}function o(e){return!0}function s(){}function u(e,t,r){this.availableAttributes=e,this.availableAttributeSymbols=t,this.indicesBuffer=r,this.vao=null}function l(e){var t,r;this.bind=function(e){t||(t=f.a.createCanvas(),t.width=t.height=1,t.getContext("2d"));var n=e.gl,i=!r;i&&(r=n.createTexture()),n.bindTexture(n.TEXTURE_2D,r),i&&n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t)},this.unbind=function(e){e.gl.bindTexture(e.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var h=r(7),c=r(111),d=r(11),f=r(14),p=r(19),m=r(26),g=r(115),_=r(8),v=r(71),y=r(21),x=r(12);_.a.import(v.a);var T=y.a.create,b={},w={float:d.a.FLOAT,byte:d.a.BYTE,ubyte:d.a.UNSIGNED_BYTE,short:d.a.SHORT,ushort:d.a.UNSIGNED_SHORT},E=h.a.extend(function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}},function(){this.canvas||(this.canvas=f.a.createCanvas());var e=this.canvas;try{var t={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!this.gl)throw new Error;this._glinfo=new c.a(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(e){throw"Error creating WebGL Context "+e}this._programMgr=new g.a(this),this._placeholderTexture=new l(this)},{resize:function(e,t){var r=this.canvas,n=this.devicePixelRatio;null!=e?(r.style.width=e+"px",r.style.height=t+"px",r.width=e*n,r.height=t*n,this._width=e,this._height=t):(this._width=r.width/n,this._height=r.height/n),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var e=this.viewport;return e.width/e.height},setDevicePixelRatio:function(e){this.devicePixelRatio=e,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(e){return this._glinfo.getExtension(e)},getGLParameter:function(e){return this._glinfo.getParameter(e)},setViewport:function(e,t,r,n,i){if("object"==typeof e){var a=e;e=a.x,t=a.y,r=a.width,n=a.height,i=a.devicePixelRatio}i=i||this.devicePixelRatio,this.gl.viewport(e*i,t*i,r*i,n*i),this.viewport={x:e,y:t,width:r,height:n,devicePixelRatio:i}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var e=this._clearStack.pop();this.clearColor=e.clearColor,this.clearBit=e.clearBit}},bindSceneRendering:function(e){this._sceneRendering=e},render:function(e,t,r,n){var i=this.gl,a=this.clearColor;if(this.clearBit){i.colorMask(!0,!0,!0,!0),i.depthMask(!0);var o=this.viewport,s=!1,u=o.devicePixelRatio;(o.width!==this._width||o.height!==this._height||u&&u!==this.devicePixelRatio||o.x||o.y)&&(s=!0,i.enable(i.SCISSOR_TEST),i.scissor(o.x*u,o.y*u,o.width*u,o.height*u)),i.clearColor(a[0],a[1],a[2],a[3]),i.clear(this.clearBit),s&&i.disable(i.SCISSOR_TEST)}if(r||e.update(!1),e.updateLights(),!(t=t||e.getMainCamera()))return void console.error("Can't find camera in the scene.");t.update();var l=e.updateRenderList(t,!0);this._sceneRendering=e;var h=l.opaque,c=l.transparent,d=e.material;e.trigger("beforerender",this,e,t,l),n?(this.renderPreZ(h,e,t),i.depthFunc(i.LEQUAL)):i.depthFunc(i.LESS);for(var f=T(),p=x.a.create(),m=0;m<c.length;m++){var g=c[m];y.a.multiplyAffine(f,t.viewMatrix.array,g.worldTransform.array),x.a.transformMat4(p,g.position.array,f),g.__depth=p[2]}this.renderPass(h,t,{getMaterial:function(e){return d||e.material},sortCompare:this.opaqueSortCompare}),this.renderPass(c,t,{getMaterial:function(e){return d||e.material},sortCompare:this.transparentSortCompare}),e.trigger("afterrender",this,e,t,l),this._sceneRendering=null},getProgram:function(e,t,r){return t=t||e.material,this._programMgr.getProgram(e,t,r)},validateProgram:function(e){if(e.__error){var t=e.__error;if(b[e.__uid__])return;if(b[e.__uid__]=!0,this.throwError)throw new Error(t);this.trigger("error",t)}},updatePrograms:function(e,t,r){var i=r&&r.getMaterial||n;t=t||null;for(var a=0;a<e.length;a++){var o=e[a],s=i.call(this,o);if(a>0){var u=e[a-1],l=u.joints?u.joints.length:0;if((o.joints?o.joints.length:0)===l&&o.material===u.material&&o.lightGroup===u.lightGroup){o.__program=u.__program;continue}}var h=this._programMgr.getProgram(o,s,t);this.validateProgram(h),o.__program=h}},renderPass:function(e,t,r){this.trigger("beforerenderpass",this,e,t,r),r=r||{},r.getMaterial=r.getMaterial||n,r.getUniform=r.getUniform||i,r.isMaterialChanged=r.isMaterialChanged||a,r.beforeRender=r.beforeRender||s,r.afterRender=r.afterRender||s;var u=r.ifRender||o;this.updatePrograms(e,this._sceneRendering,r),r.sortCompare&&e.sort(r.sortCompare);var l=this.viewport,h=l.devicePixelRatio,c=[l.x*h,l.y*h,l.width*h,l.height*h],d=this.devicePixelRatio,f=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*d,this._height*d],p=[c[2],c[3]],m=Date.now();t?(y.a.copy(S.VIEW,t.viewMatrix.array),y.a.copy(S.PROJECTION,t.projectionMatrix.array),y.a.copy(S.VIEWINVERSE,t.worldTransform.array)):(y.a.identity(S.VIEW),y.a.identity(S.PROJECTION),y.a.identity(S.VIEWINVERSE)),y.a.multiply(S.VIEWPROJECTION,S.PROJECTION,S.VIEW),y.a.invert(S.PROJECTIONINVERSE,S.PROJECTION),y.a.invert(S.VIEWPROJECTIONINVERSE,S.VIEWPROJECTION);for(var g,_,v,x,T,b,w,E,A,M,C,L,D=this.gl,N=this._sceneRendering,R=this.getGLExtension("OES_vertex_array_object"),P=0;P<e.length;P++){var I,O=e[P],F=null!=O.worldTransform;if(u(O)){F&&(I=O.isSkinnedMesh&&O.isSkinnedMesh()?S.IDENTITY:O.worldTransform.array);var B=O.geometry,U=r.getMaterial.call(this,O),z=O.__program,G=U.shader,H=B.__uid__+"-"+z.__uid__,V=H!==M;M=H,V&&R&&R.bindVertexArrayOES(null),F&&(y.a.copy(S.WORLD,I),y.a.multiply(S.WORLDVIEWPROJECTION,S.VIEWPROJECTION,I),y.a.multiplyAffine(S.WORLDVIEW,S.VIEW,I),(G.matrixSemantics.WORLDINVERSE||G.matrixSemantics.WORLDINVERSETRANSPOSE)&&y.a.invert(S.WORLDINVERSE,I),(G.matrixSemantics.WORLDVIEWINVERSE||G.matrixSemantics.WORLDVIEWINVERSETRANSPOSE)&&y.a.invert(S.WORLDVIEWINVERSE,S.WORLDVIEW),(G.matrixSemantics.WORLDVIEWPROJECTIONINVERSE||G.matrixSemantics.WORLDVIEWPROJECTIONINVERSETRANSPOSE)&&y.a.invert(S.WORLDVIEWPROJECTIONINVERSE,S.WORLDVIEWPROJECTION)),O.beforeRender&&O.beforeRender(this),r.beforeRender.call(this,O,U,g);var k=z!==_;k?(z.bind(this),z.setUniformOfSemantic(D,"VIEWPORT",c),z.setUniformOfSemantic(D,"WINDOW_SIZE",f),t&&(z.setUniformOfSemantic(D,"NEAR",t.near),z.setUniformOfSemantic(D,"FAR",t.far)),z.setUniformOfSemantic(D,"DEVICEPIXELRATIO",h),z.setUniformOfSemantic(D,"TIME",m),z.setUniformOfSemantic(D,"VIEWPORT_SIZE",p),N&&N.setLightUniforms(z,O.lightGroup,this)):z=_,(k||r.isMaterialChanged(O,v,U,g))&&(U.depthTest!==x&&(U.depthTest?D.enable(D.DEPTH_TEST):D.disable(D.DEPTH_TEST),x=U.depthTest),U.depthMask!==T&&(D.depthMask(U.depthMask),T=U.depthMask),U.transparent!==A&&(U.transparent?D.enable(D.BLEND):D.disable(D.BLEND),A=U.transparent),U.transparent&&(U.blend?U.blend(D):(D.blendEquationSeparate(D.FUNC_ADD,D.FUNC_ADD),D.blendFuncSeparate(D.SRC_ALPHA,D.ONE_MINUS_SRC_ALPHA,D.ONE,D.ONE_MINUS_SRC_ALPHA))),L=this._bindMaterial(O,U,z,v||null,g||null,_||null,r.getUniform),g=U);var W=G.matrixSemanticKeys;if(F)for(var j=0;j<W.length;j++){var X=W[j],q=G.matrixSemantics[X],Z=S[X];if(q.isTranspose){var Y=S[q.semanticNoTranspose];y.a.transpose(Z,Y)}z.setUniform(D,q.type,q.symbol,Z)}O.cullFace!==w&&(w=O.cullFace,D.cullFace(w)),O.frontFace!==E&&(E=O.frontFace,D.frontFace(E)),O.culling!==b&&(b=O.culling,b?D.enable(D.CULL_FACE):D.disable(D.CULL_FACE)),this._updateSkeleton(O,z,L),V&&(C=this._bindVAO(R,G,B,z)),this._renderObject(O,C),r.afterRender(this,O),O.afterRender&&O.afterRender(this),_=z,v=O}}R&&R.bindVertexArrayOES(null),this.trigger("afterrenderpass",this,e,t,r)},getMaxJointNumber:function(){return this._glinfo.getMaxJointNumber()},_updateSkeleton:function(e,t,r){var n=this.gl,i=e.skeleton;if(i)if(i.update(),e.joints.length>this._glinfo.getMaxJointNumber()){var a=i.getSubSkinMatricesTexture(e.__uid__,e.joints);t.useTextureSlot(this,a,r),t.setUniform(n,"1i","skinMatricesTexture",r),t.setUniform(n,"1f","skinMatricesTextureSize",a.width)}else{var o=i.getSubSkinMatrices(e.__uid__,e.joints);t.setUniformOfSemantic(n,"SKIN_MATRIX",o)}},_renderObject:function(e,t){var r=this.gl,n=e.geometry,i=e.mode;if(null==i&&(i=4),t.indicesBuffer){var a=this.getGLExtension("OES_element_index_uint"),o=a&&n.indices instanceof Uint32Array,s=o?r.UNSIGNED_INT:r.UNSIGNED_SHORT;r.drawElements(i,t.indicesBuffer.count,s,0)}else r.drawArrays(i,0,n.vertexCount)},_bindMaterial:function(e,t,r,n,i,a,o){for(var s=this.gl,u=a===r,l=r.currentTextureSlot(),h=t.getEnabledUniforms(),c=t.getTextureUniforms(),d=this._placeholderTexture,f=0;f<c.length;f++){var p=c[f],m=o(e,t,p),g=t.uniforms[p].type;if("t"===g&&m)m.__slot=-1;else if("tv"===g)for(var _=0;_<m.length;_++)m[_]&&(m[_].__slot=-1)}d.__slot=-1;for(var f=0;f<h.length;f++){var p=h[f],v=t.uniforms[p],m=o(e,t,p),g=v.type,y="t"===g;if(y&&(m&&m.isRenderable()||(m=d)),i&&u){var x=o(n,i,p);if(y&&(x&&x.isRenderable()||(x=d)),x===m){if(y)r.takeCurrentTextureSlot(this,null);else if("tv"===g&&m)for(var _=0;_<m.length;_++)r.takeCurrentTextureSlot(this,null);continue}}if(null!=m)if(y)if(m.__slot<0){var T=r.currentTextureSlot(),b=r.setUniform(s,"1i",p,T);b&&(r.takeCurrentTextureSlot(this,m),m.__slot=T)}else r.setUniform(s,"1i",p,m.__slot);else if(Array.isArray(m)){if(0===m.length)continue;if("tv"===g){if(!r.hasUniform(p))continue;for(var w=[],_=0;_<m.length;_++){var E=m[_];if(E.__slot<0){var T=r.currentTextureSlot();w.push(T),r.takeCurrentTextureSlot(this,E),E.__slot=T}else w.push(E.__slot)}r.setUniform(s,"1iv",p,w)}else r.setUniform(s,v.type,p,m)}else r.setUniform(s,v.type,p,m)}var S=r.currentTextureSlot();return r.resetTextureSlot(l),S},_bindVAO:function(e,t,r,n){var i=!r.dynamic,a=this.gl,o=this.__uid__+"-"+n.__uid__,s=r.__vaoCache[o];if(!s){var l=r.getBufferChunks(this);if(!l||!l.length)return;for(var h=l[0],c=h.attributeBuffers,d=h.indicesBuffer,f=[],p=[],m=0;m<c.length;m++){var g,_=c[m],v=_.name,y=_.semantic;if(y){var x=t.attributeSemantics[y];g=x&&x.symbol}else g=v;g&&n.attributes[g]&&(f.push(_),p.push(g))}s=new u(f,p,d),i&&(r.__vaoCache[o]=s)}var T=!0;e&&i&&(null==s.vao?s.vao=e.createVertexArrayOES():T=!1,e.bindVertexArrayOES(s.vao));var f=s.availableAttributes,d=s.indicesBuffer;if(T){for(var b=n.enableAttributes(this,s.availableAttributeSymbols,e&&i&&s),m=0;m<f.length;m++){var E=b[m];if(-1!==E){var _=f[m],S=_.buffer,A=_.size,M=w[_.type]||a.FLOAT;a.bindBuffer(a.ARRAY_BUFFER,S),a.vertexAttribPointer(E,A,M,!1,0,0)}}r.isUseIndices()&&a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.buffer)}return s},renderPreZ:function(e,t,r){var n=this.gl,i=this._prezMaterial||new p.a({shader:new _.a(_.a.source("clay.prez.vertex"),_.a.source("clay.prez.fragment"))});this._prezMaterial=i,n.colorMask(!1,!1,!1,!1),n.depthMask(!0),this.renderPass(e,r,{ifRender:function(e){return!e.ignorePreZ},isMaterialChanged:function(e,t){var r=e.material,n=t.material;return r.get("diffuseMap")!==n.get("diffuseMap")||(r.get("alphaCutoff")||0)!==(n.get("alphaCutoff")||0)},getUniform:function(e,t,r){if("alphaMap"===r)return e.material.get("diffuseMap");if("alphaCutoff"===r){if(e.material.isDefined("fragment","ALPHA_TEST")&&e.material.get("diffuseMap")){return e.material.get("alphaCutoff")||0}return 0}return t.get(r)},getMaterial:function(){return i},sort:this.opaqueSortCompare}),n.colorMask(!0,!0,!0,!0),n.depthMask(!0)},disposeScene:function(e){this.disposeNode(e,!0,!0),e.dispose()},disposeNode:function(e,t,r){e.getParent()&&e.getParent().remove(e);var n={};e.traverse(function(e){var i=e.material;if(e.geometry&&t&&e.geometry.dispose(this),r&&i&&!n[i.__uid__]){for(var a=i.getTextureUniforms(),o=0;o<a.length;o++){var s=a[o],u=i.uniforms[s].value,l=i.uniforms[s].type;if(u)if("t"===l)u.dispose&&u.dispose(this);else if("tv"===l)for(var h=0;h<u.length;h++)u[h]&&u[h].dispose&&u[h].dispose(this)}n[i.__uid__]=!0}e.dispose&&e.dispose(this)},this)},disposeGeometry:function(e){e.dispose(this)},disposeTexture:function(e){e.dispose(this)},disposeFrameBuffer:function(e){e.dispose(this)},dispose:function(){},screenToNDC:function(e,t,r){r||(r=new m.a),t=this._height-t;var n=this.viewport,i=r.array;return i[0]=(e-n.x)/n.width,i[0]=2*i[0]-1,i[1]=(t-n.y)/n.height,i[1]=2*i[1]-1,r}});E.opaqueSortCompare=E.prototype.opaqueSortCompare=function(e,t){return e.renderOrder===t.renderOrder?e.__program===t.__program?e.material===t.material?e.geometry.__uid__-t.geometry.__uid__:e.material.__uid__-t.material.__uid__:e.__program&&t.__program?e.__program.__uid__-t.__program.__uid__:0:e.renderOrder-t.renderOrder},E.transparentSortCompare=E.prototype.transparentSortCompare=function(e,t){return e.renderOrder===t.renderOrder?e.__depth===t.__depth?e.__program===t.__program?e.material===t.material?e.geometry.__uid__-t.geometry.__uid__:e.material.__uid__-t.material.__uid__:e.__program&&t.__program?e.__program.__uid__-t.__program.__uid__:0:e.__depth-t.__depth:e.renderOrder-t.renderOrder};var S={IDENTITY:T(),WORLD:T(),VIEW:T(),PROJECTION:T(),WORLDVIEW:T(),VIEWPROJECTION:T(),WORLDVIEWPROJECTION:T(),WORLDINVERSE:T(),VIEWINVERSE:T(),PROJECTIONINVERSE:T(),WORLDVIEWINVERSE:T(),VIEWPROJECTIONINVERSE:T(),WORLDVIEWPROJECTIONINVERSE:T(),WORLDTRANSPOSE:T(),VIEWTRANSPOSE:T(),PROJECTIONTRANSPOSE:T(),WORLDVIEWTRANSPOSE:T(),VIEWPROJECTIONTRANSPOSE:T(),WORLDVIEWPROJECTIONTRANSPOSE:T(),WORLDINVERSETRANSPOSE:T(),VIEWINVERSETRANSPOSE:T(),PROJECTIONINVERSETRANSPOSE:T(),WORLDVIEWINVERSETRANSPOSE:T(),VIEWPROJECTIONINVERSETRANSPOSE:T(),WORLDVIEWPROJECTIONINVERSETRANSPOSE:T()};E.COLOR_BUFFER_BIT=d.a.COLOR_BUFFER_BIT,E.DEPTH_BUFFER_BIT=d.a.DEPTH_BUFFER_BIT,E.STENCIL_BUFFER_BIT=d.a.STENCIL_BUFFER_BIT,t.a=E},function(e,t,r){"use strict";function n(e,t){this.action=e,this.context=t}var i={trigger:function(e){if(this.hasOwnProperty("__handlers__")&&this.__handlers__.hasOwnProperty(e)){var t=this.__handlers__[e],r=t.length,n=-1,i=arguments;switch(i.length){case 1:for(;++n<r;)t[n].action.call(t[n].context);return;case 2:for(;++n<r;)t[n].action.call(t[n].context,i[1]);return;case 3:for(;++n<r;)t[n].action.call(t[n].context,i[1],i[2]);return;case 4:for(;++n<r;)t[n].action.call(t[n].context,i[1],i[2],i[3]);return;case 5:for(;++n<r;)t[n].action.call(t[n].context,i[1],i[2],i[3],i[4]);return;default:for(;++n<r;)t[n].action.apply(t[n].context,Array.prototype.slice.call(i,1));return}}},on:function(e,t,r){if(e&&t){var i=this.__handlers__||(this.__handlers__={});if(i[e]){if(this.has(e,t))return}else i[e]=[];var a=new n(t,r||this);return i[e].push(a),this}},once:function(e,t,r){function n(){i.off(e,n),t.apply(this,arguments)}if(e&&t){var i=this;return this.on(e,n,r)}},before:function(e,t,r){if(e&&t)return e="before"+e,this.on(e,t,r)},after:function(e,t,r){if(e&&t)return e="after"+e,this.on(e,t,r)},success:function(e,t){return this.once("success",e,t)},error:function(e,t){return this.once("error",e,t)},off:function(e,t){var r=this.__handlers__||(this.__handlers__={});if(!t)return void(r[e]=[]);if(r[e]){for(var n=r[e],i=[],a=0;a<n.length;a++)t&&n[a].action!==t&&i.push(n[a]);r[e]=i}return this},has:function(e,t){var r=this.__handlers__;if(!r||!r[e])return!1;for(var n=r[e],i=0;i<n.length;i++)if(n[i].action===t)return!0}};t.a=i},function(e,t,r){"use strict";var n=r(3),i=r(12),a=function(e,t){this.origin=e||new n.a,this.direction=t||new n.a};a.prototype={constructor:a,intersectPlane:function(e,t){var r=e.normal.array,a=e.distance,o=this.origin.array,s=this.direction.array,u=i.a.dot(r,s);if(0===u)return null;t||(t=new n.a);var l=(i.a.dot(r,o)-a)/u;return i.a.scaleAndAdd(t.array,o,s,-l),t._dirty=!0,t},mirrorAgainstPlane:function(e){var t=i.a.dot(e.normal.array,this.direction.array);i.a.scaleAndAdd(this.direction.array,this.direction.array,e.normal.array,2*-t),this.direction._dirty=!0},distanceToPoint:function(){var e=i.a.create();return function(t){i.a.sub(e,t,this.origin.array);var r=i.a.dot(e,this.direction.array);if(r<0)return i.a.distance(this.origin.array,t);var n=i.a.lenSquared(e);return Math.sqrt(n-r*r)}}(),intersectSphere:function(){var e=i.a.create();return function(t,r,a){var o=this.origin.array,s=this.direction.array;t=t.array,i.a.sub(e,t,o);var u=i.a.dot(e,s),l=i.a.squaredLength(e),h=l-u*u,c=r*r;if(!(h>c)){var d=Math.sqrt(c-h),f=u-d,p=u+d;return a||(a=new n.a),f<0?p<0?null:(i.a.scaleAndAdd(a.array,o,s,p),a):(i.a.scaleAndAdd(a.array,o,s,f),a)}}}(),intersectBoundingBox:function(e,t){var r,a,o,s,u,l,h=this.direction.array,c=this.origin.array,d=e.min.array,f=e.max.array,p=1/h[0],m=1/h[1],g=1/h[2];if(p>=0?(r=(d[0]-c[0])*p,a=(f[0]-c[0])*p):(a=(d[0]-c[0])*p,r=(f[0]-c[0])*p),m>=0?(o=(d[1]-c[1])*m,s=(f[1]-c[1])*m):(s=(d[1]-c[1])*m,o=(f[1]-c[1])*m),r>s||o>a)return null;if((o>r||r!==r)&&(r=o),(s<a||a!==a)&&(a=s),g>=0?(u=(d[2]-c[2])*g,l=(f[2]-c[2])*g):(l=(d[2]-c[2])*g,u=(f[2]-c[2])*g),r>l||u>a)return null;if((u>r||r!==r)&&(r=u),(l<a||a!==a)&&(a=l),a<0)return null;var _=r>=0?r:a;return t||(t=new n.a),i.a.scaleAndAdd(t.array,c,h,_),t},intersectTriangle:function(){var e=i.a.create(),t=i.a.create(),r=i.a.create(),a=i.a.create();return function(o,s,u,l,h,c){var d=this.direction.array,f=this.origin.array;o=o.array,s=s.array,u=u.array,i.a.sub(e,s,o),i.a.sub(t,u,o),i.a.cross(a,t,d);var p=i.a.dot(e,a);if(l){if(p>-1e-5)return null}else if(p>-1e-5&&p<1e-5)return null;i.a.sub(r,f,o);var m=i.a.dot(a,r)/p;if(m<0||m>1)return null;i.a.cross(a,e,r);var g=i.a.dot(d,a)/p;if(g<0||g>1||m+g>1)return null;i.a.cross(a,e,t);var _=-i.a.dot(r,a)/p;return _<0?null:(h||(h=new n.a),c&&n.a.set(c,1-m-g,m,g),i.a.scaleAndAdd(h.array,f,d,_),h)}}(),applyTransform:function(e){n.a.add(this.direction,this.direction,this.origin),n.a.transformMat4(this.origin,this.origin,e),n.a.transformMat4(this.direction,this.direction,e),n.a.sub(this.direction,this.direction,this.origin),n.a.normalize(this.direction,this.direction)},copy:function(e){n.a.copy(this.origin,e.origin),n.a.copy(this.direction,e.direction)},clone:function(){var e=new a;return e.copy(this),e}},t.a=a},function(e,t,r){"use strict";var n=r(20),i=r(12),a=r(33),o=r(34),s={};s.create=function(){var e=new n.a(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},s.rotationTo=function(){var e=i.a.create(),t=i.a.fromValues(1,0,0),r=i.a.fromValues(0,1,0);return function(n,a,o){var u=i.a.dot(a,o);return u<-.999999?(i.a.cross(e,t,a),i.a.length(e)<1e-6&&i.a.cross(e,r,a),i.a.normalize(e,e),s.setAxisAngle(n,e,Math.PI),n):u>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(i.a.cross(e,a,o),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=1+u,s.normalize(n,n))}}(),s.setAxes=function(){var e=o.a.create();return function(t,r,n,i){return e[0]=n[0],e[3]=n[1],e[6]=n[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],s.normalize(t,s.fromMat3(t,e))}}(),s.clone=a.a.clone,s.fromValues=a.a.fromValues,s.copy=a.a.copy,s.set=a.a.set,s.identity=function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},s.setAxisAngle=function(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e},s.add=a.a.add,s.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],l=r[2],h=r[3];return e[0]=n*h+o*s+i*l-a*u,e[1]=i*h+o*u+a*s-n*l,e[2]=a*h+o*l+n*u-i*s,e[3]=o*h-n*s-i*u-a*l,e},s.mul=s.multiply,s.scale=a.a.scale,s.rotateX=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=i*u+a*s,e[2]=a*u-i*s,e[3]=o*u-n*s,e},s.rotateY=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-a*s,e[1]=i*u+o*s,e[2]=a*u+n*s,e[3]=o*u-i*s,e},s.rotateZ=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=i*u-n*s,e[2]=a*u+o*s,e[3]=o*u-a*s,e},s.calculateW=function(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e},s.dot=a.a.dot,s.lerp=a.a.lerp,s.slerp=function(e,t,r,n){var i,a,o,s,u,l=t[0],h=t[1],c=t[2],d=t[3],f=r[0],p=r[1],m=r[2],g=r[3];return a=l*f+h*p+c*m+d*g,a<0&&(a=-a,f=-f,p=-p,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,u=Math.sin(n*i)/o):(s=1-n,u=n),e[0]=s*l+u*f,e[1]=s*h+u*p,e[2]=s*c+u*m,e[3]=s*d+u*g,e},s.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=a*s,e},s.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},s.length=a.a.length,s.len=s.length,s.squaredLength=a.a.squaredLength,s.sqrLen=s.squaredLength,s.normalize=a.a.normalize,s.fromMat3=function(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*a+o]-t[3*o+a])*r,e[a]=(t[3*a+i]+t[3*i+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r}return e},t.a=s},function(e,t,r){"use strict";var n=r(55),i=r(34),a=function(e,t,r,i){e=e||0,t=t||0,r=r||0,i=void 0===i?1:i,this.array=n.a.fromValues(e,t,r,i),this._dirty=!0};a.prototype={constructor:a,add:function(e){return n.a.add(this.array,this.array,e.array),this._dirty=!0,this},calculateW:function(){return n.a.calculateW(this.array,this.array),this._dirty=!0,this},set:function(e,t,r,n){return this.array[0]=e,this.array[1]=t,this.array[2]=r,this.array[3]=n,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this.array[2]=e[2],this.array[3]=e[3],this._dirty=!0,this},clone:function(){return new a(this.x,this.y,this.z,this.w)},conjugate:function(){return n.a.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},dot:function(e){return n.a.dot(this.array,e.array)},fromMat3:function(e){return n.a.fromMat3(this.array,e.array),this._dirty=!0,this},fromMat4:function(){var e=i.a.create();return function(t){return i.a.fromMat4(e,t.array),i.a.transpose(e,e),n.a.fromMat3(this.array,e),this._dirty=!0,this}}(),identity:function(){return n.a.identity(this.array),this._dirty=!0,this},invert:function(){return n.a.invert(this.array,this.array),this._dirty=!0,this},len:function(){return n.a.len(this.array)},length:function(){return n.a.length(this.array)},lerp:function(e,t,r){return n.a.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return n.a.multiply(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return n.a.multiply(this.array,e.array,this.array),this._dirty=!0,this},normalize:function(){return n.a.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(e){return n.a.rotateX(this.array,this.array,e),this._dirty=!0,this},rotateY:function(e){return n.a.rotateY(this.array,this.array,e),this._dirty=!0,this},rotateZ:function(e){return n.a.rotateZ(this.array,this.array,e),this._dirty=!0,this},rotationTo:function(e,t){return n.a.rotationTo(this.array,e.array,t.array),this._dirty=!0,this},setAxes:function(e,t,r){return n.a.setAxes(this.array,e.array,t.array,r.array),this._dirty=!0,this},setAxisAngle:function(e,t){return n.a.setAxisAngle(this.array,e.array,t),this._dirty=!0,this},slerp:function(e,t,r){return n.a.slerp(this.array,e.array,t.array,r),this._dirty=!0,this},sqrLen:function(){return n.a.sqrLen(this.array)},squaredLength:function(){return n.a.squaredLength(this.array)},fromEuler:function(e,t){return a.fromEuler(this,e,t)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var o=Object.defineProperty;if(o){var s=a.prototype;o(s,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),o(s,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}}),o(s,"z",{get:function(){return this.array[2]},set:function(e){this.array[2]=e,this._dirty=!0}}),o(s,"w",{get:function(){return this.array[3]},set:function(e){this.array[3]=e,this._dirty=!0}})}a.add=function(e,t,r){return n.a.add(e.array,t.array,r.array),e._dirty=!0,e},a.set=function(e,t,r,i,a){n.a.set(e.array,t,r,i,a),e._dirty=!0},a.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},a.calculateW=function(e,t){return n.a.calculateW(e.array,t.array),e._dirty=!0,e},a.conjugate=function(e,t){return n.a.conjugate(e.array,t.array),e._dirty=!0,e},a.identity=function(e){return n.a.identity(e.array),e._dirty=!0,e},a.invert=function(e,t){return n.a.invert(e.array,t.array),e._dirty=!0,e},a.dot=function(e,t){return n.a.dot(e.array,t.array)},a.len=function(e){return n.a.length(e.array)},a.lerp=function(e,t,r,i){return n.a.lerp(e.array,t.array,r.array,i),e._dirty=!0,e},a.slerp=function(e,t,r,i){return n.a.slerp(e.array,t.array,r.array,i),e._dirty=!0,e},a.mul=function(e,t,r){return n.a.multiply(e.array,t.array,r.array),e._dirty=!0,e},a.multiply=a.mul,a.rotateX=function(e,t,r){return n.a.rotateX(e.array,t.array,r),e._dirty=!0,e},a.rotateY=function(e,t,r){return n.a.rotateY(e.array,t.array,r),e._dirty=!0,e},a.rotateZ=function(e,t,r){return n.a.rotateZ(e.array,t.array,r),e._dirty=!0,e},a.setAxisAngle=function(e,t,r){return n.a.setAxisAngle(e.array,t.array,r),e._dirty=!0,e},a.normalize=function(e,t){return n.a.normalize(e.array,t.array),e._dirty=!0,e},a.sqrLen=function(e){return n.a.sqrLen(e.array)},a.squaredLength=a.sqrLen,a.fromMat3=function(e,t){return n.a.fromMat3(e.array,t.array),e._dirty=!0,e},a.setAxes=function(e,t,r,i){return n.a.setAxes(e.array,t.array,r.array,i.array),e._dirty=!0,e},a.rotationTo=function(e,t,r){return n.a.rotationTo(e.array,t.array,r.array),e._dirty=!0,e},a.fromEuler=function(e,t,r){e._dirty=!0,t=t.array;var n=e.array,i=Math.cos(t[0]/2),a=Math.cos(t[1]/2),o=Math.cos(t[2]/2),s=Math.sin(t[0]/2),u=Math.sin(t[1]/2),l=Math.sin(t[2]/2),r=(r||"XYZ").toUpperCase();switch(r){case"XYZ":n[0]=s*a*o+i*u*l,n[1]=i*u*o-s*a*l,n[2]=i*a*l+s*u*o,n[3]=i*a*o-s*u*l;break;case"YXZ":n[0]=s*a*o+i*u*l,n[1]=i*u*o-s*a*l,n[2]=i*a*l-s*u*o,n[3]=i*a*o+s*u*l;break;case"ZXY":n[0]=s*a*o-i*u*l,n[1]=i*u*o+s*a*l,n[2]=i*a*l+s*u*o,n[3]=i*a*o-s*u*l;break;case"ZYX":n[0]=s*a*o-i*u*l,n[1]=i*u*o+s*a*l,n[2]=i*a*l-s*u*o,n[3]=i*a*o+s*u*l;break;case"YZX":n[0]=s*a*o+i*u*l,n[1]=i*u*o+s*a*l,n[2]=i*a*l-s*u*o,n[3]=i*a*o-s*u*l;break;case"XZY":n[0]=s*a*o-i*u*l,n[1]=i*u*o-s*a*l,n[2]=i*a*l+s*u*o,n[3]=i*a*o+s*u*l}},t.a=a},function(e,t,r){"use strict";var n=function(){this._contextId=0,this._caches=[],this._context={}};n.prototype={use:function(e,t){var r=this._caches;r[e]||(r[e]={},t&&(r[e]=t())),this._contextId=e,this._context=r[e]},put:function(e,t){this._context[e]=t},get:function(e){return this._context[e]},dirty:function(e){e=e||"";var t="__dt__"+e;this.put(t,!0)},dirtyAll:function(e){e=e||"";for(var t="__dt__"+e,r=this._caches,n=0;n<r.length;n++)r[n]&&(r[n][t]=!0)},fresh:function(e){e=e||"";var t="__dt__"+e;this.put(t,!1)},freshAll:function(e){e=e||"";for(var t="__dt__"+e,r=this._caches,n=0;n<r.length;n++)r[n]&&(r[n][t]=!1)},isDirty:function(e){e=e||"";var t="__dt__"+e,r=this._context;return!r.hasOwnProperty(t)||!0===r[t]},deleteContext:function(e){delete this._caches[e],this._context={}},delete:function(e){delete this._context[e]},clearAll:function(){this._caches={}},getContext:function(){return this._context},eachContext:function(e,t){Object.keys(this._caches).forEach(function(r){e&&e.call(t,r)})},miss:function(e){return!this._context.hasOwnProperty(e)}},n.prototype.constructor=n,t.a=n},function(e,t,r){"use strict";var n=r(35),i=r(9),a=r(59),o=r(54),s=r(33),u=r(12),l=n.a.extend(function(){return{projectionMatrix:new i.a,invProjectionMatrix:new i.a,viewMatrix:new i.a,frustum:new a.a}},function(){this.update(!0)},{update:function(e){n.a.prototype.update.call(this,e),i.a.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),i.a.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(e){i.a.copy(this.viewMatrix,e),i.a.invert(this.worldTransform,e),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(e){i.a.copy(this.projectionMatrix,e),i.a.invert(this.invProjectionMatrix,e),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:function(){var e=s.a.create();return function(t,r){var n=void 0!==r?r:new o.a,i=t.array[0],a=t.array[1];return s.a.set(e,i,a,-1,1),s.a.transformMat4(e,e,this.invProjectionMatrix.array),s.a.transformMat4(e,e,this.worldTransform.array),u.a.scale(n.origin.array,e,1/e[3]),s.a.set(e,i,a,1,1),s.a.transformMat4(e,e,this.invProjectionMatrix.array),s.a.transformMat4(e,e,this.worldTransform.array),u.a.scale(e,e,1/e[3]),u.a.sub(n.direction.array,e,n.origin.array),u.a.normalize(n.direction.array,n.direction.array),n.direction._dirty=!0,n.origin._dirty=!0,n}}()});t.a=l},function(e,t,r){"use strict";var n=r(18),i=r(74),a=r(12),o=a.a.set,s=a.a.copy,u=a.a.transformMat4,l=Math.min,h=Math.max,c=function(){this.planes=[];for(var e=0;e<6;e++)this.planes.push(new i.a);this.boundingBox=new n.a,this.vertices=[];for(var e=0;e<8;e++)this.vertices[e]=a.a.fromValues(0,0,0)};c.prototype={setFromProjection:function(e){var t=this.planes,r=e.array,n=r[0],i=r[1],a=r[2],s=r[3],u=r[4],l=r[5],h=r[6],c=r[7],d=r[8],f=r[9],p=r[10],m=r[11],g=r[12],_=r[13],v=r[14],y=r[15];o(t[0].normal.array,s-n,c-u,m-d),t[0].distance=-(y-g),t[0].normalize(),o(t[1].normal.array,s+n,c+u,m+d),t[1].distance=-(y+g),t[1].normalize(),o(t[2].normal.array,s+i,c+l,m+f),t[2].distance=-(y+_),t[2].normalize(),o(t[3].normal.array,s-i,c-l,m-f),t[3].distance=-(y-_),t[3].normalize(),o(t[4].normal.array,s-a,c-h,m-p),t[4].distance=-(y-v),t[4].normalize(),o(t[5].normal.array,s+a,c+h,m+p),t[5].distance=-(y+v),t[5].normalize();var x=this.boundingBox,T=this.vertices;if(0===y){var b=l/n,w=-v/(p-1),E=-v/(p+1),S=-E/l,A=-w/l;x.min.set(-S*b,-S,E),x.max.set(S*b,S,w),o(T[0],-S*b,-S,E),o(T[1],-S*b,S,E),o(T[2],S*b,-S,E),o(T[3],S*b,S,E),o(T[4],-A*b,-A,w),o(T[5],-A*b,A,w),o(T[6],A*b,-A,w),o(T[7],A*b,A,w)}else{var M=(-1-g)/n,C=(1-g)/n,L=(1-_)/l,D=(-1-_)/l,N=(-1-v)/p,R=(1-v)/p;x.min.set(Math.min(M,C),Math.min(D,L),Math.min(R,N)),x.max.set(Math.max(C,M),Math.max(L,D),Math.max(N,R));var P=x.min.array,I=x.max.array;o(T[0],P[0],P[1],P[2]),o(T[1],P[0],I[1],P[2]),o(T[2],I[0],P[1],P[2]),o(T[3],I[0],I[1],P[2]),o(T[4],P[0],P[1],I[2]),o(T[5],P[0],I[1],I[2]),o(T[6],I[0],P[1],I[2]),o(T[7],I[0],I[1],I[2])}},getTransformedBoundingBox:function(){var e=a.a.create();return function(t,r){var n=this.vertices,i=r.array,a=t.min,o=t.max,c=a.array,d=o.array,f=n[0];u(e,f,i),s(c,e),s(d,e);for(var p=1;p<8;p++)f=n[p],u(e,f,i),c[0]=l(e[0],c[0]),c[1]=l(e[1],c[1]),c[2]=l(e[2],c[2]),d[0]=h(e[0],d[0]),d[1]=h(e[1],d[1]),d[2]=h(e[2],d[2]);return a._dirty=!0,o._dirty=!0,t}}()},t.a=c},function(e,t){var r=function(){this.head=null,this.tail=null,this._len=0},n=r.prototype;n.insert=function(e){var t=new i(e);return this.insertEntry(t),t},n.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},n.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._len--},n.len=function(){return this._len},n.clear=function(){this.head=this.tail=null,this._len=0};var i=function(e){this.value=e,this.next,this.prev},a=function(e){this._list=new r,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(e,t){var r=this._list,n=this._map,a=null;if(null==n[e]){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=r.head;r.remove(u),delete n[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=t:s=new i(t),s.key=e,r.insertEntry(s),n[e]=s}return a},o.get=function(e){var t=this._map[e],r=this._list;if(null!=t)return t!==r.tail&&(r.remove(t),r.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},function(e,t,r){"use strict";var n=r(5),i=r(27),a=r(14),o=r(62),s=r(75),u=r(36),l=r(122),h=r(123),c={loadTexture:function(e,t,r,a){var o;if("function"==typeof t?(r=t,a=r,t={}):t=t||{},"string"==typeof e){if(e.match(/.hdr$/)||"hdr"===t.fileType)return o=new n.a({width:0,height:0,sRGB:!1}),c._fetchTexture(e,function(e){h.a.parseRGBE(e,o,t.exposure),o.dirty(),r&&r(o)},a),o;e.match(/.dds$/)||"dds"===t.fileType?(o=new n.a({width:0,height:0}),c._fetchTexture(e,function(e){l.a.parse(e,o),o.dirty(),r&&r(o)},a)):(o=new n.a,o.load(e),o.success(r),o.error(a))}else"object"==typeof e&&void 0!==e.px&&(o=new i.a,o.load(e),o.success(r),o.error(a));return o},loadPanorama:function(e,t,r,n,i,a){var o=this;"function"==typeof n?(i=n,a=i,n={}):n=n||{},c.loadTexture(t,n,function(t){t.flipY=n.flipY||!1,o.panoramaToCubeMap(e,t,r,n),t.dispose(e),i&&i(r)},a)},panoramaToCubeMap:function(e,t,r,n){var i=new o.a,a=new s.a({scene:new u.a});return a.setEnvironmentMap(t),n=n||{},n.encodeRGBM&&a.material.define("fragment","RGBM_ENCODE"),r.sRGB=t.sRGB,i.texture=r,i.render(e,a.scene),i.texture=null,i.dispose(e),r},heightToNormal:function(e,t){var r=document.createElement("canvas"),n=r.width=e.width,i=r.height=e.height,a=r.getContext("2d");a.drawImage(e,0,0,n,i),t=t||!1;for(var o=a.getImageData(0,0,n,i),s=a.createImageData(n,i),u=0;u<o.data.length;u+=4){if(t){var l=o.data[u],h=o.data[u+1],c=o.data[u+2];if(Math.abs(l-h)+Math.abs(h-c)>20)return console.warn("Given image is not a height map"),e}var d,f,p,m;u%(4*n)==0?(d=o.data[u],p=o.data[u+4]):u%(4*n)==4*(n-1)?(d=o.data[u-4],p=o.data[u]):(d=o.data[u-4],p=o.data[u+4]),u<4*n?(f=o.data[u],m=o.data[u+4*n]):u>n*(i-1)*4?(f=o.data[u-4*n],m=o.data[u]):(f=o.data[u-4*n],m=o.data[u+4*n]),s.data[u]=d-p+127,s.data[u+1]=f-m+127,s.data[u+2]=255,s.data[u+3]=255}return a.putImageData(s,0,0),r},isHeightImage:function(e,t,r){if(!e||!e.width||!e.height)return!1;var n=document.createElement("canvas"),i=n.getContext("2d"),a=t||32;r=r||20,n.width=n.height=a,i.drawImage(e,0,0,a,a);for(var o=i.getImageData(0,0,a,a),s=0;s<o.data.length;s+=4){var u=o.data[s],l=o.data[s+1],h=o.data[s+2];if(Math.abs(u-l)+Math.abs(l-h)>r)return!1}return!0},_fetchTexture:function(e,t,r){a.a.request.get({url:e,responseType:"arraybuffer",onload:t,onerror:r})},createChessboard:function(e,t,r,i){e=e||512,t=t||64,r=r||"black",i=i||"white";var a=Math.ceil(e/t),o=document.createElement("canvas");o.width=e,o.height=e;var s=o.getContext("2d");s.fillStyle=i,s.fillRect(0,0,e,e),s.fillStyle=r;for(var u=0;u<a;u++)for(var l=0;l<a;l++){var h=l%2?u%2:u%2-1;h&&s.fillRect(u*t,l*t,t,t)}return new n.a({image:o,anisotropic:8})},createBlank:function(e){var t=document.createElement("canvas");t.width=1,t.height=1;var r=t.getContext("2d");return r.fillStyle=e,r.fillRect(0,0,1,1),new n.a({image:t})}};t.a=c},function(e,t,r){"use strict";var n=r(7),i=r(3),a=r(41),o=r(10),s=["px","nx","py","ny","pz","nz"],u=n.a.extend(function(){var e={position:new i.a,far:1e3,near:.1,texture:null,shadowMapPass:null},t=e._cameras={px:new a.a({fov:90}),nx:new a.a({fov:90}),py:new a.a({fov:90}),ny:new a.a({fov:90}),pz:new a.a({fov:90}),nz:new a.a({fov:90})};return t.px.lookAt(i.a.POSITIVE_X,i.a.NEGATIVE_Y),t.nx.lookAt(i.a.NEGATIVE_X,i.a.NEGATIVE_Y),t.py.lookAt(i.a.POSITIVE_Y,i.a.POSITIVE_Z),t.ny.lookAt(i.a.NEGATIVE_Y,i.a.NEGATIVE_Z),t.pz.lookAt(i.a.POSITIVE_Z,i.a.NEGATIVE_Y),t.nz.lookAt(i.a.NEGATIVE_Z,i.a.NEGATIVE_Y),e._frameBuffer=new o.a,e},{getCamera:function(e){return this._cameras[e]},render:function(e,t,r){var n=e.gl;r||t.update();for(var a=this.texture.width,o=2*Math.atan(a/(a-.5))/Math.PI*180,u=0;u<6;u++){var l=s[u],h=this._cameras[l];if(i.a.copy(h.position,this.position),h.far=this.far,h.near=this.near,h.fov=o,this.shadowMapPass){h.update();var c=t.getBoundingBox();c.applyTransform(h.viewMatrix),t.viewBoundingBoxLastFrame.copy(c),this.shadowMapPass.render(e,t,h,!0)}this._frameBuffer.attach(this.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+u),this._frameBuffer.bind(e),e.render(t,h,!0),this._frameBuffer.unbind(e)}},dispose:function(e){this._frameBuffer.dispose(e)}});t.a=u},function(e,t,r){"use strict";var n=r(1),i=r(165),a=r(166);n.a.Shader.import(a.a),t.a=n.a.Mesh.extend(function(){return{geometry:new i.a({dynamic:!0}),material:new n.a.Material({shader:n.a.createShader("ecgl.labels"),transparent:!0,depthMask:!1}),culling:!1,castShadow:!1,ignorePicking:!0}})},function(e,t,r){"use strict";function n(e){this.rootNode=new o.a.Node,this._triangulationResults={},this._shadersMap=o.a.COMMON_SHADERS.reduce(function(e,t){return e[t]=o.a.createShader("ecgl."+t),e},{}),this._linesShader=o.a.createShader("ecgl.meshLines3D");var t={};o.a.COMMON_SHADERS.forEach(function(e){t[e]=new o.a.Material({shader:o.a.createShader("ecgl."+e)})}),this._groundMaterials=t,this._groundMesh=new o.a.Mesh({geometry:new o.a.PlaneGeometry({dynamic:!0}),castShadow:!1,renderNormal:!0,$ignorePicking:!0}),this._groundMesh.rotation.rotateX(-Math.PI/2),this._labelsBuilder=new d.a(512,512,e),this._labelsBuilder.getMesh().renderOrder=100,this._labelsBuilder.getMesh().material.depthTest=!1,this.rootNode.add(this._labelsBuilder.getMesh()),this._initMeshes(),this._api=e}var i=r(0),a=r.n(i),o=r(1),s=r(204),u=r(25),l=r(2),h=r(6),c=r(65),d=r(66),f=r(46),p=h.a.vec3;o.a.Shader.import(f.a),n.prototype={constructor:n,extrudeY:!0,update:function(e,t,r,n,i){var a=e.getData();null==n&&(n=0),null==i&&(i=a.count()),this._startIndex=n,this._endIndex=i-1,this._triangulation(e,n,i);var o=this._getShader(e.get("shading"));this._prepareMesh(e,o,r,n,i),this.rootNode.updateWorldTransform(),this._updateRegionMesh(e,r,n,i);var s=e.coordinateSystem;"geo3D"===s.type&&this._updateGroundPlane(e,s,r);var u=this;this._labelsBuilder.updateData(a,n,i),this._labelsBuilder.getLabelPosition=function(e,t,r){var n,i=a.getName(e),o=r;if("geo3D"===s.type){var l=s.getRegion(i);if(!l)return[NaN,NaN,NaN];n=l.center;return s.dataToPoint([n[0],n[1],o])}var h=u._triangulationResults[e-u._startIndex],n=u.extrudeY?[(h.max[0]+h.min[0])/2,h.max[1]+o,(h.max[2]+h.min[2])/2]:[(h.max[0]+h.min[0])/2,(h.max[1]+h.min[1])/2,h.max[2]+o]},this._data=a,this._labelsBuilder.updateLabels(),this._updateDebugWireframe(e),this._lastHoverDataIndex=0},_initMeshes:function(){var e=this,t=function(){var t=new o.a.Mesh({name:"Polygon",material:new o.a.Material({shader:e._shadersMap.lambert}),geometry:new o.a.Geometry({sortTriangles:!0,dynamic:!0}),culling:!1,ignorePicking:!0,renderNormal:!0});return a.a.util.extend(t.geometry,c.a),t}(),r=new o.a.Mesh({material:new o.a.Material({shader:this._linesShader}),castShadow:!1,ignorePicking:!0,$ignorePicking:!0,geometry:new u.a({useNativeLine:!1})});this.rootNode.add(t),this.rootNode.add(r),t.material.define("both","VERTEX_COLOR"),t.material.define("fragment","DOUBLE_SIDED"),this._polygonMesh=t,this._linesMesh=r,this.rootNode.add(this._groundMesh)},_getShader:function(e){var t=this._shadersMap[e];return t||(t=this._shadersMap.lambert),t.__shading=e,t},_prepareMesh:function(e,t,r,n,i){for(var a=0,s=0,u=0,l=0,h=n;h<i;h++){var c=this._getRegionPolygonInfo(h),d=this._getRegionLinesInfo(h,e,this._linesMesh.geometry);a+=c.vertexCount,s+=c.triangleCount,u+=d.vertexCount,l+=d.triangleCount}var f=this._polygonMesh,p=f.geometry;["position","normal","texcoord0","color"].forEach(function(e){p.attributes[e].init(a)}),p.indices=a>65535?new Uint32Array(3*s):new Uint16Array(3*s),f.material.shader!==t&&f.material.attachShader(t,!0),o.a.setMaterialFromModel(t.__shading,f.material,e,r),u>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(u),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(a),this._vertexRangeOfDataIndex=new Uint32Array(2*(i-n))},_updateRegionMesh:function(e,t,r,n){for(var i=e.getData(),a=0,s=0,u=!1,h=this._polygonMesh,c=this._linesMesh,d=r;d<n;d++){var f=e.getRegionModel(d),p=f.getModel("itemStyle"),m=p.get("color"),g=l.a.firstNotNull(p.get("opacity"),1),_=i.getItemVisual(d,"color",!0);null!=_&&i.hasValue(d)&&(m=_),i.setItemVisual(d,"color",m),i.setItemVisual(d,"opacity",g),m=o.a.parseColor(m);var v=o.a.parseColor(p.get("borderColor"));m[3]*=g,v[3]*=g;var y=m[3]<.99;h.material.set("color",[1,1,1,1]),u=u||y;for(var x=l.a.firstNotNull(f.get("height",!0),e.get("regionHeight")),T=this._updatePolygonGeometry(e,h.geometry,d,x,a,s,m),b=a;b<T.vertexOffset;b++)this._dataIndexOfVertex[b]=d;this._vertexRangeOfDataIndex[2*(d-r)]=a,this._vertexRangeOfDataIndex[2*(d-r)+1]=T.vertexOffset,a=T.vertexOffset,s=T.triangleOffset;var w=p.get("borderWidth"),E=w>0;E&&(w*=t.getDevicePixelRatio(),this._updateLinesGeometry(c.geometry,e,d,x,w,e.coordinateSystem.transform)),c.invisible=!E,c.material.set({color:v})}var h=this._polygonMesh;h.material.transparent=u,h.material.depthMask=!u,h.geometry.updateBoundingBox(),h.frontFace=this.extrudeY?o.a.Mesh.CCW:o.a.Mesh.CW,h.material.get("normalMap")&&h.geometry.generateTangents(),h.seriesIndex=e.seriesIndex,h.on("mousemove",this._onmousemove,this),h.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(e){var t=e.getModel("debug.wireframe");if(t.get("show")){var r=o.a.parseColor(t.get("lineStyle.color")||"rgba(0,0,0,0.5)"),n=l.a.firstNotNull(t.get("lineStyle.width"),1),i=this._polygonMesh;i.geometry.generateBarycentric(),i.material.define("both","WIREFRAME_TRIANGLE"),i.material.set("wireframeLineColor",r),i.material.set("wireframeLineWidth",n)}},_onmousemove:function(e){var t=this._dataIndexOfVertex[e.triangle[0]];null==t&&(t=-1),t!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(t),this._labelsBuilder.updateLabels([t])),this._lastHoverDataIndex=t,this._polygonMesh.dataIndex=t},_onmouseout:function(e){e.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(e,t,r){var n=e.getModel("groundPlane",e);if(this._groundMesh.invisible=!n.get("show",!0),!this._groundMesh.invisible){var i=e.get("shading"),a=this._groundMaterials[i];a||(a=this._groundMaterials.lambert),o.a.setMaterialFromModel(i,a,n,r),a.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=a,this._groundMesh.material.set("color",o.a.parseColor(n.get("color"))),this._groundMesh.scale.set(t.size[0],t.size[2],1)}},_triangulation:function(e,t,r){this._triangulationResults=[];for(var n=[1/0,1/0,1/0],i=[-1/0,-1/0,-1/0],a=e.coordinateSystem,o=t;o<r;o++){for(var u=[],l=e.getRegionPolygonCoords(o),h=0;h<l.length;h++){var c=l[h].exterior,d=l[h].interiors,f=[],m=[];if(!(c.length<3)){for(var g=0,_=0;_<c.length;_++){var v=c[_];f[g++]=v[0],f[g++]=v[1]}for(var _=0;_<d.length;_++)if(!(d[_].length<3)){for(var y=f.length/2,x=0;x<d[_].length;x++){var v=d[_][x];f.push(v[0]),f.push(v[1])}m.push(y)}for(var T=Object(s.a)(f,m),b=new Float64Array(f.length/2*3),w=[],E=[1/0,1/0,1/0],S=[-1/0,-1/0,-1/0],A=0,_=0;_<f.length;)p.set(w,f[_++],0,f[_++]),a&&a.transform&&p.transformMat4(w,w,a.transform),p.min(E,E,w),p.max(S,S,w),b[A++]=w[0],b[A++]=w[1],b[A++]=w[2];p.min(n,n,E),p.max(i,i,S),u.push({points:b,indices:T,min:E,max:S})}}this._triangulationResults.push(u)}this._geoBoundingBox=[n,i]},_getRegionPolygonInfo:function(e){for(var t=this._triangulationResults[e-this._startIndex],r=0,n=0,i=0;i<t.length;i++)r+=t[i].points.length/3,n+=t[i].indices.length/3;return{vertexCount:2*r+4*r,triangleCount:2*n+2*r}},_updatePolygonGeometry:function(e,t,r,n,i,a,o){function s(e,t,r){for(var n=e.points,a=n.length,s=[],u=[],l=0;l<a;l+=3)s[0]=n[l],s[v]=t,s[y]=n[l+2],u[0]=(n[l]*x[0]-T[0])/w,u[1]=(n[l+2]*x[y]-T[2])/w,h.set(i,s),g&&f.set(i,o),d.set(i++,u)}function u(e,t,r){var n=i;s(e,t,r);for(var o=e.indices.length,u=0;u<o;u++)_[3*a+u]=e.indices[u]+n;a+=e.indices.length/3}for(var l=e.get("projectUVOnGround"),h=t.attributes.position,c=t.attributes.normal,d=t.attributes.texcoord0,f=t.attributes.color,m=this._triangulationResults[r-this._startIndex],g=f.value&&o,_=t.indices,v=this.extrudeY?1:2,y=this.extrudeY?2:1,x=[this.rootNode.worldTransform.x.len(),this.rootNode.worldTransform.y.len(),this.rootNode.worldTransform.z.len()],T=p.mul([],this._geoBoundingBox[0],x),b=p.mul([],this._geoBoundingBox[1],x),w=Math.max(b[0]-T[0],b[2]-T[2]),E=this.extrudeY?[0,1,0]:[0,0,1],S=p.negate([],E),A=0;A<m.length;A++){var M=i,C=m[A];u(C,0,0),u(C,n,0);for(var L=C.points.length/3,D=0;D<L;D++)c.set(M+D,S),c.set(M+D+L,E);for(var N=[0,3,1,1,3,2],R=[[],[],[],[]],P=[],I=[],O=[],F=[],B=0,D=0;D<L;D++){for(var U=(D+1)%L,z=(C.points[3*U]-C.points[3*D])*x[0],G=(C.points[3*U+2]-C.points[3*D+2])*x[y],H=Math.sqrt(z*z+G*G),V=0;V<4;V++){var k=0===V||3===V,W=3*(k?D:U);R[V][0]=C.points[W],R[V][v]=V>1?n:0,R[V][y]=C.points[W+2],h.set(i+V,R[V]),l?(F[0]=(C.points[W]*x[0]-T[0])/w,F[1]=(C.points[W+2]*x[y]-T[y])/w):(F[0]=(k?B:B+H)/w,F[1]=(R[V][v]*x[v]-T[v])/w),d.set(i+V,F)}p.sub(P,R[1],R[0]),p.sub(I,R[3],R[0]),p.cross(O,P,I),p.normalize(O,O);for(var V=0;V<4;V++)c.set(i+V,O),g&&f.set(i+V,o);for(var V=0;V<6;V++)_[3*a+V]=N[V]+i;i+=4,a+=2,B+=H}}return t.dirty(),{vertexOffset:i,triangleOffset:a}},_getRegionLinesInfo:function(e,t,r){var n=0,i=0;t.getRegionModel(e).getModel("itemStyle").get("borderWidth")>0&&t.getRegionPolygonCoords(e).forEach(function(e){var t=e.exterior,a=e.interiors;n+=r.getPolylineVertexCount(t),i+=r.getPolylineTriangleCount(t);for(var o=0;o<a.length;o++)n+=r.getPolylineVertexCount(a[o]),i+=r.getPolylineTriangleCount(a[o])},this);return{vertexCount:n,triangleCount:i}},_updateLinesGeometry:function(e,t,r,n,i,a){function o(e){for(var t=new Float64Array(3*e.length),r=0,i=[],o=0;o<e.length;o++)i[0]=e[o][0],i[1]=n+.1,i[2]=e[o][1],a&&p.transformMat4(i,i,a),t[r++]=i[0],t[r++]=i[1],t[r++]=i[2];return t}var s=[1,1,1,1];t.getRegionPolygonCoords(r).forEach(function(t){var r=t.exterior,n=t.interiors;e.addPolyline(o(r),s,i);for(var a=0;a<n.length;a++)e.addPolyline(o(n[a]),s,i)})},highlight:function(e){var t=this._data;if(t){var r=t.getItemModel(e),n=r.getModel("emphasis.itemStyle"),i=n.get("color"),s=l.a.firstNotNull(n.get("opacity"),t.getItemVisual(e,"opacity"),1);if(null==i){var u=t.getItemVisual(e,"color");i=a.a.color.lift(u,-.4)}null==s&&(s=t.getItemVisual(e,"opacity"));var h=o.a.parseColor(i);h[3]*=s,this._setColorOfDataIndex(t,e,h)}},downplay:function(e){var t=this._data;if(t){var r=t.getItemVisual(e,"color"),n=l.a.firstNotNull(t.getItemVisual(e,"opacity"),1),i=o.a.parseColor(r);i[3]*=n,this._setColorOfDataIndex(t,e,i)}},_setColorOfDataIndex:function(e,t,r){if(!(t<this._startIndex&&t>this._endIndex)){t-=this._startIndex;for(var n=this._vertexRangeOfDataIndex[2*t];n<this._vertexRangeOfDataIndex[2*t+1];n++)this._polygonMesh.geometry.attributes.color.set(n,r);this._polygonMesh.geometry.dirty(),this._api.getZr().refresh()}}},t.a=n},function(e,t,r){"use strict";var n=r(97),i=r(6),a=i.a.vec3,o=a.create(),s=a.create(),u=a.create();t.a={needsSortTriangles:function(){return this.indices&&this.sortTriangles},needsSortTrianglesProgressively:function(){return this.needsSortTriangles()&&this.triangleCount>=2e4},doSortTriangles:function(e,t){var r=this.indices;if(0===t){var n=this.attributes.position,e=e.array;this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new r.constructor(r.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var i,l=0,h=0;h<r.length;){n.get(r[h++],o),n.get(r[h++],s),n.get(r[h++],u);var c=a.sqrDist(o,e),d=a.sqrDist(s,e),f=a.sqrDist(u,e),p=Math.min(c,d);p=Math.min(p,f),3===h?(i=p,p=0):p-=i,this._triangleZList[l++]=p}}for(var m=this._sortedTriangleIndices,h=0;h<m.length;h++)m[h]=h;if(this.triangleCount<2e4)0===t&&this._simpleSort(!0);else for(var h=0;h<3;h++)this._progressiveQuickSort(3*t+h);for(var g=this._indicesTmp,_=this._triangleZListTmp,v=this._triangleZList,h=0;h<this.triangleCount;h++){var y=3*m[h],x=3*h;g[x++]=r[y++],g[x++]=r[y++],g[x]=r[y],_[h]=v[m[h]]}var T=this._indicesTmp;this._indicesTmp=this.indices,this.indices=T;var T=this._triangleZListTmp;this._triangleZListTmp=this._triangleZList,this._triangleZList=T,this.dirtyIndices()},_simpleSort:function(e){function t(e,t){return r[t]-r[e]}var r=this._triangleZList,i=this._sortedTriangleIndices;e?Array.prototype.sort.call(i,t):n.a.sort(i,t,0,i.length-1)},_progressiveQuickSort:function(e){var t=this._triangleZList,r=this._sortedTriangleIndices;this._quickSort=this._quickSort||new n.a,this._quickSort.step(r,function(e,r){return t[r]-t[e]},e)}}},function(e,t,r){"use strict";function n(e,t,r){this._labelsMesh=new s.a,this._labelTextureSurface=new o.a({width:512,height:512,devicePixelRatio:r.getDevicePixelRatio(),onupdate:function(){r.getZr().refresh()}}),this._api=r,this._labelsMesh.material.set("textureAtlas",this._labelTextureSurface.getTexture())}var i=r(0),a=r.n(i),o=r(81),s=r(63),u=r(2);n.prototype.getLabelPosition=function(e,t,r){return[0,0,0]},n.prototype.getLabelDistance=function(e,t,r){return 0},n.prototype.getMesh=function(){return this._labelsMesh},n.prototype.updateData=function(e,t,r){null==t&&(t=0),null==r&&(r=e.count()),this._labelsVisibilitiesBits&&this._labelsVisibilitiesBits.length===r-t||(this._labelsVisibilitiesBits=new Uint8Array(r-t));for(var n=["label","show"],i=["emphasis","label","show"],a=t;a<r;a++){var o=e.getItemModel(a),s=o.get(n),u=o.get(i);null==u&&(u=s);var l=(s?1:0)|(u?2:0);this._labelsVisibilitiesBits[a-t]=l}this._start=t,this._end=r,this._data=e},n.prototype.updateLabels=function(e){if(this._data){e=e||[];for(var t=e.length>0,r={},n=0;n<e.length;n++)r[e[n]]=!0;this._labelsMesh.geometry.convertToDynamicArray(!0),this._labelTextureSurface.clear();for(var i=["label"],o=["emphasis","label"],s=this._data.hostModel,l=this._data,h=s.getModel(i),c=s.getModel(o,h),d={left:"right",right:"left",top:"center",bottom:"center"},f={left:"middle",right:"middle",top:"bottom",bottom:"top"},p=this._start;p<this._end;p++){var m=!1;t&&r[p]&&(m=!0);if(this._labelsVisibilitiesBits[p-this._start]&(m?2:1)){var g=l.getItemModel(p),_=g.getModel(m?o:i,m?c:h),v=_.get("distance")||0,y=_.get("position"),x=_.getModel("textStyle"),T=this._api.getDevicePixelRatio(),b=s.getFormattedLabel(p,m?"emphasis":"normal");if(null==b||""===b)return;var w=new a.a.graphic.Text;a.a.graphic.setTextStyle(w.style,x,{text:b,textFill:x.get("color")||l.getItemVisual(p,"color")||"#000",textAlign:"left",textVerticalAlign:"top",opacity:u.a.firstNotNull(x.get("opacity"),l.getItemVisual(p,"opacity"),1)});var E=w.getBoundingRect();E.height*=1.2;var S=this._labelTextureSurface.add(w),A=d[y]||"center",M=f[y]||"bottom";this._labelsMesh.geometry.addSprite(this.getLabelPosition(p,y,v),[E.width*T,E.height*T],S,A,M,this.getLabelDistance(p,y,v)*T)}}this._labelsMesh.material.set("uvScale",this._labelTextureSurface.getCoordsScale()),this._labelTextureSurface.getZr().refreshImmediately(),this._labelsMesh.geometry.convertToTypedArray(),this._labelsMesh.geometry.dirty()}},t.a=n},function(e,t,r){"use strict";function n(e,t){return e&&t&&e[0]===t[0]&&e[1]===t[1]}function i(e,t){this.rootNode=new s.a.Node,this.is2D=e,this._labelsBuilder=new h.a(256,256,t),this._labelsBuilder.getMesh().renderOrder=100,this.rootNode.add(this._labelsBuilder.getMesh()),this._api=t,this._spriteImageCanvas=document.createElement("canvas"),this._startDataIndex=0,this._endDataIndex=0,this._sizeScale=1}var a=r(0),o=r.n(a),s=r(1),u=r(239),l=r(240),h=r(66),c=r(9),d=r(2);i.prototype={constructor:i,highlightOnMouseover:!0,update:function(e,t,r,n,i){var a=this._prevMesh;this._prevMesh=this._mesh,this._mesh=a;var o=e.getData();if(null==n&&(n=0),null==i&&(i=o.count()),this._startDataIndex=n,this._endDataIndex=i-1,!this._mesh){var u=this._prevMesh&&this._prevMesh.material;this._mesh=new l.a({renderOrder:10,frustumCulling:!1}),u&&(this._mesh.material=u)}var u=this._mesh.material,h=this._mesh.geometry,c=h.attributes;this.rootNode.remove(this._prevMesh),this.rootNode.add(this._mesh),this._setPositionTextureToMesh(this._mesh,this._positionTexture);var d=this._getSymbolInfo(e,n,i),f=r.getDevicePixelRatio(),p=e.getModel("itemStyle").getItemStyle(),m=e.get("large"),g=1;d.maxSize>2?(g=this._updateSymbolSprite(e,p,d,f),u.enableTexture("sprite")):u.disableTexture("sprite"),c.position.init(i-n);var _=[];if(m){u.undefine("VERTEX_SIZE"),u.undefine("VERTEX_COLOR");var v=o.getVisual("color"),y=o.getVisual("opacity");s.a.parseColor(v,_),_[3]*=y,u.set({color:_,u_Size:d.maxSize*this._sizeScale})}else u.set({color:[1,1,1,1]}),u.define("VERTEX_SIZE"),u.define("VERTEX_COLOR"),c.size.init(i-n),c.color.init(i-n),this._originalOpacity=new Float32Array(i-n);for(var x=o.getLayout("points"),T=c.position.value,b=0;b<i-n;b++){var w=3*b,E=2*b;if(this.is2D?(T[w]=x[E],T[w+1]=x[E+1],T[w+2]=-10):(T[w]=x[w],T[w+1]=x[w+1],T[w+2]=x[w+2]),!m){var v=o.getItemVisual(b,"color"),y=o.getItemVisual(b,"opacity");s.a.parseColor(v,_),_[3]*=y,c.color.set(b,_),_[3]<.99&&!0;var S=o.getItemVisual(b,"symbolSize");S=S instanceof Array?Math.max(S[0],S[1]):S,isNaN(S)&&(S=0),c.size.value[b]=S*g*this._sizeScale,this._originalOpacity[b]=_[3]}}this._mesh.sizeScale=g,h.updateBoundingBox(),h.dirty(),this._updateMaterial(e,p);var A=e.coordinateSystem;if(A&&A.viewGL){u[A.viewGL.isLinearSpace()?"define":"undefine"]("fragment","SRGB_DECODE")}m||this._updateLabelBuilder(e,n,i),this._updateHandler(e,t,r),this._updateAnimation(e),this._api=r},getPointsMesh:function(){return this._mesh},updateLabels:function(e){this._labelsBuilder.updateLabels(e)},hideLabels:function(){this.rootNode.remove(this._labelsBuilder.getMesh())},showLabels:function(){this.rootNode.add(this._labelsBuilder.getMesh())},_updateSymbolSprite:function(e,t,r,i){r.maxSize=Math.min(2*r.maxSize,200);var a=[];return r.aspect>1?(a[0]=r.maxSize,a[1]=r.maxSize/r.aspect):(a[1]=r.maxSize,a[0]=r.maxSize*r.aspect),a[0]=a[0]||1,a[1]=a[1]||1,this._symbolType===r.type&&n(this._symbolSize,a)&&this._lineWidth===t.lineWidth||(u.a.createSymbolSprite(r.type,a,{fill:"#fff",lineWidth:t.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(a[0]/2,10)},this._spriteImageCanvas),u.a.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=r.type,this._symbolSize=a,this._lineWidth=t.lineWidth),this._spriteImageCanvas.width/r.maxSize*i},_updateMaterial:function(e,t){var r="lighter"===e.get("blendMode")?s.a.additiveBlend:null,n=this._mesh.material;n.blend=r,n.set("lineWidth",t.lineWidth/20);var i=s.a.parseColor(t.stroke);n.set("strokeColor",i),n.transparent=!0,n.depthMask=!1,n.depthTest=!this.is2D,n.sortVertices=!this.is2D},_updateLabelBuilder:function(e,t,r){var n=e.getData(),i=this._mesh.geometry,a=i.attributes.position.value,t=this._startDataIndex,o=this._mesh.sizeScale;this._labelsBuilder.updateData(n,t,r),this._labelsBuilder.getLabelPosition=function(e,r,n){var i=3*(e-t);return[a[i],a[i+1],a[i+2]]},this._labelsBuilder.getLabelDistance=function(e,r,n){return i.attributes.size.get(e-t)/o/2+n},this._labelsBuilder.updateLabels()},_updateAnimation:function(e){s.a.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,e)},_updateHandler:function(e,t,r){var n,i=e.getData(),a=this._mesh,o=this,s=-1,u=e.coordinateSystem&&"cartesian3D"===e.coordinateSystem.type;u&&(n=e.coordinateSystem.model),a.seriesIndex=e.seriesIndex,a.off("mousemove"),a.off("mouseout"),a.on("mousemove",function(t){var l=t.vertexIndex+o._startDataIndex;l!==s&&(this.highlightOnMouseover&&(this.downplay(i,s),this.highlight(i,l),this._labelsBuilder.updateLabels([l])),u&&r.dispatchAction({type:"grid3DShowAxisPointer",value:[i.get(e.coordDimToDataDim("x")[0],l),i.get(e.coordDimToDataDim("y")[0],l),i.get(e.coordDimToDataDim("z")[0],l)],grid3DIndex:n.componentIndex})),a.dataIndex=l,s=l},this),a.on("mouseout",function(e){var t=e.vertexIndex+o._startDataIndex;this.highlightOnMouseover&&(this.downplay(i,t),this._labelsBuilder.updateLabels()),s=-1,a.dataIndex=-1,u&&r.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:n.componentIndex})},this)},updateLayout:function(e,t,r){var n=e.getData();if(this._mesh){var i=this._mesh.geometry.attributes.position.value,a=n.getLayout("points");if(this.is2D)for(var o=0;o<a.length/2;o++){var s=3*o,u=2*o;i[s]=a[u],i[s+1]=a[u+1],i[s+2]=-10}else for(var o=0;o<a.length;o++)i[o]=a[o];this._mesh.geometry.dirty(),r.getZr().refresh()}},updateView:function(e){if(this._mesh){var t=new c.a;c.a.mul(t,e.viewMatrix,this._mesh.worldTransform),c.a.mul(t,e.projectionMatrix,t),this._mesh.updateNDCPosition(t,this.is2D,this._api)}},highlight:function(e,t){if(!(t>this._endDataIndex||t<this._startDataIndex)){var r=e.getItemModel(t),n=r.getModel("emphasis.itemStyle"),i=n.get("color"),a=n.get("opacity");if(null==i){var u=e.getItemVisual(t,"color");i=o.a.color.lift(u,-.4)}null==a&&(a=e.getItemVisual(t,"opacity"));var l=s.a.parseColor(i);l[3]*=a,this._mesh.geometry.attributes.color.set(t-this._startDataIndex,l),this._mesh.geometry.dirtyAttribute("color"),this._api.getZr().refresh()}},downplay:function(e,t){if(!(t>this._endDataIndex||t<this._startDataIndex)){var r=e.getItemVisual(t,"color"),n=e.getItemVisual(t,"opacity"),i=s.a.parseColor(r);i[3]*=n,this._mesh.geometry.attributes.color.set(t-this._startDataIndex,i),this._mesh.geometry.dirtyAttribute("color"),this._api.getZr().refresh()}},fadeOutAll:function(e){if(this._originalOpacity){for(var t=this._mesh.geometry,r=0;r<t.vertexCount;r++){var n=this._originalOpacity[r]*e;t.attributes.color.value[4*r+3]=n}t.dirtyAttribute("color"),this._api.getZr().refresh()}},fadeInAll:function(){this.fadeOutAll(1)},setPositionTexture:function(e){this._mesh&&this._setPositionTextureToMesh(this._mesh,e),this._positionTexture=e},removePositionTexture:function(){this._positionTexture=null,this._mesh&&this._setPositionTextureToMesh(this._mesh,null)},setSizeScale:function(e){if(e!==this._sizeScale){if(this._mesh){var t=this._mesh.material.get("u_Size");this._mesh.material.set("u_Size",t/this._sizeScale*e);var r=this._mesh.geometry.attributes;if(r.size.value)for(var n=0;n<r.size.value.length;n++)r.size.value[n]=r.size.value[n]/this._sizeScale*e}this._sizeScale=e}},_setPositionTextureToMesh:function(e,t){t&&e.material.set("positionTexture",t),e.material[t?"enableTexture":"disableTexture"]("positionTexture")},_getSymbolInfo:function(e,t,r){if(e.get("large")){var n,i,a=d.a.firstNotNull(e.get("symbolSize"),1);return a instanceof Array?(n=Math.max(a[0],a[1]),i=a[0]/a[1]):(n=a,i=1),{maxSize:a,type:e.get("symbol"),aspect:i}}for(var i,o=e.getData(),s=o.getItemVisual(0,"symbol")||"circle",n=0,u=t;u<r;u++){var l,a=o.getItemVisual(u,"symbolSize"),h=o.getItemVisual(u,"symbol");if(a instanceof Array)l=a[0]/a[1],n=Math.max(Math.max(a[0],a[1]),n);else{if(isNaN(a))return;l=1,n=Math.max(a,n)}s=h,i=l}return{maxSize:n,type:s,aspect:i}}},t.a=i},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=r(114),i=function(e){this._list=new n.a,this._map={},this._maxSize=e||10};i.prototype.setMaxSize=function(e){this._maxSize=e},i.prototype.put=function(e,t){if(!this._map.hasOwnProperty(e)){var r=this._list.length();if(r>=this._maxSize&&r>0){var n=this._list.head;this._list.remove(n),delete this._map[n.key]}var i=this._list.insert(t);i.key=e,this._map[e]=i}},i.prototype.get=function(e){var t=this._map[e];if(this._map.hasOwnProperty(e))return t!==this._list.tail&&(this._list.remove(t),this._list.insertEntry(t)),t.value},i.prototype.remove=function(e){var t=this._map[e];void 0!==t&&(delete this._map[e],this._list.remove(t))},i.prototype.clear=function(){this._list.clear(),this._map={}},t.a=i},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(2);return e[0]=0,e[1]=0,e},i.clone=function(e){var t=new n.a(2);return t[0]=e[0],t[1]=e[1],t},i.fromValues=function(e,t){var r=new n.a(2);return r[0]=e,r[1]=t,r},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},i.set=function(e,t,r){return e[0]=t,e[1]=r,e},i.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e},i.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e},i.sub=i.subtract,i.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e},i.mul=i.multiply,i.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e},i.div=i.divide,i.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e},i.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e},i.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},i.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e},i.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)},i.dist=i.distance,i.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n},i.sqrDist=i.squaredDistance,i.length=function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)},i.len=i.length,i.squaredLength=function(e){var t=e[0],r=e[1];return t*t+r*r},i.sqrLen=i.squaredLength,i.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},i.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},i.normalize=function(e,t){var r=t[0],n=t[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e},i.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},i.cross=function(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e},i.lerp=function(e,t,r,n){var i=t[0],a=t[1];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e},i.random=function(e,t){t=t||1;var r=2*GLMAT_RANDOM()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e},i.transformMat2=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e},i.transformMat2d=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},i.transformMat3=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[3]*i+r[6],e[1]=r[1]*n+r[4]*i+r[7],e},i.transformMat4=function(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[4]*i+r[12],e[1]=r[1]*n+r[5]*i+r[13],e},i.forEach=function(){var e=i.create();return function(t,r,n,i,a,o){var s,u;for(r||(r=2),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}}(),t.a=i},function(e,t,r){"use strict";t.a="@export clay.prez.vertex\nuniform mat4 WVP : WORLDVIEWPROJECTION;\nattribute vec3 pos : POSITION;\nattribute vec2 uv : TEXCOORD_0;\n@import clay.chunk.skinning_header\nvarying vec2 v_Texcoord;\nvoid main()\n{\n vec3 P = pos;\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n P = (skinMatrixWS * vec4(pos, 1.0)).xyz;\n#endif\n gl_Position = WVP * vec4(P, 1.0);\n v_Texcoord = uv;\n}\n@end\n@export clay.prez.fragment\nuniform sampler2D alphaMap;\nuniform float alphaCutoff: 0.0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n if (alphaCutoff > 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n}\n@end"},function(e,t,r){"use strict";var n=r(35),i=r(11),a=n.a.extend({material:null,geometry:null,mode:i.a.TRIANGLES,_renderInfo:null},{__program:null,lightGroup:0,renderOrder:0,culling:!0,cullFace:i.a.BACK,frontFace:i.a.CCW,frustumCulling:!0,receiveShadow:!0,castShadow:!0,ignorePicking:!1,ignorePreZ:!1,ignoreGBuffer:!1,isRenderable:function(){return this.geometry&&this.material&&this.material.shader&&!this.invisible&&this.geometry.vertexCount>0},beforeRender:function(e){},afterRender:function(e,t){},getBoundingBox:function(e,t){return t=n.a.prototype.getBoundingBox.call(this,e,t),this.geometry&&this.geometry.boundingBox&&t.union(this.geometry.boundingBox),t},clone:function(){var e=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"];return function(){var t=n.a.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var r=0;r<e.length;r++){var i=e[r];t[i]!==this[i]&&(t[i]=this[i])}return t}}()});a.POINTS=i.a.POINTS,a.LINES=i.a.LINES,a.LINE_LOOP=i.a.LINE_LOOP,a.LINE_STRIP=i.a.LINE_STRIP,a.TRIANGLES=i.a.TRIANGLES,a.TRIANGLE_STRIP=i.a.TRIANGLE_STRIP,a.TRIANGLE_FAN=i.a.TRIANGLE_FAN,a.BACK=i.a.BACK,a.FRONT=i.a.FRONT,a.FRONT_AND_BACK=i.a.FRONT_AND_BACK,a.CW=i.a.CW,a.CCW=i.a.CCW,t.a=a},function(e,t,r){"use strict";var n={};n.isPowerOfTwo=function(e){return 0==(e&e-1)},n.nextPowerOfTwo=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},n.nearestPowerOfTwo=function(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))},t.a=n},function(e,t,r){"use strict";var n=r(3),i=r(21),a=r(12),o=r(33),s=function(e,t){this.normal=e||new n.a(0,1,0),this.distance=t||0};s.prototype={constructor:s,distanceToPoint:function(e){return a.a.dot(e.array,this.normal.array)-this.distance},projectPoint:function(e,t){t||(t=new n.a);var r=this.distanceToPoint(e);return a.a.scaleAndAdd(t.array,e.array,this.normal.array,-r),t._dirty=!0,t},normalize:function(){var e=1/a.a.len(this.normal.array);a.a.scale(this.normal.array,e),this.distance*=e},intersectFrustum:function(e){for(var t=e.vertices,r=this.normal.array,n=a.a.dot(t[0].array,r)>this.distance,i=1;i<8;i++)if(a.a.dot(t[i].array,r)>this.distance!=n)return!0},intersectLine:function(){var e=a.a.create();return function(t,r,i){var o=this.distanceToPoint(t),s=this.distanceToPoint(r);if(o>0&&s>0||o<0&&s<0)return null;var u=this.normal.array,l=this.distance,h=t.array;a.a.sub(e,r.array,t.array),a.a.normalize(e,e);var c=a.a.dot(u,e);if(0===c)return null;i||(i=new n.a);var d=(a.a.dot(u,h)-l)/c;return a.a.scaleAndAdd(i.array,h,e,-d),i._dirty=!0,i}}(),applyTransform:function(){var e=i.a.create(),t=o.a.create(),r=o.a.create();return r[3]=1,function(n){n=n.array,a.a.scale(r,this.normal.array,this.distance),o.a.transformMat4(r,r,n),this.distance=a.a.dot(r,this.normal.array),i.a.invert(e,n),i.a.transpose(e,e),t[3]=0,a.a.copy(t,this.normal.array),o.a.transformMat4(t,t,e),a.a.copy(this.normal.array,t)}}(),copy:function(e){a.a.copy(this.normal.array,e.normal.array),this.normal._dirty=!0,this.distance=e.distance},clone:function(){var e=new s;return e.copy(this),e}},t.a=s},function(e,t,r){"use strict";var n=r(42);t.a=n.a},function(e,t,r){"use strict";function n(e,t,r){h.identity();var n=new a.a({widthSegments:t,heightSegments:r});switch(e){case"px":o.a.translate(h,h,s.a.POSITIVE_X),o.a.rotateY(h,h,Math.PI/2);break;case"nx":o.a.translate(h,h,s.a.NEGATIVE_X),o.a.rotateY(h,h,-Math.PI/2);break;case"py":o.a.translate(h,h,s.a.POSITIVE_Y),o.a.rotateX(h,h,-Math.PI/2);break;case"ny":o.a.translate(h,h,s.a.NEGATIVE_Y),o.a.rotateX(h,h,Math.PI/2);break;case"pz":o.a.translate(h,h,s.a.POSITIVE_Z);break;case"nz":o.a.translate(h,h,s.a.NEGATIVE_Z),o.a.rotateY(h,h,Math.PI)}return n.applyTransform(h),n}var i=r(15),a=r(43),o=r(9),s=r(3),u=r(18),l=r(14),h=new o.a,c=i.a.extend({dynamic:!1,widthSegments:1,heightSegments:1,depthSegments:1,inside:!1},function(){this.build()},{build:function(){var e={px:n("px",this.depthSegments,this.heightSegments),nx:n("nx",this.depthSegments,this.heightSegments),py:n("py",this.widthSegments,this.depthSegments),ny:n("ny",this.widthSegments,this.depthSegments),pz:n("pz",this.widthSegments,this.heightSegments),nz:n("nz",this.widthSegments,this.heightSegments)},t=["position","texcoord0","normal"],r=0,i=0;for(var a in e)r+=e[a].vertexCount,i+=e[a].indices.length;for(var o=0;o<t.length;o++)this.attributes[t[o]].init(r);this.indices=new l.a.Uint16Array(i);var s=0,h=0;for(var a in e){for(var c=e[a],o=0;o<t.length;o++)for(var d=t[o],f=c.attributes[d].value,p=c.attributes[d].size,m="normal"===d,g=0;g<f.length;g++){var _=f[g];this.inside&&m&&(_=-_),this.attributes[d].value[g+p*h]=_}for(var v=c.indices.length,g=0;g<c.indices.length;g++)this.indices[g+s]=h+c.indices[this.inside?v-g-1:g];s+=c.indices.length,h+=c.vertexCount}this.boundingBox=new u.a,this.boundingBox.max.set(1,1,1),this.boundingBox.min.set(-1,-1,-1)}});t.a=c},function(e,t,r){"use strict";var n=r(5),i=r(27),a=r(4),o=r(10),s=r(16),u=r(19),l=r(8),h=r(42),c=r(36),d=r(62),f=r(14),p=r(61),m=r(127),g=r(128),_={},v=["px","nx","py","ny","pz","nz"];_.prefilterEnvironmentMap=function(e,t,r,s,m){m&&s||(s=_.generateNormalDistribution(),m=_.integrateBRDF(e,s)),r=r||{};var y=r.width||64,x=r.height||64,T=r.type||t.type,b=new i.a({width:y,height:x,type:T,flipY:!1,mipmaps:[]});b.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var w=Math.min(y,x),E=Math.log(w)/Math.log(2)+1,S=new u.a({shader:new l.a({vertex:l.a.source("clay.skybox.vertex"),fragment:g.a})});S.set("normalDistribution",s),r.encodeRGBM&&S.define("fragment","RGBM_ENCODE"),r.decodeRGBM&&S.define("fragment","RGBM_DECODE");var A,M=new c.a;if("texture2D"===t.textureType){var C=new i.a({width:y,height:x,type:T===a.a.FLOAT?a.a.HALF_FLOAT:T});p.a.panoramaToCubeMap(e,t,C,{encodeRGBM:r.decodeRGBM}),t=C}A=new h.a({scene:M,material:S}),A.material.set("environmentMap",t);var L=new d.a({texture:b});r.encodeRGBM&&(T=b.type=a.a.UNSIGNED_BYTE);for(var D=new n.a({width:y,height:x,type:T}),N=new o.a({depthBuffer:!1}),R=f.a[T===a.a.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],P=0;P<E;P++){b.mipmaps[P]={pixels:{}},A.material.set("roughness",P/(E-1));for(var I=D.width,O=2*Math.atan(I/(I-.5))/Math.PI*180,F=0;F<v.length;F++){var B=new R(D.width*D.height*4);N.attach(D),N.bind(e);var U=L.getCamera(v[F]);U.fov=O,e.render(M,U),e.gl.readPixels(0,0,D.width,D.height,a.a.RGBA,T,B),N.unbind(e),b.mipmaps[P].pixels[v[F]]=B}D.width/=2,D.height/=2,D.dirty()}return N.dispose(e),D.dispose(e),A.dispose(e),s.dispose(e),{environmentMap:b,brdfLookup:m,normalDistribution:s,maxMipmapLevel:E}},_.integrateBRDF=function(e,t){t=t||_.generateNormalDistribution();var r=new o.a({depthBuffer:!1}),i=new s.a({fragment:m.a}),u=new n.a({width:512,height:256,type:a.a.HALF_FLOAT,wrapS:a.a.CLAMP_TO_EDGE,wrapT:a.a.CLAMP_TO_EDGE,minFilter:a.a.NEAREST,magFilter:a.a.NEAREST,useMipmap:!1});return i.setUniform("normalDistribution",t),i.setUniform("viewportSize",[512,256]),i.attachOutput(u),i.render(e,r),r.dispose(e),u},_.generateNormalDistribution=function(e,t){for(var e=e||256,t=t||1024,r=new n.a({width:e,height:t,type:a.a.FLOAT,minFilter:a.a.NEAREST,magFilter:a.a.NEAREST,wrapS:a.a.CLAMP_TO_EDGE,wrapT:a.a.CLAMP_TO_EDGE,useMipmap:!1}),i=new Float32Array(t*e*4),o=[],s=0;s<e;s++){for(var u=s/e,l=u*u,h=0;h<t;h++){var c=(h<<16|h>>>16)>>>0;c=((1431655765&c)<<1|(2863311530&c)>>>1)>>>0,c=((858993459&c)<<2|(3435973836&c)>>>2)>>>0,c=((252645135&c)<<4|(4042322160&c)>>>4)>>>0,c=(((16711935&c)<<8|(4278255360&c)>>>8)>>>0)/4294967296;var d=Math.sqrt((1-c)/(1+(l*l-1)*c));o[h]=d}for(var h=0;h<t;h++){var f=4*(h*e+s),d=o[h],p=Math.sqrt(1-d*d),m=h/t,g=2*Math.PI*m;i[f]=p*Math.cos(g),i[f+1]=d,i[f+2]=p*Math.sin(g),i[f+3]=1}}return r.pixels=i,r},t.a=_},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(4);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},i.clone=function(e){var t=new n.a(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},i.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},i.transpose=function(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e},i.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*a-i*n;return o?(o=1/o,e[0]=a*o,e[1]=-n*o,e[2]=-i*o,e[3]=r*o,e):null},i.adjoint=function(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e},i.determinant=function(e){return e[0]*e[3]-e[2]*e[1]},i.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],l=r[2],h=r[3];return e[0]=n*s+a*u,e[1]=i*s+o*u,e[2]=n*l+a*h,e[3]=i*l+o*h,e},i.mul=i.multiply,i.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=i*u+o*s,e[2]=n*-s+a*u,e[3]=i*-s+o*u,e},i.scale=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1];return e[0]=n*s,e[1]=i*s,e[2]=a*u,e[3]=o*u,e},i.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2))},i.LDU=function(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]},t.a=i},function(e,t,r){"use strict";var n=r(20),i={};i.create=function(){var e=new n.a(6);return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},i.clone=function(e){var t=new n.a(6);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},i.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},i.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},i.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=r*a-n*i;return u?(u=1/u,e[0]=a*u,e[1]=-n*u,e[2]=-i*u,e[3]=r*u,e[4]=(i*s-a*o)*u,e[5]=(n*o-r*s)*u,e):null},i.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},i.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=r[0],h=r[1],c=r[2],d=r[3],f=r[4],p=r[5];return e[0]=n*l+a*h,e[1]=i*l+o*h,e[2]=n*c+a*d,e[3]=i*c+o*d,e[4]=n*f+a*p+s,e[5]=i*f+o*p+u,e},i.mul=i.multiply,i.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=Math.sin(r),h=Math.cos(r);return e[0]=n*h+a*l,e[1]=i*h+o*l,e[2]=n*-l+a*h,e[3]=i*-l+o*h,e[4]=s,e[5]=u,e},i.scale=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=r[0],h=r[1];return e[0]=n*l,e[1]=i*l,e[2]=a*h,e[3]=o*h,e[4]=s,e[5]=u,e},i.translate=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=r[0],h=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=n*l+a*h+s,e[5]=i*l+o*h+u,e},i.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+1)},t.a=i},function(e,t){var r="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)};e.exports=r},function(e,t,r){"use strict";function n(e,t,r,n,i,a,o){this._zr=e,this._x=0,this._y=0,this._rowHeight=0,this.width=n,this.height=i,this.offsetX=t,this.offsetY=r,this.dpr=o,this.gap=a}function i(e){e=e||{},e.width=e.width||512,e.height=e.height||512,e.devicePixelRatio=e.devicePixelRatio||1,e.gap=null==e.gap?2:e.gap;var t=document.createElement("canvas");t.width=e.width*e.devicePixelRatio,t.height=e.height*e.devicePixelRatio,this._canvas=t,this._texture=new s.a({image:t,flipY:!1});var r=this;this._zr=o.a.zrender.init(t);var i=this._zr.refreshImmediately;this._zr.refreshImmediately=function(){i.call(this),r._texture.dirty(),r.onupdate&&r.onupdate()},this._dpr=e.devicePixelRatio,this._coords={},this.onupdate=e.onupdate,this._gap=e.gap,this._textureAtlasNodes=[new n(this._zr,0,0,e.width,e.height,this._gap,this._dpr)],this._nodeWidth=e.width,this._nodeHeight=e.height,this._currentNodeIdx=0}var a=r(0),o=r.n(a),s=r(5);n.prototype={constructor:n,clear:function(){this._x=0,this._y=0,this._rowHeight=0},add:function(e,t,r){var n=e.getBoundingRect();null==t&&(t=n.width),null==r&&(r=n.height),t*=this.dpr,r*=this.dpr,this._fitElement(e,t,r);var i=this._x,a=this._y,o=this.width*this.dpr,s=this.height*this.dpr,u=this.gap;if(i+t+u>o&&(i=this._x=0,a+=this._rowHeight+u,this._y=a,this._rowHeight=0),this._x+=t+u,this._rowHeight=Math.max(this._rowHeight,r),a+r+u>s)return null;e.position[0]+=this.offsetX*this.dpr+i,e.position[1]+=this.offsetY*this.dpr+a,this._zr.add(e);var l=[this.offsetX/this.width,this.offsetY/this.height];return[[i/o+l[0],a/s+l[1]],[(i+t)/o+l[0],(a+r)/s+l[1]]]},_fitElement:function(e,t,r){var n=e.getBoundingRect(),i=t/n.width,a=r/n.height;e.position=[-n.x*i,-n.y*a],e.scale=[i,a],e.update()}},i.prototype={clear:function(){for(var e=0;e<this._textureAtlasNodes.length;e++)this._textureAtlasNodes[e].clear();this._currentNodeIdx=0,this._zr.clear(),this._coords={}},getWidth:function(){return this._width},getHeight:function(){return this._height},getTexture:function(){return this._texture},getDevicePixelRatio:function(){return this._dpr},getZr:function(){return this._zr},_getCurrentNode:function(){return this._textureAtlasNodes[this._currentNodeIdx]},_expand:function(){if(this._currentNodeIdx++,this._textureAtlasNodes[this._currentNodeIdx])return this._textureAtlasNodes[this._currentNodeIdx];var e=4096/this._dpr,t=this._textureAtlasNodes,r=t.length,i=r*this._nodeWidth%e,a=Math.floor(r*this._nodeWidth/e)*this._nodeHeight;if(!(a>=e)){var o=(i+this._nodeWidth)*this._dpr,s=(a+this._nodeHeight)*this._dpr;try{this._zr.resize({width:o,height:s})}catch(e){this._canvas.width=o,this._canvas.height=s}var u=new n(this._zr,i,a,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(u),u}},add:function(e,t,r){if(this._coords[e.id])return this._coords[e.id];var n=this._getCurrentNode().add(e,t,r);if(!n){var i=this._expand();if(!i)return;n=i.add(e,t,r)}return this._coords[e.id]=n,n},getCoordsScale:function(){var e=this._dpr;return[this._nodeWidth/this._canvas.width*e,this._nodeHeight/this._canvas.height*e]},getCoords:function(e){return this._coords[e]}},t.a=i},function(e,t,r){function n(e,t,r,n){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),this.x=e,this.y=t,this.width=r,this.height=n}var i=r(83),a=r(84),o=i.applyTransform,s=Math.min,u=Math.max;n.prototype={constructor:n,union:function(e){var t=s(e.x,this.x),r=s(e.y,this.y);this.width=u(e.x+e.width,this.x+this.width)-t,this.height=u(e.y+e.height,this.y+this.height)-r,this.x=t,this.y=r},applyTransform:function(){var e=[],t=[],r=[],n=[];return function(i){if(i){e[0]=r[0]=this.x,e[1]=n[1]=this.y,t[0]=n[0]=this.x+this.width,t[1]=r[1]=this.y+this.height,o(e,e,i),o(t,t,i),o(r,r,i),o(n,n,i),this.x=s(e[0],t[0],r[0],n[0]),this.y=s(e[1],t[1],r[1],n[1]);var a=u(e[0],t[0],r[0],n[0]),l=u(e[1],t[1],r[1],n[1]);this.width=a-this.x,this.height=l-this.y}}}(),calculateTransform:function(e){var t=this,r=e.width/t.width,n=e.height/t.height,i=a.create();return a.translate(i,i,[-t.x,-t.y]),a.scale(i,i,[r,n]),a.translate(i,i,[e.x,e.y]),i},intersect:function(e){if(!e)return!1;e instanceof n||(e=n.create(e));var t=this,r=t.x,i=t.x+t.width,a=t.y,o=t.y+t.height,s=e.x,u=e.x+e.width,l=e.y,h=e.y+e.height;return!(i<s||u<r||o<l||h<a)},contain:function(e,t){var r=this;return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height},clone:function(){return new n(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},n.create=function(e){return new n(e.x,e.y,e.width,e.height)};var l=n;e.exports=l},function(e,t){function r(e,t){var r=new w(2);return null==e&&(e=0),null==t&&(t=0),r[0]=e,r[1]=t,r}function n(e,t){return e[0]=t[0],e[1]=t[1],e}function i(e){var t=new w(2);return t[0]=e[0],t[1]=e[1],t}function a(e,t,r){return e[0]=t,e[1]=r,e}function o(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function s(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function l(e){return Math.sqrt(h(e))}function h(e){return e[0]*e[0]+e[1]*e[1]}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function d(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function f(e,t){return e[0]*t[0]+e[1]*t[1]}function p(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function m(e,t){var r=l(t);return 0===r?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function g(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function _(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}function v(e,t){return e[0]=-t[0],e[1]=-t[1],e}function y(e,t,r,n){return e[0]=t[0]+n*(r[0]-t[0]),e[1]=t[1]+n*(r[1]-t[1]),e}function x(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function T(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function b(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}var w="undefined"==typeof Float32Array?Array:Float32Array,E=l,S=h,A=g,M=_;t.create=r,t.copy=n,t.clone=i,t.set=a,t.add=o,t.scaleAndAdd=s,t.sub=u,t.len=l,t.length=E,t.lenSquare=h,t.lengthSquare=S,t.mul=c,t.div=d,t.dot=f,t.scale=p,t.normalize=m,t.distance=g,t.dist=A,t.distanceSquare=_,t.distSquare=M,t.negate=v,t.lerp=y,t.applyTransform=x,t.min=T,t.max=b},function(e,t){function r(){var e=new c(6);return n(e),e}function n(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function a(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],u=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e}function o(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function s(e,t,r){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],u=t[5],l=Math.sin(r),h=Math.cos(r);return e[0]=n*h+o*l,e[1]=-n*l+o*h,e[2]=i*h+s*l,e[3]=-i*l+h*s,e[4]=h*a+l*u,e[5]=h*u-l*a,e}function u(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function l(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],u=r*o-a*n;return u?(u=1/u,e[0]=o*u,e[1]=-a*u,e[2]=-n*u,e[3]=r*u,e[4]=(n*s-o*i)*u,e[5]=(a*i-r*s)*u,e):null}function h(e){var t=r();return i(t,e),t}var c="undefined"==typeof Float32Array?Array:Float32Array;t.create=r,t.identity=n,t.copy=i,t.mul=a,t.translate=o,t.rotate=s,t.scale=u,t.invert=l,t.clone=h},function(e,t,r){function n(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function i(e,t,r,n){var i=t[1]-t[0],a=r[1]-r[0];if(0===i)return 0===a?r[0]:(r[0]+r[1])/2;if(n)if(i>0){if(e<=t[0])return r[0];if(e>=t[1])return r[1]}else{if(e>=t[0])return r[0];if(e<=t[1])return r[1]}else{if(e===t[0])return r[0];if(e===t[1])return r[1]}return(e-t[0])/i*a+r[0]}function a(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?n(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function o(e,t,r){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),r?e:+e}function s(e){return e.sort(function(e,t){return e-t}),e}function u(e){if(e=+e,isNaN(e))return 0;for(var t=1,r=0;Math.round(e*t)/t!==e;)t*=10,r++;return r}function l(e){var t=e.toString(),r=t.indexOf("e");if(r>0){var n=+t.slice(r+1);return n<0?-n:0}var i=t.indexOf(".");return i<0?0:t.length-1-i}function h(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function c(e,t,r){if(!e[t])return 0;var n=x.reduce(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return 0;for(var i=Math.pow(10,r),a=x.map(e,function(e){return(isNaN(e)?0:e)/n*i*100}),o=100*i,s=x.map(a,function(e){return Math.floor(e)}),u=x.reduce(s,function(e,t){return e+t},0),l=x.map(a,function(e,t){return e-s[t]});u<o;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=l.length;d<f;++d)l[d]>h&&(h=l[d],c=d);++s[c],l[c]=0,++u}return s[t]/i}function d(e){var t=2*Math.PI;return(e%t+t)%t}function f(e){return e>-T&&e<T}function p(e){if(e instanceof Date)return e;if("string"==typeof e){var t=b.exec(e);if(!t)return new Date(NaN);if(t[8]){var r=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(r-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,r,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))}function m(e){return Math.pow(10,g(e))}function g(e){return Math.floor(Math.log(e)/Math.LN10)}function _(e,t){var r,n=g(e),i=Math.pow(10,n),a=e/i;return r=t?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,e=r*i,n>=-20?+e.toFixed(n<0?-n:0):e}function v(e){function t(e,r,n){return e.interval[n]<r.interval[n]||e.interval[n]===r.interval[n]&&(e.close[n]-r.close[n]==(n?-1:1)||!n&&t(e,r,1))}e.sort(function(e,r){return t(e,r,0)?-1:1});for(var r=-1/0,n=1,i=0;i<e.length;){for(var a=e[i].interval,o=e[i].close,s=0;s<2;s++)a[s]<=r&&(a[s]=r,o[s]=s?1:1-n),r=a[s],n=o[s];a[0]===a[1]&&o[0]*o[1]!=1?e.splice(i,1):i++}return e}function y(e){return e-parseFloat(e)>=0}var x=r(13),T=1e-4,b=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;t.linearMap=i,t.parsePercent=a,t.round=o,t.asc=s,t.getPrecision=u,t.getPrecisionSafe=l,t.getPixelPrecision=h,t.getPercentWithPrecision=c,t.MAX_SAFE_INTEGER=9007199254740991,t.remRadian=d,t.isRadianAroundZero=f,t.parseDate=p,t.quantity=m,t.nice=_,t.reformIntervals=v,t.isNumeric=y},function(e,t,r){"use strict";function n(e){u.a.defaultsWithPropList(e,h,c),i(e);for(var t="",r=0;r<c.length;r++){t+=e[c[r]].toString()}return t}function i(e){var t=a(e.width,e.height);e.format===s.a.DEPTH_COMPONENT&&(e.useMipmap=!1),t&&e.useMipmap||(e.minFilter==s.a.NEAREST_MIPMAP_NEAREST||e.minFilter==s.a.NEAREST_MIPMAP_LINEAR?e.minFilter=s.a.NEAREST:e.minFilter!=s.a.LINEAR_MIPMAP_LINEAR&&e.minFilter!=s.a.LINEAR_MIPMAP_NEAREST||(e.minFilter=s.a.LINEAR)),t||(e.wrapS=s.a.CLAMP_TO_EDGE,e.wrapT=s.a.CLAMP_TO_EDGE)}function a(e,t){return 0==(e&e-1)&&0==(t&t-1)}var o=r(5),s=r(11),u=r(23),l=function(){this._pool={},this._allocatedTextures=[]};l.prototype={constructor:l,get:function(e){var t=n(e);this._pool.hasOwnProperty(t)||(this._pool[t]=[]);var r=this._pool[t];if(!r.length){var i=new o.a(e);return this._allocatedTextures.push(i),i}return r.pop()},put:function(e){var t=n(e);this._pool.hasOwnProperty(t)||(this._pool[t]=[]),this._pool[t].push(e)},clear:function(e){for(var t=0;t<this._allocatedTextures.length;t++)this._allocatedTextures[t].dispose(e);this._pool={},this._allocatedTextures=[]}};var h={width:512,height:512,type:s.a.UNSIGNED_BYTE,format:s.a.RGBA,wrapS:s.a.CLAMP_TO_EDGE,wrapT:s.a.CLAMP_TO_EDGE,minFilter:s.a.LINEAR_MIPMAP_LINEAR,magFilter:s.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,unpackAlignment:4,premultiplyAlpha:!1},c=Object.keys(h);t.a=l},function(e,t,r){"use strict";t.a="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n"},function(e,t,r){"use strict";t.a="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n"},function(e,t,r){"use strict";t.a="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end"},function(e,t,r){"use strict";t.a="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end"},function(e,t,r){"use strict";var n=r(0),i=r.n(n);t.a={getFilledRegions:function(e,t){var r,n=(e||[]).slice();if("string"==typeof t?(t=i.a.getMap(t),r=t&&t.geoJson):t&&t.features&&(r=t),!r)return[];for(var a={},o=r.features,s=0;s<n.length;s++)a[n[s].name]=n[s];for(var s=0;s<o.length;s++){var u=o[s].properties.name;a[u]||n.push({name:u})}return n},defaultOption:{show:!0,zlevel:-10,map:"",left:0,top:0,width:"100%",height:"100%",boxWidth:100,boxHeight:10,boxDepth:"auto",regionHeight:3,environment:"auto",groundPlane:{show:!1,color:"#aaa"},shading:"lambert",light:{main:{alpha:40,beta:30}},viewControl:{alpha:40,beta:0,distance:100,orthographicSize:60,minAlpha:5,minBeta:-80,maxBeta:80},label:{show:!1,distance:2,textStyle:{fontSize:20,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:4}},itemStyle:{color:"#fff",borderWidth:0,borderColor:"#333"},emphasis:{itemStyle:{color:"#639fc0"},label:{show:!0}}}}},function(e,t,r){"use strict";function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t,r,i,a){var o=r,s=e[t];n(e,t,i);for(var u=r;u<i;u++)a(e[u],s)<0&&(n(e,u,o),o++);return n(e,i,o),o}function a(e,t,r,n){if(r<n){var o=Math.floor((r+n)/2),s=i(e,o,r,n,t);a(e,t,r,s-1),a(e,t,s+1,n)}}function o(){this._parts=[]}o.prototype.step=function(e,t,r){var n=e.length;if(0===r){this._parts=[],this._sorted=!1;var o=Math.floor(n/2);this._parts.push({pivot:o,left:0,right:n-1}),this._currentSortPartIdx=0}if(!this._sorted){var s=this._parts;if(0===s.length)return this._sorted=!0,!0;if(s.length<512){for(var u=0;u<s.length;u++)s[u].pivot=i(e,s[u].pivot,s[u].left,s[u].right,t);for(var l=[],u=0;u<s.length;u++){var h=s[u].left,c=s[u].pivot-1;c>h&&l.push({pivot:Math.floor((c+h)/2),left:h,right:c});var h=s[u].pivot+1,c=s[u].right;c>h&&l.push({pivot:Math.floor((c+h)/2),left:h,right:c})}s=this._parts=l}else for(var u=0;u<Math.floor(s.length/10);u++){var d=s.length-1-this._currentSortPartIdx;if(a(e,t,s[d].left,s[d].right),++this._currentSortPartIdx===s.length)return this._sorted=!0,!0}return!1}},o.sort=a,t.a=o},function(e,t,r){"use strict";function n(e,t){var r=e.getBoxLayoutParams(),n=l.a.getLayoutRect(r,{width:t.getWidth(),height:t.getHeight()});n.y=t.getHeight()-n.y-n.height,this.viewGL.setViewport(n.x,n.y,n.width,n.height,t.getDevicePixelRatio());var i=this.getGeoBoundingRect(),a=i.width/i.height*(e.get("aspectScale")||.75),o=e.get("boxWidth"),s=e.get("boxDepth"),u=e.get("boxHeight");null==u&&(u=5),isNaN(o)&&isNaN(s)&&(o=100),isNaN(s)?s=o/a:isNaN(o)&&(o=s/a),this.setSize(o,u,s),this.regionHeight=e.get("regionHeight"),this.altitudeAxis&&this.altitudeAxis.setExtent(0,Math.max(u-this.regionHeight,0))}function i(e,t){var r=[1/0,-1/0];if(e.eachSeries(function(e){if(e.coordinateSystem===this&&"series.map3D"!==e.type){var t=e.getData(),n=e.coordDimToDataDim("alt"),i=n&&n[0];if(i){var a=t.getDataExtent(i,!0);r[0]=Math.min(r[0],a[0]),r[1]=Math.max(r[1],a[1])}}},this),r&&isFinite(r[1]-r[0])){var n=s.a.helper.createScale(r,{type:"value",min:"dataMin",max:"dataMax"});this.altitudeAxis=new s.a.Axis("altitude",n),this.resize(this.model,t)}}var a=r(99),o=r(0),s=r.n(o),u=r(47),l=r.n(u),h=r(22),c=r(2),d=0,f={dimensions:a.a.prototype.dimensions,create:function(e,t){function r(e,r){var o=f.createGeo3D(e);e.__viewGL=e.__viewGL||new h.a,o.viewGL=e.__viewGL,e.coordinateSystem=o,o.model=e,a.push(o),o.resize=n,o.resize(e,t),o.update=i}var a=[];if(!s.a.getMap)throw new Error("geo3D component depends on geo component");return e.eachComponent("geo3D",function(e,t){r(e,t)}),e.eachSeriesByType("map3D",function(e,t){var n=e.get("coordinateSystem");null==n&&(n="geo3D"),"geo3D"===n&&r(e,t)}),e.eachSeries(function(t){if("geo3D"===t.get("coordinateSystem")){if("series.map3D"===t.type)return;var r=t.getReferringComponents("geo3D")[0];if(r||(r=e.getComponent("geo3D")),!r)throw new Error('geo "'+c.a.firstNotNull(t.get("geo3DIndex"),t.get("geo3DId"),0)+'" not found');t.coordinateSystem=r.coordinateSystem}}),a},createGeo3D:function(e){var t,r=e.get("map");return"string"==typeof r?(t=r,r=s.a.getMap(r)):r&&r.features&&(r={geoJson:r}),null==t&&(t="GEO_ANONYMOUS_"+d++),new a.a(t+d++,t,r&&r.geoJson,r&&r.specialAreas,e.get("nameMap"))}};s.a.registerCoordinateSystem("geo3D",f),t.a=f},function(e,t,r){"use strict";function n(e,t,r,n,i){this.name=e,this.map=t,this.regionHeight=0,this.regions=[],this._nameCoordMap={},this.loadGeoJson(r,n,i),this.transform=d.identity(new Float64Array(16)),this.invTransform=d.identity(new Float64Array(16)),this.extrudeY=!0,this.altitudeAxis}var i=r(0),a=r.n(i),o=r(6),s=r(205),u=r.n(s),l=r(206),h=r.n(l),c=o.a.vec3,d=o.a.mat4,f=[u.a,h.a];n.prototype={constructor:n,type:"geo3D",dimensions:["lng","lat","alt"],containPoint:function(){},loadGeoJson:function(e,t,r){var n=a.a.parseGeoJSON||a.a.parseGeoJson;try{this.regions=e?n(e):[]}catch(e){throw"Invalid geoJson format\n"+e}t=t||{},r=r||{};for(var i=this.regions,o={},s=0;s<i.length;s++){var u=i[s].name;u=r[u]||u,i[s].name=u,o[u]=i[s],this.addGeoCoord(u,i[s].center);var l=t[u];l&&i[s].transformTo(l.left,l.top,l.width,l.height)}this._regionsMap=o,this._geoRect=null,f.forEach(function(e){e(this)},this)},getGeoBoundingRect:function(){if(this._geoRect)return this._geoRect;for(var e,t=this.regions,r=0;r<t.length;r++){var n=t[r].getBoundingRect();e=e||n.clone(),e.union(n)}return this._geoRect=e||new a.a.graphic.BoundingRect(0,0,0,0)},addGeoCoord:function(e,t){this._nameCoordMap[e]=t},getRegion:function(e){return this._regionsMap[e]},getRegionByCoord:function(e){for(var t=this.regions,r=0;r<t.length;r++)if(t[r].contain(e))return t[r]},setSize:function(e,t,r){this.size=[e,t,r];var n=this.getGeoBoundingRect(),i=e/n.width,a=-r/n.height,o=-e/2-n.x*i,s=r/2-n.y*a,u=this.extrudeY?[o,0,s]:[o,s,0],l=this.extrudeY?[i,1,a]:[i,a,1],h=this.transform;d.identity(h),d.translate(h,h,u),d.scale(h,h,l),d.invert(this.invTransform,h)},dataToPoint:function(e,t){t=t||[];var r=this.extrudeY?1:2,n=this.extrudeY?2:1,i=e[2];return isNaN(i)&&(i=0),t[0]=e[0],t[n]=e[1],this.altitudeAxis?t[r]=this.altitudeAxis.dataToCoord(i):t[r]=0,t[r]+=this.regionHeight,c.transformMat4(t,t,this.transform),t},pointToData:function(e,t){}},t.a=n},function(e,t,r){"use strict";function n(){this.width=0,this.height=0,this.altitudeScale=1,this.boxHeight="auto",this.altitudeExtent,this.bearing=0,this.pitch=0,this.center=[0,0],this._origin,this.zoom=0,this._initialZoom,this.maxPitch=60,this.zoomOffset=0}var i=r(6),a=i.a.mat4,o=.6435011087932844,s=Math.PI;n.prototype={constructor:n,dimensions:["lng","lat","alt"],containPoint:function(){},setCameraOption:function(e){this.bearing=e.bearing,this.pitch=e.pitch,this.center=e.center,this.zoom=e.zoom,this._origin||(this._origin=this.projectOnTileWithScale(this.center,512)),null==this._initialZoom&&(this._initialZoom=this.zoom),this.updateTransform()},updateTransform:function(){if(this.height){var e=.5/Math.tan(o/2)*this.height*.1,t=Math.max(Math.min(this.pitch,this.maxPitch),0)/180*Math.PI,r=Math.PI/2+t,n=Math.sin(.3217505543966422)*e/Math.sin(Math.PI-r-.3217505543966422),i=Math.cos(Math.PI/2-t)*n+e,s=1.1*i;this.pitch>50&&(s=1e3);var u=[];a.perspective(u,o,this.width/this.height,1,s),this.viewGL.camera.projectionMatrix.setArray(u),this.viewGL.camera.decomposeProjectionMatrix();var u=a.identity([]),l=this.dataToPoint(this.center);a.scale(u,u,[1,-1,1]),a.translate(u,u,[0,0,-e]),a.rotateX(u,u,t),a.rotateZ(u,u,-this.bearing/180*Math.PI),a.translate(u,u,[-l[0]*this.getScale()*.1,-l[1]*this.getScale()*.1,0]),this.viewGL.camera.viewMatrix.array=u;var h=[];a.invert(h,u),this.viewGL.camera.worldTransform.array=h,this.viewGL.camera.decomposeWorldTransform();var c,d=512*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var f=this.altitudeExtent[1]-this.altitudeExtent[0];c=this.boxHeight/f*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else c=d/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*.1;this.viewGL.rootNode.scale.set(.1*this.getScale(),.1*this.getScale(),c)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(e,t){return this.projectOnTileWithScale(e,512*this.getScale(),t)},projectOnTileWithScale:function(e,t,r){var n=e[0],i=e[1],a=n*s/180,o=i*s/180,u=t*(a+s)/(2*s),l=t*(s-Math.log(Math.tan(s/4+.5*o)))/(2*s);return r=r||[],r[0]=u,r[1]=l,r},unprojectFromTile:function(e,t){return this.unprojectOnTileWithScale(e,512*this.getScale(),t)},unprojectOnTileWithScale:function(e,t,r){var n=e[0],i=e[1],a=n/t*(2*s)-s,o=2*(Math.atan(Math.exp(s-i/t*(2*s)))-s/4);return r=r||[],r[0]=180*a/s,r[1]=180*o/s,r},dataToPoint:function(e,t){return t=this.projectOnTileWithScale(e,512,t),t[0]-=this._origin[0],t[1]-=this._origin[1],t[2]=isNaN(e[2])?0:e[2],isNaN(e[2])||(t[2]=e[2],this.altitudeExtent&&(t[2]-=this.altitudeExtent[0])),t}},t.a=n},function(e,t,r){"use strict";var n=r(2),i=r(1),a=r(22);t.a=function(e,t,r){function o(e,t){var r=t.getWidth(),n=t.getHeight(),i=t.getDevicePixelRatio();this.viewGL.setViewport(0,0,r,n,i),this.width=r,this.height=n,this.altitudeScale=e.get("altitudeScale"),this.boxHeight=e.get("boxHeight")}function s(e,t){if("auto"!==this.model.get("boxHeight")){var r=[1/0,-1/0];e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData(),n=e.coordDimToDataDim("alt")[0];if(n){var i=t.getDataExtent(n,!0);r[0]=Math.min(r[0],i[0]),r[1]=Math.max(r[1],i[1])}}},this),r&&isFinite(r[1]-r[0])&&(this.altitudeExtent=r)}}return{dimensions:t.prototype.dimensions,create:function(u,l){var h=[];return u.eachComponent(e,function(e){var r=e.__viewGL;r||(r=e.__viewGL=new a.a,r.setRootNode(new i.a.Node));var n=new t;n.viewGL=e.__viewGL,n.resize=o,n.resize(e,l),h.push(n),e.coordinateSystem=n,n.model=e,n.update=s}),u.eachSeries(function(t){if(t.get("coordinateSystem")===e){var r=t.getReferringComponents(e)[0];if(r||(r=u.getComponent(e)),!r)throw new Error(e+' "'+n.a.firstNotNull(t.get(e+"Index"),t.get(e+"Id"),0)+'" not found');t.coordinateSystem=r.coordinateSystem}}),r&&r(h,u,l),h}}}},function(e,t,r){"use strict";t.a="\n@export ecgl.displayShadow.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_WorldPosition;\n\nvarying vec3 v_Normal;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n\n v_WorldPosition = (world * vec4(position, 1.0)).xyz;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n\n@end\n\n\n@export ecgl.displayShadow.fragment\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform float roughness: 0.2;\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.ssaoMap.header\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n float shadow = 1.0;\n\n @import ecgl.common.ssaoMap.main\n\n#if defined(DIRECTIONAL_LIGHT_COUNT) && defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n for (int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++) {\n shadow = min(shadow, shadowContribsDir[i] * 0.5 + 0.5);\n }\n#endif\n\n shadow *= 0.5 + ao * 0.5;\n shadow = clamp(shadow, 0.0, 1.0);\n\n gl_FragColor = vec4(vec3(0.0), 1.0 - shadow);\n}\n\n@end"},function(e,t,r){"use strict";function n(e){this.viewGL=e}var i=r(84),a=r.n(i),o=r(83),s=r.n(o);n.prototype.reset=function(e,t){this._updateCamera(t.getWidth(),t.getHeight(),t.getDevicePixelRatio()),this._viewTransform=a.a.create(),this.updateTransform(e,t)},n.prototype.updateTransform=function(e,t){var r=e.coordinateSystem;r.getRoamTransform&&(a.a.invert(this._viewTransform,r.getRoamTransform()),this._setCameraTransform(this._viewTransform),t.getZr().refresh())},n.prototype.dataToPoint=function(e,t,r){r=e.dataToPoint(t,null,r);var n=this._viewTransform;n&&s.a.applyTransform(r,r,n)},n.prototype.removeTransformInPoint=function(e){return this._viewTransform&&s.a.applyTransform(e,e,this._viewTransform),e},n.prototype.getZoom=function(){if(this._viewTransform){var e=this._viewTransform;return 1/Math.max(Math.sqrt(e[0]*e[0]+e[1]*e[1]),Math.sqrt(e[2]*e[2]+e[3]*e[3]))}return 1},n.prototype._setCameraTransform=function(e){var t=this.viewGL.camera;t.position.set(e[4],e[5],0),t.scale.set(Math.sqrt(e[0]*e[0]+e[1]*e[1]),Math.sqrt(e[2]*e[2]+e[3]*e[3]),1)},n.prototype._updateCamera=function(e,t,r){this.viewGL.setViewport(0,0,e,t,r);var n=this.viewGL.camera;n.left=n.top=0,n.bottom=t,n.right=e,n.near=0,n.far=100},t.a=n},function(e,t,r){(function(e){var r;"undefined"!=typeof window?r=window.__DEV__:void 0!==e&&(r=e.__DEV__),void 0===r&&(r=!0);var n=r;t.__DEV__=n}).call(t,r(68))},function(e,t,r){"use strict";var n=r(15),i=r(0),a=r.n(i),o=r(38),s=r(6),u=s.a.vec2,l=[[0,0],[1,1]],h=n.a.extend(function(){return{segmentScale:4,dynamic:!0,useNativeLine:!0,attributes:{position:new n.a.Attribute("position","float",2,"POSITION"),normal:new n.a.Attribute("normal","float",2),offset:new n.a.Attribute("offset","float",1),color:new n.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(e){var t=this.attributes;this.vertexCount!==e&&(t.position.init(e),t.color.init(e),this.useNativeLine||(t.offset.init(e),t.normal.init(e)),e>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(e){this.triangleCount!==e&&(this.indices=0===e?null:this.vertexCount>65535?new Uint32Array(3*e):new Uint16Array(3*e))},_getCubicCurveApproxStep:function(e,t,r,n){return 1/(u.dist(e,t)+u.dist(r,t)+u.dist(n,r)+1)*this.segmentScale},getCubicCurveVertexCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(e,t,r,n){var i=this._getCubicCurveApproxStep(e,t,r,n),a=Math.ceil(1/i);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(l)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(l)},getPolylineVertexCount:function(e){var t;if("number"==typeof e)t=e;else{t="number"!=typeof e[0]?e.length:e.length/2}return this.useNativeLine?2*(t-1):2*(t-1)+2},getPolylineTriangleCount:function(e){var t;if("number"==typeof e)t=e;else{t="number"!=typeof e[0]?e.length:e.length/2}return this.useNativeLine?0:2*(t-1)},addCubicCurve:function(e,t,r,n,i,a){null==a&&(a=1);for(var o=e[0],s=e[1],u=t[0],l=t[1],h=r[0],c=r[1],d=n[0],f=n[1],p=this._getCubicCurveApproxStep(e,t,r,n),m=p*p,g=m*p,_=3*p,v=3*m,y=6*m,x=6*g,T=o-2*u+h,b=s-2*l+c,w=3*(u-h)-o+d,E=3*(l-c)-s+f,S=o,A=s,M=(u-o)*_+T*v+w*g,C=(l-s)*_+b*v+E*g,L=T*y+w*x,D=b*y+E*x,N=w*x,R=E*x,P=0,I=0,O=Math.ceil(1/p),F=new Float32Array(3*(O+1)),F=[],B=0,I=0;I<O+1;I++)F[B++]=S,F[B++]=A,S+=M,A+=C,M+=L,C+=D,L+=N,D+=R,(P+=p)>1&&(S=M>0?Math.min(S,d):Math.max(S,d),A=C>0?Math.min(A,f):Math.max(A,f));this.addPolyline(F,i,a)},addLine:function(e,t,r,n){this.addPolyline([e,t],r,n)},addPolyline:function(){var e=u.create(),t=u.create(),r=u.create(),n=u.create(),i=[],a=[],o=[];return function(s,l,h,c,d){if(s.length){var f="number"!=typeof s[0];if(null==d&&(d=f?s.length:s.length/2),!(d<2)){null==c&&(c=0),null==h&&(h=1),this._itemVertexOffsets.push(this._vertexOffset);for(var p,m=f?"number"!=typeof l[0]:l.length/4===d,g=this.attributes.position,_=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,x=this.indices,T=this._vertexOffset,b=0;b<d;b++){if(f)i=s[b+c],p=m?l[b+c]:l;else{var w=2*b+c;if(i=i||[],i[0]=s[w],i[1]=s[w+1],m){var E=4*b+c;p=p||[],p[0]=l[E],p[1]=l[E+1],p[2]=l[E+2],p[3]=l[E+3]}else p=l}if(this.useNativeLine)b>1&&(g.copy(T,T-1),_.copy(T,T-1),T++);else{var S;if(b<d-1){if(f)u.copy(a,s[b+1]);else{var w=2*(b+1)+c;a=a||[],a[0]=s[w],a[1]=s[w+1]}if(b>0){u.sub(e,i,o),u.sub(t,a,i),u.normalize(e,e),u.normalize(t,t),u.add(n,e,t),u.normalize(n,n);var A=h/2*Math.min(1/u.dot(e,n),2);r[0]=-n[1],r[1]=n[0],S=A}else u.sub(e,a,i),u.normalize(e,e),r[0]=-e[1],r[1]=e[0],S=h/2}else u.sub(e,i,o),u.normalize(e,e),r[0]=-e[1],r[1]=e[0],S=h/2;y.set(T,r),y.set(T+1,r),v.set(T,S),v.set(T+1,-S),u.copy(o,i),g.set(T,i),g.set(T+1,i),_.set(T,p),_.set(T+1,p),T+=2}if(this.useNativeLine)_.set(T,p),g.set(T,i),T++;else if(b>0){var M=3*this._faceOffset,x=this.indices;x[M]=T-4,x[M+1]=T-3,x[M+2]=T-2,x[M+3]=T-3,x[M+4]=T-1,x[M+5]=T-2,this._faceOffset+=2}}this._vertexOffset=T}}}}(),setItemColor:function(e,t){for(var r=this._itemVertexOffsets[e],n=e<this._itemVertexOffsets.length-1?this._itemVertexOffsets[e+1]:this._vertexOffset,i=r;i<n;i++)this.attributes.color.set(i,t);this.dirty("color")}});a.a.util.defaults(h.prototype,o.a),t.a=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(107),r(154),r(201),r(207),r(213),r(219),r(225),r(232),r(236),r(243),r(249),r(252),r(256),r(259),r(262),r(275),r(281)},function(e,t,r){"use strict";function n(e){throw new Error(e+" version is too old, needs "+f[e]+" or higher")}function i(e,t){e.replace(".","")-0<f[t].replace(".","")-0&&n(t),console.log("Loaded "+t+", version "+e)}function a(e){this._layers={},this._zr=e}var o=r(0),s=r.n(o),u=r(108),l=r(109),h=r(153),c=r(1),d={version:"1.1.1",dependencies:{echarts:"4.1.0",claygl:"1.2.1"}},f=d.dependencies;i(u.a,"claygl"),i(s.a.version,"echarts"),a.prototype.update=function(e,t){function r(e){var t;e.coordinateSystem&&e.coordinateSystem.model,t=e.get("zlevel");var r=i._layers,n=r[t];if(!n){if(n=r[t]=new l.a("gl-"+t,a),a.painter.isSingleCanvas()){n.virtual=!0;var o=new s.a.graphic.Image({z:1e4,style:{image:n.renderer.canvas},silent:!0});n.__hostImage=o,a.add(o)}a.painter.insertLayer(t,n)}return n.__hostImage&&n.__hostImage.setStyle({width:n.renderer.getWidth(),height:n.renderer.getHeight()}),n}function n(e,t){e&&e.traverse(function(e){e.isRenderable&&e.isRenderable()&&(e.ignorePicking=null!=e.$ignorePicking?e.$ignorePicking:t)})}var i=this,a=t.getZr();if(!a.getWidth()||!a.getHeight())return void console.warn("Dom has no width or height");for(var o in this._layers)this._layers[o].removeViewsAll();e.eachComponent(function(i,a){if("series"!==i){var o=t.getViewOfComponentModel(a),s=a.coordinateSystem;if(o.__ecgl__){var u;if(s){if(!s.viewGL)return void console.error("Can't find viewGL in coordinateSystem of component "+a.id);u=s.viewGL}else{if(!a.viewGL)return void console.error("Can't find viewGL of component "+a.id);u=s.viewGL}var u=s.viewGL,l=r(a);l.addView(u),o.afterRender&&o.afterRender(a,e,t,l),n(o.groupGL,a.get("silent"))}}}),e.eachSeries(function(i){var a=t.getViewOfSeriesModel(i),o=i.coordinateSystem;if(a.__ecgl__){if(o&&!o.viewGL&&!a.viewGL)return void console.error("Can't find viewGL of series "+a.id);var s=o&&o.viewGL||a.viewGL,u=r(i);u.addView(s),a.afterRender&&a.afterRender(i,e,t,u),n(a.groupGL,i.get("silent"))}})};var p=s.a.init;s.a.init=function(){var e=p.apply(this,arguments);return e.getZr().painter.getRenderedCanvas=function(e){function t(e,t){var r=u._zlevelList;null==e&&(e=-1/0);for(var n,a=0;a<r.length;a++){var o=r[a],s=u._layers[o];if(!s.__builtin__&&o>e&&o<t){n=s;break}}n&&n.renderToCanvas&&(i.save(),n.renderToCanvas(i),i.restore())}if(e=e||{},this._singleCanvas)return this._layers[0].dom;var r=document.createElement("canvas"),n=e.pixelRatio||this.dpr;r.width=this.getWidth()*n,r.height=this.getHeight()*n;var i=r.getContext("2d");i.dpr=n,i.clearRect(0,0,r.width,r.height),e.backgroundColor&&(i.fillStyle=e.backgroundColor,i.fillRect(0,0,r.width,r.height));for(var a,o=this.storage.getDisplayList(!0),s={},u=this,l={ctx:i},h=0;h<o.length;h++){var c=o[h];c.zlevel!==a&&(t(a,c.zlevel),a=c.zlevel),this._doPaintEl(c,l,!0,s)}return t(a,1/0),r},e},s.a.registerPostUpdate(function(e,t){var r=t.getZr();(r.__egl=r.__egl||new a(r)).update(e,t)}),s.a.registerPreprocessor(h.a),s.a.graphicGL=c.a},function(e,t,r){"use strict";t.a="1.2.1"},function(e,t,r){"use strict";function n(e){var t=e.__zr;e.__zr=null,t&&e.removeAnimatorsFromZr&&e.removeAnimatorsFromZr(t)}function i(e){for(var t=0;t<e.length;t++)e[t].__used__=0}function a(e,t){for(var r=0;r<t.length;r++)t[r].__used__||t[r].dispose(e)}function o(e,t){e.__used__=e.__used__||0,1===++e.__used__&&t.push(e)}function s(e,t,r){var n,i;e.traverse(function(e){if(e.isRenderable()){var a=e.geometry,s=e.material;if(s!==n)for(var u=s.getTextureUniforms(),l=0;l<u.length;l++){var h=u[l],c=s.uniforms[h].value;if(c)if(c instanceof d.a)o(c,t);else if(c instanceof Array)for(var f=0;f<c.length;f++)c[f]instanceof d.a&&o(c[f],t)}a!==i&&o(a,r),n=s,i=a}});for(var a=0;a<e.lights.length;a++)e.lights[a].cubemap&&o(e.lights[a].cubemap,t)}var u=r(0),l=r.n(u),h=r(52),c=r(117),d=r(4),f=r(1),p=r(53),m=r(80),g=r.n(m),_=function(e,t){this.id=e,this.zr=t;try{this.renderer=new h.a({clearBit:0,devicePixelRatio:t.painter.dpr,preserveDrawingBuffer:!0,premultipliedAlpha:!0}),this.renderer.resize(t.painter.getWidth(),t.painter.getHeight())}catch(e){return this.renderer=null,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute; left: 0; top: 0; right: 0; bottom: 0;",this.dom.className="ecgl-nowebgl",this.dom.innerHTML="Sorry, your browser does not support WebGL",void console.error(e)}this.onglobalout=this.onglobalout.bind(this),t.on("globalout",this.onglobalout),this.dom=this.renderer.canvas;var r=this.dom.style;r.position="absolute",r.left="0",r.top="0",this.views=[],this._picking=new c.a({renderer:this.renderer}),this._viewsToDispose=[],this._accumulatingId=0,this._zrEventProxy=new l.a.graphic.Rect({shape:{x:-1,y:-1,width:2,height:2},__isGLToZRProxy:!0}),this._backgroundColor=null};_.prototype.addView=function(e){if(e.layer!==this){var t=this._viewsToDispose.indexOf(e);t>=0&&this._viewsToDispose.splice(t,1),this.views.push(e),e.layer=this;var r=this.zr;e.scene.traverse(function(e){e.__zr=r,e.addAnimatorsToZr&&e.addAnimatorsToZr(r)})}},_.prototype.removeView=function(e){if(e.layer===this){var t=this.views.indexOf(e);t>=0&&(this.views.splice(t,1),e.scene.traverse(n,this),e.layer=null,this._viewsToDispose.push(e))}},_.prototype.removeViewsAll=function(){this.views.forEach(function(e){e.scene.traverse(n,this),e.layer=null,this._viewsToDispose.push(e)},this),this.views.length=0},_.prototype.resize=function(e,t){this.renderer.resize(e,t)},_.prototype.clear=function(){var e=this.renderer.gl,t=this._backgroundColor||[0,0,0,0];e.clearColor(t[0],t[1],t[2],t[3]),e.depthMask(!0),e.colorMask(!0,!0,!0,!0),e.clear(e.DEPTH_BUFFER_BIT|e.COLOR_BUFFER_BIT)},_.prototype.clearDepth=function(){var e=this.renderer.gl;e.clear(e.DEPTH_BUFFER_BIT)},_.prototype.clearColor=function(){var e=this.renderer.gl;e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},_.prototype.needsRefresh=function(){this.zr.refresh()},_.prototype.refresh=function(e){this._backgroundColor=e?f.a.parseColor(e):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var t=0;t<this.views.length;t++)this.views[t].prepareRender(this.renderer);this._doRender(!1),this._trackAndClean();for(var t=0;t<this._viewsToDispose.length;t++)this._viewsToDispose[t].dispose(this.renderer);this._viewsToDispose.length=0,this._startAccumulating()},_.prototype.renderToCanvas=function(e){this._startAccumulating(!0),e.drawImage(this.dom,0,0,e.canvas.width,e.canvas.height)},_.prototype._doRender=function(e){this.clear(),this.renderer.saveViewport();for(var t=0;t<this.views.length;t++)this.views[t].render(this.renderer,e);this.renderer.restoreViewport()},_.prototype._stopAccumulating=function(){this._accumulatingId=0,clearTimeout(this._accumulatingTimeout)};var v=1;_.prototype._startAccumulating=function(e){function t(i){if(r._accumulatingId&&i===r._accumulatingId){for(var a=!0,o=0;o<r.views.length;o++)a=r.views[o].isAccumulateFinished()&&n;a||(r._doRender(!0),e?t(i):g()(function(){t(i)}))}}var r=this;this._stopAccumulating();for(var n=!1,i=0;i<this.views.length;i++)n=this.views[i].needsAccumulate()||n;n&&(this._accumulatingId=v++,e?t(r._accumulatingId):this._accumulatingTimeout=setTimeout(function(){t(r._accumulatingId)},50))},_.prototype._trackAndClean=function(){var e=[],t=[];this._textureList&&(i(this._textureList),i(this._geometriesList));for(var r=0;r<this.views.length;r++)s(this.views[r].scene,e,t);this._textureList&&(a(this.renderer,this._textureList),a(this.renderer,this._geometriesList)),this._textureList=e,this._geometriesList=t},_.prototype.dispose=function(){this._stopAccumulating(),this.renderer.disposeScene(this.scene),this.zr.off("globalout",this.onglobalout)},_.prototype.onmousedown=function(e){if(!e.target||!e.target.__isGLToZRProxy){e=e.event;var t=this.pickObject(e.offsetX,e.offsetY);t&&(this._dispatchEvent("mousedown",e,t),this._dispatchDataEvent("mousedown",e,t)),this._downX=e.offsetX,this._downY=e.offsetY}},_.prototype.onmousemove=function(e){if(!e.target||!e.target.__isGLToZRProxy){e=e.event;var t=this.pickObject(e.offsetX,e.offsetY),r=t&&t.target,n=this._hovered;this._hovered=t,n&&r!==n.target&&(n.relatedTarget=r,this._dispatchEvent("mouseout",e,n),this.zr.setCursorStyle("default")),this._dispatchEvent("mousemove",e,t),t&&(this.zr.setCursorStyle("pointer"),n&&r===n.target||this._dispatchEvent("mouseover",e,t)),this._dispatchDataEvent("mousemove",e,t)}},_.prototype.onmouseup=function(e){if(!e.target||!e.target.__isGLToZRProxy){e=e.event;var t=this.pickObject(e.offsetX,e.offsetY);t&&(this._dispatchEvent("mouseup",e,t),this._dispatchDataEvent("mouseup",e,t)),this._upX=e.offsetX,this._upY=e.offsetY}},_.prototype.onclick=_.prototype.dblclick=function(e){if(!e.target||!e.target.__isGLToZRProxy){var t=this._upX-this._downX,r=this._upY-this._downY;if(!(Math.sqrt(t*t+r*r)>20)){e=e.event;var n=this.pickObject(e.offsetX,e.offsetY);n&&(this._dispatchEvent(e.type,e,n),this._dispatchDataEvent(e.type,e,n));var i=this._clickToSetFocusPoint(e);if(i){i.view.setDOFFocusOnPoint(i.distance)&&this.zr.refresh()}}}},_.prototype._clickToSetFocusPoint=function(e){for(var t=this.renderer,r=t.viewport,n=this.views.length-1;n>=0;n--){var i=this.views[n];if(i.hasDOF()&&i.containPoint(e.offsetX,e.offsetY)){this._picking.scene=i.scene,this._picking.camera=i.camera,t.viewport=i.viewport;var a=this._picking.pick(e.offsetX,e.offsetY,!0);if(a)return a.view=i,a}}t.viewport=r},_.prototype.onglobalout=function(e){var t=this._hovered;t&&this._dispatchEvent("mouseout",e,{target:t.target})},_.prototype.pickObject=function(e,t){for(var r=[],n=this.renderer,i=n.viewport,a=0;a<this.views.length;a++){var o=this.views[a];o.containPoint(e,t)&&(this._picking.scene=o.scene,this._picking.camera=o.camera,n.viewport=o.viewport,this._picking.pickAll(e,t,r))}return n.viewport=i,r.sort(function(e,t){return e.distance-t.distance}),r[0]},_.prototype._dispatchEvent=function(e,t,r){r||(r={});var n=r.target;for(r.cancelBubble=!1,r.event=t,r.type=e,r.offsetX=t.offsetX,r.offsetY=t.offsetY;n&&(n.trigger(e,r),n=n.getParent(),!r.cancelBubble););this._dispatchToView(e,r)},_.prototype._dispatchDataEvent=function(e,t,r){var n=r&&r.target,i=n&&n.dataIndex,a=n&&n.seriesIndex,o=n&&n.eventData,s=!1,u=this._zrEventProxy;u.position=[t.offsetX,t.offsetY],u.update();var l={target:u};"mousemove"===e&&(null!=i?i!==this._lastDataIndex&&(parseInt(this._lastDataIndex,10)>=0&&(u.dataIndex=this._lastDataIndex,u.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(l,"mouseout",t)),s=!0):null!=o&&o!==this._lastEventData&&(null!=this._lastEventData&&(u.eventData=this._lastEventData,this.zr.handler.dispatchToElement(l,"mouseout",t)),s=!0),this._lastEventData=o,this._lastDataIndex=i,this._lastSeriesIndex=a),u.eventData=o,u.dataIndex=i,u.seriesIndex=a,(null!=o||parseInt(i,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(l,e,t),s&&this.zr.handler.dispatchToElement(l,"mouseover",t))},_.prototype._dispatchToView=function(e,t){for(var r=0;r<this.views.length;r++)this.views[r].containPoint(t.offsetX,t.offsetY)&&this.views[r].trigger(e,t)},l.a.util.extend(_.prototype,p.a),t.a=_},function(e,t,r){"use strict";function n(e,t,r){"object"==typeof t&&(r=t,t=null);var n,o=this;if(!(e instanceof Function)){n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s)}var u=function(t){if(o.apply(this,arguments),e instanceof Function?i(this,e.call(this,t)):a(this,e,n),this.constructor===u)for(var r=u.__initializers__,s=0;s<r.length;s++)r[s].apply(this,arguments)};u.__super__=o,o.__initializers__?u.__initializers__=o.__initializers__.slice():u.__initializers__=[],t&&u.__initializers__.push(t);var l=function(){};return l.prototype=o.prototype,u.prototype=new l,u.prototype.constructor=u,i(u.prototype,r),u.extend=o.extend,u.derive=o.extend,u}function i(e,t){if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function a(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]=t[i]}}t.a={extend:n,derive:n}},function(e,t,r){"use strict";function n(e){function t(t){var n=e.getExtension(t);n||(n=e.getExtension("MOZ_"+t)),n||(n=e.getExtension("WEBKIT_"+t)),r[t]=n}for(var r={},n={},o=0;o<i.length;o++){t(i[o])}for(var o=0;o<a.length;o++){var s=a[o];n[s]=e.getParameter(e[s])}this.getExtension=function(e){return e in r||t(e),r[e]},this.getParameter=function(e){return n[e]},this.getMaxJointNumber=function(){return 15}}var i=["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","OES_standard_derivatives","OES_vertex_array_object","OES_element_index_uint","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","EXT_texture_filter_anisotropic","EXT_shader_texture_lod","WEBGL_draw_buffers","EXT_frag_depth","EXT_sRGB"],a=["MAX_TEXTURE_SIZE","MAX_CUBE_MAP_TEXTURE_SIZE"];t.a=n},function(e,t,r){"use strict";function n(e){var t=new XMLHttpRequest;t.open("get",e.url),t.responseType=e.responseType||"text",e.onprogress&&(t.onprogress=function(t){if(t.lengthComputable){var r=t.loaded/t.total;e.onprogress(r,t.loaded,t.total)}else e.onprogress(null)}),t.onload=function(r){t.status>=400?e.onerror&&e.onerror():e.onload&&e.onload(t.response)},e.onerror&&(t.onerror=e.onerror),t.send(null)}t.a={get:n}},function(e,t,r){"use strict";function n(e){return e=Math.round(e),e<0?0:e>255?255:e}function i(e){return e=Math.round(e),e<0?0:e>360?360:e}function a(e){return e<0?0:e>1?1:e}function o(e){return n(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100*255:parseInt(e,10))}function s(e){return a(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100:parseFloat(e))}function u(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r){return e+(t-e)*r}function h(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function d(e,t){y&&c(y,t),y=v.put(e,y||t.slice())}function f(e,t){var r=(parseFloat(e[0])%360+360)%360/360,i=s(e[1]),a=s(e[2]),o=a<=.5?a*(i+1):a+i-a*i,l=2*a-o;return t=t||[],h(t,n(255*u(l,o,r+1/3)),n(255*u(l,o,r)),n(255*u(l,o,r-1/3)),1),4===e.length&&(t[3]=e[3]),t}function p(e){if(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),u=s-o,l=(s+o)/2;if(0===u)t=0,r=0;else{r=l<.5?u/(s+o):u/(2-s-o);var h=((s-n)/6+u/2)/u,c=((s-i)/6+u/2)/u,d=((s-a)/6+u/2)/u;n===s?t=d-c:i===s?t=1/3+h-d:a===s&&(t=2/3+c-h),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,r,l];return null!=e[3]&&f.push(e[3]),f}}var m=r(69),g={},_={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]},v=new m.a(20),y=null;g.parse=function(e,t){if(e){t=t||[];var r=v.get(e);if(r)return c(t,r);e+="";var n=e.replace(/ /g,"").toLowerCase();if(n in _)return c(t,_[n]),d(e,t),t;if("#"!==n.charAt(0)){var i=n.indexOf("("),a=n.indexOf(")");if(-1!==i&&a+1===n.length){var u=n.substr(0,i),l=n.substr(i+1,a-(i+1)).split(","),p=1;switch(u){case"rgba":if(4!==l.length)return void h(t,0,0,0,1);p=s(l.pop());case"rgb":return 3!==l.length?void h(t,0,0,0,1):(h(t,o(l[0]),o(l[1]),o(l[2]),p),d(e,t),t);case"hsla":return 4!==l.length?void h(t,0,0,0,1):(l[3]=s(l[3]),f(l,t),d(e,t),t);case"hsl":return 3!==l.length?void h(t,0,0,0,1):(f(l,t),d(e,t),t);default:return}}h(t,0,0,0,1)}else{if(4===n.length){var m=parseInt(n.substr(1),16);return m>=0&&m<=4095?(h(t,(3840&m)>>4|(3840&m)>>8,240&m|(240&m)>>4,15&m|(15&m)<<4,1),d(e,t),t):void h(t,0,0,0,1)}if(7===n.length){var m=parseInt(n.substr(1),16);return m>=0&&m<=16777215?(h(t,(16711680&m)>>16,(65280&m)>>8,255&m,1),d(e,t),t):void h(t,0,0,0,1)}}}},g.parseToFloat=function(e,t){if(t=g.parse(e,t))return t[0]/=255,t[1]/=255,t[2]/=255,t},g.lift=function(e,t){var r=g.parse(e);if(r){for(var n=0;n<3;n++)r[n]=t<0?r[n]*(1-t)|0:(255-r[n])*t+r[n]|0;return g.stringify(r,4===r.length?"rgba":"rgb")}},g.toHex=function(e){var t=g.parse(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},g.fastLerp=function(e,t,r){if(t&&t.length&&e>=0&&e<=1){r=r||[];var i=e*(t.length-1),o=Math.floor(i),s=Math.ceil(i),u=t[o],h=t[s],c=i-o;return r[0]=n(l(u[0],h[0],c)),r[1]=n(l(u[1],h[1],c)),r[2]=n(l(u[2],h[2],c)),r[3]=a(l(u[3],h[3],c)),r}},g.fastMapToColor=g.fastLerp,g.lerp=function(e,t,r){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),o=Math.floor(i),s=Math.ceil(i),u=g.parse(t[o]),h=g.parse(t[s]),c=i-o,d=g.stringify([n(l(u[0],h[0],c)),n(l(u[1],h[1],c)),n(l(u[2],h[2],c)),a(l(u[3],h[3],c))],"rgba");return r?{color:d,leftIndex:o,rightIndex:s,value:i}:d}},g.mapToColor=g.lerp,g.modifyHSL=function(e,t,r,n){if(e=g.parse(e))return e=p(e),null!=t&&(e[0]=i(t)),null!=r&&(e[1]=s(r)),null!=n&&(e[2]=s(n)),g.stringify(f(e),"rgba")},g.modifyAlpha=function(e,t){if((e=g.parse(e))&&null!=t)return e[3]=a(t),g.stringify(e,"rgba")},g.stringify=function(e,t){if(e&&e.length){var r=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(r+=","+e[3]),t+"("+r+")"}},t.a=g},function(e,t,r){"use strict";var n=function(){this.head=null,this.tail=null,this._length=0};n.prototype.insert=function(e){var t=new n.Entry(e);return this.insertEntry(t),t},n.prototype.insertAt=function(e,t){if(!(e<0)){for(var r=this.head,i=0;r&&i!=e;)r=r.next,i++;if(r){var a=new n.Entry(t),o=r.prev;o?(o.next=a,a.prev=o):this.head=a,a.next=r,r.prev=a}else this.insert(t)}},n.prototype.insertBeforeEntry=function(e,t){var r=new n.Entry(e),i=t.prev;i?(i.next=r,r.prev=i):this.head=r,r.next=t,t.prev=r,this._length++},n.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,this.tail=e):this.head=this.tail=e,this._length++},n.prototype.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._length--},n.prototype.removeAt=function(e){if(!(e<0)){for(var t=this.head,r=0;t&&r!=e;)t=t.next,r++;return t?(this.remove(t),t.value):void 0}},n.prototype.getHead=function(){if(this.head)return this.head.value},n.prototype.getTail=function(){if(this.tail)return this.tail.value},n.prototype.getAt=function(e){if(!(e<0)){for(var t=this.head,r=0;t&&r!=e;)t=t.next,r++;return t.value}},n.prototype.indexOf=function(e){for(var t=this.head,r=0;t;){if(t.value===e)return r;t=t.next,r++}},n.prototype.length=function(){return this._length},n.prototype.isEmpty=function(){return 0===this._length},n.prototype.forEach=function(e,t){for(var r=this.head,n=0,i=void 0!==t;r;)i?e.call(t,r.value,n):e(r.value,n),r=r.next,n++},n.prototype.clear=function(){this.tail=this.head=null,this._length=0},n.Entry=function(e){this.value=e,this.next=null,this.prev=null},t.a=n},function(e,t,r){"use strict";function n(e,t,r){function n(e,r,n,a){var o="";isNaN(r)&&(r=r in t?t[r]:i[r]),isNaN(n)&&(n=n in t?t[n]:i[n]);for(var s=parseInt(r);s<parseInt(n);s++)o+="{"+a.replace(/float\s*\(\s*_idx_\s*\)/g,s.toFixed(1)).replace(/_idx_/g,s)+"}";return o}var i={};for(var a in r)i[a+"_COUNT"]=r[a];return e.replace(l,n)}function i(e,t,r){var n=[];if(t)for(var i in t){var a=t[i];a>0&&n.push("#define "+i.toUpperCase()+"_COUNT "+a)}if(r)for(var o=0;o<r.length;o++){var s=r[o];n.push("#define "+s.toUpperCase()+"_ENABLED")}for(var s in e){var u=e[s];null===u?n.push("#define "+s):n.push("#define "+s+" "+u.toString())}return n.join("\n")}function a(e){for(var t=[],r=0;r<e.length;r++)t.push("#extension GL_"+e[r]+" : enable");return t.join("\n")}function o(e){return["precision",e,"float"].join(" ")+";\n"+["precision",e,"int"].join(" ")+";\n"+["precision",e,"sampler2D"].join(" ")+";\n"}function s(e){this._renderer=e,this._cache={}}var u=r(116),l=/for\s*?\(int\s*?_idx_\s*\=\s*([\w-]+)\;\s*_idx_\s*<\s*([\w-]+);\s*_idx_\s*\+\+\s*\)\s*\{\{([\s\S]+?)(?=\}\})\}\}/g;s.prototype.getProgram=function(e,t,r){var s=this._cache,l=e.isSkinnedMesh&&e.isSkinnedMesh(),h="s"+t.shader.shaderID+"m"+t.getProgramKey();r&&(h+="se"+r.getProgramKey(e.lightGroup)),l&&(h+=","+e.joints.length);var c=s[h];if(c)return c;var d=r?r.getLightsNumbers(e.lightGroup):{},f=this._renderer,p=f.gl,m=t.getEnabledTextures(),g="";if(l){var _={SKINNING:null,JOINT_COUNT:e.joints.length};e.joints.length>f.getMaxJointNumber()&&(_.USE_SKIN_MATRICES_TEXTURE=null),g="\n"+i(_)+"\n"}var v=g+i(t.vertexDefines,d,m),y=g+i(t.fragmentDefines,d,m),x=v+"\n"+t.shader.vertex,T=["OES_standard_derivatives","EXT_shader_texture_lod"].filter(function(e){return null!=f.getGLExtension(e)});T.indexOf("EXT_shader_texture_lod")>=0&&(y+="\n#define SUPPORT_TEXTURE_LOD"),T.indexOf("OES_standard_derivatives")>=0&&(y+="\n#define SUPPORT_STANDARD_DERIVATIVES");var b=a(T)+"\n"+o(t.precision)+"\n"+y+"\n"+t.shader.fragment,w=n(x,t.vertexDefines,d),E=n(b,t.fragmentDefines,d),c=new u.a;c.uniformSemantics=t.shader.uniformSemantics,c.attributes=t.shader.attributes;var S=c.buildProgram(p,t.shader,w,E);return c.__error=S,s[h]=c,c},t.a=s},function(e,t,r){"use strict";function n(e){for(var t=e.split("\n"),r=0,n=t.length;r<n;r++)t[r]=r+1+": "+t[r];return t.join("\n")}function i(e,t,r){if(!e.getShaderParameter(t,e.COMPILE_STATUS))return[e.getShaderInfoLog(t),n(r)].join("\n")}var a=r(14),o=r(7),s={},u=new a.a.Float32Array(16),l=o.a.extend({uniformSemantics:{},attributes:{}},function(){this._locations={},this._textureSlot=0,this._program=null},{bind:function(e){this._textureSlot=0,e.gl.useProgram(this._program)},hasUniform:function(e){var t=this._locations[e];return null!==t&&void 0!==t},useTextureSlot:function(e,t,r){t&&(e.gl.activeTexture(e.gl.TEXTURE0+r),t.isRenderable()?t.bind(e):t.unbind(e))},currentTextureSlot:function(){return this._textureSlot},resetTextureSlot:function(e){this._textureSlot=e||0},takeCurrentTextureSlot:function(e,t){var r=this._textureSlot;return this.useTextureSlot(e,t,r),this._textureSlot++,r},setUniform:function(e,t,r,n){var i=this._locations,o=i[r];if(null===o||void 0===o)return!1;switch(t){case"m4":if(!(n instanceof Float32Array)){for(var s=0;s<n.length;s++)u[s]=n[s];n=u}e.uniformMatrix4fv(o,!1,n);break;case"2i":e.uniform2i(o,n[0],n[1]);break;case"2f":e.uniform2f(o,n[0],n[1]);break;case"3i":e.uniform3i(o,n[0],n[1],n[2]);break;case"3f":e.uniform3f(o,n[0],n[1],n[2]);break;case"4i":e.uniform4i(o,n[0],n[1],n[2],n[3]);break;case"4f":e.uniform4f(o,n[0],n[1],n[2],n[3]);break;case"1i":e.uniform1i(o,n);break;case"1f":e.uniform1f(o,n);break;case"1fv":e.uniform1fv(o,n);break;case"1iv":e.uniform1iv(o,n);break;case"2iv":e.uniform2iv(o,n);break;case"2fv":e.uniform2fv(o,n);break;case"3iv":e.uniform3iv(o,n);break;case"3fv":e.uniform3fv(o,n);break;case"4iv":e.uniform4iv(o,n);break;case"4fv":e.uniform4fv(o,n);break;case"m2":case"m2v":e.uniformMatrix2fv(o,!1,n);break;case"m3":case"m3v":e.uniformMatrix3fv(o,!1,n);break;case"m4v":if(Array.isArray(n)&&Array.isArray(n[0])){for(var l=new a.a.Float32Array(16*n.length),h=0,s=0;s<n.length;s++)for(var c=n[s],d=0;d<16;d++)l[h++]=c[d];e.uniformMatrix4fv(o,!1,l)}else e.uniformMatrix4fv(o,!1,n)}return!0},setUniformOfSemantic:function(e,t,r){var n=this.uniformSemantics[t];return!!n&&this.setUniform(e,n.type,n.symbol,r)},enableAttributes:function(e,t,r){var n,i=e.gl,a=this._program,o=this._locations;(n=r?r.__enabledAttributeList:s[e.__uid__])||(n=r?r.__enabledAttributeList=[]:s[e.__uid__]=[]);for(var u=[],l=0;l<t.length;l++){var h=t[l];if(this.attributes[h]){var c=o[h];if(null==c){if(-1===(c=i.getAttribLocation(a,h))){u[l]=-1;continue}o[h]=c}u[l]=c,n[c]?n[c]=2:n[c]=1}else u[l]=-1}for(var l=0;l<n.length;l++)switch(n[l]){case 1:i.enableVertexAttribArray(l),n[l]=3;break;case 2:n[l]=3;break;case 3:i.disableVertexAttribArray(l),n[l]=0}return u},buildProgram:function(e,t,r,n){var a=e.createShader(e.VERTEX_SHADER),o=e.createProgram();e.shaderSource(a,r),e.compileShader(a);var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,n),e.compileShader(s);var u=i(e,a,r);if(u)return u;if(u=i(e,s,n))return u;if(e.attachShader(o,a),e.attachShader(o,s),t.attributeSemantics.POSITION)e.bindAttribLocation(o,0,t.attributeSemantics.POSITION.symbol);else{var l=Object.keys(this.attributes);e.bindAttribLocation(o,0,l[0])}if(e.linkProgram(o),!e.getProgramParameter(o,e.LINK_STATUS))return"Could not link program\n"+e.getProgramInfoLog(o);for(var h=0;h<t.uniforms.length;h++){var c=t.uniforms[h];this._locations[c]=e.getUniformLocation(o,c)}e.deleteShader(a),e.deleteShader(s),this._program=o,this.vertexCode=r,this.fragmentCode=n}});t.a=l},function(e,t,r){"use strict";var n=r(7),i=r(54),a=r(26),o=r(3),s=r(9),u=r(72),l=r(11),h=r(12),c=n.a.extend({scene:null,camera:null,renderer:null},function(){this._ray=new i.a,this._ndc=new a.a},{pick:function(e,t,r){return this.pickAll(e,t,[],r)[0]||null},pickAll:function(e,t,r,n){return this.renderer.screenToNDC(e,t,this._ndc),this.camera.castRay(this._ndc,this._ray),r=r||[],this._intersectNode(this.scene,r,n||!1),r.sort(this._intersectionCompareFunc),r},_intersectNode:function(e,t,r){e instanceof u.a&&e.isRenderable()&&(e.ignorePicking&&!r||!(e.mode===l.a.TRIANGLES&&e.geometry.isUseIndices()||e.geometry.pickByRay||e.geometry.pick)||this._intersectRenderable(e,t));for(var n=0;n<e._children.length;n++)this._intersectNode(e._children[n],t,r)},_intersectRenderable:function(){var e=new o.a,t=new o.a,r=new o.a,n=new i.a,a=new s.a;return function(i,u){var d=i.isSkinnedMesh();n.copy(this._ray),s.a.invert(a,i.worldTransform),d||n.applyTransform(a);var f=i.geometry,p=d?i.skeleton.boundingBox:f.boundingBox;if(!p||n.intersectBoundingBox(p)){if(f.pick)return void f.pick(this._ndc.x,this._ndc.y,this.renderer,this.camera,i,u);if(f.pickByRay)return void f.pickByRay(n,i,u);var m,g,_=i.cullFace===l.a.BACK&&i.frontFace===l.a.CCW||i.cullFace===l.a.FRONT&&i.frontFace===l.a.CW,v=f.indices,y=f.attributes.position,x=f.attributes.weight,T=f.attributes.joint,b=[];if(y&&y.value&&v){if(d){g=i.skeleton.getSubSkinMatrices(i.__uid__,i.joints);for(var w=0;w<i.joints.length;w++){b[w]=b[w]||[];for(var E=0;E<16;E++)b[w][E]=g[16*w+E]}var S=[],A=[],M=[],C=[],L=[],D=f.attributes.skinnedPosition;D&&D.value||(f.createAttribute("skinnedPosition","f",3),D=f.attributes.skinnedPosition,D.init(f.vertexCount));for(var w=0;w<f.vertexCount;w++){y.get(w,S),x.get(w,A),T.get(w,M),A[3]=1-A[0]-A[1]-A[2],h.a.set(C,0,0,0);for(var E=0;E<4;E++)M[E]>=0&&A[E]>1e-4&&(h.a.transformMat4(L,S,b[M[E]]),h.a.scaleAndAdd(C,C,L,A[E]));D.set(w,C)}}for(var w=0;w<v.length;w+=3){var N=v[w],R=v[w+1],P=v[w+2],I=d?f.attributes.skinnedPosition:y;if(I.get(N,e.array),I.get(R,t.array),I.get(P,r.array),m=_?n.intersectTriangle(e,t,r,i.culling):n.intersectTriangle(e,r,t,i.culling)){var O=new o.a;d?o.a.copy(O,m):o.a.transformMat4(O,m,i.worldTransform),u.push(new c.Intersection(m,O,i,[N,R,P],w/3,o.a.dist(O,this._ray.origin)))}}}}}}(),_intersectionCompareFunc:function(e,t){return e.distance-t.distance}});c.Intersection=function(e,t,r,n,i,a){this.point=e,this.pointWorld=t,this.target=r,this.triangle=n,this.triangleIndex=i,this.distance=a},t.a=c},function(e,t,r){"use strict";function n(e){return{byte:c.a.Int8Array,ubyte:c.a.Uint8Array,short:c.a.Int16Array,ushort:c.a.Uint16Array}[e]||c.a.Float32Array}function i(e){return"attr_"+e}function a(e,t,r,n){switch(this.name=e,this.type=t,this.size=r,this.semantic=n||"",this.value=null,r){case 1:this.get=function(e){return this.value[e]},this.set=function(e,t){this.value[e]=t},this.copy=function(e,t){this.value[e]=this.value[e]};break;case 2:this.get=function(e,t){var r=this.value;return t[0]=r[2*e],t[1]=r[2*e+1],t},this.set=function(e,t){var r=this.value;r[2*e]=t[0],r[2*e+1]=t[1]},this.copy=function(e,t){var r=this.value;t*=2,e*=2,r[e]=r[t],r[e+1]=r[t+1]};break;case 3:this.get=function(e,t){var r=3*e,n=this.value;return t[0]=n[r],t[1]=n[r+1],t[2]=n[r+2],t},this.set=function(e,t){var r=3*e,n=this.value;n[r]=t[0],n[r+1]=t[1],n[r+2]=t[2]},this.copy=function(e,t){var r=this.value;t*=3,e*=3,r[e]=r[t],r[e+1]=r[t+1],r[e+2]=r[t+2]};break;case 4:this.get=function(e,t){var r=this.value,n=4*e;return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t},this.set=function(e,t){var r=this.value,n=4*e;r[n]=t[0],r[n+1]=t[1],r[n+2]=t[2],r[n+3]=t[3]},this.copy=function(e,t){var r=this.value;t*=4,e*=4,r[e]=r[t],r[e+1]=r[t+1],r[e+2]=r[t+2],r[e+3]=r[t+3]}}}function o(e,t,r,n,i){this.name=e,this.type=t,this.buffer=r,this.size=n,this.semantic=i,this.symbol="",this.needsRemove=!1}function s(e){this.buffer=e,this.count=0}var u=r(7),l=r(11),h=r(57),c=r(14);a.prototype.init=function(e){if(!this.value||this.value.length!=e*this.size){var t=n(this.type);this.value=new t(e*this.size)}},a.prototype.fromArray=function(e){var t,r=n(this.type);if(e[0]&&e[0].length){var i=0,a=this.size;t=new r(e.length*a);for(var o=0;o<e.length;o++)for(var s=0;s<a;s++)t[i++]=e[o][s]}else t=new r(e);this.value=t},a.prototype.clone=function(e){var t=new a(this.name,this.type,this.size,this.semantic);return e&&console.warn("todo"),t};var d=u.a.extend(function(){return{attributes:{},indices:null,dynamic:!0,_enabledAttributes:null,__used:0}},function(){this._cache=new h.a,this._attributeList=Object.keys(this.attributes),this.__vaoCache={}},{mainAttribute:"",pick:null,pickByRay:null,dirty:function(){for(var e=this.getEnabledAttributes(),t=0;t<e.length;t++)this.dirtyAttribute(e[t]);this.dirtyIndices(),this._enabledAttributes=null,this._cache.dirty("any")},dirtyIndices:function(){this._cache.dirtyAll("indices")},dirtyAttribute:function(e){this._cache.dirtyAll(i(e)),this._cache.dirtyAll("attributes")},getTriangleIndices:function(e,t){if(e<this.triangleCount&&e>=0){t||(t=[]);var r=this.indices;return t[0]=r[3*e],t[1]=r[3*e+1],t[2]=r[3*e+2],t}},setTriangleIndices:function(e,t){var r=this.indices;r[3*e]=t[0],r[3*e+1]=t[1],r[3*e+2]=t[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(e){var t,r=this.vertexCount>65535?c.a.Uint32Array:c.a.Uint16Array;if(e[0]&&e[0].length){var n=0;t=new r(3*e.length);for(var i=0;i<e.length;i++)for(var a=0;a<3;a++)t[n++]=e[i][a]}else t=new r(e);this.indices=t},createAttribute:function(e,t,r,n){var i=new a(e,t,r,n);return this.attributes[e]&&this.removeAttribute(e),this.attributes[e]=i,this._attributeList.push(e),i},removeAttribute:function(e){var t=this._attributeList,r=t.indexOf(e);return r>=0&&(t.splice(r,1),delete this.attributes[e],!0)},getAttribute:function(e){return this.attributes[e]},getEnabledAttributes:function(){var e=this._enabledAttributes,t=this._attributeList;if(e)return e;for(var r=[],n=this.vertexCount,i=0;i<t.length;i++){var a=t[i],o=this.attributes[a];o.value&&o.value.length===n*o.size&&r.push(a)}return this._enabledAttributes=r,r},getBufferChunks:function(e){var t=this._cache;t.use(e.__uid__);var r=t.isDirty("attributes"),n=t.isDirty("indices");if(r||n){this._updateBuffer(e.gl,r,n);for(var a=this.getEnabledAttributes(),o=0;o<a.length;o++)t.fresh(i(a[o]));t.fresh("attributes"),t.fresh("indices")}return t.fresh("any"),t.get("chunks")},_updateBuffer:function(e,t,r){var n=this._cache,a=n.get("chunks"),u=!1;a||(a=[],a[0]={attributeBuffers:[],indicesBuffer:null},n.put("chunks",a),u=!0);var h=a[0],c=h.attributeBuffers,d=h.indicesBuffer;if(t||u){var f=this.getEnabledAttributes(),p={};if(!u)for(var m=0;m<c.length;m++)p[c[m].name]=c[m];for(var g=0;g<f.length;g++){var _,v=f[g],y=this.attributes[v];u||(_=p[v]);var x;x=_?_.buffer:e.createBuffer(),n.isDirty(i(v))&&(e.bindBuffer(e.ARRAY_BUFFER,x),e.bufferData(e.ARRAY_BUFFER,y.value,this.dynamic?l.a.DYNAMIC_DRAW:l.a.STATIC_DRAW)),c[g]=new o(v,y.type,x,y.size,y.semantic)}for(var m=g;m<c.length;m++)e.deleteBuffer(c[m].buffer);c.length=g}this.isUseIndices()&&(r||u)&&(d||(d=new s(e.createBuffer()),h.indicesBuffer=d),d.count=this.indices.length,e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,d.buffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indices,this.dynamic?l.a.DYNAMIC_DRAW:l.a.STATIC_DRAW))},dispose:function(e){var t=this._cache;t.use(e.__uid__);var r=t.get("chunks");if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=0;a<i.attributeBuffers.length;a++){var o=i.attributeBuffers[a];e.gl.deleteBuffer(o.buffer)}i.indicesBuffer&&e.gl.deleteBuffer(i.indicesBuffer.buffer)}if(this.__vaoCache){var s=e.getGLExtension("OES_vertex_array_object");for(var u in this.__vaoCache){var l=this.__vaoCache[u].vao;l&&s.deleteVertexArrayOES(l)}}this.__vaoCache={},t.deleteContext(e.__uid__)}});Object.defineProperty&&(Object.defineProperty(d.prototype,"vertexCount",{enumerable:!1,get:function(){var e=this.attributes[this.mainAttribute];return e||(e=this.attributes[this._attributeList[0]]),e&&e.value?e.value.length/e.size:0}}),Object.defineProperty(d.prototype,"triangleCount",{enumerable:!1,get:function(){var e=this.indices;return e?e.length/3:0}})),d.STATIC_DRAW=l.a.STATIC_DRAW,d.DYNAMIC_DRAW=l.a.DYNAMIC_DRAW,d.STREAM_DRAW=l.a.STREAM_DRAW,d.AttributeBuffer=o,d.IndicesBuffer=s,d.Attribute=a,t.a=d},function(e,t,r){"use strict";var n=r(120),i=":unconfigurable;";t.a=["@export clay.header.directional_light","uniform vec3 directionalLightDirection[DIRECTIONAL_LIGHT_COUNT]"+i,"uniform vec3 directionalLightColor[DIRECTIONAL_LIGHT_COUNT]"+i,"@end","@export clay.header.ambient_light","uniform vec3 ambientLightColor[AMBIENT_LIGHT_COUNT]"+i,"@end","@export clay.header.ambient_sh_light","uniform vec3 ambientSHLightColor[AMBIENT_SH_LIGHT_COUNT]"+i,"uniform vec3 ambientSHLightCoefficients[AMBIENT_SH_LIGHT_COUNT * 9]"+i,n.a,"@end","@export clay.header.ambient_cubemap_light","uniform vec3 ambientCubemapLightColor[AMBIENT_CUBEMAP_LIGHT_COUNT]"+i,"uniform samplerCube ambientCubemapLightCubemap[AMBIENT_CUBEMAP_LIGHT_COUNT]"+i,"uniform sampler2D ambientCubemapLightBRDFLookup[AMBIENT_CUBEMAP_LIGHT_COUNT]"+i,"@end","@export clay.header.point_light","uniform vec3 pointLightPosition[POINT_LIGHT_COUNT]"+i,"uniform float pointLightRange[POINT_LIGHT_COUNT]"+i,"uniform vec3 pointLightColor[POINT_LIGHT_COUNT]"+i,"@end","@export clay.header.spot_light","uniform vec3 spotLightPosition[SPOT_LIGHT_COUNT]"+i,"uniform vec3 spotLightDirection[SPOT_LIGHT_COUNT]"+i,"uniform float spotLightRange[SPOT_LIGHT_COUNT]"+i,"uniform float spotLightUmbraAngleCosine[SPOT_LIGHT_COUNT]"+i,"uniform float spotLightPenumbraAngleCosine[SPOT_LIGHT_COUNT]"+i,"uniform float spotLightFalloffFactor[SPOT_LIGHT_COUNT]"+i,"uniform vec3 spotLightColor[SPOT_LIGHT_COUNT]"+i,"@end"].join("\n")},function(e,t,r){"use strict";t.a="vec3 calcAmbientSHLight(int idx, vec3 N) {\n int offset = 9 * idx;\n return ambientSHLightCoefficients[0]\n + ambientSHLightCoefficients[1] * N.x\n + ambientSHLightCoefficients[2] * N.y\n + ambientSHLightCoefficients[3] * N.z\n + ambientSHLightCoefficients[4] * N.x * N.z\n + ambientSHLightCoefficients[5] * N.z * N.y\n + ambientSHLightCoefficients[6] * N.y * N.x\n + ambientSHLightCoefficients[7] * (3.0 * N.z * N.z - 1.0)\n + ambientSHLightCoefficients[8] * (N.x * N.x - N.y * N.y);\n}"},function(e,t,r){"use strict";t.a="@export clay.skybox.vertex\n#define SHADER_NAME skybox\nuniform mat4 world : WORLD;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nvarying vec3 v_WorldPosition;\nvoid main()\n{\n v_WorldPosition = (world * vec4(position, 1.0)).xyz;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n@export clay.skybox.fragment\n#define PI 3.1415926\nuniform mat4 viewInverse : VIEWINVERSE;\n#ifdef EQUIRECTANGULAR\nuniform sampler2D environmentMap;\n#else\nuniform samplerCube environmentMap;\n#endif\nuniform float lod: 0.0;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\n@import clay.util.srgb\n@import clay.util.ACES\nvoid main()\n{\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n#ifdef EQUIRECTANGULAR\n float phi = acos(V.y);\n float theta = atan(-V.x, V.z) + PI * 0.5;\n vec2 uv = vec2(theta / 2.0 / PI, phi / PI);\n vec4 texel = decodeHDR(texture2D(environmentMap, fract(uv)));\n#else\n #if defined(LOD) || defined(SUPPORT_TEXTURE_LOD)\n vec4 texel = decodeHDR(textureCubeLodEXT(environmentMap, V, lod));\n #else\n vec4 texel = decodeHDR(textureCube(environmentMap, V));\n #endif\n#endif\n#ifdef SRGB_DECODE\n texel = sRGBToLinear(texel);\n#endif\n#ifdef TONEMAPPING\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n#ifdef SRGB_ENCODE\n texel = linearTosRGB(texel);\n#endif\n gl_FragColor = encodeHDR(vec4(texel.rgb, 1.0));\n}\n@end"},function(e,t,r){"use strict";function n(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}var i=r(4),a=r(5),o=(r(27),n("DXT1")),s=n("DXT3"),u=n("DXT5"),l={parse:function(e,t){var r=new Int32Array(e,0,31);if(542327876!==r[0])return null;if(4&!r(20))return null;var n,l,h=r(21),c=r[4],d=r[3],f=512&r[28],p=131072&r[2];switch(h){case o:n=8,l=i.a.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case s:n=16,l=i.a.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case u:n=16,l=i.a.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var m=r[1]+4,g=f?6:1,_=1;p&&(_=Math.max(1,r[7]));for(var v=[],y=0;y<g;y++){var x=c,T=d;v[y]=new a.a({width:x,height:T,format:l});for(var b=[],w=0;w<_;w++){var E=Math.max(4,x)/4*Math.max(4,T)/4*n,S=new Uint8Array(e,m,E);m+=E,x*=.5,T*=.5,b[w]=S}v[y].pixels=b[0],p&&(v[y].mipmaps=b)}if(!t)return v[0];t.width=v[0].width,t.height=v[0].height,t.format=v[0].format,t.pixels=v[0].pixels,t.mipmaps=v[0].mipmaps}};t.a=l},function(e,t,r){"use strict";function n(e,t,r,n){if(e[3]>0){var i=Math.pow(2,e[3]-128-8+n);t[r+0]=e[0]*i,t[r+1]=e[1]*i,t[r+2]=e[2]*i}else t[r+0]=0,t[r+1]=0,t[r+2]=0;return t[r+3]=1,t}function i(e,t,r){for(var n="",i=t;i<r;i++)n+=h(e[i]);return n}function a(e,t){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]}function o(e,t,r,n){for(var i=0,o=0,s=n;s>0;)if(e[o][0]=t[r++],e[o][1]=t[r++],e[o][2]=t[r++],e[o][3]=t[r++],1===e[o][0]&&1===e[o][1]&&1===e[o][2]){for(var u=e[o][3]<<i>>>0;u>0;u--)a(e[o-1],e[o]),o++,s--;i+=8}else o++,s--,i=0;return r}function s(e,t,r,n){if(n<c|n>d)return o(e,t,r,n);var i=t[r++];if(2!=i)return o(e,t,r-1,n);if(e[0][1]=t[r++],e[0][2]=t[r++],i=t[r++],(e[0][2]<<8>>>0|i)>>>0!==n)return null;for(var i=0;i<4;i++)for(var a=0;a<n;){var s=t[r++];if(s>128){s=(127&s)>>>0;for(var u=t[r++];s--;)e[a++][i]=u}else for(;s--;)e[a++][i]=t[r++]}return r}var u=r(4),l=r(5),h=String.fromCharCode,c=8,d=32767,f={parseRGBE:function(e,t,r){null==r&&(r=0);var a=new Uint8Array(e),o=a.length;if("#?"===i(a,0,2)){for(var c=2;c<o&&("\n"!==h(a[c])||"\n"!==h(a[c+1]));c++);if(!(c>=o)){c+=2;for(var d="";c<o;c++){var f=h(a[c]);if("\n"===f)break;d+=f}var p=d.split(" "),m=parseInt(p[1]),g=parseInt(p[3]);if(g&&m){for(var _=c+1,v=[],y=0;y<g;y++){v[y]=[];for(var x=0;x<4;x++)v[y][x]=0}for(var T=new Float32Array(g*m*4),b=0,w=0;w<m;w++){var _=s(v,a,_,g);if(!_)return null;for(var y=0;y<g;y++)n(v[y],T,b,r),b+=4}return t||(t=new l.a),t.width=g,t.height=m,t.pixels=T,t.type=u.a.FLOAT,t}}}},parseRGBEFromPNG:function(e){}};t.a=f},function(e,t,r){"use strict";function n(e){return"_on"+e}var i=r(5),a=r(3),o=r(26),s=["mousedown","mouseup","mousemove","mouseover","mouseout","click","dblclick","contextmenu"],u=function(e){var t=this;this._texture=new i.a({anisotropic:32,flipY:!1,surface:this,dispose:function(e){t.dispose(),i.a.prototype.dispose.call(this,e)}}),s.forEach(function(e){this[n(e)]=function(t){t.triangle&&this._meshes.forEach(function(r){this.dispatchEvent(e,r,t.triangle,t.point)},this)}},this),this._meshes=[],e&&this.setECharts(e),this.onupdate=null};u.prototype={constructor:u,getTexture:function(){return this._texture},setECharts:function(e){this._chart=e;var t=e.getDom();if(t instanceof HTMLCanvasElement){var r=this,n=e.getZr(),i=n.__oldRefreshImmediately||n.refreshImmediately;n.refreshImmediately=function(){i.call(this),r._texture.dirty(),r.onupdate&&r.onupdate()},n.__oldRefreshImmediately=i}else console.error("ECharts must init on canvas if it is used as texture."),t=document.createElement("canvas");this._texture.image=t,this._texture.dirty(),this.onupdate&&this.onupdate()},dispatchEvent:function(){var e=new a.a,t=new a.a,r=new a.a,n=new o.a,i=new o.a,s=new o.a,u=new o.a,l=new a.a;return function(h,c,d,f){var p=c.geometry,m=p.attributes.position,g=p.attributes.texcoord0,_=a.a.dot,v=a.a.cross;m.get(d[0],e.array),m.get(d[1],t.array),m.get(d[2],r.array),g.get(d[0],n.array),g.get(d[1],i.array),g.get(d[2],s.array),v(l,t,r);var y=_(e,l),x=_(f,l)/y;v(l,r,e);var T=_(f,l)/y;v(l,e,t);var b=_(f,l)/y;o.a.scale(u,n,x),o.a.scaleAndAdd(u,u,i,T),o.a.scaleAndAdd(u,u,s,b);var w=u.x*this._chart.getWidth(),E=u.y*this._chart.getHeight();this._chart.getZr().handler.dispatch(h,{zrX:w,zrY:E})}}(),attachToMesh:function(e){this._meshes.indexOf(e)>=0||(s.forEach(function(t){e.on(t,this[n(t)],this)},this),this._meshes.push(e))},detachFromMesh:function(e){var t=this._meshes.indexOf(e);t>=0&&this._meshes.splice(t,1),s.forEach(function(t){e.off(t,this[n(t)])},this)},dispose:function(){this._meshes.forEach(function(e){this.detachFromMesh(e)},this)}},t.a=u},function(e,t,r){"use strict";var n=r(24),i=r(77),a=n.a.extend({cubemap:null,castShadow:!1,_normalDistribution:null,_brdfLookup:null},{type:"AMBIENT_CUBEMAP_LIGHT",prefilter:function(e,t){if(!e.getGLExtension("EXT_shader_texture_lod"))return void console.warn("Device not support textureCubeLodEXT");this._brdfLookup||(this._normalDistribution=i.a.generateNormalDistribution(),this._brdfLookup=i.a.integrateBRDF(e,this._normalDistribution));var r=this.cubemap;if(!r.__prefiltered){var n=i.a.prefilterEnvironmentMap(e,r,{encodeRGBM:!0,width:t,height:t},this._normalDistribution,this._brdfLookup);this.cubemap=n.environmentMap,this.cubemap.__prefiltered=!0,r.dispose(e)}},getBRDFLookup:function(){return this._brdfLookup},uniformTemplates:{ambientCubemapLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}},ambientCubemapLightCubemap:{type:"t",value:function(e){return e.cubemap}},ambientCubemapLightBRDFLookup:{type:"t",value:function(e){return e._brdfLookup}}}});t.a=a},function(e,t,r){"use strict";t.a="\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end"},function(e,t,r){"use strict";t.a="#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform sampler2D normalDistribution;\nuniform vec2 viewportSize : [512, 256];\nconst vec3 N = vec3(0.0, 0.0, 1.0);\nconst float fSampleNumber = float(SAMPLE_NUMBER);\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"},function(e,t,r){"use strict";t.a="#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"},function(e,t,r){"use strict";var n=r(24),i=r(14),a=n.a.extend({castShadow:!1,coefficients:[]},function(){this._coefficientsTmpArr=new i.a.Float32Array(27)},{type:"AMBIENT_SH_LIGHT",uniformTemplates:{ambientSHLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}},ambientSHLightCoefficients:{type:"3f",value:function(e){for(var t=e._coefficientsTmpArr,r=0;r<e.coefficients.length;r++)t[r]=e.coefficients[r];return t}}}});t.a=a},function(e,t,r){"use strict";function n(e,t){var r=e[0],n=e[1],i=e[2];return 0===t?1:1===t?r:2===t?n:3===t?i:4===t?r*i:5===t?n*i:6===t?r*n:7===t?3*i*i-1:r*r-n*n}function i(e,t,r,i){for(var a=new u.a.Float32Array(27),o=f.a.create(),s=f.a.create(),l=f.a.create(),h=0;h<9;h++){for(var c=f.a.create(),d=0;d<m.length;d++){for(var p=t[m[d]],_=f.a.create(),v=0,y=0,x=g[m[d]],T=0;T<i;T++)for(var b=0;b<r;b++){o[0]=b/(r-1)*2-1,o[1]=T/(i-1)*2-1,o[2]=-1,f.a.normalize(o,o),l[0]=o[x[0]]*x[3],l[1]=o[x[1]]*x[4],l[2]=o[x[2]]*x[5],s[0]=p[y++]/255,s[1]=p[y++]/255,s[2]=p[y++]/255;var w=p[y++]/255*8.12;s[0]*=w,s[1]*=w,s[2]*=w,f.a.scaleAndAdd(_,_,s,n(l,h)*-o[2]),v+=-o[2]}f.a.scaleAndAdd(c,c,_,1/v)}a[3*h]=c[0]/6,a[3*h+1]=c[1]/6,a[3*h+2]=c[2]/6}return a}var a=r(4),o=r(10),s=r(5),u=(r(16),r(14)),l=r(42),h=r(75),c=r(62),d=r(36),f=r(12),p=(r(131),{}),m=["px","nx","py","ny","pz","nz"],g={px:[2,1,0,-1,-1,1],nx:[2,1,0,1,-1,-1],py:[0,2,1,1,-1,-1],ny:[0,2,1,1,1,1],pz:[0,1,2,-1,-1,-1],nz:[0,1,2,1,-1,1]};p.projectEnvironmentMap=function(e,t,r){r=r||{},r.lod=r.lod||0;var n,u=new d.a,f=64;"texture2D"===t.textureType?n=new h.a({scene:u,environmentMap:t}):(f=t.image&&t.image.px?t.image.px.width:t.width,n=new l.a({scene:u,environmentMap:t}));var p=Math.ceil(f/Math.pow(2,r.lod)),g=Math.ceil(f/Math.pow(2,r.lod)),_=new s.a({width:p,height:g}),v=new o.a;n.material.define("fragment","RGBM_ENCODE"),r.decodeRGBM&&n.material.define("fragment","RGBM_DECODE"),n.material.set("lod",r.lod);for(var y=new c.a({texture:_}),x={},T=0;T<m.length;T++){x[m[T]]=new Uint8Array(p*g*4);var b=y.getCamera(m[T]);b.fov=90,v.attach(_),v.bind(e),e.render(u,b),e.gl.readPixels(0,0,p,g,a.a.RGBA,a.a.UNSIGNED_BYTE,x[m[T]]),v.unbind(e)}return n.dispose(e),v.dispose(e),_.dispose(e),i(e,x,p,g)},t.a=p},function(e,t,r){"use strict";t.a="uniform samplerCube environmentMap;\nvarying vec2 v_Texcoord;\n#define TEXTURE_SIZE 16\nmat3 front = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n);\nmat3 back = mat3(\n -1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, -1.0\n);\nmat3 left = mat3(\n 0.0, 0.0, -1.0,\n 0.0, 1.0, 0.0,\n 1.0, 0.0, 0.0\n);\nmat3 right = mat3(\n 0.0, 0.0, 1.0,\n 0.0, 1.0, 0.0,\n -1.0, 0.0, 0.0\n);\nmat3 up = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 0.0, 1.0,\n 0.0, -1.0, 0.0\n);\nmat3 down = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 0.0, -1.0,\n 0.0, 1.0, 0.0\n);\nfloat harmonics(vec3 normal){\n int index = int(gl_FragCoord.x);\n float x = normal.x;\n float y = normal.y;\n float z = normal.z;\n if(index==0){\n return 1.0;\n }\n else if(index==1){\n return x;\n }\n else if(index==2){\n return y;\n }\n else if(index==3){\n return z;\n }\n else if(index==4){\n return x*z;\n }\n else if(index==5){\n return y*z;\n }\n else if(index==6){\n return x*y;\n }\n else if(index==7){\n return 3.0*z*z - 1.0;\n }\n else{\n return x*x - y*y;\n }\n}\nvec3 sampleSide(mat3 rot)\n{\n vec3 result = vec3(0.0);\n float divider = 0.0;\n for (int i = 0; i < TEXTURE_SIZE * TEXTURE_SIZE; i++) {\n float x = mod(float(i), float(TEXTURE_SIZE));\n float y = float(i / TEXTURE_SIZE);\n vec2 sidecoord = ((vec2(x, y) + vec2(0.5, 0.5)) / vec2(TEXTURE_SIZE)) * 2.0 - 1.0;\n vec3 normal = normalize(vec3(sidecoord, -1.0));\n vec3 fetchNormal = rot * normal;\n vec3 texel = textureCube(environmentMap, fetchNormal).rgb;\n result += harmonics(fetchNormal) * texel * -normal.z;\n divider += -normal.z;\n }\n return result / divider;\n}\nvoid main()\n{\n vec3 result = (\n sampleSide(front) +\n sampleSide(back) +\n sampleSide(left) +\n sampleSide(right) +\n sampleSide(up) +\n sampleSide(down)\n ) / 6.0;\n gl_FragColor = vec4(result, 1.0);\n}"},function(e,t,r){"use strict";var n=r(15),i=r(18),a=n.a.extend({dynamic:!1,widthSegments:40,heightSegments:20,phiStart:0,phiLength:2*Math.PI,thetaStart:0,thetaLength:Math.PI,radius:1},function(){this.build()},{build:function(){var e=this.heightSegments,t=this.widthSegments,r=this.attributes.position,n=this.attributes.texcoord0,a=this.attributes.normal,o=(t+1)*(e+1);r.init(o),n.init(o),a.init(o);var s,u,l,h,c,d,f,p=o>65535?Uint32Array:Uint16Array,m=this.indices=new p(t*e*6),g=this.radius,_=this.phiStart,v=this.phiLength,y=this.thetaStart,x=this.thetaLength,g=this.radius,T=[],b=[],w=0,E=1/g;for(f=0;f<=e;f++)for(d=0;d<=t;d++)h=d/t,c=f/e,s=-g*Math.cos(_+h*v)*Math.sin(y+c*x),u=g*Math.cos(y+c*x),l=g*Math.sin(_+h*v)*Math.sin(y+c*x),T[0]=s,T[1]=u,T[2]=l,b[0]=h,b[1]=c,r.set(w,T),n.set(w,b),T[0]*=E,T[1]*=E,T[2]*=E,a.set(w,T),w++;var S,A,M,C,L=t+1,D=0;for(f=0;f<e;f++)for(d=0;d<t;d++)A=f*L+d,S=f*L+d+1,C=(f+1)*L+d+1,M=(f+1)*L+d,m[D++]=S,m[D++]=A,m[D++]=C,m[D++]=A,m[D++]=M,m[D++]=C;this.boundingBox=new i.a,this.boundingBox.max.set(g,g,g),this.boundingBox.min.set(-g,-g,-g)}});t.a=a},function(e,t,r){"use strict";var n=r(24),i=n.a.extend({castShadow:!1},{type:"AMBIENT_LIGHT",uniformTemplates:{ambientLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}}}});t.a=i},function(e,t,r){"use strict";var n=r(24),i=r(3),a=n.a.extend({shadowBias:.001,shadowSlopeScale:2,shadowCascade:1,cascadeSplitLogFactor:.2},{type:"DIRECTIONAL_LIGHT",uniformTemplates:{directionalLightDirection:{type:"3f",value:function(e){return e.__dir=e.__dir||new i.a,e.__dir.copy(e.worldTransform.z).normalize().negate().array}},directionalLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}}},clone:function(){var e=n.a.prototype.clone.call(this);return e.shadowBias=this.shadowBias,e.shadowSlopeScale=this.shadowSlopeScale,e}});t.a=a},function(e,t,r){"use strict";var n=r(24),i=n.a.extend({range:100,castShadow:!1},{type:"POINT_LIGHT",uniformTemplates:{pointLightPosition:{type:"3f",value:function(e){return e.getWorldPosition().array}},pointLightRange:{type:"1f",value:function(e){return e.range}},pointLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}}},clone:function(){var e=n.a.prototype.clone.call(this);return e.range=this.range,e}});t.a=i},function(e,t,r){"use strict";var n=r(24),i=r(3),a=n.a.extend({range:20,umbraAngle:30,penumbraAngle:45,falloffFactor:2,shadowBias:.001,shadowSlopeScale:2},{type:"SPOT_LIGHT",uniformTemplates:{spotLightPosition:{type:"3f",value:function(e){return e.getWorldPosition().array}},spotLightRange:{type:"1f",value:function(e){return e.range}},spotLightUmbraAngleCosine:{type:"1f",value:function(e){return Math.cos(e.umbraAngle*Math.PI/180)}},spotLightPenumbraAngleCosine:{type:"1f",value:function(e){return Math.cos(e.penumbraAngle*Math.PI/180)}},spotLightFalloffFactor:{type:"1f",value:function(e){return e.falloffFactor}},spotLightDirection:{type:"3f",value:function(e){return e.__dir=e.__dir||new i.a,e.__dir.copy(e.worldTransform.z).negate().array}},spotLightColor:{type:"3f",value:function(e){var t=e.color,r=e.intensity;return[t[0]*r,t[1]*r,t[2]*r]}}},clone:function(){var e=n.a.prototype.clone.call(this);return e.range=this.range,e.umbraAngle=this.umbraAngle,e.penumbraAngle=this.penumbraAngle,e.falloffFactor=this.falloffFactor,e.shadowBias=this.shadowBias,e.shadowSlopeScale=this.shadowSlopeScale,e}});t.a=a},function(e,t,r){"use strict";var n=r(33),i=function(e,t,r,i){e=e||0,t=t||0,r=r||0,i=i||0,this.array=n.a.fromValues(e,t,r,i),this._dirty=!0};i.prototype={constructor:i,add:function(e){return n.a.add(this.array,this.array,e.array),this._dirty=!0,this},set:function(e,t,r,n){return this.array[0]=e,this.array[1]=t,this.array[2]=r,this.array[3]=n,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this.array[2]=e[2],this.array[3]=e[3],this._dirty=!0,this},clone:function(){return new i(this.x,this.y,this.z,this.w)},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},dist:function(e){return n.a.dist(this.array,e.array)},distance:function(e){return n.a.distance(this.array,e.array)},div:function(e){return n.a.div(this.array,this.array,e.array),this._dirty=!0,this},divide:function(e){return n.a.divide(this.array,this.array,e.array),this._dirty=!0,this},dot:function(e){return n.a.dot(this.array,e.array)},len:function(){return n.a.len(this.array)},length:function(){return n.a.length(this.array)},lerp:function(e,t,r){return n.a.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},min:function(e){return n.a.min(this.array,this.array,e.array),this._dirty=!0,this},max:function(e){return n.a.max(this.array,this.array,e.array),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},negate:function(){return n.a.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return n.a.normalize(this.array,this.array),this._dirty=!0,this},random:function(e){return n.a.random(this.array,e),this._dirty=!0,this},scale:function(e){return n.a.scale(this.array,this.array,e),this._dirty=!0,this},scaleAndAdd:function(e,t){return n.a.scaleAndAdd(this.array,this.array,e.array,t),this._dirty=!0,this},sqrDist:function(e){return n.a.sqrDist(this.array,e.array)},squaredDistance:function(e){return n.a.squaredDistance(this.array,e.array)},sqrLen:function(){return n.a.sqrLen(this.array)},squaredLength:function(){return n.a.squaredLength(this.array)},sub:function(e){return n.a.sub(this.array,this.array,e.array),this._dirty=!0,this},subtract:function(e){return n.a.subtract(this.array,this.array,e.array),this._dirty=!0,this},transformMat4:function(e){return n.a.transformMat4(this.array,this.array,e.array),this._dirty=!0,this},transformQuat:function(e){return n.a.transformQuat(this.array,this.array,e.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var a=Object.defineProperty;if(a){var o=i.prototype;a(o,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),a(o,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}}),a(o,"z",{get:function(){return this.array[2]},set:function(e){this.array[2]=e,this._dirty=!0}}),a(o,"w",{get:function(){return this.array[3]},set:function(e){this.array[3]=e,this._dirty=!0}})}i.add=function(e,t,r){return n.a.add(e.array,t.array,r.array),e._dirty=!0,e},i.set=function(e,t,r,i,a){n.a.set(e.array,t,r,i,a),e._dirty=!0},i.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},i.dist=function(e,t){return n.a.distance(e.array,t.array)},i.distance=i.dist,i.div=function(e,t,r){return n.a.divide(e.array,t.array,r.array),e._dirty=!0,e},i.divide=i.div,i.dot=function(e,t){return n.a.dot(e.array,t.array)},i.len=function(e){return n.a.length(e.array)},i.lerp=function(e,t,r,i){return n.a.lerp(e.array,t.array,r.array,i),e._dirty=!0,e},i.min=function(e,t,r){return n.a.min(e.array,t.array,r.array),e._dirty=!0,e},i.max=function(e,t,r){return n.a.max(e.array,t.array,r.array),e._dirty=!0,e},i.mul=function(e,t,r){return n.a.multiply(e.array,t.array,r.array),e._dirty=!0,e},i.multiply=i.mul,i.negate=function(e,t){return n.a.negate(e.array,t.array),e._dirty=!0,e},i.normalize=function(e,t){return n.a.normalize(e.array,t.array),e._dirty=!0,e},i.random=function(e,t){return n.a.random(e.array,t),e._dirty=!0,e},i.scale=function(e,t,r){return n.a.scale(e.array,t.array,r),e._dirty=!0,e},i.scaleAndAdd=function(e,t,r,i){return n.a.scaleAndAdd(e.array,t.array,r.array,i),e._dirty=!0,e},i.sqrDist=function(e,t){return n.a.sqrDist(e.array,t.array)},i.squaredDistance=i.sqrDist,i.sqrLen=function(e){return n.a.sqrLen(e.array)},i.squaredLength=i.sqrLen,i.sub=function(e,t,r){return n.a.subtract(e.array,t.array,r.array),e._dirty=!0,e},i.subtract=i.sub,i.transformMat4=function(e,t,r){return n.a.transformMat4(e.array,t.array,r.array),e._dirty=!0,e},i.transformQuat=function(e,t,r){return n.a.transformQuat(e.array,t.array,r.array),e._dirty=!0,e},t.a=i},function(e,t,r){"use strict";var n=r(78),i=function(){this.array=n.a.create(),this._dirty=!0};i.prototype={constructor:i,setArray:function(e){for(var t=0;t<this.array.length;t++)this.array[t]=e[t];return this._dirty=!0,this},clone:function(){return(new i).copy(this)},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},adjoint:function(){return n.a.adjoint(this.array,this.array),this._dirty=!0,this},determinant:function(){return n.a.determinant(this.array)},identity:function(){return n.a.identity(this.array),this._dirty=!0,this},invert:function(){return n.a.invert(this.array,this.array),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return n.a.mul(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return n.a.multiply(this.array,e.array,this.array),this._dirty=!0,this},rotate:function(e){return n.a.rotate(this.array,this.array,e),this._dirty=!0,this},scale:function(e){return n.a.scale(this.array,this.array,e.array),this._dirty=!0,this},transpose:function(){return n.a.transpose(this.array,this.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},i.adjoint=function(e,t){return n.a.adjoint(e.array,t.array),e._dirty=!0,e},i.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},i.determinant=function(e){return n.a.determinant(e.array)},i.identity=function(e){return n.a.identity(e.array),e._dirty=!0,e},i.invert=function(e,t){return n.a.invert(e.array,t.array),e._dirty=!0,e},i.mul=function(e,t,r){return n.a.mul(e.array,t.array,r.array),e._dirty=!0,e},i.multiply=i.mul,i.rotate=function(e,t,r){return n.a.rotate(e.array,t.array,r),e._dirty=!0,e},i.scale=function(e,t,r){return n.a.scale(e.array,t.array,r.array),e._dirty=!0,e},i.transpose=function(e,t){return n.a.transpose(e.array,t.array),e._dirty=!0,e},t.a=i},function(e,t,r){"use strict";var n=r(79),i=function(){this.array=n.a.create(),this._dirty=!0};i.prototype={constructor:i,setArray:function(e){for(var t=0;t<this.array.length;t++)this.array[t]=e[t];return this._dirty=!0,this},clone:function(){return(new i).copy(this)},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},determinant:function(){return n.a.determinant(this.array)},identity:function(){return n.a.identity(this.array),this._dirty=!0,this},invert:function(){return n.a.invert(this.array,this.array),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return n.a.mul(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return n.a.multiply(this.array,e.array,this.array),this._dirty=!0,this},rotate:function(e){return n.a.rotate(this.array,this.array,e),this._dirty=!0,this},scale:function(e){return n.a.scale(this.array,this.array,e.array),this._dirty=!0,this},translate:function(e){return n.a.translate(this.array,this.array,e.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},i.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},i.determinant=function(e){return n.a.determinant(e.array)},i.identity=function(e){return n.a.identity(e.array),e._dirty=!0,e},i.invert=function(e,t){return n.a.invert(e.array,t.array),e._dirty=!0,e},i.mul=function(e,t,r){return n.a.mul(e.array,t.array,r.array),e._dirty=!0,e},i.multiply=i.mul,i.rotate=function(e,t,r){return n.a.rotate(e.array,t.array,r),e._dirty=!0,e},i.scale=function(e,t,r){return n.a.scale(e.array,t.array,r.array),e._dirty=!0,e},i.translate=function(e,t,r){return n.a.translate(e.array,t.array,r.array),e._dirty=!0,e},t.a=i},function(e,t,r){"use strict";var n=r(34),i=function(){this.array=n.a.create(),this._dirty=!0};i.prototype={constructor:i,setArray:function(e){for(var t=0;t<this.array.length;t++)this.array[t]=e[t];return this._dirty=!0,this},adjoint:function(){return n.a.adjoint(this.array,this.array),this._dirty=!0,this},clone:function(){return(new i).copy(this)},copy:function(e){return n.a.copy(this.array,e.array),this._dirty=!0,this},determinant:function(){return n.a.determinant(this.array)},fromMat2d:function(e){return n.a.fromMat2d(this.array,e.array),this._dirty=!0,this},fromMat4:function(e){return n.a.fromMat4(this.array,e.array),this._dirty=!0,this},fromQuat:function(e){return n.a.fromQuat(this.array,e.array),this._dirty=!0,this},identity:function(){return n.a.identity(this.array),this._dirty=!0,this},invert:function(){return n.a.invert(this.array,this.array),this._dirty=!0,this},mul:function(e){return n.a.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return n.a.mul(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return n.a.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return n.a.multiply(this.array,e.array,this.array),this._dirty=!0,this},rotate:function(e){return n.a.rotate(this.array,this.array,e),this._dirty=!0,this},scale:function(e){return n.a.scale(this.array,this.array,e.array),this._dirty=!0,this},translate:function(e){return n.a.translate(this.array,this.array,e.array),this._dirty=!0,this},normalFromMat4:function(e){return n.a.normalFromMat4(this.array,e.array),this._dirty=!0,this},transpose:function(){return n.a.transpose(this.array,this.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},i.adjoint=function(e,t){return n.a.adjoint(e.array,t.array),e._dirty=!0,e},i.copy=function(e,t){return n.a.copy(e.array,t.array),e._dirty=!0,e},i.determinant=function(e){return n.a.determinant(e.array)},i.identity=function(e){return n.a.identity(e.array),e._dirty=!0,e},i.invert=function(e,t){return n.a.invert(e.array,t.array),e},i.mul=function(e,t,r){return n.a.mul(e.array,t.array,r.array),e._dirty=!0,e},i.multiply=i.mul,i.fromMat2d=function(e,t){return n.a.fromMat2d(e.array,t.array),e._dirty=!0,e},i.fromMat4=function(e,t){return n.a.fromMat4(e.array,t.array),e._dirty=!0,e},i.fromQuat=function(e,t){return n.a.fromQuat(e.array,t.array),e._dirty=!0,e},i.normalFromMat4=function(e,t){return n.a.normalFromMat4(e.array,t.array),e._dirty=!0,e},i.rotate=function(e,t,r){return n.a.rotate(e.array,t.array,r),e._dirty=!0,e},i.scale=function(e,t,r){return n.a.scale(e.array,t.array,r.array),e._dirty=!0,e},i.transpose=function(e,t){return n.a.transpose(e.array,t.array),e._dirty=!0,e},i.translate=function(e,t,r){return n.a.translate(e.array,t.array,r.array),e._dirty=!0,e},t.a=i},function(e,t,r){"use strict";var n=r(142),i=r.n(n),a={_animators:null,getAnimators:function(){return this._animators=this._animators||[],this._animators},animate:function(e,t){this._animators=this._animators||[];var r,n=this;if(e){for(var a=e.split("."),o=n,s=0,u=a.length;s<u;s++)o&&(o=o[a[s]]);o&&(r=o)}else r=n;if(null==r)throw new Error("Target "+e+" not exists");var l=this._animators,h=new i.a(r,t),c=this;return h.during(function(){c.__zr&&c.__zr.refresh()}).done(function(){var e=l.indexOf(h);e>=0&&l.splice(e,1)}),l.push(h),this.__zr&&this.__zr.animation.addAnimator(h),h},stopAnimation:function(e){this._animators=this._animators||[];for(var t=this._animators,r=t.length,n=0;n<r;n++)t[n].stop(e);return t.length=0,this},addAnimatorsToZr:function(e){if(this._animators)for(var t=0;t<this._animators.length;t++)e.animation.addAnimator(this._animators[t])},removeAnimatorsFromZr:function(e){if(this._animators)for(var t=0;t<this._animators.length;t++)e.animation.removeAnimator(this._animators[t])}};t.a=a},function(e,t,r){function n(e,t){return e[t]}function i(e,t,r){e[t]=r}function a(e,t,r){return(t-e)*r+e}function o(e,t,r){return r>.5?t:e}function s(e,t,r,n,i){var o=e.length;if(1==i)for(var s=0;s<o;s++)n[s]=a(e[s],t[s],r);else for(var u=o&&e[0].length,s=0;s<o;s++)for(var l=0;l<u;l++)n[s][l]=a(e[s][l],t[s][l],r)}function u(e,t,r){var n=e.length,i=t.length;if(n!==i){if(n>i)e.length=i;else for(var a=n;a<i;a++)e.push(1===r?t[a]:x.call(t[a]))}for(var o=e[0]&&e[0].length,a=0;a<e.length;a++)if(1===r)isNaN(e[a])&&(e[a]=t[a]);else for(var s=0;s<o;s++)isNaN(e[a][s])&&(e[a][s]=t[a][s])}function l(e,t,r){if(e===t)return!0;var n=e.length;if(n!==t.length)return!1;if(1===r){for(var i=0;i<n;i++)if(e[i]!==t[i])return!1}else for(var a=e[0].length,i=0;i<n;i++)for(var o=0;o<a;o++)if(e[i][o]!==t[i][o])return!1;return!0}function h(e,t,r,n,i,a,o,s,u){var l=e.length;if(1==u)for(var h=0;h<l;h++)s[h]=c(e[h],t[h],r[h],n[h],i,a,o);else for(var d=e[0].length,h=0;h<l;h++)for(var f=0;f<d;f++)s[h][f]=c(e[h][f],t[h][f],r[h][f],n[h][f],i,a,o)}function c(e,t,r,n,i,a,o){var s=.5*(r-e),u=.5*(n-t);return(2*(t-r)+s+u)*o+(-3*(t-r)-2*s-u)*a+s*i+t}function d(e){if(y(e)){var t=e.length;if(y(e[0])){for(var r=[],n=0;n<t;n++)r.push(x.call(e[n]));return r}return x.call(e)}return e}function f(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function p(e){var t=e[e.length-1].value;return y(t&&t[0])?2:1}function m(e,t,r,n,i,d){var m=e._getter,v=e._setter,x="spline"===t,T=n.length;if(T){var b,w=n[0].value,E=y(w),S=!1,A=!1,M=E?p(n):0;n.sort(function(e,t){return e.time-t.time}),b=n[T-1].time;for(var C=[],L=[],D=n[0].value,N=!0,R=0;R<T;R++){C.push(n[R].time/b);var P=n[R].value;if(E&&l(P,D,M)||!E&&P===D||(N=!1),D=P,"string"==typeof P){var I=_.parse(P);I?(P=I,S=!0):A=!0}L.push(P)}if(d||!N){for(var O=L[T-1],R=0;R<T-1;R++)E?u(L[R],O,M):!isNaN(L[R])||isNaN(O)||A||S||(L[R]=O);E&&u(m(e._target,i),O,M);var F,B,U,z,G,H,V=0,k=0;if(S)var W=[0,0,0,0];var j=function(e,t){var r;if(t<0)r=0;else if(t<k){for(F=Math.min(V+1,T-1),r=F;r>=0&&!(C[r]<=t);r--);r=Math.min(r,T-2)}else{for(r=V;r<T&&!(C[r]>t);r++);r=Math.min(r-1,T-2)}V=r,k=t;var n=C[r+1]-C[r];if(0!==n)if(B=(t-C[r])/n,x)if(z=L[r],U=L[0===r?r:r-1],G=L[r>T-2?T-1:r+1],H=L[r>T-3?T-1:r+2],E)h(U,z,G,H,B,B*B,B*B*B,m(e,i),M);else{var u;if(S)u=h(U,z,G,H,B,B*B,B*B*B,W,1),u=f(W);else{if(A)return o(z,G,B);u=c(U,z,G,H,B,B*B,B*B*B)}v(e,i,u)}else if(E)s(L[r],L[r+1],B,m(e,i),M);else{var u;if(S)s(L[r],L[r+1],B,W,1),u=f(W);else{if(A)return o(L[r],L[r+1],B);u=a(L[r],L[r+1],B)}v(e,i,u)}},X=new g({target:e._target,life:b,loop:e._loop,delay:e._delay,onframe:j,ondestroy:r});return t&&"spline"!==t&&(X.easing=t),X}}}var g=r(143),_=r(145),v=r(13),y=v.isArrayLike,x=Array.prototype.slice,T=function(e,t,r,a){this._tracks={},this._target=e,this._loop=t||!1,this._getter=r||n,this._setter=a||i,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};T.prototype={when:function(e,t){var r=this._tracks;for(var n in t)if(t.hasOwnProperty(n)){if(!r[n]){r[n]=[];var i=this._getter(this._target,n);if(null==i)continue;0!==e&&r[n].push({time:0,value:d(i)})}r[n].push({time:e,value:t[n]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,r=0;r<t;r++)e[r].call(this)},start:function(e,t){var r,n=this,i=0,a=function(){--i||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=m(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),i++,this.animation&&this.animation.addClip(s),r=s)}if(r){var u=r.onframe;r.onframe=function(e,t){u(e,t);for(var r=0;r<n._onframeList.length;r++)n._onframeList[r](e,t)}}return i||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,r=this.animation,n=0;n<t.length;n++){var i=t[n];e&&i.onframe(this._target,1),r&&r.removeClip(i)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var b=T;e.exports=b},function(e,t,r){function n(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}var i=r(144);n.prototype={constructor:n,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=t);var r=(e-this._startTime-this._pausedTime)/this._life;if(!(r<0)){r=Math.min(r,1);var n=this.easing,a="string"==typeof n?i[n]:n,o="function"==typeof a?a(r):r;return this.fire("frame",o),1==r?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){e="on"+e,this[e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var a=n;e.exports=a},function(e,t){var r={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1;return 0===e?0:1===e?1:(!r||r<1?(r=1,t=.1):t=.4*Math.asin(1/r)/(2*Math.PI),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,r=.1;return 0===e?0:1===e?1:(!r||r<1?(r=1,t=.1):t=.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,r=.1;return 0===e?0:1===e?1:(!r||r<1?(r=1,t=.1):t=.4*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-r.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*r.bounceIn(2*e):.5*r.bounceOut(2*e-1)+.5}},n=r;e.exports=n},function(e,t,r){function n(e){return e=Math.round(e),e<0?0:e>255?255:e}function i(e){return e=Math.round(e),e<0?0:e>360?360:e}function a(e){return e<0?0:e>1?1:e}function o(e){return n(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100*255:parseInt(e,10))}function s(e){return a(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100:parseFloat(e))}function u(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r){return e+(t-e)*r}function h(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function d(e,t){A&&c(A,t),A=S.put(e,A||t.slice())}function f(e,t){if(e){t=t||[];var r=S.get(e);if(r)return c(t,r);e+="";var n=e.replace(/ /g,"").toLowerCase();if(n in E)return c(t,E[n]),d(e,t),t;if("#"!==n.charAt(0)){var i=n.indexOf("("),a=n.indexOf(")");if(-1!==i&&a+1===n.length){var u=n.substr(0,i),l=n.substr(i+1,a-(i+1)).split(","),f=1;switch(u){case"rgba":if(4!==l.length)return void h(t,0,0,0,1);f=s(l.pop());case"rgb":return 3!==l.length?void h(t,0,0,0,1):(h(t,o(l[0]),o(l[1]),o(l[2]),f),d(e,t),t);case"hsla":return 4!==l.length?void h(t,0,0,0,1):(l[3]=s(l[3]),p(l,t),d(e,t),t);case"hsl":return 3!==l.length?void h(t,0,0,0,1):(p(l,t),d(e,t),t);default:return}}h(t,0,0,0,1)}else{if(4===n.length){var m=parseInt(n.substr(1),16);return m>=0&&m<=4095?(h(t,(3840&m)>>4|(3840&m)>>8,240&m|(240&m)>>4,15&m|(15&m)<<4,1),d(e,t),t):void h(t,0,0,0,1)}if(7===n.length){var m=parseInt(n.substr(1),16);return m>=0&&m<=16777215?(h(t,(16711680&m)>>16,(65280&m)>>8,255&m,1),d(e,t),t):void h(t,0,0,0,1)}}}}function p(e,t){var r=(parseFloat(e[0])%360+360)%360/360,i=s(e[1]),a=s(e[2]),o=a<=.5?a*(i+1):a+i-a*i,l=2*a-o;return t=t||[],h(t,n(255*u(l,o,r+1/3)),n(255*u(l,o,r)),n(255*u(l,o,r-1/3)),1),4===e.length&&(t[3]=e[3]),t}function m(e){if(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),u=s-o,l=(s+o)/2;if(0===u)t=0,r=0;else{r=l<.5?u/(s+o):u/(2-s-o);var h=((s-n)/6+u/2)/u,c=((s-i)/6+u/2)/u,d=((s-a)/6+u/2)/u;n===s?t=d-c:i===s?t=1/3+h-d:a===s&&(t=2/3+c-h),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,r,l];return null!=e[3]&&f.push(e[3]),f}}function g(e,t){var r=f(e);if(r){for(var n=0;n<3;n++)r[n]=t<0?r[n]*(1-t)|0:(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:e[n]<0&&(r[n]=0);return b(r,4===r.length?"rgba":"rgb")}}function _(e){var t=f(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function v(e,t,r){if(t&&t.length&&e>=0&&e<=1){r=r||[];var i=e*(t.length-1),o=Math.floor(i),s=Math.ceil(i),u=t[o],h=t[s],c=i-o;return r[0]=n(l(u[0],h[0],c)),r[1]=n(l(u[1],h[1],c)),r[2]=n(l(u[2],h[2],c)),r[3]=a(l(u[3],h[3],c)),r}}function y(e,t,r){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),o=Math.floor(i),s=Math.ceil(i),u=f(t[o]),h=f(t[s]),c=i-o,d=b([n(l(u[0],h[0],c)),n(l(u[1],h[1],c)),n(l(u[2],h[2],c)),a(l(u[3],h[3],c))],"rgba");return r?{color:d,leftIndex:o,rightIndex:s,value:i}:d}}function x(e,t,r,n){if(e=f(e))return e=m(e),null!=t&&(e[0]=i(t)),null!=r&&(e[1]=s(r)),null!=n&&(e[2]=s(n)),b(p(e),"rgba")}function T(e,t){if((e=f(e))&&null!=t)return e[3]=a(t),b(e,"rgba")}function b(e,t){if(e&&e.length){var r=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(r+=","+e[3]),t+"("+r+")"}}var w=r(60),E={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]},S=new w(20),A=null,M=v,C=y;t.parse=f,t.lift=g,t.toHex=_,t.fastLerp=v,t.fastMapToColor=M,t.lerp=y,t.mapToColor=C,t.modifyHSL=x,t.modifyAlpha=T,t.stringify=b},function(e,t,r){"use strict";t.a="\n@export clay.util.rand\nhighp float rand(vec2 uv) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(uv.xy, vec2(a,b)), sn = mod(dt, 3.141592653589793);\n return fract(sin(sn) * c);\n}\n@end\n@export clay.util.calculate_attenuation\nuniform float attenuationFactor : 5.0;\nfloat lightAttenuation(float dist, float range)\n{\n float attenuation = 1.0;\n attenuation = dist*dist/(range*range+1.0);\n float att_s = attenuationFactor;\n attenuation = 1.0/(attenuation*att_s+1.0);\n att_s = 1.0/(att_s+1.0);\n attenuation = attenuation - att_s;\n attenuation /= 1.0 - att_s;\n return clamp(attenuation, 0.0, 1.0);\n}\n@end\n@export clay.util.edge_factor\n#ifdef SUPPORT_STANDARD_DERIVATIVES\nfloat edgeFactor(float width)\n{\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * width, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#else\nfloat edgeFactor(float width)\n{\n return 1.0;\n}\n#endif\n@end\n@export clay.util.encode_float\nvec4 encodeFloat(const in float depth)\n{\n const vec4 bitShifts = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\n const vec4 bit_mask = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\n vec4 res = fract(depth * bitShifts);\n res -= res.xxyz * bit_mask;\n return res;\n}\n@end\n@export clay.util.decode_float\nfloat decodeFloat(const in vec4 color)\n{\n const vec4 bitShifts = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);\n return dot(color, bitShifts);\n}\n@end\n@export clay.util.float\n@import clay.util.encode_float\n@import clay.util.decode_float\n@end\n@export clay.util.rgbm_decode\nvec3 RGBMDecode(vec4 rgbm, float range) {\n return range * rgbm.rgb * rgbm.a;\n}\n@end\n@export clay.util.rgbm_encode\nvec4 RGBMEncode(vec3 color, float range) {\n if (dot(color, color) == 0.0) {\n return vec4(0.0);\n }\n vec4 rgbm;\n color /= range;\n rgbm.a = clamp(max(max(color.r, color.g), max(color.b, 1e-6)), 0.0, 1.0);\n rgbm.a = ceil(rgbm.a * 255.0) / 255.0;\n rgbm.rgb = color / rgbm.a;\n return rgbm;\n}\n@end\n@export clay.util.rgbm\n@import clay.util.rgbm_decode\n@import clay.util.rgbm_encode\nvec4 decodeHDR(vec4 color)\n{\n#if defined(RGBM_DECODE) || defined(RGBM)\n return vec4(RGBMDecode(color, 8.12), 1.0);\n#else\n return color;\n#endif\n}\nvec4 encodeHDR(vec4 color)\n{\n#if defined(RGBM_ENCODE) || defined(RGBM)\n return RGBMEncode(color.xyz, 8.12);\n#else\n return color;\n#endif\n}\n@end\n@export clay.util.srgb\nvec4 sRGBToLinear(in vec4 value) {\n return vec4(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))), value.w);\n}\nvec4 linearTosRGB(in vec4 value) {\n return vec4(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))), value.w);\n}\n@end\n@export clay.chunk.skinning_header\n#ifdef SKINNING\nattribute vec3 weight : WEIGHT;\nattribute vec4 joint : JOINT;\n#ifdef USE_SKIN_MATRICES_TEXTURE\nuniform sampler2D skinMatricesTexture : ignore;\nuniform float skinMatricesTextureSize: ignore;\nmat4 getSkinMatrix(sampler2D tex, float idx) {\n float j = idx * 4.0;\n float x = mod(j, skinMatricesTextureSize);\n float y = floor(j / skinMatricesTextureSize) + 0.5;\n vec2 scale = vec2(skinMatricesTextureSize);\n return mat4(\n texture2D(tex, vec2(x + 0.5, y) / scale),\n texture2D(tex, vec2(x + 1.5, y) / scale),\n texture2D(tex, vec2(x + 2.5, y) / scale),\n texture2D(tex, vec2(x + 3.5, y) / scale)\n );\n}\nmat4 getSkinMatrix(float idx) {\n return getSkinMatrix(skinMatricesTexture, idx);\n}\n#else\nuniform mat4 skinMatrix[JOINT_COUNT] : SKIN_MATRIX;\nmat4 getSkinMatrix(float idx) {\n return skinMatrix[int(idx)];\n}\n#endif\n#endif\n@end\n@export clay.chunk.skin_matrix\nmat4 skinMatrixWS = getSkinMatrix(joint.x) * weight.x;\nif (weight.y > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end"},function(e,t,r){"use strict";t.a="\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"},function(e,t,r){"use strict";t.a="@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"},function(e,t,r){"use strict";t.a="/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(e,t,r){"use strict";t.a="@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(e,t,r){"use strict";t.a="@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"},function(e,t,r){"use strict";t.a="@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end"},function(e,t,r){"use strict";function n(e,t){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,n=e[t].emphasis;r&&(e[t]=r),n&&(e.emphasis=e.emphasis||{},e.emphasis[t]=n)}}function i(e){n(e,"itemStyle"),n(e,"lineStyle"),n(e,"areaStyle"),n(e,"label")}function a(e){e&&(e instanceof Array||(e=[e]),s.a.util.each(e,function(e){if(e.axisLabel){var t=e.axisLabel;s.a.util.extend(t,t.textStyle),t.textStyle=null}}))}var o=r(0),s=r.n(o),u=["bar3D","line3D","map3D","scatter3D","surface","lines3D","scatterGL","scatter3D"];t.a=function(e){s.a.util.each(e.series,function(t){s.a.util.indexOf(u,t.type)>=0&&(i(t),"mapbox"===t.coordinateSystem&&(t.coordinateSystem="mapbox3D",e.mapbox3D=e.mapbox))}),a(e.xAxis3D),a(e.yAxis3D),a(e.zAxis3D),a(e.grid3D),n(e.geo3D)}},function(e,t,r){"use strict";var n=(r(155),r(159),r(160),r(167),r(0)),i=r.n(n);i.a.registerAction({type:"grid3DChangeCamera",event:"grid3dcamerachanged",update:"series:updateCamera"},function(e,t){t.eachComponent({mainType:"grid3D",query:e},function(t){t.setView(e)})}),i.a.registerAction({type:"grid3DShowAxisPointer",event:"grid3dshowaxispointer",update:"grid3D:showAxisPointer"},function(e,t){}),i.a.registerAction({type:"grid3DHideAxisPointer",event:"grid3dhideaxispointer",update:"grid3D:hideAxisPointer"},function(e,t){})},function(e,t,r){"use strict";function n(e,t){return t.type||(t.data?"category":"value")}var i=r(0),a=r.n(i),o=r(156),s=a.a.extendComponentModel({type:"cartesian3DAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid3D",index:this.option.gridIndex,id:this.option.gridId})[0]}});a.a.helper.mixinAxisModelCommonMethods(s),Object(o.a)("x",s,n,{name:"X"}),Object(o.a)("y",s,n,{name:"Y"}),Object(o.a)("z",s,n,{name:"Z"})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(157),o=r(158),s=r.n(o),u=["value","category","time","log"];t.a=function(e,t,r,n){i.a.util.each(u,function(o){t.extend({type:e+"Axis3D."+o,__ordinalMeta:null,mergeDefaultAndTheme:function(t,n){var a=n.getTheme();i.a.util.merge(t,a.get(o+"Axis3D")),i.a.util.merge(t,this.getDefaultOption()),t.type=r(e,t)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=s.a.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:i.a.util.merge(i.a.util.clone(a.a[o+"Axis3D"]),n||{},!0)})}),t.superClass.registerSubTypeDefaulter(e+"Axis3D",i.a.util.curry(r,e))}},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a={show:!0,grid3DIndex:0,inverse:!1,name:"",nameLocation:"middle",nameTextStyle:{fontSize:16},nameGap:20,axisPointer:{},axisLine:{},axisTick:{},axisLabel:{},splitArea:{}},o=i.a.util.merge({boundaryGap:!0,axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"},axisPointer:{label:{show:!1}}},a),s=i.a.util.merge({boundaryGap:[0,0],splitNumber:5,axisPointer:{label:{}}},a),u=i.a.util.defaults({scale:!0,min:"dataMin",max:"dataMax"},s),l=i.a.util.defaults({logBase:10},s);l.scale=!0,t.a={categoryAxis3D:o,valueAxis3D:s,timeAxis3D:u,logAxis3D:l}},function(e,t,r){function n(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}function i(e){return e._map||(e._map=s(e.categories))}function a(e){return u(e)&&null!=e.value?e.value:e+""}var o=r(13),s=o.createHashMap,u=o.isObject,l=o.map;n.createByAxisModel=function(e){var t=e.option,r=t.data,i=r&&l(r,a);return new n({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var h=n.prototype;h.getOrdinal=function(e){return i(this).get(e)},h.parseAndCollect=function(e){var t,r=this._needCollect;if("string"!=typeof e&&!r)return e;if(r&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=i(this);return t=n.get(e),null==t&&(r?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t};var c=n;e.exports=c},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(44),o=r(28),s=r(29),u=i.a.extendComponentModel({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{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)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});i.a.util.merge(u.prototype,a.a),i.a.util.merge(u.prototype,o.a),i.a.util.merge(u.prototype,s.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(45),s=r(25),u=r(2),l=r(81),h=r(30),c=r(162),d=r(164),f=r(63),p=r(46),m=u.a.firstNotNull;a.a.Shader.import(p.a),["x","y","z"].forEach(function(e){i.a.extendComponentView({type:e+"Axis3D"})});var g={x:0,y:2,z:1};i.a.extendComponentView({type:"grid3D",__ecgl__:!0,init:function(e,t){var r=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]],n=["x","y","z"],i=new a.a.Material({shader:a.a.createShader("ecgl.color"),depthMask:!1,transparent:!0}),u=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});i.define("fragment","DOUBLE_SIDED"),i.define("both","VERTEX_COLOR"),this.groupGL=new a.a.Node,this._control=new o.a({zr:t.getZr()}),this._control.init(),this._faces=r.map(function(e){var t=new c.a(e,u,i);return this.groupGL.add(t.rootNode),t},this),this._axes=n.map(function(e){var t=new d.a(e,u);return this.groupGL.add(t.rootNode),t},this);var p=t.getDevicePixelRatio();this._axisLabelSurface=new l.a({width:256,height:256,devicePixelRatio:p}),this._axisLabelSurface.onupdate=function(){t.getZr().refresh()},this._axisPointerLineMesh=new a.a.Mesh({geometry:new s.a({useNativeLine:!1}),material:u,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new l.a({width:128,height:128,devicePixelRatio:p}),this._axisPointerLabelsMesh=new f.a({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new a.a.Node,this._sceneHelper=new h.a,this._sceneHelper.initLight(this._lightRoot)},render:function(e,t,r){this._model=e,this._api=r;var n=e.coordinateSystem;n.viewGL.add(this._lightRoot),e.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var i=this._control;i.setViewGL(n.viewGL);var a=e.getModel("viewControl");i.setFromViewControlModel(a,0),this._axisLabelSurface.clear(),i.off("update"),e.get("show")&&(this._faces.forEach(function(n){n.update(e,t,r)},this),this._axes.forEach(function(t){t.update(e,this._axisLabelSurface,r)},this)),i.on("update",this._onCameraChange.bind(this,e,r),this),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(e),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling")),this._initMouseHandler(e)},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r)},showAxisPointer:function(e,t,r,n){this._doShowAxisPointer(),this._updateAxisPointer(n.value)},hideAxisPointer:function(e,t,r,n){this._doHideAxisPointer()},_initMouseHandler:function(e){var t=e.coordinateSystem,r=t.viewGL;e.get("show")&&e.get("axisPointer.show")?r.on("mousemove",this._updateAxisPointerOnMousePosition,this):r.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(e){if(!e.target){for(var t,r=this._model,n=r.coordinateSystem,i=n.viewGL,o=i.castRay(e.offsetX,e.offsetY,new a.a.Ray),s=0;s<this._faces.length;s++){var u=this._faces[s];if(!u.rootNode.invisible){u.plane.normal.dot(i.camera.worldTransform.z)<0&&u.plane.normal.negate();var l=o.intersectPlane(u.plane);if(l){var h=n.getAxis(u.faceInfo[0]),c=n.getAxis(u.faceInfo[1]),d=g[u.faceInfo[0]],f=g[u.faceInfo[1]];h.contain(l.array[d])&&c.contain(l.array[f])&&(t=l)}}}if(t){var p=n.pointToData(t.array,[],!0);this._updateAxisPointer(p),this._doShowAxisPointer()}else this._doHideAxisPointer()}},_onCameraChange:function(e,t){e.get("show")&&(this._updateFaceVisibility(),this._updateAxisLinePosition());var r=this._control;t.dispatchAction({type:"grid3DChangeCamera",alpha:r.getAlpha(),beta:r.getBeta(),distance:r.getDistance(),center:r.getCenter(),from:this.uid,grid3DId:e.id})},_updateFaceVisibility:function(){var e=this._control.getCamera(),t=new a.a.Vector3;e.update();for(var r=0;r<this._faces.length/2;r++){for(var n=[],i=0;i<2;i++){this._faces[2*r+i].rootNode.getWorldPosition(t),t.transformMat4(e.viewMatrix),n[i]=t.z}var o=n[0]>n[1]?0:1,s=this._faces[2*r+o],u=this._faces[2*r+1-o];s.rootNode.invisible=!0,u.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var e=this._model.coordinateSystem,t=e.getAxis("x"),r=e.getAxis("y"),n=e.getAxis("z"),i=n.getExtentMax(),a=n.getExtentMin(),o=t.getExtentMin(),s=t.getExtentMax(),u=r.getExtentMax(),l=r.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,f=this._faces,p=f[4].rootNode.invisible?l:u,m=f[2].rootNode.invisible?i:a,g=f[0].rootNode.invisible?o:s,_=f[2].rootNode.invisible?i:a,v=f[0].rootNode.invisible?s:o,y=f[4].rootNode.invisible?l:u;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),f[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),f[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),f[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,m,p),c.position.set(g,_,0),d.position.set(v,0,y),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var e=this._control.getCamera(),t=[new a.a.Vector4,new a.a.Vector4],r=new a.a.Vector4;this.groupGL.getWorldPosition(r),r.w=1,r.transformMat4(e.viewMatrix).transformMat4(e.projectionMatrix),r.x/=r.w,r.y/=r.w,this._axes.forEach(function(n){for(var i=n.axisLineCoords,a=(n.labelsMesh.geometry,0);a<t.length;a++)t[a].setArray(i[a]),t[a].w=1,t[a].transformMat4(n.rootNode.worldTransform).transformMat4(e.viewMatrix).transformMat4(e.projectionMatrix),t[a].x/=t[a].w,t[a].y/=t[a].w;var o,s,u=t[1].x-t[0].x,l=t[1].y-t[0].y,h=(t[1].x+t[0].x)/2,c=(t[1].y+t[0].y)/2;Math.abs(l/u)<.5?(o="center",s=c>r.y?"bottom":"top"):(s="middle",o=h>r.x?"left":"right"),n.setSpriteAlign(o,s,this._api)},this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(e){function t(e){return u.a.firstNotNull(e.model.get("axisPointer.show"),l.get("show"))}function r(e){var t=e.model.getModel("axisPointer",l),r=t.getModel("lineStyle"),n=a.a.parseColor(r.get("color")),i=m(r.get("width"),1),o=m(r.get("opacity"),1);return n[3]*=o,{color:n,lineWidth:i}}var n=this._model.coordinateSystem,i=n.dataToPoint(e),o=this._axisPointerLineMesh,s=o.geometry,l=this._model.getModel("axisPointer"),h=this._api.getDevicePixelRatio();s.convertToDynamicArray(!0);for(var c=0;c<this._faces.length;c++){var d=this._faces[c];if(!d.rootNode.invisible){for(var f=d.faceInfo,p=f[3]<0?n.getAxis(f[2]).getExtentMin():n.getAxis(f[2]).getExtentMax(),_=g[f[2]],v=0;v<2;v++){var y=f[v],x=f[1-v],T=n.getAxis(y),b=n.getAxis(x);if(t(T)){var w=[0,0,0],E=[0,0,0],S=g[y],A=g[x];w[S]=E[S]=i[S],w[_]=E[_]=p,w[A]=b.getExtentMin(),E[A]=b.getExtentMax();var M=r(T);s.addLine(w,E,M.color,M.lineWidth*h)}}if(t(n.getAxis(f[2]))){var w=i.slice(),E=i.slice();E[_]=p;var M=r(n.getAxis(f[2]));s.addLine(w,E,M.color,M.lineWidth*h)}}}s.convertToTypedArray(),this._updateAxisPointerLabelsMesh(e),this._api.getZr().refresh()},_updateAxisPointerLabelsMesh:function(e){var t=this._model,r=this._axisPointerLabelsMesh,n=this._axisPointerLabelsSurface,a=t.coordinateSystem,o=t.getModel("axisPointer");r.geometry.convertToDynamicArray(!0),n.clear();var s={x:"y",y:"x",z:"y"};this._axes.forEach(function(t,u){var l=a.getAxis(t.dim),h=l.model,c=h.getModel("axisPointer",o),d=c.getModel("label"),f=c.get("lineStyle.color");if(d.get("show")&&c.get("show")){var p=e[u],m=d.get("formatter"),_=l.scale.getLabel(p);if(null!=m)_=m(_,e);else if("interval"===l.scale.type||"log"===l.scale.type){var v=i.a.number.getPrecisionSafe(l.scale.getTicks()[0]);_=p.toFixed(v+2)}var y=d.getModel("textStyle"),x=y.get("color"),T=new i.a.graphic.Text;i.a.graphic.setTextStyle(T.style,y,{text:_,textFill:x||f,textAlign:"left",textVerticalAlign:"top"});var b=n.add(T),w=T.getBoundingRect(),E=this._api.getDevicePixelRatio(),S=t.rootNode.position.toArray();S[g[s[t.dim]]]+=(t.flipped?-1:1)*d.get("margin"),S[g[t.dim]]=l.dataToCoord(e[u]),r.geometry.addSprite(S,[w.width*E,w.height*E],b,t.textAlign,t.textVerticalAlign)}},this),n.getZr().refreshImmediately(),r.material.set("uvScale",n.getCoordsScale()),r.geometry.convertToTypedArray()},dispose:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(e,t,r){"use strict";var n=r(70),i=r(12),a=r(33),o=r(78),s=r(79),u=r(34),l=r(21),h=r(55);t.a={vec2:n.a,vec3:i.a,vec4:a.a,mat2:o.a,mat2d:s.a,mat3:u.a,mat4:l.a,quat:h.a}},function(e,t,r){"use strict";function n(e,t,r,n){var i=[0,0,0],a=n<0?r.getExtentMin():r.getExtentMax();i[d[r.dim]]=a,e.position.setArray(i),e.rotation.identity(),t.distance=-Math.abs(a),t.normal.set(0,0,0),"x"===r.dim?(e.rotation.rotateY(n*Math.PI/2),t.normal.x=-n):"z"===r.dim?(e.rotation.rotateX(-n*Math.PI/2),t.normal.y=-n):(n>0&&e.rotation.rotateY(Math.PI),t.normal.z=-n)}function i(e,t,r){this.rootNode=new s.a.Node;var n=new s.a.Mesh({geometry:new l.a({useNativeLine:!1}),material:t,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),i=new s.a.Mesh({geometry:new h.a,material:r,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(i),this.rootNode.add(n),this.faceInfo=e,this.plane=new s.a.Plane,this.linesMesh=n,this.quadsMesh=i}var a=r(0),o=r.n(a),s=r(1),u=r(2),l=r(25),h=r(163),c=u.a.firstNotNull,d={x:0,y:2,z:1};i.prototype.update=function(e,t,r){var i=e.coordinateSystem,a=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],o=this.linesMesh.geometry,s=this.quadsMesh.geometry;o.convertToDynamicArray(!0),s.convertToDynamicArray(!0),this._updateSplitLines(o,a,e,r),this._udpateSplitAreas(s,a,e,r),o.convertToTypedArray(),s.convertToTypedArray();var u=i.getAxis(this.faceInfo[2]);n(this.rootNode,this.plane,u,this.faceInfo[3])},i.prototype._updateSplitLines=function(e,t,r,n){var i=n.getDevicePixelRatio();t.forEach(function(n,a){var u=n.model,l=t[1-a].getExtent();if(!n.scale.isBlank()){var h=u.getModel("splitLine",r.getModel("splitLine"));if(h.get("show")){var d=h.getModel("lineStyle"),f=d.get("color"),p=c(d.get("opacity"),1),m=c(d.get("width"),1);f=o.a.util.isArray(f)?f:[f];for(var g=n.getTicksCoords({tickModel:h}),_=0,v=0;v<g.length;v++){var y=g[v].coord,x=s.a.parseColor(f[_%f.length]);x[3]*=p;var T=[0,0,0],b=[0,0,0];T[a]=b[a]=y,T[1-a]=l[0],b[1-a]=l[1],e.addLine(T,b,x,m*i),_++}}}})},i.prototype._udpateSplitAreas=function(e,t,r,n){t.forEach(function(n,i){var a=n.model,u=t[1-i].getExtent();if(!n.scale.isBlank()){var l=a.getModel("splitArea",r.getModel("splitArea"));if(l.get("show")){var h=l.getModel("areaStyle"),d=h.get("color"),f=c(h.get("opacity"),1);d=o.a.util.isArray(d)?d:[d];for(var p=n.getTicksCoords({tickModel:l,clamp:!0}),m=0,g=[0,0,0],_=[0,0,0],v=0;v<p.length;v++){var y=p[v].coord,x=[0,0,0],T=[0,0,0];if(x[i]=T[i]=y,x[1-i]=u[0],T[1-i]=u[1],0!==v){var b=s.a.parseColor(d[m%d.length]);b[3]*=f,e.addQuad([g,x,T,_],b),g=x,_=T,m++}else g=x,_=T}}}})},t.a=i},function(e,t,r){"use strict";var n=r(15),i=r(0),a=r.n(i),o=r(38),s=r(6),u=s.a.vec3,l=n.a.extend(function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new n.a.Attribute("position","float",3,"POSITION"),normal:new n.a.Attribute("normal","float",3,"NORMAL"),color:new n.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(e){var t=this.attributes,r=this.getQuadVertexCount()*e,n=this.getQuadTriangleCount()*e;this.vertexCount!==r&&(t.position.init(r),t.normal.init(r),t.color.init(r)),this.triangleCount!==n&&(this.indices=r>65535?new Uint32Array(3*n):new Uint16Array(3*n))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var e=u.create(),t=u.create(),r=u.create(),n=[0,3,1,3,2,1];return function(i,a){var o=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;u.sub(e,i[1],i[0]),u.sub(t,i[2],i[1]),u.cross(r,e,t),u.normalize(r,r);for(var h=0;h<4;h++)o.set(this._vertexOffset+h,i[h]),l.set(this._vertexOffset+h,a),s.set(this._vertexOffset+h,r);for(var c=3*this._faceOffset,h=0;h<6;h++)this.indices[c+h]=n[h]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});a.a.util.defaults(l.prototype,o.a),t.a=l},function(e,t,r){"use strict";function n(e,t){var r=new o.a.Mesh({geometry:new s.a({useNativeLine:!1}),material:t,castShadow:!1,ignorePicking:!0,renderOrder:2}),n=new l.a;n.material.depthMask=!1;var i=new o.a.Node;i.add(r),i.add(n),this.rootNode=i,this.dim=e,this.linesMesh=r,this.labelsMesh=n,this.axisLineCoords=null,this.labelElements=[]}var i=r(0),a=r.n(i),o=r(1),s=r(25),u=r(2),l=r(63),h=u.a.firstNotNull,c={x:0,y:2,z:1},d={x:"y",y:"x",z:"y"};n.prototype.update=function(e,t,r){var n=e.coordinateSystem,i=n.getAxis(this.dim),s=this.linesMesh.geometry,u=this.labelsMesh.geometry;s.convertToDynamicArray(!0),u.convertToDynamicArray(!0);var l=i.model,f=i.getExtent(),p=r.getDevicePixelRatio(),m=l.getModel("axisLine",e.getModel("axisLine")),g=l.getModel("axisTick",e.getModel("axisTick")),_=l.getModel("axisLabel",e.getModel("axisLabel")),v=m.get("lineStyle.color");if(m.get("show")){var y=m.getModel("lineStyle"),x=[0,0,0],T=[0,0,0],b=c[i.dim];x[b]=f[0],T[b]=f[1],this.axisLineCoords=[x,T];var w=o.a.parseColor(v),E=h(y.get("width"),1),S=h(y.get("opacity"),1);w[3]*=S,s.addLine(x,T,w,E*p)}if(g.get("show")){var A=g.getModel("lineStyle"),M=o.a.parseColor(h(A.get("color"),v)),E=h(A.get("width"),1);M[3]*=h(A.get("opacity"),1);for(var C=i.getTicksCoords(),L=g.get("length"),D=0;D<C.length;D++){var N=C[D].coord,x=[0,0,0],T=[0,0,0],b=c[i.dim],R=c[d[i.dim]];x[b]=T[b]=N,T[R]=L,s.addLine(x,T,M,E*p)}}this.labelElements=[];var p=r.getDevicePixelRatio();if(_.get("show"))for(var C=i.getTicksCoords(),P=l.get("data"),I=_.get("margin"),O=i.getViewLabels(),D=0;D<O.length;D++){var F=O[D].tickValue,B=O[D].formattedLabel,U=O[D].rawLabel,N=i.dataToCoord(F),z=[0,0,0],b=c[i.dim],R=c[d[i.dim]];z[b]=z[b]=N,z[R]=I;var G=_;P&&P[F]&&P[F].textStyle&&(G=new a.a.Model(P[F].textStyle,_,l.ecModel));var H=h(G.get("color"),v),V=new a.a.graphic.Text;a.a.graphic.setTextStyle(V.style,G,{text:B,textFill:"function"==typeof H?H("category"===i.type?U:"value"===i.type?F+"":F,D):H,textVerticalAlign:"top",textAlign:"left"});var k=t.add(V),W=V.getBoundingRect();u.addSprite(z,[W.width*p,W.height*p],k),this.labelElements.push(V)}if(l.get("name")){var j=l.getModel("nameTextStyle"),z=[0,0,0],b=c[i.dim],R=c[d[i.dim]],X=h(j.get("color"),v),q=j.get("borderColor"),E=j.get("borderWidth");z[b]=z[b]=(f[0]+f[1])/2,z[R]=l.get("nameGap");var V=new a.a.graphic.Text;a.a.graphic.setTextStyle(V.style,j,{text:l.get("name"),textFill:X,textStroke:q,lineWidth:E});var k=t.add(V),W=V.getBoundingRect();u.addSprite(z,[W.width*p,W.height*p],k),V.__idx=this.labelElements.length,this.nameLabelElement=V}this.labelsMesh.material.set("textureAtlas",t.getTexture()),this.labelsMesh.material.set("uvScale",t.getCoordsScale()),s.convertToTypedArray(),u.convertToTypedArray()},n.prototype.setSpriteAlign=function(e,t,r){for(var n=r.getDevicePixelRatio(),i=this.labelsMesh.geometry,a=0;a<this.labelElements.length;a++){var o=this.labelElements[a],s=o.getBoundingRect();i.setSpriteAlign(a,[s.width*n,s.height*n],e,t)}var u=this.nameLabelElement;if(u){var s=u.getBoundingRect();i.setSpriteAlign(u.__idx,[s.width*n,s.height*n],e,t),i.dirty()}this.textAlign=e,this.textVerticalAlign=t},t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(15),o=r(38),s=[0,1,2,0,2,3],u=a.a.extend(function(){return{attributes:{position:new a.a.Attribute("position","float",3,"POSITION"),texcoord:new a.a.Attribute("texcoord","float",2,"TEXCOORD_0"),offset:new a.a.Attribute("offset","float",2),color:new a.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setSpriteCount:function(e){this._spriteCount=e;var t=4*e,r=2*e;this.vertexCount!==t&&(this.attributes.position.init(t),this.attributes.offset.init(t),this.attributes.color.init(t)),this.triangleCount!==r&&(this.indices=t>65535?new Uint32Array(3*r):new Uint16Array(3*r))},setSpriteAlign:function(e,t,r,n,i){null==r&&(r="left"),null==n&&(n="top");var a,o,s,u;switch(i=i||0,r){case"left":a=i,s=t[0]+i;break;case"center":case"middle":a=-t[0]/2,s=t[0]/2;break;case"right":a=-t[0]-i,s=-i}switch(n){case"bottom":o=i,u=t[1]+i;break;case"middle":o=-t[1]/2,u=t[1]/2;break;case"top":o=-t[1]-i,u=-i}var l=4*e,h=this.attributes.offset;h.set(l,[a,u]),h.set(l+1,[s,u]),h.set(l+2,[s,o]),h.set(l+3,[a,o])},addSprite:function(e,t,r,n,i,a){var o=this._vertexOffset;this.setSprite(this._vertexOffset/4,e,t,r,n,i,a);for(var u=0;u<s.length;u++)this.indices[3*this._faceOffset+u]=s[u]+o;return this._faceOffset+=2,this._vertexOffset+=4,o/4},setSprite:function(e,t,r,n,i,a,o){for(var s=4*e,u=this.attributes,l=0;l<4;l++)u.position.set(s+l,t);var h=u.texcoord;h.set(s,[n[0][0],n[0][1]]),h.set(s+1,[n[1][0],n[0][1]]),h.set(s+2,[n[1][0],n[1][1]]),h.set(s+3,[n[0][0],n[1][1]]),this.setSpriteAlign(e,r,i,a,o)}});i.a.util.defaults(u.prototype,o.a),t.a=u},function(e,t,r){"use strict";t.a="@export ecgl.labels.vertex\n\nattribute vec3 position: POSITION;\nattribute vec2 texcoord: TEXCOORD_0;\nattribute vec2 offset;\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec2 v_Texcoord;\n\nvoid main()\n{\n vec4 proj = worldViewProjection * vec4(position, 1.0);\n\n vec2 screen = (proj.xy / abs(proj.w) + 1.0) * 0.5 * viewport.zw;\n\n screen += offset;\n\n proj.xy = (screen / viewport.zw - 0.5) * 2.0 * abs(proj.w);\n gl_Position = proj;\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n v_Texcoord = texcoord;\n}\n@end\n\n\n@export ecgl.labels.fragment\n\nuniform vec3 color : [1.0, 1.0, 1.0];\nuniform float alpha : 1.0;\nuniform sampler2D textureAtlas;\nuniform vec2 uvScale: [1.0, 1.0];\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\nvarying float v_Miter;\n\nvarying vec2 v_Texcoord;\n\nvoid main()\n{\n gl_FragColor = vec4(color, alpha) * texture2D(textureAtlas, v_Texcoord * uvScale);\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n}\n\n@end"},function(e,t,r){"use strict";function n(e,t){var r=e.getBoxLayoutParams(),n=h.a.getLayoutRect(r,{width:t.getWidth(),height:t.getHeight()});n.y=t.getHeight()-n.y-n.height,this.viewGL.setViewport(n.x,n.y,n.width,n.height,t.getDevicePixelRatio());var i=e.get("boxWidth"),a=e.get("boxHeight"),o=e.get("boxDepth");this.getAxis("x").setExtent(-i/2,i/2),this.getAxis("y").setExtent(o/2,-o/2),this.getAxis("z").setExtent(-a/2,a/2),this.size=[i,a,o]}function i(e,t){function r(e,t){n[e]=n[e]||[1/0,-1/0],n[e][0]=Math.min(t[0],n[e][0]),n[e][1]=Math.max(t[1],n[e][1])}var n={};e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData();["x","y","z"].forEach(function(e){t.mapDimension(e,!0).forEach(function(n){r(e,t.getDataExtent(n,!0))})})}},this),["xAxis3D","yAxis3D","zAxis3D"].forEach(function(t){e.eachComponent(t,function(e){var r=t.charAt(0),i=e.getReferringComponents("grid3D")[0],a=i.coordinateSystem;if(a===this){var s=a.getAxis(r);if(!s){var l=u.a.helper.createScale(n[r]||[1/0,-1/0],e);s=new o.a(r,l),s.type=e.get("type");var h="category"===s.type;s.onBand=h&&e.get("boundaryGap"),s.inverse=e.get("inverse"),e.axis=s,s.model=e,s.getLabelModel=function(){return e.getModel("axisLabel",i.getModel("axisLabel"))},s.getTickModel=function(){return e.getModel("axisTick",i.getModel("axisTick"))},a.addAxis(s)}}},this)},this),this.resize(this.model,t)}var a=r(168),o=r(170),s=r(0),u=r.n(s),l=r(47),h=r.n(l),c=r(22),d=(r(2),{dimensions:a.a.prototype.dimensions,create:function(e,t){function r(e,t){return s.map(function(r){var n=e.getReferringComponents(r)[0];return null==n&&(n=t.getComponent(r)),n})}var o=[];e.eachComponent("grid3D",function(e){e.__viewGL=e.__viewGL||new c.a;var t=new a.a;t.model=e,t.viewGL=e.__viewGL,e.coordinateSystem=t,o.push(t),t.resize=n,t.update=i});var s=["xAxis3D","yAxis3D","zAxis3D"];return e.eachSeries(function(t){if("cartesian3D"===t.get("coordinateSystem")){var n=t.getReferringComponents("grid3D")[0];if(null==n){var i=r(t,e),n=i[0].getCoordSysModel();i.forEach(function(e){e.getCoordSysModel()})}var a=n.coordinateSystem;t.coordinateSystem=a}}),o}});u.a.registerCoordinateSystem("grid3D",d)},function(e,t,r){"use strict";function n(e){s.a.call(this,e),this.size=[0,0,0]}var i=r(0),a=r.n(i),o=r(169),s=r.n(o);n.prototype={constructor:n,type:"cartesian3D",dimensions:["x","y","z"],model:null,containPoint:function(e){return this.getAxis("x").contain(e[0])&&this.getAxis("y").contain(e[2])&&this.getAxis("z").contain(e[1])},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])&&this.getAxis("z").containData(e[2])},dataToPoint:function(e,t,r){return t=t||[],t[0]=this.getAxis("x").dataToCoord(e[0],r),t[2]=this.getAxis("y").dataToCoord(e[1],r),t[1]=this.getAxis("z").dataToCoord(e[2],r),t},pointToData:function(e,t,r){return t=t||[],t[0]=this.getAxis("x").coordToData(e[0],r),t[1]=this.getAxis("y").coordToData(e[2],r),t[2]=this.getAxis("z").coordToData(e[1],r),t}},a.a.util.inherits(n,s.a),t.a=n},function(e,t,r){function n(e){return this._axes[e]}var i=r(13),a=function(e){this._axes={},this._dimList=[],this.name=e||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return i.map(this._dimList,n,this)},getAxesByScale:function(e){return e=e.toLowerCase(),i.filter(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var r=this._dimList,n=e instanceof Array?[]:{},i=0;i<r.length;i++){var a=r[i],o=this._axes[a];n[a]=o[t](e[a])}return n}};var o=a;e.exports=o},function(e,t,r){"use strict";function n(e,t,r){a.a.Axis.call(this,e,t,r)}var i=r(0),a=r.n(i);n.prototype={constructor:n,getExtentMin:function(){var e=this._extent;return Math.min(e[0],e[1])},getExtentMax:function(){var e=this._extent;return Math.max(e[0],e[1])},calculateCategoryInterval:function(){return Math.floor(this.scale.count()/8)}},a.a.util.inherits(n,a.a.Axis),t.a=n},function(e,t,r){function n(e){return isNaN(e)?"-":(e=(e+"").split("."),e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:""))}function i(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}function a(e){return null==e?"":(e+"").replace(g,function(e,t){return _[t]})}function o(e,t,r){d.isArray(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var s=v[o];e=e.replace(y(s),y(s,0))}for(var u=0;u<n;u++)for(var l=0;l<i.length;l++){var h=t[u][i[l]];e=e.replace(y(v[l],u),r?a(h):h)}return e}function s(e,t,r){return d.each(t,function(t,n){e=e.replace("{"+n+"}",r?a(t):t)}),e}function u(e,t){e=d.isString(e)?{color:e,extraCssText:t}:e||{};var r=e.color,n=e.type,t=e.extraCssText;return r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+a(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+a(r)+";"+(t||"")+'"></span>':""}function l(e,t){return e+="","0000".substr(0,t-e.length)+e}function h(e,t,r){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var n=p.parseDate(t),i=r?"UTC":"",a=n["get"+i+"FullYear"](),o=n["get"+i+"Month"]()+1,s=n["get"+i+"Date"](),u=n["get"+i+"Hours"](),h=n["get"+i+"Minutes"](),c=n["get"+i+"Seconds"](),d=n["get"+i+"Milliseconds"]();return e=e.replace("MM",l(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",l(s,2)).replace("d",s).replace("hh",l(u,2)).replace("h",u).replace("mm",l(h,2)).replace("m",h).replace("ss",l(c,2)).replace("s",c).replace("SSS",l(d,3))}function c(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e}var d=r(13),f=r(172),p=r(85),m=d.normalizeCssArray,g=/([&<>"'])/g,_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},v=["a","b","c","d","e","f","g"],y=function(e,t){return"{"+e+(null==t?"":t)+"}"},x=f.truncateText,T=f.getBoundingRect;t.addCommas=n,t.toCamelCase=i,t.normalizeCssArray=m,t.encodeHTML=a,t.formatTpl=o,t.formatTplSimple=s,t.getTooltipMarker=u,t.formatTime=h,t.capitalFirst=c,t.truncateText=x,t.getTextRect=T},function(e,t,r){function n(e,t){I[e]=t}function i(e,t){t=t||P;var r=e+":"+t;if(L[r])return L[r];for(var n=(e+"").split("\n"),i=0,a=0,o=n.length;a<o;a++)i=Math.max(g(n[a],t).width,i);return D>N&&(D=0,L={}),D++,L[r]=i,i}function a(e,t,r,n,i,a,u){return a?s(e,t,r,n,i,a,u):o(e,t,r,n,i,u)}function o(e,t,r,n,a,o){var s=_(e,t,a,o),h=i(e,t);a&&(h+=a[1]+a[3]);var c=s.outerHeight,d=u(0,h,r),f=l(0,c,n),p=new T(d,f,h,c);return p.lineHeight=s.lineHeight,p}function s(e,t,r,n,i,a,o){var s=v(e,{rich:a,truncate:o,font:t,textAlign:r,textPadding:i}),h=s.outerWidth,c=s.outerHeight,d=u(0,h,r),f=l(0,c,n);return new T(d,f,h,c)}function u(e,t,r){return"right"===r?e-=t:"center"===r&&(e-=t/2),e}function l(e,t,r){return"middle"===r?e-=t/2:"bottom"===r&&(e-=t),e}function h(e,t,r){var n=t.x,i=t.y,a=t.height,o=t.width,s=a/2,u="left",l="top";switch(e){case"left":n-=r,i+=s,u="right",l="middle";break;case"right":n+=r+o,i+=s,l="middle";break;case"top":n+=o/2,i-=r,u="center",l="bottom";break;case"bottom":n+=o/2,i+=a+r,u="center";break;case"inside":n+=o/2,i+=s,u="center",l="middle";break;case"insideLeft":n+=r,i+=s,l="middle";break;case"insideRight":n+=o-r,i+=s,u="right",l="middle";break;case"insideTop":n+=o/2,i+=r,u="center";break;case"insideBottom":n+=o/2,i+=a-r,u="center",l="bottom";break;case"insideTopLeft":n+=r,i+=r;break;case"insideTopRight":n+=o-r,i+=r,u="right";break;case"insideBottomLeft":n+=r,i+=a-r,l="bottom";break;case"insideBottomRight":n+=o-r,i+=a-r,u="right",l="bottom"}return{x:n,y:i,textAlign:u,textVerticalAlign:l}}function c(e,t,r,n,i){if(!t)return"";var a=(e+"").split("\n");i=d(t,r,n,i);for(var o=0,s=a.length;o<s;o++)a[o]=f(a[o],i);return a.join("\n")}function d(e,t,r,n){n=S({},n),n.font=t;var r=A(r,"...");n.maxIterations=A(n.maxIterations,2);var a=n.minChar=A(n.minChar,0);n.cnCharWidth=i("鍥�",t);var o=n.ascCharWidth=i("a",t);n.placeholder=A(n.placeholder,"");for(var s=e=Math.max(0,e-1),u=0;u<a&&s>=o;u++)s-=o;var l=i(r);return l>s&&(r="",l=0),s=e-l,n.ellipsis=r,n.ellipsisWidth=l,n.contentWidth=s,n.containerWidth=e,n}function f(e,t){var r=t.containerWidth,n=t.font,a=t.contentWidth;if(!r)return"";var o=i(e,n);if(o<=r)return e;for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var u=0===s?p(e,a,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,u),o=i(e,n)}return""===e&&(e=t.placeholder),e}function p(e,t,r,n){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?r:n}return a}function m(e){return i("鍥�",e)}function g(e,t){return I.measureText(e,t)}function _(e,t,r,n){null!=e&&(e+="");var i=m(t),a=e?e.split("\n"):[],o=a.length*i,s=o;if(r&&(s+=r[0]+r[2]),e&&n){var u=n.outerHeight,l=n.outerWidth;if(null!=u&&s>u)e="",a=[];else if(null!=l)for(var h=d(l-(r?r[1]+r[3]:0),t,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,p=a.length;c<p;c++)a[c]=f(a[c],h)}return{lines:a,height:o,outerHeight:s,lineHeight:i}}function v(e,t){var r={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return r;for(var n,a=R.lastIndex=0;null!=(n=R.exec(e));){var o=n.index;o>a&&y(r,e.substring(a,o)),y(r,n[2],n[1]),a=R.lastIndex}a<e.length&&y(r,e.substring(a,e.length));var s=r.lines,u=0,l=0,h=[],d=t.textPadding,f=t.truncate,p=f&&f.outerWidth,g=f&&f.outerHeight;d&&(null!=p&&(p-=d[1]+d[3]),null!=g&&(g-=d[0]+d[2]));for(var _=0;_<s.length;_++){for(var v=s[_],x=0,T=0,w=0;w<v.tokens.length;w++){var E=v.tokens[w],S=E.styleName&&t.rich[E.styleName]||{},C=E.textPadding=S.textPadding,L=E.font=S.font||t.font,D=E.textHeight=A(S.textHeight,m(L));if(C&&(D+=C[0]+C[2]),E.height=D,E.lineHeight=M(S.textLineHeight,t.textLineHeight,D),E.textAlign=S&&S.textAlign||t.textAlign,E.textVerticalAlign=S&&S.textVerticalAlign||"middle",null!=g&&u+E.lineHeight>g)return{lines:[],width:0,height:0};E.textWidth=i(E.text,L);var N=S.textWidth,P=null==N||"auto"===N;if("string"==typeof N&&"%"===N.charAt(N.length-1))E.percentWidth=N,h.push(E),N=0;else{if(P){N=E.textWidth;var I=S.textBackgroundColor,O=I&&I.image;O&&(O=b.findExistImage(O),b.isImageReady(O)&&(N=Math.max(N,O.width*D/O.height)))}var F=C?C[1]+C[3]:0;N+=F;var B=null!=p?p-T:null;null!=B&&B<N&&(!P||B<F?(E.text="",E.textWidth=N=0):(E.text=c(E.text,B-F,L,f.ellipsis,{minChar:f.minChar}),E.textWidth=i(E.text,L),N=E.textWidth+F))}T+=E.width=N,S&&(x=Math.max(x,E.lineHeight))}v.width=T,v.lineHeight=x,u+=x,l=Math.max(l,T)}r.outerWidth=r.width=A(t.textWidth,l),r.outerHeight=r.height=A(t.textHeight,u),d&&(r.outerWidth+=d[1]+d[3],r.outerHeight+=d[0]+d[2]);for(var _=0;_<h.length;_++){var E=h[_],U=E.percentWidth;E.width=parseInt(U,10)/100*l}return r}function y(e,t,r){for(var n=""===t,i=t.split("\n"),a=e.lines,o=0;o<i.length;o++){var s=i[o],u={styleName:r,text:s,isLineHolder:!s&&!n};if(o)a.push({tokens:[u]});else{var l=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=l.length;1===h&&l[0].isLineHolder?l[0]=u:(s||!h||n)&&l.push(u)}}}function x(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&C(t)||e.textFont||e.font}var T=r(82),b=r(173),w=r(13),E=w.getContext,S=w.extend,A=w.retrieve2,M=w.retrieve3,C=w.trim,L={},D=0,N=5e3,R=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,P="12px sans-serif",I={};I.measureText=function(e,t){var r=E();return r.font=t||P,r.measureText(e)},t.DEFAULT_FONT=P,t.$override=n,t.getWidth=i,t.getBoundingRect=a,t.adjustTextX=u,t.adjustTextY=l,t.adjustTextPositionOnRect=h,t.truncateText=c,t.getLineHeight=m,t.measureText=g,t.parsePlainText=_,t.parseRichText=v,t.makeFont=x},function(e,t,r){function n(e){if("string"==typeof e){var t=u.get(e);return t&&t.image}return e}function i(e,t,r,n,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!r)return t;var s=u.get(e),l={hostEl:r,cb:n,cbPayload:i};return s?(t=s.image,!o(t)&&s.pending.push(l)):(!t&&(t=new Image),t.onload=a,u.put(e,t.__cachedImgObj={image:t,pending:[l]}),t.src=t.__zrImageSrc=e),t}return e}return t}function a(){var e=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var r=e.pending[t],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}e.pending.length=0}function o(e){return e&&e.width&&e.height}var s=r(60),u=new s(50);t.findExistImage=n,t.createOrUpdateImage=i,t.isImageReady=o},function(e,t,r){"use strict";function n(e,t,r){if("alphaMap"===r)return e.material.get("diffuseMap");if("alphaCutoff"===r){if(e.material.isDefined("fragment","ALPHA_TEST")&&e.material.get("diffuseMap")){return e.material.get("alphaCutoff")||0}return 0}return t.get(r)}function i(e,t){var r=e.material,n=t.material;return r.get("diffuseMap")!==n.get("diffuseMap")||(r.get("alphaCutoff")||0)!==(n.get("alphaCutoff")||0)}var a=r(7),o=r(11),s=r(3),u=r(18),l=r(59),h=r(9),c=r(52),d=r(8),f=r(19),p=r(10),m=r(4),g=r(5),_=r(27),v=r(41),y=r(37),x=r(16),T=r(86),b=r(21),w=r(175),E=["px","nx","py","ny","pz","nz"];d.a.import(w.a);var S=a.a.extend(function(){return{softShadow:S.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"highp",_lastRenderNotCastShadow:!1,_frameBuffer:new p.a,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new T.a}},function(){this._gaussianPassH=new x.a({fragment:d.a.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new x.a({fragment:d.a.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new x.a({fragment:d.a.source("clay.sm.debug_depth")})},{render:function(e,t,r,n){r||(r=t.getMainCamera()),this.trigger("beforerender",this,e,t,r),this._renderShadowPass(e,t,r,n),this.trigger("afterrender",this,e,t,r)},renderDebug:function(e,t){e.saveClear();var r=e.viewport,n=0,i=t||r.width/4,a=i;this.softShadow===S.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM");for(var o in this._textures){var s=this._textures[o];e.setViewport(n,0,i*s.width/s.height,a),this._outputDepthPass.setUniform("depthMap",s),this._outputDepthPass.render(e),n+=i*s.width/s.height}e.setViewport(r),e.restoreClear()},_updateReceivers:function(e,t){if(t.receiveShadow?(this._receivers.push(t),t.material.set("shadowEnabled",1),t.material.set("pcfKernel",this.kernelPCF)):t.material.set("shadowEnabled",0),this.softShadow===S.VSM)t.material.define("fragment","USE_VSM"),t.material.undefine("fragment","PCF_KERNEL_SIZE");else{t.material.undefine("fragment","USE_VSM");var r=this.kernelPCF;r&&r.length?t.material.define("fragment","PCF_KERNEL_SIZE",r.length/2):t.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(e,t){var r=this;t.traverse(function(t){t.isRenderable()&&r._updateReceivers(e,t)});for(var n=0;n<t.lights.length;n++){var i=t.lights[n];i.castShadow&&!i.invisible&&this._lightsCastShadow.push(i)}},_renderShadowPass:function(e,t,r,n){function i(e){return e.height}for(var a in this._shadowMapNumber)this._shadowMapNumber[a]=0;this._lightsCastShadow.length=0,this._receivers.length=0;var o=e.gl;if(n||t.update(),r&&r.update(),t.updateLights(),this._update(e,t),this._lightsCastShadow.length||!this._lastRenderNotCastShadow){this._lastRenderNotCastShadow=0===this._lightsCastShadow,o.enable(o.DEPTH_TEST),o.depthMask(!0),o.disable(o.BLEND),o.clearColor(1,1,1,1);for(var s,u=[],l=[],h=[],c=[],d=[],f=[],p=0;p<this._lightsCastShadow.length;p++){var m=this._lightsCastShadow[p];if("DIRECTIONAL_LIGHT"===m.type){if(s){console.warn("Only one direectional light supported with shadow cascade");continue}if(m.shadowCascade>4){console.warn("Support at most 4 cascade");continue}m.shadowCascade>1&&(s=m),this.renderDirectionalLightShadow(e,t,r,m,d,c,h)}else"SPOT_LIGHT"===m.type?this.renderSpotLightShadow(e,t,m,l,u):"POINT_LIGHT"===m.type&&this.renderPointLightShadow(e,t,m,f);this._shadowMapNumber[m.type]++}for(var g in this._shadowMapNumber)for(var _=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT",p=0;p<this._receivers.length;p++){var y=this._receivers[p],x=y.material;x.fragmentDefines[v]!==_&&(_>0?x.define("fragment",v,_):x.isDefined("fragment",v)&&x.undefine("fragment",v))}for(var p=0;p<this._receivers.length;p++){var y=this._receivers[p],x=y.material;s?x.define("fragment","SHADOW_CASCADE",s.shadowCascade):x.undefine("fragment","SHADOW_CASCADE")}var T=t.shadowUniforms;if(h.length>0){var b=h.map(i);if(T.directionalLightShadowMaps={value:h,type:"tv"},T.directionalLightMatrices={value:c,type:"m4v"},T.directionalLightShadowMapSizes={value:b,type:"1fv"},s){var w=d.slice(),E=d.slice();w.pop(),E.shift(),w.reverse(),E.reverse(),c.reverse(),T.shadowCascadeClipsNear={value:w,type:"1fv"},T.shadowCascadeClipsFar={value:E,type:"1fv"}}}if(u.length>0){var S=u.map(i),T=t.shadowUniforms;T.spotLightShadowMaps={value:u,type:"tv"},T.spotLightMatrices={value:l,type:"m4v"},T.spotLightShadowMapSizes={value:S,type:"1fv"}}f.length>0&&(T.pointLightShadowMaps={value:f,type:"tv"})}},renderDirectionalLightShadow:function(){var e=new l.a,t=new h.a,r=new u.a,a=new h.a,o=new h.a,s=new h.a,d=new h.a;return function(u,l,f,p,m,g,_){var y=this._getDepthMaterial(p),x={getMaterial:function(e){return e.shadowDepthMaterial||y},isMaterialChanged:i,getUniform:n,ifRender:function(e){return e.castShadow},sortCompare:c.a.opaqueSortCompare};if(!l.viewBoundingBoxLastFrame.isFinite()){var T=l.getBoundingBox();l.viewBoundingBoxLastFrame.copy(T).applyTransform(f.viewMatrix)}var w=Math.min(-l.viewBoundingBoxLastFrame.min.z,f.far),E=Math.max(-l.viewBoundingBoxLastFrame.max.z,f.near),A=this._getDirectionalLightCamera(p,l,f),M=s.array;d.copy(A.projectionMatrix),b.a.invert(o.array,A.worldTransform.array),b.a.multiply(o.array,o.array,f.worldTransform.array),b.a.multiply(M,d.array,o.array);for(var C=[],L=f instanceof v.a,D=(f.near+f.far)/(f.near-f.far),N=2*f.near*f.far/(f.near-f.far),R=0;R<=p.shadowCascade;R++){var P=E*Math.pow(w/E,R/p.shadowCascade),I=E+(w-E)*R/p.shadowCascade,O=P*p.cascadeSplitLogFactor+I*(1-p.cascadeSplitLogFactor);C.push(O),m.push(-(-O*D+N)/-O)}var F=this._getTexture(p,p.shadowCascade);_.push(F);var B=u.viewport,U=u.gl;this._frameBuffer.attach(F),this._frameBuffer.bind(u),U.clear(U.COLOR_BUFFER_BIT|U.DEPTH_BUFFER_BIT);for(var R=0;R<p.shadowCascade;R++){var z=C[R],G=C[R+1];L?b.a.perspective(t.array,f.fov/180*Math.PI,f.aspect,z,G):b.a.ortho(t.array,f.left,f.right,f.bottom,f.top,z,G),e.setFromProjection(t),e.getTransformedBoundingBox(r,o),r.applyProjection(d);var H=r.min.array,V=r.max.array;H[0]=Math.max(H[0],-1),H[1]=Math.max(H[1],-1),V[0]=Math.min(V[0],1),V[1]=Math.min(V[1],1),a.ortho(H[0],V[0],H[1],V[1],1,-1),A.projectionMatrix.multiplyLeft(a);var k=p.shadowResolution||512;u.setViewport((p.shadowCascade-R-1)*k,0,k,k,1);var W=l.updateRenderList(A);u.renderPass(W.opaque,A,x),this.softShadow===S.VSM&&this._gaussianFilter(u,F,F.width);var j=new h.a;j.copy(A.viewMatrix).multiplyLeft(A.projectionMatrix),g.push(j.array),A.projectionMatrix.copy(d)}this._frameBuffer.unbind(u),u.setViewport(B)}}(),renderSpotLightShadow:function(e,t,r,a,o){var s=this._getTexture(r),u=this._getSpotLightCamera(r),l=e.gl;this._frameBuffer.attach(s),this._frameBuffer.bind(e),l.clear(l.COLOR_BUFFER_BIT|l.DEPTH_BUFFER_BIT);var d=this._getDepthMaterial(r),f={getMaterial:function(e){return e.shadowDepthMaterial||d},isMaterialChanged:i,getUniform:n,ifRender:function(e){return e.castShadow},sortCompare:c.a.opaqueSortCompare},p=t.updateRenderList(u);e.renderPass(p.opaque,u,f),this._frameBuffer.unbind(e),this.softShadow===S.VSM&&this._gaussianFilter(e,s,s.width);var m=new h.a;m.copy(u.worldTransform).invert().multiplyLeft(u.projectionMatrix),o.push(s),a.push(m.array)},renderPointLightShadow:function(e,t,r,i){var a=this._getTexture(r),o=e.gl;i.push(a);var l=this._getDepthMaterial(r),h={getMaterial:function(e){return e.shadowDepthMaterial||l},getUniform:n,sortCompare:c.a.opaqueSortCompare},d={px:[],py:[],pz:[],nx:[],ny:[],nz:[]},f=new u.a,p=r.getWorldPosition().array,m=new u.a,g=r.range;m.min.setArray(p),m.max.setArray(p);var _=new s.a(g,g,g);m.max.add(_),m.min.sub(_);var v={px:!1,py:!1,pz:!1,nx:!1,ny:!1,nz:!1};t.traverse(function(e){if(e.isRenderable()&&e.castShadow){var t=e.geometry;if(!t.boundingBox){for(var r=0;r<E.length;r++)d[E[r]].push(e);return}if(f.transformFrom(t.boundingBox,e.worldTransform),!f.intersectBoundingBox(m))return;f.updateVertices();for(var r=0;r<E.length;r++)v[E[r]]=!1;for(var r=0;r<8;r++){var n=f.vertices[r],i=n[0]-p[0],a=n[1]-p[1],o=n[2]-p[2],s=Math.abs(i),u=Math.abs(a),l=Math.abs(o);s>u?s>l?v[i>0?"px":"nx"]=!0:v[o>0?"pz":"nz"]=!0:u>l?v[a>0?"py":"ny"]=!0:v[o>0?"pz":"nz"]=!0}for(var r=0;r<E.length;r++)v[E[r]]&&d[E[r]].push(e)}});for(var y=0;y<6;y++){var x=E[y],T=this._getPointLightCamera(r,x);this._frameBuffer.attach(a,o.COLOR_ATTACHMENT0,o.TEXTURE_CUBE_MAP_POSITIVE_X+y),this._frameBuffer.bind(e),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),e.renderPass(d[x],T,h)}this._frameBuffer.unbind(e)},_getDepthMaterial:function(e){var t=this._lightMaterials[e.__uid__],r="POINT_LIGHT"===e.type;if(!t){var n=r?"clay.sm.distance.":"clay.sm.depth.";t=new f.a({precision:this.precision,shader:new d.a(d.a.source(n+"vertex"),d.a.source(n+"fragment"))}),this._lightMaterials[e.__uid__]=t}return null!=e.shadowSlopeScale&&t.setUniform("slopeScale",e.shadowSlopeScale),null!=e.shadowBias&&t.setUniform("bias",e.shadowBias),this.softShadow===S.VSM?t.define("fragment","USE_VSM"):t.undefine("fragment","USE_VSM"),r&&(t.set("lightPosition",e.getWorldPosition().array),t.set("range",e.range)),t},_gaussianFilter:function(e,t,r){var n={width:r,height:r,type:m.a.FLOAT},i=this._texturePool.get(n);this._frameBuffer.attach(i),this._frameBuffer.bind(e),this._gaussianPassH.setUniform("texture",t),this._gaussianPassH.setUniform("textureWidth",r),this._gaussianPassH.render(e),this._frameBuffer.attach(t),this._gaussianPassV.setUniform("texture",i),this._gaussianPassV.setUniform("textureHeight",r),this._gaussianPassV.render(e),this._frameBuffer.unbind(e),this._texturePool.put(i)},_getTexture:function(e,t){var r=e.__uid__,n=this._textures[r],i=e.shadowResolution||512;return t=t||1,n||(n="POINT_LIGHT"===e.type?new _.a:new g.a,n.width=i*t,n.height=i,this.softShadow===S.VSM?(n.type=m.a.FLOAT,n.anisotropic=4):(n.minFilter=o.a.NEAREST,n.magFilter=o.a.NEAREST,n.useMipmap=!1),this._textures[r]=n),n},_getPointLightCamera:function(e,t){this._lightCameras.point||(this._lightCameras.point={px:new v.a,nx:new v.a,py:new v.a,ny:new v.a,pz:new v.a,nz:new v.a});var r=this._lightCameras.point[t];switch(r.far=e.range,r.fov=90,r.position.set(0,0,0),t){case"px":r.lookAt(s.a.POSITIVE_X,s.a.NEGATIVE_Y);break;case"nx":r.lookAt(s.a.NEGATIVE_X,s.a.NEGATIVE_Y);break;case"py":r.lookAt(s.a.POSITIVE_Y,s.a.POSITIVE_Z);break;case"ny":r.lookAt(s.a.NEGATIVE_Y,s.a.NEGATIVE_Z);break;case"pz":r.lookAt(s.a.POSITIVE_Z,s.a.NEGATIVE_Y);break;case"nz":r.lookAt(s.a.NEGATIVE_Z,s.a.NEGATIVE_Y)}return e.getWorldPosition(r.position),r.update(),r},_getDirectionalLightCamera:function(){var e=new h.a,t=new u.a,r=new u.a;return function(n,i,a){this._lightCameras.directional||(this._lightCameras.directional=new y.a);var o=this._lightCameras.directional;t.copy(i.viewBoundingBoxLastFrame),t.intersection(a.frustum.boundingBox),o.position.copy(t.min).add(t.max).scale(.5).transformMat4(a.worldTransform),o.rotation.copy(n.rotation),o.scale.copy(n.scale),o.updateWorldTransform(),h.a.invert(e,o.worldTransform),h.a.multiply(e,e,a.worldTransform),r.copy(t).applyTransform(e);var s=r.min.array,u=r.max.array;return o.position.set((s[0]+u[0])/2,(s[1]+u[1])/2,u[2]).transformMat4(o.worldTransform),o.near=0,o.far=-s[2]+u[2],isNaN(this.lightFrustumBias)?o.far*=4:o.far+=this.lightFrustumBias,o.left=s[0],o.right=u[0],o.top=u[1],o.bottom=s[1],o.update(!0),o}}(),_getSpotLightCamera:function(e){this._lightCameras.spot||(this._lightCameras.spot=new v.a);var t=this._lightCameras.spot;return t.fov=2*e.penumbraAngle,t.far=e.range,t.worldTransform.copy(e.worldTransform),t.updateProjectionMatrix(),b.a.invert(t.viewMatrix.array,t.worldTransform.array),t},dispose:function(e){var t=e.gl||e;this._frameBuffer&&this._frameBuffer.dispose(t);for(var r in this._textures)this._textures[r].dispose(t);this._texturePool.clear(e.gl),this._depthMaterials={},this._distanceMaterials={},this._textures={},this._lightCameras={},this._shadowMapNumber={POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},this._meshMaterials={};for(var n=0;n<this._receivers.length;n++){var i=this._receivers[n];if(i.material){var a=i.material;a.undefine("fragment","POINT_LIGHT_SHADOW_COUNT"),a.undefine("fragment","DIRECTIONAL_LIGHT_SHADOW_COUNT"),a.undefine("fragment","AMBIENT_LIGHT_SHADOW_COUNT"),a.set("shadowEnabled",0)}}this._receivers=[],this._lightsCastShadow=[]}});S.VSM=1,S.PCF=2,t.a=S},function(e,t,r){"use strict";t.a="@export clay.sm.depth.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n@import clay.chunk.skinning_header\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\nvoid main(){\n vec3 skinnedPosition = position;\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;\n#endif\n v_ViewPosition = worldViewProjection * vec4(skinnedPosition, 1.0);\n gl_Position = v_ViewPosition;\n v_Texcoord = texcoord;\n}\n@end\n@export clay.sm.depth.fragment\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\nuniform float bias : 0.001;\nuniform float slopeScale : 1.0;\nuniform sampler2D alphaMap;\nuniform float alphaCutoff: 0.0;\n@import clay.util.encode_float\nvoid main(){\n float depth = v_ViewPosition.z / v_ViewPosition.w;\n if (alphaCutoff > 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n#ifdef USE_VSM\n depth = depth * 0.5 + 0.5;\n float moment1 = depth;\n float moment2 = depth * depth;\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n moment2 += 0.25*(dx*dx+dy*dy);\n gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);\n#else\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;\n gl_FragColor = encodeFloat(depth * 0.5 + 0.5);\n#endif\n}\n@end\n@export clay.sm.debug_depth\nuniform sampler2D depthMap;\nvarying vec2 v_Texcoord;\n@import clay.util.decode_float\nvoid main() {\n vec4 tex = texture2D(depthMap, v_Texcoord);\n#ifdef USE_VSM\n gl_FragColor = vec4(tex.rgb, 1.0);\n#else\n float depth = decodeFloat(tex);\n gl_FragColor = vec4(depth, depth, depth, 1.0);\n#endif\n}\n@end\n@export clay.sm.distance.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 world : WORLD;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvarying vec3 v_WorldPosition;\nvoid main (){\n vec3 skinnedPosition = position;\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;\n#endif\n gl_Position = worldViewProjection * vec4(skinnedPosition , 1.0);\n v_WorldPosition = (world * vec4(skinnedPosition, 1.0)).xyz;\n}\n@end\n@export clay.sm.distance.fragment\nuniform vec3 lightPosition;\nuniform float range : 100;\nvarying vec3 v_WorldPosition;\n@import clay.util.encode_float\nvoid main(){\n float dist = distance(lightPosition, v_WorldPosition);\n#ifdef USE_VSM\n gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);\n#else\n dist = dist / range;\n gl_FragColor = encodeFloat(dist);\n#endif\n}\n@end\n@export clay.plugin.shadow_map_common\n@import clay.util.decode_float\nfloat tapShadowMap(sampler2D map, vec2 uv, float z){\n vec4 tex = texture2D(map, uv);\n return step(z, decodeFloat(tex) * 2.0 - 1.0);\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {\n float shadowContrib = tapShadowMap(map, uv, z);\n vec2 offset = vec2(1.0 / textureSize) * scale;\n#ifdef PCF_KERNEL_SIZE\n for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{\n shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);\n }}\n return shadowContrib / float(PCF_KERNEL_SIZE + 1);\n#else\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);\n return shadowContrib / 9.0;\n#endif\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize) {\n return pcf(map, uv, z, textureSize, vec2(1.0));\n}\nfloat chebyshevUpperBound(vec2 moments, float z){\n float p = 0.0;\n z = z * 0.5 + 0.5;\n if (z <= moments.x) {\n p = 1.0;\n }\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, 0.0000001);\n float mD = moments.x - z;\n float pMax = variance / (variance + mD * mD);\n pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);\n return max(p, pMax);\n}\nfloat computeShadowContrib(\n sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset\n) {\n vec4 posInLightSpace = lightVPM * vec4(position, 1.0);\n posInLightSpace.xyz /= posInLightSpace.w;\n float z = posInLightSpace.z;\n if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&\n all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){\n vec2 uv = (posInLightSpace.xy+1.0) / 2.0;\n #ifdef USE_VSM\n vec2 moments = texture2D(map, uv * scale + offset).xy;\n return chebyshevUpperBound(moments, z);\n #else\n return pcf(map, uv * scale + offset, z, textureSize, scale);\n #endif\n }\n return 1.0;\n}\nfloat computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {\n return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));\n}\nfloat computeShadowContribOmni(samplerCube map, vec3 direction, float range)\n{\n float dist = length(direction);\n vec4 shadowTex = textureCube(map, direction);\n#ifdef USE_VSM\n vec2 moments = shadowTex.xy;\n float variance = moments.y - moments.x * moments.x;\n float mD = moments.x - dist;\n float p = variance / (variance + mD * mD);\n if(moments.x + 0.001 < dist){\n return clamp(p, 0.0, 1.0);\n }else{\n return 1.0;\n }\n#else\n return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);\n#endif\n}\n@end\n@export clay.plugin.compute_shadow_map\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)\n#ifdef SPOT_LIGHT_SHADOWMAP_COUNT\nuniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT\n#if defined(SHADOW_CASCADE)\nuniform sampler2D directionalLightShadowMaps[1]:unconfigurable;\nuniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;\nuniform float directionalLightShadowMapSizes[1]:unconfigurable;\nuniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;\nuniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;\n#else\nuniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#endif\n#ifdef POINT_LIGHT_SHADOWMAP_COUNT\nuniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\nuniform bool shadowEnabled : true;\n#ifdef PCF_KERNEL_SIZE\nuniform vec2 pcfKernel[PCF_KERNEL_SIZE];\n#endif\n@import clay.plugin.shadow_map_common\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,\n spotLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n#ifdef SHADOW_CASCADE\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)\n / (gl_DepthRange.far - gl_DepthRange.near);\n float shadowContrib;\n shadowContribs[0] = 1.0;\n for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{\n if (\n depth >= shadowCascadeClipsNear[_idx_] &&\n depth <= shadowCascadeClipsFar[_idx_]\n ) {\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[0],\n vec2(1.0 / float(SHADOW_CASCADE), 1.0),\n vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)\n );\n shadowContribs[0] = shadowContrib;\n }\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#else\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n#if defined(POINT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){\n vec3 lightPosition;\n vec3 direction;\n for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n lightPosition = pointLightPosition[_idx_];\n direction = position - lightPosition;\n shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);\n }}\n for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n@end"},function(e,t,r){"use strict";function n(){this._sourceTexture=new a.a({type:o.a.HALF_FLOAT}),this._depthTexture=new a.a({format:o.a.DEPTH_COMPONENT,type:o.a.UNSIGNED_INT}),this._framebuffer=new s.a,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,s.a.DEPTH_ATTACHMENT),this._normalPass=new f.a,this._compositor=Object(u.a)(m.a);var e=this._compositor.getNodeByName("source");e.texture=this._sourceTexture;var t=this._compositor.getNodeByName("coc");this._sourceNode=e,this._cocNode=t,this._compositeNode=this._compositor.getNodeByName("composite"),this._fxaaNode=this._compositor.getNodeByName("FXAA"),this._dofBlurNodes=["dof_far_blur","dof_near_blur","dof_coc_blur"].map(function(e){return this._compositor.getNodeByName(e)},this),this._dofBlurKernel=0,this._dofBlurKernelSize=new Float32Array(0),this._finalNodesChain=C.map(function(e){return this._compositor.getNodeByName(e)},this);var r={normalTexture:this._normalPass.getNormalTexture(),depthTexture:this._normalPass.getDepthTexture()};this._ssaoPass=new l.a(r),this._ssrPass=new h.a(r),this._edgePass=new p.a(r)}var i=r(8),a=r(5),o=r(4),s=r(10),u=r(177),l=r(189),h=r(191),c=r(193),d=r(1),f=r(194),p=r(196),m=(r(9),r(197)),g=r(87),_=r(88),v=r(89),y=r(90),x=r(91),T=r(92),b=r(93),w=r(94),E=r(95),S=r(198),A=r(199);i.a.import(g.a),i.a.import(_.a),i.a.import(v.a),i.a.import(y.a),i.a.import(x.a),i.a.import(T.a),i.a.import(b.a),i.a.import(w.a),i.a.import(E.a),i.a.import(S.a),i.a.import(A.a);var M={color:{parameters:{width:function(e){return e.getWidth()},height:function(e){return e.getHeight()}}}},C=["composite","FXAA"];n.prototype.resize=function(e,t,r){r=r||1;var e=e*r,t=t*r,n=this._sourceTexture,i=this._depthTexture;n.width=e,n.height=t,i.width=e,i.height=t},n.prototype._ifRenderNormalPass=function(){return this._enableSSAO||this._enableEdge||this._enableSSR},n.prototype._getPrevNode=function(e){for(var t=C.indexOf(e.name)-1,r=this._finalNodesChain[t];r&&!this._compositor.getNodeByName(r.name);)t-=1,r=this._finalNodesChain[t];return r},n.prototype._getNextNode=function(e){for(var t=C.indexOf(e.name)+1,r=this._finalNodesChain[t];r&&!this._compositor.getNodeByName(r.name);)t+=1,r=this._finalNodesChain[t];return r},n.prototype._addChainNode=function(e){var t=this._getPrevNode(e),r=this._getNextNode(e);t&&(t.outputs=M,e.inputs.texture=t.name,r?(e.outputs=M,r.inputs.texture=e.name):e.outputs=null,this._compositor.addNode(e))},n.prototype._removeChainNode=function(e){var t=this._getPrevNode(e),r=this._getNextNode(e);t&&(r?(t.outputs=M,r.inputs.texture=t.name):t.outputs=null,this._compositor.removeNode(e))},n.prototype.updateNormal=function(e,t,r,n){this._ifRenderNormalPass()&&this._normalPass.update(e,t,r)},n.prototype.updateSSAO=function(e,t,r,n){this._ssaoPass.update(e,r,n)},n.prototype.enableSSAO=function(){this._enableSSAO=!0},n.prototype.disableSSAO=function(){this._enableSSAO=!1},n.prototype.enableSSR=function(){this._enableSSR=!0},n.prototype.disableSSR=function(){this._enableSSR=!1},n.prototype.getSSAOTexture=function(){return this._ssaoPass.getTargetTexture()},n.prototype.getSourceFrameBuffer=function(){return this._framebuffer},n.prototype.getSourceTexture=function(){return this._sourceTexture},n.prototype.disableFXAA=function(){this._removeChainNode(this._fxaaNode)},n.prototype.enableFXAA=function(){this._addChainNode(this._fxaaNode)},n.prototype.enableBloom=function(){this._compositeNode.inputs.bloom="bloom_composite",this._compositor.dirty()},n.prototype.disableBloom=function(){this._compositeNode.inputs.bloom=null,this._compositor.dirty()},n.prototype.enableDOF=function(){this._compositeNode.inputs.texture="dof_composite",this._compositor.dirty()},n.prototype.disableDOF=function(){this._compositeNode.inputs.texture="source",this._compositor.dirty()},n.prototype.enableColorCorrection=function(){this._compositeNode.define("COLOR_CORRECTION"),this._enableColorCorrection=!0},n.prototype.disableColorCorrection=function(){this._compositeNode.undefine("COLOR_CORRECTION"),this._enableColorCorrection=!1},n.prototype.enableEdge=function(){this._enableEdge=!0},n.prototype.disableEdge=function(){this._enableEdge=!1},n.prototype.setBloomIntensity=function(e){this._compositeNode.setParameter("bloomIntensity",e)},n.prototype.setSSAOParameter=function(e,t){switch(e){case"quality":var r={low:6,medium:12,high:32,ultra:62}[t]||12;this._ssaoPass.setParameter("kernelSize",r);break;case"radius":this._ssaoPass.setParameter(e,t),this._ssaoPass.setParameter("bias",t/200);break;case"intensity":this._ssaoPass.setParameter(e,t)}},n.prototype.setDOFParameter=function(e,t){switch(e){case"focalDistance":case"focalRange":case"fstop":this._cocNode.setParameter(e,t);break;case"blurRadius":for(var r=0;r<this._dofBlurNodes.length;r++)this._dofBlurNodes[r].setParameter("blurRadius",t);break;case"quality":var n={low:4,medium:8,high:16,ultra:32}[t]||8;this._dofBlurKernelSize=n;for(var r=0;r<this._dofBlurNodes.length;r++)this._dofBlurNodes[r].pass.material.define("POISSON_KERNEL_SIZE",n);this._dofBlurKernel=new Float32Array(2*n)}},n.prototype.setSSRParameter=function(e,t){if(null!=t)switch(e){case"quality":var r={low:10,medium:15,high:30,ultra:80}[t]||20,n={low:32,medium:16,high:8,ultra:4}[t]||16;this._ssrPass.setParameter("maxIteration",r),this._ssrPass.setParameter("pixelStride",n);break;case"maxRoughness":this._ssrPass.setParameter("minGlossiness",Math.max(Math.min(1-t,1),0));break;case"physical":this.setPhysicallyCorrectSSR(t);break;default:console.warn("Unkown SSR parameter "+e)}},n.prototype.setPhysicallyCorrectSSR=function(e){this._ssrPass.setPhysicallyCorrect(e)},n.prototype.setEdgeColor=function(e){var t=d.a.parseColor(e);this._edgePass.setParameter("edgeColor",t)},n.prototype.setExposure=function(e){this._compositeNode.setParameter("exposure",Math.pow(2,e))},n.prototype.setColorLookupTexture=function(e,t){this._compositeNode.pass.material.setTextureImage("lut",this._enableColorCorrection?e:"none",t,{minFilter:d.a.Texture.NEAREST,magFilter:d.a.Texture.NEAREST,flipY:!1})},n.prototype.setColorCorrection=function(e,t){this._compositeNode.setParameter(e,t)},n.prototype.isSSREnabled=function(){return this._enableSSR},n.prototype.composite=function(e,t,r,n,i){var a=this._sourceTexture,o=a;this._enableEdge&&(this._edgePass.update(e,r,a,i),a=o=this._edgePass.getTargetTexture()),this._enableSSR&&(this._ssrPass.update(e,r,a,i),o=this._ssrPass.getTargetTexture(),this._ssrPass.setSSAOTexture(this._enableSSAO?this._ssaoPass.getTargetTexture():null)),this._sourceNode.texture=o,this._cocNode.setParameter("depth",this._depthTexture);for(var s=this._dofBlurKernel,u=this._dofBlurKernelSize,l=Math.floor(c.a.length/2/u),h=i%l,d=0;d<2*u;d++)s[d]=c.a[d+h*u*2];for(var d=0;d<this._dofBlurNodes.length;d++)this._dofBlurNodes[d].setParameter("percent",i/30),this._dofBlurNodes[d].setParameter("poissonKernel",s);this._cocNode.setParameter("zNear",r.near),this._cocNode.setParameter("zFar",r.far),this._compositor.render(e,n)},n.prototype.dispose=function(e){this._sourceTexture.dispose(e),this._depthTexture.dispose(e),this._framebuffer.dispose(e),this._compositor.dispose(e),this._normalPass.dispose(e),this._ssaoPass.dispose(e)},t.a=n},function(e,t,r){"use strict";var n=r(178);t.a=n.a},function(e,t,r){"use strict";function n(e,t){var r=new f.a;t=t||{};var n={textures:{},parameters:{}},a=function(a,o){for(var s=0;s<e.nodes.length;s++){var u=e.nodes[s],l=i(u,n,t);l&&r.addNode(l)}};for(var o in e.parameters){var l=e.parameters[o];n.parameters[o]=s(l)}return u(e,n,t,function(e){n.textures=e,a()}),r}function i(e,t,r){var n,i,a,o=e.type||"filter";if("filter"===o){var u=e.shader.trim(),h=b.exec(u);if(h?n=_.a.source(h[1].trim()):"#"===u.charAt(0)&&(n=t.shaders[u.substr(1)]),n||(n=u),!n)return}if(e.inputs){i={};for(var d in e.inputs)"string"==typeof e.inputs[d]?i[d]=e.inputs[d]:i[d]={node:e.inputs[d].node,pin:e.inputs[d].pin}}if(e.outputs){a={};for(var d in e.outputs){var f=e.outputs[d];a[d]={},null!=f.attachment&&(a[d].attachment=f.attachment),null!=f.keepLastFrame&&(a[d].keepLastFrame=f.keepLastFrame),null!=f.outputLastFrame&&(a[d].outputLastFrame=f.outputLastFrame),f.parameters&&(a[d].parameters=s(f.parameters))}}var v;if(v="scene"===o?new p.a({name:e.name,scene:r.scene,camera:r.camera,outputs:a}):"texture"===o?new m.a({name:e.name,outputs:a}):new g.a({name:e.name,shader:n,inputs:i,outputs:a})){if(e.parameters)for(var d in e.parameters){var y=e.parameters[d];"string"==typeof y&&(y=y.trim(),"#"===y.charAt(0)?y=t.textures[y.substr(1)]:v.on("beforerender",l(d,c(y)))),v.setParameter(d,y)}if(e.defines&&v.pass)for(var d in e.defines){var y=e.defines[d];v.pass.material.define("fragment",d,y)}}return v}function a(e,t){return e}function o(e,t){return t}function s(e){var t={};if(!e)return t;["type","minFilter","magFilter","wrapS","wrapT","flipY","useMipmap"].forEach(function(r){var n=e[r];null!=n&&("string"==typeof n&&(n=v.a[n]),t[r]=n)});var r=e.scale||1;return["width","height"].forEach(function(n){if(null!=e[n]){var i=e[n];"string"==typeof i?(i=i.trim(),t[n]=h(n,c(i),r)):t[n]=i}}),t.width||(t.width=a),t.height||(t.height=o),null!=e.useMipmap&&(t.useMipmap=e.useMipmap),t}function u(e,t,r,n){if(!e.textures)return void n({});var i={},a=0,o=!1,u=r.textureRootPath;d.a.each(e.textures,function(e,t){var r,l=e.path,h=s(e.parameters);if(Array.isArray(l)&&6===l.length)u&&(l=l.map(function(e){return d.a.relative2absolute(e,u)})),r=new x.a(h);else{if("string"!=typeof l)return;u&&(l=d.a.relative2absolute(l,u)),r=new y.a(h)}r.load(l),a++,r.once("success",function(){i[t]=r,0===--a&&(n(i),o=!0)})}),0!==a||o||n(i)}function l(e,t){return function(r){var n=r.getDevicePixelRatio(),i=r.getWidth(),a=r.getHeight(),o=t(i,a,n);this.setParameter(e,o)}}function h(e,t,r){return r=r||1,function(e){var n=e.getDevicePixelRatio(),i=e.getWidth()*r,a=e.getHeight()*r;return t(i,a,n)}}function c(e){var t=/^expr\((.*)\)$/.exec(e);if(t)try{var r=new Function("width","height","dpr","return "+t[1]);return r(1,1),r}catch(e){throw new Error("Invalid expression.")}}var d=r(23),f=r(179),p=r(181),m=r(182),g=r(183),_=r(8),v=r(4),y=r(5),x=r(27),T=r(184);Object(T.a)(_.a);var b=/^#source\((.*?)\)/;t.a=n},function(e,t,r){"use strict";var n=r(180),i=r(86),a=r(10),o=n.a.extend(function(){return{_outputs:[],_texturePool:new i.a,_frameBuffer:new a.a({depthBuffer:!1})}},{addNode:function(e){n.a.prototype.addNode.call(this,e),e._compositor=this},render:function(e,t){if(this._dirty){this.update(),this._dirty=!1,this._outputs.length=0;for(var r=0;r<this.nodes.length;r++)this.nodes[r].outputs||this._outputs.push(this.nodes[r])}for(var r=0;r<this.nodes.length;r++)this.nodes[r].beforeFrame();for(var r=0;r<this._outputs.length;r++)this._outputs[r].updateReference();for(var r=0;r<this._outputs.length;r++)this._outputs[r].render(e,t);for(var r=0;r<this.nodes.length;r++)this.nodes[r].afterFrame()},allocateTexture:function(e){return this._texturePool.get(e)},releaseTexture:function(e){this._texturePool.put(e)},getFrameBuffer:function(){return this._frameBuffer},dispose:function(e){this._texturePool.clear(e)}});t.a=o},function(e,t,r){"use strict";var n=r(7),i=r(48),a=n.a.extend(function(){return{nodes:[]}},{dirty:function(){this._dirty=!0},addNode:function(e){this.nodes.indexOf(e)>=0||(this.nodes.push(e),this._dirty=!0)},removeNode:function(e){"string"==typeof e&&(e=this.getNodeByName(e));var t=this.nodes.indexOf(e);t>=0&&(this.nodes.splice(t,1),this._dirty=!0)},getNodeByName:function(e){for(var t=0;t<this.nodes.length;t++)if(this.nodes[t].name===e)return this.nodes[t]},update:function(){for(var e=0;e<this.nodes.length;e++)this.nodes[e].clear();for(var e=0;e<this.nodes.length;e++){var t=this.nodes[e];if(t.inputs)for(var r in t.inputs)if(t.inputs[r])if(!t.pass||t.pass.material.isUniformEnabled(r)){var n=t.inputs[r],i=this.findPin(n);i?t.link(r,i.node,i.pin):"string"==typeof n?console.warn("Node "+n+" not exist"):console.warn("Pin of "+n.node+"."+n.pin+" not exist")}else console.warn("Pin "+t.name+"."+r+" not used.")}},findPin:function(e){var t;if(("string"==typeof e||e instanceof i.a)&&(e={node:e}),"string"==typeof e.node)for(var r=0;r<this.nodes.length;r++){var n=this.nodes[r];n.name===e.node&&(t=n)}else t=e.node;if(t){var a=e.pin;if(a||t.outputs&&(a=Object.keys(t.outputs)[0]),t.outputs[a])return{node:t,pin:a}}}});t.a=a},function(e,t,r){"use strict";var n=r(48),i=r(11),a=r(10),o=n.a.extend({name:"scene",scene:null,camera:null,autoUpdateScene:!0,preZ:!1},function(){this.frameBuffer=new a.a},{render:function(e){this._rendering=!0;var t=e.gl;this.trigger("beforerender");var r;if(this.outputs){var n=this.frameBuffer;for(var a in this.outputs){var o=this.updateParameter(a,e),s=this.outputs[a],u=this._compositor.allocateTexture(o);this._outputTextures[a]=u;var l=s.attachment||t.COLOR_ATTACHMENT0;"string"==typeof l&&(l=t[l]),n.attach(u,l)}n.bind(e);var h=e.getGLExtension("EXT_draw_buffers");if(h){var c=[];for(var l in this.outputs)(l=parseInt(l))>=t.COLOR_ATTACHMENT0&&l<=t.COLOR_ATTACHMENT0+8&&c.push(l);h.drawBuffersEXT(c)}e.saveClear(),e.clearBit=i.a.DEPTH_BUFFER_BIT|i.a.COLOR_BUFFER_BIT,r=e.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),e.restoreClear(),n.unbind(e)}else r=e.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",r),this._rendering=!1,this._rendered=!0}});t.a=o},function(e,t,r){"use strict";var n=r(48),i=n.a.extend(function(){return{texture:null,outputs:{color:{}}}},function(){},{getOutput:function(e,t){return this.texture},beforeFrame:function(){},afterFrame:function(){}});t.a=i},function(e,t,r){"use strict";var n=r(16),i=r(48),a=i.a.extend(function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}},function(){var e=new n.a({fragment:this.shader});this.pass=e},{render:function(e,t){this.trigger("beforerender",e),this._rendering=!0;var r=e.gl;for(var n in this.inputLinks){var i=this.inputLinks[n],a=i.node.getOutput(e,i.pin);this.pass.setUniform(n,a)}if(this.outputs){this.pass.outputs={};var o={};for(var s in this.outputs){var u=this.updateParameter(s,e);isNaN(u.width)&&this.updateParameter(s,e);var l=this.outputs[s],h=this._compositor.allocateTexture(u);this._outputTextures[s]=h;var c=l.attachment||r.COLOR_ATTACHMENT0;"string"==typeof c&&(c=r[c]),o[c]=h}this._compositor.getFrameBuffer().bind(e);for(var c in o)this._compositor.getFrameBuffer().attach(o[c],c);this.pass.render(e),this._compositor.getFrameBuffer().updateMipmap(e)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(e),this.pass.render(e,t);for(var n in this.inputLinks){var i=this.inputLinks[n];i.node.removeReference(i.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",e)},updateParameter:function(e,t){var r=this.outputs[e],n=r.parameters,i=r._parametersCopy;if(i||(i=r._parametersCopy={}),n)for(var a in n)"width"!==a&&"height"!==a&&(i[a]=n[a]);var o,s;return o=n.width instanceof Function?n.width.call(this,t):n.width,s=n.height instanceof Function?n.height.call(this,t):n.height,o=Math.ceil(o),s=Math.ceil(s),i.width===o&&i.height===s||this._outputTextures[e]&&this._outputTextures[e].dispose(t),i.width=o,i.height=s,i},setParameter:function(e,t){this.pass.setUniform(e,t)},getParameter:function(e){return this.pass.getUniform(e)},setParameters:function(e){for(var t in e)this.setParameter(t,e[t])},define:function(e,t){this.pass.material.define("fragment",e,t)},undefine:function(e){this.pass.material.undefine("fragment",e)},removeReference:function(e){if(0===--this._outputReferences[e]){this.outputs[e].keepLastFrame?(this._prevOutputTextures[e]&&this._compositor.releaseTexture(this._prevOutputTextures[e]),this._prevOutputTextures[e]=this._outputTextures[e]):this._compositor.releaseTexture(this._outputTextures[e])}},clear:function(){i.a.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});t.a=a},function(e,t,r){"use strict";function n(e){e.import(i.a),e.import(a.a),e.import(o.a),e.import(s.a),e.import(u.a),e.import(l.a),e.import(h.a),e.import(c.a),e.import(d.a),e.import(f.a),e.import(p.a),e.import(m.a),e.import(g.a)}t.a=n;var i=r(185),a=r(87),o=r(186),s=r(88),u=r(187),l=r(89),h=r(90),c=r(91),d=r(92),f=r(93),p=r(188),m=r(94),g=r(95)},function(e,t,r){"use strict";t.a="@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"},function(e,t,r){"use strict";t.a="@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"},function(e,t,r){"use strict";function n(e){for(var t=new Uint8Array(e*e*4),r=0,n=new u.a,i=0;i<e;i++)for(var a=0;a<e;a++)n.set(2*Math.random()-1,2*Math.random()-1,0).normalize(),t[r++]=255*(.5*n.x+.5),t[r++]=255*(.5*n.y+.5),t[r++]=0,t[r++]=255;return t}function i(e){return new l.a({pixels:n(e),wrapS:h.a.REPEAT,wrapT:h.a.REPEAT,width:e,height:e})}function a(e,t,r){var n=new Float32Array(3*e);t=t||0;for(var i=0;i<e;i++){var a=Object(p.a)(i+t,2)*(r?1:2)*Math.PI,o=Object(p.a)(i+t,3)*Math.PI,s=Math.random(),u=Math.cos(a)*Math.sin(o)*s,l=Math.cos(o)*s,h=Math.sin(a)*Math.sin(o)*s;n[3*i]=u,n[3*i+1]=l,n[3*i+2]=h}return n}function o(e){e=e||{},this._ssaoPass=new c.a({fragment:d.a.source("ecgl.ssao.estimate")}),this._blurPass=new c.a({fragment:d.a.source("ecgl.ssao.blur")}),this._framebuffer=new f.a({depthBuffer:!1}),this._ssaoTexture=new l.a,this._blurTexture=new l.a,this._blurTexture2=new l.a,this._depthTex=e.depthTexture,this._normalTex=e.normalTexture,this.setNoiseSize(4),this.setKernelSize(e.kernelSize||12),null!=e.radius&&this.setParameter("radius",e.radius),null!=e.power&&this.setParameter("power",e.power),this._normalTex||(this._ssaoPass.material.disableTexture("normalTex"),this._blurPass.material.disableTexture("normalTex")),this._depthTex||this._blurPass.material.disableTexture("depthTex"),this._blurPass.material.setUniform("normalTex",this._normalTex),this._blurPass.material.setUniform("depthTex",this._depthTex)}var s=r(9),u=r(3),l=r(5),h=r(4),c=r(16),d=r(8),f=r(10),p=r(49),m=r(190);d.a.import(m.a),o.prototype.setDepthTexture=function(e){this._depthTex=e},o.prototype.setNormalTexture=function(e){this._normalTex=e,this._ssaoPass.material[e?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},o.prototype.update=function(e,t,r){var n=e.getWidth(),i=e.getHeight(),a=this._ssaoPass,o=this._blurPass;a.setUniform("kernel",this._kernels[r%this._kernels.length]),a.setUniform("depthTex",this._depthTex),null!=this._normalTex&&a.setUniform("normalTex",this._normalTex),a.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var u=new s.a;s.a.transpose(u,t.worldTransform),a.setUniform("projection",t.projectionMatrix.array),a.setUniform("projectionInv",t.invProjectionMatrix.array),a.setUniform("viewInverseTranspose",u.array);var l=this._ssaoTexture,h=this._blurTexture,c=this._blurTexture2;l.width=n/2,l.height=i/2,h.width=n,h.height=i,c.width=n,c.height=i,this._framebuffer.attach(l),this._framebuffer.bind(e),e.gl.clearColor(1,1,1,1),e.gl.clear(e.gl.COLOR_BUFFER_BIT),a.render(e),o.setUniform("textureSize",[n/2,i/2]),o.setUniform("projection",t.projectionMatrix.array),this._framebuffer.attach(h),o.setUniform("direction",0),o.setUniform("ssaoTexture",l),o.render(e),this._framebuffer.attach(c),o.setUniform("textureSize",[n,i]),o.setUniform("direction",1),o.setUniform("ssaoTexture",h),o.render(e),this._framebuffer.unbind(e);var d=e.clearColor;e.gl.clearColor(d[0],d[1],d[2],d[3])},o.prototype.getTargetTexture=function(){return this._blurTexture2},o.prototype.setParameter=function(e,t){"noiseTexSize"===e?this.setNoiseSize(t):"kernelSize"===e?this.setKernelSize(t):"intensity"===e?this._ssaoPass.material.set("intensity",t):this._ssaoPass.setUniform(e,t)},o.prototype.setKernelSize=function(e){this._kernelSize=e,this._ssaoPass.material.define("fragment","KERNEL_SIZE",e),this._kernels=this._kernels||[];for(var t=0;t<30;t++)this._kernels[t]=a(e,t*e,!!this._normalTex)},o.prototype.setNoiseSize=function(e){var t=this._ssaoPass.getUniform("noiseTex");t?(t.data=n(e),t.width=t.height=e,t.dirty()):(t=i(e),this._ssaoPass.setUniform("noiseTex",i(e))),this._ssaoPass.setUniform("noiseTexSize",[e,e])},o.prototype.dispose=function(e){this._blurTexture.dispose(e),this._ssaoTexture.dispose(e),this._blurTexture2.dispose(e)},t.a=o},function(e,t,r){"use strict";t.a="@export ecgl.ssao.estimate\n\nuniform sampler2D depthTex;\n\nuniform sampler2D normalTex;\n\nuniform sampler2D noiseTex;\n\nuniform vec2 depthTexSize;\n\nuniform vec2 noiseTexSize;\n\nuniform mat4 projection;\n\nuniform mat4 projectionInv;\n\nuniform mat4 viewInverseTranspose;\n\nuniform vec3 kernel[KERNEL_SIZE];\n\nuniform float radius : 1;\n\nuniform float power : 1;\n\nuniform float bias: 1e-2;\n\nuniform float intensity: 1.0;\n\nvarying vec2 v_Texcoord;\n\nfloat ssaoEstimator(in vec3 originPos, in mat3 kernelBasis) {\n float occlusion = 0.0;\n\n for (int i = 0; i < KERNEL_SIZE; i++) {\n vec3 samplePos = kernel[i];\n#ifdef NORMALTEX_ENABLED\n samplePos = kernelBasis * samplePos;\n#endif\n samplePos = samplePos * radius + originPos;\n\n vec4 texCoord = projection * vec4(samplePos, 1.0);\n texCoord.xy /= texCoord.w;\n\n vec4 depthTexel = texture2D(depthTex, texCoord.xy * 0.5 + 0.5);\n\n float sampleDepth = depthTexel.r * 2.0 - 1.0;\n if (projection[3][3] == 0.0) {\n sampleDepth = projection[3][2] / (sampleDepth * projection[2][3] - projection[2][2]);\n }\n else {\n sampleDepth = (sampleDepth - projection[3][2]) / projection[2][2];\n }\n \n float rangeCheck = smoothstep(0.0, 1.0, radius / abs(originPos.z - sampleDepth));\n occlusion += rangeCheck * step(samplePos.z, sampleDepth - bias);\n }\n#ifdef NORMALTEX_ENABLED\n occlusion = 1.0 - occlusion / float(KERNEL_SIZE);\n#else\n occlusion = 1.0 - clamp((occlusion / float(KERNEL_SIZE) - 0.6) * 2.5, 0.0, 1.0);\n#endif\n return pow(occlusion, power);\n}\n\nvoid main()\n{\n\n vec4 depthTexel = texture2D(depthTex, v_Texcoord);\n\n#ifdef NORMALTEX_ENABLED\n vec4 tex = texture2D(normalTex, v_Texcoord);\n if (dot(tex.rgb, tex.rgb) == 0.0) {\n gl_FragColor = vec4(1.0);\n return;\n }\n vec3 N = tex.rgb * 2.0 - 1.0;\n N = (viewInverseTranspose * vec4(N, 0.0)).xyz;\n\n vec2 noiseTexCoord = depthTexSize / vec2(noiseTexSize) * v_Texcoord;\n vec3 rvec = texture2D(noiseTex, noiseTexCoord).rgb * 2.0 - 1.0;\n vec3 T = normalize(rvec - N * dot(rvec, N));\n vec3 BT = normalize(cross(N, T));\n mat3 kernelBasis = mat3(T, BT, N);\n#else\n if (depthTexel.r > 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n"},function(e,t,r){"use strict";function n(e){e=e||{},this._ssrPass=new s.a({fragment:u.a.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new s.a({fragment:u.a.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new s.a({fragment:u.a.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blendPass=new s.a({fragment:u.a.source("clay.compositor.blend")}),this._blendPass.material.disableTexturesAll(),this._blendPass.material.enableTexture(["texture1","texture2"]),this._ssrPass.setUniform("gBufferTexture1",e.normalTexture),this._ssrPass.setUniform("gBufferTexture2",e.depthTexture),this._blurPass1.setUniform("gBufferTexture1",e.normalTexture),this._blurPass1.setUniform("gBufferTexture2",e.depthTexture),this._blurPass2.setUniform("gBufferTexture1",e.normalTexture),this._blurPass2.setUniform("gBufferTexture2",e.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._ssrTexture=new a.a({type:o.a.HALF_FLOAT}),this._texture2=new a.a({type:o.a.HALF_FLOAT}),this._texture3=new a.a({type:o.a.HALF_FLOAT}),this._prevTexture=new a.a({type:o.a.HALF_FLOAT}),this._currentTexture=new a.a({type:o.a.HALF_FLOAT}),this._frameBuffer=new l.a({depthBuffer:!1}),this._normalDistribution=null,this._totalSamples=256,this._samplePerFrame=4,this._ssrPass.material.define("fragment","SAMPLE_PER_FRAME",this._samplePerFrame),this._ssrPass.material.define("fragment","TOTAL_SAMPLES",this._totalSamples),this._downScale=1}var i=r(9),a=(r(3),r(5)),o=r(4),s=r(16),u=r(8),l=r(10),h=(r(49),r(77)),c=r(192);u.a.import(c.a),n.prototype.setAmbientCubemap=function(e,t){this._ssrPass.material.set("specularCubemap",e),this._ssrPass.material.set("specularIntensity",t);var r=e&&t;this._ssrPass.material[r?"enableTexture":"disableTexture"]("specularCubemap")},n.prototype.update=function(e,t,r,n){var a=e.getWidth(),o=e.getHeight(),s=this._ssrTexture,u=this._texture2,l=this._texture3;s.width=this._prevTexture.width=this._currentTexture.width=a/this._downScale,s.height=this._prevTexture.height=this._currentTexture.height=o/this._downScale,u.width=l.width=a,u.height=l.height=o;var h=this._frameBuffer,c=this._ssrPass,d=this._blurPass1,f=this._blurPass2,p=this._blendPass,m=new i.a,g=new i.a;i.a.transpose(m,t.worldTransform),i.a.transpose(g,t.viewMatrix),c.setUniform("sourceTexture",r),c.setUniform("projection",t.projectionMatrix.array),c.setUniform("projectionInv",t.invProjectionMatrix.array),c.setUniform("toViewSpace",m.array),c.setUniform("toWorldSpace",g.array),c.setUniform("nearZ",t.near);var _=n/this._totalSamples*this._samplePerFrame;if(c.setUniform("jitterOffset",_),c.setUniform("sampleOffset",n*this._samplePerFrame),d.setUniform("textureSize",[s.width,s.height]),f.setUniform("textureSize",[a,o]),f.setUniform("sourceTexture",r),d.setUniform("projection",t.projectionMatrix.array),f.setUniform("projection",t.projectionMatrix.array),h.attach(s),h.bind(e),c.render(e),this._physicallyCorrect&&(h.attach(this._currentTexture),p.setUniform("texture1",this._prevTexture),p.setUniform("texture2",s),p.material.set({weight1:n>=1?.95:0,weight2:n>=1?.05:1}),p.render(e)),h.attach(u),d.setUniform("texture",this._physicallyCorrect?this._currentTexture:s),d.render(e),h.attach(l),f.setUniform("texture",u),f.render(e),h.unbind(e),this._physicallyCorrect){var v=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=v}},n.prototype.getTargetTexture=function(){return this._texture3},n.prototype.setParameter=function(e,t){"maxIteration"===e?this._ssrPass.material.define("fragment","MAX_ITERATION",t):this._ssrPass.setUniform(e,t)},n.prototype.setPhysicallyCorrect=function(e){e?(this._normalDistribution||(this._normalDistribution=h.a.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=e},n.prototype.setSSAOTexture=function(e){var t=this._blurPass2;e?(t.material.enableTexture("ssaoTex"),t.material.set("ssaoTex",e)):t.material.disableTexture("ssaoTex")},n.prototype.isFinished=function(e){return!this._physicallyCorrect||e>this._totalSamples/this._samplePerFrame},n.prototype.dispose=function(e){this._ssrTexture.dispose(e),this._texture2.dispose(e),this._texture3.dispose(e),this._prevTexture.dispose(e),this._currentTexture.dispose(e),this._frameBuffer.dispose(e)},t.a=n},function(e,t,r){"use strict";t.a="@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"},function(e,t,r){"use strict";t.a=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925]},function(e,t,r){"use strict";function n(e,t,r,n,i){var a=e.gl;t.setUniform(a,"1i",r,i),a.activeTexture(a.TEXTURE0+i),n.isRenderable()?n.bind(e):n.unbind(e)}function i(e,t,r,i,a){var o,s,u,l,h=e.gl;return function(a,c,d){if(!l||l.material!==a.material){var f=a.material,p=a.__program,m=f.get("roughness");null==m&&(m=1);var g=f.get("normalMap")||t,_=f.get("roughnessMap"),v=f.get("bumpMap"),y=f.get("uvRepeat"),x=f.get("uvOffset"),T=f.get("detailUvRepeat"),b=f.get("detailUvOffset"),w=!!v&&f.isTextureEnabled("bumpMap"),E=!!_&&f.isTextureEnabled("roughnessMap"),S=f.isDefined("fragment","DOUBLE_SIDED");v=v||r,_=_||i,d!==c?(c.set("normalMap",g),c.set("bumpMap",v),c.set("roughnessMap",_),c.set("useBumpMap",w),c.set("useRoughnessMap",E),c.set("doubleSide",S),null!=y&&c.set("uvRepeat",y),null!=x&&c.set("uvOffset",x),null!=T&&c.set("detailUvRepeat",T),null!=b&&c.set("detailUvOffset",b),c.set("roughness",m)):(p.setUniform(h,"1f","roughness",m),o!==g&&n(e,p,"normalMap",g,0),s!==v&&v&&n(e,p,"bumpMap",v,1),u!==_&&_&&n(e,p,"roughnessMap",_,2),null!=y&&p.setUniform(h,"2f","uvRepeat",y),null!=x&&p.setUniform(h,"2f","uvOffset",x),null!=T&&p.setUniform(h,"2f","detailUvRepeat",T),null!=b&&p.setUniform(h,"2f","detailUvOffset",b),p.setUniform(h,"1i","useBumpMap",+w),p.setUniform(h,"1i","useRoughnessMap",+E),p.setUniform(h,"1i","doubleSide",+S)),o=g,s=v,u=_,l=a}}}function a(e){e=e||{},this._depthTex=new o.a({format:s.a.DEPTH_COMPONENT,type:s.a.UNSIGNED_INT}),this._normalTex=new o.a({type:s.a.HALF_FLOAT}),this._framebuffer=new l.a,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,l.a.DEPTH_ATTACHMENT),this._normalMaterial=new h.a({shader:new u.a(u.a.source("ecgl.normal.vertex"),u.a.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=d.a.createBlank("#000"),this._defaultBumpMap=d.a.createBlank("#000"),this._defaultRoughessMap=d.a.createBlank("#000"),this._debugPass=new c.a({fragment:u.a.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}var o=r(5),s=r(4),u=r(8),l=r(10),h=r(19),c=r(16),d=r(61),f=r(195);u.a.import(f.a),a.prototype.getDepthTexture=function(){return this._depthTex},a.prototype.getNormalTexture=function(){return this._normalTex},a.prototype.update=function(e,t,r){var n=e.getWidth(),a=e.getHeight(),o=this._depthTex,s=this._normalTex,u=this._normalMaterial;o.width=n,o.height=a,s.width=n,s.height=a;var l=t.getRenderList(r).opaque;this._framebuffer.bind(e),e.gl.clearColor(0,0,0,0),e.gl.clear(e.gl.COLOR_BUFFER_BIT|e.gl.DEPTH_BUFFER_BIT),e.gl.disable(e.gl.BLEND),e.renderPass(l,r,{getMaterial:function(){return u},ifRender:function(e){return e.renderNormal},beforeRender:i(e,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:e.opaqueSortCompare}),this._framebuffer.unbind(e)},a.prototype.renderDebug=function(e){this._debugPass.render(e)},a.prototype.dispose=function(e){this._depthTex.dispose(e),this._normalTex.dispose(e)},t.a=a},function(e,t,r){"use strict";t.a="@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"},function(e,t,r){"use strict";function n(e){e=e||{},this._edgePass=new o.a({fragment:s.a.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",e.normalTexture),this._edgePass.setUniform("depthTexture",e.depthTexture),this._targetTexture=new i.a({type:a.a.HALF_FLOAT}),this._frameBuffer=new u.a,this._frameBuffer.attach(this._targetTexture)}var i=(r(9),r(3),r(5)),a=r(4),o=r(16),s=r(8),u=r(10);n.prototype.update=function(e,t,r,n){var i=e.getWidth(),a=e.getHeight(),o=this._targetTexture;o.width=i,o.height=a;var s=this._frameBuffer;s.bind(e),this._edgePass.setUniform("projectionInv",t.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[i,a]),this._edgePass.setUniform("texture",r),this._edgePass.render(e),s.unbind(e)},n.prototype.getTargetTexture=function(){return this._targetTexture},n.prototype.setParameter=function(e,t){this._edgePass.setUniform(e,t)},n.prototype.dispose=function(e){this._targetTexture.dispose(e),this._frameBuffer.dispose(e)},t.a=n},function(e,t,r){"use strict";t.a={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]}},function(e,t,r){"use strict";t.a="@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"},function(e,t,r){"use strict";t.a="@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end"},function(e,t,r){"use strict";function n(e){for(var t=[],r=0;r<30;r++)t.push([Object(i.a)(r,2),Object(i.a)(r,3)]);this._haltonSequence=t,this._frame=0,this._sourceTex=new s.a,this._sourceFb=new o.a,this._sourceFb.attach(this._sourceTex),this._prevFrameTex=new s.a,this._outputTex=new s.a;var n=this._blendPass=new a.a({fragment:u.a.source("clay.compositor.blend")});n.material.disableTexturesAll(),n.material.enableTexture(["texture1","texture2"]),this._blendFb=new o.a({depthBuffer:!1}),this._outputPass=new a.a({fragment:u.a.source("clay.compositor.output"),blendWithPrevious:!0}),this._outputPass.material.define("fragment","OUTPUT_ALPHA"),this._outputPass.material.blend=function(e){e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)}}var i=r(49),a=r(16),o=r(10),s=r(5),u=r(8),l=r(9);n.prototype={constructor:n,jitterProjection:function(e,t){var r=e.viewport,n=r.devicePixelRatio||e.getDevicePixelRatio(),i=r.width*n,a=r.height*n,o=this._haltonSequence[this._frame%this._haltonSequence.length],s=new l.a;s.array[12]=(2*o[0]-1)/i,s.array[13]=(2*o[1]-1)/a,l.a.mul(t.projectionMatrix,s,t.projectionMatrix),l.a.invert(t.invProjectionMatrix,t.projectionMatrix)},resetFrame:function(){this._frame=0},getFrame:function(){return this._frame},getSourceFrameBuffer:function(){return this._sourceFb},getOutputTexture:function(){return this._outputTex},resize:function(e,t){this._prevFrameTex.width=e,this._prevFrameTex.height=t,this._outputTex.width=e,this._outputTex.height=t,this._sourceTex.width=e,this._sourceTex.height=t,this._prevFrameTex.dirty(),this._outputTex.dirty(),this._sourceTex.dirty()},isFinished:function(){return this._frame>=this._haltonSequence.length},render:function(e,t,r){var n=this._blendPass;0===this._frame?(n.setUniform("weight1",0),n.setUniform("weight2",1)):(n.setUniform("weight1",.9),n.setUniform("weight2",.1)),n.setUniform("texture1",this._prevFrameTex),n.setUniform("texture2",t||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(e),n.render(e),this._blendFb.unbind(e),r||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(e));var i=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=i,this._frame++},dispose:function(e){this._sourceFb.dispose(e),this._blendFb.dispose(e),this._prevFrameTex.dispose(e),this._outputTex.dispose(e),this._sourceTex.dispose(e),this._outputPass.dispose(e),this._blendPass.dispose(e)}},t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n);r(202),r(203),r(98);i.a.registerAction({type:"geo3DChangeCamera",event:"geo3dcamerachanged",update:"series:updateCamera"},function(e,t){t.eachComponent({mainType:"geo3D",query:e},function(t){t.setView(e)})})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(44),o=r(28),s=r(29),u=r(31),l=r(96),h=i.a.extendComponentModel({type:"geo3D",layoutMode:"box",coordinateSystem:null,optionUpdated:function(){var e=this.option;e.regions=this.getFilledRegions(e.regions,e.map);var t=i.a.helper.completeDimensions(["value"],e.data,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),r=new i.a.List(t,this);r.initData(e.regions);var n={};r.each(function(e){var t=r.getName(e),i=r.getItemModel(e);n[t]=i}),this._regionModelMap=n,this._data=r},getData:function(){return this._data},getRegionModel:function(e){var t=this.getData().getName(e);return this._regionModelMap[t]||new i.a.Model(null,this)},getRegionPolygonCoords:function(e){var t=this.getData().getName(e),r=this.coordinateSystem.getRegion(t);return r?r.geometries:[]},getFormattedLabel:function(e,t){var r=this._data.getName(e),n=this.getRegionModel(r),i=n.get("normal"===t?["label","formatter"]:["emphasis","label","formatter"]);null==i&&(i=n.get(["label","formatter"]));var a={name:r};if("function"==typeof i)return a.status=t,i(a);if("string"==typeof i){var o=a.seriesName;return i.replace("{a}",null!=o?o:"")}return r},defaultOption:{regions:[]}});i.a.util.merge(h.prototype,l.a),i.a.util.merge(h.prototype,a.a),i.a.util.merge(h.prototype,o.a),i.a.util.merge(h.prototype,s.a),i.a.util.merge(h.prototype,u.a)},function(e,t,r){"use strict";var n=r(64),i=r(0),a=r.n(i),o=r(1),s=r(45),u=r(30);a.a.extendComponentView({type:"geo3D",__ecgl__:!0,init:function(e,t){this._geo3DBuilder=new n.a(t),this.groupGL=new o.a.Node,this._lightRoot=new o.a.Node,this._sceneHelper=new u.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot),this._control=new s.a({zr:t.getZr()}),this._control.init()},render:function(e,t,r){this.groupGL.add(this._geo3DBuilder.rootNode);var n=e.coordinateSystem;if(n&&n.viewGL){n.viewGL.add(this._lightRoot),e.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var i=this._control;i.setViewGL(n.viewGL);var a=e.getModel("viewControl");i.setFromViewControlModel(a,0),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(e),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling")),this._geo3DBuilder.update(e,t,r,0,e.getData().count());var o=n.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse(function(e){e.material&&e.material[o]("fragment","SRGB_DECODE")}),i.off("update"),i.on("update",function(){r.dispatchAction({type:"geo3DChangeCamera",alpha:i.getAlpha(),beta:i.getBeta(),distance:i.getDistance(),center:i.getCenter(),from:this.uid,geo3DId:e.id})}),i.update()}},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r)},dispose:function(){this._control.dispose()}})},function(e,t,r){"use strict";function n(e,t,r){r=r||2;var n=t&&t.length,a=n?t[0]*r:e.length,s=i(e,0,a,r,!0),u=[];if(!s)return u;var l,h,d,f,p,m,g;if(n&&(s=c(e,t,s,r)),e.length>80*r){l=d=e[0],h=f=e[1];for(var _=r;_<a;_+=r)p=e[_],m=e[_+1],p<l&&(l=p),m<h&&(h=m),p>d&&(d=p),m>f&&(f=m);g=Math.max(d-l,f-h)}return o(s,u,r,l,h,g),u}function i(e,t,r,n,i){var a,o;if(i===N(e,t,r,n)>0)for(a=t;a<r;a+=n)o=C(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=C(a,e[a],e[a+1],o);return o&&b(o,o.next)&&(L(o),o=o.next),o}function a(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!b(n,n.next)&&0!==T(n.prev,n,n.next))n=n.next;else{if(L(n),(n=t=n.prev)===n.next)return null;r=!0}}while(r||n!==t);return t}function o(e,t,r,n,i,c,d){if(e){!d&&c&&m(e,n,i,c);for(var f,p,g=e;e.prev!==e.next;)if(f=e.prev,p=e.next,c?u(e,n,i,c):s(e))t.push(f.i/r),t.push(e.i/r),t.push(p.i/r),L(e),e=p.next,g=p.next;else if((e=p)===g){d?1===d?(e=l(e,t,r),o(e,t,r,n,i,c,2)):2===d&&h(e,t,r,n,i,c):o(a(e),t,r,n,i,c,1);break}}}function s(e){var t=e.prev,r=e,n=e.next;if(T(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(y(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&T(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(e,t,r,n){var i=e.prev,a=e,o=e.next;if(T(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,u=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,l=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,c=_(s,u,t,r,n),d=_(l,h,t,r,n),f=e.nextZ;f&&f.z<=d;){if(f!==e.prev&&f!==e.next&&y(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=e.prevZ;f&&f.z>=c;){if(f!==e.prev&&f!==e.next&&y(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function l(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!b(i,a)&&w(i,n,n.next,a)&&S(i,a)&&S(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),L(n),L(n.next),n=e=a),n=n.next}while(n!==e);return n}function h(e,t,r,n,i,s){var u=e;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&x(u,l)){var h=M(u,l);return u=a(u,u.next),h=a(h,h.next),o(u,t,r,n,i,s),void o(h,t,r,n,i,s)}l=l.next}u=u.next}while(u!==e)}function c(e,t,r,n){var o,s,u,l,h,c=[];for(o=0,s=t.length;o<s;o++)u=t[o]*n,l=o<s-1?t[o+1]*n:e.length,h=i(e,u,l,n,!1),h===h.next&&(h.steiner=!0),c.push(v(h));for(c.sort(d),o=0;o<c.length;o++)f(c[o],r),r=a(r,r.next);return r}function d(e,t){return e.x-t.x}function f(e,t){if(t=p(e,t)){var r=M(t,e);a(r,r.next)}}function p(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(i===o)return r.prev;var u,l=r,h=r.x,c=r.y,d=1/0;for(n=r.next;n!==l;)i>=n.x&&n.x>=h&&i!==n.x&&y(a<c?i:o,a,h,c,a<c?o:i,a,n.x,n.y)&&((u=Math.abs(a-n.y)/(i-n.x))<d||u===d&&n.x>r.x)&&S(n,e)&&(r=n,d=u),n=n.next;return r}function m(e,t,r,n){var i=e;do{null===i.z&&(i.z=_(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,r,n,i,a,o,s,u,l=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<l&&(s++,n=n.nextZ);t++);for(u=l;s>0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,r,n,i){return e=32767*(e-r)/i,t=32767*(t-n)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function v(e){var t=e,r=e;do{t.x<r.x&&(r=t),t=t.next}while(t!==e);return r}function y(e,t,r,n,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function x(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&S(e,t)&&S(t,e)&&A(e,t)}function T(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){return!!(b(e,t)&&b(r,n)||b(e,n)&&b(r,t))||T(e,t,r)>0!=T(e,t,n)>0&&T(r,n,e)>0!=T(r,n,t)>0}function E(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function S(e,t){return T(e.prev,e,e.next)<0?T(e,t,e.next)>=0&&T(e,e.prev,t)>=0:T(e,t,e.prev)<0||T(e,e.next,t)<0}function A(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}function M(e,t){var r=new D(e.i,e.x,e.y),n=new D(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function C(e,t,r,n){var i=new D(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function L(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function D(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function N(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}t.a=n,n.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(N(e,0,a,r));if(i)for(var s=0,u=t.length;s<u;s++){var l=t[s]*r,h=s<u-1?t[s+1]*r:e.length;o-=Math.abs(N(e,l,h,r))}var c=0;for(s=0;s<n.length;s+=3){var d=n[s]*r,f=n[s+1]*r,p=n[s+2]*r;c+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)}},function(e,t,r){function n(e){i.each(e.regions,function(e){var t=a[e.name];if(t){var r=e.center;r[0]+=t[0]/10.5,r[1]+=-t[1]/14}})}var i=r(13),a={"鍗楁捣璇稿矝":[32,80],"骞夸笢":[0,-10],"棣欐腐":[10,5],"婢抽棬":[-10,10],"澶╂触":[5,5]};e.exports=n},function(e,t,r){function n(e){i.each(e.regions,function(e){var t=a[e.name];if(t){var r=e.center;r[0]=t[0],r[1]=t[1]}})}var i=r(13),a={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};e.exports=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n);r(208),r(209),r(211);i.a.registerAction({type:"globeChangeCamera",event:"globecamerachanged",update:"series:updateCamera"},function(e,t){t.eachComponent({mainType:"globe",query:e},function(t){t.setView(e)})}),i.a.registerAction({type:"globeUpdateDisplacment",event:"globedisplacementupdated",update:"update"},function(e,t){})},function(e,t,r){"use strict";function n(e,t){e.id=e.id||e.name||t+""}var i=r(0),a=r.n(i),o=r(44),s=r(28),u=r(29),l=r(31),h=a.a.extendComponentModel({type:"globe",layoutMode:"box",coordinateSystem:null,init:function(){h.superApply(this,"init",arguments),a.a.util.each(this.option.layers,function(e,t){a.a.util.merge(e,this.defaultLayerOption),n(e,t)},this)},mergeOption:function(e){function t(e){return a.a.util.reduce(e,function(e,t,r){return n(t,r),e[t.id]=t,e},{})}var r=this.option.layers;if(this.option.layers=null,h.superApply(this,"mergeOption",arguments),r&&r.length){var i=t(e.layers),o=t(r);for(var s in i)o[s]?a.a.util.merge(o[s],i[s],!0):r.push(e.layers[s]);this.option.layers=r}a.a.util.each(this.option.layers,function(e){a.a.util.merge(e,this.defaultLayerOption)},this)},optionUpdated:function(){this.updateDisplacementHash()},defaultLayerOption:{show:!0,type:"overlay"},defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",baseColor:"#fff",baseTexture:"",heightTexture:"",displacementTexture:"",displacementScale:0,displacementQuality:"medium",globeRadius:100,globeOuterRadius:150,shading:"lambert",light:{main:{time:""}},viewControl:{autoRotate:!0,panSensitivity:0,targetCoord:null},layers:[]},setDisplacementData:function(e,t,r){this.displacementData=e,this.displacementWidth=t,this.displacementHeight=r},getDisplacementTexture:function(){return this.get("displacementTexture")||this.get("heightTexture")},getDisplacemenScale:function(){var e=this.getDisplacementTexture(),t=this.get("displacementScale");return e&&"none"!==e||(t=0),t},hasDisplacement:function(){return this.getDisplacemenScale()>0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var e=this.getDisplacementTexture(),t=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==e||this._displacementScale!==t,this._displacementTexture=e,this._displacementScale=t},isDisplacementChanged:function(){return this._displacementChanged}});a.a.util.merge(h.prototype,o.a),a.a.util.merge(h.prototype,s.a),a.a.util.merge(h.prototype,u.a),a.a.util.merge(h.prototype,l.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(45),s=r(30),u=r(210),l=r(2);i.a.extendComponentView({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(e,t){this.groupGL=new a.a.Node,this._sphereGeometry=new a.a.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new a.a.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new a.a.PlaneGeometry,this._earthMesh=new a.a.Mesh({renderNormal:!0}),this._lightRoot=new a.a.Node,this._sceneHelper=new s.a,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._earthMesh),this._control=new o.a({zr:t.getZr()}),this._control.init(),this._layerMeshes={}},render:function(e,t,r){var n=e.coordinateSystem,i=e.get("shading");n.viewGL.add(this._lightRoot),e.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL),this._sceneHelper.setScene(n.viewGL.scene),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var s="ecgl."+i;o.material&&o.material.shader.name===s||(o.material=a.a.createMaterial(s)),a.a.setMaterialFromModel(i,o.material,e,r),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach(function(e){var t=o.material.get(e);t&&(t.flipY=!1)}),o.material.set("color",a.a.parseColor(e.get("baseColor")));var u=.99*n.radius;o.scale.set(u,u,u);var l=o.material.setTextureImage("diffuseMap",e.get("baseTexture"),r,{flipY:!1,anisotropic:8});l&&l.surface&&l.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",e.get("heightTexture"),r,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[e.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(e,r),this._displaceVertices(e,r),this._updateViewControl(e,r),this._updateLayers(e,r)},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r)},_updateLayers:function(e,t){var r=e.coordinateSystem,n=e.get("layers"),o=r.radius,s=[],u=[],h=[],c=[];i.a.util.each(n,function(e){var n=new i.a.Model(e),d=n.get("type"),f=a.a.loadTexture(n.get("texture"),t,{flipY:!1,anisotropic:8});if(f.surface&&f.surface.attachToMesh(this._earthMesh),"blend"===d){var p=n.get("blendTo"),m=l.a.firstNotNull(n.get("intensity"),1);"emission"===p?(h.push(f),c.push(m)):(s.push(f),u.push(m))}else{var g=n.get("id"),_=this._layerMeshes[g];_||(_=this._layerMeshes[g]=new a.a.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0}));"lambert"===n.get("shading")?(_.material=_.__lambertMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),_.__lambertMaterial=_.material):(_.material=_.__colorMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.color"),transparent:!0,depthMask:!1}),_.__colorMaterial=_.material),_.material.enableTexture("diffuseMap");var v=n.get("distance"),y=o+(null==v?r.radius/100:v);_.scale.set(y,y,y),o=y;var x=this._blankTexture||(this._blankTexture=a.a.createBlankTexture("rgba(255, 255, 255, 0)"));_.material.set("diffuseMap",x),a.a.loadTexture(n.get("texture"),t,{flipY:!1,anisotropic:8},function(e){e.surface&&e.surface.attachToMesh(_),_.material.set("diffuseMap",e),t.getZr().refresh()}),n.get("show")?this.groupGL.add(_):this.groupGL.remove(_)}},this);var d=this._earthMesh.material;d.define("fragment","LAYER_DIFFUSEMAP_COUNT",s.length),d.define("fragment","LAYER_EMISSIVEMAP_COUNT",h.length),d.set("layerDiffuseMap",s),d.set("layerDiffuseIntensity",u),d.set("layerEmissiveMap",h),d.set("layerEmissionIntensity",c);var f=e.getModel("debug.wireframe");if(f.get("show")){d.define("both","WIREFRAME_TRIANGLE");var p=a.a.parseColor(f.get("lineStyle.color")||"rgba(0,0,0,0.5)"),m=l.a.firstNotNull(f.get("lineStyle.width"),1);d.set("wireframeLineWidth",m),d.set("wireframeLineColor",p)}else d.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(e,t){function r(){return{type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-n.radius,center:o.getCenter(),from:a.uid,globeId:e.id}}var n=e.coordinateSystem,i=e.getModel("viewControl"),a=(n.viewGL.camera,this),o=this._control;o.setViewGL(n.viewGL);var s,u,l=i.get("targetCoord");null!=l&&(u=l[0]+90,s=l[1]),o.setFromViewControlModel(i,{baseDistance:n.radius,alpha:s,beta:u}),o.off("update"),o.on("update",function(){t.dispatchAction(r())})},_displaceVertices:function(e,t){var r=e.get("displacementQuality"),n=e.get("debug.wireframe.show"),i=e.coordinateSystem;if(e.isDisplacementChanged()||r!==this._displacementQuality||n!==this._showDebugWireframe){this._displacementQuality=r,this._showDebugWireframe=n;var a=this._sphereGeometry,o={low:100,medium:200,high:400,ultra:800}[r]||200,s=o/2;(a.widthSegments!==o||n)&&(a.widthSegments=o,a.heightSegments=s,a.build()),this._doDisplaceVertices(a,i),n&&a.generateBarycentric()}},_doDisplaceVertices:function(e,t){var r=e.attributes.position.value,n=e.attributes.texcoord0.value,i=e.__originalPosition;i&&i.length===r.length||(i=new Float32Array(r.length),i.set(r),e.__originalPosition=i);for(var a=t.displacementWidth,o=t.displacementHeight,s=t.displacementData,u=0;u<e.vertexCount;u++){var l=3*u,h=2*u,c=i[l+1],d=i[l+2],f=i[l+3],p=n[h++],m=n[h++],g=Math.round(p*(a-1)),_=Math.round(m*(o-1)),v=_*a+g,y=s?s[v]:0;r[l+1]=c+c*y,r[l+2]=d+d*y,r[l+3]=f+f*y}e.generateVertexNormals(),e.dirty(),e.updateBoundingBox()},_updateLight:function(e,t){var r=this._earthMesh;this._sceneHelper.updateLight(e);var n=this._sceneHelper.mainLight,a=e.get("light.main.time")||new Date,o=u.a.getPosition(i.a.number.parseDate(a),0,0),s=Math.cos(o.altitude);n.position.y=-s*Math.cos(o.azimuth),n.position.x=Math.sin(o.altitude),n.position.z=s*Math.sin(o.azimuth),n.lookAt(r.getWorldPosition())},dispose:function(e,t){this.groupGL.removeAll(),this._control.dispose()}})},function(e,t,r){"use strict";function n(e){return e.valueOf()/x-.5+T}function i(e){return n(e)-b}function a(e,t){return v(p(e)*m(w)-g(t)*p(w),m(e))}function o(e,t){return _(p(t)*m(w)+m(t)*p(w)*p(e))}function s(e,t,r){return v(p(e),m(e)*p(t)-g(r)*m(t))}function u(e,t,r){return _(p(t)*p(r)+m(t)*m(r)*m(e))}function l(e,t){return y*(280.16+360.9856235*e)-t}function h(e){return y*(357.5291+.98560028*e)}function c(e){return e+y*(1.9148*p(e)+.02*p(2*e)+3e-4*p(3*e))+102.9372*y+f}function d(e){var t=h(e),r=c(t);return{dec:o(r,0),ra:a(r,0)}}var f=Math.PI,p=Math.sin,m=Math.cos,g=Math.tan,_=Math.asin,v=Math.atan2,y=f/180,x=864e5,T=2440588,b=2451545,w=23.4397*y,E={};E.getPosition=function(e,t,r){var n=y*-r,a=y*t,o=i(e),h=d(o),c=l(o,n)-h.ra;return{azimuth:s(c,a,h.dec),altitude:u(c,a,h.dec)}},t.a=E},function(e,t,r){"use strict";function n(e,t){var r=document.createElement("canvas"),n=r.getContext("2d"),i=e.width,a=e.height;r.width=i,r.height=a,n.drawImage(e,0,0,i,a);for(var o=n.getImageData(0,0,i,a).data,s=new Float32Array(o.length/4),u=0;u<o.length/4;u++){var l=o[4*u];s[u]=l/255*t}return{data:s,width:i,height:a}}function i(e,t){var r=e.getBoxLayoutParams(),n=h.a.getLayoutRect(r,{width:t.getWidth(),height:t.getHeight()});n.y=t.getHeight()-n.y-n.height,this.viewGL.setViewport(n.x,n.y,n.width,n.height,t.getDevicePixelRatio()),this.radius=e.get("globeRadius");var i=e.get("globeOuterRadius");this.altitudeAxis&&this.altitudeAxis.setExtent(0,i-this.radius)}function a(e,t){var r=[1/0,-1/0];if(e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData(),n=e.coordDimToDataDim("alt"),i=n&&n[0];if(i){var a=t.getDataExtent(i,!0);r[0]=Math.min(r[0],a[0]),r[1]=Math.max(r[1],a[1])}}},this),r&&isFinite(r[1]-r[0])){var n=u.a.helper.createScale(r,{type:"value",min:"dataMin",max:"dataMax"});this.altitudeAxis=new u.a.Axis("altitude",n),this.resize(this.model,t)}}var o=r(212),s=r(0),u=r.n(s),l=r(47),h=r.n(l),c=r(22),d=r(2),f=r(1),p={dimensions:o.a.prototype.dimensions,create:function(e,t){var r=[];return e.eachComponent("globe",function(e){e.__viewGL=e.__viewGL||new c.a;var n=new o.a;n.viewGL=e.__viewGL,e.coordinateSystem=n,n.model=e,r.push(n),n.resize=i,n.resize(e,t),n.update=a}),e.eachSeries(function(t){if("globe"===t.get("coordinateSystem")){var r=t.getReferringComponents("globe")[0];if(r||(r=e.getComponent("globe")),!r)throw new Error('globe "'+d.a.firstNotNull(t.get("globe3DIndex"),t.get("globe3DId"),0)+'" not found');var n=r.coordinateSystem;t.coordinateSystem=n}}),e.eachComponent("globe",function(e,r){var i=e.coordinateSystem,a=e.getDisplacementTexture(),o=e.getDisplacemenScale();if(e.isDisplacementChanged()){if(e.hasDisplacement()){var s=!0;f.a.loadTexture(a,t,function(r){var i=r.image,a=n(i,o);e.setDisplacementData(a.data,a.width,a.height),s||t.dispatchAction({type:"globeUpdateDisplacment"})}),s=!1}else i.setDisplacementData(null,0,0);i.setDisplacementData(e.displacementData,e.displacementWidth,e.displacementHeight)}}),r}};u.a.registerCoordinateSystem("globe",p)},function(e,t,r){"use strict";function n(e){this.radius=e,this.viewGL=null,this.altitudeAxis,this.displacementData=null,this.displacementWidth,this.displacementHeight}var i=r(6),a=i.a.vec3;n.prototype={constructor:n,dimensions:["lng","lat","alt"],type:"globe",containPoint:function(){},setDisplacementData:function(e,t,r){this.displacementData=e,this.displacementWidth=t,this.displacementHeight=r},_getDisplacementScale:function(e,t){var r=(e+180)/360*(this.displacementWidth-1),n=(90-t)/180*(this.displacementHeight-1),i=Math.round(r)+Math.round(n)*this.displacementWidth;return this.displacementData[i]},dataToPoint:function(e,t){var r=e[0],n=e[1],i=e[2]||0,a=this.radius;this.displacementData&&(a*=1+this._getDisplacementScale(r,n)),this.altitudeAxis&&(a+=this.altitudeAxis.dataToCoord(i)),r=r*Math.PI/180,n=n*Math.PI/180;var o=Math.cos(n)*a;return t=t||[],t[0]=-o*Math.cos(r+Math.PI),t[1]=Math.sin(n)*a,t[2]=o*Math.sin(r+Math.PI),t},pointToData:function(e,t){var r=e[0],n=e[1],i=e[2],o=a.len(e);r/=o,n/=o,i/=o;var s=Math.asin(n),u=Math.atan2(i,-r);u<0&&(u=2*Math.PI+u);var l=180*s/Math.PI,h=180*u/Math.PI-180;return t=t||[],t[0]=h,t[1]=l,t[2]=o-this.radius,this.altitudeAxis&&(t[2]=this.altitudeAxis.coordToData(t[2])),t}},t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n);r(214),r(216),r(217);i.a.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},function(e,t){t.eachComponent({mainType:"mapbox3D",query:e},function(t){t.setMapboxCameraOption(e)})})},function(e,t,r){"use strict";var n=r(215),i=r(0),a=r.n(i),o=r(101),s=Object(o.a)("mapbox3D",n.a,function(e){e.forEach(function(e){e.setCameraOption(e.model.getMapboxCameraOption())})});a.a.registerCoordinateSystem("mapbox3D",s)},function(e,t,r){"use strict";function n(){i.a.apply(this,arguments)}var i=r(100);n.prototype=new i.a,n.prototype.constructor=n,n.prototype.type="mapbox3D",t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(28),o=r(29),s=["zoom","center","pitch","bearing"],u=i.a.extendComponentModel({type:"mapbox3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,style:"mapbox://styles/mapbox/light-v9",center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMapboxCameraOption:function(){var e=this;return s.reduce(function(t,r){return t[r]=e.get(r),t},{})},setMapboxCameraOption:function(e){null!=e&&s.forEach(function(t){null!=e[t]&&(this.option[t]=e[t])},this)},getMapbox:function(){return this._mapbox},setMapbox:function(e){this._mapbox=e}});i.a.util.merge(u.prototype,a.a),i.a.util.merge(u.prototype,o.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(218),o=r(30),s=r(1),u=r(102);s.a.Shader.import(u.a);i.a.extendComponentView({type:"mapbox3D",__ecgl__:!0,init:function(e,t){var r=t.getZr();this._zrLayer=new a.a("mapbox3D",r),r.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new s.a.Node,this._sceneHelper=new o.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var n=this._zrLayer.getMapbox(),i=this._dispatchInteractAction.bind(this,t,n);["zoom","rotate","drag","pitch","rotate","move"].forEach(function(e){n.on(e,i)}),this._groundMesh=new s.a.Mesh({geometry:new s.a.PlaneGeometry,material:new s.a.Material({shader:new s.a.Shader({vertex:s.a.Shader.source("ecgl.displayShadow.vertex"),fragment:s.a.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},render:function(e,t,r){var n=this._zrLayer.getMapbox(),i=e.get("style"),a=JSON.stringify(i);a!==this._oldStyleStr&&i&&n.setStyle(i),this._oldStyleStr=a,n.setCenter(e.get("center")),n.setZoom(e.get("zoom")),n.setPitch(e.get("pitch")),n.setBearing(e.get("bearing")),e.setMapbox(n);var o=e.coordinateSystem;o.viewGL.scene.add(this._lightRoot),o.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(o.viewGL.scene),this._sceneHelper.updateLight(e),o.viewGL.setPostEffect(e.getModel("postEffect"),r),o.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling")),this._mapbox3DModel=e},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r),e.coordinateSystem.viewGL.scene.traverse(function(e){e.material&&(e.material.define("fragment","NORMAL_UP_AXIS",2),e.material.define("fragment","NORMAL_FRONT_AXIS",1))})},updateCamera:function(e,t,r,n){e.coordinateSystem.setCameraOption(n),this._updateGroundMesh(),r.getZr().refresh()},_dispatchInteractAction:function(e,t,r){e.dispatchAction({type:"mapbox3DChangeCamera",pitch:t.getPitch(),zoom:t.getZoom(),center:t.getCenter().toArray(),bearing:t.getBearing(),mapbox3DId:this._mapbox3DModel&&this._mapbox3DModel.id})},_updateGroundMesh:function(){if(this._mapbox3DModel){var e=this._mapbox3DModel.coordinateSystem,t=e.dataToPoint(e.center);this._groundMesh.position.set(t[0],t[1],-.001);var r=new s.a.Plane(new s.a.Vector3(0,0,1),0),n=e.viewGL.camera.castRay(new s.a.Vector2(-1,-1)),i=e.viewGL.camera.castRay(new s.a.Vector2(1,1)),a=n.intersectPlane(r),o=i.intersectPlane(r),u=a.dist(o)/e.viewGL.rootNode.scale.x;this._groundMesh.scale.set(u,u,1)}},dispose:function(e,t){this._zrLayer&&this._zrLayer.dispose(),t.getZr().painter.delLayer(-1e3)}})},function(e,t,r){"use strict";function n(e,t){if(this.id=e,this.zr=t,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!mapboxgl)throw new Error("Mapbox GL library must be included. See https://www.mapbox.com/mapbox-gl-js/api/");this._mapbox=new mapboxgl.Map({container:this.dom}),this._initEvents()}n.prototype.resize=function(){this._mapbox.resize()},n.prototype.getMapbox=function(){return this._mapbox},n.prototype.clear=function(){},n.prototype.refresh=function(){this._mapbox.resize()};var i=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","wheel","touchstart","touchend","touchmove","touchcancel"];n.prototype._initEvents=function(){var e=this._mapbox.getCanvasContainer();this._handlers=this._handlers||{contextmenu:function(e){return e.preventDefault(),!1}},i.forEach(function(t){this._handlers[t]=function(t){var r={};for(var n in t)r[n]=t[n];r.bubbles=!1;var i=new t.constructor(t.type,r);e.dispatchEvent(i)},this.zr.dom.addEventListener(t,this._handlers[t])},this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},n.prototype.dispose=function(){i.forEach(function(e){this.zr.dom.removeEventListener(e,this._handlers[e])},this)},t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n);r(220),r(222),r(223);i.a.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},function(e,t){t.eachComponent({mainType:"maptalks3D",query:e},function(t){t.setMaptalksCameraOption(e)})})},function(e,t,r){"use strict";var n=r(221),i=r(0),a=r.n(i),o=r(101),s=Object(o.a)("maptalks3D",n.a,function(e){e.forEach(function(e){e.setCameraOption(e.model.getMaptalksCameraOption())})});a.a.registerCoordinateSystem("maptalks3D",s)},function(e,t,r){"use strict";function n(){i.a.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}var i=r(100);n.prototype=new i.a,n.prototype.constructor=n,n.prototype.type="maptalks3D",t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(28),o=r(29),s=["zoom","center","pitch","bearing"],u=i.a.extendComponentModel({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'&copy; <a href="http://osm.org">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/">CARTO</a>',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var e=this;return s.reduce(function(t,r){return t[r]=e.get(r),t},{})},setMaptalksCameraOption:function(e){null!=e&&s.forEach(function(t){null!=e[t]&&(this.option[t]=e[t])},this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(e){this._maptalks=e}});i.a.util.merge(u.prototype,a.a),i.a.util.merge(u.prototype,o.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(224),o=r(30),s=r(1),u=r(102);s.a.Shader.import(u.a);i.a.extendComponentView({type:"maptalks3D",__ecgl__:!0,init:function(e,t){this._groundMesh=new s.a.Mesh({geometry:new s.a.PlaneGeometry,material:new s.a.Material({shader:new s.a.Shader({vertex:s.a.Shader.source("ecgl.displayShadow.vertex"),fragment:s.a.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(e,t){var r=t.getZr();this._zrLayer=new a.a("maptalks3D",r,e.get("center"),e.get("zoom")),r.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new s.a.Node,this._sceneHelper=new o.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var n=this._zrLayer.getMaptalks(),i=this._dispatchInteractAction.bind(this,t,n);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend"].forEach(function(e){n.on(e,i)})},render:function(e,t,r){this._zrLayer||this._initMaptalksLayer(e,r);var n=this._zrLayer.getMaptalks(),i=e.get("urlTemplate"),a=n.getBaseLayer();i!==this._oldUrlTemplate&&(a?a.setOptions({urlTemplate:i,attribution:e.get("attribution")}):(a=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:i,subdomains:["a","b","c"],attribution:e.get("attribution")}),n.setBaseLayer(a))),this._oldUrlTemplate=i,n.setCenter(e.get("center")),n.setZoom(e.get("zoom"),{animation:!1}),n.setPitch(e.get("pitch")),n.setBearing(e.get("bearing")),e.setMaptalks(n);var o=e.coordinateSystem;o.viewGL.scene.add(this._lightRoot),o.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(o.viewGL.scene),this._sceneHelper.updateLight(e),o.viewGL.setPostEffect(e.getModel("postEffect"),r),o.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling")),this._maptalks3DModel=e},afterRender:function(e,t,r,n){var i=n.renderer;this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r),e.coordinateSystem.viewGL.scene.traverse(function(e){e.material&&(e.material.define("fragment","NORMAL_UP_AXIS",2),e.material.define("fragment","NORMAL_FRONT_AXIS",1))})},updateCamera:function(e,t,r,n){e.coordinateSystem.setCameraOption(n),this._updateGroundMesh(),r.getZr().refresh()},_dispatchInteractAction:function(e,t,r){e.dispatchAction({type:"maptalks3DChangeCamera",pitch:t.getPitch(),zoom:t.getZoom(),center:t.getCenter().toArray(),bearing:t.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var e=this._maptalks3DModel.coordinateSystem,t=e.dataToPoint(e.center);this._groundMesh.position.set(t[0],t[1],-.001);var r=new s.a.Plane(new s.a.Vector3(0,0,1),0),n=e.viewGL.camera.castRay(new s.a.Vector2(-1,-1)),i=e.viewGL.camera.castRay(new s.a.Vector2(1,1)),a=n.intersectPlane(r),o=i.intersectPlane(r),u=a.dist(o)/e.viewGL.rootNode.scale.x;this._groundMesh.scale.set(u,u,1)}},dispose:function(e,t){this._zrLayer&&this._zrLayer.dispose(),t.getZr().painter.delLayer(-1e3)}})},function(e,t,r){"use strict";function n(e,t,r,n){if(this.id=e,this.zr=t,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:r,zoom:n,fog:!1}),this._initEvents()}n.prototype.resize=function(){this._maptalks.checkSize()},n.prototype.getMaptalks=function(){return this._maptalks},n.prototype.clear=function(){},n.prototype.refresh=function(){this._maptalks.checkSize()};var i=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];n.prototype._initEvents=function(){var e=this.dom;this._handlers=this._handlers||{contextmenu:function(e){return e.preventDefault(),!1}},i.forEach(function(t){this._handlers[t]=function(r){var n={};for(var i in r)n[i]=r[i];n.bubbles=!1;var a=new r.constructor(r.type,n);"mousewheel"===t||"DOMMouseScroll"===t?e.dispatchEvent(a):e.firstElementChild.dispatchEvent(a)},this.zr.dom.addEventListener(t,this._handlers[t])},this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},n.prototype.dispose=function(){i.forEach(function(e){this.zr.dom.removeEventListener(e,this._handlers[e])},this),this._maptalks.remove()},t.a=n},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(226),r(229),r(231),r(17));i.a.registerVisual(Object(a.a)("bar3D")),i.a.registerProcessor(function(e,t){e.eachSeriesByType("bar3d",function(e){var t=e.getData();t.filterSelf(function(e){return t.hasValue(e)})})})},function(e,t,r){"use strict";function n(e,t){var r=e.getData(),n=e.get("minHeight")||0,i=e.get("barSize"),a=["lng","lat","alt"].map(function(t){return e.coordDimToDataDim(t)[0]});if(null==i){var s=t.radius*Math.PI,h=Object(d.a)(r,a[0],a[1]);i=[s/Math.sqrt(r.count()/h),s/Math.sqrt(r.count()/h)]}else u.a.util.isArray(i)||(i=[i,i]);var c=o(r,a);r.each(a,function(e,a,o,s){var u=r.get(c.dimension,s),l=c.isStacked?u-o:t.altitudeAxis.scale.getExtent()[0],h=Math.max(t.altitudeAxis.dataToCoord(o),n),d=t.dataToPoint([e,a,l]),p=t.dataToPoint([e,a,u]),m=f.sub([],p,d);f.normalize(m,m);var g=[i[0],h,i[1]];r.setItemLayout(s,[d,m,g])}),r.setLayout("orient",l.a.UP.array)}function i(e,t){var r=e.getData(),n=e.get("barSize"),i=e.get("minHeight")||0,a=["lng","lat","alt"].map(function(t){return e.coordDimToDataDim(t)[0]});if(null==n){var s=Math.min(t.size[0],t.size[2]),l=Object(d.a)(r,a[0],a[1]);n=[s/Math.sqrt(r.count()/l),s/Math.sqrt(r.count()/l)]}else u.a.util.isArray(n)||(n=[n,n]);var h=[0,1,0],c=o(r,a);r.each(a,function(e,a,o,s){var u=r.get(c.dimension,s),l=c.isStacked?u-o:t.altitudeAxis.scale.getExtent()[0],d=Math.max(t.altitudeAxis.dataToCoord(o),i),f=t.dataToPoint([e,a,l]),p=[n[0],d,n[1]];r.setItemLayout(s,[f,h,p])}),r.setLayout("orient",[1,0,0])}function a(e,t){var r=e.getData(),n=e.coordDimToDataDim("lng")[0],i=e.coordDimToDataDim("lat")[0],a=e.coordDimToDataDim("alt")[0],s=e.get("barSize"),l=e.get("minHeight")||0;if(null==s){var h=r.getDataExtent(n),c=r.getDataExtent(i),f=t.dataToPoint([h[0],c[0]]),p=t.dataToPoint([h[1],c[1]]),m=Math.min(Math.abs(f[0]-p[0]),Math.abs(f[1]-p[1]))||1,g=Object(d.a)(r,n,i);s=[m/Math.sqrt(r.count()/g),m/Math.sqrt(r.count()/g)]}else u.a.util.isArray(s)||(s=[s,s]),s[0]/=t.getScale()/16,s[1]/=t.getScale()/16;var _=[0,0,1],v=[n,i,a],y=o(r,v);r.each(v,function(e,n,i,a){var o=r.get(y.dimension,a),u=y.isStacked?o-i:0,h=t.dataToPoint([e,n,u]),c=t.dataToPoint([e,n,o]),d=Math.max(c[2]-h[2],l),f=[s[0],d,s[1]];r.setItemLayout(a,[h,_,f])}),r.setLayout("orient",[1,0,0])}function o(e,t){var r=p(e,t[2]);return{dimension:r?e.getCalculationInfo("stackResultDimension"):t[2],isStacked:r}}var s=r(0),u=r.n(s),l=r(3),h=r(6),c=r(227),d=r(228),f=h.a.vec3,p=u.a.helper.dataStack.isDimensionStacked;u.a.registerLayout(function(e,t){e.eachSeriesByType("bar3D",function(e){var t=e.coordinateSystem,r=t&&t.type;"globe"===r?n(e,t):"cartesian3D"===r?Object(c.a)(e,t):"geo3D"===r?i(e,t):"mapbox3D"!==r&&"maptalks3D"!==r||a(e,t)})})},function(e,t,r){"use strict";function n(e){var t=e[0],r=e[1];return!(t>0&&r>0||t<0&&r<0)}function i(e,t){var r=e.getData(),i=e.get("barSize");if(null==i){var a,s,h=t.size,c=t.getAxis("x"),d=t.getAxis("y");a="category"===c.type?.7*c.getBandWidth():.6*Math.round(h[0]/Math.sqrt(r.count())),s="category"===d.type?.7*d.getBandWidth():.6*Math.round(h[1]/Math.sqrt(r.count())),i=[a,s]}else o.a.util.isArray(i)||(i=[i,i]);var f=t.getAxis("z").scale.getExtent(),p=n(f),m=["x","y","z"].map(function(t){return e.coordDimToDataDim(t)[0]}),g=l(r,m[2]),_=g?r.getCalculationInfo("stackResultDimension"):m[2];r.each(m,function(e,n,a,o){var s=r.get(_,o),l=g?s-a:p?0:f[0],h=t.dataToPoint([e,n,l]),c=t.dataToPoint([e,n,s]),d=u.dist(h,c),m=[0,c[1]<h[1]?-1:1,0];0===Math.abs(d)&&(d=.1);var v=[i[0],d,i[1]];r.setItemLayout(o,[h,m,v])}),r.setLayout("orient",[1,0,0])}var a=r(0),o=r.n(a),s=r(6),u=s.a.vec3,l=o.a.helper.dataStack.isDimensionStacked;t.a=i},function(e,t,r){"use strict";t.a=function(e,t,r){for(var n=e.getDataExtent(t),i=e.getDataExtent(r),a=n[1]-n[0]||n[0],o=i[1]-i[0]||i[0],s=new Uint8Array(2500),u=0;u<e.count();u++){var l=e.get(t,u),h=e.get(r,u),c=Math.floor((l-n[0])/a*49),d=Math.floor((h-i[0])/o*49),f=50*d+c;s[f]=s[f]||1}for(var p=0,u=0;u<s.length;u++)s[u]&&p++;return p/s.length}},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(2),s=r(32),u=r(230),l=r(66),h=r(6),c=h.a.vec3;i.a.extendChartView({type:"bar3D",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this._api=t,this._labelsBuilder=new l.a(256,256,t);var r=this;this._labelsBuilder.getLabelPosition=function(e,t,n){if(r._data){var i=r._data.getItemLayout(e),a=i[0],o=i[1],s=i[2][1];return c.scaleAndAdd([],a,o,n+s)}return[0,0]},this._labelsBuilder.getMesh().renderOrder=100},render:function(e,t,r){var n=this._prevBarMesh;this._prevBarMesh=this._barMesh,this._barMesh=n,this._barMesh||(this._barMesh=new a.a.Mesh({geometry:new u.a,shadowDepthMaterial:new a.a.Material({shader:new a.a.Shader(a.a.Shader.source("ecgl.sm.depth.vertex"),a.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:"cartesian3D"===e.coordinateSystem.type,renderOrder:10,renderNormal:!0})),this.groupGL.remove(this._prevBarMesh),this.groupGL.add(this._barMesh),this.groupGL.add(this._labelsBuilder.getMesh());var i=e.coordinateSystem;if(this._doRender(e,r),i&&i.viewGL){i.viewGL.add(this.groupGL);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._barMesh.material[o]("fragment","SRGB_DECODE")}this._data=e.getData(),this._labelsBuilder.updateData(this._data),this._labelsBuilder.updateLabels(),this._updateAnimation(e)},_updateAnimation:function(e){a.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevBarMesh,this._barMesh,e)},_doRender:function(e,t){var r=e.getData(),n=e.get("shading"),i="color"!==n,o=this,s=this._barMesh,u="ecgl."+n;s.material&&s.material.shader.name===u||(s.material=a.a.createMaterial(u,["VERTEX_COLOR"])),a.a.setMaterialFromModel(n,s.material,e,t),s.geometry.enableNormal=i,s.geometry.resetOffset();var l=e.get("bevelSize"),h=e.get("bevelSmoothness");s.geometry.bevelSegments=h,s.geometry.bevelSize=l;var c=[],d=new Float32Array(4*r.count()),f=0,p=0,m=!1;r.each(function(e){if(r.hasValue(e)){var t=r.getItemVisual(e,"color"),n=r.getItemVisual(e,"opacity");null==n&&(n=1),a.a.parseColor(t,c),c[3]*=n,d[f++]=c[0],d[f++]=c[1],d[f++]=c[2],d[f++]=c[3],c[3]>0&&(p++,c[3]<.99&&(m=!0))}}),s.geometry.setBarCount(p);var g=r.getLayout("orient"),_=this._barIndexOfData=new Int32Array(r.count()),p=0;r.each(function(e){if(!r.hasValue(e))return void(_[e]=-1);var t=r.getItemLayout(e),n=t[0],i=t[1],a=t[2],s=4*e;c[0]=d[s++],c[1]=d[s++],c[2]=d[s++],c[3]=d[s++],c[3]>0&&(o._barMesh.geometry.addBar(n,i,g,a,c,e),_[e]=p++)}),s.geometry.dirty(),s.geometry.updateBoundingBox();var v=s.material;v.transparent=m,v.depthMask=!m,s.geometry.sortTriangles=m,this._initHandler(e,t)},_initHandler:function(e,t){var r=e.getData(),n=this._barMesh,i="cartesian3D"===e.coordinateSystem.type;n.seriesIndex=e.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",function(e){var o=n.geometry.getDataIndexOfVertex(e.triangle[0]);o!==a&&(this._downplay(a),this._highlight(o),this._labelsBuilder.updateLabels([o]),i&&t.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get("x",o),r.get("y",o),r.get("z",o,!0)]})),a=o,n.dataIndex=o},this),n.on("mouseout",function(e){this._downplay(a),this._labelsBuilder.updateLabels(),a=-1,n.dataIndex=-1,i&&t.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_highlight:function(e){var t=this._data;if(t){var r=this._barIndexOfData[e];if(!(r<0)){var n=t.getItemModel(e),o=n.getModel("emphasis.itemStyle"),s=o.get("color"),u=o.get("opacity");if(null==s){var l=t.getItemVisual(e,"color");s=i.a.color.lift(l,-.4)}null==u&&(u=t.getItemVisual(e,"opacity"));var h=a.a.parseColor(s);h[3]*=u,this._barMesh.geometry.setColor(r,h),this._api.getZr().refresh()}}},_downplay:function(e){var t=this._data;if(t){var r=this._barIndexOfData[e];if(!(r<0)){var n=t.getItemVisual(e,"color"),i=t.getItemVisual(e,"opacity"),o=a.a.parseColor(n);o[3]*=i,this._barMesh.geometry.setColor(r,o),this._api.getZr().refresh()}}},highlight:function(e,t,r,n){this._toggleStatus("highlight",e,t,r,n)},downplay:function(e,t,r,n){this._toggleStatus("downplay",e,t,r,n)},_toggleStatus:function(e,t,r,n,a){var u=t.getData(),l=o.a.queryDataIndex(u,a),h=this;null!=l?i.a.util.each(s.a.normalizeToArray(l),function(t){"highlight"===e?this._highlight(t):this._downplay(t)},this):u.each(function(t){"highlight"===e?h._highlight(t):h._downplay(t)})},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(38),o=r(65),s=r(15),u=r(6),l=u.a.vec3,h=u.a.mat3,c=s.a.extend(function(){return{attributes:{position:new s.a.Attribute("position","float",3,"POSITION"),normal:new s.a.Attribute("normal","float",3,"NORMAL"),color:new s.a.Attribute("color","float",4,"COLOR"),prevPosition:new s.a.Attribute("prevPosition","float",3),prevNormal:new s.a.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(e){var t=this.enableNormal,r=this.getBarVertexCount()*e,n=this.getBarTriangleCount()*e;this.vertexCount!==r&&(this.attributes.position.init(r),t?this.attributes.normal.init(r):this.attributes.normal.value=null,this.attributes.color.init(r)),this.triangleCount!==n&&(this.indices=r>65535?new Uint32Array(3*n):new Uint16Array(3*n),this._dataIndices=new Uint32Array(r))},getBarVertexCount:function(){var e=this.bevelSize>0?this.bevelSegments:0;return e>0?this._getBevelBarVertexCount(e):this.enableNormal?24:8},getBarTriangleCount:function(){var e=this.bevelSize>0?this.bevelSegments:0;return e>0?this._getBevelBarTriangleCount(e):12},_getBevelBarVertexCount:function(e){return 4*(e+1)*(e+1)*2},_getBevelBarTriangleCount:function(e){return(4*e+3+1)*(2*e+1)*2+4},setColor:function(e,t){for(var r=this.getBarVertexCount(),n=r*e,i=r*(e+1),a=n;a<i;a++)this.attributes.color.set(a,t);this.dirtyAttribute("color")},getDataIndexOfVertex:function(e){return this._dataIndices?this._dataIndices[e]:null},addBar:function(){for(var e=l.create,t=l.scaleAndAdd,r=e(),n=e(),i=e(),a=e(),o=e(),s=e(),u=e(),h=[],c=[],d=0;d<8;d++)h[d]=e();for(var f=[[0,1,5,4],[2,3,7,6],[4,5,6,7],[3,2,1,0],[0,4,7,3],[1,2,6,5]],p=[0,1,2,0,2,3],m=[],d=0;d<f.length;d++)for(var g=f[d],_=0;_<2;_++){for(var v=[],y=0;y<3;y++)v.push(g[p[3*_+y]]);m.push(v)}return function(e,d,g,_,v,y){var x=this._vertexOffset;if(this.bevelSize>0&&this.bevelSegments>0)this._addBevelBar(e,d,g,_,this.bevelSize,this.bevelSegments,v);else{l.copy(i,d),l.normalize(i,i),l.cross(a,g,i),l.normalize(a,a),l.cross(n,i,a),l.normalize(a,a),l.negate(o,n),l.negate(s,i),l.negate(u,a),t(h[0],e,n,_[0]/2),t(h[0],h[0],a,_[2]/2),t(h[1],e,n,_[0]/2),t(h[1],h[1],u,_[2]/2),t(h[2],e,o,_[0]/2),t(h[2],h[2],u,_[2]/2),t(h[3],e,o,_[0]/2),t(h[3],h[3],a,_[2]/2),t(r,e,i,_[1]),t(h[4],r,n,_[0]/2),t(h[4],h[4],a,_[2]/2),t(h[5],r,n,_[0]/2),t(h[5],h[5],u,_[2]/2),t(h[6],r,o,_[0]/2),t(h[6],h[6],u,_[2]/2),t(h[7],r,o,_[0]/2),t(h[7],h[7],a,_[2]/2);var T=this.attributes;if(this.enableNormal){c[0]=n,c[1]=o,c[2]=i,c[3]=s,c[4]=a,c[5]=u;for(var b=this._vertexOffset,w=0;w<f.length;w++){for(var E=3*this._triangleOffset,S=0;S<6;S++)this.indices[E++]=b+p[S];b+=4,this._triangleOffset+=2}for(var w=0;w<f.length;w++)for(var A=c[w],S=0;S<4;S++){var M=f[w][S];T.position.set(this._vertexOffset,h[M]),T.normal.set(this._vertexOffset,A),T.color.set(this._vertexOffset++,v)}}else{for(var w=0;w<m.length;w++){for(var E=3*this._triangleOffset,S=0;S<3;S++)this.indices[E+S]=m[w][S]+this._vertexOffset;this._triangleOffset++}for(var w=0;w<h.length;w++)T.position.set(this._vertexOffset,h[w]),T.color.set(this._vertexOffset++,v)}}for(var C=this._vertexOffset,w=x;w<C;w++)this._dataIndices[w]=y}}(),_addBevelBar:function(){var e=l.create(),t=l.create(),r=l.create(),n=h.create(),i=[],a=[1,-1,-1,1],o=[1,1,-1,-1],s=[2,0];return function(u,h,c,d,f,p,m){l.copy(t,h),l.normalize(t,t),l.cross(r,c,t),l.normalize(r,r),l.cross(e,t,r),l.normalize(r,r),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=t[0],n[4]=t[1],n[5]=t[2],n[6]=r[0],n[7]=r[1],n[8]=r[2],f=Math.min(d[0],d[2])/2*f;for(var g=0;g<3;g++)i[g]=Math.max(d[g]-2*f,0);for(var _=(d[0]-i[0])/2,v=(d[1]-i[1])/2,y=(d[2]-i[2])/2,x=[],T=[],b=this._vertexOffset,w=[],g=0;g<2;g++){w[g]=w[g]=[];for(var E=0;E<=p;E++)for(var S=0;S<4;S++){(0===E&&0===g||1===g&&E===p)&&w[g].push(b);for(var A=0;A<=p;A++){var M=A/p*Math.PI/2+Math.PI/2*S,C=E/p*Math.PI/2+Math.PI/2*g;T[0]=_*Math.cos(M)*Math.sin(C),T[1]=v*Math.cos(C),T[2]=y*Math.sin(M)*Math.sin(C),x[0]=T[0]+a[S]*i[0]/2,x[1]=T[1]+v+s[g]*i[1]/2,x[2]=T[2]+o[S]*i[2]/2,Math.abs(_-v)<1e-6&&Math.abs(v-y)<1e-6||(T[0]/=_*_,T[1]/=v*v,T[2]/=y*y),l.normalize(T,T),l.transformMat3(x,x,n),l.transformMat3(T,T,n),l.add(x,x,u),this.attributes.position.set(b,x),this.enableNormal&&this.attributes.normal.set(b,T),this.attributes.color.set(b,m),b++}}}for(var L=4*p+3,D=2*p+1,N=L+1,S=0;S<D;S++)for(var g=0;g<=L;g++){var R=S*N+g+this._vertexOffset,P=S*N+(g+1)%N+this._vertexOffset,I=(S+1)*N+(g+1)%N+this._vertexOffset,O=(S+1)*N+g+this._vertexOffset;this.setTriangleIndices(this._triangleOffset++,[I,R,P]),this.setTriangleIndices(this._triangleOffset++,[I,O,R])}this.setTriangleIndices(this._triangleOffset++,[w[0][0],w[0][2],w[0][1]]),this.setTriangleIndices(this._triangleOffset++,[w[0][0],w[0][3],w[0][2]]),this.setTriangleIndices(this._triangleOffset++,[w[1][0],w[1][1],w[1][2]]),this.setTriangleIndices(this._triangleOffset++,[w[1][0],w[1][2],w[1][3]]),this._vertexOffset=b}}()});i.a.util.defaults(c.prototype,a.a),i.a.util.defaults(c.prototype,o.a),t.a=c},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(31),o=r(32),s=r(39),u=r(50),l=i.a.extendSeriesModel({type:"series.bar3D",dependencies:["globe"],visualColorAccessPath:"itemStyle.color",getInitialData:function(e,t){return Object(u.a)(this)},getFormattedLabel:function(e,t,r,n){var i=o.a.getFormattedLabel(this,e,t,r,n);return null==i&&(i=this.getData().get("z",e)),i},formatTooltip:function(e){return Object(s.a)(this,e)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});i.a.util.merge(l.prototype,a.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(233),r(234),r(51)),o=r.n(a),s=r(17);i.a.registerVisual(o()("line3D","circle",null)),i.a.registerVisual(Object(s.a)("line3D")),i.a.registerLayout(function(e,t){e.eachSeriesByType("line3D",function(e){var t=e.getData(),r=e.coordinateSystem;if(r){if("cartesian3D"!==r.type)return;var n=new Float32Array(3*t.count()),i=[],a=[],o=r.dimensions,s=o.map(function(t){return e.coordDimToDataDim(t)[0]});r&&t.each(s,function(e,t,o,s){i[0]=e,i[1]=t,i[2]=o,r.dataToPoint(i,a),n[3*s]=a[0],n[3*s+1]=a[1],n[3*s+2]=a[2]}),t.setLayout("points",n)}})})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(39),o=r(50);i.a.extendSeriesModel({type:"series.line3D",dependencies:["grid3D"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){return Object(o.a)(this)},formatTooltip:function(e){return Object(a.a)(this,e)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(2),s=r(25),u=r(9),l=r(3),h=r(235),c=r.n(h),d=r(6),f=r(46),p=d.a.vec3;a.a.Shader.import(f.a);i.a.extendChartView({type:"line3D",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this._api=t},render:function(e,t,r){var n=this._prevLine3DMesh;this._prevLine3DMesh=this._line3DMesh,this._line3DMesh=n,this._line3DMesh||(this._line3DMesh=new a.a.Mesh({geometry:new s.a({useNativeLine:!1,sortTriangles:!0}),material:new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D")}),renderOrder:10}),this._line3DMesh.geometry.pick=this._pick.bind(this)),this.groupGL.remove(this._prevLine3DMesh),this.groupGL.add(this._line3DMesh);var i=e.coordinateSystem;if(i&&i.viewGL){i.viewGL.add(this.groupGL);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._line3DMesh.material[o]("fragment","SRGB_DECODE")}this._doRender(e,r),this._data=e.getData(),this._camera=i.viewGL.camera,this.updateCamera(),this._updateAnimation(e)},updateCamera:function(){this._updateNDCPosition()},_doRender:function(e,t){var r=e.getData(),n=this._line3DMesh;n.geometry.resetOffset();var i=r.getLayout("points"),s=[],u=new Float32Array(i.length/3*4),l=0,h=!1;r.each(function(e){var t=r.getItemVisual(e,"color"),n=r.getItemVisual(e,"opacity");null==n&&(n=1),a.a.parseColor(t,s),s[3]*=n,u[l++]=s[0],u[l++]=s[1],u[l++]=s[2],u[l++]=s[3],s[3]<.99&&(h=!0)}),n.geometry.setVertexCount(n.geometry.getPolylineVertexCount(i)),n.geometry.setTriangleCount(n.geometry.getPolylineTriangleCount(i)),n.geometry.addPolyline(i,u,o.a.firstNotNull(e.get("lineStyle.width"),1)),n.geometry.dirty(),n.geometry.updateBoundingBox();var c=n.material;c.transparent=h,c.depthMask=!h;var d=e.getModel("debug.wireframe");d.get("show")?(n.geometry.createAttribute("barycentric","float",3),n.geometry.generateBarycentric(),n.material.set("both","WIREFRAME_TRIANGLE"),n.material.set("wireframeLineColor",a.a.parseColor(d.get("lineStyle.color")||"rgba(0,0,0,0.5)")),n.material.set("wireframeLineWidth",o.a.firstNotNull(d.get("lineStyle.width"),1))):n.material.set("both","WIREFRAME_TRIANGLE"),this._points=i,this._initHandler(e,t)},_updateAnimation:function(e){a.a.updateVertexAnimation([["prevPosition","position"],["prevPositionPrev","positionPrev"],["prevPositionNext","positionNext"]],this._prevLine3DMesh,this._line3DMesh,e)},_initHandler:function(e,t){var r=e.getData(),n=e.coordinateSystem,i=this._line3DMesh,a=-1;i.seriesIndex=e.seriesIndex,i.off("mousemove"),i.off("mouseout"),i.on("mousemove",function(e){var o=n.pointToData(e.point.array),s=r.indicesOfNearest("x",o[0])[0];s!==a&&(t.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get("x",s),r.get("y",s),r.get("z",s)]}),i.dataIndex=s),a=s},this),i.on("mouseout",function(e){a=-1,i.dataIndex=-1,t.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_updateNDCPosition:function(){var e=new u.a,t=this._camera;u.a.multiply(e,t.projectionMatrix,t.viewMatrix);var r=this._positionNDC,n=this._points,i=n.length/3;r&&r.length/2===i||(r=this._positionNDC=new Float32Array(2*i));for(var a=[],o=0;o<i;o++){var s=3*o,l=2*o;a[0]=n[s],a[1]=n[s+1],a[2]=n[s+2],a[3]=1,p.transformMat4(a,a,e.array),r[l]=a[0]/a[3],r[l+1]=a[1]/a[3]}},_pick:function(e,t,r,n,i,a){var o=this._positionNDC,s=this._data.hostModel,u=s.get("lineStyle.width"),h=-1,d=r.viewport.width,f=r.viewport.height,p=.5*d,m=.5*f;e=(e+1)*p,t=(t+1)*m;for(var g=1;g<o.length/2;g++){var _=(o[2*(g-1)]+1)*p,v=(o[2*(g-1)+1]+1)*m,y=(o[2*g]+1)*p,x=(o[2*g+1]+1)*m;if(c.a.containStroke(_,v,y,x,u,e,t)){h=(_-e)*(_-e)+(v-t)*(v-t)<(y-e)*(y-e)+(x-t)*(x-t)?g-1:g}}if(h>=0){var T=3*h,b=new l.a(this._points[T],this._points[T+1],this._points[T+2]);a.push({dataIndex:h,point:b,pointWorld:b.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(b)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t){function r(e,t,r,n,i,a,o){if(0===i)return!1;var s=i,u=0,l=e;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>e+s&&a>r+s||a<e-s&&a<r-s)return!1;if(e===r)return Math.abs(a-e)<=s/2;u=(t-n)/(e-r),l=(e*n-r*t)/(e-r);var h=u*a-o+l;return h*h/(u*u+1)<=s/2*s/2}t.containStroke=r},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(237),r(238),r(51)),o=r.n(a),s=r(17);i.a.registerVisual(o()("scatter3D","circle",null)),i.a.registerVisual(Object(s.a)("scatter3D")),i.a.registerLayout({seriesType:"scatter3D",reset:function(e){var t=e.coordinateSystem;if(t){var r=t.dimensions;if(r.length<3)return;var n=r.map(function(t){return e.coordDimToDataDim(t)[0]}),i=[],a=[];return{progress:function(e,r){for(var o=new Float32Array(3*(e.end-e.start)),s=e.start;s<e.end;s++){var u=3*(s-e.start);i[0]=r.get(n[0],s),i[1]=r.get(n[1],s),i[2]=r.get(n[2],s),t.dataToPoint(i,a),o[u]=a[0],o[u+1]=a[1],o[u+2]=a[2]}r.setLayout("points",o)}}}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(32),o=r(39),s=r(50);i.a.extendSeriesModel({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualColorAccessPath:"itemStyle.color",getInitialData:function(e,t){return Object(s.a)(this)},getFormattedLabel:function(e,t,r,n){var i=a.a.getFormattedLabel(this,e,t,r,n);if(null==i){var o=this.getData(),s=o.dimensions[o.dimensions.length-1];i=o.get(s,e)}return i},formatTooltip:function(e){return Object(o.a)(this,e)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(2),s=r(32),u=r(67);i.a.extendChartView({type:"scatter3D",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this._pointsBuilderList=[],this._currentStep=0},render:function(e,t,r){if(this.groupGL.removeAll(),e.getData().count()){var n=e.coordinateSystem;if(n&&n.viewGL){n.viewGL.add(this.groupGL),this._camera=n.viewGL.camera;var i=this._pointsBuilderList[0];i||(i=this._pointsBuilderList[0]=new u.a(!1,r)),this._pointsBuilderList.length=1,this.groupGL.add(i.rootNode),i.update(e,t,r),i.updateView(n.viewGL.camera)}}},incrementalPrepareRender:function(e,t,r){var n=e.coordinateSystem;n&&n.viewGL&&(n.viewGL.add(this.groupGL),this._camera=n.viewGL.camera),this.groupGL.removeAll(),this._currentStep=0},incrementalRender:function(e,t,r,n){if(!(e.end<=e.start)){var i=this._pointsBuilderList[this._currentStep];i||(i=new u.a(!1,n),this._pointsBuilderList[this._currentStep]=i),this.groupGL.add(i.rootNode),i.update(t,r,n,e.start,e.end),i.updateView(t.coordinateSystem.viewGL.camera),this._currentStep++}},updateCamera:function(){this._pointsBuilderList.forEach(function(e){e.updateView(this._camera)},this)},highlight:function(e,t,r,n){this._toggleStatus("highlight",e,t,r,n)},downplay:function(e,t,r,n){this._toggleStatus("downplay",e,t,r,n)},_toggleStatus:function(e,t,r,n,a){var u=t.getData(),l=o.a.queryDataIndex(u,a),h="highlight"===e;null!=l?i.a.util.each(s.a.normalizeToArray(l),function(e){for(var t=0;t<this._pointsBuilderList.length;t++){var r=this._pointsBuilderList[t];h?r.highlight(u,e):r.downplay(u,e)}},this):u.each(function(e){for(var t=0;t<this._pointsBuilderList.length;t++){var r=this._pointsBuilderList[t];h?r.highlight(u,e):r.downplay(u,e)}})},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";function n(e,t,r){var t=t||document.createElement("canvas");t.width=e,t.height=e;var n=t.getContext("2d");return r&&r(n),t}function i(e,t,r,n){s.a.util.isArray(t)||(t=[t,t]);var i=u.getMarginByStyle(r,n),a=t[0]+i.left+i.right,o=t[1]+i.top+i.bottom,l=s.a.helper.createSymbol(e,0,0,t[0],t[1]),h=Math.max(a,o);l.position=[i.left,i.top],a>o?l.position[1]+=(h-o)/2:l.position[0]+=(h-a)/2;var c=l.getBoundingRect();return l.position[0]-=c.x,l.position[1]-=c.y,l.setStyle(r),l.update(),l.__size=h,l}function a(e,t,r){function n(e){return e<128?1:-1}for(var i=t.width,a=t.height,o=e.canvas.width,s=e.canvas.height,u=i/o,l=a/s,h=e.createImageData(o,s),c=0;c<s;c++)for(var d=0;d<o;d++){var f=function(e,o){var s=1/0;e=Math.floor(e*u),o=Math.floor(o*l);for(var h=o*i+e,c=t.data[4*h],d=n(c),f=Math.max(o-r,0);f<Math.min(o+r,a);f++)for(var p=Math.max(e-r,0);p<Math.min(e+r,i);p++){var h=f*i+p,m=t.data[4*h],g=n(m),_=p-e,v=f-o;if(d!==g){var y=_*_+v*v;y<s&&(s=y)}}return d*Math.sqrt(s)}(d,c),p=f/r*.5+.5,m=4*(c*o+d);h.data[m++]=255*(1-p),h.data[m++]=255*(1-p),h.data[m++]=255*(1-p),h.data[m++]=255}return h}var o=r(0),s=r.n(o),u={getMarginByStyle:function(e){var t=e.minMargin||0,r=0;e.stroke&&"none"!==e.stroke&&(r=null==e.lineWidth?1:e.lineWidth);var n=e.shadowBlur||0,i=e.shadowOffsetX||0,a=e.shadowOffsetY||0,o={};return o.left=Math.max(r/2,-i+n,t),o.right=Math.max(r/2,i+n,t),o.top=Math.max(r/2,-a+n,t),o.bottom=Math.max(r/2,a+n,t),o},createSymbolSprite:function(e,t,r,a){var o=i(e,t,r),s=u.getMarginByStyle(r);return{image:n(o.__size,a,function(e){o.brush(e)}),margin:s}},createSDFFromCanvas:function(e,t,r,i){return n(t,i,function(t){var n=e.getContext("2d"),i=n.getImageData(0,0,e.width,e.height);t.putImageData(a(t,i,r),0,0)})},createSimpleSprite:function(e,t){return n(e,t,function(t){var r=e/2;t.beginPath(),t.arc(r,r,60,0,2*Math.PI,!1),t.closePath();var n=t.createRadialGradient(r,r,0,r,r,r);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)"),t.fillStyle=n,t.fill()})}};t.a=u},function(e,t,r){"use strict";var n=r(1),i=r(241),a=r(0),o=r.n(a),s=r(6),u=r(242),l=s.a.vec4;n.a.Shader.import(u.a);var h=n.a.Mesh.extend(function(){var e=new n.a.Geometry({dynamic:!0,attributes:{color:new n.a.Geometry.Attribute("color","float",4,"COLOR"),position:new n.a.Geometry.Attribute("position","float",3,"POSITION"),size:new n.a.Geometry.Attribute("size","float",1),prevPosition:new n.a.Geometry.Attribute("prevPosition","float",3),prevSize:new n.a.Geometry.Attribute("prevSize","float",1)}});o.a.util.extend(e,i.a);var t=new n.a.Material({shader:n.a.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});t.enableTexture("sprite"),t.define("both","VERTEX_COLOR"),t.define("both","VERTEX_SIZE");var r=new n.a.Texture2D({image:document.createElement("canvas"),flipY:!1});return t.set("sprite",r),e.pick=this._pick.bind(this),{geometry:e,material:t,mode:n.a.Mesh.POINTS,sizeScale:1}},{_pick:function(e,t,r,i,a,o){var s=this._positionNDC;if(s)for(var u=r.viewport,l=2/u.width,h=2/u.height,c=this.geometry.vertexCount-1;c>=0;c--){var d;d=this.geometry.indices?this.geometry.indices[c]:c;var f=s[2*d],p=s[2*d+1],m=this.geometry.attributes.size.get(d)/this.sizeScale,g=m/2;if(e>f-g*l&&e<f+g*l&&t>p-g*h&&t<p+g*h){var _=new n.a.Vector3,v=new n.a.Vector3;this.geometry.attributes.position.get(d,_.array),n.a.Vector3.transformMat4(v,_,this.worldTransform),o.push({vertexIndex:d,point:_,pointWorld:v,target:this,distance:v.distance(i.getWorldPosition())})}}},updateNDCPosition:function(e,t,r){var n=this._positionNDC,i=this.geometry;n&&n.length/2===i.vertexCount||(n=this._positionNDC=new Float32Array(2*i.vertexCount));for(var a=l.create(),o=0;o<i.vertexCount;o++)i.attributes.position.get(o,a),a[3]=1,l.transformMat4(a,a,e.array),l.scale(a,a,1/a[3]),n[2*o]=a[0],n[2*o+1]=a[1]}});t.a=h},function(e,t,r){"use strict";var n=r(97),i=r(6),a=i.a.vec3;t.a={needsSortVertices:function(){return this.sortVertices},needsSortVerticesProgressively:function(){return this.needsSortVertices()&&this.vertexCount>=2e4},doSortVertices:function(e,t){var r=this.indices,n=a.create();if(!r){r=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var i=0;i<r.length;i++)r[i]=i}if(0===t){var o=this.attributes.position,e=e.array,s=0;this._zList&&this._zList.length===this.vertexCount||(this._zList=new Float32Array(this.vertexCount));for(var u,i=0;i<this.vertexCount;i++){o.get(i,n);var l=a.sqrDist(n,e);isNaN(l)&&(l=1e7,s++),0===i?(u=l,l=0):l-=u,this._zList[i]=l}this._noneCount=s}if(this.vertexCount<2e4)0===t&&this._simpleSort(this._noneCount/this.vertexCount>.05);else for(var i=0;i<3;i++)this._progressiveQuickSort(3*t+i);this.dirtyIndices()},_simpleSort:function(e){function t(e,t){return r[t]-r[e]}var r=this._zList,i=this.indices;e?Array.prototype.sort.call(i,t):n.a.sort(i,t,0,i.length-1)},_progressiveQuickSort:function(e){var t=this._zList,r=this.indices;this._quickSort=this._quickSort||new n.a,this._quickSort.step(r,function(e,r){return t[r]-t[e]},e)}}},function(e,t,r){"use strict";t.a="@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end"},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(244),r(245),r(248),r(17));i.a.registerVisual(Object(a.a)("lines3D")),i.a.registerAction({type:"lines3DPauseEffect",event:"lines3deffectpaused",update:"series.lines3D:pauseEffect"},function(){}),i.a.registerAction({type:"lines3DResumeEffect",event:"lines3deffectresumed",update:"series.lines3D:resumeEffect"},function(){}),i.a.registerAction({type:"lines3DToggleEffect",event:"lines3deffectchanged",update:"series.lines3D:toggleEffect"},function(){})},function(e,t,r){"use strict";function n(e,t){f.copy(w,e[0]),f.copy(E,e[1]);var r=[],n=r[0]=v(),i=r[1]=v(),a=r[2]=v(),o=r[3]=v();t.dataToPoint(w,n),t.dataToPoint(E,o),p(y,n),g(x,o,n),p(x,x),m(T,x,y),p(T,T),m(x,y,T),_(i,y,x),p(i,i),p(y,o),g(x,n,o),p(x,x),m(T,x,y),p(T,T),m(x,y,T),_(a,y,x),p(a,a),_(b,n,o),p(b,b);var s=d.dot(n,b),u=d.dot(b,i),l=(Math.max(d.len(n),d.len(o))-s)/u*2;return d.scaleAndAdd(i,n,i,l),d.scaleAndAdd(a,o,a,l),r}function i(e,t,r){var n=[],i=n[0]=d.create(),a=n[1]=d.create(),o=n[2]=d.create(),s=n[3]=d.create();t.dataToPoint(e[0],i),t.dataToPoint(e[1],s);var u=d.dist(i,s);return d.lerp(a,i,s,.3),d.lerp(o,i,s,.3),d.scaleAndAdd(a,a,r,Math.min(.1*u,10)),d.scaleAndAdd(o,o,r,Math.min(.1*u,10)),n}function a(e,t){for(var r=new Float32Array(3*e.length),n=0,i=[],a=0;a<e.length;a++)t.dataToPoint(e[a],i),r[n++]=i[0],r[n++]=i[1],r[n++]=i[2];return r}function o(e){var t=[];return e.each(function(r){var n=e.getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords",!0);t.push(i)}),{coordsList:t}}function s(e,t){var r=e.getData(),i=e.get("polyline");r.setLayout("lineType",i?"polyline":"cubicBezier");var s=o(r);r.each(function(e){var o=s.coordsList[e],u=i?a:n;r.setItemLayout(e,u(o,t))})}function u(e,t,r){var n=e.getData(),s=e.get("polyline"),u=o(n);n.setLayout("lineType",s?"polyline":"cubicBezier"),n.each(function(e){var o=u.coordsList[e],l=s?a(o,t):i(o,t,r);n.setItemLayout(e,l)})}var l=r(0),h=r.n(l),c=r(6),d=c.a.vec3,f=c.a.vec2,p=d.normalize,m=d.cross,g=d.sub,_=d.add,v=d.create,y=v(),x=v(),T=v(),b=v(),w=[],E=[];h.a.registerLayout(function(e,t){e.eachSeriesByType("lines3D",function(e){var t=e.coordinateSystem;"globe"===t.type?s(e,t):"geo3D"===t.type?u(e,t,[0,1,0]):"mapbox3D"!==t.type&&"maptalks3D"!==t.type||u(e,t,[0,0,1])})})},function(e,t,r){"use strict";function n(e){return null!=e.radius?e.radius:null!=e.size?Math.max(e.size[0],e.size[1],e.size[2]):100}var i=r(0),a=r.n(i),o=r(1),s=r(25),u=r(246),l=r(46);o.a.Shader.import(l.a);a.a.extendChartView({type:"lines3D",__ecgl__:!0,init:function(e,t){this.groupGL=new o.a.Node,this._meshLinesMaterial=new o.a.Material({shader:o.a.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new o.a.Mesh({geometry:new s.a,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new u.a},render:function(e,t,r){this.groupGL.add(this._linesMesh);var n=e.coordinateSystem,i=e.getData();if(n&&n.viewGL){n.viewGL.add(this.groupGL),this._updateLines(e,t,r);var a=n.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[a]("fragment","SRGB_DECODE"),this._trailMesh.material[a]("fragment","SRGB_DECODE")}var s=this._trailMesh;if(s.stopAnimation(),e.get("effect.show")){this.groupGL.add(s),s.updateData(i,r,this._linesMesh.geometry),s.__time=s.__time||0;this._curveEffectsAnimator=s.animate("",{loop:!0}).when(36e5,{__time:36e5}).during(function(){s.setAnimationTime(s.__time)}).start()}else this.groupGL.remove(s),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===e.get("blendMode")?o.a.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var e=this._curveEffectsAnimator;e&&(e.isPaused()?e.resume():e.pause())},_updateLines:function(e,t,r){var i=e.getData(),a=e.coordinateSystem,s=this._linesMesh.geometry,u=e.get("polyline");s.expandLine=!0;var l=n(a);s.segmentScale=l/20;var h="lineStyle.width".split("."),c=r.getDevicePixelRatio(),d=0;i.each(function(e){var t=i.getItemModel(e),r=t.get(h);null==r&&(r=1),i.setItemVisual(e,"lineWidth",r),d=Math.max(r,d)}),s.useNativeLine=!1;var f=0,p=0;i.each(function(e){var t=i.getItemLayout(e);u?(f+=s.getPolylineVertexCount(t),p+=s.getPolylineTriangleCount(t)):(f+=s.getCubicCurveVertexCount(t[0],t[1],t[2],t[3]),p+=s.getCubicCurveTriangleCount(t[0],t[1],t[2],t[3]))}),s.setVertexCount(f),s.setTriangleCount(p),s.resetOffset();var m=[];i.each(function(e){var t=i.getItemLayout(e),r=i.getItemVisual(e,"color"),n=i.getItemVisual(e,"opacity"),a=i.getItemVisual(e,"lineWidth")*c;null==n&&(n=1),m=o.a.parseColor(r,m),m[3]*=n,u?s.addPolyline(t,m,a):s.addCubicCurve(t[0],t[1],t[2],t[3],m,a)}),s.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";function n(e){return e>0?1:-1}var i=r(0),a=(r.n(i),r(1)),o=r(6),s=r(25),u=r(247),l=o.a.vec3;a.a.Shader.import(u.a),t.a=a.a.Mesh.extend(function(){var e=new a.a.Material({shader:new a.a.Shader(a.a.Shader.source("ecgl.trail2.vertex"),a.a.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),t=new s.a({dynamic:!0});return t.createAttribute("dist","float",1),t.createAttribute("distAll","float",1),t.createAttribute("start","float",1),{geometry:t,material:e,culling:!1,$ignorePicking:!0}},{updateData:function(e,t,r){var i=e.hostModel,o=this.geometry,s=i.getModel("effect"),u=s.get("trailWidth")*t.getDevicePixelRatio(),h=s.get("trailLength"),c=i.get("effect.constantSpeed"),d=1e3*i.get("effect.period"),f=null!=c;f?this.material.set("speed",c/1e3):this.material.set("period",d),this.material[f?"define":"undefine"]("vertex","CONSTANT_SPEED");var p=i.get("polyline");o.trailLength=h,this.material.set("trailLength",h),o.resetOffset(),["position","positionPrev","positionNext"].forEach(function(e){o.attributes[e].value=r.attributes[e].value}),["dist","distAll","start","offset","color"].forEach(function(e){o.attributes[e].init(o.vertexCount)}),o.indices=r.indices;var m=[],g=s.get("trailColor"),_=s.get("trailOpacity"),v=null!=g,y=null!=_;this.updateWorldTransform();var x=this.worldTransform.x.len(),T=this.worldTransform.y.len(),b=this.worldTransform.z.len(),w=0,E=0;e.each(function(t){var i=e.getItemLayout(t),s=y?_:e.getItemVisual(t,"opacity"),h=e.getItemVisual(t,"color");null==s&&(s=1),m=a.a.parseColor(v?g:h,m),m[3]*=s;for(var c=p?r.getPolylineVertexCount(i):r.getCubicCurveVertexCount(i[0],i[1],i[2],i[3]),S=0,A=[],M=[],C=w;C<w+c;C++)o.attributes.position.get(C,A),A[0]*=x,A[1]*=T,A[2]*=b,C>w&&(S+=l.dist(A,M)),o.attributes.dist.set(C,S),l.copy(M,A);E=Math.max(E,S);for(var L=Math.random()*(f?S:d),C=w;C<w+c;C++)o.attributes.distAll.set(C,S),o.attributes.start.set(C,L),o.attributes.offset.set(C,n(r.attributes.offset.get(C))*u/2),o.attributes.color.set(C,m);w+=c}),this.material.set("spotSize",.1*E*h),this.material.set("spotIntensity",s.get("spotIntensity")),o.dirty()},setAnimationTime:function(e){this.material.set("time",e)}})},function(e,t,r){"use strict";t.a="@export ecgl.trail2.vertex\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute float dist;\nattribute float distAll;\nattribute float start;\n\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nuniform float speed : 0;\nuniform float trailLength: 0.3;\nuniform float time;\nuniform float period: 1000;\n\nuniform float spotSize: 1;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n\n#ifdef CONSTANT_SPEED\n float t = mod((speed * time + start) / distAll, 1. + trailLength) - trailLength;\n#else\n float t = mod((time + start) / period, 1. + trailLength) - trailLength;\n#endif\n\n float trailLen = distAll * trailLength;\n\n v_Percent = (dist - t * distAll) / trailLen;\n\n v_SpotPercent = spotSize / distAll;\n\n }\n@end\n\n\n@export ecgl.trail2.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform float spotIntensity: 5;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n if (v_Percent > 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end"},function(e,t,r){"use strict";var n=r(0),i=r.n(n);i.a.extendSeriesModel({type:"series.lines3D",dependencies:["globe"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var r=new i.a.List(["value"],this);return r.hasItemOption=!1,r.initData(e.data,[],function(e,t,n,i){if(e instanceof Array)return NaN;r.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[i]:a:void 0}),r},defaultOption:{coordinateSystem:"globe",globeIndex:0,geo3DIndex:0,zlevel:-10,polyline:!1,effect:{show:!1,period:4,trailWidth:4,trailLength:.2,spotIntensity:6},silent:!0,blendMode:"source-over",lineStyle:{width:1,opacity:.5}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(250),r(251),r(17));i.a.registerVisual(Object(a.a)("polygons3D"))},function(e,t,r){"use strict";function n(e,t){for(var r=[],n=0;n<t.length;n++)r.push(e.dataToPoint(t[n]));return r}var i=r(0),a=r.n(i),o=r(31),s=a.a.extendSeriesModel({type:"series.polygons3D",getRegionModel:function(e){return this.getData().getItemModel(e)},getRegionPolygonCoords:function(e){var t=this.coordinateSystem,r=this.getData().getItemModel(e),i=r.option instanceof Array?r.option:r.getShallow("coords");r.get("multiPolygon")||(i=[i]);for(var a=[],o=0;o<i.length;o++){for(var s=[],u=1;u<i[o].length;u++)s.push(n(t,i[o][u]));a.push({exterior:n(t,i[o][0]),interiors:s})}return a},getInitialData:function(e){var t=new a.a.List(["value"],this);return t.hasItemOption=!1,t.initData(e.data,[],function(e,r,n,i){if(e instanceof Array)return NaN;t.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[i]:a:void 0}),t},defaultOption:{show:!0,data:null,multiPolygon:!1,progressiveThreshold:1e3,progressive:1e3,zlevel:-10,label:{show:!1,distance:2,textStyle:{fontSize:20,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:4}},itemStyle:{color:"#fff",borderWidth:0,borderColor:"#333"},emphasis:{itemStyle:{color:"#639fc0"},label:{show:!0}}}});a.a.util.merge(s.prototype,o.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(64),o=r(1);i.a.extendChartView({type:"polygons3D",__ecgl__:!0,init:function(e,t){this.groupGL=new o.a.Node,this._geo3DBuilderList=[],this._currentStep=0},render:function(e,t,r){this.groupGL.removeAll();var n=e.coordinateSystem;n&&n.viewGL&&n.viewGL.add(this.groupGL);var i=this._geo3DBuilderList[0];i||(i=new a.a(r),i.extrudeY="mapbox3D"!==n.type&&"maptalks3D"!==n.type,this._geo3DBuilderList[0]=i),this._updateShaderDefines(n,i),i.update(e,t,r),this._geo3DBuilderList.length=1,this.groupGL.add(i.rootNode)},incrementalPrepareRender:function(e,t,r){this.groupGL.removeAll();var n=e.coordinateSystem;n&&n.viewGL&&n.viewGL.add(this.groupGL),this._currentStep=0},incrementalRender:function(e,t,r,n){var i=this._geo3DBuilderList[this._currentStep],o=t.coordinateSystem;i||(i=new a.a(n),i.extrudeY="mapbox3D"!==o.type&&"maptalks3D"!==o.type,this._geo3DBuilderList[this._currentStep]=i),i.update(t,r,n,e.start,e.end),this.groupGL.add(i.rootNode),this._updateShaderDefines(o,i),this._currentStep++},_updateShaderDefines:function(e,t){var r=e.viewGL.isLinearSpace()?"define":"undefine";t.rootNode.traverse(function(t){t.material&&(t.material[r]("fragment","SRGB_DECODE"),"mapbox3D"!==e.type&&"maptalks3D"!==e.type||(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1)))})},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(253),r(254),r(255),r(17));i.a.registerVisual(Object(a.a)("surface"))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(31),o=r(39),s=r(50),u=i.a.extendSeriesModel({type:"series.surface",dependencies:["globe","grid3D","geo3D"],visualColorAccessPath:"itemStyle.color",formatTooltip:function(e){return Object(o.a)(this,e)},getInitialData:function(e,t){function r(e){return!(isNaN(e.min)||isNaN(e.max)||isNaN(e.step))}function n(e){var t=i.a.number.getPrecisionSafe;return Math.max(t(e.min),t(e.max),t(e.step))+1}var a=e.data;if(!a)if(e.parametric){var o=e.parametricEquation||{},u=o.u||{},l=o.v||{};["u","v"].forEach(function(e){r(o[e])}),["x","y","z"].forEach(function(e){o[e]});var h=Math.floor((u.max+u.step-u.min)/u.step),c=Math.floor((l.max+l.step-l.min)/l.step);a=new Float32Array(h*c*5);for(var d=n(u),f=n(l),p=0,m=0;m<c;m++)for(var g=0;g<h;g++){var _=g*u.step+u.min,v=m*l.step+l.min,y=i.a.number.round(Math.min(_,u.max),d),x=i.a.number.round(Math.min(v,l.max),f),T=o.x(y,x),b=o.y(y,x),w=o.z(y,x);a[p++]=T,a[p++]=b,a[p++]=w,a[p++]=y,a[p++]=x}}else{var E=e.equation||{},S=E.x||{},A=E.y||{};if(["x","y"].forEach(function(e){r(E[e])}),"function"!=typeof E.z)return;var M=Math.floor((S.max+S.step-S.min)/S.step),C=Math.floor((A.max+A.step-A.min)/A.step);a=new Float32Array(M*C*3);for(var L=n(S),D=n(A),p=0,m=0;m<C;m++)for(var g=0;g<M;g++){var T=g*S.step+S.min,b=m*A.step+A.min,N=i.a.number.round(Math.min(T,S.max),L),R=i.a.number.round(Math.min(b,A.max),D),w=E.z(N,R);a[p++]=N,a[p++]=R,a[p++]=w}}var P=["x","y","z"];return e.parametric&&P.push("u","v"),Object(s.a)(this,P,a)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,shading:"lambert",parametric:!1,wireframe:{show:!0,lineStyle:{color:"rgba(0,0,0,0.5)",width:1}},equation:{x:{min:-1,max:1,step:.1},y:{min:-1,max:1,step:.1},z:null},parametricEquation:{u:{min:-1,max:1,step:.1},v:{min:-1,max:1,step:.1},x:null,y:null,z:null},itemStyle:{},animationDurationUpdate:500}});i.a.util.merge(u.prototype,a.a)},function(e,t,r){"use strict";function n(e){return isNaN(e[0])||isNaN(e[1])||isNaN(e[2])}var i=r(0),a=r.n(i),o=r(1),s=(r(2),r(6)),u=r(65),l=s.a.vec3;a.a.extendChartView({type:"surface",__ecgl__:!0,init:function(e,t){this.groupGL=new o.a.Node},render:function(e,t,r){var n=this._prevSurfaceMesh;this._prevSurfaceMesh=this._surfaceMesh,this._surfaceMesh=n,this._surfaceMesh||(this._surfaceMesh=this._createSurfaceMesh()),this.groupGL.remove(this._prevSurfaceMesh),this.groupGL.add(this._surfaceMesh);var i=e.coordinateSystem,a=e.get("shading"),s=e.getData(),u="ecgl."+a;if(this._surfaceMesh.material&&this._surfaceMesh.material.shader.name===u||(this._surfaceMesh.material=o.a.createMaterial(u,["VERTEX_COLOR","DOUBLE_SIDED"])),o.a.setMaterialFromModel(a,this._surfaceMesh.material,e,r),i&&i.viewGL){i.viewGL.add(this.groupGL);var l=i.viewGL.isLinearSpace()?"define":"undefine";this._surfaceMesh.material[l]("fragment","SRGB_DECODE")}var h=e.get("parametric"),c=this._getDataShape(s,h),d=e.getModel("wireframe"),f=d.get("lineStyle.width"),p=d.get("show")&&f>0;this._updateSurfaceMesh(this._surfaceMesh,e,c,p);var m=this._surfaceMesh.material;p?(m.define("WIREFRAME_QUAD"),m.set("wireframeLineWidth",f),m.set("wireframeLineColor",o.a.parseColor(d.get("lineStyle.color")))):m.undefine("WIREFRAME_QUAD"),this._initHandler(e,r),this._updateAnimation(e)},_updateAnimation:function(e){o.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,e)},_createSurfaceMesh:function(){var e=new o.a.Mesh({geometry:new o.a.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new o.a.Material({shader:new o.a.Shader(o.a.Shader.source("ecgl.sm.depth.vertex"),o.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return e.geometry.createAttribute("barycentric","float",4),e.geometry.createAttribute("prevPosition","float",3),e.geometry.createAttribute("prevNormal","float",3),a.a.util.extend(e.geometry,u.a),e},_initHandler:function(e,t){function r(e,t){for(var r=1/0,n=-1,a=[],o=0;o<e.length;o++){i.geometry.attributes.position.get(e[o],a);var s=l.dist(t.array,a);s<r&&(r=s,n=e[o])}return n}var n=e.getData(),i=this._surfaceMesh,a=e.coordinateSystem;i.seriesIndex=e.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",function(e){var s=r(e.triangle,e.point);if(s>=0){var u=[];i.geometry.attributes.position.get(s,u);for(var h=a.pointToData(u),c=1/0,d=-1,f=[],p=0;p<n.count();p++){f[0]=n.get("x",p),f[1]=n.get("y",p),f[2]=n.get("z",p);var m=l.squaredDistance(f,h);m<c&&(d=p,c=m)}d!==o&&t.dispatchAction({type:"grid3DShowAxisPointer",value:h}),o=d,i.dataIndex=d}else i.dataIndex=-1},this),i.on("mouseout",function(e){o=-1,i.dataIndex=-1,t.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_updateSurfaceMesh:function(e,t,r,i){var a=e.geometry,s=t.getData(),u=s.getLayout("points"),h=0;s.each(function(e){s.hasValue(e)||h++});var c=h||i,d=a.attributes.position,f=a.attributes.normal,p=a.attributes.texcoord0,m=a.attributes.barycentric,g=a.attributes.color,_=r.row,v=r.column,y=t.get("shading"),x="color"!==y;if(c){var T=(_-1)*(v-1)*4;d.init(T),i&&m.init(T)}else d.value=new Float32Array(u);g.init(a.vertexCount),p.init(a.vertexCount);var b=[0,3,1,1,3,2],w=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],E=a.indices=new(a.vertexCount>65535?Uint32Array:Uint16Array)((_-1)*(v-1)*6),S=function(e,t,r){r[1]=e*v+t,r[0]=e*v+t+1,r[3]=(e+1)*v+t+1,r[2]=(e+1)*v+t},A=!1;if(c){var M=[],C=[],L=0;x?f.init(a.vertexCount):f.value=null;for(var D=[[],[],[]],N=[],R=[],P=l.create(),I=function(e,t,r){var n=3*t;return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r},O=new Float32Array(u.length),F=new Float32Array(u.length/3*4),B=0;B<s.count();B++)if(s.hasValue(B)){var U=o.a.parseColor(s.getItemVisual(B,"color")),z=s.getItemVisual(B,"opacity");U[3]*=z,U[3]<.99&&(A=!0);for(var G=0;G<4;G++)F[4*B+G]=U[G]}for(var H=[1e7,1e7,1e7],B=0;B<_-1;B++)for(var V=0;V<v-1;V++){var k=B*(v-1)+V,W=4*k;S(B,V,M);for(var j=!1,G=0;G<4;G++)I(u,M[G],C),n(C)&&(j=!0);for(var G=0;G<4;G++)j?d.set(W+G,H):(I(u,M[G],C),d.set(W+G,C)),i&&m.set(W+G,w[G]);for(var G=0;G<6;G++)E[L++]=b[G]+W;if(x&&!j)for(var G=0;G<2;G++){for(var X=3*G,q=0;q<3;q++){var Z=M[b[X]+q];I(u,Z,D[q])}l.sub(N,D[0],D[1]),l.sub(R,D[1],D[2]),l.cross(P,N,R);for(var q=0;q<3;q++){var Y=3*M[b[X]+q];O[Y]=O[Y]+P[0],O[Y+1]=O[Y+1]+P[1],O[Y+2]=O[Y+2]+P[2]}}}if(x)for(var B=0;B<O.length/3;B++)I(O,B,P),l.normalize(P,P),O[3*B]=P[0],O[3*B+1]=P[1],O[3*B+2]=P[2];for(var U=[],K=[],B=0;B<_-1;B++)for(var V=0;V<v-1;V++){var k=B*(v-1)+V,W=4*k;S(B,V,M);for(var G=0;G<4;G++){for(var q=0;q<4;q++)U[q]=F[4*M[G]+q];g.set(W+G,U),x&&(I(O,M[G],P),f.set(W+G,P));var Z=M[G];K[0]=Z%v/(v-1),K[1]=Math.floor(Z/v)/(_-1),p.set(W+G,K)}k++}}else{for(var K=[],B=0;B<s.count();B++){K[0]=B%v/(v-1),K[1]=Math.floor(B/v)/(_-1);var U=o.a.parseColor(s.getItemVisual(B,"color")),z=s.getItemVisual(B,"opacity");U[3]*=z,U[3]<.99&&(A=!0),g.set(B,U),p.set(B,K)}for(var M=[],Q=0,B=0;B<_-1;B++)for(var V=0;V<v-1;V++){S(B,V,M);for(var G=0;G<6;G++)E[Q++]=M[b[G]]}x?a.generateVertexNormals():f.value=null}e.material.get("normalMap")&&a.generateTangents(),a.updateBoundingBox(),a.dirty(),e.material.transparent=A,e.material.depthMask=!A},_getDataShape:function(e,t){for(var r=-1/0,n=0,i=0,a=t?"u":"x",o=0;o<e.count();o++){var s=e.get(a,o);s<r&&(i,i=0,n++),r=s,i++}return{row:n+1,column:i}},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";var n=r(0);r.n(n).a.registerLayout(function(e,t){e.eachSeriesByType("surface",function(e){var t=e.coordinateSystem;!t||t.type;var r=e.getData(),n=new Float32Array(3*r.count()),i=[NaN,NaN,NaN];if(t&&"cartesian3D"===t.type){var a=t.dimensions,o=a.map(function(t){return e.coordDimToDataDim(t)[0]});r.each(o,function(e,a,o,s){var u;u=r.hasValue(s)?t.dataToPoint([e,a,o]):i,n[3*s]=u[0],n[3*s+1]=u[1],n[3*s+2]=u[2]})}r.setLayout("points",n)})})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(99),r(257),r(258),r(17));i.a.registerVisual(Object(a.a)("map3D")),i.a.registerAction({type:"map3DChangeCamera",event:"map3dcamerachanged",update:"series:updateCamera"},function(e,t){t.eachComponent({mainType:"series",subType:"map3D",query:e},function(t){t.setView(e)})})},function(e,t,r){"use strict";function n(e,t){for(var r=[],n=0;n<t.length;n++)r.push(e.dataToPoint(t[n]));return r}var i=r(0),a=r.n(i),o=r(44),s=r(28),u=r(29),l=r(31),h=r(96),c=r(32),d=r(39),f=r(98),p=a.a.extendSeriesModel({type:"series.map3D",layoutMode:"box",coordinateSystem:null,visualColorAccessPath:"itemStyle.color",optionUpdated:function(e){e=e||{};var t=this.get("coordinateSystem");if(null!=t&&"geo3D"!==t){this.get("groundPlane.show")&&(this.option.groundPlane.show=!1),this._geo=null}},getInitialData:function(e){e.data=this.getFilledRegions(e.data,e.map);var t=a.a.helper.completeDimensions(["value"],e.data),r=new a.a.List(t,this);r.initData(e.data);var n={};return r.each(function(e){var t=r.getName(e),i=r.getItemModel(e);n[t]=i}),this._regionModelMap=n,r},formatTooltip:function(e){return Object(d.a)(this,e)},getRegionModel:function(e){var t=this.getData().getName(e);return this._regionModelMap[t]||new a.a.Model(null,this)},getRegionPolygonCoords:function(e){var t=this.coordinateSystem,r=this.getData().getName(e);if(t.transform){var i=t.getRegion(r);return i?i.geometries:[]}this._geo||(this._geo=f.a.createGeo3D(this));for(var i=this._geo.getRegion(r),a=[],o=0;o<i.geometries.length;o++){var s=i.geometries[o],u=[],l=n(t,s.exterior);if(u&&u.length)for(var h=0;h<s.interiors.length;h++)u.push(n(t,u[h]));a.push({interiors:u,exterior:l})}return a},getFormattedLabel:function(e,t){var r=c.a.getFormattedLabel(this,e,t);return null==r&&(r=this.getData().getName(e)),r},defaultOption:{coordinateSystem:"geo3D",data:null}});a.a.util.merge(p.prototype,h.a),a.a.util.merge(p.prototype,o.a),a.a.util.merge(p.prototype,s.a),a.a.util.merge(p.prototype,u.a),a.a.util.merge(p.prototype,l.a)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(45),s=r(30),u=r(64);i.a.extendChartView({type:"map3D",__ecgl__:!0,init:function(e,t){this._geo3DBuilder=new u.a(t),this.groupGL=new a.a.Node},render:function(e,t,r){var n=e.coordinateSystem;if(n&&n.viewGL){this.groupGL.add(this._geo3DBuilder.rootNode),n.viewGL.add(this.groupGL);if("geo3D"===n.type){n,this._sceneHelper||(this._sceneHelper=new s.a,this._sceneHelper.initLight(this.groupGL)),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(e),n.viewGL.setPostEffect(e.getModel("postEffect"),r),n.viewGL.setTemporalSuperSampling(e.getModel("temporalSuperSampling"));var i=this._control;i||(i=this._control=new o.a({zr:r.getZr()}),this._control.init());var a=e.getModel("viewControl");i.setViewGL(n.viewGL),i.setFromViewControlModel(a,0),i.off("update"),i.on("update",function(){r.dispatchAction({type:"map3DChangeCamera",alpha:i.getAlpha(),beta:i.getBeta(),distance:i.getDistance(),from:this.uid,map3DId:e.id})}),this._geo3DBuilder.extrudeY=!0}else this._control&&(this._control.dispose(),this._control=null),this._sceneHelper&&(this._sceneHelper.dispose(),this._sceneHelper=null),e.getData().getLayout("geo3D"),this._geo3DBuilder.extrudeY=!1;this._geo3DBuilder.update(e,t,r,0,e.getData().count());var u=n.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse(function(e){e.material&&e.material[u]("fragment","SRGB_DECODE")})}},afterRender:function(e,t,r,n){var i=n.renderer,a=e.coordinateSystem;a&&"geo3D"===a.type&&(this._sceneHelper.updateAmbientCubemap(i,e,r),this._sceneHelper.updateSkybox(i,e,r))},dispose:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(260),r(261),r(51)),o=r.n(a),s=r(17);i.a.registerVisual(o()("scatterGL","circle",null)),i.a.registerVisual(Object(s.a)("scatterGL")),i.a.registerLayout({seriesType:"scatterGL",reset:function(e){var t,r=e.coordinateSystem;if(r){var n=r.dimensions,i=[];1===n.length?t=function(e,t){for(var i=new Float32Array(2*(e.end-e.start)),a=e.start;a<e.end;a++){var o=2*(a-e.start),s=t.get(n[0],a),u=r.dataToPoint(s);i[o]=u[0],i[o+1]=u[1]}t.setLayout("points",i)}:2===n.length&&(t=function(e,t){for(var a=new Float32Array(2*(e.end-e.start)),o=e.start;o<e.end;o++){var s=2*(o-e.start),u=t.get(n[0],o),l=t.get(n[1],o);i[0]=u,i[1]=l,i=r.dataToPoint(i),a[s]=i[0],a[s+1]=i[1]}t.setLayout("points",a)})}return{progress:t}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n);i.a.extendSeriesModel({type:"series.scatterGL",dependencies:["grid","polar","geo","singleAxis"],visualColorAccessPath:"itemStyle.color",getInitialData:function(){return i.a.helper.createList(this)},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,progressive:1e5,progressiveThreshold:1e5,large:!1,symbol:"circle",symbolSize:10,zoomScale:0,blendMode:"source-over",itemStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(22),s=r(67),u=r(103);r(2);i.a.extendChartView({type:"scatterGL",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this.viewGL=new o.a("orthographic"),this.viewGL.add(this.groupGL),this._pointsBuilderList=[],this._currentStep=0,this._sizeScale=1,this._glViewHelper=new u.a(this.viewGL)},render:function(e,t,r){if(this.groupGL.removeAll(),this._glViewHelper.reset(e,r),e.getData().count()){var n=this._pointsBuilderList[0];n||(n=this._pointsBuilderList[0]=new s.a(!0,r)),this._pointsBuilderList.length=1,this.groupGL.add(n.rootNode),this._removeTransformInPoints(e.getData().getLayout("points")),n.update(e,t,r),this.viewGL.setPostEffect(e.getModel("postEffect"),r)}},incrementalPrepareRender:function(e,t,r){this.groupGL.removeAll(),this._glViewHelper.reset(e,r),this._currentStep=0,this.viewGL.setPostEffect(e.getModel("postEffect"),r)},incrementalRender:function(e,t,r,n){if(!(e.end<=e.start)){var i=this._pointsBuilderList[this._currentStep];i||(i=new s.a(!0,n),this._pointsBuilderList[this._currentStep]=i),this.groupGL.add(i.rootNode),this._removeTransformInPoints(t.getData().getLayout("points")),i.setSizeScale(this._sizeScale),i.update(t,r,n,e.start,e.end),n.getZr().refresh(),this._currentStep++}},updateTransform:function(e,t,r){if(e.coordinateSystem.getRoamTransform){this._glViewHelper.updateTransform(e,r);var n=this._glViewHelper.getZoom(),i=Math.max((e.get("zoomScale")||0)*(n-1)+1,0);this._sizeScale=i,this._pointsBuilderList.forEach(function(e){e.setSizeScale(i)})}},_removeTransformInPoints:function(e){if(e)for(var t=[],r=0;r<e.length;r+=2)t[0]=e[r],t[1]=e[r+1],this._glViewHelper.removeTransformInPoint(t),e[r]=t[0],e[r+1]=t[1]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})},function(e,t,r){"use strict";function n(){}var i=r(0),a=r.n(i),o=(r(263),r(268),r(51)),s=r.n(o),u=r(17);a.a.registerVisual(s()("graphGL","circle",null)),a.a.registerVisual(Object(u.a)("graphGL")),a.a.registerVisual(function(e){var t={};e.eachSeriesByType("graphGL",function(e){var r=e.getCategoriesData(),n=e.getData(),i={};r.each(function(n){var a=r.getName(n);i[a]=n;var o=r.getItemModel(n),s=o.get("itemStyle.color")||e.getColorFromPalette(a,t);r.setItemVisual(n,"color",s)}),r.count()&&n.each(function(e){var t=n.getItemModel(e),a=t.getShallow("category");null!=a&&("string"==typeof a&&(a=i[a]),n.getItemVisual(e,"color",!0)||n.setItemVisual(e,"color",r.getItemVisual(a,"color")))})})}),a.a.registerVisual(function(e){e.eachSeriesByType("graphGL",function(e){var t=e.getGraph(),r=e.getEdgeData(),n="lineStyle.color".split("."),i="lineStyle.opacity".split(".");r.setVisual("color",e.get(n)),r.setVisual("opacity",e.get(i)),r.each(function(e){var a=r.getItemModel(e),o=t.getEdgeByIndex(e),s=a.get(n),u=a.get(i);switch(s){case"source":s=o.node1.getVisual("color");break;case"target":s=o.node2.getVisual("color")}o.setVisual("color",s),o.setVisual("opacity",u)})})}),a.a.registerAction({type:"graphGLRoam",event:"graphglroam",update:"series.graphGL:roam"},function(e,t){t.eachComponent({mainType:"series",query:e},function(t){t.setView(e)})}),a.a.registerAction({type:"graphGLStartLayout",event:"graphgllayoutstarted",update:"series.graphGL:startLayout"},n),a.a.registerAction({type:"graphGLStopLayout",event:"graphgllayoutstopped",update:"series.graphGL:stopLayout"},n),a.a.registerAction({type:"graphGLFocusNodeAdjacency",event:"graphGLFocusNodeAdjacency",update:"series.graphGL:focusNodeAdjacency"},n),a.a.registerAction({type:"graphGLUnfocusNodeAdjacency",event:"graphGLUnfocusNodeAdjacency",update:"series.graphGL:unfocusNodeAdjacency"},n)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(264),o=r(32),s=i.a.extendSeriesModel({type:"series.graphGL",visualColorAccessPath:"itemStyle.color",init:function(e){s.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(e){s.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(e,t,r,n){var i=o.a.getFormattedLabel(this,e,t,r,n);if(null==i){var a=this.getData(),s=a.dimensions[a.dimensions.length-1];i=a.get(s,e)}return i},getInitialData:function(e,t){function r(e,r){function n(e){return e=this.parsePath(e),e&&"label"===e[0]?o:this.parentModel}e.wrapMethod("getItemModel",function(e){var t=s._categoriesModels,r=e.getShallow("category"),n=t[r];return n&&(n.parentModel=e.parentModel,e.parentModel=n),e});var a=s.getModel("edgeLabel"),o=new i.a.Model({label:a.option},a.parentModel,t);r.wrapMethod("getItemModel",function(e){return e.customizeGetParent(n),e})}var n=e.edges||e.links||[],o=e.data||e.nodes||[],s=this;if(o&&n)return Object(a.a)(o,n,this,!0,r).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,r){if("edge"===r){var n=this.getData(),a=this.getDataParams(e,r),o=n.graph.getEdgeByIndex(e),u=n.getName(o.node1.dataIndex),l=n.getName(o.node2.dataIndex),h=[];return null!=u&&h.push(u),null!=l&&h.push(l),h=i.a.format.encodeHTML(h.join(" > ")),a.value&&(h+=" : "+i.a.format.encodeHTML(a.value)),h}return s.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=(this.option.categories||[]).map(function(e){return null!=e.value?e:i.a.util.extend({value:0},e)}),t=new i.a.List(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e,!0)})},setView:function(e){null!=e.zoom&&(this.option.zoom=e.zoom),null!=e.offset&&(this.option.offset=e.offset)},setNodePosition:function(e){for(var t=0;t<e.length/2;t++){var r=e[2*t],n=e[2*t+1],i=this.getData().getRawDataItem(t);i.x=r,i.y=n}},isAnimationEnabled:function(){return s.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:10,z:2,legendHoverLink:!0,layout:"forceAtlas2",forceAtlas2:{initLayout:null,GPU:!0,steps:1,maxSteps:1e3,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,edgeWeightInfluence:1,edgeWeight:[1,4],nodeWeight:[1,4],preventOverlap:!1,gravityCenter:null},focusNodeAdjacency:!0,focusNodeAdjacencyOn:"mouseover",left:"center",top:"center",symbol:"circle",symbolSize:5,roam:!1,center:null,zoom:1,label:{show:!1,formatter:"{b}",position:"right",distance:5,textStyle:{fontSize:14}},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}},animation:!1}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(265),o=r.n(a),s=r(267),u=r.n(s),l=r(2);t.a=function(e,t,r,n,a){for(var s=new o.a(n),h=0;h<e.length;h++)s.addNode(l.a.firstNotNull(e[h].id,e[h].name,h),h);for(var c=[],d=[],f=0,h=0;h<t.length;h++){var p=t[h],m=p.source,g=p.target;s.addEdge(m,g,f)&&(d.push(p),c.push(l.a.firstNotNull(p.id,m+" > "+g)),f++)}var _,v=i.a.helper.completeDimensions(["value"],e);_=new i.a.List(v,r),_.initData(e);var y=new i.a.List(["value"],r);return y.initData(d,c),a&&a(_,y),u()({mainData:_,struct:s,structAttr:"graph",datas:{node:_,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},function(e,t,r){function n(e){return"_EC_"+e}function i(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function a(e,t,r){this.node1=e,this.node2=t,this.dataIndex=null==r?-1:r}var o=r(104),s=(o.__DEV__,r(13)),u=r(266),l=u.enableClassCheck,h=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},c=h.prototype;c.type="graph",c.isDirected=function(){return this._directed},c.addNode=function(e,t){e=e||""+t;var r=this._nodesMap;if(!r[n(e)]){var a=new i(e,t);return a.hostGraph=this,this.nodes.push(a),r[n(e)]=a,a}},c.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},c.getNodeById=function(e){return this._nodesMap[n(e)]},c.addEdge=function(e,t,r){var o=this._nodesMap,s=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),i.isInstance(e)||(e=o[n(e)]),i.isInstance(t)||(t=o[n(t)]),e&&t){var u=e.id+"-"+t.id;if(!s[u]){var l=new a(e,t,r);return l.hostGraph=this,this._directed&&(e.outEdges.push(l),t.inEdges.push(l)),e.edges.push(l),e!==t&&t.edges.push(l),this.edges.push(l),s[u]=l,l}}},c.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},c.getEdge=function(e,t){i.isInstance(e)&&(e=e.id),i.isInstance(t)&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},c.eachNode=function(e,t){for(var r=this.nodes,n=r.length,i=0;i<n;i++)r[i].dataIndex>=0&&e.call(t,r[i],i)},c.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i<n;i++)r[i].dataIndex>=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&e.call(t,r[i],i)},c.breadthFirstTraverse=function(e,t,r,a){if(i.isInstance(t)||(t=this._nodesMap[n(t)]),t){for(var o="out"===r?"outEdges":"in"===r?"inEdges":"edges",s=0;s<this.nodes.length;s++)this.nodes[s].__visited=!1;if(!e.call(a,t,null))for(var u=[t];u.length;)for(var l=u.shift(),h=l[o],s=0;s<h.length;s++){var c=h[s],d=c.node1===l?c.node2:c.node1;if(!d.__visited){if(e.call(a,d,l))return;u.push(d),d.__visited=!0}}}},c.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,n=this.edges,i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)r[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var r=n[t.getRawIndex(e)];return r.node1.dataIndex>=0&&r.node2.dataIndex>=0});for(var i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)n[t.getRawIndex(i)].dataIndex=i},c.clone=function(){for(var e=new h(this._directed),t=this.nodes,r=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<r.length;n++){var i=r[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},i.prototype={constructor:i,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0)){return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}}},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)}};var d=function(e,t){return{getValue:function(r){var n=this[e][t];return n.get(n.getDimension(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r,n){return this[e][t].getItemVisual(this.dataIndex,r,n)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};s.mixin(i,d("hostGraph","data")),s.mixin(a,d("hostGraph","edgeData")),h.Node=i,h.Edge=a,l(i),l(a);var f=h;e.exports=f},function(e,t,r){function n(e){var t={main:"",sub:""};return e&&(e=e.split(f),t.main=e[0]||"",t.sub=e[1]||""),t}function i(e){d.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function a(e,t){e.$constructor=e,e.extend=function(e){var t=this,r=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return d.extend(r.prototype,e),r.extend=this.extend,r.superCall=s,r.superApply=u,d.inherits(r,this),r.superClass=t,r}}function o(e){var t=["__\0is_clz",m++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}}function s(e,t){var r=d.slice(arguments,2);return this.superClass.prototype[t].apply(e,r)}function u(e,t,r){return this.superClass.prototype[t].apply(e,r)}function l(e,t){function r(e){var t=a[e.main];return t&&t[p]||(t=a[e.main]={},t[p]=!0),t}t=t||{};var a={};if(e.registerClass=function(e,t){if(t)if(i(t),t=n(t),t.sub){if(t.sub!==p){var o=r(t);o[t.sub]=e}}else a[t.main]=e;return e},e.getClass=function(e,t,r){var n=a[e];if(n&&n[p]&&(n=t?n[t]:null),r&&!n)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return n},e.getClassesByMainType=function(e){e=n(e);var t=[],r=a[e.main];return r&&r[p]?d.each(r,function(e,r){r!==p&&t.push(e)}):t.push(r),t},e.hasClass=function(e){return e=n(e),!!a[e.main]},e.getAllClassMainTypes=function(){var e=[];return d.each(a,function(t,r){e.push(r)}),e},e.hasSubTypes=function(e){e=n(e);var t=a[e.main];return t&&t[p]},e.parseClassType=n,t.registerWhenExtend){var o=e.extend;o&&(e.extend=function(t){var r=o.call(this,t);return e.registerClass(r,t.type)})}return e}function h(e,t){}var c=r(104),d=(c.__DEV__,r(13)),f=".",p="___EC__COMPONENT__CONTAINER___",m=0;t.parseClassType=n,t.enableClassExtend=a,t.enableClassCheck=o,t.enableClassManagement=l,t.setReadOnly=h},function(e,t,r){function n(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,l(t,r,e),d(r,function(r){d(t.TRANSFERABLE_METHODS,function(t){r.wrapMethod(t,c.curry(i,e))})}),t.wrapMethod("cloneShallow",c.curry(o,e)),d(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,c.curry(a,e))}),c.assert(r[t.dataType]===t)}function i(e,t){if(u(this)){var r=c.extend({},this[f]);r[this.dataType]=t,l(t,r,e)}else h(t,this.dataType,this[p],e);return t}function a(e,t){return e.struct&&e.struct.update(this),t}function o(e,t){return d(t[f],function(r,n){r!==t&&h(r.cloneShallow(),n,t,e)}),t}function s(e){var t=this[p];return null==e||null==t?t:t[f][e]}function u(e){return e[p]===e}function l(e,t,r){e[f]={},d(t,function(t,n){h(t,n,e,r)})}function h(e,t,r,n){r[f][t]=e,e[p]=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=s}var c=r(13),d=c.each,f="\0__link_datas",p="\0__link_mainData",m=n;e.exports=m},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(47),o=r.n(a),s=r(1),u=r(22),l=r(105),h=r(2),c=r(269),d=r(271),f=r(80),p=r.n(f),m=r(6),g=r(273),_=r(67),v=r(274),y=m.a.vec2;s.a.Shader.import(v.a);var x=1;i.a.extendChartView({type:"graphGL",__ecgl__:!0,init:function(e,t){this.groupGL=new s.a.Node,this.viewGL=new u.a("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new _.a(!0,t),this._forceEdgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new s.a.Geometry({attributes:{node:new s.a.Geometry.Attribute("node","float",2),color:new s.a.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:s.a.Mesh.LINES}),this._edgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new l.a({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new g.a({zr:t.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(e,t,r){this.groupGL.add(this._pointsBuilder.rootNode),this._model=e,this._api=r,this._initLayout(e,t,r),this._pointsBuilder.update(e,t,r),this._forceLayoutInstance instanceof c.a||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(e,r),this._control.off("update"),this._control.on("update",function(){r.dispatchAction({type:"graphGLRoam",seriesId:e.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)},this),this._control.setZoom(h.a.firstNotNull(e.get("zoom"),1)),this._control.setOffset(e.get("offset")||[0,0]);var n=this._pointsBuilder.getPointsMesh();if(n.off("mousemove",this._mousemoveHandler),n.off("mouseout",this._mouseOutHandler,this),r.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,e.get("focusNodeAdjacency")){var i=e.get("focusNodeAdjacencyOn");"click"===i?r.getZr().on("click",this._clickHandler):"mouseover"===i&&(n.on("mousemove",this._mousemoveHandler,this),n.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(e){if(!this._layouting){var t=this._pointsBuilder.getPointsMesh().dataIndex;t>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:t}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(e){if(!this._layouting){var t=this._pointsBuilder.getPointsMesh().dataIndex;t>=0?t!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:t}):this._mouseOutHandler(e),this._lastMouseOverDataIndex=t}},_mouseOutHandler:function(e){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(e,t){var r=this._forceEdgesMesh.geometry,n=t.getEdgeData(),i=0,a=this._forceLayoutInstance,o=2*n.count();r.attributes.node.init(o),r.attributes.color.init(o),n.each(function(t){var o=e[t];r.attributes.node.set(i,a.getNodeUV(o.node1)),r.attributes.node.set(i+1,a.getNodeUV(o.node2));var u=n.getItemVisual(o.dataIndex,"color"),l=s.a.parseColor(u);l[3]*=h.a.firstNotNull(n.getItemVisual(o.dataIndex,"opacity"),1),r.attributes.color.set(i,l),r.attributes.color.set(i+1,l),i+=2}),r.dirty()},_updateMeshLinesGeometry:function(){var e=this._model.getEdgeData(),t=this._edgesMesh.geometry,e=this._model.getEdgeData(),r=this._model.getData().getLayout("points");t.resetOffset(),t.setVertexCount(e.count()*t.getLineVertexCount()),t.setTriangleCount(e.count()*t.getLineTriangleCount());var n=[],i=[],a=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*e.count()),this._edgeIndicesMap=new Float32Array(e.count()),e.each(function(o){var u=e.graph.getEdgeByIndex(o),l=2*u.node1.dataIndex,c=2*u.node2.dataIndex;n[0]=r[l],n[1]=r[l+1],i[0]=r[c],i[1]=r[c+1];var d=e.getItemVisual(u.dataIndex,"color"),f=s.a.parseColor(d);f[3]*=h.a.firstNotNull(e.getItemVisual(u.dataIndex,"opacity"),1);var p=e.getItemModel(u.dataIndex),m=h.a.firstNotNull(p.get(a),1)*this._api.getDevicePixelRatio();t.addLine(n,i,f,m);for(var g=0;g<4;g++)this._originalEdgeColors[4*u.dataIndex+g]=f[g];this._edgeIndicesMap[u.dataIndex]=o},this),t.dirty()},_updateForceNodesGeometry:function(e){for(var t=this._pointsBuilder.getPointsMesh(),r=[],n=0;n<e.count();n++)this._forceLayoutInstance.getNodeUV(n,r),t.geometry.attributes.position.set(n,r);t.geometry.dirty("position")},_initLayout:function(e,t,r){var n=e.get("layout"),a=e.getGraph(),s=e.getBoxLayoutParams(),u=o.a.getLayoutRect(s,{width:r.getWidth(),height:r.getHeight()});"force"===n&&(n="forceAtlas2"),this.stopLayout(e,t,r,{beforeLayout:!0});var l=e.getData(),f=e.getData();if("forceAtlas2"===n){var p=e.getModel("forceAtlas2"),m=this._forceLayoutInstance,g=[],_=[],v=l.getDataExtent("value"),y=f.getDataExtent("value"),x=h.a.firstNotNull(p.get("edgeWeight"),1),T=h.a.firstNotNull(p.get("nodeWeight"),1);"number"==typeof x&&(x=[x,x]),"number"==typeof T&&(T=[T,T]);var b=0,w={},E=new Float32Array(2*l.count());if(a.eachNode(function(e){var t,r,n=e.dataIndex,a=l.get("value",n);if(l.hasItemOption){var o=l.getItemModel(n);t=o.get("x"),r=o.get("y")}null==t&&(t=u.x+Math.random()*u.width,r=u.y+Math.random()*u.height),E[2*b]=t,E[2*b+1]=r,w[e.id]=b++;var s=i.a.number.linearMap(a,v,T);isNaN(s)&&(s=isNaN(T[0])?1:T[0]),g.push({x:t,y:r,mass:s,size:l.getItemVisual(n,"symbolSize")})}),l.setLayout("points",E),a.eachEdge(function(e){var t=e.dataIndex,r=l.get("value",t),n=i.a.number.linearMap(r,y,x);isNaN(n)&&(n=isNaN(x[0])?1:x[0]),_.push({node1:w[e.node1.id],node2:w[e.node2.id],weight:n,dataIndex:t})}),!m){var S=p.get("GPU");this._forceLayoutInstance&&((!S||this._forceLayoutInstance instanceof c.a)&&(S||this._forceLayoutInstance instanceof d.a)||(this._forceLayoutInstanceToDispose=this._forceLayoutInstance)),m=this._forceLayoutInstance=S?new c.a:new d.a}m.initData(g,_),m.updateOption(p.option),this._updateForceEdgesGeometry(m.getEdges(),e),this._updatePositionTexture(),r.dispatchAction({type:"graphGLStartLayout",from:this.uid})}else{var E=new Float32Array(2*l.count()),b=0;a.eachNode(function(e){var t,r,n=e.dataIndex;if(l.hasItemOption){var i=l.getItemModel(n);t=i.get("x"),r=i.get("y")}E[b++]=t,E[b++]=r}),l.setLayout("points",E),this._updateAfterLayout(e,t,r)}},_updatePositionTexture:function(){var e=this._forceLayoutInstance.getNodePositionTexture();this._pointsBuilder.setPositionTexture(e),this._forceEdgesMesh.material.set("positionTex",e)},startLayout:function(e,t,r,n){if(!n||null==n.from||n.from===this.uid){var i=this.viewGL,r=this._api,a=this._forceLayoutInstance,o=this._model.getData(),s=this._model.getModel("forceAtlas2");if(a&&(this.groupGL.remove(this._edgesMesh),this.groupGL.add(this._forceEdgesMesh),this._forceLayoutInstance)){this._updateForceNodesGeometry(e.getData()),this._pointsBuilder.hideLabels();var u=this,l=this._layoutId=x++,h=s.getShallow("maxSteps"),c=s.getShallow("steps"),d=0,f=Math.max(2*c,20),m=function(t){if(t===u._layoutId)return a.isFinished(h)?(r.dispatchAction({type:"graphGLStopLayout",from:u.uid}),void r.dispatchAction({type:"graphGLFinishLayout",points:o.getLayout("points"),from:u.uid})):void a.update(i.layer.renderer,c,function(){u._updatePositionTexture(),d+=c,d>=f&&(u._syncNodePosition(e),d=0),r.getZr().refresh(),p()(function(){m(t)})})};p()(function(){u._forceLayoutInstanceToDispose&&(u._forceLayoutInstanceToDispose.dispose(i.layer.renderer),u._forceLayoutInstanceToDispose=null),m(l)}),this._layouting=!0}}},stopLayout:function(e,t,r,n){n&&null!=n.from&&n.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(n&&n.beforeLayout||(this._syncNodePosition(e),this._updateAfterLayout(e,t,r)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(e){var t=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);e.getData().setLayout("points",t),e.setNodePosition(t)},_updateAfterLayout:function(e,t,r){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(e,t,r),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(e,t,r,n){var i=this._model.getData();this._downplayAll();var a=n.dataIndex,o=i.graph,s=[],u=o.getNodeByIndex(a);s.push(u),u.edges.forEach(function(e){e.dataIndex<0||(e.node1!==u&&s.push(e.node1),e.node2!==u&&s.push(e.node2))},this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach(function(e){this._pointsBuilder.highlight(i,e.dataIndex)},this),this._pointsBuilder.updateLabels(s.map(function(e){return e.dataIndex}));var l=[];u.edges.forEach(function(e){e.dataIndex>=0&&(this._highlightEdge(e.dataIndex),l.push(e))},this),this._focusNodes=s,this._focusEdges=l},unfocusNodeAdjacency:function(e,t,r,n){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(e){var t=this._model.getEdgeData().getItemModel(e),r=s.a.parseColor(t.get("emphasis.lineStyle.color")||t.get("lineStyle.color")),n=h.a.firstNotNull(t.get("emphasis.lineStyle.opacity"),t.get("lineStyle.opacity"),1);r[3]*=n,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],r)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach(function(e){this._pointsBuilder.downplay(this._model.getData(),e.dataIndex)},this),this._focusEdges&&this._focusEdges.forEach(function(e){this._downplayEdge(e.dataIndex)},this)},_downplayEdge:function(e){var t=this._getColor(e,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],t)},_setEdgeFade:function(){var e=[];return function(t,r){this._getColor(t,e),e[3]*=r,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)}}(),_getColor:function(e,t){for(var r=0;r<4;r++)t[r]=this._originalEdgeColors[4*e+r];return t},_fadeOutEdgesAll:function(e){this._model.getData().graph.eachEdge(function(t){this._setEdgeFade(t.dataIndex,e)},this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(e,t){this.viewGL.setViewport(0,0,t.getWidth(),t.getHeight(),t.getDevicePixelRatio());for(var r=this.viewGL.camera,n=e.getData(),i=n.getLayout("points"),a=y.create(1/0,1/0),o=y.create(-1/0,-1/0),s=[],u=0;u<i.length;)s[0]=i[u++],s[1]=i[u++],y.min(a,a,s),y.max(o,o,s);var l=(o[1]+a[1])/2,h=(o[0]+a[0])/2;if(!(h>r.left&&h<r.right&&l<r.bottom&&l>r.top)){var c=Math.max(o[0]-a[0],10),d=c/t.getWidth()*t.getHeight();c*=1.4,d*=1.4,a[0]-=.2*c,r.left=a[0],r.top=l-d/2,r.bottom=l+d/2,r.right=c+a[0],r.near=0,r.far=100}},dispose:function(){var e=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(e),this.groupGL.removeAll(),this._layoutId=-1},remove:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(e,t,r){"use strict";function n(e){var t={type:o.a.Texture.FLOAT,minFilter:o.a.Texture.NEAREST,magFilter:o.a.Texture.NEAREST};this._positionSourceTex=new o.a.Texture2D(t),this._positionSourceTex.flipY=!1,this._positionTex=new o.a.Texture2D(t),this._positionPrevTex=new o.a.Texture2D(t),this._forceTex=new o.a.Texture2D(t),this._forcePrevTex=new o.a.Texture2D(t),this._weightedSumTex=new o.a.Texture2D(t),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new o.a.Texture2D(t),this._globalSpeedPrevTex=new o.a.Texture2D(t),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new s.a({fragment:o.a.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new s.a({fragment:o.a.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new s.a({fragment:o.a.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new s.a({fragment:o.a.Shader.source("clay.compositor.output")});var r=function(e){e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE)};this._edgeForceMesh=new o.a.Mesh({geometry:new o.a.Geometry({attributes:{node1:new o.a.Geometry.Attribute("node1","float",2),node2:new o.a.Geometry.Attribute("node2","float",2),weight:new o.a.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new o.a.Material({transparent:!0,shader:o.a.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:r,depthMask:!1,depthText:!1}),mode:o.a.Mesh.POINTS}),this._weightedSumMesh=new o.a.Mesh({geometry:new o.a.Geometry({attributes:{node:new o.a.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new o.a.Material({transparent:!0,shader:o.a.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:r,depthMask:!1,depthText:!1}),mode:o.a.Mesh.POINTS}),this._framebuffer=new u.a({depthBuffer:!1}),this._dummyCamera=new o.a.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}var i=r(0),a=r.n(i),o=r(1),s=r(16),u=r(10),l=r(270);o.a.Shader.import(l.a);var h={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};n.prototype.updateOption=function(e){for(var t in h)this[t]=h[t];var r=this._nodes.length;if(this.jitterTolerence=r>5e4?10:r>5e3?1:.1,this.scaling=r>100?2:10,e)for(var t in h)null!=e[t]&&(this[t]=e[t]);if(this.repulsionByDegree)for(var n=this._positionSourceTex.pixels,i=0;i<this._nodes.length;i++)n[4*i+2]=(this._nodes[i].degree||0)+1},n.prototype._updateGravityCenter=function(e){var t=this._nodes,r=this._edges;if(this.gravityCenter)this._gravityCenter=this.gravityCenter;else{for(var n=[1/0,1/0],i=[-1/0,-1/0],a=0;a<t.length;a++)n[0]=Math.min(t[a].x,n[0]),n[1]=Math.min(t[a].y,n[1]),i[0]=Math.max(t[a].x,i[0]),i[1]=Math.max(t[a].y,i[1]);this._gravityCenter=[.5*(n[0]+i[0]),.5*(n[1]+i[1])]}for(var a=0;a<r.length;a++){var o=r[a].node1,s=r[a].node2;t[o].degree=(t[o].degree||0)+1,t[s].degree=(t[s].degree||0)+1}},n.prototype.initData=function(e,t){this._nodes=e,this._edges=t,this._updateGravityCenter();var r=Math.ceil(Math.sqrt(e.length)),n=r,i=new Float32Array(r*n*4);this._resize(r,n);for(var a=0,o=0;o<e.length;o++){var s=e[o];i[a++]=s.x||0,i[a++]=s.y||0,i[a++]=s.mass||1,i[a++]=s.size||1}this._positionSourceTex.pixels=i;var u=this._edgeForceMesh.geometry,l=t.length;u.attributes.node1.init(2*l),u.attributes.node2.init(2*l),u.attributes.weight.init(2*l);for(var h=[],o=0;o<t.length;o++){var c=u.attributes,d=t[o].weight;null==d&&(d=1),c.node1.set(o,this.getNodeUV(t[o].node1,h)),c.node2.set(o,this.getNodeUV(t[o].node2,h)),c.weight.set(o,d),c.node1.set(o+l,this.getNodeUV(t[o].node2,h)),c.node2.set(o+l,this.getNodeUV(t[o].node1,h)),c.weight.set(o+l,d)}var f=this._weightedSumMesh.geometry;f.attributes.node.init(e.length);for(var o=0;o<e.length;o++)f.attributes.node.set(o,this.getNodeUV(o,h));u.dirty(),f.dirty(),this._nodeRepulsionPass.material.define("fragment","NODE_COUNT",e.length),this._nodeRepulsionPass.material.setUniform("textureSize",[r,n]),this._inited=!1,this._frame=0},n.prototype.getNodes=function(){return this._nodes},n.prototype.getEdges=function(){return this._edges},n.prototype.step=function(e){this._inited||(this._initFromSource(e),this._inited=!0),this._frame++,this._framebuffer.attach(this._forceTex),this._framebuffer.bind(e);var t=this._nodeRepulsionPass;t.setUniform("strongGravityMode",this.strongGravityMode),t.setUniform("gravity",this.gravity),t.setUniform("gravityCenter",this._gravityCenter),t.setUniform("scaling",this.scaling),t.setUniform("preventOverlap",this.preventOverlap),t.setUniform("positionTex",this._positionPrevTex),t.render(e);var r=this._edgeForceMesh;r.material.set("linLogMode",this.linLogMode),r.material.set("edgeWeightInfluence",this.edgeWeightInfluence),r.material.set("preventOverlap",this.preventOverlap),r.material.set("positionTex",this._positionPrevTex),e.gl.enable(e.gl.BLEND),e.renderPass([r],this._dummyCamera),this._framebuffer.attach(this._weightedSumTex),e.gl.clearColor(0,0,0,0),e.gl.clear(e.gl.COLOR_BUFFER_BIT),e.gl.enable(e.gl.BLEND);var n=this._weightedSumMesh;n.material.set("positionTex",this._positionPrevTex),n.material.set("forceTex",this._forceTex),n.material.set("forcePrevTex",this._forcePrevTex),e.renderPass([n],this._dummyCamera),this._framebuffer.attach(this._globalSpeedTex);var i=this._globalSpeedPass;i.setUniform("globalSpeedPrevTex",this._globalSpeedPrevTex),i.setUniform("weightedSumTex",this._weightedSumTex),i.setUniform("jitterTolerence",this.jitterTolerence),e.gl.disable(e.gl.BLEND),i.render(e);var a=this._positionPass;this._framebuffer.attach(this._positionTex),a.setUniform("globalSpeedTex",this._globalSpeedTex),a.setUniform("positionTex",this._positionPrevTex),a.setUniform("forceTex",this._forceTex),a.setUniform("forcePrevTex",this._forcePrevTex),a.render(e),this._framebuffer.unbind(e),this._swapTexture()},n.prototype.update=function(e,t,r){null==t&&(t=1),t=Math.max(t,1);for(var n=0;n<t;n++)this.step(e);r&&r()},n.prototype.getNodePositionTexture=function(){return this._inited?this._positionPrevTex:this._positionSourceTex},n.prototype.getNodeUV=function(e,t){t=t||[];var r=this._positionTex.width,n=this._positionTex.height;return t[0]=e%r/(r-1),t[1]=Math.floor(e/r)/(n-1)||0,t},n.prototype.getNodePosition=function(e,t){var r=this._positionArr,n=this._positionTex.width,i=this._positionTex.height,a=n*i;r&&r.length===4*a||(r=this._positionArr=new Float32Array(4*a)),this._framebuffer.bind(e),this._framebuffer.attach(this._positionPrevTex),e.gl.readPixels(0,0,n,i,e.gl.RGBA,e.gl.FLOAT,r),this._framebuffer.unbind(e),t||(t=new Float32Array(2*this._nodes.length));for(var o=0;o<this._nodes.length;o++)t[2*o]=r[4*o],t[2*o+1]=r[4*o+1];return t},n.prototype.getTextureData=function(e,t){var r=this["_"+t+"Tex"],n=r.width,i=r.height;this._framebuffer.bind(e),this._framebuffer.attach(r);var a=new Float32Array(n*i*4);return e.gl.readPixels(0,0,n,i,e.gl.RGBA,e.gl.FLOAT,a),this._framebuffer.unbind(e),a},n.prototype.getTextureSize=function(){return{width:this._positionTex.width,height:this._positionTex.height}},n.prototype.isFinished=function(e){return this._frame>e},n.prototype._swapTexture=function(){var e=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=e;var e=this._forcePrevTex;this._forcePrevTex=this._forceTex,this._forceTex=e;var e=this._globalSpeedPrevTex;this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=e},n.prototype._initFromSource=function(e){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(e),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(e),e.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),e.gl.clear(e.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),e.gl.clear(e.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(e)},n.prototype._resize=function(e,t){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach(function(r){this[r].width=e,this[r].height=t,this[r].dirty()},this)},n.prototype.dispose=function(e){this._framebuffer.dispose(e),this._copyPass.dispose(e),this._nodeRepulsionPass.dispose(e),this._positionPass.dispose(e),this._globalSpeedPass.dispose(e),this._edgeForceMesh.geometry.dispose(e),this._weightedSumMesh.geometry.dispose(e),this._positionSourceTex.dispose(e),this._positionTex.dispose(e),this._positionPrevTex.dispose(e),this._forceTex.dispose(e),this._forcePrevTex.dispose(e),this._weightedSumTex.dispose(e),this._globalSpeedTex.dispose(e),this._globalSpeedPrevTex.dispose(e)},a.a.ForceAtlas2GPU=n,t.a=n},function(e,t,r){"use strict";t.a="@export ecgl.forceAtlas2.updateNodeRepulsion\n\n#define NODE_COUNT 0\n\nuniform sampler2D positionTex;\n\nuniform vec2 textureSize;\nuniform float gravity;\nuniform float scaling;\nuniform vec2 gravityCenter;\n\nuniform bool strongGravityMode;\nuniform bool preventOverlap;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, v_Texcoord);\n\n vec2 force = vec2(0.0);\n for (int i = 0; i < NODE_COUNT; i++) {\n vec2 uv = vec2(\n mod(float(i), textureSize.x) / (textureSize.x - 1.0),\n floor(float(i) / textureSize.x) / (textureSize.y - 1.0)\n );\n vec4 n1 = texture2D(positionTex, uv);\n\n vec2 dir = n0.xy - n1.xy;\n float d2 = dot(dir, dir);\n\n if (d2 > 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end"},function(e,t,r){"use strict";var n=r(5),i=r(4),a=r(272),o=a.a.toString();o=o.slice(o.indexOf("{")+1,o.lastIndexOf("}"));var s={barnesHutOptimize:!0,barnesHutTheta:1.5,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null},u=function(e){for(var t in s)this[t]=s[t];if(e)for(var t in e)this[t]=e[t];this._nodes=[],this._edges=[],this._disposed=!1,this._positionTex=new n.a({type:i.a.FLOAT,flipY:!1,minFilter:i.a.NEAREST,magFilter:i.a.NEAREST})};u.prototype.initData=function(e,t){var r=new Blob([o]),n=window.URL.createObjectURL(r);this._worker=new Worker(n),this._worker.onmessage=this._$onupdate.bind(this),this._nodes=e,this._edges=t,this._frame=0;for(var i=e.length,a=t.length,s=new Float32Array(2*i),u=new Float32Array(i),l=new Float32Array(i),h=new Float32Array(2*a),c=new Float32Array(a),d=0;d<e.length;d++){var f=e[d];s[2*d]=f.x,s[2*d+1]=f.y,u[d]=null==f.mass?1:f.mass,l[d]=null==f.size?1:f.size}for(var d=0;d<t.length;d++){var p=t[d],m=p.node1,g=p.node2;h[2*d]=m,h[2*d+1]=g,c[d]=null==p.weight?1:p.weight}var _=Math.ceil(Math.sqrt(e.length)),v=_,y=new Float32Array(_*v*4),x=this._positionTex;x.width=_,x.height=v,x.pixels=y,this._worker.postMessage({cmd:"init",nodesPosition:s,nodesMass:u,nodesSize:l,edges:h,edgesWeight:c}),this._globalSpeed=1/0},u.prototype.updateOption=function(e){var t={};for(var r in s)t[r]=s[r];var n=this._nodes,i=this._edges,a=n.length;if(t.jitterTolerence=a>5e4?10:a>5e3?1:.1,t.scaling=a>100?2:10,t.barnesHutOptimize=a>1e3,e)for(var r in s)null!=e[r]&&(t[r]=e[r]);if(!t.gravityCenter){for(var o=[1/0,1/0],u=[-1/0,-1/0],l=0;l<n.length;l++)o[0]=Math.min(n[l].x,o[0]),o[1]=Math.min(n[l].y,o[1]),u[0]=Math.max(n[l].x,u[0]),u[1]=Math.max(n[l].y,u[1]);t.gravityCenter=[.5*(o[0]+u[0]),.5*(o[1]+u[1])]}for(var l=0;l<i.length;l++){var h=i[l].node1,c=i[l].node2;n[h].degree=(n[h].degree||0)+1,n[c].degree=(n[c].degree||0)+1}this._worker&&this._worker.postMessage({cmd:"updateConfig",config:t})},u.prototype.update=function(e,t,r){null==t&&(t=1),t=Math.max(t,1),this._frame+=t,this._onupdate=r,this._worker&&this._worker.postMessage({cmd:"update",steps:Math.round(t)})},u.prototype._$onupdate=function(e){if(!this._disposed){var t=new Float32Array(e.data.buffer);this._globalSpeed=e.data.globalSpeed,this._positionArr=t,this._updateTexture(t),this._onupdate&&this._onupdate()}},u.prototype.getNodePositionTexture=function(){return this._positionTex},u.prototype.getNodeUV=function(e,t){t=t||[];var r=this._positionTex.width,n=this._positionTex.height;return t[0]=e%r/(r-1),t[1]=Math.floor(e/r)/(n-1),t},u.prototype.getNodes=function(){return this._nodes},u.prototype.getEdges=function(){return this._edges},u.prototype.isFinished=function(e){return this._frame>e},u.prototype.getNodePosition=function(e,t){if(t||(t=new Float32Array(2*this._nodes.length)),this._positionArr)for(var r=0;r<this._positionArr.length;r++)t[r]=this._positionArr[r];return t},u.prototype._updateTexture=function(e){for(var t=this._positionTex.pixels,r=0,n=0;n<e.length;)t[r++]=e[n++],t[r++]=e[n++],t[r++]=1,t[r++]=1;this._positionTex.dirty()},u.prototype.dispose=function(e){this._disposed=!0,this._worker=null},t.a=u},function(e,t,r){"use strict";function n(){function e(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}function t(){this.position=new Float32Array(2),this.force=i.create(),this.forcePrev=i.create(),this.mass=1,this.inDegree=0,this.outDegree=0}function r(e,t){this.source=e,this.target=t,this.weight=1}function n(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new e,this.rootRegion.centerOfMass=i.create(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}var i={create:function(){return new Float32Array(2)},dist:function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)},len:function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)},scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e},scale:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e},sub:function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e},normalize:function(e,t){var r=t[0],n=t[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e},negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},set:function(e,t,r){return e[0]=t,e[1]=r,e}},a=e.prototype;a.beforeUpdate=function(){for(var e=0;e<this.nSubRegions;e++)this.subRegions[e].beforeUpdate();this.mass=0,this.centerOfMass&&(this.centerOfMass[0]=0,this.centerOfMass[1]=0),this.nSubRegions=0,this.node=null},a.afterUpdate=function(){this.subRegions.length=this.nSubRegions;for(var e=0;e<this.nSubRegions;e++)this.subRegions[e].afterUpdate()},a.addNode=function(e){if(0===this.nSubRegions){if(null==this.node)return void(this.node=e);this._addNodeToSubRegion(this.node),this.node=null}this._addNodeToSubRegion(e),this._updateCenterOfMass(e)},a.findSubRegion=function(e,t){for(var r=0;r<this.nSubRegions;r++){var n=this.subRegions[r];if(n.contain(e,t))return n}},a.contain=function(e,t){return this.bbox[0]<=e&&this.bbox[2]>=e&&this.bbox[1]<=t&&this.bbox[3]>=t},a.setBBox=function(e,t,r,n){this.bbox[0]=e,this.bbox[1]=t,this.bbox[2]=r,this.bbox[3]=n,this.size=(r-e+n-t)/2},a._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new e,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},a._addNodeToSubRegion=function(e){var t=this.findSubRegion(e.position[0],e.position[1]),r=this.bbox;if(!t){var n=(r[0]+r[2])/2,i=(r[1]+r[3])/2,a=(r[2]-r[0])/2,o=(r[3]-r[1])/2,s=e.position[0]>=n?1:0,u=e.position[1]>=i?1:0,t=this._newSubRegion();t.setBBox(s*a+r[0],u*o+r[1],(s+1)*a+r[0],(u+1)*o+r[1])}t.addNode(e)},a._updateCenterOfMass=function(e){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var t=this.centerOfMass[0]*this.mass,r=this.centerOfMass[1]*this.mass;t+=e.position[0]*e.mass,r+=e.position[1]*e.mass,this.mass+=e.mass,this.centerOfMass[0]=t/this.mass,this.centerOfMass[1]=r/this.mass};var o=n.prototype;o.initNodes=function(e,r,n){var i=r.length;this.nodes.length=0;for(var a=void 0!==n,o=0;o<i;o++){var s=new t;s.position[0]=e[2*o],s.position[1]=e[2*o+1],s.mass=r[o],a&&(s.size=n[o]),this.nodes.push(s)}this._massArr=r,this._swingingArr=new Float32Array(i),a&&(this._sizeArr=n)},o.initEdges=function(e,t){var n=e.length/2;this.edges.length=0;for(var i=0;i<n;i++){var a=e[2*i],o=e[2*i+1],s=this.nodes[a],u=this.nodes[o];if(!s||!u)return void console.error("Node not exists, try initNodes before initEdges");s.outDegree++,u.inDegree++;var l=new r(s,u);t&&(l.weight=t[i]),this.edges.push(l)}},o.updateSettings=function(){if(this.repulsionByDegree)for(var e=0;e<this.nodes.length;e++){var t=this.nodes[e];t.mass=t.inDegree+t.outDegree+1}else for(var e=0;e<this.nodes.length;e++){var t=this.nodes[e];t.mass=this._massArr[e]}},o.update=function(){var e=this.nodes.length;if(this.updateSettings(),this.updateBBox(),this.barnesHutOptimize){this.rootRegion.setBBox(this.bbox[0],this.bbox[1],this.bbox[2],this.bbox[3]),this.rootRegion.beforeUpdate();for(var t=0;t<e;t++)this.rootRegion.addNode(this.nodes[t]);this.rootRegion.afterUpdate()}for(var t=0;t<e;t++){var r=this.nodes[t];i.copy(r.forcePrev,r.force),i.set(r.force,0,0)}for(var t=0;t<e;t++){var n=this.nodes[t];if(this.barnesHutOptimize)this.applyRegionToNodeRepulsion(this.rootRegion,n);else for(var a=t+1;a<e;a++){var o=this.nodes[a];this.applyNodeToNodeRepulsion(n,o,!1)}this.gravity>0&&(this.strongGravityMode?this.applyNodeStrongGravity(n):this.applyNodeGravity(n))}for(var t=0;t<this.edges.length;t++)this.applyEdgeAttraction(this.edges[t]);for(var s=0,u=0,l=i.create(),t=0;t<e;t++){var r=this.nodes[t],h=i.dist(r.force,r.forcePrev);s+=h*r.mass,i.add(l,r.force,r.forcePrev);u+=.5*i.len(l)*r.mass,this._swingingArr[t]=h}var c=this.jitterTolerence*this.jitterTolerence*u/s;this._globalSpeed>0&&(c=Math.min(c/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=c;for(var t=0;t<e;t++){var r=this.nodes[t],h=this._swingingArr[t],d=.1*c/(1+c*Math.sqrt(h)),f=i.len(r.force);f>0&&(d=Math.min(f*d,10)/f,i.scaleAndAdd(r.position,r.position,r.force,d))}},o.applyRegionToNodeRepulsion=function(){var e=i.create();return function(t,r){if(t.node)this.applyNodeToNodeRepulsion(t.node,r,!0);else{i.sub(e,r.position,t.centerOfMass);var n=e[0]*e[0]+e[1]*e[1];if(n>this.barnesHutTheta*t.size*t.size){var a=this.scaling*r.mass*t.mass/n;i.scaleAndAdd(r.force,r.force,e,a)}else for(var o=0;o<t.nSubRegions;o++)this.applyRegionToNodeRepulsion(t.subRegions[o],r)}}}(),o.applyNodeToNodeRepulsion=function(){var e=i.create();return function(t,r,n){if(t!=r){i.sub(e,t.position,r.position);var a=e[0]*e[0]+e[1]*e[1];if(0!==a){var o;if(this.preventOverlap){var s=Math.sqrt(a);if((s=s-t.size-r.size)>0)o=this.scaling*t.mass*r.mass/(s*s);else{if(!(s<0))return;o=100*this.scaling*t.mass*r.mass}}else o=this.scaling*t.mass*r.mass/a;i.scaleAndAdd(t.force,t.force,e,o),i.scaleAndAdd(r.force,r.force,e,-o)}}}}(),o.applyEdgeAttraction=function(){var e=i.create();return function(t){var r=t.source,n=t.target;i.sub(e,r.position,n.position);var a,o=i.len(e);a=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence);var s;this.preventOverlap&&(o=o-r.size-n.size)<=0||(s=this.linLogMode?-a*Math.log(o+1)/(o+1):-a,i.scaleAndAdd(r.force,r.force,e,s),i.scaleAndAdd(n.force,n.force,e,-s))}}(),o.applyNodeGravity=function(){var e=i.create();return function(t){i.sub(e,this.gravityCenter,t.position);var r=i.len(e);i.scaleAndAdd(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),o.applyNodeStrongGravity=function(){var e=i.create();return function(t){i.sub(e,this.gravityCenter,t.position),i.scaleAndAdd(t.force,t.force,e,this.gravity*t.mass)}}(),o.updateBBox=function(){for(var e=1/0,t=1/0,r=-1/0,n=-1/0,i=0;i<this.nodes.length;i++){var a=this.nodes[i].position;e=Math.min(e,a[0]),t=Math.min(t,a[1]),r=Math.max(r,a[0]),n=Math.max(n,a[1])}this.bbox[0]=e,this.bbox[1]=t,this.bbox[2]=r,this.bbox[3]=n},o.getGlobalSpeed=function(){return this._globalSpeed};var s=null;self.onmessage=function(e){switch(e.data.cmd){case"init":s=new n,s.initNodes(e.data.nodesPosition,e.data.nodesMass,e.data.nodesSize),s.initEdges(e.data.edges,e.data.edgesWeight);break;case"updateConfig":if(s)for(var t in e.data.config)s[t]=e.data.config[t];break;case"update":var r=e.data.steps;if(s){for(var i=0;i<r;i++)s.update();for(var a=s.nodes.length,o=new Float32Array(2*a),i=0;i<a;i++){var u=s.nodes[i];o[2*i]=u.position[0],o[2*i+1]=u.position[1]}self.postMessage({buffer:o.buffer,globalSpeed:s.getGlobalSpeed()},[o.buffer])}else{var l=new Float32Array;self.postMessage({buffer:l.buffer,globalSpeed:s.getGlobalSpeed()},[l.buffer])}}}}t.a=n},function(e,t,r){"use strict";var n=r(7),i=(r(2),n.a.extend(function(){return{zr:null,viewGL:null,minZoom:.2,maxZoom:5,_needsUpdate:!1,_dx:0,_dy:0,_zoom:1}},function(){this._mouseDownHandler=this._mouseDownHandler.bind(this),this._mouseWheelHandler=this._mouseWheelHandler.bind(this),this._mouseMoveHandler=this._mouseMoveHandler.bind(this),this._mouseUpHandler=this._mouseUpHandler.bind(this),this._update=this._update.bind(this)},{init:function(){var e=this.zr;e.on("mousedown",this._mouseDownHandler),e.on("mousewheel",this._mouseWheelHandler),e.on("globalout",this._mouseUpHandler),e.animation.on("frame",this._update)},setTarget:function(e){this._target=e},setZoom:function(e){this._zoom=Math.max(Math.min(e,this.maxZoom),this.minZoom),this._needsUpdate=!0},setOffset:function(e){this._dx=e[0],this._dy=e[1],this._needsUpdate=!0},getZoom:function(){return this._zoom},getOffset:function(){return[this._dx,this._dy]},_update:function(){if(this._target&&this._needsUpdate){var e=this._target,t=this._zoom;e.position.x=this._dx,e.position.y=this._dy,e.scale.set(t,t,t),this.zr.refresh(),this._needsUpdate=!1,this.trigger("update")}},_mouseDownHandler:function(e){if(!e.target){var t=e.offsetX,r=e.offsetY;if(!this.viewGL||this.viewGL.containPoint(t,r)){this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler);var n=this._convertPos(t,r);this._x=n.x,this._y=n.y}}},_convertPos:function(e,t){var r=this.viewGL.camera,n=this.viewGL.viewport;return{x:(e-n.x)/n.width*(r.right-r.left)+r.left,y:(t-n.y)/n.height*(r.bottom-r.top)+r.top}},_mouseMoveHandler:function(e){var t=this._convertPos(e.offsetX,e.offsetY);this._dx+=t.x-this._x,this._dy+=t.y-this._y,this._x=t.x,this._y=t.y,this._needsUpdate=!0},_mouseUpHandler:function(e){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_mouseWheelHandler:function(e){e=e.event;var t=e.wheelDelta||-e.detail;if(0!==t){var r=e.offsetX,n=e.offsetY;if(!this.viewGL||this.viewGL.containPoint(r,n)){var i=t>0?1.1:.9,a=Math.max(Math.min(this._zoom*i,this.maxZoom),this.minZoom);i=a/this._zoom;var o=this._convertPos(r,n),s=(o.x-this._dx)*(i-1),u=(o.y-this._dy)*(i-1);this._dx-=s,this._dy-=u,this._zoom=a,this._needsUpdate=!0}}},dispose:function(){var e=this.zr;e.off("mousedown",this._mouseDownHandler),e.off("mousemove",this._mouseMoveHandler),e.off("mouseup",this._mouseUpHandler),e.off("mousewheel",this._mouseWheelHandler),e.off("globalout",this._mouseUpHandler),e.animation.off("frame",this._update)}}));t.a=i},function(e,t,r){"use strict";t.a="@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end"},function(e,t,r){"use strict";var n=r(0);r.n(n),r(276),r(280)},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(2),s=r(22),u=r(277);i.a.extendChartView({type:"flowGL",__ecgl__:!0,init:function(e,t){this.viewGL=new s.a("orthographic"),this.groupGL=new a.a.Node,this.viewGL.add(this.groupGL),this._particleSurface=new u.a;var r=new a.a.Mesh({geometry:new a.a.PlaneGeometry,material:new a.a.Material({shader:new a.a.Shader({vertex:a.a.Shader.source("ecgl.color.vertex"),fragment:a.a.Shader.source("ecgl.color.fragment")}),transparent:!0})});r.material.enableTexture("diffuseMap"),this.groupGL.add(r),this._planeMesh=r},render:function(e,t,r){var n=this._particleSurface;n.setParticleType(e.get("particleType")),n.setSupersampling(e.get("supersampling")),this._updateData(e,r),this._updateCamera(r.getWidth(),r.getHeight(),r.getDevicePixelRatio());var i=o.a.firstNotNull(e.get("particleDensity"),128);n.setParticleDensity(i,i);var s=this._planeMesh,u=+new Date,l=this,h=!0;s.__percent=0,s.stopAnimation(),s.animate("",{loop:!0}).when(1e5,{__percent:1}).during(function(){var e=+new Date,t=Math.min(e-u,20);u+=t,l._renderer&&(n.update(l._renderer,r,t/1e3,h),s.material.set("diffuseMap",n.getSurfaceTexture())),h=!1}).start();var c=e.getModel("itemStyle"),d=a.a.parseColor(c.get("color"));d[3]*=o.a.firstNotNull(c.get("opacity"),1),s.material.set("color",d),n.setColorTextureImage(e.get("colorTexture"),r),n.setParticleSize(e.get("particleSize")),n.particleSpeedScaling=e.get("particleSpeed"),n.motionBlurFactor=1-Math.pow(.1,e.get("particleTrail"))},updateTransform:function(e,t,r){this._updateData(e,r)},afterRender:function(e,t,r,n){var i=n.renderer;this._renderer=i},_updateData:function(e,t){var r=e.coordinateSystem,n=r.dimensions.map(function(t){return e.coordDimToDataDim(t)[0]}),i=e.getData(),a=i.getDataExtent(n[0]),o=i.getDataExtent(n[1]),s=e.get("gridWidth"),u=e.get("gridHeight");if(null==s||"auto"===s){var l=(a[1]-a[0])/(o[1]-o[0]);s=Math.round(Math.sqrt(l*i.count()))}null!=u&&"auto"!==u||(u=Math.ceil(i.count()/s));var h=this._particleSurface.vectorFieldTexture,c=h.pixels;if(c&&c.length===u*s*4)for(var d=0;d<c.length;d++)c[d]=0;else c=h.pixels=new Float32Array(s*u*4);var f=0,p=1/0,m=new Float32Array(2*i.count()),g=0,_=[[1/0,1/0],[-1/0,-1/0]];i.each([n[0],n[1],"vx","vy"],function(e,t,n,i){var a=r.dataToPoint([e,t]);m[g++]=a[0],m[g++]=a[1],_[0][0]=Math.min(a[0],_[0][0]),_[0][1]=Math.min(a[1],_[0][1]),_[1][0]=Math.max(a[0],_[1][0]),_[1][1]=Math.max(a[1],_[1][1]);var o=Math.sqrt(n*n+i*i);f=Math.max(f,o),p=Math.min(p,o)}),i.each(["vx","vy"],function(e,t,r){var n=Math.round((m[2*r]-_[0][0])/(_[1][0]-_[0][0])*(s-1)),i=u-1-Math.round((m[2*r+1]-_[0][1])/(_[1][1]-_[0][1])*(u-1)),a=4*(i*s+n);c[a]=e/f*.5+.5,c[a+1]=t/f*.5+.5,c[a+3]=1}),h.width=s,h.height=u,"bmap"===e.get("coordinateSystem")&&this._fillEmptyPixels(h),h.dirty(),this._updatePlanePosition(_[0],_[1],e,t),this._updateGradientTexture(i.getVisual("visualMeta"),[p,f])},_fillEmptyPixels:function(e){function t(e,t,r){e=Math.max(Math.min(e,i-1),0),t=Math.max(Math.min(t,a-1),0);var o=4*(t*(i-1)+e);return 0!==n[o+3]&&(r[0]=n[o],r[1]=n[o+1],!0)}function r(e,t,r){r[0]=e[0]+t[0],r[1]=e[1]+t[1]}for(var n=e.pixels,i=e.width,a=e.height,o=[],s=[],u=[],l=[],h=[],c=0,d=0;d<a;d++)for(var f=0;f<i;f++){var p=4*(d*(i-1)+f);0===n[p+3]&&(c=o[0]=o[1]=0,t(f-1,d,s)&&(c++,r(s,o,o)),t(f+1,d,u)&&(c++,r(u,o,o)),t(f,d-1,l)&&(c++,r(l,o,o)),t(f,d+1,h)&&(c++,r(h,o,o)),o[0]/=c,o[1]/=c,n[p]=o[0],n[p+1]=o[1]),n[p+3]=1}},_updateGradientTexture:function(e,t){if(!e||!e.length)return void this._particleSurface.setGradientTexture(null);this._gradientTexture=this._gradientTexture||new a.a.Texture2D({image:document.createElement("canvas")});var r=this._gradientTexture,n=r.image;n.width=200,n.height=1;var i=n.getContext("2d"),o=i.createLinearGradient(0,.5,n.width,.5);e[0].stops.forEach(function(e){var r;t[1]===t[0]?r=0:(r=e.value/t[1],r=Math.min(Math.max(r,0),1)),o.addColorStop(r,e.color)}),i.fillStyle=o,i.fillRect(0,0,n.width,n.height),r.dirty(),this._particleSurface.setGradientTexture(this._gradientTexture)},_updatePlanePosition:function(e,t,r,n){var i=this._limitInViewportAndFullFill(e,t,r,n);e=i.leftTop,t=i.rightBottom,this._particleSurface.setRegion(i.region),this._planeMesh.position.set((e[0]+t[0])/2,n.getHeight()-(e[1]+t[1])/2,0);var a=t[0]-e[0],o=t[1]-e[1];this._planeMesh.scale.set(a/2,o/2,1),this._particleSurface.resize(Math.max(Math.min(a,2048),1),Math.max(Math.min(o,2048),1)),this._renderer&&this._particleSurface.clearFrame(this._renderer)},_limitInViewportAndFullFill:function(e,t,r,n){var i=[Math.max(e[0],0),Math.max(e[1],0)],a=[Math.min(t[0],n.getWidth()),Math.min(t[1],n.getHeight())];if("bmap"===r.get("coordinateSystem")){var o=r.getData().getDataExtent(r.coordDimToDataDim("lng")[0]);Math.floor(o[1]-o[0])>=359&&(i[0]>0&&(i[0]=0),a[0]<n.getWidth()&&(a[0]=n.getWidth()))}var s=t[0]-e[0],u=t[1]-e[1],l=a[0]-i[0],h=a[1]-i[1];return{leftTop:i,rightBottom:a,region:[(i[0]-e[0])/s,1-h/u-(i[1]-e[1])/u,l/s,h/u]}},_updateCamera:function(e,t,r){this.viewGL.setViewport(0,0,e,t,r);var n=this.viewGL.camera;n.left=n.bottom=0,n.top=t,n.right=e,n.near=0,n.far=100,n.position.z=10},remove:function(){this._planeMesh.stopAnimation(),this.groupGL.removeAll()},dispose:function(){this._renderer&&this._particleSurface.dispose(this._renderer),this.groupGL.removeAll()}})},function(e,t,r){"use strict";function n(e){var t=document.createElement("canvas");t.width=t.height=e;var r=t.getContext("2d");return r.fillStyle="#fff",r.arc(e/2,e/2,e/2,0,2*Math.PI),r.fill(),t}var i=r(16),a=r(15),o=r(40),s=r(19),u=r(8),l=r(5),h=r(4),c=r(37),d=r(43),f=r(10),p=r(278),m=r(279);u.a.import(m.a);var g=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new l.a({type:h.a.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};g.prototype={constructor:g,init:function(){var e={type:h.a.FLOAT,minFilter:h.a.NEAREST,magFilter:h.a.NEAREST,useMipmap:!1};this._spawnTexture=new l.a(e),this._particleTexture0=new l.a(e),this._particleTexture1=new l.a(e),this._frameBuffer=new f.a({depthBuffer:!1}),this._particlePass=new i.a({fragment:u.a.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new i.a({fragment:u.a.source("clay.compositor.downsample")});var t=new o.a({renderOrder:10,material:new s.a({shader:new u.a(u.a.source("ecgl.vfParticle.renderPoints.vertex"),u.a.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:o.a.POINTS,geometry:new a.a({dynamic:!0,mainAttribute:"texcoord0"})}),r=new o.a({renderOrder:10,material:new s.a({shader:new u.a(u.a.source("ecgl.vfParticle.renderLines.vertex"),u.a.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new p.a,culling:!1}),n=new o.a({material:new s.a({shader:new u.a(u.a.source("ecgl.color.vertex"),u.a.source("ecgl.color.fragment"))}),geometry:new d.a});n.material.enableTexture("diffuseMap"),this._particlePointsMesh=t,this._particleLinesMesh=r,this._lastFrameFullQuadMesh=n,this._camera=new c.a,this._thisFrameTexture=new l.a,this._lastFrameTexture=new l.a},setParticleDensity:function(e,t){for(var r=e*t,n=new Float32Array(4*r),i=0,a=this.particleLife,o=0;o<e;o++)for(var s=0;s<t;s++,i++){n[4*i]=Math.random(),n[4*i+1]=Math.random(),n[4*i+2]=Math.random();var u=(a[1]-a[0])*Math.random()+a[0];n[4*i+3]=u}"line"===this._particleType?this._setLineGeometry(e,t):this._setPointsGeometry(e,t),this._spawnTexture.width=e,this._spawnTexture.height=t,this._spawnTexture.pixels=n,this._particleTexture0.width=this._particleTexture1.width=e,this._particleTexture0.height=this._particleTexture1.height=t,this._particlePass.setUniform("textureSize",[e,t])},_setPointsGeometry:function(e,t){var r=e*t,n=this._particlePointsMesh.geometry,i=n.attributes;i.texcoord0.init(r);for(var a=0,o=0;o<e;o++)for(var s=0;s<t;s++,a++)i.texcoord0.value[2*a]=o/e,i.texcoord0.value[2*a+1]=s/t;n.dirty()},_setLineGeometry:function(e,t){var r=e*t,n=this._getParticleMesh().geometry;n.setLineCount(r),n.resetOffset();for(var i=0;i<e;i++)for(var a=0;a<t;a++)n.addLine([i/e,a/t]);n.dirty()},_getParticleMesh:function(){return"line"===this._particleType?this._particleLinesMesh:this._particlePointsMesh},update:function(e,t,r,n){var i=this._getParticleMesh(),a=this._frameBuffer,o=this._particlePass;n&&this._updateDownsampleTextures(e,t),i.material.set("size",this._particleSize*this._supersampling),i.material.set("color",this.particleColor),o.setUniform("speedScaling",this.particleSpeedScaling),a.attach(this._particleTexture1),o.setUniform("firstFrameTime",n?(this.particleLife[1]+this.particleLife[0])/2:0),o.setUniform("particleTexture",this._particleTexture0),o.setUniform("deltaTime",r),o.setUniform("elapsedTime",this._elapsedTime),o.render(e,a),i.material.set("particleTexture",this._particleTexture1),i.material.set("prevParticleTexture",this._particleTexture0),a.attach(this._thisFrameTexture),a.bind(e),e.gl.clear(e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT);var s=this._lastFrameFullQuadMesh;s.material.set("diffuseMap",this._lastFrameTexture),s.material.set("color",[1,1,1,this.motionBlurFactor]),this._camera.update(!0),e.renderPass([s,i],this._camera),a.unbind(e),this._downsample(e),this._swapTexture(),this._elapsedTime+=r},_downsample:function(e){var t=this._downsampleTextures;if(0!==t.length)for(var r=0,n=this._thisFrameTexture,i=t[r];i;)this._frameBuffer.attach(i),this._downsamplePass.setUniform("texture",n),this._downsamplePass.setUniform("textureSize",[n.width,n.height]),this._downsamplePass.render(e,this._frameBuffer),n=i,i=t[++r]},getSurfaceTexture:function(){var e=this._downsampleTextures;return e.length>0?e[e.length-1]:this._lastFrameTexture},setRegion:function(e){this._particlePass.setUniform("region",e)},resize:function(e,t){this._lastFrameTexture.width=e*this._supersampling,this._lastFrameTexture.height=t*this._supersampling,this._thisFrameTexture.width=e*this._supersampling,this._thisFrameTexture.height=t*this._supersampling,this._width=e,this._height=t},setParticleSize:function(e){var t=this._getParticleMesh();if(e<=2)return t.material.disableTexture("spriteTexture"),void(t.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new l.a),this._spriteTexture.image&&this._spriteTexture.image.width===e||(this._spriteTexture.image=n(e),this._spriteTexture.dirty()),t.material.transparent=!0,t.material.enableTexture("spriteTexture"),t.material.set("spriteTexture",this._spriteTexture),this._particleSize=e},setGradientTexture:function(e){var t=this._getParticleMesh().material;t[e?"enableTexture":"disableTexture"]("gradientTexture"),t.setUniform("gradientTexture",e)},setColorTextureImage:function(e,t){this._getParticleMesh().material.setTextureImage("colorTexture",e,t,{flipY:!0})},setParticleType:function(e){this._particleType=e},clearFrame:function(e){var t=this._frameBuffer;t.attach(this._lastFrameTexture),t.bind(e),e.gl.clear(e.gl.DEPTH_BUFFER_BIT|e.gl.COLOR_BUFFER_BIT),t.unbind(e)},setSupersampling:function(e){this._supersampling=e,this.resize(this._width,this._height)},_updateDownsampleTextures:function(e,t){for(var r=this._downsampleTextures,n=Math.max(Math.floor(Math.log(this._supersampling/t.getDevicePixelRatio())/Math.log(2)),0),i=2,a=this._width*this._supersampling,o=this._height*this._supersampling,s=0;s<n;s++)r[s]=r[s]||new l.a,r[s].width=a/i,r[s].height=o/i,i*=2;for(;s<r.length;s++)r[s].dispose(e);r.length=n},_swapTexture:function(){var e=this._particleTexture0;this._particleTexture0=this._particleTexture1,this._particleTexture1=e;var e=this._thisFrameTexture;this._thisFrameTexture=this._lastFrameTexture,this._lastFrameTexture=e},dispose:function(e){e.disposeFrameBuffer(this._frameBuffer),e.disposeTexture(this.vectorFieldTexture),e.disposeTexture(this._spawnTexture),e.disposeTexture(this._particleTexture0),e.disposeTexture(this._particleTexture1),e.disposeTexture(this._thisFrameTexture),e.disposeTexture(this._lastFrameTexture),e.disposeGeometry(this._particleLinesMesh.geometry),e.disposeGeometry(this._particlePointsMesh.geometry),e.disposeGeometry(this._lastFrameFullQuadMesh.geometry),this._spriteTexture&&e.disposeTexture(this._spriteTexture),this._particlePass.dispose(e),this._downsamplePass.dispose(e),this._downsampleTextures.forEach(function(t){t.dispose(e)})}},t.a=g},function(e,t,r){"use strict";var n=r(15),i=r(0),a=(r.n(i),n.a.extend(function(){return{dynamic:!0,attributes:{position:new n.a.Attribute("position","float",3,"POSITION")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setLineCount:function(e){var t=this.attributes,r=4*e,n=2*e;this.vertexCount!==r&&t.position.init(r),this.triangleCount!==n&&(this.indices=0===n?null:this.vertexCount>65535?new Uint32Array(3*n):new Uint16Array(3*n))},addLine:function(e){var t=this._vertexOffset;this.attributes.position.set(t,[e[0],e[1],1]),this.attributes.position.set(t+1,[e[0],e[1],-1]),this.attributes.position.set(t+2,[e[0],e[1],2]),this.attributes.position.set(t+3,[e[0],e[1],-2]),this.setTriangleIndices(this._faceOffset++,[t,t+1,t+2]),this.setTriangleIndices(this._faceOffset++,[t+1,t+2,t+3]),this._vertexOffset+=4}}));t.a=a},function(e,t,r){"use strict";t.a="@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n"},function(e,t,r){"use strict";var n=r(0),i=r.n(n);i.a.extendSeriesModel({type:"series.flowGL",dependencies:["geo","grid","bmap"],visualColorAccessPath:"itemStyle.color",getInitialData:function(e,t){var r=i.a.getCoordinateSystemDimensions(this.get("coordinateSystem"))||["x","y"];r.push("vx","vy");var n=i.a.helper.completeDimensions(r,this.getSource(),{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),a=new i.a.List(n,this);return a.initData(this.getSource()),a},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,supersampling:1,particleType:"point",particleDensity:128,particleSize:1,particleSpeed:1,particleTrail:2,colorTexture:null,gridWidth:"auto",gridHeight:"auto",itemStyle:{color:"#fff",opacity:.8}}})},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=(r(282),r(283),r(17));i.a.registerVisual(Object(a.a)("linesGL"))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(13),o=(r.n(a),i.a.extendSeriesModel({type:"series.linesGL",dependencies:["grid","geo"],visualColorAccessPath:"lineStyle.color",streamEnabled:!0,init:function(e){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),o.superApply(this,"init",arguments)},mergeOption:function(e){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),o.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Object(a.concatArray)(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Object(a.concatArray)(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e),r=t.option instanceof Array?t.option:t.getShallow("coords");return r},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[2*e],n=this._flatCoordsOffset[2*e+1],i=0;i<n;i++)t[i]=t[i]||[],t[i][0]=this._flatCoords[r+2*i],t[i][1]=this._flatCoords[r+2*i+1];return n}for(var a=this._getCoordsFromItemModel(e),i=0;i<a.length;i++)t[i]=t[i]||[],t[i][0]=a[i][0],t[i][1]=a[i][1];return a.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var r=e.length,n=new Uint32Array(r),i=new Float64Array(r),a=0,o=0,s=0,u=0;u<r;){s++;var l=e[u++];n[o++]=a+t,n[o++]=l;for(var h=0;h<l;h++){var c=e[u++],d=e[u++];i[a++]=c,i[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var r=new i.a.List(["value"],this);return r.hasItemOption=!1,r.initData(e.data,[],function(e,t,n,i){if(e instanceof Array)return NaN;r.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[i]:a:void 0}),r},defaultOption:{coordinateSystem:"geo",zlevel:10,progressive:1e4,progressiveThreshold:5e4,blendMode:"source-over",lineStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}}))},function(e,t,r){"use strict";var n=r(0),i=r.n(n),a=r(1),o=r(22),s=r(105),u=r(103),l=r(2);i.a.extendChartView({type:"linesGL",__ecgl__:!0,init:function(e,t){this.groupGL=new a.a.Node,this.viewGL=new o.a("orthographic"),this.viewGL.add(this.groupGL),this._glViewHelper=new u.a(this.viewGL),this._nativeLinesShader=a.a.createShader("ecgl.lines3D"),this._meshLinesShader=a.a.createShader("ecgl.meshLines3D"),this._linesMeshes=[],this._currentStep=0},render:function(e,t,r){this.groupGL.removeAll(),this._glViewHelper.reset(e,r);var n=this._linesMeshes[0];n||(n=this._linesMeshes[0]=this._createLinesMesh(e)),this._linesMeshes.length=1,this.groupGL.add(n),this._updateLinesMesh(e,n,0,e.getData().count()),this.viewGL.setPostEffect(e.getModel("postEffect"),r)},incrementalPrepareRender:function(e,t,r){this.groupGL.removeAll(),this._glViewHelper.reset(e,r),this._currentStep=0,this.viewGL.setPostEffect(e.getModel("postEffect"),r)},incrementalRender:function(e,t,r,n){var i=this._linesMeshes[this._currentStep];i||(i=this._createLinesMesh(t),this._linesMeshes[this._currentStep]=i),this._updateLinesMesh(t,i,e.start,e.end),this.groupGL.add(i),n.getZr().refresh(),this._currentStep++},updateTransform:function(e,t,r){e.coordinateSystem.getRoamTransform&&this._glViewHelper.updateTransform(e,r)},_createLinesMesh:function(e){return new a.a.Mesh({$ignorePicking:!0,material:new a.a.Material({shader:a.a.createShader("ecgl.lines3D"),transparent:!0,depthMask:!1,depthTest:!1}),geometry:new s.a({segmentScale:10,useNativeLine:!0,dynamic:!1}),mode:a.a.Mesh.LINES,culling:!1})},_updateLinesMesh:function(e,t,r,n){function i(){g[0]=m[0]*T+v[0]*x-(m[1]-v[1])*s,g[1]=m[1]*T+v[1]*x-(v[0]-m[0])*s,_[0]=m[0]*x+v[0]*T-(m[1]-v[1])*s,_[1]=m[1]*x+v[1]*T-(v[0]-m[0])*s}var o=e.getData();t.material.blend="lighter"===e.get("blendMode")?a.a.additiveBlend:null;var s=e.get("lineStyle.curveness")||0,u=e.get("polyline"),h=t.geometry,c=e.coordinateSystem,d=l.a.firstNotNull(e.get("lineStyle.width"),1);d>1?(t.material.shader!==this._meshLinesShader&&t.material.attachShader(this._meshLinesShader),t.mode=a.a.Mesh.TRIANGLES):(t.material.shader!==this._nativeLinesShader&&t.material.attachShader(this._nativeLinesShader),t.mode=a.a.Mesh.LINES),r=r||0,n=n||o.count(),h.resetOffset();var f=0,p=0,m=[],g=[],_=[],v=[],y=[],x=.3,T=.7;if(u||0!==s)for(var b=r;b<n;b++)if(u){var w=e.getLineCoordsCount(b);f+=h.getPolylineVertexCount(w),p+=h.getPolylineTriangleCount(w)}else e.getLineCoords(b,y),this._glViewHelper.dataToPoint(c,y[0],m),this._glViewHelper.dataToPoint(c,y[1],v),i(),f+=h.getCubicCurveVertexCount(m,g,_,v),p+=h.getCubicCurveTriangleCount(m,g,_,v);else{var E=n-r;f+=E*h.getLineVertexCount(),p+=E*h.getLineVertexCount()}h.setVertexCount(f),h.setTriangleCount(p);for(var S=r,A=[],b=r;b<n;b++){a.a.parseColor(o.getItemVisual(S,"color"),A);var M=l.a.firstNotNull(o.getItemVisual(S,"opacity"),1);A[3]*=M;for(var w=e.getLineCoords(b,y),C=0;C<w;C++)this._glViewHelper.dataToPoint(c,y[C],y[C]);u?h.addPolyline(y,A,d,0,w):0!==s?(m=y[0],v=y[1],i(),h.addCubicCurve(m,g,_,v,A,d)):h.addPolyline(y,A,d,0,2),S++}},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})}])});
\ No newline at end of file
diff --git a/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.js b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.js
new file mode 100644
index 0000000..a0665f7
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.js
@@ -0,0 +1,22 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,o=i.slice,c=i.map,d=i.reduce,a={};function f(t,e){"createCanvas"===t&&(g=null),a[t]=e}function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=k(t[n])}}else if(l[i]){if(!$(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,o=t.length;n<o;n++)e[n]=k(t[n])}}}else if(!s[i]&&!$(t)&&!G(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=k(t[r]));return e}function m(t,e,i){if(!z(e)||!z(t))return i?k(e):t;for(var n in e)if(e.hasOwnProperty(n)){var o=t[n],a=e[n];!z(a)||!z(o)||L(a)||L(o)||G(a)||G(o)||B(a)||B(o)||$(a)||$(o)?!i&&n in t||(t[n]=k(e[n])):m(o,a,i)}return t}function p(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=m(i,t[n],e);return i}function P(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function D(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function y(){return a.createCanvas()}var g;function x(){return g=g||y().getContext("2d")}function _(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function w(t,e){var i=t.prototype;function n(){}for(var o in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(o)&&(t.prototype[o]=i[o]);(t.prototype.constructor=t).superClass=e}function b(t,e,i){D(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function N(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function E(t,e,i){if(t&&e)if(t.forEach&&t.forEach===r)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function O(t,e,i){if(t&&e){if(t.map&&t.map===c)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function S(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===d)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function M(t,e,i){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function I(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]}function A(t,e){var i=o.call(arguments,2);return function(){return t.apply(e,i.concat(o.call(arguments)))}}function T(t){var e=o.call(arguments,1);return function(){return t.apply(this,e.concat(o.call(arguments)))}}function L(t){return"[object Array]"===u.call(t)}function C(t){return"function"==typeof t}function R(t){return"[object String]"===u.call(t)}function z(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function B(t){return!!s[u.call(t)]}function V(t){return!!l[u.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function F(t){return t!=t}function W(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function H(t,e){return null!=t?t:e}function Z(t,e,i){return null!=t?t:null!=e?e:i}function U(){return Function.call.apply(o,arguments)}function X(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function Y(t,e){if(!t)throw new Error(e)}function j(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}a.createCanvas=function(){return document.createElement("canvas")};var q="__ec_primitive__";function K(t){t[q]=!0}function $(t){return t[q]}function J(t){var i=L(t);this.data={};var n=this;function e(t,e){i?n.set(t,e):n.set(e,t)}t instanceof J?t.each(e):t&&E(t,e)}function Q(t){return new J(t)}function tt(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function et(){}J.prototype={constructor:J,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=A(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var it=(Object.freeze||Object)({$override:f,clone:k,merge:m,mergeAll:p,extend:P,defaults:D,createCanvas:y,getContext:x,indexOf:_,inherits:w,mixin:b,isArrayLike:N,each:E,map:O,reduce:S,filter:M,find:I,bind:A,curry:T,isArray:L,isFunction:C,isString:R,isObject:z,isBuiltInObject:B,isTypedArray:V,isDom:G,eqNaN:F,retrieve:W,retrieve2:H,retrieve3:Z,slice:U,normalizeCssArray:X,assert:Y,trim:j,setAsPrimitive:K,isPrimitive:$,createHashMap:Q,concatArray:tt,noop:et}),nt="undefined"==typeof Float32Array?Array:Float32Array;function ot(t,e){var i=new nt(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function at(t,e){return t[0]=e[0],t[1]=e[1],t}function rt(t){var e=new nt(2);return e[0]=t[0],e[1]=t[1],e}function st(t,e,i){return t[0]=e,t[1]=i,t}function lt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function ut(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function ht(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ct(t){return Math.sqrt(ft(t))}var dt=ct;function ft(t){return t[0]*t[0]+t[1]*t[1]}var pt=ft;function gt(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function mt(t,e){var i=ct(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var yt=vt;function xt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var _t=xt;function wt(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function bt(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function St(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function Mt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var It=(Object.freeze||Object)({create:ot,copy:at,clone:rt,set:st,add:lt,scaleAndAdd:ut,sub:ht,len:ct,length:dt,lenSquare:ft,lengthSquare:pt,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:gt,normalize:mt,distance:vt,dist:yt,distanceSquare:xt,distSquare:_t,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:wt,applyTransform:bt,min:St,max:Mt});function Tt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function At(t,e){return{target:t,topTarget:e&&e.topTarget}}Tt.prototype={constructor:Tt,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(At(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(At(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;e!==(this._dropTarget=r)&&(s&&r!==s&&this.dispatchToElement(At(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(At(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(At(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(At(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Dt=Array.prototype.slice,Ct=function(t){this._$handlers={},this._$eventProcessor=t};function Lt(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}Ct.prototype={constructor:Ct,one:function(t,e,i,n){return Lt(this,t,e,i,n,!0)},on:function(t,e,i,n){return Lt(this,t,e,i,n,!1)},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){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;3<o&&(n=Dt.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;4<o&&(n=Dt.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var kt=Math.log(2);function Pt(t,e,i,n,o,a){var r=n+"-"+o,s=t.length;if(a.hasOwnProperty(r))return a[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/kt);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&o||(c+=(f%2?-1:1)*t[i][d]*Pt(t,e-1,h,u,o|p,a),f++)}return a[r]=c}function Nt(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},o=Pt(i,8,0,0,0,n);if(0!==o){for(var a=[],r=0;r<8;r++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((r+s)%2?-1:1)*Pt(i,7,0===r?1:0,1<<r,1<<s,n)/o*e[r];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}var Ot="___zrEVENTSAVED",Et=[];function Rt(t,e,i,n,o){if(e.getBoundingClientRect&&v.domSupported&&!zt(e)){var a=e[Ot]||(e[Ot]={}),r=function(t,e,i){for(var n=i?"invTrans":"trans",o=e[n],a=e.srcCoords,r=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),r=r&&a&&d===a[c]&&f===a[1+c],l.push(t[u].offsetLeft,t[u].offsetTop)}return r&&o?o:(e.srcCoords=s,e[n]=i?Nt(l,s):Nt(s,l))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],o=["top","bottom"],a=0;a<4;a++){var r=document.createElement("div"),s=r.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(e,a),a,o);if(r)return r(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,i,n){return i=i||{},n||!v.canvasSupported?Wt(t,e,i):v.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):Wt(t,e,i),i}function Wt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=o-a.top)}if(Rt(Gt,t,n,o))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,i){if(null!=(e=Ht(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Ft(t,o,e,i)}else Ft(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&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,i,n){Bt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}jt.prototype={constructor:jt,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=Ft(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Kt)if(Kt.hasOwnProperty(e)){var i=Kt[e](this._track,t);if(i)return i}}};var Kt={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=qt(n)/qt(o);isFinite(a)||(a=1),e.pinchScale=a;var r=function(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},$t="silent";function Jt(){Xt(this.event)}function Qt(){}Qt.prototype.dispose=function(){};function te(t,e,i,n){Ct.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Qt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Tt.call(this),this.setHandlerProxy(i)}var ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function ie(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||$t}return!1}function ne(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=ne(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"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=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Jt}}(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;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ie(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==$t)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=ne(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4<yt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,r,t)}}),b(te,Ct),b(te,Tt);var oe="undefined"==typeof Float32Array?Array:Float32Array;function ae(){var t=new oe(6);return re(t),t}function re(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function se(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 le(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function ue(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function he(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function ce(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function de(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function fe(t){var e=ae();return se(e,t),e}var pe=(Object.freeze||Object)({create:ae,identity:re,copy:se,mul:le,translate:ue,rotate:he,scale:ce,invert:de,clone:fe}),ge=re;function me(t){return 5e-5<t||t<-5e-5}var ve=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},ye=ve.prototype;ye.transform=null,ye.needLocalTransform=function(){return me(this.rotation)||me(this.position[0])||me(this.position[1])||me(this.scale[0]-1)||me(this.scale[1]-1)};var xe=[];ye.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||ae(),i?this.getLocalTransform(n):ge(n),e&&(i?le(n,t.transform,n):se(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(xe);var a=xe[0]<0?-1:1,r=xe[1]<0?-1:1,s=((xe[0]-a)*o+a)/xe[0]||0,l=((xe[1]-r)*o+r)/xe[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ae(),de(this.invTransform,n)}else n&&ge(n)},ye.getLocalTransform=function(t){return ve.getLocalTransform(this,t)},ye.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)},ye.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var _e=[],we=ae();ye.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;me(e-1)&&(e=Math.sqrt(e)),me(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ye.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(le(_e,t.invTransform,e),e=_e);var i=this.origin;i&&(i[0]||i[1])&&(we[4]=i[0],we[5]=i[1],le(_e,e,we),_e[4]-=i[0],_e[5]-=i[1],e=_e),this.setLocalTransform(e)}},ye.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},ye.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&bt(i,i,n),i},ye.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&bt(i,i,n),i},ve.getLocalTransform=function(t,e){ge(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]),ce(e,e,n),o&&he(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var be={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:(e=!i||i<1?(i=1,.1):.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:(e=!i||i<1?(i=1,.1):.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:(e=!i||i<1?(i=1,.1):.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){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-be.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*be.bounceIn(2*t):.5*be.bounceOut(2*t-1)+.5}};function Se(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}Se.prototype={constructor:Se,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?be[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}};function Me(){this.head=null,this.tail=null,this._len=0}var Ie=Me.prototype;Ie.insert=function(t){var e=new Ae(t);return this.insertEntry(e),e},Ie.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ie.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--},Ie.len=function(){return this._len},Ie.clear=function(){this.head=this.tail=null,this._len=0};function Te(t){this._list=new Me,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Ae=function(t){this.value=t,this.next,this.prev},De=Te.prototype;De.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&&0<a){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ae(e),r.key=t,i.insertEntry(r),n[t]=r}return o},De.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},De.clear=function(){this._list.clear(),this._map={}};var Ce={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 Le(t){return(t=Math.round(t))<0?0:255<t?255:t}function ke(t){return t<0?0:1<t?1:t}function Pe(t){return t.length&&"%"===t.charAt(t.length-1)?Le(parseFloat(t)/100*255):Le(parseInt(t,10))}function Ne(t){return t.length&&"%"===t.charAt(t.length-1)?ke(parseFloat(t)/100):ke(parseFloat(t))}function Oe(t,e,i){return i<0?i+=1:1<i&&(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 Ee(t,e,i){return t+(e-t)*i}function Re(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function ze(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Be=new Te(20),Ve=null;function Ge(t,e){Ve&&ze(Ve,e),Ve=Be.put(t,Ve||e.slice())}function Fe(t,e){if(t){e=e||[];var i=Be.get(t);if(i)return ze(e,i);var n,o=(t+="").replace(/ /g,"").toLowerCase();if(o in Ce)return ze(e,Ce[o]),Ge(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=4095?(Re(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ge(t,e),e):void Re(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Re(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ge(t,e),e):void Re(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Re(e,0,0,0,1);u=Ne(l.pop());case"rgb":return 3!==l.length?void Re(e,0,0,0,1):(Re(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),Ge(t,e),e);case"hsla":return 4!==l.length?void Re(e,0,0,0,1):(l[3]=Ne(l[3]),We(l,e),Ge(t,e),e);case"hsl":return 3!==l.length?void Re(e,0,0,0,1):(We(l,e),Ge(t,e),e);default:return}}Re(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ne(t[1]),o=Ne(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Re(e=e||[],Le(255*Oe(r,a,i+1/3)),Le(255*Oe(r,a,i)),Le(255*Oe(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function He(t,e){var i=Fe(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,255<i[n]?i[n]=255:t[n]<0&&(i[n]=0);return $e(i,4===i.length?"rgba":"rgb")}}function Ze(t){var e=Fe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ue(t,e,i){if(e&&e.length&&0<=t&&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]=Le(Ee(r[0],s[0],l)),i[1]=Le(Ee(r[1],s[1],l)),i[2]=Le(Ee(r[2],s[2],l)),i[3]=ke(Ee(r[3],s[3],l)),i}}var Xe=Ue;function Ye(t,e,i){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Fe(e[o]),s=Fe(e[a]),l=n-o,u=$e([Le(Ee(r[0],s[0],l)),Le(Ee(r[1],s[1],l)),Le(Ee(r[2],s[2],l)),ke(Ee(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}var je=Ye;function qe(t,e,i,n){if(t=Fe(t))return t=function(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)i=e=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),1<e&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:360<t?360:t}(e)),null!=i&&(t[1]=Ne(i)),null!=n&&(t[2]=Ne(n)),$e(We(t),"rgba")}function Ke(t,e){if((t=Fe(t))&&null!=e)return t[3]=ke(e),$e(t,"rgba")}function $e(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+")"}}var Je=(Object.freeze||Object)({parse:Fe,lift:He,toHex:Ze,fastLerp:Ue,fastMapToColor:Xe,lerp:Ye,mapToColor:je,modifyHSL:qe,modifyAlpha:Ke,stringify:$e}),Qe=Array.prototype.slice;function ti(t,e){return t[e]}function ei(t,e,i){t[e]=i}function ii(t,e,i){return(e-t)*i+t}function ni(t,e,i){return.5<i?e:t}function oi(t,e,i,n,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)n[r]=ii(t[r],e[r],i);else{var s=a&&t[0].length;for(r=0;r<a;r++)for(var l=0;l<s;l++)n[r][l]=ii(t[r][l],e[r][l],i)}}function ai(t,e,i){var n=t.length,o=e.length;if(n!==o)if(o<n)t.length=o;else for(var a=n;a<o;a++)t.push(1===i?e[a]:Qe.call(e[a]));var r=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function ri(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;o<n;o++)if(t[o]!==e[o])return!1}else{var a=t[0].length;for(o=0;o<n;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return!1}return!0}function si(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=li(t[h],e[h],i[h],n[h],o,a,r);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=li(t[h][d],e[h][d],i[h][d],n[h][d],o,a,r)}}function li(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 ui(t){if(N(t)){var e=t.length;if(N(t[0])){for(var i=[],n=0;n<e;n++)i.push(Qe.call(t[n]));return i}return Qe.call(t)}return t}function hi(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ci(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=N(n[0].value),d=!1,f=!1,p=c?function(t){var e=t[t.length-1].value;return N(e&&e[0])?2:1}(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var g=[],m=[],v=n[0].value,y=!0,x=0;x<u;x++){g.push(n[x].time/h);var _=n[x].value;if(c&&ri(_,v,p)||!c&&_===v||(y=!1),"string"==typeof(v=_)){var w=Fe(_);w?(_=w,d=!0):f=!0}m.push(_)}if(o||!y){var b=m[u-1];for(x=0;x<u-1;x++)c?ai(m[x],b,p):!isNaN(m[x])||isNaN(b)||f||d||(m[x]=b);c&&ai(r(t._target,a),b,p);var S,M,I,T,A,D=0,C=0;if(d)var L=[0,0,0,0];var k=new Se({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<C){for(i=Math.min(D+1,u-1);0<=i&&!(g[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(g[i]>e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2<i?u-1:i+1],A=m[u-3<i?u-1:i+2],c)si(M,I,T,A,S,S*S,S*S*S,r(t,a),p);else{if(d)o=si(M,I,T,A,S,S*S,S*S*S,L,1),o=hi(L);else{if(f)return ni(I,T,S);o=li(M,I,T,A,S,S*S,S*S*S)}s(t,a,o)}else if(c)oi(m[i],m[i+1],S,r(t,a),p);else{var o;if(d)oi(m[i],m[i+1],S,L,1),o=hi(L);else{if(f)return ni(m[i],m[i+1],S);o=ii(m[i],m[i+1],S)}s(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}function di(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||ti,this._setter=n||ei,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}di.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:ui(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){function i(){--a||o._doneCallback()}var n,o=this,a=0;for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=ci(this,t,i,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var i=0;i<o._onframeList.length;i++)o._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var 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 fi=1;"undefined"!=typeof window&&(fi=Math.max(window.devicePixelRatio||1,1));var pi=fi,gi=function(){};function mi(){this.animators=[]}var vi=gi;function yi(t,e,i,n,o,a,r,s){R(n)?(a=o,o=n,n=0):C(o)?(a=o,o="linear",n=0):C(n)?(a=n,n=0):i=C(i)?(a=i,500):i||500,t.stopAnimation(),function t(e,i,n,o,a,r,s){var l={};var u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=n[h]?z(o[h])&&!N(o[h])?t(e,i?i+"."+h:h,n[h],o[h],a,r,s):(s?(l[h]=n[h],xi(e,i,h,o[h])):l[h]=o[h],u++):null==o[h]||s||xi(e,i,h,o[h]));0<u&&e.animate(i,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(o,r)}function xi(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}mi.prototype={constructor:mi,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 l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(i=s)}else i=o;if(i){var h=o.animators,c=new di(i,e);return c.during(function(t){o.dirty(n)}).done(function(){h.splice(_(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}vi('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){yi(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){yi(this,t,e,i,n,o,a,!0)}};var _i=function(t){ve.call(this,t),Ct.call(this,t),mi.call(this,t),this.id=t.id||n()};_i.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]))[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]=[]))[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(z(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).__zr=e,(t.__clipTarget=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)}},b(_i,mi),b(_i,ve),b(_i,Ct);var wi,bi,Si,Mi,Ii=bt,Ti=Math.min,Ai=Math.max;function Di(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}Di.prototype={constructor:Di,union:function(t){var e=Ti(t.x,this.x),i=Ti(t.y,this.y);this.width=Ai(t.x+t.width,this.x+this.width)-e,this.height=Ai(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(wi=[],bi=[],Si=[],Mi=[],function(t){if(t){wi[0]=Si[0]=this.x,wi[1]=Mi[1]=this.y,bi[0]=Mi[0]=this.x+this.width,bi[1]=Si[1]=this.y+this.height,Ii(wi,wi,t),Ii(bi,bi,t),Ii(Si,Si,t),Ii(Mi,Mi,t),this.x=Ti(wi[0],bi[0],Si[0],Mi[0]),this.y=Ti(wi[1],bi[1],Si[1],Mi[1]);var e=Ai(wi[0],bi[0],Si[0],Mi[0]),i=Ai(wi[1],bi[1],Si[1],Mi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=ae();return ue(n,n,[-this.x,-this.y]),ce(n,n,[e,i]),ue(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Di||(t=Di.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 Di(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}}},Di.create=function(t){return new Di(t.x,t.y,t.width,t.height)};var Ci=function(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ci.prototype={constructor:Ci,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);0<=n&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ci&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=_(n,t);return o<0||(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ci&&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 Ci&&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 Ci&&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 Ci&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Di(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}},w(Ci,_i);var Li=32,ki=7;function Pi(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++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&0<=n(t[o],t[o-1]);)o++;return o-e}function Ni(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=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function Oi(t,e,i,n,o,a){var r=0,s=0,l=1;if(0<a(t,e[i+o])){for(s=n-o;l<s&&0<a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[i+h])?r=h+1:l=h}return l}function Ei(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;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&0<=a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(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 Ri(p,g){var r,s,m=ki,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=Ei(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Oi(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;o<e;o++)v[o]=p[t+o];var a=0,r=i,s=t;if(p[s++]=p[r++],0==--n){for(o=0;o<e;o++)p[s+o]=v[a+o];return}if(1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];return p[s+n]=v[a]}var l,u,h,c=m;for(;;){u=l=0,h=!1;do{if(g(p[r],v[a])<0){if(p[s++]=p[r++],u++,(l=0)==--n){h=!0;break}}else if(p[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Ei(p[r],v,a,e,0,g))){for(o=0;o<l;o++)p[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(p[s++]=p[r++],0==--n){h=!0;break}if(0!==(u=Oi(v[a],p,r,n,0,g))){for(o=0;o<u;o++)p[s+o]=p[r+o];if(s+=u,r+=u,0===(n-=u)){h=!0;break}}if(p[s++]=v[a++],1==--e){h=!0;break}c--}while(ki<=l||ki<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];p[s+n]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)p[s+o]=v[a+o]}}(e,i,n,o):function(t,e,i,n){var o=0;for(o=0;o<n;o++)v[o]=p[i+o];var a=t+e-1,r=n-1,s=i+n-1,l=0,u=0;if(p[s--]=p[a--],0==--e){for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o];return}if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];return p[s]=v[r]}var h=m;for(;;){var c=0,d=0,f=!1;do{if(g(v[r],p[a])<0){if(p[s--]=p[a--],c++,(d=0)==--e){f=!0;break}}else if(p[s--]=v[r--],d++,c=0,1==--n){f=!0;break}}while((c|d)<h);if(f)break;do{if(0!==(c=e-Ei(v[r],p,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,o=c-1;0<=o;o--)p[u+o]=p[l+o];if(0===e){f=!0;break}}if(p[s--]=v[r--],1==--n){f=!0;break}if(0!==(d=n-Oi(p[a],v,0,n,n-1,g))){for(n-=d,u=(s-=d)+1,l=(r-=d)+1,o=0;o<d;o++)p[u+o]=v[l+o];if(n<=1){f=!0;break}}if(p[s--]=p[a--],0==--e){f=!0;break}h--}while(ki<=c||ki<=d);if(f)break;h<0&&(h=0),h+=2}(m=h)<1&&(m=1);if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];p[s]=v[r]}else{if(0===n)throw new Error;for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o]}}(e,i,n,o))}r=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){r[l]=t,s[l]=e,l+=1}}function zi(t,e,i,n){i=i||0;var o=(n=n||t.length)-i;if(!(o<2)){var a=0;if(o<Li)Ni(t,i,n,i+(a=Pi(t,i,n,e)),e);else{var r=new Ri(t,e),s=function(t){for(var e=0;Li<=t;)e|=1&t,t>>=1;return t+e}(o);do{if((a=Pi(t,i,n,e))<s){var l=o;s<l&&(l=s),Ni(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 Bi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Vi(){this._roots=[],this._displayList=[],this._displayListLen=0}Vi.prototype={constructor:Vi,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,v.canvasSupported&&zi(i,Bi)},_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),o=(a=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 Ci&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof Ci&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var o=_(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof Ci&&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:Bi};var Gi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Fi=function(t,e,i){return Gi.hasOwnProperty(e)?i*t.dpr:i},Wi={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Hi=9,Zi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ui=function(t){this.extendFrom(t,!1)};function Xi(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 Yi(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)}Ui.prototype={constructor:Ui,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,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){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==Wi.STYLE_BIND;t.__attrCachedBy=Wi.STYLE_BIND;for(var r=0;r<Zi.length;r++){var s=Zi[r],l=s[0];!a&&n[l]===o[l]||(t[l]=Fi(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&&0<this.lineWidth},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?Yi:Xi)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var ji=Ui.prototype,qi=0;qi<Zi.length;qi++){var Ki=Zi[qi];Ki[0]in ji||(ji[Ki[0]]=Ki[1])}Ui.getGradient=ji.getGradient;function $i(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Ji(){return!1}function Qi(t,e,i){var n=y(),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 tn(t,e,i){var n;i=i||pi,"string"==typeof t?n=Qi(t,e,i):z(t)&&(t=(n=t).id),this.id=t;var o=(this.dom=n).style;o&&(n.onselectstart=Ji,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}tn.prototype={constructor:tn,__dirty:!0,__used:!($i.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__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=Qi("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,n=this.dom,o=this.ctx,a=n.width,r=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/u,r/u)),o.clearRect(0,0,a,r),e&&"transparent"!==e&&(e.colorStops?(i=e.__canvasGradient||Ui.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=i):e.image&&(i=$i.prototype.getCanvasPattern.call(e,o)),o.save(),o.fillStyle=i||e,o.fillRect(0,0,a,r),o.restore());if(s){var h=this.domBack;o.save(),o.globalAlpha=l,o.drawImage(h,0,0,a,r),o.restore()}}};var en="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},nn=new Te(50);function on(t){if("string"!=typeof t)return t;var e=nn.get(t);return e&&e.image}function an(t,e,i,n,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=nn.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?sn(e=a.image)||a.pending.push(r):((e=new Image).onload=e.onerror=rn,nn.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function rn(){var t=this.__cachedImgObj;this.onload=this.onerror=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 sn(t){return t&&t.width&&t.height}var ln={},un=0,hn=5e3,cn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,dn="12px sans-serif",fn={};function pn(t,e){var i=t+":"+(e=e||dn);if(ln[i])return ln[i];for(var n,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((n=a[s],o=e,fn.measureText(n,o)).width,r);return hn<un&&(un=0,ln={}),un++,ln[i]=r}function gn(t,e,i,n,o,a,r,s){return r?function(t,e,i,n,o,a,r,s){var l=In(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=mn(0,u,i),d=vn(0,h,n);return new Di(c,d,u,h)}(t,e,i,n,o,a,r,s):function(t,e,i,n,o,a,r){var s=Mn(t,e,o,a,r),l=pn(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=mn(0,l,i),c=vn(0,u,n),d=new Di(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,o,a,s)}function mn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function vn(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function yn(t,e,i){var n=e.textPosition,o=e.textDistance,a=i.x,r=i.y;o=o||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=o,r+=u,h="right",c="middle";break;case"right":a+=o+l,r+=u,c="middle";break;case"top":a+=l/2,r-=o,h="center",c="bottom";break;case"bottom":a+=l/2,r+=s+o,h="center";break;case"inside":a+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":a+=o,r+=u,c="middle";break;case"insideRight":a+=l-o,r+=u,h="right",c="middle";break;case"insideTop":a+=l/2,r+=o,h="center";break;case"insideBottom":a+=l/2,r+=s-o,h="center",c="bottom";break;case"insideTopLeft":a+=o,r+=o;break;case"insideTopRight":a+=l-o,r+=o,h="right";break;case"insideBottomLeft":a+=o,r+=s-o,c="bottom";break;case"insideBottomRight":a+=l-o,r+=s-o,h="right",c="bottom"}return(t=t||{}).x=a,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function xn(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=_n(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=wn(a[r],o);return a.join("\n")}function _n(t,e,i,n){(n=P({},n)).font=e;i=H(i,"...");n.maxIterations=H(n.maxIterations,2);var o=n.minChar=H(n.minChar,0);n.cnCharWidth=pn("閸ワ拷",e);var a=n.ascCharWidth=pn("a",e);n.placeholder=H(n.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=pn(i,e);return r<l&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function wn(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=pn(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?bn(t,o,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*o/a):0;a=pn(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function bn(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 Sn(t){return pn("閸ワ拷",t)}function Mn(t,e,i,n,o){null!=t&&(t+="");var a=H(n,Sn(e)),r=t?t.split("\n"):[],s=r.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&o){u=!1;var h=o.outerHeight,c=o.outerWidth;if(null!=h&&h<l)t="",r=[];else if(null!=c)for(var d=_n(c-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),f=0,p=r.length;f<p;f++)r[f]=wn(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function In(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=cn.lastIndex=0;null!=(n=cn.exec(t));){var a=n.index;o<a&&Tn(i,t.substring(o,a)),Tn(i,n[2],n[1]),o=cn.lastIndex}o<t.length&&Tn(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(var p=0;p<r.length;p++){for(var g=r[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(C=g.tokens[y]).styleName&&e.rich[C.styleName]||{},_=C.textPadding=x.textPadding,w=C.font=x.font||e.font,b=C.textHeight=H(x.textHeight,Sn(w));if(_&&(b+=_[0]+_[2]),C.height=b,C.lineHeight=Z(x.textLineHeight,e.textLineHeight,b),C.textAlign=x&&x.textAlign||e.textAlign,C.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=pn(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&sn(T=on(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=xn(C.text,D-A,w,c.ellipsis,{minChar:c.minChar}),C.textWidth=pn(C.text,w),S=C.textWidth+A))}v+=C.width=S,x&&(m=Math.max(m,C.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}i.outerWidth=i.width=H(e.textWidth,l),i.outerHeight=i.height=H(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var C,L=(C=u[p]).percentWidth;C.width=parseInt(L,10)/100*l}return i}function Tn(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 An(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&j(e)||t.textFont||t.font}function Dn(t,e){var i,n,o,a,r,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?i=n=o=a=c:c instanceof Array?1===c.length?i=n=o=a=c[0]:2===c.length?(i=o=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],o=c[2]):(i=c[0],n=c[1],o=c[2],a=c[3]):i=n=o=a=0,u<i+n&&(i*=u/(r=i+n),n*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<n+o&&(n*=h/(r=n+o),o*=h/r),h<i+a&&(i*=h/(r=i+a),a*=h/r),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}fn.measureText=function(t,e){var i=x();return i.font=e||dn,i.measureText(t)};var Cn=dn,Ln={left:1,right:1,center:1},kn={top:1,bottom:1,middle:1},Pn=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Nn={},On={};function En(t){return Rn(t),E(t.rich,Rn),t}function Rn(t){if(t){t.font=An(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Ln[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||kn[i]?i:"top",t.textPadding&&(t.textPadding=X(t.textPadding))}}function zn(t,e,i,n,o,a){n.rich?function(t,e,i,n,o,a){a!==Hi&&(e.__attrCachedBy=Wi.NONE);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=In(i,n));!function(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=Hn(On,t,n,o),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;Bn(e,n,o,h,c);var p=mn(h,r,d),g=vn(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;Gn(n)&&Fn(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,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)Vn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;0<=C&&"right"===(_=b[C]).textAlign;)Vn(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)_=b[T],Vn(t,e,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(t,e,r,n,o)}(t,e,i,n,o,a):function(t,e,i,n,o,a){var r,s=Gn(n),l=!1,u=e.__attrCachedBy===Wi.PLAIN_TEXT;a!==Hi?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?Wi.NONE:Wi.PLAIN_TEXT):u&&(e.__attrCachedBy=Wi.NONE);var h=n.font||Cn;l&&h===(r.font||Cn)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Mn(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=Hn(On,t,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;Bn(e,n,o,x,_);var S=vn(_,g,b),M=x,I=S;if(s||d){var T=pn(i,c);d&&(T+=d[1]+d[3]);var A=mn(x,T,w);s&&Fn(t,e,n,A,S,T,g),d&&(M=jn(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var D=0;D<Pn.length;D++){var C=Pn[D],L=C[0],k=C[1],P=n[L];l&&P===r[L]||(e[k]=Fi(e,k,P||C[2]))}I+=v/2;var N=n.textStrokeWidth,O=l?r.textStrokeWidth:null,E=!l||N!==O,R=!l||E||n.textStroke!==r.textStroke,z=Un(n.textStroke,N),B=Xn(n.textFill);z&&(E&&(e.lineWidth=N),R&&(e.strokeStyle=z));B&&(l&&n.textFill===r.textFill||(e.fillStyle=B));if(1===m.length)z&&e.strokeText(m[0],M,I),B&&e.fillText(m[0],M,I);else for(D=0;D<m.length;D++)z&&e.strokeText(m[D],M,I),B&&e.fillText(m[D],M,I),I+=v}(t,e,i,n,o,a)}function Bn(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 Vn(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&Gn(l)&&Fn(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=jn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),Zn(e,"shadowBlur",Z(l.textShadowBlur,n.textShadowBlur,0)),Zn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Zn(e,"shadowOffsetX",Z(l.textShadowOffsetX,n.textShadowOffsetX,0)),Zn(e,"shadowOffsetY",Z(l.textShadowOffsetY,n.textShadowOffsetY,0)),Zn(e,"textAlign",s),Zn(e,"textBaseline","middle"),Zn(e,"font",i.font||Cn);var d=Un(l.textStroke||n.textStroke,p),f=Xn(l.textFill||n.textFill),p=H(l.textStrokeWidth,n.textStrokeWidth);d&&(Zn(e,"lineWidth",p),Zn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(Zn(e,"fillStyle",f),e.fillText(i.text,r,h))}function Gn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Fn(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=R(s);if(Zn(e,"shadowBlur",i.textBoxShadowBlur||0),Zn(e,"shadowColor",i.textBoxShadowColor||"transparent"),Zn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Zn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?Dn(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(Zn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(z(s)){var f=s.image;(f=an(f,null,t,Wn,s))&&sn(f)&&e.drawImage(f,n,o,a,r)}if(l&&u)if(Zn(e,"lineWidth",l),Zn(e,"strokeStyle",u),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function Wn(t,e){e.image=t}function Hn(t,e,i,n){var o=i.x||0,a=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)o=n.x+Yn(l[0],n.width),a=n.y+Yn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Nn,i,n):yn(Nn,i,n);o=u.x,a=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(o+=h[0],a+=h[1])}return(t=t||{}).baseX=o,t.baseY=a,t.textAlign=r,t.textVerticalAlign=s,t}function Zn(t,e,i){return t[e]=Fi(t,e,i),t[e]}function Un(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Xn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Yn(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function jn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function qn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Kn(){}var $n=new Di;function Jn(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Ui(t.style,this),this._rect=null,this.__clipPaths=null}function Qn(t){Jn.call(this,t)}Jn.prototype={constructor:Jn,type:"displayable",__dirty:!0,invisible:!(Kn.prototype={constructor:Kn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&En(i);var n=i.text;if(null!=n&&(n+=""),qn(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&($n.copy(e),$n.applyTransform(o),e=$n),zn(this,t,n,i,e,Hi),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio: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=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?_i.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 Ui(t,this),this.dirty(!1),this},calculateTextPosition:null},w(Jn,_i),b(Jn,Kn),Qn.prototype={constructor:Qn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=an(n,this._image,this,this.onload);if(o&&sn(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 Di(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},w(Qn,Jn);var to=314159;function eo(t){return parseInt(t,10)}var io=new Di(0,0,0,0),no=new Di(0,0,0,0);function oo(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=P({},i||{}),this.dpr=i.devicePixelRatio||pi,this._singleCanvas=n;var o=(this.root=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 a=this._zlevelList=[],r=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new tn(t,this,this.dpr);u.__builtin__=!0,u.initContext(),(r[to]=u).zlevel=to,a.push(to),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]}oo.prototype={constructor:oo,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,z:t.z,z2:t.z2,silent:t.silent});return(i.__from=t).__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=_(i,e);0<=n&&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){zi(t,this.storage.displayableSortFunc);var n={};(i=i||(this._hoverlayer=this.getLayer(1e5))).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;en(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var e=this.getLayer(to).ctx,i=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,i,n),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,i,n)})},_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,l=(s=i[r]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(15<Date.now()-d)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return v.wxa&&E(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||!function(t,e,i){return io.copy(t.getBoundingRect()),t.transform&&io.applyTransform(t.transform),no.width=e,no.height=i,!io.intersect(no)}(t,this._width,this._height))){var r=t.__clipPaths,s=n.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(r,s)||(s&&(o.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(r,o),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),(n.prevEl=t).afterBrush&&t.afterBrush(o)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=to);var i=this._layers[t];return i||((i=new tn("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?m(i,this._layerConfig[t],!0):this._layerConfig[t-.01]&&m(i,this._layerConfig[t-.01],!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])vi("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(0<o&&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).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 vi("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){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){if((r=t[i]).zlevel!==t[i-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var n,o=null,a=0;for(i=0;i<t.length;i++){var r,s,l=(r=t[i]).zlevel;n!==l&&(n=l,a=0),r.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(0<a?.01:0),this._needsManuallyCompositing),s.__builtin__||vi("ZLevel "+l+" has been used by unkown layer "+s.id),s!==o&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.incremental?s.__drawIndex=-1:s.__drawIndex=i,e(i),o=s),r.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},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]?m(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===t||o===t+.01)m(this._layers[o],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(_(i,t),1))},resize:function(e,i){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=i&&(n.height=i),e=this._getSize(0),i=this._getSize(1),t.style.display="",this._width!==e||i!==this._height){for(var o in t.style.width=e+"px",t.style.height=i+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,i);E(this._progressiveLayers,function(t){t.resize(e,i)}),this.refresh(!0)}this._width=e,this._height=i}else{if(null==e||null==i)return;this._width=e,this._height=i,this.getLayer(to).resize(e,i)}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[to].dom;var e=new tn("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]||eo(s[i])||eo(r.style[i]))-(eo(s[o])||0)-(eo(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,r-s),c=Math.max(u/2,s+r),d=Math.max(u/2,r-l),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 Qn({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}};function ao(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,Ct.call(this)}ao.prototype={constructor:ao,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=_(this._clips,t);0<=e&&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(){var e=this;this._running=!0,en(function t(){e._running&&(en(t),e._paused||e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new di(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},b(ao,Ct);var ro,so,lo=v.domSupported,uo=(so={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:ro=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(ro,function(t){var e=t.replace("mouse","pointer");return so.hasOwnProperty(e)?e:t})}),ho={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function co(t){return"mousewheel"===t&&v.browser.firefox?"DOMMouseScroll":t}function fo(t){var e=t.pointerType;return"pen"===e||"touch"===e}function po(t){t&&(t.zrByTouch=!0)}function go(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function mo(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var vo=mo.prototype;vo.stopPropagation=vo.stopImmediatePropagation=vo.preventDefault=et;var yo={mousedown:function(t){t=Zt(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Zt(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Mo(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Zt(this.dom,t),Mo(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Zt(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=go(this,e),this.trigger("mouseout",t)},touchstart:function(t){po(t=Zt(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),yo.mousemove.call(this,t),yo.mousedown.call(this,t)},touchmove:function(t){po(t=Zt(this.dom,t)),this.handler.processGesture(t,"change"),yo.mousemove.call(this,t)},touchend:function(t){po(t=Zt(this.dom,t)),this.handler.processGesture(t,"end"),yo.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&yo.click.call(this,t)},pointerdown:function(t){yo.mousedown.call(this,t)},pointermove:function(t){fo(t)||yo.mousemove.call(this,t)},pointerup:function(t){yo.mouseup.call(this,t)},pointerout:function(t){fo(t)||yo.mouseout.call(this,t)}};E(["click","mousewheel","dblclick","contextmenu"],function(e){yo[e]=function(t){t=Zt(this.dom,t),this.trigger(e,t)}});var xo={pointermove:function(t){fo(t)||xo.mousemove.call(this,t)},pointerup:function(t){xo.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Mo(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function _o(i,n){var o=n.domHandlers;v.pointerEventsSupported?E(uo.pointer,function(e){bo(n,e,function(t){o[e].call(i,t)})}):(v.touchEventsSupported&&E(uo.touch,function(e){bo(n,e,function(t){o[e].call(i,t),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)}(n)})}),E(uo.mouse,function(e){bo(n,e,function(t){t=Ht(t),n.touching||o[e].call(i,t)})}))}function wo(i,n){function t(e){bo(n,e,function(t){t=Ht(t),go(i,t.target)||(t=function(t,e){return Zt(t.dom,new mo(t,e),!0)}(i,t),n.domHandlers[e].call(i,t))},{capture:!0})}v.pointerEventsSupported?E(ho.pointer,t):v.touchEventsSupported||E(ho.mouse,t)}function bo(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Ut(t.domTarget,co(e),i,n)}function So(t){var e,i,n,o,a=t.mounted;for(var r in a)a.hasOwnProperty(r)&&(e=t.domTarget,i=co(r),n=a[r],o=t.listenerOpts[r],Bt?e.removeEventListener(i,n,o):e.detachEvent("on"+i,n));t.mounted={}}function Mo(t,e){if(t._mayPointerCapture=null,lo&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?wo(t,i):So(i)}}function Io(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function To(t,e){Ct.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Io(t,yo),lo&&(this._globalHandlerScope=new Io(document,xo)),this._pointerCapturing=!1,this._mayPointerCapture=null,_o(this,this._localHandlerScope)}var Ao=To.prototype;Ao.dispose=function(){So(this._localHandlerScope),lo&&So(this._globalHandlerScope)},Ao.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},b(To,Ct);var Do=!v.canvasSupported,Co={canvas:oo},Lo={};function ko(t,e){var i=new No(n(),t,e);return Lo[i.id]=i}function Po(t,e){Co[t]=e}var No=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,o=new Vi,a=i.renderer;if(Do){if(!Co.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Co[a]||(a="canvas");var r=new Co[a](e,o,i,t);this.storage=o,this.painter=r;var s=v.node||v.worker?null:new To(r.getViewportRoot(),r.root);this.handler=new te(o,r,s,r.root),this.animation=new ao({stage:{update:A(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)}};No.prototype={constructor:No,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=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!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){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},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,function(t){delete Lo[t]}(this.id)}};var Oo=(Object.freeze||Object)({version:"4.3.1",init:ko,dispose:function(t){if(t)t.dispose();else{for(var e in Lo)Lo.hasOwnProperty(e)&&Lo[e].dispose();Lo={}}return this},getInstance:function(t){return Lo[t]},registerPainter:Po}),Eo=E,Ro=z,zo=L,Bo="series\0";function Vo(t){return t instanceof Array?t:null==t?[]:[t]}function Go(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])}}}var Fo=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Wo(t){return!Ro(t)||zo(t)||t instanceof Date?t:t.value}function Ho(t,o){o=(o||[]).slice();var a=O(t||[],function(t,e){return{exist:t}});return Eo(o,function(t,e){if(Ro(t)){for(var i=0;i<a.length;i++)if(!a[i].option&&null!=t.id&&a[i].exist.id===t.id+"")return a[i].option=t,void(o[e]=null);for(i=0;i<a.length;i++){var n=a[i].exist;if(!(a[i].option||null!=n.id&&null!=t.id||null==t.name||Xo(t)||Xo(n)||n.name!==t.name+""))return a[i].option=t,void(o[e]=null)}}}),Eo(o,function(t,e){if(Ro(t)){for(var i=0;i<a.length;i++){var n=a[i].exist;if(!a[i].option&&!Xo(n)&&null==t.id){a[i].option=t;break}}i>=a.length&&a.push({option:t})}}),a}function Zo(t){var r=Q();Eo(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),Eo(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),Eo(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(Ro(n)){if(o.name=null!=n.name?n.name+"":i?i.name:Bo+e,i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Uo(t){var e=t.name;return!(!e||!e.indexOf(Bo))}function Xo(t){return Ro(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Yo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?L(t.dataIndex)?O(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?L(t.name)?O(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function jo(){var e="__\0ec_inner_"+qo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var qo=0;function Ko(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||$o(l,e+"Index")||$o(l,e+"Id")||$o(l,e+"Name")||(l[e+"Index"]=0);var h={};return Eo(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],o=(i[2]||"").toLowerCase();if(!(!n||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function $o(t,e){return t&&t.hasOwnProperty(e)}function Jo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Qo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function ta(t,i){var n=Q(),o=[];return E(t,function(t){var e=i(t);(n.get(e)||(o.push(e),n.set(e,[]))).push(t)}),{keys:o,buckets:n}}var ea=".",ia="___EC__COMPONENT__CONTAINER___";function na(t){var e={main:"",sub:""};return t&&(t=t.split(ea),e.main=t[0]||"",e.sub=t[1]||""),e}function oa(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return P(e.prototype,t),e.extend=this.extend,e.superCall=sa,e.superApply=la,w(e,this),e.superClass=i,e}}var aa=0;function ra(t){var e=["__\0is_clz",aa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function sa(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function la(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ua(i,t){t=t||{};var o={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=na(e)).sub){if(e.sub!==ia){(function(t){var e=o[t.main];e&&e[ia]||((e=o[t.main]={})[ia]=!0);return e})(e)[e.sub]=t}}else o[e.main]=t;return t},i.getClass=function(t,e,i){var n=o[t];if(n&&n[ia]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=na(t);var i=[],e=o[t.main];return e&&e[ia]?E(e,function(t,e){e!==ia&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=na(t),!!o[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(o,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=na(t);var e=o[t.main];return e&&e[ia]},i.parseClassType=na,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function ha(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,i){for(var n={},o=0;o<s.length;o++){var a=s[o][1];if(!(e&&0<=_(e,a)||i&&_(i,a)<0)){var r=t.getShallow(a);null!=r&&(n[s[o][0]]=r)}}return n}}var ca=ha([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),da={getLineStyle:function(t){var e=ca(this,t);return e.lineDash=this.getLineDash(e.lineWidth),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&&("dashed"===e?[n,n]:[i,i])}},fa=ha([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),pa={getAreaStyle:function(t,e){return fa(this,t,e)}},ga=Math.pow,ma=Math.sqrt,va=1e-8,ya=1e-4,xa=ma(3),_a=1/3,wa=ot(),ba=ot(),Sa=ot();function Ma(t){return-va<t&&t<va}function Ia(t){return va<t||t<-va}function Ta(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 Aa(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function Da(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(Ma(r)){if(Ia(a))0<=(h=-s/a)&&h<=1&&(o[l++]=h)}else{var u=a*a-4*r*s;if(Ma(u))o[0]=-a/(2*r);else if(0<u){var h,c=ma(u),d=(-a-c)/(2*r);0<=(h=(-a+c)/(2*r))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}function Ca(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 La(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function ka(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Pa(t,e,i){var n=t+i-2*e;return 0==n?.5:(t-e)/n}function Na(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}var Oa=Math.min,Ea=Math.max,Ra=Math.sin,za=Math.cos,Ba=2*Math.PI,Va=ot(),Ga=ot(),Fa=ot();function Wa(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=Oa(a,o[0]),r=Ea(r,o[0]),s=Oa(s,o[1]),l=Ea(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function Ha(t,e,i,n,o,a){o[0]=Oa(t,i),o[1]=Oa(e,n),a[0]=Ea(t,i),a[1]=Ea(e,n)}var Za=[],Ua=[];function Xa(t,e,i,n,o,a,r,s,l,u){var h,c=Da,d=Ta,f=c(t,i,o,r,Za);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,Za[h]);l[0]=Oa(p,l[0]),u[0]=Ea(p,u[0])}for(f=c(e,n,a,s,Ua),h=0;h<f;h++){var g=d(e,n,a,s,Ua[h]);l[1]=Oa(g,l[1]),u[1]=Ea(g,u[1])}l[0]=Oa(t,l[0]),u[0]=Ea(t,u[0]),l[0]=Oa(r,l[0]),u[0]=Ea(r,u[0]),l[1]=Oa(e,l[1]),u[1]=Ea(e,u[1]),l[1]=Oa(s,l[1]),u[1]=Ea(s,u[1])}function Ya(t,e,i,n,o,a,r,s,l){var u=St,h=Mt,c=Math.abs(o-a);if(c%Ba<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Va[0]=za(o)*i+t,Va[1]=Ra(o)*n+e,Ga[0]=za(a)*i+t,Ga[1]=Ra(a)*n+e,u(s,Va,Ga),h(l,Va,Ga),(o%=Ba)<0&&(o+=Ba),(a%=Ba)<0&&(a+=Ba),a<o&&!r?a+=Ba:o<a&&r&&(o+=Ba),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)o<f&&(Fa[0]=za(f)*i+t,Fa[1]=Ra(f)*n+e,u(s,Fa,s),h(l,Fa,l))}var ja={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},qa=[],Ka=[],$a=[],Ja=[],Qa=Math.min,tr=Math.max,er=Math.cos,ir=Math.sin,nr=Math.sqrt,or=Math.abs,ar="undefined"!=typeof Float32Array,rr=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function sr(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0;if(e+s<r&&n+s<r||r<e-s&&r<n-s||t+s<a&&i+s<a||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var u=(l=(e-n)/(t-i))*a-r+(t*n-i*e)/(t-i);return u*u/(l*l+1)<=s/2*s/2}function lr(t,e,i,n,o,a,r,s,l,u,h){if(0===l)return!1;var c=l;return!(e+c<h&&n+c<h&&a+c<h&&s+c<h||h<e-c&&h<n-c&&h<a-c&&h<s-c||t+c<u&&i+c<u&&o+c<u&&r+c<u||u<t-c&&u<i-c&&u<o-c&&u<r-c)&&function(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;wa[0]=l,wa[1]=u;for(var y=0;y<1;y+=.05)ba[0]=Ta(t,i,o,r,y),ba[1]=Ta(e,n,a,s,y),(p=_t(wa,ba))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<ya);x++)d=c-m,f=c+m,ba[0]=Ta(t,i,o,r,d),ba[1]=Ta(e,n,a,s,d),p=_t(ba,wa),0<=d&&p<v?(c=d,v=p):(Sa[0]=Ta(t,i,o,r,f),Sa[1]=Ta(e,n,a,s,f),g=_t(Sa,wa),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=Ta(t,i,o,r,c),h[1]=Ta(e,n,a,s,c)),ma(v)}(t,e,i,n,o,a,r,s,u,h,null)<=c/2}function ur(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;return!(e+u<l&&n+u<l&&a+u<l||l<e-u&&l<n-u&&l<a-u||t+u<s&&i+u<s&&o+u<s||s<t-u&&s<i-u&&s<o-u)&&function(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;wa[0]=r,wa[1]=s;for(var d=0;d<1;d+=.05){ba[0]=La(t,i,o,d),ba[1]=La(e,n,a,d),(m=_t(wa,ba))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<ya);f++){var p=u-h,g=u+h;ba[0]=La(t,i,o,p),ba[1]=La(e,n,a,p);var m=_t(ba,wa);if(0<=p&&m<c)u=p,c=m;else{Sa[0]=La(t,i,o,g),Sa[1]=La(e,n,a,g);var v=_t(Sa,wa);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=La(t,i,o,u),l[1]=La(e,n,a,u)),ma(c)}(t,e,i,n,o,a,s,l,null)<=u/2}rr.prototype={constructor:rr,_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,i){i=i||0,this._ux=or(i/pi/t)||0,this._uy=or(i/pi/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=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(ja.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=or(t-this._xi)>this._ux||or(e-this._yi)>this._uy||this._len<5;return this.addData(ja.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(ja.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(ja.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(ja.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=er(o)*i+t,this._yi=ir(o)*i+e,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(ja.R,t,e,i,n),this},closePath:function(){this.addData(ja.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;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||!ar||(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();ar&&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=nr(h*h+c*c),f=l,p=u,g=r.length;for(a<0&&(a=o+a),f-=(a%=o)*(h/=d),p-=a*(c/=d);0<h&&f<=t||h<0&&t<=f||0===h&&(0<c&&p<=e||c<0&&e<=p);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,0<h&&f<l||h<0&&l<f||0<c&&p<u||c<0&&u<p||s[n%2?"moveTo":"lineTo"](0<=h?Qa(f,t):tr(f,t),0<=c?Qa(p,e):tr(p,e));h=f-t,c=p-e,this._dashOffset=-nr(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=Ta,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+=nr(s*s+l*l);for(;x<_&&!(d<(w+=f[x]));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=-nr(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,ar&&(this.data=new Float32Array(t)))},getBoundingRect:function(){qa[0]=qa[1]=$a[0]=$a[1]=Number.MAX_VALUE,Ka[0]=Ka[1]=Ja[0]=Ja[1]=-Number.MAX_VALUE;for(var t,e,i,n,o,a,r,s,l,u,h,c,d,f,p=this.data,g=0,m=0,v=0,y=0,x=0;x<p.length;){var _=p[x++];switch(1===x&&(v=g=p[x],y=m=p[x+1]),_){case ja.M:g=v=p[x++],m=y=p[x++],$a[0]=v,$a[1]=y,Ja[0]=v,Ja[1]=y;break;case ja.L:Ha(g,m,p[x],p[x+1],$a,Ja),g=p[x++],m=p[x++];break;case ja.C:Xa(g,m,p[x++],p[x++],p[x++],p[x++],p[x],p[x+1],$a,Ja),g=p[x++],m=p[x++];break;case ja.Q:t=g,e=m,i=p[x++],n=p[x++],o=p[x],a=p[x+1],r=$a,s=Ja,u=l=void 0,u=La,h=Ea(Oa((l=Pa)(t,i,o),1),0),c=Ea(Oa(l(e,n,a),1),0),d=u(t,i,o,h),f=u(e,n,a,c),r[0]=Oa(t,o,d),r[1]=Oa(e,a,f),s[0]=Ea(t,o,d),s[1]=Ea(e,a,f),g=p[x++],m=p[x++];break;case ja.A:var w=p[x++],b=p[x++],S=p[x++],M=p[x++],I=p[x++],T=p[x++]+I;x+=1;var A=1-p[x++];1===x&&(v=er(I)*S+w,y=ir(I)*M+b),Ya(w,b,S,M,I,T,A,$a,Ja),g=er(T)*S+w,m=ir(T)*M+b;break;case ja.R:Ha(v=g=p[x++],y=m=p[x++],v+p[x++],y+p[x++],$a,Ja);break;case ja.Z:g=v,m=y}St(qa,qa,$a),Mt(Ka,Ka,Ja)}return 0===x&&(qa[0]=qa[1]=Ka[0]=Ka[1]=0),new Di(qa[0],qa[1],Ka[0]-qa[0],Ka[1]-qa[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 ja.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case ja.L:a=s[c++],r=s[c++],(or(a-n)>l||or(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case ja.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 ja.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(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=er(v)*g+f,i=ir(v)*m+p),n=er(M)*g+f,o=ir(M)*m+p;break;case ja.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case ja.Z:t.closePath(),n=e,o=i}}}},rr.CMD=ja;var hr=2*Math.PI;function cr(t){return(t%=hr)<0&&(t+=hr),t}var dr=2*Math.PI;function fr(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(i<h-u||h+u<i)return!1;if(Math.abs(n-o)%dr<1e-4)return!0;if(a){var c=n;n=cr(o),o=cr(c)}else n=cr(n),o=cr(o);o<n&&(o+=dr);var d=Math.atan2(l,s);return d<0&&(d+=dr),n<=d&&d<=o||n<=d+dr&&d+dr<=o}function pr(t,e,i,n,o,a){if(e<a&&n<a||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:o<l?r:0}var gr=rr.CMD,mr=2*Math.PI,vr=1e-4;var yr=[-1,-1,-1],xr=[-1,-1];function _r(t,e,i,n,o,a,r,s,l,u){if(e<u&&n<u&&a<u&&s<u||u<e&&u<n&&u<a&&u<s)return 0;var h,c=function(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(Ma(h)&&Ma(c)){if(Ma(s))a[0]=0;else 0<=(M=-l/s)&&M<=1&&(a[f++]=M)}else{var p=c*c-4*h*d;if(Ma(p)){var g=c/h,m=-g/2;0<=(M=-s/r+g)&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m)}else if(0<p){var v=ma(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);0<=(M=(-s-((y=y<0?-ga(-y,_a):ga(y,_a))+(x=x<0?-ga(-x,_a):ga(x,_a))))/(3*r))&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*ma(h*h*h)),w=Math.acos(_)/3,b=ma(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),I=(m=(-s+b*(S+xa*Math.sin(w)))/(3*r),(-s+b*(S-xa*Math.sin(w)))/(3*r));0<=M&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m),0<=I&&I<=1&&(a[f++]=I)}}return f}(e,n,a,s,u,yr);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=yr[m],y=0===v||1===v?.5:1;Ta(t,i,o,r,v)<l||(g<0&&(g=Da(e,n,a,s,xr),xr[1]<xr[0]&&1<g&&(void 0,h=xr[0],xr[0]=xr[1],xr[1]=h),d=Ta(e,n,a,s,xr[0]),1<g&&(f=Ta(e,n,a,s,xr[1]))),2===g?v<xr[0]?p+=d<e?y:-y:v<xr[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<xr[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function wr(t,e,i,n,o,a,r,s){if(e<s&&n<s&&a<s||s<e&&s<n&&s<a)return 0;var l=function(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ma(a)){if(Ia(r))0<=(h=-s/r)&&h<=1&&(o[l++]=h)}else{var u=r*r-4*a*s;if(Ma(u))0<=(h=-r/(2*a))&&h<=1&&(o[l++]=h);else if(0<u){var h,c=ma(u),d=(-r-c)/(2*a);0<=(h=(-r+c)/(2*a))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}(e,n,a,s,yr);if(0===l)return 0;var u=Pa(e,n,a);if(0<=u&&u<=1){for(var h=0,c=La(e,n,a,u),d=0;d<l;d++){var f=0===yr[d]||1===yr[d]?.5:1;La(t,i,o,yr[d])<r||(yr[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===yr[0]||1===yr[0]?.5:1;return La(t,i,o,yr[0])<r?0:a<e?f:-f}function br(t,e,i,n,o,a,r,s){if(i<(s-=e)||s<-i)return 0;var l=Math.sqrt(i*i-s*s);yr[0]=-l,yr[1]=l;var u=Math.abs(n-o);if(u<1e-4)return 0;if(u%mr<1e-4){o=mr;var h=a?1:-1;return r>=yr[n=0]+t&&r<=yr[1]+t?h:0}if(a){l=n;n=cr(o),o=cr(l)}else n=cr(n),o=cr(o);o<n&&(o+=mr);for(var c=0,d=0;d<2;d++){var f=yr[d];if(r<f+t){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=mr+p),(n<=p&&p<=o||n<=p+mr&&p+mr<=o)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Sr(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===gr.M&&1<h&&(i||(a+=pr(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case gr.M:r=l=t[h++],s=u=t[h++];break;case gr.L:if(i){if(sr(r,s,t[h],t[h+1],e,n,o))return!0}else a+=pr(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.C:if(i){if(lr(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=_r(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 gr.Q:if(i){if(ur(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=wr(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;1<h?a+=pr(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(fr(d,f,g,m,m+v,y,e,w,o))return!0}else a+=br(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 gr.R:l=r=t[h++],u=s=t[h++];x=l+t[h++],_=u+t[h++];if(i){if(sr(l,u,x,u,e,n,o)||sr(x,u,x,_,e,n,o)||sr(x,_,l,_,e,n,o)||sr(l,_,l,u,e,n,o))return!0}else a+=pr(x,u,x,_,n,o),a+=pr(l,_,l,u,n,o);break;case gr.Z:if(i){if(sr(r,s,l,u,e,n,o))return!0}else a+=pr(r,s,l,u,n,o);r=l,s=u}}return i||function(t,e){return Math.abs(t-e)<vr}(s,u)||(a+=pr(r,s,l,u,n,o)||0),0!==a}var Mr=$i.prototype.getCanvasPattern,Ir=Math.abs,Tr=new rr(!0);function Ar(t){Jn.call(this,t),this.path=null}Ar.prototype={constructor:Ar,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,o=this.path||Tr,a=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;n.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Mr.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Mr.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(o.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(o.beginPath(t),f&&!g&&(o.setLineDash(f),o.setLineDashOffset(p)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r)if(null!=n.fillOpacity){var v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,o.fill(t),t.globalAlpha=v}else o.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=n.strokeOpacity){v=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,o.stroke(t),t.globalAlpha=v}else o.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new rr},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n=n||(this.path=new rr),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)),1e-10<r&&(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(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),function(t,e,i,n){return Sr(t,e,!0,i,n)}(a,r/s,t,e)))return!0}if(o.hasFill())return function(t,e,i){return Sr(t,0,!1,e,i)}(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!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):Jn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(z(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&&1e-10<Ir(t[0]-1)&&1e-10<Ir(t[3]-1)?Math.sqrt(Ir(t[0]*t[3]-t[2]*t[1])):1}},Ar.extend=function(o){function t(t){Ar.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var i=this.shape;for(var n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)}for(var e in w(t,Ar),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},w(Ar,Jn);function Dr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var Cr=rr.CMD,Lr=[[],[],[]],kr=Math.sqrt,Pr=Math.atan2,Nr=function(t,e){var i,n,o,a,r,s=t.data,l=Cr.M,u=Cr.C,h=Cr.L,c=Cr.R,d=Cr.A,f=Cr.Q;for(a=o=0;o<s.length;){switch(i=s[o++],a=o,n=0,i){case l:case h:n=1;break;case u:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],m=kr(e[0]*e[0]+e[1]*e[1]),v=kr(e[2]*e[2]+e[3]*e[3]),y=Pr(-e[1]/v,e[0]/m);s[o]*=m,s[o++]+=p,s[o]*=v,s[o++]+=g,s[o++]*=m,s[o++]*=v,s[o++]+=y,s[o++]+=y,a=o+=2;break;case c:x[0]=s[o++],x[1]=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[o++],x[1]+=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(r=0;r<n;r++){var x;(x=Lr[r])[0]=s[o++],x[1]=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1]}}},Or=Math.sqrt,Er=Math.sin,Rr=Math.cos,zr=Math.PI,Br=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Dr(t)*Dr(e))},Vr=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Br(t,e))};function Gr(t,e,i,n,o,a,r,s,l,u,h){var c=l*(zr/180),d=Rr(c)*(t-i)/2+Er(c)*(e-n)/2,f=-1*Er(c)*(t-i)/2+Rr(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);1<p&&(r*=Or(p),s*=Or(p));var g=(o===a?-1:1)*Or((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+Rr(c)*m-Er(c)*v,x=(e+n)/2+Er(c)*m+Rr(c)*v,_=Vr([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=Vr(w,b);Br(w,b)<=-1&&(S=zr),1<=Br(w,b)&&(S=0),0===a&&0<S&&(S-=2*zr),1===a&&S<0&&(S+=2*zr),h.addData(u,y,x,r,s,_,S,c,a)}var Fr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Wr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Hr(t,e){var i=function(t){if(!t)return new rr;for(var e,i=0,n=0,o=i,a=n,r=new rr,s=rr.CMD,l=t.match(Fr),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Wr)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Gr(M=i,I=n,i=f[m++],n=f[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Gr(M=i,I=n,i+=f[m++],n+=f[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),i=o,n=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){Nr(i,t),this.dirty(!0)},e}function Zr(t,e){return new Ar(Hr(t,e))}var Ur=function(t){Jn.call(this,t)};Ur.prototype={constructor:Ur,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&En(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),qn(n,i)?(this.setTransform(t),zn(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=Wi.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&En(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=gn(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Un(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}},w(Ur,Jn);function Xr(l){return v.browser.ie&&11<=v.browser.version?function(){var t,e=this.__clipPaths,i=this.style;if(e)for(var n=0;n<e.length;n++){var o=e[n],a=o&&o.shape,r=o&&o.type;if(a&&("sector"===r&&a.startAngle===a.endAngle||"rect"===r&&(!a.width||!a.height))){for(var s=0;s<jr.length;s++)jr[s][2]=i[jr[s][0]],i[jr[s][0]]=jr[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<jr.length;s++)i[jr[s][0]]=jr[s][2]}:l}var Yr=Ar.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)}}),jr=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],qr=Ar.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Xr(Ar.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()}}),Kr=Ar.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)}});function $r(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 Jr(t,e,i){var n=e.points,o=e.smooth;if(n&&2<=n.length){if(o&&"spline"!==o){var a=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++)St(r,r,t[d]),Mt(s,s,t[d]);St(r,r,n[0]),Mt(s,s,n[1])}for(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(rt(t[d]));continue}o=t[d-1],a=t[d+1]}ht(u,a,o),gt(u,u,e);var g=vt(p,o),m=vt(p,a),v=g+m;0!==v&&(g/=v,m/=v),gt(h,u,-g),gt(c,u,m);var y=lt([],p,h),x=lt([],p,c);n&&(Mt(y,y,r),St(y,y,s),Mt(x,x,r),St(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l}(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=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=vt(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];u=e?(s=t[(c-1+i)%i],l=t[(c+1)%i],t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[i-2<c?i-1:c+1],t[i-3<c?i-1:c+2]);var p=d*d,g=d*p;n.push([$r(s[0],f[0],l[0],u[0],d,p,g),$r(s[1],f[1],l[1],u[1],d,p,g)])}return n}(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}var Qr=Ar.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Jr(t,e,!0)}}),ts=Ar.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Jr(t,e,!1)}}),es=Math.round;function is(t,e,i){if(e){var n=e.x1,o=e.x2,a=e.y1,r=e.y2;t.x1=n,t.x2=o,t.y1=a,t.y2=r;var s=i&&i.lineWidth;s&&(es(2*n)===es(2*o)&&(t.x1=t.x2=os(n,s,!0)),es(2*a)===es(2*r)&&(t.y1=t.y2=os(a,s,!0)))}}function ns(t,e,i){if(e){var n=e.x,o=e.y,a=e.width,r=e.height;t.x=n,t.y=o,t.width=a,t.height=r;var s=i&&i.lineWidth;s&&(t.x=os(n,s,!0),t.y=os(o,s,!0),t.width=Math.max(os(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(os(o+r,s,!1)-t.y,0===r?0:1))}}function os(t,e,i){if(!e)return t;var n=es(2*t);return(n+es(e))%2==0?n/2:(n+(i?1:-1))/2}var as={},rs=Ar.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(ns(as,e,this.style),i=as.x,n=as.y,o=as.width,a=as.height,as.r=e.r,e=as):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?Dn(t,e):t.rect(i,n,o,a),t.closePath()}}),ss={},ls=Ar.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,n,o,a;a=this.subPixelOptimize?(is(ss,e,this.style),i=ss.x1,n=ss.y1,o=ss.x2,ss.y2):(i=e.x1,n=e.y1,o=e.x2,e.y2);var 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]}}),us=[];function hs(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?Aa:Ta)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Aa:Ta)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ka:La)(t.x1,t.cpx1,t.x2,e),(i?ka:La)(t.y1,t.cpy1,t.y2,e)]}function cs(t){this.colorStops=t||[]}var ds=Ar.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&&(Na(i,r,o,h,us),r=us[1],o=us[2],Na(n,s,a,h,us),s=us[1],a=us[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(Ca(i,r,l,o,h,us),r=us[1],l=us[2],o=us[3],Ca(n,s,u,a,h,us),s=us[1],u=us[2],a=us[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return hs(this.shape,t,!1)},tangentAt:function(t){var e=hs(this.shape,t,!0);return mt(e,e)}}),fs=Ar.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)}}),ps=Ar.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],t[i].segmentIgnoreThreshold)},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(),Ar.prototype.getBoundingRect.call(this)}});cs.prototype={constructor:cs,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function gs(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)}gs.prototype={constructor:gs},w(gs,cs);function ms(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)}function vs(t){Jn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}ms.prototype={constructor:ms},w(ms,cs),vs.prototype.incremental=!0,vs.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},vs.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},vs.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},vs.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},vs.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},vs.prototype.brush=function(t,e){for(var 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(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).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 ys=[];vs.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Di(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(ys)),t.union(n)}this._rect=t}return this._rect},vs.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},w(vs,Jn);var xs=Math.max,_s=Math.min,ws={},bs=1,Ss={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},Ms="emphasis",Is="normal",Ts=1,As={},Ds={};function Cs(t){return Ar.extend(t)}function Ls(t,e){Ds[t]=e}function ks(t){if(Ds.hasOwnProperty(t))return Ds[t]}function Ps(t,e,i,n){var o=Zr(t,e);return i&&("center"===n&&(i=Os(i,o.getBoundingRect())),Rs(o,i)),o}function Ns(t,i,n){var o=new Qn({style:{image:t,x:i.x,y:i.y,width:i.width,height:i.height},onload:function(t){if("center"===n){var e={width:t.width,height:t.height};o.setStyle(Os(i,e))}}});return o}function Os(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}}var Es=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 Ar(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r};function Rs(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var zs=os;function Bs(t){return null!=t&&"none"!==t}var Vs=Q(),Gs=0;function Fs(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var o=t,a=t.style;n&&(a=(o=i.addHover(t)).style),ll(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var o in e)null!=e[o]&&(i[o]=n[o]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(o),a.extendFrom(e),Ws(a,e,"fill"),Ws(a,e,"stroke"),sl(a),n||(t.dirty(!1),t.z2+=bs)}}}function Ws(t,e,i){!Bs(e[i])&&Bs(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=Vs.get(t);return e||(e=He(t,-.1),Gs<1e4&&(Vs.set(t,e),Gs++)),e}(t[i]))}function Hs(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(ll(i),t.setStyle(n),sl(i));var o=t.__cachedNormalZ2;null!=o&&t.z2-o===bs&&(t.z2=o)}}function Zs(t,e,i){var n,o=Is,a=Is;t.__highlighted&&(o=Ms,n=!0),e(t,i),t.__highlighted&&(a=Ms,n=!0),t.isGroup&&t.traverse(function(t){t.isGroup||e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(o,a)}function Us(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Hs(t),Fs(t))}function Xs(t){Ks(this,t)||this.__highByOuter||Zs(this,Fs)}function Ys(t){Ks(this,t)||this.__highByOuter||Zs(this,Hs)}function js(t){this.__highByOuter|=1<<(t||0),Zs(this,Fs)}function qs(t){(this.__highByOuter&=~(1<<(t||0)))||Zs(this,Hs)}function Ks(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function $s(t,e){Js(t,!0),Zs(t,Us,e)}function Js(t,e){var i=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",Xs)[n]("mouseout",Ys),t[n]("emphasis",js)[n]("normal",qs),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Qs(t){return!(!t||!t.__highDownDispatcher)}function tl(t){var e=As[t];return null==e&&Ts<=32&&(e=As[t]=Ts++),e}function el(t,e,i,n,o,a,r){var s,l=(o=o||ws).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=o.labelProp,d=i.getShallow("show"),f=n.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=C(o.defaultText)?o.defaultText(u,o):o.defaultText));var p=d?s:null,g=f?H(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(nl(t,i,a,o),nl(e,n,r,o,!0)),t.text=p,e.text=g}function il(t,e,i){var n=t.style;e&&(ll(n),t.setStyle(e),sl(n)),n=t.__hoverStl,i&&n&&(ll(n),P(n,i),sl(n))}function nl(t,e,i,n,o){return ol(t,e,n,o),i&&P(t,i),t}function ol(t,e,i,n){if((i=i||ws).isRectText){var o;i.getTextPosition?o=i.getTextPosition(e,n):"outside"===(o=e.getShallow("position")||(n?null:"inside"))&&(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=H(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||ws).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(u)for(var h in r={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);al(r[h]={},c,l,i,n)}return t.rich=r,al(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function al(t,e,i,n,o,a){i=!o&&i||ws,t.textFill=rl(e.getShallow("color"),n)||i.color,t.textStroke=rl(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=H(e.getShallow("textBorderWidth"),i.textBorderWidth),o||(a&&(t.insideRollbackOpt=n,sl(t)),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=rl(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=rl(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 rl(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function sl(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var o=n.autoColor,a=n.isRectText,r=n.useInsideStyle,s=!1!==r&&(!0===r||a&&i&&"string"==typeof i&&0<=i.indexOf("inside")),l=!s&&null!=o;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=o)}t.insideRollback=e}function ll(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ul(t,e){var i=e&&e.getModel("textStyle");return j([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 hl(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)),0<s?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 cl(t,e,i,n,o){hl(!0,t,e,i,n,o)}function dl(t,e,i,n,o){hl(!1,t,e,i,n,o)}function fl(t,e){for(var i=re([]);t&&t!==e;)le(i,t.getLocalTransform(),i),t=t.parent;return i}function pl(t,e,i){return e&&!N(e)&&(e=ve.getLocalTransform(e)),i&&(e=de([],e)),bt([],t,e)}function gl(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=pl(a,e,i),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function ml(t,e,n,i){if(t&&e){var o,a=(o={},t.traverse(function(t){!t.isGroup&&t.anid&&(o[t.anid]=t)}),o);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),cl(t,i,n,t.dataIndex)}}})}function r(t){var e={position:rt(t.position),rotation:t.rotation};return t.shape&&(e.shape=P({},t.shape)),e}}function vl(t,n){return O(t,function(t){var e=t[0];e=xs(e,n.x),e=_s(e,n.x+n.width);var i=t[1];return i=xs(i,n.y),[e,i=_s(i,n.y+n.height)]})}function yl(t,e,i){var n=(e=P({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),D(n,i),new Qn(e)):Ps(t.replace("path://",""),e,i,"center")}function xl(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(_l(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function _l(t,e,i,n,o,a,r,s){var l=i-t,u=n-e,h=r-o,c=s-a,d=wl(h,c,l,u);if(function(t){return t<=1e-6&&-1e-6<=t}(d))return!1;var f=t-o,p=e-a,g=wl(f,p,l,u)/d;if(g<0||1<g)return!1;var m=wl(f,p,h,c)/d;return!(m<0||1<m)}function wl(t,e,i,n){return t*n-i*e}Ls("circle",Yr),Ls("sector",qr),Ls("ring",Kr),Ls("polygon",Qr),Ls("polyline",ts),Ls("rect",rs),Ls("line",ls),Ls("bezierCurve",ds),Ls("arc",fs);var bl=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:bs,CACHED_LABEL_STYLE_PROPERTIES:Ss,extendShape:Cs,extendPath:function(t,e){return function(t,e){return Ar.extend(Hr(t,e))}(t,e)},registerShape:Ls,getShapeClass:ks,makePath:Ps,makeImage:Ns,mergePath:Es,resizePath:Rs,subPixelOptimizeLine:function(t){return is(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return ns(t.shape,t.shape,t.style),t},subPixelOptimize:zs,setElementHoverStyle:Us,setHoverStyle:$s,setAsHighDownDispatcher:Js,isHighDownDispatcher:Qs,getHighlightDigit:tl,setLabelStyle:el,modifyLabelStyle:il,setTextStyle:nl,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,ol(t,e,o,n)},getFont:ul,updateProps:cl,initProps:dl,getTransform:fl,applyTransform:pl,transformDirection:gl,groupTransition:ml,clipPointsByRect:vl,clipRectByRect:function(t,e){var i=xs(t.x,e.x),n=_s(t.x+t.width,e.x+e.width),o=xs(t.y,e.y),a=_s(t.y+t.height,e.y+e.height);if(i<=n&&o<=a)return{x:i,y:o,width:n-i,height:a-o}},createIcon:yl,linePolygonIntersect:xl,lineLineIntersect:_l,Group:Ci,Image:Qn,Text:Ur,Circle:Yr,Sector:qr,Ring:Kr,Polygon:Qr,Polyline:ts,Rect:rs,Line:ls,BezierCurve:ds,Arc:fs,IncrementalDisplayable:vs,CompoundPath:ps,LinearGradient:gs,RadialGradient:ms,BoundingRect:Di}),Sl=["textStyle","color"],Ml={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Sl):null)},getFont:function(){return ul({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return gn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},Il=ha([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Tl={getItemStyle:function(t,e){var i=Il(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]}},Al=b,Dl=jo();function Cl(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Ll(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 kl(t,e){var i=Dl(t).getParent;return i?i.call(t,e):t.parentModel}Cl.prototype={constructor:Cl,init:null,mergeOption:function(t){m(this.option,t,!0)},get:function(t,e){return null==t?this.option:Ll(this.option,this.parsePath(t),!e&&kl(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&kl(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i;return new Cl(null==t?this.option:Ll(this.option,t=this.parsePath(t)),e=e||(i=kl(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(k(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Dl(this).getParent=t},isAnimationEnabled:function(){if(!v.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},oa(Cl),ra(Cl),Al(Cl,da),Al(Cl,pa),Al(Cl,Ml),Al(Cl,Tl);var Pl=0;function Nl(t){return[t||"",Pl++,Math.random().toFixed(5)].join("_")}var Ol=1e-4;function El(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(0<o){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 Rl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bl(t){return t.sort(function(t,e){return t-e}),t}function Vl(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 Gl(t){var e=t.toString(),i=e.indexOf("e");if(0<i){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Fl(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 Wl(t,e,i){if(!t[e])return 0;var n=S(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=O(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=O(a,function(t){return Math.floor(t)}),l=S(s,function(t,e){return t+e},0),u=O(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Hl=9007199254740991;function Zl(t){var e=2*Math.PI;return(t%e+e)%e}function Ul(t){return-Ol<t&&t<Ol}var Xl=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Yl(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=Xl.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)}function jl(t){return Math.pow(10,ql(t))}function ql(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Kl(t,e){var i=ql(t),n=Math.pow(10,i),o=t/n;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*n,-20<=i?+t.toFixed(i<0?-i:0):t}function $l(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1});for(var e=-1/0,i=1,n=0;n<t.length;){for(var o=t[n].interval,a=t[n].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-i),e=o[r],i=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t}function Jl(t){return 0<=t-parseFloat(t)}var Ql=(Object.freeze||Object)({linearMap:El,parsePercent:Rl,round:zl,asc:Bl,getPrecision:Vl,getPrecisionSafe:Gl,getPixelPrecision:Fl,getPercentWithPrecision:Wl,MAX_SAFE_INTEGER:Hl,remRadian:Zl,isRadianAroundZero:Ul,parseDate:Yl,quantity:jl,quantityExponent:ql,nice:Kl,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:$l,isNumeric:Jl});function tu(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function eu(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 iu=X,nu=/([&<>"'])/g,ou={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function au(t){return null==t?"":(t+"").replace(nu,function(t,e){return ou[e]})}function ru(t,e){return"{"+t+(null==e?"":e)+"}"}var su=["a","b","c","d","e","f","g"];function lu(t,e,i){L(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=su[a];t=t.replace(ru(r),ru(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(ru(su[l],s),i?au(u):u)}return t}function uu(i,t,n){return E(t,function(t,e){i=i.replace("{"+e+"}",n?au(t):t)}),i}function hu(t,e){var i=(t=R(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,o=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return i?"html"===o?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+au(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+au(i)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|}  ",style:{color:i}}:""}function cu(t,e){return"0000".substr(0,e-(t+="").length)+t}function du(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yl(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",cu(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cu(s,2)).replace("d",s).replace("hh",cu(l,2)).replace("h",l).replace("mm",cu(u,2)).replace("m",u).replace("ss",cu(h,2)).replace("s",h).replace("SSS",cu(c,3))}function fu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var pu=xn;function gu(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}var mu=(Object.freeze||Object)({addCommas:tu,toCamelCase:eu,normalizeCssArray:iu,encodeHTML:au,formatTpl:lu,formatTplSimple:uu,getTooltipMarker:hu,formatTime:du,capitalFirst:fu,truncateText:pu,getTextBoundingRect:function(t){return gn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return gn(t,e,i,n,o,s,a,r)},windowOpen:gu}),vu=E,yu=["left","right","top","bottom","width","height"],xu=[["width","left","right"],["height","top","bottom"]];function _u(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,o=t.position,a=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var wu=_u;T(_u,"vertical"),T(_u,"horizontal");function bu(t,e,i){i=iu(i||0);var n=e.width,o=e.height,a=Rl(t.left,n),r=Rl(t.top,o),s=Rl(t.right,n),l=Rl(t.bottom,o),u=Rl(t.width,n),h=Rl(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)&&(n/o<f?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 Di(a+i[3],r+i[0],u,h);return p.margin=i,p}function Su(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],r=!o||!o.hv||o.hv[1],s=o&&o.boundingMode||"all";if(a||r){var l;if("raw"===s)l="group"===t.type?new Di(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=bu(D({width:l.width,height:l.height},e),i,n);var h=t.position,c=a?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}}function Mu(l,u,t){z(t)||(t={});var h=t.ignoreSize;L(h)||(h=[h,h]);var e=n(xu[0],0),i=n(xu[1],1);function n(t,e){var i={},n=0,o={},a=0;if(vu(t,function(t){o[t]=l[t]}),vu(t,function(t){c(u,t)&&(i[t]=o[t]=u[t]),d(i,t)&&n++,d(o,t)&&a++}),h[e])return d(u,t[1])?o[t[2]]=null:d(u,t[2])&&(o[t[1]]=null),o;if(2!==a&&n){if(2<=n)return i;for(var r=0;r<t.length;r++){var s=t[r];if(!c(i,s)&&c(l,s)){i[s]=l[s];break}}return i}return o}function c(t,e){return t.hasOwnProperty(e)}function d(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,i){vu(t,function(t){e[t]=i[t]})}o(xu[0],l,e),o(xu[1],l,i)}function Iu(t){return Tu({},t)}function Tu(e,i){return i&&e&&vu(yu,function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e}var Au,Du,Cu,Lu=jo(),ku=Cl.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Cl.call(this,t,e,i,n),this.uid=Nl("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{};m(t,e.getTheme().get(this.mainType)),m(t,this.getDefaultOption()),i&&Mu(t,n,i)},mergeOption:function(t,e){m(this.option,t,!0);var i=this.layoutMode;i&&Mu(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Lu(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},a=e.length-1;0<=a;a--)o=m(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function Pu(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}ua(ku,{registerWhenExtend:!0}),Du={},(Au=ku).registerSubTypeDefaulter=function(t,e){t=na(t),Du[t.main]=e},Au.determineSubType=function(t,e){var i=e.type;if(!i){var n=na(t).main;Au.hasSubTypes(t)&&Du[n]&&(i=Du[n](e))}return i},Cu=function(t){var e=[];E(ku.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=O(e,function(t){return na(t).main}),"dataset"!==t&&_(e,"dataset")<=0&&e.unshift("dataset");return e},ku.topologicalTravel=function(t,e,i,n){if(t.length){var o=function(e){var o={},a=[];return E(e,function(i){var n=Pu(o,i),t=function(t,e){var i=[];return E(t,function(t){0<=_(e,t)&&i.push(t)}),i}(n.originalDeps=Cu(i),e);n.entryCount=t.length,0===n.entryCount&&a.push(i),E(t,function(t){_(n.predecessor,t)<0&&n.predecessor.push(t);var e=Pu(o,t);_(e.successor,t)<0&&e.successor.push(i)})}),{graph:o,noEntryList:a}}(e),a=o.graph,r=o.noEntryList,s={};for(E(t,function(t){s[t]=!0});r.length;){var l=r.pop(),u=a[l],h=!!s[l];h&&(i.call(n,l,u.originalDeps.slice()),delete s[l]),E(u.successor,h?d:c)}E(s,function(){throw new Error("Circle dependency may exists")})}function c(t){a[t].entryCount--,0===a[t].entryCount&&r.push(t)}function d(t){s[t]=!0,c(t)}},b(ku,{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")}}});var Nu="";"undefined"!=typeof navigator&&(Nu=navigator.platform||"");var Ou={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Nu.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},Eu=jo();var Ru={clearColorPalette:function(){Eu(this).colorIdx=0,Eu(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Eu(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Vo(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(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}}},zu="original",Bu="arrayRows",Vu="objectRows",Gu="keyedColumns",Fu="unknown",Wu="typedArray",Hu="column",Zu="row";function Uu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Gu?{}:[]),this.sourceFormat=t.sourceFormat||Fu,this.seriesLayoutBy=t.seriesLayoutBy||Hu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Uu.seriesDataToSource=function(t){return new Uu({data:t,sourceFormat:V(t)?Wu:zu,fromDataset:!1})},ra(Uu);var Xu={Must:1,Might:2,Not:3},Yu=jo();function ju(t){var e=t.option,i=e.data,n=V(i)?Wu:zu,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=Qu(t);if(l){var u=l.option;i=u.source,n=Yu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:qu(o)};var a,r;if(e===Bu)"auto"===n||null==n?Ku(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],Ku(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Zu?t.length:t[0]?t[0].length:null;else if(e===Vu)o=o||function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return E(e,function(t,e){n.push(e)}),n}}(t);else if(e===Gu)o||(o=[],E(t,function(t,e){o.push(e)}));else if(e===zu){var s=Wo(t[0]);a=L(s)&&s.length||1}return{startIndex:r,dimensionsDefine:qu(o),dimensionsDetectCount:a}}(i,n,a,r,s);Yu(t).source=new Uu({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function qu(t){if(t){var n=Q();return O(t,function(t,e){if(null==(t=P({},z(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=n.get(t.name);return i?t.name+="-"+i.count++:n.set(t.name,{count:1}),t})}}function Ku(t,e,i,n){if(null==n&&(n=1/0),e===Zu)for(var o=0;o<i.length&&o<n;o++)t(i[o]?i[o][0]:null,o);else{var a=i[0]||[];for(o=0;o<a.length&&o<n;o++)t(a[o],o)}}function $u(i,t,e){var a={},n=Qu(t);if(!n||!i)return a;var r,o,s=[],l=[],u=t.ecModel,h=Yu(u).datasetMap,c=n.uid+"_"+e.seriesLayoutBy;E(i=i.slice(),function(t,e){z(t)||(i[e]={name:t}),"ordinal"===t.type&&null==r&&(o=p(i[r=e])),a[t.name]=[]});var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function f(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function p(t){var e=t.dimsDef;return e?e.length:1}return E(i,function(t,e){var i=t.name,n=p(t);if(null==r){var o=d.valueWayDim;f(a[i],o,n),f(l,o,n),d.valueWayDim+=n}else if(r===e)f(a[i],0,n),f(s,0,n);else{o=d.categoryWayDim;f(a[i],o,n),f(l,o,n),d.categoryWayDim+=n}}),s.length&&(a.itemName=s),l.length&&(a.seriesName=l),a}function Ju(t,l,u){var e={};if(!Qu(t))return e;var h,c=l.sourceFormat,d=l.dimensionsDefine;c!==Vu&&c!==Gu||E(d,function(t,e){"name"===(z(t)?t.name:t)&&(h=e)});var i=function(){for(var t={},e={},i=[],n=0,o=Math.min(5,u);n<o;n++){var a=th(l.data,c,l.seriesLayoutBy,d,l.startIndex,n);i.push(a);var r=a===Xu.Not;if(r&&null==t.v&&n!==h&&(t.v=n),null!=t.n&&t.n!==t.v&&(r||i[t.n]!==Xu.Not)||(t.n=n),s(t)&&i[t.n]!==Xu.Not)return t;r||(a===Xu.Might&&null==e.v&&n!==h&&(e.v=n),null!=e.n&&e.n!==e.v||(e.n=n))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();if(i){e.value=i.v;var n=null!=h?h:i.n;e.itemName=[n],e.seriesName=[n]}return e}function Qu(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function th(t,e,i,n,o,a){var r,s,l;if(V(t))return Xu.Not;if(n){var u=n[a];z(u)?(s=u.name,l=u.type):R(u)&&(s=u)}if(null!=l)return"ordinal"===l?Xu.Must:Xu.Not;if(e===Bu)if(i===Zu){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(r=g(h[o+c])))return r}else for(c=0;c<t.length&&c<5;c++){var d=t[o+c];if(d&&null!=(r=g(d[a])))return r}else if(e===Vu){if(!s)return Xu.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(r=g(f[s])))return r}}else if(e===Gu){if(!s)return Xu.Not;if(!(h=t[s])||V(h))return Xu.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(r=g(h[c])))return r}else if(e===zu)for(c=0;c<t.length&&c<5;c++){var f,p=Wo(f=t[c]);if(!L(p))return Xu.Not;if(null!=(r=g(p[a])))return r}function g(t){var e=R(t);return null!=t&&isFinite(t)&&""!==t?e?Xu.Might:Xu.Not:e&&"-"!==t?Xu.Must:void 0}return Xu.Not}var eh="\0_ec_inner",ih=Cl.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Cl(i),this._optionManager=n},setOption:function(t,e){Y(!(eh 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)):function(t){t=t,this.option={},this.option[eh]=1,this._componentsMap=Q({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(i,t){var n=i.color&&!i.colorLayer;E(t,function(t,e){"colorLayer"===e&&n||ku.hasClass(e)||("object"==typeof t?i[e]=i[e]?m(i[e],t,!1):k(t):null==i[e]&&(i[e]=t))})}(t,this._theme.option),m(t,Ou,!1),this.mergeOption(t)}.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&&E(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(n){var l=this.option,u=this._componentsMap,i=[];!function(t){Yu(t).datasetMap=Q()}(this),E(n,function(t,e){null!=t&&(ku.hasClass(e)?e&&i.push(e):l[e]=null==l[e]?k(t):m(l[e],t,!0))}),ku.topologicalTravel(i,ku.getAllClassMainTypes(),function(r,t){var e=Vo(n[r]),i=Ho(u.get(r),e);Zo(i),E(i,function(t,e){var i=t.option;z(i)&&(t.keyInfo.mainType=r,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:ku.determineSubType(t,e)}(r,i,t.exist))});var s=function(e,t){L(t)||(t=t?[t]:[]);var i={};return E(t,function(t){i[t]=(e.get(t)||[]).slice()}),i}(u,t);l[r]=[],u.set(r,[]),E(i,function(t,e){var i=t.exist,n=t.option;if(Y(z(n)||i,"Empty component definition"),n){var o=ku.getClass(r,t.keyInfo.subType,!0);if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(n,this),i.optionUpdated(n,!1);else{var a=P({dependentModels:s,componentIndex:e},t.keyInfo);P(i=new o(n,this,this,a),a),i.init(n,this,this,a),i.optionUpdated(null,!0)}}else i.mergeOption({},this),i.optionUpdated({},!1);u.get(r)[e]=i,l[r][e]=i.option},this),"series"===r&&nh(this,u.get("series"))},this),this._seriesIndicesMap=Q(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var n=k(this.option);return E(n,function(t,e){if(ku.hasClass(e)){for(var i=(t=Vo(t)).length-1;0<=i;i--)Xo(t[i])&&t.splice(i,1);n[e]=t}}),delete n[eh],n},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,o=t.id,a=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)L(n)||(n=[n]),i=M(O(n,function(t){return r[t]}),function(t){return!!t});else if(null!=o){var s=L(o);i=M(r,function(t){return s&&0<=_(o,t.id)||!s&&t.id===o})}else if(null!=a){var l=L(a);i=M(r,function(t){return l&&0<=_(a,t.name)||!l&&t.name===a})}else i=r.slice();return oh(i,t)},findComponents:function(t){var e,i,n,o,a,r=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",o=s+"Name",!(e=r)||null==e[i]&&null==e[n]&&null==e[o]?null:{mainType:s,index:e[i],id:e[n],name:e[o]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=oh(u,t),t.filter?M(a,t.filter):a},eachComponent:function(t,n,o){var e=this._componentsMap;if("function"==typeof t)o=n,n=t,e.each(function(t,i){E(t,function(t,e){n.call(o,i,t,e)})});else if(R(t))E(e.get(t),n,o);else if(z(t)){E(this.findComponents(t),n,o)}},getSeriesByName:function(e){return M(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return M(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(i,n){E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];i.call(n,e,t)},this)},eachRawSeries:function(t,e){E(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(i,n,o){E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===i&&n.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,i){return E(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){var i=M(this._componentsMap.get("series"),t,e);nh(this,i)},restoreData:function(i){var n=this._componentsMap;nh(this,n.get("series"));var o=[];n.each(function(t,e){o.push(e)}),ku.topologicalTravel(o,ku.getAllClassMainTypes(),function(e,t){E(n.get(e),function(t){"series"===e&&function(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}}(t,i)||t.restoreData()})})}});function nh(t,e){t._seriesIndicesMap=Q(t._seriesIndices=O(e,function(t){return t.componentIndex})||[])}function oh(t,e){return e.hasOwnProperty("subType")?M(t,function(t){return t.subType===e.subType}):t}b(ih,Ru);var ah=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function rh(e){E(ah,function(t){this[t]=A(e[t],e)},this)}var sh={};function lh(){this._coordinateSystems=[]}lh.prototype={constructor:lh,create:function(n,o){var a=[];E(sh,function(t,e){var i=t.create(n,o);a=a.concat(i||[])}),this._coordinateSystems=a},update:function(e,i){E(this._coordinateSystems,function(t){t.update&&t.update(e,i)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},lh.register=function(t,e){sh[t]=e},lh.get=function(t){return sh[t]};var uh=E,hh=k,ch=O,dh=m,fh=/^(min|max)?(.+)$/;function ph(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function gh(t,e,i){var a={width:e,height:i,aspectratio:e/i},r=!0;return E(t,function(t,e){var i=e.match(fh);if(i&&i[1]&&i[2]){var n=i[1],o=i[2].toLowerCase();!function(t,e,i){return"min"===i?e<=t:"max"===i?t<=e:t===e}(a[o],t,n)&&(r=!1)}}),r}ph.prototype={constructor:ph,setOption:function(t,e){t&&E(Vo(t.series),function(t){t&&t.data&&V(t.data)&&K(t.data)}),t=hh(t);var i=this._optionBackup,n=function(t,i,n){var e,o,a=[],r=[],s=t.timeline;t.baseOption&&(o=t.baseOption);(s||t.options)&&(o=o||{},a=(t.options||[]).slice());if(t.media){o=o||{};var l=t.media;uh(l,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)})}o=o||t;o.timeline||(o.timeline=s);return uh([o].concat(a).concat(O(r,function(t){return t.option})),function(e){uh(i,function(t){t(e,n)})}),{baseOption:o,timelineOptions:a,mediaDefault:e,mediaList:r}}.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(function(o,t){uh(t=t||{},function(t,e){if(null!=t){var i=o[e];if(ku.hasClass(e)){t=Vo(t);var n=Ho(i=Vo(i),t);o[e]=ch(n,function(t){return t.option&&t.exist?dh(t.exist,t.option,!0):t.exist||t.option})}else o[e]=dh(i,t,!0)}})}(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=ch(e.timelineOptions,hh),this._mediaList=ch(e.mediaList,hh),this._mediaDefault=hh(e.mediaDefault),this._currentMediaIndices=[],hh(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=hh(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++)gh(n[s].query,e,i)&&a.push(s);return!a.length&&o&&(a=[-1]),a.length&&!function(t,e){return t.join(",")===e.join(",")}(a,this._currentMediaIndices)&&(r=ch(a,function(t){return hh(-1===t?o.option:n[t].option)})),this._currentMediaIndices=a,r}};var mh=E,vh=z,yh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xh(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=yh.length;i<n;i++){var o=yh[i],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?m(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?m(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function _h(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,D(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function wh(t){_h(t,"itemStyle"),_h(t,"lineStyle"),_h(t,"areaStyle"),_h(t,"label"),_h(t,"labelLine"),_h(t,"upperLabel"),_h(t,"edgeLabel")}function bh(t,e){var i=vh(t)&&t[e],n=vh(i)&&i.textStyle;if(n)for(var o=0,a=Fo.length;o<a;o++){e=Fo[o];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Sh(t){t&&(wh(t),bh(t,"label"),t.emphasis&&bh(t.emphasis,"label"))}function Mh(t){return L(t)?t:t?[t]:[]}function Ih(t){return(L(t)?t[0]:t)||{}}function Th(e,t){mh(Mh(e.series),function(t){vh(t)&&function(t){if(vh(t)){xh(t),wh(t),bh(t,"label"),bh(t,"upperLabel"),bh(t,"edgeLabel"),t.emphasis&&(bh(t.emphasis,"label"),bh(t.emphasis,"upperLabel"),bh(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(xh(i),Sh(i)),(n=t.markLine)&&(xh(n),Sh(n));var e=t.markArea;e&&Sh(e);var i,n,o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!V(a))for(var r=0;r<a.length;r++)Sh(a[r]);E(t.categories,function(t){wh(t)})}if(o&&!V(o))for(r=0;r<o.length;r++)Sh(o[r]);if((i=t.markPoint)&&i.data){var s=i.data;for(r=0;r<s.length;r++)Sh(s[r])}if((n=t.markLine)&&n.data){var l=n.data;for(r=0;r<l.length;r++)L(l[r])?(Sh(l[r][0]),Sh(l[r][1])):Sh(l[r])}"gauge"===t.type?(bh(t,"axisLabel"),bh(t,"title"),bh(t,"detail")):"treemap"===t.type?(_h(t.breadcrumb,"itemStyle"),E(t.levels,function(t){wh(t)})):"tree"===t.type&&wh(t.leaves)}}(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),mh(i,function(t){mh(Mh(e[t]),function(t){t&&(bh(t,"axisLabel"),bh(t.axisPointer,"label"))})}),mh(Mh(e.parallel),function(t){var e=t&&t.parallelAxisDefault;bh(e,"axisLabel"),bh(e&&e.axisPointer,"label")}),mh(Mh(e.calendar),function(t){_h(t,"itemStyle"),bh(t,"dayLabel"),bh(t,"monthLabel"),bh(t,"yearLabel")}),mh(Mh(e.radar),function(t){bh(t,"name")}),mh(Mh(e.geo),function(t){vh(t)&&(Sh(t),mh(Mh(t.regions),function(t){Sh(t)}))}),mh(Mh(e.timeline),function(t){Sh(t),_h(t,"label"),_h(t,"itemStyle"),_h(t,"controlStyle",!0);var e=t.data;L(e)&&E(e,function(t){z(t)&&(_h(t,"label"),_h(t,"itemStyle"))})}),mh(Mh(e.toolbox),function(t){_h(t,"iconStyle"),mh(t.feature,function(t){_h(t,"iconStyle")})}),bh(Ih(e.axisPointer),"label"),bh(Ih(e.tooltip).axisPointer,"label")}function Ah(e){E(Dh,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Dh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ch=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Lh=function(i,t){Th(i,t),i.series=Vo(i.series),E(i.series,function(t){if(z(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var 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)}(t,"itemStyle.color",i)}Ah(t)}}),i.dataRange&&(i.visualMap=i.dataRange),E(Ch,function(t){var e=i[t];e&&(L(e)||(e=[e]),E(e,function(t){Ah(t)}))})};function kh(m){E(m,function(h,c){var d=[],f=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],p=h.data,g=h.isStackedByIndex,e=p.map(t,function(t,e,i){var n,o,a=p.get(h.stackedDimension,i);if(isNaN(a))return f;g?o=p.getRawIndex(i):n=p.get(h.stackedByDimension,i);for(var r=NaN,s=c-1;0<=s;s--){var l=m[s];if(g||(o=l.data.rawIndexOf(l.stackedByDimension,n)),0<=o){var u=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=a&&0<u||a<=0&&u<0){a+=u,r=u;break}}}return d[0]=a,d[1]=r,d});p.hostModel.setData(e),h.data=e})}function Ph(t,e){Uu.isInstance(t)||(t=Uu.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Wu&&(this._offset=0,this._dimSize=e,this._data=i),P(this,Oh[n===Bu?n+"_"+t.seriesLayoutBy:n])}var Nh=Ph.prototype;Nh.pure=!1;var Oh={arrayRows_column:{pure:Nh.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:zh},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:Eh,getItem:Rh,appendData:zh},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 o=this._data;E(t,function(t,e){for(var i=o[e]||(o[e]=[]),n=0;n<(t||[]).length;n++)i.push(t[n])})}},original:{count:Eh,getItem:Rh,appendData:zh},typedArray:{persistent:!(Nh.getSource=function(){return this._source}),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}}};function Eh(){return this._data.length}function Rh(t){return this._data[t]}function zh(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Bh={arrayRows:Vh,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Vh,original:function(t,e,i,n){var o=Wo(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:Vh};function Vh(t,e,i,n){return null!=i?t[i]:t}var Gh={arrayRows:Fh,objectRows:function(t,e,i,n){return Wh(t[e],this._dimensionInfos[e])},keyedColumns:Fh,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&function(t){return Ro(t)&&!(t instanceof Array)}(t)&&(this.hasItemOption=!0),Wh(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}};function Fh(t,e,i,n){return Wh(t[n],this._dimensionInfos[e])}function Wh(t,e){var i=e&&e.type;if("ordinal"!==i)return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Yl(t)),null==t||""===t?NaN:+t;var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}function Hh(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),Bh[r](n,e,a,o)}}}function Zh(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===zu||n===Vu){var o=t.getRawDataItem(e);return n!==zu||z(o)||(o=null),o?o[i]:void 0}}}var Uh=/\{@(.+?)\}/g,Xh={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"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=Qo(u&&u.get("renderMode")),c=this.mainType,d="series"===c,f=i.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:hu({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(n,t,e,i,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(n),s=this.getDataParams(n,e);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?lu(l,s).replace(Uh,function(t,e){var i=e.length;return"["===e.charAt(0)&&"]"===e.charAt(i-1)&&(e=+e.slice(1,i-1)),Hh(a,n,e)}):void 0},getRawValue:function(t,e){return Hh(this.getData(e),t)},formatTooltip:function(){}};function Yh(t){return new jh(t)}function jh(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var qh=jh.prototype;qh.perform=function(t){var e,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),this._plan&&!n&&(e=this._plan(this.context));var a,r=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return 1<=t||(t=1),t}r===l&&s===u||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,a=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),L(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),n}(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&&(a||d<f)){var p=this._progress;if(L(p))for(var g=0;g<p.length;g++)ac(this,p[g],d,f,l,u);else ac(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 Kh,$h,Jh,Qh,tc,ec,ic=ec={reset:function(t,e,i,n){$h=t,Kh=e,Jh=i,Qh=n,tc=Math.ceil(Qh/Jh),ec.next=1<Jh&&0<Qh?oc:nc}};function nc(){return $h<Kh?$h++:null}function oc(){var t=$h%tc*Jh+Math.ceil($h/tc),e=Kh<=$h?null:t<Qh?t:$h;return $h++,e}function ac(t,e,i,n,o,a){ic.reset(i,n,o,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:ic.next},t.context)}qh.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},qh.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},qh.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},qh.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},qh.getUpstream=function(){return this._upstream},qh.getDownstream=function(){return this._downstream},qh.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var rc=jo(),sc=ku.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Yh({count:uc,reset:hc}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),ju(this);var o=this.getInitialData(t,i);dc(o,this),this.dataTask.context.data=o,rc(this).dataBeforeProcessed=o,lc(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{},o=this.subType;ku.hasClass(o)&&(o+="Series"),m(t,e.getTheme().get(this.subType)),m(t,this.getDefaultOption()),Go(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Mu(t,n,i)},mergeOption:function(t,e){t=m(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&Mu(this.option,t,i),ju(this);var n=this.getInitialData(t,e);dc(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,rc(this).dataBeforeProcessed=n,lc(this)},fillDataTextStyle:function(t){if(t&&!V(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Go(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=pc(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return rc(this).data},setData:function(t){var e=pc(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)}rc(this).data=t},getSource:function(){return function(t){return Yu(t).source}(this)},getRawData:function(){return rc(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(o,h,t,c){var d=this,e="html"===(c=c||"html")?"<br/>":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:au(tu(t)),style:p}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,r=this.getRawValue(o),s=L(r),v=m.getItemVisual(o,"color");z(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1<n||s&&!n?function(t){var l=S(t,function(t,e,i){var n=m.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),u=[];function e(t,e){var i=m.getDimensionInfo(e);if(i&&!1!==i.otherDims.tooltip){var n=i.type,o="sub"+d.seriesIndex+"at"+g,a=hu({color:v,type:"subItem",renderMode:c,markerId:o}),r="string"==typeof a?a:a.content,s=(l?r+au(i.displayName||"-")+": ":"")+au("ordinal"===n?t+"":"time"===n?h?"":du("yyyy/MM/dd hh:mm:ss",t):tu(t));s&&u.push(s),f&&(p[o]=v,++g)}}a.length?E(a,function(t){e(Hh(m,o,t),t)}):E(t,e);var i=l?f?"\n":"<br/>":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Hh(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hu({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(o),_=this.name;Uo(this)||(_=""),_=_?au(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?au(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=Ru.getColorFromPalette.call(this,t,e,i);return o=o||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function lc(t){var e=t.name;Uo(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function uc(t){return t.model.getRawData().count()}function hc(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cc}function cc(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function dc(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(fc,i))})}function fc(t){var e=pc(t);e&&e.setOutputEnd(this.count())}function pc(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}}b(sc,Xh),b(sc,Ru);var gc=function(){this.group=new Ci,this.uid=Nl("viewComponent")};gc.prototype={constructor:gc,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var mc=gc.prototype;mc.updateView=mc.updateLayout=mc.updateVisual=function(t,e,i,n){},oa(gc),ua(gc,{registerWhenExtend:!0});function vc(){var s=jo();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.progressiveRender,a=e.large=i&&i.large,r=e.progressiveRender=i&&i.progressiveRender;return!!(n^a||o^r)&&"reset"}}var yc=jo(),xc=vc();function _c(){this.group=new Ci,this.uid=Nl("viewChart"),this.renderTask=Yh({plan:Mc,reset:Ic}),this.renderTask.context={view:this}}var wc=_c.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Sc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Sc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function bc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Qs(t)))for(var n=0,o=t.childCount();n<o;n++)bc(t.childAt(n),e,i)}function Sc(e,t,i){var n=Yo(e,t),o=t&&null!=t.highlightKey?tl(t.highlightKey):null;null!=n?E(Vo(n),function(t){bc(e.getItemGraphicEl(t),i,o)}):e.eachItemGraphicEl(function(t){bc(t,i,o)})}function Mc(t){return xc(t.model)}function Ic(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&yc(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,o),Tc[l]}wc.updateView=wc.updateLayout=wc.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},oa(_c),ua(_c,{registerWhenExtend:!0}),_c.markUpdateMethod=function(t,e){yc(t).updateMethod=e};var Tc={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)}}},Ac="\0__throttleOriginMethod",Dc="\0__throttleRate",Cc="\0__throttleType";function Lc(t,i,n){var o,a,r,s,l,u=0,h=0,c=null;function d(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}i=i||0;function e(){o=(new Date).getTime(),r=this,s=arguments;var t=l||i,e=l||n;l=null,a=o-(e?u:h)-t,clearTimeout(c),e?c=setTimeout(d,t):0<=a?d():c=setTimeout(d,-a),u=o}return e.clear=function(){c&&(clearTimeout(c),c=null)},e.debounceNextCall=function(t){l=t},e}function kc(t,e,i,n){var o=t[e];if(o){var a=o[Ac]||o,r=o[Cc];if(o[Dc]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Lc(a,i,"debounce"===n))[Ac]=a,o[Cc]=n,o[Dc]=i}return o}}function Pc(t,e){var i=t[e];i&&i[Ac]&&(t[e]=i[Ac])}var Nc={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),n=e.get(a),o=!C(n)||n instanceof cs?null:n;n&&!o||(n=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",n);var r=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(r);if(i.setVisual("borderColor",s),!t.isSeriesFiltered(e)){o&&i.each(function(t){i.setItemVisual(t,"color",o(e.getDataParams(t)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),n=i.get(a,!0),o=i.get(r,!0);null!=n&&t.setItemVisual(e,"color",n),null!=o&&t.setItemVisual(e,"borderColor",o)}:null}}}},Oc={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:"閺侊絿鍋i崶锟�",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:"閸ユ崘銆冪猾璇茬�烽弰鐦俿eriesType}閿涘矁銆冪粈绨晄eriesName}閵嗭拷",withoutName:"閸ユ崘銆冪猾璇茬�烽弰鐦俿eriesType}閵嗭拷"},multiple:{prefix:"鐎瑰啰鏁眥seriesCount}娑擃亜娴樼悰銊ч兇閸掓绮嶉幋鎰┾偓锟�",withName:"缁楃憡seriesId}娑擃亞閮撮崚妤佹Ц娑撯偓娑擃亣銆冪粈绨晄eriesName}閻ㄥ墦seriesType}閿涳拷",withoutName:"缁楃憡seriesId}娑擃亞閮撮崚妤佹Ц娑撯偓娑撶崊seriesType}閿涳拷",separator:{middle:"閿涳拷",end:"閵嗭拷"}}},data:{allData:"閸忚埖鏆熼幑顔芥Ц閳ユ柡鈧拷",partialData:"閸忔湹鑵戦敍灞藉{displayCnt}妞よ妲搁垾鏂衡偓锟�",withName:"{name}閻ㄥ嫭鏆熼幑顔芥Ц{value}",withoutName:"{value}",separator:{middle:"閿涳拷",end:""}}}},Ec=function(t,e){var a=e.getModel("aria");if(a.get("show"))if(a.get("description"))t.setAttribute("aria-label",a.get("description"));else{var h=0;e.eachSeries(function(t,e){++h},this);var i,c=a.get("data.maxCount")||10,n=a.get("series.maxCount")||10,d=Math.min(h,n);if(!(h<1)){var o=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();i=o?p(g("general.withTitle"),{title:o}):g("general.withoutTitle");var f=[];i+=p(g(1<h?"series.multiple.prefix":"series.single.prefix"),{seriesCount:h}),e.eachSeries(function(t,e){if(e<d){var i,n=t.get("name"),o="series."+(1<h?"multiple":"single")+".";i=p(i=g(n?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:function(t){return Oc.series.typeNames[t]||"閼奉亜鐣炬稊澶婃禈"}(t.subType)});var a=t.getData();(window.data=a).count()>c?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;s<a.count();s++)if(s<c){var l=a.getName(s),u=Hh(a,s);r.push(p(g(l?"data.withName":"data.withoutName"),{name:l,value:u}))}i+=r.join(g("data.separator.middle"))+g("data.separator.end"),f.push(i)}}),i+=f.join(g("series.multiple.separator.middle"))+g("series.multiple.separator.end"),t.setAttribute("aria-label",i)}}function p(t,e){if("string"!=typeof t)return t;var i=t;return E(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function g(t){var e=a.get(t);if(null!=e)return e;for(var i=t.split("."),n=Oc.aria,o=0;o<i.length;++o)n=n[i[o]];return n}},Rc=Math.PI;function zc(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=Q()}var Bc=zc.prototype;function Vc(l,t,u,h,c){var d;function f(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}c=c||{},E(t,function(n,t){if(!c.visualType||c.visualType===n.visualType){var e=l._stageTaskMap.get(n.uid),i=e.seriesTaskMap,o=e.overallTask;if(o){var a,r=o.agentStubMap;r.each(function(t){f(c,t)&&(t.dirty(),a=!0)}),a&&o.dirty(),Gc(o,h);var s=l.getPerformArgs(o,c.block);r.each(function(t){t.perform(s)}),d|=o.perform(s)}else i&&i.each(function(t,e){f(c,t)&&t.dirty();var i=l.getPerformArgs(t,c.block);i.skip=!n.performRawSeries&&u.isSeriesFiltered(t.context.model),Gc(t,h),d|=t.perform(i)})}}),l.unfinished|=d}Bc.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Bc.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}}},Bc.getPipeline=function(t){return this._pipelineMap.get(t)},Bc.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}},Bc.restorePipelines=function(t){var n=this,o=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Kc(n,t,t.dataTask)})},Bc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=o.seriesType,i=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Yh({plan:Uc,reset:Xc,count:qc}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},Kc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){var a=e.overallTask=e.overallTask||Yh({reset:Fc});a.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var r=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,o).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Yh({reset:Wc,onDirty:Zc})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,Kc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,n,o)},this)},Bc.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,Kc(this,e,o)},Bc.performDataProcessorTasks=function(t,e){Vc(this,this._dataProcessorHandlers,t,e,{block:!0})},Bc.performVisualTasks=function(t,e,i){Vc(this,this._visualHandlers,t,e,i)},Bc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Bc.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 Gc=Bc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Fc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Wc(t,e){return t.overallProgress&&Hc}function Hc(){this.agent.dirty(),this.getDownstream().dirty()}function Zc(){this.agent&&this.agent.dirty()}function Uc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Xc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Vo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?O(e,function(t,e){return jc(e)}):Yc}var Yc=jc(0);function jc(a){return function(t,e){var i=e.data,n=e.resetDefines[a];if(n&&n.dataEach)for(var o=t.start;o<t.end;o++)n.dataEach(i,o);else n&&n.progress&&n.progress(t,i)}}function qc(t){return t.data.count()}function Kc(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).__idxInPipeline=o.count++,i.__pipeline=o}zc.wrapStageHandler=function(t,e){return C(t)&&(t={overallReset:t,seriesType:function(t){$c=null;try{t(Jc,Qc)}catch(t){}return $c}(t)}),t.uid=Nl("stageHandler"),e&&(t.visualType=e),t};var $c,Jc={},Qc={};function td(t,e){for(var i in e.prototype)t[i]=et}td(Jc,ih),td(Qc,rh),Jc.eachSeriesByType=Jc.eachRawSeriesByType=function(t){$c=t},Jc.eachComponent=function(t){"series"===t.mainType&&t.subType&&($c=t.subType)};function ed(){return{axisLine:{lineStyle:{color:od}},axisTick:{lineStyle:{color:od}},axisLabel:{textStyle:{color:od}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:od}}}}var id=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],nd={color:id,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],id]},od="#eee",ad=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],rd={color:ad,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:od},crossStyle:{color:od},label:{color:"#000"}}},legend:{textStyle:{color:od}},textStyle:{color:od},title:{textStyle:{color:od}},toolbox:{iconStyle:{normal:{borderColor:od}}},dataZoom:{textStyle:{color:od}},visualMap:{textStyle:{color:od}},timeline:{lineStyle:{color:od},itemStyle:{normal:{color:ad[1]}},label:{normal:{textStyle:{color:od}}},controlStyle:{normal:{color:od,borderColor:od}}},timeAxis:ed(),logAxis:ed(),valueAxis:ed(),categoryAxis:ed(),line:{symbol:"circle"},graph:{color:ad},gauge:{title:{textStyle:{color:od}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};rd.categoryAxis.splitLine.show=!1,ku.extend({type:"dataset",defaultOption:{seriesLayoutBy:Hu,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=Fu;if(V(e))i=Wu;else if(L(e)){0===e.length&&(i=Bu);for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(L(a)){i=Bu;break}if(z(a)){i=Vu;break}}}}else if(z(e)){for(var r in e)if(e.hasOwnProperty(r)&&N(e[r])){i=Gu;break}}else if(null!=e)throw new Error("Invalid data");Yu(t).sourceFormat=i}(this)}}),gc.extend({type:"dataset"});var sd=Ar.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.rx,a=e.ry,r=.5522848*o,s=.5522848*a;t.moveTo(i-o,n),t.bezierCurveTo(i-o,n-s,i-r,n-a,i,n-a),t.bezierCurveTo(i+r,n-a,i+o,n-s,i+o,n),t.bezierCurveTo(i+o,n+s,i+r,n+a,i,n+a),t.bezierCurveTo(i-r,n+a,i-o,n+s,i-o,n),t.closePath()}}),ld=/[\s,]+/;function ud(t){R(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function hd(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}hd.prototype.parse=function(t,e){e=e||{};var i=ud(t);if(!i)throw new Error("Illegal svg");var n=new Ci;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),md(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(o){var h=j(o).split(ld);4<=h.length&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=r&&(l=wd(s,a,r),!e.ignoreViewBox)){var c=n;(n=new Ci).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new rs({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:s,viewBoxTransform:l}},hd.prototype._parseNode=function(t,e){var i,n,o=t.nodeName.toLowerCase();if("defs"===o?this._isDefine=!0:"text"===o&&(this._isText=!0),this._isDefine){if(n=dd[o]){var a=n.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=a)}}else(n=cd[o])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===o?this._isDefine=!1:"text"===o&&(this._isText=!1)},hd.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new Ur({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});fd(e,o),md(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var cd={g:function(t,e){var i=new Ci;return fd(e,i),md(t,i,this._defs),i},rect:function(t,e){var i=new rs;return fd(e,i),md(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new Yr;return fd(e,i),md(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new ls;return fd(e,i),md(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new sd;return fd(e,i),md(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i=i&&pd(i);var n=new Qr({shape:{points:i||[]}});return fd(e,n),md(t,n,this._defs),n},polyline:function(t,e){var i=new Ar;fd(e,i),md(t,i,this._defs);var n=t.getAttribute("points");return n=n&&pd(n),new ts({shape:{points:n||[]}})},image:function(t,e){var i=new Qn;return fd(e,i),md(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new Ci;return fd(e,r),md(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new Ci;return fd(e,r),md(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Zr(t.getAttribute("d")||"");return fd(e,i),md(t,i,this._defs),i}},dd={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new gs(e,i,n,o);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=0<n.indexOf("%")?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function fd(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),D(e.__inheritedStyle,t.__inheritedStyle))}function pd(t){for(var e=j(t).split(ld),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([o,a])}return i}var gd={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-align":"textAlign","alignment-baseline":"textBaseline"};function md(t,e,i,n){var o=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,o=[];i.replace(xd,function(t,e,i){o.push(e,i)});for(var a=o.length-1;0<a;a-=2){var r=o[a],s=o[a-1];switch(n=n||ae(),s){case"translate":r=j(r).split(ld),ue(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=j(r).split(ld),ce(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=j(r).split(ld),he(n,n,parseFloat(r[0]));break;case"skew":r=j(r).split(ld),console.warn("Skew transform is not supported yet");break;case"matrix":r=j(r).split(ld);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}(t,e),P(o,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,o={};_d.lastIndex=0;for(;null!=(n=_d.exec(e));)o[n[1]]=n[2];for(var a in gd)gd.hasOwnProperty(a)&&null!=o[a]&&(i[gd[a]]=o[a]);return i}(t)),!n))for(var r in gd)if(gd.hasOwnProperty(r)){var s=t.getAttribute(r);null!=s&&(o[gd[r]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Ui;var h=e.style;null!=o.fill&&h.set(l,yd(o.fill,i)),null!=o.stroke&&h.set(u,yd(o.stroke,i)),E(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=o[t]&&h.set(e,parseFloat(o[t]))}),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),E(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=o[t]&&h.set(t,o[t])}),o.lineDash&&(e.style.lineDash=j(o.lineDash).split(ld)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=o}var vd=/url\(\s*#(.*?)\)/;function yd(t,e){var i=e&&t&&t.match(vd);return i?e[j(i[1])]:t}var xd=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var _d=/([^\s:;]+)\s*:\s*([^:;]+)/g;function wd(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}var bd=Q(),Sd={registerMap:function(t,e,i){var n;return E(n=L(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:i}]),function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Md[e])(t)}),bd.set(t,n)},retrieveMap:function(t){return bd.get(t)}},Md={geoJSON:function(t){var e=t.source;t.geoJSON=R(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=ud(t.source)}},Id=Y,Td=E,Ad=C,Dd=z,Cd=ku.parseClassType,Ld={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},kd="__flagInMainProcess",Pd="__optionUpdated",Nd=/^[a-zA-Z0-9_]+$/;function Od(n,o){return function(t,e,i){!o&&this._disposed||(t=t&&t.toLowerCase(),Ct.prototype[n].call(this,t,e,i))}}function Ed(){Ct.call(this)}function Rd(t,e,i){i=i||{},"string"==typeof e&&(e=sf[e]),this.id,this.group,this._dom=t;var n=this._zr=ko(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Lc(A(n.flush,n),17),(e=k(e))&&Lh(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new lh;var o=this._api=function(i){var t=i._coordSysMgr;return P(new rh(i),{getCoordinateSystems:A(t.getCoordinateSystems,t),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return i._model.getComponent(e.mainType,e.index);t=t.parent}}})}(this);function a(t,e){return t.__prio-e.__prio}zi(rf,a),zi(nf,a),this._scheduler=new zc(this,o,nf,rf),Ct.call(this,this._ecEventProcessor=new Qd),this._messageCenter=new Ed,this._initEvents(),this.resize=A(this.resize,this),this._pendingActions=[],n.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[Pd]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}(n,this),K(this)}Ed.prototype.on=Od("on",!0),Ed.prototype.off=Od("off",!0),Ed.prototype.one=Od("one",!0),b(Ed,Ct);var zd=Rd.prototype;function Bd(t,e,i){if(!this._disposed){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Ko(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}}}zd._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Pd]){var e=this[Pd].silent;this[kd]=!0,Gd(this),Vd.update.call(this),this[kd]=!1,this[Pd]=!1,Zd.call(this,e),Ud.call(this,e)}else if(t.unfinished){var i=1,n=this._model,o=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Wd(this,n),t.performVisualTasks(n),qd(this,this._model,o,"remain"),i-=+new Date-a}while(0<i&&t.unfinished);t.unfinished||this._zr.flush()}}},zd.getDom=function(){return this._dom},zd.getZr=function(){return this._zr},zd.setOption=function(t,e,i){if(!this._disposed){var n;if(Dd(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[kd]=!0,!this._model||e){var o=new ph(this._api),a=this._theme,r=this._model=new ih;r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,of),i?(this[Pd]={silent:n},this[kd]=!1):(Gd(this),Vd.update.call(this),this._zr.flush(),this[Pd]=!1,this[kd]=!1,Zd.call(this,n),Ud.call(this,n))}},zd.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},zd.getModel=function(){return this._model},zd.getOption=function(){return this._model&&this._model.getOption()},zd.getWidth=function(){return this._zr.getWidth()},zd.getHeight=function(){return this._zr.getHeight()},zd.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},zd.getRenderedCanvas=function(t){if(v.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},zd.getSvgDataURL=function(){if(v.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.toDataURL()}},zd.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;Td(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 Td(n,function(t){t.group.ignore=!1}),a}},zd.getConnectedDataURL=function(o){if(!this._disposed&&v.canvasSupported){var a="svg"===o.type,r=this.group,s=Math.min,l=Math.max;if(hf[r]){var u=1/0,h=1/0,c=-1/0,d=-1/0,f=[],i=o&&o.pixelRatio||1;E(uf,function(t,e){if(t.group===r){var i=a?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(k(o)),n=t.getDom().getBoundingClientRect();u=s(n.left,u),h=s(n.top,h),c=l(n.right,c),d=l(n.bottom,d),f.push({dom:i,left:n.left,top:n.top})}});var t=(c*=i)-(u*=i),e=(d*=i)-(h*=i),n=y(),p=ko(n,{renderer:a?"svg":"canvas"});if(p.resize({width:t,height:e}),a){var g="";return Td(f,function(t){var e=t.left-u,i=t.top-h;g+='<g transform="translate('+e+","+i+')">'+t.dom+"</g>"}),p.painter.getSvgRoot().innerHTML=g,o.connectedBackgroundColor&&p.painter.setBackgroundColor(o.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return o.connectedBackgroundColor&&p.add(new rs({shape:{x:0,y:0,width:t,height:e},style:{fill:o.connectedBackgroundColor}})),Td(f,function(t){var e=new Qn({style:{x:t.left*i-u,y:t.top*i-h,image:t.dom}});p.add(e)}),p.refreshImmediately(),n.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},zd.convertToPixel=T(Bd,"convertToPixel"),zd.convertFromPixel=T(Bd,"convertFromPixel"),zd.containPixel=function(t,o){var a;if(!this._disposed)return E(t=Ko(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)a|=!!e.containPoint(o);else if("seriesModels"===n){var i=this._chartsMap[t.__viewId];i&&i.containPoint&&(a|=i.containPoint(o,t))}},this)},this),!!a},zd.getVisual=function(t,e){var i=(t=Ko(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)},zd.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},zd.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Vd={prepareAndUpdate:function(t){Gd(this),Vd.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),Wd(this,e),o.update(e,i),Yd(e),a.performVisualTasks(e,t),jd(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(v.canvasSupported)n.setBackgroundColor(r);else{var s=Fe(r);r=$e(s,"rgb"),0===s[3]&&(r="transparent")}Kd(e,i)}},updateTransform:function(o){var a=this._model,r=this,s=this._api;if(a){var l=[];a.eachComponent(function(t,e){var i=r.getViewOfComponentModel(e);if(i&&i.__alive)if(i.updateTransform){var n=i.updateTransform(e,a,s,o);n&&n.update&&l.push(i)}else l.push(i)});var n=Q();a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];if(e.updateTransform){var i=e.updateTransform(t,a,s,o);i&&i.update&&n.set(t.uid,1)}else n.set(t.uid,1)}),Yd(a),this._scheduler.performVisualTasks(a,o,{setDirty:!0,dirtyMap:n}),qd(r,a,s,o,n),Kd(a,this._api)}},updateView:function(t){var e=this._model;e&&(_c.markUpdateMethod(t,"updateView"),Yd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),jd(this,this._model,this._api,t),Kd(e,this._api))},updateVisual:function(t){Vd.update.call(this,t)},updateLayout:function(t){Vd.update.call(this,t)}};function Gd(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Xd(t,"component",e,i),Xd(t,"chart",e,i),i.plan()}function Fd(e,i,n,o,t){var a=e._model;if(o){var r={};r[o+"Id"]=n[o+"Id"],r[o+"Index"]=n[o+"Index"],r[o+"Name"]=n[o+"Name"];var s={mainType:o,query:r};t&&(s.subType=t);var l=n.excludeSeriesId;null!=l&&(l=Q(Vo(l))),a&&a.eachComponent(s,function(t){l&&null!=l.get(t.id)||u(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else Td(e._componentsViews.concat(e._chartsViews),u);function u(t){t&&t.__alive&&t[i]&&t[i](t.__model,a,e._api,n)}}function Wd(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Hd(e,t){var i=e.type,n=e.escapeConnect,o=tf[i],a=o.actionInfo,r=(a.update||"update").split(":"),s=r.pop();r=null!=r[0]&&Cd(r[0]),this[kd]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=O(e.batch,function(t){return(t=D(P({},t),e)).batch=null,t}));var h,c=[],d="highlight"===i||"downplay"===i;Td(l,function(t){(h=(h=o.action(t,this._model,this._api))||P({},t)).type=a.event||h.type,c.push(h),d?Fd(this,s,t,"series"):r&&Fd(this,s,t,r.main,r.sub)},this),"none"===s||d||r||(this[Pd]?(Gd(this),Vd.update.call(this,e),this[Pd]=!1):Vd[s].call(this,e)),h=u?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[kd]=!1,t||this._messageCenter.trigger(h.type,h)}function Zd(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Hd.call(this,i,t)}}function Ud(t){t||this.trigger("updated")}function Xd(t,e,o,a){for(var r="component"===e,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;i<s.length;i++)s[i].__alive=!1;function n(t){var e="_ec_"+t.id+"_"+t.type,i=l[e];if(!i){var n=Cd(t.type);(i=new(r?gc.getClass(n.main,n.sub):_c.getClass(n.sub))).init(o,h),l[e]=i,s.push(i),u.add(i.group)}t.__viewId=i.__id=e,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||a.prepareView(i,t,o,h)}r?o.eachComponent(function(t,e){"series"!==t&&n(e)}):o.eachSeries(n);for(i=0;i<s.length;){var c=s[i];c.__alive?i++:(r||c.renderTask.dispose(),u.remove(c.group),c.dispose(o,h),s.splice(i,1),delete l[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Yd(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function jd(t,e,i,n){!function(t,i,n,o,e){Td(e||t._componentsViews,function(t){var e=t.__model;t.render(e,i,n,o),Jd(e,t)})}(t,e,i,n),Td(t._chartsViews,function(t){t.__alive=!1}),qd(t,e,i,n),Td(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function qd(n,t,e,o,a){var r,s=n._scheduler;t.eachSeries(function(t){var e=n._chartsMap[t.__viewId];e.__alive=!0;var i=e.renderTask;s.updatePayload(i,o),a&&a.get(t.uid)&&i.dirty(),r|=i.perform(s.getPerformArgs(i)),e.group.silent=!!t.get("silent"),Jd(t,e),function(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)})})}(t,e)}),s.unfinished|=r,function(i,t){var e=i._zr.storage,n=0;e.traverse(function(t){n++}),n>t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),Ec(n._zr.dom,t)}function Kd(e,i){Td(af,function(t){t(e,i)})}zd.resize=function(t){if(!this._disposed){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[kd]=!0,i&&Gd(this),Vd.update.call(this),this[kd]=!1,Zd.call(this,n),Ud.call(this,n)}}},zd.showLoading=function(t,e){if(!this._disposed&&(Dd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),lf[t])){var i=lf[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},zd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},zd.makeActionFromEvent=function(t){var e=P({},t);return e.type=ef[t.type],e},zd.dispatchAction=function(t,e){this._disposed||(Dd(e)||(e={silent:!!e}),tf[t.type]&&this._model&&(this[kd]?this._pendingActions.push(t):(Hd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Zd.call(this,e.silent),Ud.call(this,e.silent))))},zd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},zd.on=Od("on",!1),zd.off=Od("off",!1),zd.one=Od("one",!1);var $d=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Jd(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 Qd(){this.eventInfo}zd._initEvents=function(){Td($d,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=P({},n.eventData));if(e){var a=e.componentType,r=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",r=e.seriesIndex);var s=a&&null!=r&&i.getComponent(a,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),Td(ef,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},zd.isDisposed=function(){return this._disposed},zd.clear=function(){this._disposed||this.setOption({series:[]},!0)},zd.dispose=function(){if(!this._disposed){this._disposed=!0,Jo(this.getDom(),ff,"");var e=this._api,i=this._model;Td(this._componentsViews,function(t){t.dispose(i,e)}),Td(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete uf[this.id]}},b(Rd,Ct),Qd.prototype={constructor:Qd,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=Cd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;n<h.length;n++){var o=h[n],a=e.lastIndexOf(o);if(0<a&&a===e.length-o.length){var r=e.slice(0,a);"data"!==r&&(s.mainType=r,s[o.toLowerCase()]=t,i=!0)}}c.hasOwnProperty(e)&&(l[e]=t,i=!0),i||(u[e]=t)})}return{cptQuery:s,dataQuery:l,otherQuery:u}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var o=n.targetEl,a=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,r,"mainType")&&h(l,r,"subType")&&h(l,r,"index","componentIndex")&&h(l,r,"name")&&h(l,r,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var tf={},ef={},nf=[],of=[],af=[],rf=[],sf={},lf={},uf={},hf={},cf=new Date-0,df=new Date-0,ff="_echarts_instance_";function pf(t){hf[t]=!1}var gf=pf;function mf(t){return uf[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,ff)]}function vf(t,e){sf[t]=e}function yf(t){of.push(t)}function xf(t,e){Mf(nf,t,e,1e3)}function _f(t,e,i){"function"==typeof e&&(i=e,e="");var n=Dd(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Id(Nd.test(n)&&Nd.test(e)),tf[n]||(tf[n]={action:i,actionInfo:t}),ef[e]=n}function wf(t,e){lh.register(t,e)}function bf(t,e){Mf(rf,t,e,1e3,"layout")}function Sf(t,e){Mf(rf,t,e,3e3,"visual")}function Mf(t,e,i,n,o){(Ad(e)||Dd(e))&&(i=e,e=n);var a=zc.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function If(t,e){lf[t]=e}function Tf(t){return ku.extend(t)}function Af(t){return gc.extend(t)}function Df(t){return sc.extend(t)}function Cf(t){return _c.extend(t)}Sf(2e3,Nc),yf(Lh),xf(900,function(t){var a=Q();t.eachSeries(function(t){var e=t.get("stack");if(e){var i=a.get(e)||a.set(e,[]),n=t.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),a.each(kh)}),If("default",function(o,a){D(a=a||{},{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Ci,r=new rs({style:{fill:a.maskColor},zlevel:a.zlevel,z:1e4});t.add(r);var s=a.fontSize+" sans-serif",l=new rs({style:{fill:"none",text:a.text,font:s,textPosition:"right",textDistance:10,textFill:a.textColor},zlevel:a.zlevel,z:10001});if(t.add(l),a.showSpinner){var u=new fs({shape:{startAngle:-Rc/2,endAngle:-Rc/2+.1,r:a.spinnerRadius},style:{stroke:a.color,lineCap:"round",lineWidth:a.lineWidth},zlevel:a.zlevel,z:10001});u.animateShape(!0).when(1e3,{endAngle:3*Rc/2}).start("circularInOut"),u.animateShape(!0).when(1e3,{startAngle:3*Rc/2}).delay(300).start("circularInOut"),t.add(u)}return t.resize=function(){var t=pn(a.text,s),e=a.showSpinner?a.spinnerRadius:0,i=(o.getWidth()-2*e-(a.showSpinner&&t?10:0)-t)/2-(a.showSpinner?0:t/2),n=o.getHeight()/2;a.showSpinner&&u.setShape({cx:i,cy:n}),l.setShape({x:i-e,y:n-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:o.getWidth(),height:o.getHeight()})},t.resize(),t}),_f({type:"highlight",event:"highlight",update:"highlight"},et),_f({type:"downplay",event:"downplay",update:"downplay"},et),vf("light",nd),vf("dark",rd);function Lf(t){return t}function kf(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Lf,this._newKeyGetter=n||Lf,this.context=o}function Pf(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))}}kf.prototype={constructor:kf,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(Pf(t,{},n,"_oldKeyGetter",this),Pf(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=i[r=n[a]]))(u=s.length)?(1===u&&(i[r]=null),s=s.shift()):i[r]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s;if(null==(s=i[r]))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 Nf=Q(["tooltip","label","itemName","itemId","seriesName"]);function Of(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Ef(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Rf(t){null!=t&&P(this,t),this.otherDims={}}var zf=z,Bf="undefined",Vf={float:typeof Float64Array==Bf?Array:Float64Array,int:typeof Int32Array==Bf?Array:Int32Array,ordinal:Array,number:Array,time:Array},Gf=typeof Uint32Array==Bf?Array:Uint32Array,Ff=typeof Int32Array==Bf?Array:Int32Array,Wf=typeof Uint16Array==Bf?Array:Uint16Array;function Hf(t){return 65535<t._rawCount?Gf:Wf}var Zf=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Uf=["_extent","_approximateExtent","_rawExtent"];function Xf(e,i){E(Zf.concat(i.__wrappedMethods||[]),function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e.__wrappedMethods=i.__wrappedMethods,E(Uf,function(t){e[t]=k(i[t])}),e._calculationInfo=P(i._calculationInfo)}var Yf=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;a<t.length;a++){var r=t[a];R(r)?r=new Rf({name:r}):r instanceof Rf||(r=new Rf(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).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=function(n){var t={},a=t.encode={},r=Q(),s=[],l=[],u=t.userOutput={dimensionNames:n.dimensions.slice(),encode:{}};E(n.dimensions,function(t){var o=n.getDimensionInfo(t),e=o.coordDim;if(e){var i=o.coordDimIndex;Of(a,e)[i]=t,o.isExtraCoord||(r.set(e,1),function(t){return!("ordinal"===t||"time"===t)}(o.type)&&(s[0]=t),Of(u.encode,e)[i]=o.index),o.defaultTooltip&&l.push(t)}Nf.each(function(t,e){var i=Of(a,e),n=o.otherDims[e];null!=n&&!1!==n&&(i[n]=o.name)})});var o=[],h={};r.each(function(t,e){var i=a[e];h[e]=i[0],o=o.concat(i)}),t.dataDimsOnCoord=o,t.encodeFirstDimNotExtra=h;var e=a.label;e&&e.length&&(s=e.slice());var i=a.tooltip;return i&&i.length?l=i.slice():l.length||(l=s.slice()),a.defaultedLabel=s,a.defaultedTooltip=l,t}(this),this._invertedIndicesMap=o,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},jf=Yf.prototype;function qf(t,e,i,n,o){var a=Vf[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new a(Math.min(o-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;c<o;c+=i)t[s].push(new a(Math.min(o-c,i)))}function Kf(o){var a=o._invertedIndicesMap;E(a,function(t,e){var i=o._dimensionInfos[e].ordinalMeta;if(i){t=a[e]=new Ff(i.categories.length);for(var n=0;n<t.length;n++)t[n]=-1;for(n=0;n<o._count;n++)t[o.get(e,n)]=n}})}function $f(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 Jf(t){return t}function Qf(t){return t<this._count&&0<=t?this._indices[t]:-1}function tp(t,e){var i=t._idList[e];return null==i&&(i=$f(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function ep(t){return L(t)||(t=[t]),t}function ip(t,e){var i=t.dimensions,n=new Yf(O(i,t.getDimensionInfo,t),t.hostModel);Xf(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(0<=_(e,s)?(o[s]=np(a[s]),n._rawExtent[s]=op(),n._extent[s]=null):o[s]=a[s])}return n}function np(t){for(var e,i,n=new Array(t.length),o=0;o<t.length;o++)n[o]=(e=t[o],i=void 0,(i=e.constructor)===Array?e.slice():new i(e));return n}function op(){return[1/0,-1/0]}jf.type="list",jf.hasItemOption=!0,jf.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},jf.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},jf.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},jf.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]},jf.initData=function(t,e,i){(Uu.isInstance(t)||N(t))&&(t=new Ph(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=Gh[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Gh.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},jf.getProvider=function(){return this._rawData},jf.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)},jf.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){r[v=o[h]]||(r[v]=op()),n[v]||(n[v]=[]),qf(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Kf(this)},jf._initDataFromProvider=function(t,e){if(!(e<=t)){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=0;p<s;p++){c[w=r[p]]||(c[w]=op());var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),qf(a,g,n,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var w,b=a[w=r[_]][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0<d[C=I]&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},Kf(this)}},jf.count=function(){return this._count},jf.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){o=new e(i);for(var n=0;n<i;n++)o[n]=t[n]}else o=new e(t.buffer,0,i)}else{var o=new(e=Hf(this))(this.count());for(n=0;n<o.length;n++)o[n]=n}return o},jf.get=function(t,e){if(!(0<=e&&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]},jf.getByRawIndex=function(t,e){if(!(0<=e&&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]},jf._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},jf.getValues=function(t,e){var i=[];L(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},jf.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},jf.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=op();if(!e)return i;var n,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],r=n[1],s=0;s<o;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),r<l&&(r=l)}return n=[a,r],this._extent[t]=n},jf.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},jf.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},jf.getCalculationInfo=function(t){return this._calculationInfo[t]},jf.setCalculationInfo=function(t,e){zf(t)?P(this._calculationInfo,t):this._calculationInfo[t]=e},jf.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},jf.getMedian=function(t){var i=[];this.each(t,function(t,e){isNaN(t)||i.push(t)});var e=[].concat(i).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2==1?e[(n-1)/2]:(e[n/2]+e[n/2-1])/2},jf.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},jf.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},jf.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;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=1+a;else{if(!(e[a]>t))return a;o=a-1}}return-1},jf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=i&&((h<o||h===o&&0<=u&&a<0)&&(o=h,a=u,r=0),u===a&&(n[r++]=s))}return n.length=r,n},jf.getRawIndex=Jf,jf.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},jf.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||$f(this,this._nameDimIdx,e)||""},jf.getId=function(t){return tp(this,this.getRawIndex(t))},jf.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=O(ep(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)}}},jf.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=O(ep(t),this.getDimension,this);for(var o=this.count(),a=new(Hf(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 f=this._getFast(u,d);c=e.call(i,f,h)}else{for(var p=0;p<s;p++)r[p]=this._getFast(u,d);r[p]=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?Qf:Jf,this}},jf.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(Hf(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++){(l<=(w=p[m])&&w<=u||isNaN(w))&&(a[r++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m<o;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=u||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?Qf:Jf,this}}},jf.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},jf.map=function(t,e,i,n){i=i||n||this;var o=ip(this,t=O(ep(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?Qf:Jf;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 f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(i,h);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},jf.downSample=function(t,e,i,n){for(var o=ip(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(Hf(this))(u),f=0,p=0;p<u;p+=s){u-p<s&&(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)<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=Qf,o},jf.getItemModel=function(t){var e=this.hostModel;return new Cl(this.getRawDataItem(t),e,e&&e.ecModel)},jf.diff=function(e){var i=this;return new kf(e?e.getIndices():[],this.getIndices(),function(t){return tp(e,t)},function(t){return tp(i,t)})},jf.getVisual=function(t){var e=this._visual;return e&&e[t]},jf.setVisual=function(t,e){if(zf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},jf.setLayout=function(t,e){if(zf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},jf.getLayout=function(t){return this._layout[t]},jf.getItemLayout=function(t){return this._itemLayouts[t]},jf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?P(this._itemLayouts[t]||{},e):e},jf.clearItemLayouts=function(){this._itemLayouts.length=0},jf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},jf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,zf(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},jf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function ap(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function rp(t,e,i){Uu.isInstance(e)||(e=Uu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),l=[],r=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}(e,t,n,i.dimCount),s=0;s<r;s++){var u=n[s]=P({},z(n[s])?n[s]:{name:n[s]}),h=u.name,c=l[s]=new Rf;null!=h&&null==o.get(h)&&(c.name=c.displayName=h,o.set(h,s)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,r)),(d=Q(d)).each(function(t,i){if(1===(t=Vo(t).slice()).length&&!R(t[0])&&t[0]<0)d.set(i,!1);else{var n=d.set(i,[]);E(t,function(t,e){R(t)&&(t=o.get(t)),null!=t&&t<r&&(n[e]=t,p(l[t],i,e))})}});var f=0;function p(t,e,i){null!=Nf.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}E(t,function(o,t){var a,r,s;if(R(o))a=o,o={};else{a=o.name;var e=o.ordinalMeta;o.ordinalMeta=null,(o=k(o)).ordinalMeta=e,r=o.dimsDef,s=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}if(!1!==(i=d.get(a))){var i;if(!(i=Vo(i)).length)for(var n=0;n<(r&&r.length||1);n++){for(;f<l.length&&null!=l[f].coordDim;)f++;f<l.length&&i.push(f++)}E(i,function(t,e){var i=l[t];if(p(D(i,o),a,e),null==i.name&&r){var n=r[e];z(n)||(n={name:n}),i.name=i.displayName=n.name,i.defaultTooltip=n.defaultTooltip}s&&D(i.otherDims,s)})}});var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y,x,_=g||"value",w=0;w<r;w++){null==(c=l[w]=l[w]||new Rf).coordDim&&(c.coordDim=sp(_,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=sp(c.coordDim,o)),null==c.type&&(y=e,x=w,c.name,th(y.data,y.sourceFormat,y.seriesLayoutBy,y.dimensionsDefine,y.startIndex,x)===Xu.Must||c.isExtraCoord&&(null!=c.otherDims.itemName||null!=c.otherDims.seriesName))&&(c.type="ordinal")}return l}function sp(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}jf.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(ap,e)),this._graphicEls[t]=e},jf.getItemGraphicEl=function(t){return this._graphicEls[t]},jf.eachItemGraphicEl=function(i,n){E(this._graphicEls,function(t,e){t&&i&&i.call(n,t,e)})},jf.cloneShallow=function(t){if(!t){var e=O(this.dimensions,this.getDimensionInfo,this);t=new Yf(e,this.hostModel)}if(t._storage=this._storage,Xf(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Qf:Jf,t},jf.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(U(arguments)))})},jf.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],jf.CHANGABLE_METHODS=["filterSelf","selectRange"];var lp=function(t,e){return rp((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function up(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Q(),this.categoryAxisMap=Q(),this.firstCategoryDimIndex=null}var hp={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),cp(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),cp(a)&&(n.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),cp(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),cp(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),cp(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();E(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];a.set(n,i),cp(i)&&null==o.firstCategoryDimIndex&&(r.set(n,i),o.firstCategoryDimIndex=e)})}};function cp(t){return"category"===t.get("type")}function dp(t,i,e){var n,o,a,r,s=(e=e||{}).byIndex,l=e.stackedCoordDimension,u=!(!t||!t.get("stack"));if(E(i,function(t,e){R(t)&&(i[e]=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,d=0;E(i,function(t){t.coordDim===h&&d++}),i.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,i.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:a}}function fp(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function pp(t,e){return fp(t,e)?t.getCalculationInfo("stackResultDimension"):e}function gp(t,e,i){i=i||{},Uu.isInstance(t)||(t=Uu.seriesDataToSource(t));var n,o=e.get("coordinateSystem"),a=lh.get(o),r=function(t){var e=t.get("coordinateSystem"),i=new up(e),n=hp[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}(e);r&&(n=O(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=Ef(n)}return e})),n=n||(a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=lp(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?T($u,n,e):null});r&&E(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=dp(e,u),c=new Yf(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===zu){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!L(Wo(e))}}(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,d),c}function mp(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function vp(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}mp.prototype.parse=function(t){return t},mp.prototype.getSetting=function(t){return this._setting[t]},mp.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},mp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},mp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},mp.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},mp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},mp.prototype.getExtent=function(){return this._extent.slice()},mp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},mp.prototype.isBlank=function(){return this._isBlank},mp.prototype.setBlank=function(t){this._isBlank=t},mp.prototype.getLabel=null,oa(mp),ua(mp,{registerWhenExtend:!0}),vp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&O(i,_p);return new vp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var yp=vp.prototype;function xp(t){return t._map||(t._map=Q(t.categories))}function _p(t){return z(t)&&null!=t.value?t.value:t+""}yp.getOrdinal=function(t){return xp(this).get(t)},yp.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=xp(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var wp=mp.prototype,bp=mp.extend({type:"ordinal",init:function(t,e){t&&!L(t)||(t=new vp({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),wp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return wp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(wp.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});bp.create=function(){return new bp};var Sp=zl;function Mp(t){return Gl(t)+2}function Ip(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Ip(t,0,e),Ip(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Ap=zl,Dp=mp.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]),Dp.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=Mp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push(Ap(n[0]-e,o)):a.push(i[0]));for(var r=n[0];r<=n[1]&&(a.push(r),(r=Ap(r+e,o))!==a[a.length-1]);)if(1e4<a.length)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&(t?a.push(Ap(s+e,o)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;o<e.length;o++){for(var a=e[o],r=e[o-1],s=0,l=[],u=(a-r)/t;s<t-1;){var h=zl(r+(s+1)*u);h>n[0]&&h<n[1]&&l.push(h),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Gl(t)||0:"auto"===i&&(i=this._intervalPrecision),tu(t=Ap(t,i,!0))},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=function(t,e,i,n){var o={},a=t[1]-t[0],r=o.interval=Kl(a/e,!0);null!=i&&r<i&&(r=o.interval=i),null!=n&&n<r&&(r=o.interval=n);var s=o.intervalPrecision=Mp(r);return Tp(o.niceTickExtent=[Sp(Math.ceil(t[0]/r)*r,s),Sp(Math.floor(t[1]/r)*r,s)],t),o}(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[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]=Ap(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=Ap(Math.ceil(e[1]/o)*o))}});Dp.create=function(){return new Dp};var Cp="__ec_stack_",Lp="undefined"!=typeof Float32Array?Float32Array:Array;function kp(t){return t.get("stack")||Cp+t.seriesIndex}function Pp(t){return t.dim+t.index}function Np(t,e){var i=[];return e.eachSeriesByType(t,function(t){Vp(t)&&!Gp(t)&&i.push(t)}),i}function Op(t){var g=function(t){var l={};E(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var i=t.getData(),n=e.dim+"_"+e.index,o=i.mapDimension(e.dim),a=0,r=i.count();a<r;++a){var s=i.get(o,a);l[n]?l[n].push(s):l[n]=[s]}});var e=[];for(var i in l)if(l.hasOwnProperty(i)){var n=l[i];if(n){n.sort(function(t,e){return t-e});for(var o=null,a=1;a<n.length;++a){var r=n[a]-n[a-1];0<r&&(o=null===o?r:Math.min(o,r))}e[i]=o}}return e}(t),m=[];return E(t,function(t){var e,i=t.coordinateSystem.getBaseAxis(),n=i.getExtent();if("category"===i.type)e=i.getBandWidth();else if("value"===i.type||"time"===i.type){var o=i.dim+"_"+i.index,a=g[o],r=Math.abs(n[1]-n[0]),s=i.scale.getExtent(),l=Math.abs(s[1]-s[0]);e=a?r/l*a:r}else{var u=t.getData();e=Math.abs(n[1]-n[0])/u.count()}var h=Rl(t.get("barWidth"),e),c=Rl(t.get("barMaxWidth"),e),d=Rl(t.get("barMinWidth")||1,e),f=t.get("barGap"),p=t.get("barCategoryGap");m.push({bandWidth:e,barWidth:h,barMaxWidth:c,barMinWidth:d,barGap:f,barCategoryGap:p,axisKey:Pp(i),stackId:kp(t)})}),Ep(m)}function Ep(t){var d={};E(t,function(t,e){var i=t.axisKey,n=t.bandWidth,o=d[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;d[i]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var u=t.barMinWidth;u&&(a[r].minWidth=u);var h=t.barGap;null!=h&&(o.gap=h);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var f={};return E(d,function(t,i){f[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,r-=n+a*n,s--}else{var n=l;e&&e<n&&(n=Math.min(e,r)),i&&n<i&&(n=i),n!==l&&(t.width=n,r-=n+a*n,s--)}}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;E(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;E(e,function(t,e){f[i][e]=f[i][e]||{bandWidth:n,offset:c,width:t.width},c+=t.width*(1+a)})}),f}function Rp(t,e,i){if(t&&e){var n=t[Pp(e)];return null!=n&&null!=i&&(n=n[kp(i)]),n}}function zp(t,e){var i=Np(t,e),T=Op(i),A={};E(i,function(t){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=kp(t),a=T[Pp(n)][o],r=a.offset,s=a.width,l=i.getOtherAxis(n),u=t.get("barMinHeight")||0;A[o]=A[o]||[],e.setLayout({bandWidth:a.bandWidth,offset:r,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(n.dim),d=fp(e,h),f=l.isHorizontal(),p=Fp(n,l,d),g=0,m=e.count();g<m;g++){var v,y,x,_,w,b=e.get(h,g),S=e.get(c,g),M=0<=b?"p":"n",I=p;if(d&&(A[o][S]||(A[o][S]={p:p,n:p}),I=A[o][S][M]),f)v=I,y=(w=i.dataToPoint([b,S]))[1]+r,x=w[0]-p,_=s,Math.abs(x)<u&&(x=(x<0?-1:1)*u),isNaN(x)||d&&(A[o][S][M]+=x);else v=(w=i.dataToPoint([S,b]))[0]+r,y=I,x=s,_=w[1]-p,Math.abs(_)<u&&(_=(_<=0?-1:1)*u),isNaN(_)||d&&(A[o][S][M]+=_);e.setItemLayout(g,{x:v,y:y,width:x,height:_})}},this)}var Bp={seriesType:"bar",plan:vc(),reset:function(t){if(Vp(t)&&Gp(t)){var e=t.getData(),c=t.coordinateSystem,d=c.grid.getRect(),f=c.getBaseAxis(),p=c.getOtherAxis(f),g=e.mapDimension(p.dim),m=e.mapDimension(f.dim),v=p.isHorizontal(),y=v?0:1,x=Rp(Op([t]),f,t).width;return.5<x||(x=.5),{progress:function(t,e){var i,n=t.count,o=new Lp(2*n),a=new Lp(2*n),r=new Lp(n),s=[],l=[],u=0,h=0;for(;null!=(i=t.next());)l[y]=e.get(g,i),l[1-y]=e.get(m,i),s=c.dataToPoint(l,null,s),a[u]=v?d.x+d.width:s[0],o[u++]=s[0],a[u]=v?s[1]:d.y+d.height,o[u++]=s[1],r[h++]=i;e.setLayout({largePoints:o,largeDataIndices:r,largeBackgroundPoints:a,barWidth:x,valueAxisStart:Fp(f,p,!1),backgroundStart:v?d.x:d.y,valueAxisHorizontal:v})}}}}};function Vp(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Gp(t){return t.pipelineContext&&t.pipelineContext.large}function Fp(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Wp=Dp.prototype,Hp=Math.ceil,Zp=Math.floor,Up=36e5,Xp=864e5,Yp=Dp.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return du(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Xp,e[1]+=Xp),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]-Xp}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=zl(Zp(e[0]/n)*n)),t.fixMax||(e[1]=zl(Hp(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&&i<a&&(a=i);var r=jp.length,s=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=1+o:n=o}return i}(jp,a,0,r),l=jp[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Kl(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(Hp((n[0]-h)/u)*u+h),Math.round(Zp((n[1]-h)/u)*u+h)];Tp(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yl(t)}});E(["contain","normalize"],function(e){Yp.prototype[e]=function(t){return Wp[e].call(this,this.parse(t))}});var jp=[["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",Up],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*Up],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Xp],["MM-dd\nyyyy",2*Xp],["MM-dd\nyyyy",3*Xp],["MM-dd\nyyyy",4*Xp],["MM-dd\nyyyy",5*Xp],["MM-dd\nyyyy",6*Xp],["week",7*Xp],["MM-dd\nyyyy",864e6],["week",14*Xp],["week",21*Xp],["month",31*Xp],["week",42*Xp],["month",62*Xp],["week",70*Xp],["quarter",95*Xp],["month",31*Xp*4],["month",13392e6],["half-year",16416e6],["month",31*Xp*8],["month",26784e6],["year",380*Xp]];Yp.create=function(t){return new Yp({useUTC:t.ecModel.get("useUTC")})};var qp=mp.prototype,Kp=Dp.prototype,$p=Gl,Jp=zl,Qp=Math.floor,tg=Math.ceil,eg=Math.pow,ig=Math.log,ng=mp.extend({type:"log",base:10,$constructor:function(){mp.apply(this,arguments),this._originalScale=new Dp},getTicks:function(t){var i=this._originalScale,n=this._extent,o=i.getExtent();return O(Kp.getTicks.call(this,t),function(t){var e=zl(eg(this.base,t));return e=t===n[0]&&i.__fixMin?og(e,o[0]):e,e=t===n[1]&&i.__fixMax?og(e,o[1]):e},this)},getMinorTicks:Kp.getMinorTicks,getLabel:Kp.getLabel,scale:function(t){return t=qp.scale.call(this,t),eg(this.base,t)},setExtent:function(t,e){var i=this.base;t=ig(t)/ig(i),e=ig(e)/ig(i),Kp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=qp.getExtent.call(this);e[0]=eg(t,e[0]),e[1]=eg(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=og(e[0],n[0])),i.__fixMax&&(e[1]=og(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=ig(t[0])/ig(e),t[1]=ig(t[1])/ig(e),qp.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=jl(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&0<Math.abs(n);)n*=10;var o=[zl(tg(e[0]/n)*n),zl(Qp(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){Kp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function og(t,e){return Jp(t,$p(e))}function ag(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===a?i=e.getCategories().length:(L(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Rl(n[0],1),n[1]=Rl(n[1],1),o=l[1]-l[0]||Math.abs(l[0])),"dataMin"===r?r=l[0]:"function"==typeof r&&(r=r({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=r,h=null!=s;null==r&&(r="ordinal"===a?i?0:NaN:l[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:l[1]+n[1]*o),null!=r&&isFinite(r)||(r=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(F(r)||F(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!u&&(r=0),r<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=Np("bar",c);if(E(f,function(t){d|=t.getBaseAxis()===e.axis}),d){var p=Op(f),g=function(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Rp(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;E(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;E(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{min:t-=s/u*c,max:e+=l/u*c}}(r,s,e,p);r=g.min,s=g.max}}return{extent:[r,s],fixMin:u,fixMax:h}}function rg(t,e){var i=ag(t,e),n=i.extent,o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var r=e.get("interval");null!=r&&t.setInterval&&t.setInterval(r)}function sg(t,e){if(e=e||t.get("type"))switch(e){case"category":return new bp(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Dp;default:return(mp.getClass(e)||Dp).create(t)}}function lg(i){var e,n=i.getLabelModel().get("formatter"),o="category"===i.type?i.scale.getExtent()[0]:null;return"string"==typeof n?(e=n,n=function(t){return t=i.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof n?function(t,e){return null!=o&&(e=t-o),n(ug(i,t),e)}:function(t){return i.scale.getLabel(t)}}function ug(t,e){return"category"===t.type?t.scale.getLabel(e):e}function hg(t){var e=t.get("interval");return null==e?"auto":e}function cg(t){return"category"===t.type&&0===hg(t.getLabelModel())}E(["contain","normalize"],function(e){ng.prototype[e]=function(t){return t=ig(t)/ig(this.base),qp[e].call(this,t)}}),ng.create=function(){return new ng};var dg={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&&!F(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&&!F(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:et,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},fg=Cs({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()}}),pg=Cs({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()}}),gg=Cs({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()}}),mg=Cs({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()}}),vg={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}},yg={};E({line:ls,rect:rs,roundRect:rs,square:rs,circle:Yr,diamond:pg,pin:gg,arrow:mg,triangle:fg},function(t,e){yg[e]=new t});var xg=Cs({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=yn(t,e,i),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var o=yg[n];o=o||yg[n="rect"],vg[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i)}}});function _g(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 wg(t,e,i,n,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Ns(t.slice(8),new Di(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Ps(t.slice(7),{},new Di(e,i,n,o),r?"center":"cover"):new xg({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=l,s.setColor=_g,s.setColor(a),s}var bg={isDimensionStacked:fp,enableDataStack:dp,getStackedDimension:pp};var Sg=(Object.freeze||Object)({createList:function(t){return gp(t.getSource(),t)},getLayoutRect:bu,dataStack:bg,createScale:function(t,e){var i=e;Cl.isInstance(e)||b(i=new Cl(e),dg);var n=sg(i);return n.setExtent(t[0],t[1]),rg(n,i),n},mixinAxisModelCommonMethods:function(t){b(t,dg)},completeDimensions:rp,createDimensions:lp,createSymbol:wg}),Mg=1e-8;function Ig(t,e){return Math.abs(t-e)<Mg}function Tg(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+=pr(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Ig(o[0],s[0])&&Ig(o[1],s[1])||(n+=pr(o[0],o[1],s[0],s[1],e,i)),0!==n}function Ag(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 Dg(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}Ag.prototype={constructor:Ag,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++){if("polygon"===r[s].type)Wa(r[s].exterior,o,a),St(i,i,o),Mt(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Di(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(Tg(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(Tg(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 Di(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++)bt(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)bt(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Ag(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function Cg(t,r){return function(t){if(!t.UTF8Encoding)return;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]=Dg(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=Dg(h,r[s][u],e)}}t.UTF8Encoding=!1}(t),O(M(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),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&&E(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Ag(e[r||"name"],o,e.cp);return a.properties=e,a})}var Lg=jo();function kg(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=Ng(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(i){var t=i.scale.getTicks(),n=lg(i);return{labels:O(t,function(t,e){return{formattedLabel:n(t,e),rawLabel:i.scale.getLabel(t),tickValue:t}})}}(t)}function Pg(t,e){return"category"===t.type?function(t,e){var i,n,o=Og(t,"ticks"),a=hg(e),r=Eg(o,a);if(r)return r;e.get("show")&&!t.scale.isBlank()||(i=[]);if(C(a))i=Bg(t,a,!0);else if("auto"===a){var s=Ng(t,t.getLabelModel());n=s.labelCategoryInterval,i=O(s.labels,function(t){return t.tickValue})}else i=zg(t,n=a,!0);return Rg(o,a,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:t.scale.getTicks()}}function Ng(t,e){var i,n=Og(t,"labels"),o=hg(e),a=Eg(n,o);return a||Rg(n,o,{labels:C(o)?Bg(t,o):zg(t,i="auto"===o?function(t){var e=Lg(t).autoInterval;return null!=e?e:Lg(t).autoInterval=t.calculateCategoryInterval()}(t):o),labelCategoryInterval:i})}function Og(t,e){return Lg(t)[e]||(Lg(t)[e]=[])}function Eg(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function Rg(t,e,i){return t.push({key:e,value:i}),i}function zg(t,e,i){var n=lg(t),o=t.scale,a=o.getExtent(),r=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=o.count();0!==u&&1<l&&2<h/l&&(u=Math.round(Math.ceil(u/l)*l));var c=cg(t),d=r.get("showMinLabel")||c,f=r.get("showMaxLabel")||c;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(t){s.push(i?t:{formattedLabel:n(t),rawLabel:o.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function Bg(t,i,n){var o=t.scale,a=lg(t),r=[];return E(o.getTicks(),function(t){var e=o.getLabel(t);i(t,e)&&r.push(n?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}var Vg=[0,1],Gg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Fg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}Gg.prototype={constructor:Gg,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return i<=t&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Fl(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&&Fg(i=i.slice(),n.count()),El(t,Vg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Fg(i=i.slice(),n.count());var o=El(t,i,Vg,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=O(Pg(this,e).ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this);return function(t,e,i,n){var o=e.length;if(!t.onBand||i||!o)return;var a,r,s=t.getExtent();if(1===o)e[0].coord=s[0],a=e[1]={coord:s[0]};else{var l=e[o-1].tickValue-e[0].tickValue,u=(e[o-1].coord-e[0].coord)/l;E(e,function(t){t.coord-=u/2});var h=t.scale.getExtent();r=1+h[1]-e[o-1].tickValue,a={coord:e[o-1].coord+u*r},e.push(a)}var c=s[0]>s[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=zl(t),e=zl(e),c?e<t:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),O(this.scale.getMinorTicks(t),function(t){return O(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},getViewLabels:function(){return kg(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 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),i=lg(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;40<r&&(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,g,m=gn(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))),_=Lg(t.model),w=t.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-r)<=1&&x<b&&_.axisExtend0===w[0]&&_.axisExtend1===w[1]?x=b:(_.lastTickCount=r,_.lastAutoInterval=x,_.axisExtend0=w[0],_.axisExtend1=w[1]),x}(this)}};var Wg=Cg,Hg={};E(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Hg[t]=it[t]});var Zg={};function Ug(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Hh(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=Hh(t,e,i[a]);o.push(r)}return o.join(" ")}}function Xg(t,e,i){Ci.call(this),this.updateData(t,e,i)}E(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){Zg[t]=bl[t]}),sc.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!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 Yg=Xg.prototype,jg=Xg.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function qg(t){return[t[0]/2,t[1]/2]}function Kg(t,e){this.parent.drift(t,e)}Yg._createSymbol=function(t,e,i,n,o){this.removeAll();var a=wg(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:qg(n)}),a.drift=Kg,this._symbolType=t,this.add(a)},Yg.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Yg.getSymbolPath=function(){return this.childAt(0)},Yg.getScale=function(){return this.childAt(0).scale},Yg.highlight=function(){this.childAt(0).trigger("emphasis")},Yg.downplay=function(){this.childAt(0).trigger("normal")},Yg.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},Yg.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Yg.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=jg(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,cl(l,{scale:qg(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),dl(l,h,o,e)}this._seriesModel=o};var $g=["itemStyle"],Jg=["emphasis","itemStyle"],Qg=["label"],tm=["emphasis","label"];function em(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],o={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(o,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function im(t){this.group=new Ci,this._symbolCtor=t||Xg}Yg._updateCommon=function(i,t,e,n){var o=this.childAt(0),a=i.hostModel,r=i.getItemVisual(t,"color");"image"!==o.type?o.useStyle({strokeNoScale:!0}):o.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolOffset,h=n&&n.labelModel,c=n&&n.hoverLabelModel,d=n&&n.hoverAnimation,f=n&&n.cursorStyle;if(!n||i.hasItemOption){var p=n&&n.itemModel?n.itemModel:i.getItemModel(t);s=p.getModel($g).getItemStyle(["color"]),l=p.getModel(Jg).getItemStyle(),u=p.getShallow("symbolOffset"),h=p.getModel(Qg),c=p.getModel(tm),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=P({},l);var g=o.style,m=i.getItemVisual(t,"symbolRotate");o.attr("rotation",(m||0)*Math.PI/180||0),u&&o.attr("position",[Rl(u[0],e[0]),Rl(u[1],e[1])]),f&&o.attr("cursor",f),o.setColor(r,n&&n.symbolInnerColor),o.setStyle(s);var v=i.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=i.getItemVisual(t,"liftZ"),x=o.__z2Origin;null!=y?null==x&&(o.__z2Origin=o.z2,o.z2+=y):null!=x&&(o.z2=x,o.__z2Origin=null);var _=n&&n.useNameLabel;el(g,l,h,c,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return _?i.getName(t):Ug(i,t)},isRectText:!0,autoColor:r}),o.__symbolOriginalScale=qg(e),o.hoverStyle=l,o.highDownOnUpdate=d&&a.isAnimationEnabled()?em:null,$s(o)},Yg.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,e&&e.keepLabel||(i.style.text=null),cl(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},w(Xg,Ci);var nm=im.prototype;function om(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 am(t){return null==t||z(t)||(t={isIgnore:t}),t||{}}function rm(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 sm(t,e,i){var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=function(t,e){var i=0,n=t.scale.getExtent();"start"===e?i=n[0]:"end"===e?i=n[1]:0<n[0]?i=n[0]:n[1]<0&&(i=n[1]);return i}(a,i),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=O(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(n|=fp(e,d[0]))&&(d[0]=f),(n|=fp(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function lm(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)}nm.updateData=function(o,a){a=am(a);var r=this.group,s=o.hostModel,l=this._data,u=this._symbolCtor,h=rm(o);l||r.removeAll(),o.diff(l).add(function(t){var e=o.getItemLayout(t);if(om(o,e,t,a)){var i=new u(o,t,h);i.attr("position",e),o.setItemGraphicEl(t,i),r.add(i)}}).update(function(t,e){var i=l.getItemGraphicEl(e),n=o.getItemLayout(t);om(o,n,t,a)?(i?(i.updateData(o,t,h),cl(i,{position:n},s)):(i=new u(o,t)).attr("position",n),r.add(i),o.setItemGraphicEl(t,i)):r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){r.remove(e)})}).execute(),this._data=o},nm.isPersistent=function(){return!0},nm.updateLayout=function(){var n=this._data;n&&n.eachItemGraphicEl(function(t,e){var i=n.getItemLayout(e);t.attr("position",i)})},nm.incrementalPrepareUpdate=function(t){this._seriesScope=rm(t),this._data=null,this.group.removeAll()},nm.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=am(i);for(var o=t.start;o<t.end;o++){var a=e.getItemLayout(o);if(om(e,a,o,i)){var r=new this._symbolCtor(e,o,this._seriesScope);r.traverse(n),r.attr("position",a),this.group.add(r),e.setItemGraphicEl(o,r)}}},nm.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 um=St,hm=Mt,cm=ut,dm=at,fm=[],pm=[],gm=[];function mm(t){return isNaN(t[0])||isNaN(t[1])}function vm(t,e,i,n,o,a,r,s,l,u){return"none"!==u&&u?function(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(o<=d||d<0)break;if(mm(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]);else if(0<l){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;dm(pm,g),pm[m]=g[m]+v,dm(gm,p),gm[m]=p[m]-v,t.bezierCurveTo(pm[0],pm[1],gm[0],gm[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments):function(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(o<=d||d<0)break;if(mm(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]),dm(pm,p);else if(0<l){var g=d+a,m=e[g];if(h)for(;m&&mm(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||mm(m))dm(gm,p);else{var x,_;if(mm(m)&&!h&&(m=p),ht(fm,m,y),"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=yt(p,y),_=yt(p,m);cm(gm,p,fm,-l*(1-(v=_/(_+x))))}um(pm,pm,s),hm(pm,pm,r),um(gm,gm,s),hm(gm,gm,r),t.bezierCurveTo(pm[0],pm[1],gm[0],gm[1],p[0],p[1]),cm(pm,p,fm,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments)}function ym(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}}var xm=Ar.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=ym(i,e.smoothConstraint);if(e.connectNulls){for(;0<o&&mm(i[o-1]);o--);for(;n<o&&mm(i[n]);n++);}for(;n<o;)n+=vm(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),_m=Ar.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=ym(i,e.smoothConstraint),l=ym(n,e.smoothConstraint);if(e.connectNulls){for(;0<a&&mm(i[a-1]);a--);for(;o<a&&mm(i[o]);o++);}for(;o<a;){var u=vm(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);vm(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function wm(t,e,i){var n=t.getArea(),o=t.getBaseAxis().isHorizontal(),a=n.x,r=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;a-=u/2,r-=u/2,s+=u,l+=u,a=Math.floor(a),s=Math.round(s);var h=new rs({shape:{x:a,y:r,width:s,height:l}});return e&&(h.shape[o?"width":"height"]=0,dl(h,{shape:{width:s,height:l}},i)),h}function bm(t,e,i){var n=t.getArea(),o=new qr({shape:{cx:zl(t.cx,1),cy:zl(t.cy,1),r0:zl(n.r0,1),r:zl(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(o.shape.endAngle=n.startAngle,dl(o,{shape:{endAngle:n.endAngle}},i)),o}function Sm(t,e,i){return t?"polar"===t.type?bm(t,e,i):"cartesian2d"===t.type?wm(t,e,i):null:null}function Mm(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 Im(t,e){var i=[],n=[],o=[],a=[];return Wa(t,i,n),Wa(e,o,a),Math.max(Math.abs(i[0]-o[0]),Math.abs(i[1]-o[1]),Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]))}function Tm(t){return"number"==typeof t?t:t?.5:0}function Am(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 Dm(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!function(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*Xg.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Cm(t,e,i){if("cartesian2d"!==t.type)return bm(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=wm(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}_c.extend({type:"line",init:function(){var t=new Ci,e=new im;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(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();o<a;o++)n.push(lm(i,t,e,o));return n}(n,a,sm(n,a,v)),x=t.get("showSymbol"),_=x&&!u&&Dm(t,a,n),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(p);var b,S=!u&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(null!=(b=n.getArea()).width?(b.x-=.1,b.y-=.1,b.width+=.2,b.height+=.2):b.r0&&(b.r0-=.5,b.r1+=.5)),this._clipShapeForSymbol=b,d&&h.type===n.type&&S===this._step?(m&&!f?f=this._newPolygon(l,y,n,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Cm(n,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:b}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Mm(this._stackedOnPoints,y)&&Mm(this._points,l)||(g?this._updateAnimation(a,y,n,i,S,v):(S&&(l=Am(l,n,S),y=Am(y,n,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:b}),S&&(l=Am(l,n,S),y=Am(y,n,S)),d=this._newPolyline(l,n,g),m&&(f=this._newPolygon(l,y,n,g)),p.setClipPath(Cm(n,!0,t)));var M=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,o,a=i.length-1;0<=a;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=O(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new gs(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(a,n)||a.getVisual("color");d.useStyle(D(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Tm(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(D(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Tm(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Xg(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 _c.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else _c.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new xm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new _m({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=sm(o,e,r),v=sm(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"+":var 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(lm(m,o,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":S=x.idx;var 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(lm(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]});var I=[],T=[],A=[],D=[],C=[];for(y=0;y<p.length;y++){S=p[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}}(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(o&&(h=Am(u.current,i,o),c=Am(u.stackedOnCurrent,i,o),d=Am(u.next,i,o),f=Am(u.stackedOnNext,i,o)),3e3<Im(h,d)||s&&3e3<Im(c,f))return r.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));r.shape.__points=u.current,r.shape.points=h,cl(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),cl(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 i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,e){t.__temp&&(i.remove(t),n.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});function Lm(t,r,s){return{seriesType:t,performRawSeries:!0,reset:function(u,t,e){var i=u.getData(),h=u.get("symbol"),c=u.get("symbolSize"),n=u.get("symbolKeepAspect"),d=u.get("symbolRotate"),f=C(h),p=C(c),g=C(d),m=f||p||g,o=!f&&h?h:r,a=p?null:c;if(i.setVisual({legendSymbol:s||o,symbol:o,symbolSize:a,symbolKeepAspect:n,symbolRotate:d}),!t.isSeriesFiltered(u))return{dataEach:i.hasItemOption||m?function(t,e){if(m){var i=u.getRawValue(e),n=u.getDataParams(e);f&&t.setItemVisual(e,"symbol",h(i,n)),p&&t.setItemVisual(e,"symbolSize",c(i,n)),g&&t.setItemVisual(e,"symbolRotate",d(i,n))}if(t.hasItemOption){var o=t.getItemModel(e),a=o.getShallow("symbol",!0),r=o.getShallow("symbolSize",!0),s=o.getShallow("symbolRotate",!0),l=o.getShallow("symbolKeepAspect",!0);null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=s&&t.setItemVisual(e,"symbolRotate",s),null!=l&&t.setItemVisual(e,"symbolKeepAspect",l)}}:null}}}}function km(t){return{seriesType:t,plan:vc(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var f=O(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=f.length,i=e.getCalculationInfo("stackResultDimension");return fp(e,f[0])&&(f[0]=i),fp(e,f[1])&&(f[1]=i),p&&{progress:function(t,e){for(var i=t.end-t.start,n=d&&new Float32Array(i*p),o=t.start,a=0,r=[],s=[];o<t.end;o++){var l;if(1===p){var u=e.get(f[0],o);l=!isNaN(u)&&c.dataToPoint(u,null,s)}else{u=r[0]=e.get(f[0],o);var h=r[1]=e.get(f[1],o);l=!isNaN(u)&&!isNaN(h)&&c.dataToPoint(r,null,s)}d?(n[a++]=l?l[0]:NaN,n[a++]=l?l[1]:NaN):e.setItemLayout(o,l&&l.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",n)}}}}}}function Pm(t,e){return Math.round(t.length/2)}var Nm={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]}};function Om(t){return this._axes[t]}function Em(t){this._axes={},this._dimList=[],this.name=t||""}function Rm(t){Em.call(this,t)}Em.prototype={constructor:Em,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return O(this._dimList,Om,this)},getAxesByScale:function(e){return e=e.toLowerCase(),M(this.getAxes(),function(t){return t.scale.type===e})},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}},Rm.prototype={constructor:Rm,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||[])[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||[])[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||[])[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")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]);return new Di(i,n,Math.max(t[0],t[1])-i,Math.max(e[0],e[1])-n)}},w(Rm,Em);function zm(t,e,i,n,o){Gg.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"}zm.prototype={constructor:zm,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},w(zm,Gg);var Bm={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)"]}}},Vm={};Vm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Bm),Vm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Bm),Vm.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},Vm.valueAxis),Vm.logAxis=D({scale:!0,logBase:10},Vm.valueAxis);function Gm(a,t,r,e){E(Fm,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),i&&Mu(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=vp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},Vm[o+"Axis"],e],!0)})}),ku.registerSubTypeDefaulter(a+"Axis",T(r,a))}var Fm=["value","category","time","log"],Wm=ku.extend({type:"cartesian2dAxis",axis:null,init:function(){Wm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Wm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Wm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Hm(t,e){return e.type||(e.data?"category":"value")}m(Wm.prototype,dg);var Zm={offset:0};function Um(t,e){return t.getCoordSysModel()===e}function Xm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Gm("x",Wm,Hm,Zm),Gm("y",Wm,Hm,Zm),ku.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Ym=Xm.prototype;function jm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)qm(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&qm(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function qm(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0<i&&0<n||i<0&&n<0)}(t)}Ym.type="grid",Ym.axisPointerEnabled=!0,Ym.getRect=function(){return this._rect},Ym.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),E(i.x,function(t){rg(t.scale,t.model)}),E(i.y,function(t){rg(t.scale,t.model)});var n={};E(i.x,function(t){jm(i,"y",t,n)}),E(i.y,function(t){jm(i,"x",t,n)}),this.resize(this.model,e)},Ym.resize=function(t,e,i){var o=bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var n=this._axesList;function a(){E(n,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]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?o.x:o.y)})}a(),!i&&t.get("containLabel")&&(E(n,function(t){if(!t.model.get("axisLabel.inside")){var e=function(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,u,h,c,d,f,p,g,m=t.getLabelModel(),v=lg(t),y=1;40<o&&(y=Math.ceil(o/40));for(var x=0;x<o;x+=y){var _=v(n?n[x]:r[0]+x),w=m.getTextRect(_),b=(l=w,u=m.get("rotate")||0,void 0,h=u*Math.PI/180,c=l.plain(),d=c.width,f=c.height,p=d*Math.cos(h)+f*Math.sin(h),g=d*Math.sin(h)+f*Math.cos(h),new Di(c.x,c.y,p,g));s?s.union(b):s=b}return s}}(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)}}}),a())},Ym.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]}},Ym.getAxes=function(){return this._axesList.slice()},Ym.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}z(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]},Ym.getCartesians=function(){return this._coordsList.slice()},Ym.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},Ym.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},Ym._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,l=this._coordsList;if(o)_(l,i=o.coordinateSystem)<0&&(i=null);else if(a&&r)i=this.getCartesian(a.componentIndex,r.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Ym.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Ym._initCartesian=function(r,t,e){var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(t.eachComponent("xAxis",i("x"),this),t.eachComponent("yAxis",i("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);function i(a){return function(t,e){if(Um(t,r)){var i=t.get("position");"x"===a?"top"!==i&&"bottom"!==i&&(i=s.bottom?"top":"bottom"):"left"!==i&&"right"!==i&&(i=s.left?"right":"left"),s[i]=!0;var n=new zm(a,sg(t),[0,0],t.get("type"),i),o="category"===n.type;n.onBand=o&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=this,n.index=e,this._axesList.push(n),l[a][e]=n,u[a]++}}}E((this._axesMap=l).x,function(o,a){E(l.y,function(t,e){var i="x"+a+"y"+e,n=new Rm(i);n.grid=this,n.model=r,this._coordsMap[i]=n,this._coordsList.push(n),n.addAxis(o),n.addAxis(t)},this)},this)},Ym._updateScale=function(l,u){function h(e,i){E(e.mapDimension(i.dim,!0),function(t){i.scale.unionExtentFromData(e,pp(e,t))})}E(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),l.eachSeries(function(t){if(Jm(t)){var e=$m(t,l),i=e[0],n=e[1];if(!Um(i,u)||!Um(n,u))return;var o=this.getCartesian(i.componentIndex,n.componentIndex),a=t.getData(),r=o.getAxis("x"),s=o.getAxis("y");"list"===a.type&&(h(a,r,t),h(a,s,t))}},this)},Ym.getTooltipAxes=function(n){var o=[],a=[];return E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),i=t.getOtherAxis(e);_(o,e)<0&&o.push(e),_(a,i)<0&&a.push(i)}),{baseAxes:o,otherAxes:a}};var Km=["xAxis","yAxis"];function $m(e){return O(Km,function(t){return e.getReferringComponents(t)[0]})}function Jm(t){return"cartesian2d"===t.get("coordinateSystem")}Xm.create=function(n,o){var a=[];return n.eachComponent("grid",function(t,e){var i=new Xm(t,n,o);i.name="grid_"+e,i.resize(t,o,!0),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if(Jm(t)){var e=$m(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}}),a},Xm.dimensions=Xm.prototype.dimensions=Rm.prototype.dimensions,lh.register("cartesian2d",Xm);function Qm(t,e){this.opt=e,this.axisModel=t,D(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Ci;var i=new Ci({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i}var tv=Math.PI;Qm.prototype={constructor:Qm,hasBuilder:function(t){return!!ev[t]},add:function(t){ev[t].call(this)},getGroup:function(){return this.group}};var ev={axisLine:function(){var a=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var e=this.axisModel.axis.getExtent(),i=this._transform,r=[e[0],0],n=[e[1],0];i&&(bt(r,r,i),bt(n,n,i));var s=P({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ls({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:n[0],y2:n[1]},style:s,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1}));var l=t.get("axisLine.symbol"),o=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof o&&"number"!=typeof o||(o=[o,o]);var h=o[0],c=o[1];E([{rotate:a.rotation+Math.PI/2,offset:u[0],r:0},{rotate:a.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-n[0])*(r[0]-n[0])+(r[1]-n[1])*(r[1]-n[1]))}],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=wg(l[e],-h/2,-c/2,h,c,s.stroke,!0),n=t.r+t.offset,o=[r[0]+n*Math.cos(a.rotation),r[1]-n*Math.sin(a.rotation)];i.attr({rotation:t.rotate,position:o,silent:!0,z2:11}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,o=e.getModel("axisTick");if(!o.get("show")||n.scale.isBlank())return;for(var a=o.getModel("lineStyle"),r=i.tickDirection*o.get("length"),s=lv(n.getTicksCoords(),t._transform,r,D(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}(this,t,e);!function(t,e,i){if(cg(t.axis))return;var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");i=i||[];var a=(e=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?(av(a),av(u)):rv(a,r)&&(n?(av(r),av(h)):(av(a),av(u)));!1===o?(av(s),av(c)):rv(l,s)&&(o?(av(l),av(d)):(av(s),av(c)))}(t,function(u,h,c){var d=h.axis;if(!W(c.axisLabelShow,h.get("axisLabel.show"))||d.scale.isBlank())return;var f=h.getModel("axisLabel"),p=f.get("margin"),t=d.getViewLabels(),e=(W(c.labelRotate,f.get("rotate"))||0)*tv/180,g=nv(c.rotation,e,c.labelDirection),m=h.getCategories&&h.getCategories(!0),v=[],y=ov(h),x=h.get("triggerEvent");return E(t,function(t,e){var i=t.tickValue,n=t.formattedLabel,o=t.rawLabel,a=f;m&&m[i]&&m[i].textStyle&&(a=new Cl(m[i].textStyle,f,h.ecModel));var r=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(i),c.labelOffset+c.labelDirection*p],l=new Ur({anid:"label_"+i,position:s,rotation:g.rotation,silent:y,z2:10});nl(l.style,a,{text:n,textAlign:a.getShallow("align",!0)||g.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof r?r("category"===d.type?o:"value"===d.type?i+"":i,e):r}),x&&(l.eventData=iv(h),l.eventData.targetType="axisLabel",l.eventData.value=o),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}(this,t,e),i),function(t,e,i){var n=e.axis,o=e.getModel("minorTick");if(!o.get("show")||n.scale.isBlank())return;var a=n.getMinorTicksCoords();if(!a.length)return;for(var r=o.getModel("lineStyle"),s=i.tickDirection*o.get("length"),l=D(r.getLineStyle(),D(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=lv(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=W(t.axisName,e.get("name"));if(i){var n,o,a=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"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,sv(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*tv/180),sv(a)?n=nv(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a,r=Zl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;o=Ul(r-tv/2)?(a=l?"bottom":"top","center"):Ul(r-1.5*tv)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*tv&&tv/2<r?l?"left":"right":l?"right":"left");return{rotation:r,textAlign:o,textVerticalAlign:a}}(t,a,d||0,u),null!=(o=t.axisNameAvailableWidth)&&(o=Math.abs(o/Math.sin(n.rotation)),isFinite(o)||(o=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=W(t.nameTruncateMaxWidth,p.maxWidth,o),v=null!=g&&null!=m?pu(i,m,f,g,{minChar:2,placeholder:p.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var w=new Ur({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:ov(e),z2:1,tooltip:y&&y.show?P({content:i,formatter:function(){return i},formatterParams:_},y):null});nl(w.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=iv(e),w.eventData.targetType="axisName",w.eventData.name=i),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},iv=Qm.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},nv=Qm.innerTextLayout=function(t,e,i){var n,o=Zl(e-t);return{rotation:o,textAlign:Ul(o)?(n=0<i?"top":"bottom","center"):Ul(o-tv)?(n=0<i?"bottom":"top","center"):(n="middle",0<o&&o<tv?0<i?"right":"left":0<i?"left":"right"),textVerticalAlign:n}};var ov=Qm.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function av(t){t&&(t.ignore=!0)}function rv(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var o=re([]);return he(o,o,-t.rotation),i.applyTransform(le([],o,t.getLocalTransform())),n.applyTransform(le([],o,e.getLocalTransform())),i.intersect(n)}}function sv(t){return"middle"===t||"center"===t}function lv(t,e,i,n,o){for(var a=[],r=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;r[0]=u,s[r[1]=0]=u,s[1]=i,e&&(bt(r,r,e),bt(s,s,e));var h=new ls({anid:o+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}var uv=E,hv=T;function cv(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(p,g,t){var a=g.getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[];uv(t.getCoordinateSystems(),function(c){if(c.axisPointerEnabled){var t=gv(c.model),d=p.coordSysAxesInfo[t]={},f=(p.coordSysMap[t]=c).model.getModel("tooltip",a);if(uv(c.getAxes(),hv(o,!1,null)),c.getTooltipAxes&&a&&f.get("show")){var e="axis"===f.get("trigger"),i="cross"===f.get("axisPointer.type"),n=c.getTooltipAxes(f.get("axisPointer.axis"));(e||i)&&uv(n.baseAxes,hv(o,!i||"cross",e)),i&&uv(n.otherAxes,hv(o,"cross",!1))}}function o(t,e,i){var n=i.model.getModel("axisPointer",m),o=n.get("show");if(o&&("auto"!==o||t||pv(n))){null==e&&(e=n.get("triggerTooltip"));var a=(n=t?function(t,e,i,n,o,a){var r=e.getModel("axisPointer"),s={};uv(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=k(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var u=r.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=r.get("crossStyle");h&&D(l,h.textStyle)}}return t.model.getModel("axisPointer",new Cl(s,i,n))}(i,f,m,g,t,e):n).get("snap"),r=gv(i.model),s=e||a||"category"===i.type,l=p.axesInfo[r]={key:r,axis:i,coordSys:c,axisPointerModel:n,triggerTooltip:e,involveSeries:s,snap:a,useHandle:pv(n),seriesModels:[]};d[r]=l,p.seriesInvolved|=s;var u=function(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(dv(a[n+"AxisId"],i.id)||dv(a[n+"AxisIndex"],i.componentIndex)||dv(a[n+"AxisName"],i.name))return o}}(v,i);if(null!=u){var h=y[u]||(y[u]={axesInfo:{}});h.axesInfo[r]=l,h.mapper=v[u].mapper,l.linkGroup=h}}}})}(i,t,e),i.seriesInvolved&&function(o,t){t.eachSeries(function(i){var n=i.coordinateSystem,t=i.get("tooltip.trigger",!0),e=i.get("tooltip.show",!0);n&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==i.get("axisPointer.show",!0)&&uv(o.coordSysAxesInfo[gv(n.model)],function(t){var e=t.axis;n.getAxis(e.dim)===e&&(t.seriesModels.push(i),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=i.getData().count())})},this)}(i,t),i}function dv(t,e){return"all"===t||L(t)&&0<=_(t,e)||t===e}function fv(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[gv(t)]}function pv(t){return!!t.get("handle.show")}function gv(t){return t.type+"||"+t.id}var mv=Af({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=fv(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=pv(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")}}(t),mv.superApply(this,"render",arguments),vv(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,o){vv(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),mv.superApply(this,"remove",arguments)},dispose:function(t,e){yv(this,e),mv.superApply(this,"dispose",arguments)}});function vv(t,e,i,n,o,a){var r=mv.getAxisPointerClass(t.axisPointerClass);if(r){var s=function(t){var e=fv(t);return e&&e.axisPointerModel}(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,a):yv(t,n)}}function yv(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var xv=[];function _v(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);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),W(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}function wv(t,e,i,n){var o=i.axis;if(!o.scale.isBlank()){var a=i.getModel("splitArea"),r=a.getModel("areaStyle"),s=r.get("color"),l=n.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=Q(),f=0;if(c)for(var p=0;p<u.length;p++){var g=c.get(u[p].tickValue);if(null!=g){f=(g+(h-1)*p)%h;break}}var m=o.toGlobalCoord(u[0].coord),v=r.getAreaStyle();s=L(s)?s:[s];for(p=1;p<u.length;p++){var y,x,_,w,b=o.toGlobalCoord(u[p].coord);m=o.isHorizontal()?(y=m,x=l.y,_=b-y,w=l.height,y+_):(y=l.x,x=m,_=l.width,x+(w=b-x));var S=u[p-1].tickValue;null!=S&&d.set(S,f),e.add(new rs({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:w},style:D({fill:s[f]},v),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}}function bv(t){t.__splitAreaColors=null}mv.registerAxisPointerClass=function(t,e){xv[t]=e},mv.getAxisPointerClass=function(t){return t&&xv[t]};var Sv=["axisLine","axisTickLabel","axisName"],Mv=["splitArea","splitLine","minorSplitLine"],Iv=mv.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ci,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),r=_v(a,e),s=new Qm(e,r);E(Sv,s.add,s),this._axisGroup.add(s.getGroup()),E(Mv,function(t){e.get(t+".show")&&this["_"+t](e,a)},this),ml(o,this._axisGroup,e),Iv.superCall(this,"render",e,t,i,n)}},remove:function(){bv(this)},_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=L(a)?a:[a];for(var r=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=o.getLineStyle(),f=0;f<u.length;f++){var p=i.toGlobalCoord(u[f].coord);s?(h[0]=p,h[1]=r.y,c[0]=p,c[1]=r.y+r.height):(h[0]=r.x,h[1]=p,c[0]=r.x+r.width,c[1]=p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new ls({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:D({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine").getModel("lineStyle"),o=e.coordinateSystem.getRect(),a=i.isHorizontal(),r=i.getMinorTicksCoords();if(r.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<r.length;h++)for(var c=0;c<r[h].length;c++){var d=i.toGlobalCoord(r[h][c].coord);a?(s[0]=d,s[1]=o.y,l[0]=d,l[1]=o.y+o.height):(s[0]=o.x,s[1]=d,l[0]=o.x+o.width,l[1]=d),this._axisGroup.add(new ls({anid:"minor_line_"+r[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){wv(this,this._axisGroup,t,e)}});Iv.extend({type:"xAxis"}),Iv.extend({type:"yAxis"}),Af({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new rs({shape:t.coordinateSystem.getRect(),style:D({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),yf(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Sf(Lm("line","circle","line")),bf(km("line")),xf(Ld.PROCESSOR.STATISTIC,{seriesType:"line",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,s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],c=Math.round(n.count()/h);1<c&&("string"==typeof o?r=Nm[o]:"function"==typeof o&&(r=o),r&&t.setData(n.downSample(n.mapDimension(l.dim),1/c,r,Pm)))}}});var Tv=sc.extend({type:"series.__base_bar__",getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},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:{}}});function Av(t,e,i,n,o,a){el(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:Ug(o.getData(),a),isRectText:!0,autoColor:n}),Dv(t),Dv(e)}function Dv(t,e){"outside"===t.textPosition&&(t.textPosition=e)}Tv.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 t<e&&(t=e),t},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}}});var Cv=ha([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Lv={getBarItemStyle:function(t){var e=Cv(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},kv=Cs({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},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=.5*(a-o),s=o+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+i,d*o+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(i,n,o,u,l,h),t.moveTo(c*o+i,p*o+n)),t.closePath()}}),Pv=["itemStyle","barBorderWidth"],Nv=[0,0];P(Cl.prototype,Lv),Cf({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(s,t,e){var l,u=this.group,h=s.getData(),c=this._data,d=s.coordinateSystem,i=d.getBaseAxis();"cartesian2d"===d.type?l=i.isHorizontal():"polar"===d.type&&(l="angle"===i.dim);var f=s.isAnimationEnabled()?s:null,p=s.get("clip",!0),g=function(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var o=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=o,i.width+=2*o):(i.y-=o,i.height+=2*o)}}return i}(d,h);u.removeClipPath();var m=s.get("roundCap",!0),v=s.get("showBackground",!0),y=s.getModel("backgroundStyle"),x=y.get("barBorderRadius")||0,_=[],w=this._backgroundEls||[];h.diff(c).add(function(t){var e=h.getItemModel(t),i=Gv[d.type](h,t,e);if(v){var n=Gv[d.type](h,t),o=function(t,e,i){return new("polar"===t.type?qr:rs)({shape:Xv(e,i,t),silent:!0,z2:0})}(d,l,n);o.useStyle(y.getBarItemStyle()),"cartesian2d"===d.type&&o.setShape("r",x),_[t]=o}if(h.hasValue(t)){if(p)if(Rv[d.type](g,i))return void u.remove(a);var a=zv[d.type](t,i,l,f,!1,m);h.setItemGraphicEl(t,a),u.add(a),Wv(a,h,t,e,i,s,l,"polar"===d.type)}}).update(function(t,e){var i=h.getItemModel(t),n=Gv[d.type](h,t,i);if(v){var o=w[e];o.useStyle(y.getBarItemStyle()),"cartesian2d"===d.type&&o.setShape("r",x),_[t]=o;var a=Gv[d.type](h,t);cl(o,{shape:Xv(l,a,d)},f,t)}var r=c.getItemGraphicEl(e);if(h.hasValue(t)){if(p)if(Rv[d.type](g,n))return void u.remove(r);r?cl(r,{shape:n},f,t):r=zv[d.type](t,n,l,f,!0,m),h.setItemGraphicEl(t,r),u.add(r),Wv(r,h,t,i,n,s,l,"polar"===d.type)}else u.remove(r)}).remove(function(t){var e=c.getItemGraphicEl(t);"cartesian2d"===d.type?e&&Bv(t,f,e):e&&Vv(t,f,e)}).execute();var n=this._backgroundGroup||(this._backgroundGroup=new Ci);n.removeAll();for(var o=0;o<_.length;++o)n.add(_[o]);u.add(n),this._backgroundEls=_,this._data=h},_renderLarge:function(t,e,i){this._clear(),Zv(t,this.group);var n=t.get("clip",!0)?Sm(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Zv(e,this.group,!0)},dispose:et,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(t){"sector"===t.type?Vv(t.dataIndex,e,t):Bv(t.dataIndex,e,t)})):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Ov=Math.max,Ev=Math.min,Rv={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var o=Ov(e.x,t.x),a=Ev(e.x+e.width,t.x+t.width),r=Ov(e.y,t.y),s=Ev(e.y+e.height,t.y+t.height);e.x=o,e.y=r,e.width=a-o,e.height=s-r;var l=e.width<0||e.height<0;return i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},zv={cartesian2d:function(t,e,i,n,o){var a=new rs({shape:P({},e),z2:1});if(a.name="item",n){var r=i?"height":"width",s={};a.shape[r]=0,s[r]=e[r],bl[o?"updateProps":"initProps"](a,{shape:s},n,t)}return a},polar:function(t,e,i,n,o,a){var r=e.startAngle<e.endAngle,s=new(!i&&a?kv:qr)({shape:D({clockwise:r},e),z2:1});if(s.name="item",n){var l=i?"r":"endAngle",u={};s.shape[l]=i?0:e.startAngle,u[l]=e[l],bl[o?"updateProps":"initProps"](s,{shape:u},n,t)}return s}};function Bv(t,e,i){i.style.text=null,cl(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Vv(t,e,i){i.style.text=null,cl(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}var Gv={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=i?function(t,e){var i=t.get(Pv)||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,o)}(i,n):0,a=0<n.width?1:-1,r=0<n.height?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}}};function Fv(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Wv(t,e,i,n,o,a,r,s){var l=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),h=e.getVisual("borderColor"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(D({stroke:Fv(o)?"none":h,fill:Fv(o)?"none":l,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);r?o.height:o.width;s||Av(t.style,d,n,l,a,i),Fv(o)&&(d.fill=d.stroke="none"),$s(t,d)}var Hv=Ar.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__baseDimIdx,a=0;a<i.length;a+=2)n[o]=i[a+o],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});function Zv(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=t.getModel("backgroundStyle");if(t.get("showBackground",!0)){var u=n.getLayout("largeBackgroundPoints"),h=[];h[1-a]=n.getLayout("backgroundStart");var c=new Hv({shape:{points:u},incremental:!!i,__startPoint:h,__baseDimIdx:a,__largeDataIndices:r,__barWidth:s,silent:!0,z2:0});!function(t,e,i){var n=e.get("borderColor")||e.get("color"),o=e.getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(c,l,n),e.add(c)}var d=new Hv({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__baseDimIdx:a,__largeDataIndices:r,__barWidth:s});e.add(d),function(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")}(d,t,n),d.seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",Uv),d.on("mousemove",Uv))}var Uv=Lc(function(t){var e=function(t,e,i){var n=t.__baseDimIdx,o=1-n,a=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];Nv[0]=e,Nv[1]=i;for(var u=Nv[n],h=Nv[1-n],c=u-s,d=u+s,f=0,p=a.length/2;f<p;f++){var g=2*f,m=a[g+n],v=a[g+o];if(c<=m&&m<=d&&(l<=v?l<=h&&h<=v:v<=h&&h<=l))return r[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=0<=e?e:null},30,!1);function Xv(t,e,i){var n,o="polar"===i.type;return n=o?i.getArea():i.grid.getRect(),o?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}bf(Ld.VISUAL.LAYOUT,T(zp,"bar")),bf(Ld.VISUAL.PROGRESSIVE_LAYOUT,Bp),Sf({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});function Yv(t,e,i){e=L(e)&&{coordDimensions:e}||P({},e);var n=t.getSource(),o=lp(n,e),a=new Yf(o,t);return a.initData(n,i),a}var jv={updateSelectedMap:function(t){this._targetList=L(t)?t.slice():[],this._selectTargetMap=S(t||[],function(t,e){return t.set(e.name,e),t},Q())},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}};function qv(i,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return 0<=e().indexOfName(t)},this.indexOfName=function(t){return i().indexOfName(t)},this.getItemVisual=function(t,e){return i().getItemVisual(t,e)}}var Kv=Df({type:"series.pie",init:function(t){Kv.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Kv.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Yv(this,{coordDimensions:["value"],encodeDefaulter:T(Ju,this)})},_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:Zh(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=Kv.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Wl(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Go(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,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function $v(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){Jv(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Jv(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Qv(t,e){Ci.call(this);var i=new qr({z2:2}),n=new ts,o=new Ur;this.add(i),this.add(n),this.add(o),this.updateData(t,e,!0)}b(Kv,jv);var ty=Qv.prototype;ty.updateData=function(t,e,i){var n=this.childAt(0),o=this.childAt(1),a=this.childAt(2),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=P({},l);u.label=null;var h=r.getShallow("animationTypeUpdate");i?(n.setShape(u),"scale"===r.getShallow("animationType")?(n.shape.r=l.r0,dl(n,{shape:{r:l.r}},r,e)):(n.shape.endAngle=l.startAngle,cl(n,{shape:{endAngle:l.endAngle}},r,e))):"expansion"===h?n.setShape(u):cl(n,{shape:u},r,e);var c=t.getItemVisual(e,"color");n.useStyle(D({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),n.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&n.attr("cursor",d),Jv(this,t.getItemLayout(e),r.isSelected(t.getName(e)),r.get("selectedOffset"),r.get("animation"));var f=!i&&"transition"===h;this._updateLabel(t,e,f),this.highDownOnUpdate=r.get("silent")?null:function(t,e){var i=r.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===e?(o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,a.ignore=a.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r}},300,"elasticOut")))},$s(this)},ty._updateLabel=function(t,e,i){var n=this.childAt(1),o=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))o.ignore=o.normalIgnore=o.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},h={x:s.x,y:s.y};i?(cl(n,{shape:u},a,e),cl(o,{style:h},a,e)):(n.attr({shape:u}),o.attr({style:h})),o.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=r.getModel("label"),d=r.getModel("emphasis.label"),f=r.getModel("labelLine"),p=r.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");el(o.style,o.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),o.ignore=o.normalIgnore=!c.get("show"),o.hoverIgnore=!d.get("show"),n.ignore=n.normalIgnore=!f.get("show"),n.hoverIgnore=!p.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),n.setShape({smooth:g})}},w(Qv,Ci);function ey(i,t){E(t,function(a){a.update="updateView",_f(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:i,query:t},function(i){i[a.method]&&i[a.method](t.name,t.dataIndex);var n=i.getData();n.each(function(t){var e=n.getName(t);o[e]=i.isSelected(e)||!1})}),{name:t.name,selected:o,seriesId:t.seriesId}})})}function iy(n){return{getTargetSeries:function(t){var e={},i=Q();return t.eachSeriesByType(n,function(t){t.__paletteScope=e,i.set(t.uid,t)}),i},reset:function(s,t){var l=s.getRawData(),u={},h=s.getData();h.each(function(t){var e=h.getRawIndex(t);u[e]=t}),l.each(function(t){var e,i=u[t],n=null!=i&&h.getItemVisual(i,"color",!0),o=null!=i&&h.getItemVisual(i,"borderColor",!0);if(n&&o||(e=l.getItemModel(t)),!n){var a=e.get("itemStyle.color")||s.getColorFromPalette(l.getName(t)||t+"",s.__paletteScope,l.count());null!=i&&h.setItemVisual(i,"color",a)}if(!o){var r=e.get("itemStyle.borderColor");null!=i&&h.setItemVisual(i,"borderColor",r)}})}}}_c.extend({type:"pie",init:function(){var t=new Ci;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=t.get("animationTypeUpdate"),c=T($v,this.uid,t,s,i),d=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new Qv(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(o,t),i.off("click"),d&&i.on("click",c),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&0<o.count()&&(l?"scale"!==u:"transition"!==h)){for(var f=o.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<o.count();++p)f=o.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,m=A(r.removeClipPath,r);r.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,t,l))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r,s){var l=new qr({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return(s?dl:cl)(l,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),l},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 ny=Math.PI/180;function oy(o,t,e,i,n,a,r,s,l,u){function h(t,e,i){for(var n=t;n<e&&!(o[n].y+i>l+r);n++)if(o[n].y+=i,t<n&&n+1<e&&o[n+1].y>o[n].y+o[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(o[i].y-e<l)&&(o[i].y-=e,!(0<i&&o[i].y>o[i-1].y+o[i-1].height));i--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("none"===t[s].labelAlignTo){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&&r<=d&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}o.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=o.length,m=[],v=[],y=0;y<g;y++){if("outer"===o[y].position&&"labelLine"===o[y].labelAlignTo){var x=o[y].x-u;o[y].linePoints[1][0]+=x,o[y].x=u}(f=o[y].y-p)<0&&h(y,g,-f),p=o[y].y+o[y].height}r-p<0&&c(g-1,p-r);for(y=0;y<g;y++)o[y].y>=e?v.push(o[y]):m.push(o[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function ay(t){return"center"===t.position}function ry(L,k,P,t,N,e){var O,E,R=L.getData(),z=[],B=!1,V=(L.get("minShowLabelAngle")||0)*ny;R.each(function(t){var e=R.getItemLayout(t),i=R.getItemModel(t),n=i.getModel("label"),o=n.get("position")||i.get("emphasis.label.position"),a=n.get("distanceToLabelLine"),r=n.get("alignTo"),s=Rl(n.get("margin"),P),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Rl(c,P);var d=h.get("length2");if(d=Rl(d,P),!(e.angle<V)){var f,p,g,m,v=(e.startAngle+e.endAngle)/2,y=Math.cos(v),x=Math.sin(v);O=e.cx,E=e.cy;var _,w=L.getFormattedLabel(t,"normal")||R.getName(t),b=gn(w,u,m,"top"),S="inside"===o||"inner"===o;if("center"===o)f=e.cx,p=e.cy,m="center";else{var M=(S?(e.r+e.r0)/2*y:e.r*y)+O,I=(S?(e.r+e.r0)/2*x:e.r*x)+E;if(f=M+3*y,p=I+3*x,!S){var T=M+y*(c+k-e.r),A=I+x*(c+k-e.r),D=T+(y<0?-1:1)*d;f="edge"===r?y<0?N+s:N+P-s:D+(y<0?-a:a),g=[[M,I],[T,A],[D,p=A]]}m=S?"center":"edge"===r?0<y?"right":"left":0<y?"left":"right"}var C=n.get("rotate");_="number"==typeof C?C*(Math.PI/180):C?y<0?-v+Math.PI:-v:0,B=!!_,e.label={x:f,y:p,position:o,height:b.height,len:c,len2:d,linePoints:g,textAlign:m,verticalAlign:"middle",rotation:_,inside:S,labelDistance:a,labelAlignTo:r,labelMargin:s,bleedMargin:l,textRect:b,text:w,font:u},S||z.push(e.label)}}),!B&&L.get("avoidLabelOverlap")&&function(t,e,i,n,o,a,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)ay(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));for(oy(u,e,i,n,1,0,a,0,s,c),oy(l,e,i,n,-1,0,a,0,s,h),d=0;d<t.length;d++){var f=t[d];if(!ay(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<e?p[2][0]-f.labelDistance-r-f.labelMargin:r+o-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-r-f.bleedMargin:r+o-f.x-f.bleedMargin)<f.textRect.width&&(f.text=xn(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=pn(f.text,f.font)));var y=p[1][0]-p[2][0];m?f.x<e?p[2][0]=r+f.labelMargin+v+f.labelDistance:p[2][0]=r+o-f.labelMargin-v-f.labelDistance:(f.x<e?p[2][0]=f.x+f.labelDistance:p[2][0]=f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(z,O,E,k,P,t,N,e)}var sy=2*Math.PI,ly=Math.PI/180;function uy(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var o=t.getData();o.filterSelf(function(t){for(var e=o.getName(t),i=0;i<n.length;i++)if(!n[i].isSelected(e))return!1;return!0})}}}}ey("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Sf(iy("pie")),bf(T(function(t,e,A,i){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),a=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,A),i=t.get("center"),n=t.get("radius");L(n)||(n=[0,n]),L(i)||(i=[i,i]);var r=Rl(a.width,A.getWidth()),s=Rl(a.height,A.getHeight()),l=Math.min(r,s),u=Rl(i[0],r)+a.x,h=Rl(i[1],s)+a.y,c=Rl(n[0],l/2),d=Rl(n[1],l/2),f=-t.get("startAngle")*ly,p=t.get("minAngle")*ly,g=0;o.each(e,function(t){isNaN(t)||g++});var m=o.getSum(e),v=Math.PI/(m||g)*2,y=t.get("clockwise"),x=t.get("roseType"),_=t.get("stillShowZeroSum"),w=o.getDataExtent(e);w[0]=0;var b=sy,S=0,M=f,I=y?1:-1;if(o.each(e,function(t,e){var i;if(isNaN(t))o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:u,cy:h,r0:c,r:x?NaN:d,viewRect:a});else{(i="area"!==x?0===m&&_?v:t*v:sy/g)<p?b-=i=p:S+=t;var n=M+I*i;o.setItemLayout(e,{angle:i,startAngle:M,endAngle:n,clockwise:y,cx:u,cy:h,r0:c,r:x?El(t,w,[c,d]):d,viewRect:a}),M=n}}),b<sy&&g)if(b<=.001){var T=sy/g;o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e);i.angle=T,i.startAngle=f+I*e*T,i.endAngle=f+I*(e+1)*T}})}else v=b/S,M=f,o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e),n=i.angle===p?p:t*v;i.startAngle=M,i.endAngle=M+I*n,M+=I*n}});ry(t,d,a.width,a.height,a.x,a.y)})},"pie")),xf(uy("pie")),sc.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},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},clip:!0}});var hy=Cs({shape:{points:null},symbolProxy:null,softClipShape: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)||this.softClipShape&&!this.softClipShape.contain(s,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)||this.softClipShape&&!this.softClipShape.contain(a,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;0<=s;s--){var l=2*s,u=n[l]-a/2,h=n[1+l]-r/2;if(u<=t&&h<=e&&t<=u+a&&e<=h+r)return s}return-1}});function cy(){this.group=new Ci}var dy=cy.prototype;function fy(t,e,i){Gg.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function py(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=O(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new fy(i,"log"===t.get("axisType")?new ng:new Dp);return n.name=t.get("name"),(n.model=t).axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}dy.isPersistent=function(){return!this._incremental},dy.updateData=function(t,e){this.group.removeAll();var i=new hy({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},dy.updateLayout=function(t){if(!this._incremental){var n=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var e=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;n=new Float32Array(n.buffer,i,e)}t.setShape("points",n)})}},dy.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new vs({silent:!0})),this.group.add(this._incremental)):this._incremental=null},dy.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new hy,this._incremental.addDisplayable(n,!0)):((n=new hy({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},dy._setCommon=function(i,t,e,n){var o=t.hostModel;n=n||{};var a=t.getVisual("symbolSize");i.setShape("size",a instanceof Array?a:[a,a]),i.softClipShape=n.clipShape||null,i.symbolProxy=wg(t.getVisual("symbol"),0,0,0,0),i.setColor=i.symbolProxy.setColor;var r=i.shape.size[0]<4;i.useStyle(o.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&i.setColor(s),e||(i.seriesIndex=o.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<=e&&(i.dataIndex=e+(i.startIndex||0))}))},dy.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},dy._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Cf({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),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(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||1e4<n.count()||!this._symbolDraw.isPersistent())return{update:!0};var o=km().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_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 cy:new im,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(){}}),Sf(Lm("scatter","circle")),bf(km("scatter")),w(fy,Gg),py.prototype.getIndicatorAxes=function(){return this._indicatorAxes},py.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},py.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},py.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.coordToData(n))]},py.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=Rl(i[0],n),this.cy=Rl(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Rl(r[0],a),this.r=Rl(r[1],a),E(this._indicatorAxes,function(t,e){t.setExtent(this.r0,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)},py.prototype.update=function(n,t){var o=this._indicatorAxes,a=this._model;E(o,function(t){t.scale.setExtent(1/0,-1/0)}),n.eachSeriesByType("radar",function(t,e){if("radar"===t.get("coordinateSystem")&&n.getComponent("radar",t.get("radarIndex"))===a){var i=t.getData();E(o,function(t){t.scale.unionExtentFromData(i,i.mapDimension(t.dim))})}},this);var c=a.get("splitNumber");function d(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}E(o,function(t,e){var i=ag(t.scale,t.model).extent;rg(t.scale,t.model);var n=t.model,o=t.scale,a=n.getMin(),r=n.getMax(),s=o.getInterval();if(null!=a&&null!=r)o.setExtent(+a,+r),o.setInterval((r-a)/c);else if(null!=a)for(;u=a+s*c,o.setExtent(+a,u),o.setInterval(s),s=d(s),u<i[1]&&isFinite(u)&&isFinite(i[1]););else if(null!=r)for(;h=r-s*c,o.setExtent(h,+r),o.setInterval(s),s=d(s),h>i[0]&&isFinite(h)&&isFinite(i[0]););else{var l=o.getTicks().length-1;c<l&&(s=d(s));var u,h=zl((u=Math.ceil(i[1]/s)*s)-s*c);o.setExtent(h,u),o.setInterval(s)}})},py.dimensions=[],py.create=function(i,n){var o=[];return i.eachComponent("radar",function(t){var e=new py(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("radarIndex")||0])}),o},lh.register("radar",py);var gy=Vm.valueAxis;function my(t,e){return D({show:e},t)}Tf({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),t=O(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=c;if(null!=t.color&&(e=D({color:t.color},c)),t=m(k(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisType:u,axisLabel:h,name:t.text,nameLocation:"end",nameGap:p,nameTextStyle:e,triggerEvent:g},!1),d||(t.name=""),"string"==typeof f){var i=t.name;t.name=f.replace("{value}",null!=i?i:"")}else"function"==typeof f&&(t.name=f(t.name,t));var n=P(new Cl(t,null,this.ecModel),dg);return n.mainType="radar",n.componentIndex=this.componentIndex,n},this);this.getIndicatorModels=function(){return t}},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:m({lineStyle:{color:"#bbb"}},gy.axisLine),axisLabel:my(gy.axisLabel,!1),axisTick:my(gy.axisTick,!1),axisType:"interval",splitLine:my(gy.splitLine,!0),splitArea:my(gy.splitArea,!0),indicator:[]}});var vy=["axisLine","axisTickLabel","axisName"];Af({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;E(O(e.getIndicatorAxes(),function(t){return new Qm(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){E(vy,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var n=t.coordinateSystem,e=n.getIndicatorAxes();if(e.length){var i=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),r=o.getModel("lineStyle"),s=a.getModel("areaStyle"),l=o.get("show"),u=a.get("show"),h=r.get("color"),c=s.get("color");h=L(h)?h:[h],c=L(c)?c:[c];var d=[],f=[];if("circle"===i)for(var p=e[0].getTicksCoords(),g=n.cx,m=n.cy,v=0;v<p.length;v++){if(l)d[I(d,h,v)].push(new Yr({shape:{cx:g,cy:m,r:p[v].coord}}));if(u&&v<p.length-1)f[I(f,c,v)].push(new Kr({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}))}else{var y,x=O(e,function(t,e){var i=t.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),O(i,function(t){return n.coordToPoint(t.coord,e)})}),_=[];for(v=0;v<=y;v++){for(var w=[],b=0;b<e.length;b++)w.push(x[b][v]);if(w[0]&&w.push(w[0].slice()),l)d[I(d,h,v)].push(new ts({shape:{points:w}}));if(u&&_)f[I(f,c,v-1)].push(new Qr({shape:{points:w.concat(_)}}));_=w.slice().reverse()}}var S=r.getLineStyle(),M=s.getAreaStyle();E(f,function(t,e){this.group.add(Es(t,{style:D({stroke:"none",fill:c[e%c.length]},M),silent:!0}))},this),E(d,function(t,e){this.group.add(Es(t,{style:D({fill:"none",stroke:h[e%h.length]},S),silent:!0}))},this)}function I(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}}});var yy=sc.extend({type:"series.radar",dependencies:["radar"],init:function(t){yy.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this))},getInitialData:function(t,e){return Yv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(n){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(n);return au(""===e?this.name:e)+"<br/>"+O(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return au(t.name+" : "+i)}).join("<br />")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(O(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=n.length;o<a;o++)if(!isNaN(n[o])){var r=i.getIndicatorAxes();return i.coordToPoint(r[o].dataToCoord(n[o]),o)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Cf({type:"radar",render:function(l,t,e){var i=l.coordinateSystem,g=this.group,m=l.getData(),s=this._data;function u(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=function(t){return L(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),a=wg(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function h(t,e,i,n,o,a){i.removeAll();for(var r=0;r<e.length-1;r++){var s=u(n,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),bl[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),i.add(s))}}function c(t){return O(t,function(t){return[i.cx,i.cy]})}m.diff(s).add(function(t){var e=m.getItemLayout(t);if(e){var i=new Qr,n=new ts,o={shape:{points:e}};i.shape.points=c(e),n.shape.points=c(e),dl(i,o,l,t),dl(n,o,l,t);var a=new Ci,r=new Ci;a.add(n),a.add(i),a.add(r),h(n.shape.points,e,r,m,t,!0),m.setItemGraphicEl(t,a)}}).update(function(t,e){var i=s.getItemGraphicEl(e),n=i.childAt(0),o=i.childAt(1),a=i.childAt(2),r={shape:{points:m.getItemLayout(t)}};r.shape.points&&(h(n.shape.points,r.shape.points,a,m,t,!1),cl(n,r,l),cl(o,r,l),m.setItemGraphicEl(t,i))}).remove(function(t){g.remove(s.getItemGraphicEl(t))}).execute(),m.eachItemGraphicEl(function(t,i){var e=m.getItemModel(i),n=t.childAt(0),o=t.childAt(1),a=t.childAt(2),r=m.getItemVisual(i,"color");g.add(t),n.useStyle(D(e.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:r})),n.hoverStyle=e.getModel("emphasis.lineStyle").getLineStyle();var s=e.getModel("areaStyle"),l=e.getModel("emphasis.areaStyle"),u=s.isEmpty()&&s.parentModel.isEmpty(),h=l.isEmpty()&&l.parentModel.isEmpty();h=h&&u,o.ignore=u,o.useStyle(D(s.getAreaStyle(),{fill:r,opacity:.7})),o.hoverStyle=l.getAreaStyle();var c=e.getModel("itemStyle").getItemStyle(["color"]),d=e.getModel("emphasis.itemStyle").getItemStyle(),f=e.getModel("label"),p=e.getModel("emphasis.label");a.eachChild(function(t){t.setStyle(c),t.hoverStyle=k(d);var e=m.get(m.dimensions[t.__dimIdx],i);null!=e&&!isNaN(e)||(e=""),el(t.style,t.hoverStyle,f,p,{labelFetcher:m.hostModel,labelDataIndex:i,labelDimIndex:t.__dimIdx,defaultText:e,autoColor:r,isRectText:!0})}),t.highDownOnUpdate=function(t,e){o.attr("ignore","emphasis"===e?h:u)},$s(t)}),this._data=m},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function xy(t){return!isNaN(t[0])&&!isNaN(t[1])}function _y(t){return[t.cx,t.cy]}Sf(iy("radar")),Sf(Lm("radar","circle")),bf(function(t){t.eachSeriesByType("radar",function(t){var i=t.getData(),o=[],a=t.coordinateSystem;if(a){var e=a.getIndicatorAxes();E(e,function(t,n){i.each(i.mapDimension(e[n].dim),function(t,e){o[e]=o[e]||[];var i=a.dataToPoint(t,n);o[e][n]=xy(i)?i:_y(a)})}),i.each(function(t){var e=I(o[t],function(t){return xy(t)})||_y(a);o[t].push(e.slice()),i.setItemLayout(t,o[t])})}})}),xf(uy("radar")),yf(function(i){var t=i.polar;if(t){L(t)||(t=[t]);var n=[];E(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],L(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):n.push(t)}),i.polar=n}E(i.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var wy=[126,25],by=[[[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]]],Sy=0;Sy<by.length;Sy++)for(var My=0;My<by[Sy].length;My++)by[Sy][My][0]/=10.5,by[Sy][My][1]/=-14,by[Sy][My][0]+=wy[0],by[Sy][My][1]+=wy[1];var Iy={"閸楁鎹g拠绋跨煗":[32,80],"楠炲じ绗�":[0,-10],"妫f瑦鑵�":[10,5],"濠㈡娊妫�":[-10,10],"婢垛晜瑙�":[5,5]},Ty={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},Ay=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],Dy=jo(),Cy={load:function(n,t,e){var i=Dy(t).parsed;if(i)return i;var o,a=t.specialAreas||{},r=t.geoJSON;try{o=r?Cg(r,e):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(t,e){"china"===t&&e.push(new Ag("閸楁鎹g拠绋跨煗",O(by,function(t){return{type:"polygon",exterior:t}}),wy))}(n,o),E(o,function(t){var e=t.name;!function(t,e){if("china"===t){var i=Iy[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}}(n,t),function(t,e){if("world"===t){var i=Ty[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}}(n,t),function(t,e){"china"===t&&"閸欑増鍜�"===e.name&&e.geometries.push({type:"polygon",exterior:Ay[0]})}(n,t);var i=a[e];i&&t.transformTo(i.left,i.top,i.width,i.height)}),Dy(t).parsed={regions:o,boundingRect:function(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}(o)}}};var Ly=jo();function ky(t,e){var i,n,o=t.svgXML;try{Y(null!=(n=(i=o&&function(t,e){return(new hd).parse(t,e)}(o,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=i.width,r=i.height,s=i.viewBoxRect;if(e||(e=null==a||null==r?n.getBoundingRect():new Di(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s){var l=wd(s,e.width,e.height),u=n;(n=new Ci).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new rs({shape:e.plain()})),{root:n,boundingRect:e}}var Py={geoJSON:Cy,svg:{load:function(t,e){var i=Ly(e).originRoot;if(i)return{root:i,boundingRect:Ly(e).boundingRect};var n=ky(e);return Ly(e).originRoot=n.root,Ly(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=Ly(e),o=n.rootMap||(n.rootMap=Q()),a=o.get(i);if(a)return a;var r=n.originRoot,s=n.boundingRect;return a=n.originRootHostKey?ky(e,s).root:(n.originRootHostKey=i,r),o.set(i,a)},removeGraphic:function(t,e,i){var n=Ly(e),o=n.rootMap;o&&o.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}}},Ny={load:function(n,o,a){var r,s=[],l=Q(),u=Q();return E(Ey(n),function(t){var e=Py[t.type].load(n,t,a);E(e.regions,function(t){var e=t.name;o&&o.hasOwnProperty(e)&&(t=t.cloneShallow(e=o[e])),s.push(t),l.set(e,t),u.set(e,t.center)});var i=e.boundingRect;i&&(r?r.union(i):r=i.clone())}),{regions:s,regionsMap:l,nameCoordMap:u,boundingRect:r||new Di(0,0,0,0)}},makeGraphic:Oy("makeGraphic"),removeGraphic:Oy("removeGraphic")};function Oy(a){return function(i,n){var t=Ey(i),o=[];return E(t,function(t){var e=Py[t.type][a];e&&o.push(e(i,t,n))}),o}}function Ey(t){return Sd.retrieveMap(t)||[]}b(sc.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Yv(this,{coordDimensions:["value"],encodeDefaulter:T(Ju,this)}),i=e.mapDimension("value"),n=Q(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);n.set(l,!0),o.push({name:l,value:e.get(i,r),selected:Zh(e,r,"selected")})}return E(Ny.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(t){var e=t.name;n.get(e)||(o.push({name:e}),a.push(e))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},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=tu(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(au(o[r].name))}return a.join(", ")+"<br />"+au(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)"}},nameProperty:"name"}}),jv);var Ry="\0_ec_interaction_mutex";function zy(t,e){return!!By(t)[e]}function By(t){return t[Ry]||(t[Ry]={})}function Vy(i){this.pointerChecker,this._zr=i,this._opt={};var t=A,n=t(Gy,this),o=t(Fy,this),a=t(Wy,this),r=t(Hy,this),s=t(Zy,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=D(k(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",o),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",o),i.off("mouseup",a),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Gy(t){if(!(Yt(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 Fy(t){if(this._dragging&&Yy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!zy(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&&Xt(t.event),Xy(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function Wy(t){Yt(t)||(this._dragging=!1)}function Hy(t){var e=Yy("zoomOnMouseWheel",t,this._opt),i=Yy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3<o?1.4:1<o?1.2:1.1;Uy(this,"zoom","zoomOnMouseWheel",t,{scale:0<n?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);Uy(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<n?1:-1)*(3<l?.4:1<l?.15:.05),originX:a,originY:r})}}}function Zy(t){zy(this._zr,"globalPan")||Uy(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Uy(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(Xt(n.event),Xy(t,e,i,n,o))}function Xy(t,e,i,n,o){o.isAvailableBehavior=A(Yy,null,i,n),t.trigger(e,o)}function Yy(t,e,i){var n=i[t];return!t||n&&(!R(n)||e.event[n+"Key"])}function jy(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function qy(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()}_f({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),b(Vy,Ct);var Ky={axisPointer:1,tooltip:1,brush:1};function $y(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!Ky[n.mainType]&&o&&o.model!==i}function Jy(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function Qy(i,t){t.eachChild(function(e){E(e.__regions,function(t){e.trigger(i.isSelected(t.name)?"emphasis":"normal")})})}function tx(t,e){var i=new Ci;this.uid=Nl("ec_map_draw"),this._controller=new Vy(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new Ci),i.add(this._backgroundGroup=new Ci)}tx.prototype={constructor:tx,draw:function(_,t,e,i,n){var w="geo"===_.mainType,b=_.getData&&_.getData();w&&t.eachComponent({mainType:"series",subType:"map"},function(t){b||t.getHostGeoModel()!==_||(b=t.getData())});var o=_.coordinateSystem;this._updateBackground(o);var S,M=this._regionsGroup,I=this.group,a=o.getTransformInfo(),T=!M.childAt(0)||n;if(T)I.transform=a.roamTransform,I.decomposeTransform(),I.dirty();else{var r=new ve;r.transform=a.roamTransform,r.decomposeTransform();var s={scale:r.scale,position:r.position};S=r.scale,cl(I,s,_)}var A=a.rawScale,D=a.rawPosition;M.removeAll();var C=["itemStyle"],L=["emphasis","itemStyle"],k=["label"],P=["emphasis","label"],N=Q();E(o.regions,function(t){var e=N.get(t.name)||N.set(t.name,new Ci),a=new ps({segmentIgnoreThreshold:1,shape:{paths:[]}});e.add(a);var i,n=(x=_.getRegionModel(t.name)||_).getModel(C),o=x.getModel(L),r=Jy(n),s=Jy(o),l=x.getModel(k),u=x.getModel(P);if(b){i=b.indexOfName(t.name);var h=b.getItemVisual(i,"color",!0);h&&(r.fill=h)}function c(t){return[t[0]*A[0]+D[0],t[1]*A[1]+D[1]]}E(t.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i<t.exterior.length;++i)e.push(c(t.exterior[i]));a.shape.paths.push(new Qr({segmentIgnoreThreshold:1,shape:{points:e}}));for(i=0;i<(t.interiors?t.interiors.length:0);++i){for(var n=t.interiors[i],o=(e=[],0);o<n.length;++o)e.push(c(n[o]));a.shape.paths.push(new Qr({segmentIgnoreThreshold:1,shape:{points:e}}))}}}),a.setStyle(r),a.style.strokeNoScale=!0,a.culling=!0;var d=l.get("show"),f=u.get("show"),p=b&&isNaN(b.get(b.mapDimension("value"),i)),g=b&&b.getItemLayout(i);if(w||p&&(d||f)||g&&g.showLabel){var m,v=w?t.name:i;(!b||0<=i)&&(m=_);var y=new Ur({position:c(t.center.slice()),scale:[1/I.scale[0],1/I.scale[1]],z2:10,silent:!0});if(el(y.style,y.hoverStyle={},l,u,{labelFetcher:m,labelDataIndex:v,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!T)cl(y,{scale:[1/S[0],1/S[1]]},_);e.add(y)}if(b)b.setItemGraphicEl(i,e);else{var x=_.getRegionModel(t.name);a.eventData={componentType:"geo",componentIndex:_.componentIndex,geoIndex:_.componentIndex,name:t.name,region:x&&x.option||{}}}(e.__regions||(e.__regions=[])).push(t),e.highDownSilentOnTouch=!!_.get("selectedMode"),$s(e,s),M.add(e)}),this._updateController(_,t,e),function(n,o,a,r,s){a.off("click"),a.off("mousedown"),o.get("selectedMode")&&(a.on("mousedown",function(){n._mouseDownFlag=!0}),a.on("click",function(t){if(n._mouseDownFlag){n._mouseDownFlag=!1;for(var e=t.target;!e.__regions;)e=e.parent;if(e){var i={type:("geo"===o.mainType?"geo":"map")+"ToggleSelect",batch:O(e.__regions,function(t){return{name:t.name,from:s.uid}})};i[o.mainType+"Id"]=o.id,r.dispatchAction(i),Qy(o,a)}}}))}(this,_,M,e,i),Qy(_,M)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Ny.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&E(Ny.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(n,t,o){var a=n.coordinateSystem,e=this._controller,i=this._controllerHost;i.zoomLimit=n.get("scaleLimit"),i.zoom=a.getZoom(),e.enable(n.get("roam")||!1);var r=n.mainType;function s(){var t={type:"geoRoam",componentType:r};return t[r+"Id"]=n.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,jy(i,t.dx,t.dy),o.dispatchAction(P(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,qy(i,t.scale,t.originX,t.originY),o.dispatchAction(P(s(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),e.setPointerChecker(function(t,e,i){return a.getViewRectAfterRoam().contain(e,i)&&!$y(t,o,n)})}};var ex="__seriesMapHighDown",ix="__seriesMapCallKey";function nx(t){var e=this[ex];e&&e.recordVersion===this[ix]&&ox(e,t)}function ox(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(nl({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=bs):(nl(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function ax(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()}}Cf({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 tx(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(x,t,e){var _=x.originalData,w=this.group;_.each(_.mapDimension("value"),function(t,e){if(!isNaN(t)){var i=_.getItemLayout(e);if(i&&i.point){var n=i.point,o=i.offset,a=new Yr({style:{fill:x.getData().getVisual("color")},shape:{cx:n[0]+9*o,cy:n[1],r:3},silent:!0,z2:8+(o?0:bs+1)});if(!o){var r=x.mainSeries.getData(),s=_.getName(e),l=r.indexOfName(s),u=_.getItemModel(e),h=u.getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),f=H(x.getFormattedLabel(l,"normal"),s),p=H(x.getFormattedLabel(l,"emphasis"),f),g=d[ex],m=Math.random();if(!g){g=d[ex]={};var v=T(nx,!0),y=T(nx,!1);d.on("mouseover",v).on("mouseout",y).on("emphasis",v).on("normal",y)}P(g,{recordVersion:d[ix]=m,circle:a,labelModel:h,hoverLabelModel:c,emphasisText:p,normalText:f}),ox(g,!1)}w.add(a)}}})}}),_f({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(n,t){var o=n.componentType||"series";t.eachComponent({mainType:o,query:n},function(t){var e=t.coordinateSystem;if("geo"===e.type){var i=ax(e,n,t.get("scaleLimit"));t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===o&&E(t.seriesGroup,function(t){t.setCenter(i.center),t.setZoom(i.zoom)})}})});var rx=bt;function sx(){ve.call(this)}function lx(t){this.name=t,this.zoomLimit,ve.call(this),this._roamTransformable=new sx,this._rawTransformable=new sx,this._center,this._zoom}function ux(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function hx(t,e,i,n){lx.call(this,t),this.map=e;var o=Ny.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function cx(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 dx(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=r.width/r.height*this.aspectScale,d=!1;if(s&&l&&(s=[Rl(s[0],u),Rl(s[1],h)],l=Rl(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};1<c?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=bu(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function fx(i,t){E(t.get("geoCoord"),function(t,e){i.addGeoCoord(e,t)})}b(sx,ve),lx.prototype={constructor:lx,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Di(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 Di(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Di(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=bt([],n,t),i=bt([],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).updateTransform(),e.updateTransform(),se(this.transform||(this.transform=[]),e.transform||ae()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],de(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?U(t):ae(),rawScale:U(e.scale),rawPosition:U(e.position)}},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?rx(i,t,n):at(i,t)},pointToData:function(t){var e=this.invTransform;return e?rx([],t,e):[t[0],t[1]]},convertToPixel:T(ux,"dataToPoint"),convertFromPixel:T(ux,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},b(lx,ve),hx.prototype={constructor:hx,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},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._invertLongitute;o=o.clone(),a&&(o.y=-o.y-o.height);var r=this._rawTransformable;if(r.transform=o.calculateTransform(new Di(t,e,i,n)),r.decomposeTransform(),a){var s=r.scale;s[1]=-s[1]}r.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(){return this._rect},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return lx.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:T(cx,"dataToPoint"),convertFromPixel:T(cx,"pointToData")},b(hx,lx);var px={dimensions:hx.prototype.dimensions,create:function(t,s){var l=[];t.eachComponent("geo",function(t,e){var i=t.get("map"),n=t.get("aspectScale"),o=!0,a=Sd.retrieveMap(i);a&&a[0]&&"svg"===a[0].type?(null==n&&(n=1),o=!1):null==n&&(n=.75);var r=new hx(i+e,i,t.get("nameMap"),o);r.aspectScale=n,r.zoomLimit=t.get("scaleLimit"),l.push(r),fx(r,t),(t.coordinateSystem=r).model=t,r.resize=dx,r.resize(t,s)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=l[e]}});var i={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}}),E(i,function(t,e){var i=new hx(e,e,p(O(t,function(t){return t.get("nameMap")})));i.zoomLimit=W.apply(null,O(t,function(t){return t.get("scaleLimit")})),l.push(i),i.resize=dx,i.aspectScale=t[0].get("aspectScale"),i.resize(t[0],s),E(t,function(t){fx(t.coordinateSystem=i,t)})}),l},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),o=Q(),a=0;a<n.length;a++)o.set(n[a].name,n[a]);return E(Ny.load(e,i).regions,function(t){var e=t.name;o.get(e)||n.push({name:e})}),n}};wf("geo",px);bf(function(i){var o={};i.eachSeriesByType("map",function(t){var e=t.getMapType();if(!t.getHostGeoModel()&&!o[e]){var l={};E(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&i.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var i=s.getName(e),n=r.getRegion(i);if(n&&!isNaN(t)){var o=l[i]||0,a=r.dataToPoint(n.center);l[i]=o+1,s.setItemLayout(e,{point:a,offset:o})}})});var n=t.getData();n.each(function(t){var e=n.getName(t),i=n.getItemLayout(t)||{};i.showLabel=!l[e],n.setItemLayout(t,i)}),o[e]=!0}})}),Sf(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})})}),xf(Ld.PROCESSOR.STATISTIC,function(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),i=e?"o"+e.id:"i"+t.getMapType();(n[i]=n[i]||[]).push(t)}),E(n,function(t,e){for(var i=function(u,h){var c={};return E(u,function(n){n.each(n.mapDimension("value"),function(t,e){var i="ec-"+n.getName(e);c[i]=c[i]||[],isNaN(t)||c[i].push(t)})}),u[0].map(u[0].mapDimension("value"),function(t,e){for(var i,n="ec-"+u[0].getName(e),o=0,a=1/0,r=-1/0,s=c[n].length,l=0;l<s;l++)a=Math.min(a,c[n][l]),r=Math.max(r,c[n][l]),o+=c[n][l];return i="min"===h?a:"max"===h?r:"average"===h?o/s:o,0===s?NaN:i})}(O(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)[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}),yf(function(t){var e=[];E(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,D(t,t.mapLocation))})}),ey("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var gx=E,mx="\0__link_datas",vx="\0__link_mainData";function yx(i){var n=i.mainData,t=i.datas;t||(t={main:n},i.datasAttr={main:"data"}),i.datas=i.mainData=null,Mx(n,t,i),gx(t,function(e){gx(n.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,T(xx,i))})}),n.wrapMethod("cloneShallow",T(bx,i)),gx(n.CHANGABLE_METHODS,function(t){n.wrapMethod(t,T(_x,i))}),Y(t[n.dataType]===n)}function xx(t,e){if(function(t){return t[vx]===t}(this)){var i=P({},this[mx]);Mx(i[this.dataType]=e,i,t)}else Ix(e,this.dataType,this[vx],t);return e}function _x(t,e){return t.struct&&t.struct.update(this),e}function bx(i,n){return gx(n[mx],function(t,e){t!==n&&Ix(t.cloneShallow(),e,n,i)}),n}function Sx(t){var e=this[vx];return null==t||null==e?e:e[mx][t]}function Mx(i,t,n){i[mx]={},gx(t,function(t,e){Ix(t,e,i,n)})}function Ix(t,e,i,n){(i[mx][e]=t)[vx]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Sx}function Tx(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}function Ax(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=O(t||[],function(t){return new Cl(t,e,e.ecModel)})}function Dx(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Cx(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){!function(t){var e=t.children,i=e.length,n=0,o=0;for(;0<=--i;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}(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=function(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=Nx(s),a=Ox(a),s&&a;){o=Nx(o),r=Ox(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);0<d&&(Ex((p=t,g=i,(f=s).hierNode.ancestor.parentNode===p.parentNode?f.hierNode.ancestor:g),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!Nx(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Ox(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}var f,p,g;return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Lx(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function kx(t){return arguments.length?t:Rx}function Px(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Nx(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Ox(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Ex(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 Rx(t,e){return t.parentNode===e.parentNode?1:2}Tx.prototype={constructor:Tx,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),R(t=t||{})&&(t={order:t});var n,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){0<=this.dataIndex&&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=this.hostTree.data.getItemModel(this.dataIndex),i=this.getLevelModel();return i?e.getModel(t,i.getModel(t)):e.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){0<=this.dataIndex&&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)}},Ax.prototype={constructor:Ax,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ax.createTree=function(t,e,i,n){var s=new Ax(e,i&&i.levels),l=[],u=1;!function t(e,i){var n=e.value;u=Math.max(u,L(n)?n.length:1);l.push(e);var o=new Tx(e.name,s);i?Dx(o,i):s.root=o;s._nodes.push(o);var a=e.children;if(a)for(var r=0;r<a.length;r++)t(a[r],o)}(t),s.root.updateDepthAndHeight(0);var o=lp(l,{coordDimensions:["value"],dimensionsCount:u}),a=new Yf(o,e);return a.initData(l),n&&n(a),yx({mainData:a,struct:s,structAttr:"tree"}),s.update(),s},sc.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=new Cl(t.leaves||{},this,this.ecModel),o=Ax.createTree(e,this,{},function(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e);return i.children.length&&i.isExpand||(t.parentModel=n),t})});var i=0;o.eachNode("preorder",function(t){t.depth>i&&(i=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:i;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return au(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var zx=Cs({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,a=i[0],r=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Rl(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;d<n-1;d++){var f=i[d];t.moveTo(f[0],f[1]),c[l]=f[l],t.lineTo(c[0],c[1])}}});function Bx(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function Vx(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 Gx(t,e,i,n,o,a){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=(a=Vx(s,l,a),t.tree.root),h=s.parentNode===u?s:s.parentNode||s,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=s.getLayout();r?(i=new Xg(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),cl(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===s.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===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<x.x)&&(m-=Math.PI):(v=p.x>x.x)||(m-=Math.PI);var b=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,n,o,a,r,s,l){var u=l.edgeShape,h=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&cl(h=h||(n.__edge=new ds({shape:Wx(l,o,o),style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:Wx(l,a,r),style:{opacity:1}},t);else if("polyline"===u&&"orthogonal"===l.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var c=e.children,d=[],f=0;f<c.length;f++){var p=c[f].getLayout();d.push([p.x,p.y])}cl(h=h||(n.__edge=new zx({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:{parentPoint:[r.x,r.y],childPoints:d},style:{opacity:1}},t)}s.add(h)}(o,s,u,i,f,d,p,n,a)}function Fx(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(a=Vx(s,u,a),s.parentNode===l?s:s.parentNode||s),c=a.edgeShape;null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;cl(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var d=t.getItemGraphicEl(h.dataIndex).__edge,f=i.__edge||(!1===h.isExpand||1===h.children.length?d:void 0);c=a.edgeShape;f&&("curve"===c?cl(f,{shape:Wx(a,r,r),style:{opacity:0}},o,function(){n.remove(f)}):"polyline"===c&&"orthogonal"===a.layout&&cl(f,{shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]]},style:{opacity:0}},o,function(){n.remove(f)}))}function Wx(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Px(s,u),f=Px(s,u+(h-u)*t.curvature),p=Px(l,h+(u-h)*t.curvature),g=Px(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function Hx(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;0<=a;a--)n.push(o[a])}}Cf({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Ci,this._controller=new Vy(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(n,t,i,e){var o=n.getData(),a=n.layoutInfo,r=this._mainGroup,s=n.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(n,a,s),this._updateController(n,t,i);var l=this._data,u={expandAndCollapse:n.get("expandAndCollapse"),layout:s,edgeShape:n.get("edgeShape"),edgeForkPosition:n.get("edgeForkPosition"),orient:n.getOrient(),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){Bx(o,t)&&Gx(o,t,null,r,n,u)}).update(function(t,e){var i=l.getItemGraphicEl(e);Bx(o,t)?Gx(o,t,i,r,n,u):i&&Fx(l,e,i,r,n,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Fx(l,t,e,r,n,u)}).execute(),this._nodeScaleRatio=n.get("nodeScaleRatio"),this._updateNodeAndLinkScale(n),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var i=t.getData(),n=[];i.each(function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])});var e=[],o=[];Wa(n,e,o);var a=this._min,r=this._max;o[0]-e[0]==0&&(e[0]=a?a[0]:e[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-e[1]==0&&(e[1]=a?a[1]:e[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new lx;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=e,this._max=o},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!$y(t,a,o)}),e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){jy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){qy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),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},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),_f({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})}),_f({type:"treeRoam",event:"treeRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=ax(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Zx(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function Ux(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Xx(t,e){return 0<=_(Ux(t),e)}function Yx(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}Sf(Lm("tree","circle")),bf(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var i=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;r="radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,kx(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,kx());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;0<=o;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)}}(s),function(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)}(l,Cx,r),s.hierNode.modifier=-l.hierNode.prelim,Hx(l,Lx);var u=l,h=l,c=l;Hx(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),Hx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Px(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),Hx(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),Hx(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)}))}}}(t,e)})}),sc.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"閳伙拷",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;L(e)&&(e=e[0]),n+=e});var e=t.value;L(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);L(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o=O((n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new Cl(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e))||[],function(t){return new Cl(t,this,e)},this),a=Ax.createTree(i,this,null,function(t){t.wrapMethod("getItemModel",function(t,e){var i=a.getNodeByDataIndex(e),n=o[i.depth];return n&&(t.parentModel=n),t})});return a.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=L(i)?tu(i[0]):tu(i);return au(e.getName(t)+": "+n)},getDataParams:function(t){var e=sc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Yx(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var jx=5;function qx(t){this.group=new Ci,t.add(this.group)}function Kx(t,e,i,n,o,a){var r=[[o?t:t-jx,e],[t+i,e],[t+i,e+n],[o?t:t-jx,e+n]];return a||r.splice(2,0,[t+i+jx,e+n/2]),o||r.push([t,e+n/2]),r}qx.prototype={constructor:qx,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),Su(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,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=Rl(t.x,n),r=Rl(t.y,o),s=Rl(t.x2,n),l=Rl(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=iu(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Qr({shape:{points:Kx(s,0,m,u,f===d.length-1,0===f)},style:D(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:T(o,g)});this.group.add(y),a=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Yx(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};function $x(t){var e=s_(t);return e.stroke=e.fill=e.lineWidth=null,e}var Jx=A,Qx=Ci,t_=rs,e_=E,i_=["label"],n_=["emphasis","label"],o_=["upperLabel"],a_=["emphasis","upperLabel"],r_=10,s_=ha([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function l_(h,r,s,l,u,e,c,t,i,n){if(c){var d=c.getLayout(),o=h.getData();if(o.setItemGraphicEl(c.dataIndex,null),d&&d.isInView){var f=d.width,p=d.height,g=d.borderWidth,m=d.invisible,v=c.getRawIndex(),y=t&&t.getRawIndex(),a=c.viewChildren,x=d.upperHeight,_=a&&a.length,w=c.getModel("itemStyle"),b=c.getModel("emphasis.itemStyle"),S=L("nodeGroup",Qx);if(S){if(i.add(S),S.attr("position",[d.x||0,d.y||0]),S.__tmNodeWidth=f,S.__tmNodeHeight=p,d.isAboveViewRoot)return S;var M=c.getModel(),I=L("background",t_,n,1);if(I&&function(t,e,i){if(e.dataIndex=c.dataIndex,e.seriesIndex=h.seriesIndex,e.setShape({x:0,y:0,width:f,height:p}),m)A(e);else{e.invisible=!1;var n=c.getVisual("borderColor",!0),o=b.get("borderColor"),a=$x(w);a.fill=n;var r=s_(b);if(r.fill=o,i){var s=f-2*g;D(a,r,n,s,x,{x:g,y:0,width:s,height:x})}else a.text=r.text=null;e.setStyle(a),Us(e,r)}t.add(e)}(S,I,_&&d.upperLabelHeight),_)Qs(S)&&Js(S,!1),I&&(Js(I,!0),o.setItemGraphicEl(c.dataIndex,I));else{var T=L("content",t_,n,2);T&&function(t,e){e.dataIndex=c.dataIndex,e.seriesIndex=h.seriesIndex;var i=Math.max(f-2*g,0),n=Math.max(p-2*g,0);if(e.culling=!0,e.setShape({x:g,y:g,width:i,height:n}),m)A(e);else{e.invisible=!1;var o=c.getVisual("color",!0),a=$x(w);a.fill=o;var r=s_(b);D(a,r,o,i,n),e.setStyle(a),Us(e,r)}t.add(e)}(S,T),I&&Qs(I)&&Js(I,!1),Js(S,!0),o.setItemGraphicEl(c.dataIndex,S)}return S}}}function A(t){t.invisible||e.push(t)}function D(t,e,i,n,o,a){var r=M.get("name"),s=M.getModel(a?o_:i_),l=M.getModel(a?a_:n_),u=s.getShallow("show");el(t,e,s,l,{defaultText:u?r:null,autoColor:i,isRectText:!0,labelFetcher:h,labelDataIndex:c.dataIndex,labelProp:a?"upperLabel":"label"}),C(t,a,d),C(e,a,d),a&&(t.textRect=k(a)),t.truncate=u&&s.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function C(t,e,i){var n=t.text;if(!e&&i.isLeafRoot&&null!=n){var o=h.get("drillDownIcon",!0);t.text=o?o+" "+n:n}}function L(t,e,i,n){var o=null!=y&&s[t][y],a=u[t];return o?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():P({},e.shape)}(a,o,t)):m||((o=new e({z:function(t,e){var i=t*r_+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},o=c.parentNode;if(o&&(!l||"drillDown"===l.direction)){var a=0,r=0,s=u.background[o.getRawIndex()];!l&&s&&s.old&&(a=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:a,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(a,0,o.__tmStorageName=t)),r[t][v]=o}}Cf({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Zx(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Qx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=T(l_,e,r,s,i,a,l);!function a(r,s,l,u,h){u?e_(s=r,function(t,e){t.isRemoved()||i(e,e)}):new kf(s,r,t,t).add(i).update(i).remove(T(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,o=c(i,n,l,h);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,u,h+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&e_(u,function(t,e){var i=h[e];e_(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){e_(d,function(t){e_(t,function(t){t.parent&&t.parent.remove(t)})}),e_(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var a,r=[],s={};return{add:function(t,e,i,n,o){return R(n)&&(o=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e<i;e++){var n=r[e];n.el.animateTo(n.target,n.time,n.delay,n.easing,o)}return this;function o(){--t||(r.length=0,s={},a&&a())}}}}();e_(a.willDeleteEls,function(t,r){e_(t,function(t,e){if(!t.invisible){var i,n=t.parent;if(s&&"drillDown"===s.direction)i=n===s.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var o=0,a=0;n.__tmWillDelete||(o=n.__tmNodeWidth/2,a=n.__tmNodeHeight/2),i="nodeGroup"===r?{position:[o,a],style:{opacity:0}}:{shape:{x:o,y:a,width:0,height:0},style:{opacity:0}}}i&&h.add(t,i,l,u)}})}),e_(this._storage,function(t,o){e_(t,function(t,e){var i=a.lastsForAnimation[o][e],n={};i&&("nodeGroup"===o?i.old&&(n.position=t.position.slice(),t.attr("position",i.old)):(i.old&&(n.shape=P({},t.shape),t.setShape(i.old)),i.fadein?(t.setStyle("opacity",0),n.style={opacity:1}):1!==t.style.opacity&&(n.style={opacity:1})),h.add(t,n,l,u))})},this),this._state="animating",h.done(Jx(function(){this._state="ready",a.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new Vy(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Jx(this._onPan,this)),e.on("zoom",Jx(this._onZoom,this)));var n=new Di(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,i){return n.contain(e,i)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new Di(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=ae();ue(s,s,[-e,-i]),ce(s,s,[t.scale,t.scale]),ue(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&&gu(a,r)}}}}},this)},_renderBreadcrumb:function(e,t,i){i=i||((i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new qx(this.group))).render(e,t,i.node,Jx(function(t){"animating"!==this._state&&(Xx(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},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(o,a){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var i=e.transformCoordToLocal(o,a),n=e.shape;if(!(n.x<=i[0]&&i[0]<=n.x+n.width&&n.y<=i[1]&&i[1]<=n.y+n.height))return!1;r={node:t,offsetX:i[0],offsetY:i[1]}}},this),r}});for(var u_=function(){},h_=["treemapZoomToNode","treemapRender","treemapMove"],c_=0;c_<h_.length;c_++)_f({type:h_[c_],update:"updateView"},u_);_f({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var i=Zx(o,["treemapZoomToNode","treemapRootToNode"],t);if(i){var n=t.getViewRoot();n&&(o.direction=Xx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var d_=E,f_=z,p_=-1,g_=function(t){var e=t.mappingMethod,i=t.type,n=this.option=k(t);this.type=i,this.mappingMethod=e,this._normalizeData=T_[e];var o=m_[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(v_(n),function(i){var t=i.pieceList;i.hasSpecialVisual=!1,E(t,function(t,e){t.originIndex=e,null!=t.visual&&(i.hasSpecialVisual=!0)})}(n)):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(d_(e,function(t,e){n[t]=e}),!L(i)){var o=[];z(i)?d_(i,function(t,e){var i=n[e];o[null!=i?i:p_]=t}):o[p_]=i,i=I_(t,o)}for(var a=e.length-1;0<=a;a--)null==i[a]&&(delete n[e[a]],e.pop())}(n):v_(n,!0):(Y("linear"!==e||n.dataExtent),v_(n))};g_.prototype={constructor:g_,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return A(this._normalizeData,this)}};var m_=g_.visualHandlers={color:{applyVisual:__("color"),getColorMapper:function(){var o=this.option;return A("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),w_.call(this,t)}:function(t,e,i){var n=!!i;return e||(t=this._normalizeData(t)),i=Ue(t,o.parsedVisual,i),n?i:$e(i,"rgba")},this)},_doMap:{linear:function(t){return $e(Ue(t,this.option.parsedVisual),"rgba")},category:w_,piecewise:function(t,e){var i=M_.call(this,e);return null==i&&(i=$e(Ue(t,this.option.parsedVisual),"rgba")),i},fixed:b_}},colorHue:y_(function(t,e){return qe(t,e)}),colorSaturation:y_(function(t,e){return qe(t,null,e)}),colorLightness:y_(function(t,e){return qe(t,null,null,e)}),colorAlpha:y_(function(t,e){return Ke(t,e)}),opacity:{applyVisual:__("opacity"),_doMap:S_([0,1])},liftZ:{applyVisual:__("liftZ"),_doMap:{linear:b_,category:b_,piecewise:b_,fixed:b_}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(R(n))i("symbol",n);else if(f_(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:x_,category:w_,piecewise:function(t,e){var i=M_.call(this,e);return null==i&&(i=x_.call(this,t)),i},fixed:b_}},symbolSize:{applyVisual:__("symbolSize"),_doMap:S_([0,1])}};function v_(t,e){var i=t.visual,n=[];z(i)?d_(i,function(t){n.push(t)}):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),I_(t,n)}function y_(n){return{applyVisual:function(t,e,i){t=this.mapValueToVisual(t),i("color",n(e("color"),t))},_doMap:S_([0,1])}}function x_(t){var e=this.option.visual;return e[Math.round(El(t,[0,1],[0,e.length-1],!0))]||{}}function __(n){return function(t,e,i){i(n,this.mapValueToVisual(t))}}function w_(t){var e=this.option.visual;return e[this.option.loop&&t!==p_?t%e.length:t]}function b_(){return this.option.visual[0]}function S_(n){return{linear:function(t){return El(t,n,this.option.visual,!0)},category:w_,piecewise:function(t,e){var i=M_.call(this,e);return null==i&&(i=El(t,n,this.option.visual,!0)),i},fixed:b_}}function M_(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[g_.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function I_(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=O(e,function(t){return Fe(t)})),e}var T_={linear:function(t){return El(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=g_.findPieceIndex(t,e,!0);if(null!=i)return El(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?p_:e},fixed:et};function A_(t,e,i){return t?e<=i:e<i}g_.listVisualTypes=function(){var i=[];return E(m_,function(t,e){i.push(e)}),i},g_.addVisualHandler=function(t,e){m_[t]=e},g_.isValidType=function(t){return m_.hasOwnProperty(t)},g_.eachVisual=function(t,e,i){z(t)?E(t,e,i):e.call(i,t)},g_.mapVisual=function(t,n,o){var a,r=L(t)?[]:z(t)?{}:(a=!0,null);return g_.eachVisual(t,function(t,e){var i=n.call(o,t,e);a?r=i:r[e]=i}),r},g_.retrieveVisuals=function(i){var n,o={};return i&&d_(m_,function(t,e){i.hasOwnProperty(e)&&(o[e]=i[e],n=!0)}),n?o:null},g_.prepareVisualTypes=function(t){if(f_(t)){var i=[];d_(t,function(t,e){i.push(e)}),t=i}else{if(!L(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},g_.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},g_.findPieceIndex=function(n,t,e){for(var o,a=1/0,i=0,r=t.length;i<r;i++){var s=t[i].value;if(null!=s){if(s===n||"string"==typeof s&&s===n+"")return i;e&&c(s,i)}}for(i=0,r=t.length;i<r;i++){var l=t[i],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(A_(h[1],n,u[1]))return i}else if(u[1]===1/0){if(A_(h[0],u[0],n))return i}else if(A_(h[0],u[0],n)&&A_(h[1],n,u[1]))return i;e&&c(u[0],i),e&&c(u[1],i)}}if(e)return n===1/0?t.length-1:n===-1/0?0:o;function c(t,e){var i=Math.abs(t-n);i<a&&(a=i,o=e)}};var D_=L,C_="itemStyle",L_={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(C_);a.isRemoved()||!function n(t,e,o,a,r,s){var l=t.getModel();var i=t.getLayout();if(!i||i.invisible||!i.isInView)return;var u=t.getModel(C_);var h=o[t.depth];var c=k_(u,e,h,a);var d=u.get("borderColor");var f=u.get("borderColorSaturation");var p;null!=f&&(p=P_(c),g=f,d=null!=(m=p)?qe(m,null,null,g):null);var g,m;t.setVisual("borderColor",d);var v=t.viewChildren;if(v&&v.length){var y=O_(t,l,i,u,c,v);E(v,function(t,e){if(t.depth>=r.length||t===r[t.depth]){var i=R_(l,c,t,e,y,s);n(t,i,o,a,r,s)}})}else p=P_(c),t.setVisual("color",p)}(a,{},O(o.levelModels,function(t){return t?t.get(C_):null}),r,t.getViewRoot().getAncestors(),t)}};function k_(i,n,o,a){var r=P({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=n[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function P_(t){var e=N_(t,"color");if(e){var i=N_(t,"colorAlpha"),n=N_(t,"colorSaturation");return n&&(e=qe(e,null,null,n)),i&&(e=Ke(e,i)),e}}function N_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function O_(t,e,i,n,o,a){if(a&&a.length){var r=E_(e,"color")||null!=o.color&&"none"!==o.color&&(E_(e,"colorAlpha")||E_(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 g_(c);return d.__drColorMappingBy=h,d}}}function E_(t,e){var i=t.get(e);return D_(i)&&i.length?{name:e,range:i}:null}function R_(t,e,i,n,o,a){var r=P({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}var z_=Math.max,B_=Math.min,V_=W,G_=E,F_=["itemStyle","borderWidth"],W_=["itemStyle","gapWidth"],H_=["upperLabel","show"],Z_=["upperLabel","height"],U_={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=bu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=Rl(V_(s.width,l[0]),o),h=Rl(V_(s.height,l[1]),a),c=n&&n.type,d=Zx(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Ux(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;d<f;d++)h+=c[d].getValue();var p=r.getValue();if(0===p)return s;u*=h/p;var g=a.getModel(),m=g.get(F_),v=Math.max(m,q_(g));u+=4*m*m+(3*m+v)*Math.pow(u,.5),Hl<u&&(u=Hl),r=a}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,o*y]}(t,d,p,u,h):f?[f.width,f.height]:[u,h],v=r.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:r.squareRatio,sort:v,leafDepth:r.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(x),function t(e,i,n,o){var a;var r;if(e.isRemoved())return;var s=e.getLayout();a=s.width;r=s.height;var l=e.getModel();var u=l.get(F_);var h=l.get(W_)/2;var c=q_(l);var d=Math.max(u,c);var f=u-h;var p=d-h;var l=e.getModel();e.setLayout({borderWidth:u,upperHeight:d,upperLabelHeight:c},!0);a=z_(a-2*f,0);r=z_(r-f-p,0);var g=a*r;var m=X_(e,l,g,i,n,o);if(!m.length)return;var v={x:f,y:p,width:a,height:r};var y=B_(a,r);var x=1/0;var _=[];_.area=0;for(var w=0,b=m.length;w<b;){var S=m[w];_.push(S),_.area+=S.getLayout().area;var M=Y_(_,y,i.squareRatio);x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,j_(_,y,v,h,!1),y=B_(v.width,v.height),_.length=_.area=0,1/0)}_.length&&j_(_,y,v,h,!0);if(!n){var I=l.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(var w=0,b=m.length;w<b;w++)t(m[w],i,n,o+1)}(p,y,!1,0);x=p.getLayout();G_(g,function(t,e){var i=(g[e+1]||p).getValue();t.setLayout(P({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))})}var _=t.getData().tree.root;_.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;var r=[a.width/2,a.height/2],s=o;for(;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(s,f,d),!0),t.setLayoutInfo(s),function e(t,i,n,o,a){var r=t.getLayout();var s=n[a];var l=s&&s===t;if(s&&!l||a===n.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!i.intersect(r),isAboveViewRoot:l},!0);var u=new Di(i.x-r.x,i.y-r.y,i.width,i.height);G_(t.viewChildren||[],function(t){e(t,u,n,o,a+1)})}(_,new Di(-s.x,-s.y,o,a),g,p,0)}};function X_(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=[];!function(t,n){n&&t.sort(function(t,e){var i="asc"===n?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==i?"asc"===n?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:i})}(r=M(r,function(t){return!t.isRemoved()}),s);var u=function(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];G_(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;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}(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 Y_(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),o<n&&(o=n));var l=t.area*t.area,u=e*e*i;return l?z_(u*o/l,l/(u*a)):1/0}function j_(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]]=z_(h-2*n,0),v=i[s[a]]+i[l[a]]-u,y=c===d-1||v<g?v:g,x=p[l[a]]=z_(y-2*n,0);p[s[r]]=i[s[r]]+B_(n,m/2),p[s[a]]=u+B_(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function q_(t){return t.get(H_)?t.get(Z_):0}function K_(t){return"_EC_"+t}Sf(L_),bf(U_);function $_(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}var J_=$_.prototype;function Q_(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function tw(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}J_.type="graph",J_.isDirected=function(){return this._directed},J_.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[K_(t)]){var n=new Q_(t,e);return(n.hostGraph=this).nodes.push(n),i[K_(t)]=n}},J_.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},J_.getNodeById=function(t){return this._nodesMap[K_(t)]},J_.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]),Q_.isInstance(t)||(t=n[K_(t)]),Q_.isInstance(e)||(e=n[K_(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new tw(t,e,i);return(r.hostGraph=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}}},J_.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},J_.getEdge=function(t,e){Q_.isInstance(t)&&(t=t.id),Q_.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},J_.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&t.call(e,i[o],o)},J_.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&0<=i[o].node1.dataIndex&&0<=i[o].node2.dataIndex&&t.call(e,i[o],o)},J_.breadthFirstTraverse=function(t,e,i,n){if(Q_.isInstance(e)||(e=this._nodesMap[K_(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;){var s=r.shift(),l=s[o];for(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}}}}},J_.update=function(){for(var t=this.data,i=this.edgeData,e=this.nodes,n=this.edges,o=0,a=e.length;o<a;o++)e[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)e[t.getRawIndex(o)].dataIndex=o;i.filterSelf(function(t){var e=n[i.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(o=0,a=i.count();o<a;o++)n[i.getRawIndex(o)].dataIndex=o},J_.clone=function(){for(var t=new $_(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},Q_.prototype={constructor:Q_,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)}},tw.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function ew(i,n){return{getValue:function(t){var e=this[i][n];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[i][n].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[i][n].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[i][n].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[i][n].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[i][n].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[i][n].getRawIndex(this.dataIndex)}}}b(Q_,ew("hostGraph","data")),b(tw,ew("hostGraph","edgeData")),$_.Node=Q_,$_.Edge=tw,ra(Q_),ra(tw);function iw(t,e,i,n,o){for(var a=new $_(n),r=0;r<t.length;r++)a.addNode(W(t[r].id,t[r].name,r),r);var s=[],l=[],u=0;for(r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(W(h.id,c+" > "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=gp(t,i);else{var g=lh.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=lp(t,{coordDimensions:m});(f=new Yf(v,i)).initData(t)}var y=new Yf(["value"],i);return y.initData(l,s),o&&o(f,y),yx({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var nw=Df({type:"series.graph",init:function(t){nw.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new qv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){nw.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){nw.superApply(this,"mergeDefaultAndTheme",arguments),Go(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return iw(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new Cl({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cl({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return nw.superApply(this,"formatTooltip",arguments);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=au(l.join(" > ")),o.value&&(l+=" : "+au(o.value)),l},_updateCategoriesData:function(){var t=O(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new Yf(["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 nw.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,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,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),ow=ls.prototype,aw=ds.prototype;function rw(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var sw=Cs({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[rw(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:ow.buildPath,_buildPathCurve:aw.buildPath,pointAt:function(t){return this[rw(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:ow.pointAt,_pointAtCurve:aw.pointAt,tangentAt:function(t){var e=this.shape,i=rw(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:aw.tangentAt}),lw=["fromSymbol","toSymbol"];function uw(t){return"_"+t+"Type"}function hw(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){L(a)||(a=[a,a]);var r=wg(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function cw(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function dw(t,e,i){Ci.call(this),this._createLine(t,e,i)}var fw=dw.prototype;function pw(t){this._ctor=t||dw,this.group=new Ci}fw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f,p;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=r/2,x=[(h=a.tangentAt(y))[1],-h[0]],_=a.pointAt(y);0<x[1]&&(x[0]=-x[0],x[1]=-x[1]);var w,b=h[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var S=-Math.atan2(h[1],h[0]);l[0]<s[0]&&(S=Math.PI+S),i.attr("rotation",S)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-v,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=v,f="top";break;default:w=0,f="middle"}switch(i.__position){case"end":c=[u[0]*m+l[0],u[1]*v+l[1]],d=.8<u[0]?"left":u[0]<-.8?"right":"center",f=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":c=[-u[0]*m+s[0],-u[1]*v+s[1]],d=.8<u[0]?"right":u[0]<-.8?"left":"center",f=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*b+s[0],s[1]+w],d=h[0]<0?"right":"left",p=[-m*b,-w];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[_[0],_[1]+w],d="center",p=[0,-w];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*b+l[0],l[1]+w],d=0<=h[0]?"right":"left",p=[m*b,-w]}i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n],origin:p})}}}},fw._createLine=function(i,n,t){var e=i.hostModel,o=function(t){var e=new sw({name:"line",subPixelOptimize:!0});return cw(e.shape,t),e}(i.getItemLayout(n));o.shape.percent=0,dl(o,{shape:{percent:1}},e,n),this.add(o);var a=new Ur({name:"label",lineLabelOriginalOpacity:1});this.add(a),E(lw,function(t){var e=hw(t,i,n);this.add(e),this[uw(t)]=i.getItemVisual(n,t)},this),this._updateCommonStl(i,n,t)},fw.updateData=function(o,a,t){var e=o.hostModel,i=this.childOfName("line"),n=o.getItemLayout(a),r={shape:{}};cw(r.shape,n),cl(i,r,e,a),E(lw,function(t){var e=o.getItemVisual(a,t),i=uw(t);if(this[i]!==e){this.remove(this.childOfName(t));var n=hw(t,o,a);this.add(n)}this[i]=e},this),this._updateCommonStl(o,a,t)},fw._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),r=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),c=Z(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(D({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},a)),o.hoverStyle=r,E(lw,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=h||"#000",null==(f=n.getFormattedLabel(e,"normal",t.dataType)))){var v=n.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?zl(v):v}var y=p?f:null,x=g?H(n.getFormattedLabel(e,"emphasis",t.dataType),f):null,_=m.style;if(null!=y||null!=x){nl(m.style,s,{text:y},{autoColor:d}),m.__textAlign=_.textAlign,m.__verticalAlign=_.textVerticalAlign,m.__position=s.get("position")||"middle";var w=s.get("distance");L(w)||(w=[w,w]),m.__labelDistance=w}m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,$s(this)},fw.highlight=function(){this.trigger("emphasis")},fw.downplay=function(){this.trigger("normal")},fw.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},fw.setLinePoints=function(t){var e=this.childOfName("line");cw(e.shape,t),e.dirty()},w(dw,Ci);var gw=pw.prototype;function mw(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 vw(t){return isNaN(t[0])||isNaN(t[1])}function yw(t){return!vw(t[0])&&!vw(t[1])}function xw(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o}function _w(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}gw.isPersistent=function(){return!0},gw.updateData=function(i){var n=this,e=n.group,o=n._lineData;n._lineData=i,o||e.removeAll();var a=mw(i);i.diff(o).add(function(t){!function(t,e,i,n){if(!yw(e.getItemLayout(i)))return;var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}(n,i,t,a)}).update(function(t,e){!function(t,e,i,n,o,a){var r=e.getItemGraphicEl(n);if(!yw(i.getItemLayout(o)))return t.group.remove(r);r?r.updateData(i,o,a):r=new t._ctor(i,o,a);i.setItemGraphicEl(o,r),t.group.add(r)}(n,o,i,e,t,a)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},gw.updateLayout=function(){var i=this._lineData;i&&i.eachItemGraphicEl(function(t,e){t.updateLayout(i,e)},this)},gw.incrementalPrepareUpdate=function(t){this._seriesScope=mw(t),this._lineData=null,this.group.removeAll()},gw.incrementalUpdate=function(t,e){function i(t){t.isGroup||function(t){return t.animators&&0<t.animators.length}(t)||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){if(yw(e.getItemLayout(n))){var o=new this._ctor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o)}}},gw.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},gw._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var ww=[],bw=[],Sw=[],Mw=La,Iw=_t,Tw=Math.abs;function Aw(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){ww[0]=Mw(o[0],a[0],r[0],h),ww[1]=Mw(o[1],a[1],r[1],h),(f=Tw(Iw(ww,e)-l))<s&&(s=f,n=h)}for(var c=0;c<32;c++){var d=n+u;bw[0]=Mw(o[0],a[0],r[0],n),bw[1]=Mw(o[1],a[1],r[1],n),Sw[0]=Mw(o[0],a[0],r[0],d),Sw[1]=Mw(o[1],a[1],r[1],d);var f=Iw(bw,e)-l;if(Tw(f)<.01)break;var p=Iw(Sw,e)-l;u/=2,f<0?0<=p?n+=u:n-=u:0<=p?n-=u:n+=u}return n}function Dw(t,l){var u=[],h=Na,c=[[],[],[]],d=[[],[]],f=[];l/=2,t.eachEdge(function(t,e){var i=t.getLayout(),n=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");i.__original||(i.__original=[rt(i[0]),rt(i[1])],i[2]&&i.__original.push(rt(i[2])));var a=i.__original;if(null!=i[2]){if(at(c[0],a[0]),at(c[1],a[2]),at(c[2],a[1]),n&&"none"!==n){var r=_w(t.node1),s=Aw(c,a[0],r*l);h(c[0][0],c[1][0],c[2][0],s,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],s,u),c[0][1]=u[3],c[1][1]=u[4]}if(o&&"none"!==o){r=_w(t.node2),s=Aw(c,a[1],r*l);h(c[0][0],c[1][0],c[2][0],s,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],s,u),c[1][1]=u[1],c[2][1]=u[2]}at(i[0],c[0]),at(i[1],c[2]),at(i[2],c[1])}else{if(at(d[0],a[0]),at(d[1],a[1]),ht(f,d[1],d[0]),mt(f,f),n&&"none"!==n){r=_w(t.node1);ut(d[0],d[0],f,r*l)}if(o&&"none"!==o){r=_w(t.node2);ut(d[1],d[1],f,-r*l)}at(i[0],d[0]),at(i[1],d[1])}})}var Cw="__focusNodeAdjacency",Lw="__unfocusNodeAdjacency",kw=["itemStyle","opacity"],Pw=["lineStyle","opacity"];function Nw(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function Ow(t,e,i){var n=t.getGraphicEl(),o=Nw(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function Ew(t,e){var i=Nw(t,e),n=t.getGraphicEl();n.traverse(function(t){t.isGroup||t.setStyle("opacity",i)}),n.highlight&&n.highlight()}Cf({type:"graph",init:function(t,e){var i=new im,n=new pw,o=this.group;this._controller=new Vy(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(o,t,a){var r=this,e=o.coordinateSystem;this._model=o;var i=this._symbolDraw,n=this._lineDraw,s=this.group;if("view"===e.type){var l={position:e.position,scale:e.scale};this._firstRender?s.attr(l):cl(s,l,o)}Dw(o.getGraph(),xw(o));var u=o.getData();i.updateData(u);var h=o.getEdgeData();n.updateData(h),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var c=o.forceLayout,d=o.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e);t.off("drag").off("dragend");var n=i.get("draggable");n&&t.on("drag",function(){c&&(c.warmUp(),this._layouting||this._startForceLayoutIteration(c,d),c.setFixed(e),u.setItemLayout(e,t.position))},this).on("dragend",function(){c&&c.setUnfixed(e)},this),t.setDraggable(n&&c),t[Cw]&&t.off("mouseover",t[Cw]),t[Lw]&&t.off("mouseout",t[Lw]),i.get("focusNodeAdjacency")&&(t.on("mouseover",t[Cw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[Lw]=function(){r._dispatchUnfocus(a)}))},this),u.graph.eachEdge(function(t){var e=t.getGraphicEl();e[Cw]&&e.off("mouseover",e[Cw]),e[Lw]&&e.off("mouseout",e[Lw]),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e[Cw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e[Lw]=function(){r._dispatchUnfocus(a)}))});var f="circular"===o.get("layout")&&o.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e).get("label.rotate")||0,n=t.getSymbolPath();if(f){var o=u.getItemLayout(e),a=Math.atan2(o[1]-g,o[0]-p);a<0&&(a=2*Math.PI+a);var r=o[0]<p;r&&(a-=Math.PI);var s=r?"left":"right";il(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else il(n,{textRotation:i*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){i._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData().graph,a=n.dataIndex,r=n.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){Ow(t,kw,.1)}),o.eachEdge(function(t){Ow(t,Pw,.1)}),s&&(Ew(s,kw),E(s.edges,function(t){t.dataIndex<0||(Ew(t,Pw),Ew(t.node1,kw),Ew(t.node2,kw))})),l&&(Ew(l,Pw),Ew(l.node1,kw),Ew(l.node2,kw)))},unfocusNodeAdjacency:function(t,e,i,n){var o=t.getData().graph;o.eachNode(function(t){Ow(t,kw)}),o.eachEdge(function(t){Ow(t,Pw)})},_startForceLayoutIteration:function(t,i){var n=this;!function e(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(i?n._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!$y(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){jy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){qy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),Dw(o.getGraph(),xw(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=xw(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},updateLayout:function(t){Dw(t.getGraph(),xw(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),_f({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),_f({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});_f({type:"graphRoam",event:"graphRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",query:i},function(t){var e=ax(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Rw(t){return t instanceof Array||(t=[t,t]),t}function zw(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")])}),Bw(i)}}function Bw(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=rt(t.node1.getLayout()),n=rt(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)})}var Vw=Math.PI,Gw=[];function Fw(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),o=t.getData(),a=o.graph,s=n.width/2+n.x,l=n.height/2+n.y,r=Math.min(n.width,n.height)/2,u=o.count();o.setLayout({cx:s,cy:l}),u&&(Ww[e](t,i,a,o,r,s,l,u),a.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=rt(t.node1.getLayout()),o=rt(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[s*(i*=3)+a*(1-i),l*i+r*(1-i)]),t.setLayout([n,o,e])}))}}var Ww={value:function(t,e,i,n,o,a,r,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode(function(t){var e=t.getValue("value"),i=h*(u?e:1)/2;l+=i,t.setLayout([o*Math.cos(l)+a,o*Math.sin(l)+r]),l+=i})},symbolSize:function(t,e,i,n,o,a,r,s){var l=0;Gw.length=s;var u=xw(t);i.eachNode(function(t){var e=_w(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=u;var i=Math.asin(e/2/o);isNaN(i)&&(i=Vw/2),Gw[t.dataIndex]=i,l+=2*i});var h=(2*Vw-l)/s/2,c=0;i.eachNode(function(t){var e=h+Gw[t.dataIndex];c+=e,t.setLayout([o*Math.cos(c)+a,o*Math.sin(c)+r]),c+=e})}},Hw=ut;xf(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),n=t.getGraph().data,o=e.mapArray(e.getName);n.filterSelf(function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var i=0;i<a.length;i++)if(!a[i].isSelected(e))return!1}return!0})},this)}),Sf(Lm("graph","circle",null)),Sf(function(t){var h={};t.eachSeriesByType("graph",function(s){var l=s.getCategoriesData(),o=s.getData(),u={};l.each(function(t){var e=l.getName(t);u["ec-"+e]=t;var i=l.getItemModel(t),n=i.get("itemStyle.color")||s.getColorFromPalette(e,h);l.setItemVisual(t,"color",n);for(var o=["opacity","symbol","symbolSize","symbolKeepAspect"],a=0;a<o.length;a++){var r=i.getShallow(o[a],!0);null!=r&&l.setItemVisual(t,o[a],r)}}),l.count()&&o.each(function(t){var e=o.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=u["ec-"+e]);for(var i=["color","opacity","symbol","symbolSize","symbolKeepAspect"],n=0;n<i.length;n++)null==o.getItemVisual(t,i[n],!0)&&o.setItemVisual(t,i[n],l.getItemVisual(e,i[n]))}})})}),Sf(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=Rw(t.get("edgeSymbol")),i=Rw(t.get("edgeSymbolSize")),u="lineStyle.color".split("."),h="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",i&&i[0]),l.setVisual("toSymbolSize",i&&i[1]),l.setVisual("color",t.get(u)),l.setVisual("opacity",t.get(h)),l.each(function(t){var e=l.getItemModel(t),i=s.getEdgeByIndex(t),n=Rw(e.getShallow("symbol",!0)),o=Rw(e.getShallow("symbolSize",!0)),a=e.get(u),r=e.get(h);switch(a){case"source":a=i.node1.getVisual("color");break;case"target":a=i.node2.getVisual("color")}n[0]&&i.setVisual("fromSymbol",n[0]),n[1]&&i.setVisual("toSymbol",n[1]),o[0]&&i.setVisual("fromSymbolSize",o[0]),o[1]&&i.setVisual("toSymbolSize",o[1]),i.setVisual("color",a),i.setVisual("opacity",r)})})}),bf(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=[];E(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])}Bw(n.graph)}else e&&"none"!==e||zw(t)})}),bf(Ld.VISUAL.POST_CHART_LAYOUT,function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&Fw(t,"symbolSize")})}),bf(function(t){t.eachSeriesByType("graph",function(t){if(!(l=t.coordinateSystem)||"view"===l.type)if("force"===t.get("layout")){var c=t.preservedPoints||{},d=t.getGraph(),f=d.data,e=d.edgeData,i=t.getModel("force"),n=i.get("initLayout");t.preservedPoints?f.each(function(t){var e=f.getId(t);f.setItemLayout(t,c[e]||[NaN,NaN])}):n&&"none"!==n?"circular"===n&&Fw(t,"value"):zw(t);var o=f.getDataExtent("value"),a=e.getDataExtent("value"),r=i.get("repulsion"),s=i.get("edgeLength");L(r)||(r=[r,r]),L(s)||(s=[s,s]),s=[s[1],s[0]];var l,u=f.mapArray("value",function(t,e){var i=f.getItemLayout(e),n=El(t,o,r);return isNaN(n)&&(n=(r[0]+r[1])/2),{w:n,rep:n,fixed:f.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),h=e.mapArray("value",function(t,e){var i=d.getEdgeByIndex(e),n=El(t,a,s);isNaN(n)&&(n=(s[0]+s[1])/2);var o=i.getModel();return{n1:u[i.node1.dataIndex],n2:u[i.node2.dataIndex],d:n,curveness:o.get("lineStyle.curveness")||0,ignoreForceLayout:o.get("ignoreForceLayout")}}),p=(l=t.coordinateSystem).getBoundingRect(),g=function(f,p,t){for(var e=t.rect,i=e.width,n=e.height,g=[e.x+i/2,e.y+n/2],m=null==t.gravity?.1:t.gravity,o=0;o<f.length;o++){var a=f[o];a.p||(a.p=ot(i*(Math.random()-.5)+g[0],n*(Math.random()-.5)+g[1])),a.pp=rt(a.p),a.edges=null}var r=null==t.friction?.6:t.friction,v=r;return{warmUp:function(){v=.8*r},setFixed:function(t){f[t].fixed=!0},setUnfixed:function(t){f[t].fixed=!1},step:function(t){for(var e=[],i=f.length,n=0;n<p.length;n++){var o=p[n];if(!o.ignoreForceLayout){var a=o.n1;ht(e,(u=o.n2).p,a.p);var r=ct(e)-o.d,s=u.w/(a.w+u.w);isNaN(s)&&(s=0),mt(e,e),a.fixed||Hw(a.p,a.p,e,s*r*v),u.fixed||Hw(u.p,u.p,e,-(1-s)*r*v)}}for(n=0;n<i;n++){(d=f[n]).fixed||(ht(e,g,d.p),Hw(d.p,d.p,e,m*v))}for(n=0;n<i;n++){a=f[n];for(var l=n+1;l<i;l++){var u;ht(e,(u=f[l]).p,a.p),0===(r=ct(e))&&(st(e,Math.random()-.5,Math.random()-.5),r=1);var h=(a.rep+u.rep)/r/r;a.fixed||Hw(a.pp,a.pp,e,h),u.fixed||Hw(u.pp,u.pp,e,-h)}}var c=[];for(n=0;n<i;n++){var d;(d=f[n]).fixed||(ht(c,d.p,d.pp),Hw(d.p,d.p,c,v),at(d.pp,d.p))}v*=.992,t&&t(f,p,v<.01)}}}(u,h,{rect:p,gravity:i.get("gravity"),friction:i.get("friction")}),m=g.step;g.step=function(h){for(var t=0,e=u.length;t<e;t++)u[t].fixed&&at(u[t].p,d.getNodeByIndex(t).getLayout());m(function(t,e,i){for(var n=0,o=t.length;n<o;n++)t[n].fixed||d.getNodeByIndex(n).setLayout(t[n].p),c[f.getId(n)]=t[n].p;for(n=0,o=e.length;n<o;n++){var a=e[n],r=d.getEdgeByIndex(n),s=a.n1.p,l=a.n2.p,u=r.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],at(u[0],s),at(u[1],l),+a.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(u)}h&&h(i)})},t.forceLayout=g,t.preservedPoints=c,g.step()}else t.forceLayout=null})}),wf("graphView",{create:function(t,d){var f=[];return t.eachSeriesByType("graph",function(t){var e=t.get("coordinateSystem");if(!e||"view"===e){var i=t.getData(),n=[],o=[];Wa(i.mapArray(function(t){var e=i.getItemModel(t);return[+e.get("x"),+e.get("y")]}),n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=(o[0]-n[0])/(o[1]-n[1]),r=function(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,bu(n,{width:e.getWidth(),height:e.getHeight()})}(t,d,a);isNaN(a)&&(n=[r.x,r.y],o=[r.x+r.width,r.y+r.height]);var s=o[0]-n[0],l=o[1]-n[1],u=r.width,h=r.height,c=t.coordinateSystem=new lx;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(n[0],n[1],s,l),c.setViewRect(r.x,r.y,u,h),c.setCenter(t.get("center")),c.setZoom(t.get("zoom")),f.push(c)}}),f}});sc.extend({type:"series.gauge",getInitialData:function(t,e){return Yv(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 Zw=Ar.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*(o/3<=a?1:2),l=e.y-n(r)*a*(o/3<=a?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)}});function Uw(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var Xw=2*Math.PI,Yw=(_c.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o);return{cx:Rl(i[0],e.getWidth()),cy:Rl(i[1],e.getHeight()),r:Rl(t.get("radius"),a/2)}}(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"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=((g=-t.get("endAngle")/180*Math.PI)-u)%Xw,c=u,d=s.get("width"),f=r.get("show"),p=0;f&&p<n.length;p++){var g,m=Math.min(Math.max(n[p][0],0),1),v=new qr({shape:{startAngle:c,endAngle:g=u+h*m,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-d,r:o.r},silent:!0});v.setStyle({fill:n[p][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),c=g}function y(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(!l){var x=u;u=g,g=x}this._renderTicks(t,e,i,y,o,u,g,l),this._renderPointer(t,e,i,y,o,u,g,l),this._renderTitle(t,e,i,y,o),this._renderDetail(t,e,i,y,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=Rl(p.get("length"),c),_=Rl(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 A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new ls({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-x)+u,y2:D*(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=Uw(zl(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new Ur({style:nl({},m,{text:L,x:A*(c-x-k)+u,y:D*(c-x-k)+h,textVerticalAlign:D<-.4?"top":.4<D?"bottom":"middle",textAlign:A<-.4?"left":.4<A?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){A=Math.cos(w),D=Math.sin(w);var O=new ls({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(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(n,t,e,o,a,i,r,s){var l=this.group,u=this._data;if(n.get("pointer.show")){var h=[+n.get("min"),+n.get("max")],c=[i,r],d=n.getData(),f=d.mapDimension("value");d.diff(u).add(function(t){var e=new Zw({shape:{angle:i}});dl(e,{shape:{angle:El(d.get(f,t),h,c,!0)}},n),l.add(e),d.setItemGraphicEl(t,e)}).update(function(t,e){var i=u.getItemGraphicEl(e);cl(i,{shape:{angle:El(d.get(f,t),h,c,!0)}},n),l.add(i),d.setItemGraphicEl(t,i)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),n=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Rl(n.get("width"),a.r),r:Rl(n.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(El(d.get(f,e),h,[0,1],!0))),$s(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+Rl(l[0],o.r),h=o.cy+Rl(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(El(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new Ur({silent:!0,style:nl({},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+Rl(l[0],o.r),h=o.cy+Rl(l[1],o.r),c=Rl(a.get("width"),o.r),d=Rl(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(El(p,[r,s],[0,1],!0));this.group.add(new Ur({silent:!0,style:nl({},a,{x:u,y:h,text:Uw(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Df({type:"series.funnel",init:function(t){Yw.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Yv(this,{coordDimensions:["value"],encodeDefaulter:T(Ju,this)})},_defaultLabelLine:function(t){Go(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=Yw.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}}}}));function jw(t,e){Ci.call(this);var i=new Qr,n=new ts,o=new Ur;this.add(i),this.add(n),this.add(o),this.highDownOnUpdate=function(t,e){"emphasis"===e?(n.ignore=n.hoverIgnore,o.ignore=o.hoverIgnore):(n.ignore=n.normalIgnore,o.ignore=o.normalIgnore)},this.updateData(t,e,!0)}var qw=jw.prototype,Kw=["itemStyle","opacity"];qw.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get(Kw);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),dl(n,{style:{opacity:s}},o,e)):cl(n,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");n.setStyle(D({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),$s(this)},qw._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");cl(i,{shape:{points:r.linePoints||r.linePoints}},o,e),cl(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");el(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()},w(jw,Ci);_c.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 jw(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(){}});Sf(iy("funnel")),bf(function(t,w,e){t.eachSeriesByType("funnel",function(t){var o=t.getData(),a=o.mapDimension("value"),e=t.get("sort"),r=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,w),i=function(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}(o,e),s=[Rl(t.get("minSize"),r.width),Rl(t.get("maxSize"),r.width)],n=o.getDataExtent(a),l=t.get("min"),u=t.get("max");null==l&&(l=Math.min(n[0],0)),null==u&&(u=n[1]);function h(t,e){var i,n=El(o.get(a,t)||0,[l,u],s,!0);switch(c){case"left":i=r.x;break;case"center":i=r.x+(r.width-n)/2;break;case"right":i=r.x+r.width-n}return[[i,e],[i+n,e]]}var c=t.get("funnelAlign"),d=t.get("gap"),f=(r.height-d*(o.count()-1))/o.count(),p=r.y;"ascending"===e&&(f=-f,d=-d,p+=r.height,i=i.reverse());for(var g=0;g<i.length;g++){var m=i[g],v=i[g+1],y=o.getItemModel(m).get("itemStyle.height");null==y?y=f:(y=Rl(y,r.height),"ascending"===e&&(y=-y));var x=h(m,p),_=h(v,p+y);p+=y+d,o.setItemLayout(m,{points:x.concat(_.slice().reverse())})}!function(g){g.each(function(t){var e,i,n,o,a=g.getItemModel(t),r=a.getModel("label").get("position"),s=a.getModel("labelLine"),l=g.getItemLayout(t),u=l.points,h="inner"===r||"inside"===r||"center"===r||"insideLeft"===r||"insideRight"===r;if(h)e="insideLeft"===r?(i=(u[0][0]+u[3][0])/2+5,n=(u[0][1]+u[3][1])/2,"left"):"insideRight"===r?(i=(u[1][0]+u[2][0])/2-5,n=(u[1][1]+u[2][1])/2,"right"):(i=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,n=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,"center"),o=[[i,n],[i,n]];else{var c,d,f,p=s.get("length");e="left"===r?(c=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,i=(f=c-p)-5,"right"):"right"===r?(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,i=(f=c+p)+5,"left"):"rightTop"===r?(c=u[1][0],d=u[1][1],i=(f=c+p)+5,"top"):"rightBottom"===r?(c=u[2][0],d=u[2][1],i=(f=c+p)+5,"bottom"):"leftTop"===r?(c=u[0][0],d=u[1][1],i=(f=c-p)-5,"right"):"leftBottom"===r?(c=u[3][0],d=u[2][1],i=(f=c-p)-5,"right"):(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,i=(f=c+p)+5,"left");o=[[c,d],[f,d]],n=d}l.label={linePoints:o,x:i,y:n,verticalAlign:"middle",textAlign:e,inside:h}})}(o)})}),xf(uy("funnel"));function $w(t,e,i,n,o){Gg.call(this,t,e,i),this.type=n||"value",this.axisIndex=o}$w.prototype={constructor:$w,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},w($w,Gg);function Jw(t,e,i,n,o,a){t=t||0;var r=i[1]-i[0];if(null!=o&&(o=tb(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n){var s=Math.abs(e[1]-e[0]);o=a=tb(s=tb(s,[0,r]),[o,a]),n=0}e[0]=tb(e[0],i),e[1]=tb(e[1],i);var l=Qw(e,n);e[n]+=t;var u=o||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=tb(e[n],h);var c=Qw(e,n);return null!=o&&(c.sign!==l.sign||c.span<o)&&(e[1-n]=e[n]+l.sign*o),c=Qw(e,n),null!=a&&c.span>a&&(e[1-n]=e[n]+c.sign*a),e}function Qw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0<i?-1:i<0?1:e?-1:1}}function tb(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var eb=E,ib=Math.min,nb=Math.max,ob=Math.floor,ab=Math.ceil,rb=zl,sb=Math.PI;function lb(t,e,i){this._axesMap=Q(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function ub(t,e){return ib(nb(t,e[0]),e[1])}lb.prototype={type:"parallel",constructor:lb,_init:function(t,r,e){var i=t.dimensions,s=t.parallelAxisIndex;eb(i,function(t,e){var i=s[e],n=r.getComponent("parallelAxis",i),o=this._axesMap.set(t,new $w(t,sg(n),[0,0],n.get("type"),i)),a="category"===o.type;o.onBand=a&&n.get("boundaryGap"),o.inverse=n.get("inverse"),(n.axis=o).model=n,o.coordinateSystem=n.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 i<=a&&a<=i+e.axisLength&&n<=r&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,n){n.eachSeries(function(t){if(e.contains(t,n)){var i=t.getData();eb(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),rg(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=bu(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=ub(e.get("axisExpandWidth"),l),c=ub(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3<u&&c<u&&1<c&&0<h&&0<s,f=e.get("axisExpandWindow");f?(t=ub(f[1]-f[0],l),f[1]=f[0]+t):(t=ub(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||ob(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[ob(rb(f[0]/h,1))+1,ab(rb(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 l=this._rect,t=this._axesMap,e=this.dimensions,u=this._makeLayoutInfo(),h=u.layout;t.each(function(t){var e=[0,u.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),eb(e,function(t,e){var i=(u.axisExpandable?function(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;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);return{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}:function(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}})(e,u),n={horizontal:{x:i.position,y:u.axisLength},vertical:{x:0,y:i.position}},o={horizontal:sb/2,vertical:0},a=[n[h].x+l.x,n[h].y+l.y],r=o[h],s=ae();he(s,s,r),ue(s,s,a),this._axesLayout[t]={position:a,rotation:r,transform:s,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.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(e,t,i,n){null==i&&(i=0),null==n&&(n=e.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];E(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=e.getValues(r,u),d=0,f=a.length;d<f;d++){if("inactive"===s[d].getActiveState(c[d])){h="inactive";break}}}else h="normal";t(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 pl([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return k(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])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Jw(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[nb(0,a[1]*s/o-o/2)])[1]=ib(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},lh.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new lb(t,n,o);i.name="parallel_"+e,i.resize(t,o),(t.coordinateSystem=i).model=t,a.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),a}});var hb=ku.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ha([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=k(t);if(e)for(var i=e.length-1;0<=i;i--)Bl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}});m(hb.prototype,dg),Gm("parallel",hb,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),ku.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(){ku.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&m(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(e){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[];E(M(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),i.push(t.componentIndex)})}});_f({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),_f("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var cb=T,db=E,fb=O,pb=Math.min,gb=Math.max,mb=Math.pow,vb=1e4,yb=6,xb=6,_b="globalPan",wb={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},bb={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Sb={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},Mb=0;function Ib(t){Ct.call(this),this._zr=t,this.group=new Ci,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+Mb++,this._handlers={},db($b,function(t,e){this._handlers[e]=A(t,this)},this)}function Tb(t,e){var i=Qb[e.brushType].createCover(t,e);return i.__brushOption=e,Cb(i,e),t.group.add(i),i}function Ab(t,e){var i=kb(e);return i.endCreating&&(i.endCreating(t,e),Cb(e,e.__brushOption)),e}function Db(t,e){var i=e.__brushOption;kb(e).updateCoverShape(t,e,i.range,i)}function Cb(t,e){var i=e.z;null==i&&(i=vb),t.traverse(function(t){t.z=i,t.z2=i})}function Lb(t,e){kb(e).updateCommon(t,e),Db(t,e)}function kb(t){return Qb[t.__brushOption.brushType]}function Pb(t,e,i){var n,o=t._panels;if(!o)return!0;var a=t._transform;return db(o,function(t){t.isTargetByCursor(e,i,a)&&(n=t)}),n}function Nb(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function Ob(e){var t=e._covers,i=t.length;return db(t,function(t){e.group.remove(t)},e),t.length=0,!!i}function Eb(t,e){var i=fb(t._covers,function(t){var e=t.__brushOption,i=k(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Rb(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function zb(e,i,t,n){var o=new Ci;return o.add(new rs({name:"main",style:Fb(t),silent:!0,draggable:!0,cursor:"move",drift:cb(e,i,o,"nswe"),ondragend:cb(Eb,i,{isEnd:!0})})),db(n,function(t){o.add(new rs({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:cb(e,i,o,t),ondragend:cb(Eb,i,{isEnd:!0})}))}),o}function Bb(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=gb(o,xb),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;Gb(t,e,"main",r,s,p,g),n.transformable&&(Gb(t,e,"w",l,u,a,v),Gb(t,e,"e",d,u,a,v),Gb(t,e,"n",l,u,m,a),Gb(t,e,"s",l,f,m,a),Gb(t,e,"nw",l,u,a,a),Gb(t,e,"ne",d,u,a,a),Gb(t,e,"sw",l,f,a,a),Gb(t,e,"se",d,f,a,a))}function Vb(n,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(Fb(t)),e.attr({silent:!a,cursor:a?"move":"default"}),db(["w","e","n","s","se","sw","ne","nw"],function(t){var e=o.childOfName(t),i=function t(e,i){{if(1<i.length){i=i.split("");var n=[t(e,i[0]),t(e,i[1])];return"e"!==n[0]&&"w"!==n[0]||n.reverse(),n.join("")}var o={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=gl(o[i],fl(e.group));return a[n]}}(n,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?bb[i]+"-resize":null})})}function Gb(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(function(t){var e=pb(t[0][0],t[1][0]),i=pb(t[0][1],t[1][1]),n=gb(t[0][0],t[1][0]),o=gb(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:o-i}}(Xb(t,e,[[n,o],[n+a,o+r]])))}function Fb(t){return D({strokeNoScale:!0},t.brushStyle)}function Wb(t,e,i,n){var o=[pb(t,i),pb(e,n)],a=[gb(t,i),gb(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function Hb(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=Ub(i,a,r);db(o.split(""),function(t){var e=wb[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(Wb(u[0][0],u[1][0],u[0][1],u[1][1])),Lb(i,n),Eb(i,{isEnd:!1})}function Zb(t,e,i,n,o){var a=e.__brushOption.range,r=Ub(t,i,n);db(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Lb(t,e),Eb(t,{isEnd:!1})}function Ub(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 Xb(t,e,i){var n=Nb(t,e);return n&&!0!==n?n.clipPath(i,t._transform):k(i)}function Yb(t){var e=t.event;e.preventDefault&&e.preventDefault()}function jb(t,e,i){return t.childOfName("main").contain(e,i)}function qb(t,e,i,n){var o,a=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1],r=mb(o*o+a*a,.5);return yb<r}(t)||a){if(r&&!a){"single"===s.brushMode&&Ob(t);var l=k(s);l.brushType=Kb(l.brushType,r),l.panelId=!0===r?null:r.panelId,a=t._creatingCover=Tb(t,l),t._covers.push(a)}if(a){var u=Qb[Kb(t._brushType,r)];a.__brushOption.range=u.getCreatingRange(Xb(t,a,t._track)),n&&(Ab(t,a),u.updateCommon(t,a)),Db(t,a),o={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&Pb(t,e,i)&&Ob(t)&&(o={isEnd:n,removeOnClick:!0});return o}function Kb(t,e){return"auto"===t?e.defaultBrushType:t}Ib.prototype={constructor:Ib,enableBrush:function(t){return this._brushType&&function(t){var e=t._zr;(function(t,e,i){var n=By(t);n[e]===i&&(n[e]=null)})(e,_b,t._uid),function(i,t){db(t,function(t,e){i.off(e,t)})}(e,t._handlers),t._brushType=t._brushOption=null}(this),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||function(t,e,i){By(t)[e]=i}(i,_b,t._uid);(function(i,t){db(t,function(t,e){i.on(e,t)})})(i,t._handlers),t._brushType=e.brushType,t._brushOption=m(k(Sb),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};E(t,function(t){e[t.panelId]=k(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){db(this._covers,t,e)},updateCovers:function(o){o=O(o,function(t){return m(k(Sb),t,!0)});var i="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new kf(a,o,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this;function n(t,e){return(null!=t.id?t.id:i+e)+"-"+t.brushType}function t(t,e){var i=o[t];if(null!=e&&a[e]===l)r[t]=a[e];else{var n=r[t]=null!=e?(a[e].__brushOption=i,a[e]):Ab(s,Tb(s,i));Lb(s,n)}}},unmount:function(){return this.enableBrush(!1),Ob(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},b(Ib,Ct);var $b={mousedown:function(t){if(this._dragging)Jb(this,t);else if(!t.target||!t.target.draggable){Yb(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Pb(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(function(t,e,i){if(t._brushType&&!function(t,e,i){var n=t._zr;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=Pb(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)&&Qb[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}(this,t,n),this._dragging){Yb(t);var o=qb(this,t,n,!1);o&&Eb(this,o)}},mouseup:function(t){Jb(this,t)}};function Jb(t,e){if(t._dragging){Yb(e);var i=e.offsetX,n=e.offsetY,o=t.group.transformCoordToLocal(i,n),a=qb(t,e,o,!0);t._dragging=!1,t._track=[],t._creatingCover=null,a&&Eb(t,a)}}var Qb={lineX:tS(0),lineY:tS(1),rect:{createCover:function(t,e){return zb(cb(Hb,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Rb(t);return Wb(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Bb(t,e,i,n)},updateCommon:Vb,contain:jb},polygon:{createCover:function(t,e){var i=new Ci;return i.add(new ts({name:"main",style:Fb(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Qr({name:"main",draggable:!0,drift:cb(Zb,t,e),ondragend:cb(Eb,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:Xb(t,e,i)})},updateCommon:Vb,contain:jb}};function tS(l){return{createCover:function(t,e){return zb(cb(Hb,function(t){var e=[t,[0,100]];return l&&e.reverse(),e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=Rb(t);return[pb(e[0][l],e[1][l]),gb(e[0][l],e[1][l])]},updateCoverShape:function(t,e,i,n){var o,a=Nb(t,e);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(l,t._transform);else{var r=t._zr;o=[0,[r.getWidth(),r.getHeight()][1-l]]}var s=[i,o];l&&s.reverse(),Bb(t,e,s,n)},updateCommon:Vb,contain:jb}}function eS(i){return i=oS(i),function(t,e){return vl(t,i)}}function iS(o,a){return o=oS(o),function(t){var e=null!=a?a:t,i=e?o.width:o.height,n=e?o.x:o.y;return[n,n+(i||0)]}}function nS(n,o,a){return n=oS(n),function(t,e,i){return n.contain(e[0],e[1])&&!$y(t,o,a)}}function oS(t){return Di.create(t)}var aS=["axisLine","axisTickLabel","axisName"],rS=Af({type:"parallelAxis",init:function(t,e){rS.superApply(this,"init",arguments),(this._brushController=new Ib(e.getZr())).on("brush",A(this._onBrush,this))},render:function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ci,this.group.add(this._axisGroup),t.get("show")){var a=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),r=a.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=P({strokeContainThreshold:l},r.getAxisLayout(u)),c=new Qm(t,h);E(aS,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(h,s,t,a,l,i);var d=n&&!1===n.animation?null:t;ml(o,this._axisGroup,d)}}},_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=Di.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:eS(u),isTargetByCursor:nS(u,a,n),getLinearBrushOtherExtent:iS(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return O(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=O(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()}});Af({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},E(sS,function(t,e){i.getZr().on(e,this._handlers[e]=A(t,this))},this)),kc(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,i){E(this._handlers,function(t,e){i.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(P({type:"parallelAxisExpand"},t))}});var sS={mousedown:function(t){lS(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(lS(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))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&&lS(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function lS(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}yf(function(t){!function(t){if(t.parallel)return;var e=!1;E(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),function(n){E(Vo(n.parallelAxis),function(t){if(z(t)){var e=t.parallelIndex||0,i=Vo(n.parallel)[e];i&&i.parallelAxisDefault&&m(t,i.parallelAxisDefault,!1)}})}(t)}),sc.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return function(t,e){if(t.encodeDefine)return;var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!i)return;var n=t.encodeDefine=Q();E(i.dimensions,function(t){var e=function(t){return+t.replace("dim","")}(t);n.set(t,e)})}(i,this),gp(i,this)},getRawIndicesByActiveState:function(i){var t=this.coordinateSystem,n=this.getData(),o=[];return t.eachActiveState(n,function(t,e){i===t&&o.push(n.getRawIndex(e))}),o},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"}});_c.extend({type:"parallel",init:function(){this._dataGroup=new Ci,this.group.add(this._dataGroup),this._data,this._initialized},render:function(a,t,e,r){var i=this._dataGroup,s=a.getData(),l=this._data,u=a.coordinateSystem,h=u.dimensions,c=cS(a);if(s.diff(l).add(function(t){dS(hS(s,i,t,h,u),s,t,c)}).update(function(t,e){var i=l.getItemGraphicEl(e),n=uS(s,t,h,u);s.setItemGraphicEl(t,i);var o=r&&!1===r.animation?null:a;cl(i,{shape:{points:n}},o,t),dS(i,s,t,c)}).remove(function(t){var e=l.getItemGraphicEl(t);i.remove(e)}).execute(),!this._initialized){this._initialized=!0;var n=function(t,e,i){var n=t.model,o=t.getRect(),a=new rs({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),dl(a,{shape:{width:o.width,height:o.height}},e,i),a}(u,a,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(n)}this._data=s},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=cS(e),s=t.start;s<t.end;s++){var l=hS(n,this._dataGroup,s,a,o);l.incremental=!0,dS(l,n,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function uS(t,e,i,n){for(var o,a=[],r=0;r<i.length;r++){var s=i[r],l=t.get(t.mapDimension(s),e);o=l,("category"===n.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(n.dataToPoint(l,s))}return a}function hS(t,e,i,n,o){var a=uS(t,i,n,o),r=new ts({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function cS(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function dS(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)}var fS=["lineStyle","normal","opacity"];Sf({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,o){h.eachActiveState(o,function(t,e){var i=d[t];if("normal"===t&&o.hasItemOption){var n=o.getItemModel(e).get(fS,!0);null!=n&&(i=n)}o.setItemVisual(e,"opacity",i)},t.start,t.end)}}}});var pS=sc.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels,a=this.levelModels={},r=0;r<o.length;r++)null!=o[r].depth&&0<=o[r].depth&&(a[o[r].depth]=new Cl(o[r],this,e));if(n&&i)return iw(n,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,n){return t.customizeGetParent(function(t){var e=this.parentModel,i=e.getData().getItemLayout(n).depth;return e.levelModels[i]||this.parentModel}),t}),e.wrapMethod("getItemModel",function(t,n){return t.customizeGetParent(function(t){var e=this.parentModel,i=e.getGraph().getEdgeByIndex(n).node1.getLayout().depth;return e.levelModels[i]||this.parentModel}),t})}).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),au(a)}if("node"!==i)return pS.superCall(this,"formatTooltip",t,e);var r=this.getGraph().getNodeByIndex(t).getLayout().value,s=this.getDataParams(t,i).data.name;if(r)a=s+" : "+r;return au(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=pS.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=n}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),gS=["itemStyle","opacity"],mS=["emphasis","itemStyle","opacity"],vS=["lineStyle","opacity"],yS=["emphasis","lineStyle","opacity"];function xS(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function _S(t,e,i){var n=t.getGraphicEl(),o=xS(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 wS(t,e){var i=xS(t,e),n=t.getGraphicEl();n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}var bS=Cs({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(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()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Cf({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(w,t,n){var o=this,e=w.getGraph(),b=this.group,i=w.layoutInfo,S=i.width,M=i.height,u=w.getData(),I=w.getData("edge"),T=w.get("orient");this._model=w,b.removeAll(),b.attr("position",[i.x,i.y]),e.eachEdge(function(t){var e=new bS;e.dataIndex=t.dataIndex,e.seriesIndex=w.seriesIndex,e.dataType="edge";var i,n,o,a,r,s,l,u,h=t.getModel("lineStyle"),c=h.get("curveness"),d=t.node1.getLayout(),f=t.node1.getModel(),p=f.get("localX"),g=f.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),y=v.get("localX"),x=v.get("localY"),_=t.getLayout();switch(e.shape.extent=Math.max(1,_.dy),u="vertical"===(e.shape.orient=T)?(i=(null!=p?p*S:d.x)+_.sy,n=(null!=g?g*M:d.y)+d.dy,o=(null!=y?y*S:m.x)+_.ty,r=i,s=n*(1-c)+(a=null!=x?x*M:m.y)*c,l=o,n*c+a*(1-c)):(i=(null!=p?p*S:d.x)+d.dx,n=(null!=g?g*M:d.y)+_.sy,r=i*(1-c)+(o=null!=y?y*S:m.x)*c,s=n,l=i*c+o*(1-c),a=(null!=x?x*M:m.y)+_.ty),e.setShape({x1:i,y1:n,x2:o,y2:a,cpx1:r,cpy1:s,cpx2:l,cpy2:u}),e.setStyle(h.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}$s(e,t.getModel("emphasis.lineStyle").getItemStyle()),b.add(e),I.setItemGraphicEl(t.dataIndex,e)}),e.eachNode(function(t){var e=t.getLayout(),i=t.getModel(),n=i.get("localX"),o=i.get("localY"),a=i.getModel("label"),r=i.getModel("emphasis.label"),s=new rs({shape:{x:null!=n?n*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy},style:i.getModel("itemStyle").getItemStyle()}),l=t.getModel("emphasis.itemStyle").getItemStyle();el(s.style,l,a,r,{labelFetcher:w,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),$s(s,l),b.add(s),u.setItemGraphicEl(t.dataIndex,s),s.dataType="node"}),u.eachItemGraphicEl(function(t,i){var e=u.getItemModel(i);e.get("draggable")&&(t.drift=function(t,e){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:w.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),e.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(n)}))}),I.eachItemGraphicEl(function(t,e){var i=I.getItemModel(e);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),i.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(n)}))}),!this._data&&w.get("animation")&&b.setClipPath(function(t,e,i){var n=new rs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return dl(n,{shape:{width:t.width+20}},e,i),n}(b.getBoundingRect(),w,function(){b.removeClipPath()})),this._data=w.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode(function(t){_S(t,gS,.1)}),a.eachEdge(function(t){_S(t,vS,.1)}),u){wS(u,mS);var c=s.get("focusNodeAdjacency");"outEdges"===c?E(u.outEdges,function(t){t.dataIndex<0||(wS(t,yS),wS(t.node2,mS))}):"inEdges"===c?E(u.inEdges,function(t){t.dataIndex<0||(wS(t,yS),wS(t.node1,mS))}):"allEdges"===c&&E(u.edges,function(t){t.dataIndex<0||(wS(t,yS),t.node1!==u&&wS(t.node1,mS),t.node2!==u&&wS(t.node2,mS))})}h&&(wS(h,yS),wS(h.node1,mS),wS(h.node2,mS))}},unfocusNodeAdjacency:function(t,e,i,n){var o=t.getGraph();o.eachNode(function(t){_S(t,gS)}),o.eachEdge(function(t){_S(t,vS)})}}),_f({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})});function SS(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&0<=e.depth}function MS(t,l,u,h,c){var d="vertical"===c?"x":"y";E(t,function(t){var e,i,n;t.sort(function(t,e){return t.getLayout()[d]-e.getLayout()[d]});for(var o=0,a=t.length,r="vertical"===c?"dx":"dy",s=0;s<a;s++)0<(n=o-(i=t[s]).getLayout()[d])&&(e=i.getLayout()[d]+n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0)),o=i.getLayout()[d]+i.getLayout()[r]+l;if(0<(n=o-l-("vertical"===c?h:u)))for(e=i.getLayout()[d]-n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0),o=e,s=a-2;0<=s;--s)0<(n=(i=t[s]).getLayout()[d]+i.getLayout()[r]+l-o)&&(e=i.getLayout()[d]-n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0)),o=i.getLayout()[d]})}function IS(t,a,r){E(t.slice().reverse(),function(t){E(t,function(t){if(t.outEdges.length){var e=PS(t.outEdges,TS,r)/PS(t.outEdges,kS,r);if(isNaN(e)){var i=t.outEdges.length;e=i?PS(t.outEdges,AS,r)/i:0}if("vertical"===r){var n=t.getLayout().x+(e-LS(t,r))*a;t.setLayout({x:n},!0)}else{var o=t.getLayout().y+(e-LS(t,r))*a;t.setLayout({y:o},!0)}}})})}function TS(t,e){return LS(t.node2,e)*t.getValue()}function AS(t,e){return LS(t.node2,e)}function DS(t,e){return LS(t.node1,e)*t.getValue()}function CS(t,e){return LS(t.node1,e)}function LS(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function kS(t){return t.getValue()}function PS(t,e,i){for(var n=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],i);isNaN(r)||(n+=r)}return n}function NS(t,a,r){E(t,function(t){E(t,function(t){if(t.inEdges.length){var e=PS(t.inEdges,DS,r)/PS(t.inEdges,kS,r);if(isNaN(e)){var i=t.inEdges.length;e=i?PS(t.inEdges,CS,r)/i:0}if("vertical"===r){var n=t.getLayout().x+(e-LS(t,r))*a;t.setLayout({x:n},!0)}else{var o=t.getLayout().y+(e-LS(t,r))*a;t.setLayout({y:o},!0)}}})})}bf(function(t,u,e){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),i=t.get("nodeGap"),n=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,u),o=(t.layoutInfo=n).width,a=n.height,r=t.getGraph(),s=r.nodes,l=r.edges;!function(t){E(t,function(t){var e=PS(t.outEdges,kS),i=PS(t.inEdges,kS),n=t.getValue()||0,o=Math.max(e,i,n);t.setLayout({value:o},!0)})}(s),function(t,e,i,n,o,a,r,s,l){(function(t,e,i,n,o,a,r){for(var s=[],l=[],u=[],h=[],c=0,d=0;d<e.length;d++)s[d]=1;for(d=0;d<t.length;d++)l[d]=t[d].inEdges.length,0===l[d]&&u.push(t[d]);var f=-1;for(;u.length;){for(var p=0;p<u.length;p++){var g=u[p],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&0<=m.depth;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y],_=e.indexOf(x);s[_]=0;var w=x.node2,b=t.indexOf(w);0==--l[b]&&h.indexOf(w)<0&&h.push(w)}}++c,u=h,h=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=c-1<f?f:c-1;r&&"left"!==r&&function(t,e,i,n){if("right"===e){for(var o=[],a=t,r=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];o.indexOf(h.node1)<0&&o.push(h.node1)}}a=o,o=[],++r}E(t,function(t){SS(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){E(t,function(t){SS(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,n)}(t,r,0,S);!function(t,i,n){E(t,function(t){var e=t.getLayout().depth*i;"vertical"===n?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(t,"vertical"===a?(o-i)/S:(n-i)/S,a)})(t,e,i,o,a,s,l),function(t,e,i,n,o,a,r){var s=function(t,e){var i=[],n="vertical"===e?"y":"x",o=ta(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),E(o.keys,function(t){i.push(o.buckets.get(t))}),i}(t,r);(function(t,e,o,a,r,s){var l=1/0;E(t,function(t){var e=t.length,i=0;E(t,function(t){i+=t.getLayout().value});var n="vertical"===s?(a-(e-1)*r)/i:(o-(e-1)*r)/i;n<l&&(l=n)}),E(t,function(t){E(t,function(t,e){var i=t.getLayout().value*l;"vertical"===s?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),E(e,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})})(s,e,i,n,o,r),MS(s,o,i,n,r);for(var l=1;0<a;a--)IS(s,l*=.99,r),MS(s,o,i,n,r),NS(s,l,r),MS(s,o,i,n,r)}(t,e,a,o,n,r,s),function(t,e){var i="vertical"===e?"x":"y";E(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]})}),E(t,function(t){var e=0,i=0;E(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),E(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}(t,s)}(s,l,e,i,o,a,0!==M(s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}),Sf(function(t,e){t.eachSeriesByType("sankey",function(n){var t=n.getGraph().nodes;if(t.length){var o=1/0,a=-1/0;E(t,function(t){var e=t.getLayout().value;e<o&&(o=e),a<e&&(a=e)}),E(t,function(t){var e=new g_({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:n.get("color")}).mapValueToVisual(t.getLayout().value),i=t.getModel().get("itemStyle.color");null!=i?t.setVisual("color",i):t.setVisual("color",e)})}})});var OS={_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],d=[o,a],f=d[u].get("type"),p=d[1-u].get("type"),g=t.data;if(g&&n){var m=[];E(g,function(t,e){var i;t.value&&L(t.value)?(i=t.value.slice(),t.value.unshift(e)):L(t)?(i=t.slice(),t.unshift(e)):i=t,m.push(i)}),t.data=m}var v=this.defaultValueDimensions,y=[{name:h,type:Ef(f),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Ef(p),dimsDef:v.slice()}];return Yv(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:T($u,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};b(sc.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}}),OS,!0);var ES=["itemStyle"],RS=["emphasis","itemStyle"],zS=(_c.extend({type:"boxplot",render:function(t,e,i){var o=t.getData(),a=this.group,r=this._data;this._data||a.removeAll();var s="horizontal"===t.get("layout")?1:0;o.diff(r).add(function(t){if(o.hasValue(t)){var e=BS(o.getItemLayout(t),o,t,s,!0);o.setItemGraphicEl(t,e),a.add(e)}}).update(function(t,e){var i=r.getItemGraphicEl(e);if(o.hasValue(t)){var n=o.getItemLayout(t);i?VS(n,i,o,t):i=BS(n,o,t,s),a.add(i),o.setItemGraphicEl(t,i)}else a.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:et}),Ar.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])}}));function BS(t,e,i,n,o){var a=t.ends,r=new zS({shape:{points:o?function(t,e,i){return O(t,function(t){return(t=t.slice())[e]=i.initBaseline,t})}(a,n,t):a}});return VS(t,r,e,i,o),r}function VS(t,e,i,n,o){var a=i.hostModel;(0,bl[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,n);var r=i.getItemModel(n),s=r.getModel(ES),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,$s(e,r.getModel(RS).getItemStyle())}var GS=["itemStyle","borderColor"],FS=E;Sf(function(n,t){var o=n.get("color");n.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],i=t.getData();i.setVisual({legendSymbol:"roundRect",color:t.get(GS)||e}),n.isSeriesFiltered(t)||i.each(function(t){var e=i.getItemModel(t);i.setItemVisual(t,{color:e.get(GS,!0)})})})}),bf(function(t){var e=function(t){var n=[],o=[];return t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),i=_(o,e);i<0&&(i=o.length,o[i]=e,n[i]={axis:e,seriesModels:[]}),n[i].seriesModels.push(t)}),n}(t);FS(e,function(i){var t=i.seriesModels;t.length&&(function(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;FS(o,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}FS(o,function(t){var e=t.get("boxWidth");L(e)||(e=[e,e]),l.push([Rl(e[0],i)||0,Rl(e[1],i)||0])});var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;FS(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}(i),FS(t,function(t,e){!function(t,r,e){var s=t.coordinateSystem,l=t.getData(),a=e/2,u="horizontal"===t.get("layout")?0:1,h=1-u,i=["x","y"],n=l.mapDimension(i[u]),o=l.mapDimension(i[h],!0);if(null==n||o.length<5)return;for(var c=0;c<l.count();c++){var d=l.get(n,c),f=x(d,o[2],c),p=x(d,o[0],c),g=x(d,o[1],c),m=x(d,o[3],c),v=x(d,o[4],c),y=[];_(y,g,0),_(y,m,1),y.push(p,g,v,m),w(y,p),w(y,v),w(y,f),l.setItemLayout(c,{initBaseline:f[h],ends:y})}function x(t,e,i){var n,o=l.get(e,i),a=[];return a[u]=t,a[h]=o,isNaN(t)||isNaN(o)?n=[NaN,NaN]:(n=s.dataToPoint(a))[u]+=r,n}function _(t,e,i){var n=e.slice(),o=e.slice();n[u]+=a,o[u]-=a,i?t.push(n,o):t.push(o,n)}function w(t,e){var i=e.slice(),n=e.slice();i[u]-=a,n[u]+=a,t.push(i,n)}}(t,i.boxOffsetList[e],i.boxWidthList[e])}))})}),b(sc.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,clip:!0,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)}}),OS,!0);var WS=["itemStyle"],HS=["emphasis","itemStyle"],ZS=["color","color0","borderColor","borderColor0"],US=(_c.extend({type:"candlestick",render:function(t,e,i){this.group.removeClipPath(),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(o){var a=o.getData(),r=this._data,s=this.group,l=a.getLayout("isSimpleBox"),u=o.get("clip",!0),t=o.coordinateSystem,h=t.getArea&&t.getArea();this._data||s.removeAll(),a.diff(r).add(function(t){if(a.hasValue(t)){var e,i=a.getItemLayout(t);if(u&&YS(h,i))return;dl(e=XS(i,t,!0),{shape:{points:i.ends}},o,t),jS(e,a,t,l),s.add(e),a.setItemGraphicEl(t,e)}}).update(function(t,e){var i=r.getItemGraphicEl(e);if(a.hasValue(t)){var n=a.getItemLayout(t);u&&YS(h,n)?s.remove(i):(i?cl(i,{shape:{points:n.ends}},o,t):i=XS(n,t),jS(i,a,t,l),s.add(i),a.setItemGraphicEl(t,i))}else s.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=a},_renderLarge:function(t){this._clear(),KS(t,this.group);var e=t.get("clip",!0)?Sm(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var a;jS(a=XS(n.getItemLayout(i),i),n,i,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){KS(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:et}),Ar.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]))}}));function XS(t,e,i){var n=t.ends;return new US({shape:{points:i?function(t,e){return O(t,function(t){return(t=t.slice())[1]=e.initBaseline,t})}(n,t):n},z2:100})}function YS(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function jS(t,e,i,n){var o=e.getItemModel(i),a=o.getModel(WS),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=a.getItemStyle(ZS);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n,$s(t,o.getModel(HS).getItemStyle())}var qS=Ar.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}});function KS(t,e,i){var n=t.getData(),o=n.getLayout("largePoints"),a=new qS({shape:{points:o},__sign:1});e.add(a);var r=new qS({shape:{points:o},__sign:-1});e.add(r),$S(1,a,t,n),$S(-1,r,t,n),i&&(a.incremental=!0,r.incremental=!0)}function $S(t,e,i,n){var o=0<t?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(WS).getItemStyle(ZS);e.useStyle(r),e.style.fill=null,e.style.stroke=a}var JS=["itemStyle","borderColor"],QS=["itemStyle","borderColor0"],tM=["itemStyle","color"],eM=["itemStyle","color0"],iM={seriesType:"candlestick",plan:vc(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){var i;for(;null!=(i=t.next());){var n=e.getItemModel(i),o=e.getItemLayout(i).sign;e.setItemVisual(i,{color:a(o,n),borderColor:r(o,n)})}}};function a(t,e){return e.get(0<t?tM:eM)}function r(t,e){return e.get(0<t?JS:QS)}}},nM="undefined"!=typeof Float32Array?Float32Array:Array,oM={seriesType:"candlestick",plan:vc(),reset:function(t){var x=t.coordinateSystem,e=t.getData(),_=function(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=Rl(H(t.get("barMaxWidth"),o),o),r=Rl(H(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Rl(s,o):Math.max(Math.min(o/2,a),r)}(t,e),i=["x","y"],w=e.mapDimension(i[0]),n=e.mapDimension(i[1],!0),b=n[0],S=n[1],M=n[2],I=n[3];if(e.setLayout({candleWidth:_,isSimpleBox:_<=1.3}),!(null==w||n.length<4))return{progress:t.pipelineContext.large?function(t,e){var i,n,o=new nM(4*t.count),a=0,r=[],s=[];for(;null!=(n=t.next());){var l=e.get(w,n),u=e.get(b,n),h=e.get(S,n),c=e.get(M,n),d=e.get(I,n);isNaN(l)||isNaN(c)||isNaN(d)?(o[a++]=NaN,a+=3):(o[a++]=aM(e,n,u,h,S),r[0]=l,r[1]=c,i=x.dataToPoint(r,null,s),o[a++]=i?i[0]:NaN,o[a++]=i?i[1]:NaN,r[1]=d,i=x.dataToPoint(r,null,s),o[a++]=i?i[1]:NaN)}e.setLayout("largePoints",o)}:function(t,e){var i;for(;null!=(i=t.next());){var n=e.get(w,i),o=e.get(b,i),a=e.get(S,i),r=e.get(M,i),s=e.get(I,i),l=Math.min(o,a),u=Math.max(o,a),h=g(l,n),c=g(u,n),d=g(r,n),f=g(s,n),p=[];m(p,c,0),m(p,h,1),p.push(y(f),y(c),y(d),y(h)),e.setItemLayout(i,{sign:aM(e,i,o,a,S),initBaseline:a<o?c[1]:h[1],ends:p,brushRect:v(r,s,n)})}function g(t,e){var i=[];return i[0]=e,i[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:x.dataToPoint(i)}function m(t,e,i){var n=e.slice(),o=e.slice();n[0]=zs(n[0]+_/2,1,!1),o[0]=zs(o[0]-_/2,1,!0),i?t.push(n,o):t.push(o,n)}function v(t,e,i){var n=g(t,i),o=g(e,i);return n[0]-=_/2,o[0]-=_/2,{x:n[0],y:n[1],width:_,height:o[1]-n[1]}}function y(t){return t[0]=zs(t[0],1),t}}}}};function aM(t,e,i,n,o){return n<i?-1:i<n?1:0<e?t.get(o,e-1)<=n?1:-1:1}yf(function(t){t&&L(t.series)&&E(t.series,function(t){z(t)&&"k"===t.type&&(t.type="candlestick")})}),Sf(iM),bf(oM),sc.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},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}});function rM(t,e){var i=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})})}function sM(t,e){Ci.call(this);var i=new Xg(t,e),n=new Ci;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var lM=sM.prototype;lM.stopEffectAnimation=function(){this.childAt(1).removeAll()},lM.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=wg(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)}rM(n,t)},lM.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)}rM(i,t)},lM.highlight=function(){this.trigger("emphasis")},lM.downplay=function(){this.trigger("normal")},lM.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=function(t){return L(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse(function(t){t.attr({fill:s})});var l=o.getShallow("symbolOffset");if(l){var u=n.position;u[0]=Rl(l[0],r[0]),u[1]=Rl(l[1],r[1])}var h=t.getItemVisual(e,"symbolRotate");n.rotation=(h||0)*Math.PI/180||0;var c={};if(c.showEffectOn=i.get("showEffectOn"),c.rippleScale=o.get("rippleEffect.scale"),c.brushType=o.get("rippleEffect.brushType"),c.period=1e3*o.get("rippleEffect.period"),c.effectOffset=e/t.count(),c.z=o.getShallow("z")||0,c.zlevel=o.getShallow("zlevel")||0,c.symbolType=a,c.color=s,c.rippleEffectColor=o.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===c.showEffectOn)this._effectCfg?this.updateEffectAnimation(c):this.startEffectAnimation(c),this._effectCfg=c;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),f=function(){d.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},p=function(){d.downplay(),"render"!==c.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",p,this).on("emphasis",f,this).on("normal",p,this)}this._effectCfg=c},lM.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},w(sM,Ci),Cf({type:"effectScatter",init:function(){this._symbolDraw=new im(sM)},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=km().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=fe(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Sf(Lm("effectScatter","circle")),bf(km("effectScatter"));var uM="undefined"==typeof Uint32Array?Array:Uint32Array,hM="undefined"==typeof Float64Array?Array:Float64Array;function cM(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=O(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),p([e,t[0],t[1]])}))}var dM=sc.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],cM(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),dM.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],cM(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))}dM.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=tt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=tt(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}var a=this._getCoordsFromItemModel(t);for(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])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var i=t.length,n=new uM(i),o=new hM(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}},getInitialData:function(t,e){var a=new Yf(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(t,e,i,n){if(t instanceof Array)return NaN;a.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[n]:o:void 0}),a},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),au(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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function fM(t,e,i){Ci.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var pM=fM.prototype;function gM(t,e,i){Ci.call(this),this._createPolyline(t,e,i)}pM.createLine=function(t,e,i){return new dw(t,e,i)},pM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");L(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=wg(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._symbolScale=n,this._updateEffectAnimation(t,i,e))},pM._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var o=this,a=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0<l&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),0<n.__t&&(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}},pM.getLineLength=function(t){return yt(t.__p1,t.__cp1)+yt(t.__cp1,t.__p2)},pM.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]},pM.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},pM.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=[a[0],a[1]],s=La,l=ka;a[0]=s(e[0],n[0],i[0],o),a[1]=s(e[1],n[1],i[1],o);var u=l(e[0],n[0],i[0],o),h=l(e[1],n[1],i[1],o);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT<t.__t){var c=1.05*yt(r,a);t.attr("scale",[t.scale[0],c]),1===o&&(a[0]=r[0]+(a[0]-r[0])/2,a[1]=r[1]+(a[1]-r[1])/2)}else if(1===t.__lastT){c=2*yt(e,a);t.attr("scale",[t.scale[0],c])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},pM.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},w(fM,Ci);var mM=gM.prototype;function vM(t,e,i){fM.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}mM._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new ts({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},mM.updateData=function(t,e,i){var n=t.hostModel;cl(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},mM._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(D({strokeNoScale:!0,fill:"none",stroke:a},r)),n.hoverStyle=s,$s(this)},mM.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},w(gM,Ci);var yM=vM.prototype;yM.createLine=function(t,e,i){return new gM(t,e,i)},yM.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+=yt(a,r),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},yM.getLineLength=function(t){return this._length},yM.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);0<=r&&!(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)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(vM,fM);var xM=Cs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o<i.length;){var a=i[o++];if(0<a){t.moveTo(i[o++],i[o++]);for(var r=1;r<a;r++)t.lineTo(i[o++],i[o++])}}else for(o=0;o<i.length;){var s=i[o++],l=i[o++],u=i[o++],h=i[o++];if(t.moveTo(s,l),0<n){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(0<s)for(var l=n[r++],u=n[r++],h=1;h<s;h++){if(sr(l,u,c=n[r++],d=n[r++]))return a}a++}else for(a=0,r=0;r<n.length;){l=n[r++],u=n[r++];var c=n[r++],d=n[r++];if(0<o){if(ur(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(sr(l,u,c,d))return a;a++}return-1}});function _M(){this.group=new Ci}var wM=_M.prototype;wM.isPersistent=function(){return!this._incremental},wM.updateData=function(t){this.group.removeAll();var e=new xM({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},wM.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new vs({silent:!0})),this.group.add(this._incremental)):this._incremental=null},wM.incrementalUpdate=function(t,e){var i=new xM;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))},wM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},wM._setCommon=function(i,t,e){var n=t.hostModel;i.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),i.useStyle(n.getModel("lineStyle").getLineStyle()),i.style.strokeNoScale=!0;var o=t.getVisual("color");o&&i.setStyle("stroke",o),i.setStyle("fill"),e||(i.seriesIndex=n.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<e&&(i.dataIndex=e+i.__startIndex)}))},wM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var bM={seriesType:"lines",plan:vc(),reset:function(g){var m=g.coordinateSystem,v=g.get("polyline"),y=g.pipelineContext.large;return{progress:function(t,e){var i=[];if(y){var n,o=t.end-t.start;if(v){for(var a=0,r=t.start;r<t.end;r++)a+=g.getLineCoordsCount(r);n=new Float32Array(o+2*a)}else n=new Float32Array(4*o);var s=0,l=[];for(r=t.start;r<t.end;r++){var u=g.getLineCoords(r,i);v&&(n[s++]=u);for(var h=0;h<u;h++)l=m.dataToPoint(i[h],!1,l),n[s++]=l[0],n[s++]=l[1]}e.setLayout("linesPoints",n)}else for(r=t.start;r<t.end;r++){var c=e.getItemModel(r),d=(u=g.getLineCoords(r,i),[]);if(v)for(var f=0;f<u;f++)d.push(m.dataToPoint(i[f]));else{d[0]=m.dataToPoint(i[0]),d[1]=m.dataToPoint(i[1]);var p=c.get("lineStyle.curveness");+p&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*p,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*p])}e.setItemLayout(r,d)}}}}};function SM(t){return t instanceof Array||(t=[t,t]),t}Cf({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);var u=t.get("clip",!0)&&Sm(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),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=bM.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 _M:new pw(o?n?vM:gM:n?fM:dw),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 MM="lineStyle.opacity".split("."),IM={seriesType:"lines",reset:function(t,e,i){var n=SM(t.get("symbol")),o=SM(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(MM)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=SM(i.getShallow("symbol",!0)),o=SM(i.getShallow("symbolSize",!0)),a=i.get(MM);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}}};bf(bM),Sf(IM),sc.extend({type:"series.heatmap",getInitialData:function(t,e){return gp(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=lh.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}});function TM(){var t=y();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}TM.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;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(0<v){var I=a(v)?s:l;0<v&&(v=v*S+b),x[_++]=I[M],x[_++]=I[1+M],x[_++]=I[2+M],x[_++]=I[3+M]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=y()),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}},Cf({type:"heatmap",render:function(i,t,e){var n;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===i&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=i.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(i,e,0,i.getData().count()):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(o)&&this._renderOnGeo(o,i,n,e)},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 a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");a=l.getBandWidth(),r=u.getBandWidth()}for(var h=this.group,c=t.getData(),d="emphasis.itemStyle",f="emphasis.label",p=t.getModel("itemStyle").getItemStyle(["color"]),g=t.getModel(d).getItemStyle(),m=t.getModel("label"),v=t.getModel(f),y=s.type,x="cartesian2d"===y?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],_=i;_<n;_++){var w;if("cartesian2d"===y){if(isNaN(c.get(x[2],_)))continue;var b=s.dataToPoint([c.get(x[0],_),c.get(x[1],_)]);w=new rs({shape:{x:Math.floor(Math.round(b[0])-a/2),y:Math.floor(Math.round(b[1])-r/2),width:Math.ceil(a),height:Math.ceil(r)},style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}else{if(isNaN(c.get(x[1],_)))continue;w=new rs({z2:1,shape:s.dataToRect([c.get(x[0],_)]).contentShape,style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}var S=c.getItemModel(_);c.hasItemOption&&(p=S.getModel("itemStyle").getItemStyle(["color"]),g=S.getModel(d).getItemStyle(),m=S.getModel("label"),v=S.getModel(f));var M=t.getRawValue(_),I="-";M&&null!=M[2]&&(I=M[2]),el(p,g,m,v,{labelFetcher:t,labelDataIndex:_,defaultText:I,isRectText:!0}),w.setStyle(p),$s(w,c.hasItemOption?g:P({},g)),(w.incremental=o)&&(w.useHoverLayer=!0),h.add(w),c.setItemGraphicEl(_,w)}},_renderOnGeo:function(o,t,e,i){var n=e.targetVisuals.inRange,a=e.targetVisuals.outOfRange,r=t.getData(),s=this._hmLayer||this._hmLayer||new TM;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=o.getViewRect().clone(),u=o.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(t,e,i){var n=o.dataToPoint([t,e]);return n[0]-=h,n[1]-=c,n.push(i),n}),y=e.getExtent(),x="visualMap.continuous"===e.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,o){var i=e[1]-e[0],a=(n=O(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e<a;e++){if((i=n[e].interval)[0]<=t&&t<=i[1]){r=e;break}}if(e===a)for(e=r-1;0<=e;e--){var i;if((i=n[e].interval)[0]<=t&&t<=i[1]){r=e;break}}return 0<=e&&e<a&&o[e]}}(y,e.getPieceList(),e.option.selected);s.update(v,p,g,n.color.getNormalizer(),{inRange:n.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new Qn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var AM=Tv.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,AM.superApply(this,"getInitialData",arguments)}}),DM=["itemStyle","borderWidth"],CM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],LM=new Yr;Cf({type:"pictorialBar",render:function(t,e,i){var r=this.group,s=t.getData(),l=this._data,n=t.coordinateSystem,o=!!n.getBaseAxis().isHorizontal(),a=n.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:n,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:CM[+o],categoryDim:CM[1-o]};return s.diff(l).add(function(t){if(s.hasValue(t)){var e=BM(s,t),i=kM(s,t,e,u),n=WM(s,u,i);s.setItemGraphicEl(t,n),r.add(n),YM(n,u,i)}}).update(function(t,e){var i=l.getItemGraphicEl(e);if(s.hasValue(t)){var n=BM(s,t),o=kM(s,t,n,u),a=ZM(s,o);i&&a!==i.__pictorialShapeStr&&(r.remove(i),s.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,o=i.dataIndex;cl(t.__pictorialBundle,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?OM(t,e,i,!0):EM(t,e,i,!0);RM(t,i,!0),zM(t,e,i,!0)}(i,u,o):i=WM(s,u,o,!0),s.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=o,r.add(i),YM(i,u,o)}else r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&HM(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=s,this.group},dispose:et,remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){HM(n,t.dataIndex,e,t)}):i.removeAll()}});function kM(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};!function(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(L(s)){var c=[PM(l,s[0])-u,PM(l,s[1])-u];c[1]<c[0]&&c.reverse(),a=c[h]}else a=null!=s?PM(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]);o.pxSign=0<a?1:a<0?-1:0}(i,a,o,n,c),function(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");f=L(f)?f.slice():(null==f&&(f="100%"),[f,f]);f[c.index]=Rl(f[c.index],d),f[h.index]=Rl(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}(t,e,o,a,0,c.boundingLength,c.pxSign,u,n,c),function(t,e,i,n,o){var a=t.get(DM)||0;a&&(LM.attr({scale:e.slice(),rotation:i}),LM.updateTransform(),a/=LM.getLineScale(),a*=e[n.valueDim.index]);o.valueLineWidth=a}(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return L(f)&&(f=[Rl(f[0],d[0]),Rl(f[1],d[1])]),function(t,e,i,n,o,a,r,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,p=c.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(n){var v=Math.abs(l),y=W(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=Rl(y,e[f.index]);var _=Math.max(g+2*y,0),w=x?0:2*y,b=Jl(n),S=b?n:jM((v+w)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),w=x?0:2*y,b||"fixed"===n||(S=u?jM((Math.abs(u)+w)/_):0),m=S*_-w,c.repeatTimes=S,c.symbolMargin=y}var M=p*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[f.index]="start"===r?M:"end"===r?l-M:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var T=c.bundlePosition=[];T[d.index]=i[d.xy],T[f.index]=i[f.xy];var A=c.barRectShape=P({},i);A[f.wh]=p*Math.max(Math.abs(i[f.wh]),Math.abs(I[f.index]+M)),A[d.wh]=i[d.wh];var D=c.clipShape={};D[d.xy]=-i[d.xy],D[d.wh]=h.ecSize[d.wh],D[f.xy]=0,D[f.wh]=i[f.wh]}(i,d,o,a,0,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function PM(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function NM(t){var e=t.symbolPatternSize,i=wg(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function OM(t,e,o,i){var n=t.__pictorialBundle,a=o.symbolSize,r=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=a[e.valueDim.index]+r+2*o.symbolMargin;for(UM(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?XM(t,null,p(h),o,i):XM(t,null,{scale:[0,0]},o,i,function(){n.remove(t)}),FM(t,o),h++});h<u;h++){var d=NM(o);d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,n.add(d);var f=p(h);XM(d,{position:f.position,scale:[0,0]},{scale:f.scale,rotation:f.rotation},o,i),d.on("mouseover",g).on("mouseout",m),FM(d,o)}function p(t){var e=s.slice(),i=o.pxSign,n=t;return("start"===o.symbolRepeatDirection?0<i:i<0)&&(n=u-1-t),e[l.index]=c*(n-u/2+.5)+s[l.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}function g(){UM(t,function(t){t.trigger("emphasis")})}function m(){UM(t,function(t){t.trigger("normal")})}}function EM(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?XM(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=NM(i),o.add(a),XM(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")})),FM(a,i)}function RM(t,e,i){var n=P({},e.barRectShape),o=t.__pictorialBarRect;o?XM(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new rs({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function zM(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,a=P({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)cl(o,{shape:a},s,l);else{a[r.wh]=0,o=new rs({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[r.wh]=i.clipShape[r.wh],bl[n?"updateProps":"initProps"](o,{shape:u},s,l)}}}function BM(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=VM,i.isAnimationEnabled=GM,i}function VM(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function GM(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function FM(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 WM(t,e,i,n){var o=new Ci,a=new Ci;return o.add(a),(o.__pictorialBundle=a).attr("position",i.bundlePosition.slice()),i.symbolRepeat?OM(o,e,i):EM(o,0,i),RM(o,i,n),zM(o,e,i,n),o.__pictorialShapeStr=ZM(t,i),o.__pictorialSymbolMeta=i,o}function HM(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];UM(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),E(a,function(t){cl(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function ZM(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function UM(e,i,n){E(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&i.call(n,t)})}function XM(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&bl[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function YM(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");UM(t,function(t){t.setColor(n),t.setStyle(D({fill:n,opacity:i.opacity},r)),$s(t,s),l&&(t.cursor=l),t.z2=i.z2});var u={},h=(e.valueDim.posDesc[+(0<i.boundingLength)],t.__pictorialBarRect);Av(h.style,u,a,n,e.seriesModel,o),$s(h,u)}function jM(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}bf(T(zp,"pictorialBar")),Sf(Lm("pictorialBar","roundRect"));function qM(t,e,i,n,o){Gg.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null}function KM(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function $M(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]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),W(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var h=e.rotate;return null==h&&(h=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-h:h,o.z2=1,o}qM.prototype={constructor:qM,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},w(qM,Gg),lh.register("single",{create:function(n,o){var a=[];return n.eachComponent("singleAxis",function(t,e){var i=new KM(t,n,o);i.name="single_"+e,i.resize(t,o),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=e&&e.coordinateSystem}}),a},dimensions:(KM.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:KM,_init:function(t,e,i){var n=this.dimension,o=new qM(n,sg(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).model=t,(o.coordinateSystem=this)._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();E(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),rg(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=bu({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}}).dimensions});var JM=["axisLine","axisTickLabel","axisName"],QM=["splitArea","splitLine"],tI=mv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Ci;var r=$M(e),s=new Qm(e,r);E(JM,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),E(QM,function(t){e.get(t+".show")&&this["_"+t](e)},this),ml(a,this._axisGroup,e),tI.superCall(this,"render",e,t,i,n)},remove:function(){bv(this)},_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 ls({subPixelOptimize:!0,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(Es(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(o),lineWidth:o},silent:!0}))}},_splitArea:function(t){wv(this,this._axisGroup,t,t)}}),eI=ku.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});m(eI.prototype,dg),Gm("single",eI,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});function iI(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=Yo(a,t);if(null==r||r<0||L(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(O(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}}var nI=E,oI=T,aI=jo();function rI(t,e,i,n,o){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var r=function(l,t){var u=t.axis,h=u.dim,c=l,d=[],f=Number.MAX_VALUE,p=-1;return nI(t.seriesModels,function(e,t){var i,n,o=e.getData().mapDimension(h,!0);if(e.getAxisTooltipData){var a=e.getAxisTooltipData(o,l,u);n=a.dataIndices,i=a.nestestValue}else{if(!(n=e.getData().indicesOfNearest(o[0],l,"category"===u.type?.5:null)).length)return;i=e.getData().get(o[0],n[0])}if(null!=i&&isFinite(i)){var r=l-i,s=Math.abs(r);s<=f&&((s<f||0<=r&&p<0)&&(f=s,p=r,c=i,d.length=0),nI(n,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:d,snapToValue:c}}(e,t),s=r.payloadBatch,l=r.snapToValue;s[0]&&null==o.seriesIndex&&P(o,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,o),i.showTooltip(t,r,l)}else i.showPointer(t,e)}function sI(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function lI(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=gv(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 uI(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 hI(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}Tf({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var cI=jo(),dI=E;function fI(t,e,i){if(!v.node){var n=e.getZr();cI(n).records||(cI(n).records={}),function(o,a){if(cI(o).initialized)return;function t(t,n){o.on(t,function(e){var i=function(i){var n={showTip:[],hideTip:[]},o=function(t){var e=n[t.type];e?e.push(t):(t.dispatchAction=o,i.dispatchAction(t))};return{dispatchAction:o,pendings:n}}(a);dI(cI(o).records,function(t){t&&n(t,e,i.dispatchAction)}),function(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))}(i.pendings,a)})}cI(o).initialized=!0,t("click",T(gI,"click")),t("mousemove",T(gI,"mousemove")),t("globalout",pI)}(n,e),(cI(n).records[t]||(cI(n).records[t]={})).handler=i}}function pI(t,e,i){t.handler("leave",null,i)}function gI(t,e,i,n){e.handler(t,i,n)}function mI(t,e){if(!v.node){var i=e.getZr();(cI(i).records||{})[t]&&(cI(i).records[t]=null)}}var vI=Af({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";fI("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){mI(e.getZr(),"axisPointer"),vI.superApply(this._model,"remove",arguments)},dispose:function(t,e){mI("axisPointer",e),vI.superApply(this._model,"dispose",arguments)}}),yI=jo(),xI=k,_I=A;function wI(){}function bI(t,e,i,n){!function i(n,t){{if(z(n)&&z(t)){var o=!0;return E(t,function(t,e){o=o&&i(n[e],t)}),!!o}return n===t}}(yI(i).lastProp,n)&&(yI(i).lastProp=n,e?cl(i,n,t):(i.stopAnimation(),i.attr(n)))}function SI(t,e){t[e.get("label.show")?"show":"hide"]()}function MI(t){return{position:t.position.slice(),rotation:t.rotation||0}}function II(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 TI(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 AI(t,e,i,n,o){var a=DI(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=iu(r.get("padding")||0),l=r.getFont(),u=gn(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),function(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)}(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",textPadding:s,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 DI(t,e,o,i,n){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:n.precision}),r=n.formatter;if(r){var s={value:ug(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,function(t){var e=o.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);n&&s.seriesData.push(n)}),R(r)?a=r.replace("{value}",a):C(r)&&(a=r(s))}return a}function CI(t,e,i){var n=ae();return he(n,n,i.rotation),ue(n,n,i.position),pl([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function LI(t,e,i,n,o,a){var r=Qm.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),AI(e,n,o,a,{position:CI(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function kI(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function PI(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function NI(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}oa((wI.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=T(bI,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new Ci,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);II(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)return!0===i;var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=fv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=yI(t).pointerEl=new bl[o.type](xI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=yI(t).labelEl=new rs(xI(e.label));t.add(o),SI(o,n)}},updatePointerEl:function(t,e,i){var n=yI(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=yI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),SI(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=yl(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:_I(this._onHandleDragMove,this,0,0),drift:_I(this._onHandleDragMove,this),ondragend:_I(this._onHandleDragEnd,this)}),n.add(o)),II(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");L(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),kc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){bI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,MI(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(MI(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(MI(n)),yI(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=wI);var OI=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=EI(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=TI(n),c=RI[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}LI(e,t,_v(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=_v(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CI(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=EI(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];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function EI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var RI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:kI([e,i[0]],[e,i[1]],zI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:PI([e-n/2,i[0]],[n,o],zI(t))}}};function zI(t){return"x"===t.dim?0:1}mv.registerAxisPointerClass("CartesianAxisPointer",OI),yf(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!L(e)&&(t.axisPointer.link=[e])}}),xf(Ld.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=cv(t,e)}),_f({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||A(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){hI(r)&&(r=iI({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=hI(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||hI(r),d={},f={},p={list:[],map:{}},g={showPointer:oI(sI,f),showTooltip:oI(lI,p)};nI(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);nI(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&a&&(!u||n)){var o=n&&n.value;null!=o||l||(o=i.pointToData(r)),null!=o&&rI(t,o,g,!1,d)}})});var m={};return nI(h,function(o,t){var a=o.linkGroup;a&&!f[t]&&nI(a.axesInfo,function(t,e){var i=f[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,uI(t),uI(o)))),m[o.key]=n}})}),nI(m,function(t,e){rI(h[e],t,g,!0,d)}),function(o,t,e){var a=e.axesInfo=[];nI(t,function(t,e){var i=t.axisPointerModel.option,n=o[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(hI(e)||!t.list.length)return n({type:"hideTip"});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})}(p,r,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=aI(n)[o]||{},r=aI(n)[o]={};nI(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&nI(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(a,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var BI=["x","y"],VI=["width","height"],GI=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=HI(r,1-WI(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=TI(n),c=FI[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}LI(e,t,$M(i),i,n,o)},getHandleTransform:function(t,e,i){var n=$M(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CI(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=WI(o),s=HI(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=HI(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"}}}}),FI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:kI([e,i[0]],[e,i[1]],WI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:PI([e-n/2,i[0]],[n,o],WI(t))}}};function WI(t){return t.isHorizontal()?0:1}function HI(t,e){var i=t.getRect();return[i[BI[e]],i[BI[e]]+i[VI[e]]]}mv.registerAxisPointerClass("SingleAxisPointer",GI),Af({type:"single"});var ZI=sc.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){ZI.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this))},fixData:function(t){var e=t.length,i=ta(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var o=n.length,a=-1,r=-1,s=0;s<o;++s){var l=n[s].dataList.length;a<l&&(a=l,r=s)}for(var u=0;u<o;++u)if(u!==r)for(var h=n[u].name,c=0;c<a;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;g<f;++g){if(n[u].dataList[g][0]===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,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=M(t.data,function(t){return void 0!==t[2]}),o=this.fixData(n||[]),a=[],r=this.nameMap=Q(),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=lp(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ef(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new Yf(u,this);return h.initData(o),h},getLayerSeries:function(){for(var i=this.getData(),t=i.count(),e=[],n=0;n<t;++n)e[n]=n;var o=i.mapDimension("single"),a=ta(e,function(t){return i.get("name",t)}),r=[];return a.buckets.each(function(t,e){t.sort(function(t,e){return i.get(o,t)-i.get(o,e)}),r.push({name:e,indices:t})}),r},getAxisTooltipData:function(t,e,i){L(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="-"),au(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}}}});Cf({type:"themeRiver",init:function(){this._layers=[]},render:function(b,t,e){var S=b.getData(),M=this.group,I=b.getLayerSeries(),i=S.getLayout("layoutInfo"),n=i.rect,o=i.boundaryGap;function a(t){return t.name}M.attr("position",[0,n.y+o[0]]);var r=new kf(this._layersSeries||[],I,a,a),T={};function s(t,e,i){var n=this._layers;if("remove"!==t){for(var o,a,r,s=[],l=[],u=I[e].indices,h=0;h<u.length;h++){var c=S.getItemLayout(u[h]),d=c.x,f=c.y0,p=c.y;s.push([d,f]),l.push([d,f+p]),o=S.getItemVisual(u[h],"color")}var g=S.getItemLayout(u[0]),m=S.getItemModel(u[h-1]),v=m.getModel("label"),y=v.get("margin");if("add"===t){var x=T[e]=new Ci;a=new _m({shape:{points:s,stackedOnPoints:l,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),r=new Ur({style:{x:g.x-y,y:g.y0+g.y/2}}),x.add(a),x.add(r),M.add(x),a.setClipPath(function(t,e,i){var n=new rs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return dl(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(a.getBoundingRect(),b,function(){a.removeClipPath()}))}else{x=n[i];a=x.childAt(0),r=x.childAt(1),M.add(x),T[e]=x,cl(a,{shape:{points:s,stackedOnPoints:l}},b),cl(r,{style:{x:g.x-y,y:g.y0+g.y/2}},b)}var _=m.getModel("emphasis.itemStyle"),w=m.getModel("itemStyle");nl(r.style,v,{text:v.get("show")?b.getFormattedLabel(u[h-1],"normal")||S.getName(u[h-1]):null,textVerticalAlign:"middle"}),a.setStyle(P({fill:o},w.getItemStyle(["color"]))),$s(a,_.getItemStyle())}else M.remove(n[e])}r.add(A(s,this,"add")).update(A(s,this,"update")).remove(A(s,this,"remove")).execute(),this._layersSeries=I,this._layers=T},dispose:function(){}});function UI(i,t,e){if(i.count())for(var n,o=t.coordinateSystem,a=t.getLayerSeries(),r=i.mapDimension("single"),s=i.mapDimension("value"),l=O(a,function(t){return O(t.indices,function(t){var e=o.dataToPoint(i.get(r,t));return e[1]=i.get(s,t),e})}),u=function(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];a<u&&(a=u),n.push(u)}for(var h=0;h<i;++h)o[h]=(a-n[h])/2;for(var c=a=0;c<i;++c){var d=n[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),h=u.y0,c=e/u.max,d=a.length,f=a[0].indices.length,p=0;p<f;++p){n=h[p]*c,i.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:n,y:l[0][p][1]*c});for(var g=1;g<d;++g)n+=l[g-1][p][1]*c,i.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:n,y:l[g][p][1]*c})}}bf(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]=Rl(a[0],o.height),a[1]=Rl(a[1],o.height),UI(e,t,o.height-a[0]-a[1])):(a[0]=Rl(a[0],o.width),a[1]=Rl(a[1],o.width),UI(e,t,o.width-a[0]-a[1]));e.setLayout("layoutInfo",n)})}),Sf(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=Q();a.each(function(t){l.set(a.getRawIndex(t),t)}),r.each(function(t){var e=r.getName(t),i=s[(o.nameMap.get(e)-1)%s.length];r.setItemVisual(t,"color",i);var n=l.get(t);null!=n&&a.setItemVisual(n,"color",i)})})}),xf(uy("themeRiver")),sc.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;L(e)&&(e=e[0]),n+=e});var e=t.value;L(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);L(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o={};return o.levels=n,Ax.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=sc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Yx(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},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},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 XI="none",YI="ancestor",jI="self",qI=2,KI=4;function $I(t,e,i){Ci.call(this);var n=new qr({z2:qI});n.seriesIndex=e.seriesIndex;var o=new Ur({z2:KI,silent:t.getModel("label").get("silent")});function a(){o.ignore=o.hoverIgnore}function r(){o.ignore=o.normalIgnore}this.add(n),this.add(o),this.updateData(!0,t,"normal",e,i),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}var JI=$I.prototype;JI.updateData=function(t,e,i,n,o){(this.node=e).piece=this,n=n||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout(),l=P({},s);l.label=null;var u=function(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;a=i.option.color[function(t){var e=t;for(;1<e.depth;)e=e.parentNode;return _(t.getAncestors()[0].children,e)}(t)%r]}return a}(e,0,o);!function(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}(e,n,u);var h,c=r.getModel("itemStyle").getItemStyle();"normal"===i?h=c:h=m(r.getModel(i+".itemStyle").getItemStyle(),c);h=D({lineJoin:"bevel",fill:h.fill||u},h),t?(a.setShape(l),a.shape.r=s.r0,cl(a,{shape:{r:s.r}},n,e.dataIndex),a.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(cl(a,{shape:l},n),a.useStyle(h)):cl(a,{shape:l,style:h},n),this._updateLabel(n,u,i);var d=r.getShallow("cursor");if(d&&a.attr("cursor",d),t){var f=n.getShallow("highlightPolicy");this._initEvents(a,e,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel,$s(this)},JI.onEmphasis=function(e){var i=this;this.node.hostTree.root.eachNode(function(t){t.piece&&(i.node===t?t.piece.updateData(!1,t,"emphasis"):!function(t,e,i){return i!==XI&&(i===jI?t===e:i===YI?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}(t,i.node,e)?e!==XI&&t.piece.childAt(0).trigger("downplay"):t.piece.childAt(0).trigger("highlight"))})},JI.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},JI.onHighlight=function(){this.updateData(!1,this.node,"highlight")},JI.onDownplay=function(){this.updateData(!1,this.node,"downplay")},JI._updateLabel=function(t,e,i){var n=this.node.getModel(),o=n.getModel("label"),a="normal"===i||"emphasis"===i?o:n.getModel(i+".label"),r=n.getModel("emphasis.label"),s=W(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=a.get("minAngle");null==u&&(u=o.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;null!=u&&Math.abs(h)<u&&(s="");var c=this.childAt(1);el(c.style,c.hoverStyle||{},o,r,{defaultText:a.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var d,f=(l.startAngle+l.endAngle)/2,p=Math.cos(f),g=Math.sin(f),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=f>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},JI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(n)}function a(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w($I,Ci);_c.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,i=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new $I(t,o,a);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new kf(n,i,t,t).add(e).update(e).remove(T(e,null)).execute()}(h,c),function(t,e){if(0<e.depth){n.virtualPiece?n.virtualPiece.updateData(!1,t,"normal",o,a):(n.virtualPiece=new $I(t,o,a),l.add(n.virtualPiece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent);var i=function(t){n._rootToNode(e.parentNode)};e.piece._onclickEvent=i,n.virtualPiece.on("click",i)}else n.virtualPiece&&(l.remove(n.virtualPiece),n.virtualPiece=null)}(s,i),e&&e.highlight&&e.highlight.piece){var d=o.getShallow("highlightPolicy");e.highlight.piece.onEmphasis(d)}else if(e&&e.unhighlight){var f=this.virtualPiece;!f&&s.children.length&&(f=s.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){function t(o){var a=!1;r.seriesModel.getViewRoot().eachNode(function(t){if(!a&&t.piece&&t.piece.childAt(0)===o.target){var e=t.getModel().get("nodeClick");if("rootToNode"===e)r._rootToNode(t);else if("link"===e){var i=t.getModel(),n=i.get("link");if(n)gu(n,i.get("target",!0)||"_blank")}a=!0}})}var r=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_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 QI="sunburstRootToNode";_f({type:QI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Zx(o,[QI],t);if(i){var n=t.getViewRoot();n&&(o.direction=Xx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var tT="sunburstHighlight";_f({type:tT,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Zx(n,[tT],t);i&&(n.highlight=i.node)})});_f({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var eT=Math.PI/180;function iT(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function nT(a,r){return r=r||[0,0],O(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],o=a[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}Sf(T(iy,"sunburst")),bf(T(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");L(i)||(i=[0,i]),L(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),h=Math.min(n,o),c=Rl(e[0],n),d=Rl(e[1],o),f=Rl(i[0],h/2),a=Rl(i[1],h/2),r=-t.get("startAngle")*eT,p=t.get("minAngle")*eT,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=iT(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0<s.depth,_=s.height-(x?-1:1),w=(a-f)/(_||1),b=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=b?1:-1,I=function(t,e){if(t){var i=e;if(t!==g){var n=t.getValue(),o=0===v&&S?y:n*y;o<p&&(o=p),i=e+M*o;var a=t.depth-m-(x?-1:1),r=f+w*a,s=f+w*(1+a),l=t.getModel();null!=l.get("r0")&&(r=Rl(l.get("r0"),h/2)),null!=l.get("r")&&(s=Rl(l.get("r"),h/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:b,cx:c,cy:d,r0:r,r:s})}if(t.children&&t.children.length){var u=0;E(t.children,function(t){u+=I(t,e+u)})}return i-e}};if(x){var T=f,A=f+w,D=2*Math.PI;g.setLayout({angle:D,startAngle:r,endAngle:r+D,clockwise:b,cx:c,cy:d,r0:T,r:A})}I(s,r)})},"sunburst")),xf(T(uy,"sunburst"));function oT(a,r){return r=r||[0,0],O([0,1],function(t){var e=r[t],i=a[t]/2,n=[],o=[];return n[t]=e-i,o[t]=e+i,n[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function aT(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 rT(s,l){return O(["Radius","Angle"],function(t,e){var i=this["get"+t+"Axis"](),n=l[e],o=s[e]/2,a="dataTo"+t,r="category"===i.type?i.getBandWidth():Math.abs(i[a](n-o)-i[a](n+o));return"Angle"===t&&(r=r*Math.PI/180),r},this)}var sT=Ss,lT=["itemStyle"],uT=["emphasis","itemStyle"],hT=["label"],cT=["emphasis","label"],dT="e\0\0",fT={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(nT,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:A(oT,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(aT,e)}}},polar:function(o){var a=o.getRadiusAxis(),r=o.getAngleAxis(),t=a.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=a.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=o.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:A(rT,o)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function pT(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function gT(a,r,e,t){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms():fT[n.type](n));var s,l,u,h,c,d=D({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(lT).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var o=t?_T(t,u):u;return nl(i,o,null,{autoColor:c,isRectText:!0}),i.text=o.getShallow("show")?H(a.getFormattedLabel(e,"normal"),Ug(r,e)):null,t&&wT(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(uT).getItemStyle(),n=t?_T(t,h):h;return nl(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Ug(r,e)):null,t&&wT(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o<t.count;o++)e.push(D({bandWidth:n,axisKey:"axis0",stackId:Cp+o},t));var a=Ep(e),r=[];for(o=0;o<t.count;o++){var s=a.axis0[Cp+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(D({axis:n.getBaseAxis()},t))}},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return ul(t,e)}},o.api||{}),f={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:r.count(),encode:function(o){var a={};return E(o.dimensions,function(t,e){var i=o.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim;(a[n]=a[n]||[])[i.coordDimIndex]=e}}),a}(a.getData())},p=!0;return function(t,e){return s=t,p=!0,i&&i(D({dataIndexInside:t,dataIndex:r.getRawIndex(t),actionType:e?e.type:null},f),d)};function g(t){null==t&&(t=s),p&&(l=r.getItemModel(t),u=l.getModel(hT),h=l.getModel(cT),c=r.getItemVisual(t,"color"),p=!1)}}function mT(t,e,i,n,o,a){return(t=vT(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function vT(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&function(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}(u)&&ST(u)!==t.__customPathData||"image"===l&&MT(h,"image")&&h.image!==t.__customImagePath||"text"===l&&MT(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return function(e,t,i,n,o,a,r){var s={},l=i.style||{};if(i.shape&&(s.shape=k(i.shape)),i.position&&(s.position=i.position.slice()),i.scale&&(s.scale=i.scale.slice()),i.origin&&(s.origin=i.origin.slice()),i.rotation&&(s.rotation=i.rotation),"image"===e.type&&i.style){var u=s.style={};E(["x","y","width","height"],function(t){pT(t,u,l,e.style,a)})}if("text"===e.type&&i.style){u=s.style={};E(["x","y"],function(t){pT(t,u,l,e.style,a)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==e.type&&(e.useStyle(l),a)){e.style.opacity=0;var h=l.opacity;null==h&&(h=1),dl(e,{style:{opacity:h}},n,t)}a?e.attr(s):cl(e,s,n,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var c=i.styleEmphasis;Us(e,c),r&&Js(e,!1!==c)}(t=t||function(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=ST(n);(e=Ps(a,null,o,n.layout||"center")).__customPathData=a}else if("image"===i)(e=new Qn({})).__customImagePath=t.style.image;else if("text"===i)(e=new Ur({})).__customText=t.style.text;else if("group"===i)e=new Ci;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');e=new(ks(i))}return e.__customGraphicType=i,e.name=t.name,e}(i),e,i,n,0,c,r),"group"===l&&function(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!r&&!l&&!u)return;if(l)return function(t){new kf(t.oldChildren,t.newChildren,yT,yT,t).add(xT).update(xT).remove(bT).execute()}({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&vT(t.childAt(h),e,a[h],n,t,o)}(t,e,i,n,a),o.add(t),t}}function yT(t,e){var i=t&&t.name;return null!=i?i:dT+e}function xT(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;vT(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function _T(i,t){var n=new Cl({},t);return E(sT,function(t,e){i.hasOwnProperty(t)&&(n.option[e]=i[t])}),n}function wT(t,e){for(var i in e)!e.hasOwnProperty(i)&&sT.hasOwnProperty(i)||(t[i]=e[i])}function bT(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function ST(t){return t&&(t.pathData||t.d)}function MT(t,e){return t&&t.hasOwnProperty(e)}function IT(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function TT(t,e){return e.dim+t.model.componentIndex}function AT(t,e){Gg.call(this,"radius",t,e),this.type="category"}sc.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return gp(this.getSource(),this)},getDataParams:function(t,e,i){var n=sc.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),_c.extend({type:"custom",_data:null,render:function(i,t,e,n){var o=this._data,a=i.getData(),r=this.group,s=gT(i,a,t,e);a.diff(o).add(function(t){mT(null,t,s(t,n),i,r,a)}).update(function(t,e){mT(o.getItemGraphicEl(e),t,s(t,n),i,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=i.get("clip",!0)?Sm(i.coordinateSystem,!1,i):null;l?r.setClipPath(l):r.removeClipPath(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){var a=e.getData(),r=gT(e,a,i,n);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){mT(null,l,r(l,o),e,this.group,a).traverse(s)}},dispose:et,filterForExposedEvent:function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1}}),AT.prototype={constructor:AT,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:Gg.prototype.dataToCoord,radiusToData:Gg.prototype.coordToData},w(AT,Gg);var DT=jo();function CT(t,e){e=e||[0,360],Gg.call(this,"angle",t,e),this.type="category"}CT.prototype={constructor:CT,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:Gg.prototype.dataToCoord,angleToData:Gg.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,i=e.getExtent(),n=e.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=this.dataToCoord(o+1)-this.dataToCoord(o),r=Math.abs(a),s=gn(o,t.getFont(),"center","top"),l=Math.max(s.height,7)/r;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=DT(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-n)<=1&&u<c?u=c:(h.lastTickCount=n,h.lastAutoInterval=u),u}},w(CT,Gg);function LT(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new AT,this._angleAxis=new CT,this._radiusAxis.polar=this._angleAxis.polar=this}LT.prototype={type:"polar",axisPointerEnabled:!0,constructor:LT,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||r<l;)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]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var kT=ku.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(kT.prototype,dg);var PT={splitNumber:5};function NT(t,e){return e.type||(e.data?"category":"value")}function OT(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();E(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,pp(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,pp(e,t))})}}),rg(n.scale,n.model),rg(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 ET(t,e){if(t.type=e.get("type"),t.scale=sg(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).model=e}Gm("angle",kT,NT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Gm("radius",kT,NT,PT),Tf({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%"}}),lh.register("polar",{dimensions:LT.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new LT(e);i.update=OT;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");ET(n,a),ET(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Rl(n[0],o),t.cy=Rl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:L(l)||(l=[0,l]),l=[Rl(l[0],s),Rl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var RT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function zT(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 BT(t){return t.getRadiusAxis().inverse?0:1}function VT(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()}mv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=O(i.getViewLabels(),function(t){return(t=k(t)).coord=i.dataToCoord(t.tickValue),t});VT(s),VT(a),E(RT,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=BT(e),l=s?0:1;(a=0===o[l]?new Yr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Kr({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[BT(e)],l=O(i,function(t){return new ls({shape:zT(e,[s,s+r],t.coord)})});this.group.add(Es(l,{style:D(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[BT(e)],u=[],h=0;h<n.length;h++)for(var c=0;c<n[h].length;c++)u.push(new ls({shape:zT(e,[l,l+s],n[h][c].coord)}));this.group.add(Es(u,{style:D(r.getModel("lineStyle").getLineStyle(),D(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(c,d,t,e,f,i){var p=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin"),v=c.get("triggerEvent");E(i,function(t,e){var i=g,n=t.tickValue,o=f[BT(d)],a=d.coordToPoint([o+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new Cl(p[n].textStyle,g,g.ecModel));var h=new Ur({silent:Qm.isLabelSilent(c)});this.group.add(h),nl(h.style,i,{x:a[0],y:a[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Qm.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<i.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new ls({shape:zT(e,o,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(Es(l[u],{style:D({stroke:r[u%r.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),r=[],s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++)r.push(new ls({shape:zT(e,o,n[s][l].coord)}));this.group.add(Es(r,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,i,n,o){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=Math.PI/180,h=-i[0].coord*u,c=Math.min(o[0],o[1]),d=Math.max(o[0],o[1]),f=t.get("clockwise"),p=1;p<i.length;p++){var g=s++%r.length;l[g]=l[g]||[],l[g].push(new qr({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(Es(l[p],{style:D({fill:r[p%r.length]},a.getAreaStyle()),silent:!0}))}}});var GT=["axisLine","axisTickLabel","axisName"],FT=["splitLine","splitArea","minorSplitLine"];mv.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=o.getExtent()[0],l=i.getExtent(),u=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(n,e,s),h=new Qm(e,u);E(GT,h.add,h),this.group.add(h.getGroup()),E(FT,function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,s,l,a,r)},this)}},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<o.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new Yr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(Es(l[u],{style:D({stroke:r[u%r.length],fill:null},a.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,i,n,o,a){if(a.length){for(var r=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new Yr({shape:{cx:e.cx,cy:e.cy,r:a[l][u].coord}}));this.group.add(Es(s,{style:D({fill:null},r.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,i,n,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=o[0].coord,h=1;h<o.length;h++){var c=s++%r.length;l[c]=l[c]||[],l[c].push(new qr({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(Es(l[h],{style:D({fill:r[h%r.length]},a.getAreaStyle()),silent:!0}))}}});var WT=wI.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"+fu(a.dim)](e);var u=n.get("type");if(u&&"none"!==u){var h=TI(n),c=HT[u](a,s,r,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=n.get("label.margin");AI(t,i,n,o,function(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=ae();he(d,d,s),ue(d,d,[n.cx,n.cy]),l=pl([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Qm.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}}(e,i,0,s,d))}});var HT={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:kI(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:NI(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:NI(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function ZT(n,t){t.update="updateView",_f(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}mv.registerAxisPointerClass("PolarAxisPointer",WT),bf(T(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=TT(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[a]=l;var h=IT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Rl(t.get("barWidth"),s),d=Rl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i<l&&(i=Math.min(i,r),t.width&&(i=Math.min(i,t.width)),r-=i,t.width=i,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;E(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;E(e,function(t,e){d[i][e]=d[i][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}(M(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,n=i.getBaseAxis(),o=TT(i,n),a=IT(t),r=O[o][a],s=r.offset,l=r.width,u=i.getOtherAxis(n),h=t.coordinateSystem.cx,c=t.coordinateSystem.cy,d=t.get("barMinHeight")||0,f=t.get("barMinAngle")||0;N[a]=N[a]||[];for(var p=e.mapDimension(u.dim),g=e.mapDimension(n.dim),m=fp(e,p),v="radius"!==n.dim||!t.get("roundCap",!0),y=u.getExtent()[0],x=0,_=e.count();x<_;x++){var w,b,S,M,I=e.get(p,x),T=e.get(g,x),A=0<=I?"p":"n",D=y;if(m&&(N[a][T]||(N[a][T]={p:y,n:y}),D=N[a][T][A]),"radius"===u.dim){var C=u.dataToRadius(I)-y,L=n.dataToAngle(T);Math.abs(C)<d&&(C=(C<0?-1:1)*d),b=(w=D)+C,M=(S=L-s)-l,m&&(N[a][T][A]=b)}else{var k=u.dataToAngle(I,v)-y,P=n.dataToRadius(T);Math.abs(k)<f&&(k=(k<0?-1:1)*f),b=(w=P+s)+l,M=(S=D)+k,m&&(N[a][T][A]=M)}e.setItemLayout(x,{cx:h,cy:c,r0:w,r:b,startAngle:-S*Math.PI/180,endAngle:-M*Math.PI/180})}}},this)},"bar")),Af({type:"polar"}),b(ku.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){ku.prototype.init.apply(this,arguments),Go(t,"label",["show"])},optionUpdated:function(){var t=this.option,i=this;t.regions=px.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=S(t.regions||[],function(t,e){return e.name&&t.set(e.name,new Cl(e,i)),t},Q()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",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 Cl(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label"+("normal"===e?".":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}}),jv),Af({type:"geo",init:function(t,e){var i=new tx(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()}}),ZT("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),ZT("select",{type:"geoSelect",event:"geoselected"}),ZT("unSelect",{type:"geoUnSelect",event:"geounselected"});function UT(t,e,i){this._model=t}function XT(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}UT.prototype={constructor:UT,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=Yl(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{y:e,m:i,d:n,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[i,7]:[7,i];E([0,1],function(t){u(o,t)&&(a[n[t]]=o[t]*r[t])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=bu(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}E([0,1],function(t){u(o,t)||(o[t]=l[n[t]]/r[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){L(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:T(XT,"dataToPoint"),convertFromPixel:T(XT,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(L(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();n.setDate(o+i-1);var r=n.getDate();if(r!==a)for(var s=0<n.getTime()-t[1].time?1:-1;(r=n.getDate())!==a&&0<(n.getTime()-t[1].time)*s;)i-=s,n.setDate(r-s);var l=Math.floor((i+t[0].day+6)/7),u=e?1-l:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,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)}},UT.dimensions=UT.prototype.dimensions,UT.getDimensionsInfo=UT.prototype.getDimensionsInfo,UT.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new UT(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("calendarIndex")||0])}),o},lh.register("calendar",UT);var YT=ku.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=Iu(t);YT.superApply(this,"init",arguments),jT(t,o)},mergeOption:function(t,e){YT.superApply(this,"mergeOption",arguments),jT(this.option,t)}});function jT(t,e){var i=t.cellSize;L(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=O([0,1],function(t){return function(t,e){return null!=t[xu[e][0]]||null!=t[xu[e][1]]&&null!=t[xu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});Mu(t,e,{type:"box",ignoreSize:n})}var qT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["娑撯偓閺堬拷","娴滃本婀�","娑撳婀�","閸ユ稒婀�","娴滄梹婀�","閸忣厽婀�","娑撳啯婀�","閸忣偅婀�","娑旀繃婀�","閸椾焦婀�","閸椾椒绔撮張锟�","閸椾椒绨╅張锟�"]},KT={EN:["S","M","T","W","T","F","S"],CN:["閺冿拷","娑撯偓","娴滐拷","娑擄拷","閸ワ拷","娴滐拷","閸忥拷"]};Af({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 rs({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(i,t,n,o){var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(i,t,n);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,n),s,o)},_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 ts({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?uu(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 Ur({z2:30});nl(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"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(o)&&(o=qT[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];f[h]=(g[h]+l[0][d+1][h])/2}var m=n.get("formatter"),v=o[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},x=this._formatterLabel(m,y),_=new Ur({z2:30});P(nl(_.style,n,{text:x}),this._monthTextPositionControl(f,c,e,r,a)),i.add(_)}}},_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 a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek();R(s)&&(s=KT[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()];l=Rl(l,c["horizontal"===i?0:1]),"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=a.getNextNDay(h,d),g=a.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new Ur({z2:30});P(nl(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,i,r,l,c)),n.add(m)}}}});var $T={path:null,compoundPath:null,group:Ci,image:Qn,text:Ur};yf(function(t){var e=t.graphic;L(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var JT=Tf({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,JT.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=Ho(o,a);Zo(r);var s=this._elOptionsToUpdate=[];E(r,function(t,e){var i=t.option;i&&(s.push(i),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=P({},i),o=t[e],a=i.$action||"merge";"merge"===a?o?(m(o,n,!0),Mu(o,n,{ignoreSize:!0}),Tu(i,o)):t[e]=n:"replace"===a?t[e]=n:"remove"===a&&o&&(t[e]=null)}(o,e,i),function(t,e){if(!t)return;t.hv=e.hv=[eA(e,["left","right"]),eA(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(o[e],i))},this);for(var l=o.length-1;0<=l;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,i,n){E(t,function(t){if(t){n&&(t.parentOption=n),i.push(t);var e=t.children;"group"===t.type&&e&&this._flatten(e,i,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function QT(t,e,i,n){var o=i.type,a=new($T.hasOwnProperty(o)?$T[o]:ks(o))(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function tA(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){tA(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function eA(e,t){var i;return E(t,function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)}),i}Af({type:"graphic",init:function(t,e){this._elMap=Q(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(u){var t=u.useElOptionsToUpdate();if(t){var h=this._elMap,c=this.group;E(t,function(t){var e=t.$action,i=t.id,n=h.get(i),o=t.parentId,a=null!=o?h.get(o):c,r=t.style;"text"===t.type&&r&&(t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke")&&r.stroke&&(r.textStroke=r.stroke));var s=function(e){return e=P({},e),E(["id","parentId","$action","hv","bounding"].concat(yu),function(t){delete e[t]}),e}(t);e&&"merge"!==e?"replace"===e?(tA(n,h),QT(i,a,s,h)):"remove"===e&&tA(n,h):n?n.attr(s):QT(i,a,s,h);var l=h.get(i);l&&(l.__ecGraphicWidthOption=t.width,l.__ecGraphicHeightOption=t.height,function(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=t.info)}(l,u))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=e.getWidth(),r=e.getHeight(),s=0;s<i.length;s++){var l=i[s];if((h=o.get(l.id))&&h.isGroup){var u=(c=h.parent)===n;h.__ecGraphicWidth=Rl(h.__ecGraphicWidthOption,u?a:c.__ecGraphicWidth)||0,h.__ecGraphicHeight=Rl(h.__ecGraphicHeightOption,u?r:c.__ecGraphicHeight)||0}}for(s=i.length-1;0<=s;s--){var h,c;l=i[s];if(h=o.get(l.id))Su(h,l,(c=h.parent)===n?{width:a,height:r}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:l.hv,boundingMode:l.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){tA(t,e)}),this._elMap=Q()},dispose:function(){this._clear()}});var iA={};function nA(t,e){iA[t]=e}function oA(t){return iA[t]}var aA=Tf({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){aA.superApply(this,"optionUpdated",arguments),E(this.option.feature,function(t,e){var i=oA(e);i&&m(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"}},tooltip:{show:!1}}});function rA(t,e){var i=iu(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new rs({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})}Af({type:"toolbox",render:function(h,c,d,l){var f=this.group;if(f.removeAll(),h.get("show")){var p=+h.get("itemSize"),u=h.get("feature")||{},g=this._features||(this._features={}),m=[];E(u,function(t,e){m.push(e)}),new kf(this._featureNames||[],m).add(t).update(t).remove(T(t,null)).execute(),this._featureNames=m,function(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=bu(n,a,o);wu(e.get("orient"),t,e.get("itemGap"),r.width,r.height),Su(t,n,a,o)}(f,h,d),f.add(rA(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var n=gn(e,An(i)),o=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+n.height>d.getHeight()&&(i.textPosition="top",a=!0);var r=a?-5-n.height:p+8;o+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):o-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=m[t],o=m[e],a=u[n],r=new Cl(a,h,h.ecModel);if(l&&null!=l.newTitle&&l.featureName===n&&(a.title=l.newTitle),n&&!o){if(function(t){return 0===t.indexOf("my")}(n))i={model:r,onclick:r.option.onclick,featureName:n};else{var s=oA(n);if(!s)return;i=new s(r,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=r,i.ecModel=c,i.api=d}n||!o?r.get("show")&&!i.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=o.iconPaths={};E(e,function(t,e){var i=yl(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",P({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),$s(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(o.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",A(a.onclick,a,c,d,e)),u[e]=i})}(r,i,n),r.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(r,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var sA=Oc.toolbox.saveAsImage;function lA(t){this.model=t}lA.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:sA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:sA.lang.slice()},lA.prototype.unusable=!v.canvasSupported,lA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType()?"svg":i.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+o,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},nA("saveAsImage",lA);var uA=Oc.toolbox.magicType,hA="__ec_magicType_stack__";function cA(t){this.model=t}cA.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"},title:k(uA.title),option:{},seriesIndex:{}};var dA=cA.prototype;dA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var fA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===hA;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":hA},n.get("option.stack")||{},!0)}},pA=[["line","bar"],["stack"]];dA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(fA[h]){var i,d={series:[]};if(E(pA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=fA[h](e,i,t,c);n&&(D(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===hA?m({stack:uA.title.tiled},uA.title):k(uA.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i,featureName:"magicType"})}},_f({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),nA("magicType",cA);var gA=Oc.toolbox.dataView,mA=new Array(60).join("-"),vA="\t";function yA(t){var e=function(t){var o={},a=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;o[n]||(o[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),o[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:o,other:a,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(O(t.series,function(t){return t.name})),a=[i.model.getCategories()];E(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(vA)],s=0;s<a[0].length;s++){for(var l=[],u=0;u<a.length;u++)l.push(a[u][s]);r.push(l.join(vA))}h.push(r.join("\n"))}),h.join("\n\n"+mA+"\n\n")}(e.seriesGroupByCategoryAxis),function(t){return O(t,function(t){var o=t.getRawData(),a=[t.name],r=[];return o.each(o.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],i=o.getName(e),n=0;n<t-1;n++)r[n]=arguments[n];a.push((i?i+vA:"")+r.join(vA))}),a.join("\n")}).join("\n\n"+mA+"\n\n")}(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+mA+"\n\n"),meta:e.meta}}function xA(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var _A=new RegExp("["+vA+"]+","g");function wA(t,a){var e=t.split(new RegExp("\n*"+mA+"\n*","g")),r={series:[]};return E(e,function(t,e){if(function(t){if(0<=t.slice(0,t.indexOf("\n")).indexOf(vA))return!0}(t)){var i=function(t){for(var e=t.split(/\n+/g),i=[],n=O(xA(e.shift()).split(_A),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=xA(e[o]).split(_A);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}}(t),n=a[e],o=n.axisDim+"Axis";n&&(r[o]=r[o]||[],r[o][n.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{i=function(t){for(var e=t.split(/\n+/g),i=xA(e.shift()),n=[],o=0;o<e.length;o++){var a,r=xA(e[o]).split(_A),s="",l=!1;a=isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},n[o].value):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}}(t);r.series.push(i)}}),r}function bA(t){this._dom=null,this.model=t}bA.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:k(gA.title),lang:k(gA.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},bA.prototype.onclick=function(t,e){var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var a=document.createElement("h4"),r=n.get("lang")||[];a.innerHTML=r[0]||n.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=n.get("optionToContent"),h=n.get("contentToOption"),c=yA(t);if("function"==typeof u){var d=u(e.getOption());"string"==typeof d?s.innerHTML=d:G(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var f=c.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(o),y._dom=null}Ut(m,"click",x),Ut(v,"click",function(){var t;try{t="function"==typeof h?h(s,e.getOption()):wA(l.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}),m.innerHTML=r[1],v.innerHTML=r[2],v.style.cssText=g,m.style.cssText=g,n.get("readOnly")||p.appendChild(v),p.appendChild(m),o.appendChild(a),o.appendChild(s),o.appendChild(p),s.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},bA.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},bA.prototype.dispose=function(t,e){this.remove(t,e)},nA("dataView",bA),_f({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,n){var o=[];E(t.newOption.series,function(t){var e=n.getSeriesByName(t.name)[0];if(e){var i=e.get("data");o.push({name:t.name,data:function(t,n){return O(t,function(t,e){var i=n&&n[e];return z(i)&&!L(i)?(z(t)&&!L(t)&&(t=t.value),D({value:t},i)):t})}(t.data,i)})}else o.push(P({type:"scatter"},t))}),n.mergeOption(D({series:o},t.newOption))});var SA=E,MA=_,IA=T,TA=["dataToPoint","pointToData"],AA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function DA(t,e,i){var n=this._targetInfoList=[],o={},a=kA(e,t);SA(PA,function(t,e){i&&i.include&&!(0<=MA(i.include,e))||t(a,n,o)})}var CA=DA.prototype;function LA(t){return t[0]>t[1]&&t.reverse(),t}function kA(t,e){return Ko(t,e,{includeMainTypes:AA})}CA.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=EA[t.brushType](0,i,e);t.__rangeOffset={offset:zA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},CA.matchOutputRanges=function(t,n,o){SA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=EA[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},CA.setInputRanges=function(t,o){SA(t,function(t){var e=this.findTargetInfo(t,o);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=EA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?zA[t.brushType](i.values,n.offset,function(t,e){var i=VA(t),n=VA(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(i.xyMinMax,n.xyMinMax)):i.values}},this)},CA.makePanelOpts=function(i,n){return O(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:eS(e),isTargetByCursor:nS(e,i,t.coordSysModel),getLinearBrushOtherExtent:iS(e)}})},CA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=MA(n.coordSyses,e.coordinateSystem)},CA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=kA(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<NA.length;o++)if(NA[o](n,a))return a}return!0};var PA={grid:function(t,n){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,i=Q(),r={},s={};(o||a||e)&&(SA(o,function(t){var e=t.axis.grid.model;i.set(e.id,e),r[e.id]=!0}),SA(a,function(t){var e=t.axis.grid.model;i.set(e.id,e),s[e.id]=!0}),SA(e,function(t){i.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),i.each(function(t){var e=t.coordinateSystem,i=[];SA(e.getCartesians(),function(t,e){(0<=MA(o,t.getAxis("x").model)||0<=MA(a,t.getAxis("y").model))&&i.push(t)}),n.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:i[0],coordSyses:i,getPanelRect:OA.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,i){SA(t.geoModels,function(t){var e=t.coordinateSystem;i.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:OA.geo})})}},NA=[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}],OA={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(fl(t)),e}},EA={lineX:IA(RA,0),lineY:IA(RA,1),rect:function(t,e,i){var n=e[TA[t]]([i[0][0],i[1][0]]),o=e[TA[t]]([i[0][1],i[1][1]]),a=[LA([n[0],o[0]]),LA([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(i,n,t){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:O(t,function(t){var e=n[TA[i]](t);return o[0][0]=Math.min(o[0][0],e[0]),o[1][0]=Math.min(o[1][0],e[1]),o[0][1]=Math.max(o[0][1],e[0]),o[1][1]=Math.max(o[1][1],e[1]),e}),xyMinMax:o}}};function RA(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=LA(O([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}}var zA={lineX:IA(BA,0),lineY:IA(BA,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,i,n){return O(t,function(t,e){return[t[0]-n[0]*i[e][0],t[1]-n[1]*i[e][1]]})}};function BA(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function VA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var GA=E,FA="\0_ec_hist_store";function WA(t){var e=t[FA];return e=e||(t[FA]=[{}])}ku.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var HA=["cartesian2d","polar","singleAxis"];var ZA,UA,XA,YA,jA=(UA=["axisIndex","axis","index","id"],XA=O(ZA=(ZA=["x","y","z","radius","angle","single"]).slice(),fu),YA=O(UA=(UA||[]).slice(),fu),function(o,a){E(ZA,function(t,e){for(var i={name:t,capital:XA[e]},n=0;n<UA.length;n++)i[UA[n]]=t+YA[n];o.call(a,i)})});function qA(o,a,r){return function(t){var e,i={nodes:[],records:{}};if(a(function(t){i.records[t.name]={}}),!t)return i;for(s(t,i);e=!1,o(n),e;);function n(t){!function(t,e){return 0<=_(e.nodes,t)}(t,i)&&function(t,i){var n=!1;return a(function(e){E(r(t,e)||[],function(t){i.records[e.name][t]&&(n=!0)})}),n}(t,i)&&(s(t,i),e=!0)}return i};function s(t,i){i.nodes.push(t),a(function(e){E(r(t,e)||[],function(t){i.records[e.name][t]=!0})})}}function KA(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i}var $A=E,JA=Bl;function QA(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Fl(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))}}KA.prototype={constructor:KA,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var n=[],o=this.ecModel;return o.eachSeries(function(t){if(function(t){return 0<=_(HA,t)}(t.get("coordinateSystem"))){var e=this._dimName,i=o.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&n.push(t)}},this),n},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,o=this.ecModel,a=this.getAxisModel();return t="x"===n||"y"===n?(e="gridIndex","x"===n?"y":"x"):(e="polarIndex","angle"===n?"radius":"angle"),o.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return k(this._minMaxSpan)},calculateDataWindow:function(o){var a,r=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];$A(["start","end"],function(t,e){var i=o[t],n=o[t+"Value"];"percent"===l[e]?(null==i&&(i=u[e]),n=s.parse(El(i,u,r))):(a=!0,i=El(n=null==n?r[e]:s.parse(n),r,u)),c[e]=n,h[e]=i}),JA(c),JA(h);var d=this._minMaxSpan;function t(t,e,i,n,o){var a=o?"Span":"ValueSpan";Jw(0,t,i,"all",d["min"+a],d["max"+a]);for(var r=0;r<2;r++)e[r]=El(t[r],i,n,!0),o&&(e[r]=s.parse(e[r]))}return a?t(c,h,r,u,!1):t(h,c,u,r,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];$A(i,function(t){var i=t.getData();i&&$A(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]);return function(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]=0<a?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN);i.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e),function(n){var o=n._minMaxSpan={},a=n._dataZoomModel,r=n._dataExtent;$A(["min","max"],function(t){var e=a.get(t+"Span"),i=a.get(t+"ValueSpan");null!=i&&(i=n.getAxisModel().axis.scale.parse(i)),null!=i?e=El(r[0]+i,r,[0,100],!0):null!=e&&(i=El(e,[0,100],r,!0)-r[0]),o[t+"Span"]=e,o[t+"ValueSpan"]=i})}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,QA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,QA(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=t.get("filterMode"),c=this._valueWindow;"none"!==o&&$A(i,function(i){var u=i.getData(),h=u.mapDimension(n,!0);h.length&&("weakFilter"===o?u.filterSelf(function(t){for(var e,i,n,o=0;o<h.length;o++){var a=u.get(h[o],t),r=!isNaN(a),s=a<c[0],l=a>c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):$A(h,function(t){if("empty"===o)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),$A(h,function(t){u.setApproximateExtent(c,t)}))})}}};var tD=E,eD=jA,iD=Tf({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=nD(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=nD(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),oD(this,t);var n=this.settledOption;tD([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new KA(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();eD(function(t){var e=t.axisIndex;i[e]=Vo(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;eD(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],a=!1):tD(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&eD(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;n<o;n++)"category"===i[n].get("type")&&e.push(n);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(o){this._isSeriesHasAllAxesTypeOf(o,"value")&&eD(function(t){var e=r[t.axisIndex],i=o.get(t.axisIndex),n=o.get(t.axisId);_(e,i=o.ecModel.queryComponents({mainType:t.axis,index:i,id:n})[0].componentIndex)<0&&e.push(i)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){e=e||t.name},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(n,o){var a=!0;return eD(function(t){var e=n.get(t.axisIndex),i=this.dependentModels[t.axis][e];i&&i.get("type")===o||(a=!1)},this),a},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var i;return eD(function(t){if(null==i){var e=this.get(t.axisIndex);e.length&&(i=this.dependentModels[t.axis][e[0]])}},this),i},eachTargetAxis:function(i,n){var o=this.ecModel;eD(function(e){tD(this.get(e.axisIndex),function(t){i.call(n,e,t,this,o)},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(e){var i=this.option,n=this.settledOption;tD([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(i[t[0]]=n[t[0]]=e[t[0]],i[t[1]]=n[t[1]]=e[t[1]])},this),oD(this,e)},setCalculatedRange:function(e){var i=this.option;tD(["start","startValue","end","endValue"],function(t){i[t]=e[t]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function nD(e){var i={};return tD(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(i[t]=e[t])}),i}function oD(t,o){var a=t._rangePropMode,r=t.get("rangeMode");tD([["start","startValue"],["end","endValue"]],function(t,e){var i=null!=o[t[0]],n=null!=o[t[1]];i&&!n?a[e]="percent":!i&&n?a[e]="value":r?a[e]=r[e]:i&&(a[e]="percent")})}var aD=gc.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var i=o.getComponent(t.axis,e);if(i){var n=i.getCoordSysModel();n&&function(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)}(n,i,a[n.mainType]||(a[n.mainType]=[]),n.componentIndex)}},this),a}});iD.extend({type:"dataZoom.select"}),aD.extend({type:"dataZoom.select"}),xf({getTargetSeries:function(t){var n=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){E(i.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){n.set(t.uid,t)})})}),n},modifyOutputEnd:!0,overallReset:function(t,n){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).reset(i,n)}),t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).filterData(i,n)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),_f("dataZoom",function(i,t){var n=qA(A(t.eachComponent,t,"dataZoom"),jA,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:i},function(t,e){o.push.apply(o,n(t).nodes)}),E(o,function(t,e){t.setRawRange({start:i.start,end:i.end,startValue:i.startValue,endValue:i.endValue})})});var rD=Oc.toolbox.dataZoom,sD=E;function lD(t,e,i){(this._brushController=new Ib(i.getZr())).on("brush",A(this._onBrush,this)).mount(),this._isZoomActive}lD.defaultOption={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:k(rD.title)};var uD=lD.prototype;uD.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(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 DA(cD(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)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",1<function(t){return WA(t).length}(e)?"emphasis":"normal")}(t,e)},uD.onclick=function(t,e,i){hD[i].call(this)},uD.remove=function(t,e){this._brushController.unmount()},uD.dispose=function(t,e){this._brushController.dispose()};var hD={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var n=WA(t),e=n[n.length-1];1<n.length&&n.pop();var o={};return GA(e,function(t,e){for(var i=n.length-1;0<=i;i--){if(t=n[i][e]){o[e]=t;break}}}),o}(this.ecModel))}};function cD(e){var i={};return E(["xAxisIndex","yAxisIndex"],function(t){i[t]=e[t],null==i[t]&&(i[t]="all"),!1!==i[t]&&"none"!==i[t]||(i[t]=[])}),i}uD._onBrush=function(t,e){if(e.isEnd&&t.length){var s={},l=this.ecModel;this._brushController.updateCovers([]),new DA(cD(this.model.option),l,{include:["grid"]}).matchOutputRanges(t,l,function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(o("x",i,e[0]),o("y",i,e[1])):o({lineX:"x",lineY:"y"}[n],i,e)}}),function(a,t){var r=WA(a);GA(t,function(t,e){for(var i=r.length-1;0<=i;i--){if(r[i][e])break}if(i<0){var n=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(n){var o=n.getPercentRange();r[0][e]={dataZoomId:e,start:o[0],end:o[1]}}}}),r.push(t)}(l,s),this._dispatchZoomAction(s)}function o(t,e,i){var n=e.getAxis(t),o=n.model,a=function(e,i,t){var n;return t.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(e,i.componentIndex)&&(n=t)}),n}(t,o,l),r=a.findRepresentativeAxisProxy(o).getMinMaxSpan();null==r.minValueSpan&&null==r.maxValueSpan||(i=Jw(0,i.slice(),n.scale.getExtent(),0,r.minValueSpan,r.maxValueSpan)),a&&(s[a.id]={dataZoomId:a.id,startValue:i[0],endValue:i[1]})}},uD._dispatchZoomAction=function(t){var i=[];sD(t,function(t,e){i.push(k(t))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},nA("dataZoom",lD),yf(function(s){if(s){var l=s.dataZoom||(s.dataZoom=[]);L(l)||(s.dataZoom=l=[l]);var t=s.toolbox;if(t&&(L(t)&&(t=t[0]),t&&t.feature)){var e=t.feature.dataZoom;i("xAxis",e),i("yAxis",e)}}function i(n,o){if(o){var a=n+"Index",r=o[a];null==r||"all"===r||L(r)||(r=!1===r||"none"===r?[]:[r]),function(t,e){var i=s[t];L(i)||(i=i?[i]:[]);sD(i,e)}(n,function(t,e){if(null==r||"all"===r||-1!==_(r,e)){var i={type:"select",$fromToolbox:!0,filterMode:o.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+e};i[a]=e,l.push(i)}})}}});var dD=Oc.toolbox.restore;function fD(t){this.model=t}fD.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:dD.title},fD.prototype.onclick=function(t,e,i){!function(t){t[FA]=null}(t),e.dispatchAction({type:"restore",from:this.uid})},nA("restore",fD),_f({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Tf({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",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 pD=E,gD=eu,mD=["","-webkit-","-moz-","-o-"];function vD(o){var a=[],t=o.get("transitionDuration"),e=o.get("backgroundColor"),i=o.getModel("textStyle"),n=o.get("padding");return t&&a.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return O(mD,function(t){return t+"transition:"+i}).join(";")}(t)),e&&(v.canvasSupported?a.push("background-Color:"+e):(a.push("background-Color:#"+Ze(e)),a.push("filter:alpha(opacity=70)"))),pD(["width","color","radius"],function(t){var e="border-"+t,i=gD(e),n=o.get(i);null!=n&&a.push(e+":"+n+("color"===t?"":"px"))}),a.push(function(i){var n=[],t=i.get("fontSize"),e=i.getTextColor();return e&&n.push("color:"+e),n.push("font:"+i.getFont()),t&&n.push("line-height:"+Math.round(3*t/2)+"px"),pD(["decoration","align"],function(t){var e=i.get(t);e&&n.push("text-"+t+":"+e)}),n.join(";")}(i)),null!=n&&a.push("padding:"+iu(n).join("px ")+"px"),a.join(";")+";"}function yD(t,e,i,n,o){var a=e&&e.painter;if(i){var r=a&&a.getViewportRoot();r&&function(t,e,i,n,o){Rt(Et,e,n,o,!0)&&Rt(t,i,Et[0],Et[1])}(t,r,document.body,n,o)}else{t[0]=n,t[1]=o;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function xD(t,e,i){if(v.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var o=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],yD(this._styleCoord,o,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=o.handler;Zt(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function _D(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}xD.prototype={constructor:xD,_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,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+vD(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"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=this._styleCoord;yD(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},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(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},_D.prototype={constructor:_D,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a="{marker",r=o.indexOf(a);0<=r;){var s=o.indexOf("|}"),l=o.substr(r+a.length,s-r-a.length);-1<l.indexOf("sub")?n["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:n["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},r=(o=o.substr(s+1)).indexOf("{marker")}this.el=new Ur({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var wD=A,bD=E,SD=Rl,MD=new rs({shape:{x:-1,y:-1,width:2,height:2}});function ID(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(Cl.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Cl(i,e,e.ecModel))}return e}function TD(t,e){return t.dispatchAction||A(e.dispatchAction,e)}function AD(t){return"center"===t||"middle"===t}Af({type:"tooltip",init:function(t,e){if(!v.node){var i,n=t.getComponent("tooltip"),o=n.get("renderMode");this._renderMode=Qo(o),"html"===this._renderMode?(i=new xD(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new _D(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!v.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var n=this._tooltipModel.get("triggerOn");fI("itemTooltip",this._api,wD(function(t,e,i){"none"!==n&&(0<=n.indexOf(t)?this._tryShow(e,i):"leave"===t&&this._hide(i))},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(){i.isDisposed()||n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!v.node){var o=TD(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=MD;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,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=iI(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},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},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(TD(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)if("axis"===(t=ID([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=A(e,this),clearTimeout(this._showTimout),0<i?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var d=this._ecModel,i=this._tooltipModel,n=[e.offsetX,e.offsetY],o=[],f=[],a=ID([e.tooltipOption,i]),p=this._renderMode,r=this._newLine,g={};bD(t,function(t){bD(t.dataByAxis,function(s){var l=d.getComponent(s.axisDim+"Axis",s.axisIndex),u=s.value,h=[];if(l&&null!=u){var c=DI(u,l.axis,d,s.seriesDataIndices,s.valueLabelOpt);E(s.seriesDataIndices,function(t){var e=d.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);if(n.axisDim=s.axisDim,n.axisIndex=s.axisIndex,n.axisType=s.axisType,n.axisId=s.axisId,n.axisValue=ug(l.axis,u),n.axisValueLabel=c,n){f.push(n);var o,a=e.formatTooltip(i,!0,null,p);if(z(a)){o=a.html;var r=a.markers;m(g,r)}else o=a;h.push(o)}});var t=c;"html"!==p?o.push(h.join(r)):o.push((t?au(t)+r:"")+h.join(r))}})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var s=e.position;this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,s,n[0],n[1],this._tooltipContent,f):this._showTooltipContent(a,o,f,Math.random(),n[0],n[1],s,void 0,g)})},_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(l),h=ID([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);f=z(g)?(d=g.html,g.markers):(d=g,null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),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){n={content:n,formatter:n}}var o=new Cl(n,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(i,t,n,e,o,a,r,s,l){if(this._ticket="",i.get("showContent")&&i.get("show")){var u=this._tooltipContent,h=i.get("formatter");r=r||i.get("position");var c=t;if(h&&"string"==typeof h)c=lu(h,n,!0);else if("function"==typeof h){var d=wD(function(t,e){t===this._ticket&&(u.setContent(e,l,i),this._updatePosition(i,r,o,a,u,n,s))},this);this._ticket=e,c=h(n,e,d)}u.setContent(c,l,i),u.show(i),this._updatePosition(i,r,o,a,u,n,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()})),L(e))i=SD(e[0],s),n=SD(e[1],l);else if(z(e)){e.width=u[0],e.height=u[1];var f=bu(e,{width:s,height:l});i=f.x,n=f.y,c=h=null}else if("string"==typeof e&&r){i=(p=function(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]}(e,d,u))[0],n=p[1]}else{var p;i=(p=function(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(n<t+l+a?t-=l+a:t+=a);null!=r&&(o<e+u+r?e-=u+r:e+=r);return[t,e]}(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]}h&&(i-=AD(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=AD(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")&&(i=(p=function(t,e,i,n,o){var a=i.getOuterSize(),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]}(i,n,o,s,l))[0],n=p[1]);o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(n){var t=this._lastDataByCoordSys,r=!!t&&t.length===n.length;return r&&bD(t,function(t,e){var i=t.dataByAxis||{},a=(n[e]||{}).dataByAxis||[];(r&=i.length===a.length)&&bD(i,function(t,e){var i=a[e]||{},n=t.seriesDataIndices||[],o=i.seriesDataIndices||[];(r&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&n.length===o.length)&&bD(n,function(t,e){var i=o[e];r&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=n,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){v.node||(this._tooltipContent.dispose(),mI("itemTooltip",e))}}),_f({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),_f({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var DD=["rect","polygon","keep","clear"];var CD=E;function LD(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function kD(t,e,a){var i={};return CD(e,function(n){var o=i[n]=function(){function t(){}return t.prototype.__hidden=t.prototype,new t}();CD(t[n],function(t,e){if(g_.isValidType(e)){var i={type:e,visual:t};a&&a(i,n),o[e]=new g_(i),"opacity"===e&&((i=k(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new g_(i))}})}),i}function PD(e,i,t){var n;E(t,function(t){i.hasOwnProperty(t)&&LD(i[t])&&(n=!0)}),n&&E(t,function(t){i.hasOwnProperty(t)&&LD(i[t])?e[t]=k(i[t]):delete e[t]})}var ND={lineX:OD(0),lineY:OD(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])&&Tg(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!!(Tg(n,o,a)||Tg(n,o+r,a)||Tg(n,o,a+s)||Tg(n,o+r,a+s)||Di.create(t).contain(l[0],l[1])||xl(o,a,o+r,a,n)||xl(o,a,o,a+s,n)||xl(o+r,a,o+r,a+s,n)||xl(o,a+s,o+r,a+s,n))||void 0}}};function OD(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,i){if(t){var n=i.range;return ED(t[a],n)}},rect:function(t,e,i){if(t){var n=i.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]<o[0]&&o.reverse(),ED(o[0],n)||ED(o[1],n)||ED(n[0],o)||ED(n[1],o)}}}}function ED(t,e){return e[0]<=t&&t<=e[1]}var RD=["inBrush","outOfBrush"],zD="__ecBrushSelect",BD="__ecInBrushSelectEvent",VD=Ld.VISUAL.BRUSH;function GD(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new DA(t.option,e)).setInputRanges(t.areas,e)})}function FD(t,e){if(!t.isDisposed()){var i=t.getZr();i[BD]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[BD]=!1}}function WD(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 HD(t){var r=t.brushSelector;if(R(r)){var e=[];return E(ND,function(a,t){e[t]=function(t,e,i,n){var o=e.getItemLayout(t);return a[r](o,i,n)}}),e}if(C(r)){var i={};return E(ND,function(t,e){i[e]=r}),i}return r}bf(VD,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),GD(t)}),Sf(VD,function(p,t,e){var o,g,m=[];p.eachComponent({mainType:"brush"},function(a,t){var s={brushId:a.id,brushIndex:t,brushName:a.name,areas:k(a.areas),selected:[]};m.push(s);var e=a.option,i=e.brushLink,n=[],l=[],u=[],h=0;t||(o=e.throttleType,g=e.throttleDelay);var r=O(a.areas,function(t){return function(i){var n=i.selectors={};return E(ND[i.brushType],function(e,t){n[t]=function(t){return e(t,n,i)}}),i}(D({boundingRect:ZD[t.brushType](t)},t))}),c=kD(a.option,RD,function(t){t.mappingMethod="fixed"});function d(t){return"all"===i||n[t]}function f(t){return!!t.length}L(i)&&E(i,function(t){n[t]=1}),p.eachSeries(function(t,e){var i=u[e]=[];"parallel"===t.subType?function(t,e){var i=t.coordinateSystem;h|=i.hasAxisBrushed(),d(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(l[e]=1)})}(t,e):function(e,t,i){var n=HD(e);if(!n||function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(L(i)?_(i,e)<0:e!==i)}(a,t))return;if(E(r,function(t){n[t.brushType]&&a.brushTargetManager.controlSeries(t,e,p)&&i.push(t),h|=f(i)}),d(t)&&f(i)){var o=e.getData();o.each(function(t){WD(n,i,o,t)&&(l[t]=1)})}}(t,e,i)}),p.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};s.selected.push(i);var n=HD(t),o=u[e],a=t.getData(),r=d(e)?function(t){return l[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return WD(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(d(e)?h:f(o))&&function(t,u,h,c,d,f){var p,g={};function m(t){return h.getItemVisual(p,t)}function v(t,e){h.setItemVisual(p,t,e)}function e(t,e){p=null==f?t:e;var i=h.getRawDataItem(p);if(!i||!1!==i.visualMap)for(var n=c.call(d,t),o=u[n],a=g[n],r=0,s=a.length;r<s;r++){var l=a[r];o[l]&&o[l].applyVisual(t,m,v)}}E(t,function(t){var e=g_.prepareVisualTypes(u[t]);g[t]=e}),null==f?h.each(e):h.each([f],e)}(RD,c,a,r)})}),function(t,e,i,n,o){if(!o)return;var a=t.getZr();if(a[BD])return;a[zD]||(a[zD]=FD);kc(a,zD,i,e)(t,n)}(t,o,g,m,e)});var ZD={lineX:et,lineY:et,rect:function(t){return UD(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&&UD(e)}};function UD(t){return new Di(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var XD=["#ddd"];Tf({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||PD(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:XD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=O(t,function(t){return YD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=YD(this.option,t),this.brushType=this.brushOption.brushType}});function YD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function jD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Af({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Ib(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,jD.apply(this,arguments)},updateTransform:function(t,e){return GD(e),jD.apply(this,arguments)},updateView:jD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:k(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:k(t),$from:i})}}),_f({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),_f({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),_f({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var qD=Oc.toolbox.brush;function KD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}KD.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:k(qD.title)};var $D=KD.prototype;$D.render=$D.updateView=function(e,t,i){var n,o,a;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},$D.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},$D.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}})},nA("brush",KD),yf(function(t,e){var i=t&&t.brush;if(L(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;L(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),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,DD)}}),Tf({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"}}}),Af({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=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ur({style:nl({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ur({style:nl({},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"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){gu(d,"_"+t.get("target"))}),f&&c.on("click",function(){gu(d,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=bu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new rs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function JD(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};E(n,function(t,e){a[e]||QD(o,e)||(o[e]=t)}),i.label&&!QD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function QD(t,e){return t.hasOwnProperty(e)}ku.registerSubTypeDefaulter("timeline",function(){return"slider"}),_f({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"),D({currentIndex:i.option.currentIndex},t)}),_f({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var tC=ku.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){tC.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];E(e,function(t,e){var i,n=Wo(t);z(t)?(i=k(t)).value=e:i=e,a.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Yf([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(tC.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:[]}}),Xh);function eC(t,e,i,n){Gg.call(this,t,e,i),this.type=n||"value",this.model=null}var iC=gc.extend({type:"timeline"});eC.prototype={constructor:eC,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(eC,Gg);var nC=A,oC=E,aC=Math.PI;function rC(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=wg(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=Rl(u[0],l[0]),h[1]+=Rl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function sC(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)))}}iC.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e);e.formatTooltip=function(t){return au(s.scale.getLabel(t))},oC(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(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,r,s,l,u={horizontal:"center",vertical:0<=i||"+"===i?"left":"right"},h={horizontal:0<=i||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:aC/2},d="vertical"===n?o.height:o.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get("label.rotate")||0;y=y*aC/180;var x=f.get("position",!0),_=p&&f.get("showPlayBtn",!0),w=p&&f.get("showPrevBtn",!0),b=p&&f.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(a=[0,0],S+=v),w&&(r=[S,0],S+=v)):(_&&(a=[M-g,0],M-=v),w&&(r=[0,0],S+=v)),b&&(s=[M-g,0],M-=v),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:o,mainLength:d,orient:n,rotation:c[n],labelRotation:y,labelPosOpt:i,labelAlign:t.get("label.align")||u[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||h[n],playPosition:a,prevBtnPosition:r,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var a=ae(),r=o.x,s=o.y+o.height;ue(a,a,[-r,-s]),he(a,a,-aC/2),ue(a,a,[r,s]),(o=o.clone()).applyTransform(a)}var l=m(o),u=m(i.getBoundingRect()),h=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var f,p=t.labelPosOpt;isNaN(p)?(v(c,u,l,1,f="+"===p?0:1),v(d,h,l,1,1-f)):(v(c,u,l,1,f=0<=p?0:1),d[1]=c[1]+p);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=sg(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 eC("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new Ci;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new ls({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:P({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var h=u.getData(),e=l.scale.getTicks();oC(e,function(t){var e=l.dataToCoord(t),i=h.getItemModel(t),n=i.getModel("itemStyle"),o=i.getModel("emphasis.itemStyle"),a={position:[e,0],onclick:nC(this._changeTimeline,this,t)},r=rC(i,n,s,a);$s(r,o.getItemStyle()),i.get("tooltip")?(r.dataIndex=t,r.dataModel=u):r.dataIndex=r.dataModel=null},this)},_renderAxisLabel:function(s,l,u,t){if(u.getLabelModel().get("show")){var h=t.getData(),e=u.getViewLabels();oC(e,function(t){var e=t.tickValue,i=h.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=u.dataToCoord(t.tickValue),r=new Ur({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:nC(this._changeTimeline,this,e),silent:!1});nl(r.style,n,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),$s(r,nl({},o))},this)}},_renderControl:function(t,a,e,r){var s=t.controlSize,l=t.rotation,u=r.getModel("controlStyle").getItemStyle(),h=r.getModel("emphasis.controlStyle").getItemStyle(),c=[0,-s/2,s,s],i=r.getPlayState(),n=r.get("inverse",!0);function o(t,e,i,n){if(t){var o=function(t,e,i,n){return Ps(t.get(e).replace(/^path:\/\//,""),k(n||{}),new Di(i[0],i[1],i[2],i[3]),"center")}(r,e,c,{position:t,origin:[s/2,0],rotation:n?-l:0,rectHover:!0,style:u,onclick:i});a.add(o),$s(o,h)}}o(t.nextBtnPosition,"controlStyle.nextIcon",nC(this._changeTimeline,this,n?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",nC(this._changeTimeline,this,n?"+":"-")),o(t.playPosition,"controlStyle."+(i?"stopIcon":"playIcon"),nC(this._handlePlayClick,this,!i),!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=nC(s._handlePointerDrag,s),t.ondragend=nC(s._handlePointerDragend,s),sC(t,a,i,n,!0)},onUpdate:function(t){sC(t,a,i,n)}};this._currentPointer=rC(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=Bl(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(nC(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return pl(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(o){var a,t=this.model.getData(),r=1/0,s=this._axis;return t.each(["value"],function(t,e){var i=s.dataToCoord(t),n=Math.abs(i-o);n<r&&(r=n,a=e)}),a},_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})}}),yf(function(t){var e=t&&t.timeline;L(e)||(e=e?[e]:[]),E(e,function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(JD(t),QD(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});QD(n,"position")||(n.position=t.controlPosition),"none"!==n.position||QD(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}E(t.data||[],function(t){z(t)&&!L(t)&&(!QD(t,"value")&&QD(t,"name")&&(t.value=t.name),JD(t))})}(t)})});var lC=tu,uC=au;function hC(t){Go(t,"label",["show"])}var cC=Tf({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,n,e,o){var a=this.constructor,r=this.mainType+"Model";e||n.eachSeries(function(t){var e=t.get(this.mainType,!0),i=t[r];e&&e.data?(i?i._mergeOption(e,n,!0):(o&&hC(e),E(e.data,function(t){t instanceof Array?(hC(t[0]),hC(t[1])):hC(t)}),P(i=new a(e,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),i.__hostSeries=t),t[r]=i):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=L(i)?O(i,lC).join(", "):lC(i),o=e.getName(t),a=uC(this.name);return null==i&&!o||(a+="<br />"),o&&(a+=uC(o),null!=i&&(a+=" : ")),null!=i&&(a+=uC(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(cC,Xh),cC.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 dC=_;function fC(t,e,i,n,o,a){var r=[],s=fp(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=_C(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(s,u);var h=e.get(n,u),c=Vl(e.get(n,u));return 0<=(c=Math.min(c,20))&&(r[a]=+r[a].toFixed(c)),[r,h]}var pC=T,gC={min:pC(fC,"min"),max:pC(fC,"max"),average:pC(fC,"average")};function mC(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!L(e.coord)&&n){var o=n.dimensions,a=vC(e,i,n,t);if((e=k(e)).type&&gC[e.type]&&a.baseAxis&&a.valueAxis){var r=dC(o,a.baseAxis.dim),s=dC(o,a.valueAxis.dim),l=gC[e.type](i,a.baseDataDim,a.valueDataDim,r,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)gC[u[h]]&&(u[h]=_C(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function vC(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(function(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}}(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 yC(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)}function xC(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function _C(t,e,i){if("average"!==i)return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0];var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)}),n/o}var wC=Af({type:"marker",init:function(){this.markerGroupMap=Q()},render:function(t,i,n){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";i.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,i,n)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});function bC(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,i=s.getItemModel(t),n=Rl(i.get("x"),u.getWidth()),o=Rl(i.get("y"),u.getHeight());if(isNaN(n)||isNaN(o)){if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(h){var a=s.get(h.dimensions[0],t),r=s.get(h.dimensions[1],t);e=h.dataToPoint([a,r])}}else e=[n,o];isNaN(n)||(e[0]=n),isNaN(o)||(e[1]=o),s.setItemLayout(t,e)})}wC.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(bC(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,l,e,i){var n=t.coordinateSystem,o=t.id,u=t.getData(),a=this.markerGroupMap,r=a.get(o)||a.set(o,new im),h=function(t,e,i){var n;n=t?O(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Yf(n,i),a=O(i.get("data"),T(mC,e));t&&(a=M(a,T(yC,t)));return o.initData(a,null,t?xC:function(t){return t.value}),o}(n,t,l);l.setData(h),bC(l.getData(),t,i),h.each(function(t){var e=h.getItemModel(t),i=e.getShallow("symbol"),n=e.getShallow("symbolSize"),o=C(i),a=C(n);if(o||a){var r=l.getRawValue(t),s=l.getDataParams(t);o&&(i=i(r,s)),a&&(n=n(r,s))}h.setItemVisual(t,{symbol:i,symbolSize:n,color:e.get("itemStyle.color")||u.getVisual("color")})}),r.updateData(h),this.group.add(r.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=l})}),r.__keep=!0,r.group.silent=l.get("silent")||t.get("silent")}}),yf(function(t){t.markPoint=t.markPoint||{}}),cC.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function SC(t,e,i,n){var o=t.getData(),a=n.type;if(!L(n)&&("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=e.getAxis(null!=n.yAxis?"y":"x"),s=W(n.yAxis,n.xAxis);else{var l=vC(n,o,e,t);r=l.valueAxis,s=_C(o,pp(o,l.valueDataDim),a)}var u="x"===r.dim?0:1,h=1-u,c=k(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[h]=-1/0,d.coord[h]=1/0;var f=i.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),c.coord[u]=d.coord[u]=s,n=[c,d,{type:a,valueIndex:n.valueIndex,value:s}]}return(n=[mC(t,n[0]),mC(t,n[1]),P({},n[2])])[2].type=n[2].type||"",m(n[2],n[0]),m(n[2],n[1]),n}function MC(t){return!isNaN(t)&&!isFinite(t)}function IC(t,e,i,n){var o=1-t,a=n.dimensions[t];return MC(e[o])&&MC(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function TC(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(IC(1,i,n,t)||IC(0,i,n,t)))return!0}return yC(t,e[0])&&yC(t,e[1])}function AC(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Rl(s.get("x"),o.getWidth()),u=Rl(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;MC(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):MC(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)}wC.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var t=e.markLineModel;if(t){var i=t.getData(),n=t.__from,o=t.__to;n.each(function(t){AC(n,t,!0,e,a),AC(o,t,!1,e,a)}),i.each(function(t){i.setItemLayout(t,[n.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(o,i,t,a){var e=o.coordinateSystem,n=o.id,r=o.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new pw);this.group.add(l.group);var u=function(t,e,i){var n;n=t?O(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Yf(n,i),a=new Yf(n,i),r=new Yf([],i),s=O(i.get("data"),T(SC,e,t,i));t&&(s=M(s,T(TC,t)));var l=t?xC:function(t){return t.value};return o.initData(O(s,function(t){return t[0]}),null,l),a.initData(O(s,function(t){return t[1]}),null,l),r.initData(O(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(e,o,i),h=u.from,c=u.to,d=u.line;i.__from=h,i.__to=c,i.setData(d);var f=i.get("symbol"),p=i.get("symbolSize");function g(t,e,i){var n=t.getItemModel(e);AC(t,e,i,o,a),t.setItemVisual(e,{symbolSize:n.get("symbolSize")||p[i?0:1],symbol:n.get("symbol",!0)||f[i?0:1],color:n.get("itemStyle.color")||r.getVisual("color")})}L(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){g(h,t,!0),g(c,t,!1)}),d.each(function(t){var e=d.getItemModel(t).get("lineStyle.color");d.setItemVisual(t,{color:e||h.getItemVisual(t,"color")}),d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})}),l.updateData(d),u.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=i})}),l.__keep=!0,l.group.silent=i.get("silent")||o.get("silent")}}),yf(function(t){t.markLine=t.markLine||{}}),cC.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"}}}});function DC(t,e,i,n){var o=mC(t,n[0]),a=mC(t,n[1]),r=W,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=p([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}function CC(t){return!isNaN(t)&&!isFinite(t)}function LC(t,e,i){var n=1-t;return CC(e[n])&&CC(i[n])}function kC(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!LC(1,i,n)&&!LC(0,i,n))||(yC(t,{coord:i,x:e.x0,y:e.y0})||yC(t,{coord:n,x:e.x1,y:e.y1}))}function PC(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Rl(s.get(i[0]),o.getWidth()),u=Rl(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);CC(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):CC(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}var NC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];wC.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(i){var t=i.markAreaModel;if(t){var n=t.getData();n.each(function(e){var t=O(NC,function(t){return PC(n,e,t,i,o)});n.setItemLayout(e,t),n.getItemGraphicEl(e).setShape("points",t)})}},this)},renderSeries:function(i,r,t,n){var e=i.coordinateSystem,o=i.id,a=i.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Ci});this.group.add(l.group),l.__keep=!0;var u=function(t,i,e){var n,o;o=t?(n=O(t&&t.dimensions,function(t){var e=i.getData();return D({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Yf(O(["x0","y0","x1","y1"],function(t,e){return{name:t,type:n[e%2].type}}),e)):new Yf(n=[{name:"value",type:"float"}],e);var a=O(e.get("data"),T(DC,i,t,e));t&&(a=M(a,T(kC,t)));var r=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,i,r);r.setData(u),u.each(function(e){u.setItemLayout(e,O(NC,function(t){return PC(u,e,t,i,n)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new Qr({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var i=l.__data.getItemGraphicEl(e);cl(i,{shape:{points:u.getItemLayout(t)}},r,t),l.group.add(i),u.setItemGraphicEl(t,i)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=u.getItemVisual(e,"color");t.useStyle(D(i.getModel("itemStyle").getItemStyle(),{fill:Ke(a,.4),stroke:a})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),el(t.style,t.hoverStyle,n,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),$s(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||i.get("silent")}}),yf(function(t){t.markArea=t.markArea||{}});var OC=Oc.legend.selector,EC={all:{type:"all",title:k(OC.all)},inverse:{type:"inverse",title:k(OC.inverse)}},RC=Tf({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){RC.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var i=t.selector;!0===i&&(i=t.selector=["all","inverse"]),L(i)&&E(i,function(t,e){R(t)&&(t={type:t}),i[e]=m(t,EC[t.type])})},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(o){var a=[],r=[];o.eachRawSeries(function(t){var e,i=t.name;if(r.push(i),t.legendVisualProvider){var n=t.legendVisualProvider.getAllNames();o.isSeriesFiltered(t)||(r=r.concat(n)),n.length?a=a.concat(n):e=!0}else e=!0;e&&Uo(t)&&a.push(t.name)}),this._availableNames=r;var t=O(this.get("data")||a,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Cl(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&E(this._data,function(t){e[t.get("name")]=!1});e[t]=!0},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)},allSelect:function(){var t=this._data,e=this.option.selected;E(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,i=this.option.selected;E(t,function(t){var e=t.get("name",!0);i.hasOwnProperty(e)||(i[e]=!0),i[e]=!i[e]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=_(this._availableNames,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});function zC(t,e,i){var o,a={},r="toggleSelected"===t;return i.eachComponent("legend",function(n){r&&null!=o?n[o?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),o=n.isSelected(e.name)),E(n.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&i:a[e]=i}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}_f("legendToggleSelect","legendselectchanged",T(zC,"toggleSelected")),_f("legendAllSelect","legendselectall",T(zC,"allSelect")),_f("legendInverseSelect","legendinverseselect",T(zC,"inverseSelect")),_f("legendSelect","legendselected",T(zC,"select")),_f("legendUnSelect","legendunselected",T(zC,"unSelect"));var BC=T,VC=E,GC=Ci,FC=Af({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new GC),this._backgroundEl,this.group.add(this._selectorGroup=new GC),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),a=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===a?"right":"left");var r=t.get("selector",!0),s=t.get("selectorPosition",!0);!r||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(o,t,e,i,r,a,s);var l=t.getBoxLayoutParams(),u={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),c=bu(l,u,h),d=this.layoutInner(t,o,c,n,r,s),f=bu(D({width:d.width,height:d.height},l),u,h);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=rA(d,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(u,h,c,d,t,e,i){var f=this.getContentGroup(),p=Q(),g=h.get("selectedMode"),m=[];c.eachRawSeries(function(t){t.get("legendHoverLink")||m.push(t.id)}),VC(h.getData(),function(a,r){var s=a.get("name");if(this.newlineDisabled||""!==s&&"\n"!==s){var t=c.getSeriesByName(s)[0];if(!p.get(s))if(t){var e=t.getData(),i=e.getVisual("color"),n=e.getVisual("borderColor");"function"==typeof i&&(i=i(t.getDataParams(0))),"function"==typeof n&&(n=n(t.getDataParams(0)));var o=e.getVisual("legendSymbol")||"roundRect",l=e.getVisual("symbol");this._createItem(s,r,a,h,o,l,u,i,n,g).on("click",BC(HC,s,null,d,m)).on("mouseover",BC(ZC,t.name,null,d,m)).on("mouseout",BC(UC,t.name,null,d,m)),p.set(s,!0)}else c.eachRawSeries(function(t){if(!p.get(s)&&t.legendVisualProvider){var e=t.legendVisualProvider;if(!e.containName(s))return;var i=e.indexOfName(s),n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,"borderColor");this._createItem(s,r,a,h,"roundRect",null,u,n,o,g).on("click",BC(HC,null,s,d,m)).on("mouseover",BC(ZC,null,s,d,m)).on("mouseout",BC(UC,null,s,d,m)),p.set(s,!0)}},this)}else f.add(new GC({newline:!0}))},this),t&&this._createSelector(t,h,d,e,i)},_createSelector:function(t,a,r,e,i){var s=this.getSelectorGroup();VC(t,function(t){!function(t){var e=t.type,i=new Ur({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});s.add(i);var n=a.getModel("selectorLabel"),o=a.getModel("emphasis.selectorLabel");el(i.style,i.hoverStyle={},n,o,{defaultText:t.title,isRectText:!1}),$s(i)}(t)})},_createItem:function(t,e,i,n,o,a,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("inactiveBorderColor"),p=n.get("symbolKeepAspect"),g=n.getModel("itemStyle"),m=n.isSelected(t),v=new GC,y=i.getModel("textStyle"),x=i.get("icon"),_=i.getModel("tooltip"),w=_.parentModel,b=wg(o=x||o,0,0,h,c,m?s:d,null==p||p);if(v.add(WC(b,o,g,l,f,m)),!x&&a&&(a!==o||"none"===a)){var S=.8*c;"none"===a&&(a="circle");var M=wg(a,(h-S)/2,(c-S)/2,S,S,m?s:d,null==p||p);v.add(WC(M,a,g,l,f,m))}var I="left"===r?h+5:-5,T=r,A=n.get("formatter"),D=t;"string"==typeof A&&A?D=A.replace("{name}",null!=t?t:""):"function"==typeof A&&(D=A(t)),v.add(new Ur({style:nl({},y,{text:D,x:I,y:c/2,textFill:m?y.getTextColor():d,textAlign:T,textVerticalAlign:"middle"})}));var C=new rs({shape:v.getBoundingRect(),invisible:!0,tooltip:_.get("show")?P({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},_.option):null});return v.add(C),v.eachChild(function(t){t.silent=!0}),C.silent=!u,this.getContentGroup().add(v),$s(v),v.__legendDataIndex=e,v},layoutInner:function(t,e,i,n,o,a){var r=this.getContentGroup(),s=this.getSelectorGroup();wu(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(o){wu("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function WC(t,e,i,n,o,a){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,a||(r.stroke=o)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function HC(t,e,i,n){UC(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),ZC(t,e,i,n)}function ZC(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function UC(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}xf(Ld.PROCESSOR.SERIES_FILTER,function(t){var i=t.findComponents({mainType:"legend"});i&&i.length&&t.filterSeries(function(t){for(var e=0;e<i.length;e++)if(!i[e].isSelected(t.name))return!1;return!0})}),ku.registerSubTypeDefaulter("legend",function(){return"plain"});var XC=RC.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=Iu(t);XC.superCall(this,"init",t,e,i,n),YC(this,t,o)},mergeOption:function(t,e){XC.superCall(this,"mergeOption",t,e),YC(this,this.option,t)}});function YC(t,e,i){var n=[1,1];n[t.getOrient().index]=0,Mu(e,i,{type:"box",ignoreSize:n})}var jC=Ci,qC=["width","height"],KC=["x","y"],$C=FC.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){$C.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new jC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new jC),this._showController},resetInner:function(){$C.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a,i,n,r){var s=this;$C.superCall(this,"renderInner",t,o,e,a,i,n,r);var l=this._controllerGroup,u=o.get("pageIconSize",!0);L(u)||(u=[u,u]),c("pagePrev",0);var h=o.getModel("pageTextStyle");function c(t,e){var i=t+"DataIndex",n=yl(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:A(s._pageGo,s,i,o,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});n.name=t,l.add(n)}l.add(new Ur({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(t,e,i,n,o,a){var r=this.getSelectorGroup(),s=t.getOrient().index,l=qC[s],u=KC[s],h=qC[1-s],c=KC[1-s];o&&wu("horizontal",r,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),f=r.getBoundingRect(),p=[-f.x,-f.y],g=k(i);o&&(g[l]=i[l]-f[l]-d);var m=this._layoutContentAndController(t,n,g,s,l,h,c);if(o){if("end"===a)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[c]+m[h]/2-f[h]/2,m[h]=Math.max(m[h],f[h]),m[c]=Math.min(m[c],f[c]+p[1-s]),r.attr("position",p)}return m},_layoutContentAndController:function(t,e,i,n,o,a,r){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;wu(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),wu("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[o]>i[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m);g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new rs({shape:y})),l.__rectSize=y[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&cl(s,{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(n,o){var a=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=o.pageIndex,r=null!=i?i+1:0,s=o.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=qC[o],r=KC[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(t){if(t){var e=t.getBoundingRect(),i=e[r]+t.position[o];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a):0;var o,a}});_f("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});iD.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var JC=rs,QC=El,tL=Bl,eL=A,iL=E,nL="horizontal",oL="vertical",aL=["line","bar","candlestick","scatter"],rL=aD.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){rL.superApply(this,"render",arguments),kc(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(){rL.superApply(this,"remove",arguments),Pc(this,"_dispatchZoomAction")},dispose:function(){rL.superApply(this,"dispose",arguments),Pc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ci;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===nL?{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=Iu(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=bu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===oL&&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!==nL||o?i===nL&&o?{scale:r?[-1,1]:[-1,-1]}:i!==oL||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 JC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new JC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(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),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0<p&&e%p)f+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:QC(t,a,l,!0);i&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(h.push([f,0]),c.push([f,0])),h.push([f,n]),c.push([f,n]),f+=d,s=i}});var g=this.dataZoomModel;this._displayables.barGroup.add(new Qr({shape:{points:h},style:D({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ts({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(a,r){E(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){if(!(l||!0!==s&&_(aL,t.get("type"))<0)){var e,i=u.getComponent(a.axis,r).axis,n=function(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}(a.name),o=t.coordinateSystem;null!=n&&o.getOtherAxis&&(e=o.getOtherAxis(i).inverse),n=t.getData().mapDimension(n),l={thisAxis:i,series:t,thisDim:a.name,otherDim:n,otherAxisInverse:e}}},this)},this),l}},_renderHandle:function(){var t=this._displayables,a=t.handles=[],r=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new JC({draggable:!0,cursor:sL(this._orient),drift:eL(this._onDragMove,this,"all"),ondragstart:eL(this._showDataInfo,this,!0),ondragend:eL(this._onDragEnd,this),onmouseover:eL(this._showDataInfo,this,!0),onmouseout:eL(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new JC({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),iL([0,1],function(t){var e=yl(l.get("handleIcon"),{cursor:sL(this._orient),draggable:!0,drift:eL(this._onDragMove,this,t),ondragend:eL(this._onDragEnd,this),onmouseover:eL(this._showDataInfo,this,!0),onmouseout:eL(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),i=e.getBoundingRect();this._handleHeight=Rl(l.get("handleSize"),this._size[1]),this._handleWidth=i.width/i.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var n=l.get("handleColor");null!=n&&(e.style.fill=n),s.add(a[t]=e);var o=l.textStyleModel;this.group.add(r[t]=new Ur({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:o.getTextColor(),textFont:o.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[QC(t[0],[0,100],e,!0),QC(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];Jw(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?QC(a.minSpan,r,o,!0):null,null!=a.maxSpan?QC(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=tL([QC(n[0],o,r,!0),QC(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var n=this._displayables,o=this._handleEnds,e=tL(o.slice()),a=this._size;iL([0,1],function(t){var e=n.handles[t],i=this._handleHeight;e.attr({scale:[i/2,i/2],position:[o[t],a[1]/2-i/2]})},this),n.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,a=this._displayables,r=a.handleLabels,s=this._orient,l=["",""];if(e.get("showDetail")){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getAxisModel().axis,o=this._range,u=t?i.calculateDataWindow({start:o[0],end:o[1]}).valueWindow:i.getDataValueWindow();l=[this._formatLabel(u[0],n),this._formatLabel(u[1],n)]}}var h=tL(this._handleEnds.slice());function c(t){var e=fl(a.handles[t].parent,this.group),i=gl(0===t?"right":"left",e),n=this._handleWidth/2+5,o=pl([h[t]+(0===t?-n:n),this._size[1]/2],e);r[t].setStyle({x:o[0],y:o[1],textVerticalAlign:s===nL?"middle":i,textAlign:s===nL?i:"center",text:l[t]})}c.call(this,0),c.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 C(n)?n(t,a):R(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,n){this._dragging=!0,Xt(n.event);var o=pl([e,i],this._displayables.barGroup.getLocalTransform(),!0),a=this._updateInterval(t,o[0]),r=this.dataZoomModel.get("realtime");this._updateView(!r),a&&r&&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 i;if(iL(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function sL(t){return"vertical"===t?"ns-resize":"ew-resize"}iD.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var lL="\0_ec_dataZoom_roams";function uL(t,n){var e=cL(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),dL(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Vy(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T(fL,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]<o["type_"+i]&&(n=i),a&=e.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}(i.dataZoomInfos);i.controller.enable(r.controlType,r.opt),i.controller.setPointerChecker(n.containsPoint),kc(i,"dispatchAction",n.dataZoomModel.get("throttle",!0),"fixRate")}function hL(t){return t.type+"\0_"+t.id}function cL(t){var e=t.getZr();return e[lL]||(e[lL]={})}function dL(i){E(i,function(t,e){t.count||(t.controller.dispose(),delete i[e])})}function fL(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var pL=A,gL=aD.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(r,t,s,e){gL.superApply(this,"render",arguments),this._range=r.getPercentRange(),E(this.getTargetCoordInfo(),function(t,o){var a=O(t,function(t){return hL(t.model)});E(t,function(e){var n=e.model,i={};E(["pan","zoom","scrollMove"],function(t){i[t]=pL(mL[t],this,e,o)},this),uL(s,{coordId:hL(n),allCoordIds:a,containsPoint:function(t,e,i){return n.coordinateSystem.containPoint([e,i])},dataZoomId:r.id,dataZoomModel:r,getRange:i})},this)},this)},dispose:function(){!function(t,i){var e=cL(t);E(e,function(t){t.controller.dispose();var e=t.dataZoomInfos;e[i]&&(delete e[i],t.count--)}),dL(e)}(this.api,this.dataZoomModel.id),gL.superApply(this,"dispose",arguments),this._range=null}}),mL={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=xL[e](null,[n.originX,n.originY],r,i,t),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Jw(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:vL(function(t,e,i,n,o,a){var r=xL[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:vL(function(t,e,i,n,o,a){return xL[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})};function vL(l){return function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=l(a,r,t,e,i,n);return Jw(s,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function yL(t){var e=t&&t.visualMap;L(e)||(e=e?[e]:[]),_L(e,function(t){if(t){wL(t,"splitList")&&!wL(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&L(e)&&_L(e,function(t){z(t)&&(wL(t,"start")&&!wL(t,"min")&&(t.min=t.start),wL(t,"end")&&!wL(t,"max")&&(t.max=t.end))})}})}var xL={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}},_L=E;function wL(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}ku.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var bL=Ld.VISUAL.COMPONENT;function SL(t,e,i,n){for(var o=e.targetVisuals[n],a=g_.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,c,d)}return r.color;function c(t){return r[t]}function d(t,e){r[t]=e}}Sf(bL,{createOnAllSeries:!0,reset:function(i,t){var n=[];return t.eachComponent("visualMap",function(t){var e=i.pipelineContext;!t.isTargetSeries(i)||e&&e.large||n.push(function(t,f,p,g){var m={};return E(t,function(t){var e=g_.prepareVisualTypes(f[t]);m[t]=e}),{progress:function(t,i){function e(t){return i.getItemVisual(o,t)}function n(t,e){i.setItemVisual(o,t,e)}var o;for(null!=g&&(g=i.getDimension(g));null!=(o=t.next());){var a=i.getRawDataItem(o);if(!a||!1!==a.visualMap)for(var r=null!=g?i.get(g,o,!0):o,s=p(r),l=f[s],u=m[s],h=0,c=u.length;h<c;h++){var d=u[h];l[d]&&l[d].applyVisual(r,e,n)}}}}}(t.stateList,t.targetVisuals,A(t.getValueState,t),t.getDataDimension(i.getData())))}),n}}),Sf(bL,{createOnAllSeries:!0,reset:function(o,t){var a=o.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(o)){var e=t.getVisualMeta(A(SL,null,o,t))||{stops:[],outerColors:[]},i=t.getDataDimension(a),n=a.getDimensionInfo(i);null!=n&&(e.dimension=n.index,r.push(e))}}),o.getData().setVisual("visualMeta",r)}});var ML=function(t,e,i){var n=k((IL[t]||{})[e]);return i&&L(n)?n[n.length-1]:n},IL={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]}},TL=g_.mapVisual,AL=g_.eachVisual,DL=L,CL=E,LL=Bl,kL=El,PL=Tf({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;v.canvasSupported||(i.realtime=!1),e||PD(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=A(t,this),this.controllerVisuals=kD(this.option.controller,e,t),this.targetVisuals=kD(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,i=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){i.push(e)}):i=Vo(t),i},eachTargetSeries:function(e,i){E(this.getTargetSeriesIndices(),function(t){e.call(i,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var i=!1;return this.eachTargetSeries(function(t){t===e&&(i=!0)}),i},formatValueText:function(t,e,i){var n,o,a=this.option,r=a.precision,s=this.dataBound,l=a.formatter;return i=i||["<",">"],L(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):C(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=LL([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;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){DL(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},CL(this.stateList,function(t){var e=n[t];if(R(e)){var i=ML(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},CL(n,function(t,e){if(g_.isValidType(e)){var i=ML(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");CL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&k(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&k(s)||(u?e[0]:[e[0],e[0]])),i.symbol=TL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;AL(n,function(t){o<t&&(o=t)}),i.symbolSize=TL(n,function(t){return kL(t,[0,o],[0,e[0]],!0)})}},this)}.call(this,o)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:et,getValueState:et,getVisualMeta:et}),NL=[20,140],OL=PL.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){OL.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){OL.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=NL[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=NL[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):L(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(){PL.prototype.completeVisualOption.apply(this,arguments),E(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=Bl((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(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=EL(this,"outOfRange",this.getExtent()),e=EL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;r<l&&(!e.length||t[r]<=e[0]);r++)t[r]<e[a]&&o(t[r],"outOfRange");for(var u=1;a<s;a++,u=0)u&&n.length&&o(e[a],"outOfRange"),o(e[a],"inRange");for(u=1;r<l;r++)(!e.length||e[e.length-1]<t[r])&&(u&&(n.length&&o(n[n.length-1].value,"outOfRange"),u=0),o(t[r],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}}});function EL(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}var RL=Af({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){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=iu(e.get("padding")||0),n=t.getBoundingRect();t.add(new rs({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(i,n,o){var t=(o=o||{}).forceState,e=this.visualMapModel,a={};if("symbol"===n&&(a.symbol=e.get("itemSymbol")),"color"===n){var r=e.get("contentColor");a.color=r}function s(t){return a[t]}function l(t,e){a[t]=e}var u=e.controllerVisuals[t||e.getValueState(i)];return E(g_.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),g_.dependsOn(t,n)&&e&&e.applyVisual(i,s,l)}),a[n]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;Su(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:et});function zL(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=bu(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 BL(t,e){return E(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var VL=El,GL=E,FL=Math.min,WL=Math.max,HL=RL.extend({type:"visualMap.continuous",init:function(){HL.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 Ur({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=zL(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=ZL()),s.add(i.inRange=ZL(null,a?XL(this._orient):null,A(this._dragHandle,this,"all",!1),A(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("閸ワ拷"),u=WL(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=A(this._dragHandle,this,e,!1),r=A(this._dragHandle,this,e,!0),s=ZL(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(e,n),XL(this._orient),a,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new Ur({draggable:!0,drift:a,onmousemove:function(t){Xt(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=ZL([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new Ur({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:9,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():UL(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=[VL(e[0],i,n,!0),VL(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Jw(e,n,o,t,0);var a=i.getExtent();this._dataInterval=[VL(n[0],o,a,!0),VL(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 gs(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 Ci("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;GL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=pl(a.handleLabelPoints[t],fl(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=VL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-FL(e,WL(i,0))],[6,0],[0,FL(e,WL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=pl(u.indicatorLabelPoint,fl(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=FL(WL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=FL(WL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=VL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=VL(t,o,a,!0),u=[VL(s[0],o,a,!0),VL(s[1],o,a,!0)];s[0]<o[0]&&(u[0]=-1/0),o[1]<s[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||UL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=Vo(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 a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var o=a(t[n],!0);o.length&&i.push({seriesId:n,dataIndex:o})}return i}}(h,c);this._dispatchHighDown("downplay",BL(d[0],i)),this._dispatchHighDown("highlight",BL(d[1],i))}},_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",BL(t,this.visualMapModel)),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=fl(e,n?null:this.group);return bl[L(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()}});function ZL(t,e,i,n){return new Qr({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){Xt(t.event)},ondragend:n})}function UL(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function XL(t){return"vertical"===t?"ns-resize":"ew-resize"}_f({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),yf(yL);var YL=PL.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){YL.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();jL[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=k(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=O(this._pieceList,function(t){t=k(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var n=this.option,i={},t=g_.listVisualTypes(),o=this.isCategory();function a(t,e,i){return t&&t[e]&&(z(t[e])?t[e].hasOwnProperty(i):t[e]===i)}E(n.pieces,function(e){E(t,function(t){e.hasOwnProperty(t)&&(i[t]=1)})}),E(i,function(t,e){var i=0;E(this.stateList,function(t){i|=a(n,t,e)||a(n.target,t,e)},this),i||E(this.stateList,function(t){(n[t]||(n[t]={}))[e]=ML(e,"inRange"===t?"active":"inactive",o)})},this),PL.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,E(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;E(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&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=k(t)},getValueState:function(t){var e=g_.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){g_.findPieceIndex(t,this._pieceList)===n&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},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(o){if(!this.isCategory()){var a=[],r=[],s=this,t=this._pieceList.slice();if(t.length){var e=t[0].interval[0];e!==-1/0&&t.unshift({interval:[-1/0,e]}),(e=t[t.length-1].interval[1])!==1/0&&t.push({interval:[e,1/0]})}else t.push({interval:[-1/0,1/0]});var i=-1/0;return E(t,function(t){var e=t.interval;e&&(e[0]>i&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),jL={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),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];r<o;s+=a,r++){var l=r===o-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),$l(e),E(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;E(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),qL(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;E(t.pieces,function(t,e){z(t)||(t={value:t});var i={text:"",index:e};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],a[u]=r[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=g_.retrieveVisuals(t),d.push(i)},this),qL(t,d),$l(d),E(d,function(t){var e=t.close,i=[["<","閳拷"][e[1]],[">","閳拷"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function qL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}RL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ci;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),wu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:BL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return zL(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 Ci,r=this.visualMapModel.textStyleModel;a.add(new Ur({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=O(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(wg(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=k(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});yf(yL);var KL,$L="urn:schemas-microsoft-com:vml",JL="undefined"==typeof window?null:window,QL=!1,tk=JL&&JL.document;function ek(t){return KL(t)}if(tk&&!v.canvasSupported)try{tk.namespaces.zrvml||tk.namespaces.add("zrvml",$L),KL=function(t){return tk.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){KL=function(t){return tk.createElement("<"+t+' xmlns="'+$L+'" class="zrvml">')}}var ik,nk=rr.CMD,ok=Math.round,ak=Math.sqrt,rk=Math.abs,sk=Math.cos,lk=Math.sin,uk=Math.max;if(!v.canvasSupported){var hk=",",ck="progid:DXImageTransform.Microsoft",dk=21600,fk=dk/2,pk=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=dk+","+dk,t.coordorigin="0,0"},gk=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},mk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},vk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},yk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},xk=Yn,_k=function(t,e,i){var n=Fe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=gk(n[0],n[1],n[2]),t.opacity=i*n[3])},wk=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&&vk(t,a),a=a||ek(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof cs){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*dk,w/=x[1]*dk;var b=uk(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A<M;A++){var D=S[A],C=(n=D.color,void 0,o=Fe(n),[gk(o[0],o[1],o[2]),o[3]]);T.push(D.offset*h+u+" "+C[0]),0!==A&&A!==M-1||I.push(C)}if(2<=M){var L=I[0][0],k=I[1][0],P=I[0][1]*e.opacity,N=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=s,t.color=L,t.color2=k,t.colors=T.join(","),t.opacity=N,t.opacity2=P}"radial"===r&&(t.focusposition=l.join(","))}else _k(t,a,e.opacity)}(a,i,n):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof cs||_k(t,e.stroke,e.opacity)}(a,i),mk(t,a)):(t[o?"filled":"stroked"]="false",vk(t,a))},bk=[[],[],[]];Ar.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=ek("shape"),pk(i),this._vmlEl=i),wk(i,"fill",e,this),wk(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*=ak(rk(s))}a.weight=r+"px"}var l=this.path||(this.path=new rr);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,o,a,r,s,l=nk.M,u=nk.C,h=nk.L,c=nk.A,d=nk.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(n="",i=0,o=p[a++]){case l:n=" m ",i=1,r=p[a++],s=p[a++],bk[0][0]=r,bk[0][1]=s;break;case h:n=" l ",i=1,r=p[a++],s=p[a++],bk[0][0]=r,bk[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=_)+2*y)/3,w=((v=w)+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),bk[0][0]=y,bk[0][1]=x,bk[1][0]=_,bk[1][1]=w,r=bk[2][0]=m,s=bk[2][1]=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=ak(e[0]*e[0]+e[1]*e[1]),I=ak(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var N=p[a++],O=A+sk(k)*C,E=D+lk(k)*L,R=(y=A+sk(P)*C,x=D+lk(P)*L,N?" wa ":" at ");Math.abs(O-y)<1e-4&&(.01<Math.abs(P-k)?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&O<A||!N&&A<O?x-=.0125:x+=.0125:N&&E<D||!N&&D<E?y+=.0125:y-=.0125),f.push(R,ok(((A-C)*M+b)*dk-fk),hk,ok(((D-L)*I+S)*dk-fk),hk,ok(((A+C)*M+b)*dk-fk),hk,ok(((D+L)*I+S)*dk-fk),hk,ok((O*M+b)*dk-fk),hk,ok((E*I+S)*dk-fk),hk,ok((y*M+b)*dk-fk),hk,ok((x*I+S)*dk-fk)),r=y,s=x;break;case nk.R:var z=bk[0],B=bk[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(bt(z,z,e),bt(B,B,e)),z[0]=ok(z[0]*dk-fk),B[0]=ok(B[0]*dk-fk),z[1]=ok(z[1]*dk-fk),B[1]=ok(B[1]*dk-fk),f.push(" m ",z[0],hk,z[1]," l ",B[0],hk,z[1]," l ",B[0],hk,B[1]," l ",z[0],hk,B[1]);break;case nk.Z:f.push(" x ")}if(0<i){f.push(n);for(var V=0;V<i;V++){var G=bk[V];e&&bt(G,G,e),f.push(ok(G[0]*dk-fk),hk,ok(G[1]*dk-fk),V<i-1?hk:"")}}}return f.join("")}(l,this.transform),i.style.zIndex=yk(this.zlevel,this.z,this.z2),mk(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Ar.prototype.onRemove=function(t){vk(t,this._vmlEl),this.removeRectText(t)},Ar.prototype.onAdd=function(t){mk(t,this._vmlEl),this.appendRectText(t)};Qn.prototype.brushVML=function(t){var e,i,n=this.style,o=n.image;if(function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()}(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=tk.createElement("div"),pk(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=ak(x[0]*x[0]+x[1]*x[1]),S=ak(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],A=[u+c,h+d];bt(M,M,x),bt(I,I,x),bt(T,T,x),bt(A,A,x);var D=uk(M[0],I[0],T[0],A[0]),C=uk(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,hk,"M12=",x[2]/S,hk,"M21=",x[1]/b,hk,"M22=",x[3]/S,hk,"Dx=",ok(u*b+x[4]),hk,"Dy=",ok(h*S+x[5])),_.padding="0 "+ok(D)+"px "+ok(C)+"px 0",_.filter=ck+".Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=ok(u)+"px",_.top=ok(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=tk.createElement("div"),this._imageEl=k);var N=k.style;if(v){if(e&&i)N.width=ok(b*e*c/f)+"px",N.height=ok(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=ok(b*e*c/f)+"px",N.height=ok(S*i*d/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=o},O.src=o}P||((P=tk.createElement("div")).style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=ok((c+g*c/f)*b),R.height=ok((d+m*d/p)*S),R.filter=ck+".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=ok(b*c)+"px",N.height=ok(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="+ok(100*B)+") "),z+=ck+".AlphaImageLoader(src="+o+", SizingMethod=scale)",N.filter=z,y.style.zIndex=yk(this.zlevel,this.z,this.z2),mk(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},Qn.prototype.onRemove=function(t){vk(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Qn.prototype.onAdd=function(t){mk(t,this._vmlEl),this.appendRectText(t)};var Sk,Mk="normal",Ik={},Tk=0,Ak=document.createElement("div");ik=function(t,e){var i=tk;Sk||((Sk=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",tk.body.appendChild(Sk));try{Sk.style.font=e}catch(t){}return Sk.innerHTML="",Sk.appendChild(i.createTextNode(t)),{width:Sk.offsetWidth}},fn["measureText"]=ik;for(var Dk=new Di,Ck=function(t,e,i,n){var o=this.style;this.__dirty&&En(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=In(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=function(t){var e=Ik[t];if(!e){100<Tk&&(Tk=0,Ik={});var i,n=Ak.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||Mk,variant:n.fontVariant||Mk,weight:n.fontWeight||Mk,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},Ik[t]=e,Tk++}return e}(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||gn(a,m,f,p,o.textPadding,o.textLineHeight);var v=this.transform;if(v&&!n&&(Dk.copy(e),Dk.applyTransform(v),e=Dk),n)c=e.x,d=e.y;else{var y=o.textPosition;if(y instanceof Array)c=e.x+xk(y[0],e.width),d=e.y+xk(y[1],e.height),f=f||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},o,e):yn({},o,e);c=x.x,d=x.y,f=f||x.textAlign,p=p||x.textVerticalAlign}}c=mn(c,i.width,f),d=vn(d,i.height,p),d+=i.height/2;var _,w,b,S=ek,M=this._textVmlEl;M?w=(_=(b=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),w=S("textpath"),b=S("skew"),w.style["v-text-align"]="left",pk(M),_.textpathok=!0,w.on=!0,M.from="0 0",M.to="1000 0.05",mk(M,b),mk(M,_),mk(M,w),this._textVmlEl=M);var I=[c,d],T=M.style;v&&n?(bt(I,I,v),b.on=!0,b.matrix=v[0].toFixed(3)+hk+v[2].toFixed(3)+hk+v[1].toFixed(3)+hk+v[3].toFixed(3)+",0,0",b.offset=(ok(I[0])||0)+","+(ok(I[1])||0),b.origin="0 0",T.left="0px",T.top="0px"):(b.on=!1,T.left=ok(c)+"px",T.top=ok(d)+"px"),w.string=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}(a);try{w.style.font=m}catch(t){}wk(M,"fill",{fill:o.textFill,opacity:o.opacity},this),wk(M,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash||null},this),M.style.zIndex=yk(this.zlevel,this.z,this.z2),mk(t,M)}},Lk=function(t){vk(t,this._textVmlEl),this._textVmlEl=null},kk=function(t){mk(t,this._textVmlEl)},Pk=[Kn,Jn,Qn,Ar,Ur],Nk=0;Nk<Pk.length;Nk++){var Ok=Pk[Nk].prototype;Ok.drawRectText=Ck,Ok.removeRectText=Lk,Ok.appendRectText=kk}Ur.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)},Ur.prototype.onRemove=function(t){this.removeRectText(t)},Ur.prototype.onAdd=function(t){this.appendRectText(t)}}function Ek(t){return parseInt(t,10)}function Rk(t,e){!function(){if(!QL&&tk){QL=!0;var t=tk.styleSheets;t.length<31?tk.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}(),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}Rk.prototype={constructor:Rk,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Ek(e.width))-Ek(e.paddingLeft)-Ek(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Ek(e.height))-Ek(e.paddingTop)-Ek(e.paddingBottom)|0}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Rk.prototype[t]=function(t){return function(){vi('In IE8.0 VML mode painter not support method "'+t+'"')}}(t)}),Po("vml",Rk);function zk(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}var Bk=rr.CMD,Vk=Array.prototype.join,Gk="none",Fk=Math.round,Wk=Math.sin,Hk=Math.cos,Zk=Math.PI,Uk=2*Math.PI,Xk=180/Zk,Yk=1e-4;function jk(t){return Fk(1e4*t)/1e4}function qk(t){return t<Yk&&-Yk<t}function Kk(t,e){e&&$k(t,"transform","matrix("+Vk.call(e,",")+")")}function $k(t,e,i){i&&("linear"===i.type||"radial"===i.type)||t.setAttribute(e,i)}function Jk(t,e,i,n){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Gk}(e,i)){var o=i?e.textFill:e.fill;$k(t,"fill",o="transparent"===o?Gk:o),$k(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else $k(t,"fill",Gk);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Gk}(e,i)){var a=i?e.textStroke:e.stroke;$k(t,"stroke",a="transparent"===a?Gk:a),$k(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),$k(t,"paint-order",i?"stroke":"fill"),$k(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?($k(t,"stroke-dasharray",e.lineDash.join(",")),$k(t,"stroke-dashoffset",Fk(e.lineDashOffset||0))):$k(t,"stroke-dasharray",""),e.lineCap&&$k(t,"stroke-linecap",e.lineCap),e.lineJoin&&$k(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&$k(t,"stroke-miterlimit",e.miterLimit)}else $k(t,"stroke",Gk)}var Qk={};Qk.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=zk("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=function(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case Bk.M:a="M",r=2;break;case Bk.L:a="L",r=2;break;case Bk.Q:a="Q",r=4;break;case Bk.C:a="C",r=6;break;case Bk.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=qk(g-Uk)||(p?Uk<=d:Uk<=-d),v=0<d?d%Uk:d%Uk+Uk,y=!1;y=!!m||!qk(g)&&Zk<=v==!!p;var x=jk(s+u*Hk(c)),_=jk(l+h*Wk(c));m&&(d=p?Uk-1e-4:1e-4-Uk,y=!0,9===o&&e.push("M",x,_));var w=jk(s+u*Hk(c+d)),b=jk(l+h*Wk(c+d));e.push("A",jk(u),jk(h),Fk(f*Xk),+y,+p,w,b);break;case Bk.Z:a="Z";break;case Bk.R:w=jk(i[o++]),b=jk(i[o++]);var S=jk(i[o++]),M=jk(i[o++]);e.push("M",w,b,"L",w+S,b,"L",w+S,b+M,"L",w,b+M,"L",w,b)}a&&e.push(a);for(var I=0;I<r;I++)e.push(jk(i[o++]))}return e.join(" ")}(n);o.indexOf("NaN")<0&&$k(i,"d",o)}Jk(i,e,!1,t),Kk(i,t.transform),null!=e.text?rP(t,t.getBoundingRect()):lP(t)};var tP={brush:function(t){var e=t.style,i=e.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=e.x||0,o=e.y||0,a=e.width,r=e.height,s=t.__svgEl;s||(s=zk("image"),t.__svgEl=s),i!==t.__imageSrc&&(function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}(s,"href",i),t.__imageSrc=i),$k(s,"width",a),$k(s,"height",r),$k(s,"x",n),$k(s,"y",o),Kk(s,t.transform),null!=e.text?rP(t,t.getBoundingRect()):lP(t)}}},eP={},iP=new Di,nP={},oP=[],aP={left:"start",right:"end",center:"middle",middle:"middle"},rP=function(t,e){var i=t.style,n=t.transform,o=t instanceof Ur||i.transformText;t.__dirty&&En(i);var a=i.text;if(null!=a&&(a+=""),qn(a,i)){null==a&&(a=""),!o&&n&&(iP.copy(e),iP.applyTransform(n),e=iP);var r=t.__textSvgEl;r||(r=zk("text"),t.__textSvgEl=r);var s=r.style,l=i.font||dn,u=r.__computedFont;l!==r.__styleFont&&(s.font=r.__styleFont=l,u=r.__computedFont=s.font);var h=i.textPadding,c=i.textLineHeight,d=t.__textCotentBlock;d&&!t.__dirtyText||(d=t.__textCotentBlock=Mn(a,u,h,c,i.truncate));var f=d.outerHeight,p=d.lineHeight;Hn(nP,t,i,e);var g=nP.baseX,m=nP.baseY,v=nP.textAlign||"left",y=nP.textVerticalAlign;!function(t,e,i,n,o,a,r){re(oP),e&&i&&se(oP,i);var s=n.textRotation;if(o&&s){var l=n.textOrigin;"center"===l?(a=o.width/2+o.x,r=o.height/2+o.y):l&&(a=l[0]+o.x,r=l[1]+o.y),oP[4]-=a,oP[5]-=r,he(oP,oP,s),oP[4]+=a,oP[5]+=r}Kk(t,oP)}(r,o,n,i,e,g,m);var x=g,_=vn(m,f,y);h&&(x=function(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}(g,v,h),_+=h[0]),_+=p/2,Jk(r,i,!0,t);var w=d.canCacheByTextString,b=t.__tspanList||(t.__tspanList=[]),S=b.length;if(w&&t.__canCacheByTextString&&t.__text===a){if(t.__dirtyText&&S)for(var M=0;M<S;++M)sP(b[M],v,x,_+M*p)}else{t.__text=a,t.__canCacheByTextString=w;var I=d.lines,T=I.length;for(M=0;M<T;M++){var A=b[M],D=I[M];A?A.__zrText!==D&&(A.innerHTML="",A.appendChild(document.createTextNode(D))):(A=b[M]=zk("tspan"),r.appendChild(A),A.appendChild(document.createTextNode(D))),sP(A,v,x,_+M*p)}if(T<S){for(;M<S;M++)r.removeChild(b[M]);b.length=T}}}};function sP(t,e,i,n){$k(t,"dominant-baseline","middle"),$k(t,"text-anchor",aP[e]),$k(t,"x",i),$k(t,"y",n)}function lP(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}function uP(){}function hP(t,e){for(var i=0,n=e.length,o=0,a=0;i<n;i++){var r=e[i];if(r.removed){for(s=[],l=a;l<a+r.count;l++)s.push(l);r.indices=s,a+=r.count}else{for(var s=[],l=o;l<o+r.count;l++)s.push(l);r.indices=s,o+=r.count,r.added||(a+=r.count)}}return e}eP.drawRectText=rP,eP.brush=function(t){null!=t.style.text?rP(t,!1):lP(t)},uP.prototype={diff:function(l,u,t){t=t||function(t,e){return t===e},this.equals=t;var h=this;l=l.slice();var c=(u=u.slice()).length,d=l.length,f=1,e=c+d,p=[{newPos:-1,components:[]}],i=this.extractCommon(p[0],u,l,0);if(p[0].newPos+1>=c&&d<=i+1){for(var n=[],o=0;o<u.length;o++)n.push(o);return[{indices:n,count:u.length}]}function a(){for(var t=-1*f;t<=f;t+=2){var e,i=p[t-1],n=p[t+1],o=(n?n.newPos:0)-t;i&&(p[t-1]=void 0);var a=i&&i.newPos+1<c,r=n&&0<=o&&o<d;if(a||r){if(!a||r&&i.newPos<n.newPos?(e={newPos:(s=n).newPos,components:s.components.slice(0)},h.pushComponent(e.components,void 0,!0)):((e=i).newPos++,h.pushComponent(e.components,!0,void 0)),o=h.extractCommon(e,u,l,t),e.newPos+1>=c&&d<=o+1)return hP(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var 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 cP=new uP;function dP(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 fP(t,e){dP.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function pP(t,e){dP.call(this,t,e,"clipPath","__clippath_in_use__")}function gP(t,e){dP.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function mP(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function vP(t){return parseInt(t,10)}function yP(t,e){return e&&t&&e.parentNode!==t}function xP(t,e,i){if(yP(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function _P(t,e){if(yP(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function wP(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function bP(t){return t.__textSvgEl}function SP(t){return t.__svgEl}dP.prototype.createElement=zk,dP.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((n=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},dP.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)}}},dP.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},dP.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},dP.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var n=[];return E(this._tagNames,function(t){var e=i.getElementsByTagName(t);n=n.concat([].slice.call(e))}),n},dP.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;E(t,function(t){t[e._markLabel]="0"})},dP.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},dP.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;E(t,function(t){"1"!==t[i._markLabel]&&e.removeChild(t)})}},dP.prototype.getSvgProxy=function(t){return t instanceof Ar?Qk:t instanceof Qn?tP:t instanceof Ur?eP:Qk},dP.prototype.getTextSvgElement=function(t){return t.__textSvgEl},dP.prototype.getSvgElement=function(t){return t.__svgEl},w(fP,dP),fP.prototype.addWithoutUpdate=function(a,r){if(r&&r.style){var s=this;E(["fill","stroke"],function(t){if(r.style[t]&&("linear"===r.style[t].type||"radial"===r.style[t].type)){var e,i=r.style[t],n=s.getDefs(!0);i._dom?(e=i._dom,n.contains(i._dom)||s.addDom(e)):e=s.add(i),s.markUsed(r);var o=e.getAttribute("id");a.setAttribute(t,"url(#"+o+")")}})}},fP.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return vi("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},fP.prototype.update=function(i){var n=this;dP.prototype.update.call(this,i,function(){var t=i.type,e=i._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?n.updateDom(i,i._dom):(n.removeDom(i),n.add(i))})},fP.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 vi("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+"%");var r=i[n].color;if(r.indexOf(!1)){var s=Fe(r)[3],l=Ze(r);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);e.appendChild(a)}t._dom=e},fP.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&dP.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&dP.prototype.markUsed.call(this,e._dom)}},w(pP,dP),pP.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)},pP.prototype.updateDom=function(t,e,i){if(e&&0<e.length){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);le(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+")"),1<e.length&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},pP.prototype.markUsed=function(t){var e=this;t.__clipPaths&&E(t.__clipPaths,function(t){t._dom&&dP.prototype.markUsed.call(e,t._dom),t._textDom&&dP.prototype.markUsed.call(e,t._textDom)})},w(gP,dP),gP.prototype.addWithoutUpdate=function(t,e){if(e&&mP(e.style)){var i;if(e._shadowDom)i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i);else i=this.add(e);this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},gP.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},gP.prototype.update=function(t,e){if(mP(e.style)){var i=this;dP.prototype.update.call(this,e,function(){i.updateDom(e,e._shadowDom)})}else this.remove(t,e)},gP.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},gP.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,u=t.scale&&t.scale[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),t._shadowDom=e},gP.prototype.markUsed=function(t){t._shadowDom&&dP.prototype.markUsed.call(this,t._shadowDom)};function MP(t,e,i,n){this.root=t,this.storage=e,this._opts=i=P({},i||{});var o=zk("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;";var a=zk("g");o.appendChild(a);var r=zk("g");o.appendChild(r),this.gradientManager=new fP(n,r),this.clipPathManager=new pP(n,r),this.shadowManager=new gP(n,r);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=r,this._backgroundRoot=a,this._viewport=s,t.appendChild(s),s.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]}MP.prototype={constructor:MP,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},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._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=zk("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,o=this._visibleList,a=t.length,r=[];for(e=0;e<a;e++){var s=t[e],l=(i=s)instanceof Ar?Qk:i instanceof Qn?tP:i instanceof Ur?eP:Qk,u=SP(s)||bP(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),r.push(s))}var h,c=function(t,e,i){return cP.diff(t,e,i)}(o,r);for(e=0;e<c.length;e++){if((p=c[e]).removed)for(var d=0;d<p.count;d++){u=SP(s=o[p.indices[d]]);var f=bP(s);wP(n,u),wP(n,f)}}for(e=0;e<c.length;e++){var p;if((p=c[e]).added)for(d=0;d<p.count;d++){u=SP(s=r[p.indices[d]]),f=bP(s);h?xP(n,u,h):_P(n,u),u?xP(n,f,u):h?xP(n,f,h):_P(n,f),xP(n,f,u),h=f||u||h,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(d=0;d<p.count;d++){u=SP(s=r[p.indices[d]]),f=bP(s),u=SP(s),f=bP(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&xP(n,f,u),h=u||f||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=r},_getDefs:function(t){var n,e=this._svgDom;return 0!==(n=e.getElementsByTagName("defs")).length?n[0]:t?((n=e.insertBefore(zk("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null},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._svgDom;a.setAttribute("width",t),a.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.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]||vP(s[i])||vP(r.style[i]))-(vP(s[o])||0)-(vP(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){MP.prototype[t]=function(t){return function(){vi('In SVG mode painter not support method "'+t+'"')}}(t)}),Po("svg",MP),t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=Ld,t.init=function(t,e,i){var n=mf(t);if(n)return n;var o=new Rd(t,e,i);return o.id="ec_"+cf++,uf[o.id]=o,Jo(t,ff,o.id),function(n){var o="__connectUpdateStatus";function a(t,e){for(var i=0;i<t.length;i++){t[i][o]=e}}Td(ef,function(t,e){n._messageCenter.on(e,function(t){if(hf[n.group]&&0!==n[o]){if(t&&t.escapeConnect)return;var e=n.makeActionFromEvent(t),i=[];Td(uf,function(t){t!==n&&t.group===n.group&&i.push(t)}),a(i,0),Td(i,function(t){1!==t[o]&&t.dispatchAction(e)}),a(i,2)}})})}(o),o},t.connect=function(e){if(L(e)){var t=e;e=null,Td(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+df++,Td(t,function(t){t.group=e})}return hf[e]=!0,e},t.disConnect=pf,t.disconnect=gf,t.dispose=function(t){"string"==typeof t?t=uf[t]:t instanceof Rd||(t=mf(t)),t instanceof Rd&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=mf,t.getInstanceById=function(t){return uf[t]},t.registerTheme=vf,t.registerPreprocessor=yf,t.registerProcessor=xf,t.registerPostUpdate=function(t){af.push(t)},t.registerAction=_f,t.registerCoordinateSystem=wf,t.getCoordinateSystemDimensions=function(t){var e=lh.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=bf,t.registerVisual=Sf,t.registerLoading=If,t.extendComponentModel=Tf,t.extendComponentView=Af,t.extendSeriesModel=Df,t.extendChartView=Cf,t.setCanvasCreator=function(t){f("createCanvas",t)},t.registerMap=function(t,e,i){Sd.registerMap(t,e,i)},t.getMap=function(t){var e=Sd.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=Oo,t.number=Ql,t.format=mu,t.throttle=Lc,t.helper=Sg,t.matrix=pe,t.vector=It,t.color=Je,t.parseGeoJSON=Cg,t.parseGeoJson=Wg,t.util=Hg,t.graphic=Zg,t.List=Yf,t.Model=Cl,t.Axis=Gg,t.env=v});
diff --git a/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min-4.7.js b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min-4.7.js
new file mode 100644
index 0000000..e306f04
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min-4.7.js
@@ -0,0 +1,18 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),r&&(i.ie=!0,i.version=r[1]),a&&(i.edge=!0,i.version=a[1]),o&&(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),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(Xy=null),Wy[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=By.call(t);if("[object Array]"===i){if(!B(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=n(t[r])}}else if(Ey[i]){if(!B(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=n(t[r])}}}else if(!zy[i]&&!B(t)&&!A(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function r(t,e,i){if(!M(e)||!M(t))return i?n(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!M(s)||!M(o)||_(s)||_(o)||A(s)||A(o)||S(s)||S(o)||B(s)||B(o)?!i&&a in t||(t[a]=n(e[a],!0)):r(o,s,i)}return t}function a(t,e){for(var i=t[0],n=1,a=t.length;a>n;n++)i=r(i,t[n],e);return i}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return Xy||(Xy=Zy().getContext("2d")),Xy}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===Ny)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===Gy)return t.map(e,i);for(var n=[],r=0,a=t.length;a>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===Hy)return t.reduce(e,i,n);for(var r=0,a=t.length;a>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===Vy)return t.filter(e,i);for(var n=[],r=0,a=t.length;a>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=Fy.call(arguments,2);return function(){return t.apply(e,i.concat(Fy.call(arguments)))}}function x(t){var e=Fy.call(arguments,1);return function(){return t.apply(this,e.concat(Fy.call(arguments)))}}function _(t){return"[object Array]"===By.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===By.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function S(t){return!!zy[By.call(t)]}function I(t){return!!Ey[By.call(t)]}function A(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function T(t){return t!==t}function C(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function k(t,e,i){return null!=t?t:null!=e?e:i}function P(){return Function.call.apply(Fy,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function z(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[Yy]=!0}function B(t){return t[Yy]}function R(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof R?t.each(e):t&&f(t,e)}function N(t){return new R(t)}function V(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i}function F(){}function G(t,e){var i=new jy(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function H(t,e){return t[0]=e[0],t[1]=e[1],t}function W(t){var e=new jy(2);return e[0]=t[0],e[1]=t[1],e}function Z(t,e,i){return t[0]=e,t[1]=i,t}function X(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Y(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function U(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function j(t){return Math.sqrt(q(t))}function q(t){return t[0]*t[0]+t[1]*t[1]}function K(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function $(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function Q(t,e){return t[0]*e[0]+t[1]*e[1]}function J(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function te(t,e){var i=j(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function ee(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ie(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function ne(t,e){return t[0]=-e[0],t[1]=-e[1],t}function re(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function ae(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function oe(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function se(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function le(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function ue(t,e){return{target:t,topTarget:e&&e.topTarget}}function he(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}function ce(t,e,i,n,r,a){var o=t._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!e)return t;i=he(t,i),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:r||t,callAtLast:n.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}function de(t,e,i,n,r,a){var o=n+"-"+r,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/ix);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;s>d;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[i][d]*de(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}function fe(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},r=de(i,8,0,0,0,n);if(0!==r){for(var a=[],o=0;8>o;o++)for(var s=0;8>s;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*de(i,7,0===o?1:0,1<<o,1<<s,n)/r*e[o];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}function pe(t,e,i,n,r){return ge(rx,e,n,r,!0)&&ge(t,i,rx[0],rx[1])}function ge(t,e,i,n,r){if(e.getBoundingClientRect&&Oy.domSupported&&!ye(e)){var a=e[nx]||(e[nx]={}),o=ve(e,a),s=me(o,a,r);if(s)return s(t,i,n),!0}return!1}function ve(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],r=["top","bottom"],a=0;4>a;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}function me(t,e,i){for(var n=i?"invTrans":"trans",r=e[n],a=e.srcCoords,o=!0,s=[],l=[],u=0;4>u;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),o=o&&a&&d===a[c]&&f===a[c+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&r?r:(e.srcCoords=s,e[n]=i?fe(l,s):fe(s,l))}function ye(t){return"CANVAS"===t.nodeName.toUpperCase()}function xe(t,e,i,n){return i=i||{},n||!Oy.canvasSupported?_e(t,e,i):Oy.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):_e(t,e,i),i}function _e(t,e,i){if(Oy.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(ye(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(ge(sx,t,n,r))return i.zrX=sx[0],void(i.zrY=sx[1])}i.zrX=i.zrY=0}function be(t){return t||window.event}function we(t,e,i){if(e=be(e),null!=e.zrX)return e;var n=e.type,r=n&&n.indexOf("touch")>=0;if(r){var a="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];a&&xe(t,a,e,i)}else xe(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&ox.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Me(t,e,i,n){ax?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}function Se(t,e,i,n){ax?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)}function Ie(t){return 2===t.which||3===t.which}function Ae(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Te(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Ce(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:De}}function De(){lx(this.event)}function ke(){}function Pe(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return n?cx:!0}return!1}function Le(t,e,i){var n=t.painter;return 0>e||e>n.getWidth()||0>i||i>n.getHeight()}function Oe(){var t=new px(6);return ze(t),t}function ze(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Ee(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,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Re(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Ne(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function Ve(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function Fe(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null}function Ge(t){var e=Oe();return Ee(e,t),e}function He(t){return t>mx||-mx>t}function We(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1: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 Ze(t){return t=Math.round(t),0>t?0:t>255?255:t}function Xe(t){return t=Math.round(t),0>t?0:t>360?360:t}function Ye(t){return 0>t?0:t>1?1:t}function Ue(t){return Ze(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function je(t){return Ye(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function qe(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function Ke(t,e,i){return t+(e-t)*i}function $e(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function Qe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Je(t,e){Lx&&Qe(Lx,e),Lx=Px.put(t,Lx||e.slice())}function ti(t,e){if(t){e=e||[];var i=Px.get(t);if(i)return Qe(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in kx)return Qe(e,kx[n]),Je(t,e),e;if("#"!==n.charAt(0)){var r=n.indexOf("("),a=n.indexOf(")");if(-1!==r&&a+1===n.length){var o=n.substr(0,r),s=n.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void $e(e,0,0,0,1);l=je(s.pop());case"rgb":return 3!==s.length?void $e(e,0,0,0,1):($e(e,Ue(s[0]),Ue(s[1]),Ue(s[2]),l),Je(t,e),e);case"hsla":return 4!==s.length?void $e(e,0,0,0,1):(s[3]=je(s[3]),ei(s,e),Je(t,e),e);case"hsl":return 3!==s.length?void $e(e,0,0,0,1):(ei(s,e),Je(t,e),e);default:return}}$e(e,0,0,0,1)}else{if(4===n.length){var u=parseInt(n.substr(1),16);return u>=0&&4095>=u?($e(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Je(t,e),e):void $e(e,0,0,0,1)}if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&16777215>=u?($e(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Je(t,e),e):void $e(e,0,0,0,1)}}}}function ei(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=je(t[1]),r=je(t[2]),a=.5>=r?r*(n+1):r+n-r*n,o=2*r-a;return e=e||[],$e(e,Ze(255*qe(o,a,i+1/3)),Ze(255*qe(o,a,i)),Ze(255*qe(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ii(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function ni(t,e){var i=ti(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?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 ui(i,4===i.length?"rgba":"rgb")}}function ri(t){var e=ti(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function ai(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=e[r],s=e[a],l=n-r;return i[0]=Ze(Ke(o[0],s[0],l)),i[1]=Ze(Ke(o[1],s[1],l)),i[2]=Ze(Ke(o[2],s[2],l)),i[3]=Ye(Ke(o[3],s[3],l)),i}}function oi(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=ti(e[r]),s=ti(e[a]),l=n-r,u=ui([Ze(Ke(o[0],s[0],l)),Ze(Ke(o[1],s[1],l)),Ze(Ke(o[2],s[2],l)),Ye(Ke(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:a,value:n}:u}}function si(t,e,i,n){return t=ti(t),t?(t=ii(t),null!=e&&(t[0]=Xe(e)),null!=i&&(t[1]=je(i)),null!=n&&(t[2]=je(n)),ui(ei(t),"rgba")):void 0}function li(t,e){return t=ti(t),t&&null!=e?(t[3]=Ye(e),ui(t,"rgba")):void 0}function ui(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 hi(t,e){return t[e]}function ci(t,e,i){t[e]=i}function di(t,e,i){return(e-t)*i+t}function fi(t,e,i){return i>.5?e:t}function pi(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;a>o;o++)n[o]=di(t[o],e[o],i);else for(var s=a&&t[0].length,o=0;a>o;o++)for(var l=0;s>l;l++)n[o][l]=di(t[o][l],e[o][l],i)}function gi(t,e,i){var n=t.length,r=e.length;if(n!==r){var a=n>r;if(a)t.length=r;else for(var o=n;r>o;o++)t.push(1===i?e[o]:Bx.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(1===i)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;s>l;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function vi(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;n>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function mi(t,e,i,n,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=yi(t[h],e[h],i[h],n[h],r,a,o);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=yi(t[h][d],e[h][d],i[h][d],n[h][d],r,a,o)}function yi(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function xi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(Bx.call(t[n]));return i}return Bx.call(t)}return t}function _i(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function bi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function wi(t,e,i,n,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,v=f?bi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var m=[],y=[],x=n[0].value,_=!0,b=0;u>b;b++){m.push(n[b].time/h);var w=n[b].value;if(f&&vi(w,x,v)||!f&&w===x||(_=!1),x=w,"string"==typeof w){var M=ti(w);M?(w=M,p=!0):g=!0}y.push(w)}if(a||!_){for(var S=y[u-1],b=0;u-1>b;b++)f?gi(y[b],S,v):!isNaN(y[b])||isNaN(S)||g||p||(y[b]=S);f&&gi(o(t._target,r),S,v);var I,A,T,C,D,k,P=0,L=0;if(p)var O=[0,0,0,0];var z=function(t,e){var i;if(0>e)i=0;else if(L>e){for(I=Math.min(P+1,u-1),i=I;i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=P;u>i&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}P=i,L=e;var n=m[i+1]-m[i];if(0!==n)if(A=(e-m[i])/n,l)if(C=y[i],T=y[0===i?i:i-1],D=y[i>u-2?u-1:i+1],k=y[i>u-3?u-1:i+2],f)mi(T,C,D,k,A,A*A,A*A*A,o(t,r),v);else{var a;if(p)a=mi(T,C,D,k,A,A*A,A*A*A,O,1),a=_i(O);else{if(g)return fi(C,D,A);a=yi(T,C,D,k,A,A*A,A*A*A)}s(t,r,a)}else if(f)pi(y[i],y[i+1],A,o(t,r),v);else{var a;if(p)pi(y[i],y[i+1],A,O,1),a=_i(O);else{if(g)return fi(y[i],y[i+1],A);a=di(y[i],y[i+1],A)}s(t,r,a)}},E=new We({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:z,ondestroy:i});return e&&"spline"!==e&&(E.easing=e),E}}}function Mi(t,e,i,n,r,a,o,s){function l(){h--,h||a&&a()}w(n)?(a=r,r=n,n=0):b(r)?(a=r,r="linear",n=0):b(n)?(a=n,n=0):b(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),Si(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||a&&a();for(var c=0;c<u.length;c++)u[c].done(l).start(r,o)}function Si(t,e,i,n,r,a,o){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?M(n[u])&&!d(n[u])?Si(t,e?e+"."+u:u,i[u],n[u],r,a,o):(o?(s[u]=i[u],Ii(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||o||Ii(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function Ii(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}function Ai(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function Ti(t){for(var e=0;t>=qx;)e|=1&t,t>>=1;return t+e}function Ci(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;i>r&&n(t[r],t[r-1])<0;)r++;Di(t,e,r)}else for(;i>r&&n(t[r],t[r-1])>=0;)r++;return r-e}function Di(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function ki(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var a,o=t[n],s=e,l=n;l>s;)a=s+l>>>1,r(o,t[a])<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]=o}}function Pi(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;s>l&&a(t,e[i+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[i+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[i+h])>0?o=h+1:l=h}return l}function Li(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;s>l&&a(t,e[i+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;s>l&&a(t,e[i+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[i+h])<0?l=h:o=h+1}return l}function Oi(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]<u[t+1]&&t--;else if(u[t]>u[t+1])break;a(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]<u[t+1]&&t--,a(t)}}function a(i){var n=l[i],r=u[i],a=l[i+1],h=u[i+1];u[i]=r+h,i===c-3&&(l[i+1]=l[i+2],u[i+1]=u[i+2]),c--;var d=Li(t[a],t,n,r,0,e);n+=d,r-=d,0!==r&&(h=Pi(t[n+r-1],t,a,h,h-1,e),0!==h&&(h>=r?o(n,r,a,h):s(n,r,a,h)))}function o(i,n,r,a){var o=0;for(o=0;n>o;o++)d[o]=t[i+o];var s=0,l=r,u=i;if(t[u++]=t[l++],0!==--a){if(1===n){for(o=0;a>o;o++)t[u+o]=t[l+o];return void(t[u+a]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--a){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Li(t[l],d,s,n,0,e),0!==c){for(o=0;c>o;o++)t[u+o]=d[s+o];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--a){p=!0;break}if(f=Pi(d[s],t,l,a,0,e),0!==f){for(o=0;f>o;o++)t[u+o]=t[l+o];if(u+=f,l+=f,a-=f,0===a){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=Kx||f>=Kx);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(o=0;a>o;o++)t[u+o]=t[l+o];t[u+a]=d[s]}else{if(0===n)throw new Error;for(o=0;n>o;o++)t[u+o]=d[s+o]}}else for(o=0;n>o;o++)t[u+o]=d[s+o]}function s(i,n,r,a){var o=0;for(o=0;a>o;o++)d[o]=t[r+o];var s=i+n-1,l=a-1,u=r+a-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===a){for(u-=n,s-=n,f=u+1,c=s+1,o=n-1;o>=0;o--)t[f+o]=t[c+o];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--n){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--a){m=!0;break}while(p>(g|v));if(m)break;do{if(g=n-Li(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,o=g-1;o>=0;o--)t[f+o]=t[c+o];if(0===n){m=!0;break}}if(t[u--]=d[l--],1===--a){m=!0;break}if(v=a-Pi(t[s],d,0,a,a-1,e),0!==v){for(u-=v,l-=v,a-=v,f=u+1,c=l+1,o=0;v>o;o++)t[f+o]=d[c+o];if(1>=a){m=!0;break}}if(t[u--]=t[s--],0===--n){m=!0;break}p--}while(g>=Kx||v>=Kx);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===a){for(u-=n,s-=n,f=u+1,c=s+1,o=n-1;o>=0;o--)t[f+o]=t[c+o];t[u]=d[l]}else{if(0===a)throw new Error;for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}}else for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}var l,u,h=Kx,c=0,d=[];l=[],u=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function zi(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(2>r)){var a=0;if(qx>r)return a=Ci(t,i,n,e),void ki(t,i,n,i+a,e);var o=new Oi(t,e),s=Ti(r);do{if(a=Ci(t,i,n,e),s>a){var l=r;l>s&&(l=s),ki(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}function Ei(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Bi(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(n,a,r,o);return s}function Ri(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*n+i.x,s=s*r+i.y,l*=a);var u=t.createRadialGradient(o,s,0,o,s,l);return u}function Ni(){return!1}function Vi(t,e,i){var n=Zy(),r=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=a*i,n}function Fi(t){if("string"==typeof t){var e=h_.get(t);return e&&e.image}return t}function Gi(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=h_.get(t),o={hostEl:i,cb:n,cbPayload:r};return a?(e=a.image,!Wi(e)&&a.pending.push(o)):(e=new Image,e.onload=e.onerror=Hi,h_.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Hi(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Wi(t){return t&&t.width&&t.height}function Zi(t,e){e=e||g_;var i=t+":"+e;if(c_[i])return c_[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;o>a;a++)r=Math.max(nn(n[a],e).width,r);return d_>f_&&(d_=0,c_={}),d_++,c_[i]=r,r}function Xi(t,e,i,n,r,a,o,s){return o?Ui(t,e,i,n,r,a,o,s):Yi(t,e,i,n,r,a,s)}function Yi(t,e,i,n,r,a,o){var s=rn(t,e,r,a,o),l=Zi(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=ji(0,l,i),c=qi(0,u,n),d=new Ai(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Ui(t,e,i,n,r,a,o,s){var l=an(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=ji(0,u,i),d=qi(0,h,n);return new Ai(c,d,u,h)}function ji(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function qi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ki(t,e,i){var n=e.textPosition,r=e.textDistance,a=i.x,o=i.y;r=r||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return t=t||{},t.x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function $i(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=Qi(e,i,n,r);for(var o=0,s=a.length;s>o;o++)a[o]=Ji(a[o],r);return a.join("\n")}function Qi(t,e,i,n){n=o({},n),n.font=e;var i=D(i,"...");n.maxIterations=D(n.maxIterations,2);var r=n.minChar=D(n.minChar,0);n.cnCharWidth=Zi("鍥�",e);var a=n.ascCharWidth=Zi("a",e);n.placeholder=D(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=a;l++)s-=a;var u=Zi(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ji(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Zi(t,n);if(i>=a)return t;for(var o=0;;o++){if(r>=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?tn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=Zi(t,n)}return""===t&&(t=e.placeholder),t}function tn(t,e,i,n){for(var r=0,a=0,o=t.length;o>a&&e>r;a++){var s=t.charCodeAt(a);r+=s>=0&&127>=s?i:n}return a}function en(t){return Zi("鍥�",t)}function nn(t,e){return v_.measureText(t,e)}function rn(t,e,i,n,r){null!=t&&(t+="");var a=D(n,en(e)),o=t?t.split("\n"):[],s=o.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&r){u=!1;var h=r.outerHeight,c=r.outerWidth;if(null!=h&&l>h)t="",o=[];else if(null!=c)for(var d=Qi(c-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;p>f;f++)o[f]=Ji(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function an(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=p_.lastIndex=0;null!=(n=p_.exec(t));){var a=n.index;a>r&&on(i,t.substring(r,a)),on(i,n[2],n[1]),r=p_.lastIndex}r<t.length&&on(i,t.substring(r,t.length));var o=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(var p=0;p<o.length;p++){for(var g=o[p],v=0,m=0,y=0;y<g.tokens.length;y++){var x=g.tokens[y],_=x.styleName&&e.rich[x.styleName]||{},b=x.textPadding=_.textPadding,w=x.font=_.font||e.font,M=x.textHeight=D(_.textHeight,en(w));if(b&&(M+=b[0]+b[2]),x.height=M,x.lineHeight=k(_.textLineHeight,e.textLineHeight,M),x.textAlign=_&&_.textAlign||e.textAlign,x.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+x.lineHeight>f)return{lines:[],width:0,height:0};x.textWidth=Zi(x.text,w);var S=_.textWidth,I=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))x.percentWidth=S,u.push(x),S=0;else{if(I){S=x.textWidth;var A=_.textBackgroundColor,T=A&&A.image;T&&(T=Fi(T),Wi(T)&&(S=Math.max(S,T.width*M/T.height)))}var C=b?b[1]+b[3]:0;S+=C;var P=null!=d?d-m:null;null!=P&&S>P&&(!I||C>P?(x.text="",x.textWidth=S=0):(x.text=$i(x.text,P-C,w,c.ellipsis,{minChar:c.minChar}),x.textWidth=Zi(x.text,w),S=x.textWidth+C))}m+=x.width=S,_&&(v=Math.max(v,x.lineHeight))}g.width=m,g.lineHeight=v,s+=v,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 p=0;p<u.length;p++){var x=u[p],L=x.percentWidth;x.width=parseInt(L,10)/100*l}return i}function on(t,e,i){for(var n=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)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 sn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&z(e)||t.textFont||t.font}function ln(t,e){var i,n,r,a,o=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(o+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=r=a=h:h instanceof Array?1===h.length?i=n=r=a=h[0]:2===h.length?(i=r=h[0],n=a=h[1]):3===h.length?(i=h[0],n=a=h[1],r=h[2]):(i=h[0],n=h[1],r=h[2],a=h[3]):i=n=r=a=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),n+r>u&&(c=n+r,n*=u/c,r*=u/c),i+a>u&&(c=i+a,i*=u/c,a*=u/c),t.moveTo(o+i,s),t.lineTo(o+l-n,s),0!==n&&t.arc(o+l-n,s+n,n,-Math.PI/2,0),t.lineTo(o+l,s+u-r),0!==r&&t.arc(o+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(o+a,s+u),0!==a&&t.arc(o+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+i),0!==i&&t.arc(o+i,s+i,i,Math.PI,1.5*Math.PI)}function un(t){return hn(t),f(t.rich,hn),t}function hn(t){if(t){t.font=sn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||y_[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||x_[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=L(t.textPadding))}}function cn(t,e,i,n,r,a){n.rich?fn(t,e,i,n,r,a):dn(t,e,i,n,r,a)}function dn(t,e,i,n,r,a){var o,s=mn(n),l=!1,u=e.__attrCachedBy===t_.PLAIN_TEXT;a!==e_?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?t_.NONE:t_.PLAIN_TEXT):u&&(e.__attrCachedBy=t_.NONE);var h=n.font||m_;l&&h===(o.font||m_)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=rn(i,c,d,f,n.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=_n(w_,t,n,r),x=y.baseX,_=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;gn(e,n,r,x,_);var M=qi(_,g,w),S=x,I=M;if(s||d){var A=Zi(i,c),T=A;d&&(T+=d[1]+d[3]);var C=ji(x,T,b);s&&yn(t,e,n,C,M,T,g),d&&(S=In(x,b,d),I+=d[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var D=0;D<__.length;D++){var k=__[D],P=k[0],L=k[1],O=n[P];l&&O===o[P]||(e[L]=Jx(e,L,O||k[2]))}I+=m/2;var z=n.textStrokeWidth,E=l?o.textStrokeWidth:null,B=!l||z!==E,R=!l||B||n.textStroke!==o.textStroke,N=wn(n.textStroke,z),V=Mn(n.textFill);if(N&&(B&&(e.lineWidth=z),R&&(e.strokeStyle=N)),V&&(l&&n.textFill===o.textFill||(e.fillStyle=V)),1===v.length)N&&e.strokeText(v[0],S,I),V&&e.fillText(v[0],S,I);else for(var D=0;D<v.length;D++)N&&e.strokeText(v[D],S,I),V&&e.fillText(v[D],S,I),I+=m}function fn(t,e,i,n,r,a){a!==e_&&(e.__attrCachedBy=t_.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=an(i,n)),pn(t,e,o,n,r)}function pn(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=_n(w_,t,n,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;gn(e,n,r,h,c);var p=ji(h,o,d),g=qi(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;mn(n)&&yn(t,e,n,p,g,o,s);for(var x=0;x<i.lines.length;x++){for(var _,b=i.lines[x],w=b.tokens,M=w.length,S=b.lineHeight,I=b.width,A=0,T=v,C=y,D=M-1;M>A&&(_=w[A],!_.textAlign||"left"===_.textAlign);)vn(t,e,_,n,S,m,T,"left"),I-=_.width,T+=_.width,A++;for(;D>=0&&(_=w[D],"right"===_.textAlign);)vn(t,e,_,n,S,m,C,"right"),I-=_.width,C-=_.width,D--;for(T+=(a-(T-v)-(y-C)-I)/2;D>=A;)_=w[A],vn(t,e,_,n,S,m,T+_.width/2,"center"),T+=_.width,A++;m+=S}}function gn(t,e,i,n,r){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function vn(t,e,i,n,r,a,o,s){var l=n.rich[i.styleName]||{};
+l.text=i.text;var u=i.textVerticalAlign,h=a+r/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+r-i.height/2),!i.isLineHolder&&mn(l)&&yn(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=In(o,s,c),h-=i.height/2-c[2]-i.textHeight/2),bn(e,"shadowBlur",k(l.textShadowBlur,n.textShadowBlur,0)),bn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),bn(e,"shadowOffsetX",k(l.textShadowOffsetX,n.textShadowOffsetX,0)),bn(e,"shadowOffsetY",k(l.textShadowOffsetY,n.textShadowOffsetY,0)),bn(e,"textAlign",s),bn(e,"textBaseline","middle"),bn(e,"font",i.font||m_);var d=wn(l.textStroke||n.textStroke,p),f=Mn(l.textFill||n.textFill),p=D(l.textStrokeWidth,n.textStrokeWidth);d&&(bn(e,"lineWidth",p),bn(e,"strokeStyle",d),e.strokeText(i.text,o,h)),f&&(bn(e,"fillStyle",f),e.fillText(i.text,o,h))}function mn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function yn(t,e,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=w(s);if(bn(e,"shadowBlur",i.textBoxShadowBlur||0),bn(e,"shadowColor",i.textBoxShadowColor||"transparent"),bn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),bn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?ln(e,{x:n,y:r,width:a,height:o,r:c}):e.rect(n,r,a,o),e.closePath()}if(h)if(bn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(M(s)){var f=s.image;f=Gi(f,null,t,xn,s),f&&Wi(f)&&e.drawImage(f,n,r,a,o)}if(l&&u)if(bn(e,"lineWidth",l),bn(e,"strokeStyle",u),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function xn(t,e){e.image=t}function _n(t,e,i,n){var r=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+Sn(l[0],n.width),a=n.y+Sn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(b_,i,n):Ki(b_,i,n);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(r+=h[0],a+=h[1])}return t=t||{},t.baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function bn(t,e,i){return t[e]=Jx(t,e,i),t[e]}function wn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Mn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Sn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function In(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function An(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Tn(t){t=t||{},Zx.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new n_(t.style,this),this._rect=null,this.__clipPaths=null}function Cn(t){Tn.call(this,t)}function Dn(t){return parseInt(t,10)}function kn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Pn(t,e,i){return D_.copy(t.getBoundingRect()),t.transform&&D_.applyTransform(t.transform),k_.width=e,k_.height=i,!D_.intersect(k_)}function Ln(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;return!1}function On(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 zn(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function En(t){return"mousewheel"===t&&Oy.browser.firefox?"DOMMouseScroll":t}function Bn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Rn(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Nn(t){t&&(t.zrByTouch=!0)}function Vn(t,e){return we(t.dom,new Gn(t,e),!0)}function Fn(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function Gn(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}function Hn(t,e){var i=e.domHandlers;Oy.pointerEventsSupported?f(E_.pointer,function(n){Zn(e,n,function(e){i[n].call(t,e)})}):(Oy.touchEventsSupported&&f(E_.touch,function(n){Zn(e,n,function(r){i[n].call(t,r),Rn(e)})}),f(E_.mouse,function(n){Zn(e,n,function(r){r=be(r),e.touching||i[n].call(t,r)})}))}function Wn(t,e){function i(i){function n(n){n=be(n),Fn(t,n.target)||(n=Vn(t,n),e.domHandlers[i].call(t,n))}Zn(e,i,n,{capture:!0})}Oy.pointerEventsSupported?f(B_.pointer,i):Oy.touchEventsSupported||f(B_.mouse,i)}function Zn(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Me(t.domTarget,En(e),i,n)}function Xn(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&Se(t.domTarget,En(i),e[i],t.listenerOpts[i]);t.mounted={}}function Yn(t,e){if(t._mayPointerCapture=null,z_&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?Wn(t,i):Xn(i)}}function Un(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function jn(t,e){ex.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Un(t,N_),z_&&(this._globalHandlerScope=new Un(document,V_)),this._pointerCapturing=!1,this._mayPointerCapture=null,Hn(this,this._localHandlerScope)}function qn(t,e){var i=new X_(Py(),t,e);return W_[i.id]=i,i}function Kn(t){if(t)t.dispose();else{for(var e in W_)W_.hasOwnProperty(e)&&W_[e].dispose();W_={}}return this}function $n(t){return W_[t]}function Qn(t,e){H_[t]=e}function Jn(t){delete W_[t]}function tr(t){return t instanceof Array?t:null==t?[]:[t]}function er(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;r>n;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function ir(t){return!j_(t)||q_(t)||t instanceof Date?t:t.value}function nr(t){return j_(t)&&!(t instanceof Array)}function rr(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return U_(e,function(t,n){if(j_(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(var r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=t.id||null==t.name||sr(t)||sr(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}}),U_(e,function(t){if(j_(t)){for(var e=0;e<i.length;e++){var n=i[e].exist;if(!i[e].option&&!sr(n)&&null==t.id){i[e].option=t;break}}e>=i.length&&i.push({option:t})}}),i}function ar(t){var e=N();U_(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),U_(t,function(t){var i=t.option;O(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),U_(t,function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(j_(r)){if(a.name=null!=r.name?r.name+"":n?n.name:K_+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function or(t){var e=t.name;return!(!e||!e.indexOf(K_))}function sr(t){return j_(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function lr(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var a=t[n].seriesId,o=tr(t[n].dataIndex),s=i&&i[a],l=0,u=o.length;u>l;l++){var h=o[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var a=n(t[r],!0);a.length&&i.push({seriesId:r,dataIndex:a})}return i}var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)]}function ur(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function hr(){var t="__\x00ec_inner_"+Q_++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function cr(t,e,i){if(w(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||dr(e,r+"Index")||dr(e,r+"Id")||dr(e,r+"Name")||(e[r+"Index"]=0);var a={};return U_(e,function(n,r){var n=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(a[r]=n);var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&u(i.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.queryComponents(h);a[s+"Models"]=c,a[s+"Model"]=c[0]}}),a}function dr(t,e){return t&&t.hasOwnProperty(e)}function fr(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function pr(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function gr(t){return"auto"===t?Oy.domSupported?"html":"richText":t||"html"}function vr(t){var e={main:"",sub:""};return t&&(t=t.split(J_),e.main=t[0]||"",e.sub=t[1]||""),e}function mr(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function yr(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(i.prototype,t),i.extend=this.extend,i.superCall=_r,i.superApply=br,h(i,this),i.superClass=e,i}}function xr(t){var e=["__\x00is_clz",eb++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function _r(t,e){var i=P(arguments,2);return this.superClass.prototype[e].apply(t,i)}function br(t,e,i){return this.superClass.prototype[e].apply(t,i)}function wr(t,e){function i(t){var e=n[t.main];return e&&e[tb]||(e=n[t.main]={},e[tb]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(mr(e),e=vr(e),e.sub){if(e.sub!==tb){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[tb]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=vr(t);var e=[],i=n[t.main];return i&&i[tb]?f(i,function(t,i){i!==tb&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=vr(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=vr(t);var e=n[t.main];return e&&e[tb]},t.parseClassType=vr,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t}function Mr(t){return t>-ub&&ub>t}function Sr(t){return t>ub||-ub>t}function Ir(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function Ar(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)}function Tr(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(Mr(h)&&Mr(c))if(Mr(s))a[0]=0;else{var p=-l/s;p>=0&&1>=p&&(a[f++]=p)}else{var g=c*c-4*h*d;if(Mr(g)){var v=c/h,p=-s/o+v,m=-v/2;p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m)}else if(g>0){var y=lb(g),x=h*s+1.5*o*(-c+y),_=h*s+1.5*o*(-c-y);x=0>x?-sb(-x,db):sb(x,db),_=0>_?-sb(-_,db):sb(_,db);var p=(-s-(x+_))/(3*o);p>=0&&1>=p&&(a[f++]=p)}else{var b=(2*h*s-3*o*c)/(2*lb(h*h*h)),w=Math.acos(b)/3,M=lb(h),S=Math.cos(w),p=(-s-2*M*S)/(3*o),m=(-s+M*(S+cb*Math.sin(w)))/(3*o),I=(-s+M*(S-cb*Math.sin(w)))/(3*o);p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m),I>=0&&1>=I&&(a[f++]=I)}}return f}function Cr(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Mr(o)){if(Sr(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(Mr(h))r[0]=-a/(2*o);else if(h>0){var c=lb(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function Dr(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function kr(t,e,i,n,r,a,o,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;fb[0]=l,fb[1]=u;for(var y=0;1>y;y+=.05)pb[0]=Ir(t,i,r,o,y),pb[1]=Ir(e,n,a,s,y),p=Qy(fb,pb),m>p&&(c=y,m=p);m=1/0;for(var x=0;32>x&&!(hb>v);x++)d=c-v,f=c+v,pb[0]=Ir(t,i,r,o,d),pb[1]=Ir(e,n,a,s,d),p=Qy(pb,fb),d>=0&&m>p?(c=d,m=p):(gb[0]=Ir(t,i,r,o,f),gb[1]=Ir(e,n,a,s,f),g=Qy(gb,fb),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=Ir(t,i,r,o,c),h[1]=Ir(e,n,a,s,c)),lb(m)}function Pr(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function Lr(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Or(t,e,i,n,r){var a=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(Mr(a)){if(Sr(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(Mr(h)){var u=-o/(2*a);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=lb(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function zr(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function Er(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function Br(t,e,i,n,r,a,o,s,l){var u,h=.005,c=1/0;fb[0]=o,fb[1]=s;for(var d=0;1>d;d+=.05){pb[0]=Pr(t,i,r,d),pb[1]=Pr(e,n,a,d);var f=Qy(fb,pb);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(hb>h);p++){var g=u-h,v=u+h;pb[0]=Pr(t,i,r,g),pb[1]=Pr(e,n,a,g);var f=Qy(pb,fb);if(g>=0&&c>f)u=g,c=f;else{gb[0]=Pr(t,i,r,v),gb[1]=Pr(e,n,a,v);var m=Qy(gb,fb);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=Pr(t,i,r,u),l[1]=Pr(e,n,a,u)),lb(c)}function Rr(t,e,i){if(0!==t.length){var n,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],a=vb(a,r[0]),o=mb(o,r[0]),s=vb(s,r[1]),l=mb(l,r[1]);e[0]=a,e[1]=s,i[0]=o,i[1]=l}}function Nr(t,e,i,n,r,a){r[0]=vb(t,i),r[1]=vb(e,n),a[0]=mb(t,i),a[1]=mb(e,n)}function Vr(t,e,i,n,r,a,o,s,l,u){var h,c=Cr,d=Ir,f=c(t,i,r,o,Sb);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;f>h;h++){var p=d(t,i,r,o,Sb[h]);l[0]=vb(p,l[0]),u[0]=mb(p,u[0])}for(f=c(e,n,a,s,Ib),h=0;f>h;h++){var g=d(e,n,a,s,Ib[h]);l[1]=vb(g,l[1]),u[1]=mb(g,u[1])}l[0]=vb(t,l[0]),u[0]=mb(t,u[0]),l[0]=vb(o,l[0]),u[0]=mb(o,u[0]),l[1]=vb(e,l[1]),u[1]=mb(e,u[1]),l[1]=vb(s,l[1]),u[1]=mb(s,u[1])}function Fr(t,e,i,n,r,a,o,s){var l=zr,u=Pr,h=mb(vb(l(t,i,r),1),0),c=mb(vb(l(e,n,a),1),0),d=u(t,i,r,h),f=u(e,n,a,c);o[0]=vb(t,r,d),o[1]=vb(e,a,f),s[0]=mb(t,r,d),s[1]=mb(e,a,f)}function Gr(t,e,i,n,r,a,o,s,l){var u=oe,h=se,c=Math.abs(r-a);if(1e-4>c%_b&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(bb[0]=xb(r)*i+t,bb[1]=yb(r)*n+e,wb[0]=xb(a)*i+t,wb[1]=yb(a)*n+e,u(s,bb,wb),h(l,bb,wb),r%=_b,0>r&&(r+=_b),a%=_b,0>a&&(a+=_b),r>a&&!o?a+=_b:a>r&&o&&(r+=_b),o){var d=a;a=r,r=d}for(var f=0;a>f;f+=Math.PI/2)f>r&&(Mb[0]=xb(f)*i+t,Mb[1]=yb(f)*n+e,u(s,Mb,s),h(l,Mb,l))}function Hr(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0,u=t;if(o>e+s&&o>n+s||e-s>o&&n-s>o||a>t+s&&a>i+s||t-s>a&&i-s>a)return!1;if(t===i)return Math.abs(a-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*a-o+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Wr(t,e,i,n,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>a+c&&h>s+c||e-c>h&&n-c>h&&a-c>h&&s-c>h||u>t+c&&u>i+c&&u>r+c&&u>o+c||t-c>u&&i-c>u&&r-c>u&&o-c>u)return!1;var d=kr(t,e,i,n,r,a,o,s,u,h,null);return c/2>=d}function Zr(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||e-u>l&&n-u>l&&a-u>l||s>t+u&&s>i+u&&s>r+u||t-u>s&&i-u>s&&r-u>s)return!1;var h=Br(t,e,i,n,r,a,s,l,null);return u/2>=h}function Xr(t){return t%=Vb,0>t&&(t+=Vb),t}function Yr(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(Math.abs(n-r)%Fb<1e-4)return!0;if(a){var c=n;n=Xr(r),r=Xr(c)}else n=Xr(n),r=Xr(r);n>r&&(r+=Fb);var d=Math.atan2(l,s);return 0>d&&(d+=Fb),d>=n&&r>=d||d+Fb>=n&&r>=d+Fb}function Ur(t,e,i,n,r,a){if(a>e&&a>n||e>a&&n>a)return 0;if(n===e)return 0;var o=e>n?1:-1,s=(a-e)/(n-e);(1===s||0===s)&&(o=e>n?.5:-.5);var l=s*(i-t)+t;return l===r?1/0:l>r?o:0}function jr(t,e){return Math.abs(t-e)<Wb}function qr(){var t=Xb[0];Xb[0]=Xb[1],Xb[1]=t}function Kr(t,e,i,n,r,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||e>u&&n>u&&a>u&&s>u)return 0;var h=Tr(e,n,a,s,u,Zb);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=Zb[g],m=0===v||1===v?.5:1,y=Ir(t,i,r,o,v);l>y||(0>p&&(p=Cr(e,n,a,s,Xb),Xb[1]<Xb[0]&&p>1&&qr(),c=Ir(e,n,a,s,Xb[0]),p>1&&(d=Ir(e,n,a,s,Xb[1]))),f+=2===p?v<Xb[0]?e>c?m:-m:v<Xb[1]?c>d?m:-m:d>s?m:-m:v<Xb[0]?e>c?m:-m:c>s?m:-m)}return f}function $r(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||e>s&&n>s&&a>s)return 0;var l=Or(e,n,a,s,Zb);if(0===l)return 0;var u=zr(e,n,a);if(u>=0&&1>=u){for(var h=0,c=Pr(e,n,a,u),d=0;l>d;d++){var f=0===Zb[d]||1===Zb[d]?.5:1,p=Pr(t,i,r,Zb[d]);o>p||(h+=Zb[d]<u?e>c?f:-f:c>a?f:-f)}return h}var f=0===Zb[0]||1===Zb[0]?.5:1,p=Pr(t,i,r,Zb[0]);return o>p?0:e>a?f:-f}function Qr(t,e,i,n,r,a,o,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);Zb[0]=-l,Zb[1]=l;var u=Math.abs(n-r);if(1e-4>u)return 0;if(1e-4>u%Hb){n=0,r=Hb;var h=a?1:-1;return o>=Zb[0]+t&&o<=Zb[1]+t?h:0}if(a){var l=n;n=Xr(r),r=Xr(l)}else n=Xr(n),r=Xr(r);n>r&&(r+=Hb);for(var c=0,d=0;2>d;d++){var f=Zb[d];if(f+t>o){var p=Math.atan2(s,f),h=a?1:-1;0>p&&(p=Hb+p),(p>=n&&r>=p||p+Hb>=n&&r>=p+Hb)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Jr(t,e,i,n,r){for(var a=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===Gb.M&&h>1&&(i||(a+=Ur(o,s,l,u,n,r))),1===h&&(o=t[h],s=t[h+1],l=o,u=s),c){case Gb.M:l=t[h++],u=t[h++],o=l,s=u;break;case Gb.L:if(i){if(Hr(o,s,t[h],t[h+1],e,n,r))return!0}else a+=Ur(o,s,t[h],t[h+1],n,r)||0;o=t[h++],s=t[h++];break;case Gb.C:if(i){if(Wr(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,r))return!0}else a+=Kr(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,r)||0;o=t[h++],s=t[h++];break;case Gb.Q:if(i){if(Zr(o,s,t[h++],t[h++],t[h],t[h+1],e,n,r))return!0}else a+=$r(o,s,t[h++],t[h++],t[h],t[h+1],n,r)||0;o=t[h++],s=t[h++];break;case Gb.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],x=Math.cos(v)*p+d,_=Math.sin(v)*g+f;h>1?a+=Ur(o,s,x,_,n,r):(l=x,u=_);var b=(n-d)*g/p+d;if(i){if(Yr(d,f,g,v,v+m,y,e,b,r))return!0}else a+=Qr(d,f,g,v,v+m,y,b,r);o=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case Gb.R:l=o=t[h++],u=s=t[h++];var w=t[h++],M=t[h++],x=l+w,_=u+M;if(i){if(Hr(l,u,x,u,e,n,r)||Hr(x,u,x,_,e,n,r)||Hr(x,_,l,_,e,n,r)||Hr(l,_,l,u,e,n,r))return!0}else a+=Ur(x,u,x,_,n,r),a+=Ur(l,_,l,u,n,r);break;case Gb.Z:if(i){if(Hr(o,s,l,u,e,n,r))return!0}else a+=Ur(o,s,l,u,n,r);o=l,s=u}}return i||jr(s,u)||(a+=Ur(o,s,l,u,n,r)||0),0!==a}function ta(t,e,i){return Jr(t,0,!1,e,i)}function ea(t,e,i,n){return Jr(t,e,!0,i,n)}function ia(t){Tn.call(this,t),this.path=null}function na(t,e,i,n,r,a,o,s,l,u,h){var c=l*(nw/180),d=iw(c)*(t-i)/2+ew(c)*(e-n)/2,f=-1*ew(c)*(t-i)/2+iw(c)*(e-n)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=tw(p),s*=tw(p));var g=(r===a?-1:1)*tw((o*o*s*s-o*o*f*f-s*s*d*d)/(o*o*f*f+s*s*d*d))||0,v=g*o*f/s,m=g*-s*d/o,y=(t+i)/2+iw(c)*v-ew(c)*m,x=(e+n)/2+ew(c)*v+iw(c)*m,_=ow([1,0],[(d-v)/o,(f-m)/s]),b=[(d-v)/o,(f-m)/s],w=[(-1*d-v)/o,(-1*f-m)/s],M=ow(b,w);aw(b,w)<=-1&&(M=nw),aw(b,w)>=1&&(M=0),0===a&&M>0&&(M-=2*nw),1===a&&0>M&&(M+=2*nw),h.addData(u,y,x,o,s,_,M,c,a)}function ra(t){if(!t)return new Nb;for(var e,i=0,n=0,r=i,a=n,o=new Nb,s=Nb.CMD,l=t.match(sw),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(lw)||[],p=f.length,g=0;p>g;g++)f[g]=parseFloat(f[g]);for(var v=0;p>v;){var m,y,x,_,b,w,M,S=i,I=n;switch(d){case"l":i+=f[v++],n+=f[v++],h=s.L,o.addData(h,i,n);break;case"L":i=f[v++],n=f[v++],h=s.L,o.addData(h,i,n);break;case"m":i+=f[v++],n+=f[v++],h=s.M,o.addData(h,i,n),r=i,a=n,d="l";break;case"M":i=f[v++],n=f[v++],h=s.M,o.addData(h,i,n),r=i,a=n,d="L";break;case"h":i+=f[v++],h=s.L,o.addData(h,i,n);break;case"H":i=f[v++],h=s.L,o.addData(h,i,n);break;case"v":n+=f[v++],h=s.L,o.addData(h,i,n);break;case"V":n=f[v++],h=s.L,o.addData(h,i,n);break;case"C":h=s.C,o.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),i=f[v-2],n=f[v-1];break;case"c":h=s.C,o.addData(h,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n),i+=f[v-2],n+=f[v-1];break;case"S":m=i,y=n;var A=o.len(),T=o.data;e===s.C&&(m+=i-T[A-4],y+=n-T[A-3]),h=s.C,S=f[v++],I=f[v++],i=f[v++],n=f[v++],o.addData(h,m,y,S,I,i,n);break;case"s":m=i,y=n;var A=o.len(),T=o.data;e===s.C&&(m+=i-T[A-4],y+=n-T[A-3]),h=s.C,S=i+f[v++],I=n+f[v++],i+=f[v++],n+=f[v++],o.addData(h,m,y,S,I,i,n);break;case"Q":S=f[v++],I=f[v++],i=f[v++],n=f[v++],h=s.Q,o.addData(h,S,I,i,n);break;case"q":S=f[v++]+i,I=f[v++]+n,i+=f[v++],n+=f[v++],h=s.Q,o.addData(h,S,I,i,n);break;case"T":m=i,y=n;var A=o.len(),T=o.data;e===s.Q&&(m+=i-T[A-4],y+=n-T[A-3]),i=f[v++],n=f[v++],h=s.Q,o.addData(h,m,y,i,n);break;case"t":m=i,y=n;var A=o.len(),T=o.data;e===s.Q&&(m+=i-T[A-4],y+=n-T[A-3]),i+=f[v++],n+=f[v++],h=s.Q,o.addData(h,m,y,i,n);break;case"A":x=f[v++],_=f[v++],b=f[v++],w=f[v++],M=f[v++],S=i,I=n,i=f[v++],n=f[v++],h=s.A,na(S,I,i,n,w,M,x,_,b,h,o);break;case"a":x=f[v++],_=f[v++],b=f[v++],w=f[v++],M=f[v++],S=i,I=n,i+=f[v++],n+=f[v++],h=s.A,na(S,I,i,n,w,M,x,_,b,h,o)}}("z"===d||"Z"===d)&&(h=s.Z,o.addData(h),i=r,n=a),e=h}return o.toStatic(),o}function aa(t,e){var i=ra(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(i.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){Jb(i,t),this.dirty(!0)},e}function oa(t,e){return new ia(aa(t,e))}function sa(t,e){return ia.extend(aa(t,e))}function la(t,e){for(var i=[],n=t.length,r=0;n>r;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new ia(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o}function ua(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function ha(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var a=vw(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;(i?o:o-1)>s;s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(n=gw(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function ca(t,e,i){if(e){var n=e.x1,r=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=r,t.y1=a,t.y2=o;var s=i&&i.lineWidth;s&&(xw(2*n)===xw(2*r)&&(t.x1=t.x2=fa(n,s,!0)),xw(2*a)===xw(2*o)&&(t.y1=t.y2=fa(a,s,!0)))}}function da(t,e,i){if(e){var n=e.x,r=e.y,a=e.width,o=e.height;t.x=n,t.y=r,t.width=a,t.height=o;var s=i&&i.lineWidth;s&&(t.x=fa(n,s,!0),t.y=fa(r,s,!0),t.width=Math.max(fa(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(fa(r+o,s,!1)-t.y,0===o?0:1))}}function fa(t,e,i){if(!e)return t;var n=xw(2*t);return(n+xw(e))%2===0?n/2:(n+(i?1:-1))/2}function pa(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?Ar:Ir)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Ar:Ir)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Lr:Pr)(t.x1,t.cpx1,t.x2,e),(i?Lr:Pr)(t.y1,t.cpy1,t.y2,e)]}function ga(t){Tn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function va(t){return ia.extend(t)}function ma(t,e){return sa(t,e)}function ya(t,e){Gw[t]=e}function xa(t){return Gw.hasOwnProperty(t)?Gw[t]:void 0}function _a(t,e,i,n){var r=oa(t,e);return i&&("center"===n&&(i=wa(i,r.getBoundingRect())),Ma(r,i)),r}function ba(t,e,i){var n=new Cn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(wa(e,r))}}});return n}function wa(t,e){var i,n=e.width/e.height,r=t.height*n;r<=t.width?i=t.height:(r=t.width,i=r/n);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}function Ma(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function Sa(t){return ca(t.shape,t.shape,t.style),t}function Ia(t){return da(t.shape,t.shape,t.style),t}function Aa(t){return null!=t&&"none"!==t}function Ta(t){if("string"!=typeof t)return t;var e=Zw.get(t);return e||(e=ni(t,-.1),1e4>Xw&&(Zw.set(t,e),Xw++)),e}function Ca(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var r in e)null!=e[r]&&(i[r]=n[r]);i.fill=n.fill,i.stroke=n.stroke}}function Da(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var r=t,a=t.style;n&&(r=i.addHover(t),a=r.style),Qa(a),n||Ca(r),a.extendFrom(e),ka(a,e,"fill"),ka(a,e,"stroke"),$a(a),n||(t.dirty(!1),t.z2+=Ew)}}}function ka(t,e,i){!Aa(e[i])&&Aa(t[i])&&(t[i]=Ta(t[i]))}function Pa(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(Qa(i),t.setStyle(n),$a(i));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===Ew&&(t.z2=r)}}function La(t,e,i){var n,r=Nw,a=Nw;t.__highlighted&&(r=Rw,n=!0),e(t,i),t.__highlighted&&(a=Rw,n=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function Oa(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Pa(t),Da(t))}function za(t){!Na(this,t)&&!this.__highByOuter&&La(this,Da)}function Ea(t){!Na(this,t)&&!this.__highByOuter&&La(this,Pa)}function Ba(t){this.__highByOuter|=1<<(t||0),La(this,Da)}function Ra(t){!(this.__highByOuter&=~(1<<(t||0)))&&La(this,Pa)}function Na(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Va(t,e){Fa(t,!0),La(t,Oa,e)}function Fa(t,e){var i=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",za)[n]("mouseout",Ea),t[n]("emphasis",Ba)[n]("normal",Ra),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Ga(t){return!(!t||!t.__highDownDispatcher)}function Ha(t){var e=Fw[t];return null==e&&32>=Vw&&(e=Fw[t]=Vw++),e}function Wa(t,e,i,n,r,a,o){r=r||zw;var s,l=r.labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=b(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=c?s:null,p=d?D(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(Xa(t,i,a,r),Xa(e,n,o,r,!0)),t.text=f,e.text=p}function Za(t,e,i){var n=t.style;e&&(Qa(n),t.setStyle(e),$a(n)),n=t.__hoverStl,i&&n&&(Qa(n),o(n,i),$a(n))}function Xa(t,e,i,n,r){return Ua(t,e,n,r),i&&o(t,i),t}function Ya(t,e,i){var n,r={isRectText:!0};i===!1?n=!0:r.autoColor=i,Ua(t,e,r,n)}function Ua(t,e,i,n){if(i=i||zw,i.isRectText){var r;i.getTextPosition?r=i.getTextPosition(e,n):(r=e.getShallow("position")||(n?null:"inside"),"outside"===r&&(r="top")),t.textPosition=r,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 o,s=e.ecModel,l=s&&s.option.textStyle,u=ja(e);if(u){o={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);qa(o[h]={},c,l,i,n)}}return t.rich=o,qa(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function ja(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||zw).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function qa(t,e,i,n,r,a){i=!r&&i||zw,t.textFill=Ka(e.getShallow("color"),n)||i.color,t.textStroke=Ka(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=D(e.getShallow("textBorderWidth"),i.textBorderWidth),r||(a&&(t.insideRollbackOpt=n,$a(t)),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=Ka(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Ka(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 Ka(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function $a(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var r=n.autoColor,a=n.isRectText,o=n.useInsideStyle,s=o!==!1&&(o===!0||a&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function Qa(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Ja(t,e){var i=e&&e.getModel("textStyle");return z([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 to(t,e,i,n,r,a){"function"==typeof r&&(a=r,r=null);var o=n&&n.isAnimationEnabled();if(o){var s=t?"Update":"",l=n.getShallow("animationDuration"+s),u=n.getShallow("animationEasing"+s),h=n.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(i,l,h||0,u,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function eo(t,e,i,n,r){to(!0,t,e,i,n,r)}function io(t,e,i,n,r){to(!1,t,e,i,n,r)}function no(t,e){for(var i=ze([]);t&&t!==e;)Be(i,t.getLocalTransform(),i),t=t.parent;return i}function ro(t,e,i){return e&&!d(e)&&(e=yx.getLocalTransform(e)),i&&(e=Fe([],e)),ae([],t,e)}function ao(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=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?-r:"bottom"===t?r:0];return a=ro(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function oo(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:W(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=r(t);t.attr(r(e)),eo(t,n,i,t.dataIndex)}}})}}function so(t,e){return p(t,function(t){var i=t[0];i=Lw(i,e.x),i=Ow(i,e.x+e.width);var n=t[1];return n=Lw(n,e.y),n=Ow(n,e.y+e.height),[i,n]})}function lo(t,e){var i=Lw(t.x,e.x),n=Ow(t.x+t.width,e.x+e.width),r=Lw(t.y,e.y),a=Ow(t.y+t.height,e.y+e.height);return n>=i&&a>=r?{x:i,y:r,width:n-i,height:a-r}:void 0}function uo(t,e,i){e=o({rectHover:!0},e);var n=e.style={strokeNoScale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(n.image=t.slice(8),s(n,i),new Cn(e)):_a(t.replace("path://",""),e,i,"center"):void 0}function ho(t,e,i,n,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(co(t,e,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function co(t,e,i,n,r,a,o,s){var l=i-t,u=n-e,h=o-r,c=s-a,d=fo(h,c,l,u);if(po(d))return!1;var f=t-r,p=e-a,g=fo(f,p,l,u)/d;if(0>g||g>1)return!1;var v=fo(f,p,h,c)/d;return 0>v||v>1?!1:!0}function fo(t,e,i,n){return t*n-i*e}function po(t){return 1e-6>=t&&t>=-1e-6
+}function go(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function vo(t,e,i){for(var n=0;n<e.length&&(!e[n]||(t=t&&"object"==typeof t?t[e[n]]:null,null!=t));n++);return null==t&&i&&(t=i.get(e)),t}function mo(t,e){var i=Qw(t).getParent;return i?i.call(t,e):t.parentModel}function yo(t){return[t||"",Jw++,Math.random().toFixed(5)].join("_")}function xo(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=vr(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var a=vr(i).main;t.hasSubTypes(i)&&e[a]&&(r=e[a](n))}return r},t}function _o(t,e){function i(t){var i={},a=[];return f(t,function(o){var s=n(i,o),l=s.originalDeps=e(o),h=r(l,t);s.entryCount=h.length,0===s.entryCount&&a.push(o),f(h,function(t){u(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);u(e.successor,t)<0&&e.successor.push(o)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var i=[];return f(t,function(t){u(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,r){function a(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function o(t){h[t]=!0,a(t)}if(t.length){var s=i(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(n.call(r,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?o:a)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function bo(t){return t.replace(/^\s+|\s+$/g,"")}function wo(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>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])/r*a+i[0]}function Mo(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?bo(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function So(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Io(t){return t.sort(function(t,e){return t-e}),t}function Ao(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 To(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function Co(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function Do(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var r=Math.pow(10,i),a=p(t,function(t){return(isNaN(t)?0:t)/n*r*100}),o=100*r,s=p(a,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(a,function(t,e){return t-s[e]});o>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function ko(t){var e=2*Math.PI;return(t%e+e)%e}function Po(t){return t>-tM&&tM>t}function Lo(t){if(t instanceof Date)return t;if("string"==typeof t){var e=iM.exec(t);if(!e)return new Date(0/0);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 new Date(null==t?0/0:Math.round(t))}function Oo(t){return Math.pow(10,zo(t))}function zo(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Eo(t,e){var i,n=zo(t),r=Math.pow(10,n),a=t/r;return i=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,t=i*r,n>=-20?+t.toFixed(0>n?-n:0):t}function Bo(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),r=+t[n-1],a=i-n;return a?r+a*(t[n]-r):r}function Ro(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,r=0;r<t.length;){for(var a=t[r].interval,o=t[r].close,s=0;2>s;s++)a[s]<=i&&(a[s]=i,o[s]=s?1:1-n),i=a[s],n=o[s];a[0]===a[1]&&o[0]*o[1]!==1?t.splice(r,1):r++}return t}function No(t){return t-parseFloat(t)>=0}function Vo(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Fo(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 Go(t){return null==t?"":(t+"").replace(aM,function(t,e){return oM[e]})}function Ho(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=sM[a];t=t.replace(lM(o),lM(o,0))}for(var s=0;n>s;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(lM(sM[l],s),i?Go(u):u)}return t}function Wo(t,e,i){return f(e,function(e,n){t=t.replace("{"+n+"}",i?Go(e):e)}),t}function Zo(t,e){t=w(t)?{color:t,extraCssText:e}:t||{};var i=t.color,n=t.type,e=t.extraCssText,r=t.renderMode||"html",a=t.markerId||"X";return i?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Go(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Go(i)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:i}}:""}function Xo(t,e){return t+="","0000".substr(0,e-t.length)+t}function Yo(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=Lo(e),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),u=n["get"+r+"Minutes"](),h=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",Xo(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Xo(s,2)).replace("d",s).replace("hh",Xo(l,2)).replace("h",l).replace("mm",Xo(u,2)).replace("m",u).replace("ss",Xo(h,2)).replace("s",h).replace("SSS",Xo(c,3))}function Uo(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function jo(t){return Xi(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function qo(t,e,i,n,r,a,o,s){return Xi(t,e,i,n,r,s,a,o)}function Ko(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=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 v=f.width+(g?-g.x+f.x:0);h=a+v,h>n||l.newline?(a=0,h=v,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=o+m,c>r||l.newline?(a+=s+i,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+i:o=c+i)})}function $o(t,e,i){i=rM(i||0);var n=e.width,r=e.height,a=Mo(t.left,n),o=Mo(t.top,r),s=Mo(t.right,n),l=Mo(t.bottom,r),u=Mo(t.width,n),h=Mo(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/r?u=.8*n:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=r-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":o=r/2-h/2-i[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new Ai(a+i[3],o+i[0],u,h);return p.margin=i,p}function Qo(t,e,i,n,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(a||o){var u;if("raw"===l)u="group"===t.type?new Ai(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}e=$o(s({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=o?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Jo(t,e,i){function n(i,n){var o={},l=0,u={},h=0,c=2;if(cM(i,function(e){u[e]=t[e]}),cM(i,function(t){r(e,t)&&(o[t]=u[t]=e[t]),a(o,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(h!==c&&l){if(l>=c)return o;for(var d=0;d<i.length;d++){var f=i[d];if(!r(o,f)&&r(t,f)){o[f]=t[f];break}}return o}return u}function r(t,e){return t.hasOwnProperty(e)}function a(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,i){cM(t,function(t){e[t]=i[t]})}!M(i)&&(i={});var s=i.ignoreSize;!_(s)&&(s=[s,s]);var l=n(fM[0],0),u=n(fM[1],1);o(fM[0],t,l),o(fM[1],t,u)}function ts(t){return es({},t)}function es(t,e){return e&&t&&cM(dM,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function is(t){var e=[];return f(mM.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return vr(t).main}),"dataset"!==t&&u(e,"dataset")<=0&&e.unshift("dataset"),e}function ns(t,e){for(var i=t.length,n=0;i>n;n++)if(t[n].length>e)return t[n];return t[i-1]}function rs(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===IM?{}:[]),this.sourceFormat=t.sourceFormat||AM,this.seriesLayoutBy=t.seriesLayoutBy||CM,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function as(t){var e=t.option.source,i=AM;if(I(e))i=TM;else if(_(e)){0===e.length&&(i=MM);for(var n=0,r=e.length;r>n;n++){var a=e[n];if(null!=a){if(_(a)){i=MM;break}if(M(a)){i=SM;break}}}}else if(M(e)){for(var o in e)if(e.hasOwnProperty(o)&&d(e[o])){i=IM;break}}else if(null!=e)throw new Error("Invalid data");PM(t).sourceFormat=i}function os(t){return PM(t).source}function ss(t){PM(t).datasetMap=N()}function ls(t){var e=t.option,i=e.data,n=I(i)?TM:wM,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=gs(t);if(l){var u=l.option;i=u.source,n=PM(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=us(i,n,a,o,s);PM(t).source=new rs({data:i,fromDataset:r,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function us(t,e,i,n,r){if(!t)return{dimensionsDefine:hs(r)};var a,o;if(e===MM)"auto"===n||null==n?cs(function(t){null!=t&&"-"!==t&&(w(t)?null==o&&(o=1):o=0)},i,t,10):o=n?1:0,r||1!==o||(r=[],cs(function(t,e){r[e]=null!=t?t:""},i,t)),a=r?r.length:i===DM?t.length:t[0]?t[0].length:null;else if(e===SM)r||(r=ds(t));else if(e===IM)r||(r=[],f(t,function(t,e){r.push(e)}));else if(e===wM){var s=ir(t[0]);a=_(s)&&s.length||1}return{startIndex:o,dimensionsDefine:hs(r),dimensionsDetectCount:a}}function hs(t){if(t){var e=N();return p(t,function(t){if(t=o({},M(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t})}}function cs(t,e,i,n){if(null==n&&(n=1/0),e===DM)for(var r=0;r<i.length&&n>r;r++)t(i[r]?i[r][0]:null,r);else for(var a=i[0]||[],r=0;r<a.length&&n>r;r++)t(a[r],r)}function ds(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return f(e,function(t,e){n.push(e)}),n}}function fs(t,e,i){function n(t,e,i){for(var n=0;i>n;n++)t.push(e+n)}function r(t){var e=t.dimsDef;return e?e.length:1}var a={},o=gs(e);if(!o||!t)return a;var s,l,u=[],h=[],c=e.ecModel,d=PM(c).datasetMap,p=o.uid+"_"+i.seriesLayoutBy;t=t.slice(),f(t,function(e,i){!M(e)&&(t[i]={name:e}),"ordinal"===e.type&&null==s&&(s=i,l=r(t[i])),a[e.name]=[]});var g=d.get(p)||d.set(p,{categoryWayDim:l,valueWayDim:0});return f(t,function(t,e){var i=t.name,o=r(t);if(null==s){var l=g.valueWayDim;n(a[i],l,o),n(h,l,o),g.valueWayDim+=o}else if(s===e)n(a[i],0,o),n(u,0,o);else{var l=g.categoryWayDim;n(a[i],l,o),n(h,l,o),g.categoryWayDim+=o}}),u.length&&(a.itemName=u),h.length&&(a.seriesName=h),a}function ps(t,e,i){var n={},r=gs(t);if(!r)return n;var a,o=e.sourceFormat,s=e.dimensionsDefine;(o===SM||o===IM)&&f(s,function(t,e){"name"===(M(t)?t.name:t)&&(a=e)});var l=function(){function t(t){return null!=t.v&&null!=t.n}for(var n={},r={},l=[],u=0,h=Math.min(5,i);h>u;u++){var c=ms(e.data,o,e.seriesLayoutBy,s,e.startIndex,u);l.push(c);var d=c===kM.Not;if(d&&null==n.v&&u!==a&&(n.v=u),(null==n.n||n.n===n.v||!d&&l[n.n]===kM.Not)&&(n.n=u),t(n)&&l[n.n]!==kM.Not)return n;d||(c===kM.Might&&null==r.v&&u!==a&&(r.v=u),(null==r.n||r.n===r.v)&&(r.n=u))}return t(n)?n:t(r)?r:null}();if(l){n.value=l.v;var u=null!=a?a:l.n;n.itemName=[u],n.seriesName=[u]}return n}function gs(t){var e=t.option,i=e.data;return i?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function vs(t,e){return ms(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function ms(t,e,i,n,r,a){function o(t){var e=w(t);return null!=t&&isFinite(t)&&""!==t?e?kM.Might:kM.Not:e&&"-"!==t?kM.Must:void 0}var s,l=5;if(I(t))return kM.Not;var u,h;if(n){var c=n[a];M(c)?(u=c.name,h=c.type):w(c)&&(u=c)}if(null!=h)return"ordinal"===h?kM.Must:kM.Not;if(e===MM)if(i===DM){for(var d=t[a],f=0;f<(d||[]).length&&l>f;f++)if(null!=(s=o(d[r+f])))return s}else for(var f=0;f<t.length&&l>f;f++){var p=t[r+f];if(p&&null!=(s=o(p[a])))return s}else if(e===SM){if(!u)return kM.Not;for(var f=0;f<t.length&&l>f;f++){var g=t[f];if(g&&null!=(s=o(g[u])))return s}}else if(e===IM){if(!u)return kM.Not;var d=t[u];if(!d||I(d))return kM.Not;for(var f=0;f<d.length&&l>f;f++)if(null!=(s=o(d[f])))return s}else if(e===wM)for(var f=0;f<t.length&&l>f;f++){var g=t[f],v=ir(g);if(!_(v))return kM.Not;if(null!=(s=o(v[a])))return s}return kM.Not}function ys(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}function xs(t,e){var i=t.color&&!t.colorLayer;f(e,function(e,a){"colorLayer"===a&&i||mM.hasClass(a)||("object"==typeof e?t[a]=t[a]?r(t[a],e,!1):n(e):null==t[a]&&(t[a]=e))})}function _s(t){t=t,this.option={},this.option[LM]=1,this._componentsMap=N({series:[]}),this._seriesIndices,this._seriesIndicesMap,xs(t,this._theme.option),r(t,xM,!1),this.mergeOption(t)}function bs(t,e){_(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function ws(t,e,i){var n=e.type?e.type:i?i.subType:mM.determineSubType(t,e);return n}function Ms(t,e){t._seriesIndicesMap=N(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function Ss(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function Is(t){f(zM,function(e){this[e]=y(t[e],t)},this)}function As(){this._coordinateSystems=[]}function Ts(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Cs(t,e,i){var n,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;BM(l,function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),BM([r].concat(a).concat(p(o,function(t){return t.option})),function(t){BM(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function Ds(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return f(t,function(t,e){var i=e.match(FM);if(i&&i[1]&&i[2]){var a=i[1],o=i[2].toLowerCase();ks(n[o],t,a)||(r=!1)}}),r}function ks(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function Ps(t,e){return t.join(",")===e.join(",")}function Ls(t,e){e=e||{},BM(e,function(e,i){if(null!=e){var n=t[i];if(mM.hasClass(i)){e=tr(e),n=tr(n);var r=rr(n,e);t[i]=NM(r,function(t){return t.option&&t.exist?VM(t.exist,t.option,!0):t.exist||t.option})}else t[i]=VM(n,e,!0)}})}function Os(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=WM.length;n>i;i++){var a=WM[i],o=e.normal,s=e.emphasis;o&&o[a]&&(t[a]=t[a]||{},t[a].normal?r(t[a].normal,o[a]):t[a].normal=o[a],o[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?r(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function zs(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,r=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,s(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Es(t){zs(t,"itemStyle"),zs(t,"lineStyle"),zs(t,"areaStyle"),zs(t,"label"),zs(t,"labelLine"),zs(t,"upperLabel"),zs(t,"edgeLabel")}function Bs(t,e){var i=HM(t)&&t[e],n=HM(i)&&i.textStyle;if(n)for(var r=0,a=$_.length;a>r;r++){var e=$_[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Rs(t){t&&(Es(t),Bs(t,"label"),t.emphasis&&Bs(t.emphasis,"label"))}function Ns(t){if(HM(t)){Os(t),Es(t),Bs(t,"label"),Bs(t,"upperLabel"),Bs(t,"edgeLabel"),t.emphasis&&(Bs(t.emphasis,"label"),Bs(t.emphasis,"upperLabel"),Bs(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Os(e),Rs(e));var i=t.markLine;i&&(Os(i),Rs(i));var n=t.markArea;n&&Rs(n);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!I(a))for(var o=0;o<a.length;o++)Rs(a[o]);f(t.categories,function(t){Es(t)})}if(r&&!I(r))for(var o=0;o<r.length;o++)Rs(r[o]);var e=t.markPoint;if(e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Rs(s[o]);var i=t.markLine;if(i&&i.data)for(var l=i.data,o=0;o<l.length;o++)_(l[o])?(Rs(l[o][0]),Rs(l[o][1])):Rs(l[o]);"gauge"===t.type?(Bs(t,"axisLabel"),Bs(t,"title"),Bs(t,"detail")):"treemap"===t.type?(zs(t.breadcrumb,"itemStyle"),f(t.levels,function(t){Es(t)})):"tree"===t.type&&Es(t.leaves)}}function Vs(t){return _(t)?t:t?[t]:[]}function Fs(t){return(_(t)?t[0]:t)||{}}function Gs(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&(i=i&&i[e[n]],null!=i);n++);return i}function Hs(t,e,i,n){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)r=e[o],null==a[r]&&(a[r]={}),a=a[r];(n||null==a[e[o]])&&(a[e[o]]=i)}function Ws(t){f(XM,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function Zs(t){f(t,function(e,i){var n=[],r=[0/0,0/0],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,function(a,l,u){var h=o.get(e.stackedDimension,u);if(isNaN(h))return r;var c,d;s?d=o.getRawIndex(u):c=o.get(e.stackedByDimension,u);for(var f=0/0,p=i-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&v>0||0>=h&&0>v){h+=v,f=v;break}}}return n[0]=h,n[1]=f,n});o.hostModel.setData(l),e.data=l})}function Xs(t,e){rs.isInstance(t)||(t=rs.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===TM&&(this._offset=0,this._dimSize=e,this._data=i);var r=KM[n===MM?n+"_"+t.seriesLayoutBy:n];o(this,r)}function Ys(){return this._data.length}function Us(t){return this._data[t]}function js(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function qs(t,e,i){return null!=i?t[i]:t}function Ks(t,e,i,n){return $s(t[n],this._dimensionInfos[e])}function $s(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=+Lo(t)),null==t||""===t?0/0:+t}function Qs(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(r=s.name,a=s.index),$M[o](n,e,a,r)}}}function Js(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===wM||n===SM){var r=t.getRawDataItem(e);return n!==wM||M(r)||(r=null),r?r[i]:void 0}}}function tl(t){return new el(t)}function el(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 il(t,e,i,n,r,a){iS.reset(i,n,r,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:iS.next},t.context)}function nl(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var i,n;!e&&t._reset&&(i=t._reset(t.context),i&&i.progress&&(n=i.forceFirstProgress,i=i.progress),_(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),n}function rl(t){var e=t.name;or(t)||(t.name=al(t)||e)}function al(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return f(i,function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)}),n.join(" ")}function ol(t){return t.model.getRawData().count()}function sl(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),ll}function ll(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ul(t,e){f(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,x(hl,e))})}function hl(t){var e=cl(t);e&&e.setOutputEnd(this.count())}function cl(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}function dl(){this.group=new jx,this.uid=yo("viewChart"),this.renderTask=tl({plan:gl,reset:vl}),this.renderTask.context={view:this}}function fl(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Ga(t)))for(var n=0,r=t.childCount();r>n;n++)fl(t.childAt(n),e,i)}function pl(t,e,i){var n=ur(t,e),r=e&&null!=e.highlightKey?Ha(e.highlightKey):null;null!=n?f(tr(n),function(e){fl(t.getItemGraphicEl(e),i,r)}):t.eachItemGraphicEl(function(t){fl(t,i,r)})}function gl(t){return uS(t.model)}function vl(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&lS(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,i,n,r),cS[l]}function ml(t,e,i){function n(){h=(new Date).getTime(),c=null,t.apply(o,s||[])}var r,a,o,s,l,u=0,h=0,c=null;e=e||0;var d=function(){r=(new Date).getTime(),o=this,s=arguments;var t=l||e,d=l||i;l=null,a=r-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(n,t):a>=0?n():c=setTimeout(n,-a),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function yl(t,e,i,n){var r=t[e];if(r){var a=r[dS]||r,o=r[pS],s=r[fS];if(s!==i||o!==n){if(null==i||!n)return t[e]=a;r=t[e]=ml(a,i,"debounce"===n),r[dS]=a,r[pS]=n,r[fS]=i}return r}}function xl(t,e){var i=t[e];i&&i[dS]&&(t[e]=i[dS])}function _l(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=N()}function bl(t,e,i,n,r){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var o;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){a(r,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),bS(u,n);var d=t.getPerformArgs(u,r.block);c.each(function(t){t.perform(d)}),o|=u.perform(d)}else l&&l.each(function(s){a(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),bS(s,n),o|=s.perform(l)})}}),t.unfinished|=o}function wl(t,e,i,n,r){function a(i){var a=i.uid,s=o.get(a)||o.set(a,tl({plan:Cl,reset:Dl,count:Pl}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Ll(t,i,s)}var o=i.seriesTaskMap||(i.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(a):s?n.eachRawSeriesByType(s,a):l&&l(n,r).each(a);var u=t._pipelineMap;o.each(function(t,e){u.get(e)||(t.dispose(),o.removeKey(e))})}function Ml(t,e,i,n,r){function a(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,tl({reset:Il,onDirty:Tl})),o.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=o,n.__block=h,Ll(t,e,n)}var o=i.overallTask=i.overallTask||tl({reset:Sl});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var s=o.agentStubMap=o.agentStubMap||N(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,r).each(a):(h=!1,f(n.getSeries(),a));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),s.removeKey(e))})}function Sl(t){t.overallReset(t.ecModel,t.api,t.payload)}function Il(t){return t.overallProgress&&Al}function Al(){this.agent.dirty(),this.getDownstream().dirty()}function Tl(){this.agent&&this.agent.dirty()}function Cl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Dl(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=tr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return kl(e)}):wS}function kl(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(n,a);else r&&r.progress&&r.progress(e,n)}}function Pl(t){return t.data.count()}function Ll(t,e,i){var n=e.uid,r=t._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function Ol(t){MS=null;try{t(SS,IS)}catch(e){}return MS}function zl(t,e){for(var i in e.prototype)t[i]=F}function El(t){if(w(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Bl(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Rl(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,r)}i=i.nextSibling}}function Nl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Vl(t){for(var e=z(t).split(OS),i=[],n=0;n<e.length;n+=2){var r=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([r,a])}return i}function Fl(t,e,i,n){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(Hl(t,e),o(r,Wl(t)),!n))for(var s in BS)if(BS.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(r[BS[s]]=l)}var u=a?"textFill":"fill",h=a?"textStroke":"stroke";e.style=e.style||new n_;var c=e.style;null!=r.fill&&c.set(u,Gl(r.fill,i)),null!=r.stroke&&c.set(h,Gl(r.stroke,i)),f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&c.set(e,parseFloat(r[t]))}),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=r[t]&&c.set(t,r[t])}),r.lineDash&&(e.style.lineDash=z(r.lineDash).split(OS)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=r}function Gl(t,e){var i=e&&t&&t.match(RS);if(i){var n=z(i[1]),r=e[n];return r}return t}function Hl(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,r=[];i.replace(NS,function(t,e,i){r.push(e,i)});for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(n=n||Oe(),s){case"translate":o=z(o).split(OS),Re(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=z(o).split(OS),Ve(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=z(o).split(OS),Ne(n,n,parseFloat(o[0]));break;case"skew":o=z(o).split(OS),console.warn("Skew transform is not supported yet");break;case"matrix":var o=z(o).split(OS);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}e.setLocalTransform(n)}}function Wl(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};VS.lastIndex=0;for(var r;null!=(r=VS.exec(e));)n[r[1]]=r[2];for(var a in BS)BS.hasOwnProperty(a)&&null!=n[a]&&(i[BS[a]]=n[a]);return i}function Zl(t,e,i){var n=e/t.width,r=i/t.height,a=Math.min(n,r),o=[a,a],s=[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2];return{scale:o,position:s}}function Xl(t,e){return function(i,n,r){(e||!this._disposed)&&(i=i&&i.toLowerCase(),ex.prototype[t].call(this,i,n,r))}}function Yl(){ex.call(this)}function Ul(t,e,i){function r(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=bI[e]),this.id,this.group,this._dom=t;var a="canvas",o=this._zr=qn(t,{renderer:i.renderer||a,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=ml(y(o.flush,o),17);var e=n(e);e&&UM(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new As;var s=this._api=cu(this);zi(_I,r),zi(mI,r),this._scheduler=new _l(this,s,mI,_I),ex.call(this,this._ecEventProcessor=new du),this._messageCenter=new Yl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),eu(o,this),E(this)}function jl(t,e,i){if(!this._disposed){var n,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=cr(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(n=s[t](r,e,i)))return n}}}function ql(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),iu(t,"component",e,i),iu(t,"chart",e,i),i.plan()}function Kl(t,e,i,n,r){function a(n){n&&n.__alive&&n[e]&&n[e](n.__model,o,t._api,i)}var o=t._model;if(!n)return void ZS(t._componentsViews.concat(t._chartsViews),a);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};r&&(l.subType=r);var u=i.excludeSeriesId;null!=u&&(u=N(tr(u))),o&&o.eachComponent(l,function(e){u&&null!=u.get(e.id)||a(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function $l(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Ql(t,e){var i=t.type,n=t.escapeConnect,r=gI[i],a=r.actionInfo,l=(a.update||"update").split(":"),u=l.pop();l=null!=l[0]&&US(l[0]),this[uI]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=p(t.batch,function(e){return e=s(o({},e),t),e.batch=null,e}));var d,f=[],g="highlight"===i||"downplay"===i;ZS(h,function(t){d=r.action(t,this._model,this._api),d=d||o({},t),d.type=a.event||d.type,f.push(d),g?Kl(this,u,t,"series"):l&&Kl(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[hI]?(ql(this),fI.update.call(this,t),this[hI]=!1):fI[u].call(this,t)),d=c?{type:a.event||i,escapeConnect:n,batch:f}:f[0],this[uI]=!1,!e&&this._messageCenter.trigger(d.type,d)}function Jl(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Ql.call(this,i,t)}}function tu(t){!t&&this.trigger("updated")}function eu(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[hI]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function iu(t,e,i,n){function r(t){var e="_ec_"+t.id+"_"+t.type,r=s[e];if(!r){var h=US(t.type),c=a?aS.getClass(h.main,h.sub):dl.getClass(h.sub);r=new c,r.init(i,u),s[e]=r,o.push(r),l.add(r.group)}t.__viewId=r.__id=e,r.__alive=!0,r.__model=t,r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!a&&n.prepareView(r,t,i,u)}for(var a="component"===e,o=a?t._componentsViews:t._chartsViews,s=a?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<o.length;h++)o[h].__alive=!1;a?i.eachComponent(function(t,e){"series"!==t&&r(e)}):i.eachSeries(r);for(var h=0;h<o.length;){var c=o[h];c.__alive?h++:(!a&&c.renderTask.dispose(),l.remove(c.group),c.dispose(i,u),o.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function nu(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function ru(t,e,i,n){au(t,e,i,n),ZS(t._chartsViews,function(t){t.__alive=!1}),ou(t,e,i,n),ZS(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function au(t,e,i,n,r){ZS(r||t._componentsViews,function(t){var r=t.__model;t.render(r,e,i,n),hu(r,t)})}function ou(t,e,i,n,r){var a,o=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;o.updatePayload(s,n),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),i.group.silent=!!e.get("silent"),hu(e,i),uu(e,i)}),o.unfinished|=a,lu(t,e),mS(t._zr.dom,e)}function su(t,e){ZS(xI,function(i){i(t,e)})}function lu(t,e){var i=t._zr,n=i.storage,r=0;n.traverse(function(){r++}),r>e.get("hoverLayerThreshold")&&!Oy.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse(function(t){t.useHoverLayer=!0
+})}})}function uu(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 hu(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 cu(t){var e=t._coordSysMgr;return o(new Is(t),{getCoordinateSystems:y(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 du(){this.eventInfo}function fu(t){function e(t,e){for(var i=0;i<t.length;i++){var n=t[i];n[a]=e}}var i=0,n=1,r=2,a="__connectUpdateStatus";ZS(vI,function(o,s){t._messageCenter.on(s,function(o){if(SI[t.group]&&t[a]!==i){if(o&&o.escapeConnect)return;var s=t.makeActionFromEvent(o),l=[];ZS(MI,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,i),ZS(l,function(t){t[a]!==n&&t.dispatchAction(s)}),e(l,r)}})})}function pu(t,e,i){var n=yu(t);if(n)return n;var r=new Ul(t,e,i);return r.id="ec_"+II++,MI[r.id]=r,fr(t,TI,r.id),fu(r),r}function gu(t){if(_(t)){var e=t;t=null,ZS(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+AI++,ZS(e,function(e){e.group=t})}return SI[t]=!0,t}function vu(t){SI[t]=!1}function mu(t){"string"==typeof t?t=MI[t]:t instanceof Ul||(t=yu(t)),t instanceof Ul&&!t.isDisposed()&&t.dispose()}function yu(t){return MI[pr(t,TI)]}function xu(t){return MI[t]}function _u(t,e){bI[t]=e}function bu(t){yI.push(t)}function wu(t,e){Du(mI,t,e,$S)}function Mu(t){xI.push(t)}function Su(t,e,i){"function"==typeof e&&(i=e,e="");var n=YS(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,WS(cI.test(n)&&cI.test(e)),gI[n]||(gI[n]={action:i,actionInfo:t}),vI[e]=n}function Iu(t,e){As.register(t,e)}function Au(t){var e=As.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function Tu(t,e){Du(_I,t,e,eI,"layout")}function Cu(t,e){Du(_I,t,e,rI,"visual")}function Du(t,e,i,n,r){(XS(e)||YS(e))&&(i=e,e=n);var a=_l.wrapStageHandler(i,r);return a.__prio=e,a.__raw=i,t.push(a),a}function ku(t,e){wI[t]=e}function Pu(t){return mM.extend(t)}function Lu(t){return aS.extend(t)}function Ou(t){return rS.extend(t)}function zu(t){return dl.extend(t)}function Eu(t){i("createCanvas",t)}function Bu(t,e,i){GS.registerMap(t,e,i)}function Ru(t){var e=GS.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}function Nu(t){return t}function Vu(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||Nu,this._newKeyGetter=n||Nu,this.context=r}function Fu(t,e,i,n,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[n](t[a],a),s=e[o];null==s?(i.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}function Gu(t){var e={},i=e.encode={},n=N(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};f(t.dimensions,function(e){var s=t.getDimensionInfo(e),l=s.coordDim;if(l){var u=s.coordDimIndex;Hu(i,l)[u]=e,s.isExtraCoord||(n.set(l,1),Zu(s.type)&&(r[0]=e),Hu(o.encode,l)[u]=s.index),s.defaultTooltip&&a.push(e)}kI.each(function(t,e){var n=Hu(i,e),r=s.otherDims[e];null!=r&&r!==!1&&(n[r]=s.name)})});var s=[],l={};n.each(function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(r=u.slice());var h=i.tooltip;return h&&h.length?a=h.slice():a.length||(a=r.slice()),i.defaultedLabel=r,i.defaultedTooltip=a,e}function Hu(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Wu(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Zu(t){return!("ordinal"===t||"time"===t)}function Xu(t){null!=t&&o(this,t),this.otherDims={}}function Yu(t){return t._rawCount>65535?BI:NI}function Uu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function ju(t,e){f(VI.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,f(FI,function(i){t[i]=n(e[i])}),t._calculationInfo=o(e._calculationInfo)}function qu(t,e,i,n,r){var a=EI[e.type],o=n-1,s=e.name,l=t[s][o];if(l&&l.length<i){for(var u=new a(Math.min(r-o*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var c=n*i;r>c;c+=i)t[s].push(new a(Math.min(r-c,i)))}function Ku(t){var e=t._invertedIndicesMap;f(e,function(i,n){var r=t._dimensionInfos[n],a=r.ordinalMeta;if(a){i=e[n]=new RI(a.categories.length);for(var o=0;o<i.length;o++)i[o]=OI;for(var o=0;o<t._count;o++)i[t.get(n,o)]=o}})}function $u(t,e,i){var n;if(null!=e){var r=t._chunkSize,a=Math.floor(i/r),o=i%r,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function Qu(t){return t}function Ju(t){return t<this._count&&t>=0?this._indices[t]:-1}function th(t,e){var i=t._idList[e];return null==i&&(i=$u(t,t._idDimIdx,e)),null==i&&(i=zI+e),i}function eh(t){return _(t)||(t=[t]),t}function ih(t,e){var i=t.dimensions,n=new GI(p(i,t.getDimensionInfo,t),t.hostModel);ju(n,t);for(var r=n._storage={},a=t._storage,o=0;o<i.length;o++){var s=i[o];a[s]&&(u(e,s)>=0?(r[s]=nh(a[s]),n._rawExtent[s]=rh(),n._extent[s]=null):r[s]=a[s])}return n}function nh(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=Uu(t[i]);return e}function rh(){return[1/0,-1/0]}function ah(t,e,i){function r(t,e,i){null!=kI.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,u.set(e,!0))}rs.isInstance(e)||(e=rs.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var a=(i.dimsDef||[]).slice(),l=N(),u=N(),h=[],c=oh(e,t,a,i.dimCount),d=0;c>d;d++){var p=a[d]=o({},M(a[d])?a[d]:{name:a[d]}),g=p.name,v=h[d]=new Xu;null!=g&&null==l.get(g)&&(v.name=v.displayName=g,l.set(g,d)),null!=p.type&&(v.type=p.type),null!=p.displayName&&(v.displayName=p.displayName)}var m=i.encodeDef;!m&&i.encodeDefaulter&&(m=i.encodeDefaulter(e,c)),m=N(m),m.each(function(t,e){if(t=tr(t).slice(),1===t.length&&!w(t[0])&&t[0]<0)return void m.set(e,!1);var i=m.set(e,[]);f(t,function(t,n){w(t)&&(t=l.get(t)),null!=t&&c>t&&(i[n]=t,r(h[t],e,n))})});var y=0;f(t,function(t){var e,t,i,a;if(w(t))e=t,t={};else{e=t.name;var o=t.ordinalMeta;t.ordinalMeta=null,t=n(t),t.ordinalMeta=o,i=t.dimsDef,a=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var l=m.get(e);if(l!==!1){var l=tr(l);if(!l.length)for(var u=0;u<(i&&i.length||1);u++){for(;y<h.length&&null!=h[y].coordDim;)y++;y<h.length&&l.push(y++)}f(l,function(n,o){var l=h[n];if(r(s(l,t),e,o),null==l.name&&i){var u=i[o];!M(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}a&&s(l.otherDims,a)})}});var x=i.generateCoord,_=i.generateCoordCount,b=null!=_;_=x?_||1:0;for(var S=x||"value",I=0;c>I;I++){var v=h[I]=h[I]||new Xu,A=v.coordDim;null==A&&(v.coordDim=sh(S,u,b),v.coordDimIndex=0,(!x||0>=_)&&(v.isExtraCoord=!0),_--),null==v.name&&(v.name=sh(v.coordDim,l)),null!=v.type||vs(e,I,v.name)!==kM.Must&&(!v.isExtraCoord||null==v.otherDims.itemName&&null==v.otherDims.seriesName)||(v.type="ordinal")}return h}function oh(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function sh(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 lh(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=N(),this.categoryAxisMap=N(),this.firstCategoryDimIndex=null}function uh(t){var e=t.get("coordinateSystem"),i=new lh(e),n=XI[e];return n?(n(t,i,i.axisMap,i.categoryAxisMap),i):void 0}function hh(t){return"category"===t.get("type")}function ch(t,e,i){i=i||{};var n,r,a,o,s=i.byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){w(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||n||(s=!0),r){a="__\x00ecstackresult",o="__\x00ecstackedover",n&&(n.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function dh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function fh(t,e){return dh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ph(t,e,i){i=i||{},rs.isInstance(t)||(t=rs.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),a=As.get(r),o=uh(e);o&&(n=p(o.coordSysDims,function(t){var e={name:t},i=o.axisMap.get(t);if(i){var n=i.get("type");e.type=Wu(n)}return e})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=ZI(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?x(fs,n,e):null});o&&f(u,function(t,e){var i=t.coordDim,n=o.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=ch(e,u),c=new GI(u,e);c.setCalculationInfo(h);var d=null!=s&&gh(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,d),c}function gh(t){if(t.sourceFormat===wM){var e=vh(t.data||[]);return null!=e&&!_(ir(e))}}function vh(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function mh(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function yh(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function xh(t){return t._map||(t._map=N(t.categories))}function _h(t){return M(t)&&null!=t.value?t.value:t+""}function bh(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=Eo(a/e,!0);null!=i&&i>o&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=wh(o),l=r.niceTickExtent=[qI(Math.ceil(t[0]/o)*o,s),qI(Math.floor(t[1]/o)*o,s)];return Sh(l,t),r}function wh(t){return To(t)+2}function Mh(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Sh(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Mh(t,0,e),Mh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Ih(t){return t.get("stack")||QI+t.seriesIndex}function Ah(t){return t.dim+t.index}function Th(t,e){var i=[];return e.eachSeriesByType(t,function(t){Oh(t)&&!zh(t)&&i.push(t)}),i}function Ch(t){var e={};f(t,function(t){var i=t.coordinateSystem,n=i.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=t.getData(),a=n.dim+"_"+n.index,o=r.mapDimension(n.dim),s=0,l=r.count();l>s;++s){var u=r.get(o,s);e[a]?e[a].push(u):e[a]=[u]}});var i=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(r){r.sort(function(t,e){return t-e});for(var a=null,o=1;o<r.length;++o){var s=r[o]-r[o-1];s>0&&(a=null===a?s:Math.min(a,s))}i[n]=a}}return i}function Dh(t){var e=Ch(t),i=[];return f(t,function(t){var n,r=t.coordinateSystem,a=r.getBaseAxis(),o=a.getExtent();if("category"===a.type)n=a.getBandWidth();else if("value"===a.type||"time"===a.type){var s=a.dim+"_"+a.index,l=e[s],u=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);n=l?u/c*l:u}else{var d=t.getData();n=Math.abs(o[1]-o[0])/d.count()}var f=Mo(t.get("barWidth"),n),p=Mo(t.get("barMaxWidth"),n),g=Mo(t.get("barMinWidth")||1,n),v=t.get("barGap"),m=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:f,barMaxWidth:p,barMinWidth:g,barGap:v,barCategoryGap:m,axisKey:Ah(a),stackId:Ih(t)})}),kh(i)}function kh(t){var e={};f(t,function(t){var i=t.axisKey,n=t.bandWidth,r=e[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=r.stacks;e[i]=r;var o=t.stackId;a[o]||r.autoWidthCount++,a[o]=a[o]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[o].width&&(a[o].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[o].maxWidth=l);var u=t.barMinWidth;u&&(a[o].minWidth=u);var h=t.barGap;null!=h&&(r.gap=h);var c=t.barCategoryGap;null!=c&&(r.categoryGap=c)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,a=Mo(t.categoryGap,r),o=Mo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){var n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,s-=n+o*n,l--}else{var n=u;e&&n>e&&(n=Math.min(e,s)),i&&i>n&&(n=i),n!==u&&(t.width=n,s-=n+o*n,l--)}}),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+o)}),h&&(c-=h.width*o);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+o)})}),i}function Ph(t,e,i){if(t&&e){var n=t[Ah(e)];return null!=n&&null!=i&&(n=n[Ih(i)]),n}}function Lh(t,e){var i=Th(t,e),n=Dh(i),r={};f(i,function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),o=Ih(t),s=n[Ah(a)][o],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=dh(e,d),g=h.isHorizontal(),v=Eh(a,h,p),m=0,y=e.count();y>m;m++){var x=e.get(d,m),_=e.get(f,m),b=x>=0?"p":"n",w=v;p&&(r[o][_]||(r[o][_]={p:v,n:v}),w=r[o][_][b]);var M,S,I,A;if(g){var T=i.dataToPoint([x,_]);M=w,S=T[1]+l,I=T[0]-v,A=u,Math.abs(I)<c&&(I=(0>I?-1:1)*c),isNaN(I)||p&&(r[o][_][b]+=I)}else{var T=i.dataToPoint([_,x]);M=T[0]+l,S=w,I=u,A=T[1]-v,Math.abs(A)<c&&(A=(0>=A?-1:1)*c),isNaN(A)||p&&(r[o][_][b]+=A)}e.setItemLayout(m,{x:M,y:S,width:I,height:A})}},this)}function Oh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function zh(t){return t.pipelineContext&&t.pipelineContext.large}function Eh(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function Bh(t,e){return gA(t,pA(e))}function Rh(t,e){var i,n,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(n=e.get("boundaryGap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Mo(n[0],1),n[1]=Mo(n[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==o&&(o="ordinal"===a?i?0:0/0:h[0]-n[0]*r),null==s&&(s="ordinal"===a?i?i-1:0/0:h[1]+n[1]*r),"dataMin"===o?o=h[0]:"function"==typeof o&&(o=o({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==o||!isFinite(o))&&(o=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(T(o)||T(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),0>o&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,p=Th("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Dh(p),v=Nh(o,s,e,g);o=v.min,s=v.max}}return[o,s]}function Nh(t,e,i,n){var r=i.axis.getExtent(),a=r[1]-r[0],o=Ph(n,i.axis);if(void 0===o)return{min:t,max:e};var s=1/0;f(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(o,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=1-(s+l)/a,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function Vh(t,e){var i=Rh(t,e),n=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Fh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new jI(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new $I;default:return(mh.getClass(e)||$I).create(t)}}function Gh(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function Hh(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,r){return null!=i&&(r=n-i),e(Wh(t,n),r)}:function(e){return t.scale.getLabel(e)}}function Wh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Zh(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,r,a="category"===t.type,o=i.getExtent();a?r=i.count():(n=i.getTicks(),r=n.length);var s,l=t.getLabelModel(),u=Hh(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;r>c;c+=h){var d=n?n[c]:o[0]+c,f=u(d),p=l.getTextRect(f),g=Xh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Xh(t,e){var i=e*Math.PI/180,n=t.plain(),r=n.width,a=n.height,o=r*Math.cos(i)+a*Math.sin(i),s=r*Math.sin(i)+a*Math.cos(i),l=new Ai(n.x,n.y,o,s);return l}function Yh(t){var e=t.get("interval");return null==e?"auto":e}function Uh(t){return"category"===t.type&&0===Yh(t.getLabelModel())}function jh(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 qh(t,e,i,n,r,a,o){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?ba(t.slice(8),new Ai(e,i,n,r),o?"center":"cover"):0===t.indexOf("path://")?_a(t.slice(7),{},new Ai(e,i,n,r),o?"center":"cover"):new DA({shape:{symbolType:t,x:e,y:i,width:n,height:r}}),l.__isEmptyBrush=s,l.setColor=jh,l.setColor(a),l}function Kh(t){return ph(t.getSource(),t)}function $h(t,e){var i=e;go.isInstance(e)||(i=new go(e),c(i,bA));var n=Fh(i);return n.setExtent(t[0],t[1]),Vh(n,i),n}function Qh(t){c(t,bA)}function Jh(t,e){return Math.abs(t-e)<LA}function tc(t,e,i){var n=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];n+=Ur(r[0],r[1],o[0],o[1],e,i),r=o}var s=t[0];return Jh(r[0],s[0])&&Jh(r[1],s[1])||(n+=Ur(r[0],r[1],s[0],s[1],e,i)),0!==n}function ec(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 ic(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 r=i[n],a=r.geometry,o=a.coordinates,s=a.encodeOffsets,l=0;l<o.length;l++){var u=o[l];if("Polygon"===a.type)o[l]=nc(u,s[l],e);else if("MultiPolygon"===a.type)for(var h=0;h<u.length;h++){var c=u[h];u[h]=nc(c,s[l][h],e)}}return t.UTF8Encoding=!1,t}function nc(t,e,i){for(var n=[],r=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,n.push([s/i,l/i])}return n}function rc(t){return"category"===t.type?oc(t):uc(t)}function ac(t,e){return"category"===t.type?lc(t,e):{ticks:t.scale.getTicks()}}function oc(t){var e=t.getLabelModel(),i=sc(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function sc(t,e){var i=hc(t,"labels"),n=Yh(e),r=cc(i,n);if(r)return r;var a,o;return b(n)?a=mc(t,n):(o="auto"===n?fc(t):n,a=vc(t,o)),dc(i,n,{labels:a,labelCategoryInterval:o})}function lc(t,e){var i=hc(t,"ticks"),n=Yh(e),r=cc(i,n);if(r)return r;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),b(n))a=mc(t,n,!0);else if("auto"===n){var s=sc(t,t.getLabelModel());o=s.labelCategoryInterval,a=p(s.labels,function(t){return t.tickValue})}else o=n,a=vc(t,o,!0);return dc(i,n,{ticks:a,tickCategoryInterval:o})}function uc(t){var e=t.scale.getTicks(),i=Hh(t);return{labels:p(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function hc(t,e){return zA(t)[e]||(zA(t)[e]=[])}function cc(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function dc(t,e,i){return t.push({key:e,value:i}),i}function fc(t){var e=zA(t).autoInterval;return null!=e?e:zA(t).autoInterval=t.calculateCategoryInterval()}function pc(t){var e=gc(t),i=Hh(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/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,v=Xi(i(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/h,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(m,y))),_=zA(t.model),b=t.getExtent(),w=_.lastAutoInterval,M=_.lastTickCount;return null!=w&&null!=M&&Math.abs(w-x)<=1&&Math.abs(M-o)<=1&&w>x&&_.axisExtend0===b[0]&&_.axisExtend1===b[1]?x=w:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtend0=b[0],_.axisExtend1=b[1]),x}function gc(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 vc(t,e,i){function n(t){l.push(i?t:{formattedLabel:r(t),rawLabel:a.getLabel(t),tickValue:t})}var r=Hh(t),a=t.scale,o=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=o[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Uh(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==o[0]&&n(o[0]);for(var g=h;g<=o[1];g+=u)n(g);return p&&g-u!==o[1]&&n(o[1]),l}function mc(t,e,i){var n=t.scale,r=Hh(t),a=[];return f(n.getTicks(),function(t){var o=n.getLabel(t);e(t,o)&&a.push(i?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})}),a}function yc(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}function xc(t,e,i,n){function r(t,e){return t=So(t),e=So(e),d?t>e:e>t}var a=e.length;if(t.onBand&&!i&&a){var o,s,l=t.getExtent();if(1===a)e[0].coord=l[0],o=e[1]={coord:l[0]};else{var u=e[a-1].tickValue-e[0].tickValue,h=(e[a-1].coord-e[0].coord)/u;f(e,function(t){t.coord-=h/2});var c=t.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+h*s},e.push(o)}var d=l[0]>l[1];r(e[0].coord,l[0])&&(n?e[0].coord=l[0]:e.shift()),n&&r(l[0],e[0].coord)&&e.unshift({coord:l[0]}),r(l[1],o.coord)&&(n?o.coord=l[1]:e.pop()),n&&r(o.coord,l[1])&&e.push({coord:l[1]})}}function _c(t){return this._axes[t]}function bc(t){FA.call(this,t)}function wc(t,e){return e.type||(e.data?"category":"value")}function Mc(t,e){return t.getCoordSysModel()===e}function Sc(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Ic(t,e,i,n){function r(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Ac(o[u])&&(a=o[u]);else for(var h in o)if(o.hasOwnProperty(h)&&Ac(o[h])&&!n[r(o[h])]){a=o[h];break}a&&(n[r(a)]=!0)}}function Ac(t){return t&&"category"!==t.type&&"time"!==t.type&&Gh(t)}function Tc(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 Cc(t){return p(qA,function(e){var i=t.getReferringComponents(e)[0];return i})}function Dc(t){return"cartesian2d"===t.get("coordinateSystem")}function kc(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Qs(t,e,i[0]);if(n){for(var r=[],a=0;a<i.length;a++){var o=Qs(t,e,i[a]);r.push(o)}return r.join(" ")}}function Pc(t,e,i,n,r,a){var o=i.getModel("label"),s=i.getModel("emphasis.label");Wa(t,e,o,s,{labelFetcher:r,labelDataIndex:a,defaultText:kc(r.getData(),a),isRectText:!0,autoColor:n}),Lc(t),Lc(e)}function Lc(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Oc(t,e,i){var n=t.getArea(),r=t.getBaseAxis().isHorizontal(),a=n.x,o=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;a-=u/2,o-=u/2,s+=u,l+=u;var h=new bw({shape:{x:a,y:o,width:s,height:l}});return e&&(h.shape[r?"width":"height"]=0,io(h,{shape:{width:s,height:l}},i)),h}function zc(t,e,i){var n=t.getArea(),r=new fw({shape:{cx:So(t.cx,1),cy:So(t.cy,1),r0:So(n.r0,1),r:So(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(r.shape.endAngle=n.startAngle,io(r,{shape:{endAngle:n.endAngle}},i)),r}function Ec(t,e,i){return t?"polar"===t.type?zc(t,e,i):"cartesian2d"===t.type?Oc(t,e,i):null:null}function Bc(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var r=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=r,i.width+=2*r):(i.y-=r,i.height+=2*r)}}return i}function Rc(t,e,i){i.style.text=null,eo(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Nc(t,e,i){i.style.text=null,eo(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Vc(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Fc(t,e,i,n,r,a,o,l){var u=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),c=e.getVisual("borderColor"),d=n.getModel("itemStyle"),f=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",d.get("barBorderRadius")||0),t.useStyle(s({stroke:Vc(r)?"none":c,fill:Vc(r)?"none":u,opacity:h},d.getBarItemStyle()));var p=n.getShallow("cursor");p&&t.attr("cursor",p);var g=o?r.height>0?"bottom":"top":r.width>0?"left":"right";l||Pc(t.style,f,n,u,a,i,g),Vc(r)&&(f.fill=f.stroke="none"),Va(t,f)}function Gc(t,e){var i=t.get(tT)||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,r)}function Hc(t,e,i){var n=t.getData(),r=[],a=n.getLayout("valueAxisHorizontal")?1:0;r[1-a]=n.getLayout("valueAxisStart");var o=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=t.getModel("backgroundStyle"),u=t.get("showBackground",!0);if(u){var h=n.getLayout("largeBackgroundPoints"),c=[];c[1-a]=n.getLayout("backgroundStart");var d=new sT({shape:{points:h},incremental:!!i,__startPoint:c,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});Xc(d,l,n),e.add(d)}var f=new sT({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:r,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s});e.add(f),Zc(f,t,n),f.seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",lT),f.on("mousemove",lT))}function Wc(t,e,i){var n=t.__baseDimIdx,r=1-n,a=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];eT[0]=e,eT[1]=i;for(var u=eT[n],h=eT[1-n],c=u-s,d=u+s,f=0,p=a.length/2;p>f;f++){var g=2*f,v=a[g+n],m=a[g+r];if(v>=c&&d>=v&&(m>=l?h>=l&&m>=h:h>=m&&l>=h))return o[f]}return-1}function Zc(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Xc(t,e,i){var n=e.get("borderColor")||e.get("color"),r=e.getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Yc(t,e,i){var n,r="polar"===i.type;return n=r?i.getArea():i.grid.getRect(),r?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}function Uc(t,e,i){var n="polar"===t.type?fw:bw;return new n({shape:Yc(e,i,t),silent:!0,z2:0})}function jc(t,e,i,n){var r,a,o=ko(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Po(o-uT/2)?(a=l?"bottom":"top",r="center"):Po(o-1.5*uT)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*uT>o&&o>uT/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function qc(t,e,i){if(!Uh(t.axis)){var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],o=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];n===!1?(Kc(a),Kc(u)):$c(a,o)&&(n?(Kc(o),Kc(h)):(Kc(a),Kc(u))),r===!1?(Kc(s),Kc(c)):$c(l,s)&&(r?(Kc(l),Kc(d)):(Kc(s),Kc(c)))}}function Kc(t){t&&(t.ignore=!0)}function $c(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var r=ze([]);return Ne(r,r,-t.rotation),i.applyTransform(Be([],r,t.getLocalTransform())),n.applyTransform(Be([],r,e.getLocalTransform())),i.intersect(n)}}function Qc(t){return"middle"===t||"center"===t}function Jc(t,e,i,n,r){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=i,e&&(ae(o,o,e),ae(s,s,e));var h=new Mw({anid:r+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}function td(t,e,i){var n=e.axis,r=e.getModel("axisTick");if(r.get("show")&&!n.scale.isBlank()){for(var a=r.getModel("lineStyle"),o=i.tickDirection*r.get("length"),l=n.getTicksCoords(),u=Jc(l,t._transform,o,s(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),h=0;h<u.length;h++)t.group.add(u[h]);return u}}function ed(t,e,i){var n=e.axis,r=e.getModel("minorTick");if(r.get("show")&&!n.scale.isBlank()){var a=n.getMinorTicksCoords();if(a.length)for(var o=r.getModel("lineStyle"),l=i.tickDirection*r.get("length"),u=s(o.getLineStyle(),s(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),h=0;h<a.length;h++)for(var c=Jc(a[h],t._transform,l,u,"minorticks_"+h),d=0;d<c.length;d++)t.group.add(c[d])}}function id(t,e,i){var n=e.axis,r=C(i.axisLabelShow,e.get("axisLabel.show"));if(r&&!n.scale.isBlank()){var a=e.getModel("axisLabel"),o=a.get("margin"),s=n.getViewLabels(),l=(C(i.labelRotate,a.get("rotate"))||0)*uT/180,u=fT(i.rotation,l,i.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=pT(e),p=e.get("triggerEvent");return f(s,function(r,s){var l=r.tickValue,f=r.formattedLabel,g=r.rawLabel,v=a;h&&h[l]&&h[l].textStyle&&(v=new go(h[l].textStyle,a,e.ecModel));var m=v.getTextColor()||e.get("axisLine.lineStyle.color"),y=n.dataToCoord(l),x=[y,i.labelOffset+i.labelDirection*o],_=new uw({anid:"label_"+l,position:x,rotation:u.rotation,silent:d,z2:10});Xa(_.style,v,{text:f,textAlign:v.getShallow("align",!0)||u.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof m?m("category"===n.type?g:"value"===n.type?l+"":l,s):m}),p&&(_.eventData=dT(e),_.eventData.targetType="axisLabel",_.eventData.value=g),t._dumbGroup.add(_),_.updateTransform(),c.push(_),t.group.add(_),_.decomposeTransform()}),c}}function nd(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return rd(i,t,e),i.seriesInvolved&&od(i,t),i}function rd(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];gT(i.getCoordinateSystems(),function(i){function s(n,s,l){var h=l.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||n||dd(h))){null==s&&(s=h.get("triggerTooltip")),h=n?ad(l,c,r,e,n,s):h;var f=h.get("snap"),p=fd(l.model),g=s||f||"category"===l.type,v=t.axesInfo[p]={key:p,axis:l,coordSys:i,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:dd(h),seriesModels:[]};u[p]=v,t.seriesInvolved|=g;var m=sd(a,l);if(null!=m){var y=o[m]||(o[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=a[m].mapper,v.linkGroup=y}}}if(i.axisPointerEnabled){var l=fd(i.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var h=i.model,c=h.getModel("tooltip",n);if(gT(i.getAxes(),vT(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&gT(p.baseAxes,vT(s,f?"cross":!0,d)),f&&gT(p.otherAxes,vT(s,"cross",!1))}}})}function ad(t,e,i,r,a,o){var l=e.getModel("axisPointer"),u={};gT(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=n(l.get(t))}),u.snap="category"!==t.type&&!!o,"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:!0,!o){var d=u.lineStyle=l.get("crossStyle");d&&s(h,d.textStyle)}}return t.model.getModel("axisPointer",new go(u,i,r))}function od(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);
+i&&"none"!==n&&n!==!1&&"item"!==n&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&gT(t.coordSysAxesInfo[fd(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 sd(t,e){for(var i=e.model,n=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(ld(a[n+"AxisId"],i.id)||ld(a[n+"AxisIndex"],i.componentIndex)||ld(a[n+"AxisName"],i.name))return r}}function ld(t,e){return"all"===t||_(t)&&u(t,e)>=0||t===e}function ud(t){var e=hd(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=dd(i);null==a&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function hd(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[fd(t)]}function cd(t){var e=hd(t);return e&&e.axisPointerModel}function dd(t){return!!t.get("handle.show")}function fd(t){return t.type+"||"+t.id}function pd(t,e,i,n,r,a){var o=mT.getAxisPointerClass(t.axisPointerClass);if(o){var s=cd(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,n,a):gd(t,n)}}function gd(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function vd(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.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(o){var g=o.toGlobalCoord(o.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 v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),C(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}function md(t,e,i,n){var r=i.axis;if(!r.scale.isBlank()){var a=i.getModel("splitArea"),o=a.getModel("areaStyle"),l=o.get("color"),u=n.coordinateSystem.getRect(),h=r.getTicksCoords({tickModel:a,clamp:!0});if(h.length){var c=l.length,d=t.__splitAreaColors,f=N(),p=0;if(d)for(var g=0;g<h.length;g++){var v=d.get(h[g].tickValue);if(null!=v){p=(v+(c-1)*g)%c;break}}var m=r.toGlobalCoord(h[0].coord),y=o.getAreaStyle();l=_(l)?l:[l];for(var g=1;g<h.length;g++){var x,b,w,M,S=r.toGlobalCoord(h[g].coord);r.isHorizontal()?(x=m,b=u.y,w=S-x,M=u.height,m=x+w):(x=u.x,b=m,w=u.width,M=S-b,m=b+M);var I=h[g-1].tickValue;null!=I&&f.set(I,p),e.add(new bw({anid:null!=I?"area_"+I:null,shape:{x:x,y:b,width:w,height:M},style:s({fill:l[p]},y),silent:!0})),p=(p+1)%c}t.__splitAreaColors=f}}}function yd(t){t.__splitAreaColors=null}function xd(t,e,i){jx.call(this),this.updateData(t,e,i)}function _d(t){return[t[0]/2,t[1]/2]}function bd(t,e){this.parent.drift(t,e)}function wd(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],r={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Md(t){this.group=new jx,this._symbolCtor=t||xd}function Sd(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 Id(t){return null==t||M(t)||(t={isIgnore:t}),t||{}}function Ad(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 Td(t,e,i){var n,r=t.getBaseAxis(),a=t.getOtherAxis(r),o=Cd(a,i),s=r.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=p(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(n|=dh(e,d[0]))&&(d[0]=f),(n|=dh(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Cd(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 Dd(t,e,i,n){var r=0/0;t.stacked&&(r=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=i.get(t.baseDim,n),o[1-a]=r,e.dataToPoint(o)}function kd(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 Pd(t){return isNaN(t[0])||isNaN(t[1])}function Ld(t,e,i,n,r,a,o,s,l,u){return"none"!==u&&u?Od.apply(this,arguments):zd.apply(this,arguments)}function Od(t,e,i,n,r,a,o,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=r||0>d)break;if(Pd(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],v="y"===u?1:0,m=(p[v]-g[v])*l;OT(ET,g),ET[v]=g[v]+m,OT(BT,p),BT[v]=p[v]-m,t.bezierCurveTo(ET[0],ET[1],BT[0],BT[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function zd(t,e,i,n,r,a,o,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=r||0>d)break;if(Pd(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]),OT(ET,p);else if(l>0){var g=d+a,v=e[g];if(h)for(;v&&Pd(e[g]);)g+=a,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||Pd(v))OT(BT,p);else{Pd(v)&&!h&&(v=p),U(zT,v,y);var x,_;if("x"===u||"y"===u){var b="x"===u?0:1;x=Math.abs(p[b]-y[b]),_=Math.abs(p[b]-v[b])}else x=$y(p,y),_=$y(p,v);m=_/(_+x),LT(BT,p,zT,-l*(1-m))}kT(ET,ET,s),PT(ET,ET,o),kT(BT,BT,s),PT(BT,BT,o),t.bezierCurveTo(ET[0],ET[1],BT[0],BT[1],p[0],p[1]),LT(ET,p,zT,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Ed(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var a=t[r];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 Bd(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],r=e[i];if(n[0]!==r[0]||n[1]!==r[1])return}return!0}}function Rd(t){return"number"==typeof t?t:t?.5:0}function Nd(t,e,i){if(!i.valueDim)return[];for(var n=[],r=0,a=e.count();a>r;r++)n.push(Dd(i,t,e,r));return n}function Vd(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,a=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];a.push(l);var u=[];switch(i){case"end":u[r]=s[r],u[1-r]=l[1-r],a.push(u);break;case"middle":var h=(l[r]+s[r])/2,c=[];u[r]=c[r]=h,u[1-r]=l[1-r],c[1-r]=s[1-r],a.push(u),a.push(c);break;default:u[r]=l[r],u[1-r]=s[1-r],a.push(u)}}return t[o]&&a.push(t[o]),a}function Fd(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,r,a=i.length-1;a>=0;a--){var o=i[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(n=l&&l.coordDim,"x"===n||"y"===n){r=i[a];break}}if(r){var u=e.getAxis(n),h=p(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,v=h[0].coord-g,m=h[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-v)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var x=new Dw(0,0,0,0,h,!0);return x[n]=v,x[n+"2"]=m,x}}}function Gd(t,e,i){var n=t.get("showAllSymbol"),r="auto"===n;if(!n||r){var a=i.getAxesByScale("ordinal")[0];if(a&&(!r||!Hd(a,e))){var o=e.mapDimension(a.dim),s={};return f(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function Hd(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;r>o;o+=a)if(1.5*xd.getSymbolSize(e,o)[t.isHorizontal()?1:0]>n)return!1;return!0}function Wd(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),r=Oc(t,e,i);if(!i.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);n?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return zc(t,e,i)}function Zd(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){var i=e();return i.indexOfName(t)>=0},this.indexOfName=function(e){var i=t();return i.indexOfName(e)},this.getItemVisual=function(e,i){var n=t();return n.getItemVisual(e,i)}}function Xd(t,e,i,n){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){Yd(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,i)})}function Yd(t,e,i,n,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=i?n:0,u=[o*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Ud(t,e){jx.call(this);var i=new fw({z2:2}),n=new yw,r=new uw;this.add(i),this.add(n),this.add(r),this.updateData(t,e,!0)}function jd(t,e,i,n,r,a,o,s,l,u){function h(e,i,n){for(var r=e;i>r&&!(t[r].y+n>l+o);r++)if(t[r].y+=n,r>e&&i>r+1&&t[r+1].y>t[r].y+t[r].height)return void c(r,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;n>=0&&!(t[n].y-i<l)&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=r+h>u?Math.sqrt((r+h+c)*(r+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=o&&(d=o-10),!e&&o>=d&&(d=o+10),t[s].x=i+d*a,o=d}}t.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=t.length,v=[],m=[],y=0;g>y;y++){if("outer"===t[y].position&&"labelLine"===t[y].labelAlignTo){var x=t[y].x-u;t[y].linePoints[1][0]+=x,t[y].x=u}f=t[y].y-p,0>f&&h(y,g,-f,r),p=t[y].y+t[y].height}0>o-p&&c(g-1,p-o);for(var y=0;g>y;y++)t[y].y>=i?m.push(t[y]):v.push(t[y]);d(v,!1,e,i,n,r),d(m,!0,e,i,n,r)}function qd(t,e,i,n,r,a,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)Kd(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));jd(u,e,i,n,1,r,a,o,s,c),jd(l,e,i,n,-1,r,a,o,s,h);for(var d=0;d<t.length;d++){var f=t[d];if(!Kd(f)){var p=f.linePoints;if(p){var g,v="edge"===f.labelAlignTo,m=f.textRect.width;g=v?f.x<e?p[2][0]-f.labelDistance-o-f.labelMargin:o+r-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-o-f.bleedMargin:o+r-f.x-f.bleedMargin,g<f.textRect.width&&(f.text=$i(f.text,g,f.font),"edge"===f.labelAlignTo&&(m=Zi(f.text,f.font)));var y=p[1][0]-p[2][0];v?p[2][0]=f.x<e?o+f.labelMargin+m+f.labelDistance:o+r-f.labelMargin-m-f.labelDistance:(p[2][0]=f.x<e?f.x+f.labelDistance:f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}function Kd(t){return"center"===t.position}function $d(t,e){return $o(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Qd(t){if(!t.parallel){var e=!1;f(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function Jd(t){var e=tr(t.parallelAxis);f(e,function(e){if(M(e)){var i=e.parallelIndex||0,n=tr(t.parallel)[i];n&&n.parallelAxisDefault&&r(e,n.parallelAxisDefault,!1)}})}function tf(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:0>i?1:e?-1:1}}function ef(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function nf(t,e,i){this._axesMap=N(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function rf(t,e){return oC(sC(t,e[0]),e[1])}function af(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function of(t,e){var i,n,r=e.layoutLength,a=e.axisExpandWidth,o=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=r-(o-1-t)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}function sf(t,e){var i=[];return t.eachComponent("parallel",function(n,r){var a=new nf(n,t,e);a.name="parallel_"+r,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}function lf(t,e){return e.type||(e.data?"category":"value")}function uf(t,e,i){var n=df(t);n[e]=i}function hf(t,e,i){var n=df(t),r=n[e];r===i&&(n[e]=null)}function cf(t,e){return!!df(t)[e]}function df(t){return t[gC]||(t[gC]={})}function ff(t){ex.call(this),this._zr=t,this.group=new jx,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+DC++,this._handlers={},mC(kC,function(t,e){this._handlers[e]=y(t,this)},this)}function pf(t,e){var i=t._zr;t._enableGlobalPan||uf(i,IC,t._uid),vf(i,t._handlers),t._brushType=e.brushType,t._brushOption=r(n(CC),e,!0)}function gf(t){var e=t._zr;hf(e,IC,t._uid),mf(e,t._handlers),t._brushType=t._brushOption=null}function vf(t,e){mC(e,function(e,i){t.on(i,e)})}function mf(t,e){mC(e,function(e,i){t.off(i,e)})}function yf(t,e){var i=PC[e.brushType].createCover(t,e);return i.__brushOption=e,bf(i,e),t.group.add(i),i}function xf(t,e){var i=Mf(e);return i.endCreating&&(i.endCreating(t,e),bf(e,e.__brushOption)),e}function _f(t,e){var i=e.__brushOption;Mf(e).updateCoverShape(t,e,i.range,i)}function bf(t,e){var i=e.z;null==i&&(i=wC),t.traverse(function(t){t.z=i,t.z2=i})}function wf(t,e){Mf(e).updateCommon(t,e),_f(t,e)}function Mf(t){return PC[t.__brushOption.brushType]}function Sf(t,e,i){var n=t._panels;if(!n)return!0;var r,a=t._transform;return mC(n,function(t){t.isTargetByCursor(e,i,a)&&(r=t)}),r}function If(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null!=n?i[n]:!0}function Af(t){var e=t._covers,i=e.length;return mC(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function Tf(t,e){var i=yC(t._covers,function(t){var e=t.__brushOption,i=n(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Cf(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],a=i[1]-n[1],o=bC(r*r+a*a,.5);return o>MC}function Df(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function kf(t,e,i,n){var r=new jx;return r.add(new bw({name:"main",style:zf(i),silent:!0,draggable:!0,cursor:"move",drift:vC(t,e,r,"nswe"),ondragend:vC(Tf,e,{isEnd:!0})})),mC(n,function(i){r.add(new bw({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:vC(t,e,r,i),ondragend:vC(Tf,e,{isEnd:!0})}))}),r}function Pf(t,e,i,n){var r=n.brushStyle.lineWidth||0,a=_C(r,SC),o=i[0][0],s=i[1][0],l=o-r/2,u=s-r/2,h=i[0][1],c=i[1][1],d=h-a+r/2,f=c-a+r/2,p=h-o,g=c-s,v=p+r,m=g+r;Of(t,e,"main",o,s,p,g),n.transformable&&(Of(t,e,"w",l,u,a,m),Of(t,e,"e",d,u,a,m),Of(t,e,"n",l,u,v,a),Of(t,e,"s",l,f,v,a),Of(t,e,"nw",l,u,a,a),Of(t,e,"ne",d,u,a,a),Of(t,e,"sw",l,f,a,a),Of(t,e,"se",d,f,a,a))}function Lf(t,e){var i=e.__brushOption,n=i.transformable,r=e.childAt(0);r.useStyle(zf(i)),r.attr({silent:!n,cursor:n?"move":"default"}),mC(["w","e","n","s","se","sw","ne","nw"],function(i){var r=e.childOfName(i),a=Rf(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?TC[a]+"-resize":null})})}function Of(t,e,i,n,r,a,o){var s=e.childOfName(i);s&&s.setShape(Hf(Gf(t,e,[[n,r],[n+a,r+o]])))}function zf(t){return s({strokeNoScale:!0},t.brushStyle)}function Ef(t,e,i,n){var r=[xC(t,i),xC(e,n)],a=[_C(t,i),_C(e,n)];return[[r[0],a[0]],[r[1],a[1]]]}function Bf(t){return no(t.group)}function Rf(t,e){if(e.length>1){e=e.split("");var i=[Rf(t,e[0]),Rf(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=ao(n[e],Bf(t));return r[i]}function Nf(t,e,i,n,r,a,o){var s=n.__brushOption,l=t(s.range),u=Ff(i,a,o);mC(r.split(""),function(t){var e=AC[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(Ef(l[0][0],l[1][0],l[0][1],l[1][1])),wf(i,n),Tf(i,{isEnd:!1})}function Vf(t,e,i,n){var r=e.__brushOption.range,a=Ff(t,i,n);mC(r,function(t){t[0]+=a[0],t[1]+=a[1]}),wf(t,e),Tf(t,{isEnd:!1})}function Ff(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function Gf(t,e,i){var r=If(t,e);return r&&r!==!0?r.clipPath(i,t._transform):n(i)}function Hf(t){var e=xC(t[0][0],t[1][0]),i=xC(t[0][1],t[1][1]),n=_C(t[0][0],t[1][0]),r=_C(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:r-i}}function Wf(t,e,i){if(t._brushType&&!qf(t,e)){var n=t._zr,r=t._covers,a=Sf(t,e,i);if(!t._dragging)for(var o=0;o<r.length;o++){var s=r[o].__brushOption;if(a&&(a===!0||s.panelId===a.panelId)&&PC[s.brushType].contain(r[o],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}function Zf(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Xf(t,e,i){return t.childOfName("main").contain(e,i)}function Yf(t,e,i,r){var a,o=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(i.slice()),Cf(t)||o){if(s&&!o){"single"===l.brushMode&&Af(t);var u=n(l);u.brushType=Uf(u.brushType,s),u.panelId=s===!0?null:s.panelId,o=t._creatingCover=yf(t,u),t._covers.push(o)}if(o){var h=PC[Uf(t._brushType,s)],c=o.__brushOption;c.range=h.getCreatingRange(Gf(t,o,t._track)),r&&(xf(t,o),h.updateCommon(t,o)),_f(t,o),a={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&Sf(t,e,i)&&Af(t)&&(a={isEnd:r,removeOnClick:!0});return a}function Uf(t,e){return"auto"===t?e.defaultBrushType:t}function jf(t,e){if(t._dragging){Zf(e);var i=e.offsetX,n=e.offsetY,r=t.group.transformCoordToLocal(i,n),a=Yf(t,e,r,!0);t._dragging=!1,t._track=[],t._creatingCover=null,a&&Tf(t,a)}}function qf(t,e,i){var n=t._zr;return 0>e||e>n.getWidth()||0>i||i>n.getHeight()}function Kf(t){return{createCover:function(e,i){return kf(vC(Nf,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=Df(e),n=xC(i[0][t],i[1][t]),r=_C(i[0][t],i[1][t]);return[n,r]},updateCoverShape:function(e,i,n,r){var a,o=If(e,i);if(o!==!0&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),Pf(e,i,l,r)},updateCommon:Lf,contain:Xf}}function $f(t,e,i){var n=e.getComponentByElement(t.topTarget),r=n&&n.coordinateSystem;return n&&n!==i&&!LC[n.mainType]&&r&&r.model!==i}function Qf(t){return t=ep(t),function(e){return so(e,t)}}function Jf(t,e){return t=ep(t),function(i){var n=null!=e?e:i,r=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(r||0)]}}function tp(t,e,i){return t=ep(t),function(n,r){return t.contain(r[0],r[1])&&!$f(n,e,i)}}function ep(t){return Ai.create(t)}function ip(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}function np(t){var e=t.axis;return p(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function rp(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function ap(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function op(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=N();f(i.dimensions,function(t){var e=sp(t);n.set(t,e)})}}}function sp(t){return+t.replace("dim","")}function lp(t,e,i){var n=t.model,r=t.getRect(),a=new bw({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),o="horizontal"===n.get("layout")?"width":"height";return a.setShape(o,0),io(a,{shape:{width:r.width,height:r.height}},e,i),a}function up(t,e,i,n){for(var r=[],a=0;a<i.length;a++){var o=i[a],s=t.get(t.mapDimension(o),e);fp(s,n.getAxis(o).type)||r.push(n.dataToPoint(s,o))}return r}function hp(t,e,i,n,r){var a=up(t,i,n,r),o=new yw({shape:{points:a},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(i,o),o}function cp(t){var e=t.get("smooth",!0);return e===!0&&(e=RC),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:RC}}function dp(t,e,i,n){var r=n.lineStyle;if(e.hasItemOption){var a=e.getItemModel(i).getModel("lineStyle");r=a.getLineStyle()}t.useStyle(r);var o=t.style;o.fill=null,o.stroke=e.getItemVisual(i,"color"),o.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}function fp(t,e){return"category"===e?null==t:null==t||isNaN(t)}function pp(t,e){var i=t.get("center"),n=e.getWidth(),r=e.getHeight(),a=Math.min(n,r),o=Mo(i[0],e.getWidth()),s=Mo(i[1],e.getHeight()),l=Mo(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function gp(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function vp(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function mp(t,e){return e.dim+t.model.componentIndex}function yp(t,e){var i={},n=xp(v(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(),r=t.coordinateSystem,a=r.getBaseAxis(),o=mp(r,a),s=vp(t),l=n[o][s],u=l.offset,h=l.width,c=r.getOtherAxis(a),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var v=e.mapDimension(c.dim),m=e.mapDimension(a.dim),y=dh(e,v),x="radius"!==a.dim||!t.get("roundCap",!0),_=c.getExtent()[0],b=0,w=e.count();w>b;b++){var M=e.get(v,b),S=e.get(m,b),I=M>=0?"p":"n",A=_;y&&(i[s][S]||(i[s][S]={p:_,n:_}),A=i[s][S][I]);var T,C,D,k;if("radius"===c.dim){var P=c.dataToRadius(M)-_,L=a.dataToAngle(S);Math.abs(P)<p&&(P=(0>P?-1:1)*p),T=A,C=A+P,D=L-u,k=D-h,y&&(i[s][S][I]=C)}else{var O=c.dataToAngle(M,x)-_,z=a.dataToRadius(S);Math.abs(O)<g&&(O=(0>O?-1:1)*g),T=z+u,C=T+h,D=A,k=A+O,y&&(i[s][S][I]=k)}e.setItemLayout(b,{cx:d,cy:f,r0:T,r:C,startAngle:-D*Math.PI/180,endAngle:-k*Math.PI/180})}}},this)}function xp(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),a=mp(n,r),o=r.getExtent(),s="category"===r.type?r.getBandWidth():Math.abs(o[1]-o[0])/i.count(),l=e[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[a]=l;var h=vp(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Mo(t.get("barWidth"),s),d=Mo(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,a=Mo(t.categoryGap,r),o=Mo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+o)}),h&&(c-=h.width*o);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+o)})}),i}function _p(t,e){BA.call(this,"radius",t,e),this.type="category"}function bp(t,e){e=e||[0,360],BA.call(this,"angle",t,e),this.type="category"}function wp(t,e){return e.type||(e.data?"category":"value")}function Mp(t,e,i){var n=e.get("center"),r=i.getWidth(),a=i.getHeight();t.cx=Mo(n[0],r),t.cy=Mo(n[1],a);var o=t.getRadiusAxis(),s=Math.min(r,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:_(l)||(l=[0,l]),l=[Mo(l[0],s),Mo(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function Sp(t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===e){var r=t.getData();f(r.mapDimension("radius",!0),function(t){n.scale.unionExtentFromData(r,fh(r,t))}),f(r.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(r,fh(r,t))})}}),Vh(i.scale,i.model),Vh(n.scale,n.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),a=360/i.scale.count();i.inverse?r[1]+=a:r[1]-=a,i.setExtent(r[0],r[1])}}function Ip(t,e){if(t.type=e.get("type"),t.scale=Fh(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 Ap(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),r=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:r[0],y2:r[1]}}function Tp(t){var e=t.getRadiusAxis();return e.inverse?0:1}function Cp(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 Dp(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 kp(t,e,i,n,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e)){if(!t.involveSeries)return void i.showPointer(t,e);var s=Pp(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==r.seriesIndex&&o(r,l[0]),!n&&t.snap&&a.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,r),i.showTooltip(t,s,u)}}function Pp(t,e){var i=e.axis,n=i.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return $C(e.seriesModels,function(e){var l,u,h=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,i);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===i.type?.5:null),!u.length)return;l=e.getData().get(h[0],u[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);o>=f&&((o>f||d>=0&&0>s)&&(o=f,s=d,r=l,a.length=0),$C(u,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:r}}function Lp(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Op(t,e,i,n){var r=i.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=fd(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:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function zp(t,e,i){var n=i.axesInfo=[];$C(e,function(e,i){var r=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Ep(t,e,i,n){if(Vp(e)||!t.list.length)return void n({type:"hideTip"});var r=((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:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function Bp(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",a=JC(n)[r]||{},o=JC(n)[r]={};$C(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&$C(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];f(a,function(t,e){!o[e]&&l.push(t)}),f(o,function(t,e){!a[e]&&s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function Rp(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 Np(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 Vp(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Fp(t,e,i){if(!Oy.node){var n=e.getZr();eD(n).records||(eD(n).records={}),Gp(n,e);var r=eD(n).records[t]||(eD(n).records[t]={});r.handler=i}}function Gp(t,e){function i(i,n){t.on(i,function(i){var r=Xp(e);iD(eD(t).records,function(t){t&&n(t,i,r.dispatchAction)}),Hp(r.pendings,e)})}eD(t).initialized||(eD(t).initialized=!0,i("click",x(Zp,"click")),i("mousemove",x(Zp,"mousemove")),i("globalout",Wp))}function Hp(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function Wp(t,e,i){t.handler("leave",null,i)}function Zp(t,e,i,n){e.handler(t,i,n)}function Xp(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function Yp(t,e){if(!Oy.node){var i=e.getZr(),n=(eD(i).records||{})[t];n&&(eD(i).records[t]=null)}}function Up(){}function jp(t,e,i,n){qp(rD(i).lastProp,n)||(rD(i).lastProp=n,e?eo(i,n,t):(i.stopAnimation(),i.attr(n)))}function qp(t,e){if(M(t)&&M(e)){var i=!0;return f(e,function(e,n){i=i&&qp(t[n],e)}),!!i}return t===e}function Kp(t,e){t[e.get("label.show")?"show":"hide"]()}function $p(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Qp(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)})}function Jp(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle(),e.fill=null):"shadow"===i&&(e=n.getAreaStyle(),e.stroke=null),e}function tg(t,e,i,n,r){var a=i.get("value"),o=ig(a,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=rM(s.get("padding")||0),u=s.getFont(),h=Xi(o,u),c=r.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),eg(c,d,f,n);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function eg(t,e,i,n){var r=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,r)-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 ig(t,e,i,n,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:Wh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),w(o)?a=o.replace("{value}",a):b(o)&&(a=o(s))}return a}function ng(t,e,i){var n=Oe();return Ne(n,n,i.rotation),Re(n,n,i.position),ro([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function rg(t,e,i,n,r,a){var o=hT.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),tg(e,n,r,a,{position:ng(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ag(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function og(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function sg(t,e,i,n,r,a){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:a,clockwise:!0}
+}function lg(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function ug(t){return"x"===t.dim?0:1}function hg(t,e,i,n,r){var a=e.axis,o=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=Oe();Ne(d,d,s),Re(d,d,[n.cx,n.cy]),l=ro([o,-r],d);var f=e.getModel("axisLabel").get("rotate")||0,p=hT.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+r,o]);var v=n.cx,m=n.cy;u=Math.abs(l[0]-v)/g<.3?"center":l[0]>v?"left":"right",h=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function cg(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function dg(t,e){var i=[];return t.eachComponent("singleAxis",function(n,r){var a=new cg(n,t,e);a.name="single_"+r,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}function fg(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,r={},a=n.position,o=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]}};r.position=["vertical"===o?u.vertical[a]:l[0],"horizontal"===o?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};r.rotation=Math.PI/2*h[o];var c={top:-1,bottom:1,right:1,left:-1};r.labelDirection=r.tickDirection=r.nameDirection=c[a],t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),C(e.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),r.labelRotation="top"===a?-d:d,r.z2=1,r}function pg(t,e){return e.type||(e.data?"category":"value")}function gg(t){return t.isHorizontal()?0:1}function vg(t,e){var i=t.getRect();return[i[mD[e]],i[mD[e]]+i[yD[e]]]}function mg(t,e,i){var n,r={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var o=i.getData();f(o,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:r}:{name:e.name,selected:r}}function yg(t,e,i){var n=e.getBoxLayoutParams(),r=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},o=$o(n,a,r);pM(e.get("orient"),t,e.get("itemGap"),o.width,o.height),Qo(t,n,a,r)}function xg(t,e){var i=rM(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new bw({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});return t}function _g(t,e,i,n,r,a){var o;return"line"!==e&&e.indexOf("empty")<0?(o=i.getItemStyle(),t.style.stroke=n,a||(o.stroke=r)):o=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function bg(t,e,i,n){Mg(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),wg(t,e,i,n)}function wg(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Mg(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function Sg(t,e,i){var n=t.getOrient(),r=[1,1];r[n.index]=0,Jo(e,i,{type:"box",ignoreSize:r})}function Ig(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(BD,function(t){return t+"transition:"+i}).join(";")}function Ag(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"),zD(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Tg(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),r=t.getModel("textStyle"),a=t.get("padding");return i&&e.push(Ig(i)),n&&(Oy.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ri(n)),e.push("filter:alpha(opacity=70)"))),zD(["width","color","radius"],function(i){var n="border-"+i,r=ED(n),a=t.get(r);null!=a&&e.push(n+":"+a+("color"===i?"":"px"))}),e.push(Ag(r)),null!=a&&e.push("padding:"+rM(a).join("px ")+"px"),e.join(";")+";"}function Cg(t,e,i,n,r){var a=e&&e.painter;if(i){var o=a&&a.getViewportRoot();o&&pe(t,o,document.body,n,r)}else{t[0]=n,t[1]=r;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function Dg(t,e,i){if(Oy.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],Cg(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!o._enterable){var e=r.handler,i=r.painter.getViewportRoot();we(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function kg(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function Pg(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(go.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new go(i,e,e.ecModel))}return e}function Lg(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function Og(t,e,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>n?t-=l+a:t+=a),null!=o&&(e+u+o>r?e-=u+o:e+=o),[t,e]}function zg(t,e,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Eg(t,e,i){var n=i[0],r=i[1],a=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-n/2,s=e.y+u/2-r/2;break;case"top":o=e.x+l/2-n/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-n/2,s=e.y+u+a;break;case"left":o=e.x-n-a,s=e.y+u/2-r/2;break;case"right":o=e.x+l+a,s=e.y+u/2-r/2}return[o,s]}function Bg(t){return"center"===t||"middle"===t}function Rg(t){er(t,"label",["show"])}function Ng(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Vg(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Fg(t,e,i,n,r,a){var o=[],s=dh(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=Yg(e,l,t),h=e.indicesOfNearest(l,u)[0];o[r]=e.get(i,h),o[a]=e.get(l,h);var c=e.get(n,h),d=Ao(e.get(n,h));return d=Math.min(d,20),d>=0&&(o[a]=+o[a].toFixed(d)),[o,c]}function Gg(t,e){var i=t.getData(),r=t.coordinateSystem;if(e&&!Vg(e)&&!_(e.coord)&&r){var a=r.dimensions,o=Hg(e,i,r,t);if(e=n(e),e.type&&UD[e.type]&&o.baseAxis&&o.valueAxis){var s=XD(a,o.baseAxis.dim),l=XD(a,o.valueAxis.dim),u=UD[e.type](i,o.baseDataDim,o.valueDataDim,s,l);e.coord=u[0],e.value=u[1]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;2>c;c++)UD[h[c]]&&(h[c]=Yg(i,i.mapDimension(a[c]),h[c]));e.coord=h}}return e}function Hg(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(Wg(n,r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function Wg(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;r<n.length;r++){var a=i.getDimensionInfo(n[r]);if(a.name===e)return a.coordDim}}function Zg(t,e){return t&&t.containData&&e.coord&&!Ng(e)?t.containData(e.coord):!0}function Xg(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function Yg(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t){isNaN(t)||(n+=t,r++)}),n/r}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function Ug(t,e,i){var n=e.coordinateSystem;t.each(function(r){var a,o=t.getItemModel(r),s=Mo(o.get("x"),i.getWidth()),l=Mo(o.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var u=t.get(n.dimensions[0],r),h=t.get(n.dimensions[1],r);a=n.dataToPoint([u,h])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(r,a)})}function jg(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var r=new GI(n,i),a=p(i.get("data"),x(Gg,e));return t&&(a=v(a,x(Zg,t))),r.initData(a,null,t?Xg:function(t){return t.value}),r}function qg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Kg(t){return"_"+t+"Type"}function $g(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){_(a)||(a=[a,a]);var o=qh(r,-a[0]/2,-a[1]/2,a[0],a[1],n);return o.name=t,o}}function Qg(t){var e=new $D({name:"line",subPixelOptimize:!0});return Jg(e.shape,t),e}function Jg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=0/0,t.cpy1=0/0)}function tv(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var o=t.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=U([],u,l);if(te(h,h),e){e.attr("position",l);var c=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",u);var c=o.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g,v=n.__labelDistance,m=v[0]*r,y=v[1]*r,x=s/2,c=o.tangentAt(x),_=[c[1],-c[0]],b=o.pointAt(x);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var w=c[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var M=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(M=Math.PI+M),n.attr("rotation",M)}var S;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-y,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=y,p="top";break;default:S=0,p="middle"}switch(n.__position){case"end":d=[h[0]*m+u[0],h[1]*y+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":d=[-h[0]*m+l[0],-h[1]*y+l[1]],f=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":d=[m*w+l[0],l[1]+S],f=c[0]<0?"right":"left",g=[-m*w,-S];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":d=[b[0],b[1]+S],f="center",g=[0,-S];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":d=[-m*w+u[0],u[1]+S],f=c[0]>=0?"right":"left",g=[m*w,-S]}n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[r,r],origin:g})}}}}function ev(t,e,i){jx.call(this),this._createLine(t,e,i)}function iv(t){this._ctor=t||ev,this.group=new jx}function nv(t,e,i,n){var r=e.getItemLayout(i);if(sv(r)){var a=new t._ctor(e,i,n);e.setItemGraphicEl(i,a),t.group.add(a)}}function rv(t,e,i,n,r,a){var o=e.getItemGraphicEl(n);return sv(i.getItemLayout(r))?(o?o.updateData(i,r,a):o=new t._ctor(i,r,a),i.setItemGraphicEl(r,o),void t.group.add(o)):void t.group.remove(o)}function av(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 ov(t){return isNaN(t[0])||isNaN(t[1])}function sv(t){return!ov(t[0])&&!ov(t[1])}function lv(t){return!isNaN(t)&&!isFinite(t)}function uv(t,e,i,n){var r=1-t,a=n.dimensions[t];return lv(e[r])&&lv(i[r])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function hv(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(uv(1,i,n,t)||uv(0,i,n,t)))return!0}return Zg(t,e[0])&&Zg(t,e[1])}function cv(t,e,i,n,r){var a,o=n.coordinateSystem,s=t.getItemModel(e),l=Mo(s.get("x"),r.getWidth()),u=Mo(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=o.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=o.dataToPoint([c,d])}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y"),h=o.dimensions;lv(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):lv(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 dv(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var r=new GI(n,i),a=new GI(n,i),o=new GI([],i),l=p(i.get("data"),x(ek,e,t,i));t&&(l=v(l,x(hv,t)));var u=t?Xg:function(t){return t.value};return r.initData(p(l,function(t){return t[0]}),null,u),a.initData(p(l,function(t){return t[1]}),null,u),o.initData(p(l,function(t){return t[2]})),o.hasItemOption=!0,{from:r,to:a,line:o}}function fv(t){return!isNaN(t)&&!isFinite(t)}function pv(t,e,i){var n=1-t;return fv(e[n])&&fv(i[n])}function gv(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(pv(1,i,n,t)||pv(0,i,n,t))?!0:Zg(t,{coord:i,x:e.x0,y:e.y0})||Zg(t,{coord:n,x:e.x1,y:e.y1})}function vv(t,e,i,n,r){var a,o=n.coordinateSystem,s=t.getItemModel(e),l=Mo(s.get(i[0]),r.getWidth()),u=Mo(s.get(i[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];o.clampData&&o.clampData(d,d),a=o.dataToPoint(d,!0)}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);fv(h)?a[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):fv(c)&&(a[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}function mv(t,e,i){var n,r,a=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return s({name:t},n)}),r=new GI(p(a,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],r=new GI(n,i));var o=p(i.get("data"),x(ik,e,t,i));t&&(o=v(o,x(gv,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return r.initData(o,null,l),r.hasItemOption=!0,r}function yv(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),xv(t),_v(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});_v(n,"position")||(n.position=t.controlPosition),"none"!==n.position||_v(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){M(t)&&!_(t)&&(!_v(t,"value")&&_v(t,"name")&&(t.value=t.name),xv(t))})}function xv(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},r=n.normal||(n.normal={}),a={normal:1,emphasis:1};f(n,function(t,e){a[e]||_v(r,e)||(r[e]=t)}),i.label&&!_v(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function _v(t,e){return t.hasOwnProperty(e)}function bv(t,e){return $o(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function wv(t,e,i,r){var a=_a(t.get(e).replace(/^path:\/\//,""),n(r||{}),new Ai(i[0],i[1],i[2],i[3]),"center");return a}function Mv(t,e,i,n,a,o){var s=e.get("color");if(a)a.setColor(s),i.add(a),o&&o.onUpdate(a);else{var l=t.get("symbol");a=qh(l,-1,-1,2,2,s),a.setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a)}var u=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(u),n=r({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symbolOffset");if(c){var d=n.position=n.position||[0,0];d[0]+=Mo(c[0],h[0]),d[1]+=Mo(c[1],h[1])}var f=t.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function Sv(t,e,i,n,r){if(!t.dragging){var a=n.getModel("checkpointStyle"),o=i.dataToCoord(n.getData().get(["value"],e));r||!a.get("animation",!0)?t.attr({position:[o,0]}):(t.stopAnimation(!0),t.animateTo({position:[o,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}function Iv(t){return u(fk,t)>=0}function Av(t,e){t=t.slice();var i=p(t,Uo);e=(e||[]).slice();var n=p(e,Uo);return function(r,a){f(t,function(t,o){for(var s={name:t,capital:i[o]},l=0;l<e.length;l++)s[e[l]]=t+n[l];r.call(a,s)})}}function Tv(t,e,i){function n(t,e){return u(e.nodes,t)>=0}function r(t,n){var r=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function a(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function o(t){!n(t,s)&&r(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;a(i,s);var l;do l=!1,t(o);while(l);return s}}function Cv(t,e,i){var n=[1/0,-1/0];return gk(i,function(t){var i=t.getData();i&&gk(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=[0/0,0/0]),Dv(t,n),n}function Dv(t,e){var i=t.getAxisModel(),n=i.getMin(!0),r="category"===i.get("type"),a=r&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:r&&(e[0]=a>0?0:0/0);var o=i.getMax(!0);return null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:r&&(e[1]=a>0?a-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function kv(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var a=Co(r,[0,500]);a=Math.min(a,20);var o=e||0===n[0]&&100===n[1];i.setRange(o?null:+r[0].toFixed(a),o?null:+r[1].toFixed(a))}}function Pv(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;gk(["min","max"],function(r){var a=i.get(r+"Span"),o=i.get(r+"ValueSpan");null!=o&&(o=t.getAxisModel().axis.scale.parse(o)),null!=o?a=wo(n[0]+o,n,[0,100],!0):null!=a&&(o=wo(a,[0,100],n,!0)-n[0]),e[r+"Span"]=a,e[r+"ValueSpan"]=o})}function Lv(t){var e={};return yk(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Ov(t,e){var i=t._rangePropMode,n=t.get("rangeMode");yk([["start","startValue"],["end","endValue"]],function(t,r){var a=null!=e[t[0]],o=null!=e[t[1]];a&&!o?i[r]="percent":!a&&o?i[r]="value":n?i[r]=n[r]:a&&(i[r]="percent")})}function zv(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Ev(t){return"vertical"===t?"ns-resize":"ew-resize"}function Bv(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(Rv,this),r=e(Nv,this),a=e(Vv,this),o=e(Fv,this),l=e(Gv,this);ex.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=s(n(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",a)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",o),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",a),t.off("mousewheel",o),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Rv(t){if(!(Ie(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 Nv(t){if(this._dragging&&Zv("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!cf(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,a=e-n,o=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&lx(t.event),Wv(this,"pan","moveOnMouseMove",t,{dx:a,dy:o,oldX:n,oldY:r,newX:e,newY:i})}}function Vv(t){Ie(t)||(this._dragging=!1)}function Fv(t){var e=Zv("zoomOnMouseWheel",t,this._opt),i=Zv("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,r=Math.abs(n),a=t.offsetX,o=t.offsetY;if(0!==n&&(e||i)){if(e){var s=r>3?1.4:r>1?1.2:1.1,l=n>0?s:1/s;Hv(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:a,originY:o})}if(i){var u=Math.abs(n),h=(n>0?1:-1)*(u>3?.4:u>1?.15:.05);Hv(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:a,originY:o})}}}function Gv(t){if(!cf(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Hv(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function Hv(t,e,i,n,r){t.pointerChecker&&t.pointerChecker(n,r.originX,r.originY)&&(lx(n.event),Wv(t,e,i,n,r))}function Wv(t,e,i,n,r){r.isAvailableBehavior=y(Zv,null,i,n),t.trigger(e,r)}function Zv(t,e,i){var n=i[t];return!t||n&&(!w(n)||e.event[n+"Key"])}function Xv(t,e){var i=jv(t),n=e.dataZoomId,r=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&u(e.allCoordIds,r)<0&&(delete i[n],t.count--)}),Kv(i);var a=i[r];a||(a=i[r]={coordId:r,dataZoomInfos:{},count:0},a.controller=qv(t,a),a.dispatchAction=x($v,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var o=Qv(a.dataZoomInfos);a.controller.enable(o.controlType,o.opt),a.controller.setPointerChecker(e.containsPoint),yl(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Yv(t,e){var i=jv(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Kv(i)}function Uv(t){return t.type+"\x00_"+t.id}function jv(t){var e=t.getZr();return e[Ek]||(e[Ek]={})}function qv(t,e){var i=new Bv(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(r){if(i.isAvailableBehavior(r.dataZoomModel.option)){var a=(r.getRange||{})[t],o=a&&a(e.controller,i);!r.dataZoomModel.get("disabled",!0)&&o&&n.push({dataZoomId:r.dataZoomId,start:o[0],end:o[1]})}}),n.length&&e.dispatchAction(n)})}),i}function Kv(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function $v(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Qv(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return f(t,function(t){var a=t.dataZoomModel,o=a.get("disabled",!0)?!1:a.get("zoomLock",!0)?"move":!0;n[i+o]>n[i+e]&&(e=o),r&=a.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}function Jv(t){return function(e,i,n,r){var a=this._range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,i,n,r);return rC(l,o,[0,100],"all"),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}}}function tm(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function em(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function im(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(Hk(e,function(t,e){n[t]=e}),!_(i)){var r=[];M(i)?Hk(i,function(t,e){var i=n[e];r[null!=i?i:Zk]=t}):r[Zk]=i,i=cm(t,r)}for(var a=e.length-1;a>=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function nm(t,e){var i=t.visual,n=[];M(i)?Hk(i,function(t){n.push(t)}):null!=i&&n.push(i);var r={color:1,symbol:1};e||1!==n.length||r.hasOwnProperty(t.type)||(n[1]=n[0]),cm(t,n)}function rm(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:um([0,1])}}function am(t){var e=this.option.visual;return e[Math.round(wo(t,[0,1],[0,e.length-1],!0))]||{}}function om(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function sm(t){var e=this.option.visual;return e[this.option.loop&&t!==Zk?t%e.length:t]}function lm(){return this.option.visual[0]}function um(t){return{linear:function(e){return wo(e,t,this.option.visual,!0)},category:sm,piecewise:function(e,i){var n=hm.call(this,i);return null==n&&(n=wo(e,t,this.option.visual,!0)),n},fixed:lm}}function hm(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=Xk.findPieceIndex(t,i),r=i[n];if(r&&r.visual)return r.visual[this.type]}}function cm(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return ti(t)})),e}function dm(t,e,i){return t?i>=e:i>e}function fm(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function pm(t,e,i){function r(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var a={};return jk(e,function(e){var o=a[e]=r();jk(t[e],function(t,r){if(Xk.isValidType(r)){var a={type:r,visual:t};i&&i(a,e),o[r]=new Xk(a),"opacity"===r&&(a=n(a),a.type="colorAlpha",o.__hidden.__alphaForOpacity=new Xk(a))}})}),a}function gm(t,e,i){var r;f(i,function(t){e.hasOwnProperty(t)&&fm(e[t])&&(r=!0)}),r&&f(i,function(i){e.hasOwnProperty(i)&&fm(e[i])?t[i]=n(e[i]):delete t[i]})}function vm(t,e,i,n,r,a){function o(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||c.visualMap!==!1)for(var d=n.call(r,t),f=e[d],p=u[d],g=0,v=p.length;v>g;g++){var m=p[g];f[m]&&f[m].applyVisual(t,o,s)}}var u={};f(t,function(t){var i=Xk.prepareVisualTypes(e[t]);u[t]=i});var h;null==a?i.each(l):i.each([a],l)}function mm(t,e,i,n){function r(t,r){function o(t){return r.getItemVisual(l,t)}function s(t,e){r.setItemVisual(l,t,e)}null!=n&&(n=r.getDimension(n));for(var l;null!=(l=t.next());){var u=r.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?r.get(n,l,!0):l,c=i(h),d=e[c],f=a[c],p=0,g=f.length;g>p;p++){var v=f[p];d[v]&&d[v].applyVisual(h,o,s)}}}var a={};return f(t,function(t){var i=Xk.prepareVisualTypes(e[t]);a[t]=i}),{progress:r}}function ym(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var r=n.range,a=e[t];return xm(a,r)}},rect:function(n,r,a){if(n){var o=a.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),xm(s[0],o)||xm(s[1],o)||xm(o[0],s)||xm(o[1],s)}}}}function xm(t,e){return e[0]<=t&&t<=e[1]}function _m(t,e,i){var n=this._targetInfoList=[],r={},a=wm(e,t);Kk(iP,function(t,e){(!i||!i.include||$k(i.include,e)>=0)&&t(a,n,r)})}function bm(t){return t[0]>t[1]&&t.reverse(),t}function wm(t,e){return cr(t,e,{includeMainTypes:tP})}function Mm(t,e,i,n){var r=i.getAxis(["x","y"][t]),a=bm(p([0,1],function(t){return e?r.coordToData(r.toLocalCoord(n[t])):r.toGlobalCoord(r.dataToCoord(n[t]))})),o=[];return o[t]=a,o[1-t]=[0/0,0/0],{values:a,xyMinMax:o}}function Sm(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Im(t,e){var i=Am(t),n=Am(e),r=[i[0]/n[0],i[1]/n[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function Am(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function Tm(t){t.eachComponent({mainType:"brush"},function(e){var i=e.brushTargetManager=new _m(e.option,t);i.setInputRanges(e.areas,t)})}function Cm(t,e,i,n,r){if(r){var a=t.getZr();if(!a[uP]){a[lP]||(a[lP]=Dm);var o=yl(a,lP,i,e);o(t,n)}}}function Dm(t,e){if(!t.isDisposed()){var i=t.getZr();i[uP]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[uP]=!1}}function km(t,e,i,n){for(var r=0,a=e.length;a>r;r++){var o=e[r];if(t[o.brushType](n,i,o.selectors,o))return!0}}function Pm(t){var e=t.brushSelector;if(w(e)){var i=[];return f(qk,function(t,n){i[n]=function(i,n,r,a){var o=n.getItemLayout(i);return t[e](o,r,a)}}),i}if(b(e)){var n={};return f(qk,function(t,i){n[i]=e}),n}return e}function Lm(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function Om(t){var e=t.selectors={};return f(qk[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function zm(t){return new Ai(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function Em(t,e){return r({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new go(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Bm(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function Rm(t,e){fP[t]=e}function Nm(t){return fP[t]}function Vm(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function Fm(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Gm(t,e,i,n){function r(t){return l[t]}function a(t,e){l[t]=e}for(var o=e.targetVisuals[n],s=Xk.prepareVisualTypes(o),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=o["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,r,a)}return l.color}function Hm(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,r=(i[1]-i[0])/n,a=i[0],o=[],s=0;n>=s&&a<i[1];s++)o.push(a),a+=r;return o.push(i[1]),o}function Wm(t,e,i){var n=t.option,r=n.align;if(null!=r&&"auto"!==r)return r;for(var a={width:e.getWidth(),height:e.getHeight()},o="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],h={},c=0;3>c;c++)h[s[1-o][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][o],f=$o(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 Zm(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function Xm(t,e,i,n){return new mw({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){lx(t.event)},ondragend:n})}function Ym(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function Um(t,e,i,n){return t?[[0,-zP(e,EP(i,0))],[RP,0],[0,zP(e,EP(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function jm(t,e,i){var n=BP/2,r=t.get("hoverLinkDataSize");return r&&(n=LP(r,e,i,!0)/2),n}function qm(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function Km(t){return"vertical"===t?"ns-resize":"ew-resize"}function $m(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function Qm(t){return 0===t.indexOf("my")}function Jm(t){this.model=t}function ty(t){this.model=t}function ey(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var a=r.getBaseAxis();if("category"===a.type){var o=a.dim+"_"+a.index;e[o]||(e[o]={categoryAxis:a,valueAxis:r.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[o].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function iy(t){var e=[];return f(t,function(t){var i=t.categoryAxis,n=t.valueAxis,r=n.dim,a=[" "].concat(p(t.series,function(t){return t.name})),o=[i.model.getCategories()];f(t.series,function(t){o.push(t.getRawData().mapArray(r,function(t){return t}))});for(var s=[a.join(QP)],l=0;l<o[0].length;l++){for(var u=[],h=0;h<o.length;h++)u.push(o[h][l]);s.push(u.join(QP))}e.push(s.join("\n"))}),e.join("\n\n"+$P+"\n\n")}function ny(t){return p(t,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var t=arguments.length,r=arguments[t-1],a=e.getName(r),o=0;t-1>o;o++)n[o]=arguments[o];i.push((a?a+QP:"")+n.join(QP))}),i.join("\n")}).join("\n\n"+$P+"\n\n")}function ry(t){var e=ey(t);return{value:v([iy(e.seriesGroupByCategoryAxis),ny(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+$P+"\n\n"),meta:e.meta}}function ay(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function oy(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(QP)>=0?!0:void 0}function sy(t){for(var e=t.split(/\n+/g),i=ay(e.shift()).split(JP),n=[],r=p(i,function(t){return{name:t,data:[]}}),a=0;a<e.length;a++){var o=ay(e[a]).split(JP);n.push(o.shift());for(var s=0;s<o.length;s++)r[s]&&(r[s].data[a]=o[s])}return{series:r,categories:n}}function ly(t){for(var e=t.split(/\n+/g),i=ay(e.shift()),n=[],r=0;r<e.length;r++){var a,o=ay(e[r]).split(JP),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),n[r]={name:s,value:[]},a=n[r].value):a=n[r]=[];
+for(var u=0;u<o.length;u++)a.push(+o[u]);1===a.length&&(l?n[r].value=a[0]:n[r]=a[0])}return{name:i,data:n}}function uy(t,e){var i=t.split(new RegExp("\n*"+$P+"\n*","g")),n={series:[]};return f(i,function(t,i){if(oy(t)){var r=sy(t),a=e[i],o=a.axisDim+"Axis";a&&(n[o]=n[o]||[],n[o][a.axisIndex]={data:r.categories},n.series=n.series.concat(r.series))}else{var r=ly(t);n.series.push(r)}}),n}function hy(t){this._dom=null,this.model=t}function cy(t,e){return p(t,function(t,i){var n=e&&e[i];return M(n)&&!_(n)?(M(t)&&!_(t)&&(t=t.value),s({value:t},n)):t})}function dy(t,e){var i=vy(t);tL(e,function(e,n){for(var r=i.length-1;r>=0;r--){var a=i[r];if(a[n])break}if(0>r){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var s=o.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)}function fy(t){var e=vy(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return tL(i,function(t,i){for(var r=e.length-1;r>=0;r--){var t=e[r][i];if(t){n[i]=t;break}}}),n}function py(t){t[eL]=null}function gy(t){return vy(t).length}function vy(t){var e=t[eL];return e||(e=t[eL]=[{}]),e}function my(t,e,i){(this._brushController=new ff(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function yy(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function xy(t,e){t.setIconStatus("back",gy(e)>1?"emphasis":"normal")}function _y(t,e,i,n,r){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new _m(yy(t.option),e,{include:["grid"]});i._brushController.setPanels(o.makePanelOpts(r,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)"}}:!1)}function by(t){this.model=t}function wy(t,e,i,n){var r=i.type,a=uL.hasOwnProperty(r)?uL[r]:xa(r),o=new a(i);e.add(o),n.set(t,o),o.__ecGraphicId=t}function My(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){My(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Sy(t){return t=o({},t),f(["id","parentId","$action","hv","bounding"].concat(dM),function(e){delete t[e]}),t}function Iy(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Ay(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 Ty(t,e,i){var n=o({},i),a=t[e],s=i.$action||"merge";"merge"===s?a?(r(a,n,!0),Jo(a,n,{ignoreSize:!0}),es(i,a)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&a&&(t[e]=null)}function Cy(t,e){t&&(t.hv=e.hv=[Iy(e,["left","right"]),Iy(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Dy(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}var ky=2311,Py=function(){return ky++},Ly={};Ly="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);var Oy=Ly,zy={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Ey={"[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},By=Object.prototype.toString,Ry=Array.prototype,Ny=Ry.forEach,Vy=Ry.filter,Fy=Ry.slice,Gy=Ry.map,Hy=Ry.reduce,Wy={},Zy=function(){return Wy.createCanvas()};Wy.createCanvas=function(){return document.createElement("canvas")};var Xy,Yy="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var Uy=(Object.freeze||Object)({$override:i,clone:n,merge:r,mergeAll:a,extend:o,defaults:s,createCanvas:Zy,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:x,isArray:_,isFunction:b,isString:w,isObject:M,isBuiltInObject:S,isTypedArray:I,isDom:A,eqNaN:T,retrieve:C,retrieve2:D,retrieve3:k,slice:P,normalizeCssArray:L,assert:O,trim:z,setAsPrimitive:E,isPrimitive:B,createHashMap:N,concatArray:V,noop:F}),jy="undefined"==typeof Float32Array?Array:Float32Array,qy=j,Ky=q,$y=ee,Qy=ie,Jy=(Object.freeze||Object)({create:G,copy:H,clone:W,set:Z,add:X,scaleAndAdd:Y,sub:U,len:j,length:qy,lenSquare:q,lengthSquare:Ky,mul:K,div:$,dot:Q,scale:J,normalize:te,distance:ee,dist:$y,distanceSquare:ie,distSquare:Qy,negate:ne,lerp:re,applyTransform:ae,min:oe,max:se});le.prototype={constructor:le,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.dispatchToElement(ue(e,t),"drag",t.event);var o=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(ue(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var tx=Array.prototype.slice,ex=function(t){this._$handlers={},this._$eventProcessor=t};ex.prototype={constructor:ex,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},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=[],r=0,a=i[t].length;a>r;r++)i[t][r].h!==e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>3&&(n=tx.call(n,1));for(var a=e.length,o=0;a>o;){var s=e[o];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(o,1),a--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>4&&(n=tx.call(n,1,n.length-1));for(var a=n[n.length-1],o=e.length,s=0;o>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var ix=Math.log(2),nx="___zrEVENTSAVED",rx=[],ax="undefined"!=typeof window&&!!window.addEventListener,ox=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sx=[],lx=ax?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},ux=function(){this._track=[]};ux.prototype={constructor:ux,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 r={points:[],touches:[],target:e,event:t},a=0,o=n.length;o>a;a++){var s=n[a],l=xe(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in hx)if(hx.hasOwnProperty(e)){var i=hx[e](this._track,t);if(i)return i}}};var hx={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,r=(t[i-2]||{}).points||n;if(r&&r.length>1&&n&&n.length>1){var a=Ae(n)/Ae(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Te(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},cx="silent";ke.prototype.dispose=function(){};var dx=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],fx=function(t,e,i,n){ex.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new ke,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};fx.prototype={constructor:fx,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(dx,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=Le(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(r=this.findHover(r.x,r.y),a=r.target);var o=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){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){t=t||{};var n=t.target;if(!n||!n.silent){for(var r="on"+e,a=Ce(e,t,i);n&&(n[r]&&(a.cancelBubble=n[r].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[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=Pe(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),o!==cx)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new ux);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){fx.prototype[t]=function(e){var i,n,r=e.zrX,a=e.zrY,o=Le(this,r,a);if("mouseup"===t&&o||(i=this.findHover(r,a),n=i.target),"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||$y(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(fx,ex),c(fx,le);var px="undefined"==typeof Float32Array?Array:Float32Array,gx=(Object.freeze||Object)({create:Oe,identity:ze,copy:Ee,mul:Be,translate:Re,rotate:Ne,scale:Ve,invert:Fe,clone:Ge}),vx=ze,mx=5e-5,yx=function(t){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},xx=yx.prototype;xx.transform=null,xx.needLocalTransform=function(){return He(this.rotation)||He(this.position[0])||He(this.position[1])||He(this.scale[0]-1)||He(this.scale[1]-1)};var _x=[];xx.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&vx(n));n=n||Oe(),i?this.getLocalTransform(n):vx(n),e&&(i?Be(n,t.transform,n):Ee(n,t.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(_x);var a=_x[0]<0?-1:1,o=_x[1]<0?-1:1,s=((_x[0]-a)*r+a)/_x[0]||0,l=((_x[1]-o)*r+o)/_x[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Oe(),Fe(this.invTransform,n)},xx.getLocalTransform=function(t){return yx.getLocalTransform(this,t)},xx.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)},xx.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var bx=[],Mx=Oe();xx.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,r=this.scale;He(e-1)&&(e=Math.sqrt(e)),He(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],r[0]=e,r[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},xx.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Be(bx,t.invTransform,e),e=bx);var i=this.origin;i&&(i[0]||i[1])&&(Mx[4]=i[0],Mx[5]=i[1],Be(bx,e,Mx),bx[4]-=i[0],bx[5]-=i[1],e=bx),this.setLocalTransform(e)}},xx.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)},xx.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ae(i,i,n),i},xx.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ae(i,i,n),i},yx.getLocalTransform=function(t,e){e=e||[],vx(e);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Ve(e,e,n),r&&Ne(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var Sx={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*(-Math.pow(2,-10*(t-1))+2)},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,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Sx.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*Sx.bounceIn(2*t):.5*Sx.bounceOut(2*t-1)+.5}};We.prototype={constructor:We,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?Sx[n]:n,a="function"==typeof r?r(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){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Ix=function(){this.head=null,this.tail=null,this._len=0},Ax=Ix.prototype;Ax.insert=function(t){var e=new Tx(t);return this.insertEntry(e),e},Ax.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++},Ax.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--},Ax.len=function(){return this._len},Ax.clear=function(){this.head=this.tail=null,this._len=0};var Tx=function(t){this.value=t,this.next,this.prev},Cx=function(t){this._list=new Ix,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Dx=Cx.prototype;Dx.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Tx(e),o.key=t,i.insertEntry(o),n[t]=o}return r},Dx.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},Dx.clear=function(){this._list.clear(),this._map={}};var kx={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]},Px=new Cx(20),Lx=null,Ox=ai,zx=oi,Ex=(Object.freeze||Object)({parse:ti,lift:ni,toHex:ri,fastLerp:ai,fastMapToColor:Ox,lerp:oi,mapToColor:zx,modifyHSL:si,modifyAlpha:li,stringify:ui}),Bx=Array.prototype.slice,Rx=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||hi,this._setter=n||ci,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Rx.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:xi(r)})}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;e>i;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,a=function(){r--,r||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=wi(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var r=e[n];t&&r.onframe(this._target,1),i&&i.removeClip(r)}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 Nx=1;"undefined"!=typeof window&&(Nx=Math.max(window.devicePixelRatio||1,1));var Vx=0,Fx=Nx,Gx=function(){};1===Vx&&(Gx=console.error);var Hx=Gx,Wx=function(){this.animators=[]};Wx.prototype={constructor:Wx,animate:function(t,e){var i,n=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;n="shape"===o[0];for(var l=0,h=o.length;h>l;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=r;if(!i)return void Hx('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new Rx(i,e);return d.during(function(){r.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,a){Mi(this,t,e,i,n,r,a)},animateFrom:function(t,e,i,n,r,a){Mi(this,t,e,i,n,r,a,!0)}};var Zx=function(t){yx.call(this,t),ex.call(this,t),Wx.call(this,t),this.id=t.id||Py()};Zx.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(){},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(M(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)}},c(Zx,Wx),c(Zx,yx),c(Zx,ex);var Xx=ae,Yx=Math.min,Ux=Math.max;Ai.prototype={constructor:Ai,union:function(t){var e=Yx(t.x,this.x),i=Yx(t.y,this.y);this.width=Ux(t.x+t.width,this.x+this.width)-e,this.height=Ux(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[],i=[],n=[];return function(r){if(r){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,Xx(t,t,r),Xx(e,e,r),Xx(i,i,r),Xx(n,n,r),this.x=Yx(t[0],e[0],i[0],n[0]),this.y=Yx(t[1],e[1],i[1],n[1]);var a=Ux(t[0],e[0],i[0],n[0]),o=Ux(t[1],e[1],i[1],n[1]);this.width=a-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=Oe();return Re(r,r,[-e.x,-e.y]),Ve(r,r,[i,n]),Re(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof Ai||(t=Ai.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(o>n||i>s||l>a||r>u)},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 Ai(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}}},Ai.create=function(t){return new Ai(t.x,t.y,t.width,t.height)};var jx=function(t){t=t||{},Zx.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};jx.prototype={constructor:jx,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 jx&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=u(n,t);return 0>r?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof jx&&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 jx&&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 r=i[n];t.call(e,r,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 jx&&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 jx&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Ai(0,0,0,0),n=t||this._children,r=[],a=0;a<n.length;a++){var o=n[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),e=e||i.clone(),e.union(i)):(e=e||s.clone(),e.union(s))}}return e||i}},h(jx,Zx);var qx=32,Kx=7,$x=function(){this._roots=[],this._displayList=[],this._displayListLen=0};$x.prototype={constructor:$x,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,r=e.length;r>n;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Oy.canvasSupported&&zi(i,Ei)},_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 r=n,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[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 jx&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof jx&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,n=t.length;n>e;e++)this.delRoot(t[e]);else{var r=u(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof jx&&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:Ei};var Qx={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Jx=function(t,e,i){return Qx.hasOwnProperty(e)?i*=t.dpr:i},t_={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},e_=9,i_=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],n_=function(t){this.extendFrom(t,!1)};n_.prototype={constructor:n_,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,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){var n=this,r=i&&i.style,a=!r||t.__attrCachedBy!==t_.STYLE_BIND;
+t.__attrCachedBy=t_.STYLE_BIND;for(var o=0;o<i_.length;o++){var s=i_[o],l=s[0];(a||n[l]!==r[l])&&(t[l]=Jx(t,l,n[l]||s[1]))}if((a||n.fill!==r.fill)&&(t.fillStyle=n.fill),(a||n.stroke!==r.stroke)&&(t.strokeStyle=n.stroke),(a||n.opacity!==r.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(a||n.blend!==r.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)||e!==!0&&(e===!1?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?Ri:Bi,r=n(t,e,i),a=e.colorStops,o=0;o<a.length;o++)r.addColorStop(a[o].offset,a[o].color);return r}};for(var r_=n_.prototype,a_=0;a_<i_.length;a_++){var o_=i_[a_];o_[0]in r_||(r_[o_[0]]=o_[1])}n_.getGradient=r_.getGradient;var s_=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};s_.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var l_=function(t,e,i){var n;i=i||Fx,"string"==typeof t?n=Vi(t,e,i):M(t)&&(n=t,t=n.id),this.id=t,this.dom=n;var r=n.style;r&&(n.onselectstart=Ni,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["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};l_.prototype={constructor:l_,__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=Vi("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,r=n.style,a=this.domBack;r&&(r.width=t+"px",r.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,r=i.width,a=i.height,e=e||this.clearColor,o=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/l,a/l)),n.clearRect(0,0,r,a),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||n_.getGradient(n,e,{x:0,y:0,width:r,height:a}),e.__canvasGradient=u):e.image&&(u=s_.prototype.getCanvasPattern.call(e,n)),n.save(),n.fillStyle=u||e,n.fillRect(0,0,r,a),n.restore()}if(o){var h=this.domBack;n.save(),n.globalAlpha=s,n.drawImage(h,0,0,r,a),n.restore()}}};var u_="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},h_=new Cx(50),c_={},d_=0,f_=5e3,p_=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,g_="12px sans-serif",v_={};v_.measureText=function(t,e){var i=l();return i.font=e||g_,i.measureText(t)};var m_=g_,y_={left:1,right:1,center:1},x_={top:1,bottom:1,middle:1},__=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],b_={},w_={},M_=new Ai,S_=function(){};S_.prototype={constructor:S_,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&un(i,!0);var n=i.text;if(null!=n&&(n+=""),An(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(M_.copy(e),M_.applyTransform(r),e=M_),cn(this,t,n,i,e,e_),t.restore()}}},Tn.prototype={constructor:Tn,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,globalScaleRatio:1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},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),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Zx.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 n_(t,this),this.dirty(!1),this},calculateTextPosition:null},h(Tn,Zx),c(Tn,S_),Cn.prototype={constructor:Cn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=Gi(n,this._image,this,this.onload);if(r&&Wi(r)){var a=i.x||0,o=i.y||0,s=i.width,l=i.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(r,h,c,i.sWidth,i.sHeight,a,o,s,l)}else if(i.sx&&i.sy){var h=i.sx,c=i.sy,d=s-h,f=l-c;t.drawImage(r,h,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,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 Ai(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(Cn,Tn);var I_=1e5,A_=314159,T_=.01,C_=.001,D_=new Ai(0,0,0,0),k_=new Ai(0,0,0,0),P_=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=o({},i||{}),this.dpr=i.devicePixelRatio||Fx,this._singleCanvas=n,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=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 l_(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[A_]=h,h.zlevel=A_,a.push(A_),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=zn(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};P_.prototype={constructor:P_,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 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 r=i[n],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===n?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=u(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var i=t[e].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){zi(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(I_));var n={};i.ctx.save();for(var r=0;e>r;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(I_)},_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 r=this;u_(function(){r._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(A_).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 r=this._zlevelList[n],a=this._layers[r];a.__builtin__&&a!==this._hoverlayer&&(a.__dirty||e)&&i.push(a)}for(var o=!0,s=0;s<i.length;s++){var a=i[s],l=a.ctx,u={};l.save();var h=e?a.__startIndex:a.__drawIndex,c=!e&&a.incremental&&Date.now,d=c&&Date.now(),p=a.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(a.__startIndex===a.__endIndex)a.clear(!1,p);else if(h===a.__startIndex){var g=t[h];g.incremental&&g.notClear&&!e||a.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=a.__startIndex);for(var v=h;v<a.__endIndex;v++){var m=t[v];if(this._doPaintEl(m,a,e,u),m.__dirty=m.__dirtyText=!1,c){var y=Date.now()-d;if(y>15)break}}a.__drawIndex=v,a.__drawIndex<a.__endIndex&&(o=!1),u.prevElClipPaths&&l.restore(),l.restore()}return Oy.wxa&&f(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,i,n){var r=e.ctx,a=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||a&&!a[0]&&!a[3]||t.culling&&Pn(t,this._width,this._height))){var o=t.__clipPaths,s=n.prevElClipPaths;(!s||Ln(o,s))&&(s&&(r.restore(),n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),On(o,r),n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=A_);var i=this._layers[t];return i||(i=new l_("zr_"+t,this,this.dpr),i.zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&r(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,r=n.length,a=null,o=-1,s=this._domRoot;if(i[t])return void Hx("ZLevel "+t+" has been used already");if(!kn(e))return void Hx("Layer of zlevel "+t+" is not valid");if(r>0&&t>n[0]){for(o=0;r-1>o&&!(n[o]<t&&n[o+1]>t);o++);a=i[n[o]]}if(n.splice(o+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)},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],i=this._layers[n],i.__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],i=this._layers[n],i.__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){var n=t[i];if(n.zlevel!==t[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}for(var r=null,a=0,i=0;i<t.length;i++){var o,n=t[i],s=n.zlevel;n.incremental?(o=this.getLayer(s+C_,this._needsManuallyCompositing),o.incremental=!0,a=1):o=this.getLayer(s+(a>0?T_:0),this._needsManuallyCompositing),o.__builtin__||Hx("ZLevel "+s+" has been used by unkown layer "+o.id),o!==r&&(o.__used=!0,o.__startIndex!==i&&(o.__dirty=!0),o.__startIndex=i,o.__drawIndex=o.incremental?-1:i,e(i),r=o),n.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t){!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]?r(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===t||a===t+T_){var o=this._layers[a];r(o,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(u(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 r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(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(A_).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[A_].dom;var e=new l_("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,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[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],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||Dn(s[i])||Dn(o.style[i]))-(Dn(s[r])||0)-(Dn(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+o),c=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=r.width+h+c,g=r.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 v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var m=Cn,y=new m({style:{x:0,y:0,image:i}});return null!=v.position&&(y.position=t.position=v.position),null!=v.rotation&&(y.rotation=t.rotation=v.rotation),null!=v.scale&&(y.scale=t.scale=v.scale),y}};var L_=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,ex.call(this)};L_.prototype={constructor:L_,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=u(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,r=[],a=[],o=0;n>o;o++){var s=i[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(var o=0;n>o;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(var o=0;n>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(u_(t),!e._paused&&e._update())}var e=this;this._running=!0,u_(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){e=e||{};var i=new Rx(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(L_,ex);var O_=300,z_=Oy.domSupported,E_=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=p(t,function(t){var e=t.replace("mouse","pointer");return i.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:n}}(),B_={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},R_=Gn.prototype;R_.stopPropagation=R_.stopImmediatePropagation=R_.preventDefault=F;var N_={mousedown:function(t){t=we(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=we(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Yn(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=we(this.dom,t),Yn(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=we(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Fn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=we(this.dom,t),Nn(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),N_.mousemove.call(this,t),N_.mousedown.call(this,t)},touchmove:function(t){t=we(this.dom,t),Nn(t),this.handler.processGesture(t,"change"),N_.mousemove.call(this,t)},touchend:function(t){t=we(this.dom,t),Nn(t),this.handler.processGesture(t,"end"),N_.mouseup.call(this,t),+new Date-this._lastTouchMoment<O_&&N_.click.call(this,t)},pointerdown:function(t){N_.mousedown.call(this,t)},pointermove:function(t){Bn(t)||N_.mousemove.call(this,t)},pointerup:function(t){N_.mouseup.call(this,t)},pointerout:function(t){Bn(t)||N_.mouseout.call(this,t)}};f(["click","mousewheel","dblclick","contextmenu"],function(t){N_[t]=function(e){e=we(this.dom,e),this.trigger(t,e)}});var V_={pointermove:function(t){Bn(t)||V_.mousemove.call(this,t)},pointerup:function(t){V_.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Yn(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}},F_=jn.prototype;F_.dispose=function(){Xn(this._localHandlerScope),z_&&Xn(this._globalHandlerScope)},F_.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},c(jn,ex);var G_=!Oy.canvasSupported,H_={canvas:P_},W_={},Z_="4.3.0",X_=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new $x,a=i.renderer;if(G_){if(!H_.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&H_[a]||(a="canvas");var o=new H_[a](e,r,i,t);this.storage=r,this.painter=o;var s=Oy.node||Oy.worker?null:new jn(o.getViewportRoot(),o.root);this.handler=new fx(r,o,s,o.root),this.animation=new L_({stage:{update:y(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(n)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(n)}};X_.prototype={constructor:X_,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=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!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){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},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,Jn(this.id)}};var Y_=(Object.freeze||Object)({version:Z_,init:qn,dispose:Kn,getInstance:$n,registerPainter:Qn}),U_=f,j_=M,q_=_,K_="series\x00",$_=["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"],Q_=0,J_=".",tb="___EC__COMPONENT__CONTAINER___",eb=0,ib=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 r={},a=0;a<t.length;a++){var o=t[a][1];if(!(i&&u(i,o)>=0||n&&u(n,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},nb=ib([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),rb={getLineStyle:function(t){var e=nb(this,t);return e.lineDash=this.getLineDash(e.lineWidth),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?!1:"dashed"===e?[n,n]:[i,i]}},ab=ib([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ob={getAreaStyle:function(t,e){return ab(this,t,e)}},sb=Math.pow,lb=Math.sqrt,ub=1e-8,hb=1e-4,cb=lb(3),db=1/3,fb=G(),pb=G(),gb=G(),vb=Math.min,mb=Math.max,yb=Math.sin,xb=Math.cos,_b=2*Math.PI,bb=G(),wb=G(),Mb=G(),Sb=[],Ib=[],Ab={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Tb=[],Cb=[],Db=[],kb=[],Pb=Math.min,Lb=Math.max,Ob=Math.cos,zb=Math.sin,Eb=Math.sqrt,Bb=Math.abs,Rb="undefined"!=typeof Float32Array,Nb=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Nb.prototype={constructor:Nb,_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,i){i=i||0,this._ux=Bb(i/Fx/t)||0,this._uy=Bb(i/Fx/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(Ab.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=Bb(t-this._xi)>this._ux||Bb(e-this._yi)>this._uy||this._len<5;return this.addData(Ab.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,r,a){return this.addData(Ab.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Ab.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,r,a){return this.addData(Ab.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=Ob(r)*i+t,this._yi=zb(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Ab.R,t,e,i,n),this},closePath:function(){this.addData(Ab.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||!Rb||(this.data=new Float32Array(e));for(var i=0;e>i;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,r=0;e>r;r++)i+=t[r].len();Rb&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[n++]=a[o];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,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=Eb(h*h+c*c),f=l,p=u,g=o.length;for(h/=d,c/=d,0>a&&(a=r+a),a%=r,f-=a*h,p-=a*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=o[n],f+=h*i,p+=c*i,this._dashIdx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?Pb(f,t):Lb(f,t),c>=0?Pb(p,e):Lb(p,e));h=f-t,c=p-e,this._dashOffset=-Eb(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=Ir,y=0,x=this._dashIdx,_=f.length,b=0;for(0>d&&(d=c+d),d%=c,o=0;1>o;o+=.1)s=m(g,t,i,r,o+.1)-m(g,t,i,r,o),l=m(v,e,n,a,o+.1)-m(v,e,n,a,o),y+=Eb(s*s+l*l);for(;_>x&&(b+=f[x],!(b>d));x++);for(o=(b-d)/y;1>=o;)u=m(g,t,i,r,o),h=m(v,e,n,a,o),x%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-Eb(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=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,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Rb&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Tb[0]=Tb[1]=Db[0]=Db[1]=Number.MAX_VALUE,Cb[0]=Cb[1]=kb[0]=kb[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(e=t[a],i=t[a+1],n=e,r=i),o){case Ab.M:n=t[a++],r=t[a++],e=n,i=r,Db[0]=n,Db[1]=r,kb[0]=n,kb[1]=r;break;case Ab.L:Nr(e,i,t[a],t[a+1],Db,kb),e=t[a++],i=t[a++];break;case Ab.C:Vr(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Db,kb),e=t[a++],i=t[a++];break;case Ab.Q:Fr(e,i,t[a++],t[a++],t[a],t[a+1],Db,kb),e=t[a++],i=t[a++];break;case Ab.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(n=Ob(c)*u+s,r=zb(c)*h+l),Gr(s,l,u,h,c,d,f,Db,kb),e=Ob(d)*u+s,i=zb(d)*h+l;break;case Ab.R:n=e=t[a++],r=i=t[a++];var p=t[a++],g=t[a++];Nr(n,r,n+p,r+g,Db,kb);break;case Ab.Z:e=n,i=r}oe(Tb,Tb,Db),se(Cb,Cb,kb)}return 0===a&&(Tb[0]=Tb[1]=Cb[0]=Cb[1]=0),new Ai(Tb[0],Tb[1],Cb[0]-Tb[0],Cb[1]-Tb[1])},rebuildPath:function(t){for(var e,i,n,r,a,o,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;h>c;){var d=s[c++];switch(1===c&&(n=s[c],r=s[c+1],e=n,i=r),d){case Ab.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case Ab.L:a=s[c++],o=s[c++],(Bb(a-n)>l||Bb(o-r)>u||c===h-1)&&(t.lineTo(a,o),n=a,r=o);break;case Ab.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Ab.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Ab.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>v?g:v,w=g>v?1:g/v,M=g>v?v/g:1,S=Math.abs(g-v)>.001,I=m+y;S?(t.translate(f,p),t.rotate(x),t.scale(w,M),t.arc(0,0,b,m,I,1-_),t.scale(1/w,1/M),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,b,m,I,1-_),1===c&&(e=Ob(m)*g+f,i=zb(m)*v+p),n=Ob(I)*g+f,r=zb(I)*v+p;break;case Ab.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Ab.Z:t.closePath(),n=e,r=i}}}},Nb.CMD=Ab;var Vb=2*Math.PI,Fb=2*Math.PI,Gb=Nb.CMD,Hb=2*Math.PI,Wb=1e-4,Zb=[-1,-1,-1],Xb=[-1,-1],Yb=s_.prototype.getCanvasPattern,Ub=Math.abs,jb=new Nb(!0);ia.prototype={constructor:ia,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||jb,r=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,l=a&&!!o.colorStops,u=r&&!!s.colorStops,h=a&&!!o.image,c=r&&!!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,o,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=Yb.call(o,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Yb.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(n.setScale(v[0],v[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(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)if(null!=i.fillOpacity){var m=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=m}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r)if(null!=i.strokeOpacity){var m=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=m}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new Nb},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new Nb),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ea(a,o/s,t,e)))return!0
+}if(r.hasFill())return ta(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!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):Tn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(M(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&&Ub(t[0]-1)>1e-10&&Ub(t[3]-1)>1e-10?Math.sqrt(Ub(t[0]*t[3]-t[2]*t[1])):1}},ia.extend=function(t){var e=function(e){ia.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 r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};h(e,ia);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(ia,Tn);var qb=Nb.CMD,Kb=[[],[],[]],$b=Math.sqrt,Qb=Math.atan2,Jb=function(t,e){var i,n,r,a,o,s,l=t.data,u=qb.M,h=qb.C,c=qb.L,d=qb.R,f=qb.A,p=qb.Q;for(r=0,a=0;r<l.length;){switch(i=l[r++],a=r,n=0,i){case u:n=1;break;case c:n=1;break;case h:n=3;break;case p:n=2;break;case f:var g=e[4],v=e[5],m=$b(e[0]*e[0]+e[1]*e[1]),y=$b(e[2]*e[2]+e[3]*e[3]),x=Qb(-e[1]/y,e[0]/m);l[r]*=m,l[r++]+=g,l[r]*=y,l[r++]+=v,l[r++]*=m,l[r++]*=y,l[r++]+=x,l[r++]+=x,r+=2,a=r;break;case d:s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}for(o=0;n>o;o++){var s=Kb[o];s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}}},tw=Math.sqrt,ew=Math.sin,iw=Math.cos,nw=Math.PI,rw=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},aw=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(rw(t)*rw(e))},ow=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(aw(t,e))},sw=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,lw=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,uw=function(t){Tn.call(this,t)};uw.prototype={constructor:uw,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&un(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;return null!=n&&(n+=""),An(n,i)?(this.setTransform(t),cn(this,t,n,i,null,e),void this.restoreTransform(t)):void(t.__attrCachedBy=t_.NONE)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&un(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Xi(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,wn(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}},h(uw,Tn);var hw=ia.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)}}),cw=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],dw=function(t){return Oy.browser.ie&&Oy.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;r<i.length;r++){var a=i[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<cw.length;l++)cw[l][2]=n[cw[l][0]],n[cw[l][0]]=cw[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<cw.length;l++)n[cw[l][0]]=cw[l][2]}:t},fw=ia.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:dw(ia.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*r+i,h*r+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}}),pw=ia.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}}),gw=function(t,e){for(var i=t.length,n=[],r=0,a=1;i>a;a++)r+=ee(t[a-1],t[a]);var o=r/2;o=i>o?i:o;for(var a=0;o>a;a++){var s,l,u,h=a/(o-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([ua(s[0],f[0],l[0],u[0],d,p,g),ua(s[1],f[1],l[1],u[1],d,p,g)])}return n},vw=function(t,e,i,n){var r,a,o,s,l=[],u=[],h=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)oe(o,o,t[d]),se(s,s,t[d]);oe(o,o,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(W(t[d]));continue}r=t[d-1],a=t[d+1]}U(u,a,r),J(u,u,e);var g=ee(p,r),v=ee(p,a),m=g+v;0!==m&&(g/=m,v/=m),J(h,u,-g),J(c,u,v);var y=X([],p,h),x=X([],p,c);n&&(se(y,y,o),oe(y,y,s),se(x,x,o),oe(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},mw=ia.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){ha(t,e,!0)}}),yw=ia.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){ha(t,e,!1)}}),xw=Math.round,_w={},bw=ia.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(da(_w,e,this.style),i=_w.x,n=_w.y,r=_w.width,a=_w.height,_w.r=e.r,e=_w):(i=e.x,n=e.y,r=e.width,a=e.height),e.r?ln(t,e):t.rect(i,n,r,a),t.closePath()}}),ww={},Mw=ia.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,n,r,a;this.subPixelOptimize?(ca(ww,e,this.style),i=ww.x1,n=ww.y1,r=ww.x2,a=ww.y2):(i=e.x1,n=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(i,n),1>o&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Sw=[],Iw=ia.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,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(Er(i,o,r,h,Sw),o=Sw[1],r=Sw[2],Er(n,s,a,h,Sw),s=Sw[1],a=Sw[2]),t.quadraticCurveTo(o,s,r,a)):(1>h&&(Dr(i,o,l,r,h,Sw),o=Sw[1],l=Sw[2],r=Sw[3],Dr(n,s,u,a,h,Sw),s=Sw[1],u=Sw[2],a=Sw[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return pa(this.shape,t,!1)},tangentAt:function(t){var e=pa(this.shape,t,!0);return te(e,e)}}),Aw=ia.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,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+i,u*r+n),t.arc(i,n,r,a,o,!s)}}),Tw=ia.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],t[i].segmentIgnoreThreshold)},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(),ia.prototype.getBoundingRect.call(this)}}),Cw=function(t){this.colorStops=t||[]};Cw.prototype={constructor:Cw,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Dw=function(t,e,i,n,r,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,Cw.call(this,r)};Dw.prototype={constructor:Dw},h(Dw,Cw);var kw=function(t,e,i,n,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,Cw.call(this,n)};kw.prototype={constructor:kw},h(kw,Cw),ga.prototype.incremental=!0,ga.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},ga.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},ga.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},ga.prototype.eachPendingDisplayable=function(t){for(var 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])},ga.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.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}},ga.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,e===this._cursor?null:this._displayables[e-1]),i.afterBrush&&i.afterBrush(t)}this._cursor=e;for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,0===e?null:this._temporaryDisplayables[e-1]),i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Pw=[];ga.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ai(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(Pw)),t.union(n)}this._rect=t}return this._rect},ga.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();if(n.contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++){var a=this._displayables[r];if(a.contain(t,e))return!0}return!1},h(ga,Tn);var Lw=Math.max,Ow=Math.min,zw={},Ew=1,Bw={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},Rw="emphasis",Nw="normal",Vw=1,Fw={},Gw={},Hw=la,Ww=fa,Zw=N(),Xw=0;ya("circle",hw),ya("sector",fw),ya("ring",pw),ya("polygon",mw),ya("polyline",yw),ya("rect",bw),ya("line",Mw),ya("bezierCurve",Iw),ya("arc",Aw);var Yw=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:Ew,CACHED_LABEL_STYLE_PROPERTIES:Bw,extendShape:va,extendPath:ma,registerShape:ya,getShapeClass:xa,makePath:_a,makeImage:ba,mergePath:Hw,resizePath:Ma,subPixelOptimizeLine:Sa,subPixelOptimizeRect:Ia,subPixelOptimize:Ww,setElementHoverStyle:Oa,setHoverStyle:Va,setAsHighDownDispatcher:Fa,isHighDownDispatcher:Ga,getHighlightDigit:Ha,setLabelStyle:Wa,modifyLabelStyle:Za,setTextStyle:Xa,setText:Ya,getFont:Ja,updateProps:eo,initProps:io,getTransform:no,applyTransform:ro,transformDirection:ao,groupTransition:oo,clipPointsByRect:so,clipRectByRect:lo,createIcon:uo,linePolygonIntersect:ho,lineLineIntersect:co,Group:jx,Image:Cn,Text:uw,Circle:hw,Sector:fw,Ring:pw,Polygon:mw,Polyline:yw,Rect:bw,Line:Mw,BezierCurve:Iw,Arc:Aw,IncrementalDisplayable:ga,CompoundPath:Tw,LinearGradient:Dw,RadialGradient:kw,BoundingRect:Ai}),Uw=["textStyle","color"],jw={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Uw):null)},getFont:function(){return Ja({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Xi(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},qw=ib([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Kw={getItemStyle:function(t,e){var i=qw(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]}},$w=c,Qw=hr();go.prototype={constructor:go,init:null,mergeOption:function(t){r(this.option,t,!0)},get:function(t,e){return null==t?this.option:vo(this.option,this.parsePath(t),!e&&mo(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&mo(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:vo(this.option,t=this.parsePath(t));return e=e||(i=mo(this,t))&&i.getModel(t),new go(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(n(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Qw(this).getParent=t},isAnimationEnabled:function(){if(!Oy.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},yr(go),xr(go),$w(go,rb),$w(go,ob),$w(go,jw),$w(go,Kw);var Jw=0,tM=1e-4,eM=9007199254740991,iM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,nM=(Object.freeze||Object)({linearMap:wo,parsePercent:Mo,round:So,asc:Io,getPrecision:Ao,getPrecisionSafe:To,getPixelPrecision:Co,getPercentWithPrecision:Do,MAX_SAFE_INTEGER:eM,remRadian:ko,isRadianAroundZero:Po,parseDate:Lo,quantity:Oo,quantityExponent:zo,nice:Eo,quantile:Bo,reformIntervals:Ro,isNumeric:No}),rM=L,aM=/([&<>"'])/g,oM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sM=["a","b","c","d","e","f","g"],lM=function(t,e){return"{"+t+(null==e?"":e)+"}"},uM=$i,hM=(Object.freeze||Object)({addCommas:Vo,toCamelCase:Fo,normalizeCssArray:rM,encodeHTML:Go,formatTpl:Ho,formatTplSimple:Wo,getTooltipMarker:Zo,formatTime:Yo,capitalFirst:Uo,truncateText:uM,getTextBoundingRect:jo,getTextRect:qo}),cM=f,dM=["left","right","top","bottom","width","height"],fM=[["width","left","right"],["height","top","bottom"]],pM=Ko,gM=(x(Ko,"vertical"),x(Ko,"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")}}}),vM=hr(),mM=go.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){go.call(this,t,e,i,n),this.uid=yo("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ts(t):{},a=e.getTheme();r(t,a.get(this.mainType)),r(t,this.getDefaultOption()),i&&Jo(t,n,i)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&Jo(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=vM(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var a={},o=e.length-1;o>=0;o--)a=r(a,e[o],!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)})}});wr(mM,{registerWhenExtend:!0}),xo(mM),_o(mM,is),c(mM,gM);var yM="";"undefined"!=typeof navigator&&(yM=navigator.platform||"");var xM={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:yM.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},_M=hr(),bM={clearColorPalette:function(){_M(this).colorIdx=0,_M(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=_M(e),r=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=tr(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?ns(s,i):o;if(l=l||o,l&&l.length){var u=l[r];return t&&(a[t]=u),n.colorIdx=(r+1)%l.length,u}}},wM="original",MM="arrayRows",SM="objectRows",IM="keyedColumns",AM="unknown",TM="typedArray",CM="column",DM="row";rs.seriesDataToSource=function(t){return new rs({data:t,sourceFormat:I(t)?TM:wM,fromDataset:!1})},xr(rs);var kM={Must:1,Might:2,Not:3},PM=hr(),LM="\x00_ec_inner",OM=go.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new go(i),this._optionManager=n},setOption:function(t,e){O(!(LM 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)):_s.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var r=tr(t[e]),s=rr(a.get(e),r);ar(s),f(s,function(t){var i=t.option;M(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=ws(e,i,t.exist))});var l=bs(a,n);i[e]=[],a.set(e,[]),f(s,function(t,n){var r=t.exist,s=t.option;if(O(M(s)||r,"Empty component definition"),s){var u=mM.getClass(e,t.keyInfo.subType,!0);if(r&&r.constructor===u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=o({dependentModels:l,componentIndex:n},t.keyInfo);r=new u(s,this,this,h),o(r,h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);a.get(e)[n]=r,i[e][n]=r.option},this),"series"===e&&Ms(this,a.get("series"))}var i=this.option,a=this._componentsMap,s=[];ss(this),f(t,function(t,e){null!=t&&(mM.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):r(i[e],t,!0))}),mM.topologicalTravel(s,mM.getAllClassMainTypes(),e,this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(mM.hasClass(i)){for(var e=tr(e),n=e.length-1;n>=0;n--)sr(e[n])&&e.splice(n,1);t[i]=e}}),delete t[LM],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var o;if(null!=i)_(i)||(i=[i]),o=v(p(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=_(n);o=v(a,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=_(r);o=v(a,function(t){return l&&u(r,t.name)>=0||!l&&t.name===r})}else o=a.slice();return Ss(o,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:r,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?v(e,t.filter):e}var n=t.query,r=t.mainType,a=e(n),o=a?this.queryComponents(a):this._componentsMap.get(r);return i(Ss(o,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,r){e.call(i,n,t,r)})});else if(w(t))f(n.get(t),e,i);else if(M(t)){var r=this.findComponents(t);f(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return v(e,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){f(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){f(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return f(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){var i=v(this._componentsMap.get("series"),t,e);Ms(this,i)},restoreData:function(t){var e=this._componentsMap;Ms(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),mM.topologicalTravel(i,mM.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!ys(e,t))&&e.restoreData()})})}});c(OM,bM);var zM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],EM={};As.prototype={constructor:As,create:function(t,e){var i=[];f(EM,function(n){var r=n.create(t,e);i=i.concat(r||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},As.register=function(t,e){EM[t]=e},As.get=function(t){return EM[t]};var BM=f,RM=n,NM=p,VM=r,FM=/^(min|max)?(.+)$/;Ts.prototype={constructor:Ts,setOption:function(t,e){t&&f(tr(t.series),function(t){t&&t.data&&I(t.data)&&E(t.data)}),t=RM(t);var i=this._optionBackup,n=Cs.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Ls(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=NM(e.timelineOptions,RM),this._mediaList=NM(e.mediaList,RM),this._mediaDefault=RM(e.mediaDefault),this._currentMediaIndices=[],RM(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=RM(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,r=[],a=[];if(!i.length&&!n)return a;for(var o=0,s=i.length;s>o;o++)Ds(i[o].query,t,e)&&r.push(o);return!r.length&&n&&(r=[-1]),r.length&&!Ps(r,this._currentMediaIndices)&&(a=NM(r,function(t){return RM(-1===t?n.option:i[t].option)})),this._currentMediaIndices=r,a}};var GM=f,HM=M,WM=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],ZM=function(t,e){GM(Vs(t.series),function(t){HM(t)&&Ns(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),GM(i,function(e){GM(Vs(t[e]),function(t){t&&(Bs(t,"axisLabel"),Bs(t.axisPointer,"label"))})}),GM(Vs(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Bs(e,"axisLabel"),Bs(e&&e.axisPointer,"label")}),GM(Vs(t.calendar),function(t){zs(t,"itemStyle"),Bs(t,"dayLabel"),Bs(t,"monthLabel"),Bs(t,"yearLabel")}),GM(Vs(t.radar),function(t){Bs(t,"name")}),GM(Vs(t.geo),function(t){HM(t)&&(Rs(t),GM(Vs(t.regions),function(t){Rs(t)}))}),GM(Vs(t.timeline),function(t){Rs(t),zs(t,"label"),zs(t,"itemStyle"),zs(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){M(t)&&(zs(t,"label"),zs(t,"itemStyle"))})}),GM(Vs(t.toolbox),function(t){zs(t,"iconStyle"),GM(t.feature,function(t){zs(t,"iconStyle")})}),Bs(Fs(t.axisPointer),"label"),Bs(Fs(t.tooltip).axisPointer,"label")},XM=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],YM=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],UM=function(t,e){ZM(t,e),t.series=tr(t.series),f(t.series,function(t){if(M(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=Gs(t,"pointer.color");null!=i&&Hs(t,"itemStyle.color",i)}Ws(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(YM,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){Ws(t)}))})},jM=function(t){var e=N();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),a={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(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(Zs)},qM=Xs.prototype;qM.pure=!1,qM.persistent=!0,qM.getSource=function(){return this._source};var KM={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:js},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 r=i[n];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Ys,getItem:Us,appendData:js},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 r=this._data[i[n].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])})}},original:{count:Ys,getItem:Us,appendData:js},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}}},$M={arrayRows:qs,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:qs,original:function(t,e,i){var n=ir(t);return null!=i&&n instanceof Array?n[i]:n},typedArray:qs},QM={arrayRows:Ks,objectRows:function(t,e){return $s(t[e],this._dimensionInfos[e])},keyedColumns:Ks,original:function(t,e,i,n){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&nr(t)&&(this.hasItemOption=!0),$s(r instanceof Array?r[n]:r,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},JM=/\{@(.+?)\}/g,tS={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),r=i.getRawIndex(t),a=i.getName(t),o=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=gr(h),d=this.mainType,f="series"===d,p=i.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:a,dataIndex:r,data:o,dataType:e,value:n,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Zo({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);if("function"==typeof l)return s.status=e,s.dimensionIndex=n,l(s);if("string"==typeof l){var u=Ho(l,s);return u.replace(JM,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),Qs(a,t,i)})}},getRawValue:function(t,e){return Qs(this.getData(e),t)},formatTooltip:function(){}},eS=el.prototype;eS.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 r=this.context;r.data=r.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=nl(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||f>d)){var p=this._progress;if(_(p))for(var g=0;g<p.length;g++)il(this,p[g],d,f,l,u);else il(this,p,d,f,l,u)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var iS=function(){function t(){return i>n?n++:null}function e(){var t=n%o*r+Math.ceil(n/o),e=n>=i?null:a>t?t:n;return n++,e}var i,n,r,a,o,s={reset:function(l,u,h,c){n=l,i=u,r=h,a=c,o=Math.ceil(a/r),s.next=r>1&&a>0?e:t}};return s}();eS.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},eS.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},eS.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},eS.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},eS.getUpstream=function(){return this._upstream},eS.getDownstream=function(){return this._downstream},eS.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var nS=hr(),rS=mM.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i){this.seriesIndex=this.componentIndex,this.dataTask=tl({count:ol,reset:sl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),ls(this);var n=this.getInitialData(t,i);ul(n,this),this.dataTask.context.data=n,nS(this).dataBeforeProcessed=n,rl(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ts(t):{},a=this.subType;mM.hasClass(a)&&(a+="Series"),r(t,e.getTheme().get(this.subType)),r(t,this.getDefaultOption()),er(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Jo(t,n,i)},mergeOption:function(t,e){t=r(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&Jo(this.option,t,i),ls(this);var n=this.getInitialData(t,e);ul(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,nS(this).dataBeforeProcessed=n,rl(this)},fillDataTextStyle:function(t){if(t&&!I(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&er(t[i],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=cl(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return nS(this).data},setData:function(t){var e=cl(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)}nS(this).data=t},getSource:function(){return os(this)},getRawData:function(){return nS(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;
+return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){function r(i){function r(t,i){var r=c.getDimensionInfo(i);if(r&&r.otherDims.tooltip!==!1){var d=r.type,f="sub"+o.seriesIndex+"at"+h,p=Zo({color:y,type:"subItem",renderMode:n,markerId:f}),g="string"==typeof p?p:p.content,v=(a?g+Go(r.displayName||"-")+": ":"")+Go("ordinal"===d?t+"":"time"===d?e?"":Yo("yyyy/MM/dd hh:mm:ss",t):Vo(t));v&&s.push(v),l&&(u[f]=y,++h)}}var a=g(i,function(t,e,i){var n=c.getDimensionInfo(i);return t|=n&&n.tooltip!==!1&&null!=n.displayName},0),s=[];d.length?f(d,function(e){r(Qs(c,t,e),e)}):f(i,r);var p=a?l?"\n":"<br/>":"",v=p+s.join(p||", ");return{renderMode:n,content:v,style:u}}function a(t){return{renderMode:n,content:Go(Vo(t)),style:u}}var o=this;n=n||"html";var s="html"===n?"<br/>":"\n",l="richText"===n,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,v=this.getRawValue(t),m=_(v),y=c.getItemVisual(t,"color");M(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var x=p>1||m&&!p?r(v):a(p?Qs(c,t,d[0]):m?v[0]:v),b=x.content,w=o.seriesIndex+"at"+h,S=Zo({color:y,type:"item",renderMode:n,markerId:w});u[w]=y,++h;var I=c.getName(t),A=this.name;or(this)||(A=""),A=A?Go(A)+(e?": ":s):"";var T="string"==typeof S?S:S.content,C=e?T+A+b:A+T+(I?Go(I)+": "+b:b);return{html:C,markers:u}},isAnimationEnabled:function(){if(Oy.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,r=bM.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),r},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});c(rS,tS),c(rS,bM);var aS=function(){this.group=new jx,this.uid=yo("viewComponent")};aS.prototype={constructor:aS,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var oS=aS.prototype;oS.updateView=oS.updateLayout=oS.updateVisual=function(){},yr(aS),wr(aS,{registerWhenExtend:!0});var sS=function(){var t=hr();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,a=i.progressiveRender,o=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(r^o||a^s)&&"reset"}},lS=hr(),uS=sS();dl.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){pl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){pl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var hS=dl.prototype;hS.updateView=hS.updateLayout=hS.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},yr(dl,["dispose"]),wr(dl,{registerWhenExtend:!0}),dl.markUpdateMethod=function(t,e){lS(t).updateMethod=e};var cS={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)}}},dS="\x00__throttleOriginMethod",fS="\x00__throttleRate",pS="\x00__throttleType",gS={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n),a=!b(r)||r instanceof Cw?null:r;(!r||a)&&(r=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",r);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){a&&i.each(function(e){i.setItemVisual(e,"color",a(t.getDataParams(e)))});var l=function(t,e){var i=t.getItemModel(e),r=i.get(n,!0),a=i.get(o,!0);null!=r&&t.setItemVisual(e,"color",r),null!=a&&t.setItemVisual(e,"borderColor",a)};return{dataEach:i.hasItemOption?l:null}}}},vS={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:"鏁g偣鍥�",effectScatter:"娑熸吉鏁g偣鍥�",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:""}}}},mS=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=o.get(t);if(null==e){for(var i=t.split("."),n=vS.aria,r=0;r<i.length;++r)n=n[i[r]];return n}return e}function r(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function a(t){return vS.series.typeNames[t]||"鑷畾涔夊浘"}var o=e.getModel("aria");if(o.get("show")){if(o.get("description"))return void t.setAttribute("aria-label",o.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,u=o.get("data.maxCount")||10,h=o.get("series.maxCount")||10,c=Math.min(s,h);if(!(1>s)){var d=r();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,o=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=n(o?l+"withName":l+"withoutName"),r=i(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var h=t.getData();window.data=h,r+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;f<h.count();f++)if(u>f){var g=h.getName(f),v=Qs(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(r)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},yS=Math.PI,xS=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new bw({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Aw({shape:{startAngle:-yS/2,endAngle:-yS/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new bw({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*yS/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*yS/2}).delay(300).start("circularInOut");var a=new jx;return a.add(n),a.add(r),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var o=n.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a},_S=_l.prototype;_S.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},_S.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,a=r?i.step:null,o=n&&n.modDataCount,s=null!=o?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},_S.getPipeline=function(t){return this._pipelineMap.get(t)},_S.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),r=n.count(),a=i.progressiveEnabled&&e.incrementalPrepareRender&&r>=i.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=i.context={progressiveRender:a,modDataCount:s,large:o}},_S.restorePipelines=function(t){var e=this,i=e._pipelineMap=N();t.eachSeries(function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Ll(e,t,t.dataTask)})},_S.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&wl(this,n,r,e,i),n.overallReset&&Ml(this,n,r,e,i)},this)},_S.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,Ll(this,e,r)},_S.performDataProcessorTasks=function(t,e){bl(this,this._dataProcessorHandlers,t,e,{block:!0})},_S.performVisualTasks=function(t,e,i){bl(this,this._visualHandlers,t,e,i)},_S.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},_S.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 bS=_S.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},wS=kl(0);_l.wrapStageHandler=function(t,e){return b(t)&&(t={overallReset:t,seriesType:Ol(t)}),t.uid=yo("stageHandler"),e&&(t.visualType=e),t};var MS,SS={},IS={};zl(SS,OM),zl(IS,Is),SS.eachSeriesByType=SS.eachRawSeriesByType=function(t){MS=t},SS.eachComponent=function(t){"series"===t.mainType&&t.subType&&(MS=t.subType)};var AS=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],TS={color:AS,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],AS]},CS="#eee",DS=function(){return{axisLine:{lineStyle:{color:CS}},axisTick:{lineStyle:{color:CS}},axisLabel:{textStyle:{color:CS}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:CS}}}},kS=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],PS={color:kS,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:CS},crossStyle:{color:CS},label:{color:"#000"}}},legend:{textStyle:{color:CS}},textStyle:{color:CS},title:{textStyle:{color:CS}},toolbox:{iconStyle:{normal:{borderColor:CS}}},dataZoom:{textStyle:{color:CS}},visualMap:{textStyle:{color:CS}},timeline:{lineStyle:{color:CS},itemStyle:{normal:{color:kS[1]}},label:{normal:{textStyle:{color:CS}}},controlStyle:{normal:{color:CS,borderColor:CS}}},timeAxis:DS(),logAxis:DS(),valueAxis:DS(),categoryAxis:DS(),line:{symbol:"circle"},graph:{color:kS},gauge:{title:{textStyle:{color:CS}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};PS.categoryAxis.splitLine.show=!1,mM.extend({type:"dataset",defaultOption:{seriesLayoutBy:CM,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){as(this)}}),aS.extend({type:"dataset"});var LS=ia.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*i,l=o*i;t.moveTo(n-a,r),t.bezierCurveTo(n-a,r-l,n-s,r-o,n,r-o),t.bezierCurveTo(n+s,r-o,n+a,r-l,n+a,r),t.bezierCurveTo(n+a,r+l,n+s,r+o,n,r+o),t.bezierCurveTo(n-s,r+o,n-a,r+l,n-a,r),t.closePath()}}),OS=/[\s,]+/;Bl.prototype.parse=function(t,e){e=e||{};var i=El(t);if(!i)throw new Error("Illegal svg");var n=new jx;this._root=n;var r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),o=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),Fl(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(r){var h=z(r).split(OS);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=o&&(u=Zl(l,a,o),!e.ignoreViewBox)){var c=n;n=new jx,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==o||n.setClipPath(new bw({shape:{x:0,y:0,width:a,height:o}})),{root:n,width:a,height:o,viewBoxRect:l,viewBoxTransform:u}},Bl.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){var r=ES[i];if(r){var a=r.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else{var r=zS[i];r&&(n=r.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Bl.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new uw({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Nl(e,r),Fl(t,r,this._defs);var a=r.style.fontSize;a&&9>a&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var zS={g:function(t,e){var i=new jx;return Nl(e,i),Fl(t,i,this._defs),i},rect:function(t,e){var i=new bw;return Nl(e,i),Fl(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new hw;return Nl(e,i),Fl(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new Mw;return Nl(e,i),Fl(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new LS;return Nl(e,i),Fl(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Vl(i));var n=new mw({shape:{points:i||[]}});return Nl(e,n),Fl(t,n,this._defs),n},polyline:function(t,e){var i=new ia;Nl(e,i),Fl(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Vl(n));var r=new yw({shape:{points:n||[]}});return r},image:function(t,e){var i=new Cn;return Nl(e,i),Fl(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(r),this._textY=parseFloat(n)+parseFloat(a);var o=new jx;return Nl(e,o),Fl(t,o,this._defs),o},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new jx;return Nl(e,o),Fl(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var i=t.getAttribute("d")||"",n=oa(i);return Nl(e,n),Fl(t,n,this._defs),n}},ES={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new Dw(e,i,n,r);return Rl(t,a),a},radialgradient:function(){}},BS={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-align":"textAlign","alignment-baseline":"textBaseline"},RS=/url\(\s*#(.*?)\)/,NS=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,VS=/([^\s:;]+)\s*:\s*([^:;]+)/g,FS=N(),GS={registerMap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),f(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var i=HS[e];i(t)}),FS.set(t,n)},retrieveMap:function(t){return FS.get(t)}},HS={geoJSON:function(t){var e=t.source;t.geoJSON=w(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=El(t.source)}},WS=O,ZS=f,XS=b,YS=M,US=mM.parseClassType,jS="4.7.0",qS={zrender:"4.3.0"},KS=1,$S=1e3,QS=800,JS=900,tI=5e3,eI=1e3,iI=1100,nI=2e3,rI=3e3,aI=3500,oI=4e3,sI=5e3,lI={PROCESSOR:{FILTER:$S,SERIES_FILTER:QS,STATISTIC:tI},VISUAL:{LAYOUT:eI,PROGRESSIVE_LAYOUT:iI,GLOBAL:nI,CHART:rI,POST_CHART_LAYOUT:aI,COMPONENT:oI,BRUSH:sI}},uI="__flagInMainProcess",hI="__optionUpdated",cI=/^[a-zA-Z0-9_]+$/;Yl.prototype.on=Xl("on",!0),Yl.prototype.off=Xl("off",!0),Yl.prototype.one=Xl("one",!0),c(Yl,ex);var dI=Ul.prototype;dI._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[hI]){var e=this[hI].silent;this[uI]=!0,ql(this),fI.update.call(this),this[uI]=!1,this[hI]=!1,Jl.call(this,e),tu.call(this,e)}else if(t.unfinished){var i=KS,n=this._model,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),$l(this,n),t.performVisualTasks(n),ou(this,this._model,r,"remain"),i-=+new Date-a}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},dI.getDom=function(){return this._dom},dI.getZr=function(){return this._zr},dI.setOption=function(t,e,i){if(!this._disposed){var n;if(YS(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[uI]=!0,!this._model||e){var r=new Ts(this._api),a=this._theme,o=this._model=new OM;o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,yI),i?(this[hI]={silent:n},this[uI]=!1):(ql(this),fI.update.call(this),this._zr.flush(),this[hI]=!1,this[uI]=!1,Jl.call(this,n),tu.call(this,n))}},dI.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},dI.getModel=function(){return this._model},dI.getOption=function(){return this._model&&this._model.getOption()},dI.getWidth=function(){return this._zr.getWidth()},dI.getHeight=function(){return this._zr.getHeight()},dI.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},dI.getRenderedCanvas=function(t){if(Oy.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},dI.getSvgDataUrl=function(){if(Oy.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},dI.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,i=this._model,n=[],r=this;ZS(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._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 ZS(n,function(t){t.group.ignore=!1}),a}},dI.getConnectedDataURL=function(t){if(!this._disposed&&Oy.canvasSupported){var e=this.group,i=Math.min,r=Math.max,a=1/0;if(SI[e]){var o=a,s=a,l=-a,u=-a,h=[],c=t&&t.pixelRatio||1;f(MI,function(a){if(a.group===e){var c=a.getRenderedCanvas(n(t)),d=a.getDom().getBoundingClientRect();o=i(d.left,o),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),o*=c,s*=c,l*=c,u*=c;var d=l-o,p=u-s,g=Zy();g.width=d,g.height=p;var v=qn(g);return t.connectedBackgroundColor&&v.add(new bw({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),ZS(h,function(t){var e=new Cn({style:{x:t.left*c-o,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},dI.convertToPixel=x(jl,"convertToPixel"),dI.convertFromPixel=x(jl,"convertFromPixel"),dI.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=cr(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i}},dI.getVisual=function(t,e){var i=this._model;t=cr(i,t,{defaultMainType:"series"});var n=t.seriesModel,r=n.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=a?r.getItemVisual(a,e):r.getVisual(e)},dI.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},dI.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var fI={prepareAndUpdate:function(t){ql(this),fI.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,i),a.performDataProcessorTasks(e,t),$l(this,e),r.update(e,i),nu(e),a.performVisualTasks(e,t),ru(this,e,i,t);var o=e.get("backgroundColor")||"transparent";if(Oy.canvasSupported)n.setBackgroundColor(o);else{var s=ti(o);o=ui(s,"rgb"),0===s[3]&&(o="transparent")}su(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,n,t);l&&l.update&&r.push(s)}else r.push(s)});var a=N();e.eachSeries(function(r){var o=i._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,n,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),nu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),ou(i,e,n,t,a),su(e,this._api)}},updateView:function(t){var e=this._model;e&&(dl.markUpdateMethod(t,"updateView"),nu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),ru(this,this._model,this._api,t),su(e,this._api))},updateVisual:function(t){fI.update.call(this,t)},updateLayout:function(t){fI.update.call(this,t)}};dI.resize=function(t){if(!this._disposed){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[uI]=!0,i&&ql(this),fI.update.call(this),this[uI]=!1,Jl.call(this,n),tu.call(this,n)}}},dI.showLoading=function(t,e){if(!this._disposed&&(YS(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),wI[t])){var i=wI[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},dI.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},dI.makeActionFromEvent=function(t){var e=o({},t);return e.type=vI[t.type],e},dI.dispatchAction=function(t,e){if(!this._disposed&&(YS(e)||(e={silent:!!e}),gI[t.type]&&this._model)){if(this[uI])return void this._pendingActions.push(t);Ql.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Oy.browser.weChat&&this._throttledZrFlush(),Jl.call(this,e.silent),tu.call(this,e.silent)}},dI.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0}},dI.on=Xl("on",!1),dI.off=Xl("off",!1),dI.one=Xl("one",!1);var pI=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];dI._initEvents=function(){ZS(pI,function(t){var e=function(e){var i,n=this.getModel(),r=e.target,a="globalout"===t;if(a)i={};else if(r&&null!=r.dataIndex){var s=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=s&&s.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(i=o({},r.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),ZS(vI,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},dI.isDisposed=function(){return this._disposed},dI.clear=function(){this._disposed||this.setOption({series:[]},!0)},dI.dispose=function(){if(!this._disposed){this._disposed=!0,fr(this.getDom(),TI,"");var t=this._api,e=this._model;ZS(this._componentsViews,function(i){i.dispose(e,t)}),ZS(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete MI[this.id]}},c(Ul,ex),du.prototype={constructor:du,normalizeQuery:function(t){var e={},i={},n={};if(w(t)){var r=US(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};f(t,function(t,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(i[r]=t,s=!0),s||(n[r]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,o,"mainType")&&i(l,o,"subType")&&i(l,o,"index","componentIndex")&&i(l,o,"name")&&i(l,o,"id")&&i(u,a,"name")&&i(u,a,"dataIndex")&&i(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a))},afterTrigger:function(){this.eventInfo=null}};var gI={},vI={},mI=[],yI=[],xI=[],_I=[],bI={},wI={},MI={},SI={},II=new Date-0,AI=new Date-0,TI="_echarts_instance_",CI=vu;Cu(nI,gS),bu(UM),wu(JS,jM),ku("default",xS),Su({type:"highlight",event:"highlight",update:"highlight"},F),Su({type:"downplay",event:"downplay",update:"downplay"},F),_u("light",TS),_u("dark",PS);var DI={};Vu.prototype={constructor:Vu,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,e=this._old,i=this._new,n={},r={},a=[],o=[];for(Fu(e,n,a,"_oldKeyGetter",this),Fu(i,r,o,"_newKeyGetter",this),t=0;t<e.length;t++){var s=a[t],l=r[s];if(null!=l){var u=l.length;u?(1===u&&(r[s]=null),l=l.shift()):r[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<o.length;t++){var s=o[t];if(r.hasOwnProperty(s)){var l=r[s];if(null==l)continue;if(l.length)for(var h=0,u=l.length;u>h;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var kI=N(["tooltip","label","itemName","itemId","seriesName"]),PI=M,LI="undefined",OI=-1,zI="e\x00\x00",EI={"float":typeof Float64Array===LI?Array:Float64Array,"int":typeof Int32Array===LI?Array:Int32Array,ordinal:Array,number:Array,time:Array},BI=typeof Uint32Array===LI?Array:Uint32Array,RI=typeof Int32Array===LI?Array:Int32Array,NI=typeof Uint16Array===LI?Array:Uint16Array,VI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],FI=["_extent","_approximateExtent","_rawExtent"],GI=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},a=0;a<t.length;a++){var o=t[a];w(o)?o=new Xu({name:o}):o instanceof Xu||(o=new Xu(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},n.push(s),i[s]=o,o.index=a,o.createInvertedIndices&&(r[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=Gu(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},HI=GI.prototype;HI.type="list",HI.hasItemOption=!0,HI.getDimension=function(t){return("number"==typeof t||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},HI.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},HI.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},HI.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return e===!0?(n||[]).slice():n&&n[e]},HI.initData=function(t,e,i){var n=rs.isInstance(t)||d(t);n&&(t=new Xs(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=QM[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=QM.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},HI.getProvider=function(){return this._rawData},HI.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)},HI.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;a>h;h++){var c=r[h];o[c]||(o[c]=rh()),n[c]||(n[c]=[]),qu(n,this._dimensionInfos[c],i,u,l),this._chunkCount=n[c].length}for(var d=new Array(a),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/i),v=f%i,m=0;a>m;m++){var c=r[m],y=this._dimValueGetterArrayRows(t[p]||d,c,p,m);n[c][g][v]=y;var x=o[c];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},Ku(this)},HI._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=o[p];c[g]||(c[g]=rh());var v=l[g];0===v.otherDims.itemName&&(i=this._nameDimIdx=p),0===v.otherDims.itemId&&(this._idDimIdx=p),a[g]||(a[g]=[]),qu(a,v,n,f,e),this._chunkCount=a[g].length}for(var m=new Array(s),y=t;e>y;y++){m=r.getItem(y,m);for(var x=Math.floor(y/n),_=y%n,b=0;s>b;b++){var g=o[b],w=a[g][x],M=this._dimValueGetter(m,g,y,b);w[_]=M;var S=c[g];M<S[0]&&(S[0]=M),M>S[1]&&(S[1]=M)}if(!r.pure){var I=u[y];if(m&&null==I)if(null!=m.name)u[y]=I=m.name;else if(null!=i){var A=o[i],T=a[A][x];if(T){I=T[_];var C=l[A].ordinalMeta;C&&C.categories.length&&(I=C.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,D=I,d[I]>0&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(h[y]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Ku(this)}},HI.count=function(){return this._count},HI.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var r=0;n>r;r++)t[r]=e[r]}else t=new i(e.buffer,0,n)}else for(var i=Yu(this),t=new i(this.count()),r=0;r<t.length;r++)t[r]=r;return t},HI.get=function(t,e){if(!(e>=0&&e<this._count))return 0/0;
+var i=this._storage;if(!i[t])return 0/0;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize,a=i[t][n],o=a[r];return o},HI.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return 0/0;var i=this._storage[t];if(!i)return 0/0;var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize,a=i[n];return a[r]},HI._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize,r=this._storage[t][i];return r[n]},HI.getValues=function(t,e){var i=[];_(t)||(e=t,t=this.dimensions);for(var n=0,r=t.length;r>n;n++)i.push(this.get(t[n],e));return i},HI.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;n>i;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},HI.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=rh();if(!e)return i;var n,r=this.count(),a=!this._indices;if(a)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var o=n[0],s=n[1],l=0;r>l;l++){var u=this._getFast(t,this.getRawIndex(l));o>u&&(o=u),u>s&&(s=u)}return n=[o,s],this._extent[t]=n,n},HI.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},HI.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},HI.getCalculationInfo=function(t){return this._calculationInfo[t]},HI.setCalculationInfo=function(t,e){PI(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},HI.getSum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,r=this.count();r>n;n++){var a=this.get(t,n);isNaN(a)||(i+=a)}return i},HI.getMedian=function(t){var e=[];this.each(t,function(t){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},HI.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return null==n||isNaN(n)?OI:n},HI.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},HI.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,r=this._count-1;r>=n;){var a=(n+r)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},HI.indicesOfNearest=function(t,e,i){var n=this._storage,r=n[t],a=[];if(!r)return a;null==i&&(i=1/0);for(var o=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=e-this.get(t,u),d=Math.abs(c);i>=d&&((o>d||d===o&&c>=0&&0>s)&&(o=d,s=c,l=0),c===s&&(a[l++]=u))}return a.length=l,a},HI.getRawIndex=Qu,HI.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},HI.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||$u(this,this._nameDimIdx,e)||""},HI.getId=function(t){return th(this,this.getRawIndex(t))},HI.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(eh(t),this.getDimension,this);for(var r=t.length,a=0;a<this.count();a++)switch(r){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 o=0,s=[];r>o;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(i,s)}}},HI.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(eh(t),this.getDimension,this);for(var r=this.count(),a=Yu(this),o=new a(r),s=[],l=t.length,u=0,h=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getFast(h,f);d=e.call(i,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getFast(h,f);s[v]=c,d=e.apply(i,s)}d&&(o[u++]=f)}return r>u&&(this._indices=o),this._count=u,this._extent={},this.getRawIndex=this._indices?Ju:Qu,this}},HI.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 r=this.count(),a=Yu(this),o=new a(r),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=f[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m];(y>=u&&h>=y||isNaN(y))&&(o[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],b=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=f[p],w=x[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m],M=w[m];(y>=u&&h>=y||isNaN(y))&&(M>=_&&b>=M||isNaN(M))&&(o[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var m=0;r>m;m++){var S=this.getRawIndex(m),y=this._getFast(l,S);(y>=u&&h>=y||isNaN(y))&&(o[s++]=S)}else for(var m=0;r>m;m++){for(var I=!0,S=this.getRawIndex(m),p=0;n>p;p++){var A=e[p],y=this._getFast(i,S);(y<t[A][0]||y>t[A][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return r>s&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?Ju:Qu,this}}},HI.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i),r},HI.map=function(t,e,i,n){i=i||n||this,t=p(eh(t),this.getDimension,this);var r=ih(this,t);r._indices=this._indices,r.getRawIndex=r._indices?Ju:Qu;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(o[0]=g,g=o);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,x=0;x<g.length;x++){var _=t[x],b=g[x],w=c[_],M=a[_];M&&(M[m][y]=b),b<w[0]&&(w[0]=b),b>w[1]&&(w[1]=b)}}}return r},HI.downSample=function(t,e,i,n){for(var r=ih(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Yu(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/h),y=v%h;o[g]=l[m][y]}var x=i(o),_=this.getRawIndex(Math.min(p+n(o,x)||0,u-1)),b=Math.floor(_/h),w=_%h;l[b][w]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=Ju,r},HI.getItemModel=function(t){var e=this.hostModel;return new go(this.getRawDataItem(t),e,e&&e.ecModel)},HI.diff=function(t){var e=this;return new Vu(t?t.getIndices():[],this.getIndices(),function(e){return th(t,e)},function(t){return th(e,t)})},HI.getVisual=function(t){var e=this._visual;return e&&e[t]},HI.setVisual=function(t,e){if(PI(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},HI.setLayout=function(t,e){if(PI(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},HI.getLayout=function(t){return this._layout[t]},HI.getItemLayout=function(t){return this._itemLayouts[t]},HI.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?o(this._itemLayouts[t]||{},e):e},HI.clearItemLayouts=function(){this._itemLayouts.length=0},HI.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},HI.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,PI(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},HI.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var WI=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};HI.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(WI,e)),this._graphicEls[t]=e},HI.getItemGraphicEl=function(t){return this._graphicEls[t]},HI.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},HI.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new GI(e,this.hostModel)}if(t._storage=this._storage,ju(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Ju:Qu,t},HI.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(P(arguments)))})},HI.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],HI.CHANGABLE_METHODS=["filterSelf","selectRange"];var ZI=function(t,e){return e=e||{},ah(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},XI={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",a),hh(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),hh(a)&&(n.set("y",a),null==e.firstCategoryDimIndex&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),hh(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),hh(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),hh(o)&&(n.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];i.set(l,s),hh(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}};mh.prototype.parse=function(t){return t},mh.prototype.getSetting=function(t){return this._setting[t]},mh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},mh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},mh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},mh.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},mh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},mh.prototype.getExtent=function(){return this._extent.slice()},mh.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},mh.prototype.isBlank=function(){return this._isBlank},mh.prototype.setBlank=function(t){this._isBlank=t},mh.prototype.getLabel=null,yr(mh),wr(mh,{registerWhenExtend:!0}),yh.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,_h);return new yh({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var YI=yh.prototype;YI.getOrdinal=function(t){return xh(this).get(t)},YI.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=xh(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var UI=mh.prototype,jI=mh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new yh({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),UI.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return UI.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(UI.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this.isBlank()?void 0: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:F,niceExtent:F});jI.create=function(){return new jI};var qI=So,KI=So,$I=mh.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]),$I.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=wh(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;var o=1e4;i[0]<n[0]&&a.push(t?KI(n[0]-e,r):i[0]);for(var s=n[0];s<=n[1]&&(a.push(s),s=KI(s+e,r),s!==a[a.length-1]);)if(a.length>o)return[];var l=a.length?a[a.length-1]:n[1];return i[1]>l&&a.push(t?KI(l+e,r):i[1]),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),r=1;r<e.length;r++){for(var a=e[r],o=e[r-1],s=0,l=[],u=a-o,h=u/t;t-1>s;){var c=So(o+(s+1)*h);c>n[0]&&c<n[1]&&l.push(c),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=To(t)||0:"auto"===i&&(i=this._intervalPrecision),t=KI(t,i,!0),Vo(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){0>r&&(r=-r,n.reverse());var a=bh(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 r=this._interval;t.fixMin||(e[0]=KI(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=KI(Math.ceil(e[1]/r)*r))}});$I.create=function(){return new $I};var QI="__ec_stack_",JI=.5,tA="undefined"!=typeof Float32Array?Float32Array:Array,eA={seriesType:"bar",plan:sS(),reset:function(t){function e(t,e){for(var i,d=t.count,f=new tA(2*d),p=new tA(2*d),g=new tA(d),v=[],m=[],y=0,x=0;null!=(i=t.next());)m[h]=e.get(s,i),m[1-h]=e.get(l,i),v=n.dataToPoint(m,null,v),p[y]=u?r.x+r.width:v[0],f[y++]=v[0],p[y]=u?v[1]:r.y+r.height,f[y++]=v[1],g[x++]=i;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:Eh(a,o,!1),backgroundStart:u?r.x:r.y,valueAxisHorizontal:u})}if(Oh(t)&&zh(t)){var i=t.getData(),n=t.coordinateSystem,r=n.grid.getRect(),a=n.getBaseAxis(),o=n.getOtherAxis(a),s=i.mapDimension(o.dim),l=i.mapDimension(a.dim),u=o.isHorizontal(),h=u?0:1,c=Ph(Dh([t]),a,t).width;return c>JI||(c=JI),{progress:e}}}},iA=$I.prototype,nA=Math.ceil,rA=Math.floor,aA=1e3,oA=60*aA,sA=60*oA,lA=24*sA,uA=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][1]<e?i=r+1:n=r}return i},hA=$I.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Yo(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=lA,e[1]+=lA),e[1]===-1/0&&1/0===e[0]){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-lA}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=So(rA(e[0]/n)*n)),t.fixMax||(e[1]=So(nA(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],a=r/t;null!=e&&e>a&&(a=e),null!=i&&a>i&&(a=i);var o=cA.length,s=uA(cA,a,0,o),l=cA[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u,c=Eo(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(nA((n[0]-d)/u)*u+d),Math.round(rA((n[1]-d)/u)*u+d)];Sh(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+Lo(t)}});f(["contain","normalize"],function(t){hA.prototype[t]=function(e){return iA[t].call(this,this.parse(e))}});var cA=[["hh:mm:ss",aA],["hh:mm:ss",5*aA],["hh:mm:ss",10*aA],["hh:mm:ss",15*aA],["hh:mm:ss",30*aA],["hh:mm\nMM-dd",oA],["hh:mm\nMM-dd",5*oA],["hh:mm\nMM-dd",10*oA],["hh:mm\nMM-dd",15*oA],["hh:mm\nMM-dd",30*oA],["hh:mm\nMM-dd",sA],["hh:mm\nMM-dd",2*sA],["hh:mm\nMM-dd",6*sA],["hh:mm\nMM-dd",12*sA],["MM-dd\nyyyy",lA],["MM-dd\nyyyy",2*lA],["MM-dd\nyyyy",3*lA],["MM-dd\nyyyy",4*lA],["MM-dd\nyyyy",5*lA],["MM-dd\nyyyy",6*lA],["week",7*lA],["MM-dd\nyyyy",10*lA],["week",14*lA],["week",21*lA],["month",31*lA],["week",42*lA],["month",62*lA],["week",70*lA],["quarter",95*lA],["month",31*lA*4],["month",31*lA*5],["half-year",380*lA/2],["month",31*lA*8],["month",31*lA*10],["year",380*lA]];hA.create=function(t){return new hA({useUTC:t.ecModel.get("useUTC")})};var dA=mh.prototype,fA=$I.prototype,pA=To,gA=So,vA=Math.floor,mA=Math.ceil,yA=Math.pow,xA=Math.log,_A=mh.extend({type:"log",base:10,$constructor:function(){mh.apply(this,arguments),this._originalScale=new $I},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return p(fA.getTicks.call(this,t),function(t){var r=So(yA(this.base,t));return r=t===i[0]&&e.__fixMin?Bh(r,n[0]):r,r=t===i[1]&&e.__fixMax?Bh(r,n[1]):r},this)},getMinorTicks:fA.getMinorTicks,getLabel:fA.getLabel,scale:function(t){return t=dA.scale.call(this,t),yA(this.base,t)},setExtent:function(t,e){var i=this.base;t=xA(t)/xA(i),e=xA(e)/xA(i),fA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=dA.getExtent.call(this);e[0]=yA(t,e[0]),e[1]=yA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Bh(e[0],n[0])),i.__fixMax&&(e[1]=Bh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=xA(t[0])/xA(e),t[1]=xA(t[1])/xA(e),dA.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(!(1/0===i||0>=i)){var n=Oo(i),r=t/i*n;for(.5>=r&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[So(mA(e[0]/n)*n),So(vA(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(t){fA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){_A.prototype[t]=function(e){return e=xA(e)/xA(this.base),dA[t].call(this,e)}}),_A.create=function(){return new _A};var bA={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&&!T(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&&!T(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:F,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},wA=va({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),MA=va({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),SA=va({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(i-h,l+s),t.arc(i,l,o,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()}}),IA=va({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),AA={line:Mw,rect:bw,roundRect:bw,square:bw,circle:hw,diamond:MA,pin:SA,arrow:IA,triangle:wA},TA={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},CA={};f(AA,function(t,e){CA[e]=new t});var DA=va({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=Ki(t,e,i),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var r=CA[n];r||(n="rect",r=CA[n]),TA[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i)}}}),kA={isDimensionStacked:dh,enableDataStack:ch,getStackedDimension:fh},PA=(Object.freeze||Object)({createList:Kh,getLayoutRect:$o,dataStack:kA,createScale:$h,mixinAxisModelCommonMethods:Qh,completeDimensions:ah,createDimensions:ZI,createSymbol:qh}),LA=1e-8;ec.prototype={constructor:ec,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;Rr(l,r,a),oe(i,i,r),se(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Ai(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,r=i.length;r>n;n++)if("polygon"===i[n].type){var a=i[n].exterior,o=i[n].interiors;if(tc(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(tc(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var o=new Ai(t,e,i,n),s=r.calculateTransform(o),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++)ae(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(var d=0;d<c[f].length;d++)ae(c[f][d],c[f][d],s)}r=this._rect,r.copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new ec(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var OA=function(t){return ic(t),p(v(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,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&f(n,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new ec(e.name,r,e.cp);return a.properties=e,a})},zA=hr(),EA=[0,1],BA=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};BA.prototype={constructor:BA,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Co(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&&(i=i.slice(),yc(i,n.count())),wo(t,EA,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),yc(i,n.count()));var r=wo(t,i,EA,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=ac(this,e),n=i.ticks,r=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),a=e.get("alignWithLabel");return xc(this,r,a,t.clamp),r},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&100>e||(e=5);var i=this.scale.getMinorTicks(e),n=p(i,function(t){return p(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return n},getViewLabels:function(){return rc(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 pc(this)}};var RA=OA,NA={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){NA[t]=Uy[t]});var VA={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){VA[t]=Yw[t]});var FA=function(t){this._axes={},this._dimList=[],this.name=t||""};FA.prototype={constructor:FA,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,_c,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(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?[]:{},r=0;r<i.length;r++){var a=i[r],o=this._axes[a];n[a]=o[e](t[a])}return n}},bc.prototype={constructor:bc,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"),r=this.getAxis("y");return i=i||[],i[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(t[0]),s=n.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[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")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-i,a=Math.max(e[0],e[1])-n,o=new Ai(i,n,r,a);return o}},h(bc,FA);var GA=function(t,e,i,n,r){BA.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};GA.prototype={constructor:GA,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},h(GA,BA);var HA={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)"]}}},WA={};WA.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},HA),WA.valueAxis=r({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},HA),WA.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},WA.valueAxis),WA.logAxis=s({scale:!0,logBase:10},WA.valueAxis);var ZA=["value","category","time","log"],XA=function(t,e,i,n){f(ZA,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,s=a?ts(e):{},l=n.getTheme();r(e,l.get(o+"Axis")),r(e,this.getDefaultOption()),e.type=i(t,e),a&&Jo(e,s,a)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=yh.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:a([{},WA[o+"Axis"],n],!0)})}),mM.registerSubTypeDefaulter(t+"Axis",x(i,t))},YA=mM.extend({type:"cartesian2dAxis",axis:null,init:function(){YA.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){YA.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){YA.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(YA.prototype,bA);var UA={offset:0};XA("x",YA,wc,UA),XA("y",YA,wc,UA),mM.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 jA=Sc.prototype;jA.type="grid",jA.axisPointerEnabled=!0,jA.getRect=function(){return this._rect},jA.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){Vh(t.scale,t.model)}),f(i.y,function(t){Vh(t.scale,t.model)});var n={};f(i.x,function(t){Ic(i,"y",t,n)}),f(i.y,function(t){Ic(i,"x",t,n)}),this.resize(this.model,e)},jA.resize=function(t,e,i){function n(){f(a,function(t){var e=t.isHorizontal(),i=e?[0,r.width]:[0,r.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),Tc(t,e?r.x:r.y)})}var r=$o(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;n(),!i&&t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Zh(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");r[i]-=e[i]+n,"top"===t.position?r.y+=e.height+n:"left"===t.position&&(r.x+=e.width+n)}}}),n())},jA.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]}},jA.getAxes=function(){return this._axesList.slice()},jA.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}M(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===t||r[n].getAxis("y").index===e)return r[n]
+},jA.getCartesians=function(){return this._coordsList.slice()},jA.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},jA.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},jA._findConvertTarget=function(t,e){var i,n,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)i=r.coordinateSystem,u(l,i)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){var h=s.coordinateSystem;h===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},jA.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},jA._initCartesian=function(t,e){function i(i){return function(o,s){if(Mc(o,t,e)){var l=o.get("position");"x"===i?"top"!==l&&"bottom"!==l&&(l=n.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=n.left?"right":"left"),n[l]=!0;var u=new GA(i,Fh(o),[0,0],o.get("type"),l),h="category"===u.type;u.onBand=h&&o.get("boundaryGap"),u.inverse=o.get("inverse"),o.axis=u,u.model=o,u.grid=this,u.index=s,this._axesList.push(u),r[i][s]=u,a[i]++}}}var n={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};return e.eachComponent("xAxis",i("x"),this),e.eachComponent("yAxis",i("y"),this),a.x&&a.y?(this._axesMap=r,void f(r.x,function(e,i){f(r.y,function(n,r){var a="x"+i+"y"+r,o=new bc(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(n)},this)},this)):(this._axesMap={},void(this._axesList=[]))},jA._updateScale=function(t,e){function i(t,e){f(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,fh(t,i))})}f(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(n){if(Dc(n)){var r=Cc(n,t),a=r[0],o=r[1];if(!Mc(a,e,t)||!Mc(o,e,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=n.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(i(l,u,n),i(l,h,n))}},this)},jA.getTooltipAxes=function(t){var e=[],i=[];return f(this.getCartesians(),function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(r);u(e,r)<0&&e.push(r),u(i,a)<0&&i.push(a)}),{baseAxes:e,otherAxes:i}};var qA=["xAxis","yAxis"];Sc.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var a=new Sc(n,t,e);a.name="grid_"+r,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if(Dc(e)){var i=Cc(e,t),n=i[0],r=i[1],a=n.getCoordSysModel(),o=a.coordinateSystem;e.coordinateSystem=o.getCartesian(n.componentIndex,r.componentIndex)}}),i},Sc.dimensions=Sc.prototype.dimensions=bc.prototype.dimensions,As.register("cartesian2d",Sc);var KA=rS.extend({type:"series.__base_bar__",getInitialData:function(){return ph(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),r=n.getLayout("offset"),a=n.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return i[o]+=r+a/2,i}return[0/0,0/0]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});KA.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},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}}});var $A=ib([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),QA={getBarItemStyle:function(t){var e=$A(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},JA=va({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u),g=h?u-l<2*Math.PI:l-u<2*Math.PI;g&&(t.moveTo(c*r+i,d*r+n),t.arc(c*s+i,d*s+n,o,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,o,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(i,n,r,u,l,h),t.moveTo(c*r+i,p*r+n)),t.closePath()}}),tT=["itemStyle","barBorderWidth"],eT=[0,0];o(go.prototype,QA),zu({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){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){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){var e,i=this.group,n=t.getData(),r=this._data,a=t.coordinateSystem,o=a.getBaseAxis();"cartesian2d"===a.type?e=o.isHorizontal():"polar"===a.type&&(e="angle"===o.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Bc(a,n);i.removeClipPath();var h=t.get("roundCap",!0),c=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),f=[],p=this._backgroundEls||[];n.diff(r).add(function(r){var o=n.getItemModel(r),p=oT[a.type](n,r,o);if(c){var g=Uc(a,e,p);g.useStyle(d.getBarItemStyle()),f[r]=g}if(n.hasValue(r)){if(l){var v=rT[a.type](u,p);if(v)return void i.remove(m)}var m=aT[a.type](r,p,e,s,!1,h);n.setItemGraphicEl(r,m),i.add(m),Fc(m,n,r,o,p,t,e,"polar"===a.type)}}).update(function(o,g){var v=n.getItemModel(o),m=oT[a.type](n,o,v);if(c){var y=p[g];y.useStyle(d.getBarItemStyle()),f[o]=y;var x=Yc(e,m,a);eo(y,{shape:x},s,o)}var _=r.getItemGraphicEl(g);if(!n.hasValue(o))return void i.remove(_);if(l){var b=rT[a.type](u,m);if(b)return void i.remove(_)}_?eo(_,{shape:m},s,o):_=aT[a.type](o,m,e,s,!0,h),n.setItemGraphicEl(o,_),i.add(_),Fc(_,n,o,v,m,t,e,"polar"===a.type)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===a.type?e&&Rc(t,s,e):e&&Nc(t,s,e)}).execute();var g=this._backgroundGroup||(this._backgroundGroup=new jx);g.removeAll();for(var v=0;v<f.length;++v)g.add(f[v]);i.add(g),this._backgroundEls=f,this._data=n},_renderLarge:function(t){this._clear(),Hc(t,this.group);var e=t.get("clip",!0)?Ec(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Hc(e,this.group,!0)},dispose:F,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(e){"sector"===e.type?Nc(e.dataIndex,t,e):Rc(e.dataIndex,t,e)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var iT=Math.max,nT=Math.min,rT={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var r=iT(e.x,t.x),a=nT(e.x+e.width,t.x+t.width),o=iT(e.y,t.y),s=nT(e.y+e.height,t.y+t.height);e.x=r,e.y=o,e.width=a-r,e.height=s-o;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},aT={cartesian2d:function(t,e,i,n,r){var a=new bw({shape:o({},e),z2:1});if(a.name="item",n){var s=a.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],Yw[r?"updateProps":"initProps"](a,{shape:u},n,t)}return a},polar:function(t,e,i,n,r,a){var o=e.startAngle<e.endAngle,l=!i&&a?JA:fw,u=new l({shape:s({clockwise:o},e),z2:1});if(u.name="item",n){var h=u.shape,c=i?"r":"endAngle",d={};h[c]=i?0:e.startAngle,d[c]=e[c],Yw[r?"updateProps":"initProps"](u,{shape:d},n,t)}return u}},oT={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),r=Gc(i,n),a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*r/2,y:n.y+o*r/2,width:n.width-a*r,height:n.height-o*r}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},sT=ia.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,r=this.__baseDimIdx,a=0;a<i.length;a+=2)n[r]=i[a+r],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}}),lT=ml(function(t){var e=this,i=Wc(e,t.offsetX,t.offsetY);e.dataIndex=i>=0?i:null},30,!1),uT=Math.PI,hT=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new jx;var i=new jx({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};hT.prototype={constructor:hT,hasBuilder:function(t){return!!cT[t]},add:function(t){cT[t].call(this)},getGroup:function(){return this.group}};var cT={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(ae(r,r,n),ae(a,a,n));var s=o({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Mw({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[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],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=qh(l[i],-c/2,-d/2,c,d,s.stroke,!0),a=e.r+e.offset,o=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:o,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=td(this,t,e),n=id(this,t,e);qc(t,n,i),ed(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=C(t.axisName,e.get("name"));if(i){var n,r=e.get("nameLocation"),a=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"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,Qc(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*uT/180);var f;Qc(r)?n=fT(t.rotation,null!=d?d:t.rotation,a):(n=jc(t,r,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=C(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?uM(i,m,p,v,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,b={componentType:_,name:i,$vars:["name"]};b[_+"Index"]=e.componentIndex;var w=new uw({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:pT(e),z2:1,tooltip:x&&x.show?o({content:i,formatter:function(){return i},formatterParams:b},x):null});Xa(w.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=dT(e),w.eventData.targetType="axisName",w.eventData.name=i),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},dT=hT.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},fT=hT.innerTextLayout=function(t,e,i){var n,r,a=ko(e-t);return Po(a)?(r=i>0?"top":"bottom",n="center"):Po(a-uT)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&uT>a?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}},pT=hT.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},gT=f,vT=x,mT=Lu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&ud(t),mT.superApply(this,"render",arguments),pd(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){pd(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),mT.superApply(this,"remove",arguments)},dispose:function(t,e){gd(this,e),mT.superApply(this,"dispose",arguments)}}),yT=[];mT.registerAxisPointerClass=function(t,e){yT[t]=e},mT.getAxisPointerClass=function(t){return t&&yT[t]};var xT=["axisLine","axisTickLabel","axisName"],_T=["splitArea","splitLine","minorSplitLine"],bT=mT.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new jx,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=vd(a,t),s=new hT(t,o);f(xT,s.add,s),this._axisGroup.add(s.getGroup()),f(_T,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),oo(r,this._axisGroup,t),bT.superCall(this,"render",t,e,i,n)}},remove:function(){yd(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),a=r.get("color");a=_(a)?a:[a];for(var o=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=r.getLineStyle(),p=0;p<h.length;p++){var g=i.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=o.y,d[0]=g,d[1]=o.y+o.height):(c[0]=o.x,c[1]=g,d[0]=o.x+o.width,d[1]=g);var v=u++%a.length,m=h[p].tickValue;this._axisGroup.add(new Mw({anid:null!=m?"line_"+h[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:s({stroke:a[v]},f),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine"),r=n.getModel("lineStyle"),a=e.coordinateSystem.getRect(),o=i.isHorizontal(),s=i.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=r.getLineStyle(),c=0;c<s.length;c++)for(var d=0;d<s[c].length;d++){var f=i.toGlobalCoord(s[c][d].coord);o?(l[0]=f,l[1]=a.y,u[0]=f,u[1]=a.y+a.height):(l[0]=a.x,l[1]=f,u[0]=a.x+a.width,u[1]=f),this._axisGroup.add(new Mw({anid:"minor_line_"+s[c][d].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},_splitArea:function(t,e){md(this,this._axisGroup,t,e)}});bT.extend({type:"xAxis"}),bT.extend({type:"yAxis"}),Lu({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new bw({shape:t.coordinateSystem.getRect(),style:s({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),bu(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Tu(lI.VISUAL.LAYOUT,x(Lh,"bar")),Tu(lI.VISUAL.PROGRESSIVE_LAYOUT,eA),Cu({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),rS.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return ph(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!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 wT=xd.prototype,MT=xd.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};wT._createSymbol=function(t,e,i,n,r){this.removeAll();var a=e.getItemVisual(i,"color"),o=qh(t,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:_d(n)}),o.drift=bd,this._symbolType=t,this.add(o)},wT.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},wT.getSymbolPath=function(){return this.childAt(0)},wT.getScale=function(){return this.childAt(0).scale},wT.highlight=function(){this.childAt(0).trigger("emphasis")},wT.downplay=function(){this.childAt(0).trigger("normal")},wT.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},wT.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},wT.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=MT(t,e),o=n!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else{var l=this.childAt(0);l.silent=!1,eo(l,{scale:_d(a)},r,e)}if(this._updateCommon(t,e,a,i),o){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),io(l,h,r,e)}this._seriesModel=r};var ST=["itemStyle"],IT=["emphasis","itemStyle"],AT=["label"],TT=["emphasis","label"];wT._updateCommon=function(t,e,i,n){function r(e){return w?t.getName(e):kc(t,e)}var a=this.childAt(0),s=t.hostModel,l=t.getItemVisual(e,"color");"image"!==a.type?a.useStyle({strokeNoScale:!0}):a.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var u=n&&n.itemStyle,h=n&&n.hoverItemStyle,c=n&&n.symbolRotate,d=n&&n.symbolOffset,f=n&&n.labelModel,p=n&&n.hoverLabelModel,g=n&&n.hoverAnimation,v=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);u=m.getModel(ST).getItemStyle(["color"]),h=m.getModel(IT).getItemStyle(),c=m.getShallow("symbolRotate"),d=m.getShallow("symbolOffset"),f=m.getModel(AT),p=m.getModel(TT),g=m.getShallow("hoverAnimation"),v=m.getShallow("cursor")}else h=o({},h);var y=a.style;a.attr("rotation",(c||0)*Math.PI/180||0),d&&a.attr("position",[Mo(d[0],i[0]),Mo(d[1],i[1])]),v&&a.attr("cursor",v),a.setColor(l,n&&n.symbolInnerColor),a.setStyle(u);var x=t.getItemVisual(e,"opacity");null!=x&&(y.opacity=x);var _=t.getItemVisual(e,"liftZ"),b=a.__z2Origin;null!=_?null==b&&(a.__z2Origin=a.z2,a.z2+=_):null!=b&&(a.z2=b,a.__z2Origin=null);var w=n&&n.useNameLabel;Wa(y,h,f,p,{labelFetcher:s,labelDataIndex:e,defaultText:r,isRectText:!0,autoColor:l}),a.__symbolOriginalScale=_d(i),a.hoverStyle=h,a.highDownOnUpdate=g&&s.isAnimationEnabled()?wd:null,Va(a)},wT.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),eo(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(xd,jx);var CT=Md.prototype;CT.updateData=function(t,e){e=Id(e);var i=this.group,n=t.hostModel,r=this._data,a=this._symbolCtor,o=Ad(t);r||i.removeAll(),t.diff(r).add(function(n){var r=t.getItemLayout(n);if(Sd(t,r,n,e)){var s=new a(t,n,o);s.attr("position",r),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);return Sd(t,h,s,e)?(u?(u.updateData(t,s,o),eo(u,{position:h},n)):(u=new a(t,s),u.attr("position",h)),i.add(u),void t.setItemGraphicEl(s,u)):void i.remove(u)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},CT.isPersistent=function(){return!0},CT.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},CT.incrementalPrepareUpdate=function(t){this._seriesScope=Ad(t),this._data=null,this.group.removeAll()},CT.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=Id(i);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(Sd(e,a,r,i)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(n),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},CT.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 DT=function(t,e,i,n,r,a,o,s){for(var l=kd(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],v=Td(r,e,o),m=Td(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var b=t.getItemLayout(x.idx),w=e.getItemLayout(x.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),h.push(w),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var M=x.idx;u.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],M),e.get(v.dataDimsForPoint[1],M)])),h.push(e.getItemLayout(M).slice()),c.push(Dd(v,r,e,M)),d.push(n[M]),g.push(e.getRawIndex(M));break;case"-":var M=x.idx,S=t.getRawIndex(M);S!==M?(u.push(t.getItemLayout(M)),h.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],M),t.get(m.dataDimsForPoint[1],M)])),c.push(i[M]),d.push(Dd(m,a,t,M)),g.push(S)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],A=[],T=[],C=[],D=[],y=0;y<p.length;y++){var M=p[y];I[y]=u[M],A[y]=h[M],T[y]=c[M],C[y]=d[M],D[y]=f[M]}return{current:I,next:A,stackedOnCurrent:T,stackedOnNext:C,status:D}},kT=oe,PT=se,LT=Y,OT=H,zT=[],ET=[],BT=[],RT=ia.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:dw(ia.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,r=i.length,a=Ed(i,e.smoothConstraint);if(e.connectNulls){for(;r>0&&Pd(i[r-1]);r--);for(;r>n&&Pd(i[n]);n++);}for(;r>n;)n+=Ld(t,i,n,r,r,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),NT=ia.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:dw(ia.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,r=0,a=i.length,o=e.smoothMonotone,s=Ed(i,e.smoothConstraint),l=Ed(n,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Pd(i[a-1]);a--);for(;a>r&&Pd(i[r]);r++);}for(;a>r;){var u=Ld(t,i,r,a,a,1,s.min,s.max,e.smooth,o,e.connectNulls);Ld(t,n,r+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),r+=u+1,t.closePath()}}});dl.extend({type:"line",init:function(){var t=new jx,e=new Md;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,a=t.getData(),o=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,v=t.get("animation"),m=!l.isEmpty(),y=l.get("origin"),x=Td(n,a,y),_=Nd(n,a,x),b=t.get("showSymbol"),w=b&&!h&&Gd(t,a,n),M=this._data;M&&M.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),M.setItemGraphicEl(e,null))}),b||d.remove(),r.add(g);var S,I=!h&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(S=n.getArea(),null!=S.width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r1+=.5)),this._clipShapeForSymbol=S,f&&c.type===n.type&&I===this._step?(m&&!p?p=this._newPolygon(u,_,n,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(Wd(n,!1,t)),b&&d.updateData(a,{isIgnore:w,clipShape:S}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Bd(this._stackedOnPoints,_)&&Bd(this._points,u)||(v?this._updateAnimation(a,_,n,i,I,y):(I&&(u=Vd(u,n,I),_=Vd(_,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:_})))):(b&&d.updateData(a,{isIgnore:w,clipShape:S}),I&&(u=Vd(u,n,I),_=Vd(_,n,I)),f=this._newPolyline(u,n,v),m&&(p=this._newPolygon(u,_,n,v)),g.setClipPath(Wd(n,!0,t)));var A=Fd(a,n)||a.getVisual("color");f.useStyle(s(o.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"}));var T=t.get("smooth");if(T=Rd(t.get("smooth")),f.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var C=a.getCalculationInfo("stackedOnSeries"),D=0;p.useStyle(s(l.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel"})),C&&(D=Rd(C.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=_,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),a=ur(r,n);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;o=new xd(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else dl.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=ur(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else dl.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new RT({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 NT({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,u=DT(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=Vd(u.current,i,r),c=Vd(u.stackedOnCurrent,i,r),d=Vd(u.next,i,r),f=Vd(u.stackedOnNext,i,r)),o.shape.__points=u.current,o.shape.points=h,eo(o,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),eo(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,v=0;v<g.length;v++){var m=g[v].cmd;if("="===m){var y=t.getItemGraphicEl(g[v].idx1);y&&p.push({el:y,ptIdx:v})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var t=0;t<p.length;t++){var e=p[t].el;e.attr("position",o.shape.__points[p[t].ptIdx])}})},remove:function(){var t=this.group,e=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),e&&e.eachItemGraphicEl(function(i,n){i.__temp&&(t.remove(i),e.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var VT=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n){function r(e,i){if(c){var n=t.getRawValue(i),r=t.getDataParams(i);u&&e.setItemVisual(i,"symbol",o(n,r)),h&&e.setItemVisual(i,"symbolSize",s(n,r))}if(e.hasItemOption){var a=e.getItemModel(i),l=a.getShallow("symbol",!0),d=a.getShallow("symbolSize",!0),f=a.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(i,"symbol",l),null!=d&&e.setItemVisual(i,"symbolSize",d),null!=f&&e.setItemVisual(i,"symbolKeepAspect",f)}}var a=t.getData(),o=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=b(o),h=b(s),c=u||h,d=!u&&o?o:e,f=h?null:s;return a.setVisual({legendSymbol:i||d,symbol:d,symbolSize:f,symbolKeepAspect:l}),n.isSeriesFiltered(t)?void 0:{dataEach:a.hasItemOption||c?r:null}}}},FT=function(t){return{seriesType:t,plan:sS(),reset:function(t){function e(t,e){for(var i=t.end-t.start,r=a&&new Float32Array(i*s),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===s){var f=e.get(o[0],l);d=!isNaN(f)&&n.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)&&n.dataToPoint(h,null,c)}a?(r[u++]=d?d[0]:0/0,r[u++]=d?d[1]:0/0):e.setItemLayout(l,d&&d.slice()||[0/0,0/0])}a&&e.setLayout("symbolPoints",r)}var i=t.getData(),n=t.coordinateSystem,r=t.pipelineContext,a=r.large;if(n){var o=p(n.dimensions,function(t){return i.mapDimension(t)}).slice(0,2),s=o.length,l=i.getCalculationInfo("stackResultDimension");return dh(i,o[0])&&(o[0]=l),dh(i,o[1])&&(o[1]=l),s&&{progress:e}}}}},GT={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?0/0: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:0/0},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:0/0},nearest:function(t){return t[0]}},HT=function(t){return Math.round(t.length/2)},WT=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t){var e=t.getData(),i=t.get("sampling"),n=t.coordinateSystem;if("cartesian2d"===n.type&&i){var r=n.getBaseAxis(),a=n.getOtherAxis(r),o=r.getExtent(),s=o[1]-o[0],l=Math.round(e.count()/s);if(l>1){var u;"string"==typeof i?u=GT[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(a.dim),1/l,u,HT))}}}}};Cu(VT("line","circle","line")),Tu(FT("line")),wu(lI.PROCESSOR.STATISTIC,WT("line"));var ZT=function(t,e,i){e=_(e)&&{coordDimensions:e}||o({},e);var n=t.getSource(),r=ZI(n,e),a=new GI(r,t);return a.initData(n,i),a},XT={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},N())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&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);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},YT=Ou({type:"series.pie",init:function(t){YT.superApply(this,"init",arguments),this.legendVisualProvider=new Zd(y(this.getData,this),y(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){YT.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return ZT(this,{coordDimensions:["value"],encodeDefaulter:x(ps,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,r=t.count();r>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:Js(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=YT.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Do(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){er(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,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});c(YT,XT);var UT=Ud.prototype;UT.updateData=function(t,e,i){var n=this.childAt(0),r=this.childAt(1),a=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=o({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(i){n.setShape(c);var f=l.getShallow("animationType");"scale"===f?(n.shape.r=h.r0,io(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,eo(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):eo(n,{shape:c},l,e);var p=t.getItemVisual(e,"color");n.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),n.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");
+g&&n.attr("cursor",g),Yd(this,t.getItemLayout(e),l.isSelected(t.getName(e)),l.get("selectedOffset"),l.get("animation"));var v=!i&&"transition"===d;this._updateLabel(t,e,v),this.highDownOnUpdate=u.get("hoverAnimation")&&l.isAnimationEnabled()?function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut"))}:null,Va(this)},UT._updateLabel=function(t,e,i){var n=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(r.ignore=r.normalIgnore=r.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(eo(n,{shape:h},a,e),eo(r,{style:c},a,e)):(n.attr({shape:h}),r.attr({style:c})),r.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=o.getModel("label"),f=o.getModel("emphasis.label"),p=o.getModel("labelLine"),g=o.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Wa(r.style,r.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!d.get("show"),r.hoverIgnore=!f.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!g.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=g.getModel("lineStyle").getLineStyle();var v=p.get("smooth");v&&v===!0&&(v=.4),n.setShape({smooth:v})},h(Ud,jx);var jT=(dl.extend({type:"pie",init:function(){var t=new jx;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=x(Xd,this.uid,t,s,i),d=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new Ud(r,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(r,t),i.off("click"),d&&i.on("click",c),o.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&r.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=r.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<r.count();++p)f=r.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,v=y(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,v,t,l))}else o.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,i,n,r,a,o,s){var l=new fw({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}}),u=s?io:eo;return u(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},o,a),l},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var r=t[0]-n.cx,a=t[1]-n.cy,o=Math.sqrt(r*r+a*a);return o<=n.r&&o>=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",Su(e,function(i,n){var r={};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);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r,seriesId:i.seriesId}})})}),qT=function(t){return{getTargetSeries:function(e){var i={},n=N();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getRawData(),i={},n=t.getData();n.each(function(t){var e=n.getRawIndex(t);i[e]=t}),e.each(function(r){var a,o=i[r],s=null!=o&&n.getItemVisual(o,"color",!0),l=null!=o&&n.getItemVisual(o,"borderColor",!0);if(s&&l||(a=e.getItemModel(r)),!s){var u=a.get("itemStyle.color")||t.getColorFromPalette(e.getName(r)||r+"",t.__paletteScope,e.count());null!=o&&n.setItemVisual(o,"color",u)}if(!l){var h=a.get("itemStyle.borderColor");null!=o&&n.setItemVisual(o,"borderColor",h)}})}}},KT=Math.PI/180,$T=function(t,e,i,n,r,a){var o,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*KT;l.each(function(n){var a=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),v=f.get("alignTo"),m=Mo(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),b=_.get("length");b=Mo(b,i);var w=_.get("length2");if(w=Mo(w,i),!(a.angle<c)){var M,S,I,A,T=(a.startAngle+a.endAngle)/2,C=Math.cos(T),D=Math.sin(T);o=a.cx,s=a.cy;var k=t.getFormattedLabel(n,"normal")||l.getName(n),P=Xi(k,x,A,"top"),L="inside"===p||"inner"===p;if("center"===p)M=a.cx,S=a.cy,A="center";else{var O=(L?(a.r+a.r0)/2*C:a.r*C)+o,z=(L?(a.r+a.r0)/2*D:a.r*D)+s;if(M=O+3*C,S=z+3*D,!L){var E=O+C*(b+e-a.r),B=z+D*(b+e-a.r),R=E+(0>C?-1:1)*w,N=B;M="edge"===v?0>C?r+m:r+i-m:R+(0>C?-g:g),S=N,I=[[O,z],[E,B],[R,N]]}A=L?"center":"edge"===v?C>0?"right":"left":C>0?"left":"right"}var V,F=f.get("rotate");V="number"==typeof F?F*(Math.PI/180):F?0>C?-T+Math.PI:-T:0,h=!!V,a.label={x:M,y:S,position:p,height:P.height,len:b,len2:w,linePoints:I,textAlign:A,verticalAlign:"middle",rotation:V,inside:L,labelDistance:g,labelAlignTo:v,labelMargin:m,bleedMargin:y,textRect:P,text:k,font:x},L||u.push(a.label)}}),!h&&t.get("avoidLabelOverlap")&&qd(u,o,s,e,i,n,r,a)},QT=2*Math.PI,JT=Math.PI/180,tC=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),r=$d(t,i),a=t.get("center"),o=t.get("radius");_(o)||(o=[0,o]),_(a)||(a=[a,a]);var s=Mo(r.width,i.getWidth()),l=Mo(r.height,i.getHeight()),u=Math.min(s,l),h=Mo(a[0],s)+r.x,c=Mo(a[1],l)+r.y,d=Mo(o[0],u/2),f=Mo(o[1],u/2),p=-t.get("startAngle")*JT,g=t.get("minAngle")*JT,v=0;e.each(n,function(t){!isNaN(t)&&v++});var m=e.getSum(n),y=Math.PI/(m||v)*2,x=t.get("clockwise"),b=t.get("roseType"),w=t.get("stillShowZeroSum"),M=e.getDataExtent(n);M[0]=0;var S=QT,I=0,A=p,T=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:b?0/0:f,viewRect:r});n="area"!==b?0===m&&w?y:t*y:QT/v,g>n?(n=g,S-=g):I+=t;var a=A+T*n;e.setItemLayout(i,{angle:n,startAngle:A,endAngle:a,clockwise:x,cx:h,cy:c,r0:d,r:b?wo(t,M,[d,f]):f,viewRect:r}),A=a}),QT>S&&v)if(.001>=S){var C=QT/v;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=C,n.startAngle=p+T*i*C,n.endAngle=p+T*(i+1)*C}})}else y=S/I,A=p,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),r=n.angle===g?g:t*y;n.startAngle=A,n.endAngle=A+T*r,A+=T*r}});$T(t,f,r.width,r.height,r.x,r.y)})},eC=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),r=0;r<i.length;r++)if(!i[r].isSelected(e))return!1;return!0})}}}};jT("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Cu(qT("pie")),Tu(x(tC,"pie")),wu(eC("pie"));var iC=function(t){Qd(t),Jd(t)},nC=function(t,e,i,n,r){BA.call(this,t,e,i),this.type=n||"value",this.axisIndex=r};nC.prototype={constructor:nC,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},h(nC,BA);var rC=function(t,e,i,n,r,a){t=t||0;var o=i[1]-i[0];if(null!=r&&(r=ef(r,[0,o])),null!=a&&(a=Math.max(a,null!=r?r:0)),"all"===n){var s=Math.abs(e[1]-e[0]);s=ef(s,[0,o]),r=a=ef(s,[r,a]),n=0}e[0]=ef(e[0],i),e[1]=ef(e[1],i);var l=tf(e,n);e[n]+=t;var u=r||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=ef(e[n],h);var c=tf(e,n);null!=r&&(c.sign!==l.sign||c.span<r)&&(e[1-n]=e[n]+l.sign*r);var c=tf(e,n);return null!=a&&c.span>a&&(e[1-n]=e[n]+c.sign*a),e},aC=f,oC=Math.min,sC=Math.max,lC=Math.floor,uC=Math.ceil,hC=So,cC=Math.PI;nf.prototype={type:"parallel",constructor:nf,_init:function(t,e){var i=t.dimensions,n=t.parallelAxisIndex;aC(i,function(t,i){var r=n[i],a=e.getComponent("parallelAxis",r),o=this._axesMap.set(t,new nC(t,Fh(a),[0,0],a.get("type"),r)),s="category"===o.type;o.onBand=s&&a.get("boundaryGap"),o.inverse=a.get("inverse"),a.axis=o,o.model=a,o.coordinateSystem=a.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,r=e.pixelDimIndex,a=t[1-r],o=t[r];return a>=i&&a<=i+e.axisLength&&o>=n&&o<=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();aC(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Vh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=$o(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"],r=["width","height"],a=e.get("layout"),o="horizontal"===a?0:1,s=i[r[o]],l=[0,s],u=this.dimensions.length,h=rf(e.get("axisExpandWidth"),l),c=rf(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");if(f)t=rf(f[1]-f[0],l),f[1]=f[0]+t;else{t=rf(h*(c-1),l);var p=e.get("axisExpandCenter")||lC(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var v=[lC(hC(f[0]/h,1))+1,uC(hC(f[1]/h,1))-1],m=g/h*f[0];return{layout:a,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[r[1-o]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:v,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),r=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),aC(i,function(e,i){var a=(n.axisExpandable?of:af)(i,n),o={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:cC/2,vertical:0},l=[o[r].x+t.x,o[r].y+t.y],u=s[r],h=Oe();Ne(h,h,u),Re(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 r=this._axesMap,a=this.dimensions,o=[],s=[];f(a,function(e){o.push(t.mapDimension(e)),s.push(r.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getValues(o,u),d=0,p=a.length;p>d;d++){var g=s[d].getActiveState(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,r=t.length;r>n;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return ro([t,0],i.transform)},getAxisLayout:function(t){return n(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),r=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var o,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<r*h[0]?(l="jump",o=s-r*h[2]):c&&u&&s>r*(1-h[0])?(l="jump",o=s-r*(1-h[2])):(o=s-r*h[1])>=0&&(o=s-r*(1-h[1]))<=0&&(o=0),o*=e.axisExpandWidth/u,o?rC(o,n,a,"all"):l="none";else{var r=n[1]-n[0],d=a[1]*s/r;n=[sC(0,d-r/2)],n[1]=oC(a[1],n[0]+r),n[0]=n[1]-r}return{axisExpandWindow:n,behavior:l}}},As.register("parallel",{create:sf});var dC=mM.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ib([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)Io(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,r=e.length;r>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),fC={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};r(dC.prototype,bA),XA("parallel",dC,lf,fC),mM.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(){mM.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&r(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){f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=v(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}});var pC={type:"axisAreaSelect",event:"axisAreaSelected"};Su(pC,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Su("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var gC="\x00_ec_interaction_mutex";Su({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var vC=x,mC=f,yC=p,xC=Math.min,_C=Math.max,bC=Math.pow,wC=1e4,MC=6,SC=6,IC="globalPan",AC={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},TC={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},CC={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},DC=0;ff.prototype={constructor:ff,enableBrush:function(t){return this._brushType&&gf(this),t.brushType&&pf(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelId]=n(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){mC(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function i(t,i){return e(t.__brushOption,i)}function a(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var r=u[e]=null!=i?(l[i].__brushOption=n,l[i]):xf(h,yf(h,n));wf(h,r)}}function o(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return r(n(CC),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Vu(l,t,i,e).add(a).update(a).remove(o).execute(),this},unmount:function(){return this.enableBrush(!1),Af(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(ff,ex);var kC={mousedown:function(t){if(this._dragging)jf(this,t);else if(!t.target||!t.target.draggable){Zf(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=Sf(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(Wf(this,t,n),this._dragging){Zf(t);var r=Yf(this,t,n,!1);r&&Tf(this,r)}},mouseup:function(t){jf(this,t)}},PC={lineX:Kf(0),lineY:Kf(1),rect:{createCover:function(t,e){return kf(vC(Nf,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Df(t);return Ef(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Pf(t,e,i,n)},updateCommon:Lf,contain:Xf},polygon:{createCover:function(t,e){var i=new jx;return i.add(new yw({name:"main",style:zf(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new mw({name:"main",draggable:!0,drift:vC(Vf,t,e),ondragend:vC(Tf,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:Gf(t,e,i)})},updateCommon:Lf,contain:Xf}},LC={axisPointer:1,tooltip:1,brush:1},OC=["axisLine","axisTickLabel","axisName"],zC=Lu({type:"parallelAxis",init:function(t,e){zC.superApply(this,"init",arguments),(this._brushController=new ff(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!ip(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new jx,this.group.add(this._axisGroup),t.get("show")){var a=rp(t,e),s=a.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=s.getAxisLayout(h),d=o({strokeContainThreshold:u},c),p=new hT(t,d);f(OC,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,a,u,i);var g=n&&n.animation===!1?null:t;oo(r,this._axisGroup,g)}}},_refreshBrushController:function(t,e,i,n,r,a){var o=i.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=Ai.create({x:o[0],y:-r/2,width:s,height:r});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Qf(u),isTargetByCursor:tp(u,a,n),getLinearBrushOtherExtent:Jf(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(np(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,r=p(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:r})},dispose:function(){this._brushController.dispose()}}),EC=5;Lu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(BC,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),yl(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){f(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(o({type:"parallelAxisExpand"},t))}});var BC={mousedown:function(t){ap(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(ap(this,"click")&&e){var i=[t.offsetX,t.offsetY],n=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2);if(n>EC)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&ap(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:!1})}}};bu(iC),rS.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return op(t,this),ph(t,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,r){t===e&&n.push(i.getRawIndex(r))}),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 RC=.3,NC=(dl.extend({type:"parallel",init:function(){this._dataGroup=new jx,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function r(t){var e=hp(l,s,t,c,h);dp(e,l,t,d)}function a(e,i){var r=u.getItemGraphicEl(i),a=up(l,e,c,h);l.setItemGraphicEl(e,r);var o=n&&n.animation===!1?null:t;eo(r,{shape:{points:a}},o,e),dp(r,l,e,d)}function o(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.dimensions,d=cp(t);if(l.diff(u).add(r).update(a).remove(o).execute(),!this._initialized){this._initialized=!0;var f=lp(h,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var i=e.getData(),n=e.coordinateSystem,r=n.dimensions,a=cp(e),o=t.start;o<t.end;o++){var s=hp(i,this._dataGroup,o,r,n);s.incremental=!0,dp(s,i,o,a)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}}),["lineStyle","normal","opacity"]),VC={seriesType:"parallel",reset:function(t,e){function i(t,e){h.eachActiveState(e,function(t,i){var n=d[t];if("normal"===t&&e.hasItemOption){var r=e.getItemModel(i).get(NC,!0);null!=r&&(n=r)}e.setItemVisual(i,"opacity",n)},t.start,t.end)}var n=t.getModel("itemStyle"),r=t.getModel("lineStyle"),a=e.get("color"),o=r.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",o),{progress:i}}};Cu(VC);{var FC=(rS.extend({type:"series.gauge",getInitialData:function(){return ZT(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}}}),ia.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,r=e.r,a=e.width,o=e.angle,s=e.x-i(o)*a*(a>=r/3?1:2),l=e.y-n(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(o)*a,e.y+n(o)*a),t.lineTo(e.x+i(e.angle)*r,e.y+n(e.angle)*r),t.lineTo(e.x-i(o)*a,e.y-n(o)*a),t.lineTo(s,l)}})),GC=2*Math.PI;dl.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),r=pp(t,i);this._renderMain(t,e,i,n,r)},dispose:function(){},_renderMain:function(t,e,i,n,r){for(var a=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,c=(h-u)%GC,d=u,f=s.get("width"),p=o.get("show"),g=0;p&&g<n.length;g++){var v=Math.min(Math.max(n[g][0],0),1),h=u+c*v,m=new fw({shape:{startAngle:d,endAngle:h,cx:r.cx,cy:r.cy,clockwise:l,r0:r.r-f,r:r.r},silent:!0});m.setStyle({fill:n[g][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(m),d=h}var y=function(t){if(0>=t)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(!l){var x=u;u=h,h=x}this._renderTicks(t,e,i,y,r,u,h,l),this._renderPointer(t,e,i,y,r,u,h,l),this._renderTitle(t,e,i,y,r),this._renderDetail(t,e,i,y,r)},_renderTicks:function(t,e,i,n,r,a,o){for(var s=this.group,l=r.cx,u=r.cy,h=r.r,c=+t.get("min"),d=+t.get("max"),f=t.getModel("splitLine"),p=t.getModel("axisTick"),g=t.getModel("axisLabel"),v=t.get("splitNumber"),m=p.get("splitNumber"),y=Mo(f.get("length"),h),x=Mo(p.get("length"),h),_=a,b=(o-a)/v,w=b/m,M=f.getModel("lineStyle").getLineStyle(),S=p.getModel("lineStyle").getLineStyle(),I=0;v>=I;I++){var A=Math.cos(_),T=Math.sin(_);if(f.get("show")){var C=new Mw({shape:{x1:A*h+l,y1:T*h+u,x2:A*(h-y)+l,y2:T*(h-y)+u},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(I/v)}),s.add(C)}if(g.get("show")){var D=gp(So(I/v*(d-c)+c),g.get("formatter")),k=g.get("distance"),P=n(I/v);s.add(new uw({style:Xa({},g,{text:D,x:A*(h-y-k)+l,y:T*(h-y-k)+u,textVerticalAlign:-.4>T?"top":T>.4?"bottom":"middle",textAlign:-.4>A?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(p.get("show")&&I!==v){for(var L=0;m>=L;L++){var A=Math.cos(_),T=Math.sin(_),O=new Mw({shape:{x1:A*h+l,y1:T*h+u,x2:A*(h-x)+l,y2:T*(h-x)+u},silent:!0,style:S});"auto"===S.stroke&&O.setStyle({stroke:n((I+L/m)/v)}),s.add(O),_+=w}_-=w}else _+=b}},_renderPointer:function(t,e,i,n,r,a,o){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[a,o],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var i=new FC({shape:{angle:a}});io(i,{shape:{angle:wo(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);eo(n,{shape:{angle:wo(c.get(d,e),u,h,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var i=c.getItemModel(e),a=i.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:Mo(a.get("width"),r.r),r:Mo(a.get("length"),r.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(wo(c.get(d,e),u,[0,1],!0))),Va(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,i,n,r){var a=t.getData(),o=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=r.cx+Mo(l[0],r.r),h=r.cy+Mo(l[1],r.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(o,0),p=n(wo(f,[c,d],[0,1],!0));this.group.add(new uw({silent:!0,style:Xa({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,r){var a=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=r.cx+Mo(l[0],r.r),h=r.cy+Mo(l[1],r.r),c=Mo(a.get("width"),r.r),d=Mo(a.get("height"),r.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(wo(p,[o,s],[0,1],!0));this.group.add(new uw({silent:!0,style:Xa({},a,{x:u,y:h,text:gp(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}})}_p.prototype={constructor:_p,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:BA.prototype.dataToCoord,radiusToData:BA.prototype.coordToData},h(_p,BA);var HC=hr();bp.prototype={constructor:bp,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:BA.prototype.dataToCoord,angleToData:BA.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),r=i.count();if(n[1]-n[0]<1)return 0;var a=n[0],o=t.dataToCoord(a+1)-t.dataToCoord(a),s=Math.abs(o),l=Xi(a,e.getFont(),"center","top"),u=Math.max(l.height,7),h=u/s;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),d=HC(t.model),f=d.lastAutoInterval,p=d.lastTickCount;return null!=f&&null!=p&&Math.abs(f-c)<=1&&Math.abs(p-r)<=1&&f>c?c=f:(d.lastTickCount=r,d.lastAutoInterval=c),c}},h(bp,BA);var WC=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new _p,this._angleAxis=new bp,this._radiusAxis.polar=this._angleAxis.polar=this};WC.prototype={type:"polar",axisPointerEnabled:!0,constructor:WC,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(),r=n.getExtent(),a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);n.inverse?a=o-360:o=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=a>l?1:-1;a>l||l>o;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,r=-Math.sin(i)*e+this.cy;return[n,r]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,r=i*i+n*n,a=this.r,o=this.r0;return a*a>=r&&r>=o*o}}}};var ZC=mM.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});r(ZC.prototype,bA);var XC={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};XA("angle",ZC,wp,XC.angle),XA("radius",ZC,wp,XC.radius),Pu({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var YC={dimensions:WC.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var r=new WC(n);r.update=Sp;var a=r.getRadiusAxis(),o=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Ip(a,s),Ip(o,l),Mp(r,t,e),i.push(r),t.coordinateSystem=r,r.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}};As.register("polar",YC);var UC=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];mT.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,r=i.getRadiusAxis().getExtent(),a=e.getTicksCoords(),o=e.getMinorTicksCoords(),s=p(e.getViewLabels(),function(t){var t=n(t);
+return t.coord=e.dataToCoord(t.tickValue),t});Cp(s),Cp(a),f(UC,function(n){!t.get(n+".show")||e.scale.isBlank()&&"axisLine"!==n||this["_"+n](t,i,a,o,r,s)},this)}},_axisLine:function(t,e,i,n,r){var a,o=t.getModel("axisLine.lineStyle"),s=Tp(e),l=s?0:1;a=0===r[l]?new hw({shape:{cx:e.cx,cy:e.cy,r:r[s]},style:o.getLineStyle(),z2:1,silent:!0}):new pw({shape:{cx:e.cx,cy:e.cy,r:r[s],r0:r[l]},style:o.getLineStyle(),z2:1,silent:!0}),a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,r){var a=t.getModel("axisTick"),o=(a.get("inside")?-1:1)*a.get("length"),l=r[Tp(e)],u=p(i,function(t){return new Mw({shape:Ap(e,[l,l+o],t.coord)})});this.group.add(Hw(u,{style:s(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,r){if(n.length){for(var a=t.getModel("axisTick"),o=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*o.get("length"),u=r[Tp(e)],h=[],c=0;c<n.length;c++)for(var d=0;d<n[c].length;d++)h.push(new Mw({shape:Ap(e,[u,u+l],n[c][d].coord)}));this.group.add(Hw(h,{style:s(o.getModel("lineStyle").getLineStyle(),s(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(t,e,i,n,r,a){var o=t.getCategories(!0),s=t.getModel("axisLabel"),l=s.get("margin"),u=t.get("triggerEvent");f(a,function(i){var n=s,a=i.tickValue,h=r[Tp(e)],c=e.coordToPoint([h+l,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";o&&o[a]&&o[a].textStyle&&(n=new go(o[a].textStyle,s,s.ecModel));var v=new uw({silent:hT.isLabelSilent(t)});this.group.add(v),Xa(v.style,n,{x:c[0],y:c[1],textFill:n.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g}),u&&(v.eventData=hT.makeAxisEventDataBase(t),v.eventData.targetType="axisLabel",v.eventData.value=i.rawLabel)},this)},_splitLine:function(t,e,i,n,r){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c<i.length;c++){var d=u++%l.length;h[d]=h[d]||[],h[d].push(new Mw({shape:Ap(e,r,i[c].coord)}))}for(var c=0;c<h.length;c++)this.group.add(Hw(h[c],{style:s({stroke:l[c%l.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,i,n,r){if(n.length){for(var a=t.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=[],l=0;l<n.length;l++)for(var u=0;u<n[l].length;u++)s.push(new Mw({shape:Ap(e,r,n[l][u].coord)}));this.group.add(Hw(s,{style:o.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,i,n,r){if(i.length){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=Math.PI/180,d=-i[0].coord*c,f=Math.min(r[0],r[1]),p=Math.max(r[0],r[1]),g=t.get("clockwise"),v=1;v<i.length;v++){var m=u++%l.length;h[m]=h[m]||[],h[m].push(new fw({shape:{cx:e.cx,cy:e.cy,r0:f,r:p,startAngle:d,endAngle:-i[v].coord*c,clockwise:g},silent:!0})),d=-i[v].coord*c}for(var v=0;v<h.length;v++)this.group.add(Hw(h[v],{style:s({fill:l[v%l.length]},o.getAreaStyle()),silent:!0}))}}});var jC=["axisLine","axisTickLabel","axisName"],qC=["splitLine","splitArea","minorSplitLine"];mT.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,n=i.getAngleAxis(),r=e.getTicksCoords(),a=e.getMinorTicksCoords(),o=n.getExtent()[0],s=e.getExtent(),l=Dp(i,t,o),u=new hT(t,l);f(jC,u.add,u),this.group.add(u.getGroup()),f(qC,function(n){t.get(n+".show")&&!e.scale.isBlank()&&this["_"+n](t,i,o,s,r,a)},this)}},_splitLine:function(t,e,i,n,r){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c<r.length;c++){var d=u++%l.length;h[d]=h[d]||[],h[d].push(new hw({shape:{cx:e.cx,cy:e.cy,r:r[c].coord}}))}for(var c=0;c<h.length;c++)this.group.add(Hw(h[c],{style:s({stroke:l[c%l.length],fill:null},o.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,i,n,r,a){if(a.length){for(var o=t.getModel("minorSplitLine"),l=o.getModel("lineStyle"),u=[],h=0;h<a.length;h++)for(var c=0;c<a[h].length;c++)u.push(new hw({shape:{cx:e.cx,cy:e.cy,r:a[h][c].coord}}));this.group.add(Hw(u,{style:s({fill:null},l.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,i,n,r){if(r.length){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=r[0].coord,d=1;d<r.length;d++){var f=u++%l.length;h[f]=h[f]||[],h[f].push(new fw({shape:{cx:e.cx,cy:e.cy,r0:c,r:r[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=r[d].coord}for(var d=0;d<h.length;d++)this.group.add(Hw(h[d],{style:s({fill:l[d%l.length]},o.getAreaStyle()),silent:!0}))}}});var KC=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=ur(a,t);if(null==o||0>o||_(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(p(l.dimensions,function(t){return a.mapDimension(t)}),o,!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}},$C=f,QC=x,JC=hr(),tD=function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Vp(r)&&(r=KC({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Vp(r),u=a.axesInfo,h=s.axesInfo,c="leave"===n||Vp(r),d={},f={},p={list:[],map:{}},g={showPointer:QC(Lp,f),showTooltip:QC(Op,p)};$C(s.coordSysMap,function(t,e){var i=l||t.containPoint(r);$C(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=Rp(u,t);if(!c&&i&&(!u||n)){var a=n&&n.value;null!=a||l||(a=e.pointToData(r)),null!=a&&kp(t,a,g,!1,d)}})});var v={};return $C(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&$C(i.axesInfo,function(e,n){var r=f[n];if(e!==t&&r){var a=r.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,Np(e),Np(t)))),v[t.key]=a}})}),$C(v,function(t,e){kp(h[e],t,g,!0,d)}),zp(f,h,d),Ep(p,r,t,o),Bp(h,o,i),d}},eD=(Pu({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}}}),hr()),iD=f,nD=Lu({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Fp("axisPointer",i,function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Yp(e.getZr(),"axisPointer"),nD.superApply(this._model,"remove",arguments)},dispose:function(t,e){Yp("axisPointer",e),nD.superApply(this._model,"dispose",arguments)}}),rD=hr(),aD=n,oD=y;Up.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,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(o){var c=x(jp,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new jx,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);Qp(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(r&&n.getBandWidth()>o)return!0;if(a){var s=hd(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=rD(t).pointerEl=new Yw[i.type](aD(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var r=rD(t).labelEl=new bw(aD(e.label));t.add(r),Kp(r,n)}},updatePointerEl:function(t,e,i){var n=rD(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=rD(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),Kp(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,r=e.getModel("handle"),a=e.get("status");if(!r.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var o;this._handle||(o=!0,n=this._handle=uo(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){lx(t.event)},onmousedown:oD(this._onHandleDragMove,this,0,0),drift:oD(this._onHandleDragMove,this),ondragend:oD(this._onHandleDragEnd,this)}),i.add(n)),Qp(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(r.getItemStyle(null,s));var l=r.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),yl(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){jp(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$p(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform($p(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr($p(n)),rD(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){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]}}},Up.prototype.constructor=Up,yr(Up);var sD=Up.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=lg(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=Jp(n),c=lD[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=vd(o.model,i);rg(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=vd(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:ng(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.grid,a=n.getGlobalExtent(!0),o=lg(r,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(o[1]+o[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),lD={line:function(t,e,i){var n=ag([e,i[0]],[e,i[1]],ug(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:og([e-n/2,i[0]],[n,r],ug(t))}}};mT.registerAxisPointerClass("CartesianAxisPointer",sD),bu(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),wu(lI.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=nd(t,e)}),Su({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},tD);var uD=Up.extend({makeElOption:function(t,e,i,n,r){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var o,s=a.polar,l=s.getOtherAxis(a),u=l.getExtent();o=a["dataTo"+Uo(a.dim)](e);var h=n.get("type");if(h&&"none"!==h){var c=Jp(n),d=hD[h](a,s,o,u,c);d.style=c,t.graphicKey=d.type,t.pointer=d}var f=n.get("label.margin"),p=hg(e,i,n,s,f);tg(t,i,n,r,p)}}),hD={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:ag(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){var r=Math.max(1,t.getBandWidth()),a=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:sg(e.cx,e.cy,n[0],n[1],(-i-r/2)*a,(-i+r/2)*a)}:{type:"Sector",shape:sg(e.cx,e.cy,i-r/2,i+r/2,0,2*Math.PI)}}};mT.registerAxisPointerClass("PolarAxisPointer",uD),Tu(x(yp,"bar")),Lu({type:"polar"});var cD=function(t,e,i,n,r){BA.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom",this.orient=null};cD.prototype={constructor:cD,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},h(cD,BA),cg.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:cg,_init:function(t){var e=this.dimension,i=new cD(e,Fh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();f(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Vh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=$o({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],r=e.reverse?1:0;e.setExtent(n[r],n[1-r]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=r?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(),n=i.orient;return"horizontal"===n?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=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2,n}},As.register("single",{create:dg,dimensions:cg.prototype.dimensions});var dD=["axisLine","axisTickLabel","axisName"],fD=["splitArea","splitLine"],pD=mT.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new jx;var o=fg(t),s=new hT(t,o);f(dD,s.add,s),r.add(this._axisGroup),r.add(s.getGroup()),f(fD,function(e){t.get(e+".show")&&this["_"+e](t)},this),oo(a,this._axisGroup,t),pD.superCall(this,"render",t,e,i,n)},remove:function(){yd(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),r=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var o=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]=o.y,d[0]=p,d[1]=o.y+o.height):(c[0]=o.x,c[1]=p,d[0]=o.x+o.width,d[1]=p);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new Mw({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:r},silent:!0}))}for(var f=0;f<l.length;++f)this.group.add(Hw(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(r),lineWidth:r},silent:!0}))}},_splitArea:function(t){md(this,this._axisGroup,t,t)}}),gD=mM.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),vD={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};r(gD.prototype,bA),XA("single",gD,pg,vD);var mD=["x","y"],yD=["width","height"],xD=Up.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.coordinateSystem,s=vg(o,1-gg(a)),l=o.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=Jp(n),c=_D[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=fg(i);rg(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=fg(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:ng(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.coordinateSystem,a=gg(n),o=vg(r,a),s=t.position;s[a]+=e[a],s[a]=Math.min(o[1],s[a]),s[a]=Math.max(o[0],s[a]);var l=vg(r,1-a),u=(l[1]+l[0])/2,h=[u,u];return h[a]=s[a],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),_D={line:function(t,e,i){var n=ag([e,i[0]],[e,i[1]],gg(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:og([e-n/2,i[0]],[n,r],gg(t))}}};mT.registerAxisPointerClass("SingleAxisPointer",xD),Lu({type:"single"}),Pu({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"}}}),Lu({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),s=D(t.get("textBaseline"),t.get("textVerticalAlign")),l=new uw({style:Xa({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new uw({style:Xa({},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"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=$o(v,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),"middle"===o&&(o="center"),"right"===o?m.x+=m.width:"center"===o&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(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 y={textAlign:o,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=m.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new bw({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(b)}}});var bD=vS.legend.selector,wD={all:{type:"all",title:n(bD.all)},inverse:{type:"inverse",title:n(bD.inverse)}},MD=Pu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){MD.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){w(t)&&(t={type:t}),e[i]=r(t,wD[t.type])})},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 r=n.name;i.push(r);var a;if(n.legendVisualProvider){var o=n.legendVisualProvider,s=o.getAllNames();t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):a=!0}else a=!0;a&&or(n)&&e.push(n.name)}),this._availableNames=i;var n=this.get("data")||e,r=p(n,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new go(t,this,this.ecModel)},this);this._data=r},getData:function(){return this._data},select:function(t){var e=this.option.selected,i=this.get("selectedMode");if("single"===i){var n=this._data;f(n,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)},allSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){var i=t.get("name",!0);e.hasOwnProperty(i)||(e[i]=!0),e[i]=!e[i]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&u(this._availableNames,t)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});Su("legendToggleSelect","legendselectchanged",x(mg,"toggleSelected")),Su("legendAllSelect","legendselectall",x(mg,"allSelect")),Su("legendInverseSelect","legendinverseselect",x(mg,"inverseSelect")),Su("legendSelect","legendselected",x(mg,"select")),Su("legendUnSelect","legendunselected",x(mg,"unSelect"));var SD=x,ID=f,AD=jx,TD=Lu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new AD),this._backgroundEl,this.group.add(this._selectorGroup=new AD),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),a=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===a?"right":"left");var o=t.get("selector",!0),l=t.get("selectorPosition",!0);!o||l&&"auto"!==l||(l="horizontal"===a?"end":"start"),this.renderInner(r,t,e,i,o,a,l);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),d=$o(u,h,c),f=this.layoutInner(t,r,d,n,o,l),p=$o(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=xg(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,r,a,o){var s=this.getContentGroup(),l=N(),u=e.get("selectedMode"),h=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),ID(e.getData(),function(r,a){var o=r.get("name");if(!this.newlineDisabled&&(""===o||"\n"===o))return void s.add(new AD({newline:!0}));var c=i.getSeriesByName(o)[0];if(!l.get(o))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",v=d.getVisual("symbol"),m=this._createItem(o,a,r,e,g,v,t,f,p,u);m.on("click",SD(bg,o,null,n,h)).on("mouseover",SD(wg,c.name,null,n,h)).on("mouseout",SD(Mg,c.name,null,n,h)),l.set(o,!0)}else i.eachRawSeries(function(i){if(!l.get(o)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(o))return;var c=s.indexOfName(o),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(o,a,r,e,p,null,t,d,f,u);g.on("click",SD(bg,null,o,n,h)).on("mouseover",SD(wg,null,o,n,h)).on("mouseout",SD(Mg,null,o,n,h)),l.set(o,!0)}},this)},this),r&&this._createSelector(r,e,n,a,o)},_createSelector:function(t,e,i){function n(t){var n=t.type,a=new uw({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Wa(a.style,a.hoverStyle={},o,s,{defaultText:t.title,isRectText:!1}),Va(a)}var r=this.getSelectorGroup();ID(t,function(t){n(t)})},_createItem:function(t,e,i,n,r,a,s,l,u,h){var c=n.get("itemWidth"),d=n.get("itemHeight"),f=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),g=n.get("symbolKeepAspect"),v=n.getModel("itemStyle"),m=n.isSelected(t),y=new AD,x=i.getModel("textStyle"),_=i.get("icon"),b=i.getModel("tooltip"),w=b.parentModel;r=_||r;var M=qh(r,0,0,c,d,m?l:f,null==g?!0:g);if(y.add(_g(M,r,v,u,p,m)),!_&&a&&(a!==r||"none"===a)){var S=.8*d;"none"===a&&(a="circle");var I=qh(a,(c-S)/2,(d-S)/2,S,S,m?l:f,null==g?!0:g);y.add(_g(I,a,v,u,p,m))}var A="left"===s?c+5:-5,T=s,C=n.get("formatter"),D=t;"string"==typeof C&&C?D=C.replace("{name}",null!=t?t:""):"function"==typeof C&&(D=C(t)),y.add(new uw({style:Xa({},x,{text:D,x:A,y:d/2,textFill:m?x.getTextColor():f,textAlign:T,textVerticalAlign:"middle"})}));var k=new bw({shape:y.getBoundingRect(),invisible:!0,tooltip:b.get("show")?o({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},b.option):null});return y.add(k),y.eachChild(function(t){t.silent=!0}),k.silent=!h,this.getContentGroup().add(y),Va(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();pM(t.get("orient"),o,t.get("itemGap"),i.width,i.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(r){pM("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",v=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),o.attr("position",u);var m={x:0,y:0};return m[p]=l[p]+d+h[p],m[g]=Math.max(l[g],h[g]),m[v]=Math.min(0,h[v]+c[1-f]),m}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),CD=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})};wu(lI.PROCESSOR.SERIES_FILTER,CD),mM.registerSubTypeDefaulter("legend",function(){return"plain"});var DD=MD.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 r=ts(t);DD.superCall(this,"init",t,e,i,n),Sg(this,t,r)},mergeOption:function(t,e){DD.superCall(this,"mergeOption",t,e),Sg(this,this.option,t)}}),kD=jx,PD=["width","height"],LD=["x","y"],OD=TD.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){OD.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new kD),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new kD),this._showController},resetInner:function(){OD.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n,r,a,o){function s(t,i){var r=t+"DataIndex",a=uo(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:y(l._pageGo,l,r,e,n)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});a.name=t,u.add(a)}var l=this;OD.superCall(this,"renderInner",t,e,i,n,r,a,o);var u=this._controllerGroup,h=e.get("pageIconSize",!0);_(h)||(h=[h,h]),s("pagePrev",0);var c=e.getModel("pageTextStyle");u.add(new uw({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),s("pageNext",1)},layoutInner:function(t,e,i,r,a,o){var s=this.getSelectorGroup(),l=t.getOrient().index,u=PD[l],h=LD[l],c=PD[1-l],d=LD[1-l];a&&pM("horizontal",s,t.get("selectorItemGap",!0));var f=t.get("selectorButtonGap",!0),p=s.getBoundingRect(),g=[-p.x,-p.y],v=n(i);a&&(v[u]=i[u]-p[u]-f);var m=this._layoutContentAndController(t,r,v,l,u,c,d);if(a){if("end"===o)g[l]+=m[u]+f;else{var y=p[u]+f;g[l]-=y,m[h]-=y}m[u]+=p[u]+f,g[1-l]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[d]+g[1-l]),s.attr("position",g)}return m},_layoutContentAndController:function(t,e,i,n,r,a,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;pM(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),pM("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[r]>i[r],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],v=D(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?g[n]+=i[r]-c[r]:p[n]+=c[r]+v}g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[r]=d?i[r]:h[r],y[a]=Math.max(h[a],c[a]),y[o]=Math.min(0,c[o]+g[1-n]),l.__rectSize=i[r],d){var x={x:0,y:0};x[r]=Math.max(i[r]-c[r]-v,0),x[a]=y[a],l.setClipPath(new bw({shape:x})),l.__rectSize=x[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&eo(s,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y
+},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;f(["pagePrev","pageNext"],function(n){var r=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")});var n=i.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,s=e.pageCount;n&&r&&n.setStyle("text",w(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[o];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+a}var n=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=PD[o],l=LD[o],u=this._findTargetItemIndex(n),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[o]=-g.s;for(var v=u+1,m=g,y=g,x=null;d>=v;++v)x=e(h[v]),(!x&&y.e>m.s+a||x&&!i(x,m.s))&&(m=y.i>m.i?y:x,m&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=x;for(var v=u-1,m=g,y=g,x=null;v>=-1;--v)x=e(h[v]),x&&i(y,x.s)||!(m.i<y.i)||(y=m,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=x;return p},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,i,n=this.getContentGroup();return n.eachChild(function(n,r){var a=n.__legendDataIndex;null==i&&null!=a&&(i=r),a===t&&(e=r)}),null!=e?e:i}});Su("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Pu({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",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 zD=f,ED=Fo,BD=["","-webkit-","-moz-","-o-"],RD="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Dg.prototype={constructor:Dg,_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,i=this._styleCoord;e.style.cssText=RD+Tg(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"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=this._styleCoord;Cg(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},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(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},kg.prototype={constructor:kg,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},r=t,a="{marker",o="|}",s=r.indexOf(a);s>=0;){var l=r.indexOf(o),u=r.substr(s+a.length,l-s-a.length);n["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},r=r.substr(l+1),s=r.indexOf("{marker")}this.el=new uw({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var ND=y,VD=f,FD=Mo,GD=new bw({shape:{x:-1,y:-1,width:2,height:2}});Lu({type:"tooltip",init:function(t,e){if(!Oy.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=gr(n);var r;"html"===this._renderMode?(r=new Dg(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(r=new kg(e),this._newLine="\n"),this._tooltipContent=r}},render:function(t,e,i){if(!Oy.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Fp("itemTooltip",this._api,ND(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&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(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!Oy.node){var r=Lg(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=GD;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},r)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=KC(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},r)}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},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Lg(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=Pg([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,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=y(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],s=[],l=Pg([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};VD(t,function(t){VD(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var l=ig(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(o){var h=i.getSeriesByIndex(o.seriesIndex),d=o.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Wh(e.axis,n),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(M(g)){p=g.html;var v=g.markers;r(c,v)}else p=g;a.push(p)}});var d=l;o.push("html"!==u?a.join(h):(d?Go(d)+h:"")+a.join(h))}})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,o,s,Math.random(),a[0],a[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,a=n.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(),h=Pg([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);M(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var r=n;n={content:r,formatter:r}}var a=new go(n,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,a,o,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var c=e;if(h&&"string"==typeof h)c=Ho(h,i,!0);else if("function"==typeof h){var d=ND(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,o,r,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,o,r,a,u,i,s)}},_updatePosition:function(t,e,i,n,r,a,o){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"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([i,n],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),_(e))i=FD(e[0],s),n=FD(e[1],l);else if(M(e)){e.width=u[0],e.height=u[1];var f=$o(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&o){var p=Eg(e,d,u);i=p[0],n=p[1]}else{var p=Og(i,n,r,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=Bg(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Bg(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=zg(i,n,r,s,l);i=p[0],n=p[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&VD(e,function(e,n){var r=e.dataByAxis||{},a=t[n]||{},o=a.dataByAxis||[];i&=r.length===o.length,i&&VD(r,function(t,e){var n=o[e]||{},r=t.seriesDataIndices||[],a=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===a.length,i&&VD(r,function(t,e){var n=a[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){Oy.node||(this._tooltipContent.dispose(),Yp("itemTooltip",e))}}),Su({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Su({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var HD=Vo,WD=Go,ZD=Pu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(Oy.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var r=this.constructor,a=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[a];return i&&i.data?(s?s._mergeOption(i,e,!0):(n&&Rg(i),f(i.data,function(t){t instanceof Array?(Rg(t[0]),Rg(t[1])):Rg(t)}),s=new r(i,this,e),o(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[a]=s)):void(t[a]=null)},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=_(i)?p(i,HD).join(", "):HD(i),r=e.getName(t),a=WD(this.name);return(null!=i||r)&&(a+="<br />"),r&&(a+=WD(r),null!=i&&(a+=" : ")),null!=i&&(a+=WD(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});c(ZD,tS),ZD.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 XD=u,YD=x,UD={min:YD(Fg,"min"),max:YD(Fg,"max"),average:YD(Fg,"average")},jD=Lu({type:"marker",init:function(){this.markerGroupMap=N()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var n=t[r];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});jD.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(Ug(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,a=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Md),u=jg(r,t,e);e.setData(u),Ug(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),r=i.getShallow("symbolSize"),a=b(n),s=b(r);if(a||s){var l=e.getRawValue(t),h=e.getDataParams(t);a&&(n=n(l,h)),s&&(r=r(l,h))}u.setItemVisual(t,{symbol:n,symbolSize:r,color:i.get("itemStyle.color")||o.getVisual("color")})}),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")}}),bu(function(t){t.markPoint=t.markPoint||{}}),ZD.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var qD=Mw.prototype,KD=Iw.prototype,$D=va({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[qg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:qD.buildPath,_buildPathCurve:KD.buildPath,pointAt:function(t){return this[qg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:qD.pointAt,_pointAtCurve:KD.pointAt,tangentAt:function(t){var e=this.shape,i=qg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:KD.tangentAt}),QD=["fromSymbol","toSymbol"],JD=ev.prototype;JD.beforeUpdate=tv,JD._createLine=function(t,e,i){var n=t.hostModel,r=t.getItemLayout(e),a=Qg(r);a.shape.percent=0,io(a,{shape:{percent:1}},n,e),this.add(a);var o=new uw({name:"label",lineLabelOriginalOpacity:1});this.add(o),f(QD,function(i){var n=$g(i,t,e);this.add(n),this[Kg(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},JD.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),a=t.getItemLayout(e),o={shape:{}};Jg(o.shape,a),eo(r,o,n,e),f(QD,function(i){var n=t.getItemVisual(e,i),r=Kg(i);if(this[r]!==n){this.remove(this.childOfName(i));var a=$g(i,t,e);this.add(a)}this[r]=n},this),this._updateCommonStl(t,e,i)},JD._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),a=i&&i.lineStyle,o=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(),o=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=k(t.getItemVisual(e,"opacity"),a.opacity,1);r.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},a)),r.hoverStyle=o,f(QD,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,v=l.getShallow("show"),m=u.getShallow("show"),y=this.childOfName("label");if((v||m)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?So(x):x}var b=v?g:null,w=m?D(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,M=y.style;if(null!=b||null!=w){Xa(y.style,l,{text:b},{autoColor:p}),y.__textAlign=M.textAlign,y.__verticalAlign=M.textVerticalAlign,y.__position=l.get("position")||"middle";var S=l.get("distance");_(S)||(S=[S,S]),y.__labelDistance=S}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=!v&&!m,Va(this)},JD.highlight=function(){this.trigger("emphasis")},JD.downplay=function(){this.trigger("normal")},JD.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},JD.setLinePoints=function(t){var e=this.childOfName("line");Jg(e.shape,t),e.dirty()},h(ev,jx);var tk=iv.prototype;tk.isPersistent=function(){return!0},tk.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var r=av(t);t.diff(n).add(function(i){nv(e,t,i,r)}).update(function(i,a){rv(e,n,t,a,i,r)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},tk.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},tk.incrementalPrepareUpdate=function(t){this._seriesScope=av(t),this._lineData=null,this.group.removeAll()},tk.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){var r=e.getItemLayout(n);if(sv(r)){var a=new this._ctor(e,n,this._seriesScope);a.traverse(i),this.group.add(a),e.setItemGraphicEl(n,a)}}},tk.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},tk._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var ek=function(t,e,i,a){var s=t.getData(),l=a.type;if(!_(a)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=a.xAxis||null!=a.yAxis)){var u,h;if(null!=a.yAxis||null!=a.xAxis)u=e.getAxis(null!=a.yAxis?"y":"x"),h=C(a.yAxis,a.xAxis);else{var c=Hg(a,s,e,t);u=c.valueAxis;var d=fh(s,c.valueDataDim);h=Yg(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(a),v={};g.type=null,g.coord=[],v.coord=[],g.coord[p]=-1/0,v.coord[p]=1/0;var m=i.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),g.coord[f]=v.coord[f]=h,a=[g,v,{type:l,valueIndex:a.valueIndex,value:h}]}return a=[Gg(t,a[0]),Gg(t,a[1]),o({},a[2])],a[2].type=a[2].type||"",r(a[2],a[0]),r(a[2],a[1]),a};jD.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,a=e.__to;r.each(function(e){cv(r,e,!0,t,i),cv(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var a=e.getItemModel(i);cv(e,i,r,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[r?0:1],symbol:a.get("symbol",!0)||p[r?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,o=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,new iv);this.group.add(u.group);var h=dv(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");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){r(c,t,!0),r(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){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),bu(function(t){t.markLine=t.markLine||{}}),ZD.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 ik=function(t,e,i,n){var r=Gg(t,n[0]),o=Gg(t,n[1]),s=C,l=r.coord,u=o.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=a([{},r,o]);return h.coord=[r.coord,o.coord],h.x0=r.x,h.y0=r.y,h.x1=o.x,h.y1=o.y,h},nk=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];jD.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 r=p(nk,function(r){return vv(n,e,r,t,i)});n.setItemLayout(e,r);var a=n.getItemGraphicEl(e);a.setShape("points",r)})}},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,a=t.id,o=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new jx});this.group.add(u.group),u.__keep=!0;var h=mv(r,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,p(nk,function(i){return vv(h,e,i,t,n)})),h.setItemVisual(e,{color:o.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new mw({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);eo(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),r=n.getModel("label"),a=n.getModel("emphasis.label"),o=h.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle").getItemStyle(),{fill:li(o,.4),stroke:o})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Wa(t.style,t.hoverStyle,r,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:o}),Va(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),bu(function(t){t.markArea=t.markArea||{}});var rk=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&yv(t)})};mM.registerSubTypeDefaulter("timeline",function(){return"slider"}),Su({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"),s({currentIndex:i.option.currentIndex},t)}),Su({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var ak=mM.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(){ak.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),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,r=this._names=[];if("category"===i){var a=[];f(e,function(t,e){var i,o=ir(t);M(t)?(i=n(t),i.value=e):i=e,a.push(i),w(o)||null!=o&&!isNaN(o)||(o=""),r.push(o+"")}),e=a}var o={category:"ordinal",time:"time"}[i]||"number",s=this._data=new GI([{name:"value",type:o}],this);s.initData(e,r)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}}),ok=ak.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:[]}});c(ok,tS);var sk=aS.extend({type:"timeline"}),lk=function(t,e,i,n){BA.call(this,t,e,i),this.type=n||"value",this.model=null};lk.prototype={constructor:lk,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(lk,BA);var uk=y,hk=f,ck=Math.PI;sk.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){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),r=this._createGroup("mainGroup"),a=this._createGroup("labelGroup"),o=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Go(o.scale.getLabel(t))},hk(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,r,o,t)},this),this._renderAxisLabel(n,a,o,t),this._position(n,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"),r=bv(t,e);null==i||"auto"===i?i="horizontal"===n?r.y+r.height/2<e.getHeight()/2?"-":"+":r.x+r.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"},o={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:ck/2},l="vertical"===n?r.height:r.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*ck/180;var g,v,m,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),b=h&&u.get("showPrevBtn",!0),w=h&&u.get("showNextBtn",!0),M=0,S=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],M+=f),b&&(v=[M,0],M+=f),w&&(m=[S-c,0],S-=f)):(_&&(g=[S-c,0],S-=f),b&&(v=[0,0],M+=f),w&&(m=[S-c,0],S-=f)),y=[M,S],t.get("inverse")&&y.reverse(),{viewRect:r,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")||o[n],playPosition:g,prevBtnPosition:v,nextBtnPosition:m,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,r){t[n]+=i[n][r]-e[n][r]}var r=this._mainGroup,a=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var s=Oe(),l=o.x,u=o.y+o.height;Re(s,s,[-l,-u]),Ne(s,s,-ck/2),Re(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=i(o),c=i(r.getBoundingRect()),d=i(a.getBoundingRect()),f=r.position,p=a.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var v="+"===g?0:1;n(f,c,h,1,v),n(p,d,h,1,1-v)}else{var v=g>=0?0:1;n(f,c,h,1,v),p[1]=f[1]+g}r.attr("position",f),a.attr("position",p),r.rotation=a.rotation=t.rotation,e(r),e(a)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),r=Fh(e,n);r.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");r.setExtent(a[0],a[1]),r.niceTicks();var o=new lk("value",r,t.axisExtent,n);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new jx;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var r=i.getExtent();n.get("lineStyle.show")&&e.add(new Mw({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:o({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var r=n.getData(),a=i.scale.getTicks();hk(a,function(t){var a=i.dataToCoord(t),o=r.getItemModel(t),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:uk(this._changeTimeline,this,t)},h=Mv(o,s,e,u);Va(h,l.getItemStyle()),o.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var r=i.getLabelModel();
+if(r.get("show")){var a=n.getData(),o=i.getViewLabels();hk(o,function(n){var r=n.tickValue,o=a.getItemModel(r),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new uw({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:uk(this._changeTimeline,this,r),silent:!1});Xa(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Va(h,Xa({},l))},this)}},_renderControl:function(t,e,i,n){function r(t,i,r,h){if(t){var c={position:t,origin:[a/2,0],rotation:h?-o:0,rectHover:!0,style:s,onclick:r},d=wv(n,i,u,c);e.add(d),Va(d,l)}}var a=t.controlSize,o=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);r(t.nextBtnPosition,"controlStyle.nextIcon",uk(this._changeTimeline,this,c?"-":"+")),r(t.prevBtnPosition,"controlStyle.prevIcon",uk(this._changeTimeline,this,c?"+":"-")),r(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),uk(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var r=n.getData(),a=n.getCurrentIndex(),o=r.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=uk(s._handlePointerDrag,s),t.ondragend=uk(s._handlePointerDragend,s),Sv(t,a,i,n,!0)},onUpdate:function(t){Sv(t,a,i,n)}};this._currentPointer=Mv(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,r=Io(n.getExtent().slice());i>r[1]&&(i=r[1]),i<r[0]&&(i=r[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var a=this._findNearestTick(i),o=this.model;(e||a!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(a)},_doPlayStop:function(){function t(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(uk(t,this),this.model.get("playInterval")))},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return ro(t,e,!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,r=this._axis;return i.each(["value"],function(i,a){var o=r.dataToCoord(i),s=Math.abs(o-t);n>s&&(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})}}),bu(rk),mM.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var dk=["x","y","z","radius","angle","single"],fk=["cartesian2d","polar","singleAxis"],pk=Av(dk,["axisIndex","axis","index","id"]),gk=f,vk=Io,mk=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};mk.prototype={constructor:mk,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(Iv(i.get("coordinateSystem"))){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.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,r=this.getAxisModel(),a="x"===i||"y"===i;a?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var o;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(o=t)}),o},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,i,n,r){var o=r?"Span":"ValueSpan";rC(0,t,i,"all",h["min"+o],h["max"+o]);for(var s=0;2>s;s++)e[s]=wo(t[s],i,n,!0),r&&(e[s]=a.parse(e[s]))}var i,n=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,o=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];gk(["start","end"],function(e,r){var h=t[e],c=t[e+"Value"];"percent"===o[r]?(null==h&&(h=s[r]),c=a.parse(wo(h,s,n))):(i=!0,c=null==c?n[r]:a.parse(c),h=wo(c,n,s)),u[r]=c,l[r]=h}),vk(u),vk(l);var h=this._minMaxSpan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Cv(this,this._dimName,e),Pv(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,kv(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,kv(this,!0))},filterData:function(t){function e(t){return t>=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&gk(n,function(t){var n=t.getData(),o=n.mapDimension(i,!0);o.length&&("weakFilter"===r?n.filterSelf(function(t){for(var e,i,r,s=0;s<o.length;s++){var l=n.get(o[s],t),u=!isNaN(l),h=l<a[0],c=l>a[1];if(u&&!h&&!c)return!0;u&&(r=!0),h&&(e=!0),c&&(i=!0)}return r&&e&&i}):gk(o,function(i){if("empty"===r)t.setData(n=n.map(i,function(t){return e(t)?t:0/0}));else{var o={};o[i]=a,n.selectRange(o)}}),gk(o,function(t){n.setApproximateExtent(a,t)}))})}}};var yk=f,xk=pk,_k=Pu({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=Lv(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Lv(t);r(this.option,t,!0),r(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;Oy.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Ov(this,t);var i=this.settledOption;yk([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[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,r){var a=this.dependentModels[e.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new mk(e.name,i,this,r));t[e.name+"_"+i]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();xk(function(e){var i=e.axisIndex;t[i]=tr(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;xk(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 r="vertical"===e?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],t=!1):yk(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&xk(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var a=0,o=r.length;o>a;a++)"category"===r[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")&&xk(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex),a=t.get(e.axisId),o=t.ecModel.queryComponents({mainType:e.axis,index:r,id:a})[0];r=o.componentIndex,u(n,r)<0&&n.push(r)})},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 xk(function(n){var r=t.get(n.axisIndex),a=this.dependentModels[n.axis][r];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 xk(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;xk(function(n){yk(this.get(n.axisIndex),function(r){t.call(e,n,r,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){var e=this.option,i=this.settledOption;yk([["start","startValue"],["end","endValue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),Ov(this,t)},setCalculatedRange:function(t){var e=this.option;yk(["start","startValue","end","endValue"],function(i){e[i]=t[i]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},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()}}),bk=aS.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var r,a=0;a<i.length;a++)if(i[a].model===t){r=i[a];break}r||i.push(r={model:t,axisModels:[],coordIndex:n}),r.axisModels.push(e)}var e=this.dataZoomModel,i=this.ecModel,n={};return e.eachTargetAxis(function(e,r){var a=i.getComponent(e.axis,r);if(a){var o=a.getCoordSysModel();o&&t(o,a,n[o.mainType]||(n[o.mainType]=[]),o.componentIndex)}},this),n}}),wk=(_k.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"}}}),bw),Mk=wo,Sk=Io,Ik=y,Ak=f,Tk=7,Ck=1,Dk=30,kk="horizontal",Pk="vertical",Lk=5,Ok=["line","bar","candlestick","scatter"],zk=bk.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){return zk.superApply(this,"render",arguments),yl(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){zk.superApply(this,"remove",arguments),xl(this,"_dispatchZoomAction")},dispose:function(){zk.superApply(this,"dispose",arguments),xl(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new jx;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()},r=this._orient===kk?{right:n.width-i.x-i.width,top:n.height-Dk-Tk,width:i.width,height:Dk}:{right:Tk,top:i.y,width:Dk,height:i.height},a=ts(t.option);f(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=r[t])});var o=$o(a,n,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===Pk&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==kk||r?i===kk&&r?{scale:o?[-1,1]:[-1,-1]}:i!==Pk||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[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 wk({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new wk({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:y(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=r){var a=n.getDataExtent(r),o=.3*(a[1]-a[0]);a=[a[0]-o,a[1]+o];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([r],function(t,e){if(g>0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:Mk(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 v=this.dataZoomModel;this._displayables.barGroup.add(new mw({shape:{points:c},style:s({fill:v.get("dataBackgroundColor")},v.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new yw({shape:{points:d},style:v.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(r,a){var o=t.getAxisProxy(r.name,a).getTargetSeriesModels();f(o,function(t){if(!(i||e!==!0&&u(Ok,t.get("type"))<0)){var o,s=n.getComponent(r.axis,a).axis,l=zv(r.name),h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(o=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:r.name,otherDim:l,otherAxisInverse:o}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,a=this.dataZoomModel;n.add(t.filler=new wk({draggable:!0,cursor:Ev(this._orient),drift:Ik(this._onDragMove,this,"all"),ondragstart:Ik(this._showDataInfo,this,!0),ondragend:Ik(this._onDragEnd,this),onmouseover:Ik(this._showDataInfo,this,!0),onmouseout:Ik(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new wk({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:Ck,fill:"rgba(0,0,0,0)"}})),Ak([0,1],function(t){var r=uo(a.get("handleIcon"),{cursor:Ev(this._orient),draggable:!0,drift:Ik(this._onDragMove,this,t),ondragend:Ik(this._onDragEnd,this),onmouseover:Ik(this._showDataInfo,this,!0),onmouseout:Ik(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=r.getBoundingRect();this._handleHeight=Mo(a.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=a.textStyleModel;this.group.add(i[t]=new uw({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=[Mk(t[0],[0,100],e,!0),Mk(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];rC(e,n,r,i.get("zoomLock")?"all":t,null!=a.minSpan?Mk(a.minSpan,o,r,!0):null,null!=a.maxSpan?Mk(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=Sk([Mk(n[0],r,o,!0),Mk(n[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=Sk(i.slice()),r=this._size;Ak([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],r[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=no(n.handles[t].parent,this.group),i=ao(0===t?"right":"left",e),s=this._handleWidth/2+Lk,l=ro([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===kk?"middle":i,textAlign:a===kk?i:"center",text:o[t]})}var i=this.dataZoomModel,n=this._displayables,r=n.handleLabels,a=this._orient,o=["",""];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();o=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=Sk(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");(null==r||"auto"===r)&&(r=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return b(n)?n(t,a):w(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,n){this._dragging=!0,lx(n.event);var r=this._displayables.barGroup.getLocalTransform(),a=ro([e,i],r,!0),o=this._updateInterval(t,a[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&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,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);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(Ak(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}});wu({getTargetSeries:function(t){var e=N();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var r=n.getAxisProxy(t.name,i);f(r.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.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),Su("dataZoom",function(t,e){var i=Tv(y(e.eachComponent,e,"dataZoom"),pk,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),_k.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}}),c(Bv,ex);var Ek="\x00_ec_dataZoom_roams",Bk=y,Rk=bk.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){Rk.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var r=p(e,function(t){return Uv(t.model)});f(e,function(e){var a=e.model,o={};f(["pan","zoom","scrollMove"],function(t){o[t]=Bk(Nk[t],this,e,n)},this),Xv(i,{coordId:Uv(a),allCoordIds:r,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:o})},this)},this)},dispose:function(){Yv(this.api,this.dataZoomModel.id),Rk.superApply(this,"dispose",arguments),this._range=null}}),Nk={zoom:function(t,e,i,n){var r=this._range,a=r.slice(),o=t.axisModels[0];if(o){var s=Vk[e](null,[n.originX,n.originY],o,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return rC(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}},pan:Jv(function(t,e,i,n,r,a){var o=Vk[n]([a.oldX,a.oldY],[a.newX,a.newY],e,r,i);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:Jv(function(t,e,i,n,r,a){var o=Vk[n]([0,0],[a.scrollDelta,a.scrollDelta],e,r,i);return o.signal*(t[1]-t[0])*a.scrollDelta})},Vk={grid:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,i,n,r){var a=i.axis,o={},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"===i.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,i,n,r){var a=i.axis,o=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},Fk=["rect","polygon","keep","clear"],Gk=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var r=t&&t.toolbox;_(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var a=r.feature||(r.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),tm(s),e&&!s.length&&s.push.apply(s,Fk)}},Hk=f,Wk=M,Zk=-1,Xk=function(t){var e=t.mappingMethod,i=t.type,r=this.option=n(t);this.type=i,this.mappingMethod=e,this._normalizeData=Uk[e];var a=Yk[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(nm(r),em(r)):"category"===e?r.categories?im(r):nm(r,!0):(O("linear"!==e||r.dataExtent),nm(r))};Xk.prototype={constructor:Xk,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return y(this._normalizeData,this)}};var Yk=Xk.visualHandlers={color:{applyVisual:om("color"),getColorMapper:function(){var t=this.option;return y("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),sm.call(this,t)}:function(e,i,n){var r=!!n;return!i&&(e=this._normalizeData(e)),n=ai(e,t.parsedVisual,n),r?n:ui(n,"rgba")},this)},_doMap:{linear:function(t){return ui(ai(t,this.option.parsedVisual),"rgba")},category:sm,piecewise:function(t,e){var i=hm.call(this,e);return null==i&&(i=ui(ai(t,this.option.parsedVisual),"rgba")),i},fixed:lm}},colorHue:rm(function(t,e){return si(t,e)}),colorSaturation:rm(function(t,e){return si(t,null,e)}),colorLightness:rm(function(t,e){return si(t,null,null,e)}),colorAlpha:rm(function(t,e){return li(t,e)}),opacity:{applyVisual:om("opacity"),_doMap:um([0,1])},liftZ:{applyVisual:om("liftZ"),_doMap:{linear:lm,category:lm,piecewise:lm,fixed:lm}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(w(n))i("symbol",n);else if(Wk(n))for(var r in n)n.hasOwnProperty(r)&&i(r,n[r])},_doMap:{linear:am,category:sm,piecewise:function(t,e){var i=hm.call(this,e);return null==i&&(i=am.call(this,t)),i},fixed:lm}},symbolSize:{applyVisual:om("symbolSize"),_doMap:um([0,1])}},Uk={linear:function(t){return wo(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=Xk.findPieceIndex(t,e,!0);return null!=i?wo(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?Zk:e},fixed:F};Xk.listVisualTypes=function(){var t=[];return f(Yk,function(e,i){t.push(i)}),t},Xk.addVisualHandler=function(t,e){Yk[t]=e},Xk.isValidType=function(t){return Yk.hasOwnProperty(t)},Xk.eachVisual=function(t,e,i){M(t)?f(t,e,i):e.call(i,t)},Xk.mapVisual=function(t,e,i){var n,r=_(t)?[]:M(t)?{}:(n=!0,null);return Xk.eachVisual(t,function(t,a){var o=e.call(i,t,a);n?r=o:r[a]=o}),r},Xk.retrieveVisuals=function(t){var e,i={};return t&&Hk(Yk,function(n,r){t.hasOwnProperty(r)&&(i[r]=t[r],e=!0)}),e?i:null},Xk.prepareVisualTypes=function(t){if(Wk(t)){var e=[];Hk(t,function(t,i){e.push(i)}),t=e}else{if(!_(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},Xk.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},Xk.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);a>n&&(a=n,r=i)}for(var r,a=1/0,o=0,s=e.length;s>o;o++){var l=e[o].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return o;i&&n(l,o)}}for(var o=0,s=e.length;s>o;o++){var u=e[o],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(dm(c[1],t,h[1]))return o}else if(1/0===h[1]){if(dm(c[0],h[0],t))return o}else if(dm(c[0],h[0],t)&&dm(c[1],t,h[1]))return o;i&&n(h[0],o),i&&n(h[1],o)}}return i?1/0===t?e.length-1:t===-1/0?0:r:void 0};var jk=f,qk={lineX:ym(0),lineY:ym(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])&&tc(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var r=t.x,a=t.y,o=t.width,s=t.height,l=n[0];return tc(n,r,a)||tc(n,r+o,a)||tc(n,r,a+s)||tc(n,r+o,a+s)||Ai.create(t).contain(l[0],l[1])||ho(r,a,r+o,a,n)||ho(r,a,r,a+s,n)||ho(r+o,a,r+o,a+s,n)||ho(r,a+s,r+o,a+s,n)?!0:void 0}}},Kk=f,$k=u,Qk=x,Jk=["dataToPoint","pointToData"],tP=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],eP=_m.prototype;eP.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=aP[t.brushType](0,i,e);t.__rangeOffset={offset:oP[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},eP.matchOutputRanges=function(t,e,i){Kk(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var r=aP[t.brushType](1,n,t.range);i(t,r.values,n,e)})},this)},eP.setInputRanges=function(t,e){Kk(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=aP[t.brushType](0,i.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?oP[t.brushType](n.values,r.offset,Im(n.xyMinMax,r.xyMinMax)):n.values}},this)},eP.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Qf(n),isTargetByCursor:tp(n,t,i.coordSysModel),getLinearBrushOtherExtent:Jf(n)}})},eP.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&$k(n.coordSyses,e.coordinateSystem)>=0},eP.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=wm(e,t),r=0;r<i.length;r++){var a=i[r],o=t.panelId;if(o){if(a.panelId===o)return a}else for(var r=0;r<nP.length;r++)if(nP[r](n,a))return a}return!0};var iP={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,r=t.gridModels,a=N(),o={},s={};(i||n||r)&&(Kk(i,function(t){var e=t.axis.grid.model;a.set(e.id,e),o[e.id]=!0}),Kk(n,function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0}),Kk(r,function(t){a.set(t.id,t),o[t.id]=!0,s[t.id]=!0}),a.each(function(t){var r=t.coordinateSystem,a=[];Kk(r.getCartesians(),function(t){($k(i,t.getAxis("x").model)>=0||$k(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:rP.grid,xAxisDeclared:o[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){Kk(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:rP.geo})})}},nP=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,r=t.gridModel;return!r&&i&&(r=i.axis.grid.model),!r&&n&&(r=n.axis.grid.model),r&&r===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],rP={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(no(t)),e}},aP={lineX:Qk(Mm,0),lineY:Qk(Mm,1),rect:function(t,e,i){var n=e[Jk[t]]([i[0][0],i[1][0]]),r=e[Jk[t]]([i[0][1],i[1][1]]),a=[bm([n[0],r[0]]),bm([n[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],r=p(i,function(i){var r=e[Jk[t]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r});return{values:r,xyMinMax:n}}},oP={lineX:Qk(Sm,0),lineY:Qk(Sm,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 p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},sP=["inBrush","outOfBrush"],lP="__ecBrushSelect",uP="__ecInBrushSelectEvent",hP=lI.VISUAL.BRUSH;Tu(hP,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),Tm(t)}),Cu(hP,function(t,e,i){var r,a,o=[];t.eachComponent({mainType:"brush"},function(e,i){function l(t){return"all"===v||m[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;b|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,r){var a=Pm(i);if(a&&!Lm(e,n)&&(f(w,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&r.push(n),b|=u(r)}),l(n)&&u(r))){var o=i.getData();o.each(function(t){km(a,r,o,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:i,brushName:e.name,areas:n(e.areas),selected:[]};o.push(d);var g=e.option,v=g.brushLink,m=[],y=[],x=[],b=0;i||(r=g.throttleType,a=g.throttleDelay);var w=p(e.areas,function(t){return Om(s({boundingRect:cP[t.brushType](t)},t))}),M=pm(e.option,sP,function(t){t.mappingMethod="fixed"});_(v)&&f(v,function(t){m[t]=1}),t.eachSeries(function(t,e){var i=x[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};
+d.selected.push(i);var n=Pm(t),r=x[e],a=t.getData(),o=l(e)?function(t){return y[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return km(n,r,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?b:u(r))&&vm(sP,M,a,o)})}),Cm(e,r,a,o,i)});{var cP={lineX:F,lineY:F,rect:function(t){return zm(t.range)},polygon:function(t){for(var e,i=t.range,n=0,r=i.length;r>n;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&&zm(e)}},dP=["#ddd"];Pu({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&&gm(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:dP},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return Em(this.option,t)},this))},setBrushOption:function(t){this.brushOption=Em(this.option,t),this.brushType=this.brushOption.brushType}})}Lu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ff(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,Bm.apply(this,arguments)},updateTransform:function(t,e){return Tm(e),Bm.apply(this,arguments)},updateView:Bm,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n(t),$from:i})}}),Su({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Su({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),Su({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var fP={},pP=vS.toolbox.brush;Vm.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:n(pP.title)};var gP=Vm.prototype;gP.render=gP.updateView=function(t,e){var i,n,r;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,n=t.brushOption.brushMode||"single",r|=t.areas.length}),this._brushType=i,this._brushMode=n,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===n:"clear"===e?r:e===i)?"emphasis":"normal")})},gP.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},gP.onclick=function(t,e,i){var n=this._brushType,r=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?!1:i,brushMode:"keep"===i?"multiple"===r?"single":"multiple":r}})},Rm("brush",Vm),bu(Gk);var vP=f,mP=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),vP(e,function(t){if(t){Fm(t,"splitList")&&!Fm(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&vP(e,function(t){M(t)&&(Fm(t,"start")&&!Fm(t,"min")&&(t.min=t.start),Fm(t,"end")&&!Fm(t,"max")&&(t.max=t.end))})}})};mM.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var yP=lI.VISUAL.COMPONENT;Cu(yP,{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(mm(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Cu(yP,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var r=e.getVisualMeta(y(Gm,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),o=i.getDimensionInfo(a);null!=o&&(r.dimension=o.index,n.push(r))}}),t.getData().setVisual("visualMeta",n)}});var xP={get:function(t,e,i){var r=n((_P[t]||{})[e]);return i&&_(r)?r[r.length-1]:r}},_P={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]}},bP=Xk.mapVisual,wP=Xk.eachVisual,MP=_,SP=f,IP=Io,AP=wo,TP=F,CP=Pu({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;Oy.canvasSupported||(i.realtime=!1),!e&&gm(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=pm(this.option.controller,e,t),this.targetVisuals=pm(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=tr(t),e},eachTargetSeries:function(t,e){f(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 r,a,o=this.option,s=o.precision,l=this.dataBound,u=o.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),r=!0),a=e?t:r?[n(t[0]),n(t[1])]:n(t),w(u)?u.replace("{value}",r?a[0]:a).replace("{value2}",r?a[1]:a):b(u)?r?u(t[0],t[1]):u(t):r?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=IP([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,r=n.length-1;r>=0;r--){var a=n[r],o=t.getDimensionInfo(a);if(!o.isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){MP(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:a.get("gradientColor")},SP(this.stateList,function(e){var i=t[e];if(w(i)){var n=xP.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},SP(n,function(t,e){if(Xk.isValidType(e)){var i=xP.get(e,"inactive",h);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");SP(this.stateList,function(a){var o=this.itemSize,s=t[a];s||(s=t[a]={color:h?r:[r]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?o[0]:[o[0],o[0]])),s.symbol=bP(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;wP(l,function(t){t>u&&(u=t)}),s.symbolSize=bP(l,function(t){return AP(t,[0,u],[0,o[0]],!0)})}},this)}var a=this.ecModel,o=this.option,s={inRange:o.inRange,outOfRange:o.outOfRange},l=o.target||(o.target={}),u=o.controller||(o.controller={});r(l,s),r(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:TP,getValueState:TP,getVisualMeta:TP}),DP=[20,140],kP=CP.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(){kP.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){kP.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=DP[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=DP[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(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(){CP.prototype.completeVisualOption.apply(this,arguments),f(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=Io((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=[],r=i.getData();r.each(this.getDataDimension(r),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){r.push({value:e,color:t(e,i)})}for(var i=Hm(this,"outOfRange",this.getExtent()),n=Hm(this,"inRange",this.option.range.slice()),r=[],a=0,o=0,s=n.length,l=i.length;l>o&&(!n.length||i[o]<=n[0]);o++)i[o]<n[a]&&e(i[o],"outOfRange");for(var u=1;s>a;a++,u=0)u&&r.length&&e(n[a],"outOfRange"),e(n[a],"inRange");for(var u=1;l>o;o++)(!n.length||n[n.length-1]<i[o])&&(u&&(r.length&&e(r[r.length-1].value,"outOfRange"),u=0),e(i[o],"outOfRange"));var h=r.length;return{stops:r,outerColors:[h?r[0].color:"transparent",h?r[h-1].color:"transparent"]}}}),PP=Lu({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){return this.visualMapModel=t,t.get("show")===!1?void this.group.removeAll():void this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,i=rM(e.get("padding")||0),n=t.getBoundingRect();t.add(new bw({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 r(t,e){s[t]=e}i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if("symbol"===e&&(s.symbol=o.get("itemSymbol")),"color"===e){var l=o.get("contentColor");s.color=l}var u=o.controllerVisuals[a||o.getValueState(t)],h=Xk.prepareVisualTypes(u);return f(h,function(a){var o=u[a];i.convertOpacityToAlpha&&"opacity"===a&&(a="colorAlpha",o=u.__alphaForOpacity),Xk.dependsOn(a,e)&&o&&o.applyVisual(t,n,r)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;Qo(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:F}),LP=wo,OP=f,zP=Math.min,EP=Math.max,BP=12,RP=6,NP=PP.extend({type:"visualMap.continuous",init:function(){NP.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 r=this.visualMapModel,a=r.get("textGap"),o=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===i?-a:o[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new uw({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,r=this._orient,a=this._useHandle,o=Wm(e,this.api,n),s=i.barGroup=this._createBarGroup(o);s.add(i.outOfRange=Xm()),s.add(i.inRange=Xm(null,a?Km(this._orient):null,y(this._dragHandle,this,"all",!1),y(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("鍥�"),u=EP(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,r,o),this._createHandle(s,1,n,u,r,o)),this._createIndicator(s,n,u,r),t.add(s)},_createHandle:function(t,e,i,n,r){var a=y(this._dragHandle,this,e,!1),o=y(this._dragHandle,this,e,!0),s=Xm(Ym(e,n),Km(this._orient),a,o);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new uw({draggable:!0,drift:a,onmousemove:function(t){lx(t.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===r?n/2:1.5*n,"horizontal"===r?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 r=Xm([[0,0]],"move");r.position[0]=e[0],r.attr({invisible:!0,silent:!0}),t.add(r);var a=this.visualMapModel.textStyleModel,o=new uw({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(o);var s=["horizontal"===n?i/2:RP+3,0],l=this._shapes;l.indicator=r,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,r[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():qm(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=[LP(e[0],i,n,!0),LP(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,r=[0,i.itemSize[1]];rC(e,n,r,t,0);var a=i.getExtent();this._dataInterval=[LP(n[0],r,a,!0),LP(n[1],r,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,r=[0,e.itemSize[1]],a=t?r:this._handleEnds,o=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,r,"outOfRange");n.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,o)},_createBarVisual:function(t,e,i,n){var r={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,r),o=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(i,o);return{barColor:new Dw(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=100,n=[],r=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var a=1;i>a;a++){var o=t[0]+r*a;if(o>t[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:a/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_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 jx("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,r=i.handleThumbs,a=i.handleLabels;OP([0,1],function(o){var s=r[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=ro(i.handleLabelPoints[o],no(s,this.group));a[o].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,a=r.getExtent(),o=r.itemSize,s=[0,o[1]],l=LP(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",Um(!!i,n,l,o[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=ro(u.indicatorLabelPoint,no(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),v=this._orient;p.setStyle({text:(i?i:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===v?g:"middle",textAlign:"horizontal"===v?"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]=zP(EP(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 r=[0,n[1]],a=i.getExtent();t=zP(EP(r[0],t),r[1]);var o=jm(i,a,r),s=[t-o,t+o],l=LP(t,r,a,!0),u=[LP(s[0],r,a,!0),LP(s[1],r,a,!0)];s[0]<r[0]&&(u[0]=-1/0),s[1]>r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):1/0===u[1]?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"鈮� ",o));var h=this._hoverLinkDataIndices,c=[];(e||qm(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=lr(h,c);this._dispatchHighDown("downplay",Zm(d[0],i)),this._dispatchHighDown("highlight",Zm(d[1],i))}},_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 r=n.getData(e.dataType),a=r.get(i.getDataDimension(r),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",Zm(t,this.visualMapModel)),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 r=no(e,n?null:this.group);return Yw[_(t)?"applyTransform":"transformDirection"](t,r,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()}}),VP={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Su(VP,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),bu(mP);{var FP=CP.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){FP.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();GP[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(M(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=Xk.listVisualTypes(),r=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var a=0;f(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=xP.get(n,"inRange"===t?"active":"inactive",r)})},this),CP.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,r=(e?i:t).selected||{};if(i.selected=r,f(n,function(t){var e=this.getSelectedMapKey(t);r.hasOwnProperty(e)||(r[e]=!0)},this),"single"===i.selectedMode){var a=!1;f(n,function(t){var e=this.getSelectedMapKey(t);r[e]&&(a?r[e]=!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=n(t)},getValueState:function(t){var e=Xk.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=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){var r=Xk.findPieceIndex(e,this._pieceList);r===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&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var o=r.getRepresentValue({interval:e});a||(a=r.getValueState(o));var s=t(o,a);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],r=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],1/0!==o&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return f(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}}}}),GP={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var a=(n[1]-n[0])/r;+a.toFixed(i)!==a&&5>i;)i++;t.precision=i,a=+a.toFixed(i);var o=0;t.minOpen&&e.push({index:o++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=o+r;l>o;s+=a){var u=o===r-1?n[1]:s+a;e.push({index:o++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:o++,interval:[n[1],1/0],close:[0,0]}),Ro(e),f(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),$m(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){M(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var r=n.value=t.value;n.interval=[r,r],n.close=[1,1]}else{for(var a=n.interval=[],o=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==a[h];d++)a[h]=t[c[d]],o[h]=s[d],u[h]=2===d;null==a[h]&&(a[h]=l[h])}u[0]&&1/0===a[1]&&(o[0]=0),u[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(n.value=a[0])}n.visual=Xk.retrieveVisuals(t),e.push(n)},this),$m(t,e),Ro(e),f(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)}};PP.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var r=t.piece,u=new jx;u.onclick=y(this._onItemClick,this,r),this._enableHoverLink(u,t.indexInModelPieceList);var h=i.getRepresentValue(r);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new uw({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:r.text,textVerticalAlign:"middle",textAlign:s,textFont:a,textFill:o,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),r=i.textStyleModel,a=r.getFont(),o=r.getTextColor(),s=this._getItemAlign(),l=i.itemSize,u=this._getViewData(),h=u.endsText,c=C(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),pM(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:Zm(i.findTargetDataIndices(e),i)})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Wm(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,r){if(e){var a=new jx,o=this.visualMapModel.textStyleModel;a.add(new uw({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),r=t.get("inverse");return("horizontal"===n?r:!r)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(qh(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,r=n(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(r[a]=!0,f(r,function(t,e){r[e]=e===a})):r[a]=!r[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}})}bu(mP);var HP=Pu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){HP.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=Nm(e);i&&r(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"}},tooltip:{show:!1}}});Lu({type:"toolbox",render:function(t,e,i,n){function r(r,o){var s,l=c[r],d=c[o],f=u[l],p=new go(f,t,t.ecModel);if(n&&null!=n.newTitle&&(f.title=n.newTitle),l&&!d){if(Qm(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=Nm(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(a(p,s,l),p.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)},void(s.render&&s.render(p,e,i,n)))}function a(n,r,a){var u=n.getModel("iconStyle"),h=n.getModel("emphasis.iconStyle"),c=r.getIcons?r.getIcons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[a]=p,d[a]=g}var v=n.iconPaths={};f(c,function(a,c){var f=uo(a,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle(),f.setStyle({text:d[c],textAlign:h.get("textAlign"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding"),textFill:null});var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",o({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Va(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var e=h.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({textFill:h.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:h.get("textBackgroundColor"),textPosition:h.get("textPosition")||i})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(n.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(r.onclick,r,e,i,c)),v[c]=f})}var s=this.group;
+if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new Vu(this._featureNames||[],c).add(r).update(r).remove(x(r,null)).execute(),this._featureNames=c,yg(s,t,i),s.add(xg(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=Xi(e,sn(n)),a=t.position[0]+s.position[0],o=t.position[1]+s.position[1]+l,u=!1;o+r.height>i.getHeight()&&(n.textPosition="top",u=!0);var h=u?-5-r.height:l+8;a+r.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):a-r.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var WP=vS.toolbox.saveAsImage;Jm.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:WP.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:WP.lang.slice()},Jm.prototype.unusable=!Oy.canvasSupported;var ZP=Jm.prototype;ZP.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=i.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||Oy.browser.ie||Oy.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(a.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+r)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>',d=window.open();d.document.write(c)}else{var f=document.createElement("a");f.download=n+"."+r,f.target="_blank",f.href=a;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},Rm("saveAsImage",Jm);var XP=vS.toolbox.magicType,YP="__ec_magicType_stack__";ty.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"},title:n(XP.title),option:{},seriesIndex:{}};var UP=ty.prototype;UP.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var jP={line:function(t,e,i,n){return"bar"===t?r({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?r({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){var a=i.get("stack")===YP;return"line"===t||"bar"===t?(n.setIconStatus("stack",a?"normal":"emphasis"),r({id:e,stack:a?"":YP},n.get("option.stack")||{},!0)):void 0}},qP=[["line","bar"],["stack"]];UP.onclick=function(t,e,i){var a=this.model,o=a.get("seriesIndex."+i);if(jP[i]){var l={series:[]},h=function(e){var n=e.subType,r=e.id,o=jP[i](n,r,e,a);o&&(s(o,e.option),l.series.push(o));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,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;l[d]=l[d]||[];for(var g=0;p>=g;g++)l[d][p]=l[d][p]||{};l[d][p].boundaryGap="bar"===i}}};f(qP,function(t){u(t,i)>=0&&f(t,function(t){a.setIconStatus(t,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},h);var c;if("stack"===i){var d=l.series&&l.series[0]&&l.series[0].stack===YP;c=d?r({stack:XP.title.tiled},XP.title):n(XP.title)}e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:c})}},Su({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Rm("magicType",ty);var KP=vS.toolbox.dataView,$P=new Array(60).join("-"),QP="    ",JP=new RegExp("["+QP+"]+","g");hy.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:n(KP.title),lang:n(KP.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},hy.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),r=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=r.get("backgroundColor")||"#fff";var o=document.createElement("h4"),s=r.get("lang")||[];o.innerHTML=s[0]||r.get("title"),o.style.cssText="margin: 10px 20px;",o.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=r.get("optionToContent"),c=r.get("contentToOption"),d=ry(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:A(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=r.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textColor"),u.style.borderColor=r.get("textareaBorderColor"),u.style.backgroundColor=r.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 v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),y=document.createElement("div");v+=";background-color:"+r.get("buttonColor"),v+=";color:"+r.get("buttonTextColor");var x=this;Me(m,"click",i),Me(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):uy(u.value,p)}catch(n){throw i(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),m.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=v,m.style.cssText=v,!r.get("readOnly")&&g.appendChild(y),g.appendChild(m),a.appendChild(o),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},hy.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},hy.prototype.dispose=function(t,e){this.remove(t,e)},Rm("dataView",hy),Su({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];f(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var r=n.get("data");i.push({name:t.name,data:cy(t.data,r)})}else i.push(o({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var tL=f,eL="\x00_ec_hist_store";_k.extend({type:"dataZoom.select"}),bk.extend({type:"dataZoom.select"});var iL=vS.toolbox.dataZoom,nL=f,rL="\x00_ec_\x00toolbox-dataZoom_";my.defaultOption={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:n(iL.title)};var aL=my.prototype;aL.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,_y(t,e,this,n,i),xy(t,e)},aL.onclick=function(t,e,i){oL[i].call(this)},aL.remove=function(){this._brushController.unmount()},aL.dispose=function(){this._brushController.dispose()};var oL={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(fy(this.ecModel))}};aL._onBrush=function(t,e){function i(t,e,i){var o=e.getAxis(t),s=o.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=rC(0,i.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(r[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){var r=i.getAxisModel(t,e.componentIndex);r&&(n=i)}),n}if(e.isEnd&&t.length){var r={},a=this.ecModel;this._brushController.updateCovers([]);var o=new _m(yy(this.model.option),a,{include:["grid"]});o.matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var r=t.brushType;"rect"===r?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[r],n,e)}}),dy(a,r),this._dispatchZoomAction(r)}},aL._dispatchZoomAction=function(t){var e=[];nL(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Rm("dataZoom",my),bu(function(t){function e(t,e){if(e){var r=t+"Index",a=e[r];null==a||"all"===a||_(a)||(a=a===!1||"none"===a?[]:[a]),i(t,function(i,o){if(null==a||"all"===a||-1!==u(a,o)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:rL+t+o};s[r]=o,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),nL(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);_(n)||(t.dataZoom=n=[n]);var r=t.toolbox;if(r&&(_(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var sL=vS.toolbox.restore;by.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:sL.title};var lL=by.prototype;lL.onclick=function(t,e){py(t),e.dispatchAction({type:"restore",from:this.uid})},Rm("restore",by),Su({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var uL={path:null,compoundPath:null,group:jx,image:Cn,text:uw};bu(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var hL=Pu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,hL.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,r=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var o=rr(r,a);ar(o);var s=this._elOptionsToUpdate=[];f(o,function(t,e){var i=t.option;i&&(s.push(i),Ay(t,i),Ty(r,e,i),Cy(r[e],i))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,e,i){f(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}});Lu({type:"graphic",init:function(){this._elMap=N(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(e){var r=e.$action,a=e.id,o=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=Sy(e);r&&"merge"!==r?"replace"===r?(My(o,i),wy(a,l,h,i)):"remove"===r&&My(o,i):o?o.attr(h):wy(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Dy(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,r=this._elMap,a=e.getWidth(),o=e.getHeight(),s=0;s<i.length;s++){var l=i[s],u=r.get(l.id);if(u&&u.isGroup){var h=u.parent,c=h===n;u.__ecGraphicWidth=Mo(u.__ecGraphicWidthOption,c?a:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=Mo(u.__ecGraphicHeightOption,c?o:h.__ecGraphicHeight)||0}}for(var s=i.length-1;s>=0;s--){var l=i[s],u=r.get(l.id);if(u){var h=u.parent,d=h===n?{width:a,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Qo(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){My(e,t)}),this._elMap=N()},dispose:function(){this._clear()}}),t.version=jS,t.dependencies=qS,t.PRIORITY=lI,t.init=pu,t.connect=gu,t.disConnect=vu,t.disconnect=CI,t.dispose=mu,t.getInstanceByDom=yu,t.getInstanceById=xu,t.registerTheme=_u,t.registerPreprocessor=bu,t.registerProcessor=wu,t.registerPostUpdate=Mu,t.registerAction=Su,t.registerCoordinateSystem=Iu,t.getCoordinateSystemDimensions=Au,t.registerLayout=Tu,t.registerVisual=Cu,t.registerLoading=ku,t.extendComponentModel=Pu,t.extendComponentView=Lu,t.extendSeriesModel=Ou,t.extendChartView=zu,t.setCanvasCreator=Eu,t.registerMap=Bu,t.getMap=Ru,t.dataTool=DI,t.zrender=Y_,t.number=nM,t.format=hM,t.throttle=ml,t.helper=PA,t.matrix=gx,t.vector=Jy,t.color=Ex,t.parseGeoJSON=OA,t.parseGeoJson=RA,t.util=NA,t.graphic=VA,t.List=GI,t.Model=go,t.Axis=BA,t.env=Oy});
\ No newline at end of file
diff --git a/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min.js b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min.js
new file mode 100644
index 0000000..2e28b76
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/js/plugins/echarts/echarts.min.js
@@ -0,0 +1,17 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),a&&(n.edge=!0,n.version=a[1]),o&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document}}function n(t,e){"createCanvas"===t&&(km=null),Am[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=bm.call(t);if("[object Array]"===n){if(!R(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}else if(xm[n]){if(!R(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}}else if(!_m[n]&&!R(t)&&!C(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function r(t,e,n){if(!S(e)||!S(t))return n?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!S(s)||!S(o)||x(s)||x(o)||C(s)||C(o)||M(s)||M(o)||R(s)||R(o)?!n&&a in t||(t[a]=i(e[a],!0)):r(o,s,n)}return t}function a(t,e){for(var n=t[0],i=1,a=t.length;a>i;i++)n=r(n,t[i],e);return n}function o(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function s(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function l(){return km||(km=Dm().getContext("2d")),km}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1}function h(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superClass=e}function c(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,n)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Sm)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;r>i;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function p(t,e,n){if(t&&e){if(t.map&&t.map===Cm)return t.map(e,n);for(var i=[],r=0,a=t.length;a>r;r++)i.push(e.call(n,t[r],r,t));return i}}function g(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===Tm)return t.reduce(e,n,i);for(var r=0,a=t.length;a>r;r++)n=e.call(i,n,t[r],r,t);return n}}function v(t,e,n){if(t&&e){if(t.filter&&t.filter===Mm)return t.filter(e,n);for(var i=[],r=0,a=t.length;a>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function m(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function y(t,e){var n=Im.call(arguments,2);return function(){return t.apply(e,n.concat(Im.call(arguments)))}}function _(t){var e=Im.call(arguments,1);return function(){return t.apply(this,e.concat(Im.call(arguments)))}}function x(t){return"[object Array]"===bm.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object String]"===bm.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!_m[bm.call(t)]}function I(t){return!!xm[bm.call(t)]}function C(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function T(t){return t!==t}function A(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function k(t,e,n){return null!=t?t:null!=e?e:n}function P(){return Function.call.apply(Im,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function z(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[Pm]=!0}function R(t){return t[Pm]}function B(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=x(t);this.data={};var i=this;t instanceof B?t.each(e):t&&f(t,e)}function N(t){return new B(t)}function V(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n}function F(){}function H(t,e){var n=new Om(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function G(t,e){return t[0]=e[0],t[1]=e[1],t}function W(t){var e=new Om(2);return e[0]=t[0],e[1]=t[1],e}function U(t,e,n){return t[0]=e,t[1]=n,t}function Z(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function X(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function Y(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function j(t){return Math.sqrt(q(t))}function q(t){return t[0]*t[0]+t[1]*t[1]}function K(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function $(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Q(t,e){return t[0]*e[0]+t[1]*e[1]}function J(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function te(t,e){var n=j(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function ee(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ne(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function ie(t,e){return t[0]=-e[0],t[1]=-e[1],t}function re(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function ae(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function oe(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function se(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function le(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function ue(t,e){return{target:t,topTarget:e&&e.topTarget}}function he(t,e){var n=t._$eventProcessor;return null!=e&&n&&n.normalizeQuery&&(e=n.normalizeQuery(e)),e}function ce(t,e,n,i,r,a){var o=t._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!e)return t;n=he(t,n),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===i)return t;var l={h:i,one:a,query:n,ctx:r||t,callAtLast:i.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}function de(t,e,n,i,r,a){var o=i+"-"+r,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/Hm);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,d=0,f=0;s>d;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[n][d]*de(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}function fe(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=de(n,8,0,0,0,i);if(0!==r){for(var a=[],o=0;8>o;o++)for(var s=0;8>s;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*de(n,7,0===o?1:0,1<<o,1<<s,i)/r*e[o];return function(t,e,n){var i=e*a[6]+n*a[7]+1;t[0]=(e*a[0]+n*a[1]+a[2])/i,t[1]=(e*a[3]+n*a[4]+a[5])/i}}}function pe(t,e,n,i){return n=n||{},i||!ym.canvasSupported?ge(t,e,n):ym.browser.firefox&&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):ge(t,e,n),n}function ge(t,e,n){if(t.getBoundingClientRect&&ym.domSupported){var i=e.clientX,r=e.clientY;if("CANVAS"===t.nodeName.toUpperCase()){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}var o=t[Um]||(t[Um]={}),s=me(ve(t,o),o);if(s)return s(Zm,i,r),n.zrX=Zm[0],void(n.zrY=Zm[1])}n.zrX=n.zrY=0}function ve(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],a=0;4>a;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),n.push(o)}return n}function me(t,e){for(var n=e.transformer,i=e.srcCoords,r=!0,a=[],o=[],s=0;4>s;s++){var l=t[s].getBoundingClientRect(),u=2*s,h=l.left,c=l.top;a.push(h,c),r&=i&&h===i[u]&&c===i[u+1],o.push(t[s].offsetLeft,t[s].offsetTop)}return r?n:(e.srcCoords=a,e.transformer=fe(a,o))}function ye(t,e,n){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var a="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];a&&pe(t,a,e,n)}else pe(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&Wm.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function _e(t,e,n){Gm?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function xe(t,e,n){Gm?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function be(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function we(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Se(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:Me}}function Me(){Xm(this.event)}function Ie(){}function Ce(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return i?qm:!0}return!1}function Te(){var t=new Qm(6);return Ae(t),t}function Ae(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function De(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 ke(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=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]=a,t[3]=o,t[4]=s,t[5]=l,t}function Pe(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 Le(t,e,n){var i=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+o*u,t[1]=-i*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function Oe(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 ze(t,e){var n=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-o*r)*l,t[5]=(a*r-n*s)*l,t):null}function Ee(t){var e=Te();return De(e,t),e}function Re(t){return t>ey||-ey>t}function Be(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1: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 Ne(t){return t=Math.round(t),0>t?0:t>255?255:t}function Ve(t){return t=Math.round(t),0>t?0:t>360?360:t}function Fe(t){return 0>t?0:t>1?1:t}function He(t){return Ne(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ge(t){return Fe(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function We(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function Ue(t,e,n){return t+(e-t)*n}function Ze(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Xe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Ye(t,e){gy&&Xe(gy,e),gy=py.put(t,gy||e.slice())}function je(t,e){if(t){e=e||[];var n=py.get(t);if(n)return Xe(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in fy)return Xe(e,fy[i]),Ye(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),a=i.indexOf(")");if(-1!==r&&a+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void Ze(e,0,0,0,1);l=Ge(s.pop());case"rgb":return 3!==s.length?void Ze(e,0,0,0,1):(Ze(e,He(s[0]),He(s[1]),He(s[2]),l),Ye(t,e),e);case"hsla":return 4!==s.length?void Ze(e,0,0,0,1):(s[3]=Ge(s[3]),qe(s,e),Ye(t,e),e);case"hsl":return 3!==s.length?void Ze(e,0,0,0,1):(qe(s,e),Ye(t,e),e);default:return}}Ze(e,0,0,0,1)}else{if(4===i.length){var u=parseInt(i.substr(1),16);return u>=0&&4095>=u?(Ze(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Ye(t,e),e):void Ze(e,0,0,0,1)}if(7===i.length){var u=parseInt(i.substr(1),16);return u>=0&&16777215>=u?(Ze(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Ye(t,e),e):void Ze(e,0,0,0,1)}}}}function qe(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ge(t[1]),r=Ge(t[2]),a=.5>=r?r*(i+1):r+i-r*i,o=2*r-a;return e=e||[],Ze(e,Ne(255*We(o,a,n+1/3)),Ne(255*We(o,a,n)),Ne(255*We(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ke(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+o):l/(2-s-o);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function $e(t,e){var n=je(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return rn(n,4===n.length?"rgba":"rgb")}}function Qe(t){var e=je(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Je(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return n[0]=Ne(Ue(o[0],s[0],l)),n[1]=Ne(Ue(o[1],s[1],l)),n[2]=Ne(Ue(o[2],s[2],l)),n[3]=Fe(Ue(o[3],s[3],l)),n}}function tn(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=je(e[r]),s=je(e[a]),l=i-r,u=rn([Ne(Ue(o[0],s[0],l)),Ne(Ue(o[1],s[1],l)),Ne(Ue(o[2],s[2],l)),Fe(Ue(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function en(t,e,n,i){return t=je(t),t?(t=Ke(t),null!=e&&(t[0]=Ve(e)),null!=n&&(t[1]=Ge(n)),null!=i&&(t[2]=Ge(i)),rn(qe(t),"rgba")):void 0}function nn(t,e){return t=je(t),t&&null!=e?(t[3]=Fe(e),rn(t,"rgba")):void 0}function rn(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 an(t,e){return t[e]}function on(t,e,n){t[e]=n}function sn(t,e,n){return(e-t)*n+t}function ln(t,e,n){return n>.5?e:t}function un(t,e,n,i,r){var a=t.length;if(1===r)for(var o=0;a>o;o++)i[o]=sn(t[o],e[o],n);else for(var s=a&&t[0].length,o=0;a>o;o++)for(var l=0;s>l;l++)i[o][l]=sn(t[o][l],e[o][l],n)}function hn(t,e,n){var i=t.length,r=e.length;if(i!==r){var a=i>r;if(a)t.length=r;else for(var o=i;r>o;o++)t.push(1===n?e[o]:_y.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(1===n)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;s>l;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function cn(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;i>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;i>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function dn(t,e,n,i,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=fn(t[h],e[h],n[h],i[h],r,a,o);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=fn(t[h][d],e[h][d],n[h][d],i[h][d],r,a,o)}function fn(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function pn(t){if(d(t)){var e=t.length;if(d(t[0])){for(var n=[],i=0;e>i;i++)n.push(_y.call(t[i]));return n}return _y.call(t)}return t}function gn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function vn(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function mn(t,e,n,i,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h,c=i[0].value,f=d(c),p=!1,g=!1,v=f?vn(i):0;i.sort(function(t,e){return t.time-e.time}),h=i[u-1].time;for(var m=[],y=[],_=i[0].value,x=!0,b=0;u>b;b++){m.push(i[b].time/h);var w=i[b].value;if(f&&cn(w,_,v)||!f&&w===_||(x=!1),_=w,"string"==typeof w){var S=je(w);S?(w=S,p=!0):g=!0}y.push(w)}if(a||!x){for(var M=y[u-1],b=0;u-1>b;b++)f?hn(y[b],M,v):!isNaN(y[b])||isNaN(M)||g||p||(y[b]=M);f&&hn(o(t._target,r),M,v);var I,C,T,A,D,k,P=0,L=0;if(p)var O=[0,0,0,0];var z=function(t,e){var n;if(0>e)n=0;else if(L>e){for(I=Math.min(P+1,u-1),n=I;n>=0&&!(m[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=P;u>n&&!(m[n]>e);n++);n=Math.min(n-1,u-2)}P=n,L=e;var i=m[n+1]-m[n];if(0!==i)if(C=(e-m[n])/i,l)if(A=y[n],T=y[0===n?n:n-1],D=y[n>u-2?u-1:n+1],k=y[n>u-3?u-1:n+2],f)dn(T,A,D,k,C,C*C,C*C*C,o(t,r),v);else{var a;if(p)a=dn(T,A,D,k,C,C*C,C*C*C,O,1),a=gn(O);else{if(g)return ln(A,D,C);a=fn(T,A,D,k,C,C*C,C*C*C)}s(t,r,a)}else if(f)un(y[n],y[n+1],C,o(t,r),v);else{var a;if(p)un(y[n],y[n+1],C,O,1),a=gn(O);else{if(g)return ln(y[n],y[n+1],C);a=sn(y[n],y[n+1],C)}s(t,r,a)}},E=new Be({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:z,ondestroy:n});return e&&"spline"!==e&&(E.easing=e),E}}}function yn(t,e,n,i,r,a,o,s){function l(){h--,h||a&&a()}w(i)?(a=r,r=i,i=0):b(r)?(a=r,r="linear",i=0):b(i)?(a=i,i=0):b(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),_n(t,"",t,e,n,i,s);var u=t.animators.slice(),h=u.length;h||a&&a();for(var c=0;c<u.length;c++)u[c].done(l).start(r,o)}function _n(t,e,n,i,r,a,o){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?S(i[u])&&!d(i[u])?_n(t,e?e+"."+u:u,n[u],i[u],r,a,o):(o?(s[u]=n[u],xn(t,e,u,i[u])):s[u]=i[u],l++):null==i[u]||o||xn(t,e,u,i[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function xn(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function bn(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function wn(t){for(var e=0;t>=Ly;)e|=1&t,t>>=1;return t+e}function Sn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;Mn(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function Mn(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function In(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var a,o=t[i],s=e,l=i;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+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]=o}}function Cn(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){for(s=i-r;s>l&&a(t,e[n+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[n+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[n+h])>0?o=h+1:l=h}return l}function Tn(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;s>l&&a(t,e[n+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;s>l&&a(t,e[n+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[n+h])<0?l=h:o=h+1}return l}function An(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]<u[t+1]&&t--;else if(u[t]>u[t+1])break;a(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]<u[t+1]&&t--,a(t)}}function a(n){var i=l[n],r=u[n],a=l[n+1],h=u[n+1];u[n]=r+h,n===c-3&&(l[n+1]=l[n+2],u[n+1]=u[n+2]),c--;var d=Tn(t[a],t,i,r,0,e);i+=d,r-=d,0!==r&&(h=Cn(t[i+r-1],t,a,h,h-1,e),0!==h&&(h>=r?o(i,r,a,h):s(i,r,a,h)))}function o(n,i,r,a){var o=0;for(o=0;i>o;o++)d[o]=t[n+o];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--a){if(1===i){for(o=0;a>o;o++)t[u+o]=t[l+o];return void(t[u+a]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--a){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--i){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Tn(t[l],d,s,i,0,e),0!==c){for(o=0;c>o;o++)t[u+o]=d[s+o];if(u+=c,s+=c,i-=c,1>=i){p=!0;break}}if(t[u++]=t[l++],0===--a){p=!0;break}if(f=Cn(d[s],t,l,a,0,e),0!==f){for(o=0;f>o;o++)t[u+o]=t[l+o];if(u+=f,l+=f,a-=f,0===a){p=!0;break}}if(t[u++]=d[s++],1===--i){p=!0;break}g--}while(c>=Oy||f>=Oy);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(o=0;a>o;o++)t[u+o]=t[l+o];t[u+a]=d[s]}else{if(0===i)throw new Error;for(o=0;i>o;o++)t[u+o]=d[s+o]}}else for(o=0;i>o;o++)t[u+o]=d[s+o]}function s(n,i,r,a){var o=0;for(o=0;a>o;o++)d[o]=t[r+o];var s=n+i-1,l=a-1,u=r+a-1,c=0,f=0;if(t[u--]=t[s--],0!==--i){if(1===a){for(u-=i,s-=i,f=u+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--i){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--a){m=!0;break}while(p>(g|v));if(m)break;do{if(g=i-Tn(d[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,f=u+1,c=s+1,o=g-1;o>=0;o--)t[f+o]=t[c+o];if(0===i){m=!0;break}}if(t[u--]=d[l--],1===--a){m=!0;break}if(v=a-Cn(t[s],d,0,a,a-1,e),0!==v){for(u-=v,l-=v,a-=v,f=u+1,c=l+1,o=0;v>o;o++)t[f+o]=d[c+o];if(1>=a){m=!0;break}}if(t[u--]=t[s--],0===--i){m=!0;break}p--}while(g>=Oy||v>=Oy);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===a){for(u-=i,s-=i,f=u+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];t[u]=d[l]}else{if(0===a)throw new Error;for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}}else for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}var l,u,h=Oy,c=0,d=[];l=[],u=[],this.mergeRuns=i,this.forceMergeRuns=r,this.pushRun=n}function Dn(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var a=0;if(Ly>r)return a=Sn(t,n,i,e),void In(t,n,i,n+a,e);var o=new An(t,e),s=wn(r);do{if(a=Sn(t,n,i,e),s>a){var l=r;l>s&&(l=s),In(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}function kn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Pn(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(i,a,r,o);return s}function Ln(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*i+n.x,s=s*r+n.y,l*=a);var u=t.createRadialGradient(o,s,0,o,s,l);return u}function On(){return!1}function zn(t,e,n){var i=Dm(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}function En(t){if("string"==typeof t){var e=Yy.get(t);return e&&e.image}return t}function Rn(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=Yy.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?(e=a.image,!Nn(e)&&a.pending.push(o)):(e=new Image,e.onload=e.onerror=Bn,Yy.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Bn(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function Nn(t){return t&&t.width&&t.height}function Vn(t,e){e=e||Qy;var n=t+":"+e;if(jy[n])return jy[n];for(var i=(t+"").split("\n"),r=0,a=0,o=i.length;o>a;a++)r=Math.max($n(i[a],e).width,r);return qy>Ky&&(qy=0,jy={}),qy++,jy[n]=r,r}function Fn(t,e,n,i,r,a,o,s){return o?Gn(t,e,n,i,r,a,o,s):Hn(t,e,n,i,r,a,s)}function Hn(t,e,n,i,r,a,o){var s=Qn(t,e,r,a,o),l=Vn(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=Wn(0,l,n),c=Un(0,u,i),d=new bn(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Gn(t,e,n,i,r,a,o,s){var l=Jn(t,{rich:o,truncate:s,font:e,textAlign:n,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=Wn(0,u,n),d=Un(0,h,i);return new bn(c,d,u,h)}function Wn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Un(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Zn(t,e,n){var i=e.textPosition,r=e.textDistance,a=n.x,o=n.y,s=n.height,l=n.width,u=s/2,h="left",c="top";switch(i){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return t=t||{},t.x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function Xn(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=Yn(e,n,i,r);for(var o=0,s=a.length;s>o;o++)a[o]=jn(a[o],r);return a.join("\n")}function Yn(t,e,n,i){i=o({},i),i.font=e;var n=D(n,"...");i.maxIterations=D(i.maxIterations,2);var r=i.minChar=D(i.minChar,0);i.cnCharWidth=Vn("鍥�",e);var a=i.ascCharWidth=Vn("a",e);i.placeholder=D(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=a;l++)s-=a;var u=Vn(n,e);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function jn(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=Vn(t,i);if(n>=a)return t;for(var o=0;;o++){if(r>=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?qn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=Vn(t,i)}return""===t&&(t=e.placeholder),t}function qn(t,e,n,i){for(var r=0,a=0,o=t.length;o>a&&e>r;a++){var s=t.charCodeAt(a);r+=s>=0&&127>=s?n:i}return a}function Kn(t){return Vn("鍥�",t)}function $n(t,e){return Jy.measureText(t,e)}function Qn(t,e,n,i,r){null!=t&&(t+="");var a=D(i,Kn(e)),o=t?t.split("\n"):[],s=o.length*a,l=s;if(n&&(l+=n[0]+n[2]),t&&r){var u=r.outerHeight,h=r.outerWidth;if(null!=u&&l>u)t="",o=[];else if(null!=h)for(var c=Yn(h-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),d=0,f=o.length;f>d;d++)o[d]=jn(o[d],c)}return{lines:o,height:s,outerHeight:l,lineHeight:a}}function Jn(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=$y.lastIndex=0;null!=(i=$y.exec(t));){var a=i.index;a>r&&ti(n,t.substring(r,a)),ti(n,i[2],i[1]),r=$y.lastIndex}r<t.length&&ti(n,t.substring(r,t.length));var o=n.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(var p=0;p<o.length;p++){for(var g=o[p],v=0,m=0,y=0;y<g.tokens.length;y++){var _=g.tokens[y],x=_.styleName&&e.rich[_.styleName]||{},b=_.textPadding=x.textPadding,w=_.font=x.font||e.font,S=_.textHeight=D(x.textHeight,Kn(w));if(b&&(S+=b[0]+b[2]),_.height=S,_.lineHeight=k(x.textLineHeight,e.textLineHeight,S),_.textAlign=x&&x.textAlign||e.textAlign,_.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+_.lineHeight>f)return{lines:[],width:0,height:0};_.textWidth=Vn(_.text,w);var M=x.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))_.percentWidth=M,u.push(_),M=0;else{if(I){M=_.textWidth;var C=x.textBackgroundColor,T=C&&C.image;T&&(T=En(T),Nn(T)&&(M=Math.max(M,T.width*S/T.height)))}var A=b?b[1]+b[3]:0;M+=A;var P=null!=d?d-m:null;null!=P&&M>P&&(!I||A>P?(_.text="",_.textWidth=M=0):(_.text=Xn(_.text,P-A,w,c.ellipsis,{minChar:c.minChar}),_.textWidth=Vn(_.text,w),M=_.textWidth+A))}m+=_.width=M,x&&(v=Math.max(v,_.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}n.outerWidth=n.width=D(e.textWidth,l),n.outerHeight=n.height=D(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(var p=0;p<u.length;p++){var _=u[p],L=_.percentWidth;_.width=parseInt(L,10)/100*l}return n}function ti(t,e,n){for(var i=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)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||i)&&u.push(l)}}}function ei(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&z(e)||t.textFont||t.font}function ni(t,e){var n,i,r,a,o=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(o+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=a=h:h instanceof Array?1===h.length?n=i=r=a=h[0]:2===h.length?(n=r=h[0],i=a=h[1]):3===h.length?(n=h[0],i=a=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],a=h[3]):n=i=r=a=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+a>u&&(c=n+a,n*=u/c,a*=u/c),t.moveTo(o+n,s),t.lineTo(o+l-i,s),0!==i&&t.arc(o+l-i,s+i,i,-Math.PI/2,0),t.lineTo(o+l,s+u-r),0!==r&&t.arc(o+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(o+a,s+u),0!==a&&t.arc(o+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+n),0!==n&&t.arc(o+n,s+n,n,Math.PI,1.5*Math.PI)}function ii(t){return ri(t),f(t.rich,ri),t}function ri(t){if(t){t.font=ei(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||e_[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||n_[n]?n:"top";var i=t.textPadding;i&&(t.textPadding=L(t.textPadding))}}function ai(t,e,n,i,r,a){i.rich?si(t,e,n,i,r,a):oi(t,e,n,i,r,a)}function oi(t,e,n,i,r,a){var o,s=ci(i),l=!1,u=e.__attrCachedBy===By.PLAIN_TEXT;a!==Ny?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?By.NONE:By.PLAIN_TEXT):u&&(e.__attrCachedBy=By.NONE);var h=i.font||t_;l&&h===(o.font||t_)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=i.textPadding,f=i.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=Qn(n,c,d,f,i.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=pi(a_,t,i,r),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;ui(e,i,r,_,x);var S=Un(x,g,w),M=_,I=S;if(s||d){var C=Vn(n,c),T=C;d&&(T+=d[1]+d[3]);var A=Wn(_,T,b);s&&di(t,e,i,A,S,T,g),d&&(M=_i(_,b,d),I+=d[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var D=0;D<i_.length;D++){var k=i_[D],P=k[0],L=k[1],O=i[P];l&&O===o[P]||(e[L]=Ry(e,L,O||k[2]))}I+=m/2;var z=i.textStrokeWidth,E=l?o.textStrokeWidth:null,R=!l||z!==E,B=!l||R||i.textStroke!==o.textStroke,N=vi(i.textStroke,z),V=mi(i.textFill);if(N&&(R&&(e.lineWidth=z),B&&(e.strokeStyle=N)),V&&(l&&i.textFill===o.textFill||(e.fillStyle=V)),1===v.length)N&&e.strokeText(v[0],M,I),V&&e.fillText(v[0],M,I);else for(var D=0;D<v.length;D++)N&&e.strokeText(v[D],M,I),V&&e.fillText(v[D],M,I),I+=m}function si(t,e,n,i,r,a){a!==Ny&&(e.__attrCachedBy=By.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=Jn(n,i)),li(t,e,o,i,r)}function li(t,e,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=pi(a_,t,i,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ui(e,i,r,h,c);var p=Wn(h,o,d),g=Un(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;ci(i)&&di(t,e,i,p,g,o,s);for(var _=0;_<n.lines.length;_++){for(var x,b=n.lines[_],w=b.tokens,S=w.length,M=b.lineHeight,I=b.width,C=0,T=v,A=y,D=S-1;S>C&&(x=w[C],!x.textAlign||"left"===x.textAlign);)hi(t,e,x,i,M,m,T,"left"),I-=x.width,T+=x.width,C++;for(;D>=0&&(x=w[D],"right"===x.textAlign);)hi(t,e,x,i,M,m,A,"right"),I-=x.width,A-=x.width,D--;for(T+=(a-(T-v)-(y-A)-I)/2;D>=C;)x=w[C],hi(t,e,x,i,M,m,T+x.width/2,"center"),T+=x.width,C++;m+=M}}function ui(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function hi(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=a+r/2;"top"===u?h=a+n.height/2:"bottom"===u&&(h=a+r-n.height/2),!n.isLineHolder&&ci(l)&&di(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=_i(o,s,c),h-=n.height/2-c[2]-n.textHeight/2),gi(e,"shadowBlur",k(l.textShadowBlur,i.textShadowBlur,0)),gi(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),gi(e,"shadowOffsetX",k(l.textShadowOffsetX,i.textShadowOffsetX,0)),gi(e,"shadowOffsetY",k(l.textShadowOffsetY,i.textShadowOffsetY,0)),gi(e,"textAlign",s),gi(e,"textBaseline","middle"),gi(e,"font",n.font||t_);
+var d=vi(l.textStroke||i.textStroke,p),f=mi(l.textFill||i.textFill),p=D(l.textStrokeWidth,i.textStrokeWidth);d&&(gi(e,"lineWidth",p),gi(e,"strokeStyle",d),e.strokeText(n.text,o,h)),f&&(gi(e,"fillStyle",f),e.fillText(n.text,o,h))}function ci(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function di(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=w(s);if(gi(e,"shadowBlur",n.textBoxShadowBlur||0),gi(e,"shadowColor",n.textBoxShadowColor||"transparent"),gi(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),gi(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?ni(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(h)if(gi(e,"fillStyle",s),null!=n.fillOpacity){var d=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=Rn(f,null,t,fi,s),f&&Nn(f)&&e.drawImage(f,i,r,a,o)}if(l&&u)if(gi(e,"lineWidth",l),gi(e,"strokeStyle",u),null!=n.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function fi(t,e){e.image=t}function pi(t,e,n,i){var r=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+yi(l[0],i.width),a=i.y+yi(l[1],i.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(r_,n,i):Zn(r_,n,i);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=n.textOffset;h&&(r+=h[0],a+=h[1])}return t=t||{},t.baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function gi(t,e,n){return t[e]=Ry(t,e,n),t[e]}function vi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function mi(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function yi(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function _i(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function xi(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function bi(t){t=t||{},Ty.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Fy(t.style,this),this._rect=null,this.__clipPaths=null}function wi(t){bi.call(this,t)}function Si(t){return parseInt(t,10)}function Mi(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Ii(t,e,n){return d_.copy(t.getBoundingRect()),t.transform&&d_.applyTransform(t.transform),f_.width=e,f_.height=n,!d_.intersect(f_)}function Ci(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}function Ti(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}function Ai(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}function Di(t){return"mousewheel"===t&&ym.browser.firefox?"DOMMouseScroll":t}function ki(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Pi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Li(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(y_,function(e){t._handlers[e]=y(b_[e],t)}),f(x_,function(e){t._handlers[e]=y(b_[e],t)}),f(m_,function(n){t._handlers[n]=e(b_[n],t)})}function Oi(t){function e(e,n){f(e,function(e){_e(t,Di(e),n._handlers[e])},n)}Fm.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},Li(this),ym.pointerEventsSupported?e(x_,this):(ym.touchEventsSupported&&e(y_,this),e(m_,this))}function zi(t,e){var n=new T_(vm(),t,e);return I_[n.id]=n,n}function Ei(t){if(t)t.dispose();else{for(var e in I_)I_.hasOwnProperty(e)&&I_[e].dispose();I_={}}return this}function Ri(t){return I_[t]}function Bi(t,e){M_[t]=e}function Ni(t){delete I_[t]}function Vi(t){return t instanceof Array?t:null==t?[]:[t]}function Fi(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;r>i;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Hi(t){return!k_(t)||P_(t)||t instanceof Date?t:t.value}function Gi(t){return k_(t)&&!(t instanceof Array)}function Wi(t,e){e=(e||[]).slice();var n=p(t||[],function(t){return{exist:t}});return D_(e,function(t,i){if(k_(t)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=t.id&&n[r].exist.id===t.id+"")return n[r].option=t,void(e[i]=null);for(var r=0;r<n.length;r++){var a=n[r].exist;if(!(n[r].option||null!=a.id&&null!=t.id||null==t.name||Xi(t)||Xi(a)||a.name!==t.name+""))return n[r].option=t,void(e[i]=null)}}}),D_(e,function(t){if(k_(t)){for(var e=0;e<n.length;e++){var i=n[e].exist;if(!n[e].option&&!Xi(i)&&null==t.id){n[e].option=t;break}}e>=n.length&&n.push({option:t})}}),n}function Ui(t){var e=N();D_(t,function(t){var n=t.exist;n&&e.set(n.id,t)}),D_(t,function(t){var n=t.option;O(!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={})}),D_(t,function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(k_(r)){if(a.name=null!=r.name?r.name+"":i?i.name:L_+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function Zi(t){var e=t.name;return!(!e||!e.indexOf(L_))}function Xi(t){return k_(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Yi(t,e){function n(t,e,n){for(var i=0,r=t.length;r>i;i++)for(var a=t[i].seriesId,o=Vi(t[i].dataIndex),s=n&&n[a],l=0,u=o.length;u>l;l++){var h=o[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function i(t,e){var n=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)n.push(+r);else{var a=i(t[r],!0);a.length&&n.push({seriesId:r,dataIndex:a})}return n}var r={},a={};return n(t||[],r),n(e||[],a,r),[i(r),i(a)]}function ji(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?x(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?x(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function qi(){var t="__\x00ec_inner_"+z_++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function Ki(t,e,n){if(w(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||$i(e,r+"Index")||$i(e,r+"Id")||$i(e,r+"Name")||(e[r+"Index"]=0);var a={};return D_(e,function(i,r){var i=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(a[r]=i);var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&u(n.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==i)&&(h[l]=i);var c=t.queryComponents(h);a[s+"Models"]=c,a[s+"Model"]=c[0]}}),a}function $i(t,e){return t&&t.hasOwnProperty(e)}function Qi(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Ji(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function tr(t){return"auto"===t?ym.domSupported?"html":"richText":t||"html"}function er(t){var e={main:"",sub:""};return t&&(t=t.split(E_),e.main=t[0]||"",e.sub=t[1]||""),e}function nr(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function ir(t){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(n.prototype,t),n.extend=this.extend,n.superCall=ar,n.superApply=or,h(n,this),n.superClass=e,n}}function rr(t){var e=["__\x00is_clz",B_++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function ar(t,e){var n=P(arguments,2);return this.superClass.prototype[e].apply(t,n)}function or(t,e,n){return this.superClass.prototype[e].apply(t,n)}function sr(t,e){function n(t){var e=i[t.main];return e&&e[R_]||(e=i[t.main]={},e[R_]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(nr(e),e=er(e),e.sub){if(e.sub!==R_){var r=n(e);r[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[R_]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=er(t);var e=[],n=i[t.main];return n&&n[R_]?f(n,function(t,n){n!==R_&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=er(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=er(t);var e=i[t.main];return e&&e[R_]},t.parseClassType=er,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function lr(t){return t>-Z_&&Z_>t}function ur(t){return t>Z_||-Z_>t}function hr(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function cr(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function dr(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(lr(h)&&lr(c))if(lr(s))a[0]=0;else{var p=-l/s;p>=0&&1>=p&&(a[f++]=p)}else{var g=c*c-4*h*d;if(lr(g)){var v=c/h,p=-s/o+v,m=-v/2;p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m)}else if(g>0){var y=U_(g),_=h*s+1.5*o*(-c+y),x=h*s+1.5*o*(-c-y);_=0>_?-W_(-_,j_):W_(_,j_),x=0>x?-W_(-x,j_):W_(x,j_);var p=(-s-(_+x))/(3*o);p>=0&&1>=p&&(a[f++]=p)}else{var b=(2*h*s-3*o*c)/(2*U_(h*h*h)),w=Math.acos(b)/3,S=U_(h),M=Math.cos(w),p=(-s-2*S*M)/(3*o),m=(-s+S*(M+Y_*Math.sin(w)))/(3*o),I=(-s+S*(M-Y_*Math.sin(w)))/(3*o);p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m),I>=0&&1>=I&&(a[f++]=I)}}return f}function fr(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(lr(o)){if(ur(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(lr(h))r[0]=-a/(2*o);else if(h>0){var c=U_(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function pr(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function gr(t,e,n,i,r,a,o,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;q_[0]=l,q_[1]=u;for(var y=0;1>y;y+=.05)K_[0]=hr(t,n,r,o,y),K_[1]=hr(e,i,a,s,y),p=Bm(q_,K_),m>p&&(c=y,m=p);m=1/0;for(var _=0;32>_&&!(X_>v);_++)d=c-v,f=c+v,K_[0]=hr(t,n,r,o,d),K_[1]=hr(e,i,a,s,d),p=Bm(K_,q_),d>=0&&m>p?(c=d,m=p):($_[0]=hr(t,n,r,o,f),$_[1]=hr(e,i,a,s,f),g=Bm($_,q_),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=hr(t,n,r,o,c),h[1]=hr(e,i,a,s,c)),U_(m)}function vr(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function mr(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function yr(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(lr(a)){if(ur(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(lr(h)){var u=-o/(2*a);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=U_(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function _r(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function xr(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function br(t,e,n,i,r,a,o,s,l){var u,h=.005,c=1/0;q_[0]=o,q_[1]=s;for(var d=0;1>d;d+=.05){K_[0]=vr(t,n,r,d),K_[1]=vr(e,i,a,d);var f=Bm(q_,K_);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(X_>h);p++){var g=u-h,v=u+h;K_[0]=vr(t,n,r,g),K_[1]=vr(e,i,a,g);var f=Bm(K_,q_);if(g>=0&&c>f)u=g,c=f;else{$_[0]=vr(t,n,r,v),$_[1]=vr(e,i,a,v);var m=Bm($_,q_);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=vr(t,n,r,u),l[1]=vr(e,i,a,u)),U_(c)}function wr(t,e,n){if(0!==t.length){var i,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;i<t.length;i++)r=t[i],a=Q_(a,r[0]),o=J_(o,r[0]),s=Q_(s,r[1]),l=J_(l,r[1]);e[0]=a,e[1]=s,n[0]=o,n[1]=l}}function Sr(t,e,n,i,r,a){r[0]=Q_(t,n),r[1]=Q_(e,i),a[0]=J_(t,n),a[1]=J_(e,i)}function Mr(t,e,n,i,r,a,o,s,l,u){var h,c=fr,d=hr,f=c(t,n,r,o,ox);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;f>h;h++){var p=d(t,n,r,o,ox[h]);l[0]=Q_(p,l[0]),u[0]=J_(p,u[0])}for(f=c(e,i,a,s,sx),h=0;f>h;h++){var g=d(e,i,a,s,sx[h]);l[1]=Q_(g,l[1]),u[1]=J_(g,u[1])}l[0]=Q_(t,l[0]),u[0]=J_(t,u[0]),l[0]=Q_(o,l[0]),u[0]=J_(o,u[0]),l[1]=Q_(e,l[1]),u[1]=J_(e,u[1]),l[1]=Q_(s,l[1]),u[1]=J_(s,u[1])}function Ir(t,e,n,i,r,a,o,s){var l=_r,u=vr,h=J_(Q_(l(t,n,r),1),0),c=J_(Q_(l(e,i,a),1),0),d=u(t,n,r,h),f=u(e,i,a,c);o[0]=Q_(t,r,d),o[1]=Q_(e,a,f),s[0]=J_(t,r,d),s[1]=J_(e,a,f)}function Cr(t,e,n,i,r,a,o,s,l){var u=oe,h=se,c=Math.abs(r-a);if(1e-4>c%nx&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ix[0]=ex(r)*n+t,ix[1]=tx(r)*i+e,rx[0]=ex(a)*n+t,rx[1]=tx(a)*i+e,u(s,ix,rx),h(l,ix,rx),r%=nx,0>r&&(r+=nx),a%=nx,0>a&&(a+=nx),r>a&&!o?a+=nx:a>r&&o&&(r+=nx),o){var d=a;a=r,r=d}for(var f=0;a>f;f+=Math.PI/2)f>r&&(ax[0]=ex(f)*n+t,ax[1]=tx(f)*i+e,u(s,ax,s),h(l,ax,l))}function Tr(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0,u=t;if(o>e+s&&o>i+s||e-s>o&&i-s>o||a>t+s&&a>n+s||t-s>a&&n-s>a)return!1;if(t===n)return Math.abs(a-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*a-o+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Ar(t,e,n,i,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>a+c&&h>s+c||e-c>h&&i-c>h&&a-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>o+c||t-c>u&&n-c>u&&r-c>u&&o-c>u)return!1;var d=gr(t,e,n,i,r,a,o,s,u,h,null);return c/2>=d}function Dr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;if(l>e+u&&l>i+u&&l>a+u||e-u>l&&i-u>l&&a-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=br(t,e,n,i,r,a,s,l,null);return u/2>=h}function kr(t){return t%=bx,0>t&&(t+=bx),t}function Pr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(Math.abs(i-r)%Sx<1e-4)return!0;if(a){var c=i;i=kr(r),r=kr(c)}else i=kr(i),r=kr(r);i>r&&(r+=Sx);var d=Math.atan2(l,s);return 0>d&&(d+=Sx),d>=i&&r>=d||d+Sx>=i&&r>=d+Sx}function Lr(t,e,n,i,r,a){if(a>e&&a>i||e>a&&i>a)return 0;if(i===e)return 0;var o=e>i?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=e>i?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?o:0}function Or(t,e){return Math.abs(t-e)<Cx}function zr(){var t=Ax[0];Ax[0]=Ax[1],Ax[1]=t}function Er(t,e,n,i,r,a,o,s,l,u){if(u>e&&u>i&&u>a&&u>s||e>u&&i>u&&a>u&&s>u)return 0;var h=dr(e,i,a,s,u,Tx);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=Tx[g],m=0===v||1===v?.5:1,y=hr(t,n,r,o,v);l>y||(0>p&&(p=fr(e,i,a,s,Ax),Ax[1]<Ax[0]&&p>1&&zr(),c=hr(e,i,a,s,Ax[0]),p>1&&(d=hr(e,i,a,s,Ax[1]))),f+=2===p?v<Ax[0]?e>c?m:-m:v<Ax[1]?c>d?m:-m:d>s?m:-m:v<Ax[0]?e>c?m:-m:c>s?m:-m)}return f}function Rr(t,e,n,i,r,a,o,s){if(s>e&&s>i&&s>a||e>s&&i>s&&a>s)return 0;var l=yr(e,i,a,s,Tx);if(0===l)return 0;var u=_r(e,i,a);if(u>=0&&1>=u){for(var h=0,c=vr(e,i,a,u),d=0;l>d;d++){var f=0===Tx[d]||1===Tx[d]?.5:1,p=vr(t,n,r,Tx[d]);o>p||(h+=Tx[d]<u?e>c?f:-f:c>a?f:-f)}return h}var f=0===Tx[0]||1===Tx[0]?.5:1,p=vr(t,n,r,Tx[0]);return o>p?0:e>a?f:-f}function Br(t,e,n,i,r,a,o,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);Tx[0]=-l,Tx[1]=l;var u=Math.abs(i-r);if(1e-4>u)return 0;if(1e-4>u%Ix){i=0,r=Ix;var h=a?1:-1;return o>=Tx[0]+t&&o<=Tx[1]+t?h:0}if(a){var l=i;i=kr(r),r=kr(l)}else i=kr(i),r=kr(r);i>r&&(r+=Ix);for(var c=0,d=0;2>d;d++){var f=Tx[d];if(f+t>o){var p=Math.atan2(s,f),h=a?1:-1;0>p&&(p=Ix+p),(p>=i&&r>=p||p+Ix>=i&&r>=p+Ix)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Nr(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===Mx.M&&h>1&&(n||(a+=Lr(o,s,l,u,i,r))),1===h&&(o=t[h],s=t[h+1],l=o,u=s),c){case Mx.M:l=t[h++],u=t[h++],o=l,s=u;break;case Mx.L:if(n){if(Tr(o,s,t[h],t[h+1],e,i,r))return!0}else a+=Lr(o,s,t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case Mx.C:if(n){if(Ar(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else a+=Er(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case Mx.Q:if(n){if(Dr(o,s,t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else a+=Rr(o,s,t[h++],t[h++],t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case Mx.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],_=Math.cos(v)*p+d,x=Math.sin(v)*g+f;h>1?a+=Lr(o,s,_,x,i,r):(l=_,u=x);var b=(i-d)*g/p+d;if(n){if(Pr(d,f,g,v,v+m,y,e,b,r))return!0}else a+=Br(d,f,g,v,v+m,y,b,r);o=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case Mx.R:l=o=t[h++],u=s=t[h++];var w=t[h++],S=t[h++],_=l+w,x=u+S;if(n){if(Tr(l,u,_,u,e,i,r)||Tr(_,u,_,x,e,i,r)||Tr(_,x,l,x,e,i,r)||Tr(l,x,l,u,e,i,r))return!0}else a+=Lr(_,u,_,x,i,r),a+=Lr(l,x,l,u,i,r);break;case Mx.Z:if(n){if(Tr(o,s,l,u,e,i,r))return!0}else a+=Lr(o,s,l,u,i,r);o=l,s=u}}return n||Or(s,u)||(a+=Lr(o,s,l,u,i,r)||0),0!==a}function Vr(t,e,n){return Nr(t,0,!1,e,n)}function Fr(t,e,n,i){return Nr(t,e,!0,n,i)}function Hr(t){bi.call(this,t),this.path=null}function Gr(t,e,n,i,r,a,o,s,l,u,h){var c=l*(Fx/180),d=Vx(c)*(t-n)/2+Nx(c)*(e-i)/2,f=-1*Nx(c)*(t-n)/2+Vx(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Bx(p),s*=Bx(p));var g=(r===a?-1:1)*Bx((o*o*s*s-o*o*f*f-s*s*d*d)/(o*o*f*f+s*s*d*d))||0,v=g*o*f/s,m=g*-s*d/o,y=(t+n)/2+Vx(c)*v-Nx(c)*m,_=(e+i)/2+Nx(c)*v+Vx(c)*m,x=Wx([1,0],[(d-v)/o,(f-m)/s]),b=[(d-v)/o,(f-m)/s],w=[(-1*d-v)/o,(-1*f-m)/s],S=Wx(b,w);Gx(b,w)<=-1&&(S=Fx),Gx(b,w)>=1&&(S=0),0===a&&S>0&&(S-=2*Fx),1===a&&0>S&&(S+=2*Fx),h.addData(u,y,_,o,s,x,S,c,a)}function Wr(t){if(!t)return new xx;for(var e,n=0,i=0,r=n,a=i,o=new xx,s=xx.CMD,l=t.match(Ux),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Zx)||[],p=f.length,g=0;p>g;g++)f[g]=parseFloat(f[g]);for(var v=0;p>v;){var m,y,_,x,b,w,S,M=n,I=i;switch(d){case"l":n+=f[v++],i+=f[v++],h=s.L,o.addData(h,n,i);break;case"L":n=f[v++],i=f[v++],h=s.L,o.addData(h,n,i);break;case"m":n+=f[v++],i+=f[v++],h=s.M,o.addData(h,n,i),r=n,a=i,d="l";break;case"M":n=f[v++],i=f[v++],h=s.M,o.addData(h,n,i),r=n,a=i,d="L";break;case"h":n+=f[v++],h=s.L,o.addData(h,n,i);break;case"H":n=f[v++],h=s.L,o.addData(h,n,i);break;case"v":i+=f[v++],h=s.L,o.addData(h,n,i);break;case"V":i=f[v++],h=s.L,o.addData(h,n,i);break;case"C":h=s.C,o.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),n=f[v-2],i=f[v-1];break;case"c":h=s.C,o.addData(h,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i),n+=f[v-2],i+=f[v-1];break;case"S":m=n,y=i;var C=o.len(),T=o.data;e===s.C&&(m+=n-T[C-4],y+=i-T[C-3]),h=s.C,M=f[v++],I=f[v++],n=f[v++],i=f[v++],o.addData(h,m,y,M,I,n,i);break;case"s":m=n,y=i;var C=o.len(),T=o.data;e===s.C&&(m+=n-T[C-4],y+=i-T[C-3]),h=s.C,M=n+f[v++],I=i+f[v++],n+=f[v++],i+=f[v++],o.addData(h,m,y,M,I,n,i);break;case"Q":M=f[v++],I=f[v++],n=f[v++],i=f[v++],h=s.Q,o.addData(h,M,I,n,i);break;case"q":M=f[v++]+n,I=f[v++]+i,n+=f[v++],i+=f[v++],h=s.Q,o.addData(h,M,I,n,i);break;case"T":m=n,y=i;var C=o.len(),T=o.data;e===s.Q&&(m+=n-T[C-4],y+=i-T[C-3]),n=f[v++],i=f[v++],h=s.Q,o.addData(h,m,y,n,i);break;case"t":m=n,y=i;var C=o.len(),T=o.data;e===s.Q&&(m+=n-T[C-4],y+=i-T[C-3]),n+=f[v++],i+=f[v++],h=s.Q,o.addData(h,m,y,n,i);break;case"A":_=f[v++],x=f[v++],b=f[v++],w=f[v++],S=f[v++],M=n,I=i,n=f[v++],i=f[v++],h=s.A,Gr(M,I,n,i,w,S,_,x,b,h,o);break;case"a":_=f[v++],x=f[v++],b=f[v++],w=f[v++],S=f[v++],M=n,I=i,n+=f[v++],i+=f[v++],h=s.A,Gr(M,I,n,i,w,S,_,x,b,h,o)}}("z"===d||"Z"===d)&&(h=s.Z,o.addData(h),n=r,i=a),e=h}return o.toStatic(),o}function Ur(t,e){var n=Wr(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){Rx(n,t),this.dirty(!0)},e}function Zr(t,e){return new Hr(Ur(t,e))}function Xr(t,e){return Hr.extend(Ur(t,e))}function Yr(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new Hr(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o}function jr(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function qr(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=Jx(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;(n?o:o-1)>s;s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=Qx(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;c>s;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function Kr(t,e,n){var i=n&&n.lineWidth;if(e&&i){var r=e.x1,a=e.x2,o=e.y1,s=e.y2;nb(2*r)===nb(2*a)?t.x1=t.x2=Qr(r,i,!0):(t.x1=r,t.x2=a),nb(2*o)===nb(2*s)?t.y1=t.y2=Qr(o,i,!0):(t.y1=o,t.y2=s)}}function $r(t,e,n){var i=n&&n.lineWidth;if(e&&i){var r=e.x,a=e.y,o=e.width,s=e.height;t.x=Qr(r,i,!0),t.y=Qr(a,i,!0),t.width=Math.max(Qr(r+o,i,!1)-t.x,0===o?0:1),t.height=Math.max(Qr(a+s,i,!1)-t.y,0===s?0:1)}}function Qr(t,e,n){var i=nb(2*t);return(i+nb(e))%2===0?i/2:(i+(n?1:-1))/2}function Jr(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?cr:hr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?cr:hr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?mr:vr)(t.x1,t.cpx1,t.x2,e),(n?mr:vr)(t.y1,t.cpy1,t.y2,e)]}function ta(t){bi.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function ea(t){return Hr.extend(t)}function na(t,e){return Xr(t,e)}function ia(t,e){Mb[t]=e}function ra(t){return Mb.hasOwnProperty(t)?Mb[t]:void 0}function aa(t,e,n,i){var r=Zr(t,e);return n&&("center"===i&&(n=sa(n,r.getBoundingRect())),la(r,n)),r}function oa(t,e,n){var i=new wi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(sa(e,r))}}});return i}function sa(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-r/2,y:o-n/2,width:r,height:n}}function la(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function ua(t){return Kr(t.shape,t.shape,t.style),t}function ha(t){return $r(t.shape,t.shape,t.style),t}function ca(t){return null!=t&&"none"!==t}function da(t){if("string"!=typeof t)return t;var e=Tb.get(t);return e||(e=$e(t,-.1),1e4>Ab&&(Tb.set(t,e),Ab++)),e}function fa(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}}function pa(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.__zr,i=t.useHoverLayer&&n&&"canvas"===n.painter.type;if(t.__highlighted=i?"layer":"plain",!(t.isGroup||!n&&t.useHoverLayer)){var r=t,a=t.style;i&&(r=n.addHover(t),a=r.style),Ba(a),i||fa(r),a.extendFrom(e),ga(a,e,"fill"),ga(a,e,"stroke"),Ra(a),i||(t.dirty(!1),t.z2+=yb)}}}function ga(t,e,n){!ca(e[n])&&ca(t[n])&&(t[n]=da(t[n]))}function va(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var n=t.style,i=t.__cachedNormalStl;i&&(Ba(n),t.setStyle(i),Ra(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===yb&&(t.z2=r)}}function ma(t,e,n){var i,r=bb,a=bb;t.__highlighted&&(r=xb,i=!0),e(t,n),t.__highlighted&&(a=xb,i=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,n)}),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function ya(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,va(t),pa(t))}function _a(t){!Sa(this,t)&&!this.__highByOuter&&ma(this,pa)}function xa(t){!Sa(this,t)&&!this.__highByOuter&&ma(this,va)}function ba(t){this.__highByOuter|=1<<(t||0),ma(this,pa)}function wa(t){!(this.__highByOuter&=~(1<<(t||0)))&&ma(this,va)}function Sa(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ma(t,e){Ia(t,!0),ma(t,ya,e)}function Ia(t,e){var n=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!n||t.__highDownDispatcher){var i=n?"off":"on";t[i]("mouseover",_a)[i]("mouseout",xa),t[i]("emphasis",ba)[i]("normal",wa),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function Ca(t){return!(!t||!t.__highDownDispatcher)}function Ta(t){var e=Sb[t];return null==e&&32>=wb&&(e=Sb[t]=wb++),e}function Aa(t,e,n,i,r,a,o){r=r||mb;var s,l=r.labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=b(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=c?s:null,p=d?D(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(ka(t,n,a,r),ka(e,i,o,r,!0)),t.text=f,e.text=p}function Da(t,e,n){var i=t.style;e&&(Ba(i),t.setStyle(e),Ra(i)),i=t.__hoverStl,n&&i&&(Ba(i),o(i,n),Ra(i))}function ka(t,e,n,i,r){return La(t,e,i,r),n&&o(t,n),t}function Pa(t,e,n){var i,r={isRectText:!0};n===!1?i=!0:r.autoColor=n,La(t,e,r,i)}function La(t,e,n,i){if(n=n||mb,n.isRectText){var r;n.getTextPosition?r=n.getTextPosition(e,i):(r=e.getShallow("position")||(i?null:"inside"),"outside"===r&&(r="top")),t.textPosition=r,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"),i?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,u=Oa(e);if(u){o={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);za(o[h]={},c,l,n,i)}}return t.rich=o,za(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function Oa(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||mb).rich;if(n){e=e||{};for(var i in n)n.hasOwnProperty(i)&&(e[i]=1)}t=t.parentModel}return e}function za(t,e,n,i,r,a){n=!r&&n||mb,t.textFill=Ea(e.getShallow("color"),i)||n.color,t.textStroke=Ea(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=D(e.getShallow("textBorderWidth"),n.textBorderWidth),r||(a&&(t.insideRollbackOpt=i,Ra(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.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&&i.disableBox||(t.textBackgroundColor=Ea(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=Ea(e.getShallow("borderColor"),i),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")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Ea(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Ra(t){var e,n=t.textPosition,i=t.insideRollbackOpt;if(i&&null==t.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=o!==!1&&(o===!0||a&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function Ba(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Na(t,e){var n=e||e.getModel("textStyle");return z([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function Va(t,e,n,i,r,a){"function"==typeof r&&(a=r,r=null);var o=i&&i.isAnimationEnabled();if(o){var s=t?"Update":"",l=i.getShallow("animationDuration"+s),u=i.getShallow("animationEasing"+s),h=i.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(n,l,h||0,u,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function Fa(t,e,n,i,r){Va(!0,t,e,n,i,r)}function Ha(t,e,n,i,r){Va(!1,t,e,n,i,r)}function Ga(t,e){for(var n=Ae([]);t&&t!==e;)ke(n,t.getLocalTransform(),n),t=t.parent;return n}function Wa(t,e,n){return e&&!d(e)&&(e=ny.getLocalTransform(e)),n&&(e=ze([],e)),ae([],t,e)}function Ua(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Wa(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Za(t,e,n){function i(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:W(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=i(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),Fa(t,i,n,t.dataIndex)}}})}}function Xa(t,e){return p(t,function(t){var n=t[0];n=gb(n,e.x),n=vb(n,e.x+e.width);var i=t[1];return i=gb(i,e.y),i=vb(i,e.y+e.height),[n,i]})}function Ya(t,e){var n=gb(t.x,e.x),i=vb(t.x+t.width,e.x+e.width),r=gb(t.y,e.y),a=vb(t.y+t.height,e.y+e.height);return i>=n&&a>=r?{x:n,y:r,width:i-n,height:a-r}:void 0}function ja(t,e,n){e=o({rectHover:!0},e);var i=e.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(i.image=t.slice(8),s(i,n),new wi(e)):aa(t.replace("path://",""),e,n,"center"):void 0}function qa(t,e,n,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Ka(t,e,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function Ka(t,e,n,i,r,a,o,s){var l=n-t,u=i-e,h=o-r,c=s-a,d=$a(h,c,l,u);if(Qa(d))return!1;var f=t-r,p=e-a,g=$a(f,p,l,u)/d;if(0>g||g>1)return!1;var v=$a(f,p,h,c)/d;return 0>v||v>1?!1:!0}function $a(t,e,n,i){return t*i-n*e}function Qa(t){return 1e-6>=t&&t>=-1e-6}function Ja(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function to(t,e,n){for(var i=0;i<e.length&&(!e[i]||(t=t&&"object"==typeof t?t[e[i]]:null,null!=t));i++);return null==t&&n&&(t=n.get(e)),t}function eo(t,e){var n=Eb(t).getParent;return n?n.call(t,e):t.parentModel}function no(t){return[t||"",Rb++,Math.random().toFixed(5)].join("_")}function io(t){var e={};return t.registerSubTypeDefaulter=function(t,n){t=er(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var a=er(n).main;t.hasSubTypes(n)&&e[a]&&(r=e[a](i))}return r},t}function ro(t,e){function n(t){var n={},a=[];return f(t,function(o){var s=i(n,o),l=s.originalDeps=e(o),h=r(l,t);s.entryCount=h.length,0===s.entryCount&&a.push(o),f(h,function(t){u(s.predecessor,t)<0&&s.predecessor.push(t);var e=i(n,t);u(e.successor,t)<0&&e.successor.push(o)})}),{graph:n,noEntryList:a}}function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var n=[];return f(t,function(t){u(e,t)>=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function a(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function o(t){h[t]=!0,a(t)}if(t.length){var s=n(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(i.call(r,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?o:a)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function ao(t){return t.replace(/^\s+|\s+$/g,"")}function oo(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function so(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?ao(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function lo(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function uo(t){return t.sort(function(t,e){return t-e}),t}function ho(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function co(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return 0>i?-i:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function fo(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function po(t,e,n){if(!t[e])return 0;var i=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),a=p(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,s=p(a,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(a,function(t,e){return t-s[e]});o>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function go(t){var e=2*Math.PI;return(t%e+e)%e}function vo(t){return t>-Bb&&Bb>t}function mo(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Vb.exec(t);if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(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 new Date(null==t?0/0:Math.round(t))}function yo(t){return Math.pow(10,_o(t))}function _o(t){return Math.floor(Math.log(t)/Math.LN10)}function xo(t,e){var n,i=_o(t),r=Math.pow(10,i),a=t/r;return n=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,t=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function bo(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],a=n-i;return a?r+a*(t[i]-r):r}function wo(t){function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]===(i?-1:1)||!i&&e(t,n,1))}t.sort(function(t,n){return e(t,n,0)?-1:1});for(var n=-1/0,i=1,r=0;r<t.length;){for(var a=t[r].interval,o=t[r].close,s=0;2>s;s++)a[s]<=n&&(a[s]=n,o[s]=s?1:1-i),n=a[s],i=o[s];a[0]===a[1]&&o[0]*o[1]!==1?t.splice(r,1):r++}return t}function So(t){return t-parseFloat(t)>=0}function Mo(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Io(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 Co(t){return null==t?"":(t+"").replace(Gb,function(t,e){return Wb[e]})}function To(t,e,n){x(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=Ub[a];t=t.replace(Zb(o),Zb(o,0))}for(var s=0;i>s;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(Zb(Ub[l],s),n?Co(u):u)}return t}function Ao(t,e,n){return f(e,function(e,i){t=t.replace("{"+i+"}",n?Co(e):e)}),t}function Do(t,e){t=w(t)?{color:t,extraCssText:e}:t||{};var n=t.color,i=t.type,e=t.extraCssText,r=t.renderMode||"html",a=t.markerId||"X";return n?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Co(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Co(n)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:n}}:""}function ko(t,e){return t+="","0000".substr(0,e-t.length)+t}function Po(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=mo(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",ko(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",ko(s,2)).replace("d",s).replace("hh",ko(l,2)).replace("h",l).replace("mm",ko(u,2)).replace("m",u).replace("ss",ko(h,2)).replace("s",h).replace("SSS",ko(c,3))}function Lo(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Oo(t){return Fn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function zo(t,e,n,i,r,a,o,s){return Fn(t,e,n,i,r,s,a,o)}function Eo(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=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 v=f.width+(g?-g.x+f.x:0);h=a+v,h>i||l.newline?(a=0,h=v,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=o+m,c>r||l.newline?(a+=s+n,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+n:o=c+n)})}function Ro(t,e,n){n=Hb(n||0);var i=e.width,r=e.height,a=so(t.left,i),o=so(t.top,r),s=so(t.right,i),l=so(t.bottom,r),u=so(t.width,i),h=so(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(f>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=i-s-u-d),isNaN(o)&&(o=r-l-h-c),t.left||t.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-h/2-n[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new bn(a+n[3],o+n[0],u,h);return p.margin=n,p}function Bo(t,e,n,i,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(a||o){var u;if("raw"===l)u="group"===t.type?new bn(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}e=Ro(s({width:u.width,height:u.height},e),n,i);var c=t.position,d=a?e.x-u.x:0,f=o?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function No(t,e,n){function i(n,i){var o={},l=0,u={},h=0,c=2;if(jb(n,function(e){u[e]=t[e]}),jb(n,function(t){r(e,t)&&(o[t]=u[t]=e[t]),a(o,t)&&l++,a(u,t)&&h++}),s[i])return a(e,n[1])?u[n[2]]=null:a(e,n[2])&&(u[n[1]]=null),u;if(h!==c&&l){if(l>=c)return o;for(var d=0;d<n.length;d++){var f=n[d];if(!r(o,f)&&r(t,f)){o[f]=t[f];break}}return o}return u}function r(t,e){return t.hasOwnProperty(e)}function a(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,n){jb(t,function(t){e[t]=n[t]})}!S(n)&&(n={});var s=n.ignoreSize;!x(s)&&(s=[s,s]);var l=i(Kb[0],0),u=i(Kb[1],1);o(Kb[0],t,l),o(Kb[1],t,u)}function Vo(t){return Fo({},t)}function Fo(t,e){return e&&t&&jb(qb,function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function Ho(t){var e=[];return f(tw.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return er(t).main}),"dataset"!==t&&u(e,"dataset")<=0&&e.unshift("dataset"),e}function Go(t,e){for(var n=t.length,i=0;n>i;i++)if(t[i].length>e)return t[i];return t[n-1]}function Wo(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:N(),categoryAxisMap:N()},i=aw[e];return i?(i(t,n,n.axisMap,n.categoryAxisMap),n):void 0}function Uo(t){return"category"===t.get("type")}function Zo(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===uw?{}:[]),this.sourceFormat=t.sourceFormat||hw,this.seriesLayoutBy=t.seriesLayoutBy||dw,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function Xo(t){var e=t.option.source,n=hw;if(I(e))n=cw;else if(x(e)){0===e.length&&(n=sw);for(var i=0,r=e.length;r>i;i++){var a=e[i];if(null!=a){if(x(a)){n=sw;break}if(S(a)){n=lw;break}}}}else if(S(e)){for(var o in e)if(e.hasOwnProperty(o)&&d(e[o])){n=uw;break}}else if(null!=e)throw new Error("Invalid data");pw(t).sourceFormat=n}function Yo(t){return pw(t).source}function jo(t){pw(t).datasetMap=N()}function qo(t){var e=t.option,n=e.data,i=I(n)?cw:ow,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=es(t);if(l){var u=l.option;n=u.source,i=pw(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=Ko(n,i,a,o,s),c=e.encode;!c&&l&&(c=ts(t,l,n,i,a,h)),pw(t).source=new Zo({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function Ko(t,e,n,i,r){if(!t)return{dimensionsDefine:$o(r)};var a,o,s;if(e===sw)"auto"===i||null==i?Qo(function(t){null!=t&&"-"!==t&&(w(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],Qo(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===fw?t.length:t[0]?t[0].length:null;else if(e===lw)r||(r=Jo(t),s=!0);else if(e===uw)r||(r=[],s=!0,f(t,function(t,e){r.push(e)}));else if(e===ow){var l=Hi(t[0]);a=x(l)&&l.length||1}var u;return s&&f(r,function(t,e){"name"===(S(t)?t.name:t)&&(u=e)}),{startIndex:o,dimensionsDefine:$o(r),dimensionsDetectCount:a,potentialNameDimIndex:u}}function $o(t){if(t){var e=N();return p(t,function(t){if(t=o({},S(t)?t:{name:t}),null==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 Qo(t,e,n,i){if(null==i&&(i=1/0),e===fw)for(var r=0;r<n.length&&i>r;r++)t(n[r]?n[r][0]:null,r);else for(var a=n[0]||[],r=0;r<a.length&&i>r;r++)t(a[r],r)}function Jo(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var i=[];return f(e,function(t,e){i.push(e)}),i}}function ts(t,e,n,i,r,a){var o=Wo(t),s={},l=[],u=[],h=t.subType,c=N(["pie","map","funnel"]),d=N(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(o&&null!=d.get(h)){var p=t.ecModel,g=pw(p).datasetMap,v=e.uid+"_"+r,m=g.get(v)||g.set(v,{categoryWayDim:1,valueWayDim:0});f(o.coordSysDims,function(t){if(null==o.firstCategoryDimIndex){var e=m.valueWayDim++;s[t]=e,u.push(e)}else if(o.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=m.categoryWayDim++;s[t]=e,u.push(e)}})}else if(null!=c.get(h)){for(var y,_=0;5>_&&null==y;_++)is(n,i,r,a.dimensionsDefine,a.startIndex,_)||(y=_);if(null!=y){s.value=y;var x=a.potentialNameDimIndex||Math.max(y-1,0);u.push(x),l.push(x)}}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}function es(t){var e=t.option,n=e.data;return n?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function ns(t,e){return is(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function is(t,e,n,i,r,a){function o(t){return null!=t&&isFinite(t)&&""!==t?!1:w(t)&&"-"!==t?!0:void 0}var s,l=5;if(I(t))return!1;var u;if(i&&(u=i[a],u=S(u)?u.name:u),e===sw)if(n===fw){for(var h=t[a],c=0;c<(h||[]).length&&l>c;c++)if(null!=(s=o(h[r+c])))return s}else for(var c=0;c<t.length&&l>c;c++){var d=t[r+c];if(d&&null!=(s=o(d[a])))return s}else if(e===lw){if(!u)return;for(var c=0;c<t.length&&l>c;c++){var f=t[c];if(f&&null!=(s=o(f[u])))return s}}else if(e===uw){if(!u)return;var h=t[u];if(!h||I(h))return!1;for(var c=0;c<h.length&&l>c;c++)if(null!=(s=o(h[c])))return s}else if(e===ow)for(var c=0;c<t.length&&l>c;c++){var f=t[c],p=Hi(f);if(!x(p))return!1;if(null!=(s=o(p[a])))return s}return!1}function rs(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function as(t,e){var n=t.color&&!t.colorLayer;f(e,function(e,a){"colorLayer"===a&&n||tw.hasClass(a)||("object"==typeof e?t[a]=t[a]?r(t[a],e,!1):i(e):null==t[a]&&(t[a]=e))})}function os(t){t=t,this.option={},this.option[gw]=1,this._componentsMap=N({series:[]}),this._seriesIndices,this._seriesIndicesMap,as(t,this._theme.option),r(t,nw,!1),this.mergeOption(t)}function ss(t,e){x(e)||(e=e?[e]:[]);var n={};return f(e,function(e){n[e]=(t.get(e)||[]).slice()}),n}function ls(t,e,n){var i=e.type?e.type:n?n.subType:tw.determineSubType(t,e);return i}function us(t,e){t._seriesIndicesMap=N(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function hs(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function cs(t){f(mw,function(e){this[e]=y(t[e],t)},this)}function ds(){this._coordinateSystems=[]}function fs(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function ps(t,e,n){var i,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;_w(l,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),_w([r].concat(a).concat(p(o,function(t){return t.option})),function(t){_w(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function gs(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return f(t,function(t,e){var n=e.match(Sw);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();vs(i[o],t,a)||(r=!1)}}),r}function vs(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function ms(t,e){return t.join(",")===e.join(",")}function ys(t,e){e=e||{},_w(e,function(e,n){if(null!=e){var i=t[n];if(tw.hasClass(n)){e=Vi(e),i=Vi(i);var r=Wi(i,e);t[n]=bw(r,function(t){return t.option&&t.exist?ww(t.exist,t.option,!0):t.exist||t.option})}else t[n]=ww(i,e,!0)}})}function _s(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Cw.length;i>n;n++){var a=Cw[n],o=e.normal,s=e.emphasis;o&&o[a]&&(t[a]=t[a]||{},t[a].normal?r(t[a].normal,o[a]):t[a].normal=o[a],o[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?r(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function xs(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,s(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function bs(t){xs(t,"itemStyle"),xs(t,"lineStyle"),xs(t,"areaStyle"),xs(t,"label"),xs(t,"labelLine"),xs(t,"upperLabel"),xs(t,"edgeLabel")}function ws(t,e){var n=Iw(t)&&t[e],i=Iw(n)&&n.textStyle;if(i)for(var r=0,a=O_.length;a>r;r++){var e=O_[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Ss(t){t&&(bs(t),ws(t,"label"),t.emphasis&&ws(t.emphasis,"label"))}function Ms(t){if(Iw(t)){_s(t),bs(t),ws(t,"label"),ws(t,"upperLabel"),ws(t,"edgeLabel"),t.emphasis&&(ws(t.emphasis,"label"),ws(t.emphasis,"upperLabel"),ws(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(_s(e),Ss(e));var n=t.markLine;n&&(_s(n),Ss(n));var i=t.markArea;i&&Ss(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!I(a))for(var o=0;o<a.length;o++)Ss(a[o]);f(t.categories,function(t){bs(t)})}if(r&&!I(r))for(var o=0;o<r.length;o++)Ss(r[o]);var e=t.markPoint;if(e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Ss(s[o]);var n=t.markLine;if(n&&n.data)for(var l=n.data,o=0;o<l.length;o++)x(l[o])?(Ss(l[o][0]),Ss(l[o][1])):Ss(l[o]);"gauge"===t.type?(ws(t,"axisLabel"),ws(t,"title"),ws(t,"detail")):"treemap"===t.type?(xs(t.breadcrumb,"itemStyle"),f(t.levels,function(t){bs(t)})):"tree"===t.type&&bs(t.leaves)}}function Is(t){return x(t)?t:t?[t]:[]}function Cs(t){return(x(t)?t[0]:t)||{}}function Ts(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&(n=n&&n[e[i]],null!=n);i++);return n}function As(t,e,n,i){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)r=e[o],null==a[r]&&(a[r]={}),a=a[r];(i||null==a[e[o]])&&(a[e[o]]=n)}function Ds(t){f(Aw,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function ks(t){f(t,function(e,n){var i=[],r=[0/0,0/0],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,function(a,l,u){var h=o.get(e.stackedDimension,u);if(isNaN(h))return r;var c,d;s?d=o.getRawIndex(u):c=o.get(e.stackedByDimension,u);for(var f=0/0,p=n-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&v>0||0>=h&&0>v){h+=v,f=v;break}}}return i[0]=h,i[1]=f,i});o.hostModel.setData(l),e.data=l})}function Ps(t,e){Zo.isInstance(t)||(t=Zo.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===cw&&(this._offset=0,this._dimSize=e,this._data=n);var r=Ow[i===sw?i+"_"+t.seriesLayoutBy:i];o(this,r)}function Ls(){return this._data.length}function Os(t){return this._data[t]}function zs(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Es(t,e,n){return null!=n?t[n]:t}function Rs(t,e,n,i){return Bs(t[i],this._dimensionInfos[e])}function Bs(t,e){var n=e&&e.type;if("ordinal"===n){var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+mo(t)),null==t||""===t?0/0:+t}function Ns(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,a=s.index),zw[o](i,e,a,r)}}}function Vs(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===ow||i===lw){var r=t.getRawDataItem(e);return i!==ow||S(r)||(r=null),r?r[n]:void 0}}}function Fs(t){return new Hs(t)}function Hs(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 Gs(t,e,n,i,r,a){Vw.reset(n,i,r,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Vw.next},t.context)}function Ws(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var n,i;!e&&t._reset&&(n=t._reset(t.context),n&&n.progress&&(i=n.forceFirstProgress,n=n.progress),x(n)&&!n.length&&(n=null)),t._progress=n,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),i}function Us(t){var e=t.name;Zi(t)||(t.name=Zs(t)||e)}function Zs(t){var e=t.getRawData(),n=e.mapDimension("seriesName",!0),i=[];return f(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}function Xs(t){return t.model.getRawData().count()}function Ys(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),js}function js(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function qs(t,e){f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,_(Ks,e))})}function Ks(t){var e=$s(t);e&&e.setOutputEnd(this.count())}function $s(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}}function Qs(){this.group=new Py,this.uid=no("viewChart"),this.renderTask=Fs({plan:el,reset:nl}),this.renderTask.context={view:this}}function Js(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!Ca(t)))for(var i=0,r=t.childCount();r>i;i++)Js(t.childAt(i),e,n)}function tl(t,e,n){var i=ji(t,e),r=e&&null!=e.highlightKey?Ta(e.highlightKey):null;null!=i?f(Vi(i),function(e){Js(t.getItemGraphicEl(e),n,r)}):t.eachItemGraphicEl(function(t){Js(t,n,r)})}function el(t){return Xw(t.model)}function nl(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&Zw(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,n,i,r),jw[l]}function il(t,e,n){function i(){h=(new Date).getTime(),c=null,t.apply(o,s||[])}var r,a,o,s,l,u=0,h=0,c=null;e=e||0;var d=function(){r=(new Date).getTime(),o=this,s=arguments;var t=l||e,d=l||n;l=null,a=r-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(i,t):a>=0?i():c=setTimeout(i,-a),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function rl(t,e,n,i){var r=t[e];if(r){var a=r[qw]||r,o=r[$w],s=r[Kw];if(s!==n||o!==i){if(null==n||!i)return t[e]=a;r=t[e]=il(a,n,"debounce"===i),r[qw]=a,r[$w]=i,r[Kw]=n}return r}}function al(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=N()}function ol(t,e,n,i,r){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var o;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){a(r,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),rS(u,i);var d=t.getPerformArgs(u,r.block);c.each(function(t){t.perform(d)}),o|=u.perform(d)}else l&&l.each(function(s){a(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),rS(s,i),o|=s.perform(l)})}}),t.unfinished|=o}function sl(t,e,n,i,r){function a(n){var a=n.uid,s=o.get(a)||o.set(a,Fs({plan:fl,reset:pl,count:vl}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},ml(t,n,s)}var o=n.seriesTaskMap||(n.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(a):s?i.eachRawSeriesByType(s,a):l&&l(i,r).each(a);var u=t._pipelineMap;o.each(function(t,e){u.get(e)||(t.dispose(),o.removeKey(e))})}function ll(t,e,n,i,r){function a(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,Fs({reset:hl,onDirty:dl})),o.dirty()),i.context={model:e,overallProgress:h,modifyOutputEnd:c},i.agent=o,i.__block=h,ml(t,e,i)}var o=n.overallTask=n.overallTask||Fs({reset:ul});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=o.agentStubMap=o.agentStubMap||N(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?i.eachRawSeriesByType(l,a):u?u(i,r).each(a):(h=!1,f(i.getSeries(),a));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),s.removeKey(e))})}function ul(t){t.overallReset(t.ecModel,t.api,t.payload)}function hl(t){return t.overallProgress&&cl}function cl(){this.agent.dirty(),this.getDownstream().dirty()}function dl(){this.agent&&this.agent.dirty()}function fl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function pl(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Vi(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return gl(e)}):aS}function gl(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(i,a);else r&&r.progress&&r.progress(e,i)}}function vl(t){return t.data.count()}function ml(t,e,n){var i=e.uid,r=t._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r}function yl(t){oS=null;try{t(sS,lS)}catch(e){}return oS}function _l(t,e){for(var n in e.prototype)t[n]=F}function xl(t){if(w(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function bl(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function wl(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}function Sl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Ml(t){for(var e=z(t).split(vS),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([r,a])}return n}function Il(t,e,n,i){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(Tl(t,e),o(r,Al(t)),!i))for(var s in _S)if(_S.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(r[_S[s]]=l)}var u=a?"textFill":"fill",h=a?"textStroke":"stroke";e.style=e.style||new Fy;var c=e.style;null!=r.fill&&c.set(u,Cl(r.fill,n)),null!=r.stroke&&c.set(h,Cl(r.stroke,n)),f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&c.set(e,parseFloat(r[t]))}),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=r[t]&&c.set(t,r[t])}),r.lineDash&&(e.style.lineDash=z(r.lineDash).split(vS)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=r}function Cl(t,e){var n=e&&t&&t.match(xS);if(n){var i=z(n[1]),r=e[i];return r}return t}function Tl(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,r=[];n.replace(bS,function(t,e,n){r.push(e,n)});for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(i=i||Te(),s){case"translate":o=z(o).split(vS),Pe(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=z(o).split(vS),Oe(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=z(o).split(vS),Le(i,i,parseFloat(o[0]));break;case"skew":o=z(o).split(vS),console.warn("Skew transform is not supported yet");break;case"matrix":var o=z(o).split(vS);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}e.setLocalTransform(i)}}function Al(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i={};wS.lastIndex=0;for(var r;null!=(r=wS.exec(e));)i[r[1]]=r[2];for(var a in _S)_S.hasOwnProperty(a)&&null!=i[a]&&(n[_S[a]]=i[a]);return n}function Dl(t,e,n){var i=e/t.width,r=n/t.height,a=Math.min(i,r),o=[a,a],s=[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2];return{scale:o,position:s}}function kl(t,e){return function(n,i,r){(e||!this._disposed)&&(n=n&&n.toLowerCase(),Fm.prototype[t].call(this,n,i,r))}}function Pl(){Fm.call(this)}function Ll(t,e,n){function r(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=rM[e]),this.id,this.group,this._dom=t;var a="canvas",o=this._zr=zi(t,{renderer:n.renderer||a,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=il(y(o.flush,o),17);var e=i(e);e&&kw(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ds;var s=this._api=Kl(this);Dn(iM,r),Dn(tM,r),this._scheduler=new al(this,s,tM,iM),Fm.call(this,this._ecEventProcessor=new $l),this._messageCenter=new Pl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),Fl(o,this),E(this)}function Ol(t,e,n){if(!this._disposed){var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Ki(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(i=s[t](r,e,n)))return i}}}function zl(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Hl(t,"component",e,n),Hl(t,"chart",e,n),n.plan()}function El(t,e,n,i,r){function a(i){i&&i.__alive&&i[e]&&i[e](i.__model,o,t._api,n)}var o=t._model;if(!i)return void TS(t._componentsViews.concat(t._chartsViews),a);var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u=n.excludeSeriesId;null!=u&&(u=N(Vi(u))),o&&o.eachComponent(l,function(e){u&&null!=u.get(e.id)||a(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function Rl(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Bl(t,e){var n=t.type,i=t.escapeConnect,r=QS[n],a=r.actionInfo,l=(a.update||"update").split(":"),u=l.pop();l=null!=l[0]&&kS(l[0]),this[XS]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=p(t.batch,function(e){return e=s(o({},e),t),e.batch=null,e}));var d,f=[],g="highlight"===n||"downplay"===n;TS(h,function(t){d=r.action(t,this._model,this._api),d=d||o({},t),d.type=a.event||d.type,f.push(d),g?El(this,u,t,"series"):l&&El(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[YS]?(zl(this),KS.update.call(this,t),this[YS]=!1):KS[u].call(this,t)),d=c?{type:a.event||n,escapeConnect:i,batch:f}:f[0],this[XS]=!1,!e&&this._messageCenter.trigger(d.type,d)}function Nl(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Bl.call(this,n,t)}}function Vl(t){!t&&this.trigger("updated")}function Fl(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[YS]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function Hl(t,e,n,i){function r(t){var e="_ec_"+t.id+"_"+t.type,r=s[e];if(!r){var h=kS(t.type),c=a?Gw.getClass(h.main,h.sub):Qs.getClass(h.sub);r=new c,r.init(n,u),s[e]=r,o.push(r),l.add(r.group)}t.__viewId=r.__id=e,r.__alive=!0,r.__model=t,r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!a&&i.prepareView(r,t,n,u)}for(var a="component"===e,o=a?t._componentsViews:t._chartsViews,s=a?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<o.length;h++)o[h].__alive=!1;a?n.eachComponent(function(t,e){"series"!==t&&r(e)}):n.eachSeries(r);for(var h=0;h<o.length;){var c=o[h];c.__alive?h++:(!a&&c.renderTask.dispose(),l.remove(c.group),c.dispose(n,u),o.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Gl(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Wl(t,e,n,i){Ul(t,e,n,i),TS(t._chartsViews,function(t){t.__alive=!1}),Zl(t,e,n,i),TS(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Ul(t,e,n,i,r){TS(r||t._componentsViews,function(t){var r=t.__model;t.render(r,e,n,i),ql(r,t)})}function Zl(t,e,n,i,r){var a,o=t._scheduler;e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),ql(e,n),jl(e,n)}),o.unfinished|=a,Yl(t,e),tS(t._zr.dom,e)}function Xl(t,e){TS(nM,function(n){n(t,e)})}function Yl(t,e){var n=t._zr,i=n.storage,r=0;i.traverse(function(){r++}),r>e.get("hoverLayerThreshold")&&!ym.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse(function(t){t.useHoverLayer=!0})}})}function jl(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function ql(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Kl(t){var e=t._coordSysMgr;return o(new cs(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function $l(){this.eventInfo}function Ql(t){function e(t,e){for(var n=0;n<t.length;n++){var i=t[n];i[a]=e}}var n=0,i=1,r=2,a="__connectUpdateStatus";TS(JS,function(o,s){t._messageCenter.on(s,function(o){if(sM[t.group]&&t[a]!==n){if(o&&o.escapeConnect)return;var s=t.makeActionFromEvent(o),l=[];TS(oM,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,n),TS(l,function(t){t[a]!==i&&t.dispatchAction(s)}),e(l,r)}})})}function Jl(t,e,n){var i=iu(t);if(i)return i;var r=new Ll(t,e,n);return r.id="ec_"+lM++,oM[r.id]=r,Qi(t,hM,r.id),Ql(r),r}function tu(t){if(x(t)){var e=t;t=null,TS(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+uM++,TS(e,function(e){e.group=t})}return sM[t]=!0,t}function eu(t){sM[t]=!1}function nu(t){"string"==typeof t?t=oM[t]:t instanceof Ll||(t=iu(t)),t instanceof Ll&&!t.isDisposed()&&t.dispose()}function iu(t){return oM[Ji(t,hM)]}function ru(t){return oM[t]}function au(t,e){rM[t]=e}function ou(t){eM.push(t)}function su(t,e){pu(tM,t,e,zS)}function lu(t){nM.push(t)}function uu(t,e,n){"function"==typeof e&&(n=e,e="");var i=DS(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,CS(jS.test(i)&&jS.test(e)),QS[i]||(QS[i]={action:n,actionInfo:t}),JS[e]=i}function hu(t,e){ds.register(t,e)}function cu(t){var e=ds.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function du(t,e){pu(iM,t,e,NS,"layout")}function fu(t,e){pu(iM,t,e,HS,"visual")}function pu(t,e,n,i,r){(AS(e)||DS(e))&&(n=e,e=i);var a=al.wrapStageHandler(n,r);return a.__prio=e,a.__raw=n,t.push(a),a}function gu(t,e){aM[t]=e}function vu(t){return tw.extend(t)
+}function mu(t){return Gw.extend(t)}function yu(t){return Hw.extend(t)}function _u(t){return Qs.extend(t)}function xu(t){n("createCanvas",t)}function bu(t,e,n){MS.registerMap(t,e,n)}function wu(t){var e=MS.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}function Su(t){return t}function Mu(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||Su,this._newKeyGetter=i||Su,this.context=r}function Iu(t,e,n,i,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[i](t[a],a),s=e[o];null==s?(n.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}function Cu(t){var e={},n=e.encode={},i=N(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};f(t.dimensions,function(e){var s=t.getDimensionInfo(e),l=s.coordDim;if(l){var u=s.coordDimIndex;Tu(n,l)[u]=e,s.isExtraCoord||(i.set(l,1),Du(s.type)&&(r[0]=e),Tu(o.encode,l)[u]=s.index),s.defaultTooltip&&a.push(e)}fM.each(function(t,e){var i=Tu(n,e),r=s.otherDims[e];null!=r&&r!==!1&&(i[r]=s.name)})});var s=[],l={};i.each(function(t,e){var i=n[e];l[e]=i[0],s=s.concat(i)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(r=u.slice());var h=n.tooltip;return h&&h.length?a=h.slice():a.length||(a=r.slice()),n.defaultedLabel=r,n.defaultedTooltip=a,e}function Tu(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Au(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Du(t){return!("ordinal"===t||"time"===t)}function ku(t){return t._rawCount>65535?_M:bM}function Pu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Lu(t,e){f(wM.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,f(SM,function(n){t[n]=i(e[n])}),t._calculationInfo=o(e._calculationInfo)}function Ou(t,e,n,i,r){var a=yM[e.type],o=i-1,s=e.name,l=t[s][o];if(l&&l.length<n){for(var u=new a(Math.min(r-o*n,n)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var c=i*n;r>c;c+=n)t[s].push(new a(Math.min(r-c,n)))}function zu(t){var e=t._invertedIndicesMap;f(e,function(n,i){var r=t._dimensionInfos[i],a=r.ordinalMeta;if(a){n=e[i]=new xM(a.categories.length);for(var o=0;o<n.length;o++)n[o]=vM;for(var o=0;o<t._count;o++)n[t.get(i,o)]=o}})}function Eu(t,e,n){var i;if(null!=e){var r=t._chunkSize,a=Math.floor(n/r),o=n%r,s=t.dimensions[e],l=t._storage[s][a];if(l){i=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Ru(t){return t}function Bu(t){return t<this._count&&t>=0?this._indices[t]:-1}function Nu(t,e){var n=t._idList[e];return null==n&&(n=Eu(t,t._idDimIdx,e)),null==n&&(n=mM+e),n}function Vu(t){return x(t)||(t=[t]),t}function Fu(t,e){var n=t.dimensions,i=new MM(p(n,t.getDimensionInfo,t),t.hostModel);Lu(i,t);for(var r=i._storage={},a=t._storage,o=0;o<n.length;o++){var s=n[o];a[s]&&(u(e,s)>=0?(r[s]=Hu(a[s]),i._rawExtent[s]=Gu(),i._extent[s]=null):r[s]=a[s])}return i}function Hu(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=Pu(t[n]);return e}function Gu(){return[1/0,-1/0]}function Wu(t,e,n){function r(t,e,n){null!=fM.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,h.set(e,!0))}Zo.isInstance(e)||(e=Zo.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var a=(n.dimsDef||[]).slice(),l=N(n.encodeDef),u=N(),h=N(),c=[],d=Uu(e,t,a,n.dimCount),p=0;d>p;p++){var g=a[p]=o({},S(a[p])?a[p]:{name:a[p]}),v=g.name,m=c[p]={otherDims:{}};null!=v&&null==u.get(v)&&(m.name=m.displayName=v,u.set(v,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName)}l.each(function(t,e){if(t=Vi(t).slice(),1===t.length&&!w(t[0])&&t[0]<0)return void l.set(e,!1);var n=l.set(e,[]);f(t,function(t,i){w(t)&&(t=u.get(t)),null!=t&&d>t&&(n[i]=t,r(c[t],e,i))})});var y=0;f(t,function(t){var e,t,n,a;if(w(t))e=t,t={};else{e=t.name;var o=t.ordinalMeta;t.ordinalMeta=null,t=i(t),t.ordinalMeta=o,n=t.dimsDef,a=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var u=l.get(e);if(u!==!1){var u=Vi(u);if(!u.length)for(var h=0;h<(n&&n.length||1);h++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&u.push(y++)}f(u,function(i,o){var l=c[i];if(r(s(l,t),e,o),null==l.name&&n){var u=n[o];!S(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}a&&s(l.otherDims,a)})}});var _=n.generateCoord,x=n.generateCoordCount,b=null!=x;x=_?x||1:0;for(var M=_||"value",I=0;d>I;I++){var m=c[I]=c[I]||{},C=m.coordDim;null==C&&(m.coordDim=Zu(M,h,b),m.coordDimIndex=0,(!_||0>=x)&&(m.isExtraCoord=!0),x--),null==m.name&&(m.name=Zu(m.coordDim,u)),null==m.type&&ns(e,I,m.name)&&(m.type="ordinal")}return c}function Uu(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function Zu(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function Xu(t,e,n){n=n||{};var i,r,a,o,s=n.byIndex,l=n.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,n){w(t)&&(e[n]=t={name:t}),u&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||i||(s=!0),r){a="__\x00ecstackresult",o="__\x00ecstackedover",i&&(i.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function Yu(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function ju(t,e){return Yu(t,e)?t.getCalculationInfo("stackResultDimension"):e}function qu(t,e,n){n=n||{},Zo.isInstance(t)||(t=Zo.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),a=ds.get(r),o=Wo(e);o&&(i=p(o.coordSysDims,function(t){var e={name:t},n=o.axisMap.get(t);if(n){var i=n.get("type");e.type=Au(i)}return e})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=TM(t,{coordDimensions:i,generateCoord:n.generateCoord});o&&f(u,function(t,e){var n=t.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=Xu(e,u),c=new MM(u,e);c.setCalculationInfo(h);var d=null!=s&&Ku(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function Ku(t){if(t.sourceFormat===ow){var e=$u(t.data||[]);return null!=e&&!x(Hi(e))}}function $u(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function Qu(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Ju(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function th(t){return t._map||(t._map=N(t.categories))}function eh(t){return S(t)&&null!=t.value?t.value:t+""}function nh(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=xo(a/e,!0);null!=n&&n>o&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=ih(o),l=r.niceTickExtent=[PM(Math.ceil(t[0]/o)*o,s),PM(Math.floor(t[1]/o)*o,s)];return ah(l,t),r}function ih(t){return co(t)+2}function rh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function ah(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),rh(t,0,e),rh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function oh(t,e,n,i){var r=[];if(!t)return r;var a=1e4;e[0]<n[0]&&r.push(e[0]);for(var o=n[0];o<=n[1]&&(r.push(o),o=PM(o+t,i),o!==r[r.length-1]);)if(r.length>a)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function sh(t){return t.get("stack")||zM+t.seriesIndex}function lh(t){return t.dim+t.index}function uh(t,e){var n=[];return e.eachSeriesByType(t,function(t){ph(t)&&!gh(t)&&n.push(t)}),n}function hh(t){var e=[];return f(t,function(t){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=r.getExtent(),o="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=so(t.get("barWidth"),o),l=so(t.get("barMaxWidth"),o),u=t.get("barGap"),h=t.get("barCategoryGap");e.push({bandWidth:o,barWidth:s,barMaxWidth:l,barGap:u,barCategoryGap:h,axisKey:lh(r),stackId:sh(t)})}),ch(e)}function ch(t){var e={};f(t,function(t){var n=t.axisKey,i=t.bandWidth,r=e[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=r.stacks;e[n]=r;var o=t.stackId;a[o]||r.autoWidthCount++,a[o]=a[o]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[o].width&&(a[o].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[o].maxWidth=l);var u=t.barGap;null!=u&&(r.gap=u);var h=t.barCategoryGap;null!=h&&(r.categoryGap=h)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=so(t.categoryGap,r),o=so(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),f(i,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;f(i,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+o)}),h&&(c-=h.width*o);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+o)})}),n}function dh(t,e,n){if(t&&e){var i=t[lh(e)];return null!=i&&null!=n&&(i=i[sh(n)]),i}}function fh(t,e){var n=uh(t,e),i=hh(n),r={};f(n,function(t){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=sh(t),s=i[lh(a)][o],l=s.offset,u=s.width,h=n.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=Yu(e,d),g=h.isHorizontal(),v=vh(a,h,p),m=0,y=e.count();y>m;m++){var _=e.get(d,m),x=e.get(f,m);if(!isNaN(_)&&!isNaN(x)){var b=_>=0?"p":"n",w=v;p&&(r[o][x]||(r[o][x]={p:v,n:v}),w=r[o][x][b]);var S,M,I,C;if(g){var T=n.dataToPoint([_,x]);S=w,M=T[1]+l,I=T[0]-v,C=u,Math.abs(I)<c&&(I=(0>I?-1:1)*c),p&&(r[o][x][b]+=I)}else{var T=n.dataToPoint([x,_]);S=T[0]+l,M=w,I=u,C=T[1]-v,Math.abs(C)<c&&(C=(0>=C?-1:1)*c),p&&(r[o][x][b]+=C)}e.setItemLayout(m,{x:S,y:M,width:I,height:C})}}},this)}function ph(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function gh(t){return t.pipelineContext&&t.pipelineContext.large}function vh(t,e){return e.toGlobalCoord(e.dataToCoord(0))}function mh(t,e){return $M(t,KM(e))}function yh(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,u=null!=s,h=t.getExtent();"ordinal"===a?n=e.getCategories().length:(i=e.get("boundaryGap"),x(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=so(i[0],1),i[1]=so(i[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==o&&(o="ordinal"===a?n?0:0/0:h[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:0/0:h[1]+i[1]*r),"dataMin"===o?o=h[0]:"function"==typeof o&&(o=o({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==o||!isFinite(o))&&(o=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(T(o)||T(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),0>o&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,p=uh("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=hh(p),v=_h(o,s,e,g);o=v.min,s=v.max}}return[o,s]}function _h(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=dh(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;f(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(o,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=1-(s+l)/a,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function xh(t,e){var n=yh(t,e),i=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function bh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new kM(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new OM;default:return(Qu.getClass(e)||OM).create(t)}}function wh(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||0>n&&0>i)}function Sh(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(Mh(t,i),r)}:function(e){return t.scale.getLabel(e)}}function Mh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Ih(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===t.type,o=n.getExtent();a?r=n.count():(i=n.getTicks(),r=i.length);var s,l=t.getLabelModel(),u=Sh(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;r>c;c+=h){var d=i?i[c]:o[0]+c,f=u(d),p=l.getTextRect(f),g=Ch(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Ch(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n),l=new bn(i.x,i.y,o,s);return l}function Th(t){var e=t.get("interval");return null==e?"auto":e}function Ah(t){return"category"===t.type&&0===Th(t.getLabelModel())}function Dh(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function kh(t,e,n,i,r,a,o){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?oa(t.slice(8),new bn(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?aa(t.slice(7),{},new bn(e,n,i,r),o?"center":"cover"):new cI({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=Dh,l.setColor(a),l}function Ph(t){return qu(t.getSource(),t)}function Lh(t,e){var n=e;Ja.isInstance(e)||(n=new Ja(e),c(n,iI));var i=bh(n);return i.setExtent(t[0],t[1]),xh(i,n),i}function Oh(t){c(t,iI)}function zh(t,e){return Math.abs(t-e)<pI}function Eh(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];i+=Lr(r[0],r[1],o[0],o[1],e,n),r=o}var s=t[0];return zh(r[0],s[0])&&zh(r[1],s[1])||(i+=Lr(r[0],r[1],s[0],s[1],e,n)),0!==i}function Rh(t,e,n){if(this.name=t,this.geometries=e,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}function Bh(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var r=n[i],a=r.geometry,o=a.coordinates,s=a.encodeOffsets,l=0;l<o.length;l++){var u=o[l];if("Polygon"===a.type)o[l]=Nh(u,s[l],e);else if("MultiPolygon"===a.type)for(var h=0;h<u.length;h++){var c=u[h];u[h]=Nh(c,s[l][h],e)}}return t.UTF8Encoding=!1,t}function Nh(t,e,n){for(var i=[],r=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,i.push([s/n,l/n])}return i}function Vh(t){return"category"===t.type?Hh(t):Uh(t)}function Fh(t,e){return"category"===t.type?Wh(t,e):{ticks:t.scale.getTicks()}}function Hh(t){var e=t.getLabelModel(),n=Gh(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function Gh(t,e){var n=Zh(t,"labels"),i=Th(e),r=Xh(n,i);if(r)return r;var a,o;return b(i)?a=Qh(t,i):(o="auto"===i?jh(t):i,a=$h(t,o)),Yh(n,i,{labels:a,labelCategoryInterval:o})}function Wh(t,e){var n=Zh(t,"ticks"),i=Th(e),r=Xh(n,i);if(r)return r;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),b(i))a=Qh(t,i,!0);else if("auto"===i){var s=Gh(t,t.getLabelModel());o=s.labelCategoryInterval,a=p(s.labels,function(t){return t.tickValue})}else o=i,a=$h(t,o,!0);return Yh(n,i,{ticks:a,tickCategoryInterval:o})}function Uh(t){var e=t.scale.getTicks(),n=Sh(t);return{labels:p(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function Zh(t,e){return vI(t)[e]||(vI(t)[e]=[])}function Xh(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function Yh(t,e,n){return t.push({key:e,value:n}),n}function jh(t){var e=vI(t).autoInterval;return null!=e?e:vI(t).autoInterval=t.calculateCategoryInterval()}function qh(t){var e=Kh(t),n=Sh(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,v=Fn(n(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/h,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=vI(t.model),b=x.lastAutoInterval,w=x.lastTickCount;return null!=b&&null!=w&&Math.abs(b-_)<=1&&Math.abs(w-o)<=1&&b>_?_=b:(x.lastTickCount=o,x.lastAutoInterval=_),_}function Kh(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 $h(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:a.getLabel(t),tickValue:t})}var r=Sh(t),a=t.scale,o=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=o[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Ah(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==o[0]&&i(o[0]);for(var g=h;g<=o[1];g+=u)i(g);return p&&g-u!==o[1]&&i(o[1]),l}function Qh(t,e,n){var i=t.scale,r=Sh(t),a=[];return f(i.getTicks(),function(t){var o=i.getLabel(t);e(t,o)&&a.push(n?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})}),a}function Jh(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function tc(t,e,n,i,r){function a(t,e){return h?t>e:e>t}var o=e.length;if(t.onBand&&!i&&o){var s,l=t.getExtent();if(1===o)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;f(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[o-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function ec(t){return this._axes[t]}function nc(t){wI.call(this,t)}function ic(t,e){return e.type||(e.data?"category":"value")}function rc(t,e){return t.getCoordSysModel()===e}function ac(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function oc(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)sc(o[u])&&(a=o[u]);else for(var h in o)if(o.hasOwnProperty(h)&&sc(o[h])&&!i[r(o[h])]){a=o[h];break}a&&(i[r(a)]=!0)}}function sc(t){return t&&"category"!==t.type&&"time"!==t.type&&wh(t)}function lc(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}}function uc(t){return p(PI,function(e){var n=t.getReferringComponents(e)[0];return n})}function hc(t){return"cartesian2d"===t.get("coordinateSystem")}function cc(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Ns(t,e,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=Ns(t,e,n[a]);r.push(o)}return r.join(" ")}}function dc(t,e,n,i,r,a){var o=n.getModel("label"),s=n.getModel("emphasis.label");Aa(t,e,o,s,{labelFetcher:r,labelDataIndex:a,defaultText:cc(r.getData(),a),isRectText:!0,autoColor:i}),fc(t),fc(e)}function fc(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function pc(t,e,n){var i=t.getArea(),r=t.getBaseAxis().isHorizontal(),a=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;a-=u/2,o-=u/2,s+=u,l+=u;var h=new rb({shape:{x:a,y:o,width:s,height:l}});return e&&(h.shape[r?"width":"height"]=0,Ha(h,{shape:{width:s,height:l}},n)),h}function gc(t,e,n){var i=t.getArea(),r=new Kx({shape:{cx:lo(t.cx,1),cy:lo(t.cy,1),r0:lo(i.r0,1),r:lo(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&(r.shape.endAngle=i.startAngle,Ha(r,{shape:{endAngle:i.endAngle}},n)),r}function vc(t,e,n){return t?"polar"===t.type?gc(t,e,n):"cartesian2d"===t.type?pc(t,e,n):null:null}function mc(t,e){var n=t.getArea&&t.getArea();if("cartesian2d"===t.type){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}function yc(t,e,n){n.style.text=null,Fa(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function _c(t,e,n){n.style.text=null,Fa(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}function xc(t,e,n,i,r,a,o,l){var u=e.getItemVisual(n,"color"),h=e.getItemVisual(n,"opacity"),c=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(s({fill:u,opacity:h},c.getBarItemStyle()));var f=i.getShallow("cursor");f&&t.attr("cursor",f);var p=o?r.height>0?"bottom":"top":r.width>0?"left":"right";l||dc(t.style,d,i,u,a,n,p),Ma(t,d)}function bc(t,e){var n=t.get(EI)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function wc(t,e,n){var i=t.getData(),r=[],a=i.getLayout("valueAxisHorizontal")?1:0;r[1-a]=i.getLayout("valueAxisStart");var o=new GI({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__baseDimIdx:a,__largeDataIndices:i.getLayout("largeDataIndices"),__barWidth:i.getLayout("barWidth")});e.add(o),Mc(o,t,i),o.seriesIndex=t.seriesIndex,t.get("silent")||(o.on("mousedown",WI),o.on("mousemove",WI))}function Sc(t,e,n){var i=t.__baseDimIdx,r=1-i,a=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];RI[0]=e,RI[1]=n;for(var u=RI[i],h=RI[1-i],c=u-s,d=u+s,f=0,p=a.length/2;p>f;f++){var g=2*f,v=a[g+i],m=a[g+r];if(v>=c&&d>=v&&(m>=l?h>=l&&m>=h:h>=m&&l>=h))return o[f]}return-1}function Mc(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function Ic(t,e,n,i){var r,a,o=go(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return vo(o-UI/2)?(a=l?"bottom":"top",r="center"):vo(o-1.5*UI)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*UI>o&&o>UI/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function Cc(t,e,n){if(!Ah(t.axis)){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];i===!1?(Tc(a),Tc(u)):Ac(a,o)&&(i?(Tc(o),Tc(h)):(Tc(a),Tc(u))),r===!1?(Tc(s),Tc(c)):Ac(l,s)&&(r?(Tc(l),Tc(d)):(Tc(s),Tc(c)))}}function Tc(t){t&&(t.ignore=!0)}function Ac(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Ae([]);return Le(r,r,-t.rotation),n.applyTransform(ke([],r,t.getLocalTransform())),i.applyTransform(ke([],r,e.getLocalTransform())),n.intersect(i)}}function Dc(t){return"middle"===t||"center"===t}function kc(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),a=r.getModel("lineStyle"),o=r.get("length"),l=i.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]=n.tickDirection*o,c&&(ae(u,u,c),ae(h,h,c));var g=new ob({anid:"tick_"+l[f].tickValue,subPixelOptimize:!0,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:s(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0});t.group.add(g),d.push(g)}return d}}function Pc(t,e,n){var i=e.axis,r=A(n.axisLabelShow,e.get("axisLabel.show"));if(r&&!i.scale.isBlank()){var a=e.getModel("axisLabel"),o=a.get("margin"),s=i.getViewLabels(),l=(A(n.labelRotate,a.get("rotate"))||0)*UI/180,u=jI(n.rotation,l,n.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=qI(e),p=e.get("triggerEvent");return f(s,function(r,s){var l=r.tickValue,f=r.formattedLabel,g=r.rawLabel,v=a;h&&h[l]&&h[l].textStyle&&(v=new Ja(h[l].textStyle,a,e.ecModel));var m=v.getTextColor()||e.get("axisLine.lineStyle.color"),y=i.dataToCoord(l),_=[y,n.labelOffset+n.labelDirection*o],x=new Xx({anid:"label_"+l,position:_,rotation:u.rotation,silent:d,z2:10});ka(x.style,v,{text:f,textAlign:v.getShallow("align",!0)||u.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof m?m("category"===i.type?g:"value"===i.type?l+"":l,s):m}),p&&(x.eventData=YI(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),c.push(x),t.group.add(x),x.decomposeTransform()}),c}}function Lc(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Oc(n,t,e),n.seriesInvolved&&Ec(n,t),n}function Oc(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];KI(n.getCoordinateSystems(),function(n){function s(i,s,l){var h=l.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||i||Hc(h))){null==s&&(s=h.get("triggerTooltip")),h=i?zc(l,c,r,e,i,s):h;var f=h.get("snap"),p=Gc(l.model),g=s||f||"category"===l.type,v=t.axesInfo[p]={key:p,axis:l,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Hc(h),seriesModels:[]};u[p]=v,t.seriesInvolved|=g;var m=Rc(a,l);if(null!=m){var y=o[m]||(o[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=a[m].mapper,v.linkGroup=y}}}if(n.axisPointerEnabled){var l=Gc(n.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=n;var h=n.model,c=h.getModel("tooltip",i);if(KI(n.getAxes(),$I(s,!1,null)),n.getTooltipAxes&&i&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=n.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&KI(p.baseAxes,$I(s,f?"cross":!0,d)),f&&KI(p.otherAxes,$I(s,"cross",!1))}}})}function zc(t,e,n,r,a,o){var l=e.getModel("axisPointer"),u={};KI(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=i(l.get(t))}),u.snap="category"!==t.type&&!!o,"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:!0,!o){var d=u.lineStyle=l.get("crossStyle");d&&s(h,d.textStyle)}}return t.model.getModel("axisPointer",new Ja(u,n,r))}function Ec(t,e){e.eachSeries(function(e){var n=e.coordinateSystem,i=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);n&&"none"!==i&&i!==!1&&"item"!==i&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&KI(t.coordSysAxesInfo[Gc(n.model)],function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function Rc(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(Bc(a[i+"AxisId"],n.id)||Bc(a[i+"AxisIndex"],n.componentIndex)||Bc(a[i+"AxisName"],n.name))return r}}function Bc(t,e){return"all"===t||x(t)&&u(t,e)>=0||t===e}function Nc(t){var e=Vc(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Hc(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function Vc(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Gc(t)]}function Fc(t){var e=Vc(t);return e&&e.axisPointerModel}function Hc(t){return!!t.get("handle.show")}function Gc(t){return t.type+"||"+t.id}function Wc(t,e,n,i,r,a){var o=QI.getAxisPointerClass(t.axisPointerClass);if(o){var s=Fc(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,i,a):Uc(t,i)}}function Uc(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}function Zc(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,h=i.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(o){var g=o.toGlobalCoord(o.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 v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),A(n.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}function Xc(t,e,n){Py.call(this),this.updateData(t,e,n)}function Yc(t){return[t[0]/2,t[1]/2]}function jc(t,e){this.parent.drift(t,e)}function qc(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var n=this.__symbolOriginalScale,i=n[1]/n[0],r={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Kc(t){this.group=new Py,this._symbolCtor=t||Xc}function $c(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 Qc(t){return null==t||S(t)||(t={isIgnore:t}),t||{}}function Jc(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 td(t,e,n){var i,r=t.getBaseAxis(),a=t.getOtherAxis(r),o=ed(a,n),s=r.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=p(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(i|=Yu(e,d[0]))&&(d[0]=f),(i|=Yu(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function ed(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}function nd(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function id(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}function rd(t){return isNaN(t[0])||isNaN(t[1])}function ad(t,e,n,i,r,a,o,s,l,u){return"none"!==u&&u?od.apply(this,arguments):sd.apply(this,arguments)}function od(t,e,n,i,r,a,o,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(rd(p)){if(h){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],v="y"===u?1:0,m=(p[v]-g[v])*l;pC(vC,g),vC[v]=g[v]+m,pC(mC,p),mC[v]=p[v]-m,t.bezierCurveTo(vC[0],vC[1],mC[0],mC[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function sd(t,e,n,i,r,a,o,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(rd(p)){if(h){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]),pC(vC,p);else if(l>0){var g=d+a,v=e[g];if(h)for(;v&&rd(e[g]);)g+=a,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||rd(v))pC(mC,p);else{rd(v)&&!h&&(v=p),Y(gC,v,y);
+var _,x;if("x"===u||"y"===u){var b="x"===u?0:1;_=Math.abs(p[b]-y[b]),x=Math.abs(p[b]-v[b])}else _=Rm(p,y),x=Rm(p,v);m=x/(x+_),fC(mC,p,gC,-l*(1-m))}cC(vC,vC,s),dC(vC,vC,o),cC(mC,mC,s),dC(mC,mC,o),t.bezierCurveTo(vC[0],vC[1],mC[0],mC[1],p[0],p[1]),fC(vC,p,gC,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function ld(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var a=t[r];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function ud(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function hd(t){return"number"==typeof t?t:t?.5:0}function cd(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();a>r;r++)i.push(nd(n,t,e,r));return i}function dd(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];a.push(l);var u=[];switch(n){case"end":u[r]=s[r],u[1-r]=l[1-r],a.push(u);break;case"middle":var h=(l[r]+s[r])/2,c=[];u[r]=c[r]=h,u[1-r]=l[1-r],c[1-r]=s[1-r],a.push(u),a.push(c);break;default:u[r]=l[r],u[1-r]=s[1-r],a.push(u)}}return t[o]&&a.push(t[o]),a}function fd(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,a=n.length-1;a>=0;a--){var o=n[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(i=l&&l.coordDim,"x"===i||"y"===i){r=n[a];break}}if(r){var u=e.getAxis(i),h=p(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,v=h[0].coord-g,m=h[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-v)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var _=new db(0,0,0,0,h,!0);return _[i]=v,_[i+"2"]=m,_}}}function pd(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!gd(a,e))){var o=e.mapDimension(a.dim),s={};return f(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function gd(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(),a=Math.max(1,Math.round(r/5)),o=0;r>o;o+=a)if(1.5*Xc.getSymbolSize(e,o)[t.isHorizontal()?1:0]>i)return!1;return!0}function vd(t,e,n){if("cartesian2d"===t.type){var i=t.getBaseAxis().isHorizontal(),r=pc(t,e,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return gc(t,e,n)}function md(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){yd(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function yd(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=n?i:0,u=[o*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function _d(t,e){Py.call(this);var n=new Kx({z2:2}),i=new eb,r=new Xx;this.add(n),this.add(i),this.add(r),this.updateData(t,e,!0)}function xd(t,e,n,i,r,a,o){function s(e,n,i){for(var r=e;n>r;r++)if(t[r].y+=i,r>e&&n>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,i/2);l(n-1,i/2)}function l(e,n){for(var i=e;i>=0&&(t[i].y-=n,!(i>0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function u(t,e,n,i,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++){var u=Math.abs(t[s].y-i),h=t[s].len,c=t[s].len2,d=r+h>u?Math.sqrt((r+h+c)*(r+h+c)-u*u):Math.abs(t[s].x-n);e&&d>=o&&(d=o-10),!e&&o>=d&&(d=o+10),t[s].x=n+d*a,o=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,r),c=t[g].y+t[g].height;0>o-c&&l(d-1,c-o);for(var g=0;d>g;g++)t[g].y>=n?p.push(t[g]):f.push(t[g]);u(f,!1,e,n,i,r),u(p,!0,e,n,i,r)}function bd(t,e,n,i,r,a){for(var o=[],s=[],l=0;l<t.length;l++)wd(t[l])||(t[l].x<e?o.push(t[l]):s.push(t[l]));xd(s,e,n,i,1,r,a),xd(o,e,n,i,-1,r,a);for(var l=0;l<t.length;l++)if(!wd(t[l])){var u=t[l].linePoints;if(u){var h=u[1][0]-u[2][0];u[2][0]=t[l].x<e?t[l].x+3:t[l].x-3,u[1][1]=u[2][1]=t[l].y,u[1][0]=u[2][0]+h}}}function wd(t){return"center"===t.position}function Sd(){this.group=new Py}function Md(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],n={coords:e};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),a([n,t[0],t[1]])}))}function Id(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Cd(t){return"_"+t+"Type"}function Td(t,e,n){var i=e.getItemVisual(n,"color"),r=e.getItemVisual(n,t),a=e.getItemVisual(n,t+"Size");if(r&&"none"!==r){x(a)||(a=[a,a]);var o=kh(r,-a[0]/2,-a[1]/2,a[0],a[1],i);return o.name=t,o}}function Ad(t){var e=new ZC({name:"line",subPixelOptimize:!0});return Dd(e.shape,t),e}function Dd(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=0/0,t.cpy1=0/0)}function kd(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.childOfName("label");if(e||n||!i.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var o=t.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=Y([],u,l);if(te(h,h),e){e.attr("position",l);var c=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])}if(n){n.attr("position",u);var c=o.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),n.attr("scale",[r*s,r*s])}if(!i.ignore){i.attr("position",u);var d,f,p,g=5*r;if("end"===i.__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"===i.__position){var v=s/2,c=o.tangentAt(v),m=[c[1],-c[0]],y=o.pointAt(v);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),d=[y[0]+m[0]*g,y[1]+m[1]*g],f="center",p="bottom";var _=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(_=Math.PI+_),i.attr("rotation",_)}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";i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:d,scale:[r,r]})}}}}function Pd(t,e,n){Py.call(this),this._createLine(t,e,n)}function Ld(t){this._ctor=t||Pd,this.group=new Py}function Od(t,e,n,i){var r=e.getItemLayout(n);if(Bd(r)){var a=new t._ctor(e,n,i);e.setItemGraphicEl(n,a),t.group.add(a)}}function zd(t,e,n,i,r,a){var o=e.getItemGraphicEl(i);return Bd(n.getItemLayout(r))?(o?o.updateData(n,r,a):o=new t._ctor(n,r,a),n.setItemGraphicEl(r,o),void t.group.add(o)):void t.group.remove(o)}function Ed(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 Rd(t){return isNaN(t[0])||isNaN(t[1])}function Bd(t){return!Rd(t[0])&&!Rd(t[1])}function Nd(t,e,n){Py.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}function Vd(t,e,n){Py.call(this),this._createPolyline(t,e,n)}function Fd(t,e,n){Nd.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}function Hd(){this.group=new Py}function Gd(t){return t instanceof Array||(t=[t,t]),t}function Wd(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r),o=so(n[0],e.getWidth()),s=so(n[1],e.getHeight()),l=so(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Ud(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function Zd(t,e,n){var i,r={},a="toggleSelected"===t;return n.eachComponent("legend",function(n){a&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name));var o=n.getData();f(o,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&i:i}})}),"allSelect"===t||"inverseSelect"===t?{selected:r}:{name:e.name,selected:r}}function Xd(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},o=Ro(i,a,r);$b(e.get("orient"),t,e.get("itemGap"),o.width,o.height),Bo(t,i,a,r)}function Yd(t,e){var n=Hb(e.get("padding")),i=e.getItemStyle(["color","opacity"]);i.fill=e.get("backgroundColor");var t=new rb({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});return t}function jd(t,e,n,i,r,a){var o;return"line"!==e&&e.indexOf("empty")<0?(o=n.getItemStyle(),t.style.stroke=i,a||(o.stroke=r)):o=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function qd(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Kd(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function $d(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function Qd(t,e,n){var i=t.getOrient(),r=[1,1];r[i.index]=0,No(e,n,{type:"box",ignoreSize:r})}function Jd(t,e,n,i,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var s=tf(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==r.seriesIndex&&o(r,l[0]),!i&&t.snap&&a.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l,r),n.showTooltip(t,s,u)}}function tf(t,e){var n=e.axis,i=n.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return _T(e.seriesModels,function(e){var l,u,h=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,n);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null),!u.length)return;l=e.getData().get(h[0],u[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);o>=f&&((o>f||d>=0&&0>s)&&(o=f,s=d,r=l,a.length=0),_T(u,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:r}}function ef(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function nf(t,e,n,i){var r=n.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Gc(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:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function rf(t,e,n){var i=n.axesInfo=[];_T(e,function(e,n){var r=e.axisPointerModel.option,a=t[n];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function af(t,e,n,i){if(uf(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})}function of(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",a=bT(i)[r]||{},o=bT(i)[r]={};_T(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&_T(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];f(a,function(t,e){!o[e]&&l.push(t)}),f(o,function(t,e){!a[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function sf(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}}function lf(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 uf(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function hf(t,e,n){if(!ym.node){var i=e.getZr();ST(i).records||(ST(i).records={}),cf(i,e);var r=ST(i).records[t]||(ST(i).records[t]={});r.handler=n}}function cf(t,e){function n(n,i){t.on(n,function(n){var r=gf(e);MT(ST(t).records,function(t){t&&i(t,n,r.dispatchAction)}),df(r.pendings,e)})}ST(t).initialized||(ST(t).initialized=!0,n("click",_(pf,"click")),n("mousemove",_(pf,"mousemove")),n("globalout",ff))}function df(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))}function ff(t,e,n){t.handler("leave",null,n)}function pf(t,e,n,i){e.handler(t,n,i)}function gf(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}}function vf(t,e){if(!ym.node){var n=e.getZr(),i=(ST(n).records||{})[t];i&&(ST(n).records[t]=null)}}function mf(){}function yf(t,e,n,i){_f(CT(n).lastProp,i)||(CT(n).lastProp=i,e?Fa(n,i,t):(n.stopAnimation(),n.attr(i)))}function _f(t,e){if(S(t)&&S(e)){var n=!0;return f(e,function(e,i){n=n&&_f(t[i],e)}),!!n}return t===e}function xf(t,e){t[e.get("label.show")?"show":"hide"]()}function bf(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wf(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 Sf(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle(),e.fill=null):"shadow"===n&&(e=i.getAreaStyle(),e.stroke=null),e}function Mf(t,e,n,i,r){var a=n.get("value"),o=Cf(a,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),s=n.getModel("label"),l=Hb(s.get("padding")||0),u=s.getFont(),h=Fn(o,u),c=r.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),If(c,d,f,i);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function If(t,e,n,i){var r=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,a)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Cf(t,e,n,i,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:Mh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),w(o)?a=o.replace("{value}",a):b(o)&&(a=o(s))}return a}function Tf(t,e,n){var i=Te();return Le(i,i,n.rotation),Pe(i,i,n.position),Wa([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function Af(t,e,n,i,r,a){var o=ZI.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),Mf(e,i,r,a,{position:Tf(i.axis,t,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Df(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function kf(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function Pf(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function Lf(t){return"x"===t.dim?0:1}function Of(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return p(OT,function(t){return t+"transition:"+n}).join(";")}function zf(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),PT(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function Ef(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),a=t.get("padding");return n&&e.push(Of(n)),i&&(ym.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+Qe(i)),e.push("filter:alpha(opacity=70)"))),PT(["width","color","radius"],function(n){var i="border-"+n,r=LT(i),a=t.get(r);null!=a&&e.push(i+":"+a+("color"===n?"":"px"))}),e.push(zf(r)),null!=a&&e.push("padding:"+Hb(a).join("px ")+"px"),e.join(";")+";"}function Rf(t,e){if(ym.wxa)return null;var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;ye(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function Bf(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function Nf(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Ja.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Ja(n,e,e.ecModel))}return e}function Vf(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function Ff(t,e,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>i?t-=l+a:t+=a),null!=o&&(e+u+o>r?e-=u+o:e+=o),[t,e]}function Hf(t,e,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,i)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Gf(t,e,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":o=e.x+l/2-i/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-i/2,s=e.y+u+a;break;case"left":o=e.x-i-a,s=e.y+u/2-r/2;break;case"right":o=e.x+l+a,s=e.y+u/2-r/2}return[o,s]}function Wf(t){return"center"===t||"middle"===t}function Uf(t){Fi(t,"label",["show"])}function Zf(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Xf(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Yf(t,e,n,i,r,a){var o=[],s=Yu(e,i),l=s?e.getCalculationInfo("stackResultDimension"):i,u=Jf(e,l,t),h=e.indicesOfNearest(l,u)[0];o[r]=e.get(n,h),o[a]=e.get(i,h);var c=ho(e.get(i,h));return c=Math.min(c,20),c>=0&&(o[a]=+o[a].toFixed(c)),o}function jf(t,e){var n=t.getData(),r=t.coordinateSystem;if(e&&!Xf(e)&&!x(e.coord)&&r){var a=r.dimensions,o=qf(e,n,r,t);if(e=i(e),e.type&&UT[e.type]&&o.baseAxis&&o.valueAxis){var s=GT(a,o.baseAxis.dim),l=GT(a,o.valueAxis.dim);e.coord=UT[e.type](n,o.baseDataDim,o.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;2>h;h++)UT[u[h]]&&(u[h]=Jf(n,n.mapDimension(a[h]),u[h]));e.coord=u}}return e}function qf(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(Kf(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 Kf(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r<i.length;r++){var a=n.getDimensionInfo(i[r]);if(a.name===e)return a.coordDim}}function $f(t,e){return t&&t.containData&&e.coord&&!Zf(e)?t.containData(e.coord):!0}function Qf(t,e,n,i){return 2>i?t.coord&&t.coord[i]:t.value}function Jf(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,function(t){isNaN(t)||(i+=t,r++)}),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)["max"===n?1:0]}function tp(t,e,n){var i=e.coordinateSystem;t.each(function(r){var a,o=t.getItemModel(r),s=so(o.get("x"),n.getWidth()),l=so(o.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=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);a=i.dataToPoint([u,h])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(r,a)})}function ep(t,e,n){var i;i=t?p(t&&t.dimensions,function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},n)}):[{name:"value",type:"float"}];var r=new MM(i,n),a=p(n.get("data"),_(jf,e));return t&&(a=v(a,_($f,t))),r.initData(a,null,t?Qf:function(t){return t.value}),r}function np(t){return!isNaN(t)&&!isFinite(t)}function ip(t,e,n,i){var r=1-t,a=i.dimensions[t];return np(e[r])&&np(n[r])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function rp(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(ip(1,n,i,t)||ip(0,n,i,t)))return!0}return $f(t,e[0])&&$f(t,e[1])}function ap(t,e,n,i,r){var a,o=i.coordinateSystem,s=t.getItemModel(e),l=so(s.get("x"),r.getWidth()),u=so(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)a=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=o.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=o.dataToPoint([c,d])}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y"),h=o.dimensions;np(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):np(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}function op(t,e,n){var i;i=t?p(t&&t.dimensions,function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},n)}):[{name:"value",type:"float"}];var r=new MM(i,n),a=new MM(i,n),o=new MM([],n),l=p(n.get("data"),_(XT,e,t,n));t&&(l=v(l,_(rp,t)));var u=t?Qf:function(t){return t.value};return r.initData(p(l,function(t){return t[0]}),null,u),a.initData(p(l,function(t){return t[1]}),null,u),o.initData(p(l,function(t){return t[2]})),o.hasItemOption=!0,{from:r,to:a,line:o}}function sp(t){return!isNaN(t)&&!isFinite(t)}function lp(t,e,n){var i=1-t;return sp(e[i])&&sp(n[i])}function up(t,e){var n=e.coord[0],i=e.coord[1];return"cartesian2d"===t.type&&n&&i&&(lp(1,n,i,t)||lp(0,n,i,t))?!0:$f(t,{coord:n,x:e.x0,y:e.y0})||$f(t,{coord:i,x:e.x1,y:e.y1})}function hp(t,e,n,i,r){var a,o=i.coordinateSystem,s=t.getItemModel(e),l=so(s.get(n[0]),r.getWidth()),u=so(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)a=i.getMarkerPosition(t.getValues(n,e));else{var h=t.get(n[0],e),c=t.get(n[1],e),d=[h,c];o.clampData&&o.clampData(d,d),a=o.dataToPoint(d,!0)}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y"),h=t.get(n[0],e),c=t.get(n[1],e);sp(h)?a[0]=f.toGlobalCoord(f.getExtent()["x0"===n[0]?0:1]):sp(c)&&(a[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}function cp(t,e,n){var i,r,a=["x0","y0","x1","y1"];t?(i=p(t&&t.dimensions,function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return s({name:t},i)}),r=new MM(p(a,function(t,e){return{name:t,type:i[e%2].type}}),n)):(i=[{name:"value",type:"float"}],r=new MM(i,n));var o=p(n.get("data"),_(YT,e,t,n));t&&(o=v(o,_(up,t)));var l=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(o,null,l),r.hasItemOption=!0,r}function dp(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,n){t.push(n)})}function fp(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)})}function pp(t){var e=t.categories,n=t.visual,i=t.categoryMap={};if($T(e,function(t,e){i[t]=e}),!x(n)){var r=[];S(n)?$T(n,function(t,e){var n=i[e];r[null!=n?n:JT]=t}):r[JT]=n,n=Sp(t,r)}for(var a=e.length-1;a>=0;a--)null==n[a]&&(delete i[e[a]],e.pop())}function gp(t,e){var n=t.visual,i=[];S(n)?$T(n,function(t){i.push(t)}):null!=n&&i.push(n);var r={color:1,symbol:1};e||1!==i.length||r.hasOwnProperty(t.type)||(i[1]=i[0]),Sp(t,i)}function vp(t){return{applyVisual:function(e,n,i){e=this.mapValueToVisual(e),i("color",t(n("color"),e))},_doMap:bp([0,1])}}function mp(t){var e=this.option.visual;return e[Math.round(oo(t,[0,1],[0,e.length-1],!0))]||{}}function yp(t){return function(e,n,i){i(t,this.mapValueToVisual(e))}}function _p(t){var e=this.option.visual;return e[this.option.loop&&t!==JT?t%e.length:t]}function xp(){return this.option.visual[0]}function bp(t){return{linear:function(e){return oo(e,t,this.option.visual,!0)},category:_p,piecewise:function(e,n){var i=wp.call(this,n);return null==i&&(i=oo(e,t,this.option.visual,!0)),i},fixed:xp}}function wp(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=tA.findPieceIndex(t,n),r=n[i];if(r&&r.visual)return r.visual[this.type]}}function Sp(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return je(t)})),e}function Mp(t,e,n){return t?n>=e:n>e}function Ip(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Cp(t,e,n){function r(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var a={};return iA(e,function(e){var o=a[e]=r();iA(t[e],function(t,r){if(tA.isValidType(r)){var a={type:r,visual:t};n&&n(a,e),o[r]=new tA(a),"opacity"===r&&(a=i(a),a.type="colorAlpha",o.__hidden.__alphaForOpacity=new tA(a))}})}),a}function Tp(t,e,n){var r;f(n,function(t){e.hasOwnProperty(t)&&Ip(e[t])&&(r=!0)}),r&&f(n,function(n){e.hasOwnProperty(n)&&Ip(e[n])?t[n]=i(e[n]):delete t[n]})}function Ap(t,e,n,i,r,a){function o(t){return n.getItemVisual(h,t)}function s(t,e){n.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=n.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=i.call(r,t),f=e[d],p=u[d],g=0,v=p.length;v>g;g++){var m=p[g];f[m]&&f[m].applyVisual(t,o,s)}}var u={};f(t,function(t){var n=tA.prepareVisualTypes(e[t]);u[t]=n});var h;null==a?n.each(l):n.each([a],l)}function Dp(t,e,n,i){function r(t,r){function o(t){return r.getItemVisual(l,t)}function s(t,e){r.setItemVisual(l,t,e)}null!=i&&(i=r.getDimension(i));for(var l;null!=(l=t.next());){var u=r.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=i?r.get(i,l,!0):l,c=n(h),d=e[c],f=a[c],p=0,g=f.length;g>p;p++){var v=f[p];d[v]&&d[v].applyVisual(h,o,s)}}}var a={};return f(t,function(t){var n=tA.prepareVisualTypes(e[t]);a[t]=n}),{progress:r}}function kp(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range,a=e[t];return Pp(a,r)}},rect:function(i,r,a){if(i){var o=a.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]<s[0]&&s.reverse(),Pp(s[0],o)||Pp(s[1],o)||Pp(o[0],s)||Pp(o[1],s)}}}}function Pp(t,e){return e[0]<=t&&t<=e[1]}function Lp(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!aA[i.mainType]&&r&&r.model!==n}function Op(t){return t=Rp(t),function(e){return Xa(e,t)}}function zp(t,e){return t=Rp(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,a=i?t.x:t.y;return[a,a+(r||0)]}}function Ep(t,e,n){return t=Rp(t),function(i,r){return t.contain(r[0],r[1])&&!Lp(i,e,n)}}function Rp(t){return bn.create(t)}function Bp(t,e,n){var i=this._targetInfoList=[],r={},a=Vp(e,t);oA(dA,function(t,e){(!n||!n.include||sA(n.include,e)>=0)&&t(a,i,r)})}function Np(t){return t[0]>t[1]&&t.reverse(),t}function Vp(t,e){return Ki(t,e,{includeMainTypes:hA})}function Fp(t,e,n,i){var r=n.getAxis(["x","y"][t]),a=Np(p([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),o=[];return o[t]=a,o[1-t]=[0/0,0/0],{values:a,xyMinMax:o}}function Hp(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Gp(t,e){var n=Wp(t),i=Wp(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function Wp(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function Up(t,e,n,i,r){if(r){var a=t.getZr();if(!a[_A]){a[yA]||(a[yA]=Zp);var o=rl(a,yA,n,e);o(t,i)}}}function Zp(t,e){if(!t.isDisposed()){var n=t.getZr();n[_A]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[_A]=!1}}function Xp(t,e,n,i){for(var r=0,a=e.length;a>r;r++){var o=e[r];if(t[o.brushType](i,n,o.selectors,o))return!0}}function Yp(t){var e=t.brushSelector;if(w(e)){var n=[];return f(rA,function(t,i){n[i]=function(n,i,r,a){var o=i.getItemLayout(n);return t[e](o,r,a)}}),n}if(b(e)){var i={};return f(rA,function(t,n){i[n]=e}),i}return e}function jp(t,e){var n=t.option.seriesIndex;return null!=n&&"all"!==n&&(x(n)?u(n,e)<0:e!==n)}function qp(t){var e=t.selectors={};return f(rA[t.brushType],function(n,i){e[i]=function(i){return n(i,e,t)}}),t}function Kp(t){return new bn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function $p(t,e){return r({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Ja(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Qp(t,e,n){var i=tg(t);i[e]=n}function Jp(t,e,n){var i=tg(t),r=i[e];r===n&&(i[e]=null)}function tg(t){return t[SA]||(t[SA]={})}function eg(t){Fm.call(this),this._zr=t,this.group=new Py,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+BA++,this._handlers={},IA(NA,function(t,e){this._handlers[e]=y(t,this)},this)}function ng(t,e){var n=t._zr;t._enableGlobalPan||Qp(n,OA,t._uid),IA(t._handlers,function(t,e){n.on(e,t)}),t._brushType=e.brushType,t._brushOption=r(i(RA),e,!0)}function ig(t){var e=t._zr;Jp(e,OA,t._uid),IA(t._handlers,function(t,n){e.off(n,t)}),t._brushType=t._brushOption=null}function rg(t,e){var n=VA[e.brushType].createCover(t,e);return n.__brushOption=e,sg(n,e),t.group.add(n),n}function ag(t,e){var n=ug(e);return n.endCreating&&(n.endCreating(t,e),sg(e,e.__brushOption)),e}function og(t,e){var n=e.__brushOption;ug(e).updateCoverShape(t,e,n.range,n)}function sg(t,e){var n=e.z;null==n&&(n=kA),t.traverse(function(t){t.z=n,t.z2=n})}function lg(t,e){ug(e).updateCommon(t,e),og(t,e)}function ug(t){return VA[t.__brushOption.brushType]}function hg(t,e,n){var i=t._panels;if(!i)return!0;var r,a=t._transform;return IA(i,function(t){t.isTargetByCursor(e,n,a)&&(r=t)}),r}function cg(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null!=i?n[i]:!0}function dg(t){var e=t._covers,n=e.length;return IA(e,function(e){t.group.remove(e)},t),e.length=0,!!n}function fg(t,e){var n=CA(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 pg(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],a=n[1]-i[1],o=DA(r*r+a*a,.5);return o>PA}function gg(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function vg(t,e,n,i){var r=new Py;return r.add(new rb({name:"main",style:xg(n),silent:!0,draggable:!0,cursor:"move",drift:MA(t,e,r,"nswe"),ondragend:MA(fg,e,{isEnd:!0})})),IA(i,function(n){r.add(new rb({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:MA(t,e,r,n),ondragend:MA(fg,e,{isEnd:!0})}))}),r}function mg(t,e,n,i){var r=i.brushStyle.lineWidth||0,a=AA(r,LA),o=n[0][0],s=n[1][0],l=o-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-a+r/2,f=c-a+r/2,p=h-o,g=c-s,v=p+r,m=g+r;_g(t,e,"main",o,s,p,g),i.transformable&&(_g(t,e,"w",l,u,a,m),_g(t,e,"e",d,u,a,m),_g(t,e,"n",l,u,v,a),_g(t,e,"s",l,f,v,a),_g(t,e,"nw",l,u,a,a),_g(t,e,"ne",d,u,a,a),_g(t,e,"sw",l,f,a,a),_g(t,e,"se",d,f,a,a))}function yg(t,e){var n=e.__brushOption,i=n.transformable,r=e.childAt(0);r.useStyle(xg(n)),r.attr({silent:!i,cursor:i?"move":"default"}),IA(["w","e","n","s","se","sw","ne","nw"],function(n){var r=e.childOfName(n),a=Sg(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?EA[a]+"-resize":null})})}function _g(t,e,n,i,r,a,o){var s=e.childOfName(n);
+s&&s.setShape(Ag(Tg(t,e,[[i,r],[i+a,r+o]])))}function xg(t){return s({strokeNoScale:!0},t.brushStyle)}function bg(t,e,n,i){var r=[TA(t,n),TA(e,i)],a=[AA(t,n),AA(e,i)];return[[r[0],a[0]],[r[1],a[1]]]}function wg(t){return Ga(t.group)}function Sg(t,e){if(e.length>1){e=e.split("");var n=[Sg(t,e[0]),Sg(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}var i={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},n=Ua(i[e],wg(t));return r[n]}function Mg(t,e,n,i,r,a,o){var s=i.__brushOption,l=t(s.range),u=Cg(n,a,o);IA(r.split(""),function(t){var e=zA[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(bg(l[0][0],l[1][0],l[0][1],l[1][1])),lg(n,i),fg(n,{isEnd:!1})}function Ig(t,e,n,i){var r=e.__brushOption.range,a=Cg(t,n,i);IA(r,function(t){t[0]+=a[0],t[1]+=a[1]}),lg(t,e),fg(t,{isEnd:!1})}function Cg(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),a=i.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function Tg(t,e,n){var r=cg(t,e);return r&&r!==!0?r.clipPath(n,t._transform):i(n)}function Ag(t){var e=TA(t[0][0],t[1][0]),n=TA(t[0][1],t[1][1]),i=AA(t[0][0],t[1][0]),r=AA(t[0][1],t[1][1]);return{x:e,y:n,width:i-e,height:r-n}}function Dg(t,e,n){if(t._brushType){var i=t._zr,r=t._covers,a=hg(t,e,n);if(!t._dragging)for(var o=0;o<r.length;o++){var s=r[o].__brushOption;if(a&&(a===!0||s.panelId===a.panelId)&&VA[s.brushType].contain(r[o],n[0],n[1]))return}a&&i.setCursorStyle("crosshair")}}function kg(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Pg(t,e,n){return t.childOfName("main").contain(e,n)}function Lg(t,e,n,r){var a,o=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),pg(t)||o){if(s&&!o){"single"===l.brushMode&&dg(t);var u=i(l);u.brushType=Og(u.brushType,s),u.panelId=s===!0?null:s.panelId,o=t._creatingCover=rg(t,u),t._covers.push(o)}if(o){var h=VA[Og(t._brushType,s)],c=o.__brushOption;c.range=h.getCreatingRange(Tg(t,o,t._track)),r&&(ag(t,o),h.updateCommon(t,o)),og(t,o),a={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&hg(t,e,n)&&dg(t)&&(a={isEnd:r,removeOnClick:!0});return a}function Og(t,e){return"auto"===t?e.defaultBrushType:t}function zg(t){if(this._dragging){kg(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),n=Lg(this,t,e,!0);this._dragging=!1,this._track=[],this._creatingCover=null,n&&fg(this,n)}}function Eg(t){return{createCover:function(e,n){return vg(MA(Mg,function(e){var n=[e,[0,100]];return t&&n.reverse(),n},function(e){return e[t]}),e,n,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var n=gg(e),i=TA(n[0][t],n[1][t]),r=AA(n[0][t],n[1][t]);return[i,r]},updateCoverShape:function(e,n,i,r){var a,o=cg(e,n);if(o!==!0&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,a];t&&l.reverse(),mg(e,n,l,r)},updateCommon:yg,contain:Pg}}function Rg(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function Bg(t,e){FA[t]=e}function Ng(t){return FA[t]}function Vg(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}function Fg(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Hg(t,e,n,i){function r(t){return l[t]}function a(t,e){l[t]=e}for(var o=e.targetVisuals[i],s=tA.prepareVisualTypes(o),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=o["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(n,r,a)}return l.color}function Gg(t,e,n){if(n[0]===n[1])return n.slice();for(var i=200,r=(n[1]-n[0])/i,a=n[0],o=[],s=0;i>=s&&a<n[1];s++)o.push(a),a+=r;return o.push(n[1]),o}function Wg(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:0>n?1:e?-1:1}}function Ug(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function Zg(t,e,n){var i=t.option,r=i.align;if(null!=r&&"auto"!==r)return r;for(var a={width:e.getWidth(),height:e.getHeight()},o="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],h={},c=0;3>c;c++)h[s[1-o][c]]=u[c],h[l[c]]=2===c?n[0]:i[l[c]];var d=[["x","width",3],["y","height",0]][o],f=Ro(h,a,i.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function Xg(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function Yg(t,e,n,i){return new tb({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Xm(t.event)},ondragend:i})}function jg(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function qg(t,e,n,i){return t?[[0,-lD(e,uD(n,0))],[cD,0],[0,lD(e,uD(i-n,0))]]:[[0,0],[5,-5],[5,5]]}function Kg(t,e,n){var i=hD/2,r=t.get("hoverLinkDataSize");return r&&(i=oD(r,e,n,!0)/2),i}function $g(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function Qg(t){return"vertical"===t?"ns-resize":"ew-resize"}function Jg(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}function tv(t){return 0===t.indexOf("my")}function ev(t){this.model=t}function nv(t){this.model=t}function iv(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var a=r.getBaseAxis();if("category"===a.type){var o=a.dim+"_"+a.index;e[o]||(e[o]={categoryAxis:a,valueAxis:r.getOtherAxis(a),series:[]},i.push({axisDim:a.dim,axisIndex:a.index})),e[o].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}function rv(t){var e=[];return f(t,function(t){var n=t.categoryAxis,i=t.valueAxis,r=i.dim,a=[" "].concat(p(t.series,function(t){return t.name})),o=[n.model.getCategories()];f(t.series,function(t){o.push(t.getRawData().mapArray(r,function(t){return t}))});for(var s=[a.join(ID)],l=0;l<o[0].length;l++){for(var u=[],h=0;h<o.length;h++)u.push(o[h][l]);s.push(u.join(ID))}e.push(s.join("\n"))}),e.join("\n\n"+MD+"\n\n")}function av(t){return p(t,function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,function(){for(var t=arguments.length,r=arguments[t-1],a=e.getName(r),o=0;t-1>o;o++)i[o]=arguments[o];n.push((a?a+ID:"")+i.join(ID))}),n.join("\n")}).join("\n\n"+MD+"\n\n")}function ov(t){var e=iv(t);return{value:v([rv(e.seriesGroupByCategoryAxis),av(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+MD+"\n\n"),meta:e.meta}}function sv(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function lv(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(ID)>=0?!0:void 0}function uv(t){for(var e=t.split(/\n+/g),n=sv(e.shift()).split(CD),i=[],r=p(n,function(t){return{name:t,data:[]}}),a=0;a<e.length;a++){var o=sv(e[a]).split(CD);i.push(o.shift());for(var s=0;s<o.length;s++)r[s]&&(r[s].data[a]=o[s])}return{series:r,categories:i}}function hv(t){for(var e=t.split(/\n+/g),n=sv(e.shift()),i=[],r=0;r<e.length;r++){var a,o=sv(e[r]).split(CD),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),i[r]={name:s,value:[]},a=i[r].value):a=i[r]=[];for(var u=0;u<o.length;u++)a.push(+o[u]);1===a.length&&(l?i[r].value=a[0]:i[r]=a[0])}return{name:n,data:i}}function cv(t,e){var n=t.split(new RegExp("\n*"+MD+"\n*","g")),i={series:[]};return f(n,function(t,n){if(lv(t)){var r=uv(t),a=e[n],o=a.axisDim+"Axis";a&&(i[o]=i[o]||[],i[o][a.axisIndex]={data:r.categories},i.series=i.series.concat(r.series))}else{var r=hv(t);i.series.push(r)}}),i}function dv(t){this._dom=null,this.model=t}function fv(t,e){return p(t,function(t,n){var i=e&&e[n];return S(i)&&!x(i)?(S(t)&&!x(t)&&(t=t.value),s({value:t},i)):t})}function pv(t,e){var n=yv(t);TD(e,function(e,i){for(var r=n.length-1;r>=0;r--){var a=n[r];if(a[i])break}if(0>r){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var s=o.getPercentRange();n[0][i]={dataZoomId:i,start:s[0],end:s[1]}}}}),n.push(e)}function gv(t){var e=yv(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return TD(n,function(t,n){for(var r=e.length-1;r>=0;r--){var t=e[r][n];if(t){i[n]=t;break}}}),i}function vv(t){t[AD]=null}function mv(t){return yv(t).length}function yv(t){var e=t[AD];return e||(e=t[AD]=[{}]),e}function _v(t){return u(kD,t)>=0}function xv(t,e){t=t.slice();var n=p(t,Lo);e=(e||[]).slice();var i=p(e,Lo);return function(r,a){f(t,function(t,o){for(var s={name:t,capital:n[o]},l=0;l<e.length;l++)s[e[l]]=t+i[l];r.call(a,s)})}}function bv(t,e,n){function i(t,e){return u(e.nodes,t)>=0}function r(t,i){var r=!1;return e(function(e){f(n(t,e)||[],function(t){i.records[e.name][t]&&(r=!0)})}),r}function a(t,i){i.nodes.push(t),e(function(e){f(n(t,e)||[],function(t){i.records[e.name][t]=!0})})}return function(n){function o(t){!i(t,s)&&r(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!n)return s;a(n,s);var l;do l=!1,t(o);while(l);return s}}function wv(t,e,n){var i=[1/0,-1/0];return LD(n,function(t){var n=t.getData();n&&LD(n.mapDimension(e,!0),function(t){var e=n.getApproximateExtent(t);e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1])})}),i[1]<i[0]&&(i=[0/0,0/0]),Sv(t,i),i}function Sv(t,e){var n=t.getAxisModel(),i=n.getMin(!0),r="category"===n.get("type"),a=r&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?e[0]=i:r&&(e[0]=a>0?0:0/0);var o=n.getMax(!0);return null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:r&&(e[1]=a>0?a-1:0/0),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Mv(t,e){var n=t.getAxisModel(),i=t._percentWindow,r=t._valueWindow;if(i){var a=fo(r,[0,500]);a=Math.min(a,20);var o=e||0===i[0]&&100===i[1];n.setRange(o?null:+r[0].toFixed(a),o?null:+r[1].toFixed(a))}}function Iv(t){var e=t._minMaxSpan={},n=t._dataZoomModel,i=t._dataExtent;LD(["min","max"],function(r){var a=n.get(r+"Span"),o=n.get(r+"ValueSpan");null!=o&&(o=t.getAxisModel().axis.scale.parse(o)),null!=o?a=oo(i[0]+o,i,[0,100],!0):null!=a&&(o=oo(a,[0,100],i,!0)-i[0]),e[r+"Span"]=a,e[r+"ValueSpan"]=o})}function Cv(t){var e={};return ED(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}function Tv(t,e){var n=t._rangePropMode,i=t.get("rangeMode");ED([["start","startValue"],["end","endValue"]],function(t,r){var a=null!=e[t[0]],o=null!=e[t[1]];a&&!o?n[r]="percent":!a&&o?n[r]="value":i?n[r]=i[r]:a&&(n[r]="percent")})}function Av(t,e,n){(this._brushController=new eg(n.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function Dv(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(n){e[n]=t[n],null==e[n]&&(e[n]="all"),(e[n]===!1||"none"===e[n])&&(e[n]=[])}),e}function kv(t,e){t.setIconStatus("back",mv(e)>1?"emphasis":"normal")}function Pv(t,e,n,i,r){var a=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(a="dataZoomSelect"===i.key?i.dataZoomSelectActive:!1),n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new Bp(Dv(t.option),e,{include:["grid"]});n._brushController.setPanels(o.makePanelOpts(r,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)"}}:!1)}function Lv(t){this.model=t}function Ov(t,e,n,i){var r=n.type,a=XD.hasOwnProperty(r)?XD[r]:ra(r),o=new a(n);e.add(o),i.set(t,o),o.__ecGraphicId=t}function zv(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){zv(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function Ev(t){return t=o({},t),f(["id","parentId","$action","hv","bounding"].concat(qb),function(e){delete t[e]}),t}function Rv(t,e){var n;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}function Bv(t,e){var n=t.exist;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}function Nv(t,e,n){var i=o({},n),a=t[e],s=n.$action||"merge";"merge"===s?a?(r(a,i,!0),No(a,i,{ignoreSize:!0}),Fo(n,a)):t[e]=i:"replace"===s?t[e]=i:"remove"===s&&a&&(t[e]=null)}function Vv(t,e){t&&(t.hv=e.hv=[Rv(e,["left","right"]),Rv(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Fv(t,e){var n=t.eventData;t.silent||t.ignore||n||(n=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=t.info)}function Hv(t){return document.createElementNS(jD,t)}function Gv(t){return QD(1e4*t)/1e4}function Wv(t){return rk>t&&t>-rk}function Uv(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==$D}function Zv(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==$D}function Xv(t,e){e&&Yv(t,"transform","matrix("+KD.call(e,",")+")")}function Yv(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function jv(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function qv(t,e,n,i){if(Uv(e,n)){var r=n?e.textFill:e.fill;r="transparent"===r?$D:r,Yv(t,"fill",r),Yv(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else Yv(t,"fill",$D);if(Zv(e,n)){var a=n?e.textStroke:e.stroke;a="transparent"===a?$D:a,Yv(t,"stroke",a);var o=n?e.textStrokeWidth:e.lineWidth,s=!n&&e.strokeNoScale?i.getLineScale():1;Yv(t,"stroke-width",o/s),Yv(t,"paint-order",n?"stroke":"fill"),Yv(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Yv(t,"stroke-dasharray",e.lineDash.join(",")),Yv(t,"stroke-dashoffset",QD(e.lineDashOffset||0))):Yv(t,"stroke-dasharray",""),e.lineCap&&Yv(t,"stroke-linecap",e.lineCap),e.lineJoin&&Yv(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Yv(t,"stroke-miterlimit",e.miterLimit)}else Yv(t,"stroke",$D)}function Kv(t){for(var e=[],n=t.data,i=t.len(),r=0;i>r;){var a=n[r++],o="",s=0;switch(a){case qD.M:o="M",s=2;break;case qD.L:o="L",s=2;break;case qD.Q:o="Q",s=4;break;case qD.C:o="C",s=6;break;case qD.A:var l=n[r++],u=n[r++],h=n[r++],c=n[r++],d=n[r++],f=n[r++],p=n[r++],g=n[r++],v=Math.abs(f),m=Wv(v-nk)&&!Wv(v),y=!1;y=v>=nk?!0:Wv(v)?!1:(f>-ek&&0>f||f>ek)==!!g;var _=Gv(l+h*tk(d)),x=Gv(u+c*JD(d));m&&(f=g?nk-1e-4:-nk+1e-4,y=!0,9===r&&e.push("M",_,x));var b=Gv(l+h*tk(d+f)),w=Gv(u+c*JD(d+f));e.push("A",Gv(h),Gv(c),QD(p*ik),+y,+g,b,w);break;case qD.Z:o="Z";break;case qD.R:var b=Gv(n[r++]),w=Gv(n[r++]),S=Gv(n[r++]),M=Gv(n[r++]);e.push("M",b,w,"L",b+S,w,"L",b+S,w+M,"L",b,w+M,"L",b,w)}o&&e.push(o);for(var I=0;s>I;I++)e.push(Gv(n[r++]))}return e.join(" ")}function $v(t,e){switch(e){case"middle":Yv(t,"dominant-baseline","middle"),Yv(t,"alignment-baseline","middle");break;case"bottom":Yv(t,"dominant-baseline","ideographic"),Yv(t,"alignment-baseline","ideographic");break;default:Yv(t,"dominant-baseline","hanging"),Yv(t,"alignment-baseline","hanging")}}function Qv(){}function Jv(t,e){for(var n=0,i=e.length,r=0,a=0;i>n;n++){var o=e[n];if(o.removed){for(var s=[],l=a;l<a+o.count;l++)s.push(l);o.indices=s,a+=o.count}else{for(var s=[],l=r;l<r+o.count;l++)s.push(l);o.indices=s,r+=o.count,o.added||(a+=o.count)}}return e}function tm(t){return{newPos:t.newPos,components:t.components.slice(0)}}function em(t,e,n,i,r){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=r||"_dom",this.nextId=0}function nm(t,e){em.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function im(t,e){em.call(this,t,e,"clipPath","__clippath_in_use__")}function rm(t,e){em.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function am(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function om(t){return parseInt(t,10)}function sm(t){return t instanceof Hr?ak:t instanceof wi?ok:t instanceof Xx?sk:ak}function lm(t,e){return e&&t&&e.parentNode!==t}function um(t,e,n){if(lm(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function hm(t,e){if(lm(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function cm(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function dm(t){return t.__textSvgEl}function fm(t){return t.__svgEl}function pm(t){return function(){Iy('In SVG mode painter not support method "'+t+'"')}}var gm=2311,vm=function(){return gm++},mm={};mm="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);var ym=mm,_m={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},xm={"[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},bm=Object.prototype.toString,wm=Array.prototype,Sm=wm.forEach,Mm=wm.filter,Im=wm.slice,Cm=wm.map,Tm=wm.reduce,Am={},Dm=function(){return Am.createCanvas()};Am.createCanvas=function(){return document.createElement("canvas")};var km,Pm="__ec_primitive__";B.prototype={constructor:B,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var n in this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var Lm=(Object.freeze||Object)({$override:n,clone:i,merge:r,mergeAll:a,extend:o,defaults:s,createCanvas:Dm,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:_,isArray:x,isFunction:b,isString:w,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:C,eqNaN:T,retrieve:A,retrieve2:D,retrieve3:k,slice:P,normalizeCssArray:L,assert:O,trim:z,setAsPrimitive:E,isPrimitive:R,createHashMap:N,concatArray:V,noop:F}),Om="undefined"==typeof Float32Array?Array:Float32Array,zm=j,Em=q,Rm=ee,Bm=ne,Nm=(Object.freeze||Object)({create:H,copy:G,clone:W,set:U,add:Z,scaleAndAdd:X,sub:Y,len:j,length:zm,lenSquare:q,lengthSquare:Em,mul:K,div:$,dot:Q,scale:J,normalize:te,distance:ee,dist:Rm,distanceSquare:ne,distSquare:Bm,negate:ie,lerp:re,applyTransform:ae,min:oe,max:se});le.prototype={constructor:le,_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(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,e.drift(r,a,t),this.dispatchToElement(ue(e,t),"drag",t.event);var o=this.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(ue(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Vm=Array.prototype.slice,Fm=function(t){this._$handlers={},this._$eventProcessor=t};Fm.prototype={constructor:Fm,one:function(t,e,n,i){return ce(this,t,e,n,i,!0)},on:function(t,e,n,i){return ce(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,a=n[t].length;a>r;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>3&&(i=Vm.call(i,1));for(var a=e.length,o=0;a>o;){var s=e[o];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(o,1),a--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>4&&(i=Vm.call(i,1,i.length-1));for(var a=i[i.length-1],o=e.length,s=0;o>s;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var Hm=Math.log(2),Gm="undefined"!=typeof window&&!!window.addEventListener,Wm=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Um="___zrEVENTSAVED",Zm=[],Xm=Gm?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Ym=function(){this._track=[]};Ym.prototype={constructor:Ym,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;o>a;a++){var s=i[a],l=pe(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in jm)if(jm.hasOwnProperty(e)){var n=jm[e](this._track,t);if(n)return n}}};var jm={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var a=be(i)/be(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=we(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},qm="silent";Ie.prototype.dispose=function(){};var Km=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],$m=function(t,e,n,i){Fm.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new Ie,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(n)};$m.prototype={constructor:$m,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(Km,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,r=i.target;r&&!r.__zr&&(i=this.findHover(i.x,i.y),r=i.target);var a=this._hovered=this.findHover(e,n),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),r&&o!==r&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==r&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,n=t.toElement||t.relatedTarget;do n=n&&n.parentNode;while(n&&9!==n.nodeType&&!(e=n===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.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,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,a=Se(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=Ce(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==qm)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Ym);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){$m.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),i=n.target;if("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||Rm(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),c($m,Fm),c($m,le);var Qm="undefined"==typeof Float32Array?Array:Float32Array,Jm=(Object.freeze||Object)({create:Te,identity:Ae,copy:De,mul:ke,translate:Pe,rotate:Le,scale:Oe,invert:ze,clone:Ee}),ty=Ae,ey=5e-5,ny=function(t){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},iy=ny.prototype;iy.transform=null,iy.needLocalTransform=function(){return Re(this.rotation)||Re(this.position[0])||Re(this.position[1])||Re(this.scale[0]-1)||Re(this.scale[1]-1)};var ry=[];iy.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(!n&&!e)return void(i&&ty(i));i=i||Te(),n?this.getLocalTransform(i):ty(i),e&&(n?ke(i,t.transform,i):De(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(ry);var a=ry[0]<0?-1:1,o=ry[1]<0?-1:1,s=((ry[0]-a)*r+a)/ry[0]||0,l=((ry[1]-o)*r+o)/ry[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||Te(),ze(this.invTransform,i)},iy.getLocalTransform=function(t){return ny.getLocalTransform(this,t)},iy.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},iy.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var ay=[],oy=Te();iy.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=this.position,r=this.scale;Re(e-1)&&(e=Math.sqrt(e)),Re(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},iy.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ke(ay,t.invTransform,e),e=ay);var n=this.origin;n&&(n[0]||n[1])&&(oy[4]=n[0],oy[5]=n[1],ke(ay,e,oy),ay[4]-=n[0],ay[5]-=n[1],e=ay),this.setLocalTransform(e)}},iy.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)},iy.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ae(n,n,i),n},iy.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ae(n,n,i),n},ny.getLocalTransform=function(t,e){e=e||[],ty(e);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),Oe(e,e,i),r&&Le(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var sy={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*(-Math.pow(2,-10*(t-1))+2)},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,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*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?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-sy.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*sy.bounceIn(2*t):.5*sy.bounceOut(2*t-1)+.5}};Be.prototype={constructor:Be,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var n=(t-this._startTime-this._pausedTime)/this._life;if(!(0>n)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?sy[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1===n?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){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var ly=function(){this.head=null,this.tail=null,this._len=0},uy=ly.prototype;uy.insert=function(t){var e=new hy(t);return this.insertEntry(e),e},uy.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++},uy.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--},uy.len=function(){return this._len},uy.clear=function(){this.head=this.tail=null,this._len=0};var hy=function(t){this.value=t,this.next,this.prev},cy=function(t){this._list=new ly,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},dy=cy.prototype;dy.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new hy(e),o.key=t,n.insertEntry(o),i[t]=o}return r},dy.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},dy.clear=function(){this._list.clear(),this._map={}};var fy={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]},py=new cy(20),gy=null,vy=Je,my=tn,yy=(Object.freeze||Object)({parse:je,lift:$e,toHex:Qe,fastLerp:Je,fastMapToColor:vy,lerp:tn,mapToColor:my,modifyHSL:en,modifyAlpha:nn,stringify:rn}),_y=Array.prototype.slice,xy=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||an,this._setter=i||on,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]
+};xy.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:pn(r)})}n[i].push({time:t,value:e[i]})}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,n=0;e>n;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,a=function(){r--,r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=mn(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var r=e[i];t&&r.onframe(this._target,1),n&&n.removeClip(r)}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 by=1;"undefined"!=typeof window&&(by=Math.max(window.devicePixelRatio||1,1));var wy=0,Sy=by,My=function(){};1===wy&&(My=console.error);var Iy=My,Cy=function(){this.animators=[]};Cy.prototype={constructor:Cy,animate:function(t,e){var n,i=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;i="shape"===o[0];for(var l=0,h=o.length;h>l;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(!n)return void Iy('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new xy(n,e);return d.during(function(){r.dirty(i)}).done(function(){c.splice(u(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;n>i;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,a){yn(this,t,e,n,i,r,a)},animateFrom:function(t,e,n,i,r,a){yn(this,t,e,n,i,r,a,!0)}};var Ty=function(t){ny.call(this,t),Fm.call(this,t),Cy.call(this,t),this.id=t.id||vm()};Ty.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 n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[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(S(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);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 n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},c(Ty,Cy),c(Ty,ny),c(Ty,Fm);var Ay=ae,Dy=Math.min,ky=Math.max;bn.prototype={constructor:bn,union:function(t){var e=Dy(t.x,this.x),n=Dy(t.y,this.y);this.width=ky(t.x+t.width,this.x+this.width)-e,this.height=ky(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:function(){var t=[],e=[],n=[],i=[];return function(r){if(r){t[0]=n[0]=this.x,t[1]=i[1]=this.y,e[0]=i[0]=this.x+this.width,e[1]=n[1]=this.y+this.height,Ay(t,t,r),Ay(e,e,r),Ay(n,n,r),Ay(i,i,r),this.x=Dy(t[0],e[0],n[0],i[0]),this.y=Dy(t[1],e[1],n[1],i[1]);var a=ky(t[0],e[0],n[0],i[0]),o=ky(t[1],e[1],n[1],i[1]);this.width=a-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=Te();return Pe(r,r,[-e.x,-e.y]),Oe(r,r,[n,i]),Pe(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof bn||(t=bn.create(t));var e=this,n=e.x,i=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(o>i||n>s||l>a||r>u)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new bn(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}}},bn.create=function(t){return new bn(t.x,t.y,t.width,t.height)};var Py=function(t){t=t||{},Ty.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Py.prototype={constructor:Py,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},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 n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Py&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=u(i,t);return 0>r?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Py&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e<n.length;e++)t=n[e],i&&(i.delFromStorage(t),t instanceof Py&&t.delChildrenFromStorage(i)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof Py&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof Py&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new bn(0,0,0,0),i=t||this._children,r=[],a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),e=e||n.clone(),e.union(n)):(e=e||s.clone(),e.union(s))}}return e||n}},h(Py,Ty);var Ly=32,Oy=7,zy=function(){this._roots=[],this._displayList=[],this._displayListLen=0};zy.prototype={constructor:zy,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].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,n=this._displayList,i=0,r=e.length;r>i;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,ym.canvasSupported&&Dn(n,kn)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Py&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof Py&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,i=t.length;i>e;e++)this.delRoot(t[e]);else{var r=u(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Py&&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:kn};var Ey={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Ry=function(t,e,n){return Ey.hasOwnProperty(e)?n*=t.dpr:n},By={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Ny=9,Vy=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Fy=function(t){this.extendFrom(t,!1)};Fy.prototype={constructor:Fy,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,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,n){var i=this,r=n&&n.style,a=!r||t.__attrCachedBy!==By.STYLE_BIND;t.__attrCachedBy=By.STYLE_BIND;for(var o=0;o<Vy.length;o++){var s=Vy[o],l=s[0];(a||i[l]!==r[l])&&(t[l]=Ry(t,l,i[l]||s[1]))}if((a||i.fill!==r.fill)&&(t.fillStyle=i.fill),(a||i.stroke!==r.stroke)&&(t.strokeStyle=i.stroke),(a||i.opacity!==r.opacity)&&(t.globalAlpha=null==i.opacity?1:i.opacity),(a||i.blend!==r.blend)&&(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.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 n in t)!t.hasOwnProperty(n)||e!==!0&&(e===!1?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},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,n){for(var i="radial"===e.type?Ln:Pn,r=i(t,e,n),a=e.colorStops,o=0;o<a.length;o++)r.addColorStop(a[o].offset,a[o].color);return r}};for(var Hy=Fy.prototype,Gy=0;Gy<Vy.length;Gy++){var Wy=Vy[Gy];Wy[0]in Hy||(Hy[Wy[0]]=Wy[1])}Fy.getGradient=Hy.getGradient;var Uy=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Uy.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Zy=function(t,e,n){var i;n=n||Sy,"string"==typeof t?i=zn(t,e,n):S(t)&&(i=t,t=i.id),this.id=t,this.dom=i;var r=i.style;r&&(i.onselectstart=On,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["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=n};Zy.prototype={constructor:Zy,__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=zn("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,r=i.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n=this.dom,i=this.ctx,r=n.width,a=n.height,e=e||this.clearColor,o=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,r/l,a/l)),i.clearRect(0,0,r,a),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||Fy.getGradient(i,e,{x:0,y:0,width:r,height:a}),e.__canvasGradient=u):e.image&&(u=Uy.prototype.getCanvasPattern.call(e,i)),i.save(),i.fillStyle=u||e,i.fillRect(0,0,r,a),i.restore()}if(o){var h=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(h,0,0,r,a),i.restore()}}};var Xy="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Yy=new cy(50),jy={},qy=0,Ky=5e3,$y=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Qy="12px sans-serif",Jy={};Jy.measureText=function(t,e){var n=l();return n.font=e||Qy,n.measureText(t)};var t_=Qy,e_={left:1,right:1,center:1},n_={top:1,bottom:1,middle:1},i_=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],r_={},a_={},o_=new bn,s_=function(){};s_.prototype={constructor:s_,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&ii(n,!0);var i=n.text;if(null!=i&&(i+=""),xi(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(o_.copy(e),o_.applyTransform(r),e=o_),ai(this,t,i,n,e,Ny),t.restore()}}},bi.prototype={constructor:bi,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,globalScaleRatio:1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return i.contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Ty.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 Fy(t,this),this.dirty(!1),this},calculateTextPosition:null},h(bi,Ty),c(bi,s_),wi.prototype={constructor:wi,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=Rn(i,this._image,this,this.onload);if(r&&Nn(r)){var a=n.x||0,o=n.y||0,s=n.width,l=n.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var h=n.sx||0,c=n.sy||0;t.drawImage(r,h,c,n.sWidth,n.sHeight,a,o,s,l)}else if(n.sx&&n.sy){var h=n.sx,c=n.sy,d=s-h,f=l-c;t.drawImage(r,h,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new bn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(wi,bi);var l_=1e5,u_=314159,h_=.01,c_=.001,d_=new bn(0,0,0,0),f_=new bn(0,0,0,0),p_=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=o({},n||{}),this.dpr=n.devicePixelRatio||Sy,this._singleCanvas=i,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var l=t.width,u=t.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new Zy(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[u_]=h,h.zlevel=u_,a.push(u_),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=Ai(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};p_.prototype={constructor:p_,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===i?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return n.__from=t,t.__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=u(n,e);i>=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){Dn(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(l_));var i={};n.ctx.save();for(var r=0;e>r;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(r,1),o.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(l_)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;Xy(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var t=this.getLayer(u_).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i],a=this._layers[r];a.__builtin__&&a!==this._hoverlayer&&(a.__dirty||e)&&n.push(a)}for(var o=!0,s=0;s<n.length;s++){var a=n[s],l=a.ctx,u={};l.save();var h=e?a.__startIndex:a.__drawIndex,c=!e&&a.incremental&&Date.now,d=c&&Date.now(),p=a.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(a.__startIndex===a.__endIndex)a.clear(!1,p);else if(h===a.__startIndex){var g=t[h];g.incremental&&g.notClear&&!e||a.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=a.__startIndex);for(var v=h;v<a.__endIndex;v++){var m=t[v];if(this._doPaintEl(m,a,e,u),m.__dirty=m.__dirtyText=!1,c){var y=Date.now()-d;if(y>15)break}}a.__drawIndex=v,a.__drawIndex<a.__endIndex&&(o=!1),u.prevElClipPaths&&l.restore(),l.restore()}return ym.wxa&&f(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,n,i){var r=e.ctx,a=t.transform;if(!(!e.__dirty&&!n||t.invisible||0===t.style.opacity||a&&!a[0]&&!a[3]||t.culling&&Ii(t,this._width,this._height))){var o=t.__clipPaths,s=i.prevElClipPaths;(!s||Ci(o,s))&&(s&&(r.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(r.save(),Ti(o,r),i.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,i.prevEl||null),i.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=u_);var n=this._layers[t];return n||(n=new Zy("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&r(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,a=null,o=-1,s=this._domRoot;if(n[t])return void Iy("ZLevel "+t+" has been used already");if(!Mi(e))return void Iy("Layer of zlevel "+t+" is not valid");if(r>0&&t>i[0]){for(o=0;r-1>o&&!(i[o]<t&&i[o+1]>t);o++);a=n[i[o]]}if(i.splice(o+1,0,t),n[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)},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],n=this._layers[i],n.__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],n=this._layers[i],n.__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}for(var r=null,a=0,n=0;n<t.length;n++){var o,i=t[n],s=i.zlevel;i.incremental?(o=this.getLayer(s+c_,this._needsManuallyCompositing),o.incremental=!0,a=1):o=this.getLayer(s+(a>0?h_:0),this._needsManuallyCompositing),o.__builtin__||Iy("ZLevel "+s+" has been used by unkown layer "+o.id),o!==r&&(o.__used=!0,o.__startIndex!==n&&(o.__dirty=!0),o.__startIndex=n,o.__drawIndex=o.incremental?-1:n,e(n),r=o),i.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!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 n=this._layerConfig;n[t]?r(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+h_){var o=this._layers[a];r(o,n[t],!0)}}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(u(n,t),1))},resize:function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){n.style.width=t+"px",n.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(this._progressiveLayers,function(n){n.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(u_).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[u_].dom;var e=new Zy("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[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,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Si(s[n])||Si(o.style[n]))-(Si(s[r])||0)-(Si(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+o),c=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=r.width+h+c,g=r.height+d+f;n.width=p*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,p,g),i.dpr=e;var v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var m=wi,y=new m({style:{x:0,y:0,image:n}});return null!=v.position&&(y.position=t.position=v.position),null!=v.rotation&&(y.rotation=t.rotation=v.rotation),null!=v.scale&&(y.scale=t.scale=v.scale),y}};var g_=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,Fm.call(this)};g_.prototype={constructor:g_,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=u(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,r=[],a=[],o=0;i>o;o++){var s=n[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(var o=0;i>o;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(var o=0;i>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(Xy(t),!e._paused&&e._update())}var e=this;this._running=!0,Xy(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){e=e||{};var n=new xy(t,e.loop,e.getter,e.setter);return this.addAnimator(n),n}},c(g_,Fm);var v_=300,m_=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],y_=["touchstart","touchend","touchmove"],__={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},x_=p(m_,function(t){var e=t.replace("mouse","pointer");return __[e]?e:t}),b_={mousemove:function(t){t=ye(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=ye(this.dom,t);var e=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=ye(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),b_.mousemove.call(this,t),b_.mousedown.call(this,t),ki(this)},touchmove:function(t){t=ye(this.dom,t),t.zrByTouch=!0,this.handler.processGesture(this,t,"change"),b_.mousemove.call(this,t),ki(this)},touchend:function(t){t=ye(this.dom,t),t.zrByTouch=!0,this.handler.processGesture(this,t,"end"),b_.mouseup.call(this,t),+new Date-this._lastTouchMoment<v_&&b_.click.call(this,t),ki(this)},pointerdown:function(t){b_.mousedown.call(this,t)},pointermove:function(t){Pi(t)||b_.mousemove.call(this,t)},pointerup:function(t){b_.mouseup.call(this,t)},pointerout:function(t){Pi(t)||b_.mouseout.call(this,t)}};f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){b_[t]=function(e){e=ye(this.dom,e),this.trigger(t,e)}});var w_=Oi.prototype;w_.dispose=function(){for(var t=m_.concat(y_),e=0;e<t.length;e++){var n=t[e];xe(this.dom,Di(n),this._handlers[n])}},w_.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},c(Oi,Fm);var S_=!ym.canvasSupported,M_={canvas:p_},I_={},C_="4.1.1",T_=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new zy,a=n.renderer;if(S_){if(!M_.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&M_[a]||(a="canvas");var o=new M_[a](e,r,n,t);this.storage=r,this.painter=o;var s=ym.node||ym.worker?null:new Oi(o.getViewportRoot());this.handler=new $m(r,o,s,o.root),this.animation=new g_({stage:{update:y(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(i)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(i)}};T_.prototype={constructor:T_,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=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!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){if(this.painter.addHover){var n=this.painter.addHover(t,e);return this.refreshHover(),n}},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,n){this.handler.on(t,e,n)},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,Ni(this.id)}};var A_=(Object.freeze||Object)({version:C_,init:zi,dispose:Ei,getInstance:Ri,registerPainter:Bi}),D_=f,k_=S,P_=x,L_="series\x00",O_=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],z_=0,E_=".",R_="___EC__COMPONENT__CONTAINER___",B_=0,N_=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);
+return function(e,n,i){for(var r={},a=0;a<t.length;a++){var o=t[a][1];if(!(n&&u(n,o)>=0||i&&u(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},V_=N_([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),F_={getLineStyle:function(t){var e=V_(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?!1:"dashed"===e?[i,i]:[n,n]}},H_=N_([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),G_={getAreaStyle:function(t,e){return H_(this,t,e)}},W_=Math.pow,U_=Math.sqrt,Z_=1e-8,X_=1e-4,Y_=U_(3),j_=1/3,q_=H(),K_=H(),$_=H(),Q_=Math.min,J_=Math.max,tx=Math.sin,ex=Math.cos,nx=2*Math.PI,ix=H(),rx=H(),ax=H(),ox=[],sx=[],lx={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ux=[],hx=[],cx=[],dx=[],fx=Math.min,px=Math.max,gx=Math.cos,vx=Math.sin,mx=Math.sqrt,yx=Math.abs,_x="undefined"!=typeof Float32Array,xx=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};xx.prototype={constructor:xx,_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,n){n=n||0,this._ux=yx(n/Sy/t)||0,this._uy=yx(n/Sy/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(lx.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 n=yx(t-this._xi)>this._ux||yx(e-this._yi)>this._uy||this._len<5;return this.addData(lx.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(lx.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(lx.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(lx.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=gx(r)*n+t,this._yi=vx(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(lx.R,t,e,n,i),this},closePath:function(){this.addData(lx.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];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||!_x||(this.data=new Float32Array(e));for(var n=0;e>n;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();_x&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[i++]=a[o];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];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 n,i,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=mx(h*h+c*c),f=l,p=u,g=o.length;for(h/=d,c/=d,0>a&&(a=r+a),a%=r,f-=a*h,p-=a*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)i=this._dashIdx,n=o[i],f+=h*n,p+=c*n,this._dashIdx=(i+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[i%2?"moveTo":"lineTo"](h>=0?fx(f,t):px(f,t),c>=0?fx(p,e):px(p,e));h=f-t,c=p-e,this._dashOffset=-mx(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=hr,y=0,_=this._dashIdx,x=f.length,b=0;for(0>d&&(d=c+d),d%=c,o=0;1>o;o+=.1)s=m(g,t,n,r,o+.1)-m(g,t,n,r,o),l=m(v,e,i,a,o+.1)-m(v,e,i,a,o),y+=mx(s*s+l*l);for(;x>_&&(b+=f[_],!(b>d));_++);for(o=(b-d)/y;1>=o;)u=m(g,t,n,r,o),h=m(v,e,i,a,o),_%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[_]/y,_=(_+1)%x;_%2!==0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-mx(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,_x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){ux[0]=ux[1]=cx[0]=cx[1]=Number.MAX_VALUE,hx[0]=hx[1]=dx[0]=dx[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(e=t[a],n=t[a+1],i=e,r=n),o){case lx.M:i=t[a++],r=t[a++],e=i,n=r,cx[0]=i,cx[1]=r,dx[0]=i,dx[1]=r;break;case lx.L:Sr(e,n,t[a],t[a+1],cx,dx),e=t[a++],n=t[a++];break;case lx.C:Mr(e,n,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],cx,dx),e=t[a++],n=t[a++];break;case lx.Q:Ir(e,n,t[a++],t[a++],t[a],t[a+1],cx,dx),e=t[a++],n=t[a++];break;case lx.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(i=gx(c)*u+s,r=vx(c)*h+l),Cr(s,l,u,h,c,d,f,cx,dx),e=gx(d)*u+s,n=vx(d)*h+l;break;case lx.R:i=e=t[a++],r=n=t[a++];var p=t[a++],g=t[a++];Sr(i,r,i+p,r+g,cx,dx);break;case lx.Z:e=i,n=r}oe(ux,ux,cx),se(hx,hx,dx)}return 0===a&&(ux[0]=ux[1]=hx[0]=hx[1]=0),new bn(ux[0],ux[1],hx[0]-ux[0],hx[1]-ux[1])},rebuildPath:function(t){for(var e,n,i,r,a,o,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;h>c;){var d=s[c++];switch(1===c&&(i=s[c],r=s[c+1],e=i,n=r),d){case lx.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case lx.L:a=s[c++],o=s[c++],(yx(a-i)>l||yx(o-r)>u||c===h-1)&&(t.lineTo(a,o),i=a,r=o);break;case lx.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case lx.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case lx.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],_=s[c++],x=s[c++],b=g>v?g:v,w=g>v?1:g/v,S=g>v?v/g:1,M=Math.abs(g-v)>.001,I=m+y;M?(t.translate(f,p),t.rotate(_),t.scale(w,S),t.arc(0,0,b,m,I,1-x),t.scale(1/w,1/S),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,b,m,I,1-x),1===c&&(e=gx(m)*g+f,n=vx(m)*v+p),i=gx(I)*g+f,r=vx(I)*v+p;break;case lx.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case lx.Z:t.closePath(),i=e,r=n}}}},xx.CMD=lx;var bx=2*Math.PI,Sx=2*Math.PI,Mx=xx.CMD,Ix=2*Math.PI,Cx=1e-4,Tx=[-1,-1,-1],Ax=[-1,-1],Dx=Uy.prototype.getCanvasPattern,kx=Math.abs,Px=new xx(!0);Hr.prototype={constructor:Hr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n=this.style,i=this.path||Px,r=n.hasStroke(),a=n.hasFill(),o=n.fill,s=n.stroke,l=a&&!!o.colorStops,u=r&&!!s.colorStops,h=a&&!!o.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,o,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=Dx.call(o,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Dx.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(i.setScale(v[0],v[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=n.fillOpacity){var m=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,i.fill(t),t.globalAlpha=m}else i.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r)if(null!=n.strokeOpacity){var m=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,i.stroke(t),t.globalAlpha=m}else i.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new xx},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new xx),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},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 a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Fr(a,o/s,t,e)))return!0}if(r.hasFill())return Vr(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!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):bi.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(S(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&kx(t[0]-1)>1e-10&&kx(t[3]-1)>1e-10?Math.sqrt(kx(t[0]*t[3]-t[2]*t[1])):1}},Hr.extend=function(t){var e=function(e){Hr.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};h(e,Hr);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},h(Hr,bi);var Lx=xx.CMD,Ox=[[],[],[]],zx=Math.sqrt,Ex=Math.atan2,Rx=function(t,e){var n,i,r,a,o,s,l=t.data,u=Lx.M,h=Lx.C,c=Lx.L,d=Lx.R,f=Lx.A,p=Lx.Q;for(r=0,a=0;r<l.length;){switch(n=l[r++],a=r,i=0,n){case u:i=1;break;case c:i=1;break;case h:i=3;break;case p:i=2;break;case f:var g=e[4],v=e[5],m=zx(e[0]*e[0]+e[1]*e[1]),y=zx(e[2]*e[2]+e[3]*e[3]),_=Ex(-e[1]/y,e[0]/m);l[r]*=m,l[r++]+=g,l[r]*=y,l[r++]+=v,l[r++]*=m,l[r++]*=y,l[r++]+=_,l[r++]+=_,r+=2,a=r;break;case d:s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}for(o=0;i>o;o++){var s=Ox[o];s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}}},Bx=Math.sqrt,Nx=Math.sin,Vx=Math.cos,Fx=Math.PI,Hx=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Gx=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Hx(t)*Hx(e))},Wx=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Gx(t,e))},Ux=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Zx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Xx=function(t){bi.call(this,t)};Xx.prototype={constructor:Xx,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&ii(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;return null!=i&&(i+=""),xi(i,n)?(this.setTransform(t),ai(this,t,i,n,null,e),void this.restoreTransform(t)):void(t.__attrCachedBy=By.NONE)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&ii(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var n=Fn(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(n.x+=t.x||0,n.y+=t.y||0,vi(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},h(Xx,bi);var Yx=Hr.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),jx=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],qx=function(t){return ym.browser.ie&&ym.browser.version>=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;r<n.length;r++){var a=n[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<jx.length;l++)jx[l][2]=i[jx[l][0]],i[jx[l][0]]=jx[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<jx.length;l++)i[jx[l][0]]=jx[l][2]}:t},Kx=Hr.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:qx(Hr.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*r+n,h*r+i),t.lineTo(u*a+n,h*a+i),t.arc(n,i,a,o,s,!l),t.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&t.arc(n,i,r,s,o,l),t.closePath()}}),$x=Hr.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},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)}}),Qx=function(t,e){for(var n=t.length,i=[],r=0,a=1;n>a;a++)r+=ee(t[a-1],t[a]);var o=r/2;o=n>o?n:o;for(var a=0;o>a;a++){var s,l,u,h=a/(o-1)*(e?n:n-1),c=Math.floor(h),d=h-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],u=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([jr(s[0],f[0],l[0],u[0],d,p,g),jr(s[1],f[1],l[1],u[1],d,p,g)])}return i},Jx=function(t,e,n,i){var r,a,o,s,l=[],u=[],h=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)oe(o,o,t[d]),se(s,s,t[d]);oe(o,o,i[0]),se(s,s,i[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(n)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(W(t[d]));continue}r=t[d-1],a=t[d+1]}Y(u,a,r),J(u,u,e);var g=ee(p,r),v=ee(p,a),m=g+v;0!==m&&(g/=m,v/=m),J(h,u,-g),J(c,u,v);var y=Z([],p,h),_=Z([],p,c);i&&(se(y,y,o),oe(y,y,s),se(_,_,o),oe(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l},tb=Hr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){qr(t,e,!0)}}),eb=Hr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){qr(t,e,!1)}}),nb=Math.round,ib={},rb=Hr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?($r(ib,e,this.style),n=ib.x,i=ib.y,r=ib.width,a=ib.height,ib.r=e.r,e=ib):(n=e.x,i=e.y,r=e.width,a=e.height),e.r?ni(t,e):t.rect(n,i,r,a),t.closePath()}}),ab={},ob=Hr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?(Kr(ab,e,this.style),n=ab.x1,i=ab.y1,r=ab.x2,a=ab.y2):(n=e.x1,i=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(n,i),1>o&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),sb=[],lb=Hr.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 n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(1>h&&(xr(n,o,r,h,sb),o=sb[1],r=sb[2],xr(i,s,a,h,sb),s=sb[1],a=sb[2]),t.quadraticCurveTo(o,s,r,a)):(1>h&&(pr(n,o,l,r,h,sb),o=sb[1],l=sb[2],r=sb[3],pr(i,s,u,a,h,sb),s=sb[1],u=sb[2],a=sb[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return Jr(this.shape,t,!1)},tangentAt:function(t){var e=Jr(this.shape,t,!0);return te(e,e)}}),ub=Hr.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 n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,a,o,!s)}}),hb=Hr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].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(),Hr.prototype.getBoundingRect.call(this)}}),cb=function(t){this.colorStops=t||[]};cb.prototype={constructor:cb,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var db=function(t,e,n,i,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,cb.call(this,r)};db.prototype={constructor:db},h(db,cb);var fb=function(t,e,n,i,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,cb.call(this,i)};fb.prototype={constructor:fb},h(fb,cb),ta.prototype.incremental=!0,ta.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},ta.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},ta.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},ta.prototype.eachPendingDisplayable=function(t){for(var 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])},ta.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.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}},ta.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var n=this._displayables[e];n.beforeBrush&&n.beforeBrush(t),n.brush(t,e===this._cursor?null:this._displayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=e;for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===e?null:this._temporaryDisplayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var pb=[];ta.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new bn(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(pb)),t.union(i)}this._rect=t}return this._rect},ta.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();if(i.contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){var a=this._displayables[r];if(a.contain(t,e))return!0}return!1},h(ta,bi);var gb=Math.max,vb=Math.min,mb={},yb=1,_b={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},xb="emphasis",bb="normal",wb=1,Sb={},Mb={},Ib=Yr,Cb=Qr,Tb=N(),Ab=0;ia("circle",Yx),ia("sector",Kx),ia("ring",$x),ia("polygon",tb),ia("polyline",eb),ia("rect",rb),ia("line",ob),ia("bezierCurve",lb),ia("arc",ub);var Db=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:yb,CACHED_LABEL_STYLE_PROPERTIES:_b,extendShape:ea,extendPath:na,registerShape:ia,getShapeClass:ra,makePath:aa,makeImage:oa,mergePath:Ib,resizePath:la,subPixelOptimizeLine:ua,subPixelOptimizeRect:ha,subPixelOptimize:Cb,setElementHoverStyle:ya,setHoverStyle:Ma,setAsHighDownDispatcher:Ia,isHighDownDispatcher:Ca,getHighlightDigit:Ta,setLabelStyle:Aa,modifyLabelStyle:Da,setTextStyle:ka,setText:Pa,getFont:Na,updateProps:Fa,initProps:Ha,getTransform:Ga,applyTransform:Wa,transformDirection:Ua,groupTransition:Za,clipPointsByRect:Xa,clipRectByRect:Ya,createIcon:ja,linePolygonIntersect:qa,lineLineIntersect:Ka,Group:Py,Image:wi,Text:Xx,Circle:Yx,Sector:Kx,Ring:$x,Polygon:tb,Polyline:eb,Rect:rb,Line:ob,BezierCurve:lb,Arc:ub,IncrementalDisplayable:ta,CompoundPath:hb,LinearGradient:db,RadialGradient:fb,BoundingRect:bn}),kb=["textStyle","color"],Pb={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(kb):null)},getFont:function(){return Na({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Fn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},Lb=N_([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Ob={getItemStyle:function(t,e){var n=Lb(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},zb=c,Eb=qi();Ja.prototype={constructor:Ja,init:null,mergeOption:function(t){r(this.option,t,!0)},get:function(t,e){return null==t?this.option:to(this.option,this.parsePath(t),!e&&eo(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&eo(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n,i=null==t?this.option:to(this.option,t=this.parsePath(t));return e=e||(n=eo(this,t))&&n.getModel(t),new Ja(i,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(i(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Eb(this).getParent=t},isAnimationEnabled:function(){if(!ym.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ir(Ja),rr(Ja),zb(Ja,F_),zb(Ja,G_),zb(Ja,Pb),zb(Ja,Ob);var Rb=0,Bb=1e-4,Nb=9007199254740991,Vb=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Fb=(Object.freeze||Object)({linearMap:oo,parsePercent:so,round:lo,asc:uo,getPrecision:ho,getPrecisionSafe:co,getPixelPrecision:fo,getPercentWithPrecision:po,MAX_SAFE_INTEGER:Nb,remRadian:go,isRadianAroundZero:vo,parseDate:mo,quantity:yo,nice:xo,quantile:bo,reformIntervals:wo,isNumeric:So}),Hb=L,Gb=/([&<>"'])/g,Wb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ub=["a","b","c","d","e","f","g"],Zb=function(t,e){return"{"+t+(null==e?"":e)+"}"},Xb=Xn,Yb=(Object.freeze||Object)({addCommas:Mo,toCamelCase:Io,normalizeCssArray:Hb,encodeHTML:Co,formatTpl:To,formatTplSimple:Ao,getTooltipMarker:Do,formatTime:Po,capitalFirst:Lo,truncateText:Xb,getTextBoundingRect:Oo,getTextRect:zo}),jb=f,qb=["left","right","top","bottom","width","height"],Kb=[["width","left","right"],["height","top","bottom"]],$b=Eo,Qb=(_(Eo,"vertical"),_(Eo,"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")}}}),Jb=qi(),tw=Ja.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Ja.call(this,t,e,n,i),this.uid=no("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Vo(t):{},a=e.getTheme();r(t,a.get(this.mainType)),r(t,this.getDefaultOption()),n&&No(t,i,n)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&No(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=Jb(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var a={},o=e.length-1;o>=0;o--)a=r(a,e[o],!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)})}});sr(tw,{registerWhenExtend:!0}),io(tw),ro(tw,Ho),c(tw,Qb);var ew="";"undefined"!=typeof navigator&&(ew=navigator.platform||"");var nw={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ew.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},iw=qi(),rw={clearColorPalette:function(){iw(this).colorIdx=0,iw(this).colorNameMap={}},getColorFromPalette:function(t,e,n){e=e||this;var i=iw(e),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=Vi(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?Go(s,n):o;if(l=l||o,l&&l.length){var u=l[r];return t&&(a[t]=u),i.colorIdx=(r+1)%l.length,u}}},aw={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),Uo(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Uo(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),Uo(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),Uo(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Uo(o)&&(i.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),Uo(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)})}},ow="original",sw="arrayRows",lw="objectRows",uw="keyedColumns",hw="unknown",cw="typedArray",dw="column",fw="row";Zo.seriesDataToSource=function(t){return new Zo({data:t,sourceFormat:I(t)?cw:ow,fromDataset:!1})},rr(Zo);var pw=qi(),gw="\x00_ec_inner",vw=Ja.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Ja(n),this._optionManager=i},setOption:function(t,e){O(!(gw in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):os.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,i){var r=Vi(t[e]),s=Wi(a.get(e),r);Ui(s),f(s,function(t){var n=t.option;S(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=ls(e,n,t.exist))});var l=ss(a,i);n[e]=[],a.set(e,[]),f(s,function(t,i){var r=t.exist,s=t.option;if(O(S(s)||r,"Empty component definition"),s){var u=tw.getClass(e,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=o({dependentModels:l,componentIndex:i},t.keyInfo);r=new u(s,this,this,h),o(r,h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);a.get(e)[i]=r,n[e][i]=r.option},this),"series"===e&&us(this,a.get("series"))}var n=this.option,a=this._componentsMap,s=[];jo(this),f(t,function(t,e){null!=t&&(tw.hasClass(e)?e&&s.push(e):n[e]=null==n[e]?i(t):r(n[e],t,!0))}),tw.topologicalTravel(s,tw.getAllClassMainTypes(),e,this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return f(t,function(e,n){if(tw.hasClass(n)){for(var e=Vi(e),i=e.length-1;i>=0;i--)Xi(e[i])&&e.splice(i,1);t[n]=e}}),delete t[gw],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);return n?n[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var o;if(null!=n)x(n)||(n=[n]),o=v(p(n,function(t){return a[t]}),function(t){return!!t});else if(null!=i){var s=x(i);o=v(a,function(t){return s&&u(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var l=x(r);o=v(a,function(t){return l&&u(r,t.name)>=0||!l&&t.name===r})}else o=a.slice();return hs(o,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{mainType:r,index:t[e],id:t[n],name:t[i]}}function n(e){return t.filter?v(e,t.filter):e}var i=t.query,r=t.mainType,a=e(i),o=a?this.queryComponents(a):this._componentsMap.get(r);return n(hs(o,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,i.each(function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(w(t))f(i.get(t),e,n);else if(S(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return v(e,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){f(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){f(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var n=v(this._componentsMap.get("series"),t,e);us(this,n)},restoreData:function(t){var e=this._componentsMap;us(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),tw.topologicalTravel(n,tw.getAllClassMainTypes(),function(n){f(e.get(n),function(e){("series"!==n||!rs(e,t))&&e.restoreData()})})}});c(vw,rw);var mw=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],yw={};ds.prototype={constructor:ds,create:function(t,e){var n=[];f(yw,function(i){var r=i.create(t,e);n=n.concat(r||[])}),this._coordinateSystems=n},update:function(t,e){f(this._coordinateSystems,function(n){n.update&&n.update(t,e)
+})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ds.register=function(t,e){yw[t]=e},ds.get=function(t){return yw[t]};var _w=f,xw=i,bw=p,ww=r,Sw=/^(min|max)?(.+)$/;fs.prototype={constructor:fs,setOption:function(t,e){t&&f(Vi(t.series),function(t){t&&t.data&&I(t.data)&&E(t.data)}),t=xw(t);var n=this._optionBackup,i=ps.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(ys(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=bw(e.timelineOptions,xw),this._mediaList=bw(e.mediaList,xw),this._mediaDefault=xw(e.mediaDefault),this._currentMediaIndices=[],xw(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=xw(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,r=[],a=[];if(!n.length&&!i)return a;for(var o=0,s=n.length;s>o;o++)gs(n[o].query,t,e)&&r.push(o);return!r.length&&i&&(r=[-1]),r.length&&!ms(r,this._currentMediaIndices)&&(a=bw(r,function(t){return xw(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,a}};var Mw=f,Iw=S,Cw=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],Tw=function(t,e){Mw(Is(t.series),function(t){Iw(t)&&Ms(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Mw(n,function(e){Mw(Is(t[e]),function(t){t&&(ws(t,"axisLabel"),ws(t.axisPointer,"label"))})}),Mw(Is(t.parallel),function(t){var e=t&&t.parallelAxisDefault;ws(e,"axisLabel"),ws(e&&e.axisPointer,"label")}),Mw(Is(t.calendar),function(t){xs(t,"itemStyle"),ws(t,"dayLabel"),ws(t,"monthLabel"),ws(t,"yearLabel")}),Mw(Is(t.radar),function(t){ws(t,"name")}),Mw(Is(t.geo),function(t){Iw(t)&&(Ss(t),Mw(Is(t.regions),function(t){Ss(t)}))}),Mw(Is(t.timeline),function(t){Ss(t),xs(t,"label"),xs(t,"itemStyle"),xs(t,"controlStyle",!0);var e=t.data;x(e)&&f(e,function(t){S(t)&&(xs(t,"label"),xs(t,"itemStyle"))})}),Mw(Is(t.toolbox),function(t){xs(t,"iconStyle"),Mw(t.feature,function(t){xs(t,"iconStyle")})}),ws(Cs(t.axisPointer),"label"),ws(Cs(t.tooltip).axisPointer,"label")},Aw=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Dw=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],kw=function(t,e){Tw(t,e),t.series=Vi(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var n=Ts(t,"pointer.color");null!=n&&As(t,"itemStyle.color",n)}Ds(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(Dw,function(e){var n=t[e];n&&(x(n)||(n=[n]),f(n,function(t){Ds(t)}))})},Pw=function(t){var e=N();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={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(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}}),e.each(ks)},Lw=Ps.prototype;Lw.pure=!1,Lw.persistent=!0,Lw.getSource=function(){return this._source};var Ow={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:zs},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=[],n=this._data,i=0;i<n.length;i++){var r=n[i];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Ls,getItem:Os,appendData:zs},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=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])})}},original:{count:Ls,getItem:Os,appendData:zs},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 n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},zw={arrayRows:Es,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:Es,original:function(t,e,n){var i=Hi(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:Es},Ew={arrayRows:Rs,objectRows:function(t,e){return Bs(t[e],this._dimensionInfos[e])},keyedColumns:Rs,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&Gi(t)&&(this.hasItemOption=!0),Bs(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},Rw=/\{@(.+?)\}/g,Bw={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),a=n.getName(t),o=n.getRawDataItem(t),s=n.getItemVisual(t,"color"),l=n.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=tr(h),d=this.mainType,f="series"===d,p=n.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:a,dataIndex:r,data:o,dataType:e,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Do({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,n,i,r){e=e||"normal";var a=this.getData(n),o=a.getItemModel(t),s=this.getDataParams(t,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);if("function"==typeof l)return s.status=e,s.dimensionIndex=i,l(s);if("string"==typeof l){var u=To(l,s);return u.replace(Rw,function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),Ns(a,t,n)})}},getRawValue:function(t,e){return Ns(this.getData(e),t)},formatTooltip:function(){}},Nw=Hs.prototype;Nw.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var 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);var a;this._plan&&!i&&(a=this._plan(this.context));var o=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=Ws(this,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 d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||f>d)){var p=this._progress;if(x(p))for(var g=0;g<p.length;g++)Gs(this,p[g],d,f,l,u);else Gs(this,p,d,f,l,u)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Vw=function(){function t(){return n>i?i++:null}function e(){var t=i%o*r+Math.ceil(i/o),e=i>=n?null:a>t?t:i;return i++,e}var n,i,r,a,o,s={reset:function(l,u,h,c){i=l,n=u,r=h,a=c,o=Math.ceil(a/r),s.next=r>1&&a>0?e:t}};return s}();Nw.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Nw.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Nw.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Nw.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Nw.getUpstream=function(){return this._upstream},Nw.getDownstream=function(){return this._downstream},Nw.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Fw=qi(),Hw=tw.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Fs({count:Xs,reset:Ys}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),qo(this);var i=this.getInitialData(t,n);qs(i,this),this.dataTask.context.data=i,Fw(this).dataBeforeProcessed=i,Us(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Vo(t):{},a=this.subType;tw.hasClass(a)&&(a+="Series"),r(t,e.getTheme().get(this.subType)),r(t,this.getDefaultOption()),Fi(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&No(t,i,n)},mergeOption:function(t,e){t=r(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&No(this.option,t,n),qo(this);var i=this.getInitialData(t,e);qs(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Fw(this).dataBeforeProcessed=i,Us(this)},fillDataTextStyle:function(t){if(t&&!I(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Fi(t[n],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=$s(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return Fw(this).data},setData:function(t){var e=$s(this);if(e){var n=e.context;n.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}Fw(this).data=t},getSource:function(){return Yo(this)},getRawData:function(){return Fw(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,n,i){function r(n){function r(t,n){var r=c.getDimensionInfo(n);if(r&&r.otherDims.tooltip!==!1){var d=r.type,f="sub"+o.seriesIndex+"at"+h,p=Do({color:y,type:"subItem",renderMode:i,markerId:f}),g="string"==typeof p?p:p.content,v=(a?g+Co(r.displayName||"-")+": ":"")+Co("ordinal"===d?t+"":"time"===d?e?"":Po("yyyy/MM/dd hh:mm:ss",t):Mo(t));v&&s.push(v),l&&(u[f]=y,++h)}}var a=g(n,function(t,e,n){var i=c.getDimensionInfo(n);return t|=i&&i.tooltip!==!1&&null!=i.displayName},0),s=[];d.length?f(d,function(e){r(Ns(c,t,e),e)}):f(n,r);var p=a?l?"\n":"<br/>":"",v=p+s.join(p||", ");return{renderMode:i,content:v,style:u}}function a(t){return{renderMode:i,content:Co(Mo(t)),style:u}}var o=this;i=i||"html";var s="html"===i?"<br/>":"\n",l="richText"===i,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,v=this.getRawValue(t),m=x(v),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var _=p>1||m&&!p?r(v):a(p?Ns(c,t,d[0]):m?v[0]:v),b=_.content,w=o.seriesIndex+"at"+h,M=Do({color:y,type:"item",renderMode:i,markerId:w});u[w]=y,++h;var I=c.getName(t),C=this.name;Zi(this)||(C=""),C=C?Co(C)+(e?": ":s):"";var T="string"==typeof M?M:M.content,A=e?T+C+b:C+T+(I?Co(I)+": "+b:b);return{html:A,markers:u}},isAnimationEnabled:function(){if(ym.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=rw.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},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});c(Hw,Bw),c(Hw,rw);var Gw=function(){this.group=new Py,this.uid=no("viewComponent")};Gw.prototype={constructor:Gw,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var Ww=Gw.prototype;Ww.updateView=Ww.updateLayout=Ww.updateVisual=function(){},ir(Gw),sr(Gw,{registerWhenExtend:!0});var Uw=function(){var t=qi();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i.large,s=n.progressiveRender=i.progressiveRender;return!!(r^o||a^s)&&"reset"}},Zw=qi(),Xw=Uw();Qs.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){tl(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){tl(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Yw=Qs.prototype;Yw.updateView=Yw.updateLayout=Yw.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},ir(Qs,["dispose"]),sr(Qs,{registerWhenExtend:!0}),Qs.markUpdateMethod=function(t,e){Zw(t).updateMethod=e};var jw={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)}}},qw="\x00__throttleOriginMethod",Kw="\x00__throttleRate",$w="\x00__throttleType",Qw={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i)||t.getColorFromPalette(t.name,null,e.getSeriesCount());n.setVisual("color",r);var a=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),o=t.get(a);if(n.setVisual("borderColor",o),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof cb||n.each(function(e){n.setItemVisual(e,"color",r(t.getDataParams(e)))});var s=function(t,e){var n=t.getItemModel(e),r=n.get(i,!0),o=n.get(a,!0);null!=r&&t.setItemVisual(e,"color",r),null!=o&&t.setItemVisual(e,"borderColor",o)};return{dataEach:n.hasItemOption?s:null}}}},Jw={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:"鏁g偣鍥�",effectScatter:"娑熸吉鏁g偣鍥�",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:""}}}},tS=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=o.get(t);if(null==e){for(var n=t.split("."),i=Jw.aria,r=0;r<n.length;++r)i=i[n[r]];return i}return e}function r(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function a(t){return Jw.series.typeNames[t]||"鑷畾涔夊浘"}var o=e.getModel("aria");if(o.get("show")){if(o.get("description"))return void t.setAttribute("aria-label",o.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,u=o.get("data.maxCount")||10,h=o.get("series.maxCount")||10,c=Math.min(s,h);if(!(1>s)){var d=r();l=d?n(i("general.withTitle"),{title:d}):i("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=n(i(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,o=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=i(o?l+"withName":l+"withoutName"),r=n(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var h=t.getData();window.data=h,r+=h.count()>u?n(i("data.partialData"),{displayCnt:u}):i("data.allData");for(var d=[],f=0;f<h.count();f++)if(u>f){var g=h.getName(f),v=Ns(h,f);d.push(n(i(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(i("data.separator.middle"))+i("data.separator.end"),p.push(r)}}),l+=p.join(i("series.multiple.separator.middle"))+i("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},eS=Math.PI,nS=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new rb({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new ub({shape:{startAngle:-eS/2,endAngle:-eS/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new rb({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*eS/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*eS/2}).delay(300).start("circularInOut");var a=new Py;return a.add(i),a.add(r),a.add(n),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;i.setShape({cx:e,cy:a});var o=i.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a},iS=al.prototype;iS.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},iS.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,a=r?n.step:null,o=i&&i.modDataCount,s=null!=o?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},iS.getPipeline=function(t){return this._pipelineMap.get(t)},iS.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),a=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:a,modDataCount:s,large:o}},iS.restorePipelines=function(t){var e=this,n=e._pipelineMap=N();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}),ml(e,t,t.dataTask)})},iS.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;f(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&sl(this,i,r,e,n),i.overallReset&&ll(this,i,r,e,n)},this)},iS.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,ml(this,e,r)},iS.performDataProcessorTasks=function(t,e){ol(this,this._dataProcessorHandlers,t,e,{block:!0})},iS.performVisualTasks=function(t,e,n){ol(this,this._visualHandlers,t,e,n)},iS.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},iS.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 rS=iS.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},aS=gl(0);al.wrapStageHandler=function(t,e){return b(t)&&(t={overallReset:t,seriesType:yl(t)}),t.uid=no("stageHandler"),e&&(t.visualType=e),t};var oS,sS={},lS={};_l(sS,vw),_l(lS,cs),sS.eachSeriesByType=sS.eachRawSeriesByType=function(t){oS=t},sS.eachComponent=function(t){"series"===t.mainType&&t.subType&&(oS=t.subType)};var uS=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],hS={color:uS,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],uS]},cS="#eee",dS=function(){return{axisLine:{lineStyle:{color:cS}},axisTick:{lineStyle:{color:cS}},axisLabel:{textStyle:{color:cS}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:cS}}}},fS=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],pS={color:fS,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:cS},crossStyle:{color:cS}}},legend:{textStyle:{color:cS}},textStyle:{color:cS},title:{textStyle:{color:cS}},toolbox:{iconStyle:{normal:{borderColor:cS}}},dataZoom:{textStyle:{color:cS}},visualMap:{textStyle:{color:cS}},timeline:{lineStyle:{color:cS},itemStyle:{normal:{color:fS[1]}},label:{normal:{textStyle:{color:cS}}},controlStyle:{normal:{color:cS,borderColor:cS}}},timeAxis:dS(),logAxis:dS(),valueAxis:dS(),categoryAxis:dS(),line:{symbol:"circle"},graph:{color:fS},gauge:{title:{textStyle:{color:cS}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};pS.categoryAxis.splitLine.show=!1,tw.extend({type:"dataset",defaultOption:{seriesLayoutBy:dw,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Xo(this)}}),Gw.extend({type:"dataset"});var gS=Hr.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*n,l=o*n;t.moveTo(i-a,r),t.bezierCurveTo(i-a,r-l,i-s,r-o,i,r-o),t.bezierCurveTo(i+s,r-o,i+a,r-l,i+a,r),t.bezierCurveTo(i+a,r+l,i+s,r+o,i,r+o),t.bezierCurveTo(i-s,r+o,i-a,r+l,i-a,r),t.closePath()}}),vS=/[\s,]+/;bl.prototype.parse=function(t,e){e=e||{};var n=xl(t);if(!n)throw new Error("Illegal svg");var i=new Py;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),o=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),Il(n,i,null,!0);for(var s=n.firstChild;s;)this._parseNode(s,i),s=s.nextSibling;var l,u;if(r){var h=z(r).split(vS);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=o&&(u=Dl(l,a,o),!e.ignoreViewBox)){var c=i;i=new Py,i.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==o||i.setClipPath(new rb({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:l,viewBoxTransform:u}},bl.prototype._parseNode=function(t,e){var n=t.nodeName.toLowerCase();"defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0);var i;if(this._isDefine){var r=yS[n];if(r){var a=r.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else{var r=mS[n];r&&(i=r.call(this,t,e),e.add(i))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},bl.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new Xx({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Sl(e,r),Il(t,r,this._defs);var a=r.style.fontSize;a&&9>a&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var mS={g:function(t,e){var n=new Py;return Sl(e,n),Il(t,n,this._defs),n},rect:function(t,e){var n=new rb;return Sl(e,n),Il(t,n,this._defs),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},circle:function(t,e){var n=new Yx;return Sl(e,n),Il(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new ob;return Sl(e,n),Il(t,n,this._defs),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},ellipse:function(t,e){var n=new gS;return Sl(e,n),Il(t,n,this._defs),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},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=Ml(n));var i=new tb({shape:{points:n||[]}});return Sl(e,i),Il(t,i,this._defs),i},polyline:function(t,e){var n=new Hr;Sl(e,n),Il(t,n,this._defs);var i=t.getAttribute("points");i&&(i=Ml(i));var r=new eb({shape:{points:i||[]}});return r},image:function(t,e){var n=new wi;return Sl(e,n),Il(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Py;return Sl(e,o),Il(t,o,this._defs),o},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,a=t.getAttribute("dy")||0,o=new Py;return Sl(e,o),Il(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var n=t.getAttribute("d")||"",i=Zr(n);return Sl(e,i),Il(t,i,this._defs),i}},yS={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),a=new db(e,n,i,r);return wl(t,a),a},radialgradient:function(){}},_S={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-align":"textAlign","alignment-baseline":"textBaseline"},xS=/url\(\s*#(.*?)\)/,bS=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,wS=/([^\s:;]+)\s*:\s*([^:;]+)/g,SS=N(),MS={registerMap:function(t,e,n){var i;return x(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),f(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var n=IS[e];n(t)}),SS.set(t,i)},retrieveMap:function(t){return SS.get(t)}},IS={geoJSON:function(t){var e=t.source;t.geoJSON=w(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=xl(t.source)}},CS=O,TS=f,AS=b,DS=S,kS=tw.parseClassType,PS="4.4.0",LS={zrender:"4.1.1"},OS=1,zS=1e3,ES=800,RS=900,BS=5e3,NS=1e3,VS=1100,FS=2e3,HS=3e3,GS=3500,WS=4e3,US=5e3,ZS={PROCESSOR:{FILTER:zS,SERIES_FILTER:ES,STATISTIC:BS},VISUAL:{LAYOUT:NS,PROGRESSIVE_LAYOUT:VS,GLOBAL:FS,CHART:HS,POST_CHART_LAYOUT:GS,COMPONENT:WS,BRUSH:US}},XS="__flagInMainProcess",YS="__optionUpdated",jS=/^[a-zA-Z0-9_]+$/;Pl.prototype.on=kl("on",!0),Pl.prototype.off=kl("off",!0),Pl.prototype.one=kl("one",!0),c(Pl,Fm);var qS=Ll.prototype;qS._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[YS]){var e=this[YS].silent;this[XS]=!0,zl(this),KS.update.call(this),this[XS]=!1,this[YS]=!1,Nl.call(this,e),Vl.call(this,e)}else if(t.unfinished){var n=OS,i=this._model,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Rl(this,i),t.performVisualTasks(i),Zl(this,this._model,r,"remain"),n-=+new Date-a}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},qS.getDom=function(){return this._dom},qS.getZr=function(){return this._zr},qS.setOption=function(t,e,n){if(!this._disposed){var i;if(DS(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[XS]=!0,!this._model||e){var r=new fs(this._api),a=this._theme,o=this._model=new vw;o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,eM),n?(this[YS]={silent:i},this[XS]=!1):(zl(this),KS.update.call(this),this._zr.flush(),this[YS]=!1,this[XS]=!1,Nl.call(this,i),Vl.call(this,i))}},qS.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},qS.getModel=function(){return this._model},qS.getOption=function(){return this._model&&this._model.getOption()},qS.getWidth=function(){return this._zr.getWidth()},qS.getHeight=function(){return this._zr.getHeight()},qS.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},qS.getRenderedCanvas=function(t){if(ym.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},qS.getSvgDataUrl=function(){if(ym.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},qS.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;TS(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 a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return TS(i,function(t){t.group.ignore=!1}),a}},qS.getConnectedDataURL=function(t){if(!this._disposed&&ym.canvasSupported){var e=this.group,n=Math.min,r=Math.max,a=1/0;if(sM[e]){var o=a,s=a,l=-a,u=-a,h=[],c=t&&t.pixelRatio||1;f(oM,function(a){if(a.group===e){var c=a.getRenderedCanvas(i(t)),d=a.getDom().getBoundingClientRect();o=n(d.left,o),s=n(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),o*=c,s*=c,l*=c,u*=c;var d=l-o,p=u-s,g=Dm();g.width=d,g.height=p;var v=zi(g);return t.connectedBackgroundColor&&v.add(new rb({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),TS(h,function(t){var e=new wi({style:{x:t.left*c-o,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},qS.convertToPixel=_(Ol,"convertToPixel"),qS.convertFromPixel=_(Ol,"convertFromPixel"),qS.containPixel=function(t,e){if(!this._disposed){var n,i=this._model;return t=Ki(i,t),f(t,function(t,i){i.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}},this)},this),!!n}},qS.getVisual=function(t,e){var n=this._model;t=Ki(n,t,{defaultMainType:"series"});var i=t.seriesModel,r=i.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=a?r.getItemVisual(a,e):r.getVisual(e)},qS.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},qS.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]
+};var KS={prepareAndUpdate:function(t){zl(this),KS.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),Rl(this,e),r.update(e,n),Gl(e),a.performVisualTasks(e,t),Wl(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(ym.canvasSupported)i.setBackgroundColor(o);else{var s=je(o);o=rn(s,"rgb"),0===s[3]&&(o="transparent")}Xl(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var a=N();e.eachSeries(function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),Gl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),Zl(n,e,i,t,a),Xl(e,this._api)}},updateView:function(t){var e=this._model;e&&(Qs.markUpdateMethod(t,"updateView"),Gl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Wl(this,this._model,this._api,t),Xl(e,this._api))},updateVisual:function(t){KS.update.call(this,t)},updateLayout:function(t){KS.update.call(this,t)}};qS.resize=function(t){if(!this._disposed){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[XS]=!0,n&&zl(this),KS.update.call(this),this[XS]=!1,Nl.call(this,i),Vl.call(this,i)}}},qS.showLoading=function(t,e){if(!this._disposed&&(DS(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),aM[t])){var n=aM[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},qS.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},qS.makeActionFromEvent=function(t){var e=o({},t);return e.type=JS[t.type],e},qS.dispatchAction=function(t,e){if(!this._disposed&&(DS(e)||(e={silent:!!e}),QS[t.type]&&this._model)){if(this[XS])return void this._pendingActions.push(t);Bl.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&ym.browser.weChat&&this._throttledZrFlush(),Nl.call(this,e.silent),Vl.call(this,e.silent)}},qS.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);i.appendData(t),this._scheduler.unfinished=!0}},qS.on=kl("on",!1),qS.off=kl("off",!1),qS.one=kl("one",!1);var $S=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];qS._initEvents=function(){TS($S,function(t){var e=function(e){var n,i=this.getModel(),r=e.target,a="globalout"===t;if(a)n={};else if(r&&null!=r.dataIndex){var s=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=s&&s.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=o({},r.eventData));if(n){var l=n.componentType,u=n.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=n.seriesIndex);var h=l&&null!=u&&i.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:h,view:c},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),TS(JS,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},qS.isDisposed=function(){return this._disposed},qS.clear=function(){this._disposed||this.setOption({series:[]},!0)},qS.dispose=function(){if(!this._disposed){this._disposed=!0,Qi(this.getDom(),hM,"");var t=this._api,e=this._model;TS(this._componentsViews,function(n){n.dispose(e,t)}),TS(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete oM[this.id]}},c(Ll,Fm),$l.prototype={constructor:$l,normalizeQuery:function(t){var e={},n={},i={};if(w(t)){var r=kS(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};f(t,function(t,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return n(l,o,"mainType")&&n(l,o,"subType")&&n(l,o,"index","componentIndex")&&n(l,o,"name")&&n(l,o,"id")&&n(u,a,"name")&&n(u,a,"dataIndex")&&n(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a))},afterTrigger:function(){this.eventInfo=null}};var QS={},JS={},tM=[],eM=[],nM=[],iM=[],rM={},aM={},oM={},sM={},lM=new Date-0,uM=new Date-0,hM="_echarts_instance_",cM=eu;fu(FS,Qw),ou(kw),su(RS,Pw),gu("default",nS),uu({type:"highlight",event:"highlight",update:"highlight"},F),uu({type:"downplay",event:"downplay",update:"downplay"},F),au("light",hS),au("dark",pS);var dM={};Mu.prototype={constructor:Mu,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,e=this._old,n=this._new,i={},r={},a=[],o=[];for(Iu(e,i,a,"_oldKeyGetter",this),Iu(n,r,o,"_newKeyGetter",this),t=0;t<e.length;t++){var s=a[t],l=r[s];if(null!=l){var u=l.length;u?(1===u&&(r[s]=null),l=l.unshift()):r[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<o.length;t++){var s=o[t];if(r.hasOwnProperty(s)){var l=r[s];if(null==l)continue;if(l.length)for(var h=0,u=l.length;u>h;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var fM=N(["tooltip","label","itemName","itemId","seriesName"]),pM=S,gM="undefined",vM=-1,mM="e\x00\x00",yM={"float":typeof Float64Array===gM?Array:Float64Array,"int":typeof Int32Array===gM?Array:Int32Array,ordinal:Array,number:Array,time:Array},_M=typeof Uint32Array===gM?Array:Uint32Array,xM=typeof Int32Array===gM?Array:Int32Array,bM=typeof Uint16Array===gM?Array:Uint16Array,wM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],SM=["_extent","_approximateExtent","_rawExtent"],MM=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;a<t.length;a++){var o=t[a];w(o)&&(o={name:o});var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,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=Cu(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},IM=MM.prototype;IM.type="list",IM.hasItemOption=!0,IM.getDimension=function(t){return("number"==typeof t||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},IM.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},IM.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},IM.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return e===!0?(i||[]).slice():i&&i[e]},IM.initData=function(t,e,n){var i=Zo.isInstance(t)||d(t);i&&(t=new Ps(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Ew[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Ew.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},IM.getProvider=function(){return this._rawData},IM.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},IM.appendValues=function(t,e){for(var n=this._chunkSize,i=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;a>h;h++){var c=r[h];o[c]||(o[c]=Gu()),i[c]||(i[c]=[]),Ou(i,this._dimensionInfos[c],n,u,l),this._chunkCount=i[c].length}for(var d=new Array(a),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/n),v=f%n,m=0;a>m;m++){var c=r[m],y=this._dimValueGetterArrayRows(t[p]||d,c,p,m);i[c][g][v]=y;var _=o[c];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},zu(this)},IM._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=o[p];c[g]||(c[g]=Gu());var v=l[g];0===v.otherDims.itemName&&(n=this._nameDimIdx=p),0===v.otherDims.itemId&&(this._idDimIdx=p),a[g]||(a[g]=[]),Ou(a,v,i,f,e),this._chunkCount=a[g].length}for(var m=new Array(s),y=t;e>y;y++){m=r.getItem(y,m);for(var _=Math.floor(y/i),x=y%i,b=0;s>b;b++){var g=o[b],w=a[g][_],S=this._dimValueGetter(m,g,y,b);w[x]=S;var M=c[g];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!r.pure){var I=u[y];if(m&&null==I)if(null!=m.name)u[y]=I=m.name;else if(null!=n){var C=o[n],T=a[C][_];if(T){I=T[x];var A=l[C].ordinalMeta;A&&A.categories.length&&(I=A.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,D=I,d[I]>0&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(h[y]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},zu(this)}},IM.count=function(){return this._count},IM.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;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(var n=ku(this),t=new n(this.count()),r=0;r<t.length;r++)t[r]=r;return t},IM.get=function(t,e){if(!(e>=0&&e<this._count))return 0/0;var n=this._storage;if(!n[t])return 0/0;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize,a=n[t][i],o=a[r];return o},IM.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return 0/0;var n=this._storage[t];if(!n)return 0/0;var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize,a=n[i];return a[r]},IM._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize,r=this._storage[t][n];return r[i]},IM.getValues=function(t,e){var n=[];x(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;r>i;i++)n.push(this.get(t[i],e));return n},IM.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;i>n;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},IM.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Gu();if(!e)return n;var i,r=this.count(),a=!this._indices;if(a)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var o=i[0],s=i[1],l=0;r>l;l++){var u=this._getFast(t,this.getRawIndex(l));o>u&&(o=u),u>s&&(s=u)}return i=[o,s],this._extent[t]=i,i},IM.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},IM.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},IM.getCalculationInfo=function(t){return this._calculationInfo[t]},IM.setCalculationInfo=function(t,e){pM(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},IM.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();r>i;i++){var a=this.get(t,i);isNaN(a)||(n+=a)}return n},IM.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},IM.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n[e];return null==i||isNaN(i)?vM:i},IM.indexOfName=function(t){for(var e=0,n=this.count();n>e;e++)if(this.getName(e)===t)return e;return-1},IM.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||0>t)return-1;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;r>=i;){var a=(i+r)/2|0;if(e[a]<t)i=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},IM.indicesOfNearest=function(t,e,n){var i=this._storage,r=i[t],a=[];if(!r)return a;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,s=-1,l=0,u=this.count();u>l;l++){var h=e-this.get(t,l),c=Math.abs(h);n>=h&&o>=c&&((o>c||h>=0&&0>s)&&(o=c,s=h,a.length=0),a.push(l))}return a},IM.getRawIndex=Ru,IM.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},IM.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Eu(this,this._nameDimIdx,e)||""},IM.getId=function(t){return Nu(this,this.getRawIndex(t))},IM.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Vu(t),this.getDimension,this);for(var r=t.length,a=0;a<this.count();a++)switch(r){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];r>o;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(n,s)}}},IM.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Vu(t),this.getDimension,this);for(var r=this.count(),a=ku(this),o=new a(r),s=[],l=t.length,u=0,h=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getFast(h,f);d=e.call(n,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getFast(h,f);s[v]=c,d=e.apply(n,s)}d&&(o[u++]=f)}return r>u&&(this._indices=o),this._count=u,this._extent={},this.getRawIndex=this._indices?Bu:Ru,this}},IM.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),a=ku(this),o=new a(r),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var f=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=f[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m];(y>=u&&h>=y||isNaN(y))&&(o[s++]=d),d++}c=!0}else if(2===i){for(var f=this._storage[l],_=this._storage[e[1]],x=t[e[1]][0],b=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=f[p],w=_[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m],S=w[m];(y>=u&&h>=y||isNaN(y))&&(S>=x&&b>=S||isNaN(S))&&(o[s++]=d),d++}c=!0}}if(!c)if(1===i)for(var m=0;r>m;m++){var M=this.getRawIndex(m),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(o[s++]=M)}else for(var m=0;r>m;m++){for(var I=!0,M=this.getRawIndex(m),p=0;i>p;p++){var C=e[p],y=this._getFast(n,M);(y<t[C][0]||y>t[C][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return r>s&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?Bu:Ru,this}}},IM.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},IM.map=function(t,e,n,i){n=n||i||this,t=p(Vu(t),this.getDimension,this);var r=Fu(this,t);r._indices=this._indices,r.getRawIndex=r._indices?Bu:Ru;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(n,h);if(null!=g){"object"!=typeof g&&(o[0]=g,g=o);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,_=0;_<g.length;_++){var x=t[_],b=g[_],w=c[x],S=a[x];S&&(S[m][y]=b),b<w[0]&&(w[0]=b),b>w[1]&&(w[1]=b)}}}return r},IM.downSample=function(t,e,n,i){for(var r=Fu(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(ku(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/h),y=v%h;o[g]=l[m][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),b=Math.floor(x/h),w=x%h;l[b][w]=_,_<c[0]&&(c[0]=_),_>c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Bu,r},IM.getItemModel=function(t){var e=this.hostModel;return new Ja(this.getRawDataItem(t),e,e&&e.ecModel)},IM.diff=function(t){var e=this;return new Mu(t?t.getIndices():[],this.getIndices(),function(e){return Nu(t,e)},function(t){return Nu(e,t)})},IM.getVisual=function(t){var e=this._visual;return e&&e[t]},IM.setVisual=function(t,e){if(pM(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},IM.setLayout=function(t,e){if(pM(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},IM.getLayout=function(t){return this._layout[t]},IM.getItemLayout=function(t){return this._itemLayouts[t]},IM.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?o(this._itemLayouts[t]||{},e):e},IM.clearItemLayouts=function(){this._itemLayouts.length=0},IM.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},IM.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,pM(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},IM.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var CM=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};IM.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(CM,e)),this._graphicEls[t]=e},IM.getItemGraphicEl=function(t){return this._graphicEls[t]},IM.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},IM.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new MM(e,this.hostModel)}if(t._storage=this._storage,Lu(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Bu:Ru,t},IM.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(P(arguments)))})},IM.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],IM.CHANGABLE_METHODS=["filterSelf","selectRange"];var TM=function(t,e){return e=e||{},Wu(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};Qu.prototype.parse=function(t){return t},Qu.prototype.getSetting=function(t){return this._setting[t]},Qu.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Qu.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Qu.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Qu.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Qu.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Qu.prototype.getExtent=function(){return this._extent.slice()},Qu.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Qu.prototype.isBlank=function(){return this._isBlank},Qu.prototype.setBlank=function(t){this._isBlank=t},Qu.prototype.getLabel=null,ir(Qu),sr(Qu,{registerWhenExtend:!0}),Ju.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&p(n,eh);return new Ju({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})};var AM=Ju.prototype;AM.getOrdinal=function(t){return th(this).get(t)},AM.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=th(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e};var DM=Qu.prototype,kM=Qu.extend({type:"ordinal",init:function(t,e){(!t||x(t))&&(t=new Ju({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),DM.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return DM.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(DM.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){return this.isBlank()?void 0: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:F,niceExtent:F});kM.create=function(){return new kM};var PM=lo,LM=lo,OM=Qu.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),OM.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=ih(t)},getTicks:function(){return oh(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=co(t)||0:"auto"===n&&(n=this._intervalPrecision),t=LM(t,n,!0),Mo(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){0>r&&(r=-r,i.reverse());var a=nh(i,t,e,n);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 n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=LM(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=LM(Math.ceil(e[1]/r)*r))}});OM.create=function(){return new OM};var zM="__ec_stack_",EM=.5,RM="undefined"!=typeof Float32Array?Float32Array:Array,BM={seriesType:"bar",plan:Uw(),reset:function(t){function e(t,e){for(var n,c=t.count,d=new RM(2*c),f=new RM(c),p=[],g=[],v=0,m=0;null!=(n=t.next());)g[u]=e.get(o,n),g[1-u]=e.get(s,n),p=i.dataToPoint(g,null,p),d[v++]=p[0],d[v++]=p[1],f[m++]=n;e.setLayout({largePoints:d,largeDataIndices:f,barWidth:h,valueAxisStart:vh(r,a,!1),valueAxisHorizontal:l})}if(ph(t)&&gh(t)){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=i.getOtherAxis(r),o=n.mapDimension(a.dim),s=n.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,h=dh(hh([t]),r,t).width;return h>EM||(h=EM),{progress:e}}}},NM=OM.prototype,VM=Math.ceil,FM=Math.floor,HM=1e3,GM=60*HM,WM=60*GM,UM=24*WM,ZM=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n},XM=OM.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return Po(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=UM,e[1]+=UM),e[1]===-1/0&&1/0===e[0]){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-UM}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=lo(FM(e[0]/i)*i)),t.fixMax||(e[1]=lo(VM(e[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0],a=r/t;null!=e&&e>a&&(a=e),null!=n&&a>n&&(a=n);var o=YM.length,s=ZM(YM,a,0,o),l=YM[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u,c=xo(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,f=[Math.round(VM((i[0]-d)/u)*u+d),Math.round(FM((i[1]-d)/u)*u+d)];ah(f,i),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+mo(t)}});f(["contain","normalize"],function(t){XM.prototype[t]=function(e){return NM[t].call(this,this.parse(e))}});var YM=[["hh:mm:ss",HM],["hh:mm:ss",5*HM],["hh:mm:ss",10*HM],["hh:mm:ss",15*HM],["hh:mm:ss",30*HM],["hh:mm\nMM-dd",GM],["hh:mm\nMM-dd",5*GM],["hh:mm\nMM-dd",10*GM],["hh:mm\nMM-dd",15*GM],["hh:mm\nMM-dd",30*GM],["hh:mm\nMM-dd",WM],["hh:mm\nMM-dd",2*WM],["hh:mm\nMM-dd",6*WM],["hh:mm\nMM-dd",12*WM],["MM-dd\nyyyy",UM],["MM-dd\nyyyy",2*UM],["MM-dd\nyyyy",3*UM],["MM-dd\nyyyy",4*UM],["MM-dd\nyyyy",5*UM],["MM-dd\nyyyy",6*UM],["week",7*UM],["MM-dd\nyyyy",10*UM],["week",14*UM],["week",21*UM],["month",31*UM],["week",42*UM],["month",62*UM],["week",70*UM],["quarter",95*UM],["month",31*UM*4],["month",31*UM*5],["half-year",380*UM/2],["month",31*UM*8],["month",31*UM*10],["year",380*UM]];XM.create=function(t){return new XM({useUTC:t.ecModel.get("useUTC")})};var jM=Qu.prototype,qM=OM.prototype,KM=co,$M=lo,QM=Math.floor,JM=Math.ceil,tI=Math.pow,eI=Math.log,nI=Qu.extend({type:"log",base:10,$constructor:function(){Qu.apply(this,arguments),this._originalScale=new OM},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return p(qM.getTicks.call(this),function(i){var r=lo(tI(this.base,i));return r=i===e[0]&&t.__fixMin?mh(r,n[0]):r,r=i===e[1]&&t.__fixMax?mh(r,n[1]):r},this)},getLabel:qM.getLabel,scale:function(t){return t=jM.scale.call(this,t),tI(this.base,t)},setExtent:function(t,e){var n=this.base;t=eI(t)/eI(n),e=eI(e)/eI(n),qM.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=jM.getExtent.call(this);e[0]=tI(t,e[0]),e[1]=tI(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=mh(e[0],i[0])),n.__fixMax&&(e[1]=mh(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=eI(t[0])/eI(e),t[1]=eI(t[1])/eI(e),jM.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=yo(n),r=t/n*i;for(.5>=r&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[lo(JM(e[0]/i)*i),lo(QM(e[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(t){qM.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){nI.prototype[t]=function(e){return e=eI(e)/eI(this.base),jM[t].call(this,e)}}),nI.create=function(){return new nI};var iI={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!T(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!T(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:F,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},rI=ea({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),aI=ea({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),oI=ea({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(n-h,l+s),t.arc(n,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closePath()}}),sI=ea({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),lI={line:ob,rect:rb,roundRect:rb,square:rb,circle:Yx,diamond:aI,pin:oI,arrow:sI,triangle:rI},uI={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},hI={};f(lI,function(t,e){hI[e]=new t});var cI=ea({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=Zn(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=hI[i];r||(i="rect",r=hI[i]),uI[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}}),dI={isDimensionStacked:Yu,enableDataStack:Xu,getStackedDimension:ju},fI=(Object.freeze||Object)({createList:Ph,getLayoutRect:Ro,dataStack:dI,createScale:Lh,mixinAxisModelCommonMethods:Oh,completeDimensions:Wu,createDimensions:TM,createSymbol:kh}),pI=1e-8;Rh.prototype={constructor:Rh,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;wr(l,r,a),oe(n,n,r),se(i,i,a)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new bn(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;r>i;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(Eh(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(Eh(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new bn(t,e,n,i),s=r.calculateTransform(o),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++)ae(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(var d=0;d<c[f].length;d++)ae(c[f][d],c[f][d],s)}r=this._rect,r.copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Rh(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var gI=function(t){return Bh(t),p(v(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&f(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Rh(e.name,r,e.cp);return a.properties=e,a})},vI=qi(),mI=[0,1],yI=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};yI.prototype={constructor:yI,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&i>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()
+},getPixelPrecision:function(t){return fo(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),Jh(n,i.count())),oo(t,mI,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),Jh(n,i.count()));var r=oo(t,n,mI,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=Fh(this,e),i=n.ticks,r=p(i,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),a=e.get("alignWithLabel");return tc(this,r,n.tickCategoryInterval,a,t.clamp),r},getViewLabels:function(){return Vh(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(),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},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return qh(this)}};var _I=gI,xI={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){xI[t]=Lm[t]});var bI={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){bI[t]=Db[t]});var wI=function(t){this._axes={},this._dimList=[],this.name=t||""};wI.prototype={constructor:wI,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,ec,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(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 n=this._dimList,i=t instanceof Array?[]:{},r=0;r<n.length;r++){var a=n[r],o=this._axes[a];i[a]=o[e](t[a])}return i}},nc.prototype={constructor:nc,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"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return n=n||[],n[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(t[0]),s=i.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[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 n=this.getAxis("x"),i=this.getAxis("y");return e=e||[],e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,a=Math.max(e[0],e[1])-i,o=new bn(n,i,r,a);return o}},h(nc,wI);var SI=function(t,e,n,i,r){yI.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};SI.prototype={constructor:SI,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},h(SI,yI);var MI={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)"]}}},II={};II.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},MI),II.valueAxis=r({boundaryGap:[0,0],splitNumber:5},MI),II.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},II.valueAxis),II.logAxis=s({scale:!0,logBase:10},II.valueAxis);var CI=["value","category","time","log"],TI=function(t,e,n,i){f(CI,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,i){var a=this.layoutMode,s=a?Vo(e):{},l=i.getTheme();r(e,l.get(o+"Axis")),r(e,this.getDefaultOption()),e.type=n(t,e),a&&No(e,s,a)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=Ju.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:a([{},II[o+"Axis"],i],!0)})}),tw.registerSubTypeDefaulter(t+"Axis",_(n,t))},AI=tw.extend({type:"cartesian2dAxis",axis:null,init:function(){AI.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){AI.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){AI.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(AI.prototype,iI);var DI={offset:0};TI("x",AI,ic,DI),TI("y",AI,ic,DI),tw.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 kI=ac.prototype;kI.type="grid",kI.axisPointerEnabled=!0,kI.getRect=function(){return this._rect},kI.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),f(n.x,function(t){xh(t.scale,t.model)}),f(n.y,function(t){xh(t.scale,t.model)});var i={};f(n.x,function(t){oc(n,"y",t,i)}),f(n.y,function(t){oc(n,"x",t,i)}),this.resize(this.model,e)},kI.resize=function(t,e,n){function i(){f(a,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),lc(t,e?r.x:r.y)})}var r=Ro(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;i(),!n&&t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Ih(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},kI.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},kI.getAxes=function(){return this._axesList.slice()},kI.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},kI.getCartesians=function(){return this._coordsList.slice()},kI.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},kI.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},kI._findConvertTarget=function(t,e){var n,i,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)n=r.coordinateSystem,u(l,n)<0&&(n=null);else if(a&&o)n=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)i=this.getAxis("x",a.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){var h=s.coordinateSystem;h===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},kI.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},kI._initCartesian=function(t,e){function n(n){return function(o,s){if(rc(o,t,e)){var l=o.get("position");"x"===n?"top"!==l&&"bottom"!==l&&(l=i.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=i.left?"right":"left"),i[l]=!0;var u=new SI(n,bh(o),[0,0],o.get("type"),l),h="category"===u.type;u.onBand=h&&o.get("boundaryGap"),u.inverse=o.get("inverse"),o.axis=u,u.model=o,u.grid=this,u.index=s,this._axesList.push(u),r[n][s]=u,a[n]++}}}var i={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};return e.eachComponent("xAxis",n("x"),this),e.eachComponent("yAxis",n("y"),this),a.x&&a.y?(this._axesMap=r,void f(r.x,function(e,n){f(r.y,function(i,r){var a="x"+n+"y"+r,o=new nc(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},kI._updateScale=function(t,e){function n(t,e){f(t.mapDimension(e.dim,!0),function(n){e.scale.unionExtentFromData(t,ju(t,n))})}f(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(i){if(hc(i)){var r=uc(i,t),a=r[0],o=r[1];if(!rc(a,e,t)||!rc(o,e,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=i.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(n(l,u,i),n(l,h,i))}},this)},kI.getTooltipAxes=function(t){var e=[],n=[];return f(this.getCartesians(),function(i){var r=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),a=i.getOtherAxis(r);u(e,r)<0&&e.push(r),u(n,a)<0&&n.push(a)}),{baseAxes:e,otherAxes:n}};var PI=["xAxis","yAxis"];ac.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,r){var a=new ac(i,t,e);a.name="grid_"+r,a.resize(i,e,!0),i.coordinateSystem=a,n.push(a)}),t.eachSeries(function(e){if(hc(e)){var n=uc(e,t),i=n[0],r=n[1],a=i.getCoordSysModel(),o=a.coordinateSystem;e.coordinateSystem=o.getCartesian(i.componentIndex,r.componentIndex)}}),n},ac.dimensions=ac.prototype.dimensions=nc.prototype.dimensions,ds.register("cartesian2d",ac);var LI=Hw.extend({type:"series.__base_bar__",getInitialData:function(){return qu(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),a=i.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return n[o]+=r+a/2,n}return[0/0,0/0]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});LI.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},defaultOption:{clip:!0}});var OI=N_([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),zI={getBarItemStyle:function(t){var e=OI(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},EI=["itemStyle","barBorderWidth"],RI=[0,0];o(Ja.prototype,zI),_u({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return("cartesian2d"===i||"polar"===i)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){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){var e,n=this.group,i=t.getData(),r=this._data,a=t.coordinateSystem,o=a.getBaseAxis();"cartesian2d"===a.type?e=o.isHorizontal():"polar"===a.type&&(e="angle"===o.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=mc(a,i);n.removeClipPath(),i.diff(r).add(function(r){if(i.hasValue(r)){var o=i.getItemModel(r),h=HI[a.type](i,r,o);if(l){var c=VI[a.type](u,h);if(c)return void n.remove(d)}var d=FI[a.type](i,r,o,h,e,s);i.setItemGraphicEl(r,d),n.add(d),xc(d,i,r,o,h,t,e,"polar"===a.type)}}).update(function(o,h){var c=r.getItemGraphicEl(h);if(!i.hasValue(o))return void n.remove(c);var d=i.getItemModel(o),f=HI[a.type](i,o,d);if(l){var p=VI[a.type](u,f);if(p)return void n.remove(c)}c?Fa(c,{shape:f},s,o):c=FI[a.type](i,o,d,f,e,s,!0),i.setItemGraphicEl(o,c),n.add(c),xc(c,i,o,d,f,t,e,"polar"===a.type)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===a.type?e&&yc(t,s,e):e&&_c(t,s,e)}).execute(),this._data=i},_renderLarge:function(t){this._clear(),wc(t,this.group);var e=t.get("clip",!0)?vc(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){wc(e,this.group,!0)},dispose:F,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(e){"sector"===e.type?_c(e.dataIndex,t,e):yc(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var BI=Math.max,NI=Math.min,VI={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;0>n&&(e.x+=e.width,e.width=-e.width),0>i&&(e.y+=e.height,e.height=-e.height);var r=BI(e.x,t.x),a=NI(e.x+e.width,t.x+t.width),o=BI(e.y,t.y),s=NI(e.y+e.height,t.y+t.height);e.x=r,e.y=o,e.width=a-r,e.height=s-o;var l=e.width<0||e.height<0;return 0>n&&(e.x+=e.width,e.width=-e.width),0>i&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},FI={cartesian2d:function(t,e,n,i,r,a,s){var l=new rb({shape:o({},i)});if(a){var u=l.shape,h=r?"height":"width",c={};u[h]=0,c[h]=i[h],Db[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,n,i,r,a,o){var l=i.startAngle<i.endAngle,u=new Kx({shape:s({clockwise:l},i)});if(a){var h=u.shape,c=r?"r":"endAngle",d={};h[c]=r?0:i.startAngle,d[c]=i[c],Db[o?"updateProps":"initProps"](u,{shape:d},a,e)}return u}},HI={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=bc(n,i),a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},GI=Hr.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,a=0;a<n.length;a+=2)i[r]=n[a+r],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}}),WI=il(function(t){var e=this,n=Sc(e,t.offsetX,t.offsetY);e.dataIndex=n>=0?n:null},30,!1),UI=Math.PI,ZI=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Py;var n=new Py({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};ZI.prototype={constructor:ZI,hasBuilder:function(t){return!!XI[t]},add:function(t){XI[t].call(this)},getGroup:function(){return this.group}};var XI={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,r=[n[0],0],a=[n[1],0];i&&(ae(r,r,i),ae(a,a,i));var s=o({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ob({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[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],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(e,n){if("none"!==l[n]&&null!=l[n]){var i=kh(l[n],-c/2,-d/2,c,d,s.stroke,!0),a=e.r+e.offset,o=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];i.attr({rotation:e.rotate,position:o,silent:!0,z2:11}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=kc(this,t,e),i=Pc(this,t,e);Cc(t,i,n)},axisName:function(){var t=this.opt,e=this.axisModel,n=A(t.axisName,e.get("name"));if(n){var i,r=e.get("nameLocation"),a=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"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,Dc(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*UI/180);var f;Dc(r)?i=jI(t.rotation,null!=d?d:t.rotation,a):(i=Ic(t,r,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=A(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?Xb(n,m,p,v,{minChar:2,placeholder:g.placeholder}):n,_=e.get("tooltip",!0),x=e.mainType,b={componentType:x,name:n,$vars:["name"]};b[x+"Index"]=e.componentIndex;var w=new Xx({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:qI(e),z2:1,tooltip:_&&_.show?o({content:n,formatter:function(){return n},formatterParams:b},_):null});ka(w.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=YI(e),w.eventData.targetType="axisName",w.eventData.name=n),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},YI=ZI.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},jI=ZI.innerTextLayout=function(t,e,n){var i,r,a=go(e-t);return vo(a)?(r=n>0?"top":"bottom",i="center"):vo(a-UI)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&UI>a?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}},qI=ZI.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},KI=f,$I=_,QI=mu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&Nc(t),QI.superApply(this,"render",arguments),Wc(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i){Wc(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),QI.superApply(this,"remove",arguments)},dispose:function(t,e){Uc(this,e),QI.superApply(this,"dispose",arguments)}}),JI=[];QI.registerAxisPointerClass=function(t,e){JI[t]=e},QI.getAxisPointerClass=function(t){return t&&JI[t]};var tC=["axisLine","axisTickLabel","axisName"],eC=["splitArea","splitLine"],nC=QI.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Py,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=Zc(a,t),s=new ZI(t,o);f(tC,s.add,s),this._axisGroup.add(s.getGroup()),f(eC,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Za(r,this._axisGroup,t),nC.superCall(this,"render",t,e,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=x(a)?a:[a];for(var o=e.coordinateSystem.getRect(),l=n.isHorizontal(),u=0,h=n.getTicksCoords({tickModel:i}),c=[],d=[],f=r.getLineStyle(),p=0;p<h.length;p++){var g=n.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=o.y,d[0]=g,d[1]=o.y+o.height):(c[0]=o.x,c[1]=g,d[0]=o.x+o.width,d[1]=g);var v=u++%a.length,m=h[p].tickValue;this._axisGroup.add(new ob({anid:null!=m?"line_"+h[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:s({stroke:a[v]},f),silent:!0}))}}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),r=i.getModel("areaStyle"),a=r.get("color"),o=e.coordinateSystem.getRect(),l=n.getTicksCoords({tickModel:i,clamp:!0});if(l.length){var u=a.length,h=this._splitAreaColors,c=N(),d=0;if(h)for(var f=0;f<l.length;f++){var p=h.get(l[f].tickValue);if(null!=p){d=(p+(u-1)*f)%u;break}}var g=n.toGlobalCoord(l[0].coord),v=r.getAreaStyle();a=x(a)?a:[a];for(var f=1;f<l.length;f++){var m,y,_,b,w=n.toGlobalCoord(l[f].coord);n.isHorizontal()?(m=g,y=o.y,_=w-m,b=o.height,g=m+_):(m=o.x,y=g,_=o.width,b=w-y,g=y+b);var S=l[f-1].tickValue;null!=S&&c.set(S,d),this._axisGroup.add(new rb({anid:null!=S?"area_"+S:null,shape:{x:m,y:y,width:_,height:b},style:s({fill:a[d]},v),silent:!0})),d=(d+1)%u}this._splitAreaColors=c}}}});nC.extend({type:"xAxis"}),nC.extend({type:"yAxis"}),mu({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new rb({shape:t.coordinateSystem.getRect(),style:s({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),ou(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),du(ZS.VISUAL.LAYOUT,_(fh,"bar")),du(ZS.VISUAL.PROGRESSIVE_LAYOUT,BM),fu({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),Hw.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return qu(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!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 iC=Xc.prototype,rC=Xc.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};iC._createSymbol=function(t,e,n,i,r){this.removeAll();var a=e.getItemVisual(n,"color"),o=kh(t,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:Yc(i)}),o.drift=jc,this._symbolType=t,this.add(o)},iC.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},iC.getSymbolPath=function(){return this.childAt(0)},iC.getScale=function(){return this.childAt(0).scale},iC.highlight=function(){this.childAt(0).trigger("emphasis")},iC.downplay=function(){this.childAt(0).trigger("normal")},iC.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},iC.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},iC.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=rC(t,e),o=i!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,a,s)}else{var l=this.childAt(0);l.silent=!1,Fa(l,{scale:Yc(a)},r,e)}if(this._updateCommon(t,e,a,n),o){var l=this.childAt(0),u=n&&n.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Ha(l,h,r,e)}this._seriesModel=r};var aC=["itemStyle"],oC=["emphasis","itemStyle"],sC=["label"],lC=["emphasis","label"];iC._updateCommon=function(t,e,n,i){function r(e){return w?t.getName(e):cc(t,e)}var a=this.childAt(0),s=t.hostModel,l=t.getItemVisual(e,"color");"image"!==a.type&&a.useStyle({strokeNoScale:!0});var u=i&&i.itemStyle,h=i&&i.hoverItemStyle,c=i&&i.symbolRotate,d=i&&i.symbolOffset,f=i&&i.labelModel,p=i&&i.hoverLabelModel,g=i&&i.hoverAnimation,v=i&&i.cursorStyle;if(!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e);u=m.getModel(aC).getItemStyle(["color"]),h=m.getModel(oC).getItemStyle(),c=m.getShallow("symbolRotate"),d=m.getShallow("symbolOffset"),f=m.getModel(sC),p=m.getModel(lC),g=m.getShallow("hoverAnimation"),v=m.getShallow("cursor")}else h=o({},h);var y=a.style;a.attr("rotation",(c||0)*Math.PI/180||0),d&&a.attr("position",[so(d[0],n[0]),so(d[1],n[1])]),v&&a.attr("cursor",v),a.setColor(l,i&&i.symbolInnerColor),a.setStyle(u);var _=t.getItemVisual(e,"opacity");null!=_&&(y.opacity=_);var x=t.getItemVisual(e,"liftZ"),b=a.__z2Origin;null!=x?null==b&&(a.__z2Origin=a.z2,a.z2+=x):null!=b&&(a.z2=b,a.__z2Origin=null);var w=i&&i.useNameLabel;Aa(y,h,f,p,{labelFetcher:s,labelDataIndex:e,defaultText:r,isRectText:!0,autoColor:l}),a.__symbolOriginalScale=Yc(n),a.hoverStyle=h,a.highDownOnUpdate=g&&s.isAnimationEnabled()?qc:null,Ma(a)},iC.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,!(e&&e.keepLabel)&&(n.style.text=null),Fa(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(Xc,Py);var uC=Kc.prototype;uC.updateData=function(t,e){e=Qc(e);var n=this.group,i=t.hostModel,r=this._data,a=this._symbolCtor,o=Jc(t);r||n.removeAll(),t.diff(r).add(function(i){var r=t.getItemLayout(i);if($c(t,r,i,e)){var s=new a(t,i,o);s.attr("position",r),t.setItemGraphicEl(i,s),n.add(s)}}).update(function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);return $c(t,h,s,e)?(u?(u.updateData(t,s,o),Fa(u,{position:h},i)):(u=new a(t,s),u.attr("position",h)),n.add(u),void t.setItemGraphicEl(s,u)):void n.remove(u)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)})}).execute(),this._data=t},uC.isPersistent=function(){return!0},uC.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,n){var i=t.getItemLayout(n);e.attr("position",i)})},uC.incrementalPrepareUpdate=function(t){this._seriesScope=Jc(t),this._data=null,this.group.removeAll()},uC.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Qc(n);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if($c(e,a,r,n)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(i),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},uC.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var hC=function(t,e,n,i,r,a,o,s){for(var l=id(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],v=td(r,e,o),m=td(a,t,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var b=t.getItemLayout(_.idx),w=e.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),h.push(w),c.push(n[_.idx]),d.push(i[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(nd(v,r,e,S)),d.push(i[S]),g.push(e.getRawIndex(S));break;case"-":var S=_.idx,M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(n[S]),d.push(nd(m,a,t,S)),g.push(M)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],C=[],T=[],A=[],D=[],y=0;y<p.length;y++){var S=p[y];I[y]=u[S],C[y]=h[S],T[y]=c[S],A[y]=d[S],D[y]=f[S]}return{current:I,next:C,stackedOnCurrent:T,stackedOnNext:A,status:D}},cC=oe,dC=se,fC=X,pC=G,gC=[],vC=[],mC=[],yC=Hr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:qx(Hr.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,a=ld(n,e.smoothConstraint);if(e.connectNulls){for(;r>0&&rd(n[r-1]);r--);for(;r>i&&rd(n[i]);i++);}for(;r>i;)i+=ad(t,n,i,r,r,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),_C=Hr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:qx(Hr.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,a=n.length,o=e.smoothMonotone,s=ld(n,e.smoothConstraint),l=ld(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&rd(n[a-1]);a--);for(;a>r&&rd(n[r]);r++);}for(;a>r;){var u=ad(t,n,r,a,a,1,s.min,s.max,e.smooth,o,e.connectNulls);ad(t,i,r+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),r+=u+1,t.closePath()}}});Qs.extend({type:"line",init:function(){var t=new Py,e=new Kc;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.mapArray(a.getItemLayout),h="polar"===i.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=l.get("origin"),_=td(i,a,y),x=cd(i,a,_),b=t.get("showSymbol"),w=b&&!h&&pd(t,a,i),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),b||d.remove(),r.add(g);var M,I=!h&&t.get("step");i&&i.getArea&&(M=i.getArea(),null!=M.width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r1+=.5)),f&&c.type===i.type&&I===this._step?(m&&!p?p=this._newPolygon(u,x,i,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(vd(i,!1,t)),b&&d.updateData(a,{isIgnore:w,clipShape:M}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),ud(this._stackedOnPoints,x)&&ud(this._points,u)||(v?this._updateAnimation(a,x,i,n,I,y):(I&&(u=dd(u,i,I),x=dd(x,i,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:x})))):(b&&d.updateData(a,{isIgnore:w,clipShape:M}),I&&(u=dd(u,i,I),x=dd(x,i,I)),f=this._newPolyline(u,i,v),m&&(p=this._newPolygon(u,x,i,v)),g.setClipPath(vd(i,!0,t)));var C=fd(a,i)||a.getVisual("color");f.useStyle(s(o.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"}));var T=t.get("smooth");if(T=hd(t.get("smooth")),f.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var A=a.getCalculationInfo("stackedOnSeries"),D=0;p.useStyle(s(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel"})),A&&(D=hd(A.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=x,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=ji(r,i);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;o=new Xc(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Qs.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=ji(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Qs.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new yC({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new _C({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n
+},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,u=hC(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=dd(u.current,n,r),c=dd(u.stackedOnCurrent,n,r),d=dd(u.next,n,r),f=dd(u.stackedOnNext,n,r)),o.shape.__points=u.current,o.shape.points=h,Fa(o,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Fa(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,v=0;v<g.length;v++){var m=g[v].cmd;if("="===m){var y=t.getItemGraphicEl(g[v].idx1);y&&p.push({el:y,ptIdx:v})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var t=0;t<p.length;t++){var e=p[t].el;e.attr("position",o.shape.__points[p[t].ptIdx])}})},remove:function(){var t=this.group,e=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),e&&e.eachItemGraphicEl(function(n,i){n.__temp&&(t.remove(n),e.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var xC=function(t,e,n){return{seriesType:t,performRawSeries:!0,reset:function(t,i){function r(e,n){if(c){var i=t.getRawValue(n),r=t.getDataParams(n);u&&e.setItemVisual(n,"symbol",o(i,r)),h&&e.setItemVisual(n,"symbolSize",s(i,r))}if(e.hasItemOption){var a=e.getItemModel(n),l=a.getShallow("symbol",!0),d=a.getShallow("symbolSize",!0),f=a.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(n,"symbol",l),null!=d&&e.setItemVisual(n,"symbolSize",d),null!=f&&e.setItemVisual(n,"symbolKeepAspect",f)}}var a=t.getData(),o=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=b(o),h=b(s),c=u||h,d=!u&&o?o:e,f=h?null:s;return a.setVisual({legendSymbol:n||d,symbol:d,symbolSize:f,symbolKeepAspect:l}),i.isSeriesFiltered(t)?void 0:{dataEach:a.hasItemOption||c?r:null}}}},bC=function(t){return{seriesType:t,plan:Uw(),reset:function(t){function e(t,e){for(var n=t.end-t.start,r=a&&new Float32Array(n*s),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===s){var 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)}a?(r[u++]=d?d[0]:0/0,r[u++]=d?d[1]:0/0):e.setItemLayout(l,d&&d.slice()||[0/0,0/0])}a&&e.setLayout("symbolPoints",r)}var n=t.getData(),i=t.coordinateSystem,r=t.pipelineContext,a=r.large;if(i){var o=p(i.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),s=o.length,l=n.getCalculationInfo("stackResultDimension");return Yu(n,o[0])&&(o[0]=l),Yu(n,o[1])&&(o[1]=l),s&&{progress:e}}}}},wC={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?0/0:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:0/0},nearest:function(t){return t[0]}},SC=function(t){return Math.round(t.length/2)},MC=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t){var e=t.getData(),n=t.get("sampling"),i=t.coordinateSystem;if("cartesian2d"===i.type&&n){var r=i.getBaseAxis(),a=i.getOtherAxis(r),o=r.getExtent(),s=o[1]-o[0],l=Math.round(e.count()/s);if(l>1){var u;"string"==typeof n?u=wC[n]:"function"==typeof n&&(u=n),u&&t.setData(e.downSample(e.mapDimension(a.dim),1/l,u,SC))}}}}};fu(xC("line","circle","line")),du(bC("line")),su(ZS.PROCESSOR.STATISTIC,MC("line"));var IC=function(t,e,n){e=x(e)&&{coordDimensions:e}||o({},e);var i=t.getSource(),r=TM(i,e),a=new MM(r,t);return a.initData(i,n),a},CC={updateSelectedMap:function(t){this._targetList=x(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},N())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t),i=this.get("selectedMode");"single"===i&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=n?(this[n.selected?"unSelect":"select"](t,e),n.selected):void 0},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}},TC=yu({type:"series.pie",init:function(t){TC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){TC.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return IC(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();r>i;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Vs(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=TC.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=po(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){Fi(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},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle: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",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});c(TC,CC);var AC=_d.prototype;AC.updateData=function(t,e,n){var i=this.childAt(0),r=this.childAt(1),a=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=o({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(n){i.setShape(c);var f=l.getShallow("animationType");"scale"===f?(i.shape.r=h.r0,Ha(i,{shape:{r:h.r}},l,e)):(i.shape.endAngle=h.startAngle,Fa(i,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?i.setShape(c):Fa(i,{shape:c},l,e);var p=t.getItemVisual(e,"color");i.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),i.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");g&&i.attr("cursor",g),yd(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation"));var v=!n&&"transition"===d;this._updateLabel(t,e,v),this.highDownOnUpdate=u.get("hoverAnimation")&&l.isAnimationEnabled()?function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore,i.stopAnimation(!0),i.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore,i.stopAnimation(!0),i.animateTo({shape:{r:h.r}},300,"elasticOut"))}:null,Ma(this)},AC._updateLabel=function(t,e,n){var i=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(r.ignore=r.normalIgnore=r.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};n?(Fa(i,{shape:h},a,e),Fa(r,{style:c},a,e)):(i.attr({shape:h}),r.attr({style:c})),r.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=o.getModel("label"),f=o.getModel("emphasis.label"),p=o.getModel("labelLine"),g=o.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Aa(r.style,r.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!d.get("show"),r.hoverIgnore=!f.get("show"),i.ignore=i.normalIgnore=!p.get("show"),i.hoverIgnore=!g.get("show"),i.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(p.getModel("lineStyle").getLineStyle()),i.hoverStyle=g.getModel("lineStyle").getLineStyle();var v=p.get("smooth");v&&v===!0&&(v=.4),i.setShape({smooth:v})},h(_d,Py);var DC=(Qs.extend({type:"pie",init:function(){var t=new Py;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=_(md,this.uid,t,s,n),d=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new _d(r,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);l||"transition"===h||n.eachChild(function(t){t.stopAnimation(!0)}),n.updateData(r,t),n.off("click"),d&&n.on("click",c),o.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&r.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=r.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<r.count();++p)f=r.getItemLayout(p);var g=Math.max(n.getWidth(),n.getHeight())/2,v=y(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,v,t,l))}else o.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,a,o,s){var l=new Kx({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}}),u=s?Ha:Fa;return u(l,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},o,a),l},containPoint:function(t,e){var n=e.getData(),i=n.getItemLayout(0);if(i){var r=t[0]-i.cx,a=t[1]-i.cy,o=Math.sqrt(r*r+a*a);return o<=i.r&&o>=i.r0}}}),function(t,e){f(e,function(e){e.update="updateView",uu(e,function(n,i){var r={};return i.eachComponent({mainType:"series",subType:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataIndex);var i=t.getData();i.each(function(e){var n=i.getName(e);r[n]=t.isSelected(n)||!1})}),{name:n.name,selected:r,seriesId:n.seriesId}})})}),kC=function(t){return{getTargetSeries:function(e){var n={},i=N();return e.eachSeriesByType(t,function(t){t.__paletteScope=n,i.set(t.uid,t)}),i},reset:function(t){var e=t.getRawData(),n={},i=t.getData();i.each(function(t){var e=i.getRawIndex(t);n[e]=t}),e.each(function(r){var a,o=n[r],s=null!=o&&i.getItemVisual(o,"color",!0),l=null!=o&&i.getItemVisual(o,"borderColor",!0);if(s&&l||(a=e.getItemModel(r)),s)e.setItemVisual(r,"color",s);else{var u=a.get("itemStyle.color")||t.getColorFromPalette(e.getName(r)||r+"",t.__paletteScope,e.count());e.setItemVisual(r,"color",u),null!=o&&i.setItemVisual(o,"color",u)}if(l)e.setItemVisual(r,"borderColor",l);else{var h=a.get("itemStyle.borderColor");e.setItemVisual(r,"borderColor",h),null!=o&&i.setItemVisual(o,"borderColor",h)}})}}},PC=Math.PI/180,LC=function(t,e,n,i){var r,a,o=t.getData(),s=[],l=!1,u=(t.get("minShowLabelAngle")||0)*PC;o.each(function(n){var i=o.getItemLayout(n),h=o.getItemModel(n),c=h.getModel("label"),d=c.get("position")||h.get("emphasis.label.position"),f=h.getModel("labelLine"),p=f.get("length"),g=f.get("length2");if(!(i.angle<u)){var v,m,y,_,x=(i.startAngle+i.endAngle)/2,b=Math.cos(x),w=Math.sin(x);r=i.cx,a=i.cy;var S="inside"===d||"inner"===d;if("center"===d)v=i.cx,m=i.cy,_="center";else{var M=(S?(i.r+i.r0)/2*b:i.r*b)+r,I=(S?(i.r+i.r0)/2*w:i.r*w)+a;if(v=M+3*b,m=I+3*w,!S){var C=M+b*(p+e-i.r),T=I+w*(p+e-i.r),A=C+(0>b?-1:1)*g,D=T;v=A+(0>b?-5:5),m=D,y=[[M,I],[C,T],[A,D]]}_=S?"center":b>0?"left":"right"}var k,P=c.getFont(),L=c.get("rotate");k="number"==typeof L?L*(Math.PI/180):L?0>b?-x+Math.PI:-x:0;var O=t.getFormattedLabel(n,"normal")||o.getName(n),z=Fn(O,P,_,"top");l=!!k,i.label={x:v,y:m,position:d,height:z.height,len:p,len2:g,linePoints:y,textAlign:_,verticalAlign:"middle",rotation:k,inside:S},S||s.push(i.label)}}),!l&&t.get("avoidLabelOverlap")&&bd(s,r,a,e,n,i)},OC=2*Math.PI,zC=Math.PI/180,EC=function(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=t.get("center"),a=t.get("radius");x(a)||(a=[0,a]),x(r)||(r=[r,r]);var o=n.getWidth(),s=n.getHeight(),l=Math.min(o,s),u=so(r[0],o),h=so(r[1],s),c=so(a[0],l/2),d=so(a[1],l/2),f=-t.get("startAngle")*zC,p=t.get("minAngle")*zC,g=0;e.each(i,function(t){!isNaN(t)&&g++});var v=e.getSum(i),m=Math.PI/(v||g)*2,y=t.get("clockwise"),_=t.get("roseType"),b=t.get("stillShowZeroSum"),w=e.getDataExtent(i);w[0]=0;var S=OC,M=0,I=f,C=y?1:-1;if(e.each(i,function(t,n){var i;if(isNaN(t))return void e.setItemLayout(n,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:y,cx:u,cy:h,r0:c,r:_?0/0:d});i="area"!==_?0===v&&b?m:t*m:OC/g,p>i?(i=p,S-=p):M+=t;var r=I+C*i;e.setItemLayout(n,{angle:i,startAngle:I,endAngle:r,clockwise:y,cx:u,cy:h,r0:c,r:_?oo(t,w,[c,d]):d}),I=r}),OC>S&&g)if(.001>=S){var T=OC/g;e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=T,i.startAngle=f+C*n*T,i.endAngle=f+C*(n+1)*T}})}else m=S/M,I=f,e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n),r=i.angle===p?p:t*m;i.startAngle=I,i.endAngle=I+C*r,I+=C*r}});LC(t,d,o,s)})},RC=function(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf(function(t){for(var e=i.getName(t),r=0;r<n.length;r++)if(!n[r].isSelected(e))return!1;return!0})}}}};DC("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),fu(kC("pie")),du(_(EC,"pie")),su(RC("pie")),Hw.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(){return qu(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},clip:!0}});var BC=4,NC=ea({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,a=r.shape,o=t.getContext?t.getContext():t,s=o&&i[0]<BC;if(!s)for(var l=0;l<n.length;){var u=n[l++],h=n[l++];isNaN(u)||isNaN(h)||(!this.softClipShape||this.softClipShape.contain(u,h))&&(a.x=u-i[0]/2,a.y=h-i[1]/2,a.width=i[0],a.height=i[1],r.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,n=e.points,i=e.size,r=i[0]<BC;if(r){this.setTransform(t);for(var a=0;a<n.length;){var o=n[a++],s=n[a++];isNaN(o)||isNaN(s)||(!this.softClipShape||this.softClipShape.contain(o,s))&&t.fillRect(o-i[0]/2,s-i[1]/2,i[0],i[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var n=this.shape,i=n.points,r=n.size,a=Math.max(r[0],4),o=Math.max(r[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-a/2,h=i[l+1]-o/2;if(t>=u&&e>=h&&u+a>=t&&h+o>=e)return s}return-1}}),VC=Sd.prototype;VC.isPersistent=function(){return!this._incremental},VC.updateData=function(t,e){this.group.removeAll();var n=new NC({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},VC.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)})}},VC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new ta({silent:!0})),this.group.add(this._incremental)):this._incremental=null},VC.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new NC,this._incremental.addDisplayable(i,!0)):(i=new NC({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),i.incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental,n)},VC._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=i.clipShape||null,t.symbolProxy=kh(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<BC;t.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),n||(t.seriesIndex=r.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(t.dataIndex=n+(t.startIndex||0))}))},VC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},VC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},_u({type:"scatter",render:function(t){var e=t.getData(),n=this._updateSymbolDraw(e,t);n.updateData(e,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData(),n=this._updateSymbolDraw(e,t);n.incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var n=bC().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_getClipShape:function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext,r=i.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new Sd:new Kc,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),fu(xC("scatter","circle")),du(bC("scatter"));var FC="undefined"==typeof Uint32Array?Array:Uint32Array,HC="undefined"==typeof Float64Array?Array:Float64Array,GC=Hw.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],Md(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),GC.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],Md(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))}GC.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=V(this._flatCoords,e.flatCoords),this._flatCoordsOffset=V(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),n=e.option instanceof Array?e.option:e.getShallow("coords");return n},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;i>r;r++)e[r]=e[r]||[],e[r][0]=this._flatCoords[n+2*r],e[r][1]=this._flatCoords[n+2*r+1];return i}for(var a=this._getCoordsFromItemModel(t),r=0;r<a.length;r++)e[r]=e[r]||[],e[r][0]=a[r][0],e[r][1]=a[r][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"==typeof t[0]){for(var n=t.length,i=new FC(n),r=new HC(n),a=0,o=0,s=0,l=0;n>l;){s++;var u=t[l++];i[o++]=a+e,i[o++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];r[a++]=c,r[a++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,o),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t){var e=new MM(["value"],this);return e.hasItemOption=!1,e.initData(t.data,[],function(t,n,i,r){if(t instanceof Array)return 0/0;e.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[r]:a:void 0}),e},formatTooltip:function(t){var e=this.getData(),n=e.getItemModel(t),i=n.get("name");if(i)return i;var r=n.get("fromName"),a=n.get("toName"),o=[];return null!=r&&o.push(r),null!=a&&o.push(a),Co(o.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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),WC=ob.prototype,UC=lb.prototype,ZC=ea({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Id(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:WC.buildPath,_buildPathCurve:UC.buildPath,pointAt:function(t){return this[Id(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:WC.pointAt,_pointAtCurve:UC.pointAt,tangentAt:function(t){var e=this.shape,n=Id(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(n,n)},_tangentAtCurve:UC.tangentAt}),XC=["fromSymbol","toSymbol"],YC=Pd.prototype;YC.beforeUpdate=kd,YC._createLine=function(t,e,n){var i=t.hostModel,r=t.getItemLayout(e),a=Ad(r);a.shape.percent=0,Ha(a,{shape:{percent:1}},i,e),this.add(a);var o=new Xx({name:"label",lineLabelOriginalOpacity:1});this.add(o),f(XC,function(n){var i=Td(n,t,e);this.add(i),this[Cd(n)]=t.getItemVisual(e,n)},this),this._updateCommonStl(t,e,n)},YC.updateData=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),a=t.getItemLayout(e),o={shape:{}};Dd(o.shape,a),Fa(r,o,i,e),f(XC,function(n){var i=t.getItemVisual(e,n),r=Cd(n);if(this[r]!==i){this.remove(this.childOfName(n));var a=Td(n,t,e);this.add(a)}this[r]=i},this),this._updateCommonStl(t,e,n)},YC._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),a=n&&n.lineStyle,o=n&&n.hoverLineStyle,l=n&&n.labelModel,u=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),o=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=k(t.getItemVisual(e,"opacity"),a.opacity,1);r.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},a)),r.hoverStyle=o,f(XC,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,v=l.getShallow("show"),m=u.getShallow("show"),y=this.childOfName("label");if((v||m)&&(p=c||"#000",g=i.getFormattedLabel(e,"normal",t.dataType),null==g)){var _=i.getRawValue(e);g=null==_?t.getName(e):isFinite(_)?lo(_):_}var x=v?g:null,b=m?D(i.getFormattedLabel(e,"emphasis",t.dataType),g):null,w=y.style;(null!=x||null!=b)&&(ka(y.style,l,{text:x},{autoColor:p}),y.__textAlign=w.textAlign,y.__verticalAlign=w.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=b?{text:b,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!v&&!m,Ma(this)},YC.highlight=function(){this.trigger("emphasis")},YC.downplay=function(){this.trigger("normal")},YC.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},YC.setLinePoints=function(t){var e=this.childOfName("line");Dd(e.shape,t),e.dirty()},h(Pd,Py);var jC=Ld.prototype;jC.isPersistent=function(){return!0},jC.updateData=function(t){var e=this,n=e.group,i=e._lineData;e._lineData=t,i||n.removeAll();var r=Ed(t);t.diff(i).add(function(n){Od(e,t,n,r)}).update(function(n,a){zd(e,i,t,a,n,r)}).remove(function(t){n.remove(i.getItemGraphicEl(t))}).execute()},jC.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},jC.incrementalPrepareUpdate=function(t){this._seriesScope=Ed(t),this._lineData=null,this.group.removeAll()},jC.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){var r=e.getItemLayout(i);if(Bd(r)){var a=new this._ctor(e,i,this._seriesScope);a.traverse(n),this.group.add(a),e.setItemGraphicEl(i,a)}}},jC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},jC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var qC=Nd.prototype;qC.createLine=function(t,e,n){return new Pd(t,e,n)},qC._updateEffectSymbol=function(t,e){var n=t.getItemModel(e),i=n.getModel("effect"),r=i.get("symbolSize"),a=i.get("symbol");x(r)||(r=[r,r]);var o=i.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==a&&(this.remove(s),s=kh(a,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",o),s.setStyle(i.getItemStyle(["color"])),s.attr("scale",r),s.setColor(o),s.attr("scale",r),this._symbolType=a,this._updateEffectAnimation(t,i,e))},qC._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var r=this,a=t.getItemLayout(n),o=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=A(e.get("delay"),function(e){return e/t.count()*o/3}),h="function"==typeof u;if(i.ignore=!0,this.updateAnimationPoints(i,a),l>0&&(o=this.getLineLength(i)/l*1e3),o!==this._period||s!==this._loop){i.stopAnimation();var c=u;h&&(c=u(n)),i.__t>0&&(c=-o*i.__t),i.__t=0;var d=i.animate("",s).when(o,{__t:1}).delay(c).during(function(){r.updateSymbolPosition(i)});s||d.done(function(){r.remove(i)}),d.start()}this._period=o,this._loop=s}},qC.getLineLength=function(t){return Rm(t.__p1,t.__cp1)+Rm(t.__cp1,t.__p2)},qC.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]},qC.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},qC.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,a=t.position,o=vr,s=mr;a[0]=o(e[0],i[0],n[0],r),a[1]=o(e[1],i[1],n[1],r);var l=s(e[0],i[0],n[0],r),u=s(e[1],i[1],n[1],r);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},qC.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},h(Nd,Py);var KC=Vd.prototype;KC._createPolyline=function(t,e,n){var i=t.getItemLayout(e),r=new eb({shape:{points:i}});this.add(r),this._updateCommonStl(t,e,n)},KC.updateData=function(t,e,n){var i=t.hostModel,r=this.childAt(0),a={shape:{points:t.getItemLayout(e)}};Fa(r,a,i,e),this._updateCommonStl(t,e,n)},KC._updateCommonStl=function(t,e,n){var i=this.childAt(0),r=t.getItemModel(e),a=t.getItemVisual(e,"color"),o=n&&n.lineStyle,l=n&&n.hoverLineStyle;(!n||t.hasItemOption)&&(o=r.getModel("lineStyle").getLineStyle(),l=r.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(s({strokeNoScale:!0,fill:"none",stroke:a},o)),i.hoverStyle=l,Ma(this)},KC.updateLayout=function(t,e){var n=this.childAt(0);n.setShape("points",t.getItemLayout(e))},h(Vd,Py);var $C=Fd.prototype;$C.createLine=function(t,e,n){return new Vd(t,e,n)},$C.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,r=1;r<e.length;r++){var a=e[r-1],o=e[r];i+=Rm(a,o),n.push(i)}if(0!==i){for(var r=0;r<n.length;r++)n[r]/=i;this._offsets=n,this._length=i}},$C.getLineLength=function(){return this._length},$C.updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,r=n.length;if(i){var a,o=this._lastFrame;if(e<this._lastFramePercent){var s=Math.min(o+1,r-1);for(a=s;a>=0&&!(i[a]<=e);a--);a=Math.min(a,r-2)}else{for(var a=o;r>a&&!(i[a]>e);a++);a=Math.min(a-1,r-2)}re(t.position,n[a],n[a+1],(e-i[a])/(i[a+1]-i[a]));var l=n[a+1][0]-n[a][0],u=n[a+1][1]-n[a][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=a,this._lastFramePercent=e,t.ignore=!1}},h(Fd,Nd);var QC=ea({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r<n.length;){var a=n[r++];if(a>0){t.moveTo(n[r++],n[r++]);for(var o=1;a>o;o++)t.lineTo(n[r++],n[r++])}}else for(var r=0;r<n.length;){var s=n[r++],l=n[r++],u=n[r++],h=n[r++];if(t.moveTo(s,l),i>0){var c=(s+u)/2-(l-h)*i,d=(l+h)/2-(u-s)*i;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(){var t=this.shape,e=t.segs,n=t.curveness;if(t.polyline)for(var i=0,r=0;r<e.length;){var a=e[r++];if(a>0)for(var o=e[r++],s=e[r++],l=1;a>l;l++){var u=e[r++],h=e[r++];if(Tr(o,s,u,h))return i}i++}else for(var i=0,r=0;r<e.length;){var o=e[r++],s=e[r++],u=e[r++],h=e[r++];if(n>0){var c=(o+u)/2-(s-h)*n,d=(s+h)/2-(u-o)*n;if(Dr(o,s,c,d,u,h))return i}else if(Tr(o,s,u,h))return i;i++}return-1}}),JC=Hd.prototype;JC.isPersistent=function(){return!this._incremental},JC.updateData=function(t){this.group.removeAll();var e=new QC({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},JC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new ta({silent:!0})),this.group.add(this._incremental)):this._incremental=null},JC.incrementalUpdate=function(t,e){var n=new QC;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},JC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},JC._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("color");r&&t.setStyle("stroke",r),t.setStyle("fill"),n||(t.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(t.dataIndex=n+t.__startIndex)}))},JC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var tT={seriesType:"lines",plan:Uw(),reset:function(t){function e(e,a){var o=[];if(r){var s,l=e.end-e.start;if(i){for(var u=0,h=e.start;h<e.end;h++)u+=t.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);for(var c=0,d=[],h=e.start;h<e.end;h++){var f=t.getLineCoords(h,o);i&&(s[c++]=f);for(var p=0;f>p;p++)d=n.dataToPoint(o[p],!1,d),s[c++]=d[0],s[c++]=d[1]}a.setLayout("linesPoints",s)}else for(var h=e.start;h<e.end;h++){var g=a.getItemModel(h),f=t.getLineCoords(h,o),v=[];if(i)for(var m=0;f>m;m++)v.push(n.dataToPoint(o[m]));else{v[0]=n.dataToPoint(o[0]),v[1]=n.dataToPoint(o[1]);var y=g.get("lineStyle.curveness");+y&&(v[2]=[(v[0][0]+v[1][0])/2-(v[0][1]-v[1][1])*y,(v[0][1]+v[1][1])/2-(v[1][0]-v[0][0])*y])}a.setItemLayout(h,v)}}var n=t.coordinateSystem,i=t.get("polyline"),r=t.pipelineContext.large;return{progress:e}}};_u({type:"lines",init:function(){},render:function(t,e,n){var i=t.getData(),r=this._updateLineDraw(i,t),a=t.get("zlevel"),o=t.get("effect.trailLength"),s=n.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)&&o&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),r.updateData(i);
+var u=t.get("clip",!0)&&vc(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData(),r=this._updateLineDraw(i,t);r.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var a=tT.reset(t);a.progress&&a.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),a=e.pipelineContext,o=a.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new Hd:new Ld(r?i?Fd:Vd:i?Nd:Pd),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),n="svg"===e.painter.getType();n||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 eT="lineStyle.opacity".split("."),nT={seriesType:"lines",reset:function(t){function e(t,e){var n=t.getItemModel(e),i=Gd(n.getShallow("symbol",!0)),r=Gd(n.getShallow("symbolSize",!0)),a=n.get(eT);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]),t.setItemVisual(e,"opacity",a)}var n=Gd(t.get("symbol")),i=Gd(t.get("symbolSize")),r=t.getData();return r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",i&&i[0]),r.setVisual("toSymbolSize",i&&i[1]),r.setVisual("opacity",t.get(eT)),{dataEach:r.hasItemOption?e:null}}};du(tT),fu(nT);{var iT=(Hw.extend({type:"series.gauge",getInitialData:function(t){var e=t.data||[];return x(e)||(e=[e]),t.data=e,IC(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}}}),Hr.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,r=e.r,a=e.width,o=e.angle,s=e.x-n(o)*a*(a>=r/3?1:2),l=e.y-i(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(o)*a,e.y+i(o)*a),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(o)*a,e.y-i(o)*a),t.lineTo(s,l)}})),rT=2*Math.PI;Qs.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i=t.get("axisLine.lineStyle.color"),r=Wd(t,n);this._renderMain(t,e,n,i,r)},dispose:function(){},_renderMain:function(t,e,n,i,r){for(var a=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,c=(h-u)%rT,d=u,f=s.get("width"),p=o.get("show"),g=0;p&&g<i.length;g++){var v=Math.min(Math.max(i[g][0],0),1),h=u+c*v,m=new Kx({shape:{startAngle:d,endAngle:h,cx:r.cx,cy:r.cy,clockwise:l,r0:r.r-f,r:r.r},silent:!0});m.setStyle({fill:i[g][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(m),d=h}var y=function(t){if(0>=t)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};if(!l){var _=u;u=h,h=_}this._renderTicks(t,e,n,y,r,u,h,l),this._renderPointer(t,e,n,y,r,u,h,l),this._renderTitle(t,e,n,y,r),this._renderDetail(t,e,n,y,r)},_renderTicks:function(t,e,n,i,r,a,o){for(var s=this.group,l=r.cx,u=r.cy,h=r.r,c=+t.get("min"),d=+t.get("max"),f=t.getModel("splitLine"),p=t.getModel("axisTick"),g=t.getModel("axisLabel"),v=t.get("splitNumber"),m=p.get("splitNumber"),y=so(f.get("length"),h),_=so(p.get("length"),h),x=a,b=(o-a)/v,w=b/m,S=f.getModel("lineStyle").getLineStyle(),M=p.getModel("lineStyle").getLineStyle(),I=0;v>=I;I++){var C=Math.cos(x),T=Math.sin(x);if(f.get("show")){var A=new ob({shape:{x1:C*h+l,y1:T*h+u,x2:C*(h-y)+l,y2:T*(h-y)+u},style:S,silent:!0});"auto"===S.stroke&&A.setStyle({stroke:i(I/v)}),s.add(A)}if(g.get("show")){var D=Ud(lo(I/v*(d-c)+c),g.get("formatter")),k=g.get("distance"),P=i(I/v);s.add(new Xx({style:ka({},g,{text:D,x:C*(h-y-k)+l,y:T*(h-y-k)+u,textVerticalAlign:-.4>T?"top":T>.4?"bottom":"middle",textAlign:-.4>C?"left":C>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(p.get("show")&&I!==v){for(var L=0;m>=L;L++){var C=Math.cos(x),T=Math.sin(x),O=new ob({shape:{x1:C*h+l,y1:T*h+u,x2:C*(h-_)+l,y2:T*(h-_)+u},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:i((I+L/m)/v)}),s.add(O),x+=w}x-=w}else x+=b}},_renderPointer:function(t,e,n,i,r,a,o){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[a,o],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var n=new iT({shape:{angle:a}});Ha(n,{shape:{angle:oo(c.get(d,e),u,h,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).update(function(e,n){var i=l.getItemGraphicEl(n);Fa(i,{shape:{angle:oo(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var n=c.getItemModel(e),a=n.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:so(a.get("width"),r.r),r:so(a.get("length"),r.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",i(oo(c.get(d,e),u,[0,1],!0))),Ma(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,n,i,r){var a=t.getData(),o=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=r.cx+so(l[0],r.r),h=r.cy+so(l[1],r.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(o,0),p=i(oo(f,[c,d],[0,1],!0));this.group.add(new Xx({silent:!0,style:ka({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,n,i,r){var a=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=r.cx+so(l[0],r.r),h=r.cy+so(l[1],r.r),c=so(a.get("width"),r.r),d=so(a.get("height"),r.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=i(oo(p,[o,s],[0,1],!0));this.group.add(new Xx({silent:!0,style:ka({},a,{x:u,y:h,text:Ud(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}})}vu({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"}}}),mu({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),s=D(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Xx({style:ka({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Xx({style:ka({},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"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=Ro(v,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),"middle"===o&&(o="center"),"right"===o?m.x+=m.width:"center"===o&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=i.getBoundingRect();var _=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new rb({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}}});var aT=Jw.legend.selector,oT={all:{type:"all",title:i(aT.all)},inverse:{type:"inverse",title:i(aT.inverse)}},sT=vu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){sT.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),x(e)&&f(e,function(t,n){w(t)&&(t={type:t}),e[n]=r(t,oT[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],n=[];t.eachRawSeries(function(i){var r=i.name;n.push(r);var a;if(i.legendDataProvider){var o=i.legendDataProvider(),s=o.mapArray(o.getName);t.isSeriesFiltered(i)||(n=n.concat(s)),s.length?e=e.concat(s):a=!0}else a=!0;a&&Zi(i)&&e.push(i.name)}),this._availableNames=n;var i=this.get("data")||e,r=p(i,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new Ja(t,this,this.ecModel)},this);this._data=r},getData:function(){return this._data},select:function(t){var e=this.option.selected,n=this.get("selectedMode");if("single"===n){var i=this._data;f(i,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){var n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&u(this._availableNames,t)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});uu("legendToggleSelect","legendselectchanged",_(Zd,"toggleSelected")),uu("legendAllSelect","legendselectall",_(Zd,"allSelect")),uu("legendInverseSelect","legendinverseselect",_(Zd,"inverseSelect")),uu("legendSelect","legendselected",_(Zd,"select")),uu("legendUnSelect","legendunselected",_(Zd,"unSelect"));var lT=_,uT=f,hT=Py,cT=mu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new hT),this._backgroundEl,this.group.add(this._selectorGroup=new hT),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),a=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===a?"right":"left");var o=t.get("selector",!0),l=t.get("selectorPosition",!0);!o||l&&"auto"!==l||(l="horizontal"===a?"end":"start"),this.renderInner(r,t,e,n,o,a,l);var u=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),d=Ro(u,h,c),f=this.layoutInner(t,r,d,i,o,l),p=Ro(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=Yd(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,n,i,r,a,o){var s=this.getContentGroup(),l=N(),u=e.get("selectedMode"),h=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),uT(e.getData(),function(r,a){var o=r.get("name");if(!this.newlineDisabled&&(""===o||"\n"===o))return void s.add(new hT({newline:!0}));var c=n.getSeriesByName(o)[0];if(!l.get(o))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",v=d.getVisual("symbol"),m=this._createItem(o,a,r,e,g,v,t,f,p,u);m.on("click",lT(qd,o,i)).on("mouseover",lT(Kd,c.name,null,i,h)).on("mouseout",lT($d,c.name,null,i,h)),l.set(o,!0)}else n.eachRawSeries(function(n){if(!l.get(o)&&n.legendDataProvider){var s=n.legendDataProvider(),c=s.indexOfName(o);if(0>c)return;var d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(o,a,r,e,p,null,t,d,f,u);g.on("click",lT(qd,o,i)).on("mouseover",lT(Kd,null,o,i,h)).on("mouseout",lT($d,null,o,i,h)),l.set(o,!0)}},this)},this),r&&this._createSelector(r,e,i,a,o)},_createSelector:function(t,e,n){function i(t){var i=t.type,a=new Xx({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Aa(a.style,a.hoverStyle={},o,s,{defaultText:t.title,isRectText:!1}),Ma(a)}var r=this.getSelectorGroup();uT(t,function(t){i(t)})},_createItem:function(t,e,n,i,r,a,s,l,u,h){var c=i.get("itemWidth"),d=i.get("itemHeight"),f=i.get("inactiveColor"),p=i.get("inactiveBorderColor"),g=i.get("symbolKeepAspect"),v=i.getModel("itemStyle"),m=i.isSelected(t),y=new hT,_=n.getModel("textStyle"),x=n.get("icon"),b=n.getModel("tooltip"),w=b.parentModel;r=x||r;var S=kh(r,0,0,c,d,m?l:f,null==g?!0:g);if(y.add(jd(S,r,v,u,p,m)),!x&&a&&(a!==r||"none"===a)){var M=.8*d;"none"===a&&(a="circle");var I=kh(a,(c-M)/2,(d-M)/2,M,M,m?l:f,null==g?!0:g);y.add(jd(I,a,v,u,p,m))}var C="left"===s?c+5:-5,T=s,A=i.get("formatter"),D=t;"string"==typeof A&&A?D=A.replace("{name}",null!=t?t:""):"function"==typeof A&&(D=A(t)),y.add(new Xx({style:ka({},_,{text:D,x:C,y:d/2,textFill:m?_.getTextColor():f,textAlign:T,textVerticalAlign:"middle"})}));var k=new rb({shape:y.getBoundingRect(),invisible:!0,tooltip:b.get("show")?o({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},b.option):null});return y.add(k),y.eachChild(function(t){t.silent=!0}),k.silent=!h,this.getContentGroup().add(y),Ma(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,n,i,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();$b(t.get("orient"),o,t.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(r){$b("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",v=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),o.attr("position",u);var m={x:0,y:0};return m[p]=l[p]+d+h[p],m[g]=Math.max(l[g],h[g]),m[v]=Math.min(0,h[v]+c[1-f]),m}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),dT=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})};su(ZS.PROCESSOR.SERIES_FILTER,dT),tw.registerSubTypeDefaulter("legend",function(){return"plain"});var fT=sT.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,n,i){var r=Vo(t);fT.superCall(this,"init",t,e,n,i),Qd(this,t,r)},mergeOption:function(t,e){fT.superCall(this,"mergeOption",t,e),Qd(this,this.option,t)}}),pT=Py,gT=["width","height"],vT=["x","y"],mT=cT.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){mT.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new pT),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new pT),this._showController},resetInner:function(){mT.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,n,i,r,a,o){function s(t,n){var r=t+"DataIndex",a=ja(e.get("pageIcons",!0)[e.getOrient().name][n],{onclick:y(l._pageGo,l,r,e,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});a.name=t,u.add(a)}var l=this;mT.superCall(this,"renderInner",t,e,n,i,r,a,o);var u=this._controllerGroup,h=e.get("pageIconSize",!0);x(h)||(h=[h,h]),s("pagePrev",0);var c=e.getModel("pageTextStyle");u.add(new Xx({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),s("pageNext",1)},layoutInner:function(t,e,n,r,a,o){var s=this.getSelectorGroup(),l=t.getOrient().index,u=gT[l],h=vT[l],c=gT[1-l],d=vT[1-l];a&&$b("horizontal",s,t.get("selectorItemGap",!0));var f=t.get("selectorButtonGap",!0),p=s.getBoundingRect(),g=[-p.x,-p.y],v=i(n);a&&(v[u]=n[u]-p[u]-f);var m=this._layoutContentAndController(t,r,v,l,u,c,d);if(a){if("end"===o)g[l]+=m[u]+f;else{var y=p[u]+f;g[l]-=y,m[h]-=y}m[u]+=p[u]+f,g[1-l]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[d]+g[1-l]),s.attr("position",g)}return m},_layoutContentAndController:function(t,e,n,i,r,a,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;$b(t.get("orient"),s,t.get("itemGap"),i?n.width:null,i?null:n.height),$b("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[r]>n[r],f=[-h.x,-h.y];e||(f[i]=s.position[i]);var p=[0,0],g=[-c.x,-c.y],v=D(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?g[i]+=n[r]-c[r]:p[i]+=c[r]+v}g[1-i]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[r]=d?n[r]:h[r],y[a]=Math.max(h[a],c[a]),y[o]=Math.min(0,c[o]+g[1-i]),l.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-c[r]-v,0),_[a]=y[a],l.setClipPath(new rb({shape:_})),l.__rectSize=_[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&Fa(s,{position:x.contentPosition},d?t:!1),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;f(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,s=e.pageCount;i&&r&&i.setStyle("text",w(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),n=e[l]+t.position[o];return{s:n,e:n+e[s],i:t.__legendDataIndex}}}function n(t,e){return t.e>=e&&t.s<=e+a}var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=gT[o],l=vT[o],u=this._findTargetItemIndex(i),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[o]=-g.s;for(var v=u+1,m=g,y=g,_=null;d>=v;++v)_=e(h[v]),(!_&&y.e>m.s+a||_&&!n(_,m.s))&&(m=y.i>m.i?y:_,m&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var v=u-1,m=g,y=g,_=null;v>=-1;--v)_=e(h[v]),_&&n(y,_.s)||!(m.i<y.i)||(y=m,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p},_findTargetItemIndex:function(t){var e,n,i=this.getContentGroup();return this._showController&&i.eachChild(function(i,r){var a=i.__legendDataIndex;null==n&&null!=a&&(n=r),a===t&&(e=r)}),null!=e?e:n}});uu("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});var yT=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=ji(a,t);if(null==o||0>o||x(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(p(l.dimensions,function(t){return a.mapDimension(t)}),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},_T=f,xT=_,bT=qi(),wT=function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||y(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){uf(r)&&(r=yT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=uf(r),u=a.axesInfo,h=s.axesInfo,c="leave"===i||uf(r),d={},f={},p={list:[],map:{}},g={showPointer:xT(ef,f),showTooltip:xT(nf,p)};_T(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);_T(s.coordSysAxesInfo[e],function(t){var e=t.axis,i=sf(u,t);if(!c&&n&&(!u||i)){var a=i&&i.value;null!=a||l||(a=e.pointToData(r)),null!=a&&Jd(t,a,g,!1,d)}})});var v={};return _T(h,function(t,e){var n=t.linkGroup;n&&!f[e]&&_T(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var a=r.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,lf(e),lf(t)))),v[t.key]=a}})}),_T(v,function(t,e){Jd(h[e],t,g,!0,d)}),rf(f,h,d),af(p,r,t,o),of(h,o,n),d}},ST=(vu({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}}}),qi()),MT=f,IT=mu({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";hf("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})})},remove:function(t,e){vf(e.getZr(),"axisPointer"),IT.superApply(this._model,"remove",arguments)},dispose:function(t,e){vf("axisPointer",e),IT.superApply(this._model,"dispose",arguments)}}),CT=qi(),TT=i,AT=y;mf.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.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(o){var c=_(yf,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new Py,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),n.getZr().add(o);wf(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=Vc(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return n===!0},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=CT(t).pointerEl=new Db[n.type](TT(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=CT(t).labelEl=new rb(TT(e.label));t.add(r),xf(r,i)}},updatePointerEl:function(t,e,n){var i=CT(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=CT(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),xf(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),a=e.get("status");if(!r.get("show")||!a||"hide"===a)return i&&n.remove(i),void(this._handle=null);var o;this._handle||(o=!0,i=this._handle=ja(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xm(t.event)},onmousedown:AT(this._onHandleDragMove,this,0,0),drift:AT(this._onHandleDragMove,this),ondragend:AT(this._onHandleDragEnd,this)}),n.add(i)),wf(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");x(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),rl(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){yf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,bf(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(bf(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(bf(i)),CT(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){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(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},mf.prototype.constructor=mf,ir(mf);var DT=mf.extend({makeElOption:function(t,e,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=Pf(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=Sf(i),c=kT[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Zc(o.model,n);Af(e,t,d,n,i,r)},getHandleTransform:function(t,e,n){var i=Zc(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Tf(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,a=i.getGlobalExtent(!0),o=Pf(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(o[1]+o[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),kT={line:function(t,e,n){var i=Df([e,n[0]],[e,n[1]],Lf(t));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:kf([e-i/2,n[0]],[i,r],Lf(t))}}};QI.registerAxisPointerClass("CartesianAxisPointer",DT),ou(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!x(e)&&(t.axisPointer.link=[e])}}),su(ZS.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Lc(t,e)}),uu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},wT),vu({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",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 PT=f,LT=Io,OT=["","-webkit-","-moz-","-o-"],zT="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Rf.prototype={constructor:Rf,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=zT+Ef(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"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 n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);
+var r=this.el.style;r.left=t+"px",r.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(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},Bf.prototype={constructor:Bf,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,a="{marker",o="|}",s=r.indexOf(a);s>=0;){var l=r.indexOf(o),u=r.substr(s+a.length,l-s-a.length);i["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},r=r.substr(l+1),s=r.indexOf("{marker")}this.el=new Xx({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var ET=y,RT=f,BT=so,NT=new rb({shape:{x:-1,y:-1,width:2,height:2}});mu({type:"tooltip",init:function(t,e){if(!ym.node){var n=t.getComponent("tooltip"),i=n.get("renderMode");this._renderMode=tr(i);var r;"html"===this._renderMode?(r=new Rf(e.getDom(),e),this._newLine="<br/>"):(r=new Bf(e),this._newLine="\n"),this._tooltipContent=r}},render:function(t,e,n){if(!ym.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");hf("itemTooltip",this._api,ET(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!ym.node){var r=Vf(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=NT;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=yT(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},r)}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,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(Vf(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=Nf([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}}},_tryShow:function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],s=[],l=Nf([e.tooltipOption,i]),u=this._renderMode,h=this._newLine,c={};RT(t,function(t){RT(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,a=[];if(e&&null!=i){var l=Cf(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(o){var h=n.getSeriesByIndex(o.seriesIndex),d=o.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Mh(e.axis,i),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var v=g.markers;r(c,v)}else p=g;a.push(p)}});var d=l;o.push("html"!==u?a.join(h):(d?Co(d)+h:"")+a.join(h))}})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,o,s,Math.random(),a[0],a[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,a=i.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(),h=Nf([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)}),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var a=new Ja(i,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,o,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var c=e;if(h&&"string"==typeof h)c=To(h,n,!0);else if("function"==typeof h){var d=ET(function(e,i){e===this._ticket&&(u.setContent(i,l,t),this._updatePosition(t,o,r,a,u,n,s))},this);this._ticket=i,c=h(n,i,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,o,r,a,u,n,s)}},_updatePosition:function(t,e,n,i,r,a,o){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"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([n,i],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),x(e))n=BT(e[0],s),i=BT(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=Ro(e,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if("string"==typeof e&&o){var p=Gf(e,d,u);n=p[0],i=p[1]}else{var p=Ff(n,i,r,s,l,h?null:20,c?null:20);n=p[0],i=p[1]}if(h&&(n-=Wf(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=Wf(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=Hf(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&RT(e,function(e,i){var r=e.dataByAxis||{},a=t[i]||{},o=a.dataByAxis||[];n&=r.length===o.length,n&&RT(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length,n&&RT(r,function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){ym.node||(this._tooltipContent.hide(),vf("itemTooltip",e))}}),uu({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),uu({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var VT=Mo,FT=Co,HT=vu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},isAnimationEnabled:function(){if(ym.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,n,i){var r=this.constructor,a=this.mainType+"Model";n||e.eachSeries(function(t){var n=t.get(this.mainType,!0),s=t[a];return n&&n.data?(s?s._mergeOption(n,e,!0):(i&&Uf(n),f(n.data,function(t){t instanceof Array?(Uf(t[0]),Uf(t[1])):Uf(t)}),s=new r(n,this,e),o(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[a]=s)):void(t[a]=null)},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=x(n)?p(n,VT).join(", "):VT(n),r=e.getName(t),a=FT(this.name);return(null!=n||r)&&(a+="<br />"),r&&(a+=FT(r),null!=n&&(a+=" : ")),null!=n&&(a+=FT(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});c(HT,Bw),HT.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 GT=u,WT=_,UT={min:WT(Yf,"min"),max:WT(Yf,"max"),average:WT(Yf,"average")},ZT=mu({type:"marker",init:function(){this.markerGroupMap=N()},render:function(t,e,n){var i=this.markerGroupMap;i.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var i=t[r];i&&this.renderSeries(t,i,e,n)},this),i.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});ZT.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(tp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,a=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Kc),u=ep(r,t,e);e.setData(u),tp(e.getData(),t,i),u.each(function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),a=b(i),s=b(r);if(a||s){var l=e.getRawValue(t),h=e.getDataParams(t);a&&(i=i(l,h)),s&&(r=r(l,h))}u.setItemVisual(t,{symbol:i,symbolSize:r,color:n.get("itemStyle.color")||o.getVisual("color")})}),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")}}),ou(function(t){t.markPoint=t.markPoint||{}}),HT.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 XT=function(t,e,n,a){var s=t.getData(),l=a.type;if(!x(a)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=a.xAxis||null!=a.yAxis)){var u,h;if(null!=a.yAxis||null!=a.xAxis)u=e.getAxis(null!=a.yAxis?"y":"x"),h=A(a.yAxis,a.xAxis);else{var c=qf(a,s,e,t);u=c.valueAxis;var d=ju(s,c.valueDataDim);h=Jf(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=i(a),v={};g.type=null,g.coord=[],v.coord=[],g.coord[p]=-1/0,v.coord[p]=1/0;var m=n.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),g.coord[f]=v.coord[f]=h,a=[g,v,{type:l,valueIndex:a.valueIndex,value:h}]}return a=[jf(t,a[0]),jf(t,a[1]),o({},a[2])],a[2].type=a[2].type||"",r(a[2],a[0]),r(a[2],a[1]),a};ZT.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markLineModel;if(e){var i=e.getData(),r=e.__from,a=e.__to;r.each(function(e){ap(r,e,!0,t,n),ap(a,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[r.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,n,i){function r(e,n,r){var a=e.getItemModel(n);ap(e,n,r,t,i),e.setItemVisual(n,{symbolSize:a.get("symbolSize")||g[r?0:1],symbol:a.get("symbol",!0)||p[r?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,o=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,new Ld);this.group.add(u.group);var h=op(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");x(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){r(c,t,!0),r(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){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),ou(function(t){t.markLine=t.markLine||{}}),HT.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 YT=function(t,e,n,i){var r=jf(t,i[0]),o=jf(t,i[1]),s=A,l=r.coord,u=o.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=a([{},r,o]);return h.coord=[r.coord,o.coord],h.x0=r.x,h.y0=r.y,h.x1=o.x,h.y1=o.y,h},jT=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];ZT.extend({type:"markArea",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var i=e.getData();i.each(function(e){var r=p(jT,function(r){return hp(i,e,r,t,n)});i.setItemLayout(e,r);var a=i.getItemGraphicEl(e);a.setShape("points",r)})}},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,a=t.id,o=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new Py});this.group.add(u.group),u.__keep=!0;var h=cp(r,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,p(jT,function(n){return hp(h,e,n,t,i)})),h.setItemVisual(e,{color:o.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new tb({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,n){var i=u.__data.getItemGraphicEl(n);Fa(i,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(i),h.setItemGraphicEl(t,i)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,n){var i=h.getItemModel(n),r=i.getModel("label"),a=i.getModel("emphasis.label"),o=h.getItemVisual(n,"color");t.useStyle(s(i.getModel("itemStyle").getItemStyle(),{fill:nn(o,.4),stroke:o})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),Aa(t.style,t.hoverStyle,r,a,{labelFetcher:e,labelDataIndex:n,defaultText:h.getName(n)||"",isRectText:!0,autoColor:o}),Ma(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),ou(function(t){t.markArea=t.markArea||{}});var qT=["rect","polygon","keep","clear"],KT=function(t,e){var n=t&&t.brush;if(x(n)||(n=n?[n]:[]),n.length){var i=[];f(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))});var r=t&&t.toolbox;x(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var a=r.feature||(r.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),dp(s),e&&!s.length&&s.push.apply(s,qT)}},$T=f,QT=S,JT=-1,tA=function(t){var e=t.mappingMethod,n=t.type,r=this.option=i(t);this.type=n,this.mappingMethod=e,this._normalizeData=nA[e];var a=eA[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(gp(r),fp(r)):"category"===e?r.categories?pp(r):gp(r,!0):(O("linear"!==e||r.dataExtent),gp(r))};tA.prototype={constructor:tA,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return y(this._normalizeData,this)}};var eA=tA.visualHandlers={color:{applyVisual:yp("color"),getColorMapper:function(){var t=this.option;return y("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),_p.call(this,t)}:function(e,n,i){var r=!!i;return!n&&(e=this._normalizeData(e)),i=Je(e,t.parsedVisual,i),r?i:rn(i,"rgba")},this)},_doMap:{linear:function(t){return rn(Je(t,this.option.parsedVisual),"rgba")},category:_p,piecewise:function(t,e){var n=wp.call(this,e);return null==n&&(n=rn(Je(t,this.option.parsedVisual),"rgba")),n},fixed:xp}},colorHue:vp(function(t,e){return en(t,e)}),colorSaturation:vp(function(t,e){return en(t,null,e)}),colorLightness:vp(function(t,e){return en(t,null,null,e)}),colorAlpha:vp(function(t,e){return nn(t,e)}),opacity:{applyVisual:yp("opacity"),_doMap:bp([0,1])},liftZ:{applyVisual:yp("liftZ"),_doMap:{linear:xp,category:xp,piecewise:xp,fixed:xp}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(w(i))n("symbol",i);else if(QT(i))for(var r in i)i.hasOwnProperty(r)&&n(r,i[r])},_doMap:{linear:mp,category:_p,piecewise:function(t,e){var n=wp.call(this,e);return null==n&&(n=mp.call(this,t)),n},fixed:xp}},symbolSize:{applyVisual:yp("symbolSize"),_doMap:bp([0,1])}},nA={linear:function(t){return oo(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=tA.findPieceIndex(t,e,!0);return null!=n?oo(n,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?JT:e},fixed:F};tA.listVisualTypes=function(){var t=[];return f(eA,function(e,n){t.push(n)}),t},tA.addVisualHandler=function(t,e){eA[t]=e},tA.isValidType=function(t){return eA.hasOwnProperty(t)},tA.eachVisual=function(t,e,n){S(t)?f(t,e,n):e.call(n,t)},tA.mapVisual=function(t,e,n){var i,r=x(t)?[]:S(t)?{}:(i=!0,null);return tA.eachVisual(t,function(t,a){var o=e.call(n,t,a);i?r=o:r[a]=o}),r},tA.retrieveVisuals=function(t){var e,n={};return t&&$T(eA,function(i,r){t.hasOwnProperty(r)&&(n[r]=t[r],e=!0)}),e?n:null},tA.prepareVisualTypes=function(t){if(QT(t)){var e=[];$T(t,function(t,n){e.push(n)}),t=e}else{if(!x(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},tA.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},tA.findPieceIndex=function(t,e,n){function i(e,n){var i=Math.abs(e-t);a>i&&(a=i,r=n)}for(var r,a=1/0,o=0,s=e.length;s>o;o++){var l=e[o].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return o;n&&i(l,o)}}for(var o=0,s=e.length;s>o;o++){var u=e[o],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(Mp(c[1],t,h[1]))return o}else if(1/0===h[1]){if(Mp(c[0],h[0],t))return o}else if(Mp(c[0],h[0],t)&&Mp(c[1],t,h[1]))return o;n&&i(h[0],o),n&&i(h[1],o)}}return n?1/0===t?e.length-1:t===-1/0?0:r:void 0};var iA=f,rA={lineX:kp(0),lineY:kp(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])&&Eh(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,a=t.y,o=t.width,s=t.height,l=i[0];return Eh(i,r,a)||Eh(i,r+o,a)||Eh(i,r,a+s)||Eh(i,r+o,a+s)||bn.create(t).contain(l[0],l[1])||qa(r,a,r+o,a,i)||qa(r,a,r,a+s,i)||qa(r+o,a,r+o,a+s,i)||qa(r,a+s,r+o,a+s,i)?!0:void 0}}},aA={axisPointer:1,tooltip:1,brush:1},oA=f,sA=u,lA=_,uA=["dataToPoint","pointToData"],hA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],cA=Bp.prototype;cA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=gA[t.brushType](0,n,e);t.__rangeOffset={offset:vA[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})},cA.matchOutputRanges=function(t,e,n){oA(t,function(t){var i=this.findTargetInfo(t,e);i&&i!==!0&&f(i.coordSyses,function(i){var r=gA[t.brushType](1,i,t.range);n(t,r.values,i,e)})},this)},cA.setInputRanges=function(t,e){oA(t,function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&n!==!0){t.panelId=n.panelId;var i=gA[t.brushType](0,n.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?vA[t.brushType](i.values,r.offset,Gp(i.xyMinMax,r.xyMinMax)):i.values}},this)},cA.makePanelOpts=function(t,e){return p(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e&&e(n),clipPath:Op(i),isTargetByCursor:Ep(i,t,n.coordSysModel),getLinearBrushOtherExtent:zp(i)}})},cA.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return i===!0||i&&sA(i.coordSyses,e.coordinateSystem)>=0},cA.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Vp(e,t),r=0;r<n.length;r++){var a=n[r],o=t.panelId;if(o){if(a.panelId===o)return a}else for(var r=0;r<fA.length;r++)if(fA[r](i,a))return a}return!0};var dA={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,a=N(),o={},s={};(n||i||r)&&(oA(n,function(t){var e=t.axis.grid.model;a.set(e.id,e),o[e.id]=!0}),oA(i,function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0}),oA(r,function(t){a.set(t.id,t),o[t.id]=!0,s[t.id]=!0}),a.each(function(t){var r=t.coordinateSystem,a=[];oA(r.getCartesians(),function(t){(sA(n,t.getAxis("x").model)>=0||sA(i,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:pA.grid,xAxisDeclared:o[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){oA(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:pA.geo})})}},fA=[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}],pA={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ga(t)),e}},gA={lineX:lA(Fp,0),lineY:lA(Fp,1),rect:function(t,e,n){var i=e[uA[t]]([n[0][0],n[1][0]]),r=e[uA[t]]([n[0][1],n[1][1]]),a=[Np([i[0],r[0]]),Np([i[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],r=p(n,function(n){var r=e[uA[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r});return{values:r,xyMinMax:i}}},vA={lineX:lA(Hp,0),lineY:lA(Hp,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 p(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}},mA=["inBrush","outOfBrush"],yA="__ecBrushSelect",_A="__ecInBrushSelectEvent",xA=ZS.VISUAL.BRUSH;du(xA,function(t,e,n){t.eachComponent({mainType:"brush"},function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1});var i=e.brushTargetManager=new Bp(e.option,t);i.setInputRanges(e.areas,t)})}),fu(xA,function(t,e,n){var r,a,o=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===v||m[t]}function u(t){return!!t.length}function h(t,e){var n=t.coordinateSystem;b|=n.hasAxisBrushed(),l(e)&&n.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(n,i,r){var a=Yp(n);if(a&&!jp(e,i)&&(f(w,function(i){a[i.brushType]&&e.brushTargetManager.controlSeries(i,n,t)&&r.push(i),b|=u(r)}),l(i)&&u(r))){var o=n.getData();o.each(function(t){Xp(a,r,o,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};o.push(d);var g=e.option,v=g.brushLink,m=[],y=[],_=[],b=0;n||(r=g.throttleType,a=g.throttleDelay);var w=p(e.areas,function(t){return qp(s({boundingRect:bA[t.brushType](t)},t))}),S=Cp(e.option,mA,function(t){t.mappingMethod="fixed"});x(v)&&f(v,function(t){m[t]=1}),t.eachSeries(function(t,e){var n=_[e]=[];"parallel"===t.subType?h(t,e,n):c(t,e,n)}),t.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(n);var i=Yp(t),r=_[e],a=t.getData(),o=l(e)?function(t){return y[t]?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return Xp(i,r,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?b:u(r))&&Ap(mA,S,a,o)})}),Up(e,r,a,o,n)});var bA={lineX:F,lineY:F,rect:function(t){return Kp(t.range)},polygon:function(t){for(var e,n=t.range,i=0,r=n.length;r>i;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=n[i];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&&Kp(e)}},wA=["#ddd"],SA=(vu({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;!e&&Tp(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:wA},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return $p(this.option,t)},this))},setBrushOption:function(t){this.brushOption=$p(this.option,t),this.brushType=this.brushOption.brushType}}),"\x00_ec_interaction_mutex");uu({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var MA=_,IA=f,CA=p,TA=Math.min,AA=Math.max,DA=Math.pow,kA=1e4,PA=6,LA=6,OA="globalPan",zA={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},EA={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},RA={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},BA=0;eg.prototype={constructor:eg,enableBrush:function(t){return this._brushType&&ig(this),t.brushType&&ng(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(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){IA(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function n(t,n){return e(t.__brushOption,n)}function a(e,n){var i=t[e];if(null!=n&&l[n]===c)u[e]=l[n];else{var r=u[e]=null!=n?(l[n].__brushOption=i,l[n]):ag(h,rg(h,i));lg(h,r)}}function o(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return r(i(RA),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Mu(l,t,n,e).add(a).update(a).remove(o).execute(),this},unmount:function(){return this.enableBrush(!1),dg(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(eg,Fm);var NA={mousedown:function(t){if(this._dragging)zg.call(this,t);else if(!t.target||!t.target.draggable){kg(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var n=this._creatingPanel=hg(this,t,e);n&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(Dg(this,t,e),this._dragging){kg(t);var n=Lg(this,t,e,!1);n&&fg(this,n)}},mouseup:zg},VA={lineX:Eg(0),lineY:Eg(1),rect:{createCover:function(t,e){return vg(MA(Mg,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=gg(t);return bg(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){mg(t,e,n,i)},updateCommon:yg,contain:Pg},polygon:{createCover:function(t,e){var n=new Py;return n.add(new eb({name:"main",style:xg(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new tb({name:"main",draggable:!0,drift:MA(Ig,t,e),ondragend:MA(fg,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n){e.childAt(0).setShape({points:Tg(t,e,n)})},updateCommon:yg,contain:Pg}};mu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new eg(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,Rg.apply(this,arguments)},updateTransform:Rg,updateView:Rg,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})}}),uu({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),uu({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var FA={},HA=Jw.toolbox.brush;Vg.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(HA.title)};
+var GA=Vg.prototype;GA.render=GA.updateView=function(t,e){var n,i,r;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,i=t.brushOption.brushMode||"single",r|=t.areas.length}),this._brushType=n,this._brushMode=i,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===i:"clear"===e?r:e===n)?"emphasis":"normal")})},GA.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return f(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},GA.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?!1:n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},Bg("brush",Vg),ou(KT);var WA=f,UA=function(t){var e=t&&t.visualMap;x(e)||(e=e?[e]:[]),WA(e,function(t){if(t){Fg(t,"splitList")&&!Fg(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&x(e)&&WA(e,function(t){S(t)&&(Fg(t,"start")&&!Fg(t,"min")&&(t.min=t.start),Fg(t,"end")&&!Fg(t,"max")&&(t.max=t.end))})}})};tw.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var ZA=ZS.VISUAL.COMPONENT;fu(ZA,{createOnAllSeries:!0,reset:function(t,e){var n=[];return e.eachComponent("visualMap",function(e){var i=t.pipelineContext;!e.isTargetSeries(t)||i&&i.large||n.push(Dp(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),n}}),fu(ZA,{createOnAllSeries:!0,reset:function(t,e){var n=t.getData(),i=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var r=e.getVisualMeta(y(Hg,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(n),o=n.getDimensionInfo(a);null!=o&&(r.dimension=o.index,i.push(r))}}),t.getData().setVisual("visualMeta",i)}});var XA={get:function(t,e,n){var r=i((YA[t]||{})[e]);return n&&x(r)?r[r.length-1]:r}},YA={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]}},jA=tA.mapVisual,qA=tA.eachVisual,KA=x,$A=f,QA=uo,JA=oo,tD=F,eD=vu({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,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,n)},optionUpdated:function(t,e){var n=this.option;ym.canvasSupported||(n.realtime=!1),!e&&Tp(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=Cp(this.option.controller,e,t),this.targetVisuals=Cp(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,n){e.push(n)}):e=Vi(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(n){t.call(e,this.ecModel.getSeriesByIndex(n))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(n){n===t&&(e=!0)}),e},formatValueText:function(t,e,n){function i(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var r,a,o=this.option,s=o.precision,l=this.dataBound,u=o.formatter;return n=n||["<",">"],x(t)&&(t=t.slice(),r=!0),a=e?t:r?[i(t[0]),i(t[1])]:i(t),w(u)?u.replace("{value}",r?a[0]:a).replace("{value2}",r?a[1]:a):b(u)?r?u(t[0],t[1]):u(t):r?t[0]===l[0]?n[0]+" "+a[1]:t[1]===l[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=QA([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var a=i[r],o=t.getDimensionInfo(a);if(!o.isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){KA(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:a.get("gradientColor")},$A(this.stateList,function(e){var n=t[e];if(w(n)){var i=XA.get(n,"active",h);i?(t[e]={},t[e][n]=i):delete t[e]}},this)}function e(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},$A(i,function(t,e){if(tA.isValidType(e)){var n=XA.get(e,"inactive",h);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function n(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");$A(this.stateList,function(a){var o=this.itemSize,s=t[a];s||(s=t[a]={color:h?r:[r]}),null==s.symbol&&(s.symbol=e&&i(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&i(n)||(h?o[0]:[o[0],o[0]])),s.symbol=jA(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;qA(l,function(t){t>u&&(u=t)}),s.symbolSize=jA(l,function(t){return JA(t,[0,u],[0,o[0]],!0)})}},this)}var a=this.ecModel,o=this.option,s={inRange:o.inRange,outOfRange:o.outOfRange},l=o.target||(o.target={}),u=o.controller||(o.controller={});r(l,s),r(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),n.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:tD,getValueState:tD,getVisualMeta:tD}),nD=[20,140],iD=eD.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(){iD.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){iD.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=nD[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=nD[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):x(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(){eD.prototype.completeVisualOption.apply(this,arguments),f(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=uo((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,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},getVisualMeta:function(t){function e(e,n){r.push({value:e,color:t(e,n)})}for(var n=Gg(this,"outOfRange",this.getExtent()),i=Gg(this,"inRange",this.option.range.slice()),r=[],a=0,o=0,s=i.length,l=n.length;l>o&&(!i.length||n[o]<=i[0]);o++)n[o]<i[a]&&e(n[o],"outOfRange");for(var u=1;s>a;a++,u=0)u&&r.length&&e(i[a],"outOfRange"),e(i[a],"inRange");for(var u=1;l>o;o++)(!i.length||i[i.length-1]<n[o])&&(u&&(r.length&&e(r[r.length-1].value,"outOfRange"),u=0),e(n[o],"outOfRange"));var h=r.length;return{stops:r,outerColors:[h?r[0].color:"transparent",h?r[h-1].color:"transparent"]}}}),rD=mu({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){return this.visualMapModel=t,t.get("show")===!1?void this.group.removeAll():void this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,n=Hb(e.get("padding")||0),i=t.getBoundingRect();t.add(new rb({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,n){function i(t){return s[t]}function r(t,e){s[t]=e}n=n||{};var a=n.forceState,o=this.visualMapModel,s={};if("symbol"===e&&(s.symbol=o.get("itemSymbol")),"color"===e){var l=o.get("contentColor");s.color=l}var u=o.controllerVisuals[a||o.getValueState(t)],h=tA.prepareVisualTypes(u);return f(h,function(a){var o=u[a];n.convertOpacityToAlpha&&"opacity"===a&&(a="colorAlpha",o=u.__alphaForOpacity),tA.dependsOn(a,e)&&o&&o.applyVisual(t,i,r)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;Bo(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:F}),aD=function(t,e,n,i,r,a){t=t||0;var o=n[1]-n[0];if(null!=r&&(r=Ug(r,[0,o])),null!=a&&(a=Math.max(a,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=Ug(s,[0,o]),r=a=Ug(s,[r,a]),i=0}e[0]=Ug(e[0],n),e[1]=Ug(e[1],n);var l=Wg(e,i);e[i]+=t;var u=r||0,h=n.slice();l.sign<0?h[0]+=u:h[1]-=u,e[i]=Ug(e[i],h);var c=Wg(e,i);null!=r&&(c.sign!==l.sign||c.span<r)&&(e[1-i]=e[i]+l.sign*r);var c=Wg(e,i);return null!=a&&c.span>a&&(e[1-i]=e[i]+c.sign*a),e},oD=oo,sD=f,lD=Math.min,uD=Math.max,hD=12,cD=6,dD=rD.extend({type:"visualMap.continuous",init:function(){dD.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.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 n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var r=this.visualMapModel,a=r.get("textGap"),o=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===n?-a:o[1]+a],s),u=this._applyTransform(0===n?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Xx({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:i,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,r=this._orient,a=this._useHandle,o=Zg(e,this.api,i),s=n.barGroup=this._createBarGroup(o);s.add(n.outOfRange=Yg()),s.add(n.inRange=Yg(null,a?Qg(this._orient):null,y(this._dragHandle,this,"all",!1),y(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("鍥�"),u=uD(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,r,o),this._createHandle(s,1,i,u,r,o)),this._createIndicator(s,i,u,r),t.add(s)},_createHandle:function(t,e,n,i,r){var a=y(this._dragHandle,this,e,!1),o=y(this._dragHandle,this,e,!0),s=Yg(jg(e,i),Qg(this._orient),a,o);s.position[0]=n[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new Xx({draggable:!0,drift:a,onmousemove:function(t){Xm(t.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===r?i/2:1.5*i,"horizontal"===r?0===e?-(1.5*i):1.5*i:0===e?-i/2:i/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,n,i){var r=Yg([[0,0]],"move");r.position[0]=e[0],r.attr({invisible:!0,silent:!0}),t.add(r);var a=this.visualMapModel.textStyleModel,o=new Xx({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(o);var s=["horizontal"===i?n/2:cD+3,0],l=this._shapes;l.indicator=r,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(t,r[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():$g(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[oD(e[0],n,i,!0),oD(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,r=[0,n.itemSize[1]];aD(e,i,r,t,0);var a=n.getExtent();this._dataInterval=[oD(i[0],r,a,!0),oD(i[1],r,a,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,r=[0,e.itemSize[1]],a=t?r:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,"inRange"),s=this._createBarVisual(n,n,r,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,o)},_createBarVisual:function(t,e,n,i){var r={forceState:i,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,r),o=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(n,o);return{barColor:new db(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var n=100,i=[],r=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var a=1;n>a;a++){var o=t[0]+r*a;if(o>t[1])break;i.push({color:this.getControllerVisual(o,"color",e),offset:a/n})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Py("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,a=n.handleLabels;sD([0,1],function(o){var s=r[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=Wa(n.handleLabelPoints[o],Ga(s,this.group));a[o].setStyle({x:l[0],y:l[1],text:i.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",n.barGroup)})},this)}},_showIndicator:function(t,e,n,i){var r=this.visualMapModel,a=r.getExtent(),o=r.itemSize,s=[0,o[1]],l=oD(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",qg(!!n,i,l,o[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Wa(u.indicatorLabelPoint,Ga(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),v=this._orient;p.setStyle({text:(n?n:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===v?g:"middle",textAlign:"horizontal"===v?"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 n=t.visualMapModel.itemSize,i=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);i[1]=lD(uD(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[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 n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var r=[0,i[1]],a=n.getExtent();t=lD(uD(r[0],t),r[1]);var o=Kg(n,a,r),s=[t-o,t+o],l=oD(t,r,a,!0),u=[oD(s[0],r,a,!0),oD(s[1],r,a,!0)];s[0]<r[0]&&(u[0]=-1/0),s[1]>r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):1/0===u[1]?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"鈮� ",o));var h=this._hoverLinkDataIndices,c=[];(e||$g(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=Yi(h,c);this._dispatchHighDown("downplay",Xg(d[0],n)),this._dispatchHighDown("highlight",Xg(d[1],n))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=e.dataIndex){var i=this.ecModel.getSeriesByIndex(e.seriesIndex);if(n.isTargetSeries(i)){var r=i.getData(e.dataType),a=r.get(n.getDataDimension(r),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",Xg(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var r=Ga(e,i?null:this.group);return Db[x(t)?"applyTransform":"transformDirection"](t,r,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}}),fD={type:"selectDataRange",event:"dataRangeSelected",update:"update"};uu(fD,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),ou(UA);{var pD=eD.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){pD.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();gD[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,n){return t&&t[e]&&(S(t[e])?t[e].hasOwnProperty(n):t[e]===n)}var e=this.option,n={},i=tA.listVisualTypes(),r=this.isCategory();f(e.pieces,function(t){f(i,function(e){t.hasOwnProperty(e)&&(n[e]=1)})}),f(n,function(n,i){var a=0;f(this.stateList,function(n){a|=t(e,n,i)||t(e.target,n,i)},this),!a&&f(this.stateList,function(t){(e[t]||(e[t]={}))[i]=XA.get(i,"inRange"===t?"active":"inactive",r)})},this),eD.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,f(i,function(t){var e=this.getSelectedMapKey(t);r.hasOwnProperty(e)||(r[e]=!0)},this),"single"===n.selectedMode){var a=!1;f(i,function(t){var e=this.getSelectedMapKey(t);r[e]&&(a?r[e]=!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=tA.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(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),function(e,n){var r=tA.findPieceIndex(e,this._pieceList);r===t&&i.push(n)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},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&&1/0===n[1]?0:(n[0]+n[1])/2}return e},getVisualMeta:function(t){function e(e,a){var o=r.getRepresentValue({interval:e});a||(a=r.getValueState(o));var s=t(o,a);e[0]===-1/0?i[0]=s:1/0===e[1]?i[1]=s:n.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var n=[],i=[],r=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],1/0!==o&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return f(a,function(t){var n=t.interval;n&&(n[0]>s&&e([s,n[0]],"outOfRange"),e(n.slice()),s=n[1])},this),{stops:n,outerColors:i}}}}),gD={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var a=(i[1]-i[0])/r;+a.toFixed(n)!==a&&5>n;)n++;t.precision=n,a=+a.toFixed(n);var o=0;t.minOpen&&e.push({index:o++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=o+r;l>o;s+=a){var u=o===r-1?i[1]:s+a;e.push({index:o++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:o++,interval:[i[1],1/0],close:[0,0]}),wo(e),f(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),Jg(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,n){S(t)||(t={value:t});var i={text:"",index:n};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var r=i.value=t.value;i.interval=[r,r],i.close=[1,1]}else{for(var a=i.interval=[],o=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==a[h];d++)a[h]=t[c[d]],o[h]=s[d],u[h]=2===d;null==a[h]&&(a[h]=l[h])}u[0]&&1/0===a[1]&&(o[0]=0),u[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(i.value=a[0])}i.visual=tA.retrieveVisuals(t),e.push(i)},this),Jg(t,e),wo(e),f(e,function(t){var e=t.close,n=[["<","鈮�"][e[1]],[">","鈮�"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};rD.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var r=t.piece,u=new Py;u.onclick=y(this._onItemClick,this,r),this._enableHoverLink(u,t.indexInModelPieceList);var h=n.getRepresentValue(r);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new Xx({style:{x:"right"===s?-i:l[0]+i,y:l[1]/2,text:r.text,textVerticalAlign:"middle",textAlign:s,textFont:a,textFill:o,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var n=this.visualMapModel,i=n.get("textGap"),r=n.textStyleModel,a=r.getFont(),o=r.getTextColor(),s=this._getItemAlign(),l=n.itemSize,u=this._getViewData(),h=u.endsText,c=A(n.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),$b(n.get("orient"),e,n.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function n(t){var n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:t,batch:Xg(n.findTargetDataIndices(e),n)})}t.on("mouseover",y(n,this,"highlight")).on("mouseout",y(n,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Zg(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,i,r){if(e){var a=new Py,o=this.visualMapModel.textStyleModel;a.add(new Xx({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?r:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=p(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}},_createItemSymbol:function(t,e,n){t.add(kh(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,r=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(r[a]=!0,f(r,function(t,e){r[e]=e===a})):r[a]=!r[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}})}ou(UA);var vD=vu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){vD.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var n=Ng(e);n&&r(t,n.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"}},tooltip:{show:!1}}});mu({type:"toolbox",render:function(t,e,n,i){function r(r,o){var s,l=c[r],d=c[o],f=u[l],p=new Ja(f,t,t.ecModel);if(l&&!d){if(tv(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=Ng(l);if(!g)return;s=new g(p,e,n)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=n}return!l&&d?void(s.dispose&&s.dispose(e,n)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,n)):(a(p,s,l),p.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},void(s.render&&s.render(p,e,n,i)))}function a(i,r,a){var u=i.getModel("iconStyle"),h=i.getModel("emphasis.iconStyle"),c=r.getIcons?r.getIcons():i.get("icon"),d=i.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[a]=p,d[a]=g}var v=i.iconPaths={};f(c,function(a,c){var f=ja(a,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle();var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",o({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Ma(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var t=h.getItemStyle();f.setStyle({text:d[c],textPosition:h.get("textPosition")||"bottom",textFill:h.get("textFill")||t.fill||t.stroke||"#000",textAlign:h.get("textAlign")||"center",textBackgroundColor:h.get("textBackgroundColor"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding")})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(i.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(r.onclick,r,e,n,c)),v[c]=f})}var s=this.group;if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new Mu(this._featureNames||[],c).add(r).update(r).remove(_(r,null)).execute(),this._featureNames=c,Xd(s,t,n),s.add(Yd(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var r=Fn(e,ei(i)),a=t.position[0]+s.position[0],o=t.position[1]+s.position[1]+l,u=!1;o+r.height>n.getHeight()&&(i.textPosition="top",u=!0);var h=u?-5-r.height:l+8;a+r.width/2>n.getWidth()?(i.textPosition=["100%",h],i.textAlign="right"):a-r.width/2<0&&(i.textPosition=[0,h],i.textAlign="left")}})}},updateView:function(t,e,n,i){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(t,e){f(this._features,function(n){n.remove&&n.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(n){n.dispose&&n.dispose(t,e)})}});var mD=Jw.toolbox.saveAsImage;ev.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:mD.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:mD.lang.slice()},ev.prototype.unusable=!ym.canvasSupported;var yD=ev.prototype;yD.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||ym.browser.ie||ym.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(a.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+r)}else{var h=n.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>',d=window.open();d.document.write(c)}else{var f=document.createElement("a");f.download=i+"."+r,f.target="_blank",f.href=a;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},Bg("saveAsImage",ev);var _D=Jw.toolbox.magicType;nv.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(_D.title),option:{},seriesIndex:{}};var xD=nv.prototype;xD.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return f(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var bD={line:function(t,e,n,i){return"bar"===t?r({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):void 0},bar:function(t,e,n,i){return"line"===t?r({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):void 0},stack:function(t,e,n,i){return"line"===t||"bar"===t?r({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0):void 0
+},tiled:function(t,e,n,i){return"line"===t||"bar"===t?r({id:e,stack:""},i.get("option.tiled")||{},!0):void 0}},wD=[["line","bar"],["stack","tiled"]];xD.onclick=function(t,e,n){var i=this.model,r=i.get("seriesIndex."+n);if(bD[n]){var a={series:[]},o=function(e){var r=e.subType,o=e.id,l=bD[n](r,o,e,i);l&&(s(l,e.option),a.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===n||"bar"===n)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;a[d]=a[d]||[];for(var g=0;p>=g;g++)a[d][p]=a[d][p]||{};a[d][p].boundaryGap="bar"===n}}};f(wD,function(t){u(t,n)>=0&&f(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},o),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:a})}},uu({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Bg("magicType",nv);var SD=Jw.toolbox.dataView,MD=new Array(60).join("-"),ID="    ",CD=new RegExp("["+ID+"]+","g");dv.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(SD.title),lang:i(SD.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},dv.prototype.onclick=function(t,e){function n(){i.removeChild(a),_._dom=null}var i=e.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=r.get("backgroundColor")||"#fff";var o=document.createElement("h4"),s=r.get("lang")||[];o.innerHTML=s[0]||r.get("title"),o.style.cssText="margin: 10px 20px;",o.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=r.get("optionToContent"),c=r.get("contentToOption"),d=ov(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:C(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=r.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textColor"),u.style.borderColor=r.get("textareaBorderColor"),u.style.backgroundColor=r.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 v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),y=document.createElement("div");v+=";background-color:"+r.get("buttonColor"),v+=";color:"+r.get("buttonTextColor");var _=this;_e(m,"click",n),_e(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):cv(u.value,p)}catch(i){throw n(),new Error("Data view format error "+i)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),m.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=v,m.style.cssText=v,!r.get("readOnly")&&g.appendChild(y),g.appendChild(m),a.appendChild(o),a.appendChild(l),a.appendChild(g),l.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},dv.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},dv.prototype.dispose=function(t,e){this.remove(t,e)},Bg("dataView",dv),uu({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];f(t.newOption.series,function(t){var i=e.getSeriesByName(t.name)[0];if(i){var r=i.get("data");n.push({name:t.name,data:fv(t.data,r)})}else n.push(o({type:"scatter"},t))}),e.mergeOption(s({series:n},t.newOption))});var TD=f,AD="\x00_ec_hist_store";tw.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var DD=["x","y","z","radius","angle","single"],kD=["cartesian2d","polar","singleAxis"],PD=xv(DD,["axisIndex","axis","index","id"]),LD=f,OD=uo,zD=function(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};zD.prototype={constructor:zD,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(n){if(_v(n.get("coordinateSystem"))){var i=this._dimName,r=e.queryComponents({mainType:i+"Axis",index:n.get(i+"AxisIndex"),id:n.get(i+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(n)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n=this._dimName,i=this.ecModel,r=this.getAxisModel(),a="x"===n||"y"===n;a?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle");var o;return i.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(o=t)}),o},getMinMaxSpan:function(){return i(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,n,i,r){var o=r?"Span":"ValueSpan";aD(0,t,n,"all",h["min"+o],h["max"+o]);for(var s=0;2>s;s++)e[s]=oo(t[s],n,i,!0),r&&(e[s]=a.parse(e[s]))}var n,i=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,o=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];LD(["start","end"],function(e,r){var h=t[e],c=t[e+"Value"];"percent"===o[r]?(null==h&&(h=s[r]),c=a.parse(oo(h,s,i))):(n=!0,c=null==c?i[r]:a.parse(c),h=oo(c,i,s)),u[r]=c,l[r]=h}),OD(u),OD(l);var h=this._minMaxSpan;return n?e(u,l,i,s,!1):e(l,u,s,i,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=wv(this,this._dimName,e),Iv(this);var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,Mv(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Mv(this,!0))},filterData:function(t){function e(t){return t>=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&LD(i,function(t){var i=t.getData(),o=i.mapDimension(n,!0);o.length&&("weakFilter"===r?i.filterSelf(function(t){for(var e,n,r,s=0;s<o.length;s++){var l=i.get(o[s],t),u=!isNaN(l),h=l<a[0],c=l>a[1];if(u&&!h&&!c)return!0;u&&(r=!0),h&&(e=!0),c&&(n=!0)}return r&&e&&n}):LD(o,function(n){if("empty"===r)t.setData(i=i.map(n,function(t){return e(t)?t:0/0}));else{var o={};o[n]=a,i.selectRange(o)}}),LD(o,function(t){i.setApproximateExtent(a,t)}))})}}};var ED=f,RD=PD,BD=vu({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=Cv(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=Cv(t);r(this.option,t,!0),r(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;ym.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Tv(this,t);var n=this.settledOption;ED([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,n,i,r){var a=this.dependentModels[e.axis][n],o=a.__dzAxisProxy||(a.__dzAxisProxy=new zD(e.name,n,this,r));t[e.name+"_"+n]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();RD(function(e){var n=e.axisIndex;t[n]=Vi(t[n])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;RD(function(n){null!=t[n.axisIndex]&&(e=!0)},this);var n=t.orient;return null==n&&e?"orient":e?void 0:(null==n&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),n=this.option,i=this.dependentModels;if(t){var r="vertical"===e?"y":"x";i[r+"Axis"].length?(n[r+"AxisIndex"]=[0],t=!1):ED(i.singleAxis,function(i){t&&i.get("orient",!0)===e&&(n.singleAxisIndex=[i.componentIndex],t=!1)})}t&&RD(function(e){if(t){var i=[],r=this.dependentModels[e.axis];if(r.length&&!i.length)for(var a=0,o=r.length;o>a;a++)"category"===r[a].get("type")&&i.push(a);n[e.axisIndex]=i,i.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&RD(function(e){var i=n[e.axisIndex],r=t.get(e.axisIndex),a=t.get(e.axisId),o=t.ecModel.queryComponents({mainType:e.axis,index:r,id:a})[0];r=o.componentIndex,u(i,r)<0&&i.push(r)})},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 n=!0;return RD(function(i){var r=t.get(i.axisIndex),a=this.dependentModels[i.axis][r];a&&a.get("type")===e||(n=!1)},this),n},_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 RD(function(e){if(null==t){var n=this.get(e.axisIndex);n.length&&(t=this.dependentModels[e.axis][n[0]])}},this),t},eachTargetAxis:function(t,e){var n=this.ecModel;RD(function(i){ED(this.get(i.axisIndex),function(r){t.call(e,i,r,this,n)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(t){var e=this.option,n=this.settledOption;ED([["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),Tv(this,t)},setCalculatedRange:function(t){var e=this.option;ED(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},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},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}}),ND=Gw.extend({type:"dataZoom",render:function(t,e,n){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){function t(t,e,n,i){for(var r,a=0;a<n.length;a++)if(n[a].model===t){r=n[a];break}r||n.push(r={model:t,axisModels:[],coordIndex:i}),r.axisModels.push(e)}var e=this.dataZoomModel,n=this.ecModel,i={};return e.eachTargetAxis(function(e,r){var a=n.getComponent(e.axis,r);if(a){var o=a.getCoordSysModel();o&&t(o,a,i[o.mainType]||(i[o.mainType]=[]),o.componentIndex)}},this),i}});BD.extend({type:"dataZoom.select"}),ND.extend({type:"dataZoom.select"}),su({getTargetSeries:function(t){var e=N();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,i){var r=i.getAxisProxy(t.name,n);f(r.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,i){i.getAxisProxy(t.name,n).reset(i,e)}),t.eachTargetAxis(function(t,n,i){i.getAxisProxy(t.name,n).filterData(i,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})})}}),uu("dataZoom",function(t,e){var n=bv(y(e.eachComponent,e,"dataZoom"),PD,function(t,e){return t.get(e.axisIndex)}),i=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){i.push.apply(i,n(t).nodes)}),f(i,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var VD=Jw.toolbox.dataZoom,FD=f,HD="\x00_ec_\x00toolbox-dataZoom_";Av.defaultOption={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:i(VD.title)};var GD=Av.prototype;GD.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,Pv(t,e,this,i,n),kv(t,e)},GD.onclick=function(t,e,n){WD[n].call(this)},GD.remove=function(){this._brushController.unmount()},GD.dispose=function(){this._brushController.dispose()};var WD={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(gv(this.ecModel))}};GD._onBrush=function(t,e){function n(t,e,n){var o=e.getAxis(t),s=o.model,l=i(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(n=aD(0,n.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(r[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}function i(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){var r=n.getAxisModel(t,e.componentIndex);r&&(i=n)}),i}if(e.isEnd&&t.length){var r={},a=this.ecModel;this._brushController.updateCovers([]);var o=new Bp(Dv(this.model.option),a,{include:["grid"]});o.matchOutputRanges(t,a,function(t,e,i){if("cartesian2d"===i.type){var r=t.brushType;"rect"===r?(n("x",i,e[0]),n("y",i,e[1])):n({lineX:"x",lineY:"y"}[r],i,e)}}),pv(a,r),this._dispatchZoomAction(r)}},GD._dispatchZoomAction=function(t){var e=[];FD(t,function(t){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Bg("dataZoom",Av),ou(function(t){function e(t,e){if(e){var r=t+"Index",a=e[r];null==a||"all"===a||x(a)||(a=a===!1||"none"===a?[]:[a]),n(t,function(n,o){if(null==a||"all"===a||-1!==u(a,o)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:HD+t+o};s[r]=o,i.push(s)}})}}function n(e,n){var i=t[e];x(i)||(i=i?[i]:[]),FD(i,n)}if(t){var i=t.dataZoom||(t.dataZoom=[]);x(i)||(t.dataZoom=i=[i]);var r=t.toolbox;if(r&&(x(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var UD=Jw.toolbox.restore;Lv.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:UD.title};var ZD=Lv.prototype;ZD.onclick=function(t,e){vv(t),e.dispatchAction({type:"restore",from:this.uid})},Bg("restore",Lv),uu({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var XD={path:null,compoundPath:null,group:Py,image:wi,text:Xx};ou(function(t){var e=t.graphic;x(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var YD=vu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,YD.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,a=[];this._flatten(i,a);var o=Wi(r,a);Ui(o);var s=this._elOptionsToUpdate=[];f(o,function(t,e){var n=t.option;n&&(s.push(n),Bv(t,n),Nv(r,e,n),Vv(r[e],n))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,e,n){f(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});mu({type:"graphic",init:function(){this._elMap=N(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;f(e,function(e){var r=e.$action,a=e.id,o=n.get(a),s=e.parentId,l=null!=s?n.get(s):i,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=Ev(e);r&&"merge"!==r?"replace"===r?(zv(o,n),Ov(a,l,h,n)):"remove"===r&&zv(o,n):o?o.attr(h):Ov(a,l,h,n);var c=n.get(a);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Fv(c,t,e))})}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,a=e.getWidth(),o=e.getHeight(),s=0;s<n.length;s++){var l=n[s],u=r.get(l.id);if(u&&u.isGroup){var h=u.parent,c=h===i;u.__ecGraphicWidth=so(u.__ecGraphicWidthOption,c?a:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=so(u.__ecGraphicHeightOption,c?o:h.__ecGraphicHeight)||0}}for(var s=n.length-1;s>=0;s--){var l=n[s],u=r.get(l.id);if(u){var h=u.parent,d=h===i?{width:a,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Bo(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){zv(e,t)}),this._elMap=N()},dispose:function(){this._clear()}});var jD="http://www.w3.org/2000/svg",qD=xx.CMD,KD=Array.prototype.join,$D="none",QD=Math.round,JD=Math.sin,tk=Math.cos,ek=Math.PI,nk=2*Math.PI,ik=180/ek,rk=1e-4,ak={};ak.brush=function(t){var e=t.style,n=t.__svgEl;n||(n=Hv("path"),t.__svgEl=n),t.path||t.createPathProxy();var i=t.path;if(t.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,t.buildPath(i,t.shape),t.__dirtyPath=!1;var r=Kv(i);r.indexOf("NaN")<0&&Yv(n,"d",r)}qv(n,e,!1,t),Xv(n,t.transform),null!=e.text&&hk(t,t.getBoundingRect())};var ok={};ok.brush=function(t){var e=t.style,n=e.image;if(n instanceof HTMLImageElement){var i=n.src;n=i}if(n){var r=e.x||0,a=e.y||0,o=e.width,s=e.height,l=t.__svgEl;l||(l=Hv("image"),t.__svgEl=l),n!==t.__imageSrc&&(jv(l,"href",n),t.__imageSrc=n),Yv(l,"width",o),Yv(l,"height",s),Yv(l,"x",r),Yv(l,"y",a),Xv(l,t.transform),null!=e.text&&hk(t,t.getBoundingRect())}};var sk={},lk=new bn,uk={},hk=function(t,e,n){var i=t.style;t.__dirty&&ii(i,!0);var r=i.text;if(null!=r){r+="";var a=t.__textSvgEl;a||(a=Hv("text"),t.__textSvgEl=a);var o,s,l=i.textPosition,u=i.textAlign||"left";"number"==typeof i.fontSize&&(i.fontSize+="px");var h=i.font||[i.fontStyle||"",i.fontWeight||"",i.fontSize||"",i.fontFamily||""].join(" ")||Qy,c=i.textVerticalAlign;n=Fn(r,h,u,c,i.textPadding,i.textLineHeight,!1,i.truncate);var d=n.lineHeight;if(l instanceof Array)o=e.x+yi(l[0],e.width),s=e.y+yi(l[1],e.height);else{var f=t.calculateTextPosition?t.calculateTextPosition(uk,i,e):Zn(uk,i,e);o=f.x,s=f.y,c=f.textVerticalAlign,u=f.textAlign}$v(a,c),h&&(a.style.font=h);var p=i.textPadding;if(Yv(a,"x",o),Yv(a,"y",s),qv(a,i,!0,t),t instanceof Xx||t.style.transformText)Xv(a,t.transform);else{if(t.transform)lk.copy(e),lk.applyTransform(t.transform),e=lk;else{var g=t.transformCoordToGlobal(e.x,e.y);e.x=g[0],e.y=g[1],t.transform=Ae(Te())}var v=i.textOrigin;"center"===v?(o=n.width/2+o,s=n.height/2+s):v&&(o=v[0]+o,s=v[1]+s);var m=-i.textRotation||0,y=Te();Le(y,y,m);var g=[t.transform[4],t.transform[5]];Pe(y,y,g),Xv(a,y)}var _=Qn(r,h,p,d,i.truncate),x=_.lines,b=x.length,w=u;"left"===w?(w="start",p&&(o+=p[3])):"right"===w?(w="end",p&&(o-=p[1])):"center"===w&&(w="middle",p&&(o+=(p[3]-p[1])/2));var S=0;if("bottom"===c?(S=-n.height+d,p&&(S-=p[2])):"middle"===c?(S=(-n.height+d)/2,p&&(s+=(p[0]-p[2])/2)):p&&(S+=p[0]),t.__text!==r||t.__textFont!==h){var M=t.__tspanList||[];t.__tspanList=M;for(var I=0;b>I;I++){var C=M[I];C?C.innerHTML="":(C=M[I]=Hv("tspan"),a.appendChild(C),$v(C,c),Yv(C,"text-anchor",w)),Yv(C,"x",o),Yv(C,"y",s+I*d+S),C.appendChild(document.createTextNode(x[I]))}for(;I<M.length;I++)a.removeChild(M[I]);M.length=b,t.__text=r,t.__textFont=h}else if(t.__tspanList.length)for(var T=t.__tspanList.length,I=0;T>I;++I){var C=t.__tspanList[I];C&&(Yv(C,"x",o),Yv(C,"y",s+I*d+S))}}};sk.drawRectText=hk,sk.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],hk(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Qv.prototype={diff:function(t,e,n){function i(){for(var n=-1*s;s>=n;n+=2){var i,l=u[n-1],h=u[n+1],c=(h?h.newPos:0)-n;l&&(u[n-1]=void 0);var d=l&&l.newPos+1<a,f=h&&c>=0&&o>c;if(d||f){if(!d||f&&l.newPos<h.newPos?(i=tm(h),r.pushComponent(i.components,void 0,!0)):(i=l,i.newPos++,r.pushComponent(i.components,!0,void 0)),c=r.extractCommon(i,e,t,n),i.newPos+1>=a&&c+1>=o)return Jv(r,i.components,e,t);u[n]=i}else u[n]=void 0}s++}n||(n=function(t,e){return t===e}),this.equals=n;var r=this;t=t.slice(),e=e.slice();var a=e.length,o=t.length,s=1,l=a+o,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],e,t,0);if(u[0].newPos+1>=a&&h+1>=o){for(var c=[],d=0;d<e.length;d++)c.push(d);return[{indices:c,count:e.length}]}for(;l>=s;){var f=i();if(f)return f}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,a=n.length,o=t.newPos,s=o-i,l=0;r>o+1&&a>s+1&&this.equals(e[o+1],n[s+1]);)o++,s++,l++;return l&&t.components.push({count:l}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var ck=new Qv,dk=function(t,e,n){return ck.diff(t,e,n)},fk="0",pk="1";em.prototype.createElement=Hv,em.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?(n=e.insertBefore(this.createElement("defs"),e.firstChild),n.contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;i>=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},em.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},em.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},em.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},em.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return f(this._tagNames,function(n){var i=t.getElementsByTagName(n);e=e.concat([].slice.call(i))}),e},em.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;f(t,function(t){t[e._markLabel]=fk})},em.prototype.markUsed=function(t){t&&(t[this._markLabel]=pk)},em.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),n=this;f(e,function(e){e[n._markLabel]!==pk&&t.removeChild(e)})}},em.prototype.getSvgProxy=function(t){return t instanceof Hr?ak:t instanceof wi?ok:t instanceof Xx?sk:ak},em.prototype.getTextSvgElement=function(t){return t.__textSvgEl},em.prototype.getSvgElement=function(t){return t.__svgEl},h(nm,em),nm.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;f(["fill","stroke"],function(i){if(e.style[i]&&("linear"===e.style[i].type||"radial"===e.style[i].type)){var r,a=e.style[i],o=n.getDefs(!0);a._dom?(r=a._dom,o.contains(a._dom)||n.addDom(r)):r=n.add(a),n.markUsed(e);var s=r.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}})}},nm.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Iy("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},nm.prototype.update=function(t){var e=this;em.prototype.update.call(this,t,function(){var n=t.type,i=t._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},nm.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 Iy("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,r=n.length;r>i;++i){var a=this.createElement("stop");a.setAttribute("offset",100*n[i].offset+"%");var o=n[i].color;if(o.indexOf(!1)){var s=je(o)[3],l=Qe(o);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",n[i].color);e.appendChild(a)}t._dom=e},nm.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&em.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&em.prototype.markUsed.call(this,e._dom)}},h(im,em),im.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},im.prototype.updateDom=function(t,e,n){if(e&&e.length>0){var i,r,a=this.getDefs(!0),o=e[0],s=n?"_textDom":"_dom";o[s]?(r=o[s].getAttribute("id"),i=o[s],a.contains(i)||a.appendChild(i)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",r),a.appendChild(i),o[s]=i);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var u=Array.prototype.slice.call(o.transform);ke(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var h=this.getSvgElement(o);i.innerHTML="",i.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(i,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},im.prototype.markUsed=function(t){var e=this;t.__clipPaths&&f(t.__clipPaths,function(t){t._dom&&em.prototype.markUsed.call(e,t._dom),t._textDom&&em.prototype.markUsed.call(e,t._textDom)})},h(rm,em),rm.prototype.addWithoutUpdate=function(t,e){if(e&&am(e.style)){var n,i=e.style;if(i._shadowDom){n=i._shadowDom;var r=this.getDefs(!0);r.contains(i._shadowDom)||this.addDom(n)}else n=this.add(e);this.markUsed(e);var a=n.getAttribute("id");t.style.filter="url(#"+a+")"}},rm.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},rm.prototype.update=function(t,e){var n=e.style;if(am(n)){var i=this;em.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else this.remove(t,n)},rm.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},rm.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,a,o,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)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/u),n.setAttribute("flood-color",o);var h=a/2/l,c=a/2/u,d=h+" "+c;n.setAttribute("stdDeviation",d),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(n),s._shadowDom=e},rm.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&em.prototype.markUsed.call(this,e._shadowDom)};var gk=function(t,e,n,i){this.root=t,this.storage=e,this._opts=n=o({},n||{});var r=Hv("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new nm(i,r),this.clipPathManager=new im(i,r),this.shadowManager=new rm(i,r);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=a,t.appendChild(a),a.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]};gk.prototype={constructor:gk,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 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,n=this._svgRoot,i=this._visibleList,r=t.length,a=[];for(e=0;r>e;e++){var o=t[e],s=sm(o),l=fm(o)||dm(o);o.invisible||(o.__dirty&&(s&&s.brush(o),this.clipPathManager.update(o),o.style&&(this.gradientManager.update(o.style.fill),this.gradientManager.update(o.style.stroke),this.shadowManager.update(l,o)),o.__dirty=!1),a.push(o))}var u,h=dk(i,a);for(e=0;e<h.length;e++){var c=h[e];if(c.removed)for(var d=0;d<c.count;d++){var o=i[c.indices[d]],l=fm(o),f=dm(o);cm(n,l),cm(n,f)}}for(e=0;e<h.length;e++){var c=h[e];if(c.added)for(var d=0;d<c.count;d++){var o=a[c.indices[d]],l=fm(o),f=dm(o);u?um(n,l,u):hm(n,l),l?um(n,f,l):u?um(n,f,u):hm(n,f),um(n,f,l),u=f||l||u,this.gradientManager.addWithoutUpdate(l,o),this.shadowManager.addWithoutUpdate(u,o),this.clipPathManager.markUsed(o)}else if(!c.removed)for(var d=0;d<c.count;d++){var o=a[c.indices[d]];u=l=dm(o)||fm(o)||u,this.gradientManager.markUsed(o),this.gradientManager.addWithoutUpdate(l,o),this.shadowManager.markUsed(o),this.shadowManager.addWithoutUpdate(l,o),this.clipPathManager.markUsed(o)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");if(0===n.length){if(t){var n=e.insertBefore(Hv("defs"),e.firstChild);return n.contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;i>=0;--i)if(e[i]===t)return!0;return!1}),n}return null}return n[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.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,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||om(s[n])||om(o.style[n]))-(om(s[r])||0)-(om(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(){this.refresh();var t=this._svgRoot.outerHTML;return"data:image/svg+xml;charset=UTF-8,"+t}},f(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){gk.prototype[t]=pm(t)
+}),Bi("svg",gk),t.version=PS,t.dependencies=LS,t.PRIORITY=ZS,t.init=Jl,t.connect=tu,t.disConnect=eu,t.disconnect=cM,t.dispose=nu,t.getInstanceByDom=iu,t.getInstanceById=ru,t.registerTheme=au,t.registerPreprocessor=ou,t.registerProcessor=su,t.registerPostUpdate=lu,t.registerAction=uu,t.registerCoordinateSystem=hu,t.getCoordinateSystemDimensions=cu,t.registerLayout=du,t.registerVisual=fu,t.registerLoading=gu,t.extendComponentModel=vu,t.extendComponentView=mu,t.extendSeriesModel=yu,t.extendChartView=_u,t.setCanvasCreator=xu,t.registerMap=bu,t.getMap=wu,t.dataTool=dM,t.zrender=A_,t.number=Fb,t.format=Yb,t.throttle=il,t.helper=fI,t.matrix=Jm,t.vector=Nm,t.color=yy,t.parseGeoJSON=gI,t.parseGeoJson=_I,t.util=xI,t.graphic=bI,t.List=MM,t.Model=Ja,t.Axis=yI,t.env=ym});
\ No newline at end of file
diff --git a/fzzy-igdss-web/src/main/resources/static/security/quantity.css b/fzzy-igdss-web/src/main/resources/static/security/quantity.css
new file mode 100644
index 0000000..db7e3c5
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/security/quantity.css
@@ -0,0 +1,559 @@
+@charset "utf-8";
+/* 鑷畾涔夋牱寮� */
+:root {
+    --primary-color: #0f3460;
+    --secondary-color: #1a508b;
+    --accent-color: #e94560;
+    --dark-color: #16213e;
+    --success-color: #28a745;
+    --warning-color: #ffc107;
+    --danger-color: #dc3545;
+    --blue-color: #0d6efd;
+    --teal-color: #00bfa5;
+}
+
+body {
+    background-color: #f5f5f5;
+    font-family: 'Microsoft YaHei', sans-serif;
+    padding: 10px;
+}
+
+.header {
+    background-color: var(--primary-color);
+    color: white;
+    padding: 15px 0;
+    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+    position: sticky;
+    top: 0;
+    z-index: 999;
+}
+
+.logo {
+    display: flex;
+    align-items: center;
+}
+
+.logo i {
+    font-size: 24px;
+    margin-right: 10px;
+}
+
+.logo h1 {
+    font-size: 18px;
+    font-weight: bold;
+    margin: 0;
+}
+
+.nav-item {
+    margin-left: 20px;
+    color: rgba(255,255,255,0.8);
+    cursor: pointer;
+}
+
+.nav-item:hover {
+    color: white;
+}
+
+.user-info {
+    display: flex;
+    align-items: center;
+}
+
+.user-info img {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    margin-right: 10px;
+}
+
+.card {
+    background: white;
+    border-radius: 4px;
+    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
+    margin-bottom: 15px;
+}
+.h-card {
+    margin-bottom: 0 !important;
+}
+.card-header {
+    padding: 15px;
+    border-bottom: 1px solid #e6e6e6;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.card-header h2 {
+    font-size: 16px;
+    font-weight: bold;
+    margin: 0;
+}
+
+.card-body {
+    padding: 15px;
+}
+
+.stat-card {
+    display: flex;
+    align-items: center;
+    padding: 20px;
+}
+
+.i-container{
+    width: 100%;
+    /*	max-width: 1680px;*/
+    min-width: 1340px;
+    margin-left: auto;
+    margin-right: auto;
+    overflow: hidden;
+}
+
+.stat-icon {
+    width: 48px;
+    height: 48px;
+    border-radius: 50%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-right: 15px;
+}
+
+.stat-info {
+    flex: 1;
+}
+
+.stat-title {
+    color: #909399;
+    font-size: 14px;
+}
+
+.stat-value {
+    font-size: 24px;
+    font-weight: bold;
+    margin: 5px 0;
+}
+
+.stat-tag {
+    background-color: #f0f2f5;
+    color: #606266;
+    padding: 3px 8px;
+    border-radius: 10px;
+    font-size: 12px;
+}
+
+.video-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr;
+    gap: 15px;
+}
+
+.video-box {
+    position: relative;
+    background-color: #333;
+    border-radius: 4px;
+    overflow: hidden;
+    padding-top: 56.25%; /* 16:9姣斾緥 */
+}
+
+.video-box img {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.video-label {
+    position: absolute;
+    top: 10px;
+    left: 10px;
+    background-color: rgba(0,0,0,0.5);
+    color: white;
+    padding: 5px 10px;
+    border-radius: 3px;
+    font-size: 12px;
+}
+
+.video-data {
+    position: absolute;
+    bottom: 10px;
+    left: 10px;
+    background-color: rgba(0,0,0,0.5);
+    color: white;
+    padding: 8px;
+    border-radius: 3px;
+    font-size: 12px;
+}
+
+.video-controls {
+    position: absolute;
+    bottom: 10px;
+    right: 10px;
+}
+
+.video-btn {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    background-color: rgba(255,255,255,0.2);
+    color: white;
+    display: inline-flex;
+    align-items: center;
+    justify-content: center;
+    margin-left: 5px;
+    cursor: pointer;
+}
+
+.video-btn:hover {
+    background-color: rgba(255,255,255,0.4);
+}
+
+.temp-mark {
+    position: absolute;
+    top: 25%;
+    left: 33%;
+    width: 24px;
+    height: 24px;
+    border-radius: 50%;
+    background-color: rgba(233,69,96,0.8);
+    color: white;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    animation: pulse 2s infinite;
+    cursor: pointer;
+}
+
+@keyframes pulse {
+    0% { transform: scale(1); }
+    50% { transform: scale(1.1); }
+    100% { transform: scale(1); }
+}
+
+.temp-scale {
+    position: absolute;
+    top: 15px;
+    right: 15px;
+    background-color: rgba(0,0,0,0.5);
+    color: white;
+    padding: 8px;
+    border-radius: 3px;
+    font-size: 12px;
+}
+
+.record-grid {
+    display: grid;
+    grid-template-columns: repeat(4, 1fr);
+    gap: 15px;
+}
+
+.record-item {
+    background-color: #f5f5f5;
+    border-radius: 4px;
+    overflow: hidden;
+    cursor: pointer;
+}
+
+.record-item:hover {
+    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
+}
+
+.record-img {
+    width: 100%;
+    height: 120px;
+    position: relative;
+}
+
+.record-img img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.record-label {
+    position: absolute;
+    top: 5px;
+    left: 5px;
+    background-color: rgba(0,0,0,0.5);
+    color: white;
+    padding: 3px 8px;
+    border-radius: 3px;
+    font-size: 12px;
+}
+
+.record-info {
+    padding: 10px;
+}
+
+.record-name {
+    font-size: 14px;
+    font-weight: 500;
+    margin-bottom: 5px;
+}
+
+.record-time {
+    font-size: 12px;
+    color: #909399;
+}
+
+.record-alert {
+    font-size: 12px;
+    color: var(--accent-color);
+    margin-top: 5px;
+}
+
+.alert-item {
+    border-left: 4px solid #e6a23c;
+    background-color: #fdf6ec;
+    padding: 10px 15px;
+    margin-bottom: 10px;
+    border-radius: 0 4px 4px 0;
+}
+
+.alert-item.accent {
+    border-left-color: var(--accent-color);
+    background-color: #fef0f0;
+}
+
+.alert-item.gray {
+    border-left-color: #909399;
+    background-color: #f2f2f2;
+}
+
+.alert-header {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 5px;
+}
+
+.alert-title {
+    font-weight: 500;
+    font-size: 14px;
+}
+
+.alert-time {
+    font-size: 12px;
+    color: #909399;
+}
+
+.alert-content {
+    font-size: 13px;
+    color: #606266;
+    margin-bottom: 10px;
+}
+
+.tool-grid {
+    display: grid;
+    grid-template-columns: 1fr 1fr;
+    gap: 10px;
+}
+
+.tool-grid2 {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr;
+    gap: 10px;
+}
+
+.tool-item {
+    background-color: #f5f5f5;
+    padding: 15px;
+    border-radius: 4px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    cursor: pointer;
+}
+
+.tool-item:hover {
+    background-color: #e6e6e6;
+}
+
+.tool-icon {
+    font-size: 24px;
+    color: var(--primary-color);
+    margin-bottom: 10px;
+}
+
+.tool-name {
+    font-size: 14px;
+}
+
+.palette-grid {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    gap: 10px;
+}
+
+.palette-item {
+    border: 1px solid #e6e6e6;
+    padding: 8px;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    cursor: pointer;
+}
+
+.palette-item.active {
+    border-color: var(--primary-color);
+    background-color: rgba(15, 52, 96, 0.05);
+}
+
+.palette-color {
+    width: 12px;
+    height: 4px;
+    margin-right: 5px;
+}
+
+/* 鐑垚鍍忓伐鍏锋牱寮忚皟鏁� */
+.tool-grid-simple {
+    display: grid;
+    grid-template-columns: 1fr 1fr;
+    gap: 15px;
+    margin-top: 10px;
+}
+
+.tool-item-simple {
+    background-color: #f5f5f5;
+    padding: 20px 15px;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+    transition: all 0.3s ease;
+}
+
+.tool-item-simple:hover {
+    background-color: rgba(15, 52, 96, 0.1);
+    transform: translateY(-2px);
+}
+
+.tool-icon-simple {
+    color: var(--primary-color);
+    margin-right: 12px;
+}
+
+.tool-icon-simple >i {
+    font-size: 35px;
+}
+
+.tool-text {
+    text-align: left;
+}
+
+.tool-name-simple {
+    font-size: 16px;
+    font-weight: 500;
+    color: #333;
+}
+
+.tool-desc {
+    font-size: 12px;
+    color: #909399;
+    margin-top: 3px;
+}
+
+.palette-grid {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    gap: 10px;
+    margin-top: 15px;
+}
+
+.palette-item {
+    border: 1px solid #e6e6e6;
+    padding: 8px;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    cursor: pointer;
+}
+
+.palette-item.active {
+    border-color: var(--primary-color);
+    background-color: rgba(15, 52, 96, 0.05);
+}
+
+.palette-color {
+    width: 12px;
+    height: 4px;
+    margin-right: 5px;
+}
+
+/* 娓╁害闃堝�艰缃牱寮� */
+.threshold-item {
+    margin-bottom: 20px;
+}
+
+.threshold-label {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 8px;
+    font-size: 14px;
+}
+
+.threshold-name {
+    font-weight: 500;
+    color: #333;
+}
+
+.threshold-value {
+    color: var(--primary-color);
+    font-weight: bold;
+}
+
+.threshold-slider {
+    width: 100%;
+}
+
+.threshold-tips {
+    margin-top: 5px;
+    font-size: 12px;
+    color: #909399;
+}
+
+.threshold-footer {
+    margin-top: 25px;
+    text-align: center;
+    padding-top: 15px;
+    border-top: 1px solid #f0f0f0;
+}
+
+.w-select {
+    min-width: 150px;
+    min-height: 36px;
+    border-radius: 4px;
+}
+.w-select >option {
+    min-height: 36px;
+    line-height: 36px;
+}
+
+/* ECharts瀹瑰櫒鏍峰紡 */
+#temperatureChart {
+    width: 100%;
+    height: 100%;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 992px) {
+    .video-container {
+        grid-template-columns: 1fr;
+    }
+
+    .record-grid {
+        grid-template-columns: repeat(2, 1fr);
+    }
+}
+
+@media (max-width: 768px) {
+    .record-grid {
+        grid-template-columns: 1fr;
+    }
+}
\ No newline at end of file
diff --git a/fzzy-igdss-web/src/main/resources/static/security/quantity.js b/fzzy-igdss-web/src/main/resources/static/security/quantity.js
new file mode 100644
index 0000000..856ddd3
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/security/quantity.js
@@ -0,0 +1,144 @@
+var layer;
+var form;
+var curCamera;
+
+layui.use(['layer'], function () {
+    form = layui.form;
+    layer = layui.layer;
+
+    // 璋冭壊鏉垮垏鎹簨浠�
+    document.querySelectorAll('.palette-item').forEach(item => {
+        item.addEventListener('click', function() {
+            document.querySelectorAll('.palette-item').forEach(i => {
+                i.classList.remove('active');
+            });
+            this.classList.add('active');
+            const paletteName = this.textContent.trim();
+            layer.msg(`宸插垏鎹㈣嚦${paletteName}璋冭壊鏉縛, {icon: 1, time: 1000});
+        });
+    });
+
+
+    //閫夋嫨鎽勫儚澶村悗瑙﹀彂鐨勪簨浠�
+    const cameraSelect = document.getElementById('select-camera');
+    cameraSelect.addEventListener('change', function() {
+        const selectedCamera = this.value;
+        //console.log("--------------"+selectedCamera);
+        video(selectedCamera);
+
+        // 鏇存柊娓╁害璧板娍鍥�
+        // updateEchartsTemp(selectedCamera);
+    });
+
+
+    // 鍒濆鍖朎Charts娓╁害璧板娍鍥�
+    initEchartsTemp();
+
+});
+
+/**
+ * 瑙嗛鎾斁
+ * @param selectId
+ */
+function video(selectId) {
+    //浠庡垪琛ㄤ腑鑾峰彇鎽勫儚澶翠俊鎭�
+    curCamera = listCamera.find(camera => camera.id === selectId);
+    if (!curCamera) { layer.msg('娌℃湁鑾峰彇鍒板綋鍓嶆憚鍍忓ご淇℃伅鈥︹��', {icon: 1, time: 1200});}
+
+
+}
+
+/**
+ * 鏇存柊娓╁害璧板娍鍥�
+ * @param selectId
+ */
+function updateEchartsTemp(selectId) {
+    var data = {
+        cameraId: selectId
+    };
+    $.ajax({
+        type: 'POST',
+        url: "/security/infrared/chart-data",
+        dataType: 'JSON',
+        contentType: "application/json;charset=UTF-8",
+        data: JSON.stringify(data),
+        success: function (result) {
+            //layer.msg("淇℃伅鏇存柊瀹屾垚锛侊紒");
+        },
+        error: function (result) {
+           // layer.msg(result.msg);
+        }
+    });
+}
+
+// 鍒濆鍖朎Charts娓╁害璧板娍鍥�
+function initEchartsTemp() {
+    // 鍒濆鍖朎Charts娓╁害璧板娍鍥�
+    var temperatureChartDom = document.getElementById('temperatureChart');
+    var temperatureChart = echarts.init(temperatureChartDom);
+
+    // 鍥捐〃閰嶇疆椤�
+    var option = {
+        tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+                type: 'cross',
+                label: {
+                    backgroundColor: '#6a7985'
+                }
+            }
+        },
+        legend: {
+            data: ['鏁伴噺 (KG)'],
+            top: 0
+        },
+        grid: {
+            left: '3%',
+            right: '4%',
+            bottom: '3%',
+            containLabel: true
+        },
+        xAxis: [
+            {
+                type: 'category',
+                boundaryGap: false,
+                data: ['12-01', '12-02', '12-03', '12-04', '12-05', '12-06', '12-07']
+            }
+        ],
+        yAxis: [
+            {
+                type: 'value',
+                name: '鏁伴噺 (KG)',
+                min: 0,
+                max: 3000000,
+                axisLabel: {
+                    formatter: '{value} KG'
+                }
+            }
+        ],
+        series: [
+            {
+                name: '鏁伴噺 (KG)',
+                type: 'line',
+                smooth: true,
+                lineStyle: {
+                    width: 2,
+                    color: '#0f3460'
+                },
+                areaStyle: {
+                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                        { offset: 0, color: 'rgba(15, 52, 96, 0.3)' },
+                        { offset: 1, color: 'rgba(15, 52, 96, 0.05)' }
+                    ])
+                },
+                data: [2560000, 2510000, 2540000, 2530000, 2490000, 2610000, 2570000]
+            }
+        ]
+    };
+    // 娓叉煋鍥捐〃
+    option && temperatureChart.setOption(option);
+    // 绐楀彛澶у皬鍙樺寲鏃惰皟鏁村浘琛ㄥぇ灏�
+    window.addEventListener('resize', function() {
+        temperatureChart.resize();
+    });
+}
\ No newline at end of file
diff --git a/fzzy-igdss-web/src/main/resources/templates/security/quantity.html b/fzzy-igdss-web/src/main/resources/templates/security/quantity.html
new file mode 100644
index 0000000..7358613
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/security/quantity.html
@@ -0,0 +1,264 @@
+<!DOCTYPE html>
+<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <title>璐ㄦ娂鐩戠骞冲彴-鏁伴噺鐩戞祴</title>
+    <link rel="stylesheet" th:href="@{/ajax/libs/layui/css/layui.css}"/>
+    <link rel="stylesheet" th:href="@{/security/quantity.css}"/>
+</head>
+<body>
+<!-- 涓昏鍐呭鍖� -->
+<div class="i-container">
+    <!-- 涓讳綋鍐呭 -->
+    <div class="layui-row layui-col-space15">
+        <!-- 宸︿晶锛氬疄鏃剁洃鎺� -->
+        <div class="layui-col-lg8">
+            <!-- 瀹炴椂鐑垚鍍忕洃鎺� -->
+            <div class="card">
+                <div class="card-header">
+                    <h2>瀹炴椂鐩戞帶鐢婚潰</h2>
+                    <div class="layui-row layui-col-space10">
+                        <div class="layui-inline">
+                            <label class="layui-form-label">浠撳簱鍒楄〃</label>
+                            <select id="select-camera" class="layui-form-select w-select">
+                                <option>璇烽�夋嫨鈥︹��</option>
+                                <option th:each="camera:${listCamera}" th:value="${camera.id}" th:text="${camera.name}"></option>
+                            </select>
+                        </div>
+                    </div>
+                </div>
+                <div class="card-body">
+                    <!-- 鍙岃棰戝睍绀哄尯鍩� -->
+                    <div class="video-container" id="video-container" style="grid-template-columns: 1fr;">
+                        <!-- 鐑垚鍍忚棰戠敾闈� -->
+                        <div class="video-box" id="thermal-video">
+                            <div class="video-label">
+                                <i class="layui-icon layui-icon-camera-fill"></i> 鐑垚鍍忚棰�
+                            </div>
+                            <div id="divPlugin2">
+                                <img th:src="@{/img/web/security/p-snap.jpg}" alt="鐑垚鍍忓疄鏃剁敾闈�">
+                            </div>
+                            <!-- 娓╁害鏍囪鐐�
+                            <div class="temp-mark" title="寮傚父楂樻俯鐐�: 32掳C">
+                                <i class="fa fa-thermometer-full"></i>
+                            </div>
+                            -->
+
+<!--                            &lt;!&ndash; 娓╁害鏍囧昂 &ndash;&gt;-->
+<!--                            <div class="temp-scale">-->
+<!--                                <div style="margin-bottom: 5px;">35掳C <span class="palette-color" style="background-color: #dc3545;"></span></div>-->
+<!--                                <div style="margin-bottom: 5px;">30掳C <span class="palette-color" style="background-color: #fd7e14;"></span></div>-->
+<!--                                <div style="margin-bottom: 5px;">25掳C <span class="palette-color" style="background-color: #ffc107;"></span></div>-->
+<!--                                <div>20掳C <span class="palette-color" style="background-color: #0d6efd;"></span></div>-->
+<!--                            </div>-->
+
+                            <!-- 鐑垚鍍忔帶鍒堕潰鏉�
+                            <div class="video-controls">
+                                <span class="video-btn"><i class="fa fa-exchange"></i></span>
+                                <span class="video-btn"><i class="fa fa-plus"></i></span>
+                                <span class="video-btn"><i class="fa fa-tint"></i></span>
+                            </div>
+                            -->
+                            
+                        </div>
+                    </div>
+
+                    <!-- 绠�鍖栫殑瑙嗛鎺у埗宸ュ叿鏍�-->
+                    <div style="margin-top: 15px; text-align: center; background-color: #f5f5f5; padding: 10px; border-radius: 4px;">
+                        <button class="layui-btn layui-btn-default layui-btn-sm">
+                           涓婄Щ <i class="layui-icon layui-icon-up"></i>
+                        </button>
+                        <button class="layui-btn layui-btn-default layui-btn-sm">
+                           涓嬬Щ <i class="layui-icon layui-icon-down"></i>
+                        </button>
+                        <button class="layui-btn layui-btn-default layui-btn-sm">
+                           宸︾Щ <i class="layui-icon layui-icon-left"></i>
+                        </button>
+                        <button class="layui-btn layui-btn-default layui-btn-sm">
+                           鍙崇Щ <i class="layui-icon layui-icon-right"></i>
+                        </button>
+                        <button class="layui-btn layui-btn-default layui-btn-sm">
+                           鍔犲�� <i class="layui-icon layui-icon-addition"></i>
+                        </button>
+                        <button class="layui-btn layui-btn-default layui-btn-sm">
+                           鍑忓�� <i class="layui-icon layui-icon-subtraction"></i>
+                        </button>
+                    </div>
+
+
+                </div>
+            </div>
+
+            <!-- 鍘嗗彶璁板綍 -->
+            <div class="card">
+                <div class="card-header">
+                    <h2>鍘嗗彶妫�娴嬭繃绋嬭褰�</h2>
+                </div>
+                <div class="card-body">
+                    <div class="record-grid">
+                        <!-- 鏅�氳棰戣褰� -->
+                        <div class="record-item">
+                            <div class="record-img">
+                                <img th:src="@{/img/web/security/p-snap.jpg}" alt="鏅�氳棰戣褰�">
+                            </div>
+                            <div class="record-info">
+                                <div class="record-name">绮粨1鍙�</div>
+                                <div class="record-time">2025-12-03 10:00</div>
+                            </div>
+                        </div>
+
+                        <!-- 鐑垚鍍忚棰戣褰� -->
+                        <div class="record-item">
+                            <div class="record-img">
+                                <img th:src="@{/img/web/security/p-snap-red.jpg}" alt="鐑垚鍍忚棰戣褰�">
+                            </div>
+                            <div class="record-info">
+                                <div class="record-name">绮粨1鍙�</div>
+                                <div class="record-time">2025-12-03 10:00</div>
+                            </div>
+                        </div>
+
+                        <!-- 寮傚父浜嬩欢璁板綍 -->
+                        <div class="record-item" style="border: 2px solid var(--warning-color);">
+                            <div class="record-img">
+                                <img th:src="@{/img/web/security/p-snap.jpg}" alt="寮傚父浜嬩欢璁板綍">
+                            </div>
+                            <div class="record-info">
+                                <div class="record-name">绮粨3鍙�</div>
+                                <div class="record-time">2025-12-03 14:20</div>
+                            </div>
+                        </div>
+
+                        <!-- 鐑垚鍍忚棰戣褰� -->
+                        <div class="record-item">
+                            <div class="record-img">
+                                <img th:src="@{/img/web/security/p-snap-red.jpg}" alt="鐑垚鍍忚棰戣褰�">
+                            </div>
+                            <div class="record-info">
+                                <div class="record-name">绮粨1鍙�</div>
+                                <div class="record-time">2025-12-03 10:00</div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+
+        <!-- 鍙充晶锛氭暟鎹垎鏋� -->
+        <div class="layui-col-lg4">
+            <!-- 娓╁害璧板娍鍒嗘瀽锛圗Charts瀹炵幇锛� -->
+            <div class="card">
+                <div class="card-header">
+                    <h2>鏁伴噺璧板娍鍒嗘瀽</h2>
+                    <select class="layui-form-select">
+                        <option>杩�7澶�</option>
+                        <option>杩�30澶�</option>
+                    </select>
+                </div>
+                <div class="card-body">
+                    <div style="height: 250px;" id="temperatureChart"></div>
+                </div>
+            </div>
+
+            <!-- 寮傚父璀︽姤 -->
+            <div class="card">
+                <div class="card-header">
+                    <h2>妫�娴嬭褰�</h2>
+                    <div>
+                        <a href="#" style="color: var(--primary-color);">鏇村 <i class="layui-icon layui-icon-more"></i></a>
+                    </div>
+                </div>
+                <div class="card-body" style="max-height: 410px; overflow-y: hidden;">
+                    <div class="alert-item accent">
+                        <div class="alert-header">
+                            <div class="alert-title">妫�娴嬮噸閲忥細2590000 KG</div>
+                            <div class="alert-time">2025-12-07 10:00</div>
+                        </div>
+                        <div class="alert-content">妫�娴嬮噸閲忎负2590000 KG锛屽疄闄呴噸閲忎负2550000 KG锛岃宸皬浜�5%銆�</div>
+                        <div style="text-align: right;">
+                            <button class="layui-btn layui-btn-xs" style="background-color: var(--primary-color);">鏌ョ湅涓夌淮娓叉煋</button>
+                        </div>
+                    </div>
+                    <div class="alert-item">
+                        <div class="alert-header">
+                            <div class="alert-title">妫�娴嬮噸閲忥細2540000 KG</div>
+                            <div class="alert-time">2025-12-06 10:00</div>
+                        </div>
+                        <div class="alert-content">妫�娴嬮噸閲忎负2540000 KG锛屽疄闄呴噸閲忎负2550000 KG锛岃宸皬浜�5%銆�</div>
+                        <div style="text-align: right;">
+                            <button class="layui-btn layui-btn-xs" style="background-color: var(--primary-color);">鏌ョ湅涓夌淮娓叉煋</button>
+                        </div>
+                    </div>
+                    <div class="alert-item gray">
+                        <div class="alert-header">
+                            <div class="alert-title">妫�娴嬮噸閲忥細2510000 KG</div>
+                            <div class="alert-time">2025-12-05 10:00</div>
+                        </div>
+                        <div class="alert-content">妫�娴嬮噸閲忎负2510000 KG锛屽疄闄呴噸閲忎负2550000 KG锛岃宸皬浜�5%銆�</div>
+                        <div style="text-align: right;">
+                            <button class="layui-btn layui-btn-xs" style="background-color: var(--primary-color);">鏌ョ湅涓夌淮娓叉煋</button>
+                        </div>
+                    </div>
+                    <div class="alert-item gray">
+                        <div class="alert-header">
+                            <div class="alert-title">妫�娴嬮噸閲忥細2560000 KG</div>
+                            <div class="alert-time">2025-12-04 10:00</div>
+                        </div>
+                        <div class="alert-content">妫�娴嬮噸閲忎负2560000 KG锛屽疄闄呴噸閲忎负2550000 KG锛岃宸皬浜�5%銆�</div>
+                        <div style="text-align: right;">
+                            <button class="layui-btn layui-btn-xs" style="background-color: var(--primary-color);">鏌ョ湅涓夌淮娓叉煋</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <!-- 鐑垚鍍忓垎鏋愬伐鍏峰乏渚� -->
+            <div class="card">
+                <div class="card-header">
+                    <h2>鍒嗘瀽宸ュ叿</h2>
+                </div>
+                <div class="card-body">
+                    <!-- 绠�鍖栦负涓や釜涓昏宸ュ叿 -->
+
+                    <div class="tool-grid-simple" style="height: 108px">
+                        <div class="tool-item-simple" style="height: 65px">
+                            <div class="tool-icon-simple"><i class="layui-icon layui-icon-chart"></i></div>
+                            <div class="tool-text">
+                                <div class="tool-name-simple">娓╁害鍙樺寲鏇茬嚎</div>
+                                <div class="tool-desc">鏌ョ湅娓╁害鍙樺寲瓒嬪娍鍒嗘瀽</div>
+                            </div>
+                        </div>
+                        <div class="tool-item-simple" style="height: 65px">
+                            <div class="tool-icon-simple"><i class="layui-icon layui-icon-print"></i></div>
+                            <div class="tool-text">
+                                <div class="tool-name-simple">瀵煎嚭鍒嗘瀽鎶ュ憡</div>
+                                <div class="tool-desc">瀵煎嚭娓╁害鏁版嵁鍙婂垎鏋愮粨鏋�</div>
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+
+<script th:inline="javascript">
+    //绯荤粺鐧婚檰浜�
+    const loginUser = [[${loginUser}]];
+    //涓氬姟绫诲瀷
+    const bizType = [[${bizType}]];
+    //璁惧鍒楄〃
+    const listCamera = [[${listCamera}]];
+
+</script>
+<script th:src="@{/js/jquery.min.js}"></script>
+<script th:src="@{/ajax/libs/layui/layui.js}"></script>
+<script th:src="@{/js/plugins/echarts/echarts.min-4.7.js}"></script>
+<script th:src="@{/security/quantity.js}"></script>
+</html>
\ No newline at end of file

--
Gitblit v1.9.3