!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G2_3=e():t.G2_3=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=379)}([function(t,e,n){function r(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function i(t,e,n){n=n||0;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!==o&&s.isPlainObject(o)?(s.isPlainObject(t[r])||(t[r]={}),n20&&(i=20),parseFloat(t.toFixed(i))},mix:function(t,e,n,i){return e&&r(t,e),n&&r(t,n),i&&r(t,i),t},inArray:function(t,e){return t.indexOf(e)>=0},wrapBehavior:function(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];var n=function(n){t[e](n)};return t["_wrap_"+e]=n,n},getWrapBehavior:function(t,e){return t["_wrap_"+e]},toAllPadding:function(t){var e=0,n=0,r=0,i=0;return s.isNumber(t)||s.isString(t)?e=n=r=i=t:s.isArray(t)?(e=t[0],r=s.isNil(t[1])?t[0]:t[1],i=s.isNil(t[2])?t[0]:t[2],n=s.isNil(t[3])?r:t[3]):s.isObject(t)&&(e=t.top||0,r=t.right||0,i=t.bottom||0,n=t.left||0),[e,r,i,n]},substitute:function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]}):t}},o);s.deepMix=function(){for(var t=s.toArray(arguments),e=t[0],n=1;n0){var o=e.strokeOpacity;r.isNil(o)||1===o||(t.globalAlpha=o),t.stroke()}}},isPointInPath:function(){return!1},isHitBox:function(){return!0},isHit:function(t,e){var n=[t,e,1];if(this.invert(n),this.isHitBox()){var r=this.getBBox();if(r&&!o.box(r.minX,r.maxX,r.minY,r.maxY,n[0],n[1]))return!1}var i=this.__attrs.clip;return i?!!i.inside(t,e)&&this.isPointInPath(n[0],n[1]):this.isPointInPath(n[0],n[1])},calculateBox:function(){return null},getHitLineWidth:function(){var t=this.__attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},clearTotalMatrix:function(){this.__cfg.totalMatrix=null,this.__cfg.region=null},clearBBox:function(){this.__cfg.box=null,this.__cfg.region=null},getBBox:function(){var t=this.__cfg.box;return t||((t=this.calculateBox())&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this.__cfg.box=t),t}}),t.exports=a},function(t,e,n){var r=n(52),i=n(53),o=n(31),a=n(54);t.exports={line:function(t,e,n,i,o,a,s){var u=r.box(t,e,n,i,o);if(!this.box(u.minX,u.maxX,u.minY,u.maxY,a,s))return!1;var c=r.pointDistance(t,e,n,i,a,s);return!isNaN(c)&&c<=o/2},polyline:function(t,e,n,r){var i=t.length-1;if(i<1)return!1;for(var o=0;o=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},a.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},i.translate=function(t,e,n){var r=new Array(9);return i.fromTranslation(r,n),i.multiply(t,r,e)},i.rotate=function(t,e,n){var r=new Array(9);return i.fromRotation(r,n),i.multiply(t,r,e)},i.scale=function(t,e,n){var r=new Array(9);return i.fromScaling(r,n),i.multiply(t,r,e)},t.exports={mat3:i,vec2:a,vec3:o,transform:function(t,e){return t=r.clone(t),r.each(e,function(e){switch(e[0]){case"t":i.translate(t,t,[e[1],e[2]]);break;case"s":i.scale(t,t,[e[1],e[2]]);break;case"r":i.rotate(t,t,e[1]);break;case"m":i.multiply(t,t,e[1]);break;default:return!1}}),t}}},function(t,e,n){var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)},i=n(56),a="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,s=i||a||Function("return this")();t.exports=s},function(t,e){var n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)};t.exports=function(t){return null!=t&&"object"==(void 0===t?"undefined":n(t))}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(11),i=n(116),o=n(117),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}},function(t,e){var n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)};t.exports=function(t){var e=void 0===t?"undefined":n(t);return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(21),i=n(61);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(124),i=n(127);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(4).Symbol;t.exports=r},function(t,e,n){var r=n(37),i=n(38);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++sn?n:t}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){(function(t){var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)},i=n(4),a=n(132),s="object"==r(e)&&e&&!e.nodeType&&e,u=s&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===s?i.Buffer:void 0,l=(c?c.isBuffer:void 0)||a;t.exports=l}).call(e,n(34)(t))},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){"use strict";function r(t,e){return function(n){return t+n*e}}function i(t,e){var n=e-t;return n?r(t,n):Object(o.a)(isNaN(t)?e:t)}e.c=function(t,e){var n=e-t;return n?r(t,n>180||n<-180?n-360*Math.round(n/360):n):Object(o.a)(isNaN(t)?e:t)},e.b=function(t){return 1==(t=+t)?i:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Object(o.a)(isNaN(e)?n:e)}},e.a=i;var o=n(93)},function(t,e,n){var r=n(7),i=n(8),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==a||e==s||e==o||e==u}},function(t,e,n){var r=n(123),i=n(32),o=n(128),a=n(129),s=n(130),u=n(7),c=n(60),l=c(r),f=c(i),h=c(o),p=c(a),g=c(s),d=u;(r&&"[object DataView]"!=d(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=d(new i)||o&&"[object Promise]"!=d(o.resolve())||a&&"[object Set]"!=d(new a)||s&&"[object WeakMap]"!=d(new s))&&(d=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case g:return"[object WeakMap]"}return e}),t.exports=d},function(t,e,n){var r=n(133),i=n(62),o=n(134),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=0&&x=0&&c<=1&&u.push(c);else{var h=o*o-4*i*s;a.isNumberEqual(h,0)?u.push(-o/(2*i)):h>0&&(l=(-o-(f=Math.sqrt(h)))/(2*i),(c=(-o+f)/(2*i))>=0&&c<=1&&u.push(c),l>=0&&l<=1&&u.push(l))}return u},len:function(t,e,n,r,i,s,u,c,l){a.isNil(l)&&(l=1);for(var f=(l=l>1?1:l<0?0:l)/2,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],g=0,d=0;d<12;d++){var y=f*h[d]+f,v=o(y,t,n,i,u),x=o(y,e,r,s,c),m=v*v+x*x;g+=p[d]*Math.sqrt(m)}return f*g}}},function(t,e,n){var r=n(10)(n(4),"Map");t.exports=r},function(t,e,n){var r=n(131),i=n(5),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););}),n},l=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?o[3]={x:+t[0],y:+t[1]}:i-2===r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},f=function(t,e,n,r,i){var o=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var a=Math.PI/180,s=t+n*Math.cos(-r*a),u=t+n*Math.cos(-i*a);o=[["M",s,e+n*Math.sin(-r*a)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*a)]]}else o=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return o},h=function(t){if(!(t=c(t))||!t.length)return[["M",0,0]];var e=[],n=0,r=0,i=0,o=0,a=0,s=void 0,u=void 0;"M"===t[0][0]&&(i=n=+t[0][1],o=r=+t[0][2],a++,e[0]=["M",n,r]);for(var h,p,g=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=a,y=t.length;d1&&(r*=w=Math.sqrt(w),i*=w);var S=r*r,M=i*i,O=(a===s?-1:1)*Math.sqrt(Math.abs((S*M-S*_*_-M*b*b)/(S*_*_+M*b*b)));v=O*r*_/i+(e+u)/2,x=O*-i*b/r+(n+c)/2,d=Math.asin(((n-x)/i).toFixed(9)),y=Math.asin(((c-x)/i).toFixed(9)),d=ey&&(d-=2*Math.PI),!s&&y>d&&(y-=2*Math.PI)}var C=y-d;if(Math.abs(C)>f){var P=y,A=u,j=c;y=d+f*(s&&y>d?1:-1),p=t(u=v+r*Math.cos(y),c=x+i*Math.sin(y),r,i,o,0,s,A,j,[y,P,v,x])}C=y-d;var k=Math.cos(d),T=Math.sin(d),E=Math.cos(y),I=Math.sin(y),L=Math.tan(C/4),D=4/3*r*L,F=4/3*i*L,R=[e,n],B=[e+D*T,n-F*k],N=[u+D*I,c-F*E],z=[u,c];if(B[0]=2*R[0]-B[0],B[1]=2*R[1]-B[1],l)return[B,N,z].concat(p);for(var Y=[],V=0,X=(p=[B,N,z].concat(p).join().split(",")).length;V7){t[e].shift();for(var i=t[e];i.length;)a[e]="A",r&&(s[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),l=Math.max(n.length,r&&r.length||0)}},y=function(t,e,i,o,a){t&&e&&"M"===t[a][0]&&"M"!==e[a][0]&&(e.splice(a,0,["M",o.x,o.y]),i.bx=0,i.by=0,i.x=t[a][1],i.y=t[a][2],l=Math.max(n.length,r&&r.length||0))};l=Math.max(n.length,r&&r.length||0);for(var v=0;v1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,p=0;p<12;p++){var g=c*l[p]+c,d=x(g,t,n,i,a),y=x(g,e,r,o,s),v=d*d+y*y;h+=f[p]*Math.sqrt(v)}return c*h},b=function(t,e,n,r,i,o,a,s){if(!(Math.max(t,n)Math.max(i,a)||Math.max(e,r)Math.max(o,s))){var u=(t-n)*(o-s)-(e-r)*(i-a);if(u){var c=((t*r-e*n)*(i-a)-(t-n)*(i*s-o*a))/u,l=((t*r-e*n)*(o-s)-(e-r)*(i*s-o*a))/u,f=+c.toFixed(2),h=+l.toFixed(2);if(!(f<+Math.min(t,n).toFixed(2)||f>+Math.max(t,n).toFixed(2)||f<+Math.min(i,a).toFixed(2)||f>+Math.max(i,a).toFixed(2)||h<+Math.min(e,r).toFixed(2)||h>+Math.max(e,r).toFixed(2)||h<+Math.min(o,s).toFixed(2)||h>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},_=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},w=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var o=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return o.parsePathArray=v,o},S=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:w(t,e,n,r),vb:[t,e,n,r].join(" ")}},M=function(t,e,n,r,o,a,s,u){i.isArray(t)||(t=[t,e,n,r,o,a,s,u]);var c=function(t,e,n,r,i,o,a,s){for(var u=[],c=[[],[]],l=void 0,f=void 0,h=void 0,p=void 0,g=0;g<2;++g)if(0===g?(f=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*a,h=3*n-3*t):(f=6*e-12*r+6*o,l=-3*e+9*r-9*o+3*s,h=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(f)<1e-12)continue;(p=-h/f)>0&&p<1&&u.push(p)}else{var d=f*f-4*h*l,y=Math.sqrt(d);if(!(d<0)){var v=(-f+y)/(2*l);v>0&&v<1&&u.push(v);var x=(-f-y)/(2*l);x>0&&x<1&&u.push(x)}}for(var m=u.length,b=m,_=void 0;m--;)_=1-(p=u[m]),c[0][m]=_*_*_*t+3*_*_*p*n+3*_*p*p*i+p*p*p*a,c[1][m]=_*_*_*e+3*_*_*p*r+3*_*p*p*o+p*p*p*s;return c[0][b]=t,c[1][b]=e,c[0][b+1]=a,c[1][b+1]=s,c[0].length=c[1].length=b+2,{min:{x:Math.min.apply(0,c[0]),y:Math.min.apply(0,c[1])},max:{x:Math.max.apply(0,c[0]),y:Math.max.apply(0,c[1])}}}.apply(null,t);return S(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},O=function(t,e,n,r,i,o,a,s,u){var c=1-u,l=Math.pow(c,3),f=Math.pow(c,2),h=u*u,p=h*u,g=t+2*u*(n-t)+h*(i-2*n+t),d=e+2*u*(r-e)+h*(o-2*r+e),y=n+2*u*(i-n)+h*(a-2*i+n),v=r+2*u*(o-r)+h*(s-2*o+r);return{x:l*t+3*f*u*n+3*c*u*u*i+p*a,y:l*e+3*f*u*r+3*c*u*u*o+p*s,m:{x:g,y:d},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(g-y,d-v)/Math.PI}},C=function(t,e,n){if(!function(t,e){return t=S(t),e=S(e),_(e,t.x,t.y)||_(e,t.x2,t.y)||_(e,t.x,t.y2)||_(e,t.x2,t.y2)||_(t,e.x,e.y)||_(t,e.x2,e.y)||_(t,e.x,e.y2)||_(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(M(t),M(e)))return n?0:[];for(var r=~~(m.apply(0,t)/8),i=~~(m.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&A<=1&&j>=0&&j<=1&&(n?u++:u.push({x:P.x,y:P.y,t1:A,t2:j}))}}return u};t.exports={parsePathString:c,parsePathArray:v,pathTocurve:d,pathToAbsolute:h,catmullRomToBezier:l,rectPath:w,intersection:function(t,e){return function(t,e,n){t=d(t),e=d(e);for(var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=void 0,c=void 0,l=void 0,f=void 0,h=void 0,p=n?0:[],g=0,y=t.length;g=0&&e._call.call(null,t),e=e._next;--d}function c(){b=(m=w.now())+_,d=y=0;try{u()}finally{d=0,function(){var t,e,n=h,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:h=e);p=t,f(r)}(),b=0}}function l(){var t=w.now(),e=t-m;e>x&&(_-=e,m=t)}function f(t){if(!d){y&&(y=clearTimeout(y));t-b>24?(t<1/0&&(y=setTimeout(c,t-w.now()-_)),v&&(v=clearInterval(v))):(v||(m=w.now(),v=setInterval(l,x)),d=1,S(c))}}e.b=r,e.a=a,e.c=s,e.d=u;var h,p,g="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)},d=0,y=0,v=0,x=1e3,m=0,b=0,_=0,w="object"===("undefined"==typeof performance?"undefined":g(performance))&&performance.now?performance:Date,S="object"===("undefined"==typeof window?"undefined":g(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};a.prototype=s.prototype={constructor:a,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?r():+n)+(null==e?0:+e),this._next||p===this||(p?p._next=this:h=this,p=this),this._call=t,this._time=n,f()},stop:function(){this._call&&(this._call=null,this._time=1/0,f())}}},function(t,e,n){"use strict";var r=n(14),i=n(91),a=n(94),s=n(95),u=n(30),c=n(96),l=n(97),f=n(93),h="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)};e.a=function(t,e){var n,o=void 0===e?"undefined":h(e);return null==e||"boolean"===o?Object(f.a)(e):("number"===o?u.a:"string"===o?(n=Object(r.a)(e))?(e=n,i.a):l.a:e instanceof r.a?i.a:e instanceof Date?s.a:Array.isArray(e)?a.a:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?c.a:u.a)(t,e)}},function(t,e,n){"use strict";function r(){}function i(t){var e;return t=(t+"").trim().toLowerCase(),(e=b.exec(t))?(e=parseInt(e[1],16),new c(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=_.exec(t))?o(parseInt(e[1],16)):(e=w.exec(t))?new c(e[1],e[2],e[3],1):(e=S.exec(t))?new c(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=M.exec(t))?a(e[1],e[2],e[3],e[4]):(e=O.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=C.exec(t))?l(e[1],e[2]/100,e[3]/100,1):(e=P.exec(t))?l(e[1],e[2]/100,e[3]/100,e[4]):A.hasOwnProperty(t)?o(A[t]):"transparent"===t?new c(NaN,NaN,NaN,0):null}function o(t){return new c(t>>16&255,t>>8&255,255&t,1)}function a(t,e,n,r){return r<=0&&(t=e=n=NaN),new c(t,e,n,r)}function s(t){return t instanceof r||(t=i(t)),t?(t=t.rgb(),new c(t.r,t.g,t.b,t.opacity)):new c}function u(t,e,n,r){return 1===arguments.length?s(t):new c(t,e,n,null==r?1:r)}function c(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new h(t,e,n,r)}function f(t,e,n,o){return 1===arguments.length?function(t){if(t instanceof h)return new h(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=i(t)),!t)return new h;if(t instanceof h)return t;var e=(t=t.rgb()).r/255,n=t.g/255,o=t.b/255,a=Math.min(e,n,o),s=Math.max(e,n,o),u=NaN,c=s-a,l=(s+a)/2;return c?(u=e===s?(n-o)/c+6*(n0&&l<1?0:u,new h(u,c,l,t.opacity)}(t):new h(t,e,n,null==o?1:o)}function h(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function p(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e.a=r,n.d(e,"d",function(){return d}),n.d(e,"c",function(){return y}),e.e=i,e.h=s,e.g=u,e.b=c,e.f=f;var g=n(50),d=.7,y=1/d,v="\\s*([+-]?\\d+)\\s*",x="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",m="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b=/^#([0-9a-f]{3})$/,_=/^#([0-9a-f]{6})$/,w=new RegExp("^rgb\\("+[v,v,v]+"\\)$"),S=new RegExp("^rgb\\("+[m,m,m]+"\\)$"),M=new RegExp("^rgba\\("+[v,v,v,x]+"\\)$"),O=new RegExp("^rgba\\("+[m,m,m,x]+"\\)$"),C=new RegExp("^hsl\\("+[x,m,m]+"\\)$"),P=new RegExp("^hsla\\("+[x,m,m,x]+"\\)$"),A={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object(g.a)(r,i,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Object(g.a)(c,u,Object(g.b)(r,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?d:Math.pow(d,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Object(g.a)(h,f,Object(g.b)(r,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new h(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?d:Math.pow(d,t),new h(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new c(p(t>=240?t-240:t+120,i,r),p(t,i,r),p(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))},function(t,e,n){"use strict";e.b=function(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n},e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],a=t[i+1],s=i>0?t[i-1]:2*o-a,u=i=0&&g=0?[i]:[]}}},function(t,e,n){function r(t,e,n,r){return{x:Math.cos(r)*n+t,y:Math.sin(r)*n+e}}function i(t,e,n,r){var i=void 0,o=void 0;return r?tn&&(i=2*Math.PI-t+e,o=t-n):(i=t-e,o=n-t),i>o?n:e}function o(t,e,n,r){var o=0;return n-e>=2*Math.PI&&(o=2*Math.PI),e=s.mod(e,2*Math.PI),n=s.mod(n,2*Math.PI)+o,t=s.mod(t,2*Math.PI),r?e>=n?t>n&&tn?t:i(t,e,n):e<=n?ee||tt.x&&(g=t.x),dt.y&&(y=t.y),v-1&&t%1==0&&t<=n}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){var r=n(136);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++rh))return!1;var g=l.get(t);if(g&&l.get(e))return g==e;var d=-1,y=!0,v=n&s?new r:void 0;for(l.set(t,e),l.set(e,t);++d]*>/,s={tr:document.createElement("tbody"),tbody:i,thead:i,tfoot:i,td:o,th:o,"*":document.createElement("div")};t.exports={getBoundingClientRect:function(t,e){if(t&&t.getBoundingClientRect){var n=t.getBoundingClientRect(),r=document.documentElement.clientTop,i=document.documentElement.clientLeft;return{top:n.top-r,bottom:n.bottom-r,left:n.left-i,right:n.right-i}}return e||null},getStyle:function(t,e,n){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return r.isNil(n)?null:n}},modifyCSS:function(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t},createDom:function(t){var e=a.test(t)&&RegExp.$1;e in s||(e="*");var n=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r},getRatio:function(){return window.devicePixelRatio?window.devicePixelRatio:2},getWidth:function(t,e){var n=this.getStyle(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)},getHeight:function(t,e){var n=this.getStyle(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)},getOuterHeight:function(t,e){var n=this.getHeight(t,e),r=parseFloat(this.getStyle(t,"borderTopWidth"))||0,i=parseFloat(this.getStyle(t,"paddingTop"))||0,o=parseFloat(this.getStyle(t,"paddingBottom"))||0;return n+r+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+i+o},getOuterWidth:function(t,e){var n=this.getWidth(t,e),r=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,i=parseFloat(this.getStyle(t,"paddingLeft"))||0,o=parseFloat(this.getStyle(t,"paddingRight"))||0;return n+r+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+i+o},addEventListener:function(t,e,n){if(t){if(t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if(t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}},requestAnimationFrame:function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}}},function(t,e,n){var r=n(0),i=function(t,e,n,r){this.type=t,this.target=null,this.currentTarget=null,this.bubbles=n,this.cancelable=r,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.removed=!1,this.event=e};r.augment(i,{preventDefault:function(){this.defaultPrevented=this.cancelable&&!0},stopPropagation:function(){this.propagationStopped=!0},remove:function(){this.remove=!0},clone:function(){return r.clone(this)},toString:function(){return"[Event (type="+this.type+")]"}}),t.exports=i},function(t,e,n){function r(t,e,n){for(var r=void 0,i=t.length-1;i>=0;i--){var o=t[i];if(o.__cfg.visible&&o.__cfg.capture&&(o.isGroup?r=o.getShape(e,n):o.isHit(e,n)&&(r=o)),r)break}return r}function i(t){if(!t.__cfg&&t!==l){var e=t.superclass.constructor;e&&!e.__cfg&&i(e),t.__cfg={},o.merge(t.__cfg,e.__cfg),o.merge(t.__cfg,t.CFG)}}var o=n(0),a=n(89),s=n(263),u={},c="_INDEX",l=function t(e){t.superclass.constructor.call(this,e),this.set("children",[]),this._beforeRenderUI(),this._renderUI(),this._bindUI()};o.extend(l,a),o.augment(l,{isGroup:!0,canFill:!0,canStroke:!0,getDefaultCfg:function(){return i(this.constructor),o.merge({},this.constructor.__cfg)},_beforeRenderUI:function(){},_renderUI:function(){},_bindUI:function(){},addShape:function(t,e){var n=this.get("canvas");e=e||{};var r=u[t];if(r||(r=o.upperFirst(t),u[t]=r),e.attrs){var i=e.attrs;if("text"===t){var a=n.get("fontFamily");a&&(i.fontFamily=i.fontFamily?i.fontFamily:a)}}e.canvas=n,e.type=t;var c=new s[r](e);return this.add(c),c},addGroup:function(t,e){var n=this.get("canvas"),r=void 0;if(e=o.merge({},e),o.isFunction(t))e?(e.canvas=n,e.parent=this,r=new t(e)):r=new t({canvas:n,parent:this}),this.add(r);else if(o.isObject(t))t.canvas=n,r=new l(t),this.add(r);else{if(void 0!==t)return!1;r=new l,this.add(r)}return r},renderBack:function(t,e){var n=this.get("backShape"),r=this.getBBox();return o.merge(e,{x:r.minX-t[3],y:r.minY-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2]}),n?n.attr(e):n=this.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",n),this.sort(),n},removeChild:function(t,e){if(arguments.length>=2)this.contain(t)&&t.remove(e);else{if(1===arguments.length){if(!o.isBoolean(t))return this.contain(t)&&t.remove(!0),this;e=t}0===arguments.length&&(e=!0),l.superclass.remove.call(this,e)}return this},add:function(t){var e=this,n=e.get("children");if(o.isArray(t))o.each(t,function(t){var n=t.get("parent");n&&n.removeChild(t,!1),e.__setEvn(t)}),n.push.apply(n,t);else{var r=t,i=r.get("parent");i&&i.removeChild(r,!1),e.__setEvn(r),n.push(r)}return e},contain:function(t){return this.get("children").indexOf(t)>-1},getChildByIndex:function(t){return this.get("children")[t]},getFirst:function(){return this.getChildByIndex(0)},getLast:function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},__setEvn:function(t){t.__cfg.parent=this,t.__cfg.context=this.__cfg.context,t.__cfg.canvas=this.__cfg.canvas;var e=t.__attrs.clip;e&&(e.setSilent("parent",this),e.setSilent("context",this.get("context")));var n=t.__cfg.children;n&&o.each(n,function(e){t.__setEvn(e)})},getBBox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.get("children");o.each(i,function(i){if(i.get("visible")){var o=i.getBBox();if(!o)return!0;var a=[o.minX,o.minY,1],s=[o.minX,o.maxY,1],u=[o.maxX,o.minY,1],c=[o.maxX,o.maxY,1];i.apply(a),i.apply(s),i.apply(u),i.apply(c);var l=Math.min(a[0],s[0],u[0],c[0]),f=Math.max(a[0],s[0],u[0],c[0]),h=Math.min(a[1],s[1],u[1],c[1]),p=Math.max(a[1],s[1],u[1],c[1]);le&&(e=f),hr&&(r=p)}});var a={minX:t,minY:n,maxX:e,maxY:r};return a.x=a.minX,a.y=a.minY,a.width=a.maxX-a.minX,a.height=a.maxY-a.minY,a},drawInner:function(t){for(var e=this.get("children"),n=0;n-1){var i=e[n];"fillStyle"===n&&(i=s.parseStyle(i,this)),"strokeStyle"===n&&(i=s.parseStyle(i,this)),"lineDash"===n&&t.setLineDash?r.isArray(i)?t.setLineDash(i):r.isString(i)&&t.setLineDash(i.split(" ")):t[n]=i}},drawInner:function(){},show:function(){return this.set("visible",!0),this},hide:function(){return this.set("visible",!1),this},remove:function(t){if(void 0===t&&(t=!0),this.get("parent")){var e=this.get("parent").get("children");r.remove(e,this)}return t&&this.destroy(),this},destroy:function(){if(!this.get("destroyed")){if(this.get("animating")){var t=this.get("animateTimer");t&&t.stop()}this.__cfg={},this.__attrs=null,this.removeEvent(),this.set("destroyed",!0)}},__setZIndex:function(t){return this.__cfg.zIndex=t,r.isNil(this.get("parent"))||this.get("parent").sort(),t},__setAttrs:function(t){return this.attr(t),t},setZIndex:function(t){return this.__cfg.zIndex=t,t},clone:function(){return r.clone(this)},getBBox:function(){return{minX:0,maxX:0,minY:0,maxY:0}}}),t.exports=l},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=Math.PI/180,i=180/Math.PI},function(t,e,n){"use strict";function r(t){return function(e){var n,r,o=e.length,a=new Array(o),s=new Array(o),u=new Array(o);for(n=0;nu&&(s=e.slice(u,s),l[c]?l[c]+=s:l[++c]=s),(n=n[0])===(a=a[0])?l[c]?l[c]+=a:l[++c]=a:(l[++c]=null,f.push({i:c,x:Object(r.a)(n,a)})),u=o.lastIndex;return u1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}i.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},parseStyle:function(t,e){if(i.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e){var n=s.exec(t),o=i.mod(i.toRadian(parseFloat(n[1])),2*Math.PI),a=n[2],u=e.getBBox(),c=void 0,l=void 0;o>=0&&o<.5*Math.PI?(c={x:u.minX,y:u.minY},l={x:u.maxX,y:u.maxY}):.5*Math.PI<=o&&oc?u:c,f=u>c?1:u/c,h=u>c?c/u:1,p=[t,e,1],g=[1,0,0,0,1,0,0,0,1];a.scale(g,g,[f,h]),a.translate(g,g,[r,i]);var d=a.invert([],g);return s.transformMat3(p,p,d),o.circle(0,0,l,p[0],p[1])},__isPointInStroke:function(t,e){var n=this.__attrs,r=n.x,i=n.y,u=n.rx,c=n.ry,l=this.getHitLineWidth(),f=u>c?u:c,h=u>c?1:u/c,p=u>c?c/u:1,g=[t,e,1],d=[1,0,0,0,1,0,0,0,1];a.scale(d,d,[h,p]),a.translate(d,d,[r,i]);var y=a.invert([],d);return s.transformMat3(g,g,y),o.arcline(0,0,f,0,2*Math.PI,!1,l,g[0],g[1])},createPath:function(t){var e=this.__attrs,n=e.x,r=e.y,i=e.rx,o=e.ry;t=t||self.get("context");var s=i>o?i:o,u=i>o?1:i/o,c=i>o?o/i:1,l=[1,0,0,0,1,0,0,0,1];a.scale(l,l,[u,c]),a.translate(l,l,[n,r]),t.beginPath(),t.save(),t.transform(l[0],l[1],l[3],l[4],l[6],l[7]),t.arc(0,0,s,0,2*Math.PI),t.restore(),t.closePath()}}),t.exports=u},function(t,e,n){var r=n(0),i=n(1),o=n(102),a=n(98),s=n(15),u=n(46),c=n(31),l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={path:null,lineWidth:1,curve:null,tCache:null,startArrow:!1,endArrow:!1},r.extend(l,i),r.augment(l,{canFill:!0,canStroke:!0,type:"path",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},__afterSetAttrPath:function(t){if(r.isNil(t))return this.setSilent("segments",null),void this.setSilent("box",void 0);var e=a.parsePath(t),n=void 0,i=[];if(r.isArray(e)&&0!==e.length&&("M"===e[0][0]||"m"===e[0][0])){for(var s=e.length,u=0;ui&&(i=r.maxX),r.minYa&&(a=r.maxY))}),{minX:n,minY:o,maxX:i,maxY:a}},isPointInPath:function(t,e){var n=this.hasFill(),r=this.hasStroke();return n&&r?this.__isPointInFill(t,e)||this.__isPointInStroke(t,e):n?this.__isPointInFill(t,e):!!r&&this.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.get("context");if(n)return this.createPath(),n.isPointInPath(t,e)},__isPointInStroke:function(t,e){var n=this.get("segments");if(!r.isEmpty(n))for(var i=this.getHitLineWidth(),o=0,a=n.length;o=e[0]&&t<=e[1]&&(n=(t-e[0])/(e[1]-e[0]),i=r)});var a=o[i];if(r.isNil(a)||r.isNil(i))return null;var s=a.length,u=o[i+1];return{x:c.at(a[s-2],u[1],u[3],u[5],1-n),y:c.at(a[s-1],u[2],u[4],u[6],1-n)}},createPath:function(t){var e=this.__attrs,n=this.get("segments");if(r.isArray(n)){(t=t||this.get("context")).beginPath();var i=e.path,o=void 0,a=void 0,u=!1;("z"===i[i.length-1]||"Z"===i[i.length-1]||e.fill)&&(u=!0);var c=n.length;c>1&&!u&&(o=n[0].endPoint,a=n[1].endPoint,s.addStartArrow(t,e,a.x,a.y,o.x,o.y));for(var l=0,f=c;l1&&!u&&(o=n[c-2].endPoint,a=n[c-1].endPoint,s.addEndArrow(t,e,o.x,o.y,a.x,a.y))}}}),t.exports=l},function(t,e,n){function r(t,e,n){return{x:n.x+t,y:n.y+e}}function i(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}function o(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function a(t,e){return(t[0]*e[0]+t[1]*e[1])/(o(t)*o(e))}function s(t,e){return(t[0]*e[1]=0,c=o?n.toUpperCase():n,l=t,f=void 0,h=void 0,p=void 0,g=void 0,y=e.endPoint,v=l[1],x=l[2];switch(c){default:break;case"M":g=o?r(v,x,y):{x:v,y:x},this.command="M",this.params=[y,g],this.subStart=g,this.endPoint=g;break;case"L":g=o?r(v,x,y):{x:v,y:x},this.command="L",this.params=[y,g],this.subStart=e.subStart,this.endPoint=g,this.endTangent=function(){return[g.x-y.x,g.y-y.y]},this.startTangent=function(){return[y.x-g.x,y.y-g.y]};break;case"H":g=o?r(v,0,y):{x:v,y:y.y},this.command="L",this.params=[y,g],this.subStart=e.subStart,this.endPoint=g,this.endTangent=function(){return[g.x-y.x,g.y-y.y]},this.startTangent=function(){return[y.x-g.x,y.y-g.y]};break;case"V":g=o?r(0,v,y):{x:y.x,y:v},this.command="L",this.params=[y,g],this.subStart=e.subStart,this.endPoint=g,this.endTangent=function(){return[g.x-y.x,g.y-y.y]},this.startTangent=function(){return[y.x-g.x,y.y-g.y]};break;case"Q":o?(f=r(v,x,y),h=r(l[3],l[4],y)):(f={x:v,y:x},h={x:l[3],y:l[4]}),this.command="Q",this.params=[y,f,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-f.x,h.y-f.y]},this.startTangent=function(){return[y.x-f.x,y.y-f.y]};break;case"T":h=o?r(v,x,y):{x:v,y:x},"Q"===e.command?(f=i(e.params[1],y),this.command="Q",this.params=[y,f,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-f.x,h.y-f.y]},this.startTangent=function(){return[y.x-f.x,y.y-f.y]}):(this.command="TL",this.params=[y,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-y.x,h.y-y.y]},this.startTangent=function(){return[y.x-h.x,y.y-h.y]});break;case"C":o?(f=r(v,x,y),h=r(l[3],l[4],y),p=r(l[5],l[6],y)):(f={x:v,y:x},h={x:l[3],y:l[4]},p={x:l[5],y:l[6]}),this.command="C",this.params=[y,f,h,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-h.x,p.y-h.y]},this.startTangent=function(){return[y.x-f.x,y.y-f.y]};break;case"S":o?(h=r(v,x,y),p=r(l[3],l[4],y)):(h={x:v,y:x},p={x:l[3],y:l[4]}),"C"===e.command?(f=i(e.params[2],y),this.command="C",this.params=[y,f,h,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-h.x,p.y-h.y]},this.startTangent=function(){return[y.x-f.x,y.y-f.y]}):(this.command="SQ",this.params=[y,h,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-h.x,p.y-h.y]},this.startTangent=function(){return[y.x-h.x,y.y-h.y]});break;case"A":var m=v,b=x,_=l[3],w=l[4],S=l[5];g=o?r(l[6],l[7],y):{x:l[6],y:l[7]},this.command="A",this.params=function(t,e,n,r,i,o,c){var l=u.mod(u.toRadian(c),2*Math.PI),f=t.x,h=t.y,p=e.x,g=e.y,d=Math.cos(l)*(f-p)/2+Math.sin(l)*(h-g)/2,y=-1*Math.sin(l)*(f-p)/2+Math.cos(l)*(h-g)/2,v=d*d/(i*i)+y*y/(o*o);v>1&&(i*=Math.sqrt(v),o*=Math.sqrt(v));var x=Math.sqrt((i*i*(o*o)-i*i*(y*y)-o*o*(d*d))/(i*i*(y*y)+o*o*(d*d)));n===r&&(x*=-1),isNaN(x)&&(x=0);var m=x*i*y/o,b=x*-o*d/i,_=(f+p)/2+Math.cos(l)*m-Math.sin(l)*b,w=(h+g)/2+Math.sin(l)*m+Math.cos(l)*b,S=s([1,0],[(d-m)/i,(y-b)/o]),M=[(d-m)/i,(y-b)/o],O=[(-1*d-m)/i,(-1*y-b)/o],C=s(M,O);return a(M,O)<=-1&&(C=Math.PI),a(M,O)>=1&&(C=0),0===r&&C>0&&(C-=2*Math.PI),1===r&&C<0&&(C+=2*Math.PI),[t,_,w,i,o,S,C,l,r]}(y,g,w,S,m,b,_),this.subStart=e.subStart,this.endPoint=g;break;case"Z":this.command="Z",this.params=[y,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this.command,i=this.params,o=this.box;if(o&&!c.box(o.minX,o.maxX,o.minY,o.maxY,t,e))return!1;switch(r){default:break;case"M":return!1;case"TL":case"L":case"Z":return c.line(i[0].x,i[0].y,i[1].x,i[1].y,n,t,e);case"SQ":case"Q":return c.quadraticline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,n,t,e);case"C":return c.cubicline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y,n,t,e);case"A":var a=i,s=a[1],u=a[2],l=a[3],f=a[4],h=a[5],d=a[6],y=a[7],v=a[8],x=l>f?l:f,m=l>f?1:l/f,b=l>f?f/l:1;a=[t,e,1];var _=[1,0,0,0,1,0,0,0,1];return g.translate(_,_,[-s,-u]),g.rotate(_,_,-y),g.scale(_,_,[1/m,1/b]),p.transformMat3(a,a,_),c.arcline(0,0,x,h,h+d,1-v,n,a[0],a[1])}return!1},draw:function(t){var e=this.command,n=this.params,r=void 0,i=void 0,o=void 0;switch(e){default:break;case"M":t.moveTo(n[1].x,n[1].y);break;case"TL":case"L":t.lineTo(n[1].x,n[1].y);break;case"SQ":case"Q":r=n[1],i=n[2],t.quadraticCurveTo(r.x,r.y,i.x,i.y);break;case"C":r=n[1],i=n[2],o=n[3],t.bezierCurveTo(r.x,r.y,i.x,i.y,o.x,o.y);break;case"A":var a=n,s=a[1],u=a[2],c=a[3],l=a[4],f=a[5],h=a[6],p=a[7],g=a[8],d=c>l?c:l,y=c>l?1:c/l,v=c>l?l/c:1;t.translate(s,u),t.rotate(p),t.scale(y,v),t.arc(0,0,d,f,f+h,1-g),t.scale(1/y,1/v),t.rotate(-p),t.translate(-s,-u);break;case"Z":t.closePath()}},getBBox:function(t){var e=t/2,n=this.params,r=void 0,i=void 0,o=void 0,a=void 0;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box={minX:Math.min(n[0].x,n[1].x)-e,maxX:Math.max(n[0].x,n[1].x)+e,minY:Math.min(n[0].y,n[1].y)-e,maxY:Math.max(n[0].y,n[1].y)+e};break;case"SQ":case"Q":for(o=0,a=(i=f.extrema(n[0].x,n[1].x,n[2].x)).length;oS&&(S=C)}var P=h.yExtrema(v,p,g),A=1/0,j=-1/0,k=[m,b];for(o=2*-Math.PI;o<=2*Math.PI;o+=Math.PI){var T=P+o;1===x?mj&&(j=E)}this.box={minX:w-e,maxX:S+e,minY:A-e,maxY:j+e}}}}),t.exports=y},function(t,e,n){var r=n(0),i=n(1),o=n(2),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",lineHeight:null,textArr:null},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"text",getDefaultAttrs:function(){return{lineWidth:1,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"}},initTransform:function(){this.attr("matrix",[1,0,0,0,1,0,0,0,1]);var t=this.__attrs.fontSize;t&&+t<12&&this.transform([["t",-1*this.__attrs.x,-1*this.__attrs.y],["s",+t/12,+t/12],["t",this.__attrs.x,this.__attrs.y]])},__assembleFont:function(){var t=this.__attrs,e=t.fontSize,n=t.fontFamily,r=t.fontWeight,i=t.fontStyle,o=t.fontVariant;t.font=[i,o,r,e+"px",n].join(" ")},__afterSetAttrFontSize:function(){this.__assembleFont()},__afterSetAttrFontFamily:function(){this.__assembleFont()},__afterSetAttrFontWeight:function(){this.__assembleFont()},__afterSetAttrFontStyle:function(){this.__assembleFont()},__afterSetAttrFontVariant:function(){this.__assembleFont()},__afterSetAttrFont:function(){},__afterSetAttrText:function(){var t=this.__attrs,e=t.text,n=void 0;if(r.isString(e)&&-1!==e.indexOf("\n")){var i=(n=e.split("\n")).length;t.lineCount=i,t.textArr=n}},__getTextHeight:function(){var t=this.__attrs,e=t.lineCount,n=1*t.fontSize;if(e>1){return n*e+this.__getSpaceingY()*(e-1)}return n},__afterSetAttrAll:function(t){("fontSize"in t||"fontWeight"in t||"fontStyle"in t||"fontVariant"in t||"fontFamily"in t)&&this.__assembleFont(),"text"in t&&this.__afterSetAttrText(t.text)},isHitBox:function(){return!1},calculateBox:function(){var t=this.__attrs,e=t.x,n=t.y,r=this.measureText();if(!r)return{minX:e,minY:n,maxX:e,maxY:n};var i=this.__getTextHeight(),o=t.textAlign,a=t.textBaseline,s=this.getHitLineWidth(),u={x:e,y:n-i};o&&("end"===o||"right"===o?u.x-=r:"center"===o&&(u.x-=r/2)),a&&("top"===a?u.y+=i:"middle"===a&&(u.y+=i/2)),this.set("startPoint",u);var c=s/2;return{minX:u.x-c,minY:u.y-c,maxX:u.x+r+c,maxY:u.y+i+c}},__getSpaceingY:function(){var t=this.__attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},isPointInPath:function(t,e){var n=this.getBBox();if(this.hasFill()||this.hasStroke())return o.box(n.minX,n.maxX,n.minY,n.maxY,t,e)},drawInner:function(t){var e=this.__attrs,n=e.text;if(n){var i=e.textArr,o=1*e.fontSize,a=this.__getSpaceingY(),s=e.x,u=e.y,c=e.textBaseline,l=void 0;if(i){var f=this.getBBox();l=f.maxY-f.minY}var h=void 0;if(t.beginPath(),this.hasFill()){var p=e.fillOpacity;r.isNil(p)||1===p||(t.globalAlpha=p),i?r.each(i,function(e,n){h=u+n*(a+o)-l+o,"middle"===c&&(h+=l-o-(l-o)/2),"top"===c&&(h+=l-o),t.fillText(e,s,h)}):t.fillText(n,s,u)}this.hasStroke()&&(i?r.each(i,function(e,n){h=u+n*(a+o)-l+o,"middle"===c&&(h+=l-o-(l-o)/2),"top"===c&&(h+=l-o),t.strokeText(e,s,h)}):t.strokeText(n,s,u))}},measureText:function(){var t=this.__attrs,e=t.text,n=t.font,i=t.textArr,o=void 0,a=0;if(!r.isNil(e)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=n,i?r.each(i,function(t){o=s.measureText(t).width,ao&&(o=e),ra&&(a=r)});var s=e/2;return{minX:n-s,minY:i-s,maxX:o+s,maxY:a+s}},isPointInPath:function(t,e){var n=this.hasFill(),r=this.hasStroke();return n&&r?this.__isPointInFill(t,e)||this.__isPointInStroke(t,e):n?this.__isPointInFill(t,e):!!r&&this.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.get("context");return this.createPath(),n.isPointInPath(t,e)},__isPointInStroke:function(t,e){var n=this.__attrs.points;if(n.length<2)return!1;var r=this.getHitLineWidth(),i=n.slice(0);return n.length>=3&&i.push(n[0]),o.polyline(i,r,t,e)},createPath:function(t){var e=this.__attrs.points;e.length<2||((t=t||this.get("context")).beginPath(),r.each(e,function(e,n){0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])}),t.closePath())}}),t.exports=a},function(t,e,n){var r=n(0),i=n(1),o=n(2),a=n(15),s=n(52),u=function t(e){t.superclass.constructor.call(this,e)};u.ATTRS={points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null},r.extend(u,i),r.augment(u,{canStroke:!0,type:"polyline",tCache:null,getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this.__attrs,e=this.getHitLineWidth(),n=t.points;if(!n||0===n.length)return null;var i=1/0,o=1/0,a=-1/0,s=-1/0;r.each(n,function(t){var e=t[0],n=t[1];ea&&(a=e),ns&&(s=n)});var u=e/2;return{minX:i-u,minY:o-u,maxX:a+u,maxY:s+u}},__setTcache:function(){var t=this.__attrs.points,e=0,n=0,i=[],o=void 0,a=void 0;t&&0!==t.length&&(r.each(t,function(n,r){t[r+1]&&(e+=s.len(n[0],n[1],t[r+1][0],t[r+1][1]))}),e<=0||(r.each(t,function(r,u){t[u+1]&&((o=[])[0]=n/e,a=s.len(r[0],r[1],t[u+1][0],t[u+1][1]),n+=a,o[1]=n/e,i.push(o))}),this.tCache=i))},isPointInPath:function(t,e){var n=this.__attrs;if(this.hasStroke()){var r=n.points;if(r.length<2)return!1;var i=n.lineWidth;return o.polyline(r,i,t,e)}return!1},createPath:function(t){var e=this.__attrs,n=e.points,r=void 0,i=void 0;if(!(n.length<2)){for((t=t||this.get("context")).beginPath(),a.addStartArrow(t,e,n[1][0],n[1][1],n[0][0],n[0][1]),t.moveTo(n[0][0],n[0][1]),i=1,r=n.length-1;i=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),o=n)}),{x:s.at(e[o][0],e[o+1][0],i),y:s.at(e[o][1],e[o+1][1],i)}}}),t.exports=u},function(t,e,n){function r(t,e,n){return t+e*Math.cos(n)}function i(t,e,n){return t+e*Math.sin(n)}var o=n(0),a=n(1),s=n(2),u=n(54),c=n(15),l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1},o.extend(l,a),o.augment(l,{canStroke:!0,type:"arc",getDefaultAttrs:function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this.__attrs,e=t.x,n=t.y,r=t.r,i=t.startAngle,o=t.endAngle,a=t.clockwise,s=this.getHitLineWidth()/2,c=u.box(e,n,r,i,o,a);return c.minX-=s,c.minY-=s,c.maxX+=s,c.maxY+=s,c},isPointInPath:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.r,a=n.startAngle,u=n.endAngle,c=n.clockwise,l=this.getHitLineWidth();return!!this.hasStroke()&&s.arcline(r,i,o,a,u,c,l,t,e)},createPath:function(t){var e=this.__attrs,n=e.x,o=e.y,a=e.r,s=e.startAngle,u=e.endAngle,l=e.clockwise,f=void 0,h=void 0,p=void 0,g=void 0,d=void 0;(t=t||self.get("context")).beginPath(),e.startArrow&&(f=Math.PI/180,l&&(f*=-1),h=r(n,a,s+f),p=i(o,a,s+f),g=r(n,a,s),d=i(o,a,s),c.addStartArrow(t,e,h,p,g,d)),t.arc(n,o,a,s,u,l),e.endArrow&&(f=Math.PI/180,l&&(f*=-1),h=r(n,a,u+f),p=i(o,a,u+f),g=r(n,a,u),d=i(o,a,u),c.addEndArrow(t,e,g,d,h,p))}}),t.exports=l},function(t,e,n){var r=n(0),i=n(1),o=n(2),a=n(54),s=n(3).vec2,u=function t(e){t.superclass.constructor.call(this,e)};u.ATTRS={x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1},r.extend(u,i),r.augment(u,{canFill:!0,canStroke:!0,type:"fan",getDefaultAttrs:function(){return{clockwise:!1,lineWidth:1,rs:0,re:0}},calculateBox:function(){var t=this.__attrs,e=t.x,n=t.y,r=t.rs,i=t.re,o=t.startAngle,s=t.endAngle,u=t.clockwise,c=this.getHitLineWidth(),l=a.box(e,n,r,o,s,u),f=a.box(e,n,i,o,s,u),h=c/2;return{minX:Math.min(l.minX,f.minX)-h,minY:Math.min(l.minY,f.minY)-h,maxX:Math.max(l.maxX,f.maxX)+h,maxY:Math.max(l.maxY,f.maxY)+h}},isPointInPath:function(t,e){var n=this.hasFill(),r=this.hasStroke();return n&&r?this.__isPointInFill(t,e)||this.__isPointInStroke(t,e):n?this.__isPointInFill(t,e):!!r&&this.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.__attrs,i=n.x,o=n.y,u=n.rs,c=n.re,l=n.startAngle,f=n.endAngle,h=n.clockwise,p=[t-i,e-o],g=s.angleTo([1,0],p),d=a.nearAngle(g,l,f,h);if(r.isNumberEqual(g,d)){var y=s.squaredLength(p);if(u*u<=y&&y<=c*c)return!0}return!1},__isPointInStroke:function(t,e){var n=this.__attrs,r=n.x,i=n.y,a=n.rs,s=n.re,u=n.startAngle,c=n.endAngle,l=n.clockwise,f=this.getHitLineWidth(),h={x:Math.cos(u)*a+r,y:Math.sin(u)*a+i},p={x:Math.cos(u)*s+r,y:Math.sin(u)*s+i},g={x:Math.cos(c)*a+r,y:Math.sin(c)*a+i},d={x:Math.cos(c)*s+r,y:Math.sin(c)*s+i};return!!o.line(h.x,h.y,p.x,p.y,f,t,e)||(!!o.line(g.x,g.y,d.x,d.y,f,t,e)||(!!o.arcline(r,i,a,u,c,l,f,t,e)||!!o.arcline(r,i,s,u,c,l,f,t,e)))},createPath:function(t){var e=this.__attrs,n=e.x,r=e.y,i=e.rs,o=e.re,a=e.startAngle,s=e.endAngle,u=e.clockwise,c={x:Math.cos(a)*i+n,y:Math.sin(a)*i+r},l={x:Math.cos(a)*o+n,y:Math.sin(a)*o+r},f={x:Math.cos(s)*i+n,y:Math.sin(s)*i+r};(t=t||self.get("context")).beginPath(),t.moveTo(c.x,c.y),t.lineTo(l.x,l.y),t.arc(n,r,o,a,s,u),t.lineTo(f.x,f.y),t.arc(n,r,i,s,a,!u),t.closePath()}}),t.exports=u},function(t,e,n){var r=n(0),i=n(1),o=n(2),a=n(15),s=n(31),u=function t(e){t.superclass.constructor.call(this,e)};u.ATTRS={p1:null,p2:null,p3:null,p4:null,lineWidth:1,startArrow:!1,endArrow:!1},r.extend(u,i),r.augment(u,{canStroke:!0,type:"cubic",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this.__attrs,e=t.p1,n=t.p2,i=t.p3,o=t.p4,a=this.getHitLineWidth(),u=void 0,c=void 0;if(r.isNil(e)||r.isNil(n)||r.isNil(i)||r.isNil(o))return null;var l=a/2,f=s.extrema(e[0],n[0],i[0],o[0]);for(u=0,c=f.length;u');t.appendChild(n),this.set("canvasDOM",n)}},_setInitSize:function(){this.changeSize(this.get("width"),this.get("height"))},_reSize:function(){var t=this.get("canvasDOM"),e=this.get("widthCanvas"),n=this.get("heightCanvas"),r=this.get("widthStyle"),i=this.get("heightStyle");t.style.width=r,t.style.height=i,t.setAttribute("width",e),t.setAttribute("height",n)},getWidth:function(){var t=this.get("pixelRatio");return this.get("width")*t},getHeight:function(){var t=this.get("pixelRatio");return this.get("height")*t},changeSize:function(t,e){var n=this.get("pixelRatio"),r=t*n,i=e*n;this.set("widthCanvas",r),this.set("heightCanvas",i),this.set("widthStyle",t+"px"),this.set("heightStyle",e+"px"),this.set("width",t),this.set("height",e),this._reSize()},getPointByClient:function(t,e){var n=this.get("el"),r=n.getBoundingClientRect(),i=r.right-r.left,o=r.bottom-r.top;return{x:(t-r.left)*(n.width/i),y:(e-r.top)*(n.height/o)}},getClientByPoint:function(t,e){var n=this.get("el"),r=n.getBoundingClientRect(),i=r.right-r.left,o=r.bottom-r.top;return{clientX:t/(n.width/i)+r.left,clientY:e/(n.height/o)+r.top}},beforeDraw:function(){var t=this.get("context"),e=this.get("el");t&&t.clearRect(0,0,e.width,e.height)},_beginDraw:function(){this.setSilent("toDraw",!0)},_endDraw:function(){this.setSilent("toDraw",!1)},draw:function(){function t(){e.setSilent("animateHandler",r.requestAnimationFrame(function(){e.setSilent("animateHandler",void 0),e.get("toDraw")&&t()})),e.beforeDraw();try{var n=e.get("context");a.superclass.draw.call(e,n)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),e._endDraw()}e._endDraw()}var e=this;e.get("destroyed")||(e.get("animateHandler")?this._beginDraw():t())},destroy:function(){var t=this.get("containerDOM"),e=this.get("canvasDOM");e&&t&&t.removeChild(e),a.superclass.destroy.call(this)}}),t.exports=a},function(t,e){var n,r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}t.exports=n},function(t,e,n){var r=n(11),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(7),i=n(5),o="[object Boolean]";t.exports=function(t){return!0===t||!1===t||i(t)&&r(t)==o}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){var r=n(7),i=n(5),o="[object Number]";t.exports=function(t){return"number"==typeof t||i(t)&&r(t)==o}},function(t,e,n){var r=n(58),i=n(22),o=n(33),a=n(6),s=n(9),u=n(18),c=n(17),l=n(23),f="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||l(t)||o(t)))return!t.length;var e=i(t);if(e==f||e==h)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},function(t,e,n){var r=n(59)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(10)(n(4),"DataView");t.exports=r},function(t,e,n){var r=n(21),i=n(125),o=n(8),a=n(60),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},function(t,e,n){var r=n(126),i=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(4)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(10)(n(4),"Promise");t.exports=r},function(t,e,n){var r=n(10)(n(4),"Set");t.exports=r},function(t,e,n){var r=n(10)(n(4),"WeakMap");t.exports=r},function(t,e,n){var r=n(7),i=n(5),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(7),i=n(61),o=n(5),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e,n){(function(t){var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)},i=n(56),a="object"==r(e)&&e&&!e.nodeType&&e,s=a&&"object"==r(t)&&t&&!t.nodeType&&t,u=s&&s.exports===a&&i.process,c=function(){try{return u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=c}).call(e,n(34)(t))},function(t,e,n){var r=n(63),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){function r(t){if("string"==typeof t)return t;if(a(t))return o(t,r)+"";if(s(t))return l?l.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=n(11),o=n(35),a=n(6),s=n(137),u=1/0,c=i?i.prototype:void 0,l=c?c.toString:void 0;t.exports=r},function(t,e,n){var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)},i=n(7),a=n(5),s="[object Symbol]";t.exports=function(t){return"symbol"==(void 0===t?"undefined":r(t))||a(t)&&i(t)==s}},function(t,e,n){var r=n(139),i=4;t.exports=function(t){return r(t,i)}},function(t,e,n){function r(t,e,n,T,E,I){var L,D=e&S,F=e&M,R=e&O;if(n&&(L=E?n(t,T,E,I):n(t)),void 0!==L)return L;if(!_(t))return t;var B=m(t);if(B){if(L=y(t),!D)return l(t,L)}else{var N=d(t),z=N==P||N==A;if(b(t))return c(t,D);if(N==j||N==C||z&&!E){if(L=F||z?{}:x(t),!D)return F?h(t,u(L,t)):f(t,s(L,t))}else{if(!k[N])return E?t:{};L=v(t,N,r,D)}}I||(I=new i);var Y=I.get(t);if(Y)return Y;I.set(t,L);var V=R?F?g:p:F?keysIn:w,X=B?void 0:V(t);return o(X||t,function(i,o){X&&(i=t[o=i]),a(L,o,r(i,e,n,o,t,I))}),L}var i=n(36),o=n(65),a=n(37),s=n(162),u=n(164),c=n(69),l=n(29),f=n(167),h=n(169),p=n(73),g=n(170),d=n(22),y=n(171),v=n(172),x=n(78),m=n(6),b=n(18),_=n(8),w=n(13),S=1,M=2,O=4,C="[object Arguments]",P="[object Function]",A="[object GeneratorFunction]",j="[object Object]",k={};k[C]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[j]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[P]=k["[object WeakMap]"]=!1,t.exports=r},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(25),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(25);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(25);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(25);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(24);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(24),i=n(32),o=n(64),a=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)},i=n(19),a=n(9),s=n(68),u=n(8);t.exports=function(t,e,n){if(!u(n))return!1;var o=void 0===e?"undefined":r(e);return!!("number"==o?a(n)&&s(e,n.length):"string"==o&&e in n)&&i(n[e],t)}},function(t,e,n){var r=n(190),i=n(79)(function(t,e,n){r(t,e,n)});t.exports=i},function(t,e,n){function r(t,e,n,l,f){t!==e&&a(e,function(a,c){if(u(a))f||(f=new i),s(t,e,c,n,r,l,f);else{var h=l?l(t[c],a,c+"",t,e,f):void 0;void 0===h&&(h=a),o(t,c,h)}},c)}var i=n(36),o=n(81),a=n(82),s=n(192),u=n(8),c=n(28);t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},function(t,e,n){var r=n(81),i=n(69),o=n(77),a=n(29),s=n(78),u=n(33),c=n(6),l=n(193),f=n(18),h=n(21),p=n(8),g=n(194),d=n(23),y=n(195);t.exports=function(t,e,n,v,x,m,b){var _=t[n],w=e[n],S=b.get(w);if(S)r(t,n,S);else{var M=m?m(_,w,n+"",t,e,b):void 0,O=void 0===M;if(O){var C=c(w),P=!C&&f(w),A=!C&&!P&&d(w);M=w,C||P||A?c(_)?M=_:l(_)?M=a(_):P?(O=!1,M=i(w,!0)):A?(O=!1,M=o(w,!0)):M=[]:g(w)||u(w)?(M=_,u(_)?M=y(_):(!p(_)||v&&h(_))&&(M=s(w))):O=!1}O&&(b.set(w,M),x(M,w,v,m,b),b.delete(w)),r(t,n,M)}}},function(t,e,n){var r=n(9),i=n(5);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(7),i=n(40),o=n(5),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!o(t)||r(t)!=a)return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},function(t,e,n){var r=n(12),i=n(28);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(197)("toUpperCase");t.exports=r},function(t,e,n){var r=n(198),i=n(83),o=n(84),a=n(63);t.exports=function(t){return function(e){e=a(e);var n=i(e)?o(e):void 0,s=n?n[0]:e.charAt(0),u=n?r(n,1).join(""):e.slice(1);return s[t]()+u}}},function(t,e,n){var r=n(199);t.exports=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:r(t,e,n)}},function(t,e){t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r-1;)p!==t&&u.call(p,g,1),u.call(t,g,1);return t}},function(t,e,n){var r=n(206),i=n(207),o=n(208);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o-1?(null===t.get("canvas")&&(t=r.clone(t)),t.set("parent",e.get("parent")),t.set("context",e.get("context")),t.inside=function(n,r){var i=[n,r,1];return t.invert(i,e.get("canvas")),t.__isPointInFill(i[0],i[1])},t):null},__setAttrTrans:function(t){return this.transform(t)}}},function(t,e,n){function r(t){return 1===t[0]&&0===t[1]&&0===t[3]&&1===t[4]&&0===t[6]&&0===t[7]}function i(t){return 0===t[1]&&0===t[3]&&0===t[6]&&0===t[7]}function o(t,e){r(e)||(i(e)?(t[0]*=e[0],t[4]*=e[4]):s.multiply(t,t,e))}var a=n(0),s=n(3).mat3,u=n(3).vec3;t.exports={initTransform:function(){this.attr("matrix",[1,0,0,0,1,0,0,0,1])},translate:function(t,e){var n=this.attr("matrix");return s.translate(n,n,[t,e]),this.clearTotalMatrix(),this.attr("matrix",n),this},rotate:function(t){var e=this.attr("matrix");return s.rotate(e,e,t),this.clearTotalMatrix(),this.attr("matrix",e),this},scale:function(t,e){var n=this.attr("matrix");return s.scale(n,n,[t,e]),this.clearTotalMatrix(),this.attr("matrix",n),this},rotateAtStart:function(t){var e=this.attr("x"),n=this.attr("y");Math.abs(t)>2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-n],["r",t],["t",e,n]])},move:function(t,e){var n=this.get("x")||0,r=this.get("y")||0;this.translate(t-n,e-r),this.set("x",t),this.set("y",e)},transform:function(t){var e=this,n=e.attr("matrix");return a.each(t,function(t){switch(t[0]){case"t":e.translate(t[1],t[2]);break;case"s":e.scale(t[1],t[2]);break;case"r":e.rotate(t[1]);break;case"m":e.attr("matrix",s.multiply([],n,t[1])),e.clearTotalMatrix()}}),e},setTransform:function(t){return this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform(t)},getMatrix:function(){return this.attr("matrix")},setMatrix:function(t){return this.attr("matrix",t),this.clearTotalMatrix(),this},apply:function(t,e){var n=void 0;return n=e?this._getMatrixByRoot(e):this.attr("matrix"),u.transformMat3(t,t,n),this},_getMatrixByRoot:function(t){t=t||this;for(var e=this,n=[];e!==t;)n.unshift(e),e=e.get("parent");n.unshift(e);var r=[1,0,0,0,1,0,0,0,1];return a.each(n,function(t){s.multiply(r,t.attr("matrix"),r)}),r},getTotalMatrix:function(){var t=this.__cfg.totalMatrix;if(!t){t=[1,0,0,0,1,0,0,0,1];var e=this.__cfg.parent;if(e){o(t,e.getTotalMatrix())}o(t,this.attr("matrix")),this.__cfg.totalMatrix=t}return t},clearTotalMatrix:function(){},invert:function(t){var e=this.getTotalMatrix();if(i(e))t[0]/=e[0],t[1]/=e[4];else{var n=s.invert([],e);n&&u.transformMat3(t,t,n)}return this},resetTransform:function(t){var e=this.attr("matrix");r(e)||t.transform(e[0],e[1],e[3],e[4],e[6],e[7])}}},function(t,e,n){var r=n(45),i={};i.create=function(){var t=new r.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},i.clone=function(t){var e=new r.ARRAY_TYPE(9);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.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.fromValues=function(t,e,n,i,o,a,s,u,c){var l=new r.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=i,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},i.set=function(t,e,n,r,i,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},i.invert=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],f=l*a-s*c,h=-l*o+s*u,p=c*o-a*u,g=n*f+r*h+i*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+i*c)*g,t[2]=(s*r-i*a)*g,t[3]=h*g,t[4]=(l*n-i*u)*g,t[5]=(-s*n+i*o)*g,t[6]=p*g,t[7]=(-c*n+r*u)*g,t[8]=(a*n-r*o)*g,t):null},i.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*a,t[3]=s*u-o*l,t[4]=n*l-i*u,t[5]=i*o-n*s,t[6]=o*c-a*u,t[7]=r*u-n*c,t[8]=n*a-r*o,t},i.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*i+a*s)+r*(u*i-o*s)},i.multiply=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],d=n[3],y=n[4],v=n[5],x=n[6],m=n[7],b=n[8];return t[0]=h*r+p*a+g*c,t[1]=h*i+p*s+g*l,t[2]=h*o+p*u+g*f,t[3]=d*r+y*a+v*c,t[4]=d*i+y*s+v*l,t[5]=d*o+y*u+v*f,t[6]=x*r+m*a+b*c,t[7]=x*i+m*s+b*l,t[8]=x*o+m*u+b*f,t},i.mul=i.multiply,i.translate=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=h*r+p*a+c,t[7]=h*i+p*s+l,t[8]=h*o+p*u+f,t},i.rotate=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*a,t[1]=p*i+h*s,t[2]=p*o+h*u,t[3]=p*a-h*r,t[4]=p*s-h*i,t[5]=p*u-h*o,t[6]=c,t[7]=l,t[8]=f,t},i.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},i.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},i.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,f=r*s,h=i*a,p=i*s,g=i*u,d=o*a,y=o*s,v=o*u;return t[0]=1-f-g,t[3]=l-v,t[6]=h+y,t[1]=l+v,t[4]=1-c-g,t[7]=p-d,t[2]=h-y,t[5]=p+d,t[8]=1-c-f,t},i.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],d=e[13],y=e[14],v=e[15],x=n*s-r*a,m=n*u-i*a,b=n*c-o*a,_=r*u-i*s,w=r*c-o*s,S=i*c-o*u,M=l*d-f*g,O=l*y-h*g,C=l*v-p*g,P=f*y-h*d,A=f*v-p*d,j=h*v-p*y,k=x*j-m*A+b*P+_*C-w*O+S*M;return k?(k=1/k,t[0]=(s*j-u*A+c*P)*k,t[1]=(u*C-a*j-c*O)*k,t[2]=(a*A-s*C+c*M)*k,t[3]=(i*A-r*j-o*P)*k,t[4]=(n*j-i*C+o*O)*k,t[5]=(r*C-n*A-o*M)*k,t[6]=(d*S-y*w+v*_)*k,t[7]=(y*b-g*S-v*m)*k,t[8]=(g*w-d*b+v*x)*k,t):null},i.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},i.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},i.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t},i.sub=i.subtract,i.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},i.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},i.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],d=e[3],y=e[4],v=e[5],x=t[6],m=e[7],b=e[8];return Math.abs(n-h)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-g)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-y)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-x)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(l-m)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(f-b)<=r.EPSILON*Math.max(1,Math.abs(f),Math.abs(b))},t.exports=i},function(t,e,n){var r=n(45),i={};i.create=function(){var t=new r.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},i.clone=function(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},i.fromValues=function(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},i.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},i.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},i.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},i.sub=i.subtract,i.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},i.mul=i.multiply,i.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},i.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},i.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},i.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},i.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},i.distance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)},i.dist=i.distance,i.squaredDistance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)},i.len=i.length,i.squaredLength=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},i.normalize=function(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},i.cross=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t},i.lerp=function(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t},i.hermite=function(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t},i.bezier=function(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,f=3*u*a,h=u*o;return t[0]=e[0]*c+n[0]*l+r[0]*f+i[0]*h,t[1]=e[1]*c+n[1]*l+r[1]*f+i[1]*h,t[2]=e[2]*c+n[2]*l+r[2]*f+i[2]*h,t},i.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI,i=2*r.RANDOM()-1,o=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=i*e,t},i.transformMat4=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t},i.transformMat3=function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t},i.transformQuat=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*o-u*i,f=c*i+u*r-a*o,h=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=l*c+p*-a+f*-u-h*-s,t[1]=f*c+p*-s+h*-a-l*-u,t[2]=h*c+p*-u+l*-s-f*-a,t},i.rotateX=function(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},i.rotateY=function(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},i.rotateZ=function(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},i.forEach=function(){var t=i.create();return function(e,n,r,i,o,a){var s,u;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s1?0:Math.acos(o)},i.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},i.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))},t.exports=i},function(t,e,n){var r=n(45),i={};i.create=function(){var t=new r.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},i.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},i.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},i.set=function(t,e,n){return t[0]=e,t[1]=n,t},i.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},i.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},i.sub=i.subtract,i.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},i.mul=i.multiply,i.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},i.div=i.divide,i.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},i.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},i.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},i.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},i.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},i.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},i.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},i.distance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)},i.dist=i.distance,i.squaredDistance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},i.len=i.length,i.squaredLength=function(t){var e=t[0],n=t[1];return e*e+n*n},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},i.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},i.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},i.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},i.lerp=function(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t},i.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},i.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},i.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},i.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},i.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},i.forEach=function(){var t=i.create();return function(e,n,r,i,o,a){var s,u;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s4&&void 0!==arguments[4]?arguments[4]:0,g=this,d=g.get("canvas"),y=function(t){var e={M:null,attrs:{}};for(var n in t)"transform"===n?e.M=r.transform(g.getMatrix(),t[n]):"matrix"===n?e.M=t[n]:f[n]||(e.attrs[n]=t[n]);return e}(t),v=y.attrs,x=y.M,m=function(t){var e={};for(var n in t)e[n]=g.attr(n);return e}(v),b=o.clone(g.getMatrix()),_=t.repeat,w=g.get("animateTimer");w&&w.stop(),o.isNumber(u)&&(p=u,u=null),o.isFunction(n)?(u=n,n="easeLinear"):n=n||"easeLinear",g.setSilent("animating",!0),g.setSilent("animateCfg",{toAttrs:v,toM:x,callback:u}),w=s.timer(function(t){_?function(t){var r=t%e/e;h(r=a[n](r))}(t):function(t){var r=t/e;r<1?h(r=a[n](r)):(h(1),u&&u(),g.setSilent("animating",!1),g.setSilent("animateCfg",null),g.setSilent("animateTimer",null),w.stop())}(t)},p),g.setSilent("animateTimer",w)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(236);n.d(e,"easeLinear",function(){return r.a});var i=n(237);n.d(e,"easeQuad",function(){return i.b}),n.d(e,"easeQuadIn",function(){return i.a}),n.d(e,"easeQuadOut",function(){return i.c}),n.d(e,"easeQuadInOut",function(){return i.b});var o=n(238);n.d(e,"easeCubic",function(){return o.b}),n.d(e,"easeCubicIn",function(){return o.a}),n.d(e,"easeCubicOut",function(){return o.c}),n.d(e,"easeCubicInOut",function(){return o.b});var a=n(239);n.d(e,"easePoly",function(){return a.b}),n.d(e,"easePolyIn",function(){return a.a}),n.d(e,"easePolyOut",function(){return a.c}),n.d(e,"easePolyInOut",function(){return a.b});var s=n(240);n.d(e,"easeSin",function(){return s.b}),n.d(e,"easeSinIn",function(){return s.a}),n.d(e,"easeSinOut",function(){return s.c}),n.d(e,"easeSinInOut",function(){return s.b});var u=n(241);n.d(e,"easeExp",function(){return u.b}),n.d(e,"easeExpIn",function(){return u.a}),n.d(e,"easeExpOut",function(){return u.c}),n.d(e,"easeExpInOut",function(){return u.b});var c=n(242);n.d(e,"easeCircle",function(){return c.b}),n.d(e,"easeCircleIn",function(){return c.a}),n.d(e,"easeCircleOut",function(){return c.c}),n.d(e,"easeCircleInOut",function(){return c.b});var l=n(243);n.d(e,"easeBounce",function(){return l.c}),n.d(e,"easeBounceIn",function(){return l.a}),n.d(e,"easeBounceOut",function(){return l.c}),n.d(e,"easeBounceInOut",function(){return l.b});var f=n(244);n.d(e,"easeBack",function(){return f.b}),n.d(e,"easeBackIn",function(){return f.a}),n.d(e,"easeBackOut",function(){return f.c}),n.d(e,"easeBackInOut",function(){return f.b});var h=n(245);n.d(e,"easeElastic",function(){return h.c}),n.d(e,"easeElasticIn",function(){return h.a}),n.d(e,"easeElasticOut",function(){return h.c}),n.d(e,"easeElasticInOut",function(){return h.b})},function(t,e,n){"use strict";e.a=function(t){return+t}},function(t,e,n){"use strict";e.a=function(t){return t*t},e.c=function(t){return t*(2-t)},e.b=function(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}},function(t,e,n){"use strict";e.a=function(t){return t*t*t},e.c=function(t){return--t*t*t+1},e.b=function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return o});var r=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),i=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),o=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3)},function(t,e,n){"use strict";e.a=function(t){return 1-Math.cos(t*i)},e.c=function(t){return Math.sin(t*i)},e.b=function(t){return(1-Math.cos(r*t))/2};var r=Math.PI,i=r/2},function(t,e,n){"use strict";e.a=function(t){return Math.pow(2,10*t-10)},e.c=function(t){return 1-Math.pow(2,-10*t)},e.b=function(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}},function(t,e,n){"use strict";e.a=function(t){return 1-Math.sqrt(1-t*t)},e.c=function(t){return Math.sqrt(1- --t*t)},e.b=function(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}},function(t,e,n){"use strict";function r(t){return(t=+t)_?Math.pow(t,1/3):t/b+x}function s(t){return t>m?t*t*t:b*(t-x)}function u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function c(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l(t,e,n,i){return 1===arguments.length?function(t){if(t instanceof f)return new f(t.h,t.c,t.l,t.opacity);t instanceof o||(t=r(t));var e=Math.atan2(t.b,t.a)*g.b;return new f(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new f(t,e,n,null==i?1:i)}function f(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}e.a=i,e.b=l;var h=n(50),p=n(49),g=n(90),d=.95047,y=1,v=1.08883,x=4/29,m=6/29,b=3*m*m,_=m*m*m;Object(h.a)(o,i,Object(h.b)(p.a,{brighter:function(t){return new o(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new o(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=y*s(t),e=d*s(e),n=v*s(n),new p.b(u(3.2404542*e-1.5371385*t-.4985314*n),u(-.969266*e+1.8760108*t+.041556*n),u(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Object(h.a)(f,l,Object(h.b)(p.a,{brighter:function(t){return new f(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new f(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return r(this).rgb()}}))},function(t,e,n){"use strict";function r(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof i)return new i(t.h,t.s,t.l,t.opacity);t instanceof a.b||(t=Object(a.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(d*r+p*e-g*n)/(d+p-g),u=r-o,c=(h*(n-o)-l*u)/f,y=Math.sqrt(c*c+u*u)/(h*o*(1-o)),v=y?Math.atan2(c,u)*s.b-120:NaN;return new i(v<0?v+360:v,y,o,t.opacity)}(t):new i(t,e,n,null==r?1:r)}function i(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}e.a=r;var o=n(50),a=n(49),s=n(90),u=-.14861,c=1.78277,l=-.29227,f=-.90649,h=1.97294,p=h*f,g=h*c,d=c*l-f*u;Object(o.a)(i,r,Object(o.b)(a.a,{brighter:function(t){return t=null==t?a.c:Math.pow(a.c,t),new i(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?a.d:Math.pow(a.d,t),new i(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*s.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new a.b(255*(e+n*(u*r+c*i)),255*(e+n*(l*r+f*i)),255*(e+n*(h*r)),this.opacity)}}))},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return Math.round(t+e*n)}}},function(t,e,n){"use strict";function r(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(a,s){var u=[],c=[];return a=t(a),s=t(s),function(t,r,o,a,s,u){if(t!==o||r!==a){var c=s.push("translate(",null,e,null,n);u.push({i:c-4,x:Object(i.a)(t,o)},{i:c-2,x:Object(i.a)(r,a)})}else(o||a)&&s.push("translate("+o+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,u,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Object(i.a)(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(a.rotate,s.rotate,u,c),function(t,e,n,a){t!==e?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Object(i.a)(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(a.skewX,s.skewX,u,c),function(t,e,n,r,a,s){if(t!==n||e!==r){var u=a.push(o(a)+"scale(",null,",",null,")");s.push({i:u-4,x:Object(i.a)(t,n)},{i:u-2,x:Object(i.a)(e,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,u,c),a=s=null,function(t){for(var e,n=-1,r=c.length;++n1){var y=h[1];y.change({nice:!1,min:0,max:Math.max.apply(null,y.values)})}c.scales=h;var v=new a[l](c);t[o]=v}},e.prototype._processData=function(){for(var t=this.get("data"),e=[],n=this._groupData(t),r=0;ro&&(o=l)}(ie.max)&&e.change({min:i,max:o})},e.prototype._adjust=function(t){var e=this,n=e.get("adjusts"),r=e.getYScale(),i=e.getXScale(),o=i.field,a=r?r.field:null;s.each(n,function(n){var u=s.mix({xField:o,yField:a},n),l=s.upperFirst(n.type);if("Dodge"===l){var f=[];if(i.isCategory||i.isIdentity)f.push("x");else{if(r)throw new Error("dodge is not support linear attribute, please use category attribute!");f.push("y")}u.adjustNames=f}else if("Stack"===l){var h=e.get("coord");if(!r){u.height=h.getHeight();var p=e.getDefaultValue("size")||3;u.size=p}!h.isTransposed&&s.isNil(u.reverseOrder)&&(u.reverseOrder=!0)}new c[l](u).processAdjust(t),"Stack"===l&&r&&e._updateStackRange(a,r,t)})},e.prototype.setCoord=function(t){this.set("coord",t);var e=this.getAttr("position");this.get("shapeContainer").setMatrix(t.matrix),e&&(e.coord=t)},e.prototype.paint=function(){var t=this.get("dataArray"),e=[],n=this.getShapeFactory();n.setCoord(this.get("coord"));var r=this.get("shapeContainer");this._beforeMapping(t);for(var i=0;i=0?t:0},e.prototype._normalizeValues=function(t,e){var n=[];if(s.isArray(t))for(var r=0;r1)for(var f=0;f0)s.each(n,function(n){e+="-"+t[n]});else{var r=this.get("type"),i=this.getXScale(),o=this.getYScale(),a=i.field||"x",u=o.field||"y",c=t[u],l=void 0;l=i.isIdentity?i.value:t[a],e+="interval"===r||"schema"===r?"-"+l:"line"===r||"area"===r||"path"===r?"-"+r:"-"+l+"-"+c;var f=this._getGroupScales();s.isEmpty(f)||s.each(f,function(n){var r=n.field;"identity"!==n.type&&(e+="-"+t[r])})}return e},e.prototype.getDrawCfg=function(t){var e={origin:t,x:t.x,y:t.y,color:t.color,size:t.size,shape:t.shape,isInCircle:this.isInCircle(),opacity:t.opacity},n=this.get("styleOptions");return n&&n.style&&(e.style=this.getCallbackCfg(n.fields,n.style,t._origin)),this.get("generatePoints")&&(e.points=t.points,e.nextPoints=t.nextPoints),this.get("animate")&&(e._id=this._getShapeId(t._origin)),e},e.prototype.appendShapeInfo=function(t,e){t&&(t.setSilent("index",e),t.setSilent("coord",this.get("coord")),this.get("animate")&&this.get("animateCfg")&&t.setSilent("animateCfg",this.get("animateCfg")))},e.prototype.drawPoint=function(t,e,n,r){var i=t.shape,o=this.getDrawCfg(t),a=n.drawShape(i,o,e);this.appendShapeInfo(a,r)},e.prototype.getAttr=function(t){return this.get("attrs")[t]},e.prototype.getXScale=function(){return this.getAttr("position").scales[0]},e.prototype.getYScale=function(){return this.getAttr("position").scales[1]},e.prototype.getShapes=function(){var t=[],e=this.get("shapeContainer").get("children");return s.each(e,function(e){e.get("origin")&&t.push(e)}),t},e.prototype.getAttrsForLegend=function(){var t=this.get("attrs"),e=[];return s.each(t,function(t){-1!==d.indexOf(t.type)&&e.push(t)}),e},e.prototype.getFieldsForLegend=function(){var t=[],e=this.get("attrOptions");return s.each(d,function(n){var r=e[n];r&&r.field&&s.isString(r.field)&&(t=t.concat(r.field.split("*")))}),s.uniq(t)},e.prototype.changeVisible=function(t,e){this.set("visible",t);var n=this.get("shapeContainer");n&&n.set("visible",t);var r=this.get("labelContainer");if(r&&r.set("visible",t),!e&&n){n.get("canvas").draw()}},e.prototype.reset=function(){this.set("attrOptions",{}),this.clearInner()},e.prototype.clearInner=function(){this.clearActivedShapes(),this.clearSelected();var t=this.get("shapeContainer");t&&t.clear();var e=this.get("labelContainer");e&&e.remove(),this.set("attrs",{}),this.set("groupScales",null),this.set("labelContainer",null),this.set("xDistance",null),this.set("isStacked",null)},e.prototype.clear=function(){this.clearInner(),this.set("scales",{})},e.prototype.destroy=function(){this.clear();var e=this.get("shapeContainer");e&&e.remove(),this.offEvents(),t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.get("view")&&(this._bindActiveAction(),this._bindSelectedAction())},e.prototype.offEvents=function(){this.get("view")&&(this._offActiveAction(),this._offSelectedAction())},e}(o);t.exports=y},function(t,e,n){var r=n(69),i=n(70),o=n(12);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(164),i=n(42),o=n(165),a=n(78),s=n(166),u=n(6),c=n(67),l=c(r),f=c(i),h=c(o),p=c(a),g=c(s),d=u;(r&&"[object DataView]"!=d(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=d(new i)||o&&"[object Promise]"!=d(o.resolve())||a&&"[object Set]"!=d(new a)||s&&"[object WeakMap]"!=d(new s))&&(d=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case g:return"[object WeakMap]"}return e}),t.exports=d},function(t,e,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(6),o=n(5),a="[object Symbol]";t.exports=function(t){return"symbol"==(void 0===t?"undefined":r(t))||o(t)&&i(t)==a}},function(t,e,n){var r=n(19),i=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e,n){var r=n(0),i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=this.getDefaultCfg();r.assign(this,n,e)}return t.prototype.getDefaultCfg=function(){return{xField:null,yField:null,adjustNames:["x","y"],groupFields:null}},t.prototype.isAdjust=function(t){return this.adjustNames.indexOf(t)>=0},t.prototype.processAdjust=function(t){var e=r.Array.merge(t);this.adjDataArray=t,this.mergeData=e,this.adjustData(t,e),this.adjFrames=null,this.mergeData=null},t.prototype._getDimValues=function(t){var e={},n=[];if(this.xField&&this.isAdjust("x")&&n.push(this.xField),this.yField&&this.isAdjust("y")&&n.push(this.yField),r.each(n,function(n){var i=r.Array.values(t,n);i.sort(function(t,e){return t-e}),e[n]=i}),!this.yField&&this.isAdjust("y")){var i=[0,1];e.y=i}return e},t.prototype.adjustData=function(t,e){var n=this,i=n._getDimValues(e);r.each(t,function(e,o){r.each(i,function(r,i){n.adjustDim(i,r,e,t.length,o)})})},t.prototype.adjustDim=function(){},t.prototype.getAdjustRange=function(t,e,n){var r=n.indexOf(e),i=n.length,o=void 0,a=void 0;return!this.yField&&this.isAdjust("y")?(o=0,a=1):i>1?(o=0===r?n[0]:n[r-1],a=r===i-1?n[i-1]:n[r+1],0!==r?o+=(e-o)/2:o-=(a-e)/2,r!==i-1?a-=(a-e)/2:a+=(e-n[i-2])/2):(o=0===e?0:e-.5,a=0===e?1:e+.5),{pre:o,next:a}},t.prototype.groupData=function(t,e){var n={};return r.each(t,function(t){var r=t[e];void 0===r&&(r=t[e]=0),n[r]||(n[r]=[]),n[r].push(t)}),n},t}();t.exports=i},function(t,e,n){function r(t,e){var n=t.getCenter();return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function i(t,e){for(var n=t.length,r=[t[0]],i=1;i=s[l]?1:0,p=f>Math.PI?1:0,g=n.convertPoint(u),d=r(n,g);if(d>=.5)if(f===2*Math.PI){var y={x:(u.x+s.x)/2,y:(u.y+s.y)/2},v=n.convertPoint(y);c.push(["A",d,d,0,p,h,v.x,v.y]),c.push(["A",d,d,0,p,h,g.x,g.y])}else c.push(["A",d,d,0,p,h,g.x,g.y]);return c}(a,s,t)):n.push(i(o,t));break;case"z":default:n.push(o)}}),function(t){o.each(t,function(e,n){if("a"===e[0].toLowerCase()){var r=t[n-1],i=t[n+1];i&&"a"===i[0].toLowerCase()?r&&"l"===r[0].toLowerCase()&&(r[0]="M"):r&&"a"===r[0].toLowerCase()&&i&&"l"===i[0].toLowerCase()&&(i[0]="M")}})}(n),n}};t.exports=s},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++ee)&&(this.min=e),(i.isNil(this.max)||this.max=t.min&&e<=t.max&&n.push(e)}),n.length||(n.push(t.min),n.push(t.max)),t.ticks=n}},e.prototype.scale=function(t){if(null===t||void 0===t)return NaN;var e=this.max,n=this.min;if(e===n)return 0;var r=(t-n)/(e-n),i=this.rangeMin();return i+r*(this.rangeMax()-i)},e.prototype.invert=function(t){var e=(t-this.rangeMin())/(this.rangeMax()-this.rangeMin());return this.min+e*(this.max-this.min)},e}(r);t.exports=a},function(t,e,n){var r=n(0),i=n(1).MatrixUtil,o=i.mat3,a=i.vec3,s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=this.getDefaultCfg();r.mix(this,n,e),this.init()}return t.prototype.getDefaultCfg=function(){return{isTransposed:!1,matrix:[1,0,0,0,1,0,0,0,1]}},t.prototype.init=function(){var t=this.start,e=this.end,n={x:(t.x+e.x)/2,y:(t.y+e.y)/2};this.center=n,this.width=Math.abs(e.x-t.x),this.height=Math.abs(e.y-t.y)},t.prototype._swapDim=function(t){var e=this[t];if(e){var n=e.start;e.start=e.end,e.end=n}},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.convertDim=function(t,e){var n=this[e],r=n.start;return r+t*(n.end-r)},t.prototype.invertDim=function(t,e){var n=this[e],r=n.start;return(t-r)/(n.end-r)},t.prototype.convertPoint=function(t){return t},t.prototype.invertPoint=function(t){return t},t.prototype.applyMatrix=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.matrix,i=[t,e,n];return a.transformMat3(i,i,r),i},t.prototype.invertMatrix=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.matrix,i=o.invert([],r),s=[t,e,n];return a.transformMat3(s,s,i),s},t.prototype.convert=function(t){var e=this.convertPoint(t),n=e.x,r=e.y,i=this.applyMatrix(n,r,1);return{x:i[0],y:i[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,n=this.center;return o.translate(e,e,[-n.x,-n.y]),o.rotate(e,e,t),o.translate(e,e,[n.x,n.y]),this},t.prototype.reflect=function(t){switch(t){case"x":this._swapDim("x");break;case"y":this._swapDim("y");break;default:this._swapDim("y")}return this},t.prototype.scale=function(t,e){var n=this.matrix,r=this.center;return o.translate(n,n,[-r.x,-r.y]),o.scale(n,n,[t,e]),o.translate(n,n,[r.x,r.y]),this},t.prototype.translate=function(t,e){var n=this.matrix;return o.translate(n,n,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t}();t.exports=s},function(t,e,n){var r=n(0),i=n(100).LabelsRenderer,o=n(1).Group,a=n(306),s=n(2),u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{_id:null,zIndex:4,ticks:null,line:null,tickLine:null,subTickCount:0,subTickLine:null,grid:null,label:{textStyle:{},autoRotate:!0,formatter:null},title:{autoRotate:!0,textStyle:{}},autoPaint:!0}},e.prototype._beforeRenderUI=function(){var t=this.get("title"),e=this.get("label"),n=this.get("grid");t&&this.setSilent("title",r.deepMix({autoRotate:!0,textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:s.fontFamily,textAlign:"center"},offset:48},t)),e&&this.setSilent("label",r.deepMix({autoRotate:!0,textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:s.fontFamily},offset:10},e)),n&&this.setSilent("grid",r.deepMix({lineStyle:{lineWidth:1,stroke:"#C0D0E0"}},n))},e.prototype._renderUI=function(){this.get("label")&&this.renderLabels(),this.get("autoPaint")&&this.paint(),r.isNil(this.get("title"))||this.renderTitle(),this.sort()},e.prototype._parseTicks=function(t){for(var e=(t=t||[]).length,n=0;n3&&void 0!==arguments[3]?arguments[3]:"",i=this.get("tickItems"),o=this.get("subTickItems"),a=this.getTickEnd(e,n,t),s={x1:e.x,y1:e.y,x2:a.x,y2:a.y};i||(i=[]),o||(o=[]),"sub"===r?o.push(s):i.push(s),this.set("tickItems",i),this.set("subTickItems",o)},e.prototype._renderLine=function(){var t=this.get("line"),e=void 0;if(t){e=this.getLinePath(),t=r.mix({path:e},t);var n=this.addShape("path",{attrs:t});n.name="axis-line",this.get("appendInfo")&&n.setSilent("appendInfo",this.get("appendInfo")),this.set("lineShape",n)}},e.prototype._processTicks=function(){var t=this,e=t.get("label"),n=t.get("subTickCount"),i=t.get("tickLine"),o=t.get("ticks");if(o=t._parseTicks(o),r.each(o,function(n,r){var o=t.getTickPoint(n.value,r);i&&t._addTickItem(r,o,i.length),e&&t.addLabel(n,o,r)}),n){var a=t.get("subTickLine");r.each(o,function(e,r){if(r>0){var s=e.value-o[r-1].value;s/=t.get("subTickCount")+1;for(var u=1;u<=n;u++){var c={text:"",value:r?o[r-1].value+u*s:u*s},l=t.getTickPoint(c.value),f=void 0;f=a&&a.length?a.length:parseInt(.6*i.length,10),t._addTickItem(u-1,l,f,"sub")}}})}},e.prototype._addTickLine=function(t,e){var n=r.mix({},e),i=[];r.each(t,function(t){i.push(["M",t.x1,t.y1]),i.push(["L",t.x2,t.y2])}),delete n.length,n.path=i;var o=this.addShape("path",{attrs:n});o.name="axis-ticks",o._id=this.get("_id")+"-ticks",o.set("coord",this.get("coord")),this.get("appendInfo")&&o.setSilent("appendInfo",this.get("appendInfo"))},e.prototype._renderTicks=function(){var t=this.get("tickItems"),e=this.get("subTickItems");if(!r.isEmpty(t)){var n=this.get("tickLine");this._addTickLine(t,n)}if(!r.isEmpty(e)){var i=this.get("subTickLine")||this.get("tickLine");this._addTickLine(e,i)}},e.prototype._renderGrid=function(){var t=this.get("grid");t&&(t.coord=this.get("coord"),t.appendInfo=this.get("appendInfo"),this.set("gridGroup",this.addGroup(a,t)))},e.prototype.paint=function(){this._renderLine(),this._processTicks(),this._renderTicks(),this._renderGrid();var t=this.get("label");t&&t.autoRotate&&this.autoRotateLabels()},e.prototype.parseTick=function(t,e,n){return{text:t,value:e/(n-1)}},e.prototype.getTextAnchor=function(t){return Math.abs(t[1]/t[0])>=1?"center":t[0]>0?"start":"end"},e.prototype.getMaxLabelWidth=function(t){var e=t.get("children"),n=0;return r.each(e,function(t){var e=t.getBBox().width;n-1&&t%1==0&&t-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(73),i=n(74),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),function(e){return o.call(t,e)}))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++nu)throw new Error("too late; already scheduled");return n},e.h=function(t,e){var n=r(t,e);if(n.state>l)throw new Error("too late; already started");return n},e.f=r;var i=n(427),o=n(367),a=Object(i.a)("start","end","interrupt"),s=[],u=0,c=1,l=2,f=3,h=4,p=5,g=6;e.e=function(t,e,n,r,i,d){var y=t.__transition;if(y){if(n in y)return}else t.__transition={};!function(t,e,n){function r(p){var d,y,v,x;if(n.state!==c)return a();for(d in u)if((x=u[d]).name===n.name){if(x.state===f)return Object(o.b)(r);x.state===h?(x.state=g,x.timer.stop(),x.on.call("interrupt",t,t.__data__,x.index,x.group),delete u[d]):+dh))return!1;var g=l.get(t);if(g&&l.get(e))return g==e;var d=-1,y=!0,v=n&s?new r:void 0;for(l.set(t,e),l.set(e,t);++d0&&n(l)?e>1?r(l,e-1,n,a,s):i(s,l):a||(s[s.length]=l)}return s}var i=n(50),o=n(206);t.exports=r},function(t,e,n){var r=n(212),i=n(213),o=n(214);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e,n){var r=n(215);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(7),i=n(19),o=NaN,a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=u.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):s.test(t)?o:+t}},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e,n){var r=n(19);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i=c){var y=e?null:s(t);if(y)return u(y);p=!1,f=a,d=new r}else d=e?[]:g;t:for(;++l0&&a.each(t,function(t){n.lineToLabel(t,e)})},e.prototype.lineToLabel=function(t,e){var n=this.get("coord"),r={x:t.x-t._offset.x,y:t.y-t._offset.y},i={x:(r.x+t.x)/2,y:(r.y+t.y)/2},o=this.get("lineGroup");o||(o=this.addGroup({elCls:"x-line-group"}),this.set("lineGroup",o));var s=o.addShape("path",{attrs:a.mix({path:["M"+r.x,r.y+" Q"+i.x,i.y+" "+t.x,t.y].join(","),fill:null,stroke:t.color},e)});s.name="labelLine",s._id=t._id&&t._id.replace("glabel","glabelline"),s.set("coord",n)},e.prototype.getLabelPoint=function(t,e,n){function r(e,n){return a.isArray(e)&&(e=1===t.length?e.length<=2?e[e.length-1]:function(t){var e=0;return a.each(t,function(t){e+=t}),e/t.length}(e):e[n]),e}var i=this.get("coord"),o={x:r(e.x,n),y:r(e.y,n),text:t[n]};if(e&&e.nextPoints&&("funnel"===e.shape||"pyramid"===e.shape)){var s=-1/0;e.nextPoints.forEach(function(t){(t=i.convert(t)).x>s&&(s=t.x)}),o.x=(o.x+s)/2}"pyramid"===e.shape&&!e.nextPoints&&e.points&&e.points.forEach(function(t){t=i.convert(t),(a.isArray(t.x)&&-1===e.x.indexOf(t.x)||a.isNumber(t.x)&&e.x!==t.x)&&(o.x=(o.x+t.x)/2)});var u=this.getLabelOffset(o,n,t.length);return this.transLabelPoint(o),o.x+=u.x,o.y+=u.y,o.color=e.color,o._offset=u,o},e.prototype.transLabelPoint=function(t){var e=this.get("coord").applyMatrix(t.x,t.y,1);t.x=e[0],t.y=e[1]},e.prototype.getOffsetVector=function(){var t=this.get("label").offset||0,e=this.get("coord");return e.isTransposed?e.applyMatrix(t,0):e.applyMatrix(0,t)},e.prototype.getDefaultOffset=function(){var t=this.get("coord"),e=this.getOffsetVector();return t.isTransposed?e[0]:e[1]},e.prototype.getLabelOffset=function(t,e,n){var r=this.getDefaultOffset(),i=this.get("coord").isTransposed,o=i?"x":"y",a=i?1:-1,s={x:0,y:0};return s[o]=e>0||1===n?r*a:r*a*-1,s},e.prototype.getLabelAlign=function(t,e,n){var r="center";if(this.get("coord").isTransposed){var i=this.getDefaultOffset();r=i<0?"right":0===i?"center":"left",n>1&&0===e&&("right"===r?r="left":"left"===r&&(r="right"))}return r},e.prototype.showLabels=function(t){var e=this.getLabelsItems(t),n=this.get("label");e=this.adjustItems(e),this.resetLabels(e),n.labelLine&&this.drawLines(e,n.labelLine)},e.prototype.destroy=function(){this.removeLabels(),t.prototype.destroy.call(this)},e}(r);a.assign(u.prototype,i.LabelsRenderer),t.exports=u},function(t,e,n){var r=n(101);r.LabelsRenderer=n(284),t.exports=r},function(t,e,n){var r=n(0),i=n(1),o=i.DomUtil,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{zIndex:6,items:null,textStyle:null,formatter:null,htmlTemplate:null,_containerTpl:'
',_itemTpl:'
{text}
'}},e.prototype._renderUI=function(){this._drawLabels()},e.prototype._drawLabels=function(){var t=this,e=t.get("items");r.each(e,function(e,n){t._addLabel(e,n)})},e.prototype._addLabel=function(t,e){var n=this._getLabelCfg(t,e);return this._createText(n)},e.prototype._getLabelCfg=function(t,e){var n=this.get("textStyle")||{},i=this.get("formatter"),o=this.get("htmlTemplate");if(!r.isObject(t)){var a=t;(t={}).text=a}r.isFunction(n)&&(n=n(t.text,t,e)),i&&(t.text=i(t.text,t,e)),r.isFunction(o)&&(t.text=o(t.text,t,e)),r.isNil(t.text)&&(t.text=""),t.text=t.text+"";return r.mix({},t,n,{x:t.x||0,y:t.y||0})},e.prototype._createText=function(t){var e=this.get("htmlTemplate"),n=this.get("customDiv"),r=void 0;if(!e){var i=t.point;return delete t.point,(r=this.addShape("text",{attrs:t})).setSilent("origin",i),r.name="label",this.get("appendInfo")&&r.setSilent("appendInfo",this.get("appendInfo")),r}if(!n){var a=this.get("_containerTpl"),s=this.get("canvas").get("el").parentNode;n=o.createDom(a),s.style.position="relative",s.appendChild(n),this.set("customDiv",n)}var u=this._createDom(t);n.appendChild(u),this._setCustomPosition(t,u)},e.prototype._setCustomPosition=function(t,e){var n=t.textAlign||"left",r=t.y,i=t.x,a=o.getOuterWidth(e);r-=o.getOuterHeight(e)/2,"center"===n?i-=a/2:"right"===n&&(i-=a),e.style.top=parseInt(r,10)+"px",e.style.left=parseInt(i,10)+"px"},e.prototype._createDom=function(t){var e=this.get("_itemTpl"),n=this.get("htmlTemplate");r.isString(n)&&(t.text=r.substitute(n,{text:t.text}));var i=r.substitute(e,{text:t.text});return o.createDom(i)},e.prototype.getLabels=function(){var t=this.get("customDiv");return t?r.toArray(t.childNodes):this.get("children")},e.prototype.addLabel=function(t){var e=this.get("items"),n=e.length;return e.push(t),this._addLabel(t,n)},e.prototype.changeLabel=function(t,e){if(t){var n=this.get("htmlTemplate"),i=r.indexOf(this.getLabels(),t),o=this._getLabelCfg(e,i);if(n){var a=this._createDom(o);t.innerHTML=a.innerHTML,this._setCustomPosition(o,t)}else if(t._id=e._id,t.attr("text",o.text),t.attr("x")!==o.x||t.attr("y")!==o.y){var s=t.get("attrs").rotate;s?(t.rotateAtStart(-s),t.attr(o),t.rotateAtStart(s)):t.attr(o)}}},e.prototype.clear=function(){var e=this.get("customDiv");e&&(e.innerHTML=""),t.prototype.clear.call(this)},e.prototype.setItems=function(t){this.clear(),this.set("items",t),this._drawLabels()},e.prototype.remove=function(){var e=this.get("customDiv");e&&e.parentNode.removeChild(e),t.prototype.remove.call(this)},e}(i.Group);t.exports=a},function(t,e,n){var r=n(99),i=n(22),o=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getPointRauis=function(t,e){return i.getPointRadius(t,e)},e.prototype.getCirclePoint=function(t,e,n){var r=this.get("coord"),i=r.getCenter(),o=this._isEmitLabels(),a=this.getPointRauis(r,n);if(r.isTransposed&&a>e&&!o){t+=2*Math.asin(e/(2*a))}else a+=e;return{x:i.x+a*Math.cos(t),y:i.y+a*Math.sin(t),angle:t,r:a}},e.prototype.getArcPoint=function(t,e){var n=void 0;return e=e||0,n=o.isArray(t.x)||o.isArray(t.y)?{x:o.isArray(t.x)?t.x[e]:t.x,y:o.isArray(t.y)?t.y[e]:t.y}:t,this.transLabelPoint(n),n},e.prototype.getPointAngle=function(t){var e=this.get("coord");return i.getPointAngle(e,t)},e.prototype.getMiddlePoint=function(t){var e=this.get("coord"),n=t.length,r={x:0,y:0};return o.each(t,function(t){r.x+=t.x,r.y+=t.y}),r.x/=n,r.y/=n,r=e.convert(r)},e.prototype._isToMiddle=function(t){return t.x.length>2},e.prototype.getLabelPoint=function(t,e,n){var r=t[n],i=1,o=void 0;this._isToMiddle(e)?o=this.getMiddlePoint(e.points):(1===t.length&&0===n?n=1:0===n&&(i=-1),o=this.getArcPoint(e,n));var a=this.getDefaultOffset();a*=i;var s=this.getPointAngle(o),u=this.getCirclePoint(s,a,o);return u.text=r,u.angle=s,u.color=e.color,u.rotate=this.getLabelRotate(s,a,e),u},e.prototype._isEmitLabels=function(){return this.get("label").labelEmit},e.prototype.getLabelRotate=function(t){var e=void 0;return e=180*t/Math.PI,e+=90,this._isEmitLabels()&&(e-=90),e&&(e>90?e-=180:e<-90&&(e+=180)),e/180*Math.PI},e.prototype.getLabelAlign=function(t){var e=this.get("coord"),n=void 0;if(this._isEmitLabels())n=t.angle<=Math.PI/2&&t.angle>-Math.PI/2?"left":"right";else if(e.isTransposed){var r=e.getCenter(),i=this.getDefaultOffset();n=Math.abs(t.x-r.x)<1?"center":t.angle>Math.PI||t.angle<=0?i>0?"left":"right":i>0?"right":"left"}else n="center";return n},e}(r);t.exports=a},function(t,e,n){t.exports={Scale:n(290),Coord:n(298),Axis:n(303),Guide:n(310),Legend:n(319),Tooltip:n(325),Event:n(327)}},function(t,e,n){var r=n(0),i=n(36);i.Linear=n(37),i.Identity=n(292),i.Cat=n(106),i.Time=n(293),i.TimeCat=n(295),i.Log=n(296),i.Pow=n(297);var o=function(t){if(i.hasOwnProperty(t)){var e=r.lowerFirst(t);i[e]=function(e){return new i[t](e)}}};for(var a in i)o(a);var s=["cat","timeCat"];i.isCategory=function(t){return s.indexOf(t)>=0},t.exports=i},function(t,e){function n(t,e){var n=t.length;if(0===n)return NaN;var r=t[0];if(e=t[n-1])return t[n-1];for(var i=1;it[n-1])return NaN;if(ei&&(e=parseFloat(e.toFixed(n)))}else for(;t>10;)e*=10,t/=10;return e}(t*=r);r*=a,t/=a}var s=(t="floor"===n?o.snapFloor(e,t):"ceil"===n?o.snapCeiling(e,t):o.snapTo(e,t))*r;if(Math.abs(r)<1&&s.toString().length>i){s=t/parseInt(1/r)*(r>0?1:-1)}return s},snapMultiple:function(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e},snapTo:function(t,e){var i=n(t,e),o=r(t,e);if(isNaN(i)||isNaN(o)){if(t[0]>=e)return t[0];var a=t[t.length-1];if(a<=e)return a}return Math.abs(e-i)1?t/(this.values.length-1):t,e+r*(n-e)},e.prototype.invert=function(t){if(i.isString(t))return t;var e=this.rangeMin(),n=this.rangeMax();tn&&(t=n);var r=(t-e)/(n-e),o=Math.round(r*(this.values.length-1))%this.values.length;return o=o||0,this.values[o]},e}(r);t.exports=a},function(t,e,n){var r=n(0);t.exports=function(t){var e={},n=[],i=t.maxCount||8,o=function(t){var e=[];return r.each(t,function(t){r.isArray(t)?e=e.concat(t):e.push(t)}),e}(t.data),a=o.length,s=function(t,e){var n=void 0;for(n=e;n>0&&t%n!=0;n--);if(1===n)for(n=e;n>0&&(t-1)%n!=0;n--);return n}(a-1,i-1)+1;2===s?s=i:s3?0:(t-t%10!=10)*t%10]}};var x={D:function(t){return t.getDate()},DD:function(t){return s(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return s(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return s(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return String(t.getFullYear()).substr(2)},YYYY:function(t){return s(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return s(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return s(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return s(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return s(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return s(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return s(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+s(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},m={D:[l,function(t,e){t.day=e}],Do:[new RegExp(l.source+f.source),function(t,e){t.day=parseInt(e,10)}],M:[l,function(t,e){t.month=e-1}],YY:[l,function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:[l,function(t,e){t.hour=e}],m:[l,function(t,e){t.minute=e}],s:[l,function(t,e){t.second=e}],YYYY:[/\d{4}/,function(t,e){t.year=e}],S:[/\d/,function(t,e){t.millisecond=100*e}],SS:[/\d{2}/,function(t,e){t.millisecond=10*e}],SSS:[/\d{3}/,function(t,e){t.millisecond=e}],d:[l,p],ddd:[f,p],MMM:[f,a("monthNamesShort")],MMMM:[f,a("monthNames")],a:[f,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\+\-]\d\d:?\d\d|Z)/,function(t,e){"Z"===e&&(e="+00:00");var n,r=(e+"").match(/([\+\-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};m.dd=m.d,m.dddd=m.ddd,m.DD=m.D,m.mm=m.m,m.hh=m.H=m.HH=m.h,m.MM=m.M,m.ss=m.s,m.A=m.a,u.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},u.format=function(t,e,n){var r=n||u.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");var i=[];return e=(e=u.masks[e]||e||u.masks.default).replace(h,function(t,e){return i.push(e),"??"}),(e=e.replace(c,function(e){return e in x?x[e](t,r):e.slice(1,e.length-1)})).replace(/\?\?/g,function(){return i.shift()})},u.parse=function(t,e,n){var r=n||u.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=u.masks[e]||e,t.length>1e3)return!1;var i=!0,o={};if(e.replace(c,function(e){if(m[e]){var n=m[e],a=t.search(n[0]);~a?t.replace(n[0],function(e){return n[1](o,e,r),t=t.substr(a+e.length),e}):i=!1}return m[e]?"":e.slice(1,e.length-1)}),!i)return!1;var a=new Date;!0===o.isPm&&null!=o.hour&&12!=+o.hour?o.hour=+o.hour+12:!1===o.isPm&&12==+o.hour&&(o.hour=0);var s;return null!=o.timezoneOffset?(o.minute=+(o.minute||0)-+o.timezoneOffset,s=new Date(Date.UTC(o.year||a.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):s=new Date(o.year||a.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),s},void 0!==t&&t.exports?t.exports=u:void 0!==(r=function(){return u}.call(e,n,e,t))&&(t.exports=r)}()},function(t,e,n){var r=n(0);t.exports={toTimeStamp:function(t){return r.isString(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),r.isDate(t)&&(t=t.getTime()),t}}},function(t,e,n){var r=n(0),i=n(2),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{title:{fill:"#333",textBaseline:"middle"},itemFormatter:null,useHtml:!1,inPlot:!1,hoverable:!0}},e.prototype._beforeRenderUI=function(){var t=this.addGroup();t.set("viewId",this.get("viewId")),this.set("itemsGroup",t)},e.prototype._renderUI=function(){this._renderTitle()},e.prototype._renderTitle=function(){var t=this.get("title");if(t&&t.text){var e=this.addShape("text",{attrs:r.mix({x:0,y:0,fill:"#333",textBaseline:"middle",fontFamily:i.fontFamily},t)});e.name="legend-title",this.get("appendInfo")&&e.setSilent("appendInfo",this.get("appendInfo")),this.set("titleShape",e)}},e.prototype.getCheckedCount=function(){var t=this.get("itemsGroup").get("children");return r.filter(t,function(t){return t.get("checked")}).length},e.prototype.setItems=function(t){this.set("items",t),this.clearItems(),this._renderUI()},e.prototype.addItem=function(t){this.get("items").push(t),this.clearItems(),this._renderUI()},e.prototype.clearItems=function(){this.get("itemsGroup").clear()},e.prototype.getWidth=function(){return this.getBBox().width},e.prototype.getHeight=function(){return this.getBBox().height},e}(n(1).Group);t.exports=o},function(t,e,n){var r=n(0),i=n(2),o=n(110),a=n(1),s=a.Event,u=a.Group,c=n(323),l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"continuous-legend",items:null,layout:"vertical",width:156,height:20,titleGap:22,textStyle:{fill:"#333",textAlign:"center",textBaseline:"middle",fontFamily:i.fontFamily},slidable:!0,inRange:{fill:"#4E7CCC"},_range:[0,100],middleAttr:{fill:"#fff",fillOpacity:0},outRangeStyle:{fill:"#D9D9D9"},numberFormatter:null,labelOffset:10})},e.prototype._calStartPoint=function(){var t={x:0,y:this.get("titleGap")-12},e=this.get("titleShape");if(e){var n=e.getBBox();t.y+=n.height}return t},e.prototype._beforeRenderUI=function(){var e=this.get("items");r.isArray(e)&&!r.isEmpty(e)&&(t.prototype._beforeRenderUI.call(this),this.set("firstItem",e[0]),this.set("lastItem",e[e.length-1]))},e.prototype._formatItemValue=function(t){var e=this.get("numberFormatter");e&&(t=e(t));var n=this.get("itemFormatter");return n&&(t=n.call(this,t)),t},e.prototype._renderUI=function(){t.prototype._renderUI.call(this),this.get("slidable")?this._renderSlider():this._renderBackground()},e.prototype._renderSlider=function(){var t=new u,e=new u,n=new u,r=this._calStartPoint(),i=this.addGroup(c,{minHandleElement:t,maxHandleElement:e,backgroundElement:n,middleAttr:this.get("middleAttr"),layout:this.get("layout"),range:this.get("_range"),width:this.get("width"),height:this.get("height")});i.translate(r.x,r.y),this.set("slider",i);this._renderSliderShape().attr("clip",i.get("middleHandleElement")),this._renderTrigger()},e.prototype._addBackground=function(t,e,n){return t.addShape(e,{attrs:r.mix({},n,this.get("outRangeStyle"))}),t.addShape(e,{attrs:n})},e.prototype._renderTrigger=function(){var t=this.get("firstItem"),e=this.get("lastItem"),n=this.get("layout"),i=this.get("textStyle"),o=this.get("inRange"),a=void 0,s=void 0;"color-legend"===this.get("type")?(a={fill:t.attrValue},s={fill:e.attrValue}):(a=r.mix({},o),s=r.mix({},o));var u=r.mix({text:this._formatItemValue(t.value)+""},i),c=r.mix({text:this._formatItemValue(e.value)+""},i);"vertical"===n?(this._addVerticalTrigger("min",a,u),this._addVerticalTrigger("max",s,c)):(this._addHorizontalTrigger("min",a,u),this._addHorizontalTrigger("max",s,c))},e.prototype._addVerticalTrigger=function(t,e,n){var i=this.get("slider").get(t+"HandleElement"),o=this.get("width"),a=i.addShape("polygon",{attrs:r.mix({points:[[o/2+12,0],[o/2+1,0],[o/2+12,"min"===t?12:-12]]},e)}),s=i.addShape("text",{attrs:r.mix(n,{x:o+8,y:"max"===t?-4:4,textAlign:"start",lineHeight:1,textBaseline:"middle"})}),u="vertical"===this.get("layout")?"ns-resize":"ew-resize";a.attr("cursor",u),s.attr("cursor",u),this.set(t+"ButtonElement",a),this.set(t+"TextElement",s)},e.prototype._addHorizontalTrigger=function(t,e,n){var i=this.get("slider").get(t+"HandleElement"),o=i.addShape("polygon",{attrs:r.mix({points:[[0,0],[0,12],["min"===t?-12:12,12]]},e)}),a=i.addShape("text",{attrs:r.mix(n,{x:"min"===t?-16:16,y:6,textAlign:"min"===t?"end":"start",textBaseline:"middle"})}),s="vertical"===this.get("layout")?"ns-resize":"ew-resize";o.attr("cursor",s),a.attr("cursor",s),this.set(t+"ButtonElement",o),this.set(t+"TextElement",a)},e.prototype._bindUI=function(){var t=this;if(t.get("slidable")){t.get("slider").on("sliderchange",function(e){var n=e.range,r=1*t.get("firstItem").value,i=1*t.get("lastItem").value,o=r+n[0]/100*(i-r),a=r+n[1]/100*(i-r);t._updateElement(o,a);var u=new s("itemfilter",e,!0,!0);u.range=[o,a],t.emit("itemfilter",u)})}},e.prototype._updateElement=function(t,e){var n=this.get("minTextElement"),r=this.get("maxTextElement");if(e>1&&(t=parseInt(t,10),e=parseInt(e,10)),n.attr("text",this._formatItemValue(t)+""),r.attr("text",this._formatItemValue(e)+""),"color-legend"===this.get("type")&&this.get("attr")){var i=this.get("attr"),o=this.get("minButtonElement"),a=this.get("maxButtonElement");o.attr("fill",i.mapping(t).join("")),a.attr("fill",i.mapping(e).join(""))}},e}(o);t.exports=l},function(t,e,n){"use strict";function r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function i(t){return Object(o.selection)().transition(t)}e.a=r,e.b=i,e.c=function(){return++S};var o=n(59),a=n(432),s=n(445),u=n(446),c=n(447),l=n(448),f=n(449),h=n(450),p=n(451),g=n(452),d=n(453),y=n(454),v=n(455),x=n(456),m=n(457),b=n(458),_=n(459),w=n(338),S=0,M=o.selection.prototype;r.prototype=i.prototype={constructor:r,select:d.a,selectAll:y.a,filter:f.a,merge:h.a,selection:v.a,transition:_.a,call:M.call,nodes:M.nodes,node:M.node,size:M.size,empty:M.empty,each:M.each,on:p.a,attr:a.a,attrTween:s.a,style:x.a,styleTween:m.a,text:b.a,remove:g.a,tween:w.a,delay:u.a,duration:c.a,ease:l.a}},function(t,e,n){"use strict";var r=n(356);n.d(e,"a",function(){return r.e}),n.d(e,"f",function(){return r.g}),n.d(e,"d",function(){return r.f});var i=n(433);n.d(e,"e",function(){return i.a}),n.d(e,"c",function(){return i.b});var o=n(434);n.d(e,"b",function(){return o.a})},function(t,e,n){function r(t,e){return i.isEqualWith(t,e,function(t,e){return t===e})}var i=n(0),o=n(115),a=n(1),s=a.Canvas,u=a.DomUtil,c=n(329),l=n(103),f=n(2),h=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix(e,{id:null,forceFit:!1,container:null,wrapperEl:null,canvas:null,width:500,height:500,pixelRatio:null,padding:f.plotCfg.padding,backPlot:null,frontPlot:null,plotBackground:null,background:null,autoPaddingAppend:5,views:[]})},e.prototype.init=function(){this._initCanvas(),this._initPlot(),this._initEvents(),t.prototype.init.call(this);var e=new l.Tooltip({chart:this,options:{}});this.set("tooltipController",e);var n=new l.Legend({chart:this});this.set("legendController",n),this.set("_id","chart"),this.emit("afterinit")},e.prototype._isAutoPadding=function(){var t=this.get("padding");return i.isArray(t)?-1!==t.indexOf("auto"):"auto"===t},e.prototype._getAutoPadding=function(){for(var t=this.get("padding"),e=function(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}(this.get("frontPlot").getBBox(),this.get("backPlot").getBBox()),n=[0-e.minY,e.maxX-this.get("width"),e.maxY-this.get("height"),0-e.minX],r=i.toAllPadding(t),o=0;o');t.appendChild(o),this.set("wrapperEl",o),this.get("forceFit")&&(n=u.getWidth(t,n),this.set("width",n));var a=new s({containerDOM:o,width:n,height:r,pixelRatio:this.get("pixelRatio")});this.set("canvas",a)},e.prototype._initPlot=function(){this._initPlotBack();var t=this.get("canvas"),e=t.addGroup({zIndex:1}),n=t.addGroup({zIndex:2}),r=t.addGroup({zIndex:3});this.set("backPlot",e),this.set("middlePlot",n),this.set("frontPlot",r)},e.prototype._initPlotBack=function(){var t=this.get("canvas").addGroup(c,{padding:this.get("padding"),plotBackground:i.mix({},f.plotBackground,this.get("plotBackground")),background:i.mix({},f.background,this.get("background"))});this.set("plot",t),this.set("plotRange",t.get("plotRange"))},e.prototype._initEvents=function(){this.get("forceFit")&&window.addEventListener("resize",i.wrapBehavior(this,"_initForceFitEvent"))},e.prototype._initForceFitEvent=function(){var t=setTimeout(i.wrapBehavior(this,"forceFit"),200);clearTimeout(this.get("resizeTimer")),this.set("resizeTimer",t)},e.prototype._renderLegends=function(){var t=this.get("options").legends;if(i.isNil(t)||!1!==t){var e=this.get("legendController");if(e.options=t||{},e.plotRange=this.get("plotRange"),t&&t.custom)e.addCustomLegend();else{var n=this.getAllGeoms(),r=[];i.each(n,function(t){var n=t.get("view"),o=t.getAttrsForLegend();i.each(o,function(o){var a=o.type,s=o.getScale(a);if(s.field&&"identity"!==s.type&&!function(t,e){var n=!1;return i.each(t,function(t){var r=[].concat(t.values),i=[].concat(e.values);t.type!==e.type||t.field!==e.field||r.sort().toString()!==i.sort().toString()||(n=!0)}),n}(r,s)){r.push(s);var u=n.getFilteredValues(s.field);e.addLegend(s,o,t,u)}})})}e.alignLegends()}},e.prototype._renderTooltips=function(){var t=this.get("options");if(i.isNil(t.tooltip)||!1!==t.tooltip){var e=this.get("tooltipController");e.options=t.tooltip||{},e.renderTooltip()}},e.prototype.getAllGeoms=function(){var t=[];t=t.concat(this.get("geoms"));var e=this.get("views");return i.each(e,function(e){t=t.concat(e.get("geoms"))}),t},e.prototype.forceFit=function(){if(this&&!this.destroyed){var t=this.get("container"),e=this.get("width"),n=u.getWidth(t,e);if(0!==n&&n!==e){var r=this.get("height");this.changeSize(n,r)}return this}},e.prototype.resetPlot=function(){var t=this.get("plot"),e=this.get("padding");r(e,t.get("padding"))||(t.set("padding",e),t.repaint())},e.prototype.changeSize=function(t,e){this.get("canvas").changeSize(t,e);var n=this.get("plot");return this.set("width",t),this.set("height",e),n.repaint(),this.set("keepPadding",!0),this.repaint(),this.set("keepPadding",!1),this.emit("afterchangesize"),this},e.prototype.changeWidth=function(t){return this.changeSize(t,this.get("height"))},e.prototype.changeHeight=function(t){return this.changeSize(this.get("width"),t)},e.prototype.view=function(t){(t=t||{}).parent=this,t.backPlot=this.get("backPlot"),t.middlePlot=this.get("middlePlot"),t.frontPlot=this.get("frontPlot"),t.canvas=this.get("canvas"),i.isNil(t.animate)&&(t.animate=this.get("animate")),t.options=i.mix({},this._getSharedOptions(),t.options);var e=new o(t);return e.set("_id","view"+this.get("views").length),this.get("views").push(e),this.emit("addview",{view:e}),e},e.prototype.removeView=function(t){var e=this.get("views");i.Array.remove(e,t),t.destroy()},e.prototype._getSharedOptions=function(){var t=this.get("options"),e={};return i.each(["scales","coord","axes"],function(n){e[n]=i.cloneDeep(t[n])}),e},e.prototype.getViewRegion=function(){var t=this.get("plotRange");return{start:t.bl,end:t.tr}},e.prototype.legend=function(t,e){var n=this.get("options");n.legends||(n.legends={});var r={};return!1===t?n.legends=!1:i.isObject(t)?r=t:i.isString(t)?r[t]=e:r=e,i.mix(n.legends,r),this},e.prototype.tooltip=function(t,e){var n=this.get("options");return n.tooltip||(n.tooltip={}),!1===t?n.tooltip=!1:i.isObject(t)?i.mix(n.tooltip,t):i.mix(n.tooltip,e),this},e.prototype.clear=function(){this.emit("beforeclear");for(var e=this.get("views");e.length>0;){e.shift().destroy()}t.prototype.clear.call(this);var n=this.get("canvas");return this.resetPlot(),n.draw(),this.emit("afterclear"),this},e.prototype.clearInner=function(){var e=this.get("views");i.each(e,function(t){t.clearInner()});var n=this.get("tooltipController");if(n&&n.clear(),!this.get("keepLegend")){var r=this.get("legendController");r&&r.clear()}t.prototype.clearInner.call(this)},e.prototype.drawComponents=function(){t.prototype.drawComponents.call(this),this.get("keepLegend")||this._renderLegends()},e.prototype.render=function(){if(!this.get("keepPadding")&&this._isAutoPadding()){this.beforeRender(),this.drawComponents();var e=this._getAutoPadding(),n=this.get("plot");r(n.get("padding"),e)||(n.set("padding",e),n.repaint())}t.prototype.render.call(this),this._renderTooltips()},e.prototype.repaint=function(){this.get("keepPadding")||this.resetPlot(),t.prototype.repaint.call(this)},e.prototype.changeVisible=function(t){var e=this.get("wrapperEl"),n=t?"":"none";e.style.display=n},e.prototype.toDataURL=function(){return this.get("canvas").get("el").toDataURL("image/png")},e.prototype.downloadImage=function(t){var e=this.toDataURL(),n=document.createElement("a");if(window.Blob&&window.URL){for(var r=e.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]),a=o.length,s=new Uint8Array(a);a--;)s[a]=o.charCodeAt(a);var u=new Blob([s],{type:i});window.navigator.msSaveBlob?window.navigator.msSaveBlob(u,(t||"chart")+".png"):n.addEventListener("click",function(){n.download=(t||"chart")+".png",n.href=window.URL.createObjectURL(u)})}else n.addEventListener("click",function(){n.download=(t||"chart")+".png",n.href=e.replace("image/png","image/octet-stream")});var c=document.createEvent("MouseEvents");return c.initEvent("click",!1,!1),n.dispatchEvent(c),e},e.prototype.showTooltip=function(t){var e=this.getViewsByPoint(t);if(e.length){this.get("tooltipController").showTooltip(t,e)}return this},e.prototype.hideTooltip=function(){return this.get("tooltipController").hideTooltip(),this},e.prototype.getTooltipItems=function(t){var e=this.getViewsByPoint(t),n=[];return i.each(e,function(e){var r=e.get("geoms");i.each(r,function(e){var r=e.get("dataArray"),o=[];i.each(r,function(n){var r=e.findPoint(t,n);if(r){var i=e.getTipItems(r);o=o.concat(i)}}),n=n.concat(o)})}),n},e.prototype.destroy=function(){this.emit("beforedestroy"),clearTimeout(this.get("resizeTimer"));var e=this.get("canvas"),n=this.get("wrapperEl");n.parentNode.removeChild(n),t.prototype.destroy.call(this),e.destroy(),window.removeEventListener("resize",i.getWrapBehavior(this,"_initForceFitEvent")),this.emit("afterdestroy")},e}(o);t.exports=h},function(t,e,n){function r(t,e,n){var r=(t-e)/(n-e);return r>=0&&r<=1}function i(t,e){var n=!1;if(t){if("theta"===t.type){var i=t.start,o=t.end;n=r(e.x,i.x,o.x)&&r(e.y,i.y,o.y)}else{var a=t.invert(e);n=a.x>=0&&a.y>=0&&a.x<=1&&a.y<=1}}return n}var o=n(58),a=n(16),s=n(0),u=n(103),c=n(2),l=n(328),f={};s.each(a,function(t,e){var n=s.lowerFirst(e);f[n]=function(e){var n=new t(e);return this.addGeom(n),n}});var h=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n)),i=r;return s.each(a,function(t,e){var n=s.lowerFirst(e);i[n]=function(e){var n=new t(e);return i.addGeom(n),n}}),r.init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{viewContainer:null,coord:null,start:{x:0,y:0},end:{x:1,y:1},geoms:[],scales:{},options:{},scaleController:null,padding:0,parent:null,tooltipEnable:!0,animate:!0,visible:!0}},e.prototype.init=function(){this._initViewPlot(),this.get("data")&&this._initData(this.get("data")),this._initOptions(),this._initControllers(),this._bindEvents()},e.prototype._initOptions=function(){var t=this,e=s.mix({},t.get("options"));e.scales||(e.scales={}),e.coord||(e.coord={}),!1===e.animate&&this.set("animate",!1),(!1===e.tooltip||s.isNull(e.tooltip))&&this.set("tooltipEnable",!1),e.geoms&&e.geoms.length&&s.each(e.geoms,function(e){t._createGeom(e)});var n=t.get("scaleController");n&&(n.defs=e.scales);var r=t.get("coordController");r&&r.reset(e.coord),this.set("options",e)},e.prototype._createGeom=function(t){var e=t.type,n=void 0;this[e]&&(n=this[e](),s.each(t,function(t,e){if(n[e])if(s.isObject(t)&&t.field)if("label"===t)n[e](t.field,t.callback,t.cfg);else{var r=void 0;s.each(t,function(t,e){"field"!==e&&(r=t)}),n[e](t.field,r)}else n[e](t)}))},e.prototype._initControllers=function(){var t=this.get("options"),e=new u.Scale({defs:t.scales}),n=new u.Coord(t.coord);this.set("scaleController",e),this.set("coordController",n);var r=new u.Axis;this.set("axisController",r);var i=new u.Guide({options:t.guides||[]});this.set("guideController",i)},e.prototype._initViewPlot=function(){this.get("viewContainer")||this.set("viewContainer",this.get("middlePlot"))},e.prototype._initGeoms=function(){for(var t=this.get("geoms"),e=this.get("filteredData"),n=this.get("coord"),r=this.get("_id"),i=0;i0;){t.shift().destroy()}},e.prototype._drawGeoms=function(){for(var t=this.get("geoms"),e=this.get("coord"),n=0;n0)||"time"===i.type||i.change({min:0})}}},e.prototype._setCatScalesRange=function(){var t=this.get("coord"),e=this.getXScale(),n=this.getYScales(),r=[];e&&r.push(e),r=r.concat(n);var i=t.isPolar&&function(t){var e=t.startAngle,n=t.endAngle;return!(!s.isNil(e)&&!s.isNil(n)&&n-e<2*Math.PI)}(t),o=this.get("scaleController").defs;s.each(r,function(e){if((e.isCategory||e.isIdentity)&&e.values&&(!o[e.field]||!o[e.field].range)){var n=e.values.length,r=void 0;if(1===n)r=[.5,1];else{var a=0;r=i?t.isTransposed?[(a=1/n*c.widthRatio.multiplePie)/2,1-a/2]:[0,1-1/n]:[a=1/n*1/2,1-a]}e.range=r}})},e.prototype.getXScale=function(){var t=this.get("geoms"),e=null;return s.isEmpty(t)||(e=t[0].getXScale()),e},e.prototype.getYScales=function(){for(var t=this.get("geoms"),e=[],n=0;n-1}},function(t,e,n){var r=n(25);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(24);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(24),i=n(42),o=n(43),a=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length=i?t:r(t,e,n)}},function(t,e){t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++re}},function(t,e,n){var r=n(93),i=n(13),o=n(237);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},function(t,e){t.exports=function(t,e){return t0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(96),i=n(34),o=n(13),a=n(248),s=n(3);t.exports=function(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}},function(t,e,n){var r=n(14);t.exports=function(){var t=arguments,e=r(t[0]);return t.length<3?e:e.replace(t[1],t[2])}},function(t,e,n){var r=n(251)("round");t.exports=r},function(t,e,n){var r=n(90),i=n(91),o=n(14),a=Math.min;t.exports=function(t){var e=Math[t];return function(t,n){if(t=i(t),n=null==n?0:a(r(n),292)){var s=(o(t)+"e").split("e"),u=e(s[0]+"e"+(+s[1]+n));return+((s=(o(u)+"e").split("e"))[0]+"e"+(+s[1]-n))}return e(t)}}},function(t,e,n){var r=n(88),i=n(253),o=n(97),a=n(258),s=i(function(t){return o(r(t,1,a,!0))});t.exports=s},function(t,e,n){var r=n(57),i=n(94),o=n(95);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e,n){var r=n(89);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++rt.x?t.x:e,n=nt.y?t.y:r,i=i0?o.maxX:o.minX,u,1];t.apply(c),t.attr({transform:[["t",-s,-u],["s",.01,1],["t",s,u]]});var l={transform:[["t",-s,-u],["s",100,1],["t",s,u]]},f=i(e,r,n);t.animate(l,f.duration,f.easing,f.callback,f.delay)}function s(t,e,n){var r=t._id,o=t.get("index"),a=void 0,s=void 0;if(n.isPolar&&"point"!==t.name)a=n.getCenter().x,s=n.getCenter().y;else{var u=t.getBBox();a=(u.minX+u.maxX)/2,s=(u.minY+u.maxY)/2}var c=[a,s,1];t.apply(c),t.attr({transform:[["t",-a,-s],["s",.01,.01],["t",a,s]]});var l={transform:[["t",-a,-s],["s",100,100],["t",a,s]]},f=i(e,o,r);t.animate(l,f.duration,f.easing,f.callback,f.delay)}function u(t,e){if("path"===t.get("type")){var n=t._id,r=t.get("index"),o=g.pathToAbsolute(t.attr("path"));t.attr("path",[o[0]]);var a={path:o},s=i(e,r,n);t.animate(a,s.duration,s.easing,s.callback,s.delay)}}function c(t,e,n,r,o){var a=function(t){var e=t.start,n=t.end,r=t.getWidth(),i=t.getHeight(),o=void 0,a=void 0,s=void 0,u=void 0,c=void 0;return t.isPolar?(u=t.getRadius(),s=t.getCenter(),o=t.startAngle,a=t.endAngle,(c=new p.Fan({attrs:{x:s.x,y:s.y,rs:0,re:u+200,startAngle:o,endAngle:o}})).endState={endAngle:a}):(c=new p.Rect({attrs:{x:e.x-200,y:n.y-200,width:t.isTransposed?r+400:0,height:t.isTransposed?0:i+400}}),t.isTransposed?c.endState={height:i+400}:c.endState={width:r+400}),c.isClip=!0,c}(n),s=t.get("canvas"),u=t._id,c=t.get("index"),l=void 0;r?(a.attr("startAngle",r),a.attr("endAngle",r),l={endAngle:o}):l=a.endState,a.set("canvas",s),t.attr("clip",a),t.setSilent("animating",!0);var f=i(e,c,u);a.animate(l,f.duration,f.easing,function(){t&&!t.get("destroyed")&&(t.attr("clip",null),t.setSilent("cacheShape",null),t.setSilent("animating",!1),a.remove())},f.delay)}function l(t,e){var n=t._id,r=t.get("index"),o=h.isNil(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),a=h.isNil(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity");t.attr("fillOpacity",0),t.attr("strokeOpacity",0);var s={fillOpacity:o,strokeOpacity:a},u=i(e,r,n);t.animate(s,u.duration,u.easing,u.callback,u.delay)}function f(t,e,n){var i=r(t,n),o=i.endAngle;c(t,e,n,i.startAngle,o)}var h=n(0),p=n(1),g=p.PathUtil;t.exports={enter:{clipIn:c,zoomIn:s,pathIn:u,scaleInY:o,scaleInX:a,fanIn:f,fadeIn:l},leave:{lineWidthOut:function(t,e){var n={lineWidth:0,opacity:0},r=t._id,o=i(e,t.get("index"),r);t.animate(n,o.duration,o.easing,function(){t.remove()},o.delay)},zoomOut:function(t,e,n){var r=t._id,o=t.get("index"),a=void 0,s=void 0;if(n.isPolar&&"point"!==t.name)a=n.getCenter().x,s=n.getCenter().y;else{var u=t.getBBox();a=(u.minX+u.maxX)/2,s=(u.minY+u.maxY)/2}var c=[a,s,1];t.apply(c);var l={transform:[["t",-a,-s],["s",.01,.01],["t",a,s]]},f=i(e,o,r);t.animate(l,f.duration,f.easing,function(){t.remove()},f.delay)},pathOut:function(t,e){if("path"===t.get("type")){var n=t._id,r=t.get("index"),o={path:[g.pathToAbsolute(t.attr("path"))[0]]},a=i(e,r,n);t.animate(o,a.duration,a.easing,function(){t.remove()},a.delay)}},fadeOut:function(t,e){var n=t._id,r={fillOpacity:0,strokeOpacity:0},o=i(e,t.get("index"),n);t.animate(r,o.duration,o.easing,function(){t.remove()},o.delay)}},appear:{clipIn:c,zoomIn:s,pathIn:u,scaleInY:o,scaleInX:a,fanIn:f,fadeIn:l},update:{fadeIn:l,fanIn:f}}},function(t,e,n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(e){"use strict";function o(){}function a(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function s(t){return function(){return this[t].apply(this,arguments)}}function u(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!==(void 0===t?"undefined":i(t)))&&u(t.listener)}var c=o.prototype,l=e.EventEmitter;c.getListeners=function(t){var e,n,r=this._getEvents();if(t instanceof RegExp){e={};for(n in r)r.hasOwnProperty(n)&&t.test(n)&&(e[n]=r[n])}else e=r[t]||(r[t]=[]);return e},c.flattenListeners=function(t){var e,n=[];for(e=0;e=0?"positive":"negative";o[p][h]||(o[p][h]=0),c[n]=[o[p][h],f+o[p][h]],o[p][h]+=f}},e}(n(21));t.exports=i},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getAdjustOffset=function(t,e){var n=e-t;return t+.05*n+.9*n*Math.random()},e.prototype._adjustGroup=function(t,e,n,i){var o=this,a=o.getAdjustRange(e,n,i);r.each(t,function(t){t[e]=o.getAdjustOffset(a.pre,a.next)})},e.prototype.adjustDim=function(t,e,n){var i=this,o=i.groupData(n,t);r.each(o,function(n,r){r=parseFloat(r),i._adjustGroup(n,t,r,e)})},e}(n(21));t.exports=i},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.assign(e,{cacheMax:null,adjustNames:["y"]})},e.prototype._getMax=function(t){var e=this.mergeData,n=r.maxBy(e,function(e){var n=e[t];return r.isArray(n)?Math.max.apply(null,n):n})[t];return r.isArray(n)?Math.max.apply(null,n):n},e.prototype._getXValuesMax=function(){var t=this.yField,e=this.xField,n={},i=this.mergeData;return r.each(i,function(i){var o=i[e],a=i[t],s=r.isArray(a)?Math.max.apply(null,a):a;n[o]=n[o]||0,n[o]=t.length;s--)o[s].remove()}},addLabel:function(t,e){var n=this.get("labelsGroup"),r={},i=void 0;return n&&(r.text=t,r.x=e.x,r.y=e.y,r.point=e,r.textAlign=e.textAlign,e.rotate&&(r.rotate=e.rotate),i=n.addLabel(r)),i},removeLabels:function(){var t=this.get("labelsGroup");t&&t.remove(),this.set("labelsGroup",null)}}},function(t,e,n){var r=n(1).MatrixUtil.vec2;t.exports={catmullRom2bezier:function(t,e,n){for(var i=!!e,o=[],a=0,s=t.length;a0&&(t=this._distribute(t,e)),t},e.prototype._distribute=function(t,e){var n=this.get("coord"),r=n.getRadius(),i=this.get("label").labelHeight,o=n.getCenter(),a=2*(r+e)+2*i,s={start:n.start,end:n.end},u=this.get("geom");if(u){var c=u.get("view");s=c.getViewRegion()}var l=[[],[]];return t.forEach(function(t){"right"===t.textAlign?l[0].push(t):l[1].push(t)}),l.forEach(function(t,e){var n=parseInt(a/i,10);t.length>n&&(t.sort(function(t,e){return e["..percent"]-t["..percent"]}),t.splice(n,t.length-n)),t.sort(function(t,e){return t.y-e.y}),function(t,e,n,r,i){var o=!0,a=n.start,s=n.end,u=Math.min(a.y,s.y),c=Math.abs(a.y-s.y),l=void 0,f=0,h=Number.MIN_VALUE,p=t.map(function(t){return t.y>f&&(f=t.y),t.yc&&(c=f-u);o;)for(p.forEach(function(t){var e=(Math.min.apply(h,t.targets)+Math.max.apply(h,t.targets))/2;t.pos=Math.min(Math.max(h,e-t.size/2),c-t.size)}),o=!1,l=p.length;l--;)if(l>0){var g=p[l-1],d=p[l];g.pos+g.size>d.pos&&(g.size+=d.size,g.targets=g.targets.concat(d.targets),g.pos+g.size>c&&(g.pos=c-g.size),p.splice(l,1),o=!0)}l=0,p.forEach(function(n){var r=u+e/2;n.targets.forEach(function(){t[l].y=n.pos+r,r+=e,l++})}),t.forEach(function(t){var e=t.r*t.r,n=Math.pow(Math.abs(t.y-r.y),2);if(e90&&(n-=180),n<-90&&(n+=180)),n/180*Math.PI},e.prototype.getLabelAlign=function(t){var e=this.get("coord").getCenter(),n=void 0;n=t.angle<=Math.PI/2&&t.x>=e.x?"left":"right";return this.getDefaultOffset()<=0&&(n="right"===n?"left":"right"),n},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e=this.get("coord"),n={x:i.isArray(t.x)?t.x[0]:t.x,y:t.y[0]};this.transLabelPoint(n);var r={x:i.isArray(t.x)?t.x[1]:t.x,y:t.y[1]};this.transLabelPoint(r);var o=void 0,s=a.getPointAngle(e,n);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var u=a.getPointAngle(e,r);s>=u&&(u+=2*Math.PI),o=s+(u-s)/2}return o},e.prototype.getCirclePoint=function(t,e){var n=this.get("coord"),i=n.getCenter(),o=n.getRadius()+e,a=r(i,t,o);return a.angle=t,a.r=o,a},e}(o);t.exports=u},function(t,e,n){function r(t){return t.alias||t.field}var i=n(0),o=n(2).defaultColor,a={_getIntervalSize:function(t){var e=null,n=this.get("type"),r=this.get("coord");if(r.isRect&&("interval"===n||"schema"===n)){e=this.getSize(t._origin);var o=r.isTransposed?"y":"x";if(i.isArray(t[o])){e=e(1+r.rangeMax())/2&&(i=r.rangeMin()),e=r.invert(i),r.isCategory&&(e=r.translate(e)),e},_getOriginByPoint:function(t){var e=this.getXScale(),n=this.getYScale(),r=e.field,i=n.field,o=this.get("coord").invert(t),a=e.invert(o.x),s=n.invert(o.y),u={};return u[r]=a,u[i]=s,u},_getScale:function(t){var e=this.get("scales"),n=null;return i.each(e,function(e){if(e.field===t)return n=e,!1}),n},_getTipValueScale:function(){var t=this.getAttrsForLegend(),e=void 0;i.each(t,function(t){var n=t.getScale(t.type);if(n.isLinear)return e=n,!1});var n=this.getXScale(),r=this.getYScale();return!e&&r&&"..y"===r.field?n:e||r||n},_getTipTitleScale:function(t){if(t)return this._getScale(t);var e=this.getAttr("position").getFields(),n=void 0;return i.each(e,function(t){if(-1===t.indexOf(".."))return n=t,!1}),this._getScale(n)},_filterValue:function(t,e){var n=this.get("coord"),r=this.getYScale(),o=r.field,a=n.invert(e).y;a=r.invert(a);var s=t[t.length-1];return i.each(t,function(t){var e=t._origin;if(e[o][0]<=a&&e[o][1]>=a)return s=t,!1}),s},getXDistance:function(){var t=this.get("xDistance");if(!t){var e=this.getXScale();if(e.isCategory)t=1;else{var n=e.values,r=e.translate(n[0]),o=r;i.each(n,function(t){(t=e.translate(t))o&&(o=t)});var a=n.length;t=(o-r)/(a-1)}this.set("xDistance",t)}return t},findPoint:function(t,e){var n=this,r=n.get("type"),o=n.getXScale(),a=n.getYScale(),s=o.field,u=a.field,c=null;if(i.indexOf(["heatmap"],r)>-1){var l=n.get("coord").invert(t),f=o.invert(l.x),h=a.invert(l.y),p=1/0;return i.each(e,function(t){var e=Math.pow(t._origin[s]-f,2)+Math.pow(t._origin[u]-h,2);e=y){if(!b)return c=t,!1;i.isArray(c)||(c=[]),c.push(t)}}),i.isArray(c)&&(c=this._filterValue(c,t));else{var _=void 0;if(o.isLinear||"timeCat"===o.type){if((y>o.translate(m)||yo.max||yMath.abs(o.translate(_._origin[s])-y)&&(d=_)}var C=n.getXDistance();return!c&&Math.abs(o.translate(d._origin[s])-y)<=C/2&&(c=d),c},getTipTitle:function(t,e){var n="",r=this._getTipTitleScale(e);if(r){var i=t[r.field];n=r.getText(i)}else if("heatmap"===this.get("type")){var o=this.getXScale(),a=this.getYScale();n="( "+o.getText(t[o.field])+", "+a.getText(t[a.field])+" )"}return n},getTipValue:function(t,e){var n=void 0;if(n=t[e.field],i.isArray(n)){var r=[];i.each(n,function(t){r.push(e.getText(t))}),n=r.join("-")}else n=e.getText(n);return n},getTipName:function(t){var e=void 0,n=void 0,o=this._getGroupScales();if(o.length&&i.each(o,function(t){return n=t,!1}),n){var a=n.field;e=n.getText(t[a])}else{e=r(this._getTipValueScale())}return e},getTipItems:function(t,e){function n(e,n,r){if(!i.isNil(n)&&""!==n){var s={title:u,point:t,name:e||u,value:n,color:t.color||o,marker:!0};s.size=a._getIntervalSize(t),l.push(i.mix({},s,r))}}var a=this,s=t._origin,u=a.getTipTitle(s,e),c=a.get("tooltipCfg"),l=[],f=void 0,h=void 0;if(c){var p=c.fields,g=c.cfg,d=[];if(i.each(p,function(t){d.push(s[t])}),g){i.isFunction(g)&&(g=g.apply(null,d));var y=i.mix({},{point:t,title:u,color:t.color||o,marker:!0},g);y.size=a._getIntervalSize(t),l.push(y)}else i.each(p,function(t){if(!i.isNil(s[t])){var e=a._getScale(t);f=r(e),h=e.getText(s[t]),n(f,h)}})}else{var v=a._getTipValueScale();i.isNil(s[v.field])||(h=a.getTipValue(s,v),n(f=a.getTipName(s),h))}return l},isShareTooltip:function(){var t=this.get("shareTooltip"),e=this.get("type"),n=this.get("view"),r=void 0;if(r=n.get("parent")?n.get("parent").get("options"):n.get("options"),"interval"===e){var o=this.get("coord"),a=o.type;("theta"===a||"polar"===a&&o.isTransposed)&&(t=!1)}else this.getYScale()&&!i.inArray(["contour","point","polygon","edge"],e)||(t=!1);return r.tooltip&&i.isBoolean(r.tooltip.shared)&&(t=r.tooltip.shared),t}};t.exports=a},function(t,e,n){function r(t,e){if(!t)return!0;if(t.length!==e.length)return!0;var n=!1;return o.each(e,function(e,r){if(!function(t,e){if(o.isNil(t)||o.isNil(e))return!1;var n=t.get("origin"),r=e.get("origin");return o.isEqual(n,r)}(e,t[r]))return n=!0,!1}),n}function i(t,e){var n={};return o.each(t,function(t,r){var i=e.__attrs[r];o.isArray(i)&&(i=o.cloneDeep(i)),n[r]=i}),n}var o=n(0),a={_isAllowActive:function(){var t=this.get("allowActive");if(!o.isNil(t))return t;var e=this.get("view"),n=this.isShareTooltip();return!1===e.get("options").tooltip||!n},_onMouseenter:function(t){var e=t.shape,n=this.get("shapeContainer");e&&n.contain(e)&&this._isAllowActive()&&this.setShapesActived(e)},_onMouseleave:function(){var t=this.get("view").get("canvas");this.get("activeShapes")&&(this.clearActivedShapes(),t.draw())},_bindActiveAction:function(){var t=this.get("view"),e=this.get("type");t.on(e+":mouseenter",o.wrapBehavior(this,"_onMouseenter")),t.on(e+":mouseleave",o.wrapBehavior(this,"_onMouseleave"))},_offActiveAction:function(){var t=this.get("view"),e=this.get("type");t.off(e+":mouseenter",o.getWrapBehavior(this,"_onMouseenter")),t.off(e+":mouseleave",o.getWrapBehavior(this,"_onMouseleave"))},_setActiveShape:function(t){var e=this.get("activedOptions")||{},n=t.get("origin"),r=n.shape||this.getDefaultValue("shape");o.isArray(r)&&(r=r[0]);var a=this.get("shapeFactory"),s=o.mix({},t.__attrs,{origin:n}),u=a.getActiveCfg(r,s);e.style&&o.mix(u,e.style);var c=i(u,t);t.setSilent("_originAttrs",c),e.animate?t.animate(u,300):t.attr(u),t.setZIndex(1)},setShapesActived:function(t){var e=this;o.isArray(t)||(t=[t]);var n=e.get("activeShapes");if(r(n,t)){var i=e.get("view").get("canvas"),a=e.get("shapeContainer"),s=e.get("activedOptions");s&&s.highlight?(o.each(t,function(t){t.get("animating")&&t.stopAnimate()}),e.highlightShapes(t)):(n&&e.clearActivedShapes(),o.each(t,function(t){t.get("animating")&&t.stopAnimate(),t.get("visible")&&!t.get("selected")&&e._setActiveShape(t)})),e.set("activeShapes",t),a.sort(),i.draw()}},clearActivedShapes:function(){var t=this.get("shapeContainer"),e=this.get("activedOptions"),n=e&&e.animate;if(t&&!t.get("destroyed")){var r=this.get("activeShapes");o.each(r,function(t){if(!t.get("selected")){var e=t.get("_originAttrs");n?(t.stopAnimate(),t.animate(e,300)):t.attr(e),t.setZIndex(0),t.set("_originAttrs",null)}});if(this.get("preHighlightShapes")){var i=t.get("children");o.each(i,function(t){if(!t.get("selected")){var e=t.get("_originAttrs");e&&(n?(t.stopAnimate(),t.animate(e,300)):t.attr(e),t.setZIndex(0),t.set("_originAttrs",null))}})}t.get("children").sort(function(t,e){return t._INDEX-e._INDEX}),this.set("activeShapes",null),this.set("preHighlightShapes",null)}},getGroupShapesByPoint:function(t){var e=[];if(this.get("shapeContainer")){var n=this.getXScale().field,r=this.getShapes(),i=this._getOriginByPoint(t);o.each(r,function(t){var r=t.get("origin");if(t.get("visible")&&r){r._origin[n]===i[n]&&e.push(t)}})}return e},getSingleShapeByPoint:function(t){var e=this.get("shapeContainer"),n=e.get("canvas").get("pixelRatio"),r=void 0;if(e&&(r=e.getShape(t.x*n,t.y*n)),r&&r.get("origin"))return r},highlightShapes:function(t,e){o.isArray(t)||(t=[t]);var n=this.get("activeShapes");if(r(n,t)){n&&this.clearActivedShapes();var a=this.getShapes(),s=this.get("activedOptions"),u=s&&s.animate,c=s&&s.style;o.each(a,function(n){var r={};n.stopAnimate(),-1!==o.indexOf(t,n)?(o.mix(r,c,e),n.setZIndex(1)):(o.mix(r,{fillOpacity:.3}),n.setZIndex(0));var a=i(r,n);n.setSilent("_originAttrs",a),u?n.animate(r,300):n.attr(r)}),this.set("preHighlightShapes",t),this.set("activeShapes",t)}}};t.exports=a},function(t,e,n){function r(t,e){if(i.isNil(t)||i.isNil(e))return!1;var n=t.get("origin"),r=e.get("origin");return i.isEqual(n,r)}var i=n(0),o={_isAllowSelect:function(){var t=this.get("allowSelect");if(!i.isNil(t))return t;var e=this.get("type"),n=this.get("coord"),r=n&&n.type;return"interval"===e&&"theta"===r},_onClick:function(t){if(this._isAllowSelect()){this.clearActivedShapes();var e=t.shape,n=this.get("shapeContainer");e&&!e.get("animating")&&n.contain(e)&&this.setShapeSelected(e)}},_bindSelectedAction:function(){var t=this.get("view"),e=this.get("type");t.on(e+":click",i.wrapBehavior(this,"_onClick"))},_offSelectedAction:function(){var t=this.get("view"),e=this.get("type");t.off(e+":click",i.getWrapBehavior(this,"_onClick"))},_setShapeStatus:function(t,e){var n=this.get("view"),r=this.get("selectedOptions")||{},o=!1!==r.animate,a=n.get("canvas");t.set("selected",e);var s=t.get("origin");if(e){var u=s.shape||this.getDefaultValue("shape");i.isArray(u)&&(u=u[0]);var c=this.get("shapeFactory"),l=i.mix({geom:this,point:s},r),f=c.getSelectedCfg(u,l);i.mix(f,l.style),t.get("_originAttrs")||(t.get("animating")&&t.stopAnimate(),t.set("_originAttrs",function(t,e){var n={};return i.each(t,function(t,r){"transform"===r&&(r="matrix");var o=e.__attrs[r];i.isArray(o)&&(o=i.cloneDeep(o)),n[r]=o}),n}(f,t))),o?t.animate(f,300):(t.attr(f),a.draw())}else{var h=t.get("_originAttrs");t.set("_originAttrs",null),o?t.animate(h,300):(t.attr(h),a.draw())}},setShapeSelected:function(t){var e=this._getSelectedShapes(),n=this.get("selectedOptions")||{},o=!1!==n.cancelable;if("multiple"===n.mode)-1===i.indexOf(e,t)?(e.push(t),this._setShapeStatus(t,!0)):o&&(i.Array.remove(e,t),this._setShapeStatus(t,!1));else{var a=e[0];o&&(t=r(a,t)?null:t),r(a,t)||(a&&this._setShapeStatus(a,!1),t&&this._setShapeStatus(t,!0))}},clearSelected:function(){var t=this,e=t.get("shapeContainer");if(e&&!e.get("destroyed")){var n=t._getSelectedShapes();i.each(n,function(e){t._setShapeStatus(e,!1),e.set("_originAttrs",null)})}},setSelected:function(t){var e=this,n=e.getShapes();return i.each(n,function(n){var r=n.get("origin");r&&r._origin===t&&e.setShapeSelected(n)}),this},_getSelectedShapes:function(){var t=this.getShapes(),e=[];return i.each(t,function(t){t.get("selected")&&e.push(t)}),this.set("selectedShapes",e),e}};t.exports=o},function(t,e,n){var r=n(0),i=n(2),o=n(104),a=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/,s={LINEAR:"linear",CAT:"cat",TIME:"time"},u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defs={},r.assign(this,e)}return t.prototype._getDef=function(t){var e=this.defs,n=null;return(i.scales[t]||e[t])&&(n=r.mix({},i.scales[t]),r.each(e[t],function(t,e){r.isNil(t)?delete n[e]:n[e]=t})),n},t.prototype._getDefaultType=function(t,e){var n=s.LINEAR,i=r.Array.firstValue(e,t);return r.isArray(i)&&(i=i[0]),a.test(i)?n=s.TIME:r.isString(i)&&(n=s.CAT),n},t.prototype._getScaleCfg=function(t,e,n){var i={field:e},a=r.Array.values(n,e);if(i.values=a,!o.isCategory(t)&&"time"!==t){var s=r.Array.getRange(a);i.min=s.min,i.max=s.max,i.nice=!0}return"time"===t&&(i.nice=!1),i},t.prototype.createScale=function(t,e){var n=this._getDef(t),i=void 0;if(!e||!e.length)return i=n&&n.type?o[n.type](n):o.identity({value:t,field:t.toString(),values:[t]});var a=r.Array.firstValue(e,t);if(r.isNumber(t)||r.isNil(a)&&!n)i=o.identity({value:t,field:t.toString(),values:[t]});else{var s=void 0;n&&(s=n.type),s=s||this._getDefaultType(t,e);var u=this._getScaleCfg(s,t,e);n&&r.mix(u,n),i=o[s](u)}return i},t}();t.exports=u},function(t,e,n){var r=n(0),i=n(105),o=n(2);t.exports=function(t){var e=t.min,n=t.max,a=t.interval,s=[],u=t.minCount||5,c=t.maxCount||7,l=u===c,f=r.isNil(t.minLimit)?-1/0:t.minLimit,h=r.isNil(t.maxLimit)?1/0:t.maxLimit,p=(u+c)/2,g=p,d=t.snapArray?t.snapArray:l?o.snapCountArray:o.snapArray;if(e===f&&n===h&&l&&(a=(n-e)/(g-1)),r.isNil(e)&&(e=0),r.isNil(n)&&(n=0),n===e&&(0===e?n=1:e>0?e=0:n=0,n-e<5&&!a&&n-e>=1&&(a=1)),r.isNil(a)){var y=(n-e)/(p-1);a=i.snapFactorTo(y,d,"ceil"),c!==u&&((g=parseInt((n-e)/a,10))>c&&(g=c),ge&&(_-=a),n=r.fixedBase(b,a),e=r.fixedBase(_,a)}n=Math.min(n,h),e=Math.max(e,f),s.push(e);for(var w=1;wn?(a=o,o=n):a>n&&(a=n),s1&&(e.minTickInterval=a-o),(i.isNil(e.min)||e._toTimeStamp(e.min)>o)&&(e.min=o),(i.isNil(e.max)||e._toTimeStamp(e.max)g&&(g=e);var m=g/x,b=r(h);if(m>.51){for(var _=Math.ceil(m),w=r(p),S=b;S<=w+_;S+=_)n.push(i(S));g=null}else if(m>.0834){for(var M=Math.ceil(m/.0834),O=o(h),C=function(t,e){var n=r(t),i=r(e),a=o(t);return 12*(i-n)+(o(e)-a)%12}(h,p),P=0;P<=C+M;P+=M)n.push(a(b,P+O));g=null}else if(g>.5*v){var A=new Date(h),j=A.getFullYear(),k=A.getMonth(h),T=A.getDate(),E=Math.ceil(g/v),I=function(t,e){return Math.ceil((e-t)/f)}(h,p);g=E*v;for(var L=0;Ll){var D=new Date(h),F=D.getFullYear(),R=D.getMonth(h),B=D.getDate(),N=D.getHours(),z=u.snapTo(c,Math.ceil(g/l)),Y=function(t,e){return Math.ceil((e-t)/l)}(h,p);g=z*l;for(var V=0;V<=Y+z;V+=z)n.push(new Date(F,R,B,N+V).getTime())}else if(g>6e4){var X=function(t,e){return Math.ceil((e-t)/6e4)}(h,p),W=Math.ceil(g/6e4);g=6e4*W;for(var H=0;H<=X+W;H+=W)n.push(h+6e4*H)}else{g<1e3&&(g=1e3),h=1e3*Math.floor(h/1e3);var q=Math.ceil((p-h)/1e3),G=Math.ceil(g/1e3);g=1e3*G;for(var U=0;U-1?r/(this.values.length-1):0,e+i*(n-e)},e.prototype.getText=function(t){var e="",n=this.translate(t);e=n>-1?this.values[n]:t;var r=this.formatter;return e=parseInt(e,10),e=r?r(e):o.format(e,this.mask)},e.prototype.getTicks=function(){var t=this,e=this.ticks,n=[];return i.each(e,function(e){var r=void 0;r=i.isObject(e)?e:{text:i.isString(e)?e:t.getText(e),tickValue:e,value:t.scale(e)},n.push(r)}),n},e.prototype._toTimeStamp=function(t){return s.toTimeStamp(t)},e}(r);t.exports=u},function(t,e,n){function r(t,e){return 1===t?1:Math.log(e)/Math.log(t)}var i=n(37),o=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return o.mix({},e,{type:"log",base:2,tickCount:10,_minTick:null})},e.prototype.calculateTicks=function(){var t=this.base,e=void 0;if(this.min<0)throw new Error("The minimum value must be greater than zero!");var n=r(t,this.max);if(this.min>0)e=Math.floor(r(t,this.min));else{var i=this.values,a=this.max;o.each(i,function(t){t>0&&t1&&(a=1),e=Math.floor(r(t,a)),this._minTick=e,this.positiveMin=a}for(var s=n-e,u=this.tickCount,c=Math.ceil(s/u),l=[],f=e;f=0?Math.floor(r(t,this.min)):0)>n){var i=n;n=e,e=i}for(var o=n-e,a=this.tickCount,s=Math.ceil(o/a),u=[],c=e;cl/a?(h=l/a,p={x:i.x-(.5-u)*l,y:i.y-(.5-c)*h*s}):(h=f/s,p={x:i.x-(.5-u)*h*a,y:i.y-(.5-c)*f}),t?t>0&&t<=1?t*=h:(t<=0||t>h)&&(t=h):t=h;var g={start:n,end:r},d={start:e*t,end:t};this.x=g,this.y=d,this.radius=t,this.circleCentre=p,this.center=p},e.prototype.getCenter=function(){return this.circleCentre},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(e-t>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],r=[0,Math.sin(t),Math.sin(e)],i=5*-Math.PI/2;i<3*Math.PI/2;i+=Math.PI/2)t<=i&&i<=e&&(n.push(Math.cos(i)),r.push(Math.sin(i)));return{minX:Math.min.apply(Math,n),maxX:Math.max.apply(Math,n),minY:Math.min.apply(Math,r),maxY:Math.max.apply(Math,r)}},e.prototype.getRadius=function(){return this.radius},e.prototype.convertPoint=function(t){var e=this.getCenter(),n=this.isTransposed?t.y:t.x,r=this.isTransposed?t.x:t.y;return n=this.convertDim(n,"x"),r=this.convertDim(r,"y"),{x:e.x+Math.cos(n)*r,y:e.y+Math.sin(n)*r}},e.prototype.invertPoint=function(t){var e=this.getCenter(),n=[t.x-e.x,t.y-e.y],i=this.x,o=[1,0,0,0,1,0,0,0,1];a.rotate(o,o,i.start);var c=[1,0,0];u.transformMat3(c,c,o),c=[c[0],c[1]];var l=s.angleTo(c,n,i.end0?h:-h;var p=this.invertDim(f,"y"),g={};return g.x=this.isTransposed?p:h,g.y=this.isTransposed?h:p,g},e}(i);t.exports=c},function(t,e,n){var r=n(0),i=n(38),o=n(1).MatrixUtil.vec2,a=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r._init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{startAngle:1.25*Math.PI,endAngle:7.25*Math.PI,innerRadius:0,type:"helix",isHelix:!0})},e.prototype._init=function(){var t=this.width,e=this.height,n=this.radius,r=this.innerRadius,i=this.startAngle,o=this.endAngle,a=(o-i)/(2*Math.PI)+1,s=Math.min(t,e)/2;n&&n>=0&&n<=1&&(s*=n);var u=Math.floor(s*(1-r)/a),c=u/(2*Math.PI),l={start:i,end:o},f={start:r*s,end:r*s+.99*u};this.a=c,this.d=u,this.x=l,this.y=f},e.prototype.getCenter=function(){return this.center},e.prototype.convertPoint=function(t){var e=this.a,n=this.center,r=void 0,i=void 0;this.isTransposed?(r=t.y,i=t.x):(r=t.x,i=t.y);var o=this.convertDim(r,"x"),a=e*o,s=this.convertDim(i,"y");return{x:n.x+Math.cos(o)*(a+s),y:n.y+Math.sin(o)*(a+s)}},e.prototype.invertPoint=function(t){var e=this.center,n=this.a,i=this.d+this.y.start,a=o.subtract([],[t.x,t.y],[e.x,e.y]),s=o.angleTo(a,[1,0],!0),u=s*n;o.length(a)c.x||!a&&s.y>c.y?1:-1,{isVertical:a,factor:i,start:s,end:u}},t.prototype._getCircleCfg=function(t){var e={},n=t.x,r=t.y,i=r.start>r.end,a=void 0;a=t.isTransposed?{x:i?0:1,y:0}:{x:0,y:i?0:1},a=t.convert(a);var s=t.circleCentre,u=[a.x-s.x,a.y-s.y],c=[1,0],l=void 0,f=(l=a.y>s.y?o.angle(u,c):-1*o.angle(u,c))+(n.end-n.start);return e.startAngle=l,e.endAngle=f,e.center=s,e.radius=Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2)),e.inner=t.innerRadius||0,e},t.prototype._getRadiusCfg=function(t){var e=t.x.start<0?-1:1,n=void 0,r=void 0;return t.isTransposed?(n={x:0,y:0},r={x:1,y:0}):(n={x:0,y:0},r={x:0,y:1}),{factor:e,start:t.convert(n),end:t.convert(r)}},t.prototype._getAxisPosition=function(t,e,n,r){var i="",o=this.options;if(o[r]&&o[r].position)i=o[r].position;else{var a=t.type;t.isRect?"x"===e?i="bottom":"y"===e&&(i=n?"right":"left"):i="helix"===a?"helix":"x"===e?t.isTransposed?"radius":"circle":t.isTransposed?"circle":"radius"}return i},t.prototype._getAxisDefaultCfg=function(t,e,n,i){var o={},s=this.options,u=e.field;return(o=r.deepMix({},a.axis[i],o,s[u])).title&&r.deepMix(o,{title:{text:e.alias||u}}),o.ticks=e.getTicks(),t.isPolar&&!e.isCategory&&"x"===n&&Math.abs(t.endAngle-t.startAngle)===2*Math.PI&&o.ticks.pop(),o.coord=t,o.label&&r.isNil(o.label.autoRotate)&&(o.label.autoRotate=!0),s.hasOwnProperty("xField")&&s.xField.hasOwnProperty("grid")&&"left"===o.position&&r.deepMix(o,s.xField),o},t.prototype._getAxisCfg=function(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments[5],s=this,u=s._getAxisPosition(t,i,o,e.field),c=s._getAxisDefaultCfg(t,e,i,u);if(!r.isEmpty(c.grid)&&n){var l=[],f=[],h=function(t){var e=[];if(t.length>0){var n=(e=t.slice(0))[0],r=e[e.length-1];0!==n.value&&e.unshift({value:0}),1!==r.value&&e.push({value:1})}return e}(n.getTicks());if(h.length){var p=function(t,e,n){var r=[];return t.length<1?r:(t.length>=2&&e&&n&&r.push({text:"",tickValue:"",value:0}),0!==t[0].value&&r.push({text:"",tickValue:"",value:0}),1!==(r=r.concat(t))[r.length-1].value&&r.push({text:"",tickValue:"",value:1}),r)}(c.ticks,e.isLinear,"center"===c.grid.align);r.each(p,function(n,u){f.push(n.tickValue);var g=[],d=n.value;if("center"===c.grid.align&&(d=s._getMiddleValue(d,p,u,e.isLinear)),!r.isNil(d)){var y=t.x,v=t.y;r.each(h,function(e){var n="x"===i?d:e.value,r="x"===i?e.value:d,o=t.convert({x:n,y:r});if(t.isPolar){var a=t.circleCentre;v.start>v.end&&(r=1-r),o.flag=y.start>y.end?0:1,o.radius=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2))}g.push(o)}),l.push({_id:a+"-"+i+o+"-grid-"+n.tickValue,points:g})}})}c.grid.items=l,c.grid.tickValues=f}return c},t.prototype._getHelixCfg=function(t){for(var e={},n=t.a,r=t.startAngle,i=t.endAngle,o=[],a=0;a<=100;a++){var s=t.convert({x:a/100,y:0});o.push(s.x),o.push(s.y)}var u=t.convert({x:0,y:0});return e.a=n,e.startAngle=r,e.endAngle=i,e.crp=o,e.axisStart=u,e.center=t.center,e.inner=t.y.start,e},t.prototype._drawAxis=function(t,e,n,o,a,s,u){var c=this.container,l=void 0,f=void 0;"cartesian"===t.type?(l=i.Line,f=this._getLineCfg(t,e,o,u)):"helix"===t.type&&"x"===o?(l=i.Helix,f=this._getHelixCfg(t)):"x"===o?(l=i.Circle,f=this._getCircleCfg(t)):(l=i.Line,f=this._getRadiusCfg(t));var h=this._getAxisCfg(t,e,n,o,u,a);h=r.mix({},h,f),"y"===o&&s&&"circle"===s.get("type")&&(h.circle=s),h._id=a+"-"+o,r.isNil(u)||(h._id=a+"-"+o+u);var p=c.addGroup(l,h);return this.axes.push(p),p},t.prototype.createAxis=function(t,e,n){var i=this,o=this.coord,a=o.type;if("theta"!==a&&("polar"!==a||!o.isTransposed)){var s=void 0;t&&!i._isHide(t.field)&&(s=i._drawAxis(o,t,e[0],"x",n)),r.isEmpty(e)||"helix"===a||r.each(e,function(e,r){i._isHide(e.field)||i._drawAxis(o,e,t,"y",n,s,r)})}},t.prototype.changeVisible=function(t){var e=this.axes;r.each(e,function(e){e.set("visible",t)})},t.prototype.clear=function(){var t=this.axes;r.each(t,function(t){t.remove()}),this.axes=[]},t}();t.exports=s},function(t,e,n){t.exports={Line:n(305),Circle:n(307),Helix:n(308),PolyLine:n(309)}},function(t,e,n){var r=n(39),i=n(0),o=n(1).MatrixUtil.vec2,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{x:null,y:null,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},isVertical:!1,start:null,end:null})},e.prototype._getAvgLabelLength=function(t){var e=t.get("children");return e[1].attr("x")-e[0].attr("x")},e.prototype.getSideVector=function(t){var e=this.get("factor"),n=this.get("isVertical"),r=this.get("start"),i=this.get("end"),a=this.getAxisVector(),s=o.normalize([],a),u=!1;(n&&r.yi.x)&&(u=!0);var c=o.vertical([],s,u);return o.scale([],c,t*e)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getTickEnd=function(t,e){var n=this.getSideVector(e);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),r=n.x-e.x,i=n.y-e.y;return{x:e.x+r*t,y:e.y+i*t}},e.prototype.renderTitle=function(){var t=this.get("title"),e=this.getTickPoint(.5),n=t.offset;if(i.isNil(n)){n=20;var r=this.get("labelsGroup");if(r){n+=this.getMaxLabelWidth(r)+(this.get("label").offset||this.get("_labelOffset"))}}var a=t.textStyle,s=i.mix({},a);if(t.text){var u=this.getAxisVector();if(t.autoRotate&&i.isNil(a.rotate)){var c=0;if(!i.snapEqual(u[1],0)){var l=[u[0],u[1]];c=o.angleTo(l,[1,0],!0)}s.rotate=c*(180/Math.PI)}else i.isNil(a.rotate)||(s.rotate=a.rotate/180*Math.PI);var f=this.getSideVector(n),h=void 0,p=t.position;h="start"===p?{x:this.get("start").x+f[0],y:this.get("start").y+f[1]}:"end"===p?{x:this.get("end").x+f[0],y:this.get("end").y+f[1]}:{x:e.x+f[0],y:e.y+f[1]},s.x=h.x,s.y=h.y,s.text=t.text;var g=this.addShape("Text",{zIndex:2,attrs:s});g.name="axis-title",this.get("appendInfo")&&g.setSilent("appendInfo",this.get("appendInfo"))}},e.prototype.autoRotateLabels=function(){var t=this.get("labelsGroup"),e=this.get("title");if(t){var n=this.get("label").offset,r=e?e.offset:48;if(r<0)return;var o=this.getAxisVector(),a=void 0,s=void 0;if(i.snapEqual(o[0],0)&&e&&e.text)(s=this.getMaxLabelWidth(t))>r-n-12&&(a=-1*Math.acos((r-n-12)/s));else if(i.snapEqual(o[1],0)&&t.getCount()>1){var u=Math.abs(this._getAvgLabelLength(t));(s=this.getMaxLabelWidth(t))>u&&(a=Math.asin(1.25*(r-n-12)/s))}if(a){var c=this.get("factor");i.each(t.get("children"),function(t){t.rotateAtStart(a),i.snapEqual(o[1],0)&&(c>0?t.attr("textAlign","left"):t.attr("textAlign","right"))})}}},e}(r);t.exports=a},function(t,e,n){var r=n(1).Group,i=n(0),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{zIndex:1,type:"line",lineStyle:null,items:null,alternateColor:null,matrix:null,hideFirstLine:!1,hideLastLine:!1,hightLightZero:!0,zeroLineStyle:{stroke:"#000",lineDash:[0,0]}}},e.prototype._renderUI=function(){t.prototype._renderUI.call(this),this._drawLines()},e.prototype._drawLines=function(){var t=this.get("lineStyle"),e=this.get("items");e&&e.length&&(this._precessItems(e),this._drawGridLines(e,t))},e.prototype._precessItems=function(t){var e=this,n=void 0;i.each(t,function(t,r){n&&e.get("alternateColor")&&e._drawAlternativeBg(t,n,r),n=t})},e.prototype._drawGridLines=function(t,e){var n=this,r=this.get("type"),o=void 0,a=void 0,s=void 0,u=void 0,c=t.length;"line"===r||"polygon"===r?i.each(t,function(t,l){n.get("hideFirstLine")&&0===l||n.get("hideLastLine")&&l===c-1||(u=t.points,a=[],"line"===r?(a.push(["M",u[0].x,u[0].y]),a.push(["L",u[u.length-1].x,u[u.length-1].y])):i.each(u,function(t,e){0===e?a.push(["M",t.x,t.y]):a.push(["L",t.x,t.y])}),s=n._drawZeroLine(r,l)?i.mix({},n.get("zeroLineStyle"),{path:a}):i.mix({},e,{path:a}),(o=n.addShape("path",{attrs:s})).name="axis-grid",o._id=t._id,o.set("coord",n.get("coord")),n.get("appendInfo")&&o.setSilent("appendInfo",n.get("appendInfo")))}):i.each(t,function(t,r){n.get("hideFirstLine")&&0===r||n.get("hideLastLine")&&r===c-1||(u=t.points,a=[],i.each(u,function(t,e){var n=t.radius;0===e?a.push(["M",t.x,t.y]):a.push(["A",n,n,0,0,t.flag,t.x,t.y])}),s=i.mix({},e,{path:a}),(o=n.addShape("path",{attrs:s})).name="axis-grid",o._id=t._id,o.set("coord",n.get("coord")),n.get("appendInfo")&&o.setSilent("appendInfo",n.get("appendInfo")))})},e.prototype._drawZeroLine=function(t,e){var n=this.get("tickValues");return!("line"!==t||!n||0!==n[e]||!this.get("hightLightZero"))},e.prototype._drawAlternativeBg=function(t,e,n){var r=this.get("alternateColor"),o=void 0,a=void 0,s=void 0;i.isString(r)?a=r:i.isArray(r)&&(a=r[0],s=r[1]),n%2==0?s&&(o=this._getBackItem(e.points,t.points,s)):a&&(o=this._getBackItem(e.points,t.points,a));var u=this.addShape("Path",{attrs:o});u.name="axis-grid-rect",u._id=t._id&&t._id.replace("grid","grid-rect"),u.set("coord",this.get("coord")),this.get("appendInfo")&&u.setSilent("appendInfo",this.get("appendInfo"))},e.prototype._getBackItem=function(t,e,n){var r=[],o=this.get("type");if("line"===o)r.push(["M",t[0].x,t[0].y]),r.push(["L",t[t.length-1].x,t[t.length-1].y]),r.push(["L",e[e.length-1].x,e[e.length-1].y]),r.push(["L",e[0].x,e[0].y]),r.push(["Z"]);else if("polygon"===o){i.each(t,function(t,e){0===e?r.push(["M",t.x,t.y]):r.push(["L",t.x,t.y])});for(var a=e.length-1;a>=0;a--)r.push(["L",e[a].x,e[a].y]);r.push(["Z"])}else{var s=t[0].flag;i.each(t,function(t,e){var n=t.radius;0===e?r.push(["M",t.x,t.y]):r.push(["A",n,n,0,0,t.flag,t.x,t.y])});for(var u=e.length-1;u>=0;u--){var c=e[u],l=c.radius;u===e.length-1?r.push(["M",c.x,c.y]):r.push(["A",l,l,0,0,1===s?0:1,c.x,c.y])}}return{fill:n,path:r}},e}(r);t.exports=o},function(t,e,n){var r=n(0),i=n(39),o=n(1).MatrixUtil.vec2,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"circle",tickInterval:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},_labelOffset:5})},e.prototype.parseTick=function(t,e,n){return{text:t,value:e/n}},e.prototype._getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this._getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y];if(!r.isNil(t)){var a=o.length(i);o.scale(i,i,t/a)}return i},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTickEnd=function(t,e){var n=this.get("tickLine");return e=e||n.length,this.getSidePoint(t,e)},e.prototype.getTextAnchor=function(t){var e=void 0;return r.snapEqual(t[0],0)?e="center":t[0]>0?e="left":t[0]<0&&(e="right"),e},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,o=this.get("startAngle"),a=this.get("endAngle"),s=this.get("inner"),u=[];if(Math.abs(a-o)===2*Math.PI)u=[["M",e,n],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]];else{var c=this._getCirclePoint(o),l=this._getCirclePoint(a),f=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;if(s){var p=this.getSideVector(s*r,c),g=this.getSideVector(s*r,l),d={x:p[0]+e,y:p[1]+n},y={x:g[0]+e,y:g[1]+n};u=[["M",d.x,d.y],["L",c.x,c.y],["A",r,i,0,f,h,l.x,l.y],["L",y.x,y.y],["A",r*s,i*s,0,f,Math.abs(h-1),d.x,d.y]]}else u=[["M",e,n],["L",c.x,c.y],["A",r,i,0,f,h,l.x,l.y],["L",e,n]]}return u},e.prototype.addLabel=function(e,n,r){var i=this.get("label").offset||this.get("_labelOffset")||.001;n=this.getSidePoint(n,i),t.prototype.addLabel.call(this,e,n,r)},e.prototype.autoRotateLabels=function(){var t=this.get("ticks"),e=this.get("labelsGroup");if(e&&t.length>12){var n=this.get("radius"),i=this.get("startAngle"),o=this.get("endAngle")-i,a=o/(t.length-1),s=Math.sin(a/2)*n*2,u=this.getMaxLabelWidth(e);r.each(e.get("children"),function(e,n){var r=t[n].value*o+i,a=r%(2*Math.PI);uMath.PI&&(r-=Math.PI),r-=Math.PI/2,e.attr("textAlign","center")):a>Math.PI/2?r-=Math.PI:a0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"line"},t)),this},t.prototype.arc=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"arc"},t)),this},t.prototype.text=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"text"},t)),this},t.prototype.image=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"image"},t)),this},t.prototype.region=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"region"},t)),this},t.prototype.regionFilter=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"regionFilter"},t)),this},t.prototype.html=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"html"},t)),this},t.prototype.render=function(t){var e=this,n=e._creatGuides(),i=e.backContainer;r.each(n,function(n){n.top&&(i=e.frontContainer),n.render(t,i)})},t.prototype.clear=function(){this.options=[],this.reset()},t.prototype.changeVisible=function(t){var e=this.guides;r.each(e,function(e){e.setVisible(t)})},t.prototype.reset=function(){var t=this.guides;r.each(t,function(t){t.remove()}),this.guides=[]},t}();t.exports=a},function(t,e,n){t.exports={Line:n(312),Text:n(313),Image:n(314),Region:n(315),RegionFilter:n(316),Html:n(317),Arc:n(318)}},function(t,e,n){var r=n(0),i=n(9),o=n(1).MatrixUtil.vec2,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"line",start:null,end:null,lineStyle:{stroke:"#000",lineWidth:1},text:{position:"end",autoRotate:!0,style:{fill:"#999",fontSize:12,fontWeight:500,fontFamily:"sans-serif"},content:null}})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.start),r=this.parsePoint(t,this.end),i=e.addGroup();this._drawLines(n,r,i),this.text&&this.text.content&&this._drawText(n,r,i),this.el=i},e.prototype._drawLines=function(t,e,n){var i=[["M",t.x,t.y],["L",e.x,e.y]],o=n.addShape("Path",{attrs:r.mix({path:i},this.lineStyle)});o.name="guide-line",this.appendInfo&&o.setSilent("appendInfo",this.appendInfo)},e.prototype._drawText=function(t,e,n){var i=this.text,a=i.position,s=i.style,u=void 0;((u="start"===a?0:"center"===a?.5:r.isString(a)&&-1!==a.indexOf("%")?parseInt(a,10)/100:r.isNumber(a)?a:1)>1||u<0)&&(u=1);var c={x:t.x+(e.x-t.x)*u,y:t.y+(e.y-t.y)*u};if(i.offsetX&&(c.x+=i.offsetX),i.offsetY&&(c.y+=i.offsetY),c.text=i.content,c=r.mix({},c,s),i.autoRotate&&r.isNil(s.rotate)){var l=o.angleTo([e.x-t.x,e.y-t.y],[1,0],1);c.rotate=l}else r.isNil(s.rotate)||(c.rotate=s.rotate*Math.PI/180);var f=n.addShape("Text",{attrs:c});f.name="guide-line-text",this.appendInfo&&f.setSilent("appendInfo",this.appendInfo)},e}(i);t.exports=a},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"text",position:null,content:null,style:{fill:"#999",fontSize:12,fontWeight:500,textAlign:"center"},offsetX:null,offsetY:null})},e.prototype.render=function(t,e){var n=this.position,i=this.parsePoint(t,n),o=r.mix({},this.style);this.offsetX&&(i.x+=this.offsetX),this.offsetY&&(i.y+=this.offsetY),o.rotate&&(o.rotate=o.rotate*Math.PI/180);var a=e.addShape("Text",{zIndex:this.zIndex,attrs:r.mix({text:this.content},o,i)});a.name="guide-text",this.appendInfo&&a.setSilent("appendInfo",this.appendInfo),this.el=a},e}(n(9));t.exports=i},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"image",zIndex:1,start:null,end:null,src:null,offsetX:null,offsetY:null})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.start),r={x:n.x,y:n.y};if(r.img=this.src,this.end){var i=this.parsePoint(t,this.end);r.width=Math.abs(i.x-n.x),r.height=Math.abs(n.y-i.y)}else this.width&&(r.width=this.width),this.height&&(r.height=this.height);this.offsetX&&(r.x+=this.offsetX),this.offsetY&&(r.y+=this.offsetY);var o=e.addShape("Image",{zIndex:1,attrs:r});o.name="guide-image",this.appendInfo&&o.setSilent("appendInfo",this.appendInfo),this.el=o},e}(n(9));t.exports=i},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"region",zIndex:1,start:null,end:null,style:{lineWidth:0,fill:"#CCD7EB",opacity:.4}})},e.prototype.render=function(t,e){var n=this.style,i=this._getPath(t),o=e.addShape("path",{zIndex:this.zIndex,attrs:r.mix({path:i},n)});o.name="guide-region",this.appendInfo&&o.setSilent("appendInfo",this.appendInfo),this.el=o},e.prototype._getPath=function(t){var e=this.parsePoint(t,this.start),n=this.parsePoint(t,this.end),r=[];return r.push(["M",e.x,e.y]),r.push(["L",n.x,e.y]),r.push(["L",n.x,n.y]),r.push(["L",e.x,n.y]),r.push(["z"]),r},e}(n(9));t.exports=i},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"regionFilter",zIndex:1,top:!0,start:null,end:null,color:null,style:{opacity:1}})},e.prototype.render=function(t,e){var n=this,r=n.view,i=e.addGroup();r.once("afterpaint",function(){n._drawShapes(r,i);var o=n._drawClip(t,e);i.attr({clip:o})}),n.appendInfo&&i.setSilent("appendInfo",n.appendInfo),n.el=i},e.prototype._drawShapes=function(t,e){var n=this,i=[];return t.getAllGeoms().map(function(t){return t.getShapes().map(function(t){var o=t.type,a=r.cloneDeep(t.get("attrs"));n._adjustDisplay(a);var s=e.addShape(o,{attrs:a});return i.push(s),t}),t}),i},e.prototype._drawClip=function(t,e){var n=this.parsePoint(t,this.start),r=this.parsePoint(t,this.end);return e.addShape("rect",{attrs:{x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y,opacity:1}})},e.prototype._adjustDisplay=function(t){var e=this.color;t.fill&&(t.fill=e),t.stroke=e},e}(n(9));t.exports=i},function(t,e,n){var r=n(0),i=n(1).DomUtil,o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"html",zIndex:7,position:null,alignX:"middle",alignY:"middle",offsetX:null,offsetY:null,html:null})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.position),o=e.get("canvas").get("el").parentNode,a=i.createDom('
');o.appendChild(a);var s=this.html;r.isFunction(s)&&(s=s(this.xScales,this.yScales));var u=i.createDom(s);a.appendChild(u),this._setDomPosition(a,u,n),this.el=a},e.prototype._setDomPosition=function(t,e,n){var o=this.alignX,a=this.alignY,s=i.getOuterWidth(e),u=i.getOuterHeight(e),c={x:n.x,y:n.y};"middle"===o&&"top"===a?c.x-=r.round(s/2):"middle"===o&&"bottom"===a?(c.x-=r.round(s/2),c.y-=r.round(u)):"left"===o&&"bottom"===a?c.y-=r.round(u):"left"===o&&"middle"===a?c.y-=r.round(u/2):"left"===o&&"top"===a?(c.x=n.x,c.y=n.y):"right"===o&&"bottom"===a?(c.x-=r.round(s),c.y-=r.round(u)):"right"===o&&"middle"===a?(c.x-=r.round(s),c.y-=r.round(u/2)):"right"===o&&"top"===a?c.x-=r.round(s):(c.x-=r.round(s/2),c.y-=r.round(u/2)),this.offsetX&&(c.x+=this.offsetX),this.offsetY&&(c.y+=this.offsetY),i.modifyCSS(t,{position:"absolute",top:Math.round(c.y)+"px",left:Math.round(c.x)+"px",visibility:"visible",zIndex:this.zIndex})},e.prototype.remove=function(){var t=this.el;t&&t.parentNode.removeChild(t)},e}(n(9));t.exports=o},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"arc",start:null,end:null,style:{stroke:"#999",lineWidth:1}})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.start),i=this.parsePoint(t,this.end),o=t.getCenter(),a=Math.sqrt((n.x-o.x)*(n.x-o.x)+(n.y-o.y)*(n.y-o.y)),s=Math.atan2(n.y-o.y,n.x-o.x),u=Math.atan2(i.y-o.y,i.x-o.x),c=e.addShape("arc",{zIndex:this.zIndex,attrs:r.mix({x:o.x,y:o.y,r:a,startAngle:s,endAngle:u},this.style)});c.name="guide-arc",this.appendInfo&&c.setSilent("appendInfo",this.appendInfo),this.el=c},e}(n(9));t.exports=i},function(t,e,n){var r=n(0),i=n(2),o=n(320),a=n(10),s=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={},r.mix(this,e),this.clear();var n=this.chart;this.container=n.get("frontPlot"),this.plotRange=n.get("plotRange")}return t.prototype.clear=function(){var t=this.legends;this.backRange=null,r.each(t,function(t){r.each(t,function(t){t.remove()})}),this.legends={}},t.prototype.getBackRange=function(){var t=this.backRange;if(!t){if((t=this.chart.get("backPlot").getBBox()).minX===1/0){var e=this.plotRange;t={minX:e.tl.x,minY:e.tl.y,maxX:e.br.x,maxY:e.br.y}}this.backRange=t}return t},t.prototype._isFieldInView=function(t,e,n){var i=!1,o=n.get("scales")[t];return o&&o.values&&(i=r.inArray(o.values,e)),i},t.prototype._bindClickEvent=function(t,e,n){var i=this,o=i.chart,a=o.get("views"),s=e.field,u=i.options;t.on("itemclick",function(e){if(u.onClick)u.onClick(e);else{var c=e.item,l=e.checked,f="single"===t.get("selectedMode"),h=c.dataValue;l?(n.push(h),i._isFieldInView(s,h,o)&&o.filter(s,function(t){return f?t===h:r.inArray(n,t)}),r.each(a,function(t){i._isFieldInView(s,h,t)&&t.filter(s,function(t){return f?t===h:r.inArray(n,t)})})):f||(r.Array.remove(n,h),i._isFieldInView(s,h,o)&&o.filter(s,function(t){return r.inArray(n,t)}),r.each(a,function(t){i._isFieldInView(s,h,t)&&t.filter(s,function(t){return r.inArray(n,t)})})),o.set("keepLegend",!0),o.set("keepPadding",!0),o.repaint(),o.set("keepPadding",!1),o.set("keepLegend",!1)}})},t.prototype._filterLabels=function(t,e,n){if(t.get("gLabel"))t.get("gLabel").set("visible",n);else{var i=e.get("labelCfg");if(i&&i.fields&&i.fields.length>0){var o=e.getXScale(),a=e.getYScale(),s=o.field,u=a.field,c=t.get("origin")._origin,l=e.get("labelContainer").get("labelsGroup").get("children");r.each(l,function(e){var r=e.get("origin")||[];r[s]===c[s]&&r[u]===c[u]&&(e.set("visible",n),t.set("gLabel",e))})}}},t.prototype._bindFilterEvent=function(t,e){var n=this,r=this.chart,i=e.field;t.on("itemfilter",function(t){var e=t.range;r.filterShape(function(t,r,o){if(t[i]){var a=t[i]>=e[0]&&t[i]<=e[1];return n._filterLabels(r,o,a),a}return!0});for(var o=r.getAllGeoms()||[],a=function(t){var n=o[t];"heatmap"===n.get("type")&&s(function(){n.drawWithRange(e)})},u=0;u1){var m=Array(p.callback.length-1).fill("");f.color=p.mapping.apply(p,[l].concat(m)).join("")||i.defaultColor}else f.color=p.mapping(l).join("")||i.defaultColor;if(y&&d)if(d.callback&&d.callback.length>1){var b=Array(d.callback.length-1).fill("");x=d.mapping.apply(d,[l].concat(b)).join("")}else x=d.mapping(l).join("");var _=a.getShapeFactory(v).getMarkerCfg(x,f);r.isFunction(x)&&(_.symbol=x),g.push({value:o,dataValue:l,checked:h,marker:_})});var S=r.deepMix({},i.legend[u],f[l]||f,{viewId:m.get("_id"),maxLength:w,items:g});S.title&&r.deepMix(S,{title:{text:t.alias||t.field}});var M=p.addGroup(o.Category,S);return c._bindClickEvent(M,t,s),h[u].push(M),M},t.prototype._addContinuousLegend=function(t,e,n){var a=this.legends;a[n]=a[n]||[];var s=this.container,u=t.field,c=t.getTicks(),l=[],f=void 0,h=void 0,p=void 0;r.each(c,function(n){var r=n.value,i=t.invert(r),o=e.mapping(i).join("");l.push({value:n.tickValue,attrValue:o,scaleValue:r}),0===r&&(h=!0),1===r&&(p=!0)}),h||l.push({value:t.min,attrValue:e.mapping(0).join(""),scaleValue:0}),p||l.push({value:t.max,attrValue:e.mapping(1).join(""),scaleValue:1});var g=this.options,d=i.legend[n];(g&&!1===g.slidable||g[u]&&!1===g[u].slidable)&&(d=r.mix({},d,i.legend.gradient));var y=r.deepMix({},d,g[u]||g,{items:l,attr:e,numberFormatter:t.formatter});return y.title&&r.deepMix(y,{title:{text:t.alias||t.field}}),"color"===e.type?f=s.addGroup(o.Color,y):"size"===e.type&&(f=s.addGroup(o.Size,y)),this._bindFilterEvent(f,t),a[n].push(f),f},t.prototype.addLegend=function(t,e,n,r){var o=this.options,a=t.field,s=o[a];if(!1===s)return null;if(s&&s.custom)this.addCustomLegend(a);else{var u=o.position||i.defaultLegendPosition;s&&s.position&&(u=s.position);var c=void 0;c=t.isLinear?this._addContinuousLegend(t,e,u):this._addCategroyLegend(t,e,n,r,u),this._bindHoverEvent(c,a)}},t.prototype.addCustomLegend=function(t){var e=this.chart,n=this.container,a=this.options;t&&(a=a[t]);var s=a.position||i.defaultLegendPosition,u=this.legends;u[s]=u[s]||[];var c=a.items;if(c){var l=e.getAllGeoms();r.each(c,function(t){var e=function(t,e){var n=void 0;return r.each(t,function(t){t.get("visible")&&t.getYScale().field===e&&(n=t)}),n}(l,t.value);r.isObject(t.marker)?t.marker.radius=t.marker.radius||4.5:t.marker={symbol:t.marker?t.marker:"circle",fill:t.fill,radius:4.5},t.checked=!!r.isNil(t.checked)||t.checked,t.geom=e});var f=e.get("canvas"),h=this.plotRange,p="right"===s||"left"===s?h.bl.y-h.tr.y:f.get("width"),g=r.deepMix({},i.legend[s],a,{maxLength:p,items:c}),d=n.addGroup(o.Category,g);u[s].push(d),d.on("itemclick",function(t){a.onClick&&a.onClick(t)}),this._bindHoverEvent(d)}},t.prototype.alignLegends=function(){var t=this,e=t.legends;return r.each(e,function(e,n){var i=t._getRegion(e);r.each(e,function(r,o){var a=e[o-1];r.get("useHtml")&&!r.get("autoPosition")||t._alignLegend(r,a,i,n)})}),this},t}();t.exports=u},function(t,e,n){t.exports={Category:n(321),Color:n(322),Size:n(324)}},function(t,e,n){function r(t,e){return t.getElementsByClassName(e)[0]}function i(t,e){var n=t.className;return(n=n.split(" ")).indexOf(e)>-1?t:t.parentNode?t.parentNode.className===g?t.parentNode:i(t.parentNode,e):null}function o(t,e){var n=null,r=e instanceof h?e.get("value"):e;return s.each(t,function(t){if(t.value===r)return n=t,!1}),n}function a(t,e){return t.findBy(function(t){return t.name===e})}var s=n(0),u=n(110),c=n(1),l=c.DomUtil,f=c.Event,h=c.Group,p=n(2),g="g2-legend",d="g2-legend-list",y="g2-legend-list-item",v="g2-legend-marker",x=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return s.mix({},e,{type:"category-legend",items:null,itemGap:5,titleGap:15,itemMarginBottom:8,itemsGroup:null,layout:"horizontal",allowAllCanceled:!1,backPadding:[0,0,0,0],checkable:!0,unCheckColor:"#ccc",background:{fill:"#fff",fillOpacity:0},itemWidth:null,textStyle:{fill:"#333",fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:p.fontFamily},_wordSpaceing:8,useHtml:!1,autoPosition:!0,container:null,containerTpl:'

    ',_defaultItemTpl:'
  • {value}
  • ',itemTpl:null,clickable:!0,selectedMode:"multiple",reversed:!1,autoWrap:!0})},e.prototype._beforeRenderUI=function(){t.prototype._beforeRenderUI.call(this)},e.prototype._renderUI=function(){this.get("useHtml")?this._renderHTML():(t.prototype._renderUI.call(this),this._renderItems(),this.get("autoWrap")&&this._adjustItems(),this._renderBack())},e.prototype._bindUI=function(){this.get("hoverable")&&(this.on("mousemove",s.wrapBehavior(this,"_onMousemove")),this.on("mouseleave",s.wrapBehavior(this,"_onMouseleave"))),this.get("clickable")&&this.on("click",s.wrapBehavior(this,"_onClick"))},e.prototype._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},e.prototype._onMousemove=function(t){var e=this._getLegendItem(t.currentTarget);if(e&&e.get("checked")){var n=this.get("items"),r=new f("itemhover",t,!0,!0);r.item=o(n,e),r.checked=e.get("checked"),this.emit("itemhover",r)}else e||this.emit("itemunhover",t)},e.prototype._onMouseleave=function(t){this.emit("itemunhover",t)},e.prototype._onClick=function(t){var e=this._getLegendItem(t.currentTarget),n=this.get("items");if(e&&!e.get("destroyed")){var r=e.get("checked");if(!this.get("allowAllCanceled")&&r&&1===this.getCheckedCount())return;var i=this.get("selectedMode"),u=o(n,e),c=new f("itemclick",t,!0,!0);c.item=u,c.currentTarget=e,c.checked="single"===i||!r;var l=this.get("unCheckColor"),h=this.get("textStyle").fill,p=void 0,g=void 0,d=void 0;if("single"===i){var y=this.get("itemsGroup").get("children");s.each(y,function(t){p=a(t,"legend-marker"),g=a(t,"legend-text"),d=a(t,"legend-item"),t!==e?(p.attr("fill")&&p.attr("fill",l),p.attr("stroke")&&p.attr("stroke",l),g.attr("fill",l),p.setSilent("checked",!1),g.setSilent("checked",!1),d.setSilent("checked",!1),t.setSilent("checked",!1)):(p.attr("fill")&&p.attr("fill",u.marker.fill),p.attr("stroke")&&p.attr("stroke",u.marker.stroke),g.attr("fill",h),p.setSilent("checked",!0),g.setSilent("checked",!0),d.setSilent("checked",!0),t.setSilent("checked",!0))})}else p=a(e,"legend-marker"),g=a(e,"legend-text"),d=a(e,"legend-item"),p.attr("fill")&&p.attr("fill",r?l:u.marker.fill),p.attr("stroke")&&p.attr("stroke",r?l:u.marker.stroke),g.attr("fill",r?l:h),e.setSilent("checked",!r),p.setSilent("checked",!r),g.setSilent("checked",!r),d.setSilent("checked",!r);this.emit("itemclick",c)}},e.prototype._renderHTML=function(){var t=this,e=this,n=e.get("canvas").get("el").parentNode,a=this.get("title"),u=e.get("containerTpl"),c=l.createDom(u),f=r(c,"g2-legend-title"),h=r(c,d),x=e.get("unCheckColor"),m=e.get("selectedMode"),b=p.legend.html,_=e.get("container");if(/^\#/.test(_)){var w=_.replace("#","");(_=document.getElementById(w)).appendChild(c)}else{var S=e.get("position"),M=e.get("canvas"),O={};O="left"===S||"right"===S?{maxHeight:(e.get("maxLength")||M.get("height"))+"px"}:{maxWidth:(e.get("maxLength")||M.get("width"))+"px"},l.modifyCSS(c,s.mix({},b[g],O,e.get(g))),n.appendChild(c)}l.modifyCSS(h,s.mix({},b[d],e.get(d))),f&&(a&&a.text?(f.innerHTML=a.text,l.modifyCSS(f,s.mix({},b["g2-legend-title"],e.get("g2-legend-title")))):c.removeChild(f));var C=e.get("items"),P=e.get("_defaultItemTpl"),A=e.get("itemTpl");A&&A!==P&&(P=A),e.get("reversed")&&C.reverse();var j=e.get("position"),k=s.mix({},b[y],{display:"right"===j||"left"===j?"block":"inline-block"},e.get(y)),T=s.mix({},b[v],e.get(v));if(s.each(C,function(t,n){var i=t.checked,o=e._formatItemValue(t.value),a=t.marker.fill||t.marker.stroke,u=i?a:x,c=void 0;c=s.isFunction(P)?P(o,u,i,n):P;var f=s.substitute(c,{index:n,checked:i?"checked":"unChecked",value:o,color:u,originColor:a,originValue:t.value}),p=l.createDom(f),g=r(p,v);l.modifyCSS(p,k),g&&l.modifyCSS(g,T),i||(p.style.color=x,g&&(g.style.backgroundColor=x)),h.appendChild(p)}),e.get("clickable")){var E=h.childNodes;c.onclick=function(n){var a=n.target,u=a.className;if(!((u=u.split(" ")).indexOf(g)>-1||u.indexOf(d)>-1)){var c=i(a,y),l=r(c,"g2-legend-text"),f=r(c,v),h=o(C,c.getAttribute("data-value"));if(h){var p=c.className,b=c.getAttribute("data-color");if("single"===m)h.checked=!0,s.each(E,function(t){if(t!==c){r(t,v).style.backgroundColor=x,t.className=s.replace(t.className,"checked","unChecked"),t.style.color=x;o(C,t.getAttribute("data-value")).checked=!1}else l&&(l.style.color=e.get("textStyle").fill),f&&(f.style.backgroundColor=b),c.className=s.replace(p,"unChecked","checked")});else{var _=p.includes("checked"),w=0;if(s.each(E,function(t){t.className.includes("checked")&&w++}),!t.get("allowAllCanceled")&&_&&1===w)return;h.checked=!h.checked,_?(f&&(f.style.backgroundColor=x),c.className=s.replace(p,"checked","unChecked"),c.style.color=x):(f&&(f.style.backgroundColor=b),c.className=s.replace(p,"unChecked","checked"),c.style.color=e.get("textStyle").fill)}e.emit("itemclick",{item:h,currentTarget:c,checked:"single"===m||h.checked})}}}}e.get("hoverable")&&(c.onmousemove=function(t){var n=t.target,r=n.className;if(!((r=r.split(" ")).indexOf(g)>-1||r.indexOf(d)>-1)){var a=i(n,y),s=a.className,u=o(C,a.getAttribute("data-value"));u&&s.includes("checked")?e.emit("itemhover",{item:u,currentTarget:a,checked:u.checked}):u||e.emit("itemunhover",t)}},c.onmouseout=function(t){e.emit("itemunhover",t)}),e.set("legendWrapper",c)},e.prototype._renderItems=function(){var t=this,e=t.get("items");t.get("reversed")&&e.reverse(),s.each(e,function(e,n){t._addItem(e,n)})},e.prototype._renderBack=function(){var t=this.get("backPadding"),e=this.get("background");this.renderBack(t,e)},e.prototype._formatItemValue=function(t){var e=this.get("itemFormatter");return e&&(t=e.call(this,t)),t},e.prototype._getNextX=function(){var t=this.get("layout"),e=this.get("itemGap"),n=this.get("itemsGroup"),r=this.get("itemWidth"),i=n.get("children"),o=0;return"horizontal"===t&&s.each(i,function(t){o+=(r||t.getBBox().width)+e}),o},e.prototype._getNextY=function(){var t=this.get("itemMarginBottom"),e=this.get("titleShape")?this.get("titleGap"):0,n=this.get("layout"),r=this.get("itemsGroup"),i=this.get("titleShape"),o=r.get("children"),a=e;return i&&(a+=i.getBBox().height),"vertical"===n&&s.each(o,function(e){a+=e.getBBox().height+t}),a},e.prototype._addItem=function(t){var e=this.get("itemsGroup"),n=this._getNextX(),r=this._getNextY(),i=this.get("unCheckColor"),o=e.addGroup({x:n,y:r,value:t.value,checked:t.checked});o.set("viewId",e.get("viewId"));var a=this.get("textStyle"),u=this.get("_wordSpaceing"),c=0;if(t.marker){var l=s.mix({},t.marker,{x:t.marker.radius+n,y:r});t.checked||(l.fill&&(l.fill=i),l.stroke&&(l.stroke=i));var f=o.addShape("marker",{type:"marker",attrs:l});f.attr("cursor","pointer"),f.name="legend-marker",c+=f.getBBox().width+u}var h=s.mix({},a,{x:c+n,y:r,text:this._formatItemValue(t.value)});t.checked||s.mix(h,{fill:i});var p=o.addShape("text",{attrs:h});p.attr("cursor","pointer"),p.name="legend-text",this.get("appendInfo")&&p.setSilent("appendInfo",this.get("appendInfo"));var g=o.getBBox(),d=this.get("itemWidth"),y=o.addShape("rect",{attrs:{x:n,y:r-g.height/2,fill:"#fff",fillOpacity:0,width:d||g.width,height:g.height}});return y.attr("cursor","pointer"),y.setSilent("origin",t),y.name="legend-item",this.get("appendInfo")&&y.setSilent("appendInfo",this.get("appendInfo")),o.name="legendGroup",o},e.prototype._adjustHorizontal=function(){var t=this.get("itemsGroup"),e=t.get("children"),n=this.get("maxLength"),r=this.get("itemGap"),i=this.get("itemMarginBottom"),o=this.get("titleShape")?this.get("titleGap"):0,a=0,u=0,c=void 0,l=void 0,f=void 0,h=this.get("itemWidth");t.getBBox().width>n&&s.each(e,function(t){f=t.getBBox(),c=h||f.width,l=f.height+i,n-ur&&s.each(n,function(t){p=t.getBBox(),f=p.width,h=p.height,c?g=c+i:f>g&&(g=f+i),r-l-1}return!1},e.prototype._getRange=function(t,e){var n=t+e;return n=n>100?100:n,n=n<0?0:n},e.prototype._updateStatus=function(t,e){var n="x"===t?this.get("width"):this.get("height");t=r.upperFirst(t);var i=this.get("range"),o=this.get("page"+t),a=this.get("currentTarget"),s=this.get("rangeStash"),u="vertical"===this.get("layout")?-1:1,c=e["page"+t],l=(c-o)/n*100*u,f=void 0;i[1]<=i[0]?(this._isElement(a,"minHandleElement")||this._isElement(a,"maxHandleElement"))&&(i[0]=this._getRange(l,i[0]),i[1]=this._getRange(l,i[0])):(this._isElement(a,"minHandleElement")&&(i[0]=this._getRange(l,i[0])),this._isElement(a,"maxHandleElement")&&(i[1]=this._getRange(l,i[1]))),this._isElement(a,"middleHandleElement")&&(f=s[1]-s[0],i[0]=this._getRange(l,i[0]),i[1]=i[0]+f,i[1]>100&&(i[1]=100,i[0]=i[1]-f)),this.emit("sliderchange",{range:i}),this.set("page"+t,c),this._renderUI(),this.get("canvas").draw()},e.prototype._onMouseDown=function(t){var e=t.currentTarget,n=t.event,r=this.get("range");n.stopPropagation(),n.preventDefault(),this.set("pageX",n.pageX),this.set("pageY",n.pageY),this.set("currentTarget",e),this.set("rangeStash",[r[0],r[1]]),this._bindCanvasEvents()},e.prototype._bindCanvasEvents=function(){var t=this.get("canvas").get("containerDOM");this.onMouseMoveListener=a.addEventListener(t,"mousemove",r.wrapBehavior(this,"_onCanvasMouseMove")),this.onMouseUpListener=a.addEventListener(t,"mouseup",r.wrapBehavior(this,"_onCanvasMouseUp"))},e.prototype._onCanvasMouseMove=function(t){"horizontal"===this.get("layout")?this._updateStatus("x",t):this._updateStatus("y",t)},e.prototype._onCanvasMouseUp=function(){this._removeDocumentEvents()},e.prototype._removeDocumentEvents=function(){this.onMouseMoveListener.remove(),this.onMouseUpListener.remove()},e}(o);t.exports=s},function(t,e,n){var r=n(0),i=n(2),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"size-legend",width:100,height:200,_circleStyle:{stroke:"#4E7CCC",fill:"#fff",fillOpacity:0},textStyle:{fill:"#333",textAlign:"start",textBaseline:"middle",fontFamily:i.fontFamily}})},e.prototype._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("width"),n=this.get("height"),i=this.get("inRange"),o="vertical"===this.get("layout")?[[0,0],[e,0],[e,n]]:[[0,n],[e,0],[e,n]];return this._addBackground(t,"Polygon",r.mix({points:o},i))},e.prototype._addCircle=function(t,e,n,i,o){var a=this.addGroup(),s=this.get("_circleStyle"),u=this.get("textStyle"),c=this.get("titleShape"),l=this.get("titleGap");c&&(l+=c.getBBox().height),a.addShape("circle",{attrs:r.mix({x:t,y:e+l,r:0===n?1:n},s)}),a.addShape("text",{attrs:r.mix({x:o+5,y:e+l,text:0===i?"0":i},u)})},e.prototype._renderBackground=function(){var t=1*this.get("firstItem").attrValue,e=1*this.get("lastItem").attrValue,n=(t+e)/2;this._addCircle(e,e,e,n,2*e),this._addCircle(e,2*e+8+n,n,(t+n)/2,2*e),this._addCircle(e,2*(e+8+n)+t,t,t,2*e)},e}(n(111));t.exports=o},function(t,e,n){function r(t,e){if(!t)return!1;return!!t.className&&-1!==(o.isNil(t.className.baseVal)?t.className:t.className.baseVal).indexOf(e)}function i(t){var e=[];return o.each(t,function(t){var n=function(t,e){var n=-1;return o.each(t,function(t,r){var i=!0;for(var a in e)if(e.hasOwnProperty(a)&&-1===f.indexOf(a)&&!o.isObject(e[a])&&e[a]!==t[a]){i=!1;break}if(i)return n=r,!1}),n}(e,t);-1===n?e.push(t):e[n]=t}),e}var o=n(0),a=n(2),s=n(326),u=n(1).MatrixUtil.vec2,c=["line","area","path","areaStack"],l=["line","area"],f=["marker","showMarker"],h=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o.assign(this,e),this.timeStamp=0}return t.prototype._normalizeEvent=function(t){var e=this.chart,n=this._getCanvas(),r=n.getPointByClient(t.clientX,t.clientY),i=n.get("pixelRatio");r.x=r.x/i,r.y=r.y/i;var o=e.getViewsByPoint(r);return r.views=o,r},t.prototype._getCanvas=function(){return this.chart.get("canvas")},t.prototype._getTriggerEvent=function(){var t=this.options.triggerOn,e=void 0;return t&&"mousemove"!==t?"click"===t?e="plotclick":"none"===t&&(e=null):e="plotmove",e},t.prototype._getDefaultTooltipCfg=function(){var t=this.options,e=o.mix({},a.tooltip),n=this.chart.getAllGeoms().filter(function(t){return t.get("visible")}),r=[];o.each(n,function(t){var e=t.get("type"),n=t.get("adjusts"),i=!1;n&&o.each(n,function(t){if("symmetric"===t.type||"Symmetric"===t.type)return i=!0,!1}),-1!==o.indexOf(r,e)||i||r.push(e)});var i=void 0;return n.length&&n[0].get("coord")&&"cartesian"===n[0].get("coord").type&&1===r.length&&("interval"===r[0]&&!1!==t.shared?i={zIndex:0,crosshairs:a.tooltipCrosshairsRect}:o.indexOf(l,r[0])>-1&&(i={crosshairs:a.tooltipCrosshairsLine})),o.mix(e,i,{isTransposed:!(!n.length||!n[0].get("coord"))&&n[0].get("coord").isTransposed})},t.prototype._bindEvent=function(){var t=this.chart,e=this._getTriggerEvent();e&&(t.on(e,o.wrapBehavior(this,"onMouseMove")),t.on("plotleave",o.wrapBehavior(this,"onMouseOut")))},t.prototype._offEvent=function(){var t=this.chart,e=this._getTriggerEvent();e&&(t.off(e,o.getWrapBehavior(this,"onMouseMove")),t.off("plotleave",o.getWrapBehavior(this,"onMouseOut")))},t.prototype._setTooltip=function(t,e,n,r){var s=this.tooltip,u=this.prePoint;if(!u||u.x!==t.x||u.y!==t.y){e=i(e),this.prePoint=t;var c=this.chart,l=o.isArray(t.x)?t.x[t.x.length-1]:t.x,f=o.isArray(t.y)?t.y[t.y.length-1]:t.y;s.get("visible")||c.emit("tooltip:show",{x:l,y:f,tooltip:s});var h=e[0],p=h.title||h.name;s.isContentChange(p,e)&&(c.emit("tooltip:change",{tooltip:s,x:l,y:f,items:e}),p=e[0].title||e[0].name,s.setContent(p,e),o.isEmpty(n)?s.clearMarkers():!0===this.options.hideMarkers?s.set("markerItems",n):s.setMarkers(n,a.tooltipMarker)),s.setPosition(l,f,r),s.show()}},t.prototype.hideTooltip=function(){var t=this.tooltip,e=this.chart,n=this._getCanvas();this.prePoint=null,t.hide(),e.emit("tooltip:hide",{tooltip:t}),n.draw()},t.prototype.onMouseMove=function(t){if(!o.isEmpty(t.views)){var e=this.timeStamp,n=+new Date,r={x:t.x,y:t.y};if(n-e>16){var i=void 0;t.shape&&o.inArray(["point","interval","polygon","schema"],t.shape.name)&&(i=t.shape),this.showTooltip(r,t.views,i),this.timeStamp=n}}},t.prototype.onMouseOut=function(t){var e=this.tooltip,n=this._getCanvas();e.get("visible")&&(t&&t.target!==n||t&&t.toElement&&(r(t.toElement,"g2-tooltip")||function(t,e){for(var n=t.parentNode,i=!1;n&&n!==document.body;){if(r(n,e)){i=!0;break}n=n.parentNode}return i}(t.toElement,"g2-tooltip"))||this.hideTooltip())},t.prototype.renderTooltip=function(){var t=this;if(!t.tooltip){var e=t.chart,n=t._getCanvas(),r=t._getDefaultTooltipCfg(),i=t.options;(i=o.deepMix({plotRange:e.get("plotRange"),capture:!1,canvas:n,frontPlot:e.get("frontPlot"),backPlot:e.get("backPlot")},r,i)).crosshairs&&"rect"===i.crosshairs.type&&(i.zIndex=0),i.visible=!1,!1===i.shared&&o.isNil(i.position)&&(i.position="top");var a=new s(i);t.tooltip=a;var u=t._getTriggerEvent();if(!a.get("enterable")&&"plotmove"===u){var c=a.get("container");c&&(c.onmousemove=function(n){var r=t._normalizeEvent(n);e.emit(u,r)})}t._bindEvent()}},t.prototype.showTooltip=function(t,e,n){if(!o.isEmpty(e)&&t){this.tooltip||this.renderTooltip();var r=this.options,i=[],a=[];if(o.each(e,function(e){if(!e.get("tooltipEnable"))return!0;var n=e.get("geoms"),s=e.get("coord");o.each(n,function(e){var n=e.get("type");if(e.get("visible")&&!1!==e.get("tooltipCfg")){var u=e.get("dataArray");if(e.isShareTooltip()||!1===r.shared&&o.inArray(["area","line","path"],n))o.each(u,function(u){var l=e.findPoint(t,u);if(l){var f=e.getTipItems(l,r.title);-1!==o.indexOf(c,n)&&o.each(f,function(t){var e=t.point;if(e&&e.x&&e.y){var n=o.isArray(e.x)?e.x[e.x.length-1]:e.x,r=o.isArray(e.y)?e.y[e.y.length-1]:e.y;e=s.applyMatrix(n,r,1),t.x=e[0],t.y=e[1],t.showMarker=!0,i.push(t)}}),a=a.concat(f)}});else{var l=e.get("shapeContainer"),f=l.get("canvas").get("pixelRatio"),h=l.getShape(t.x*f,t.y*f);h&&h.get("visible")&&h.get("origin")&&(a=e.getTipItems(h.get("origin"),r.title))}}}),o.each(a,function(t){var e=t.point,n=o.isArray(e.x)?e.x[e.x.length-1]:e.x,r=o.isArray(e.y)?e.y[e.y.length-1]:e.y;e=s.applyMatrix(n,r,1),t.x=e[0],t.y=e[1]})}),a.length){var s=a[0];if(!a.every(function(t){return t.title===s.title})){var l=s,f=1/0;a.forEach(function(e){var n=u.distance([t.x,t.y],[e.x,e.y]);n1){var h=a[0],p=Math.abs(t.y-h.y);o.each(a,function(e){Math.abs(t.y-e.y)<=p&&(h=e,p=Math.abs(t.y-e.y))}),h&&h.x&&h.y&&(i=[h]),a=[h]}this._setTooltip(t,a,i,n)}else this.hideTooltip()}},t.prototype.clear=function(){var t=this.tooltip;t&&t.destroy(),this.tooltip=null,this.prePoint=null,this._offEvent()},t}();t.exports=h},function(t,e,n){function r(t,e){return t.getElementsByClassName(e)[0]}var i=n(0),o=n(58),a=n(2),s=n(1).DomUtil,u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r._init(),r.get("items")&&r._renderTooltip(),r._renderCrosshairs(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{x:0,y:0,items:null,showTitle:!0,crosshairs:null,plotRange:null,offset:10,timeStamp:0,containerTpl:'
      ',itemTpl:'
    • {name}: {value}
    • ',inPlot:!0,follow:!0,enterable:!1}},e.prototype._initTooltipWrapper=function(){var t=this.get("containerTpl"),e=this.get("canvas").get("el").parentNode,n=void 0;if(/^\#/.test(t)){var r=t.replace("#","");n=document.getElementById(r)}else n=s.createDom(t),s.modifyCSS(n,this.get("g2-tooltip")),e.appendChild(n),e.style.position="relative";this.set("container",n)},e.prototype._init=function(){var t=this.get("crosshairs"),e=this.get("frontPlot"),n=this.get("backPlot"),r=void 0;t&&("rect"===t.type?(this.set("crosshairs",i.deepMix({},a.tooltipCrosshairsRect,t)),r=n.addGroup({zIndex:0})):(this.set("crosshairs",i.deepMix({},a.tooltipCrosshairsLine,t)),r=e.addGroup())),this.set("crosshairsGroup",r),this._initTooltipWrapper()},e.prototype._clearDom=function(){var t=this.get("container"),e=r(t,"g2-tooltip-title"),n=r(t,"g2-tooltip-list");e&&(e.innerHTML=""),n&&(n.innerHTML="")},e.prototype._addItem=function(t,e){var n=this.get("itemTpl"),o=i.substitute(n,i.mix({index:e},t)),a=s.createDom(o);s.modifyCSS(a,this.get("g2-tooltip-list-item"));var u=r(a,"g2-tooltip-marker");return u&&s.modifyCSS(u,this.get("g2-tooltip-marker")),a},e.prototype._renderTooltip=function(){var t=this,e=t.get("showTitle"),n=t.get("titleContent"),o=t.get("container"),a=r(o,"g2-tooltip-title"),u=r(o,"g2-tooltip-list"),c=t.get("items");t._clearDom(),a&&e&&(s.modifyCSS(a,t.get("g2-tooltip-title")),a.innerHTML=n),u&&(s.modifyCSS(u,t.get("g2-tooltip-list")),i.each(c,function(e,n){u.appendChild(t._addItem(e,n))}))},e.prototype._clearCrosshairsGroup=function(){var t=this.get("crosshairsGroup");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.clear()},e.prototype._renderCrosshairs=function(){var t=this.get("crosshairs"),e=this.get("canvas"),n=this.get("plotRange"),r=this.get("isTransposed");if(t)switch(this._clearCrosshairsGroup(),t.type){case"x":this._renderHorizontalLine(e,n);break;case"y":this._renderVerticalLine(e,n);break;case"cross":this._renderHorizontalLine(e,n),this._renderVerticalLine(e,n);break;case"rect":this._renderBackground(e,n);break;default:r?this._renderHorizontalLine(e,n):this._renderVerticalLine(e,n)}},e.prototype._addCrossLineShape=function(t,e){var n=this.get("crosshairsGroup").addShape("line",{attrs:t});return n.hide(),this.set("crossLineShape"+e,n),n},e.prototype._renderVerticalLine=function(t,e){var n=this.get("crosshairs").style,r=i.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},n);this._addCrossLineShape(r,"Y")},e.prototype._renderHorizontalLine=function(t,e){var n=this.get("crosshairs").style,r=i.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},n);this._addCrossLineShape(r,"X")},e.prototype._renderBackground=function(t,e){var n=this.get("crosshairs").style,r=this.get("crosshairsGroup"),o=i.mix({x:e?e.tl.x:0,y:e?e.tl.y:t.get("height"),width:e?e.br.x-e.bl.x:t.get("width"),height:e?Math.abs(e.tl.y-e.bl.y):t.get("height")},n),a=r.addShape("rect",{attrs:o});return a.hide(),this.set("crosshairsRectShape",a),a},e.prototype.isContentChange=function(t,e){var n=this.get("titleContent"),r=this.get("items"),o=!(t===n&&r.length===e.length);return o||i.each(e,function(t,e){var n=r[e];for(var a in t)if(t.hasOwnProperty(a)&&!i.isObject(t[a])&&t[a]!==n[a]){o=!0;break}if(o)return!1}),o},e.prototype.setContent=function(t,e){var n=+new Date;return this.set("items",e),this.set("titleContent",t),this.set("timeStamp",n),this._renderTooltip(),this},e.prototype.setMarkers=function(t,e){var n=this.get("markerGroup"),r=this.get("frontPlot");n?n.clear():(n=r.addGroup({zIndex:1,capture:!1}),this.set("markerGroup",n)),i.each(t,function(t){n.addShape("marker",{color:t.color,attrs:i.mix({},e,{x:t.x,y:t.y})})}),this.set("markerItems",t)},e.prototype.clearMarkers=function(){var t=this.get("markerGroup");t&&t.clear()},e.prototype.setPosition=function(t,e,n){var r=this.get("container"),o=this.get("crossLineShapeX"),a=this.get("crossLineShapeY"),u=this.get("crosshairsRectShape"),c=t,l=e,f=this.get("canvas").get("el"),h=s.getWidth(f),p=s.getHeight(f),g=this.get("offset"),d=void 0;if(this.get("position")?(d=function(t,e,n,r,i){var o=r.clientWidth,a=r.clientHeight,s=0,u=0,c=20;if(i){var l=i.getBBox();s=l.width,u=l.height,t=l.x,e=l.y,c=5}switch(n){case"inside":t=t+s/2-o/2,e=e+u/2-a/2;break;case"top":t=t+s/2-o/2,e=e-a-c;break;case"left":t=t-o-c,e=e+u/2-a/2;break;case"right":t=t+s+c,e=e+u/2-a/2;break;case"bottom":default:t=t+s/2-o/2,e=e+u+c}return[t,e]}(t,e,this.get("position"),r,n),t=d[0],e=d[1]):this.get("position")||(d=function(t,e,n,r,i){var o=n.clientWidth,a=n.clientHeight;return t+o+20>r?t=(t-=o+20)<0?0:t:t+=20,e+a+20>i?(e-=a+20,e=t<0?0:e):e+=20,[t,e]}(t,e,r,h,p),t=d[0],e=d[1]),this.get("inPlot")){d=function(t,e,n,r){var i=n.clientWidth,o=n.clientHeight;return t+i>r.tr.x&&(t-=i+40),tr.bl.y&&(e-=o+40),e1&&m[_]>b[_]&&(S=b[_]),this.get("crosshairs").width)u.attr(_,S-this.get("crosshairs").width/2),u.attr(w,this.get("crosshairs").width);else if(i.isArray(m.point[_])&&!m.size){var M=m.point[_][1]-m.point[_][0];u.attr(_,m.point[_][0]),u.attr(w,M)}else g=3*m.size/4,u.attr(_,S-g),1===x.length?u.attr(w,3*m.size/2):u.attr(w,Math.abs(b[_]-m[_])+2*g)}var O=this.get("follow");r.style.left=O?t+"px":0,r.style.top=O?e+"px":0}},e.prototype.show=function(){var e=this.get("crossLineShapeX"),n=this.get("crossLineShapeY"),r=this.get("crosshairsRectShape"),i=this.get("markerGroup"),o=this.get("container"),a=this.get("canvas");e&&e.show(),n&&n.show(),r&&r.show(),i&&i.show(),t.prototype.show.call(this),o.style.visibility="visible",a.draw()},e.prototype.hide=function(){var e=this.get("container"),n=this.get("crossLineShapeX"),r=this.get("crossLineShapeY"),i=this.get("crosshairsRectShape"),o=this.get("markerGroup"),a=this.get("canvas");e.style.visibility="hidden",n&&n.hide(),r&&r.hide(),i&&i.hide(),o&&o.hide(),t.prototype.hide.call(this),a.draw()},e.prototype.destroy=function(){var e=this.get("crossLineShapeX"),n=this.get("crossLineShapeY"),r=this.get("markerGroup"),i=this.get("crosshairsRectShape"),o=this.get("container"),a=this.get("containerTpl");o&&!/^\#/.test(a)&&o.parentNode.removeChild(o),e&&e.remove(),n&&n.remove(),r&&r.remove(),i&&i.remove(),t.prototype.destroy.call(this)},e}(o);t.exports=u},function(t,e,n){function r(t,e){if(o.isNil(t)||o.isNil(e))return!1;var n=t.get("origin"),r=e.get("origin");return o.isNil(n)&&o.isNil(r)?o.isEqual(t,e):o.isEqual(n,r)}function i(t){t.shape&&t.shape.get("origin")&&(t.data=t.shape.get("origin"))}var o=n(0),a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=null,this.canvas=null,o.assign(this,e),this._init()}return t.prototype._init=function(){this.pixelRatio=this.canvas.get("pixelRatio")},t.prototype._getShapeEventObj=function(t){return{x:t.x/this.pixelRatio,y:t.y/this.pixelRatio,target:t.target,toElement:t.event.toElement||t.event.relatedTarget}},t.prototype._getShape=function(t,e){return this.view.get("canvas").getShape(t,e)},t.prototype._getPointInfo=function(t){var e=this.view,n={x:t.x/this.pixelRatio,y:t.y/this.pixelRatio},r=e.getViewsByPoint(n);return n.views=r,n},t.prototype._getEventObj=function(t,e,n){return{x:e.x,y:e.y,target:t.target,toElement:t.event.toElement||t.event.relatedTarget,views:n}},t.prototype.bindEvents=function(){var t=this.canvas;t.on("mousedown",o.wrapBehavior(this,"onDown")),t.on("mousemove",o.wrapBehavior(this,"onMove")),t.on("mouseleave",o.wrapBehavior(this,"onOut")),t.on("mouseup",o.wrapBehavior(this,"onUp")),t.on("click",o.wrapBehavior(this,"onClick")),t.on("dblclick",o.wrapBehavior(this,"onClick")),t.on("touchstart",o.wrapBehavior(this,"onTouchstart")),t.on("touchmove",o.wrapBehavior(this,"onTouchmove")),t.on("touchend",o.wrapBehavior(this,"onTouchend"))},t.prototype._triggerShapeEvent=function(t,e,n){if(t&&t.name&&!t.get("destroyed")){var r=this.view;if(r.isShapeInView(t)){var i=t.name+":"+e;n.view=r,n.appendInfo=t.get("appendInfo"),r.emit(i,n);var o=r.get("parent");o&&o.emit(i,n)}}},t.prototype.onDown=function(t){var e=this.view,n=this._getShapeEventObj(t);n.shape=this.currentShape,i(n),e.emit("mousedown",n),this._triggerShapeEvent(this.currentShape,"mousedown",n)},t.prototype.onMove=function(t){var e=this.view,n=this.currentShape;n&&n.get("destroyed")&&(n=null,this.currentShape=null);var o=this._getShape(t.x,t.y),a=this._getShapeEventObj(t);if(a.shape=o,i(a),e.emit("mousemove",a),this._triggerShapeEvent(o,"mousemove",a),n&&!r(n,o)){var s=this._getShapeEventObj(t);s.shape=n,s.toShape=o,i(s),this._triggerShapeEvent(n,"mouseleave",s)}if(o&&!r(n,o)){var u=this._getShapeEventObj(t);u.shape=o,u.fromShape=n,i(u),this._triggerShapeEvent(o,"mouseenter",u)}this.currentShape=o;var c=this._getPointInfo(t);0===(this.curViews||[]).length&&c.views.length&&e.emit("plotenter",this._getEventObj(t,c,c.views)),c.views.length&&((a=this._getEventObj(t,c,c.views)).shape=o,i(a),e.emit("plotmove",a)),this.curViews=c.views},t.prototype.onOut=function(t){var e=this.view,n=this._getPointInfo(t),r=this.curViews||[],i=this._getEventObj(t,n,r);0!==n.views.length||i.toElement&&"CANVAS"===i.toElement.tagName||e.emit("plotleave",i)},t.prototype.onUp=function(t){var e=this.view,n=this._getShapeEventObj(t);n.shape=this.currentShape,e.emit("mouseup",n),this._triggerShapeEvent(this.currentShape,"mouseup",n)},t.prototype.onClick=function(t){var e=this.view,n=this._getShape(t.x,t.y),r=this._getShapeEventObj(t);r.shape=n,i(r),e.emit("click",r),this._triggerShapeEvent(n,t.type,r),this.currentShape=n;var a=this._getPointInfo(t),s=a.views;if(!o.isEmpty(s)){var u=this._getEventObj(t,a,s);if(this.currentShape){var c=this.currentShape;u.shape=c,i(u)}e.emit("plotclick",u),"dblclick"===t.type&&(e.emit("plotdblclick",u),e.emit("dblclick",r))}},t.prototype.onTouchstart=function(t){var e=this.view,n=this._getShape(t.x,t.y),r=this._getShapeEventObj(t);r.shape=n,i(r),e.emit("touchstart",r),this._triggerShapeEvent(n,"touchstart",r),this.currentShape=n},t.prototype.onTouchmove=function(t){var e=this.view,n=this._getShape(t.x,t.y),r=this._getShapeEventObj(t);r.shape=n,i(r),e.emit("touchmove",r),this._triggerShapeEvent(n,"touchmove",r),this.currentShape=n},t.prototype.onTouchend=function(t){var e=this.view,n=this._getShapeEventObj(t);n.shape=this.currentShape,i(n),e.emit("touchend",n),this._triggerShapeEvent(this.currentShape,"touchend",n)},t.prototype.clearEvents=function(){var t=this.canvas;t.off("mousemove",o.getWrapBehavior(this,"onMove")),t.off("mouseleave",o.getWrapBehavior(this,"onOut")),t.off("mousedown",o.getWrapBehavior(this,"onDown")),t.off("mouseup",o.getWrapBehavior(this,"onUp")),t.off("click",o.getWrapBehavior(this,"onClick")),t.off("dblclick",o.getWrapBehavior(this,"onClick")),t.off("touchstart",o.getWrapBehavior(this,"onTouchstart")),t.off("touchmove",o.getWrapBehavior(this,"onTouchmove")),t.off("touchend",o.getWrapBehavior(this,"onTouchend"))},t}();t.exports=a},function(t,e,n){function r(t,e){var n=[];if(!1===t.get("animate"))return[];var i=t.get("children");return s.each(i,function(t){if(t.isGroup)n=n.concat(r(t,e));else if(t.isShape&&t._id){var i=t._id;(i=i.split("-")[0])===e&&n.push(t)}}),n}function i(t,e,n,r){return r?u.Action[n][r]:u.getAnimation(t,e,n)}function o(t,e,n){var r=u.getAnimateCfg(t,e);return n&&n[e]?s.deepMix({},r,n[e]):r}function a(t,e,n,r){var a=void 0,u=void 0,l=!1;if(r){var f=[],h=[];s.each(e,function(e){var n=t[e._id];n?(e.setSilent("cacheShape",n),f.push(e),delete t[e._id]):h.push(e)}),s.each(t,function(t){var e=t.name,r=t.coord,f=t._id,h=t.attrs,p=t.index,g=t.type;if(u=o(e,"leave",t.animateCfg),a=i(e,r,"leave",u.animation),s.isFunction(a)){var d=n.addShape(g,{attrs:h,index:p});if(d._id=f,d.name=e,r&&"label"!==e){var y=d.getMatrix(),v=c.multiply([],y,r.matrix);d.setMatrix(v)}l=!0,a(d,u,r)}}),s.each(f,function(t){var e=t.name,n=t.get("coord"),r=t.get("cacheShape").attrs;if(!s.isEqual(r,t.__attrs)){if(u=o(e,"update",t.get("animateCfg")),a=i(e,n,"update",u.animation),s.isFunction(a))a(t,u,n);else{var c=s.cloneDeep(t.__attrs);t.attr(r),t.animate(c,u.duration,u.easing,function(){t.setSilent("cacheShape",null)})}l=!0}}),s.each(h,function(t){var e=t.name,n=t.get("coord");u=o(e,"enter",t.get("animateCfg")),a=i(e,n,"enter",u.animation),s.isFunction(a)&&(a(t,u,n),l=!0)})}else s.each(e,function(t){var e=t.name,n=t.get("coord");u=o(e,"appear",t.get("animateCfg")),a=i(e,n,"appear",u.animation),s.isFunction(a)&&(a(t,u,n),l=!0)});return l}var s=n(0),u=n(64),c=n(1).MatrixUtil.mat3;t.exports={execAnimation:function(t,e){var n=t.get("middlePlot"),i=t.get("backPlot"),o=t.get("_id"),u=t.get("canvas"),c=u.get(o+"caches")||[];0===c.length&&(e=!1);var l=r(n,o),f=r(i,o),h=l.concat(f);u.setSilent(o+"caches",function(t){var e={};return s.each(t,function(t){if(t._id&&!t.isClip){var n=t._id;e[n]={_id:n,type:t.get("type"),attrs:s.cloneDeep(t.__attrs),name:t.name,index:t.get("index"),animateCfg:t.get("animateCfg"),coord:t.get("coord")}}}),e}(h));(e?a(c,h,u,e):a(c,l,u,e))||u.draw()}}},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{type:"plotBack",padding:null,background:null,plotRange:null,plotBackground:null}},e.prototype._beforeRenderUI=function(){this._calculateRange()},e.prototype._renderUI=function(){this._renderBackground(),this._renderPlotBackground()},e.prototype._renderBackground=function(){var t=this.get("background");if(t){var e=this.get("canvas"),n={x:0,y:0,width:this.get("width")||e.get("width"),height:this.get("height")||e.get("height")},i=this.get("backgroundShape");i?i.attr(n):(i=this.addShape("rect",{attrs:r.mix(n,t)}),this.set("backgroundShape",i))}},e.prototype._renderPlotBackground=function(){var t=this.get("plotBackground");if(t){var e=this.get("plotRange"),n=e.br.x-e.bl.x,i=e.br.y-e.tr.y,o=e.tl,a={x:o.x,y:o.y,width:n,height:i},s=this.get("plotBackShape");s?s.attr(a):(t.image?(a.img=t.image,s=this.addShape("image",{attrs:a})):(r.mix(a,t),s=this.addShape("rect",{attrs:a})),this.set("plotBackShape",s))}},e.prototype._convert=function(t,e){if(r.isString(t))if("auto"===t)t=0;else if(-1!==t.indexOf("%")){var n=this.get("canvas"),i=this.get("width")||n.get("width"),o=this.get("height")||n.get("height");t=parseInt(t,10)/100,t=e?t*i:t*o}return t},e.prototype._calculateRange=function(){var t=this.get("plotRange");r.isNil(t)&&(t={});var e=this.get("padding"),n=this.get("canvas"),i=this.get("width")||n.get("width"),o=this.get("height")||n.get("height"),a=r.toAllPadding(e),s=this._convert(a[0],!1),u=this._convert(a[1],!0),c=this._convert(a[2],!1),l=this._convert(a[3],!0),f=Math.min(l,i-u),h=Math.max(l,i-u),p=Math.min(o-c,s),g=Math.max(o-c,s);t.tl={x:f,y:p},t.tr={x:h,y:p},t.bl={x:f,y:g},t.br={x:h,y:g},t.cc={x:(h+f)/2,y:(g+p)/2},this.set("plotRange",t)},e.prototype.repaint=function(){return this._calculateRange(),this._renderBackground(),this._renderPlotBackground(),this},e}(n(1).Group);t.exports=i},function(t,e,n){var r=n(2);setTimeout(function(){if(r.trackable){var t=new Image,e={pg:document.URL,r:(new Date).getTime(),g2:!0,version:r.version,page_type:"syslog"},n=encodeURIComponent(JSON.stringify([e]));t.src="https://kcart.alipay.com/web/bi.do?BIProfile=merge&d="+n}},3e3)},function(t,e,n){"use strict";function r(t,e){return function(n){return t+n*e}}function i(t,e){var n=e-t;return n?r(t,n):Object(o.a)(isNaN(t)?e:t)}e.c=function(t,e){var n=e-t;return n?r(t,n>180||n<-180?n-360*Math.round(n/360):n):Object(o.a)(isNaN(t)?e:t)},e.b=function(t){return 1==(t=+t)?i:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Object(o.a)(isNaN(e)?n:e)}},e.a=i;var o=n(371)},function(t,e,n){var r=n(0),i=n(2);t.exports={splitData:function(t){if(!t.length)return[];var e=[],n=[],o=this.getYScale().field,a=void 0;return r.each(t,function(t){a=t._origin?t._origin[o]:t[o],i.connectNulls?r.isNil(a)||n.push(t):r.isArray(a)&&r.isNil(a[0])||r.isNil(a)?n.length&&(e.push(n),n=[]):n.push(t)}),n.length&&e.push(n),e}}},function(t,e,n){var r=n(2),i=n(0),o={getDefalutSize:function(){var t=this.get("defaultSize");if(!t){var e=this.get("coord"),n=this.getXScale(),o=n.values,a=this.get("dataArray"),s=void 0;if(n.isLinear&&o.length>1){o.sort();var u=function(t,e){var n=t.length;i.isString(t[0])&&(t=t.map(function(t){return e.translate(t)}));for(var r=t[1]-t[0],o=2;oa&&(r=a)}return r}(o,n);s=(n.max-n.min)/u,o.length>s&&(s=o.length)}else s=o.length;var c=n.range,l=1/s,f=1;if(this.isInCircle()?f=e.isTransposed&&s>1?r.widthRatio.multiplePie:r.widthRatio.rose:(n.isLinear&&(l*=c[1]-c[0]),f=r.widthRatio.column),l*=f,this.hasAdjust("dodge")){l/=this._getDodgeCount(a)}t=l,this.set("defaultSize",t)}return t},_getDodgeCount:function(t){var e=this.get("adjusts"),n=void 0,r=t.length;if(i.each(e,function(t){"dodge"===t.type&&(n=t.dodgeBy)}),n){var o=i.Array.merge(t);r=i.Array.values(o,n).length}return r},getDimWidth:function(t){var e=this.get("coord"),n=e.convertPoint({x:0,y:0}),r=e.convertPoint({x:"x"===t?1:0,y:"x"===t?0:1}),i=0;return n&&r&&(i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2))),i},_getWidth:function(){var t=this.get("coord");return this.isInCircle()&&!t.isTransposed?(t.endAngle-t.startAngle)*t.radius:this.getDimWidth("x")},_toNormalizedSize:function(t){return t/this._getWidth()},_toCoordSize:function(t){return this._getWidth()*t},getNormalizedSize:function(t){var e=this.getAttrValue("size",t);return e=i.isNil(e)?this.getDefalutSize():this._toNormalizedSize(e)},getSize:function(t){var e=this.getAttrValue("size",t);if(i.isNil(e)){var n=this.getDefalutSize();e=this._toCoordSize(n)}return e}};t.exports=o},function(t,e,n){var r=n(16),i=n(332),o=n(0),a=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.assign(r,i),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="path",e.shapeType="line",e},e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return n.isStack=this.hasStack(),n},e.prototype.draw=function(t,e,n,r){var i=this,a=this.splitData(t),s=this.getDrawCfg(t[0]);s.origin=t,o.each(a,function(t,a){if(!o.isEmpty(t)){s.splitedIndex=a,s.points=t;var u=n.drawShape(s.shape,s,e);i.appendShapeInfo(u,r+a)}})},e}(r);r.Path=a,t.exports=a},function(t,e,n){"use strict";var r=n(347),i=n(348);e.a=function(t){var e=Object(r.a)(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===i.b&&e.documentElement.namespaceURI===i.b?e.createElement(t):e.createElementNS(n,t)}})(e)}},function(t,e,n){"use strict";e.a=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return t+e*n}}},function(t,e,n){"use strict";e.b=function(t,e,n){var i=t._id;return t.each(function(){var t=Object(r.h)(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Object(r.f)(t,i).value[e]}};var r=n(61);e.a=function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,o=Object(r.f)(this.node(),n).tween,a=0,s=o.length;a0;)r-=2*Math.PI;var l=o-t+(r=r/Math.PI/2*n)-2*t;u.push(["M",l,e]);for(var f=0,h=0;h=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.a.hasOwnProperty(e)?{space:r.a[e],local:t}:t}},function(t,e,n){"use strict";n.d(e,"b",function(){return r});var r="http://www.w3.org/1999/xhtml";e.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,e,n){"use strict";e.a=function(t){return null==t?function(){}:function(){return this.querySelector(t)}}},function(t,e,n){"use strict";e.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,e,n){"use strict";function r(t,e,n){return function(r){var i=a;a=r;try{t.call(this,this.__data__,e,n)}finally{a=i}}}function i(t,e,n){var i=o.hasOwnProperty(t.type)?function(t,e,n){return t=r(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}:r;return function(r,o,a){var s,u=this.__on,c=i(e,o,a);if(u)for(var l=0,f=u.length;l=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),s=a.length;{if(!(arguments.length<2)){for(u=e?i:function(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=0&&e._call.call(null,t),e=e._next;--p}()}finally{p=0,function(){var t,e,n=l,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:l=e);f=t,c(r)}(),x=0}}function u(){var t=b.now(),e=t-v;e>y&&(m-=e,v=t)}function c(t){if(!p){g&&(g=clearTimeout(g));t-x>24?(t<1/0&&(g=setTimeout(s,t-b.now()-m)),d&&(d=clearInterval(d))):(d||(v=b.now(),d=setInterval(u,y)),p=1,_(s))}}e.b=r,e.a=o,e.c=a;var l,f,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p=0,g=0,d=0,y=1e3,v=0,x=0,m=0,b="object"===("undefined"==typeof performance?"undefined":h(performance))&&performance.now?performance:Date,_="object"===("undefined"==typeof window?"undefined":h(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};o.prototype=a.prototype={constructor:o,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?r():+n)+(null==e?0:+e),this._next||f===this||(f?f._next=this:l=this,f=this),this._call=t,this._time=n,c()},stop:function(){this._call&&(this._call=null,this._time=1/0,c())}}},function(t,e,n){"use strict";n(355),n(372),n(358),n(370),n(373);var r=n(337);n.d(e,"a",function(){return r.a});n(374),n(435);var i=n(375);n.d(e,"c",function(){return i.a});var o=n(436);n.d(e,"d",function(){return o.a}),n.d(e,"e",function(){return o.b});n(439);var a=n(369);n.d(e,"b",function(){return a.a});n(440),n(441),n(442),n(443),n(444)},function(t,e,n){"use strict";var r=n(113),i=n(369),o=n(372),a=n(373),s=n(337),u=n(374),c=n(375),l=n(371),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a=function(t,e){var n,h=void 0===e?"undefined":f(e);return null==e||"boolean"===h?Object(l.a)(e):("number"===h?s.a:"string"===h?(n=Object(r.a)(e))?(e=n,i.a):c.a:e instanceof r.a?i.a:e instanceof Date?a.a:Array.isArray(e)?o.a:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?u.a:s.a)(t,e)}},function(t,e,n){"use strict";function r(){}function i(t){var e;return t=(t+"").trim().toLowerCase(),(e=b.exec(t))?(e=parseInt(e[1],16),new c(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=_.exec(t))?o(parseInt(e[1],16)):(e=w.exec(t))?new c(e[1],e[2],e[3],1):(e=S.exec(t))?new c(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=M.exec(t))?a(e[1],e[2],e[3],e[4]):(e=O.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=C.exec(t))?l(e[1],e[2]/100,e[3]/100,1):(e=P.exec(t))?l(e[1],e[2]/100,e[3]/100,e[4]):A.hasOwnProperty(t)?o(A[t]):"transparent"===t?new c(NaN,NaN,NaN,0):null}function o(t){return new c(t>>16&255,t>>8&255,255&t,1)}function a(t,e,n,r){return r<=0&&(t=e=n=NaN),new c(t,e,n,r)}function s(t){return t instanceof r||(t=i(t)),t?(t=t.rgb(),new c(t.r,t.g,t.b,t.opacity)):new c}function u(t,e,n,r){return 1===arguments.length?s(t):new c(t,e,n,null==r?1:r)}function c(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new h(t,e,n,r)}function f(t,e,n,o){return 1===arguments.length?function(t){if(t instanceof h)return new h(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=i(t)),!t)return new h;if(t instanceof h)return t;var e=(t=t.rgb()).r/255,n=t.g/255,o=t.b/255,a=Math.min(e,n,o),s=Math.max(e,n,o),u=NaN,c=s-a,l=(s+a)/2;return c?(u=e===s?(n-o)/c+6*(n0&&l<1?0:u,new h(u,c,l,t.opacity)}(t):new h(t,e,n,null==o?1:o)}function h(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function p(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e.a=r,n.d(e,"d",function(){return d}),n.d(e,"c",function(){return y}),e.e=i,e.h=s,e.g=u,e.b=c,e.f=f;var g=n(357),d=.7,y=1/d,v="\\s*([+-]?\\d+)\\s*",x="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",m="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b=/^#([0-9a-f]{3})$/,_=/^#([0-9a-f]{6})$/,w=new RegExp("^rgb\\("+[v,v,v]+"\\)$"),S=new RegExp("^rgb\\("+[m,m,m]+"\\)$"),M=new RegExp("^rgba\\("+[v,v,v,x]+"\\)$"),O=new RegExp("^rgba\\("+[m,m,m,x]+"\\)$"),C=new RegExp("^hsl\\("+[x,m,m]+"\\)$"),P=new RegExp("^hsla\\("+[x,m,m,x]+"\\)$"),A={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object(g.a)(r,i,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Object(g.a)(c,u,Object(g.b)(r,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?d:Math.pow(d,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Object(g.a)(h,f,Object(g.b)(r,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new h(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?d:Math.pow(d,t),new h(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new c(p(t>=240?t-240:t+120,i,r),p(t,i,r),p(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))},function(t,e,n){"use strict";e.b=function(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n},e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],a=t[i+1],s=i>0?t[i-1]:2*o-a,u=i1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):r(this.node(),t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(425);var r=n(112);n.d(e,"transition",function(){return r.b});var i=n(471);n.d(e,"active",function(){return i.a});var o=n(366);n.d(e,"interrupt",function(){return o.a})},function(t,e,n){"use strict";var r=n(61);e.a=function(t,e){var n,i,o,a=t.__transition,s=!0;if(a){e=null==e?null:e+"";for(o in a)(n=a[o]).name===e?(i=n.state>r.d&&n.stateu&&(s=e.slice(u,s),l[c]?l[c]+=s:l[++c]=s),(n=n[0])===(a=a[0])?l[c]?l[c]+=a:l[++c]=a:(l[++c]=null,f.push({i:c,x:Object(r.a)(n,a)})),u=o.lastIndex;return u0&&(a[0][0]="L"),r=r.concat(a)}),r.push(["Z"]),r}function a(t){return{symbol:function(t,e,n,r){r.save(),r.lineWidth=2,r.strokeStyle=r.fillStyle,r.moveTo(t-5.5,e-4),r.lineTo(t+5.5,e-4),r.stroke(),r.restore(),r.moveTo(t-5.5,e-4),r.lineTo(t+5.5,e-4),r.lineTo(t+5.5,e+4),r.lineTo(t-5.5,e+4),r.closePath()},radius:5,fill:t.color,fillOpacity:.3}}var s=n(0),u=n(10),c=n(22),l=n(2),f=u.registerFactory("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=[],n=t.x,r=t.y,i=t.y0;return r=s.isArray(r)?r:[i,r],s.each(r,function(t){e.push({x:n,y:t})}),e},getActiveCfg:function(t,e){return function(t,e){if("line"===t||"smoothLine"===t)return{lineWidth:(e.lineWidth||0)+1};var n=e.fillOpacity||e.opacity||1;return{fillOpacity:n-.15,strokeOpacity:n-.15}}(t,e)},drawShape:function(t,e,n){var r=this.getShape(t),i=void 0;return(i=1===e.points.length&&l.showSinglePoint?function(t,e,n){var r=t._coord.convertPoint(e.points[0][1]);return n.addShape("circle",{attrs:s.mix({x:r.x,y:r.y,r:2,fill:e.color},e.style)})}(this,e,n):r.draw(e,n))&&(i.set("origin",e.origin),i._id=e.splitedIndex?e._id+e.splitedIndex:e._id,i.name=this.name),i},getSelectedCfg:function(t,e){return e&&e.style?e.style:this.getActiveCfg(t,e)}});u.registerShape("area","area",{draw:function(t,e){var n=i(t),r=o(t,!1,this);return e.addShape("path",{attrs:s.mix(n,{path:r})})},getMarkerCfg:function(t){return a(t)}}),u.registerShape("area","smooth",{draw:function(t,e){var n=i(t),r=this._coord;t.constraint=[[r.start.x,r.end.y],[r.end.x,r.start.y]];var a=o(t,!0,this);return e.addShape("path",{attrs:s.mix(n,{path:a})})},getMarkerCfg:function(t){return a(t)}}),u.registerShape("area","line",{draw:function(t,e){var n=r(t),i=o(t,!1,this);return e.addShape("path",{attrs:s.mix(n,{path:i})})},getMarkerCfg:function(t){return a(t)}}),u.registerShape("area","smoothLine",{draw:function(t,e){var n=r(t),i=o(t,!0,this);return e.addShape("path",{attrs:s.mix(n,{path:i})})},getMarkerCfg:function(t){return a(t)}}),f.spline=f.smooth,t.exports=f},function(t,e,n){var r=n(16);n(383);var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="edge",e.shapeType="edge",e.generatePoints=!0,e},e}(r);r.Edge=i,t.exports=i},function(t,e,n){function r(t){var e=c.shape.edge;return a.mix({},e,{stroke:t.color,lineWidth:t.size,strokeOpacity:t.opacity,opacity:t.opacity},t.style)}function i(t,e){var n=[];n.push({x:t.x,y:.5*t.y+1*e.y/2}),n.push({y:.5*t.y+1*e.y/2,x:e.x}),n.push(e);var r=["C"];return a.each(n,function(t){r.push(t.x,t.y)}),r}function o(t,e){var n=[];n.push({x:e.x,y:e.y}),n.push(t);var r=["Q"];return a.each(n,function(t){r.push(t.x,t.y)}),r}var a=n(0),s=n(10),u=n(117),c=n(2),l=n(22),f=1/3,h=s.registerFactory("edge",{defaultShapeType:"line",getDefaultPoints:function(t){return u.splitPoints(t)},getActiveCfg:function(t,e){return{lineWidth:(e.lineWidth||0)+1}}});s.registerShape("edge","line",{draw:function(t,e){var n=this.parsePoints(t.points),i=r(t),o=l.getLinePath(n);return e.addShape("path",{attrs:a.mix(i,{path:o})})},getMarkerCfg:function(t){return a.mix({symbol:"circle",radius:4.5},r(t))}}),s.registerShape("edge","vhv",{draw:function(t,e){var n=t.points,i=r(t),o=function(t,e){var n=[];n.push({y:t.y*(1-f)+e.y*f,x:t.x}),n.push({y:t.y*(1-f)+e.y*f,x:e.x}),n.push(e);var r=[["M",t.x,t.y]];return a.each(n,function(t){r.push(["L",t.x,t.y])}),r}(n[0],n[1]);o=this.parsePath(o);return e.addShape("path",{attrs:a.mix(i,{path:o})})},getMarkerCfg:function(t){return a.mix({symbol:"circle",radius:4.5},r(t))}}),s.registerShape("edge","smooth",{draw:function(t,e){var n=t.points,o=r(t),s=function(t,e){var n=i(t,e),r=[["M",t.x,t.y]];return r.push(n),r}(n[0],n[1]);s=this.parsePath(s);return e.addShape("path",{attrs:a.mix(o,{path:s})})},getMarkerCfg:function(t){return a.mix({symbol:"circle",radius:4.5},r(t))}}),s.registerShape("edge","arc",{draw:function(t,e){var n=t.points,s=n.length>2?"weight":"normal",u=r(t),c=void 0,l=void 0;if(t.isInCircle){var f={x:0,y:1};"normal"===s?l=function(t,e,n){var r=o(e,n),i=[["M",t.x,t.y]];return i.push(r),i}(n[0],n[1],f):(u.fill=u.stroke,l=function(t,e){var n=o(t[1],e),r=o(t[3],e),i=[["M",t[0].x,t[0].y]];return i.push(r),i.push(["L",t[3].x,t[3].y]),i.push(["L",t[2].x,t[2].y]),i.push(n),i.push(["L",t[1].x,t[1].y]),i.push(["L",t[0].x,t[0].y]),i.push(["Z"]),i}(n,f)),l=this.parsePath(l),c=e.addShape("path",{attrs:a.mix(u,{path:l})})}else if("normal"===s)n=this.parsePoints(n),c=e.addShape("arc",{attrs:a.mix(u,{x:(n[1].x+n[0].x)/2,y:n[0].y,r:Math.abs(n[1].x-n[0].x)/2,startAngle:Math.PI,endAngle:2*Math.PI})});else{l=[["M",n[0].x,n[0].y],["L",n[1].x,n[1].y]];var h=i(n[1],n[3]),p=i(n[2],n[0]);l.push(h),l.push(["L",n[3].x,n[3].y]),l.push(["L",n[2].x,n[2].y]),l.push(p),l.push(["Z"]),l=this.parsePath(l),u.fill=u.stroke,c=e.addShape("path",{attrs:a.mix(u,{path:l})})}return c},getMarkerCfg:function(t){return a.mix({symbol:"circle",radius:4.5},r(t))}}),t.exports=h},function(t,e,n){var r=n(16),i=n(63),o=n(0),a={},s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="heatmap",e},e.prototype._prepareRange=function(){var t=this.get("mappedData"),e=this.getAttr("color").field,n=1/0,r=-1/0;t.forEach(function(t){var i=t._origin[e];i>r&&(r=i),i=t[0]}));for(var l=this._getScale(a),f=0;f1?t[1]:e;return{min:e,max:n,min1:r,max1:t.length>3?t[3]:n,median:t.length>2?t[2]:r}}function i(t,e,n){var i=[],o=void 0,s=void 0;return a.isArray(e)?o=[[t-n/2,(s=r(e)).max],[t+n/2,s.max],[t,s.max],[t,s.max1],[t-n/2,s.min1],[t-n/2,s.max1],[t+n/2,s.max1],[t+n/2,s.min1],[t,s.min1],[t,s.min],[t-n/2,s.min],[t+n/2,s.min],[t-n/2,s.median],[t+n/2,s.median]]:(e=e||.5,o=[[(s=r(t)).min,e-n/2],[s.min,e+n/2],[s.min,e],[s.min1,e],[s.min1,e-n/2],[s.min1,e+n/2],[s.max1,e+n/2],[s.max1,e-n/2],[s.max1,e],[s.max,e],[s.max,e-n/2],[s.max,e+n/2],[s.median,e-n/2],[s.median,e+n/2]]),function(t,e){a.each(t,function(t){e.push({x:t[0],y:t[1]})})}(o,i),i}function o(t,e,n){var r=function(t){a.isArray(t)||(t=[t]);var e=t.sort(function(t,e){return te[n].radius+F)return!1;return!0}(e,t)}),c=0,l=0,f=[];if(a.length>1){var h=u(a);for(n=0;n-1){var m=t[d.parentIndex[x]],b=Math.atan2(d.x-m.x,d.y-m.y),_=Math.atan2(g.x-m.x,g.y-m.y),w=_-b;w<0&&(w+=2*Math.PI);var S=_-w/2,M=o(y,{x:m.x+m.radius*Math.sin(S),y:m.y+m.radius*Math.cos(S)});M>2*m.radius&&(M=2*m.radius),(null===v||v.width>M)&&(v={circle:m,width:M,p1:d,p2:g})}null!==v&&(f.push(v),c+=i(v.circle.radius,v.width),g=d)}}else{var O=t[0];for(n=1;nMath.abs(O.radius-t[n].radius)){C=!0;break}C?c=l=0:(c=O.radius*O.radius*Math.PI,f.push({circle:O,p1:{x:O.x,y:O.y+O.radius},p2:{x:O.x-F,y:O.y+O.radius},width:2*O.radius}))}return l/=2,e&&(e.area=c+l,e.arcArea=c,e.polygonArea=l,e.arcs=f,e.innerPoints=a,e.intersectionPoints=r),c+l}function i(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function o(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function a(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);var r=e-(n*n-t*t+e*e)/(2*n);return i(t,t-(n*n-e*e+t*t)/(2*n))+i(e,r)}function s(t,e){var n=o(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];var a=(r*r-i*i+n*n)/(2*n),s=Math.sqrt(r*r-a*a),u=t.x+a*(e.x-t.x)/n,c=t.y+a*(e.y-t.y)/n,l=-(e.y-t.y)*(s/n),f=-(e.x-t.x)*(s/n);return[{x:u+l,y:c-f},{x:u-l,y:c+f}]}function u(t){for(var e={x:0,y:0},n=0;n=y[d-1].fx){var A=!1;if(_.fx>P.fx?(g(w,1+h,b,-h,P),w.fx=t(w),w.fx=1)break;for(v=1;vu+o*i*c||l>=d)h=i;else{if(Math.abs(p)<=-a*c)return i;p*(h-s)>=0&&(h=s),s=i,d=l}return 0}var u=n.fx,c=f(n.fxprime,e),l=u,h=u,p=c,d=0;i=i||1,o=o||1e-6,a=a||.1;for(var y=0;y<10;++y){if(g(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),p=f(r.fxprime,e),l>u+o*i*c||y&&l>=h)return s(d,i,h);if(Math.abs(p)<=-a*c)return i;if(p>=0)return s(i,d,l);h=l,d=i,i*=2}return i}function v(t,e,n){var r,i,o,a={x:e.slice(),fx:0,fxprime:e.slice()},s={x:e.slice(),fx:0,fxprime:e.slice()},u=e.slice(),c=1;o=(n=n||{}).maxIterations||20*e.length,a.fx=t(a.x,a.fxprime),p(r=a.fxprime.slice(),a.fxprime,-1);for(var l=0;le}),e=0;e0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(var c=0;c=0&&(e=l),Math.abs(u)=8){var i=function(t,e){var n,r=(e=e||{}).restarts||10,i=[],o={};for(n=0;n=Math.min(e[o].size,e[a].size)?u=1:t.size<=1e-10&&(u=-1),i[o][a]=i[a][o]=u}),{distances:r,constraints:i}}(t,i,o),u=s.distances,f=s.constraints,g=h(u.map(h))/u.length;u=u.map(function(t){return t.map(function(t){return t/g})});var d,y,x=function(t,e){return function(t,e,n,r){var i,o=0;for(i=0;i0&&g<=f||h<0&&g>=f||(o+=2*d*d,e[2*i]+=4*d*(a-c),e[2*i+1]+=4*d*(s-l),e[2*u]+=4*d*(c-a),e[2*u+1]+=4*d*(l-s))}return o}(t,e,u,f)};for(n=0;n=Math.min(u[g].size,u[d].size)&&(p=0),c[g].push({set:d,size:h.size,weight:p}),c[d].push({set:g,size:h.size,weight:p})}var y=[];for(o in c)if(c.hasOwnProperty(o)){var v=0;for(l=0;l0){var i=t[0].x,a=t[0].y;for(r=0;r1){var s,u,c=Math.atan2(t[1].x,t[1].y)-e,l=Math.cos(c),f=Math.sin(c);for(r=0;r2){for(var h=Math.atan2(t[2].x,t[2].y)-e;h<0;)h+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;if(h>Math.PI){var p=t[1].y/(1e-10+t[1].x);for(r=0;rc&&p.node().getComputedTextLength()>a&&(f.pop(),p.text(f.join(" ")),f=[l],p=i.append("tspan").text(l),h++)}var g=.35-1.1*h/2,d=i.attr("x"),y=i.attr("y");i.selectAll("tspan").attr("x",d).attr("y",y).attr("dy",function(t,e){return g+1.1*e+"em"})}}function j(t,e,n){var r,i,a=e[0].radius-o(e[0],t);for(r=1;r=c&&(s=i[n],c=l)}var f=d(function(n){return-1*j({x:n[0],y:n[1]},t,e)},[s.x,s.y],{maxIterations:500,minErrorDelta:1e-10}).x,h={x:f[0],y:f[1]},p=!0;for(n=0;nt[n].radius){p=!1;break}for(n=0;n0&&console.log("WARNING: area "+o+" not represented on screen")}return n}function I(t,e,n){var r=[];return r.push("\nM",t,e),r.push("\nm",-n,0),r.push("\na",n,n,0,1,0,2*n,0),r.push("\na",n,n,0,1,0,2*-n,0),r.join(" ")}function L(t){var e=t.split(" ");return{x:parseFloat(e[1]),y:parseFloat(e[2]),radius:-parseFloat(e[4])}}function D(t){var e={};r(t,e);var n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var i=n[0].circle;return I(i.x,i.y,i.radius)}for(var o=["\nM",n[0].p2.x,n[0].p2.y],a=0;au;o.push("\nA",u,u,0,c?1:0,1,s.p1.x,s.p1.y)}return o.join(" ")}var F=1e-10,R=1e-10;t.intersectionArea=r,t.circleCircleIntersection=s,t.circleOverlap=a,t.circleArea=i,t.distance=o,t.venn=x,t.greedyLayout=_,t.scaleSolution=P,t.normalizeSolution=C,t.bestInitialLayout=b,t.lossFunction=w,t.disjointCluster=M,t.distanceFromIntersectArea=m,t.VennDiagram=function(){function t(t){function h(t){return t.sets in _?_[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}var p=t.datum(),g={};p.forEach(function(t){0==t.size&&1==t.sets.length&&(g[t.sets[0]]=1)});var x={},m={};if((p=p.filter(function(t){return!t.sets.some(function(t){return t in g})})).length>0){var b=y(p,{lossFunction:v});s&&(b=C(b,a,f)),x=P(b,n,r,i),m=E(x,p)}var _={};p.forEach(function(t){t.label&&(_[t.sets]=t.label)}),t.selectAll("svg").data([x]).enter().append("svg");var w=t.select("svg").attr("width",n).attr("height",r),S={},M=!1;w.selectAll(".venn-area path").each(function(t){var n=e.select(this).attr("d");1==t.sets.length&&n&&(M=!0,S[t.sets[0]]=L(n))});var O=function(t){return function(e){return D(t.sets.map(function(t){var i=S[t],o=x[t];return i||(i={x:n/2,y:r/2,radius:1}),o||(o={x:n/2,y:r/2,radius:1}),{x:i.x*(1-e)+o.x*e,y:i.y*(1-e)+o.y*e,radius:i.radius*(1-e)+o.radius*e}}))}},j=w.selectAll(".venn-area").data(p,function(t){return t.sets}),k=j.enter().append("g").attr("class",function(t){return"venn-area venn-"+(1==t.sets.length?"circle":"intersection")}).attr("data-venn-sets",function(t){return t.sets.join("_")}),T=k.append("path"),I=k.append("text").attr("class","label").text(function(t){return h(t)}).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",r/2);c&&(T.style("fill-opacity","0").filter(function(t){return 1==t.sets.length}).style("fill",function(t){return d(t.sets)}).style("fill-opacity",".25"),I.style("fill",function(t){return 1==t.sets.length?d(t.sets):"#444"}));var F=t;M?(F=t.transition("venn").duration(o)).selectAll("path").attrTween("d",O):F.selectAll("path").attr("d",function(t){return D(t.sets.map(function(t){return x[t]}))});var R=F.selectAll("text").filter(function(t){return t.sets in m}).text(function(t){return h(t)}).attr("x",function(t){return Math.floor(m[t.sets].x)}).attr("y",function(t){return Math.floor(m[t.sets].y)});u&&(M?"on"in R?R.on("end",A(x,h)):R.each("end",A(x,h)):R.each(A(x,h)));var B=j.exit().transition("venn").duration(o).remove();B.selectAll("path").attrTween("d",O);var N=B.selectAll("text").attr("x",n/2).attr("y",r/2);return null!==l&&(I.style("font-size","0px"),R.style("font-size",l),N.style("font-size","0px")),{circles:x,textCentres:m,nodes:j,enter:k,update:F,exit:B}}var n=600,r=350,i=15,o=1e3,a=Math.PI/2,s=!0,u=!0,c=!0,l=null,f=null,h={},p=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],g=0,d=function(t){if(t in h)return h[t];var e=h[t]=p[g];return(g+=1)>=p.length&&(g=0),e},y=x,v=w;return t.wrap=function(e){return arguments.length?(u=e,t):u},t.width=function(e){return arguments.length?(n=e,t):n},t.height=function(e){return arguments.length?(r=e,t):r},t.padding=function(e){return arguments.length?(i=e,t):i},t.colours=function(e){return arguments.length?(d=e,t):d},t.fontSize=function(e){return arguments.length?(l=e,t):l},t.duration=function(e){return arguments.length?(o=e,t):o},t.layoutFunction=function(e){return arguments.length?(y=e,t):y},t.normalize=function(e){return arguments.length?(s=e,t):s},t.styled=function(e){return arguments.length?(c=e,t):c},t.orientation=function(e){return arguments.length?(a=e,t):a},t.orientationOrder=function(e){return arguments.length?(f=e,t):f},t.lossFunction=function(e){return arguments.length?(v=e,t):v},t},t.wrapText=A,t.computeTextCentres=E,t.computeTextCentre=k,t.sortAreas=function(t,e){function n(t){for(var e=0;e=M&&(M=S+1);!(w=b[M])&&++M=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this}},function(t,e,n){"use strict";function r(t,e){return te?1:t>=e?0:NaN}var i=n(60);e.a=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=r);for(var n=this._groups,o=n.length,a=new Array(o),s=0;s1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]}},function(t,e,n){"use strict";function r(t){return t.trim().split(/^|\s+/)}function i(t){return t.classList||new o(t)}function o(t){this._node=t,this._names=r(t.getAttribute("class")||"")}function a(t,e){for(var n=i(t),r=-1,o=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},e.a=function(t,e){var n=r(t+"");if(arguments.length<2){for(var o=i(this.node()),u=-1,c=n.length;++u=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}(t+"",r),a=-1,s=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),o=0;o_?Math.pow(t,1/3):t/b+x}function s(t){return t>m?t*t*t:b*(t-x)}function u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function c(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l(t,e,n,i){return 1===arguments.length?function(t){if(t instanceof f)return new f(t.h,t.c,t.l,t.opacity);t instanceof o||(t=r(t));var e=Math.atan2(t.b,t.a)*g.b;return new f(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new f(t,e,n,null==i?1:i)}function f(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}e.a=i,e.b=l;var h=n(357),p=n(356),g=n(368),d=.95047,y=1,v=1.08883,x=4/29,m=6/29,b=3*m*m,_=m*m*m;Object(h.a)(o,i,Object(h.b)(p.a,{brighter:function(t){return new o(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new o(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=y*s(t),e=d*s(e),n=v*s(n),new p.b(u(3.2404542*e-1.5371385*t-.4985314*n),u(-.969266*e+1.8760108*t+.041556*n),u(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Object(h.a)(f,l,Object(h.b)(p.a,{brighter:function(t){return new f(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new f(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return r(this).rgb()}}))},function(t,e,n){"use strict";function r(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof i)return new i(t.h,t.s,t.l,t.opacity);t instanceof a.b||(t=Object(a.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(d*r+p*e-g*n)/(d+p-g),u=r-o,c=(h*(n-o)-l*u)/f,y=Math.sqrt(c*c+u*u)/(h*o*(1-o)),v=y?Math.atan2(c,u)*s.b-120:NaN;return new i(v<0?v+360:v,y,o,t.opacity)}(t):new i(t,e,n,null==r?1:r)}function i(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}e.a=r;var o=n(357),a=n(356),s=n(368),u=-.14861,c=1.78277,l=-.29227,f=-.90649,h=1.97294,p=h*f,g=h*c,d=c*l-f*u;Object(o.a)(i,r,Object(o.b)(a.a,{brighter:function(t){return t=null==t?a.c:Math.pow(a.c,t),new i(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?a.d:Math.pow(a.d,t),new i(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*s.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new a.b(255*(e+n*(u*r+c*i)),255*(e+n*(l*r+f*i)),255*(e+n*(h*r)),this.opacity)}}))},function(t,e,n){"use strict"},function(t,e,n){"use strict";function r(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(a,s){var u=[],c=[];return a=t(a),s=t(s),function(t,r,o,a,s,u){if(t!==o||r!==a){var c=s.push("translate(",null,e,null,n);u.push({i:c-4,x:Object(i.a)(t,o)},{i:c-2,x:Object(i.a)(r,a)})}else(o||a)&&s.push("translate("+o+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,u,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Object(i.a)(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(a.rotate,s.rotate,u,c),function(t,e,n,a){t!==e?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Object(i.a)(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(a.skewX,s.skewX,u,c),function(t,e,n,r,a,s){if(t!==n||e!==r){var u=a.push(o(a)+"scale(",null,",",null,")");s.push({i:u-4,x:Object(i.a)(t,n)},{i:u-2,x:Object(i.a)(e,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,u,c),a=s=null,function(t){for(var e,n=-1,r=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?r.g:r.h;return function(){var r=a(this,t),s=r.on;s!==i&&(o=(i=s).copy()).on(e,n),r.on=o}}(n,t,e))}},function(t,e,n){"use strict";e.a=function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))}},function(t,e,n){"use strict";var r=n(59),i=n(112),o=n(61);e.a=function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(r.selector)(t));for(var a=this._groups,s=a.length,u=new Array(s),c=0;ci.c&&n.name===e)return new r.a([[t]],o,e,+a)}return null}},function(t,e,n){function r(t){var e=a.shape.venn;return i.mix({},e,{stroke:t.color,fill:t.color,fillOpacity:t.opacity},t.style)}var i=n(0),o=n(10),a=n(2),s=n(1).PathUtil,u=o.registerFactory("venn",{defaultShapeType:"venn",getDefaultPoints:function(t){var e=[];return i.each(t.x,function(n,r){var i=t.y[r];e.push({x:n,y:i})}),e},getActiveCfg:function(t,e){var n=e.lineWidth||1;if("hollow"===t)return{lineWidth:n+1};return{fillOpacity:(e.fillOpacity||e.opacity||1)-.08}},getSelectedCfg:function(t,e){return e&&e.style?e.style:this.getActiveCfg(t,e)}});o.registerShape("venn","venn",{draw:function(t,e){var n=t.origin._origin.path,o=r(t),a=s.parsePathString(n);return e.addShape("path",{attrs:i.mix(o,{path:a})})},getMarkerCfg:function(t){return i.mix({symbol:"circle",radius:4},r(t))}}),o.registerShape("venn","hollow",{draw:function(t,e){var n=t.origin._origin.path,r=function(t){var e=a.shape.hollowVenn;return i.mix({},e,{stroke:t.color,strokeOpacity:t.opacity},t.style)}(t),o=s.parsePathString(n);return e.addShape("path",{attrs:i.mix(r,{path:o})})},getMarkerCfg:function(t){return i.mix({symbol:"circle",radius:4},r(t))}}),t.exports=u},function(t,e,n){var r=n(0),i=n(114),o={};o.Rect=n(377),o.List=n(378),o.Circle=n(474),o.Tree=n(475),o.Mirror=n(476),o.Matrix=n(477),i.prototype.facet=function(t,e){var n=o[r.upperFirst(t)];if(!n)throw new Error("Not support such type of facets as: "+t);var i=this.get("facets");i&&i.destroy(),e.chart=this;var a=new n(e);this.set("facets",a)},t.exports=o},function(t,e,n){function r(t,e,n){return{x:t.x+e*Math.cos(n),y:t.y+e*Math.sin(n)}}var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="circle",e},e.prototype.getRegion=function(t,e){var n=2*Math.PI/t,i=-1*Math.PI/2+n*e,o=.5/(1+1/Math.sin(n/2)),a=r({x:.5,y:.5},.5-o,i),s=5*Math.PI/4,u=1*Math.PI/4;return{start:r(a,o,s),end:r(a,o,u)}},e.prototype.generateFacets=function(t){var e=this,n=e.fields[0];if(!n)throw"Please specify for the field for facet!";var r=e.getFieldValues(n,t),i=r.length,o=[];return r.forEach(function(a,s){var u=[{field:n,value:a,values:r}],c=e.getFilter(u),l=t.filter(c),f={type:e.type,colValue:a,colField:n,colIndex:s,cols:i,rows:1,rowIndex:0,data:l,region:e.getRegion(i,s)};o.push(f)}),o},e}(n(339));t.exports=i},function(t,e,n){var r=n(339),i=n(0).assign,o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="tree",e.line={lineWidth:1,stroke:"#ddd"},e.lineSmooth=!1,e},e.prototype.generateFacets=function(t){if(!this.fields.length)throw"Please specify for the fields for facet!";var e=[],n=this.getRootFacet(t);return e.push(n),n.children=this.getChildFacets(t,1,e),this.setRegion(e),e},e.prototype.getRootFacet=function(t){return{type:this.type,rows:this.getRows(),rowIndex:0,colIndex:0,colValue:this.rootTitle,data:t}},e.prototype.getRows=function(){return this.fields.length+1},e.prototype.getChildFacets=function(t,e,n){var r=this,i=r.fields;if(!(i.length=0;i--)for(var o=e.getFacetsByLevel(t,i),a=0;ap.x||o.yh.y)return}s.style.cursor="crosshair",e.startPoint=o,e.brushShape=null,e.brushing=!0,l?l.clear():(l=n.addGroup({zIndex:5})).initTransform(),e.container=l,"POLYGON"===r&&(e.polygonPath="M "+o.x+" "+o.y)}}}},e.prototype.process=function(t){var e=this,n=e.brushing,i=e.dragging,o=e.type,a=e.plot,s=e.startPoint,u=e.xScale,c=e.yScale,l=e.canvas;if(n||i){var f={x:t.offsetX,y:t.offsetY},h=l.get("canvasDOM");if(n){h.style.cursor="crosshair";var p=a.start,g=a.end,d=e.polygonPath,y=e.brushShape,v=e.container;e.plot&&e.inPlot&&(f=e._limitCoordScope(f));var x=void 0,m=void 0,b=void 0,_=void 0;"Y"===o?(x=p.x,m=f.y>=s.y?s.y:f.y,b=Math.abs(p.x-g.x),_=Math.abs(s.y-f.y)):"X"===o?(x=f.x>=s.x?s.x:f.x,m=g.y,b=Math.abs(s.x-f.x),_=Math.abs(g.y-p.y)):"XY"===o?(f.x>=s.x?(x=s.x,m=f.y>=s.y?s.y:f.y):(x=f.x,m=f.y>=s.y?s.y:f.y),b=Math.abs(s.x-f.x),_=Math.abs(s.y-f.y)):"POLYGON"===o&&(d+="L "+f.x+" "+f.y,e.polygonPath=d,y?!y.get("destroyed")&&y.attr(r.mix({},y.__attrs,{path:d})):y=v.addShape("path",{attrs:r.mix(e.style,{path:d})})),"POLYGON"!==o&&(y?!y.get("destroyed")&&y.attr(r.mix({},y.__attrs,{x:x,y:m,width:b,height:_})):y=v.addShape("rect",{attrs:r.mix(e.style,{x:x,y:m,width:b,height:_})})),e.brushShape=y}else if(i){h.style.cursor="move";var w=e.selection;if(w&&!w.get("destroyed"))if("POLYGON"===o){var S=e.prePoint;e.selection.translate(f.x-S.x,f.y-S.y)}else e.dragoffX&&w.attr("x",f.x-e.dragoffX),e.dragoffY&&w.attr("y",f.y-e.dragoffY)}e.prePoint=f,l.draw();var M=e._getSelected(),O=M.data,C=M.shapes,P=M.xValues,A=M.yValues,j={data:O,shapes:C,x:f.x,y:f.y};u&&(j[u.field]=P),c&&(j[c.field]=A),e.onDragmove&&e.onDragmove(j),e.onBrushmove&&e.onBrushmove(j)}},e.prototype.end=function(t){var e=this,n=e.data,i=e.shapes,o=e.xValues,a=e.yValues,s=e.canvas,u=e.type,c=e.startPoint,l=e.chart,f=e.container,h=e.xScale,p=e.yScale,g=t.offsetX,d=t.offsetY;if(s.get("canvasDOM").style.cursor="default",Math.abs(c.x-g)<=1&&Math.abs(c.y-d)<=1)return e.brushing=!1,void(e.dragging=!1);var y={data:n,shapes:i,x:g,y:d};if(h&&(y[h.field]=o),p&&(y[p.field]=a),e.dragging)e.dragging=!1,e.onDragend&&e.onDragend(y);else if(e.brushing){e.brushing=!1;var v=e.brushShape,x=e.polygonPath;"POLYGON"===u&&(x+="z",v&&!v.get("destroyed")&&v.attr(r.mix({},v.__attrs,{path:x})),e.polygonPath=x,s.draw()),e.onBrushend?e.onBrushend(y):l&&e.filter&&(f.clear(),"X"===u?h&&l.filter(h.field,function(t){return o.indexOf(t)>-1}):"Y"===u?p&&l.filter(p.field,function(t){return a.indexOf(t)>-1}):(h&&l.filter(h.field,function(t){return o.indexOf(t)>-1}),p&&l.filter(p.field,function(t){return a.indexOf(t)>-1})),l.repaint())}},e.prototype.reset=function(){var t=this.chart,e=this.filter;t&&e&&(t.get("options").filters={},t.repaint())},e.prototype._limitCoordScope=function(t){var e=this.plot,n=e.start,r=e.end;return t.xr.x&&(t.x=r.x),t.yn.y&&(t.y=n.y),t},e.prototype._getSelected=function(){var t=this,e=t.chart,n=t.xScale,r=t.yScale,i=t.brushShape,o=t.canvas.get("pixelRatio"),a=[],s=[],u=[],c=[];if(e){e.get("geoms").map(function(t){return t.getShapes().map(function(t){var e=t.get("origin");return Array.isArray(e)||(e=[e]),e.map(function(e){if(i.isHit(e.x*o,e.y*o)){a.push(t);var l=e._origin;c.push(l),n&&s.push(l[n.field]),r&&u.push(l[r.field])}return e}),t}),t})}return t.shapes=a,t.xValues=s,t.yValues=u,t.data=c,{data:c,xValues:s,yValues:u,shapes:a}},e}(i);o.registerInteraction("brush",u),o.registerInteraction("Brush",u),t.exports=u},function(t,e,n){var r=n(0),i=n(340),o=n(62),a=["X","Y","XY"],s="X",u=function(t){function e(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i)),u=o;u.type=u.type.toUpperCase(),u.chart=i;var c=i.getYScales(),l=i.getXScale();c.push(l);var f=i.get("scaleController");return c.forEach(function(t){var e=t.field,n=f.defs[e];u.originScaleDefsByField[e]=r.mix(n,{nice:!!n.nice}),t.isLinear&&(u.stepByField[e]=(t.max-t.min)*u.stepRatio)}),-1===a.indexOf(u.type)&&(u.type=s),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:s,stepRatio:.05,stepByField:{},originScaleDefsByField:{},previousPoint:null,isDragging:!1})},e.prototype._applyTranslate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.chart,r=t.min,i=t.max,o=t.field,a=i-r;n.scale(o,{nice:!1,min:r-e*a,max:i-e*a})},e.prototype.start=function(t){var e=this.chart;this.canvas.get("canvasDOM").style.cursor="pointer";var n=e.get("coord");this.isDragging=!0,this.previousPoint=n.invertPoint(t)},e.prototype.process=function(t){var e=this;if(e.isDragging){var n=e.chart,r=e.type;e.canvas.get("canvasDOM").style.cursor="move";var i=n.get("coord"),o=e.previousPoint,a=i.invertPoint(t);if(r.indexOf("X")>-1&&e._applyTranslate(n.getXScale(),a.x-o.x),r.indexOf("Y")>-1){n.getYScales().forEach(function(t){e._applyTranslate(t,a.y-o.y)})}e.previousPoint=a,n.repaint()}},e.prototype.end=function(){this.isDragging=!1;this.canvas.get("canvasDOM").style.cursor="default"},e.prototype.reset=function(){var t=this.view,e=this.originScaleDefsByField,n=t.getYScales(),r=t.getXScale();n.push(r),n.forEach(function(n){if(n.isLinear){var r=n.field;t.scale(r,e[r])}}),t.repaint()},e}(i);o.registerInteraction("drag",u),o.registerInteraction("Drag",u),t.exports=u},function(t,e,n){var r=n(0),i=n(340),o=n(62),a=["X","Y","XY"],s="X",u=function(t){function e(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i)),u=o;u.chart=i,u.type=u.type.toUpperCase();var c=i.getYScales(),l=i.getXScale();c.push(l);var f=i.get("scaleController");return c.forEach(function(t){var e=t.field,n=f.defs[e]||{};u.originScaleDefsByField[e]=r.mix(n,{nice:!!n.nice}),t.isLinear&&(u.stepByField[e]=(t.max-t.min)*u.stepRatio)}),-1===a.indexOf(u.type)&&(u.type=s),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{processingEvent:"mousewheel",type:s,stepRatio:.05,stepByField:{},originScaleDefsByField:{}})},e.prototype._applyScale=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.chart,i=this.stepByField;if(t.isLinear){var o=t.min,a=t.max,s=t.field,u=1-n,c=i[s]*e,l=o+c*n,f=a-c*u;f>l&&r.scale(s,{nice:!1,min:l,max:f})}},e.prototype.process=function(t){var e=this,n=e.chart,r=e.type,i=n.get("coord"),o=t.deltaY,a=i.invertPoint(t);if(o){e.onZoom&&e.onZoom(o,a,e),o>0?e.onZoomin&&e.onZoomin(o,a,e):e.onZoomout&&e.onZoomout(o,a,e);var s=o/Math.abs(o);if(r.indexOf("X")>-1&&e._applyScale(n.getXScale(),s,a.x),r.indexOf("Y")>-1){n.getYScales().forEach(function(t){e._applyScale(t,s,a.y)})}}n.repaint()},e.prototype.reset=function(){var t=this.view,e=this.originScaleDefsByField,n=t.getYScales(),r=t.getXScale();n.push(r),n.forEach(function(n){if(n.isLinear){var r=n.field;t.scale(r,e[r])}}),t.repaint()},e}(i);o.registerInteraction("zoom",u),o.registerInteraction("Zoom",u),t.exports=u}])});