1 line
272 KiB
JavaScript
1 line
272 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.component=e():t.component=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=127)}([function(t,e,n){var r=n(52),i={};r.merge(i,r,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var r={};i.each(e,function(e){i.augment(t,e);var a=e[n];a&&i.merge(r,a)}),t[n]=i.merge(r,t[n])}}}),t.exports=i},function(t,e,n){var r=n(22),i=n(179),a=i.mix({assign:i.mix,isFinite:isFinite,isNaN:isNaN,Group:r.Group,Event:r.Event},i);t.exports=a},function(t,e,n){var r=n(31),i=n(3);t.exports=function(t,e){if(t)if(i(t))for(var n=0,a=t.length;n<a&&!1!==e(t[n],n);n++);else if(r(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}},function(t,e,n){var r=n(6),i=Array.isArray?Array.isArray:function(t){return r(t,"Array")};t.exports=i},function(t,e,n){var r=n(0),i=n(137),a=n(74),o=n(39),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={},r.extend(s,a);var u={matrix:"matrix",path:"path",points:"points",lineDash:"lineDash"};r.augment(s,i,{isShape:!0,drawInner:function(t){var e=this._attrs;this.createPath(t);var n=t.globalAlpha;if(this.hasFill()){var i=e.fillOpacity;r.isNil(i)||1===i?t.fill():(t.globalAlpha=i,t.fill(),t.globalAlpha=n)}if(this.hasStroke()){if(this._attrs.lineWidth>0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}}this.afterPath(t)},afterPath:function(){},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.invert(n,this.get("canvas")),!!i.isPointInPath(n[0],n[1])&&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},clone:function(){var t=null,e=this._attrs,n={};return r.each(e,function(t,i){u[i]&&r.isArray(e[i])?n[i]=function(t){for(var e=[],n=0;n<t.length;n++)r.isArray(t[n])?e.push([].concat(t[n])):e.push(t[n]);return e}(e[i]):n[i]=e[i]}),t=new this.constructor({attrs:n}),t._cfg.zIndex=this._cfg.zIndex,t}}),t.exports=s},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Function")}},function(t,e){var n={}.toString;t.exports=function(t,e){return n.call(t)==="[object "+e+"]"}},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e){t.exports=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,e){t.exports={FONT_FAMILY:'BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",SimSun, "sans-serif"'}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Number")}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(118),o=["min","max","median","start","end"],s=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{xScales:null,yScales:null,el:null})},n.render=function(){},n.clear=function(){var t=this.get("el");t&&t.remove(),this.set("el",null)},n.destroy=function(){this.clear(),t.prototype.destroy.call(this)},n.changeVisible=function(t){this.set("visible",t);var e=this.get("el");e&&(e.set?e.set("visible",t):e.style.display=t?"":"none")},n.parsePoint=function(t,e){var n=this.get("xScales"),r=this.get("yScales");i.isFunction(e)&&(e=e(n,r));var o,s;if(i.isArray(e)&&i.isString(e[0])&&-1!==e[0].indexOf("%"))return this._parsePercentPoint(t,e);if(i.isArray(e))o=this._getNormalizedValue(e[0],a.getFirstScale(n)),s=this._getNormalizedValue(e[1],a.getFirstScale(r));else for(var u in e){var c=e[u];n[u]&&(o=this._getNormalizedValue(c,n[u])),r[u]&&(s=this._getNormalizedValue(c,r[u],"y"))}return i.isNil(o)||i.isNil(s)||isNaN(o)||isNaN(s)?null:t.convert({x:o,y:s})},n._getNormalizedValue=function(t,e){var n;if(-1!==i.indexOf(o,t)){var r;"start"===t?n=0:"end"===t?n=1:"median"===t?(r=e.isCategory?(e.values.length-1)/2:(e.min+e.max)/2,n=e.scale(r)):(r=e.isCategory?"min"===t?0:e.values.length-1:e[t],n=e.scale(r))}else n=e.scale(t);return n},n._parsePercentPoint=function(t,e){var n=parseFloat(e[0])/100,r=parseFloat(e[1])/100,i=t.start,a=t.end,o={x:Math.min(i.x,a.x),y:Math.min(i.y,a.y)};return{x:t.width*n+o.x,y:t.height*r+o.y}},e}(n(15));t.exports=s},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"String")}},function(t,e,n){"use strict";var r=n(45);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(154);n.d(e,"e",function(){return i.a}),n.d(e,"c",function(){return i.b});var a=n(155);n.d(e,"b",function(){return a.a})},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(15),a=n(1),o=n(115),s=n(116),u=n(9).FONT_FAMILY,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{_id:null,zIndex:4,ticks:null,line:null,tickLine:null,subTickCount:0,subTickLine:null,grid:null,label:{offset:0,offsetX:0,offsetY:0,textStyle:{},autoRotate:!0,autoHide:!1,formatter:null},labelItems:[],title:{autoRotate:!0,textStyle:{}},autoPaint:!0})},n.beforeRender=function(){var t=this.get("title"),e=this.get("label"),n=this.get("grid");t&&this.set("title",a.deepMix({autoRotate:!0,textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:u,textAlign:"center"},offset:48},t)),e&&this.set("label",a.deepMix({autoRotate:!0,autoHide:!0,textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:u},offset:10},e)),n&&this.set("grid",a.deepMix({lineStyle:{lineWidth:1,stroke:"#C0D0E0"}},n))},n.render=function(){this.beforeRender();this.get("label")&&this.renderLabels(),this.get("autoPaint")&&this.paint(),a.isNil(this.get("title"))||this.renderTitle(),this.get("group").sort()},n.renderLabels=function(){var t=this.get("group"),e=this.get("label"),n=new s({name:"axis-label"});this.set("labelRenderer",n),n.set("labelCfg",e);a.each(["formatter","htmlTemplate","labelLine","textStyle","useHtml"],function(t){e[t]&&n.set(t,e[t])}),n.set("coord",this.get("coord")),n.set("group",t.addGroup()),n.set("canvas",this.get("canvas"))},n._parseTicks=function(t){for(var e=(t=t||[]).length,n=0;n<e;n++){var r=t[n];a.isObject(r)||(t[n]=this.parseTick(r,n,e))}return this.set("ticks",t),t},n._addTickItem=function(t,e,n,r){void 0===r&&(r="");var i=this.get("tickItems"),a=this.get("subTickItems"),o=this.getTickEnd(e,n,t),s={x1:e.x,y1:e.y,x2:o.x,y2:o.y};i||(i=[]),a||(a=[]),"sub"===r?a.push(s):i.push(s),this.set("tickItems",i),this.set("subTickItems",a)},n._renderLine=function(){var t,e=this.get("line");if(e){t=this.getLinePath(),e=a.mix({path:t},e);var n=this.get("group").addShape("path",{attrs:e});n.name="axis-line",this.get("appendInfo")&&n.setSilent("appendInfo",this.get("appendInfo")),this.set("lineShape",n)}},n._processCatTicks=function(){var t=this.get("label"),e=this.get("tickLine"),n=this.get("ticks");n=this._parseTicks(n);for(var r=this._getNormalizedTicks(n),i=0;i<r.length;i+=3){var a=this.getTickPoint(r[i]),o=this.getTickPoint(r[i+1]),s=this.getTickPoint(r[i+2]),u=Math.floor(i/3),c=n[u];e&&(0===u&&this._addTickItem(u,o,e.length),this._addTickItem(u,s,e.length)),t&&this.addLabel(c,a,u)}},n._getNormalizedTicks=function(t){var e=0;t.length>1&&(e=(t[1].value-t[0].value)/2);for(var n=[],r=0;r<t.length;r++){var i=t[r],o=i.value,s=i.value-e,u=i.value+e;n.push(o,s,u)}var c=a.arrayUtil.getRange(n);return n.map(function(t){return(t-c.min)/(c.max-c.min)})},n.addLabel=function(t,e,n){var r=this.get("labelItems"),i=this.get("labelRenderer"),o=a.deepMix({},this.get("label"));if(i){var s=this.get("_labelOffset");a.isNil(this.get("label").offset)||(s=this.get("label").offset);var u=this.getSideVector(s,e,n);e={x:e.x+u[0]+o.offsetX,y:e.y+u[1]+o.offsetY},o.text=t.text,o.x=e.x,o.y=e.y,o.point=e,o.textAlign=this.getTextAnchor(u),e.rotate&&(o.rotate=e.rotate),r.push(o)}},n._processTicks=function(){var t=this,e=t.get("label"),n=t.get("subTickCount"),r=t.get("tickLine"),i=t.get("ticks");if(i=t._parseTicks(i),a.each(i,function(n,i){var a=t.getTickPoint(n.value,i);r&&t._addTickItem(i,a,r.length),e&&t.addLabel(n,a,i)}),n){var o=t.get("subTickLine");a.each(i,function(e,a){if(a>0){var s=e.value-i[a-1].value;s/=t.get("subTickCount")+1;for(var u=1;u<=n;u++){var c={text:"",value:a?i[a-1].value+u*s:u*s},l=t.getTickPoint(c.value),h=void 0;h=o&&o.length?o.length:parseInt(.6*r.length,10),t._addTickItem(u-1,l,h,"sub")}}})}},n._addTickLine=function(t,e){var n=a.mix({},e),r=[];a.each(t,function(t){r.push(["M",t.x1,t.y1]),r.push(["L",t.x2,t.y2])}),delete n.length,n.path=r;var i=this.get("group").addShape("path",{attrs:n});i.name="axis-ticks",i._id=this.get("_id")+"-ticks",i.set("coord",this.get("coord")),this.get("appendInfo")&&i.setSilent("appendInfo",this.get("appendInfo"))},n._renderTicks=function(){var t=this.get("tickItems"),e=this.get("subTickItems");if(!a.isEmpty(t)){var n=this.get("tickLine");this._addTickLine(t,n)}if(!a.isEmpty(e)){var r=this.get("subTickLine")||this.get("tickLine");this._addTickLine(e,r)}},n._renderGrid=function(){var t=this.get("grid");if(t){t.coord=this.get("coord"),t.appendInfo=this.get("appendInfo");var e=this.get("group");this.set("gridGroup",e.addGroup(o,t))}},n._renderLabels=function(){var t=this.get("labelRenderer"),e=this.get("labelItems");t&&(t.set("items",e),t._dryDraw())},n.paint=function(){var t=this.get("tickLine"),e=!0;t&&t.hasOwnProperty("alignWithLabel")&&(e=t.alignWithLabel),this._renderLine();var n=this.get("type");("cat"===n||"timeCat"===n)&&!1===e?this._processCatTicks():this._processTicks(),this._renderTicks(),this._renderGrid(),this._renderLabels();var r=this.get("label");r&&r.autoRotate&&this.autoRotateLabels(),r&&r.autoHide&&this.autoHideLabels()},n.parseTick=function(t,e,n){return{text:t,value:e/(n-1)}},n.getTextAnchor=function(t){return Math.abs(t[1]/t[0])>=1?"center":t[0]>0?"start":"end"},n.getMaxLabelWidth=function(t){var e=t.getLabels(),n=0;return a.each(e,function(t){var e=t.getBBox().width;n<e&&(n=e)}),n},n.getMaxLabelHeight=function(t){var e=t.getLabels(),n=0;return a.each(e,function(t){var e=t.getBBox().height;n<e&&(n=e)}),n},n.destroy=function(){if(!this.destroyed){var e=this.get("gridGroup");e&&e.remove();var n=this.get("labelRenderer");n&&n.destroy();this.get("group").destroy(),t.prototype.destroy.call(this)}},n.clear=function(){var t=this.get("group");if(!t.get("destroyed")&&t.get("children").length){var e=this.get("gridGroup");e&&e.clear();var n=this.get("labelRenderer");n&&n.clear();this.get("group").clear()}},n.autoRotateLabels=function(){},n.autoHideLabels=function(){},n.renderTitle=function(){},n.getLinePath=function(){},n.getTickPoint=function(){},n.getTickEnd=function(){},n.getSideVector=function(){},e}(i);t.exports=c},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){return{_id:null,canvas:null,container:null,group:null,capture:!1,coord:null,offset:[0,0],plotRange:null,position:[0,0],visible:!0,zIndex:1}},n._init=function(){},n.clear=function(){},n.destroy=function(){t.prototype.destroy.call(this)},n.beforeRender=function(){},n.render=function(){},n.afterRender=function(){},n.beforeDraw=function(){},n.draw=function(){},n.afterDraw=function(){},n.show=function(){},n.hide=function(){},n.setOffset=function(){},n.setPosition=function(){},n.setVisible=function(){},n.setZIndex=function(){},e}(n(30));t.exports=i},function(t,e,n){var r=n(34),i=n(6);t.exports=function(t){if(!r(t)||!i(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}},function(t,e){function n(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}t.exports=function(t,e,r,i){return e&&n(t,e),r&&n(t,r),i&&n(t,i),t}},function(t,e,n){var r=n(7);t.exports=function(t){return r(t)?"":t.toString()}},function(t,e,n){var r=n(0),i=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi,o={};t.exports={parseRadius:function(t){var e=0,n=0,i=0,a=0;return r.isArray(t)?1===t.length?e=n=i=a=t[0]:2===t.length?(e=i=t[0],n=a=t[1]):3===t.length?(e=t[0],n=a=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],a=t[3]):e=n=i=a=t,{r1:e,r2:n,r3:i,r4:a}},parsePath:function(t){return t=t||[],r.isArray(t)?t:r.isString(t)?(t=t.match(i),r.each(t,function(e,n){if((e=e.match(a))[0].length>1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},numberToColor:function(t){var e=o[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,o[t]=e}return 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(a.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(a.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(a.a)(isNaN(e)?n:e)}},e.a=i;var a=n(93)},function(t,e,n){function r(t,e){return i(e)?e:t.invert(t.scale(e))}var i=n(12),a=n(3),o=n(7),s=n(17),u=n(2),c=function(){function t(t){var e=this;this.type="base",this.name=null,this.method=null,this.values=[],this.scales=[],this.linear=null;var n=null,r=this.callback;if(t.callback){var i=t.callback;n=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var s=i.apply(void 0,n);return o(s)&&(s=r.apply(e,n)),s}}s(this,t),n&&s(this,{callback:n})}var e=t.prototype;return e._getAttrValue=function(t,e){var n=this.values;if(t.isCategory&&!this.linear){return n[t.translate(e)%n.length]}var r=t.scale(e);return this.getLinearValue(r)},e.getLinearValue=function(t){var e=this.values,n=e.length-1,r=Math.floor(n*t),i=n*t-r,a=e[r];return a+((r===n?a:e[r+1])-a)*i},e.callback=function(t){var e=this.scales[0];return"identity"===e.type?e.value:this._getAttrValue(e,t)},e.getNames=function(){for(var t=this.scales,e=this.names,n=Math.min(t.length,e.length),r=[],i=0;i<n;i++)r.push(e[i]);return r},e.getFields=function(){var t=this.scales,e=[];return u(t,function(t){e.push(t.field)}),e},e.getScale=function(t){return this.scales[this.names.indexOf(t)]},e.mapping=function(){for(var t=this.scales,e=this.callback,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=r;if(e){for(var o=0,s=r.length;o<s;o++)r[o]=this._toOriginParam(r[o],t[o]);a=e.apply(this,r)}return a=[].concat(a)},e._toOriginParam=function(t,e){var n=t;if(!e.isLinear)if(a(t)){n=[];for(var i=0,o=t.length;i<o;i++)n.push(r(e,t[i]))}else n=r(e,t);return n},t}();t.exports=c},function(t,e,n){t.exports={Canvas:n(129),Group:n(73),Shape:n(4),Arc:n(77),Circle:n(78),Dom:n(79),Ellipse:n(80),Fan:n(81),Image:n(82),Line:n(83),Marker:n(41),Path:n(84),Polygon:n(85),Polyline:n(86),Rect:n(87),Text:n(88),PathSegment:n(27),PathUtil:n(42),Event:n(72),version:"3.3.6"}},function(t,e,n){var r=n(8);t.exports=function(t){return r(t)?Array.prototype.slice.call(t):[]}},function(t,e,n){var r=n(0).vec2;t.exports={at:function(t,e,n){return(e-t)*n+t},pointDistance:function(t,e,n,i,a,o){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return NaN;var u=[-s[1],s[0]];r.normalize(u,u);var c=[a-t,o-e];return Math.abs(r.dot(c,u))},box:function(t,e,n,r,i){var a=i/2,o=Math.min(t,n),s=Math.max(t,n);return{minX:o-a,minY:Math.min(e,r)-a,maxX:s+a,maxY:Math.max(e,r)+a}},len:function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}}},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,a;return r?t<e?(i=e-t,a=2*Math.PI-n+t):t>n&&(i=2*Math.PI-t+e,a=t-n):(i=t-e,a=n-t),i>a?n:e}function a(t,e,n,r){var a=0;return n-e>=2*Math.PI&&(a=2*Math.PI),e=s.mod(e,2*Math.PI),n=s.mod(n,2*Math.PI)+a,t=s.mod(t,2*Math.PI),r?e>=n?t>n&&t<e?t:i(t,n,e,!0):t<e||t>n?t:i(t,e,n):e<=n?e<t&&t<n?t:i(t,e,n,!0):t>e||t<n?t:i(t,n,e)}function o(t,e,n,r,i,o,u,c,l){var h=[u,c],f=[t,e],g=s.vec2.subtract([],h,f),p=s.vec2.angleTo([1,0],g);p=a(p,r,i,o);var d=[n*Math.cos(p)+t,n*Math.sin(p)+e];l&&(l.x=d[0],l.y=d[1]);return s.vec2.distance(d,h)}var s=n(0);t.exports={nearAngle:a,projectPoint:function(t,e,n,r,i,a,s,u){var c={};return o(t,e,n,r,i,a,s,u,c),c},pointDistance:o,box:function(t,e,n,i,o,u){var c=Math.PI/2,l=Math.PI,h=3*Math.PI/2,f=[],g=a(0,i,o,u);0===g&&f.push(r(t,e,n,0)),(g=a(c,i,o,u))===c&&f.push(r(t,e,n,c)),(g=a(l,i,o,u))===l&&f.push(r(t,e,n,l)),(g=a(h,i,o,u))===h&&f.push(r(t,e,n,h)),f.push(r(t,e,n,i)),f.push(r(t,e,n,o));var p=1/0,d=-1/0,v=1/0,x=-1/0;return s.each(f,function(t){p>t.x&&(p=t.x),d<t.x&&(d=t.x),v>t.y&&(v=t.y),x<t.y&&(x=t.y)}),{minX:p,minY:v,maxX:d,maxY:x}}}},function(t,e,n){function r(t,e,n,r,i,a,o){var g,p,d,v,x,m,y;if(!e.fill){var b=e.arrowLength||h,_=e.arrowAngle?e.arrowAngle*s/180:f;y=l(r-a,n-i),x=Math.abs(e.lineWidth*c(y))/2,m=Math.abs(e.lineWidth*u(y))/2,o&&(x=-x,m=-m),g=i+b*c(y+_/2),p=a+b*u(y+_/2),d=i+b*c(y-_/2),v=a+b*u(y-_/2),t.beginPath(),t.moveTo(g-x,p-m),t.lineTo(i-x,a-m),t.lineTo(d-x,v-m),t.moveTo(i-x,a-m),t.lineTo(i+x,a+m),t.moveTo(i,a),t.stroke()}}function i(t,e,n,r,i,s,u){var c=u?e.startArrow:e.endArrow,l=c.d,h=0,f=i-n,g=s-r,p=Math.atan(f/g);0===g&&f<0?h=Math.PI:f>0&&g>0?h=Math.PI/2-p:f<0&&g<0?h=-Math.PI/2-p:f>=0&&g<0?h=-p-Math.PI/2:f<=0&&g>0&&(h=Math.PI/2-p);var d=function(t){var e,n=[],r=a.parsePath(t.path);if(!Array.isArray(r)||0===r.length||"M"!==r[0][0]&&"m"!==r[0][0])return!1;for(var i=r.length,s=0;s<r.length;s++){var u=r[s];e=new o(u,e,s===i-1),n.push(e)}return n}(c);if(d){l&&(u?(i+=Math.sin(Math.abs(p))*l,s=s+Math.cos(Math.abs(p))*l-.5*t.lineWidth):(i-=Math.sin(Math.abs(p))*l,s=s-Math.cos(Math.abs(p))*l+.5*t.lineWidth)),t.save(),t.beginPath(),t.translate(i,s),t.rotate(h);for(var v=0;v<d.length;v++)d[v].draw(t);t.setTransform(1,0,0,1,0,0),t.fillStyle=t.strokeStyle,t.fill(),t.restore()}}var a=n(19),o=n(27),s=Math.PI,u=Math.sin,c=Math.cos,l=Math.atan2,h=10,f=s/3;t.exports={addStartArrow:function(t,e,n,a,o,s){"object"==typeof e.startArrow?i(t,e,n,a,o,s,!0):e.startArrow&&r(t,e,n,a,o,s,!0)},addEndArrow:function(t,e,n,a,o,s){"object"==typeof e.endArrow?i(t,e,n,a,o,s,!1):e.endArrow&&r(t,e,n,a,o,s,!1)}}},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 a(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function o(t,e){return(t[0]*e[0]+t[1]*e[1])/(a(t)*a(e))}function s(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(o(t,e))}var u=n(0),c=n(39),l=n(40),h=n(75),f=n(76),g=u.vec3,p=u.mat3,d=["m","l","c","a","q","h","v","t","s","z"],v=function(t,e,n){this.preSegment=e,this.isLast=n,this.init(t,e)};u.augment(v,{init:function(t,e){var n=t[0];e=e||{endPoint:{x:0,y:0}};var a,c,l,h,f=d.indexOf(n)>=0,g=f?n.toUpperCase():n,p=t,v=e.endPoint,x=p[1],m=p[2];switch(g){default:break;case"M":h=f?r(x,m,v):{x:x,y:m},this.command="M",this.params=[v,h],this.subStart=h,this.endPoint=h;break;case"L":h=f?r(x,m,v):{x:x,y:m},this.command="L",this.params=[v,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-v.x,h.y-v.y]},this.startTangent=function(){return[v.x-h.x,v.y-h.y]};break;case"H":h=f?r(x,0,v):{x:x,y:v.y},this.command="L",this.params=[v,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-v.x,h.y-v.y]},this.startTangent=function(){return[v.x-h.x,v.y-h.y]};break;case"V":h=f?r(0,x,v):{x:v.x,y:x},this.command="L",this.params=[v,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-v.x,h.y-v.y]},this.startTangent=function(){return[v.x-h.x,v.y-h.y]};break;case"Q":f?(a=r(x,m,v),c=r(p[3],p[4],v)):(a={x:x,y:m},c={x:p[3],y:p[4]}),this.command="Q",this.params=[v,a,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return[c.x-a.x,c.y-a.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]};break;case"T":c=f?r(x,m,v):{x:x,y:m},"Q"===e.command?(a=i(e.params[1],v),this.command="Q",this.params=[v,a,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return[c.x-a.x,c.y-a.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]}):(this.command="TL",this.params=[v,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return[c.x-v.x,c.y-v.y]},this.startTangent=function(){return[v.x-c.x,v.y-c.y]});break;case"C":f?(a=r(x,m,v),c=r(p[3],p[4],v),l=r(p[5],p[6],v)):(a={x:x,y:m},c={x:p[3],y:p[4]},l={x:p[5],y:p[6]}),this.command="C",this.params=[v,a,c,l],this.subStart=e.subStart,this.endPoint=l,this.endTangent=function(){return[l.x-c.x,l.y-c.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]};break;case"S":f?(c=r(x,m,v),l=r(p[3],p[4],v)):(c={x:x,y:m},l={x:p[3],y:p[4]}),"C"===e.command?(a=i(e.params[2],v),this.command="C",this.params=[v,a,c,l],this.subStart=e.subStart,this.endPoint=l,this.endTangent=function(){return[l.x-c.x,l.y-c.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]}):(this.command="SQ",this.params=[v,c,l],this.subStart=e.subStart,this.endPoint=l,this.endTangent=function(){return[l.x-c.x,l.y-c.y]},this.startTangent=function(){return[v.x-c.x,v.y-c.y]});break;case"A":var y=x,b=m,_=p[3],M=p[4],S=p[5];h=f?r(p[6],p[7],v):{x:p[6],y:p[7]},this.command="A";var w=function(t,e,n,r,i,a,c){var l=u.mod(u.toRadian(c),2*Math.PI),h=t.x,f=t.y,g=e.x,p=e.y,d=Math.cos(l)*(h-g)/2+Math.sin(l)*(f-p)/2,v=-1*Math.sin(l)*(h-g)/2+Math.cos(l)*(f-p)/2,x=d*d/(i*i)+v*v/(a*a);x>1&&(i*=Math.sqrt(x),a*=Math.sqrt(x));var m=i*i*(v*v)+a*a*(d*d),y=Math.sqrt((i*i*(a*a)-m)/m);n===r&&(y*=-1),isNaN(y)&&(y=0);var b=y*i*v/a,_=y*-a*d/i,M=(h+g)/2+Math.cos(l)*b-Math.sin(l)*_,S=(f+p)/2+Math.sin(l)*b+Math.cos(l)*_,w=s([1,0],[(d-b)/i,(v-_)/a]),k=[(d-b)/i,(v-_)/a],A=[(-1*d-b)/i,(-1*v-_)/a],P=s(k,A);return o(k,A)<=-1&&(P=Math.PI),o(k,A)>=1&&(P=0),0===r&&P>0&&(P-=2*Math.PI),1===r&&P<0&&(P+=2*Math.PI),[t,M,S,i,a,w,P,l,r]}(v,h,M,S,y,b,_);this.params=w;var k=e.subStart;this.subStart=k,this.endPoint=h;var A=w[5]%(2*Math.PI);u.isNumberEqual(A,2*Math.PI)&&(A=0);var P=w[6]%(2*Math.PI);u.isNumberEqual(P,2*Math.PI)&&(P=0);var C=.001;this.startTangent=function(){0===S&&(C*=-1);var t=w[3]*Math.cos(A-C)+w[1],e=w[4]*Math.sin(A-C)+w[2];return[t-k.x,e-k.y]},this.endTangent=function(){var t=w[6];t-2*Math.PI<1e-4&&(t=0);var e=w[3]*Math.cos(A+t+C)+w[1],n=w[4]*Math.sin(A+t-C)+w[2];return[v.x-e,v.y-n]};break;case"Z":this.command="Z",this.params=[v,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this.command,i=this.params,a=this.box;if(a&&!c.box(a.minX,a.maxX,a.minY,a.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 o=i,s=o[1],u=o[2],l=o[3],h=o[4],f=o[5],d=o[6],v=o[7],x=o[8],m=l>h?l:h,y=l>h?1:l/h,b=l>h?h/l:1;o=[t,e,1];var _=[1,0,0,0,1,0,0,0,1];return p.translate(_,_,[-s,-u]),p.rotate(_,_,-v),p.scale(_,_,[1/y,1/b]),g.transformMat3(o,o,_),c.arcline(0,0,m,f,f+d,1-x,n,o[0],o[1])}return!1},draw:function(t){var e,n,r,i=this.command,a=this.params;switch(i){default:break;case"M":t.moveTo(a[1].x,a[1].y);break;case"TL":case"L":t.lineTo(a[1].x,a[1].y);break;case"SQ":case"Q":e=a[1],n=a[2],t.quadraticCurveTo(e.x,e.y,n.x,n.y);break;case"C":e=a[1],n=a[2],r=a[3],t.bezierCurveTo(e.x,e.y,n.x,n.y,r.x,r.y);break;case"A":var o=a,s=o[1],u=o[2],c=o[3],l=o[4],h=o[5],f=o[6],g=o[7],p=o[8],d=c>l?c:l,v=c>l?1:c/l,x=c>l?l/c:1;t.translate(s,u),t.rotate(g),t.scale(v,x),t.arc(0,0,d,h,h+f,1-p),t.scale(1/v,1/x),t.rotate(-g),t.translate(-s,-u);break;case"Z":t.closePath()}},getBBox:function(t){var e,n,r,i,a=t/2,o=this.params;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box={minX:Math.min(o[0].x,o[1].x)-a,maxX:Math.max(o[0].x,o[1].x)+a,minY:Math.min(o[0].y,o[1].y)-a,maxY:Math.max(o[0].y,o[1].y)+a};break;case"SQ":case"Q":for(r=0,i=(n=h.extrema(o[0].x,o[1].x,o[2].x)).length;r<i;r++)n[r]=h.at(o[0].x,o[1].x,o[2].x,n[r]);for(n.push(o[0].x,o[2].x),r=0,i=(e=h.extrema(o[0].y,o[1].y,o[2].y)).length;r<i;r++)e[r]=h.at(o[0].y,o[1].y,o[2].y,e);e.push(o[0].y,o[2].y),this.box={minX:Math.min.apply(Math,n)-a,maxX:Math.max.apply(Math,n)+a,minY:Math.min.apply(Math,e)-a,maxY:Math.max.apply(Math,e)+a};break;case"C":for(r=0,i=(n=l.extrema(o[0].x,o[1].x,o[2].x,o[3].x)).length;r<i;r++)n[r]=l.at(o[0].x,o[1].x,o[2].x,o[3].x,n[r]);for(r=0,i=(e=l.extrema(o[0].y,o[1].y,o[2].y,o[3].y)).length;r<i;r++)e[r]=l.at(o[0].y,o[1].y,o[2].y,o[3].y,e[r]);n.push(o[0].x,o[3].x),e.push(o[0].y,o[3].y),this.box={minX:Math.min.apply(Math,n)-a,maxX:Math.max.apply(Math,n)+a,minY:Math.min.apply(Math,e)-a,maxY:Math.max.apply(Math,e)+a};break;case"A":var s=o,u=s[1],c=s[2],g=s[3],p=s[4],d=s[5],v=s[6],x=s[7],m=s[8],y=d,b=d+v,_=f.xExtrema(x,g,p),M=1/0,S=-1/0,w=[y,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var k=_+r;1===m?y<k&&k<b&&w.push(k):b<k&&k<y&&w.push(k)}for(r=0,i=w.length;r<i;r++){var A=f.xAt(x,g,p,u,w[r]);A<M&&(M=A),A>S&&(S=A)}var P=f.yExtrema(x,g,p),C=1/0,I=-1/0,T=[y,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var O=P+r;1===m?y<O&&O<b&&T.push(O):b<O&&O<y&&T.push(O)}for(r=0,i=T.length;r<i;r++){var L=f.yAt(x,g,p,c,T[r]);L<C&&(C=L),L>I&&(I=L)}this.box={minX:M-a,maxX:S+a,minY:C-a,maxY:I+a}}}}),t.exports=v},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){var r=n(8),i=Array.prototype.indexOf;t.exports=function(t,e){return!!r(t)&&i.call(t,e)>-1}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(51),a=n(1),o=function(t){function e(e){var n,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n=t.call(this)||this),i={visible:!0},o=r.getDefaultCfg();return r._attrs=i,a.deepMix(i,o,e),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){return{}},n.get=function(t){return this._attrs[t]},n.set=function(t,e){this._attrs[t]=e},n.changeVisible=function(){},n.destroy=function(){this._attrs={},this.removeAllListeners(),this.destroyed=!0},e}(i);t.exports=o},function(t,e){var n="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};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="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(3);t.exports=function t(e){if("object"!==(void 0===e?"undefined":r(e))||null===e)return e;var n=void 0;if(i(e)){n=[];for(var a=0,o=e.length;a<o;a++)"object"===r(e[a])&&null!=e[a]?n[a]=t(e[a]):n[a]=e[a]}else{n={};for(var s in e)"object"===r(e[s])&&null!=e[s]?n[s]=t(e[s]):n[s]=e[s]}return n}},function(t,e,n){function r(t,e,n,s){n=n||0,s=s||o;for(var u in e)if(e.hasOwnProperty(u)){var c=e[u];null!==c&&i(c)?(i(t[u])||(t[u]={}),n<s?r(t[u],c,n+1,s):t[u]=e[u]):a(c)?(t[u]=[],t[u]=t[u].concat(c)):void 0!==c&&(t[u]=c)}}var i=n(16),a=n(3),o=5;t.exports=function(){for(var t=new Array(arguments.length),e=t.length,n=0;n<e;n++)t[n]=arguments[n];for(var i=t[0],a=1;a<e;a++)r(i,t[a]);return i}},function(t,e){var n="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};t.exports=function(t){return"object"===(void 0===t?"undefined":n(t))&&null!==t}},function(t,e,n){var r=n(34),i=n(8),a=n(12);t.exports=function t(e,n){if(e===n)return!0;if(!e||!n)return!1;if(a(e)||a(n))return!1;if(i(e)||i(n)){if(e.length!==n.length)return!1;for(var o=!0,s=0;s<e.length&&(o=t(e[s],n[s]));s++);return o}if(r(e)||r(n)){var u=Object.keys(e),c=Object.keys(n);if(u.length!==c.length)return!1;for(var l=!0,h=0;h<u.length&&(l=t(e[u[h]],n[u[h]]));h++);return l}return!1}},function(t,e){t.exports=function(t,e,n){return t<e?e:t>n?n:t}},function(t,e,n){var r=n(130);r.translate=function(t,e,n){var i=new Array(9);return r.fromTranslation(i,n),r.multiply(t,i,e)},r.rotate=function(t,e,n){var i=new Array(9);return r.fromRotation(i,n),r.multiply(t,i,e)},r.scale=function(t,e,n){var i=new Array(9);return r.fromScaling(i,n),r.multiply(t,i,e)},t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=i=t},e.toRadian=function(t){return t*a},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6,i=e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,a=(e.RANDOM=Math.random,Math.PI/180)},function(t,e,n){var r=n(24),i=n(75),a=n(40),o=n(25);t.exports={line:function(t,e,n,i,a,o,s){var u=r.box(t,e,n,i,a);if(!this.box(u.minX,u.maxX,u.minY,u.maxY,o,s))return!1;var c=r.pointDistance(t,e,n,i,o,s);return!isNaN(c)&&c<=a/2},polyline:function(t,e,n,r){var i=t.length-1;if(i<1)return!1;for(var a=0;a<i;a++){var o=t[a][0],s=t[a][1],u=t[a+1][0],c=t[a+1][1];if(this.line(o,s,u,c,e,n,r))return!0}return!1},cubicline:function(t,e,n,r,i,o,s,u,c,l,h){return a.pointDistance(t,e,n,r,i,o,s,u,l,h)<=c/2},quadraticline:function(t,e,n,r,a,o,s,u,c){return i.pointDistance(t,e,n,r,a,o,u,c)<=s/2},arcline:function(t,e,n,r,i,a,s,u,c){return o.pointDistance(t,e,n,r,i,a,u,c)<=s/2},rect:function(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r},circle:function(t,e,n,r,i){return Math.pow(r-t,2)+Math.pow(i-e,2)<=Math.pow(n,2)},box:function(t,e,n,r,i,a){return t<=i&&i<=e&&n<=a&&a<=r}}},function(t,e,n){function r(t,e,n,r,i){var a=1-i;return a*a*(a*r+3*i*n)+i*i*(i*t+3*a*e)}function i(t,e,n,i,a,o,u,c,l,h,f){var g,p,d,v,x,m,y,b,_=.005,M=1/0,S=[l,h];for(p=0;p<1;p+=.05)d=[r(t,n,a,u,p),r(e,i,o,c,p)],(v=s.squaredDistance(S,d))<M&&(g=p,M=v);M=1/0;for(var w=0;w<32&&!(_<1e-4);w++)b=g+_,d=[r(t,n,a,u,y=g-_),r(e,i,o,c,y)],v=s.squaredDistance(S,d),y>=0&&v<M?(g=y,M=v):(m=[r(t,n,a,u,b),r(e,i,o,c,b)],x=s.squaredDistance(S,m),b<=1&&x<M?(g=b,M=x):_*=.5);return f&&(f.x=r(t,n,a,u,g),f.y=r(e,i,o,c,g)),Math.sqrt(M)}function a(t,e,n,r,i){return t*(t*(-3*e+9*n-9*r+3*i)+6*e-12*n+6*r)-3*e+3*n}var o=n(0),s=o.vec2;t.exports={at:r,derivativeAt:function(t,e,n,r,i){var a=1-i;return 3*(((e-t)*a+2*(n-e)*i)*a+(r-n)*i*i)},projectPoint:function(t,e,n,r,a,o,s,u,c,l){var h={};return i(t,e,n,r,a,o,s,u,c,l,h),h},pointDistance:i,extrema:function(t,e,n,r){var i,a,s,u=3*t-9*e+9*n-3*r,c=6*e-12*n+6*r,l=3*n-3*r,h=[];if(o.isNumberEqual(u,0))o.isNumberEqual(c,0)||(i=-l/c)>=0&&i<=1&&h.push(i);else{var f=c*c-4*u*l;o.isNumberEqual(f,0)?h.push(-c/(2*u)):f>0&&(a=(-c-(s=Math.sqrt(f)))/(2*u),(i=(-c+s)/(2*u))>=0&&i<=1&&h.push(i),a>=0&&a<=1&&h.push(a))}return h},len:function(t,e,n,r,i,s,u,c,l){o.isNil(l)&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],g=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,d=0;d<12;d++){var v=h*f[d]+h,x=a(v,t,n,i,u),m=a(v,e,r,s,c),y=x*x+m*m;p+=g[d]*Math.sqrt(y)}return h*p}}},function(t,e,n){var r=n(0),i=n(4),a=n(19),o=n(27),s=function t(e){t.superclass.constructor.call(this,e)};s.Symbols={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},s.ATTRS={path:null,lineWidth:1},r.extend(s,i),r.augment(s,{type:"marker",canFill:!0,canStroke:!0,getDefaultAttrs:function(){return{x:0,y:0,lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.radius,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},_getPath:function(){var t,e=this._attrs,n=e.x,i=e.y,a=e.radius||e.r,o=e.symbol||"circle";return(t=r.isFunction(o)?o:s.Symbols[o])?t(n,i,a):(console.warn(o+" marker is not supported."),null)},createPath:function(t){var e=this._cfg.segments;if(!e||this._cfg.hasUpdate){var n=a.parsePath(this._getPath());t.beginPath();var r;e=[];for(var i=0;i<n.length;i++){var s=n[i];r=new o(s,r,i===n.length-1),e.push(r),r.draw(t)}this._cfg.segments=e,this._cfg.hasUpdate=!1}else{t.beginPath();for(var u=0;u<e.length;u++)e[u].draw(t)}}}),t.exports=s},function(t,e,n){function r(t,e){function n(t,e){if(1===t.length)r.push(t[0]),i.push(t[0]);else{for(var a=[],o=0;o<t.length-1;o++)0===o&&r.push(t[0]),o===t.length-2&&i.push(t[o+1]),a[o]=[(1-e)*t[o][0]+e*t[o+1][0],(1-e)*t[o][1]+e*t[o+1][1]];n(a,e)}}var r=[],i=[];return t.length&&n(t,e),{left:r,right:i.reverse()}}function i(t,e,n){var r=null,i=n;return e<i&&(i=e,r="add"),t<i&&(i=t,r="del"),{type:r,min:i}}function a(t,e,n){for(var r,i=[].concat(t),a=1/(n+1),s=o(e)[0],u=1;u<=n;u++)a*=u,0===(r=Math.floor(t.length*a))?i.unshift([s[0]*a+t[r][0]*(1-a),s[1]*a+t[r][1]*(1-a)]):i.splice(r,0,[s[0]*a+t[r][0]*(1-a),s[1]*a+t[r][1]*(1-a)]);return i}function o(t){var e=[];switch(t[0]){case"M":case"L":e.push([t[1],t[2]]);break;case"A":e.push([t[6],t[7]]);break;case"Q":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"T":e.push([t[1],t[2]]);break;case"C":e.push([t[5],t[6]]),e.push([t[1],t[2]]),e.push([t[3],t[4]]);break;case"S":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"H":case"V":e.push([t[1],t[1]])}return e}var s=n(52),u="\t\n\v\f\r \u2028\u2029",c=new RegExp("([a-z])["+u+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+u+"]*,?["+u+"]*)+)","ig"),l=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+u+"]*,?["+u+"]*","ig"),h=function(t){if(!t)return null;if(typeof t==typeof[])return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(c,function(t,r,i){var a=[],o=r.toLowerCase();if(i.replace(l,function(t,e){e&&a.push(+e)}),"m"===o&&a.length>2&&(n.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&n.push([r,a[0]]),"r"===o)n.push([r].concat(a));else for(;a.length>=e[o]&&(n.push([r].concat(a.splice(0,e[o]))),e[o]););}),n},f=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{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?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},g=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["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 a},p=function(t){if(!(t=h(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,s=0,u=0;"M"===t[0][0]&&(o=i=+t[0][1],s=a=+t[0][2],u++,r[0]=["M",i,a]);for(var c,l,p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=u,v=t.length;d<v;d++){if(r.push(c=[]),l=t[d],(e=l[0])!==e.toUpperCase())switch(c[0]=e.toUpperCase(),c[0]){case"A":c[1]=l[1],c[2]=l[2],c[3]=l[3],c[4]=l[4],c[5]=l[5],c[6]=+l[6]+i,c[7]=+l[7]+a;break;case"V":c[1]=+l[1]+a;break;case"H":c[1]=+l[1]+i;break;case"R":for(var x=2,m=(n=[i,a].concat(l.slice(1))).length;x<m;x++)n[x]=+n[x]+i,n[++x]=+n[x]+a;r.pop(),r=r.concat(f(n,p));break;case"O":r.pop(),(n=g(i,a,l[1],l[2])).push(n[0]),r=r.concat(n);break;case"U":r.pop(),r=r.concat(g(i,a,l[1],l[2],l[3])),c=["U"].concat(r[r.length-1].slice(-2));break;case"M":o=+l[1]+i,s=+l[2]+a;break;default:for(var y=1,b=l.length;y<b;y++)c[y]=+l[y]+(y%2?i:a)}else if("R"===e)n=[i,a].concat(l.slice(1)),r.pop(),r=r.concat(f(n,p)),c=["R"].concat(l.slice(-2));else if("O"===e)r.pop(),(n=g(i,a,l[1],l[2])).push(n[0]),r=r.concat(n);else if("U"===e)r.pop(),r=r.concat(g(i,a,l[1],l[2],l[3])),c=["U"].concat(r[r.length-1].slice(-2));else for(var _=0,M=l.length;_<M;_++)c[_]=l[_];if("O"!==(e=e.toUpperCase()))switch(c[0]){case"Z":i=+o,a=+s;break;case"H":i=c[1];break;case"V":a=c[1];break;case"M":o=c[c.length-2],s=c[c.length-1];break;default:i=c[c.length-2],a=c[c.length-1]}}return r},d=function(t,e,n,r){return[t,e,n,r,n,r]},v=function(t,e,n,r,i,a){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*a+2/3*r,i,a]},x=function(t,e){var n,r=p(t),i=e&&p(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=[],u=[],c="",l="",h=function(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(function t(e,n,r,i,a,o,s,u,c,l){r===i&&(r+=1);var h,f,g,p,d,v=120*Math.PI/180,x=Math.PI/180*(+a||0),m=[],y=function(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}};if(l)f=l[0],g=l[1],p=l[2],d=l[3];else{e=(h=y(e,n,-x)).x,n=h.y,u=(h=y(u,c,-x)).x,c=h.y,e===u&&n===c&&(u+=1,c+=1);var b=(e-u)/2,_=(n-c)/2,M=b*b/(r*r)+_*_/(i*i);M>1&&(r*=M=Math.sqrt(M),i*=M);var S=r*r,w=i*i,k=(o===s?-1:1)*Math.sqrt(Math.abs((S*w-S*_*_-w*b*b)/(S*_*_+w*b*b)));p=k*r*_/i+(e+u)/2,d=k*-i*b/r+(n+c)/2,f=Math.asin(((n-d)/i).toFixed(9)),g=Math.asin(((c-d)/i).toFixed(9)),f=e<p?Math.PI-f:f,g=u<p?Math.PI-g:g,f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),s&&f>g&&(f-=2*Math.PI),!s&&g>f&&(g-=2*Math.PI)}var A=g-f;if(Math.abs(A)>v){var P=g,C=u,I=c;g=f+v*(s&&g>f?1:-1),m=t(u=p+r*Math.cos(g),c=d+i*Math.sin(g),r,i,a,0,s,C,I,[g,P,p,d])}A=g-f;var T=Math.cos(f),O=Math.sin(f),L=Math.cos(g),E=Math.sin(g),B=Math.tan(A/4),N=4/3*r*B,j=4/3*i*B,D=[e,n],R=[e+N*O,n-j*T],F=[u+N*E,c-j*L],Y=[u,c];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],l)return[R,F,Y].concat(m);for(var H=[],q=0,z=(m=[R,F,Y].concat(m).join().split(",")).length;q<z;q++)H[q]=q%2?y(m[q-1],m[q],x).y:y(m[q],m[q+1],x).x;return H}.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i].concat(t.slice(1));break;case"T":"Q"===n||"T"===n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(v(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(v(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(d(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(d(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(d(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(d(e.x,e.y,e.X,e.Y))}return t},f=function(t,e){if(t[e].length>7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},g=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var x=0;x<n;x++){r[x]&&(c=r[x][0]),"C"!==c&&(s[x]=c,x&&(l=s[x-1])),r[x]=h(r[x],a,l),"A"!==s[x]&&"C"===c&&(s[x]="C"),f(r,x),i&&(i[x]&&(c=i[x][0]),"C"!==c&&(u[x]=c,x&&(l=u[x-1])),i[x]=h(i[x],o,l),"A"!==u[x]&&"C"===c&&(u[x]="C"),f(i,x)),g(r,i,a,o,x),g(i,r,o,a,x);var m=r[x],y=i&&i[x],b=m.length,_=i&&y.length;a.x=m[b-2],a.y=m[b-1],a.bx=parseFloat(m[b-4])||a.x,a.by=parseFloat(m[b-3])||a.y,o.bx=i&&(parseFloat(y[_-4])||o.x),o.by=i&&(parseFloat(y[_-3])||o.y),o.x=i&&y[_-2],o.y=i&&y[_-1]}return i?[r,i]:r},m=/,?([a-z]),?/gi,y=function(t){return t.join(",").replace(m,"$1")},b=function(t,e,n,r,i){return t*(t*(-3*e+9*n-9*r+3*i)+6*e-12*n+6*r)-3*e+3*n},_=function(t,e,n,r,i,a,o,s,u){null===u&&(u=1);for(var c=(u=u>1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,g=0;g<12;g++){var p=c*l[g]+c,d=b(p,t,n,i,o),v=b(p,e,r,a,s),x=d*d+v*v;f+=h[g]*Math.sqrt(x)}return c*f},M=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)<Math.min(i,o)||Math.min(t,n)>Math.max(i,o)||Math.max(e,r)<Math.min(a,s)||Math.min(e,r)>Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},S=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 a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=y,a},k=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(" ")}},A=function(t,e,n,r,i,a,o,u){s.isArray(t)||(t=[t,e,n,r,i,a,o,u]);var c=function(t,e,n,r,i,a,o,s){for(var u,c,l,h,f=[],g=[[],[]],p=0;p<2;++p)if(0===p?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,l=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&f.push(h)}else{var d=c*c-4*l*u,v=Math.sqrt(d);if(!(d<0)){var x=(-c+v)/(2*u);x>0&&x<1&&f.push(x);var m=(-c-v)/(2*u);m>0&&m<1&&f.push(m)}}for(var y,b=f.length,_=b;b--;)y=1-(h=f[b]),g[0][b]=y*y*y*t+3*y*y*h*n+3*y*h*h*i+h*h*h*o,g[1][b]=y*y*y*e+3*y*y*h*r+3*y*h*h*a+h*h*h*s;return g[0][_]=t,g[1][_]=e,g[0][_+1]=o,g[1][_+1]=s,g[0].length=g[1].length=_+2,{min:{x:Math.min.apply(0,g[0]),y:Math.min.apply(0,g[1])},max:{x:Math.max.apply(0,g[0]),y:Math.max.apply(0,g[1])}}}.apply(null,t);return k(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},P=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,g=f*u,p=t+2*u*(n-t)+f*(i-2*n+t),d=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),x=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+g*o,y:l*e+3*h*u*r+3*c*u*u*a+g*s,m:{x:p,y:d},n:{x:v,y:x},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(p-v,d-x)/Math.PI}},C=function(t,e,n){if(!function(t,e){return t=k(t),e=k(e),S(e,t.x,t.y)||S(e,t.x2,t.y)||S(e,t.x,t.y2)||S(e,t.x2,t.y2)||S(t,e.x,e.y)||S(t,e.x2,e.y)||S(t,e.x,e.y2)||S(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)}(A(t),A(e)))return n?0:[];for(var r=~~(_.apply(0,t)/8),i=~~(_.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c<r+1;c++){var l=P.apply(0,t.concat(c/r));a.push({x:l.x,y:l.y,t:c/r})}for(var h=0;h<i+1;h++){var f=P.apply(0,e.concat(h/i));o.push({x:f.x,y:f.y,t:h/i})}for(var g=0;g<r;g++)for(var p=0;p<i;p++){var d=a[g],v=a[g+1],x=o[p],m=o[p+1],y=Math.abs(v.x-d.x)<.001?"y":"x",b=Math.abs(m.x-x.x)<.001?"y":"x",w=M(d.x,d.y,v.x,v.y,x.x,x.y,m.x,m.y);if(w){if(s[w.x.toFixed(4)]===w.y.toFixed(4))continue;s[w.x.toFixed(4)]=w.y.toFixed(4);var C=d.t+Math.abs((w[y]-d[y])/(v[y]-d[y]))*(v.t-d.t),I=x.t+Math.abs((w[b]-x[b])/(m[b]-x[b]))*(m.t-x.t);C>=0&&C<=1&&I>=0&&I<=1&&(n?u++:u.push({x:w.x,y:w.y,t1:C,t2:I}))}}return u},I=function(t,e,n){if(1===n)return[[].concat(t)];var i=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])i=i.concat(function(t,e,n){var i=[[t[1],t[2]]];n=n||2;var a=[];"A"===e[0]?(i.push(e[6]),i.push(e[7])):"C"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]]),i.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]])):i.push([e[1],e[2]]);for(var o=i,s=1/n,u=0;u<n-1;u++){var c=r(o,s/(1-s*u));a.push(c.left),o=c.right}return a.push(o),a.map(function(t){var e=[];return 4===t.length&&(e.push("C"),e=e.concat(t[2])),t.length>=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])})}(t,e,n));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=n-1;o++)i.push(a)}return i},T=function(t,e){if(t.length!==e.length)return!1;var n=!0;return s.each(t,function(t,r){if(t!==e[r])return n=!1,!1}),n};t.exports={parsePathString:h,parsePathArray:y,pathTocurve:x,pathToAbsolute:p,catmullRomToBezier:f,rectPath:w,fillPath:function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o<r-n;o++)t.push(t[0]);return t}for(var s=0;s<r;s++){var u=Math.floor(i*s);a[u]=(a[u]||0)+1}var c=a.reduce(function(e,r,i){return i===n?e.concat(t[n]):e.concat(I(t[i],t[i+1],r))},[]);return c.unshift(t[0]),"Z"!==e[r]&&"z"!==e[r]||c.push("Z"),c},fillPathByDiff:function(t,e){var n=function(t,e){var n,r,a=t.length,o=e.length,s=0;if(0===a||0===o)return null;for(var u=[],c=0;c<=a;c++)u[c]=[],u[c][0]={min:c};for(var l=0;l<=o;l++)u[0][l]={min:l};for(var h=1;h<=a;h++){n=t[h-1];for(var f=1;f<=o;f++){r=e[f-1],s=T(n,r)?0:1;var g=u[h-1][f].min+1,p=u[h][f-1].min+1,d=u[h-1][f-1].min+s;u[h][f]=i(g,p,d)}}return u}(t,e),r=t.length,a=e.length,o=[],s=1,u=1;if(n[r][a]!==r){for(var c=1;c<=r;c++){var l=n[c][c].min;u=c;for(var h=s;h<=a;h++)n[c][h].min<l&&(l=n[c][h].min,u=h);s=u,n[c][s].type&&o.push({index:c-1,type:n[c][s].type})}for(var f=o.length-1;f>=0;f--)s=o[f].index,"add"===o[f].type?t.splice(s,0,[].concat(t[s])):t.splice(s,1)}var g=a-(r=t.length);if(r<a)for(var p=0;p<g;p++)"z"===t[r-1][0]||"Z"===t[r-1][0]?t.splice(r-2,0,t[r-2]):t.push(t[r-1]),r+=1;return t},formatPath:function(t,e){if(t.length<=1)return t;for(var n,r=0;r<e.length;r++)if(t[r][0]!==e[r][0])switch(n=o(t[r]),e[r][0]){case"M":t[r]=["M"].concat(n[0]);break;case"L":t[r]=["L"].concat(n[0]);break;case"A":t[r]=[].concat(e[r]),t[r][6]=n[0][0],t[r][7]=n[0][1];break;case"Q":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],2)}t[r]=["C"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],1)}t[r]=["S"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;default:t[r]=e[r]}return t},intersection:function(t,e){return function(t,e,n){t=x(t),e=x(e);for(var r,i,a,o,s,u,c,l,h,f,g=n?0:[],p=0,d=t.length;p<d;p++){var v=t[p];if("M"===v[0])r=s=v[1],i=u=v[2];else{"C"===v[0]?(r=(h=[r,i].concat(v.slice(1)))[6],i=h[7]):(h=[r,i,r,i,s,u,s,u],r=s,i=u);for(var m=0,y=e.length;m<y;m++){var b=e[m];if("M"===b[0])a=c=b[1],o=l=b[2];else{"C"===b[0]?(a=(f=[a,o].concat(b.slice(1)))[6],o=f[7]):(f=[a,o,a,o,c,l,c,l],a=c,o=l);var _=C(h,f,n);if(n)g+=_;else{for(var M=0,S=_.length;M<S;M++)_[M].segment1=p,_[M].segment2=m,_[M].bez1=h,_[M].bez2=f;g=g.concat(_)}}}}}return g}(t,e)}}},function(t,e,n){"use strict";function r(){return m||(_(i),m=b.now()+y)}function i(){m=0}function a(){this._call=this._time=this._next=null}function o(t,e,n){var r=new a;return r.restart(t,e,n),r}function s(){r(),++g;for(var t,e=h;e;)(t=m-e._time)>=0&&e._call.call(null,t),e=e._next;--g}function u(){m=(x=b.now())+y,g=p=0;try{s()}finally{g=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);f=t,l(r)}(),m=0}}function c(){var t=b.now(),e=t-x;e>v&&(y-=e,x=t)}function l(t){if(!g){p&&(p=clearTimeout(p));t-m>24?(t<1/0&&(p=setTimeout(u,t-b.now()-y)),d&&(d=clearInterval(d))):(d||(x=b.now(),d=setInterval(c,v)),g=1,_(u))}}e.b=r,e.a=a,e.c=o,e.d=s;var h,f,g=0,p=0,d=0,v=1e3,x=0,m=0,y=0,b="object"==typeof performance&&performance.now?performance:Date,_="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};a.prototype=o.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||f===this||(f?f._next=this:h=this,f=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}}},function(t,e,n){"use strict";var r=n(13),i=n(91),a=n(94),o=n(95),s=n(28),u=n(96),c=n(97),l=n(93);e.a=function(t,e){var n,h=typeof 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?o.a:Array.isArray(e)?a.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(){return this.rgb().formatHex()}function a(){return this.rgb().formatRgb()}function o(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=A.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?s(e):3===n?new h(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?u(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?u(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=P.exec(t))?new h(e[1],e[2],e[3],1):(e=C.exec(t))?new h(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=I.exec(t))?u(e[1],e[2],e[3],e[4]):(e=T.exec(t))?u(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=O.exec(t))?d(e[1],e[2]/100,e[3]/100,1):(e=L.exec(t))?d(e[1],e[2]/100,e[3]/100,e[4]):E.hasOwnProperty(t)?s(E[t]):"transparent"===t?new h(NaN,NaN,NaN,0):null}function s(t){return new h(t>>16&255,t>>8&255,255&t,1)}function u(t,e,n,r){return r<=0&&(t=e=n=NaN),new h(t,e,n,r)}function c(t){return t instanceof r||(t=o(t)),t?(t=t.rgb(),new h(t.r,t.g,t.b,t.opacity)):new h}function l(t,e,n,r){return 1===arguments.length?c(t):new h(t,e,n,null==r?1:r)}function h(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function f(){return"#"+p(this.r)+p(this.g)+p(this.b)}function g(){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+")")}function p(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function d(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new m(t,e,n,r)}function v(t){if(t instanceof m)return new m(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=o(t)),!t)return new m;if(t instanceof m)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,a=Math.min(e,n,i),s=Math.max(e,n,i),u=NaN,c=s-a,l=(s+a)/2;return c?(u=e===s?(n-i)/c+6*(n<i):n===s?(i-e)/c+2:(e-n)/c+4,c/=l<.5?s+a:2-s-a,u*=60):c=l>0&&l<1?0:u,new m(u,c,l,t.opacity)}function x(t,e,n,r){return 1===arguments.length?v(t):new m(t,e,n,null==r?1:r)}function m(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function y(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 _}),n.d(e,"c",function(){return M}),e.e=o,e.h=c,e.g=l,e.b=h,e.f=x;var b=n(46),_=.7,M=1/_,S="\\s*([+-]?\\d+)\\s*",w="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",k="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",A=/^#([0-9a-f]{3,8})$/,P=new RegExp("^rgb\\("+[S,S,S]+"\\)$"),C=new RegExp("^rgb\\("+[k,k,k]+"\\)$"),I=new RegExp("^rgba\\("+[S,S,S,w]+"\\)$"),T=new RegExp("^rgba\\("+[k,k,k,w]+"\\)$"),O=new RegExp("^hsl\\("+[w,k,k]+"\\)$"),L=new RegExp("^hsla\\("+[w,k,k,w]+"\\)$"),E={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(b.a)(r,o,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:i,formatHex:i,formatHsl:function(){return v(this).formatHsl()},formatRgb:a,toString:a}),Object(b.a)(h,l,Object(b.b)(r,{brighter:function(t){return t=null==t?M:Math.pow(M,t),new h(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?_:Math.pow(_,t),new h(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:f,formatHex:f,formatRgb:g,toString:g})),Object(b.a)(m,x,Object(b.b)(r,{brighter:function(t){return t=null==t?M:Math.pow(M,t),new m(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?_:Math.pow(_,t),new m(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 h(y(t>=240?t-240:t+120,i,r),y(t,i,r),y(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}))},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 a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*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),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,u=i<e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,u)}}},function(t,e,n){var r=n(2),i=n(8);t.exports=function(t,e){if(!i(t))return t;var n=[];return r(t,function(t,r){e(t,r)&&n.push(t)}),n}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(120),o=n(275),s=n(9).FONT_FAMILY,u=i.Event,c=i.Group,l=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"continuous-legend",items:null,layout:"vertical",width:20,height:156,textStyle:{fill:"#333",textAlign:"center",textBaseline:"middle",stroke:"#fff",lineWidth:5,fontFamily:s},hoverTextStyle:{fill:"rgba(0,0,0,0.25)"},slidable:!0,triggerAttr:{fill:"#fff",shadowBlur:10,shadowColor:"rgba(0,0,0,0.65)",radius:2},_range:[0,100],middleBackgroundStyle:{fill:"#D9D9D9"},textOffset:4,lineStyle:{lineWidth:1,stroke:"#fff"},pointerStyle:{fill:"rgb(230, 230, 230)"}})},n._calStartPoint=function(){var t={x:10,y:this.get("titleGap")-8},e=this.get("titleShape");if(e){var n=e.getBBox();t.y+=n.height}return t},n.beforeRender=function(){var e=this.get("items");i.isArray(e)&&!i.isEmpty(e)&&(t.prototype.beforeRender.call(this),this.set("firstItem",e[0]),this.set("lastItem",e[e.length-1]))},n._formatItemValue=function(t){var e=this.get("formatter")||this.get("itemFormatter");return e&&(t=e.call(this,t)),t},n.render=function(){t.prototype.render.call(this),this.get("slidable")?this._renderSlider():this._renderUnslidable()},n._renderSlider=function(){var t=new c,e=new c,n=new c,r=this._calStartPoint(),i=this.get("group").addGroup(o,{minHandleElement:t,maxHandleElement:e,backgroundElement:n,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()},n._addMiddleBar=function(t,e,n){return t.addShape(e,{attrs:i.mix({},n,this.get("middleBackgroundStyle"))}),t.addShape(e,{attrs:n})},n._renderTrigger=function(){var t=this.get("firstItem"),e=this.get("lastItem"),n=this.get("layout"),r=this.get("textStyle"),a=this.get("triggerAttr"),o=i.mix({},a),s=i.mix({},a),u=i.mix({text:this._formatItemValue(t.value)+""},r),c=i.mix({text:this._formatItemValue(e.value)+""},r);"vertical"===n?(this._addVerticalTrigger("min",o,u),this._addVerticalTrigger("max",s,c)):(this._addHorizontalTrigger("min",o,u),this._addHorizontalTrigger("max",s,c))},n._addVerticalTrigger=function(t,e,n){var r=this.get("slider").get(t+"HandleElement"),a=this.get("width"),o=r.addShape("rect",{attrs:i.mix({x:a/2-8-2,y:"min"===t?0:-8,width:18,height:8},e)}),s=r.addShape("text",{attrs:i.mix(n,{x:a+this.get("textOffset"),y:"max"===t?-4:4,textAlign:"start",lineHeight:1,textBaseline:"middle"})}),u="vertical"===this.get("layout")?"ns-resize":"ew-resize";o.attr("cursor",u),s.attr("cursor",u),this.set(t+"ButtonElement",o),this.set(t+"TextElement",s)},n._addHorizontalTrigger=function(t,e,n){var r=this.get("slider").get(t+"HandleElement"),a=r.addShape("rect",{attrs:i.mix({x:"min"===t?-8:0,y:-8-this.get("height")/2,width:8,height:16},e)}),o=r.addShape("text",{attrs:i.mix(n,{x:"min"===t?-12:12,y:4+this.get("textOffset")+10,textAlign:"min"===t?"end":"start",textBaseline:"middle"})}),s="vertical"===this.get("layout")?"ns-resize":"ew-resize";a.attr("cursor",s),o.attr("cursor",s),this.set(t+"ButtonElement",a),this.set(t+"TextElement",o)},n._bindEvents=function(){var t=this;if(this.get("slidable")){this.get("slider").on("sliderchange",function(e){var n=e.range,r=t.get("firstItem").value,i=t.get("lastItem").value,a=r+n[0]/100*(i-r),o=r+n[1]/100*(i-r);t._updateElement(a,o);var s=new u("itemfilter",e,!0,!0);s.range=[a,o],t.emit("itemfilter",s)})}this.get("hoverable")&&(this.get("group").on("mousemove",i.wrapBehavior(this,"_onMouseMove")),this.get("group").on("mouseleave",i.wrapBehavior(this,"_onMouseLeave")))},n._updateElement=function(t,e){var n=this.get("minTextElement"),r=this.get("maxTextElement");e>1&&(t=parseInt(t,10),e=parseInt(e,10)),n.attr("text",this._formatItemValue(t)+""),r.attr("text",this._formatItemValue(e)+"")},n._onMouseLeave=function(){var t=this.get("group").findById("hoverPointer");t&&t.destroy();var e=this.get("group").findById("hoverText");e&&e.destroy(),this.get("canvas").draw()},n._onMouseMove=function(t){var e,n=this.get("height"),r=this.get("width"),i=this.get("items"),a=this.get("canvas").get("el").getBoundingClientRect(),o=this.get("group").getBBox();if("vertical"===this.get("layout")){var s=5;"color-legend"===this.get("type")&&(s=30);var u=this.get("titleGap"),c=this.get("titleShape");c&&(u+=c.getBBox().maxY-c.getBBox().minY);var l=t.clientY||t.event.clientY;l=l-a.y-this.get("group").attr("matrix")[7]+o.y-s+u,e=i[0].value+(1-l/n)*(i[i.length-1].value-i[0].value)}else{var h=t.clientX||t.event.clientX;h=h-a.x-this.get("group").attr("matrix")[6],e=i[0].value+h/r*(i[i.length-1].value-i[0].value)}e=e.toFixed(2),this.activate(e),this.emit("mousehover",{value:e})},n.activate=function(t){if(t){var e=this.get("group").findById("hoverPointer"),n=this.get("group").findById("hoverText"),r=this.get("items");if(!(t<r[0].value||t>r[r.length-1].value)){var a,o=this.get("height"),s=this.get("width"),u=this.get("titleShape"),c=this.get("titleGap"),l=[],h=(t-r[0].value)/(r[r.length-1].value-r[0].value);if("vertical"===this.get("layout")){var f=0,g=0;"color-legend"===this.get("type")&&(f=c,u&&(f+=u.getBBox().height)),this.get("slidable")&&("color-legend"===this.get("type")?f-=13:(f=c-15,u&&(f+=u.getBBox().height)),g+=10),l=[[g,(h=(1-h)*o)+f],[g-10,h+f-5],[g-10,h+f+5]],a=i.mix({},{x:s+this.get("textOffset")/2+g,y:h+f,text:this._formatItemValue(t)+""},this.get("textStyle"),{textAlign:"start"})}else{var p=0,d=0;"color-legend"===this.get("type")&&(p=c,u&&(p+=u.getBBox().height)),this.get("slidable")&&("color-legend"===this.get("type")?p-=7:(p=c,u||(p-=7)),d+=10),l=[[(h*=s)+d,p],[h+d-5,p-10],[h+d+5,p-10]],a=i.mix({},{x:h-5,y:o+this.get("textOffset")+p,text:this._formatItemValue(t)+""},this.get("textStyle"))}var v=i.mix(a,this.get("hoverTextStyle"));n?n.attr(v):(n=this.get("group").addShape("text",{attrs:v})).set("id","hoverText"),e?e.attr(i.mix({points:l},this.get("pointerStyle"))):(e=this.get("group").addShape("Polygon",{attrs:i.mix({points:l},this.get("pointerStyle"))})).set("id","hoverPointer"),this.get("canvas").draw()}}},n.deactivate=function(){var t=this.get("group").findById("hoverPointer");t&&t.destroy();var e=this.get("group").findById("hoverText");e&&e.destroy(),this.get("canvas").draw()},e}(a);t.exports=l},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(30),a=n(1),o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{x:0,y:0,items:null,titleContent:null,showTitle:!0,plotRange:null,offset:10,timeStamp:0,inPlot:!0,crosshairs:null})},n.isContentChange=function(t,e){var n=this.get("titleContent"),r=this.get("items"),i=!(t===n&&r.length===e.length);return i||a.each(e,function(t,e){var n=r[e];for(var o in t)if(t.hasOwnProperty(o)&&!a.isObject(t[o])&&t[o]!==n[o]){i=!0;break}if(i)return!1}),i},n.setContent=function(t,e){var n=(new Date).valueOf();return this.set("items",e),this.set("titleContent",t),this.set("timeStamp",n),this.render(),this},n.setPosition=function(t,e){this.set("x",t),this.set("y",e)},n.render=function(){},n.clear=function(){},n.show=function(){this.set("visible",!0)},n.hide=function(){this.set("visible",!1)},e}(i);t.exports=o},function(t,e,n){var r;!function(e){"use strict";function i(){}function a(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function o(t){return function(){return this[t].apply(this,arguments)}}function s(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&s(t.listener)}var u=i.prototype,c=e.EventEmitter;u.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},u.flattenListeners=function(t){var e,n=[];for(e=0;e<t.length;e+=1)n.push(t[e].listener);return n},u.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&((e={})[t]=n),e||n},u.addListener=function(t,e){if(!s(e))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(t),i="object"==typeof e;for(n in r)r.hasOwnProperty(n)&&-1===a(r[n],e)&&r[n].push(i?e:{listener:e,once:!1});return this},u.on=o("addListener"),u.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},u.once=o("addOnceListener"),u.defineEvent=function(t){return this.getListeners(t),this},u.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},u.removeListener=function(t,e){var n,r,i=this.getListenersAsObject(t);for(r in i)i.hasOwnProperty(r)&&-1!==(n=a(i[r],e))&&i[r].splice(n,1);return this},u.off=o("removeListener"),u.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},u.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},u.manipulateListeners=function(t,e,n){var r,i,a=t?this.removeListener:this.addListener,o=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(r=n.length;r--;)a.call(this,e,n[r]);else for(r in e)e.hasOwnProperty(r)&&(i=e[r])&&("function"==typeof i?a.call(this,r,i):o.call(this,r,i));return this},u.removeEvent=function(t){var e,n=typeof t,r=this._getEvents();if("string"===n)delete r[t];else if(t instanceof RegExp)for(e in r)r.hasOwnProperty(e)&&t.test(e)&&delete r[e];else delete this._events;return this},u.removeAllListeners=o("removeEvent"),u.emitEvent=function(t,e){var n,r,i,a,o=this.getListenersAsObject(t);for(a in o)if(o.hasOwnProperty(a))for(n=o[a].slice(0),i=0;i<n.length;i++)!0===(r=n[i]).once&&this.removeListener(t,r.listener),r.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,r.listener);return this},u.trigger=o("emitEvent"),u.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},u.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},u._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},u._getEvents=function(){return this._events||(this._events={})},i.noConflict=function(){return e.EventEmitter=c,i},void 0!==(r=function(){return i}.call(e,n,e,t))&&(t.exports=r)}(this||{})},function(t,e,n){t.exports={isFunction:n(5),isObject:n(31),isBoolean:n(53),isNil:n(7),isString:n(12),isArray:n(3),isNumber:n(10),isEmpty:n(54),uniqueId:n(57),clone:n(32),deepMix:n(33),assign:n(17),merge:n(33),upperFirst:n(58),each:n(2),isEqual:n(35),toArray:n(23),extend:n(59),augment:n(60),remove:n(61),isNumberEqual:n(62),toRadian:n(63),toDegree:n(64),mod:n(65),clamp:n(36),createDom:n(66),modifyCSS:n(67),requestAnimationFrame:n(68),getRatio:function(){return window.devicePixelRatio?window.devicePixelRatio:2},mat3:n(37),vec2:n(69),vec3:n(70),transform:n(71)}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Boolean")}},function(t,e,n){var r=n(7),i=n(8),a=n(55),o=n(56),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(r(t))return!0;if(i(t))return!t.length;var e=a(t);if("Map"===e||"Set"===e)return!t.size;if(o(t))return!Object.keys(t).length;for(var n in t)if(s.call(t,n))return!1;return!0}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).replace(/^\[object /,"").replace(/\]$/,"")}},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){var n=function(){var t={};return function(e){return e=e||"g",t[e]?t[e]+=1:t[e]=1,e+t[e]}}();t.exports=n},function(t,e,n){var r=n(18);t.exports=function(t){var e=r(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){var r=n(5),i=n(17);t.exports=function(t,e,n,a){r(e)||(n=e,e=t,t=function(){});var o=Object.create?function(t,e){return Object.create(t,{constructor:{value:e}})}:function(t,e){function n(){}n.prototype=t;var r=new n;return r.constructor=e,r},s=o(e.prototype,t);return t.prototype=i(s,t.prototype),t.superclass=o(e.prototype,e),i(s,n),i(t,a),t}},function(t,e,n){var r=n(5),i=n(23),a=n(17);t.exports=function(t){for(var e=i(arguments),n=1;n<e.length;n++){var o=e[n];r(o)&&(o=o.prototype),a(t.prototype,o)}}},function(t,e){var n=Array.prototype,r=n.splice,i=n.indexOf,a=n.slice;t.exports=function(t){for(var e=a.call(arguments,1),n=0;n<e.length;n++)for(var o=e[n],s=-1;(s=i.call(t,o))>-1;)r.call(t,s,1);return t}},function(t,e){t.exports=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5;return Math.abs(t-e)<n}},function(t,e){var n=Math.PI/180;t.exports=function(t){return n*t}},function(t,e){var n=180/Math.PI;t.exports=function(t){return n*t}},function(t,e){t.exports=function(t,e){return(t%e+e)%e}},function(t,e){var n=document.createElement("table"),r=document.createElement("tr"),i=/^\s*<(\w+|!)[^>]*>/,a={tr:document.createElement("tbody"),tbody:n,thead:n,tfoot:n,td:r,th:r,"*":document.createElement("div")};t.exports=function(t){var e=i.test(t)&&RegExp.$1;e in a||(e="*");var n=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r}},function(t,e){t.exports=function(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}},function(t,e){t.exports=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}},function(t,e,n){var r=n(131),i=n(36);r.angle=function(t,e){var n=r.dot(t,e)/(r.length(t)*r.length(e));return Math.acos(i(n,-1,1))},r.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},r.angleTo=function(t,e,n){var i=r.angle(t,e),a=r.direction(t,e)>=0;return n?a?2*Math.PI-i:i:a?i:2*Math.PI-i},r.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},t.exports=r},function(t,e,n){var r=n(132);t.exports=r},function(t,e,n){var r=n(32),i=n(2),a=n(37);t.exports=function(t,e){return t=r(t),i(e,function(e){switch(e[0]){case"t":a.translate(t,t,[e[1],e[2]]);break;case"s":a.scale(t,t,[e[1],e[2]]);break;case"r":a.rotate(t,t,e[1]);break;case"m":a.multiply(t,t,e[1]);break;default:return!1}}),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,i=t.length-1;i>=0;i--){var a=t[i];if(a._cfg.visible&&a._cfg.capture&&(a.isGroup?r=a.getShape(e,n):a.isHit(e,n)&&(r=a)),r)break}return r}function i(t){if(!t._cfg&&t!==l){var e=t.superclass.constructor;e&&!e._cfg&&i(e),t._cfg={},a.merge(t._cfg,e._cfg),a.merge(t._cfg,t.CFG)}}var a=n(0),o=n(74),s=n(136),u={},c="_INDEX",l=function t(e){t.superclass.constructor.call(this,e),this.set("children",[]),this.set("tobeRemoved",[]),this._beforeRenderUI(),this._renderUI(),this._bindUI()};a.extend(l,o),a.augment(l,{isGroup:!0,type:"group",canFill:!0,canStroke:!0,getDefaultCfg:function(){return i(this.constructor),a.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=a.upperFirst(t),u[t]=r),e.attrs&&n){var i=e.attrs;if("text"===t){var o=n.get("fontFamily");o&&(i.fontFamily=i.fontFamily?i.fontFamily:o)}}e.canvas=n,e.type=t;var c=new s[r](e);return this.add(c),c},addGroup:function(t,e){var n,r=this.get("canvas");if(e=a.merge({},e),a.isFunction(t))e?(e.canvas=r,e.parent=this,n=new t(e)):n=new t({canvas:r,parent:this}),this.add(n);else if(a.isObject(t))t.canvas=r,n=new l(t),this.add(n);else{if(void 0!==t)return!1;n=new l,this.add(n)}return n},renderBack:function(t,e){var n=this.get("backShape"),r=this.getBBox();return a.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(!a.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(a.isArray(t))a.each(t,function(t){var n=t.get("parent");n&&n.removeChild(t,!1),e._setCfgProperty(t)}),e._cfg.children=n.concat(t);else{var r=t,i=r.get("parent");i&&i.removeChild(r,!1),e._setCfgProperty(r),n.push(r)}return e},_setCfgProperty:function(t){var e=this._cfg;t.set("parent",this),t.set("canvas",e.canvas),e.timeline&&t.set("timeline",e.timeline)},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)},getBBox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.get("children");i.length>0?a.each(i,function(i){if(i.get("visible")){if(i.isGroup&&0===i.get("children").length)return;var a=i.getBBox();if(!a)return!0;var o=[a.minX,a.minY,1],s=[a.minX,a.maxY,1],u=[a.maxX,a.minY,1],c=[a.maxX,a.maxY,1];i.apply(o),i.apply(s),i.apply(u),i.apply(c);var l=Math.min(o[0],s[0],u[0],c[0]),h=Math.max(o[0],s[0],u[0],c[0]),f=Math.min(o[1],s[1],u[1],c[1]),g=Math.max(o[1],s[1],u[1],c[1]);l<t&&(t=l),h>e&&(e=h),f<n&&(n=f),g>r&&(r=g)}}):(t=0,e=0,n=0,r=0);var o={minX:t,minY:n,maxX:e,maxY:r};return o.x=o.minX,o.y=o.minY,o.width=o.maxX-o.minX,o.height=o.maxY-o.minY,o},getCount:function(){return this.get("children").length},sort:function(){var t=this.get("children");return a.each(t,function(t,e){return t[c]=e,t}),t.sort(function(t){return function(e,n){var r=t(e,n);return 0===r?e[c]-n[c]:r}}(function(t,e){return t.get("zIndex")-e.get("zIndex")})),this},findById:function(t){return this.find(function(e){return e.get("id")===t})},find:function(t){if(a.isString(t))return this.findById(t);var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.find&&(n=e.find(t)),n)return!1}),n},findAll:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},findBy:function(t){var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.findBy&&(n=e.findBy(t)),n)return!1}),n},findAllBy:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},getShape:function(t,e){var n,i=this._attrs.clip,a=this._cfg.children;if(i){var o=[t,e,1];i.invert(o,this.get("canvas")),i.isPointInPath(o[0],o[1])&&(n=r(a,t,e))}else n=r(a,t,e);return n},clearTotalMatrix:function(){if(this.get("totalMatrix")){this.setSilent("totalMatrix",null);for(var t=this._cfg.children,e=0;e<t.length;e++){t[e].clearTotalMatrix()}}},clear:function(t){for(var e=this._cfg.children,n=e.length-1;n>=0;n--)e[n].remove(!0,t);return this._cfg.children=[],this},destroy:function(){this.get("destroyed")||(this.clear(),l.superclass.destroy.call(this))},clone:function(){var t=this._cfg.children,e=new l;return a.each(t,function(t){e.add(t.clone())}),e}}),t.exports=l},function(t,e,n){var r=n(0),i=n(133),a=n(134),o=n(135),s=n(51),u=function(t){this._cfg={zIndex:0,capture:!0,visible:!0,destroyed:!1},r.assign(this._cfg,this.getDefaultCfg(),t),this.initAttrs(this._cfg.attrs),this._cfg.attrs={},this.initTransform(),this.init()};u.CFG={id:null,zIndex:0,canvas:null,parent:null,capture:!0,context:null,visible:!0,destroyed:!1},r.augment(u,i,a,s,o,{init:function(){this.setSilent("animable",!0),this.setSilent("animating",!1)},getParent:function(){return this._cfg.parent},getDefaultCfg:function(){return{}},set:function(t,e){return"zIndex"===t&&this._beforeSetZIndex&&this._beforeSetZIndex(e),"loading"===t&&this._beforeSetLoading&&this._beforeSetLoading(e),this._cfg[t]=e,this},setSilent:function(t,e){this._cfg[t]=e},get:function(t){return this._cfg[t]},show:function(){return this._cfg.visible=!0,this},hide:function(){return this._cfg.visible=!1,this},remove:function(t,e){var n=this._cfg,i=n.parent,a=n.el;return i&&r.remove(i.get("children"),this),a&&(e?i&&i._cfg.tobeRemoved.push(a):a.parentNode.removeChild(a)),(t||void 0===t)&&this.destroy(),this},destroy:function(){this.get("destroyed")||(this._attrs=null,this.removeEvent(),this._cfg={destroyed:!0})},toFront:function(){var t=this._cfg,e=t.parent;if(e){var n=e._cfg.children,r=t.el,i=n.indexOf(this);n.splice(i,1),n.push(this),r&&(r.parentNode.removeChild(r),t.el=null)}},toBack:function(){var t=this._cfg,e=t.parent;if(e){var n=e._cfg.children,r=t.el,i=n.indexOf(this);if(n.splice(i,1),n.unshift(this),r){var a=r.parentNode;a.removeChild(r),a.insertBefore(r,a.firstChild)}}},_beforeSetZIndex:function(t){var e=this._cfg.parent;this._cfg.zIndex=t,r.isNil(e)||e.sort();var n=this._cfg.el;if(n){var i=e._cfg.children,a=i.indexOf(this),o=n.parentNode;o.removeChild(n),a===i.length-1?o.appendChild(n):o.insertBefore(n,o.childNodes[a])}return t},_setAttrs:function(t){return this.attr(t),t},setZIndex:function(t){return this._cfg.zIndex=t,this._beforeSetZIndex(t)},clone:function(){return r.clone(this)},getBBox:function(){}}),t.exports=u},function(t,e,n){function r(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function i(t,e,n,i,a,s,u,c,l){var h,f,g,p,d,v,x,m=.005,y=1/0,b=[u,c];for(d=0;d<1;d+=.05)g=[r(t,n,a,d),r(e,i,s,d)],(f=o.squaredDistance(b,g))<y&&(h=d,y=f);for(y=1/0,x=0;x<32&&!(m<1e-4);x++){var _=h-m,M=h+m;g=[r(t,n,a,_),r(e,i,s,_)],f=o.squaredDistance(b,g),_>=0&&f<y?(h=_,y=f):(p=[r(t,n,a,M),r(e,i,s,M)],v=o.squaredDistance(b,p),M<=1&&v<y?(h=M,y=v):m*=.5)}return l&&(l.x=r(t,n,a,h),l.y=r(e,i,s,h)),Math.sqrt(y)}var a=n(0),o=a.vec2;t.exports={at:r,projectPoint:function(t,e,n,r,a,o,s,u){var c={};return i(t,e,n,r,a,o,s,u,c),c},pointDistance:i,extrema:function(t,e,n){var r=t+n-2*e;if(a.isNumberEqual(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}}},function(t,e){t.exports={xAt:function(t,e,n,r,i){return e*Math.cos(t)*Math.cos(i)-n*Math.sin(t)*Math.sin(i)+r},yAt:function(t,e,n,r,i){return e*Math.sin(t)*Math.cos(i)+n*Math.cos(t)*Math.sin(i)+r},xExtrema:function(t,e,n){return Math.atan(-n/e*Math.tan(t))},yExtrema:function(t,e,n){return Math.atan(n/(e*Math.tan(t)))}}},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 a=n(0),o=n(4),s=n(25),u=n(26),c=function t(e){t.superclass.constructor.call(this,e)};c.ATTRS={x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1},a.extend(c,o),a.augment(c,{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,a=t.endAngle,o=t.clockwise,u=this.getHitLineWidth()/2,c=s.box(e,n,r,i,a,o);return c.minX-=u,c.minY-=u,c.maxX+=u,c.maxY+=u,c},getStartTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.startAngle,o=t.r,s=t.clockwise,u=Math.PI/180;s&&(u*=-1);var c=[],l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),g=i(n,o,a);return c.push([l,h]),c.push([f,g]),c},getEndTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.endAngle,o=t.r,s=t.clockwise,u=Math.PI/180,c=[];s&&(u*=-1);var l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),g=i(n,o,a);return c.push([f,g]),c.push([l,h]),c},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r,a=e.startAngle,o=e.endAngle,s=e.clockwise;(t=t||self.get("context")).beginPath(),t.arc(n,r,i,a,o,s)},afterPath:function(t){var e=this._attrs;if(t=t||this.get("context"),e.startArrow){var n=this.getStartTangent();u.addStartArrow(t,e,n[0][0],n[0][1],n[1][0],n[1][1])}if(e.endArrow){var r=this.getEndTangent();u.addEndArrow(t,e,r[0][0],r[0][1],r[1][0],r[1][1])}}}),t.exports=c},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,r:0,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"circle",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"dom",calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,rx:1,ry:1,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"ellipse",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rx,i=t.ry,a=this.getHitLineWidth(),o=r+a/2,s=i+a/2;return{minX:e-o,minY:n-s,maxX:e+o,maxY:n+s}},createPath:function(t){var e=this._attrs,n=e.x,i=e.y,a=e.rx,o=e.ry;t=t||self.get("context");var s=a>o?a:o,u=a>o?1:a/o,c=a>o?o/a:1,l=[1,0,0,0,1,0,0,0,1];r.mat3.scale(l,l,[u,c]),r.mat3.translate(l,l,[n,i]),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=a},function(t,e,n){var r=n(0),i=n(4),a=n(25),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1},r.extend(o,i),r.augment(o,{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),h=a.box(e,n,i,o,s,u),f=c/2;return{minX:Math.min(l.minX,h.minX)-f,minY:Math.min(l.minY,h.minY)-f,maxX:Math.max(l.maxX,h.maxX)+f,maxY:Math.max(l.maxY,h.maxY)+f}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.rs,a=e.re,o=e.startAngle,s=e.endAngle,u=e.clockwise,c={x:Math.cos(o)*i+n,y:Math.sin(o)*i+r},l={x:Math.cos(o)*a+n,y:Math.sin(o)*a+r},h={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,a,o,s,u),t.lineTo(h.x,h.y),t.arc(n,r,i,s,o,!u),t.closePath()}}),t.exports=o},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,img:void 0,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null},r.extend(a,i),r.augment(a,{type:"image",isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs;this._cfg.attrs&&this._cfg.attrs.img===t.img||this._setAttrImg();var e=t.x,n=t.y;return{minX:e,minY:n,maxX:e+t.width,maxY:n+t.height}},_beforeSetLoading:function(t){var e=this.get("canvas");return!1===t&&!0===this.get("toDraw")&&(this._cfg.loading=!1,e.draw()),t},_setAttrImg:function(){var t=this,e=t._attrs,n=e.img;if(!r.isString(n))return n instanceof Image?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):n instanceof HTMLElement&&r.isString(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase()?(e.width||t.attr("width",Number(n.getAttribute("width"))),e.height||t.attr("height",Number(n.getAttribute("height"))),n):n instanceof ImageData?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):null;var i=new Image;i.onload=function(){if(t.get("destroyed"))return!1;t.attr("imgSrc",n),t.attr("img",i);var e=t.get("callback");e&&e.call(t),t.set("loading",!1)},i.src=n,i.crossOrigin="Anonymous",t.set("loading",!0)},drawInner:function(t){this._cfg.hasUpdate&&this._setAttrImg(),this.get("loading")?this.set("toDraw",!0):(this._drawImage(t),this._cfg.hasUpdate=!1)},_drawImage:function(t){var e=this._attrs,n=e.x,i=e.y,a=e.img,o=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight;this.set("toDraw",!1);var f=a;if(f instanceof ImageData&&((f=new Image).src=a),f instanceof Image||f instanceof HTMLElement&&r.isString(f.nodeName)&&"CANVAS"===f.nodeName.toUpperCase()){if(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h))return void t.drawImage(f,n,i,o,s);if(!(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h)))return void t.drawImage(f,u,c,l,h,n,i,o,s)}}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=n(26),o=n(24),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={x1:0,y1:0,x2:0,y2:0,lineWidth:1,startArrow:!1,endArrow:!1},r.extend(s,i),r.augment(s,{canStroke:!0,type:"line",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=this.getHitLineWidth();return o.box(e,n,r,i,a)},createPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,a=e.y2;(t=t||self.get("context")).beginPath(),t.moveTo(n,r),t.lineTo(i,a)},afterPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,o=e.y2;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,i,o,n,r),e.endArrow&&a.addEndArrow(t,e,n,r,i,o)},getPoint:function(t){var e=this._attrs;return{x:o.at(e.x1,e.x2,t),y:o.at(e.y1,e.y2,t)}}}),t.exports=s},function(t,e,n){var r=n(0),i=n(4),a=n(27),o=n(19),s=n(26),u=n(42),c=n(40),l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={path:null,lineWidth:1,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,n=o.parsePath(t),i=[];if(r.isArray(n)&&0!==n.length&&("M"===n[0][0]||"m"===n[0][0])){for(var s=n.length,u=0;u<n.length;u++){var c=n[u];e=new a(c,e,u===s-1),i.push(e)}this.setSilent("segments",i),this.setSilent("tCache",null),this.setSilent("box",null)}},calculateBox:function(){var t=this.get("segments");if(!t)return null;var e=this.getHitLineWidth(),n=1/0,i=-1/0,a=1/0,o=-1/0;return r.each(t,function(t){t.getBBox(e);var r=t.box;r&&(r.minX<n&&(n=r.minX),r.maxX>i&&(i=r.maxX),r.minY<a&&(a=r.minY),r.maxY>o&&(o=r.maxY))}),n===1/0||a===1/0?{minX:0,minY:0,maxX:0,maxY:0}:{minX:n,minY:a,maxX:i,maxY:o}},_setTcache:function(){var t,e,n,i,a=0,o=0,s=[],u=this._cfg.curve;u&&(r.each(u,function(t,e){n=u[e+1],i=t.length,n&&(a+=c.len(t[i-2],t[i-1],n[1],n[2],n[3],n[4],n[5],n[6]))}),r.each(u,function(r,l){n=u[l+1],i=r.length,n&&((t=[])[0]=o/a,e=c.len(r[i-2],r[i-1],n[1],n[2],n[3],n[4],n[5],n[6]),o+=e,t[1]=o/a,s.push(t))}),this._cfg.tCache=s)},_calculateCurve:function(){var t=this._attrs.path;this._cfg.curve=u.pathTocurve(t)},getStartTangent:function(){var t,e,n,i,a=this.get("segments");if(a.length>1)if(t=a[0].endPoint,e=a[1].endPoint,n=a[1].startTangent,i=[],r.isFunction(n)){var o=n();i.push([t.x-o[0],t.y-o[1]]),i.push([t.x,t.y])}else i.push([e.x,e.y]),i.push([t.x,t.y]);return i},getEndTangent:function(){var t,e,n,i,a=this.get("segments"),o=a.length;if(o>1)if(t=a[o-2].endPoint,e=a[o-1].endPoint,n=a[o-1].endTangent,i=[],r.isFunction(n)){var s=n();i.push([e.x-s[0],e.y-s[1]]),i.push([e.x,e.y])}else i.push([t.x,t.y]),i.push([e.x,e.y]);return i},getPoint:function(t){var e,n,i=this._cfg.tCache;i||(this._calculateCurve(),this._setTcache(),i=this._cfg.tCache);var a=this._cfg.curve;if(!i)return a?{x:a[0][1],y:a[0][2]}:null;r.each(i,function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)});var o=a[n];if(r.isNil(o)||r.isNil(n))return null;var s=o.length,u=a[n+1];return{x:c.at(o[s-2],u[1],u[3],u[5],1-e),y:c.at(o[s-1],u[2],u[4],u[6],1-e)}},createPath:function(t){var e=this.get("segments");if(r.isArray(e)){(t=t||this.get("context")).beginPath();for(var n=e.length,i=0;i<n;i++)e[i].draw(t)}},afterPath:function(t){var e=this._attrs,n=this.get("segments"),i=e.path;if(t=t||this.get("context"),r.isArray(n)&&1!==n.length&&(e.startArrow||e.endArrow)&&"z"!==i[i.length-1]&&"Z"!==i[i.length-1]&&!e.fill){var a=this.getStartTangent();s.addStartArrow(t,e,a[0][0],a[0][1],a[1][0],a[1][1]);var o=this.getEndTangent();s.addEndArrow(t,e,o[0][0],o[0][1],o[1][0],o[1][1])}}}),t.exports=l},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={points:null,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"polygon",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs.points,e=this.getHitLineWidth();if(!t||0===t.length)return null;var n=1/0,i=1/0,a=-1/0,o=-1/0;r.each(t,function(t){var e=t[0],r=t[1];e<n&&(n=e),e>a&&(a=e),r<i&&(i=r),r>o&&(o=r)});var s=e/2;return{minX:n-s,minY:i-s,maxX:a+s,maxY:o+s}},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(4),a=n(26),o=n(24),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null},r.extend(s,i),r.augment(s,{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,a=1/0,o=-1/0,s=-1/0;r.each(n,function(t){var e=t[0],n=t[1];e<i&&(i=e),e>o&&(o=e),n<a&&(a=n),n>s&&(s=n)});var u=e/2;return{minX:i-u,minY:a-u,maxX:o+u,maxY:s+u}},_setTcache:function(){var t,e,n=this._attrs.points,i=0,a=0,s=[];n&&0!==n.length&&(r.each(n,function(t,e){n[e+1]&&(i+=o.len(t[0],t[1],n[e+1][0],n[e+1][1]))}),i<=0||(r.each(n,function(r,u){n[u+1]&&((t=[])[0]=a/i,e=o.len(r[0],r[1],n[u+1][0],n[u+1][1]),a+=e,t[1]=a/i,s.push(t))}),this.tCache=s))},createPath:function(t){var e,n,r=this._attrs.points;if(!(r.length<2)){for((t=t||this.get("context")).beginPath(),t.moveTo(r[0][0],r[0][1]),n=1,e=r.length-1;n<e;n++)t.lineTo(r[n][0],r[n][1]);t.lineTo(r[e][0],r[e][1])}},getStartTangent:function(){var t=this.__attrs.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},getEndTangent:function(){var t=this.__attrs.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},afterPath:function(t){var e=this._attrs,n=e.points,r=n.length-1;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,n[1][0],n[1][1],n[0][0],n[0][1]),e.endArrow&&a.addEndArrow(t,e,n[r-1][0],n[r-1][1],n[r][0],n[r][1])},getPoint:function(t){var e,n,i=this._attrs.points,a=this.tCache;return a||(this._setTcache(),a=this.tCache),r.each(a,function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}),{x:o.at(i[n][0],i[n+1][0],e),y:o.at(i[n][1],i[n+1][1],e)}}}),t.exports=s},function(t,e,n){var r=n(0),i=n(19).parseRadius,a=n(4),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,width:0,height:0,radius:0,lineWidth:1},r.extend(o,a),r.augment(o,{canFill:!0,canStroke:!0,type:"rect",getDefaultAttrs:function(){return{lineWidth:1,radius:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,a=e.width,o=e.height,s=e.radius;if((t=t||this.get("context")).beginPath(),0===s)t.rect(n,r,a,o);else{var u=i(s);t.moveTo(n+u.r1,r),t.lineTo(n+a-u.r2,r),0!==u.r2&&t.arc(n+a-u.r2,r+u.r2,u.r2,-Math.PI/2,0),t.lineTo(n+a,r+o-u.r3),0!==u.r3&&t.arc(n+a-u.r3,r+o-u.r3,u.r3,0,Math.PI/2),t.lineTo(n+u.r4,r+o),0!==u.r4&&t.arc(n+u.r4,r+o-u.r4,u.r4,Math.PI/2,Math.PI),t.lineTo(n,r+u.r1),0!==u.r1&&t.arc(n+u.r1,r+u.r1,u.r1,Math.PI,1.5*Math.PI),t.closePath()}}}),t.exports=o},function(t,e,n){var r=n(0),i=n(4),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(){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,a=t.fontVariant;t.font=[i,a,r,e+"px",n].join(" ")},_setAttrText:function(){var t=this._attrs,e=t.text,n=null;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},isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs,e=this._cfg;e.attrs&&!e.hasUpdate||(this._assembleFont(),this._setAttrText()),t.textArr||this._setAttrText();var n=t.x,r=t.y,i=this.measureText();if(!i)return{minX:n,minY:r,maxX:n,maxY:r};var a=this._getTextHeight(),o=t.textAlign,s=t.textBaseline,u=this.getHitLineWidth(),c={x:n,y:r-a};o&&("end"===o||"right"===o?c.x-=i:"center"===o&&(c.x-=i/2)),s&&("top"===s?c.y+=a:"middle"===s&&(c.y+=a/2)),this.set("startPoint",c);var l=u/2;return{minX:c.x-l,minY:c.y-l,maxX:c.x+i+l,maxY:c.y+a+l}},_getSpaceingY:function(){var t=this._attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},drawInner:function(t){var e=this._attrs,n=this._cfg;n.attrs&&!n.hasUpdate||(this._assembleFont(),this._setAttrText()),t.font=e.font;var i=e.text;if(i){var a=e.textArr,o=e.x,s=e.y;if(t.beginPath(),this.hasStroke()){var u=e.strokeOpacity;r.isNil(u)||1===u||(t.globalAlpha=u),a?this._drawTextArr(t,!1):t.strokeText(i,o,s),t.globalAlpha=1}if(this.hasFill()){var c=e.fillOpacity;r.isNil(c)||1===c||(t.globalAlpha=c),a?this._drawTextArr(t,!0):t.fillText(i,o,s)}n.hasUpdate=!1}},_drawTextArr:function(t,e){var n,i=this._attrs.textArr,a=this._attrs.textBaseline,o=1*this._attrs.fontSize,s=this._getSpaceingY(),u=this._attrs.x,c=this._attrs.y,l=this.getBBox(),h=l.maxY-l.minY;r.each(i,function(r,i){n=c+i*(s+o)-h+o,"middle"===a&&(n+=h-o-(h-o)/2),"top"===a&&(n+=h-o),e?t.fillText(r,u,n):t.strokeText(r,u,n)})},measureText:function(){var t,e=this._attrs,n=e.text,i=e.font,a=e.textArr,o=0;if(!r.isNil(n)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=i,a?r.each(a,function(e){t=s.measureText(e).width,o<t&&(o=t),s.restore()}):(o=s.measureText(n).width,s.restore()),o}}}),t.exports=a},function(t,e,n){"use strict";e.a=function(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}},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,a=e.length,o=new Array(a),s=new Array(a),u=new Array(a);for(n=0;n<a;++n)r=Object(i.f)(e[n]),o[n]=r.r||0,s[n]=r.g||0,u[n]=r.b||0;return o=t(o),s=t(s),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=s(t),r.b=u(t),r+""}}}n.d(e,"b",function(){return u}),n.d(e,"c",function(){return c});var i=n(13),a=n(47),o=n(92),s=n(20);e.a=function t(e){function n(t,e){var n=r((t=Object(i.f)(t)).r,(e=Object(i.f)(e)).r),a=r(t.g,e.g),o=r(t.b,e.b),u=Object(s.a)(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=a(e),t.b=o(e),t.opacity=u(e),t+""}}var r=Object(s.b)(e);return n.gamma=t,n}(1);var u=r(a.b),c=r(o.a)},function(t,e,n){"use strict";var r=n(47);e.a=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],u=t[(i+2)%e];return Object(r.a)((n-i/e)*e,a,o,s,u)}}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(44);e.a=function(t,e){var n,i=e?e.length:0,a=t?Math.min(i,t.length):0,o=new Array(a),s=new Array(i);for(n=0;n<a;++n)o[n]=Object(r.a)(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<a;++n)s[n]=o[n](t);return s}}},function(t,e,n){"use strict";e.a=function(t,e){var n=new Date;return t=+t,e-=t,function(r){return n.setTime(t+e*r),n}}},function(t,e,n){"use strict";var r=n(44);e.a=function(t,e){var n,i={},a={};null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={});for(n in e)n in t?i[n]=Object(r.a)(t[n],e[n]):a[n]=e[n];return function(t){for(n in i)a[n]=i[n](t);return a}}},function(t,e,n){"use strict";var r=n(28),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a=new RegExp(i.source,"g");e.a=function(t,e){var n,o,s,u=i.lastIndex=a.lastIndex=0,c=-1,l=[],h=[];for(t+="",e+="";(n=i.exec(t))&&(o=a.exec(e));)(s=o.index)>u&&(s=e.slice(u,s),l[c]?l[c]+=s:l[++c]=s),(n=n[0])===(o=o[0])?l[c]?l[c]+=o:l[++c]=o:(l[++c]=null,h.push({i:c,x:Object(r.a)(n,o)})),u=a.lastIndex;return u<e.length&&(s=e.slice(u),l[c]?l[c]+=s:l[++c]=s),l.length<2?h[0]?function(t){return function(e){return t(e)+""}}(h[0].x):function(t){return function(){return t}}(e):(e=h.length,function(t){for(var n,r=0;r<e;++r)l[(n=h[r]).i]=n.x(t);return l.join("")})}},function(t,e,n){var r=n(99),i=n(7);t.exports=function(t,e){var n=r(e),a=n.length;if(i(t))return!a;for(var o=0;o<a;o+=1){var s=n[o];if(e[s]!==t[s]||!(s in t))return!1}return!0}},function(t,e,n){var r=n(2),i=n(5),a=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return r(t,function(n,r){i(t)&&"prototype"===r||e.push(r)}),e};t.exports=a},function(t,e,n){var r=n(8),i=Array.prototype.splice;t.exports=function(t,e){if(!r(t))return[];for(var n=t?e.length:0,a=n-1;n--;){var o=void 0,s=e[n];n!==a&&s===o||(o=s,i.call(t,s,1))}return t}},function(t,e,n){var r=n(2),i=n(29);t.exports=function(t){var e=[];return r(t,function(t){i(e,t)||e.push(t)}),e}},function(t,e){t.exports=parseInt},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,n){var r=n(2),i=n(5),a=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return r(t,function(n,r){i(t)&&"prototype"===r||e.push(n)}),e};t.exports=a},function(t,e,n){var r=n(106);t.exports=function(t,e,n,i,a){if(a)return[["M",+t+ +a,e],["l",n-2*a,0],["a",a,a,0,0,1,a,a],["l",0,i-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-n,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-i],["a",a,a,0,0,1,a,-a],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=r,o}},function(t,e){var n=/,?([a-z]),?/gi;t.exports=function(t){return t.join(",").replace(n,"$1")}},function(t,e,n){var r=n(108),i=function(t,e,n,r){return[t,e,n,r,n,r]},a=function(t,e,n,r,i,a){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*a+2/3*r,i,a]};t.exports=function(t,e){var n=r(t),o=e&&r(e),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},c=[],l=[],h="",f="",g=void 0,p=function(t,e,n){var r=void 0,o=void 0;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(function t(e,n,r,i,a,o,s,u,c,l){r===i&&(r+=1);var h=120*Math.PI/180,f=Math.PI/180*(+a||0),g=[],p=void 0,d=void 0,v=void 0,x=void 0,m=void 0,y=function(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}};if(l)d=l[0],v=l[1],x=l[2],m=l[3];else{e=(p=y(e,n,-f)).x,n=p.y,u=(p=y(u,c,-f)).x,c=p.y,e===u&&n===c&&(u+=1,c+=1);var b=(e-u)/2,_=(n-c)/2,M=b*b/(r*r)+_*_/(i*i);M>1&&(r*=M=Math.sqrt(M),i*=M);var S=r*r,w=i*i,k=(o===s?-1:1)*Math.sqrt(Math.abs((S*w-S*_*_-w*b*b)/(S*_*_+w*b*b)));x=k*r*_/i+(e+u)/2,m=k*-i*b/r+(n+c)/2,d=Math.asin(((n-m)/i).toFixed(9)),v=Math.asin(((c-m)/i).toFixed(9)),d=e<x?Math.PI-d:d,v=u<x?Math.PI-v:v,d<0&&(d=2*Math.PI+d),v<0&&(v=2*Math.PI+v),s&&d>v&&(d-=2*Math.PI),!s&&v>d&&(v-=2*Math.PI)}var A=v-d;if(Math.abs(A)>h){var P=v,C=u,I=c;v=d+h*(s&&v>d?1:-1),g=t(u=x+r*Math.cos(v),c=m+i*Math.sin(v),r,i,a,0,s,C,I,[v,P,x,m])}A=v-d;var T=Math.cos(d),O=Math.sin(d),L=Math.cos(v),E=Math.sin(v),B=Math.tan(A/4),N=4/3*r*B,j=4/3*i*B,D=[e,n],R=[e+N*O,n-j*T],F=[u+N*E,c-j*L],Y=[u,c];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],l)return[R,F,Y].concat(g);for(var H=[],q=0,z=(g=[R,F,Y].concat(g).join().split(",")).length;q<z;q++)H[q]=q%2?y(g[q-1],g[q],f).y:y(g[q],g[q+1],f).x;return H}.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*e.x-e.bx,o=2*e.y-e.by):(r=e.x,o=e.y),t=["C",r,o].concat(t.slice(1));break;case"T":"Q"===n||"T"===n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(a(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(a(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(i(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(i(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(i(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(i(e.x,e.y,e.X,e.Y))}return t},d=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)c[e]="A",o&&(l[e]="A"),t.splice(e++,0,["C"].concat(r.splice(0,6)));t.splice(e,1),g=Math.max(n.length,o&&o.length||0)}},v=function(t,e,r,i,a){t&&e&&"M"===t[a][0]&&"M"!==e[a][0]&&(e.splice(a,0,["M",i.x,i.y]),r.bx=0,r.by=0,r.x=t[a][1],r.y=t[a][2],g=Math.max(n.length,o&&o.length||0))};g=Math.max(n.length,o&&o.length||0);for(var x=0;x<g;x++){n[x]&&(h=n[x][0]),"C"!==h&&(c[x]=h,x&&(f=c[x-1])),n[x]=p(n[x],s,f),"A"!==c[x]&&"C"===h&&(c[x]="C"),d(n,x),o&&(o[x]&&(h=o[x][0]),"C"!==h&&(l[x]=h,x&&(f=l[x-1])),o[x]=p(o[x],u,f),"A"!==l[x]&&"C"===h&&(l[x]="C"),d(o,x)),v(n,o,s,u,x),v(o,n,u,s,x);var m=n[x],y=o&&o[x],b=m.length,_=o&&y.length;s.x=m[b-2],s.y=m[b-1],s.bx=parseFloat(m[b-4])||s.x,s.by=parseFloat(m[b-3])||s.y,u.bx=o&&(parseFloat(y[_-4])||u.x),u.by=o&&(parseFloat(y[_-3])||u.y),u.x=o&&y[_-2],u.y=o&&y[_-1]}return o?[n,o]:n}},function(t,e,n){function r(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["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 a}var i=n(109),a=n(110);t.exports=function(t){if(!(t=i(t))||!t.length)return[["M",0,0]];var e=[],n=0,o=0,s=0,u=0,c=0,l=void 0,h=void 0;"M"===t[0][0]&&(s=n=+t[0][1],u=o=+t[0][2],c++,e[0]=["M",n,o]);for(var f,g,p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=c,v=t.length;d<v;d++){if(e.push(f=[]),g=t[d],(l=g[0])!==l.toUpperCase())switch(f[0]=l.toUpperCase(),f[0]){case"A":f[1]=g[1],f[2]=g[2],f[3]=g[3],f[4]=g[4],f[5]=g[5],f[6]=+g[6]+n,f[7]=+g[7]+o;break;case"V":f[1]=+g[1]+o;break;case"H":f[1]=+g[1]+n;break;case"R":for(var x=2,m=(h=[n,o].concat(g.slice(1))).length;x<m;x++)h[x]=+h[x]+n,h[++x]=+h[x]+o;e.pop(),e=e.concat(a(h,p));break;case"O":e.pop(),(h=r(n,o,g[1],g[2])).push(h[0]),e=e.concat(h);break;case"U":e.pop(),e=e.concat(r(n,o,g[1],g[2],g[3])),f=["U"].concat(e[e.length-1].slice(-2));break;case"M":s=+g[1]+n,u=+g[2]+o;break;default:for(var y=1,b=g.length;y<b;y++)f[y]=+g[y]+(y%2?n:o)}else if("R"===l)h=[n,o].concat(g.slice(1)),e.pop(),e=e.concat(a(h,p)),f=["R"].concat(g.slice(-2));else if("O"===l)e.pop(),(h=r(n,o,g[1],g[2])).push(h[0]),e=e.concat(h);else if("U"===l)e.pop(),e=e.concat(r(n,o,g[1],g[2],g[3])),f=["U"].concat(e[e.length-1].slice(-2));else for(var _=0,M=g.length;_<M;_++)f[_]=g[_];if("O"!==(l=l.toUpperCase()))switch(f[0]){case"Z":n=+s,o=+u;break;case"H":n=f[1];break;case"V":o=f[1];break;case"M":s=f[f.length-2],u=f[f.length-1];break;default:n=f[f.length-2],o=f[f.length-1]}}return e}},function(t,e){var n="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},r="\t\n\v\f\r \u2028\u2029",i=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig");t.exports=function(t){if(!t)return null;if((void 0===t?"undefined":n(t))===n([]))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},r=[];return String(t).replace(i,function(t,n,i){var o=[],s=n.toLowerCase();if(i.replace(a,function(t,e){e&&o.push(+e)}),"m"===s&&o.length>2&&(r.push([n].concat(o.splice(0,2))),s="l",n="m"===n?"l":"L"),"o"===s&&1===o.length&&r.push([n,o[0]]),"r"===s)r.push([n].concat(o));else for(;o.length>=e[s]&&(r.push([n].concat(o.splice(0,e[s]))),e[s]););}),r}},function(t,e){t.exports=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{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?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n}},function(t,e,n){var r=n(18);t.exports=function(t){return r(t).toLowerCase()}},function(t,e,n){var r=n(18);t.exports=function(t){return r(t).toUpperCase()}},function(t,e,n){var r=n(5),i=n(3),a=n(114);t.exports=function(t,e){if(!e)return{0:t};if(!r(e)){var n=i(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",r=0,i=n.length;r<i;r++)e+=t[n[r]]&&t[n[r]].toString();return e}}return a(t,e)}},function(t,e,n){var r=n(2),i=n(3),a=Object.prototype.hasOwnProperty;t.exports=function(t,e){if(!e||!i(t))return t;var n={},o=null;return r(t,function(t){o=e(t),a.call(n,o)?n[o].push(t):n[o]=[t]}),n}},function(t,e,n){var r=n(22).Group,i=n(1),a=function t(e){t.superclass.constructor.call(this,e)};i.extend(a,r),i.augment(a,{getDefaultCfg:function(){return{zIndex:1,type:"line",lineStyle:null,items:null,alternateColor:null,matrix:null,hideFirstLine:!1,hideLastLine:!1,hightLightZero:!1,zeroLineStyle:{stroke:"#595959",lineDash:[0,0]}}},_renderUI:function(){a.superclass._renderUI.call(this),this._drawLines()},_drawLines:function(){var t=this.get("lineStyle"),e=this.get("items");e&&e.length&&(this._precessItems(e),this._drawGridLines(e,t))},_precessItems:function(t){var e,n=this;i.each(t,function(t,r){e&&n.get("alternateColor")&&n._drawAlternativeBg(t,e,r),e=t})},_drawGridLines:function(t,e){var n,r,a,o,s=this,u=this.get("type"),c=t.length;"line"===u||"polygon"===u?i.each(t,function(t,l){s.get("hideFirstLine")&&0===l||s.get("hideLastLine")&&l===c-1||(o=t.points,r=[],"line"===u?(r.push(["M",o[0].x,o[0].y]),r.push(["L",o[o.length-1].x,o[o.length-1].y])):i.each(o,function(t,e){0===e?r.push(["M",t.x,t.y]):r.push(["L",t.x,t.y])}),a=s._drawZeroLine(u,l)?i.mix({},s.get("zeroLineStyle"),{path:r}):i.mix({},e,{path:r}),(n=s.addShape("path",{attrs:a})).name="axis-grid",n._id=t._id,n.set("coord",s.get("coord")),s.get("appendInfo")&&n.setSilent("appendInfo",s.get("appendInfo")))}):i.each(t,function(t,u){s.get("hideFirstLine")&&0===u||s.get("hideLastLine")&&u===c-1||(o=t.points,r=[],i.each(o,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])}),a=i.mix({},e,{path:r}),(n=s.addShape("path",{attrs:a})).name="axis-grid",n._id=t._id,n.set("coord",s.get("coord")),s.get("appendInfo")&&n.setSilent("appendInfo",s.get("appendInfo")))})},_drawZeroLine:function(t,e){var n=this.get("tickValues");return!("line"!==t||!n||0!==n[e]||!this.get("hightLightZero"))},_drawAlternativeBg:function(t,e,n){var r,a,o,s=this.get("alternateColor");i.isString(s)?a=s:i.isArray(s)&&(a=s[0],o=s[1]),n%2==0?o&&(r=this._getBackItem(e.points,t.points,o)):a&&(r=this._getBackItem(e.points,t.points,a));var u=this.addShape("Path",{attrs:r});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"))},_getBackItem:function(t,e,n){var r=[],a=this.get("type");if("line"===a)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"===a){i.each(t,function(t,e){0===e?r.push(["M",t.x,t.y]):r.push(["L",t.x,t.y])});for(var o=e.length-1;o>=0;o--)r.push(["L",e[o].x,e[o].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}}}),t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=i.DomUtil,o=n(15),s={scatter:n(249),map:n(250),treemap:n(251)},u=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"label",type:"default",textStyle:null,formatter:null,items:null,useHtml:!1,containerTpl:'<div class="g-labels" style="position:absolute;top:0;left:0;"></div>',itemTpl:'<div class="g-label" style="position:absolute;">{text}</div>',labelLine:!1,lineGroup:null,shapes:null,config:!0,capture:!0})},n.clear=function(){var e=this.get("group"),n=this.get("container");e&&!e.get("destroyed")&&e.clear(),n&&(n.innerHTML=""),t.prototype.clear.call(this)},n.destroy=function(){var e=this.get("group"),n=this.get("container");e.destroy||e.destroy(),n&&n.parentNode&&n.parentNode.removeChild(n),t.prototype.destroy.call(this)},n.render=function(){this.clear(),this._init(),this.beforeDraw(),this.draw(),this.afterDraw()},n._dryDraw=function(){var t=this,e=t.get("items"),n=t.getLabels(),r=n.length;i.each(e,function(e,i){if(i<r){var a=n[i];t.changeLabel(a,e)}else{var o=t._addLabel(e,i);o&&(o._id=e._id,o.set("coord",e.coord))}});for(var a=r-1;a>=e.length;a--)n[a].remove();t._adjustLabels(),!t.get("labelLine")&&t.get("config")||t.drawLines()},n.draw=function(){this._dryDraw(),this.get("canvas").draw()},n.changeLabel=function(t,e){if(t)if(t.tagName){var n=this._createDom(e);t.innerHTML=n.innerHTML,this._setCustomPosition(e,t)}else t._id=e._id,t.attr("text",e.text),t.attr("x")===e.x&&t.attr("y")===e.y||(t.resetMatrix(),e.textStyle.rotate&&(t.rotateAtStart(e.textStyle.rotate),delete e.textStyle.rotate),t.attr(e))},n.show=function(){var t=this.get("group"),e=this.get("container");t&&t.show(),e&&(e.style.opacity=1)},n.hide=function(){var t=this.get("group"),e=this.get("container");t&&t.hide(),e&&(e.style.opacity=0)},n.drawLines=function(){var t=this;"boolean"==typeof t.get("labelLine")&&t.set("labelLine",{});var e=t.get("lineGroup");!e||e.get("destroyed")?(e=t.get("group").addGroup({elCls:"x-line-group"}),t.set("lineGroup",e)):e.clear(),i.each(t.get("items"),function(n){t.lineToLabel(n,e)})},n.lineToLabel=function(t,e){if(this.get("config")||t.labelLine){var n=t.labelLine||this.get("labelLine"),r=void 0===t.capture?this.get("capture"):t.capture,a=n.path;if(a&&i.isFunction(n.path)&&(a=n.path(t)),!a){var o=t.start||{x:t.x-t._offset.x,y:t.y-t._offset.y};a=[["M",o.x,o.y],["L",t.x,t.y]]}var s=t.color;s||(s=t.textStyle&&t.textStyle.fill?t.textStyle.fill:"#000");var u=e.addShape("path",{attrs:i.mix({path:a,fill:null,stroke:s},n),capture:r});u.name=this.get("name"),u._id=t._id&&t._id.replace("glabel","glabelline"),u.set("coord",this.get("coord"))}},n._adjustLabels=function(){var t=this.get("type"),e=this.getLabels(),n=this.get("shapes"),r=s[t];"default"!==t&&r&&r(e,n)},n.getLabels=function(){var t=this.get("container");return t?i.toArray(t.childNodes):this.get("group").get("children")},n._addLabel=function(t,e){var n=t;return this.get("config")&&(n=this._getLabelCfg(t,e)),this._createText(n)},n._getLabelCfg=function(t,e){var n=this.get("textStyle")||{},r=this.get("formatter"),a=this.get("htmlTemplate");if(!i.isObject(t)){var o=t;(t={}).text=o}i.isFunction(n)&&(n=n(t.text,t,e)),r&&(t.text=r(t.text,t,e)),a&&(t.useHtml=!0,i.isFunction(a)&&(t.text=a(t.text,t,e))),i.isNil(t.text)&&(t.text=""),t.text=t.text+"";return i.mix({},t,{textStyle:n},{x:t.x||0,y:t.y||0})},n._init=function(){if(!this.get("group")){var t=this.get("canvas").addGroup({id:"label-group"});this.set("group",t)}},n.initHtmlContainer=function(){var t=this.get("container");if(t)i.isString(t)&&(t=document.getElementById(t))&&this.set("container",t);else{var e=this.get("containerTpl"),n=this.get("canvas").get("el").parentNode;t=a.createDom(e),n.style.position="relative",n.appendChild(t),this.set("container",t)}return t},n._createText=function(t){var e,n=i.deepMix({},t),r=this.get("container"),a=void 0===n.capture?this.get("capture"):n.capture;if(!n.useHtml&&!n.htmlTemplate){var o=this.get("name"),s=n.point,u=this.get("group");delete n.point;var c=n.rotate;return n.textStyle&&(n.textStyle.rotate&&(c=n.textStyle.rotate,delete n.textStyle.rotate),n=i.mix({x:n.x,y:n.y,textAlign:n.textAlign,text:n.text},n.textStyle)),e=u.addShape("text",{attrs:n,capture:a}),c&&(Math.abs(c)>2*Math.PI&&(c=c/180*Math.PI),e.transform([["t",-n.x,-n.y],["r",c],["t",n.x,n.y]])),e.setSilent("origin",s||n),e.name=o,this.get("appendInfo")&&e.setSilent("appendInfo",this.get("appendInfo")),e}r||(r=this.initHtmlContainer());var l=this._createDom(n);r.appendChild(l),this._setCustomPosition(n,l)},n._createDom=function(t){var e=this.get("itemTpl"),n=i.substitute(e,{text:t.text});return a.createDom(n)},n._setCustomPosition=function(t,e){var n=t.textAlign||"left",r=t.y,i=t.x,o=a.getOuterWidth(e);r-=a.getOuterHeight(e)/2,"center"===n?i-=o/2:"right"===n&&(i-=o),e.style.top=parseInt(r,10)+"px",e.style.left=parseInt(i,10)+"px"},e}(o);t.exports=u},function(t,e){var n=function(){function t(){this.bitmap=[]}var e=t.prototype;return e.hasGap=function(t){for(var e=!0,n=this.bitmap,r=Math.floor(t.minX),i=Math.ceil(t.maxX),a=Math.floor(t.minY),o=Math.ceil(t.maxY)-1,s=r;s<i;s++)if(n[s]){if(s===r||s===i-1){for(var u=a;u<=o;u++)if(n[s][u]){e=!1;break}}else if(n[s][a]||n[s][o]){e=!1;break}}else n[s]=[];return e},e.fillGap=function(t){for(var e=this.bitmap,n=Math.floor(t.minX),r=Math.ceil(t.maxX)-1,i=Math.floor(t.minY),a=Math.ceil(t.maxY)-1,o=n;o<=r;o++){for(var s=i;s<a;s+=8)e[o]||(e[o]=[]),e[o][s]=!0;e[o][a]=!0}for(var u=i;u<=a;u++)e[n][u]=!0,e[r][u]=!0},t}();t.exports=n},function(t,e,n){var r=n(1);t.exports={getFirstScale:function(t){var e;return r.each(t,function(t){if(t)return e=t,!1}),e}}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){var n=null,r=e instanceof l||"legendGroup"===e.name?e.get("value"):e;return o.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 o=n(1),s=n(120),u=n(9).FONT_FAMILY,c=o.Event,l=o.Group,h=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return o.mix({},e,{type:"category-legend",items:null,itemGap:5,itemMarginBottom:8,itemsGroup:null,layout:"horizontal",allowAllCanceled:!1,backPadding:[0,0,0,0],unCheckColor:"#ccc",background:{fill:"#fff",fillOpacity:0},itemWidth:null,textStyle:{fill:"#333",fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:u},_wordSpaceing:8,clickable:!0,selectedMode:"multiple",reversed:!1,autoWrap:!0,highlight:!1,activeOpacity:.7,inactiveOpacity:1})},n.render=function(){t.prototype.render.call(this),this._renderItems(),this.get("autoWrap")&&this._adjustItems()},n._bindEvents=function(){this.get("hoverable")&&(this.get("group").on("mousemove",o.wrapBehavior(this,"_onMousemove")),this.get("group").on("mouseleave",o.wrapBehavior(this,"_onMouseleave"))),this.get("clickable")&&this.get("group").on("click",o.wrapBehavior(this,"_onClick"))},n._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},n.activate=function(t){var e=this,n=this,r=void 0;n.get("itemsGroup").get("children").forEach(function(i){if(r=a(i,"legend-marker")){var o=i.get("checked");e.get("highlight")?i.get("value")===t&&o?r.attr("stroke","#333"):r.attr("stroke",null):i.get("value")===t&&r.attr("fillOpacity",n.get("activeOpacity"))}}),this.get("canvas").draw()},n.deactivate=function(){var t=this,e=this,n=e.get("itemsGroup").get("children"),r=void 0,i=this.get("unCheckColor");n.forEach(function(n){if(r=a(n,"legend-marker"))if(t.get("highlight")){var o=r.get("oriStroke"),s=n.get("checked");o=o&&!s?i:"",r.attr("stroke",o)}else r.attr("fillOpacity",e.get("inactiveOpacity"))}),this.get("canvas").draw()},n._onMousemove=function(t){var e=this._getLegendItem(t.currentTarget);if(e&&e.get("checked")){var n=this.get("items"),r=new c("itemhover",t,!0,!0);r.item=i(n,e),r.checked=e.get("checked"),r.currentTarget=t.currentTarget,this.deactivate(),this.activate(e.get("value")),this.emit("itemhover",r)}else this.deactivate(),this.emit("itemunhover",t);this.get("canvas").draw()},n._onMouseleave=function(t){this.deactivate(),this.get("canvas").draw(),this.emit("itemunhover",t)},n._onClick=function(t){var e=this._getLegendItem(t.currentTarget),n=this.get("items");if(e&&!e.get("destroyed")){var r=e.get("checked"),s=this.get("selectedMode"),u=i(n,e),l=new c("itemclick",t,!0,!0);if(l.item=u,l.currentTarget=e,l.appendInfo=t.currentTarget.get("appendInfo"),l.checked="single"===s||!r,!this.get("allowAllCanceled")&&r&&1===this.getCheckedCount())return void this.emit("clicklastitem",l);var h=this.get("unCheckColor"),f=this.get("textStyle").fill,g=void 0,p=void 0,d=void 0;if("single"===s){var v=this.get("itemsGroup").get("children");o.each(v,function(t){g=a(t,"legend-marker"),p=a(t,"legend-text"),d=a(t,"legend-item"),t!==e?(g.attr("fill")&&g.attr("fill",h),g.attr("stroke")&&g.attr("stroke",h),p.attr("fill",h),g.setSilent("checked",!1),p.setSilent("checked",!1),d.setSilent("checked",!1),t.setSilent("checked",!1)):(g.attr("fill")&&u&&u.marker&&g.attr("fill",u.marker.fill),g.attr("stroke")&&u&&u.marker&&g.attr("stroke",u.marker.stroke),p.attr("fill",f),g.setSilent("checked",!0),p.setSilent("checked",!0),d.setSilent("checked",!0),t.setSilent("checked",!0))})}else g=a(e,"legend-marker"),p=a(e,"legend-text"),d=a(e,"legend-item"),g.attr("fill")&&u&&u.marker&&g.attr("fill",r?h:u.marker.fill),g.attr("stroke")&&u&&u.marker&&g.attr("stroke",r?h:u.marker.stroke),p.attr("fill",r?h:f),e.setSilent("checked",!r),g.setSilent("checked",!r),p.setSilent("checked",!r),d.setSilent("checked",!r);this.emit("itemclick",l)}this.get("canvas").draw()},n._renderItems=function(){var t=this,e=this.get("items");if(this.get("reversed")&&e.reverse(),o.each(e,function(e,n){t._addItem(e,n)}),this.get("highlight")){var n=void 0;this.get("itemsGroup").get("children").forEach(function(t){(n=a(t,"legend-marker")).get("oriStroke")||(n.attr("stroke")?n.set("oriStroke",n.attr("stroke")):n.set("oriStroke",""))})}},n._formatItemValue=function(t){var e=this.get("formatter")||this.get("itemFormatter");return e&&(t=e.call(this,t)),t},n._getNextX=function(){var t=this.get("layout"),e=this.get("itemGap"),n=this.get("itemsGroup"),r=this.get("itemWidth"),i=n.get("children"),a=0;return"horizontal"===t&&o.each(i,function(t){a+=(r||t.getBBox().width)+e}),a},n._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"),a=r.get("children"),s=e;return i&&(s+=i.getBBox().height),"vertical"===n&&o.each(a,function(e){s+=e.getBBox().height+t}),s},n._addItem=function(t){var e=this.get("itemsGroup"),n=this._getNextX(),r=this._getNextY(),i=this.get("unCheckColor"),a=e.addGroup({x:n,y:r,value:t.value,checked:t.checked});a.set("viewId",this.get("viewId"));var s=this.get("textStyle"),c=this.get("_wordSpaceing"),l=0;if(t.marker){var h=o.mix({},t.marker,{x:t.marker.radius+n,y:r});t.checked||(h.fill&&(h.fill=i),h.stroke&&(h.stroke=i));var f=a.addShape("marker",{type:"marker",attrs:h});f.attr("cursor","pointer"),f.name="legend-marker",l+=f.getBBox().width+c}var g=o.mix({},{fill:"#333",fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:u},s,{x:l+n,y:r,text:this._formatItemValue(t.value)});t.checked||o.mix(g,{fill:i});var p=a.addShape("text",{attrs:g});p.attr("cursor","pointer"),p.name="legend-text",this.get("appendInfo")&&p.setSilent("appendInfo",this.get("appendInfo"));var d=a.getBBox(),v=this.get("itemWidth"),x=a.addShape("rect",{attrs:{x:n,y:r-d.height/2,fill:"#fff",fillOpacity:0,width:v||d.width,height:d.height}});return x.attr("cursor","pointer"),x.setSilent("origin",t),x.name="legend-item",this.get("appendInfo")&&x.setSilent("appendInfo",this.get("appendInfo")),a.name="legendGroup",a},n._adjustHorizontal=function(){var t=this.get("itemsGroup"),e=t.get("children"),n=this.get("maxLength"),r=this.get("itemGap"),i=this.get("itemMarginBottom"),a=this.get("titleShape")?this.get("titleGap"):0,s=0,u=0,c=void 0,l=void 0,h=void 0,f=this.get("itemWidth");t.getBBox().width>n&&o.each(e,function(t){h=t.getBBox(),c=f||h.width,l=h.height+i,n-u<c&&(s++,u=0),t.move(u,s*l+a),u+=c+r})},n._adjustVertical=function(){var t=this.get("itemsGroup"),e=this.get("titleShape"),n=t.get("children"),r=this.get("maxLength"),i=this.get("itemGap"),a=this.get("itemMarginBottom"),s=this.get("titleGap"),u=e?e.getBBox().height+s:0,c=this.get("itemWidth"),l=u,h=void 0,f=void 0,g=void 0,p=0,d=0;t.getBBox().height>r&&o.each(n,function(t){g=t.getBBox(),h=g.width,f=g.height,c?p=c+i:h>p&&(p=h+i),r-l<f?(l=u,d+=p,t.move(d,u)):t.move(d,l),l+=f+a})},n._adjustItems=function(){"horizontal"===this.get("layout")?this._adjustHorizontal():this._adjustVertical()},n.getWidth=function(){return t.prototype.getWidth.call(this)},n.getHeight=function(){return t.prototype.getHeight.call(this)},n.move=function(e,n){t.prototype.move.call(this,e,n)},e}(s);t.exports=h},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(15),o=n(9).FONT_FAMILY,s=function(t){function e(e){var n;return(n=t.call(this,e)||this)._init(),n.beforeRender(),n.render(),n._adjustPositionOffset(),n._bindEvents(),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){return{container:null,title:null,formatter:null,hoverable:!0,titleGap:15,position:[0,0],offset:[0,0],offsetX:null,offsetY:null}},n._init=function(){var t=this.get("group"),e=this.get("container");this.set("canvas",e.get("canvas"));var n=this.get("position");t||(t=e.addGroup({x:0-n[0],y:0-n[1]})),this.set("group",t)},n._adjustPositionOffset=function(){var t=this.get("position"),e=this.get("offset"),n=this.get("offsetX"),r=this.get("offsetY");if(!i.isArray(e)){e="vertical"===this.get("layout")?[e,0]:[0,e]}n&&(e[0]=n),r&&(e[1]=r);var a=this.get("group").getBBox();this.move(-a.minX+t[0]+e[0],-a.minY+t[1]+e[1])},n.beforeRender=function(){var t=this.get("group").addGroup();this.set("itemsGroup",t)},n.render=function(){this._renderTitle()},n._renderTitle=function(){var t=this.get("title"),e=this.get("titleGap");if(e=e||0,t&&t.text){var n=this.get("group").addShape("text",{attrs:i.mix({x:0,y:0-e,fill:"#333",textBaseline:"middle",fontFamily:o},t)});n.name="legend-title",this.get("appendInfo")&&n.setSilent("appendInfo",this.get("appendInfo")),this.set("titleShape",n)}},n.getCheckedCount=function(){var t=this.get("itemsGroup").get("children");return i.filter(t,function(t){return t.get("checked")}).length},n.setItems=function(t){this.set("items",t),this.clear(),this.render()},n.addItem=function(t){this.get("items").push(t),this.clear(),this.render()},n.clear=function(){this.get("itemsGroup").clear();this.get("group").clear(),this.beforeRender()},n.destroy=function(){var e=this.get("group");e&&e.destroy(),this._attrs={},this.removeAllListeners(),t.prototype.destroy.call(this)},n.getWidth=function(){return this.get("group").getBBox().width},n.getHeight=function(){return this.get("group").getBBox().height},n.move=function(t,e){this.get("group").move(t,e)},n.draw=function(){this.get("canvas").draw()},e}(a);t.exports=s},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){return t.getElementsByClassName(e)[0]}function a(t,e){var n=t.className;return s.isNil(n)?t:(n=n.split(" ")).indexOf(e)>-1?t:t.parentNode?t.parentNode.className===f?t.parentNode:a(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}var s=n(1),u=n(119),c=n(9).FONT_FAMILY,l=s.DomUtil,h=s.Group,f="g2-legend",g="g2-legend-list",p="g2-legend-list-item",d="g2-legend-marker",v=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return s.mix({},e,{type:"category-legend",container:null,containerTpl:'<div class="'+f+'"><h4 class="g2-legend-title"></h4><ul class="'+g+'"></ul></div>',itemTpl:'<li class="'+p+' item-{index} {checked}" data-color="{originColor}" data-value="{originValue}"><i class="'+d+'" style="background-color:{color};"></i><span class="g2-legend-text">{value}</span></li>',legendStyle:{},textStyle:{fill:"#333",fontSize:12,textAlign:"middle",textBaseline:"top",fontFamily:c},abridgeText:!1,tipTpl:'<div class="textTip"></div>',tipStyle:{display:"none",fontSize:"12px",backgroundColor:"#fff",position:"absolute",width:"auto",height:"auto",padding:"3px",boxShadow:"2px 2px 5px #888"},autoPosition:!0})},n._init=function(){},n.beforeRender=function(){},n.render=function(){this._renderHTML()},n._bindEvents=function(){var t=this,e=i(this.get("legendWrapper"),g);this.get("hoverable")&&(e.onmousemove=function(e){return t._onMousemove(e)},e.onmouseout=function(e){return t._onMouseleave(e)}),this.get("clickable")&&(e.onclick=function(e){return t._onClick(e)})},n._onMousemove=function(t){var e=this.get("items"),n=t.target,r=n.className;if(!((r=r.split(" ")).indexOf(f)>-1||r.indexOf(g)>-1)){var i=a(n,p),s=o(e,i.getAttribute("data-value"));s?(this.deactivate(),this.activate(i.getAttribute("data-value")),this.emit("itemhover",{item:s,currentTarget:i,checked:s.checked})):s||(this.deactivate(),this.emit("itemunhover",t))}},n._onMouseleave=function(t){this.deactivate(),this.emit("itemunhover",t)},n._onClick=function(t){var e=this,n=i(this.get("legendWrapper"),g),r=this.get("unCheckColor"),u=this.get("items"),c=this.get("selectedMode"),l=n.childNodes,h=t.target,v=h.className;if(!((v=v.split(" ")).indexOf(f)>-1||v.indexOf(g)>-1)){var x=a(h,p),m=i(x,"g2-legend-text"),y=i(x,d),b=o(u,x.getAttribute("data-value"));if(b){var _=x.className,M=x.getAttribute("data-color");if("single"===c)b.checked=!0,s.each(l,function(t){if(t!==x){i(t,d).style.backgroundColor=r,t.className=t.className.replace("checked","unChecked"),t.style.color=r;o(u,t.getAttribute("data-value")).checked=!1}else m&&(m.style.color=e.get("textStyle").fill),y&&(y.style.backgroundColor=M),x.className=_.replace("unChecked","checked")});else{var S=-1!==_.indexOf("checked"),w=0;if(s.each(l,function(t){-1!==t.className.indexOf("checked")&&w++}),!this.get("allowAllCanceled")&&S&&1===w)return void this.emit("clicklastitem",{item:b,currentTarget:x,checked:"single"===c||b.checked});b.checked=!b.checked,S?(y&&(y.style.backgroundColor=r),x.className=_.replace("checked","unChecked"),x.style.color=r):(y&&(y.style.backgroundColor=M),x.className=_.replace("unChecked","checked"),x.style.color=this.get("textStyle").fill)}this.emit("itemclick",{item:b,currentTarget:x,checked:"single"===c||b.checked})}}},n.activate=function(t){var e=this,n=this,r=n.get("items"),a=o(r,t);i(n.get("legendWrapper"),g).childNodes.forEach(function(t){var s=i(t,d),u=o(r,t.getAttribute("data-value"));if(e.get("highlight")){if(u===a&&u.checked)return void(s.style.border="1px solid #333")}else u===a?s.style.opacity=n.get("activeOpacity"):u.checked&&(s.style.opacity=n.get("inactiveOpacity"))})},n.deactivate=function(){var t=this,e=this;i(e.get("legendWrapper"),g).childNodes.forEach(function(n){var r=i(n,d);t.get("highlight")?r.style.border="1px solid #fff":r.style.opacity=e.get("inactiveOpacity")})},n._renderHTML=function(){var t=this,e=this.get("container"),n=this.get("title"),r=this.get("containerTpl"),a=l.createDom(r),o=i(a,"g2-legend-title"),u=i(a,g),h=this.get("unCheckColor"),v=s.deepMix({},{CONTAINER_CLASS:{height:"auto",width:"auto",position:"absolute",overflowY:"auto",fontSize:"12px",fontFamily:c,lineHeight:"20px",color:"#8C8C8C"},TITLE_CLASS:{marginBottom:this.get("titleGap")+"px",fontSize:"12px",color:"#333",textBaseline:"middle",fontFamily:c},LIST_CLASS:{listStyleType:"none",margin:0,padding:0,textAlign:"center"},LIST_ITEM_CLASS:{cursor:"pointer",marginBottom:"5px",marginRight:"24px"},MARKER_CLASS:{width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"4px",verticalAlign:"middle"}},this.get("legendStyle"));if(/^\#/.test(e)||"string"==typeof e&&e.constructor===String){var x=e.replace("#","");(e=document.getElementById(x)).appendChild(a)}else{var m=this.get("position"),y={};y="left"===m||"right"===m?{maxHeight:(this.get("maxLength")||e.offsetHeight)+"px"}:{maxWidth:(this.get("maxLength")||e.offsetWidth)+"px"},l.modifyCSS(a,s.mix({},v.CONTAINER_CLASS,y,this.get(f))),e.appendChild(a)}l.modifyCSS(u,s.mix({},v.LIST_CLASS,this.get(g))),o&&(n&&n.text?(o.innerHTML=n.text,l.modifyCSS(o,s.mix({},v.TITLE_CLASS,this.get("g2-legend-title"),n))):a.removeChild(o));var b=this.get("items"),_=this.get("itemTpl"),M=this.get("position"),S=this.get("layout"),w="right"===M||"left"===M||"vertical"===S?"block":"inline-block",k=s.mix({},v.LIST_ITEM_CLASS,{display:w},this.get(p)),A=s.mix({},v.MARKER_CLASS,this.get(d));if(s.each(b,function(e,n){var r,o=e.checked,c=t._formatItemValue(e.value),f=e.marker.fill||e.marker.stroke,g=o?f:h;r=s.isFunction(_)?_(c,g,o,n):_;var p=s.substitute(r,s.mix({},e,{index:n,checked:o?"checked":"unChecked",value:c,color:g,originColor:f,originValue:e.value.replace(/\"/g,""")})),v=l.createDom(p);v.style.color=t.get("textStyle").fill;var x=i(v,d),m=i(v,"g2-legend-text");if(l.modifyCSS(v,k),x&&l.modifyCSS(x,A),o||(v.style.color=h,x&&(x.style.backgroundColor=h)),u.appendChild(v),t.get("abridgeText")){var y=c,b=v.offsetWidth,M=t.get("textStyle").fontSize;isNaN(M)&&(-1!==M.indexOf("pt")?M=1*parseFloat(M.substr(0,M.length-2))/72*96:-1!==M.indexOf("px")&&(M=parseFloat(M.substr(0,M.length-2))));var S=M*y.length,w=Math.floor(b/M);b<2*M?y="":b<S&&w>1&&(y=y.substr(0,w-1)+"..."),m.innerText=y,v.addEventListener("mouseover",function(){var t=i(a.parentNode,"textTip");t.style.display="block",t.style.left=v.offsetLeft+v.offsetWidth+"px",t.style.top=v.offsetTop+15+"px",t.innerText=c}),v.addEventListener("mouseout",function(){i(a.parentNode,"textTip").style.display="none"})}}),this.get("abridgeText")){var P=this.get("tipTpl"),C=l.createDom(P),I=this.get("tipStyle");l.modifyCSS(C,I),a.parentNode.appendChild(C),C.addEventListener("mouseover",function(){C.style.display="none"})}this.set("legendWrapper",a)},n._adjustPositionOffset=function(){if(!1!==this.get("autoPosition")){var t=this.get("position"),e=this.get("offset"),n=this.get("offsetX"),r=this.get("offsetY");n&&(e[0]=n),r&&(e[1]=r);var i=this.get("legendWrapper");i.style.left=t[0]+"px",i.style.top=t[1]+"px",i.style.marginLeft=e[0]+"px",i.style.marginTop=e[1]+"px"}},n.getWidth=function(){return l.getOuterWidth(this.get("legendWrapper"))},n.getHeight=function(){return l.getOuterHeight(this.get("legendWrapper"))},n.move=function(e,n){/^\#/.test(this.get("container"))?t.prototype.move.call(this,e,n):(l.modifyCSS(this.get("legendWrapper"),{left:e+"px",top:n+"px"}),this.set("x",e),this.set("y",n))},n.destroy=function(){var e=this.get("legendWrapper");e&&e.parentNode&&e.parentNode.removeChild(e),t.prototype.destroy.call(this)},e}(u);t.exports=v},function(t,e,n){function r(t,e,n,r){return t[r]+(e[r]-t[r])*n}function i(t){return"#"+a(t[0])+a(t[1])+a(t[2])}function a(t){return t=Math.round(t),1===(t=t.toString(16)).length&&(t="0"+t),t}function o(t){var e=[];return e.push(parseInt(t.substr(1,2),16)),e.push(parseInt(t.substr(3,2),16)),e.push(parseInt(t.substr(5,2),16)),e}var s=n(10),u=n(12),c=n(2),l=/rgba?\(([\s.,0-9]+)\)/,h={},f=null,g={toRGB:function(t){if("#"===t[0]&&7===t.length)return t;f||(f=function(){var t=document.createElement("i");return t.title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),t}());var e;if(h[t])e=h[t];else{f.style.color=t,e=document.defaultView.getComputedStyle(f,"").getPropertyValue("color");e=i(l.exec(e)[1].split(/\s*,\s*/)),h[t]=e}return e},rgb2arr:o,gradient:function(t){var e=[];return u(t)&&(t=t.split("-")),c(t,function(t){-1===t.indexOf("#")&&(t=g.toRGB(t)),e.push(o(t))}),function(t){return function(t,e){(isNaN(e)||!s(e)||e<0)&&(e=0),e>1&&(e=1);var n=t.length-1,a=Math.floor(n*e),o=n*e-a,u=t[a],c=a===n?u:t[a+1];return i([r(u,c,o,0),r(u,c,o,1),r(u,c,o,2)])}(e,t)}}};t.exports=g},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(15),a=n(1),o=function(t){function e(e){var n;return(n=t.call(this,e)||this)._init_(),n.render(),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{type:null,plot:null,plotRange:null,rectStyle:{fill:"#CCD6EC",opacity:.3},lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},isTransposed:!1})},n._init_=function(){var t,e=this.get("plot");t="rect"===this.type?e.addGroup({zIndex:0}):e.addGroup(),this.set("container",t)},n._addLineShape=function(t,e){var n=this.get("container").addShape("line",{capture:!1,attrs:t});return this.set("crossLineShape"+e,n),n},n._renderHorizontalLine=function(t,e){var n=a.mix(this.get("lineStyle"),this.get("style")),r=a.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},n);this._addLineShape(r,"X")},n._renderVerticalLine=function(t,e){var n=a.mix(this.get("lineStyle"),this.get("style")),r=a.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},n);this._addLineShape(r,"Y")},n._renderBackground=function(t,e){var n=a.mix(this.get("rectStyle"),this.get("style")),r=this.get("container"),i=a.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),o=r.addShape("rect",{attrs:i,capture:!1});return this.set("crosshairsRectShape",o),o},n._updateRectShape=function(t){var e,n=this.get("crosshairsRectShape"),r=this.get("isTransposed"),i=t[0],o=t[t.length-1],s=r?"y":"x",u=r?"height":"width",c=i[s];if(t.length>1&&i[s]>o[s]&&(c=o[s]),this.get("width"))n.attr(s,c-this.get("crosshairs").width/2),n.attr(u,this.get("width"));else if(a.isArray(i.point[s])&&!i.size){var l=i.point[s][1]-i.point[s][0];n.attr(s,i.point[s][0]),n.attr(u,l)}else e=3*i.size/4,n.attr(s,c-e),1===t.length?n.attr(u,3*i.size/2):n.attr(u,Math.abs(o[s]-i[s])+2*e)},n.render=function(){var t=this.get("canvas"),e=this.get("plotRange"),n=this.get("isTransposed");switch(this.clear(),this.get("type")){case"x":this._renderHorizontalLine(t,e);break;case"y":this._renderVerticalLine(t,e);break;case"cross":this._renderHorizontalLine(t,e),this._renderVerticalLine(t,e);break;case"rect":this._renderBackground(t,e);break;default:n?this._renderHorizontalLine(t,e):this._renderVerticalLine(t,e)}},n.show=function(){var e=this.get("container");t.prototype.show.call(this),e.show()},n.hide=function(){var e=this.get("container");t.prototype.hide.call(this),e.hide()},n.clear=function(){var e=this.get("container");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.prototype.clear.call(this),e.clear()},n.destroy=function(){var e=this.get("container");t.prototype.destroy.call(this),e.remove()},n.setPosition=function(t,e,n){var r=this.get("crossLineShapeX"),i=this.get("crossLineShapeY"),a=this.get("crosshairsRectShape");i&&!i.get("destroyed")&&i.move(t,0),r&&!r.get("destroyed")&&r.move(0,e),a&&!a.get("destroyed")&&this._updateRectShape(n)},e}(i);t.exports=o},function(t,e){var n={_calcTooltipPosition:function(t,e,n,r,i,a){var o=0,s=0,u=20;if(a){var c=a.getBBox();o=c.width,s=c.height,t=c.x,e=c.y,u=5}switch(n){case"inside":t=t+o/2-r/2,e=e+s/2-i/2;break;case"top":t=t+o/2-r/2,e=e-i-u;break;case"left":t=t-r-u,e=e+s/2-i/2;break;case"right":t=t+o+u,e=e+s/2-i/2;break;case"bottom":default:t=t+o/2-r/2,e=e+s+u}return[t,e]},_constraintPositionInBoundary:function(t,e,n,r,i,a){return t+n+20>i?t=(t-=n+20)<0?0:t:t+20<0?t=20:t+=20,e+r+20>a?e=(e-=r+20)<0?0:e:e+20<0?e=20:e+=20,[t,e]},_constraintPositionInPlot:function(t,e,n,r,i,a){return t+n>i.tr.x&&(t-=a?n+1:n+40),t<i.tl.x&&(t=i.tl.x),a||(e+r>i.bl.y&&(e-=r+40),e<i.tl.y&&(e=i.tl.y)),[t,e]}};t.exports=n},function(t,e,n){var r=n(1),i={setMarkers:function(t,e){var n=this.get("markerGroup"),i=this.get("frontPlot");n?n.clear():(n=i.addGroup({zIndex:1,capture:!1}),this.set("markerGroup",n)),r.each(t,function(t){var i=r.mix({fill:t.color,symbol:"circle",shadowColor:t.color},e,{x:t.x,y:t.y});t.marker&&t.marker.activeSymbol&&(i.symbol=t.marker.activeSymbol),n.addShape("marker",{color:t.color,attrs:i})}),this.set("markerItems",t)},clearMarkers:function(){var t=this.get("markerGroup");t&&t.clear()}};t.exports=i},function(t,e,n){function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(22),o=n(123),s=n(125),u=n(124),c=n(50),l=n(1),h=n(9).FONT_FAMILY,f=l.DomUtil,g=l.MatrixUtil,p=function(t){function e(e){var n;n=t.call(this,e)||this,l.assign(r(n),u),l.assign(r(n),s);var i=n.get("crosshairs");if(i){var a="rect"===i.type?n.get("backPlot"):n.get("frontPlot"),c=new o(l.mix({plot:a,plotRange:n.get("plotRange"),canvas:n.get("canvas")},n.get("crosshairs")));c.hide(),n.set("crosshairGroup",c)}return n._init_(),n.get("items")&&n.render(),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return l.mix({},e,{boardStyle:{x:0,y:0,width:100,height:100,fill:"rgba(255, 255, 255, 0.9)",radius:4,stroke:"#e2e2e2",lineWidth:1},titleStyle:{fontFamily:h,text:"",textBaseline:"top",fontSize:12,fill:"rgb(87, 87, 87)",lineHeight:20,padding:20},markerStyle:{radius:4},nameStyle:{fontFamily:h,fontSize:12,fill:"rgb(87, 87, 87)",textBaseline:"middle",textAlign:"start",padding:8},valueStyle:{fontFamily:h,fontSize:12,fill:"rgb(87, 87, 87)",textBaseline:"middle",textAlign:"start",padding:30},padding:{top:20,right:20,bottom:20,left:20},itemGap:10,animationDuration:200})},n._init_=function(){var t=this.get("padding"),e=this.get("frontPlot"),n=e.addGroup({capture:!1});this.set("markerGroup",n);var r=e.addGroup();r.hide(),this.set("container",r);var i=r.addShape("rect",{attrs:l.mix({},this.get("boardStyle"))});this.set("board",i);var a=this.get("titleStyle");if(this.get("showTitle")){var o=r.addShape("text",{attrs:l.mix({x:t.left,y:t.top},a)});this.set("titleShape",o),o.name="tooltip-title"}var s=r.addGroup();s.move(t.left,t.top+a.lineHeight+a.padding),this.set("itemsGroup",s)},n.render=function(){var t=this;t.clear();var e=t.get("container"),n=t.get("board"),r=t.get("showTitle"),i=t.get("titleContent"),a=this.get("titleShape"),o=this.get("itemsGroup"),s=t.get("items"),u=t.get("padding");if(a&&r&&a.attr("text",i),o){var c=t.get("itemGap"),h=0;l.each(s,function(e){var n=t._addItem(e);n.move(0,h),o.add(n);var r=n.getBBox().height;h+=r+c})}var f=e.getBBox(),g=f.width+u.right,p=f.height+u.bottom;n.attr("width",g),n.attr("height",p),t._alignToRight(g)},n.clear=function(){var t=this.get("titleShape"),e=this.get("itemsGroup"),n=this.get("board");t.text="",e.clear(),n.attr("width",0),n.attr("height",0)},n.show=function(){this.get("container").show();var e=this.get("crosshairGroup");e&&e.show();var n=this.get("markerGroup");n&&n.show(),t.prototype.show.call(this),this.get("canvas").draw()},n.hide=function(){this.get("container").hide();var e=this.get("crosshairGroup");e&&e.hide();var n=this.get("markerGroup");n&&n.hide(),t.prototype.hide.call(this),this.get("canvas").draw()},n.destroy=function(){var e=this.get("container"),n=this.get("crosshairGroup");n&&n.destroy();var r=this.get("markerGroup");r&&r.remove(),t.prototype.destroy.call(this),e.remove()},n.setPosition=function(e,n,r){var i,a=this.get("container"),o=this.get("canvas").get("el"),s=f.getWidth(o),u=f.getHeight(o),c=a.getBBox(),h=c.width,p=c.height,d=e,v=n;if(this.get("position")){var x=c.width,m=c.height;e=(i=this._calcTooltipPosition(e,n,this.get("position"),x,m,r))[0],n=i[1]}else e=(i=this._constraintPositionInBoundary(e,n,h,p,s,u))[0],n=i[1];if(this.get("inPlot")){var y=this.get("plotRange");e=(i=this._constraintPositionInPlot(e,n,h,p,y,this.get("enterable")))[0],n=i[1]}var b=this.get("markerItems");l.isEmpty(b)||(d=b[0].x,v=b[0].y);var _=g.transform([1,0,0,0,1,0,0,0,1],[["t",e,n]]);a.stopAnimate(),a.animate({matrix:_},this.get("animationDuration"));var M=this.get("crosshairGroup");if(M){var S=this.get("items");M.setPosition(d,v,S)}t.prototype.setPosition.call(this,e,n)},n._addItem=function(t){var e=new a.Group,n=this.get("markerStyle").radius;if(t.marker){var r=l.mix({},t.marker,{x:t.marker.radius/2,y:0,symbol:t.marker.activeSymbol||t.marker.symbol});e.addShape("marker",{attrs:r}),n=t.marker.radius}var i=this.get("nameStyle");e.addShape("text",{attrs:l.mix({x:n+i.padding,y:0,text:t.name},i)});var o=this.get("valueStyle");return e.addShape("text",{attrs:l.mix({x:e.getBBox().width+o.padding,y:0,text:t.value},o)}),e},n._alignToRight=function(t){var e=this,n=this.get("itemsGroup").get("children");l.each(n,function(n){var r=n.get("children")[2],i=r.getBBox().width,a=t-i-2*e.get("padding").right;r.attr("x",a)})},e}(c);t.exports=p},function(t,e,n){t.exports={Axis:n(128),Component:n(30),Guide:n(256),Label:n(265),Legend:n(266),Tooltip:n(278)}},function(t,e,n){var r=n(14);r.Base=r,r.Circle=n(252),r.Grid=n(115),r.Helix=n(253),r.Line=n(254),r.Polyline=n(255),t.exports=r},function(t,e,n){var r=n(0),i=n(72),a=n(73),o=n(138),s=n(166),u=function t(e){t.superclass.constructor.call(this,e)};u.CFG={eventEnable:!0,width:null,height:null,widthCanvas:null,heightCanvas:null,widthStyle:null,heightStyle:null,containerDOM:null,canvasDOM:null,pixelRatio:null,renderer:"canvas"},r.extend(u,a),r.augment(u,{init:function(){u.superclass.init.call(this),this._setGlobalParam(),this._setContainer(),this._initPainter(),this._scale(),this.get("eventEnable")&&this._registEvents()},getEmitter:function(t,e){if(t){if(!r.isEmpty(t._getEvents()))return t;var n=t.get("parent");if(n&&!e.propagationStopped)return this.getEmitter(n,e)}},_getEventObj:function(t,e,n,r){var a=new i(t,e,!0,!0);return a.x=n.x,a.y=n.y,a.clientX=e.clientX,a.clientY=e.clientY,a.currentTarget=r,a.target=r,a},_triggerEvent:function(t,e){var n,r=this.getPointByClient(e.clientX,e.clientY),i=this.getShape(r.x,r.y,e),a=this.get("el");if("mousemove"===t){var o=this.get("preShape");if(o&&o!==i){var s=this._getEventObj("mouseleave",e,r,o);(n=this.getEmitter(o,e))&&n.emit("mouseleave",s),a.style.cursor="default"}if(i){var u=this._getEventObj("mousemove",e,r,i);if((n=this.getEmitter(i,e))&&n.emit("mousemove",u),o!==i){var c=this._getEventObj("mouseenter",e,r,i);n&&n.emit("mouseenter",c,e)}}else{var l=this._getEventObj("mousemove",e,r,this);this.emit("mousemove",l)}this.set("preShape",i)}else{var h=this._getEventObj(t,e,r,i||this);(n=this.getEmitter(i,e))&&n!==this&&n.emit(t,h),this.emit(t,h)}i&&!i.get("destroyed")&&(a.style.cursor=i.attr("cursor")||"default")},_registEvents:function(){var t=this,e=t.get("el");r.each(["mouseout","mouseover","mousemove","mousedown","mouseleave","mouseup","click","dblclick"],function(n){e.addEventListener(n,function(e){t._triggerEvent(n,e)},!1)}),e.addEventListener("touchstart",function(e){r.isEmpty(e.touches)||t._triggerEvent("touchstart",e.touches[0])},!1),e.addEventListener("touchmove",function(e){r.isEmpty(e.touches)||t._triggerEvent("touchmove",e.touches[0])},!1),e.addEventListener("touchend",function(e){r.isEmpty(e.changedTouches)||t._triggerEvent("touchend",e.changedTouches[0])},!1)},_scale:function(){var t=this.get("pixelRatio");this.scale(t,t)},_setGlobalParam:function(){this.get("pixelRatio")||this.set("pixelRatio",r.getRatio());var t=s[this.get("renderer")||"canvas"];this._cfg.renderer=t,this._cfg.canvas=this;var e=new o(this);this._cfg.timeline=e},_setContainer:function(){var t=this.get("containerId"),e=this.get("containerDOM");e||(e=document.getElementById(t),this.set("containerDOM",e)),r.modifyCSS(e,{position:"relative"})},_initPainter:function(){var t=this.get("containerDOM"),e=new this._cfg.renderer.painter(t);this._cfg.painter=e,this._cfg.canvasDOM=this._cfg.el=e.canvas,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=this.get("pixelRatio")||1,i=n.getBoundingClientRect();return{x:(t-i.left)*r,y:(e-i.top)*r}},getClientByPoint:function(t,e){var n=this.get("el").getBoundingClientRect(),r=this.get("pixelRatio")||1;return{clientX:t/r+n.left,clientY:e/r+n.top}},draw:function(){this._cfg.painter.draw(this)},getShape:function(t,e,n){return 3===arguments.length&&this._cfg.renderer.getShape?this._cfg.renderer.getShape.call(this,t,e,n):u.superclass.getShape.call(this,t,e)},_drawSync:function(){this._cfg.painter.drawSync(this)},destroy:function(){var t=this._cfg,e=t.containerDOM,n=t.canvasDOM;n&&e&&e.removeChild(n),t.timeline.stop(),u.superclass.destroy.call(this)}}),t.exports=u},function(t,e,n){"use strict";function r(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],g=n[1],p=n[2],d=n[3],v=n[4],x=n[5],m=n[6],y=n[7],b=n[8];return t[0]=f*r+g*o+p*c,t[1]=f*i+g*s+p*l,t[2]=f*a+g*u+p*h,t[3]=d*r+v*o+x*c,t[4]=d*i+v*s+x*l,t[5]=d*a+v*u+x*h,t[6]=m*r+y*o+b*c,t[7]=m*i+y*s+b*l,t[8]=m*a+y*u+b*h,t}function i(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}Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new a.ARRAY_TYPE(9);return a.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.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},e.clone=function(t){var e=new a.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},e.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},e.fromValues=function(t,e,n,r,i,o,s,u,c){var l=new a.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=i,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=c,t},e.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},e.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},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*o-s*c,f=-l*a+s*u,g=c*a-o*u,p=n*h+r*f+i*g;return p?(p=1/p,t[0]=h*p,t[1]=(-l*r+i*c)*p,t[2]=(s*r-i*o)*p,t[3]=f*p,t[4]=(l*n-i*u)*p,t[5]=(-s*n+i*a)*p,t[6]=g*p,t[7]=(-c*n+r*u)*p,t[8]=(o*n-r*a)*p,t):null},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=o*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*o,t[3]=s*u-a*l,t[4]=n*l-i*u,t[5]=i*a-n*s,t[6]=a*c-o*u,t[7]=r*u-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8];return e*(c*a-o*u)+n*(-c*i+o*s)+r*(u*i-a*s)},e.multiply=r,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],g=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*r+g*o+c,t[7]=f*i+g*s+l,t[8]=f*a+g*u+h,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),g=Math.cos(n);return t[0]=g*r+f*o,t[1]=g*i+f*s,t[2]=g*a+f*u,t[3]=g*o-f*r,t[4]=g*s-f*i,t[5]=g*u-f*a,t[6]=c,t[7]=l,t[8]=h,t},e.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},e.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},e.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},e.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},e.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},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,g=i*s,p=i*u,d=a*o,v=a*s,x=a*u;return t[0]=1-h-p,t[3]=l-x,t[6]=f+v,t[1]=l+x,t[4]=1-c-p,t[7]=g-d,t[2]=f-v,t[5]=g+d,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],g=e[11],p=e[12],d=e[13],v=e[14],x=e[15],m=n*s-r*o,y=n*u-i*o,b=n*c-a*o,_=r*u-i*s,M=r*c-a*s,S=i*c-a*u,w=l*d-h*p,k=l*v-f*p,A=l*x-g*p,P=h*v-f*d,C=h*x-g*d,I=f*x-g*v,T=m*I-y*C+b*P+_*A-M*k+S*w;return T?(T=1/T,t[0]=(s*I-u*C+c*P)*T,t[1]=(u*A-o*I-c*k)*T,t[2]=(o*C-s*A+c*w)*T,t[3]=(i*C-r*I-a*P)*T,t[4]=(n*I-i*A+a*k)*T,t[5]=(r*A-n*C-a*w)*T,t[6]=(d*S-v*M+x*_)*T,t[7]=(v*b-p*S-x*y)*T,t[8]=(p*M-d*b+x*m)*T,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.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))},e.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},e.subtract=i,e.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},e.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},e.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]},e.equals=function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],g=e[1],p=e[2],d=e[3],v=e[4],x=e[5],m=e[6],y=e[7],b=e[8];return Math.abs(n-f)<=a.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-g)<=a.EPSILON*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(i-p)<=a.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=a.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(s-v)<=a.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-x)<=a.EPSILON*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-m)<=a.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-y)<=a.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(h-b)<=a.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(38));e.mul=r,e.sub=i},function(t,e,n){"use strict";function r(){var t=new h.ARRAY_TYPE(2);return h.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function i(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function a(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function o(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function s(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function u(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function c(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function l(t){var e=t[0],n=t[1];return e*e+n*n}Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=r,e.clone=function(t){var e=new h.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new h.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=i,e.multiply=a,e.divide=o,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=s,e.squaredDistance=u,e.length=c,e.squaredLength=l,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.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},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.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},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*h.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.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},e.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},e.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},e.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},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1];return Math.abs(n-i)<=h.EPSILON*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=h.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))};var h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(38));e.len=c,e.sub=i,e.mul=a,e.div=o,e.dist=s,e.sqrDist=u,e.sqrLen=l,e.forEach=function(){var t=r();return function(e,n,r,i,a,o){var s=void 0,u=void 0;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],a(t,t,o),e[s]=t[0],e[s+1]=t[1];return e}}()},function(t,e,n){"use strict";function r(){var t=new p.ARRAY_TYPE(3);return p.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e,n){var r=new p.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=n,r}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function c(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)}function l(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}function h(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function f(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=r,e.clone=function(t){var e=new p.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=i,e.fromValues=a,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},e.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},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.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},e.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},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.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},e.distance=c,e.squaredDistance=l,e.squaredLength=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=f,e.dot=g,e.cross=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t},e.hermite=function(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),l=o*(3-2*a);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},e.bezier=function(t,e,n,r,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,l=3*a*s,h=3*u*o,f=u*a;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t},e.random=function(t,e){e=e||1;var n=2*p.RANDOM()*Math.PI,r=2*p.RANDOM()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t},e.transformQuat=function(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],u=e[1],c=e[2],l=i*c-a*u,h=a*s-r*c,f=r*u-i*s,g=i*f-a*h,p=a*l-r*f,d=r*h-i*l,v=2*o;return l*=v,h*=v,f*=v,g*=2,p*=2,d*=2,t[0]=s+l+g,t[1]=u+h+p,t[2]=c+f+d,t},e.rotateX=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateY=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateZ=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.angle=function(t,e){var n=a(t[0],t[1],t[2]),r=a(e[0],e[1],e[2]);f(n,n),f(r,r);var i=g(n,r);return i>1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return Math.abs(n-a)<=p.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=p.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=p.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))};var p=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(38));e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.len=i,e.sqrLen=h,e.forEach=function(){var t=r();return function(e,n,r,i,a,o){var s=void 0,u=void 0;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}()},function(t,e,n){var r=n(0);t.exports={canFill:!1,canStroke:!1,initAttrs:function(t){return this._attrs={opacity:1,fillOpacity:1,strokeOpacity:1,matrix:[1,0,0,0,1,0,0,0,1]},this.attr(r.assign(this.getDefaultAttrs(),t)),this},getDefaultAttrs:function(){return{}},attr:function(t,e){if(0===arguments.length)return this._attrs;if(r.isObject(t)){for(var n in t)this._setAttr(n,t[n]);return this.clearBBox(),this._cfg.hasUpdate=!0,this}return 2===arguments.length?(this._setAttr(t,e),this.clearBBox(),this._cfg.hasUpdate=!0,this):this._attrs[t]},_setAttr:function(t,e){var n=this._attrs;n[t]=e,"fill"!==t&&"stroke"!==t?"opacity"!==t?"clip"===t&&e?this._setClip(e):"path"===t&&this._afterSetAttrPath?this._afterSetAttrPath(e):"transform"!==t?"rotate"===t&&this.rotateAtStart(e):this.transform(e):n.globalAlpha=e:n[t+"Style"]=e},clearBBox:function(){this.setSilent("box",null)},hasFill:function(){return this.canFill&&this._attrs.fillStyle},hasStroke:function(){return this.canStroke&&this._attrs.strokeStyle},_setClip:function(t){t._cfg.renderer=this._cfg.renderer,t._cfg.canvas=this._cfg.canvas,t._cfg.parent=this._cfg.parent,t.hasFill=function(){return!0}}}},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 a(t,e){r(e)||(i(e)?(t[0]*=e[0],t[4]*=e[4]):o.mat3.multiply(t,t,e))}var o=n(0);t.exports={initTransform:function(){},resetMatrix:function(){this.attr("matrix",[1,0,0,0,1,0,0,0,1])},translate:function(t,e){var n=this._attrs.matrix;return o.mat3.translate(n,n,[t,e]),this.clearTotalMatrix(),this.attr("matrix",n),this},rotate:function(t){var e=this._attrs.matrix;return o.mat3.rotate(e,e,t),this.clearTotalMatrix(),this.attr("matrix",e),this},scale:function(t,e){var n=this._attrs.matrix;return o.mat3.scale(n,n,[t,e]),this.clearTotalMatrix(),this.attr("matrix",n),this},rotateAtStart:function(t){var e=this._attrs.x||this._cfg.attrs.x,n=this._attrs.y||this._cfg.attrs.y;return 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;return this.translate(t-n,e-r),this.set("x",t),this.set("y",e),this},transform:function(t){var e=this,n=this._attrs.matrix;return o.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",o.mat3.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;return n=e?this._getMatrixByRoot(e):this.attr("matrix"),o.vec3.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 o.each(n,function(t){o.mat3.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){a(t,e.getTotalMatrix())}a(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=o.mat3.invert([],e);n&&o.vec3.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(0),i={delay:"delay",rotate:"rotate"},a={fill:"fill",stroke:"stroke",fillStyle:"fillStyle",strokeStyle:"strokeStyle"};t.exports={animate:function(t,e,n,o,s){void 0===s&&(s=0);this.set("animating",!0);var u=this.get("timeline");u||(u=this.get("canvas").get("timeline"),this.setSilent("timeline",u));var c=this.get("animators")||[];u._timer||u.initTimer(),r.isNumber(o)&&(s=o,o=null),r.isFunction(n)?(o=n,n="easeLinear"):n=n||"easeLinear";var l=function(t,e){var n={matrix:null,attrs:{}},o=e._attrs;for(var s in t)if("transform"===s)n.matrix=r.transform(e.getMatrix(),t[s]);else if("rotate"===s)n.matrix=r.transform(e.getMatrix(),[["r",t[s]]]);else if("matrix"===s)n.matrix=t[s];else{if(a[s]&&/^[r,R,L,l]{1}[\s]*\(/.test(t[s]))continue;i[s]||o[s]===t[s]||(n.attrs[s]=t[s])}return n}(t,this),h={fromAttrs:function(t,e){var n={},r=e._attrs;for(var i in t.attrs)n[i]=r[i];return n}(l,this),toAttrs:l.attrs,fromMatrix:r.clone(this.getMatrix()),toMatrix:l.matrix,duration:e,easing:n,callback:o,delay:s,startTime:u.getTime(),id:r.uniqueId()};c.length>0?c=function(t,e){var n=e.delay,i=Object.prototype.hasOwnProperty;return r.each(e.toAttrs,function(e,a){r.each(t,function(t){n<t.startTime+t.duration&&i.call(t.toAttrs,a)&&(delete t.toAttrs[a],delete t.fromAttrs[a])})}),e.toMatrix&&r.each(t,function(t){n<t.startTime+t.duration&&t.toMatrix&&delete t.toMatrix}),t}(c,h):u.addAnimator(this),c.push(h),this.setSilent("animators",c),this.setSilent("pause",{isPaused:!1})},stopAnimate:function(){var t=this,e=this.get("animators");r.each(e,function(e){t.attr(e.toAttrs),e.toMatrix&&t.attr("matrix",e.toMatrix),e.callback&&e.callback()}),this.setSilent("animating",!1),this.setSilent("animators",[])},pauseAnimate:function(){var t=this.get("timeline");return this.setSilent("pause",{isPaused:!0,pauseTime:t.getTime()}),this},resumeAnimate:function(){var t=this.get("timeline").getTime(),e=this.get("animators"),n=this.get("pause").pauseTime;return r.each(e,function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null}),this.setSilent("pause",{isPaused:!1}),this.setSilent("animators",e),this}}},function(t,e,n){var r=n(4);r.Arc=n(77),r.Circle=n(78),r.Dom=n(79),r.Ellipse=n(80),r.Fan=n(81),r.Image=n(82),r.Line=n(83),r.Marker=n(41),r.Path=n(84),r.Polygon=n(85),r.Polyline=n(86),r.Rect=n(87),r.Text=n(88),t.exports=r},function(t,e,n){function r(t,e,n){return n.createPath(s),s.isPointInPath(t,e)}var i=n(0),a=n(39),o={arc:n(25),ellipse:n(76),line:n(24)},s=i.createDom('<canvas width="500" height="500"></canvas>').getContext("2d"),u={arc:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=n.startAngle,u=n.endAngle,c=n.clockwise,l=this.getHitLineWidth();return!!this.hasStroke()&&a.arcline(r,i,o,s,u,c,l,t,e)},circle:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=this.getHitLineWidth(),u=this.hasFill(),c=this.hasStroke();return u&&c?a.circle(r,i,o,t,e)||a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e):u?a.circle(r,i,o,t,e):!!c&&a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e)},dom:function(t,e){if(!this._cfg.el)return!1;var n=this._cfg.el.getBBox();return a.box(n.x,n.x+n.width,n.y,n.y+n.height,t,e)},ellipse:function(t,e){var n=this._attrs,r=this.hasFill(),o=this.hasStroke(),s=n.x,u=n.y,c=n.rx,l=n.ry,h=this.getHitLineWidth(),f=c>l?c:l,g=c>l?1:c/l,p=c>l?l/c:1,d=[t,e,1],v=[1,0,0,0,1,0,0,0,1];i.mat3.scale(v,v,[g,p]),i.mat3.translate(v,v,[s,u]);var x=i.mat3.invert([],v);return i.vec3.transformMat3(d,d,x),r&&o?a.circle(0,0,f,d[0],d[1])||a.arcline(0,0,f,0,2*Math.PI,!1,h,d[0],d[1]):r?a.circle(0,0,f,d[0],d[1]):!!o&&a.arcline(0,0,f,0,2*Math.PI,!1,h,d[0],d[1])},fan:function(t,e){function n(){var t=o.arc.nearAngle(y,d,v,x);if(i.isNumberEqual(y,t)){var e=i.vec2.squaredLength(m);if(g*g<=e&&e<=p*p)return!0}return!1}function r(){var n=s.getHitLineWidth(),r={x:Math.cos(d)*g+h,y:Math.sin(d)*g+f},i={x:Math.cos(d)*p+h,y:Math.sin(d)*p+f},o={x:Math.cos(v)*g+h,y:Math.sin(v)*g+f},u={x:Math.cos(v)*p+h,y:Math.sin(v)*p+f};return!!(a.line(r.x,r.y,i.x,i.y,n,t,e)||a.line(o.x,o.y,u.x,u.y,n,t,e)||a.arcline(h,f,g,d,v,x,n,t,e)||a.arcline(h,f,p,d,v,x,n,t,e))}var s=this,u=s.hasFill(),c=s.hasStroke(),l=s._attrs,h=l.x,f=l.y,g=l.rs,p=l.re,d=l.startAngle,v=l.endAngle,x=l.clockwise,m=[t-h,e-f],y=i.vec2.angleTo([1,0],m);return u&&c?n()||r():u?n():!!c&&r()},image:function(t,e){var n=this._attrs;if(this.get("toDraw")||!n.img)return!1;this._cfg.attrs&&this._cfg.attrs.img===n.img||this._setAttrImg();var r=n.x,i=n.y,o=n.width,s=n.height;return a.rect(r,i,o,s,t,e)},line:function(t,e){var n=this._attrs,r=n.x1,i=n.y1,o=n.x2,s=n.y2,u=this.getHitLineWidth();return!!this.hasStroke()&&a.line(r,i,o,s,u,t,e)},path:function(t,e){function n(){if(!i.isEmpty(o)){for(var n=a.getHitLineWidth(),r=0,s=o.length;r<s;r++)if(o[r].isInside(t,e,n))return!0;return!1}}var a=this,o=a.get("segments"),s=a.hasFill(),u=a.hasStroke();return s&&u?r(t,e,a)||n():s?r(t,e,a):!!u&&n()},marker:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.radius||n.r,s=this.getHitLineWidth();return a.circle(r,i,o+s/2,t,e)},polygon:function(t,e){function n(){var n=i._attrs.points;if(n.length<2)return!1;var r=i.getHitLineWidth(),o=n.slice(0);return n.length>=3&&o.push(n[0]),a.polyline(o,r,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},polyline: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 a.polyline(r,i,t,e)}return!1},rect:function(t,e){function n(){var n=i._attrs,r=n.x,o=n.y,s=n.width,u=n.height,c=n.radius,l=i.getHitLineWidth();if(0===c){var h=l/2;return a.line(r-h,o,r+s+h,o,l,t,e)||a.line(r+s,o-h,r+s,o+u+h,l,t,e)||a.line(r+s+h,o+u,r-h,o+u,l,t,e)||a.line(r,o+u+h,r,o-h,l,t,e)}return a.line(r+c,o,r+s-c,o,l,t,e)||a.line(r+s,o+c,r+s,o+u-c,l,t,e)||a.line(r+s-c,o+u,r+c,o+u,l,t,e)||a.line(r,o+u-c,r,o+c,l,t,e)||a.arcline(r+s-c,o+c,c,1.5*Math.PI,2*Math.PI,!1,l,t,e)||a.arcline(r+s-c,o+u-c,c,0,.5*Math.PI,!1,l,t,e)||a.arcline(r+c,o+u-c,c,.5*Math.PI,Math.PI,!1,l,t,e)||a.arcline(r+c,o+c,c,Math.PI,1.5*Math.PI,!1,l,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},text:function(t,e){var n=this.getBBox();if(this.hasFill()||this.hasStroke())return a.box(n.minX,n.maxX,n.minY,n.maxY,t,e)}};t.exports={isPointInPath:function(t,e){var n=u[this.type];return!!n&&n.call(this,t,e)}}},function(t,e,n){function r(t,e,n){var r=e.startTime;if(n<r+e.delay||e.isPaused)return!1;var o,u=e.duration,h=e.easing;if(n=n-r-e.delay,e.toAttrs.repeat)o=n%u/u,o=s[h](o);else{if(!((o=n/u)<1))return t.attr(e.toAttrs),e.toMatrix&&t.setMatrix(e.toMatrix),!0;o=s[h](o)}return function(t,e,n){var r={},o=e.toAttrs,s=e.fromAttrs,u=e.toMatrix;if(!t.get("destroyed")){var h;for(var f in o)if(!i.isEqual(s[f],o[f]))if("path"===f){var g=o[f],p=s[f];g.length>p.length?(g=a.parsePathString(o[f]),p=a.parsePathString(s[f]),p=a.fillPathByDiff(p,g),p=a.formatPath(p,g),e.fromAttrs.path=p,e.toAttrs.path=g):e.pathFormatted||(g=a.parsePathString(o[f]),p=a.parsePathString(s[f]),p=a.formatPath(p,g),e.fromAttrs.path=p,e.toAttrs.path=g,e.pathFormatted=!0),r[f]=[];for(var d=0;d<g.length;d++){for(var v=g[d],x=p[d],m=[],y=0;y<v.length;y++)i.isNumber(v[y])&&x&&i.isNumber(x[y])?(h=c(x[y],v[y]),m.push(h(n))):m.push(v[y]);r[f].push(m)}}else h=c(s[f],o[f]),r[f]=h(n);if(u){var b=l(e.fromMatrix,u)(n);t.setMatrix(b)}t.attr(r)}}(t,e,o),!1}var i=n(0),a=n(42),o=n(139),s=n(142),u=n(153),c=u.interpolate,l=u.interpolateArray,h=function(t){this._animators=[],this._current=0,this._timer=null,this.canvas=t};i.augment(h,{initTimer:function(){var t,e,n,i=this,a=this,s=!1;a._timer=o.timer(function(o){if(a._current=o,i._animators.length>0){for(var u=i._animators.length-1;u>=0;u--)if((t=i._animators[u]).get("destroyed"))a.removeAnimator(u);else{if(!t.get("pause").isPaused)for(var c=(e=t.get("animators")).length-1;c>=0;c--)n=e[c],(s=r(t,n,o))&&(e.splice(c,1),s=!1,n.callback&&n.callback());0===e.length&&a.removeAnimator(u)}i.canvas.draw()}})},addAnimator:function(t){this._animators.push(t)},removeAnimator:function(t){this._animators.splice(t,1)},isAnimating:function(){return!!this._animators.length},stop:function(){this._timer&&this._timer.stop()},stopAllAnimations:function(){this._animators.forEach(function(t){t.stopAnimate()}),this._animators=[],this.canvas.draw()},getTime:function(){return this._current}}),t.exports=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(43);n.d(e,"now",function(){return r.b}),n.d(e,"timer",function(){return r.c}),n.d(e,"timerFlush",function(){return r.d});var i=n(140);n.d(e,"timeout",function(){return i.a});var a=n(141);n.d(e,"interval",function(){return a.a})},function(t,e,n){"use strict";var r=n(43);e.a=function(t,e,n){var i=new r.a;return e=null==e?0:+e,i.restart(function(n){i.stop(),t(n+e)},e,n),i}},function(t,e,n){"use strict";var r=n(43);e.a=function(t,e,n){var i=new r.a,a=e;return null==e?(i.restart(t,e,n),i):(e=+e,n=null==n?Object(r.b)():+n,i.restart(function r(o){o+=a,i.restart(r,a+=e,n),t(o)},e,n),i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(143);n.d(e,"easeLinear",function(){return r.a});var i=n(144);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 a=n(145);n.d(e,"easeCubic",function(){return a.b}),n.d(e,"easeCubicIn",function(){return a.a}),n.d(e,"easeCubicOut",function(){return a.c}),n.d(e,"easeCubicInOut",function(){return a.b});var o=n(146);n.d(e,"easePoly",function(){return o.b}),n.d(e,"easePolyIn",function(){return o.a}),n.d(e,"easePolyOut",function(){return o.c}),n.d(e,"easePolyInOut",function(){return o.b});var s=n(147);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(148);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(149);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(150);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 h=n(151);n.d(e,"easeBack",function(){return h.b}),n.d(e,"easeBackIn",function(){return h.a}),n.d(e,"easeBackOut",function(){return h.c}),n.d(e,"easeBackInOut",function(){return h.b});var f=n(152);n.d(e,"easeElastic",function(){return f.c}),n.d(e,"easeElasticIn",function(){return f.a}),n.d(e,"easeElasticOut",function(){return f.c}),n.d(e,"easeElasticInOut",function(){return f.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 a});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),a=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==+t?1: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 Object(r.a)(1-+t)},e.c=function(t){return 1-Object(r.a)(t)},e.b=function(t){return((t*=2)<=1?Object(r.a)(1-t):2-Object(r.a)(t-1))/2};var r=n(89)},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)<i?g*t*t:t<o?g*(t-=a)*t+s:t<c?g*(t-=u)*t+l:g*(t-=h)*t+f}e.a=function(t){return 1-r(1-t)},e.c=r,e.b=function(t){return((t*=2)<=1?1-r(1-t):r(t-1)+1)/2};var i=4/11,a=6/11,o=8/11,s=.75,u=9/11,c=10/11,l=.9375,h=21/22,f=63/64,g=1/i/i},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 a});var r=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(1.70158),i=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(1.70158),a=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158)},function(t,e,n){"use strict";n.d(e,"a",function(){return a}),n.d(e,"c",function(){return o}),n.d(e,"b",function(){return s});var r=n(89),i=2*Math.PI,a=function t(e,n){function a(t){return e*Object(r.a)(- --t)*Math.sin((o-t)/n)}var o=Math.asin(1/(e=Math.max(1,e)))*(n/=i);return a.amplitude=function(e){return t(e,n*i)},a.period=function(n){return t(e,n)},a}(1,.3),o=function t(e,n){function a(t){return 1-e*Object(r.a)(t=+t)*Math.sin((t+o)/n)}var o=Math.asin(1/(e=Math.max(1,e)))*(n/=i);return a.amplitude=function(e){return t(e,n*i)},a.period=function(n){return t(e,n)},a}(1,.3),s=function t(e,n){function a(t){return((t=2*t-1)<0?e*Object(r.a)(-t)*Math.sin((o-t)/n):2-e*Object(r.a)(t)*Math.sin((o+t)/n))/2}var o=Math.asin(1/(e=Math.max(1,e)))*(n/=i);return a.amplitude=function(e){return t(e,n*i)},a.period=function(n){return t(e,n)},a}(1,.3)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(44);n.d(e,"interpolate",function(){return r.a});var i=n(94);n.d(e,"interpolateArray",function(){return i.a});var a=n(47);n.d(e,"interpolateBasis",function(){return a.b});var o=n(92);n.d(e,"interpolateBasisClosed",function(){return o.a});var s=n(95);n.d(e,"interpolateDate",function(){return s.a});var u=n(28);n.d(e,"interpolateNumber",function(){return u.a});var c=n(96);n.d(e,"interpolateObject",function(){return c.a});var l=n(156);n.d(e,"interpolateRound",function(){return l.a});var h=n(97);n.d(e,"interpolateString",function(){return h.a});var f=n(157);n.d(e,"interpolateTransformCss",function(){return f.a}),n.d(e,"interpolateTransformSvg",function(){return f.b});var g=n(160);n.d(e,"interpolateZoom",function(){return g.a});var p=n(91);n.d(e,"interpolateRgb",function(){return p.a}),n.d(e,"interpolateRgbBasis",function(){return p.b}),n.d(e,"interpolateRgbBasisClosed",function(){return p.c});var d=n(161);n.d(e,"interpolateHsl",function(){return d.a}),n.d(e,"interpolateHslLong",function(){return d.b});var v=n(162);n.d(e,"interpolateLab",function(){return v.a});var x=n(163);n.d(e,"interpolateHcl",function(){return x.a}),n.d(e,"interpolateHclLong",function(){return x.b});var m=n(164);n.d(e,"interpolateCubehelix",function(){return m.b}),n.d(e,"interpolateCubehelixLong",function(){return m.a});var y=n(165);n.d(e,"quantize",function(){return y.a})},function(t,e,n){"use strict";function r(t){if(t instanceof a)return new a(t.l,t.a,t.b,t.opacity);if(t instanceof f)return g(t);t instanceof d.b||(t=Object(d.h)(t));var e,n,r=c(t.r),i=c(t.g),s=c(t.b),u=o((.2225045*r+.7168786*i+.0606169*s)/m);return r===i&&i===s?e=n=u:(e=o((.4360747*r+.3850649*i+.1430804*s)/x),n=o((.0139322*r+.0971045*i+.7141733*s)/y)),new a(116*u-16,500*(e-u),200*(u-n),t.opacity)}function i(t,e,n,i){return 1===arguments.length?r(t):new a(t,e,n,null==i?1:i)}function a(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function o(t){return t>S?Math.pow(t,1/3):t/M+b}function s(t){return t>_?t*t*t:M*(t-b)}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){if(t instanceof f)return new f(t.h,t.c,t.l,t.opacity);if(t instanceof a||(t=r(t)),0===t.a&&0===t.b)return new f(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*v.b;return new f(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function h(t,e,n,r){return 1===arguments.length?l(t):new f(t,e,n,null==r?1:r)}function f(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function g(t){if(isNaN(t.h))return new a(t.l,0,0,t.opacity);var e=t.h*v.a;return new a(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}e.a=i,e.b=h;var p=n(46),d=n(45),v=n(90),x=.96422,m=1,y=.82521,b=4/29,_=6/29,M=3*_*_,S=_*_*_;Object(p.a)(a,i,Object(p.b)(d.a,{brighter:function(t){return new a(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new a(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 e=x*s(e),t=m*s(t),n=y*s(n),new d.b(u(3.1338561*e-1.6168667*t-.4906146*n),u(-.9787684*e+1.9161415*t+.033454*n),u(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Object(p.a)(f,h,Object(p.b)(d.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 g(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 o.b||(t=Object(o.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,a=(d*r+g*e-p*n)/(d+g-p),u=r-a,c=(f*(n-a)-l*u)/h,v=Math.sqrt(c*c+u*u)/(f*a*(1-a)),x=v?Math.atan2(c,u)*s.b-120:NaN;return new i(x<0?x+360:x,v,a,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 a=n(46),o=n(45),s=n(90),u=-.14861,c=1.78277,l=-.29227,h=-.90649,f=1.97294,g=f*h,p=f*c,d=c*l-h*u;Object(a.a)(i,r,Object(a.b)(o.a,{brighter:function(t){return t=null==t?o.c:Math.pow(o.c,t),new i(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o.d:Math.pow(o.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 o.b(255*(e+n*(u*r+c*i)),255*(e+n*(l*r+h*i)),255*(e+n*(f*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 a(t){return t.length?t.pop()+" ":""}return function(o,s){var u=[],c=[];return o=t(o),s=t(s),function(t,r,a,o,s,u){if(t!==a||r!==o){var c=s.push("translate(",null,e,null,n);u.push({i:c-4,x:Object(i.a)(t,a)},{i:c-2,x:Object(i.a)(r,o)})}else(a||o)&&s.push("translate("+a+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,u,c),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,r)-2,x:Object(i.a)(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(o.rotate,s.rotate,u,c),function(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,r)-2,x:Object(i.a)(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(o.skewX,s.skewX,u,c),function(t,e,n,r,o,s){if(t!==n||e!==r){var u=o.push(a(o)+"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||o.push(a(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,u,c),o=s=null,function(t){for(var e,n=-1,r=c.length;++n<r;)u[(e=c[n]).i]=e.x(t);return u.join("")}}}n.d(e,"a",function(){return o}),n.d(e,"b",function(){return s});var i=n(28),a=n(158),o=r(a.a,"px, ","px)","deg)"),s=r(a.b,", ",")",")")},function(t,e,n){"use strict";e.a=function(t){return"none"===t?s.b:(r||(r=document.createElement("DIV"),i=document.documentElement,a=document.defaultView),r.style.transform=t,t=a.getComputedStyle(i.appendChild(r),null).getPropertyValue("transform"),i.removeChild(r),t=t.slice(7,-1).split(","),Object(s.a)(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},e.b=function(t){return null==t?s.b:(o||(o=document.createElementNS("http://www.w3.org/2000/svg","g")),o.setAttribute("transform",t),(t=o.transform.baseVal.consolidate())?(t=t.matrix,Object(s.a)(t.a,t.b,t.c,t.d,t.e,t.f)):s.b)};var r,i,a,o,s=n(159)},function(t,e,n){"use strict";n.d(e,"b",function(){return i});var r=180/Math.PI,i={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};e.a=function(t,e,n,i,a,o){var s,u,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,c/=u),t*i<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:a,translateY:o,rotate:Math.atan2(e,t)*r,skewX:Math.atan(c)*r,scaleX:s,scaleY:u}}},function(t,e,n){"use strict";function r(t){return((t=Math.exp(t))+1/t)/2}var i=Math.SQRT2;e.a=function(t,e){var n,a,o=t[0],s=t[1],u=t[2],c=e[0],l=e[1],h=e[2],f=c-o,g=l-s,p=f*f+g*g;if(p<1e-12)a=Math.log(h/u)/i,n=function(t){return[o+t*f,s+t*g,u*Math.exp(i*t*a)]};else{var d=Math.sqrt(p),v=(h*h-u*u+4*p)/(2*u*2*d),x=(h*h-u*u-4*p)/(2*h*2*d),m=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(x*x+1)-x);a=(y-m)/i,n=function(t){var e=t*a,n=r(m),c=u/(2*d)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(i*e+m)-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[o+c*f,s+c*g,u*n/r(i*e+m)]}}return n.duration=1e3*a,n}},function(t,e,n){"use strict";function r(t){return function(e,n){var r=t((e=Object(i.d)(e)).h,(n=Object(i.d)(n)).h),o=Object(a.a)(e.s,n.s),s=Object(a.a)(e.l,n.l),u=Object(a.a)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=o(t),e.l=s(t),e.opacity=u(t),e+""}}}n.d(e,"b",function(){return o});var i=n(13),a=n(20);e.a=r(a.c);var o=r(a.a)},function(t,e,n){"use strict";e.a=function(t,e){var n=Object(i.a)((t=Object(r.e)(t)).l,(e=Object(r.e)(e)).l),a=Object(i.a)(t.a,e.a),o=Object(i.a)(t.b,e.b),s=Object(i.a)(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=a(e),t.b=o(e),t.opacity=s(e),t+""}};var r=n(13),i=n(20)},function(t,e,n){"use strict";function r(t){return function(e,n){var r=t((e=Object(i.c)(e)).h,(n=Object(i.c)(n)).h),o=Object(a.a)(e.c,n.c),s=Object(a.a)(e.l,n.l),u=Object(a.a)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=o(t),e.l=s(t),e.opacity=u(t),e+""}}}n.d(e,"b",function(){return o});var i=n(13),a=n(20);e.a=r(a.c);var o=r(a.a)},function(t,e,n){"use strict";function r(t){return function e(n){function r(e,r){var o=t((e=Object(i.b)(e)).h,(r=Object(i.b)(r)).h),s=Object(a.a)(e.s,r.s),u=Object(a.a)(e.l,r.l),c=Object(a.a)(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=s(t),e.l=u(Math.pow(t,n)),e.opacity=c(t),e+""}}return n=+n,r.gamma=e,r}(1)}n.d(e,"a",function(){return o});var i=n(13),a=n(20);e.b=r(a.c);var o=r(a.a)},function(t,e,n){"use strict";e.a=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}},function(t,e,n){t.exports={canvas:n(167),svg:n(170)}},function(t,e,n){t.exports={painter:n(168)}},function(t,e,n){var r=n(0),i=n(169),a=["fillStyle","font","globalAlpha","lineCap","lineWidth","lineJoin","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline","lineDash","lineDashOffset"],o=function(){function t(t){if(!t)return null;var e=r.uniqueId("canvas_"),n=r.createDom('<canvas id="'+e+'"></canvas>');return t.appendChild(n),this.type="canvas",this.canvas=n,this.context=n.getContext("2d"),this.toDraw=!1,this}var e=t.prototype;return e.beforeDraw=function(){var t=this.canvas;this.context&&this.context.clearRect(0,0,t.width,t.height)},e.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()}),n.beforeDraw();try{n._drawGroup(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},e.drawSync=function(t){this.beforeDraw(),this._drawGroup(t)},e._drawGroup=function(t){if(!t._cfg.removed&&!t._cfg.destroyed&&t._cfg.visible){var e=t._cfg.children,n=null;this.setContext(t);for(var r=0;r<e.length;r++)n=e[r],e[r].isGroup?this._drawGroup(n):this._drawShape(n);this.restoreContext(t)}},e._drawShape=function(t){t._cfg.removed||t._cfg.destroyed||!t._cfg.visible||(this.setContext(t),t.drawInner(this.context),this.restoreContext(t),t._cfg.attrs=t._attrs,t._cfg.hasUpdate=!1)},e.setContext=function(t){var e=this.context,n=t._attrs.clip;e.save(),n&&(n.resetTransform(e),n.createPath(e),e.clip()),this.resetContext(t),t.resetTransform(e)},e.restoreContext=function(){this.context.restore()},e.resetContext=function(t){var e=this.context,n=t._attrs;if(!t.isGroup)for(var o in n)if(a.indexOf(o)>-1){var s=n[o];"fillStyle"===o&&(s=i.parseStyle(s,t,e)),"strokeStyle"===o&&(s=i.parseStyle(s,t,e)),"lineDash"===o&&e.setLineDash?r.isArray(s)?e.setLineDash(s):r.isString(s)&&e.setLineDash(s.split(" ")):e[o]=s}},t}();t.exports=o},function(t,e,n){function r(t,e){var n=t.match(l);i.each(n,function(t){t=t.split(":"),e.addColorStop(t[0],t[1])})}var i=n(0),a=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,o=/[^\s\,]+/gi,s=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,u=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,c=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,l=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,h={};t.exports={parsePath:function(t){return t=t||[],i.isArray(t)?t:i.isString(t)?(t=t.match(a),i.each(t,function(e,n){if((e=e.match(o))[0].length>1){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,n){if(i.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e,n){var a,o,u=s.exec(t),c=i.mod(i.toRadian(parseFloat(u[1])),2*Math.PI),l=u[2],h=e.getBBox();c>=0&&c<.5*Math.PI?(a={x:h.minX,y:h.minY},o={x:h.maxX,y:h.maxY}):.5*Math.PI<=c&&c<Math.PI?(a={x:h.maxX,y:h.minY},o={x:h.minX,y:h.maxY}):Math.PI<=c&&c<1.5*Math.PI?(a={x:h.maxX,y:h.maxY},o={x:h.minX,y:h.minY}):(a={x:h.minX,y:h.maxY},o={x:h.maxX,y:h.minY});var f=Math.tan(c),g=f*f,p=(o.x-a.x+f*(o.y-a.y))/(g+1)+a.x,d=f*(o.x-a.x+f*(o.y-a.y))/(g+1)+a.y,v=n.createLinearGradient(a.x,a.y,p,d);return r(l,v),v}(t,e,n);if("r"===t[0])return function(t,e,n){var i=u.exec(t),a=parseFloat(i[1]),o=parseFloat(i[2]),s=parseFloat(i[3]),c=i[4];if(0===s){var h=c.match(l);return h[h.length-1].split(":")[1]}var f=e.getBBox(),g=f.maxX-f.minX,p=f.maxY-f.minY,d=Math.sqrt(g*g+p*p)/2,v=n.createRadialGradient(f.minX+g*a,f.minY+p*o,s*d,f.minX+g/2,f.minY+p/2,d);return r(c,v),v}(t,e,n);if("p"===t[0])return function(t,e,n){function r(){i=n.createPattern(a,s),e.setSilent("pattern",i),e.setSilent("patternSource",t)}if(e.get("patternSource")&&e.get("patternSource")===t)return e.get("pattern");var i,a,o=c.exec(t),s=o[1],u=o[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;case"n":s="no-repeat";break;default:s="no-repeat"}return a=new Image,u.match(/^data:/i)||(a.crossOrigin="Anonymous"),a.src=u,a.complete?r():(a.onload=r,a.src=a.src),i}(t,e,n)}return t}},numberToColor:function(t){var e=h[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,h[t]=e}return e}}},function(t,e,n){t.exports={painter:n(171),getShape:n(178)}},function(t,e,n){var r=n(0),i=n(19).parseRadius,a=n(41),o=n(172),s={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject",fan:"path",group:"g"},u={opacity:"opacity",fillStyle:"fill",strokeOpacity:"stroke-opacity",fillOpacity:"fill-opacity",strokeStyle:"stroke",x:"x",y:"y",r:"r",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},c={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},l={left:"left",start:"left",center:"middle",right:"end",end:"end"},h=function(){function t(t){if(!t)return null;var e=r.uniqueId("canvas_"),n=r.createDom('<svg id="'+e+'"></svg>');return t.appendChild(n),this.type="svg",this.canvas=n,this.context=new o(n),this.toDraw=!1,this}var e=t.prototype;return e.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()});try{t.resetMatrix(),n._drawGroup(t,!1)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},e.drawSync=function(t){this._drawChildren(t,!1)},e._drawGroup=function(t,e){var n=t._cfg;n.removed||n.destroyed||(!n.el&&n.attrs&&(e=!0),n.tobeRemoved&&(r.each(n.tobeRemoved,function(t){t.parentNode&&t.parentNode.removeChild(t)}),n.tobeRemoved=[]),this._drawShape(t,e),n.children&&n.children.length>0&&this._drawChildren(t,e))},e._drawChildren=function(t,e){var n,r=t._cfg.children;if(r){if(t._cfg.el&&!e){var i=t._cfg.el.childNodes.length+1;0!==i&&i!==r.length&&(e=!0)}for(var a=0;a<r.length;a++)(n=r[a]).isGroup?this._drawGroup(n,e):this._drawShape(n,e)}},e._drawShape=function(t,e){var n=t._attrs,r=t._cfg,i=r.el;r.removed||r.destroyed?i&&i.parentNode.removeChild(r.el):(e&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null),!i&&r.parent&&(this._createDom(t),this._updateShape(t)),i=r.el,!1!==r.visible?(r.visible&&i.hasAttribute("visibility")&&i.removeAttribute("visibility"),r.hasUpdate&&this._updateShape(t),n.clip&&n.clip._cfg.hasUpdate&&this._updateShape(n.clip)):i.setAttribute("visibility","hidden"))},e._updateShape=function(t){var e=t._attrs,n=t._cfg.attrs;if(n)if(t._cfg.el||this._createDom(t),"clip"in e&&this._setClip(t,e.clip),("shadowOffsetX"in e||"shadowOffsetY"in e||"shadowBlur"in e||"shadowColor"in e)&&this._setShadow(t),"text"!==t.type){"fan"===t.type&&this._updateFan(t),"marker"===t.type&&t._cfg.el.setAttribute("d",this._assembleMarker(e)),"rect"===t.type&&t._cfg.el.setAttribute("d",this._assembleRect(e));for(var i in e)e[i]!==n[i]&&this._setAttribute(t,i,e[i]);t._cfg.attrs=r.deepMix({},t._attrs),t._cfg.hasUpdate=!1}else this._updateText(t)},e._setAttribute=function(t,e,n){var i=t.type,a=t._attrs,o=t._cfg.el,s=this.context;if("marker"!==i&&"rect"!==i||!~["x","y","radius","r"].indexOf(e))if(~["circle","ellipse"].indexOf(i)&&~["x","y"].indexOf(e))o.setAttribute("c"+e,parseInt(n,10));else{if("polygon"===i&&"points"===e)return n&&0!==n.length||(n=""),r.isArray(n)&&(n=(n=n.map(function(t){return t[0]+","+t[1]})).join(" ")),void o.setAttribute("points",n);if("path"===e&&r.isArray(n))o.setAttribute("d",this._formatPath(n));else if("img"!==e){if("transform"===e)return n?void this._setTransform(t):void o.removeAttribute("transform");if("rotate"===e)return n?void this._setTransform(t):void o.removeAttribute("transform");if("matrix"!==e)if("fillStyle"!==e&&"strokeStyle"!==e){if("clip"!==e)if(~e.indexOf("Arrow"))if(e=u[e],n){var c=null;c="boolean"==typeof n?s.getDefaultArrow(a,e):s.addArrow(a,e),o.setAttribute(e,"url(#"+c+")"),t._cfg[e]=c}else t._cfg[e]=null,o.removeAttribute(e);else"html"===e&&("string"==typeof n?o.innerHTML=n:(o.innerHTML="",o.appendChild(n))),u[e]&&o.setAttribute(u[e],n)}else this._setColor(t,e,n);else this._setTransform(t)}else this._setImage(t,n)}},e._createDom=function(t){var e=s[t.type],n=t._attrs;if(!e)throw new Error("the type"+t.type+"is not supported by svg");var r=document.createElementNS("http://www.w3.org/2000/svg",e);return t._cfg.el=r,t._cfg.parent&&t._cfg.parent.get("el").appendChild(r),t._cfg.attrs={},"text"===t.type?(r.setAttribute("paint-order","stroke"),r.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")):(n.stroke||n.strokeStyle||r.setAttribute("stroke","none"),n.fill||n.fillStyle||r.setAttribute("fill","none")),r},e._assembleMarker=function(t){var e=t.r;if(void 0===t.r&&(e=t.radius),isNaN(Number(t.x))||isNaN(Number(t.y))||isNaN(Number(e)))return"";var n="";return n="function"==typeof t.symbol?t.symbol(t.x,t.y,e):a.Symbols[t.symbol||"circle"](t.x,t.y,e),r.isArray(n)&&(n=n.map(function(t){return t.join(" ")}).join("")),n},e._assembleRect=function(t){var e=t.x,n=t.y,a=t.width,o=t.height,s=t.radius;if(!s)return"M "+e+","+n+" l "+a+",0 l 0,"+o+" l"+-a+" 0 z";var u=i(s);r.isArray(s)?1===s.length?u.r1=u.r2=u.r3=u.r4=s[0]:2===s.length?(u.r1=u.r3=s[0],u.r2=u.r4=s[1]):3===s.length?(u.r1=s[0],u.r2=u.r4=s[1],u.r3=s[2]):(u.r1=s[0],u.r2=s[1],u.r3=s[2],u.r4=s[3]):u.r1=u.r2=u.r3=u.r4=s;return[["M "+(e+u.r1)+","+n],["l "+(a-u.r1-u.r2)+",0"],["a "+u.r2+","+u.r2+",0,0,1,"+u.r2+","+u.r2],["l 0,"+(o-u.r2-u.r3)],["a "+u.r3+","+u.r3+",0,0,1,"+-u.r3+","+u.r3],["l "+(u.r3+u.r4-a)+",0"],["a "+u.r4+","+u.r4+",0,0,1,"+-u.r4+","+-u.r4],["l 0,"+(u.r4+u.r1-o)],["a "+u.r1+","+u.r1+",0,0,1,"+u.r1+","+-u.r1],["z"]].join(" ")},e._formatPath=function(t){return~(t=t.map(function(t){return t.join(" ")}).join("")).indexOf("NaN")?"":t},e._setTransform=function(t){for(var e=t._attrs.matrix,n=t._cfg.el,r=[],i=0;i<9;i+=3)r.push(e[i]+","+e[i+1]);-1===(r=r.join(",")).indexOf("NaN")?n.setAttribute("transform","matrix("+r+")"):console.warn("invalid matrix:",e)},e._setImage=function(t,e){var n=t._attrs,i=t._cfg.el;if(r.isString(e))i.setAttribute("href",e);else if(e instanceof Image)n.width||(i.setAttribute("width",e.width),t._attrs.width=e.width),n.height||(i.setAttribute("height",e.height),t._attrs.height=e.height),i.setAttribute("href",e.src);else if(e instanceof HTMLElement&&r.isString(e.nodeName)&&"CANVAS"===e.nodeName.toUpperCase())i.setAttribute("href",e.toDataURL());else if(e instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",e.width),a.setAttribute("height",e.height),a.getContext("2d").putImageData(e,0,0),n.width||(i.setAttribute("width",e.width),t._attrs.width=e.width),n.height||(i.setAttribute("height",e.height),t._attrs.height=e.height),i.setAttribute("href",a.toDataURL())}},e._updateFan=function(t){function e(t,e,n){return{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var n=t._attrs,i=t._cfg,a={x:n.x,y:n.y},o=[],s=n.startAngle,u=n.endAngle;r.isNumberEqual(u-s,2*Math.PI)&&(u-=1e-5);var c=e(s,n.re,a),l=e(u,n.re,a),h=u>s?1:0,f=Math.abs(u-s)>Math.PI?1:0,g=n.rs,p=n.re,d=e(s,n.rs,a),v=e(u,n.rs,a);n.rs>0?(o.push("M "+l.x+","+l.y),o.push("L "+v.x+","+v.y),o.push("A "+g+","+g+",0,"+f+","+(1===h?0:1)+","+d.x+","+d.y),o.push("L "+c.x+" "+c.y)):(o.push("M "+a.x+","+a.y),o.push("L "+c.x+","+c.y)),o.push("A "+p+","+p+",0,"+f+","+h+","+l.x+","+l.y),n.rs>0?o.push("L "+v.x+","+v.y):o.push("Z"),i.el.setAttribute("d",o.join(" "))},e._updateText=function(t){var e=t._attrs,n=t._cfg.attrs,r=t._cfg.el;this._setFont(t);for(var i in e)if(e[i]!==n[i]){if("text"===i){this._setText(t,""+e[i]);continue}if("fillStyle"===i||"strokeStyle"===i){this._setColor(t,i,e[i]);continue}if("matrix"===i){this._setTransform(t);continue}u[i]&&r.setAttribute(u[i],e[i])}t._cfg.attrs=Object.assign({},t._attrs),t._cfg.hasUpdate=!1},e._setFont=function(t){var e=t.get("el"),n=t._attrs,r=n.fontSize;e.setAttribute("alignment-baseline",c[n.textBaseline]||"baseline"),e.setAttribute("text-anchor",l[n.textAlign]||"left"),r&&+r<12&&(n.matrix=[1,0,0,0,1,0,0,0,1],t.transform([["t",-n.x,-n.y],["s",+r/12,+r/12],["t",n.x,n.y]]))},e._setText=function(t,e){var n=t._cfg.el,i=t._attrs.textBaseline||"bottom";if(e)if(~e.indexOf("\n")){var a=t._attrs.x,o=e.split("\n"),s=o.length-1,u="";r.each(o,function(t,e){0===e?"alphabetic"===i?u+='<tspan x="'+a+'" dy="'+-s+'em">'+t+"</tspan>":"top"===i?u+='<tspan x="'+a+'" dy="0.9em">'+t+"</tspan>":"middle"===i?u+='<tspan x="'+a+'" dy="'+-(s-1)/2+'em">'+t+"</tspan>":"bottom"===i?u+='<tspan x="'+a+'" dy="-'+(s+.3)+'em">'+t+"</tspan>":"hanging"===i&&(u+='<tspan x="'+a+'" dy="'+(-(s-1)-.3)+'em">'+t+"</tspan>"):u+='<tspan x="'+a+'" dy="1em">'+t+"</tspan>"}),n.innerHTML=u}else n.innerHTML=e;else n.innerHTML=""},e._setClip=function(t,e){var n=t._cfg.el;if(e)if(n.hasAttribute("clip-path"))e._cfg.hasUpdate&&this._updateShape(e);else{this._createDom(e),this._updateShape(e);var r=this.context.addClip(e);n.setAttribute("clip-path","url(#"+r+")")}else n.removeAttribute("clip-path")},e._setColor=function(t,e,n){var r=t._cfg.el,i=this.context;if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var a=i.find("gradient",n);a||(a=i.addGradient(n)),r.setAttribute(u[e],"url(#"+a+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=i.find("pattern",n);o||(o=i.addPattern(n)),r.setAttribute(u[e],"url(#"+o+")")}else r.setAttribute(u[e],n);else r.setAttribute(u[e],"none")},e._setShadow=function(t){var e=t._cfg.el,n=t._attrs,r={dx:n.shadowOffsetX,dy:n.shadowOffsetY,blur:n.shadowBlur,color:n.shadowColor};if(r.dx||r.dy||r.blur||r.color){var i=this.context.find("filter",r);i||(i=this.context.addShadow(r,this)),e.setAttribute("filter","url(#"+i+")")}else e.removeAttribute("filter")},t}();t.exports=h},function(t,e,n){var r=n(0),i=n(173),a=n(174),o=n(175),s=n(176),u=n(177),c=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n=r.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}var e=t.prototype;return e.find=function(t,e){for(var n=this.children,r=null,i=0;i<n.length;i++)if(n[i].match(t,e)){r=n[i].id;break}return r},e.findById=function(t){for(var e=this.children,n=null,r=0;r<e.length;r++)if(e[r].id===t){n=e[r];break}return n},e.add=function(t){this.children.push(t),t.canvas=this.canvas,t.parent=this},e.getDefaultArrow=function(t,e){var n=t.stroke||t.strokeStyle;if(this.defaultArrow[n])return this.defaultArrow[n].id;var r=new o(t,e);return this.defaultArrow[n]=r,this.el.appendChild(r.el),r.id},e.addGradient=function(t){var e=new i(t);return this.el.appendChild(e.el),this.add(e),e.id},e.addArrow=function(t,e){var n=new o(t,e);return this.el.appendChild(n.el),n.id},e.addShadow=function(t){var e=new a(t);return this.el.appendChild(e.el),this.add(e),e.id},e.addPattern=function(t){var e=new u(t);return this.el.appendChild(e.el),this.add(e),e.id},e.addClip=function(t){var e=new s(t);return this.el.appendChild(e.el),this.add(e),e.id},t}();t.exports=c},function(t,e,n){function r(t){var e=t.match(s);if(!e)return"";var n="";return e.sort(function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])}),i.each(e,function(t){t=t.split(":"),n+='<stop offset="'+t[0]+'" stop-color="'+t[1]+'"></stop>'}),n}var i=n(0),a=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,o=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,u=function(){function t(t){var e=null,n=i.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,o,s=a.exec(t),u=i.mod(i.toRadian(parseFloat(s[1])),2*Math.PI),c=s[2];u>=0&&u<.5*Math.PI?(n={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=u&&u<Math.PI?(n={x:1,y:0},o={x:0,y:1}):Math.PI<=u&&u<1.5*Math.PI?(n={x:1,y:1},o={x:0,y:0}):(n={x:0,y:1},o={x:1,y:0});var l=Math.tan(u),h=l*l,f=(o.x-n.x+l*(o.y-n.y))/(h+1)+n.x,g=l*(o.x-n.x+l*(o.y-n.y))/(h+1)+n.y;e.setAttribute("x1",n.x),e.setAttribute("y1",n.y),e.setAttribute("x2",f),e.setAttribute("y2",g),e.innerHTML=r(c)}(t,e=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")):function(t,e){var n=o.exec(t),i=parseFloat(n[1]),a=parseFloat(n[2]),s=parseFloat(n[3]),u=n[4];e.setAttribute("cx",i),e.setAttribute("cy",a),e.setAttribute("r",s),e.innerHTML=r(u)}(t,e=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")),e.setAttribute("id",n),this.el=e,this.id=n,this.cfg=t,this}return t.prototype.match=function(t,e){return this.cfg===e},t}();t.exports=u},function(t,e,n){var r=n(0),i={shadowColor:"color",shadowOpacity:"opacity",shadowBlur:"blur",shadowOffsetX:"dx",shadowOffsetY:"dy"},a={x:"-40%",y:"-40%",width:"200%",height:"200%"},o=function(){function t(t){this.type="filter";var e=document.createElementNS("http://www.w3.org/2000/svg","filter");return r.each(a,function(t,n){e.setAttribute(n,t)}),this.el=e,this.id=r.uniqueId("filter_"),this.el.id=this.id,this.cfg=t,this._parseShadow(t,e),this}var e=t.prototype;return e.match=function(t,e){if(this.type!==t)return!1;var n=!0,i=this.cfg;return r.each(Object.keys(i),function(t){if(i[t]!==e[t])return n=!1,!1}),n},e.update=function(t,e){var n=this.cfg;return n[i[t]]=e,this._parseShadow(n,this.el),this},e._parseShadow=function(t,e){var n='<feDropShadow \n dx="'+(t.dx||0)+'" \n dy="'+(t.dy||0)+'" \n stdDeviation="'+(t.blur?t.blur/10:0)+'"\n flood-color="'+(t.color?t.color:"#000")+'"\n flood-opacity="'+(t.opacity?t.opacity:1)+'"\n />';e.innerHTML=n},t}();t.exports=o},function(t,e,n){var r=n(0),i=function(){function t(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","marker"),i=r.uniqueId("marker_");n.setAttribute("id",i);var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("stroke","none"),a.setAttribute("fill",t.stroke||"#000"),n.appendChild(a),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=a,this.id=i,this.cfg=t["marker-start"===e?"startArrow":"endArrow"],this.stroke=t.stroke||"#000",!0===this.cfg?this._setDefaultPath(e,a):this._setMarker(t.lineWidth,a),this}var e=t.prototype;return e.match=function(){return!1},e._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L6,3 L0,6 L3,3Z"),n.setAttribute("refX",3),n.setAttribute("refY",3)},e._setMarker=function(t,e){var n=this.el,i=this.cfg.path,a=this.cfg.d;r.isArray(i)&&(i=i.map(function(t){return t.join(" ")}).join("")),e.setAttribute("d",i),n.appendChild(e),a&&n.setAttribute("refX",a/t)},e.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();t.exports=i},function(t,e,n){var r=n(0),i=function(){function t(t){this.type="clip";var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=r.uniqueId("clip_"),e.id=this.id;var n=t._cfg.el;return e.appendChild(n.cloneNode(!0)),this.cfg=t,this}var e=t.prototype;return e.match=function(){return!1},e.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();t.exports=i},function(t,e,n){var r=n(0),i=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){function e(){console.log(u.width,u.height),n.setAttribute("width",u.width),n.setAttribute("height",u.height)}var n=document.createElementNS("http://www.w3.org/2000/svg","pattern");n.setAttribute("patternUnits","userSpaceOnUse");var a=document.createElementNS("http://www.w3.org/2000/svg","image");n.appendChild(a);var o=r.uniqueId("pattern_");n.id=o,this.el=n,this.id=o,this.cfg=t;var s=i.exec(t)[2];a.setAttribute("href",s);var u=new Image;return s.match(/^data:/i)||(u.crossOrigin="Anonymous"),u.src=s,u.complete?e():(u.onload=e,u.src=u.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();t.exports=a},function(t,e){var n={svg:"svg",circle:"circle",rect:"rect",text:"text",path:"path",foreignObject:"foreignObject",polygon:"polygon",ellipse:"ellipse",image:"image"};t.exports=function(t,e,r){var i=r.target||r.srcElement;if(!n[i.tagName]){for(var a=i.parentNode;a&&!n[a.tagName];)a=a.parentNode;i=a}return this._cfg.el===i?this:this.find(function(t){return t._cfg&&t._cfg.el===i})}},function(t,e,n){var r=n(2),i=n(17),a=n(180),o=n(189),s=n(202),u=n(205),c=n(209),l=n(219),h=n(220),f=n(224),g=n(230),p=n(235),d={DOMUtil:a,DomUtil:a,MatrixUtil:l,PathUtil:f,arrayUtil:o,domUtil:a,eventUtil:s,formatUtil:u,mathUtil:c,matrixUtil:l,objectUtil:h,stringUtil:g,pathUtil:f,typeUtil:p,augment:n(60),clone:n(32),debounce:n(242),deepMix:n(33),each:r,extend:n(59),filter:n(48),group:n(243),groupBy:n(114),groupToMap:n(113),indexOf:n(244),isEmpty:n(54),isEqual:n(35),isEqualWith:n(245),map:n(246),mix:i,pick:n(247),throttle:n(248),toArray:n(23),toString:n(18),uniqueId:n(57)};r([a,o,s,u,c,l,h,f,g,p],function(t){i(d,t)}),t.exports=d},function(t,e,n){t.exports={addEventListener:n(181),createDom:n(66),getBoundingClientRect:n(182),getHeight:n(183),getOuterHeight:n(184),getOuterWidth:n(185),getRatio:n(186),getStyle:n(187),getWidth:n(188),modifyCSS:n(67),requestAnimationFrame:n(68)}},function(t,e){t.exports=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)}}}}},function(t,e){t.exports=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}},function(t,e){t.exports=function(t,e){var n=this.getStyle(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}},function(t,e){t.exports=function(t,e){var n=this.getHeight(t,e),r=parseFloat(this.getStyle(t,"borderTopWidth"))||0,i=parseFloat(this.getStyle(t,"paddingTop"))||0,a=parseFloat(this.getStyle(t,"paddingBottom"))||0;return n+r+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+i+a}},function(t,e){t.exports=function(t,e){var n=this.getWidth(t,e),r=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,i=parseFloat(this.getStyle(t,"paddingLeft"))||0,a=parseFloat(this.getStyle(t,"paddingRight"))||0;return n+r+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+i+a}},function(t,e){t.exports=function(){return window.devicePixelRatio?window.devicePixelRatio:2}},function(t,e,n){var r=n(7);t.exports=function(t,e,n){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return r(n)?null:n}}},function(t,e){t.exports=function(t,e){var n=this.getStyle(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}},function(t,e,n){t.exports={contains:n(29),difference:n(190),find:n(191),firstValue:n(192),flatten:n(193),flattenDeep:n(194),getRange:n(195),merge:n(196),pull:n(61),pullAt:n(100),reduce:n(197),remove:n(198),sortBy:n(199),union:n(200),uniq:n(101),valuesOfKey:n(201)}},function(t,e,n){var r=n(48),i=n(29);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r(t,function(t){return!i(e,t)})}},function(t,e,n){var r=n(5),i=n(16),a=n(98);t.exports=function(t,e){var n=void 0;if(r(e)&&(n=e),i(e)&&(n=function(t){return a(t,e)}),n)for(var o=0;o<t.length;o+=1)if(n(t[o]))return t[o];return null}},function(t,e,n){var r=n(7),i=n(3);t.exports=function(t,e){for(var n=null,a=0;a<t.length;a++){var o=t[a][e];if(!r(o)){n=i(o)?o[0]:o;break}}return n}},function(t,e,n){var r=n(3),i=n(2);t.exports=function(t){if(!r(t))return t;var e=[];return i(t,function(t){r(t)?i(t,function(t){e.push(t)}):e.push(t)}),e}},function(t,e,n){var r=n(3);t.exports=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(r(e))for(var i=0;i<e.length;i+=1)t(e[i],n);else n.push(e);return n}},function(t,e,n){var r=n(48),i=n(3);t.exports=function(t){if(!(t=r(t,function(t){return!isNaN(t)})).length)return{min:0,max:0};if(i(t[0])){for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);t=e}var a=Math.max.apply(null,t);return{min:Math.min.apply(null,t),max:a}}},function(t,e){t.exports=function(t){for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e}},function(t,e,n){var r=n(3),i=n(16),a=n(2);t.exports=function(t,e,n){if(!r(t)&&!i(t))return t;var o=n;return a(t,function(t,n){o=e(o,t,n)}),o}},function(t,e,n){var r=n(8),i=n(100);t.exports=function(t,e){var n=[];if(!r(t))return n;for(var a=-1,o=[],s=t.length;++a<s;){var u=t[a];e(u,a,t)&&(n.push(u),o.push(a))}return i(t,o),n}},function(t,e,n){var r=n(12),i=n(5),a=n(3);t.exports=function(t,e){var n=void 0;if(i(e))n=function(t,n){return e(t)-e(n)};else{var o=[];r(e)?o.push(e):a(e)&&(o=e),n=function(t,e){for(var n=0;n<o.length;n+=1){var r=o[n];if(t[r]>e[r])return 1;if(t[r]<e[r])return-1}return 0}}return t.sort(n),t}},function(t,e,n){var r=n(2),i=n(23),a=n(101);t.exports=function(){var t=[],e=i(arguments);return r(e,function(e){t=t.concat(e)}),a(t)}},function(t,e,n){var r=n(7),i=n(3),a=n(2);t.exports=function(t,e){for(var n=[],o={},s=0;s<t.length;s++){var u=t[s][e];r(u)||(i(u)||(u=[u]),a(u,function(t){o[t]||(n.push(t),o[t]=!0)}))}return n}},function(t,e,n){t.exports={getWrapBehavior:n(203),wrapBehavior:n(204)}},function(t,e){t.exports=function(t,e){return t["_wrap_"+e]}},function(t,e){t.exports=function(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];var n=function(n){t[e](n)};return t["_wrap_"+e]=n,n}},function(t,e,n){var r=n(206);t.exports={number2color:r,numberToColor:r,parsePath:n(207),parseRadius:n(208)}},function(t,e){var n={};t.exports=function(t){var e=n[t];if(!e){for(var r=t.toString(16),i=r.length;i<6;i++)r="0"+r;e="#"+r,n[t]=e}return e}},function(t,e,n){var r=n(3),i=n(12),a=n(2),o=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,s=/[^\s\,]+/gi;t.exports=function(t){return t=t||[],r(t)?t:i(t)?(t=t.match(o),a(t,function(e,n){if((e=e.match(s))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}a(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0}},function(t,e,n){var r=n(3);t.exports=function(t){var e=0,n=0,i=0,a=0;return r(t)?1===t.length?e=n=i=a=t[0]:2===t.length?(e=i=t[0],n=a=t[1]):3===t.length?(e=t[0],n=a=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],a=t[3]):e=n=i=a=t,{r1:e,r2:n,r3:i,r4:a}}},function(t,e,n){var r=n(62);t.exports={clamp:n(36),fixedBase:n(210),isDecimal:n(211),isEven:n(212),isInteger:n(213),isNegative:n(214),isNumberEqual:r,isOdd:n(215),isPositive:n(216),maxBy:n(217),minBy:n(218),mod:n(65),snapEqual:r,toDegree:n(64),toInt:n(102),toInteger:n(102),toRadian:n(63)}},function(t,e){t.exports=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t%1!=0}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t%2==0}},function(t,e,n){var r=n(10),i=Number.isInteger?Number.isInteger:function(t){return r(t)&&t%1==0};t.exports=i},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t<0}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t%2!=0}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t>0}},function(t,e,n){var r=n(3),i=n(5),a=n(2);t.exports=function(t,e){if(r(t)){var n=t[0],o=void 0;o=i(e)?e(t[0]):t[0][e];var s=void 0;return a(t,function(t){(s=i(e)?e(t):t[e])>o&&(n=t,o=s)}),n}}},function(t,e,n){var r=n(3),i=n(5),a=n(2);t.exports=function(t,e){if(r(t)){var n=t[0],o=void 0;o=i(e)?e(t[0]):t[0][e];var s=void 0;return a(t,function(t){(s=i(e)?e(t):t[e])<o&&(n=t,o=s)}),n}}},function(t,e,n){t.exports={mat3:n(37),vec2:n(69),vec3:n(70),transform:n(71)}},function(t,e,n){t.exports={forIn:n(221),has:n(103),hasKey:n(222),hasValue:n(223),keys:n(99),isMatch:n(98),values:n(104)}},function(t,e,n){t.exports=n(2)},function(t,e,n){t.exports=n(103)},function(t,e,n){var r=n(29),i=n(104);t.exports=function(t,e){return r(i(t),e)}},function(t,e,n){var r=n(225),i=n(108),a=n(107),o=n(110);t.exports={catmullRom2Bezier:o,catmullRomToBezier:o,fillPath:n(226),fillPathByDiff:n(227),formatPath:n(229),intersection:r,pathIntersection:r,parsePathArray:n(106),parsePathString:n(109),pathToAbsolute:i,path2absolute:i,pathTocurve:a,path2curve:a,rectPath:n(105)}},function(t,e,n){var r=n(3),i=n(105),a=n(107),o=function(t,e,n,r,i){return t*(t*(-3*e+9*n-9*r+3*i)+6*e-12*n+6*r)-3*e+3*n},s=function(t,e,n,r,i,a,s,u,c){null===c&&(c=1);for(var l=(c=c>1?1:c<0?0:c)/2,h=[-.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],g=0,p=0;p<12;p++){var d=l*h[p]+l,v=o(d,t,n,i,s),x=o(d,e,r,a,u),m=v*v+x*x;g+=f[p]*Math.sqrt(m)}return l*g},u=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)<Math.min(i,o)||Math.min(t,n)>Math.max(i,o)||Math.max(e,r)<Math.min(a,s)||Math.min(e,r)>Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},c=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},l=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:i(t,e,n,r),vb:[t,e,n,r].join(" ")}},h=function(t,e,n,i,a,o,s,u){r(t)||(t=[t,e,n,i,a,o,s,u]);var c=function(t,e,n,r,i,a,o,s){for(var u=[],c=[[],[]],l=void 0,h=void 0,f=void 0,g=void 0,p=0;p<2;++p)if(0===p?(h=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*o,f=3*n-3*t):(h=6*e-12*r+6*a,l=-3*e+9*r-9*a+3*s,f=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(h)<1e-12)continue;(g=-f/h)>0&&g<1&&u.push(g)}else{var d=h*h-4*f*l,v=Math.sqrt(d);if(!(d<0)){var x=(-h+v)/(2*l);x>0&&x<1&&u.push(x);var m=(-h-v)/(2*l);m>0&&m<1&&u.push(m)}}for(var y=u.length,b=y,_=void 0;y--;)_=1-(g=u[y]),c[0][y]=_*_*_*t+3*_*_*g*n+3*_*g*g*i+g*g*g*o,c[1][y]=_*_*_*e+3*_*_*g*r+3*_*g*g*a+g*g*g*s;return c[0][b]=t,c[1][b]=e,c[0][b+1]=o,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 l(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},f=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,g=f*u,p=t+2*u*(n-t)+f*(i-2*n+t),d=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),x=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+g*o,y:l*e+3*h*u*r+3*c*u*u*a+g*s,m:{x:p,y:d},n:{x:v,y:x},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(p-v,d-x)/Math.PI}},g=function(t,e,n){if(!function(t,e){return t=l(t),e=l(e),c(e,t.x,t.y)||c(e,t.x2,t.y)||c(e,t.x,t.y2)||c(e,t.x2,t.y2)||c(t,e.x,e.y)||c(t,e.x2,e.y)||c(t,e.x,e.y2)||c(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)}(h(t),h(e)))return n?0:[];for(var r=~~(s.apply(0,t)/8),i=~~(s.apply(0,e)/8),a=[],o=[],g={},p=n?0:[],d=0;d<r+1;d++){var v=f.apply(0,t.concat(d/r));a.push({x:v.x,y:v.y,t:d/r})}for(var x=0;x<i+1;x++){var m=f.apply(0,e.concat(x/i));o.push({x:m.x,y:m.y,t:x/i})}for(var y=0;y<r;y++)for(var b=0;b<i;b++){var _=a[y],M=a[y+1],S=o[b],w=o[b+1],k=Math.abs(M.x-_.x)<.001?"y":"x",A=Math.abs(w.x-S.x)<.001?"y":"x",P=u(_.x,_.y,M.x,M.y,S.x,S.y,w.x,w.y);if(P){if(g[P.x.toFixed(4)]===P.y.toFixed(4))continue;g[P.x.toFixed(4)]=P.y.toFixed(4);var C=_.t+Math.abs((P[k]-_[k])/(M[k]-_[k]))*(M.t-_.t),I=S.t+Math.abs((P[A]-S[A])/(w[A]-S[A]))*(w.t-S.t);C>=0&&C<=1&&I>=0&&I<=1&&(n?p++:p.push({x:P.x,y:P.y,t1:C,t2:I}))}}return p};t.exports=function(t,e){return function(t,e,n){t=a(t),e=a(e);for(var r=void 0,i=void 0,o=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,p=void 0,d=n?0:[],v=0,x=t.length;v<x;v++){var m=t[v];if("M"===m[0])r=u=m[1],i=c=m[2];else{"C"===m[0]?(r=(f=[r,i].concat(m.slice(1)))[6],i=f[7]):(f=[r,i,r,i,u,c,u,c],r=u,i=c);for(var y=0,b=e.length;y<b;y++){var _=e[y];if("M"===_[0])o=l=_[1],s=h=_[2];else{"C"===_[0]?(o=(p=[o,s].concat(_.slice(1)))[6],s=p[7]):(p=[o,s,o,s,l,h,l,h],o=l,s=h);var M=g(f,p,n);if(n)d+=M;else{for(var S=0,w=M.length;S<w;S++)M[S].segment1=v,M[S].segment2=y,M[S].bez1=f,M[S].bez2=p;d=d.concat(M)}}}}}return d}(t,e)}},function(t,e){function n(t,e){function n(t,e){if(1===t.length)r.push(t[0]),i.push(t[0]);else{for(var a=[],o=0;o<t.length-1;o++)0===o&&r.push(t[0]),o===t.length-2&&i.push(t[o+1]),a[o]=[(1-e)*t[o][0]+e*t[o+1][0],(1-e)*t[o][1]+e*t[o+1][1]];n(a,e)}}var r=[],i=[];return t.length&&n(t,e),{left:r,right:i.reverse()}}function r(t,e,r){if(1===r)return[[].concat(t)];var i=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])i=i.concat(function(t,e,r){var i=[[t[1],t[2]]];r=r||2;var a=[];"A"===e[0]?(i.push(e[6]),i.push(e[7])):"C"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]]),i.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]])):i.push([e[1],e[2]]);for(var o=i,s=1/r,u=0;u<r-1;u++){var c=n(o,s/(1-s*u));a.push(c.left),o=c.right}return a.push(o),a.map(function(t){var e=[];return 4===t.length&&(e.push("C"),e=e.concat(t[2])),t.length>=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])})}(t,e,r));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=r-1;o++)i.push(a)}return i}t.exports=function(t,e){if(1===t.length)return t;var n=t.length-1,i=e.length-1,a=n/i,o=[];if(1===t.length&&"M"===t[0][0]){for(var s=0;s<i-n;s++)t.push(t[0]);return t}for(var u=0;u<i;u++){var c=Math.floor(a*u);o[c]=(o[c]||0)+1}var l=o.reduce(function(e,i,a){return a===n?e.concat(t[n]):e.concat(r(t[a],t[a+1],i))},[]);return l.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||l.push("Z"),l}},function(t,e,n){function r(t,e,n){var r=null,i=n;return e<i&&(i=e,r="add"),t<i&&(i=t,r="del"),{type:r,min:i}}var i=n(228);t.exports=function(t,e){var n=function(t,e){var n=t.length,a=e.length,o=void 0,s=void 0,u=0;if(0===n||0===a)return null;for(var c=[],l=0;l<=n;l++)c[l]=[],c[l][0]={min:l};for(var h=0;h<=a;h++)c[0][h]={min:h};for(var f=1;f<=n;f++){o=t[f-1];for(var g=1;g<=a;g++){s=e[g-1],u=i(o,s)?0:1;var p=c[f-1][g].min+1,d=c[f][g-1].min+1,v=c[f-1][g-1].min+u;c[f][g]=r(p,d,v)}}return c}(t,e),a=t.length,o=e.length,s=[],u=1,c=1;if(n[a][o]!==a){for(var l=1;l<=a;l++){var h=n[l][l].min;c=l;for(var f=u;f<=o;f++)n[l][f].min<h&&(h=n[l][f].min,c=f);u=c,n[l][u].type&&s.push({index:l-1,type:n[l][u].type})}for(var g=s.length-1;g>=0;g--)u=s[g].index,"add"===s[g].type?t.splice(u,0,[].concat(t[u])):t.splice(u,1)}if((a=t.length)<o)for(var p=0;p<o-a;p++)"z"===t[a-1][0]||"Z"===t[a-1][0]?t.splice(a-2,0,t[a-2]):t.push(t[a-1]);return t}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(t.length!==e.length)return!1;var n=!0;return r(t,function(t,r){if(t!==e[r])return n=!1,!1}),n}},function(t,e){function n(t){var e=[];switch(t[0]){case"M":case"L":e.push([t[1],t[2]]);break;case"A":e.push([t[6],t[7]]);break;case"Q":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"T":e.push([t[1],t[2]]);break;case"C":e.push([t[5],t[6]]),e.push([t[1],t[2]]),e.push([t[3],t[4]]);break;case"S":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"H":case"V":e.push([t[1],t[1]])}return e}function r(t,e,r){for(var i=[].concat(t),a=void 0,o=1/(r+1),s=n(e)[0],u=1;u<=r;u++)o*=u,0===(a=Math.floor(t.length*o))?i.unshift([s[0]*o+t[a][0]*(1-o),s[1]*o+t[a][1]*(1-o)]):i.splice(a,0,[s[0]*o+t[a][0]*(1-o),s[1]*o+t[a][1]*(1-o)]);return i}t.exports=function(t,e){if(t.length<=1)return t;for(var i=void 0,a=0;a<e.length;a++)if(t[a][0]!==e[a][0])switch(i=n(t[a]),e[a][0]){case"M":t[a]=["M"].concat(i[0]);break;case"L":t[a]=["L"].concat(i[0]);break;case"A":t[a]=[].concat(e[a]),t[a][6]=i[0][0],t[a][7]=i[0][1];break;case"Q":if(i.length<2){if(!(a>0)){t[a]=e[a];break}i=r(i,t[a-1],1)}t[a]=["Q"].concat(i.reduce(function(t,e){return t.concat(e)},[]));break;case"T":t[a]=["T"].concat(i[0]);break;case"C":if(i.length<3){if(!(a>0)){t[a]=e[a];break}i=r(i,t[a-1],2)}t[a]=["C"].concat(i.reduce(function(t,e){return t.concat(e)},[]));break;case"S":if(i.length<2){if(!(a>0)){t[a]=e[a];break}i=r(i,t[a-1],1)}t[a]=["S"].concat(i.reduce(function(t,e){return t.concat(e)},[]));break;default:t[a]=e[a]}return t}},function(t,e,n){var r={lc:n(231),lowerCase:n(111),lowerFirst:n(232),substitute:n(233),uc:n(234),upperCase:n(112),upperFirst:n(58)};t.exports=r},function(t,e,n){t.exports=n(111)},function(t,e,n){var r=n(18);t.exports=function(t){var e=r(t);return e.charAt(0).toLowerCase()+e.substring(1)}},function(t,e){t.exports=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}},function(t,e,n){t.exports=n(112)},function(t,e,n){var r=n(6),i={getType:n(55),isArray:n(3),isArrayLike:n(8),isBoolean:n(53),isFunction:n(5),isNil:n(7),isNull:n(236),isNumber:n(10),isObject:n(31),isObjectLike:n(34),isPlainObject:n(16),isPrototype:n(56),isType:r,isUndefined:n(237),isString:n(12),isRegExp:n(238),isDate:n(239),isArguments:n(240),isError:n(241)};t.exports=i},function(t,e){t.exports=function(t){return null===t}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"RegExp")}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Date")}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Arguments")}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Error")}},function(t,e){t.exports=function(t,e,n){var r=void 0;return function(){var i=this,a=arguments,o=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(i,a)},e),o&&t.apply(i,a)}}},function(t,e,n){var r=n(113);t.exports=function(t,e){if(!e)return[t];var n=r(t,e),i=[];for(var a in n)i.push(n[a]);return i}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var i=-1,a=0;a<t.length;a++)if(t[a]===e){i=a;break}return i}},function(t,e,n){var r=n(5),i=n(35);t.exports=function(t,e,n){return r(n)?!!n(t,e):i(t,e)}},function(t,e,n){var r=n(2),i=n(8);t.exports=function(t,e){if(!i(t))return t;var n=[];return r(t,function(t,r){n.push(e(t,r))}),n}},function(t,e,n){var r=n(2),i=n(16),a=Object.prototype.hasOwnProperty;t.exports=function(t,e){if(null===t||!i(t))return{};var n={};return r(e,function(e){a.call(t,e)&&(n[e]=t[e])}),n}},function(t,e){t.exports=function(t,e,n){var r=void 0,i=void 0,a=void 0,o=void 0,s=0;n||(n={});var u=function(){s=!1===n.leading?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},c=function(){var c=Date.now();s||!1!==n.leading||(s=c);var l=e-(c-s);return i=this,a=arguments,l<=0||l>e?(r&&(clearTimeout(r),r=null),s=c,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(u,l)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c}},function(t,e,n){function r(t,e,n,r){var i=t.getBBox(),a=i.width,o=i.height,s={x:e,y:n,textAlign:"center"};switch(r){case 0:s.y-=o/2,s.textAlign="left";break;case 1:s.y-=o/2,s.textAlign="right";break;case 2:s.y+=o/2,s.textAlign="right";break;case 3:s.y+=o/2,s.textAlign="left";break;case 5:s.y-=o/2;break;case 6:s.y+=o/2;break;case 7:s.x+=a/2,s.textAlign="left";break;case 8:s.x-=a/2,s.textAlign="right"}return t.attr(s),t.getBBox()}var i=n(117);t.exports=function(t){for(var e,n,a,o,s,u=new i,c=[],l=0;l<t.length;l++){a=(n=t[l]).attr("x"),o=n.attr("y"),s=!1;for(var h=0;h<8;h++)if(e=r(n,a,o,h),u.hasGap(e)){u.fillGap(e),s=!0;break}s||c.push(n)}for(var f=0;f<c.length;f++)c[f].remove();return s}},function(t,e,n){function r(t,e){var n,r=t.attr("x"),i=t.attr("y"),o=t.getBBox(),s=Math.sqrt(o.width*o.width+o.height*o.height),u=1,c=0,l=0,h=function(t){return[(t*=.1)*Math.cos(t),t*Math.sin(t)]};if(e.hasGap(o))return e.fillGap(o),!0;for(var f=!1,g=0;Math.min(Math.abs(c),Math.abs(l))<s&&g<a;)if(n=h(u+=-1),c=~~n[0],l=~~n[1],t.attr({x:r+c,y:i+l}),g++,e.hasGap(t.getBBox())){e.fillGap(o),f=!0;break}return f}var i=n(117),a=20;t.exports=function(t){for(var e,n=new i,a=[],o=0;o<t.length;o++)r(e=t[o],n)||a.push(e);for(var s=0;s<a.length;s++)a[s].remove()}},function(t,e){t.exports=function(t,e){for(var n,r,i=[],a=0;a<t.length;a++)n=t[a].getBBox(),r=e[a].getBBox(),n.width>r.width||n.height>r.height?i.push(t[a]):n.width*n.height>r.width*r.height&&i.push(t[a]);for(var o=0;o<i.length;o++)i[o].remove()}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(14),o=i.MatrixUtil.vec2,s=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.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})},n.parseTick=function(t,e,n){return{text:t,value:e/n}},n._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}},n.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this._getCirclePoint(n)},n.getSideVector=function(t,e){var n=this.get("center"),r=[e.x-n.x,e.y-n.y];if(!i.isNil(t)){var a=o.length(r);o.scale(r,r,t/a)}return r},n.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},n.getTickEnd=function(t,e){var n=this.get("tickLine");return e=e||n.length,this.getSidePoint(t,e)},n.getTextAnchor=function(t){var e;return i.snapEqual(t[0],0)?e="center":t[0]>0?e="left":t[0]<0&&(e="right"),e},n.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,a=this.get("startAngle"),o=this.get("endAngle"),s=this.get("inner"),u=[];if(Math.abs(o-a)===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(a),l=this._getCirclePoint(o),h=Math.abs(o-a)>Math.PI?1:0,f=a>o?0:1;if(s){var g=this.getSideVector(s*r,c),p=this.getSideVector(s*r,l),d={x:g[0]+e,y:g[1]+n},v={x:p[0]+e,y:p[1]+n};u=[["M",d.x,d.y],["L",c.x,c.y],["A",r,i,0,h,f,l.x,l.y],["L",v.x,v.y],["A",r*s,i*s,0,h,Math.abs(f-1),d.x,d.y]]}else u=[["M",e,n],["L",c.x,c.y],["A",r,i,0,h,f,l.x,l.y],["L",e,n]]}return u},n.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)},n.autoRotateLabels=function(){var t=this.get("ticks"),e=this.get("labelRenderer");if(e&&t.length>12){var n=this.get("radius"),r=this.get("startAngle"),a=this.get("endAngle")-r,o=a/(t.length-1),s=Math.sin(o/2)*n*2,u=this.getMaxLabelWidth(e);i.each(e.get("group").get("children"),function(e,n){var i=t[n].value*a+r,o=i%(2*Math.PI);u<s?(o<=0&&(i+=Math.PI),o>Math.PI&&(i-=Math.PI),i-=Math.PI/2,e.attr("textAlign","center")):o>Math.PI/2?i-=Math.PI:o<Math.PI/2*-1&&(i+=Math.PI),e.rotateAtStart(i)})}},e}(a);t.exports=s},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(14),o=i.MatrixUtil,s=i.PathUtil,u=o.vec2,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{inner:0,type:"helix",line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},startAngle:1.25*Math.PI,endAngle:7.25*Math.PI,a:0,center:null,axisStart:null,crp:[]})},n.getLinePath=function(){var t=this.get("crp"),e=this.get("axisStart"),n=s.catmullRomToBezier(t);return n.unshift(["M",e.x,e.y]),n},n.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this._getHelixPoint(n)},n._getHelixPoint=function(t){var e=this.get("center"),n=this.get("a")*t+this.get("inner");return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},n.getSideVector=function(t,e){var n=this.get("center"),r=[e.x-n.x,e.y-n.y];if(t){var i=u.length(r);u.scale(r,r,t/i)}return r},n.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},n.getTickEnd=function(t,e){var n=this.get("tickLine");return e=e||n.length,this.getSidePoint(t,e)},e}(a);t.exports=c},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(14),a=n(1),o=a.MatrixUtil.vec2,s=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{x:null,y:null,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},isVertical:!1,start:null,end:null})},n._getAvgLabelLength=function(t){var e=t.get("group").get("children");return e[1].attr("x")-e[0].attr("x")},n._getAvgLabelHeightSpace=function(t){var e=t.get("group").get("children");return e[1].attr("y")-e[0].attr("y")},n.getSideVector=function(t){var e=this.get("isVertical"),n=this.get("factor");if(!a.isNumber(t))return[0,0];var r=this.get("start"),i=this.get("end"),s=this.getAxisVector(),u=o.normalize([],s),c=!1;(e&&r.y<i.y||!e&&r.x>i.x)&&(c=!0);var l=o.vertical([],u,c);return o.scale([],l,t*n)},n.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},n.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},n.getTickEnd=function(t,e){var n=this.getSideVector(e);return{x:t.x+n[0],y:t.y+n[1]}},n.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}},n.renderTitle=function(){var t=this.get("title"),e=this.getTickPoint(.5),n=t.offset;if(a.isNil(n)){n=20;var r=this.get("labelsGroup");if(r){n+=this.getMaxLabelWidth(r)+(this.get("label").offset||this.get("_labelOffset"))}}var i=t.textStyle,s=a.mix({},i);if(t.text){var u=this.getAxisVector();if(t.autoRotate&&a.isNil(i.rotate)){var c=0;if(!a.snapEqual(u[1],0)){var l=[u[0],u[1]];c=o.angleTo(l,[1,0],!0)}s.rotate=c*(180/Math.PI)}else a.isNil(i.rotate)||(s.rotate=i.rotate/180*Math.PI);var h,f=this.getSideVector(n),g=t.position;h="start"===g?{x:this.get("start").x+f[0],y:this.get("start").y+f[1]}:"end"===g?{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 p=this.get("group").addShape("Text",{zIndex:2,attrs:s});p.name="axis-title",this.get("appendInfo")&&p.setSilent("appendInfo",this.get("appendInfo"))}},n.autoRotateLabels=function(){var t=this.get("labelRenderer"),e=this.get("title");if(t){var n=t.get("group").get("children"),r=this.get("label").offset,i=e?e.offset:48;if(i<0)return;var o,s,u=this.getAxisVector();if(a.snapEqual(u[0],0)&&e&&e.text)(s=this.getMaxLabelWidth(t))>i-r-12&&(o=-1*Math.acos((i-r-12)/s));else if(a.snapEqual(u[1],0)&&n.length>1){var c=Math.abs(this._getAvgLabelLength(t));(s=this.getMaxLabelWidth(t))>c&&(o=Math.asin(1.25*(i-r-12)/s))}if(o){var l=this.get("factor");a.each(n,function(t){t.rotateAtStart(o),a.snapEqual(u[1],0)&&(l>0?t.attr("textAlign","left"):t.attr("textAlign","right"))})}}},n.autoHideLabels=function(){var t,e,n=this.get("labelRenderer");if(n){var r=n.get("group").get("children"),i=this.getAxisVector();if(r.length<2)return;if(a.snapEqual(i[0],0)){var o=this.getMaxLabelHeight(n)+8,s=Math.abs(this._getAvgLabelHeightSpace(n));o>s&&(t=o,e=s)}else if(a.snapEqual(i[1],0)&&r.length>1){var u=this.getMaxLabelWidth(n)+8,c=Math.abs(this._getAvgLabelLength(n));u>c&&(t=u,e=c)}if(t&&e){var l=Math.ceil(t/e);a.each(r,function(t,e){e%l!=0&&t.attr("text","")})}}},e}(i);t.exports=s},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(14),o=i.MatrixUtil,s=i.PathUtil,u=o.vec2,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"polyline"})},n.getLinePath=function(){var t=this.get("tickPoints"),e=this.get("start"),n=this.get("end"),r=[];r.push(e.x),r.push(e.y),i.each(t,function(t){r.push(t.x),r.push(t.y)}),r.push(n.x),r.push(n.y);var a=s.catmullRomToBezier(r);return a.unshift(["M",e.x,e.y]),a},n.getTickPoint=function(t,e){return this.get("tickPoints")[e]},n.getTickEnd=function(t,e,n){var r=this.get("tickLine"),i=e||r.length,a=this.getSideVector(i,t,n);return{x:t.x+a[0],y:t.y+a[1]}},n.getSideVector=function(t,e,n){var r;if(0===n){if((r=this.get("start")).x===e.x&&r.y===e.y)return[0,0]}else{r=this.get("tickPoints")[n-1]}var i=[e.x-r.x,e.y-r.y],a=u.normalize([],i),o=u.vertical([],a,!1);return u.scale([],o,t)},e}(a);t.exports=c},function(t,e,n){t.exports={Guide:n(11),Arc:n(257),DataMarker:n(258),DataRegion:n(259),Html:n(260),Image:n(261),Line:n(262),Region:n(263),Text:n(264)}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){var n,r=t.x-e.x,i=t.y-e.y;return 0===i?n=r<0?s/2:270*s/180:r>=0&&i>0?n=2*s-u(r/i):r<=0&&i<0?n=s-u(r/i):r>0&&i<0?n=s+u(-r/i):r<0&&i>0&&(n=u(r/-i)),n}var a=n(1),o=n(11),s=Math.PI,u=Math.atan,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{name:"arc",start:null,end:null,style:{stroke:"#999",lineWidth:1}})},n.render=function(t,e){var n=this.parsePoint(t,this.get("start")),r=this.parsePoint(t,this.get("end"));if(n&&r){var o,u=t.getCenter(),c=Math.sqrt((n.x-u.x)*(n.x-u.x)+(n.y-u.y)*(n.y-u.y)),l=i(n,u),h=i(r,u);if(h<l&&(h+=2*s),a.isNumberEqual(n.x,r.x)&&a.isNumberEqual(n.y,r.y)&&(this.get("start")[0]!==this.get("end")[0]||this.get("start")[1]!==this.get("end")[1]))o=[["M",n.x,n.y],["A",c,c,0,1,1,2*u.x-n.x,2*u.y-n.y],["A",c,c,0,1,1,n.x,n.y]];else{var f=(h-l)%(2*s)>s?1:0;o=[["M",n.x,n.y],["A",c,c,0,f,1,r.x,r.y]]}var g=e.addShape("path",{zIndex:this.get("zIndex"),attrs:a.mix({path:o},this.get("style"))});g.name="guide-arc",this.get("appendInfo")&&g.setSilent("appendInfo",this.get("appendInfo")),this.set("el",g)}},e}(o);t.exports=c},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"dataMarker",zIndex:1,top:!0,position:null,style:{point:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2},line:{stroke:"#A3B1BF",lineWidth:1},text:{fill:"#000000",opacity:.65,fontSize:12,textAlign:"start"}},display:{point:!0,line:!0,text:!0},lineLength:20,direction:"upward",autoAdjust:!0})},n.render=function(t,e){var n=this.parsePoint(t,this.get("position"));if(n){var r=e.addGroup();r.name="guide-data-marker";var i,a,o=this._getElementPosition(n),s=this.get("display");if(s.line){var u=o.line;i=this._drawLine(u,r)}if(s.text&&this.get("content")){var c=o.text;a=this._drawText(c,r)}if(s.point){var l=o.point;this._drawPoint(l,r)}if(this.get("autoAdjust")){var h=r.getBBox(),f=h.minX,g=h.minY,p=h.maxX,d=h.maxY,v=t.start,x=t.end;if(a){f<=v.x&&a.attr("textAlign","start"),p>=x.x&&a.attr("textAlign","end");var m=this.get("direction");if("upward"===m&&g<=x.y||"upward"!==m&&d>=v.y){var y,b;"upward"===m&&g<=x.y?(y="top",b=1):(y="bottom",b=-1),a.attr("textBaseline",y);var _=0;if(this.get("display").line){_=this.get("lineLength");var M=[["M",n.x,n.y],["L",n.x,n.y+_*b]];i.attr("path",M)}var S=n.y+(_+2)*b;a.attr("y",S)}}}this.get("appendInfo")&&r.setSilent("appendInfo",this.get("appendInfo")),this.set("el",r)}},n._getElementPosition=function(t){var e=t.x,n=t.y,r=this.get("display").line?this.get("lineLength"):0,i=this.get("direction");this.get("style").text.textBaseline="upward"===i?"bottom":"top";var a="upward"===i?-1:1;return{point:{x:e,y:n},line:[{x:e,y:n},{x:e,y:r*a+n}],text:{x:e,y:(r+2)*a+n}}},n._drawLine=function(t,e){var n=this.get("style").line,r=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y]];return e.addShape("path",{attrs:i.mix({path:r},n)})},n._drawText=function(t,e){var n=this.get("style").text;return e.addShape("text",{attrs:i.mix({text:this.get("content")},n,t)})},n._drawPoint=function(t,e){var n=this.get("style").point;return e.addShape("circle",{attrs:i.mix({},n,t)})},e}(n(11));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(118),o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"dataRegion",start:null,end:null,content:"",style:{region:{lineWidth:0,fill:"#000000",opacity:.04},text:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:"rgba(0, 0, 0, .65)"}}})},n.render=function(t,e,n){var r=this.get("lineLength")||0,a=this._getRegionData(t,n);if(a.length){var o=this._getBBox(a),s=[];s.push(["M",a[0].x,o.yMin-r]);for(var u=0,c=a.length;u<c;u++){var l=["L",a[u].x,a[u].y];s.push(l)}s.push(["L",a[a.length-1].x,o.yMin-r]);var h=this.get("style"),f=h.region,g=h.text,p=e.addGroup();p.name="guide-data-region",p.addShape("path",{attrs:i.mix({path:s},f)});var d=this.get("content");d&&p.addShape("Text",{attrs:i.mix({x:(o.xMin+o.xMax)/2,y:o.yMin-r,text:d},g)}),this.get("appendInfo")&&p.setSilent("appendInfo",this.get("appendInfo")),this.set("el",p)}},n._getRegionData=function(t,e){for(var n,r=this.get("start"),o=this.get("end"),s=a.getFirstScale(this.get("xScales")).field,u=a.getFirstScale(this.get("yScales")).field,c=i.isArray(r)?r[0]:r[s],l=i.isArray(o)?o[0]:o[s],h=[],f=0,g=e.length;f<g;f++){var p=e[f];if(p[s]===c&&(n=f),f>=n){var d=this.parsePoint(t,[p[s],p[u]]);d&&h.push(d)}if(p[s]===l)break}return h},n._getBBox=function(t){for(var e=[],n=[],r=0;r<t.length;r++)e.push(t[r].x),n.push(t[r].y);var a=i.arrayUtil.getRange(e),o=i.arrayUtil.getRange(n);return{xMin:a.min,xMax:a.max,yMin:o.min,yMax:o.max}},e}(n(11));t.exports=o},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=i.DomUtil,o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"html",zIndex:7,position:null,alignX:"middle",alignY:"middle",offsetX:null,offsetY:null,html:null})},n.render=function(t,e){var n=this.parsePoint(t,this.get("position"));if(n){var r=e.get("canvas").get("el").parentNode,o=a.createDom('<div class="g-guide"></div>');r.appendChild(o);var s=this.get("htmlContent")||this.get("html");if(i.isFunction(s)){s=s(this.get("xScales"),this.get("yScales"))}var u=a.createDom(s);o.appendChild(u),a.modifyCSS(o,{position:"absolute"}),this._setDomPosition(o,u,n),this.set("el",o)}},n._setDomPosition=function(t,e,n){var r=this.get("alignX"),i=this.get("alignY"),o=a.getOuterWidth(e),s=a.getOuterHeight(e),u={x:n.x,y:n.y};"middle"===r&&"top"===i?u.x-=Math.round(o/2):"middle"===r&&"bottom"===i?(u.x-=Math.round(o/2),u.y-=Math.round(s)):"left"===r&&"bottom"===i?u.y-=Math.round(s):"left"===r&&"middle"===i?u.y-=Math.round(s/2):"left"===r&&"top"===i?(u.x=n.x,u.y=n.y):"right"===r&&"bottom"===i?(u.x-=Math.round(o),u.y-=Math.round(s)):"right"===r&&"middle"===i?(u.x-=Math.round(o),u.y-=Math.round(s/2)):"right"===r&&"top"===i?u.x-=Math.round(o):(u.x-=Math.round(o/2),u.y-=Math.round(s/2));var c=this.get("offsetX");c&&(u.x+=c);var l=this.get("offsetY");l&&(u.y+=l),a.modifyCSS(t,{top:Math.round(u.y)+"px",left:Math.round(u.x)+"px",visibility:"visible",zIndex:this.get("zIndex")})},n.clear=function(){var t=this.get("el");t&&t.parentNode&&t.parentNode.removeChild(t)},e}(n(11));t.exports=o},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"image",start:null,end:null,src:null,offsetX:null,offsetY:null})},n.render=function(t,e){var n=this.parsePoint(t,this.get("start"));if(n){var r={x:n.x,y:n.y};if(r.img=this.get("src"),this.get("end")){var i=this.parsePoint(t,this.get("end"));if(!i)return;r.width=i.x-n.x,r.height=i.y-n.y}else r.width=this.get("width")||32,r.height=this.get("height")||32;this.get("offsetX")&&(r.x+=this.get("offsetX")),this.get("offsetY")&&(r.y+=this.get("offsetY"));var a=e.addShape("Image",{zIndex:1,attrs:r});a.name="guide-image",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo")),this.set("el",a)}},e}(n(11));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(11),o=i.MatrixUtil.vec2,s=n(9).FONT_FAMILY,u=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"line",start:null,end:null,lineStyle:{stroke:"#000",lineWidth:1},text:{position:"end",autoRotate:!0,style:{fill:"#999",fontSize:12,fontWeight:500,fontFamily:s},content:null}})},n.render=function(t,e){var n=this.parsePoint(t,this.get("start")),r=this.parsePoint(t,this.get("end"));if(n&&r){var i=e.addGroup({viewId:e.get("viewId")});this._drawLines(n,r,i);var a=this.get("text");a&&a.content&&this._drawText(n,r,i),this.set("el",i)}},n._drawLines=function(t,e,n){var r=[["M",t.x,t.y],["L",e.x,e.y]],a=n.addShape("Path",{attrs:i.mix({path:r},this.get("lineStyle"))});a.name="guide-line",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo"))},n._drawText=function(t,e,n){var r,a=this.get("text"),s=a.position,u=a.style||{};((r="start"===s?0:"center"===s?.5:i.isString(s)&&-1!==s.indexOf("%")?parseInt(s,10)/100:i.isNumber(s)?s:1)>1||r<0)&&(r=1);var c={x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r};if(a.offsetX&&(c.x+=a.offsetX),a.offsetY&&(c.y+=a.offsetY),c.text=a.content,c=i.mix({},c,u),a.autoRotate&&i.isNil(u.rotate)){var l=o.angleTo([e.x-t.x,e.y-t.y],[1,0],1);c.rotate=l}else i.isNil(u.rotate)||(c.rotate=u.rotate*Math.PI/180);var h=n.addShape("Text",{attrs:c});h.name="guide-line-text",this.get("appendInfo")&&h.setSilent("appendInfo",this.get("appendInfo"))},e}(a);t.exports=u},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"region",zIndex:1,start:null,end:null,style:{lineWidth:0,fill:"#CCD7EB",opacity:.4}})},n.render=function(t,e){var n=this.get("style"),r=this._getPath(t);if(r.length){var a=e.addShape("path",{zIndex:this.get("zIndex"),attrs:i.mix({path:r},n)});a.name="guide-region",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo")),this.set("el",a)}},n._getPath=function(t){var e=this.parsePoint(t,this.get("start")),n=this.parsePoint(t,this.get("end"));if(!e||!n)return[];return[["M",e.x,e.y],["L",n.x,e.y],["L",n.x,n.y],["L",e.x,n.y],["z"]]},e}(n(11));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"text",position:null,content:null,style:{fill:"#999",fontSize:12,fontWeight:500,textAlign:"center"},offsetX:null,offsetY:null,top:!0})},n.render=function(t,e){var n=this.parsePoint(t,this.get("position"));if(n){var r=i.mix({},this.get("style")),a=this.get("offsetX"),o=this.get("offsetY");a&&(n.x+=a),o&&(n.y+=o),r.rotate&&(r.rotate=r.rotate*Math.PI/180);var s=e.addShape("Text",{zIndex:this.get("zIndex"),attrs:i.mix({text:this.get("content")},r,n)});s.name="guide-text",this.get("appendInfo")&&s.setSilent("appendInfo",this.get("appendInfo")),this.set("el",s)}},e}(n(11));t.exports=a},function(t,e,n){var r=n(116);t.exports=r},function(t,e,n){t.exports={Category:n(119),CatHtml:n(121),CatPageHtml:n(267),Color:n(268),Size:n(276),CircleSize:n(277)}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){return t.getElementsByClassName(e)[0]}var a=n(1),o=n(121),s=n(9).FONT_FAMILY,u=a.DomUtil,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{type:"category-page-legend",container:null,caretStyle:{fill:"rgba(0,0,0,0.65)"},pageNumStyle:{display:"inline-block",fontSize:"12px",fontFamily:s,cursor:"default"},slipDomStyle:{width:"auto",height:"auto",position:"absolute"},slipTpl:'<div class="g2-slip" ><svg viewBox="64 64 896 896" class="g2-caret-up" data-icon="left" style = "display:inline-block;vertical-align:middle;" width="1em" height="1em" aria-hidden="true"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg><p class="cur-pagenum" style = "display:inline-block;vertical-align:middle;">1</p><p class="next-pagenum" style = "display:inline-block;vertical-align:middle;"">/2</p><svg viewBox="64 64 896 896" class="g2-caret-down" data-icon="right" style = "display:inline-block;vertical-align:middle;" width="1em" height="1em" aria-hidden="true"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path></svg></div>',slipWidth:65,legendOverflow:"unset"})},n.render=function(){t.prototype._renderHTML.call(this),this._renderFlipPage()},n._renderFlipPage=function(){var t=this.get("legendWrapper"),e=i(t,"g2-legend-list"),n=this.get("position"),r=this.get("layout"),o="right"===n||"left"===n||"vertical"===r,s=o?"block":"inline-block",c=t.offsetHeight;if(t.scrollHeight>c){var l=this.get("slipTpl"),h=u.createDom(l),f=i(h,"g2-caret-up"),g=i(h,"g2-caret-down");u.modifyCSS(f,this.get("caretStyle")),u.modifyCSS(f,{fill:"rgba(0,0,0,0.25)"}),u.modifyCSS(g,this.get("caretStyle"));var p=i(h,"cur-pagenum"),d=i(h,"next-pagenum"),v=this.get("pageNumStyle");if(u.modifyCSS(p,a.mix({},v,{paddingLeft:"10px"})),u.modifyCSS(d,a.mix({},v,{opacity:.3,paddingRight:"10px"})),u.modifyCSS(h,a.mix({},this.get("slipDomStyle"),o?{top:c+"px"}:{right:0,top:"50%",transform:"translate(0, -50%)"})),t.style.overflow=this.get("legendOverflow"),t.appendChild(h),!o){var x=Math.max(t.offsetWidth-10-h.offsetWidth,0);u.modifyCSS(e,{maxWidth:x+"px"})}for(var m=e.childNodes,y=0,b=1,_=[],M=0;M<m.length;M++)m[M].style.display=s,(y=m[M].offsetTop+m[M].offsetHeight)>c&&(b++,_.forEach(function(t){t.style.display="none"}),_=[]),_.push(m[M]);d.innerText="/"+b,m.forEach(function(t){t.style.display=s,(y=t.offsetTop+t.offsetHeight)>c&&(t.style.display="none")}),f.addEventListener("click",function(){if(m[0].style.display!==s){var t=-1;m.forEach(function(e,n){e.style.display===s&&(t=-1===t?n:t,e.style.display="none")});for(var e=t-1;e>=0&&(m[e].style.display=s,y=m[t-1].offsetTop+m[t-1].offsetHeight,m[e].style.display="none",y<=c);e--)m[e].style.display=s;var n=Number.parseInt(p.innerText,10)-1;f.style.fill=1===n?"rgba(0,0,0,0.25)":"rgba(0,0,0,0.65)",g.style.fill="rgba(0,0,0,0.65)",p.innerText=n}}),g.addEventListener("click",function(){if(m[m.length-1].style.display!==s){var t=-1;m.forEach(function(e,n){e.style.display===s&&(t=n,e.style.display="none")});for(var e=t+1;e<m.length&&(m[e].style.display=s,y=m[e].offsetTop+m[e].offsetHeight,m[e].style.display="none",y<=c);e++)m[e].style.display=s;var n=Number.parseInt(p.innerText,10)+1;g.style.fill=n===b?"rgba(0,0,0,0.25)":"rgba(0,0,0,0.65)",f.style.fill="rgba(0,0,0,0.65)",p.innerText=n}}),this.set("slipDom",h)}},n.destroy=function(){var e=this.get("slipDom");e&&e.parentNode&&e.parentNode.removeChild(e),t.prototype.destroy.call(this)},e}(o);t.exports=c},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(269).ColorUtil,a=n(1),o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{type:"color-legend",layout:"vertical",triggerAttr:{fill:"#fff",shadowOffsetX:-2,shadowOffsetY:2,shadowBlur:10,shadowColor:"#ccc",radius:3},isSegment:!1})},n._setPercentage=function(){var t=this.get("items");if(!t[0].percentage){var e=t[0].value,n=t[t.length-1].value;a.each(t,function(t){t.percentage=(t.value-e)/(n-e)})}},n._renderSliderShape=function(){this._setPercentage();var t,e=this.get("slider").get("backgroundElement"),n=this.get("width"),r=this.get("height"),o=this.get("layout"),s=this.get("items"),u="";return"vertical"===o?(u+="l (90) ",a.each(s,function(e){t=i.toRGB(e.color),u+=1-e.percentage+":"+t+" "})):(u+="l (0) ",a.each(s,function(e){t=i.toRGB(e.color),u+=e.percentage+":"+t+" "})),this._addMiddleBar(e,"Rect",{x:0,y:0,width:n,height:r,fill:u,strokeOpacity:0})},n._renderUnslidable=function(){this._setPercentage();var t=this.get("titleShape"),e=this.get("titleGap");e=t?t.getBBox().height+e:e;var n,r=this.get("width"),o=this.get("height"),s=this.get("layout"),u=this.get("items"),c="",l=[],h=this.get("group").addGroup(),f=u.length;if("vertical"===s){c+="l (90) ";for(var g=0;g<f;g+=1){if(0!==g&&g!==f-1&&(l.push(["M",0,o-u[g].percentage*o]),l.push(["L",r,o-u[g].percentage*o])),n=i.toRGB(u[g].color),c+=1-u[g].percentage+":"+n+" ",this.get("isSegment")&&g>0){var p=i.toRGB(u[g-1].color);c+=1-u[g].percentage+":"+p+" "}h.addShape("text",{attrs:a.mix({},{x:r+this.get("textOffset")/2,y:o-u[g].percentage*o,text:this._formatItemValue(u[g].value)+""},this.get("textStyle"),{textAlign:"start"})})}}else{c+="l (0) ";for(var d=0;d<f;d+=1){if(0!==d&&d!==f-1&&(l.push(["M",u[d].percentage*r,0]),l.push(["L",u[d].percentage*r,o])),n=i.toRGB(u[d].color),this.get("isSegment")&&d>0){var v=i.toRGB(u[d-1].color);c+=u[d].percentage+":"+v+" "}c+=u[d].percentage+":"+n+" ",h.addShape("text",{attrs:a.mix({},{x:u[d].percentage*r,y:o+5+this.get("textOffset"),text:this._formatItemValue(u[d].value)+""},this.get("textStyle"))})}}h.addShape("rect",{attrs:{x:0,y:0,width:r,height:o,fill:c,strokeOpacity:0}}),h.addShape("path",{attrs:a.mix({path:l},this.get("lineStyle"))}),h.move(0,e)},e}(n(49));t.exports=o},function(t,e,n){t.exports={Position:n(270),Color:n(271),Shape:n(272),Size:n(273),Opacity:n(274),ColorUtil:n(122)}},function(t,e,n){var r=n(7),i=n(3),a=n(2),o=function(t){function e(e){var n;return n=t.call(this,e)||this,n.names=["x","y"],n.type="position",n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);return e.prototype.mapping=function(t,e){var n,o,s,u=this.scales,c=this.coord,l=u[0],h=u[1];if(r(t)||r(e))return[];if(i(e)&&i(t)){n=[],o=[];for(var f=0,g=0,p=t.length,d=e.length;f<p&&g<d;f++,g++)s=c.convertPoint({x:l.scale(t[f]),y:h.scale(e[g])}),n.push(s.x),o.push(s.y)}else if(i(e))t=l.scale(t),o=[],a(e,function(e){e=h.scale(e),s=c.convertPoint({x:t,y:e}),n&&n!==s.x?(i(n)||(n=[n]),n.push(s.x)):n=s.x,o.push(s.y)});else if(i(t))e=h.scale(e),n=[],a(t,function(t){t=l.scale(t),s=c.convertPoint({x:t,y:e}),o&&o!==s.y?(i(o)||(o=[o]),o.push(s.y)):o=s.y,n.push(s.x)});else{t=l.scale(t),e=h.scale(e);var v=c.convertPoint({x:t,y:e});n=v.x,o=v.y}return[n,o]},e}(n(21));t.exports=o},function(t,e,n){var r=n(12),i=n(122),a=function(t){function e(e){var n;return n=t.call(this,e)||this,n.names=["color"],n.type="color",n.gradient=null,r(n.values)&&(n.linear=!0),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);return e.prototype.getLinearValue=function(t){var e=this.gradient;if(!e){var n=this.values;e=i.gradient(n),this.gradient=e}return e(t)},e}(n(21));t.exports=a},function(t,e,n){var r=function(t){function e(e){var n;return n=t.call(this,e)||this,n.names=["shape"],n.type="shape",n.gradient=null,n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);return e.prototype.getLinearValue=function(t){var e=this.values;return e[Math.round((e.length-1)*t)]},e}(n(21));t.exports=r},function(t,e,n){var r=function(t){function e(e){var n;return n=t.call(this,e)||this,n.names=["size"],n.type="size",n.gradient=null,n}return function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t),e}(n(21));t.exports=r},function(t,e,n){var r=function(t){function e(e){var n;return n=t.call(this,e)||this,n.names=["opacity"],n.type="opacity",n.gradient=null,n}return function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t),e}(n(21));t.exports=r},function(t,e,n){var r=n(1),i=r.DomUtil,a=r.Group,o=function t(e){t.superclass.constructor.call(this,e)};r.extend(o,a),r.augment(o,{getDefaultCfg:function(){return{range:null,middleAttr:{fill:"#fff",fillOpacity:0},backgroundElement:null,minHandleElement:null,maxHandleElement:null,middleHandleElement:null,currentTarget:null,layout:"vertical",width:null,height:null,pageX:null,pageY:null}},_beforeRenderUI:function(){var t=this.get("layout"),e=this.get("backgroundElement"),n=this.get("minHandleElement"),r=this.get("maxHandleElement"),i=this.addShape("rect",{attrs:this.get("middleAttr")}),a="vertical"===t?"ns-resize":"ew-resize";this.add([e,n,r]),this.set("middleHandleElement",i),e.set("zIndex",0),i.set("zIndex",1),n.set("zIndex",2),r.set("zIndex",2),i.attr("cursor","move"),n.attr("cursor",a),r.attr("cursor",a),this.sort()},_renderUI:function(){"horizontal"===this.get("layout")?this._renderHorizontal():this._renderVertical()},_transform:function(t){var e=this.get("range"),n=e[0]/100,r=e[1]/100,i=this.get("width"),a=this.get("height"),o=this.get("minHandleElement"),s=this.get("maxHandleElement"),u=this.get("middleHandleElement");o.resetMatrix(),s.resetMatrix(),"horizontal"===t?(u.attr({x:i*n,y:0,width:(r-n)*i,height:a}),o.translate(n*i,a),s.translate(r*i,a)):(u.attr({x:0,y:a*(1-r),width:i,height:(r-n)*a}),o.translate(1,(1-n)*a),s.translate(1,(1-r)*a))},_renderHorizontal:function(){this._transform("horizontal")},_renderVertical:function(){this._transform("vertical")},_bindUI:function(){this.on("mousedown",r.wrapBehavior(this,"_onMouseDown"))},_isElement:function(t,e){var n=this.get(e);if(t===n)return!0;if(n.isGroup){return n.get("children").indexOf(t)>-1}return!1},_getRange:function(t,e){var n=t+e;return n=n>100?100:n,n=n<0?0:n},_updateStatus:function(t,e){var n="x"===t?this.get("width"):this.get("height");t=r.upperFirst(t);var i,a=this.get("range"),o=this.get("page"+t),s=this.get("currentTarget"),u=this.get("rangeStash"),c="vertical"===this.get("layout")?-1:1,l=e["page"+t],h=(l-o)/n*100*c;a[1]<=a[0]?(this._isElement(s,"minHandleElement")||this._isElement(s,"maxHandleElement"))&&(a[0]=this._getRange(h,a[0]),a[1]=this._getRange(h,a[0])):(this._isElement(s,"minHandleElement")&&(a[0]=this._getRange(h,a[0])),this._isElement(s,"maxHandleElement")&&(a[1]=this._getRange(h,a[1]))),this._isElement(s,"middleHandleElement")&&(i=u[1]-u[0],a[0]=this._getRange(h,a[0]),a[1]=a[0]+i,a[1]>100&&(a[1]=100,a[0]=a[1]-i)),this.emit("sliderchange",{range:a}),this.set("page"+t,l),this._renderUI(),this.get("canvas").draw()},_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()},_bindCanvasEvents:function(){var t=this.get("canvas").get("containerDOM");this.onMouseMoveListener=i.addEventListener(t,"mousemove",r.wrapBehavior(this,"_onCanvasMouseMove")),this.onMouseUpListener=i.addEventListener(t,"mouseup",r.wrapBehavior(this,"_onCanvasMouseUp")),this.onMouseLeaveListener=i.addEventListener(t,"mouseleave",r.wrapBehavior(this,"_onCanvasMouseUp"))},_onCanvasMouseMove:function(t){if(!this._mouseOutArea(t)){"horizontal"===this.get("layout")?this._updateStatus("x",t):this._updateStatus("y",t)}},_onCanvasMouseUp:function(){this._removeDocumentEvents()},_removeDocumentEvents:function(){this.onMouseMoveListener.remove(),this.onMouseUpListener.remove()},_mouseOutArea:function(t){var e=this.get("canvas").get("el").getBoundingClientRect(),n=this.get("parent"),r=n.getBBox(),i=n.attr("matrix")[6],a=n.attr("matrix")[7],o=i+r.width,s=a+r.height,u=t.clientX-e.x,c=t.clientY-e.y;return u<i||u>o||c<a||c>s}}),t.exports=o},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"size-legend",width:100,height:200,_unslidableElementStyle:{fill:"#4E7CCC",fillOpacity:1},frontMiddleBarStyle:{fill:"rgb(64, 141, 251)"}})},n._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("layout"),n=this.get("width"),r=this.get("height"),a=this.get("height")/2,o=this.get("frontMiddleBarStyle"),s="vertical"===e?[[0,0],[n,0],[n,r],[n-4,r]]:[[0,a+r/2],[0,a+r/2-4],[n,a-r/2],[n,a+r/2]];return this._addMiddleBar(t,"Polygon",i.mix({points:s},o))},n._renderUnslidable=function(){var t=this.get("layout"),e=this.get("width"),n=this.get("height"),r=this.get("frontMiddleBarStyle"),a="vertical"===t?[[0,0],[e,0],[e,n],[e-4,n]]:[[0,n],[0,n-4],[e,0],[e,n]];this.get("group").addGroup().addShape("Polygon",{attrs:i.mix({points:a},r)});var o=this._formatItemValue(this.get("firstItem").value),s=this._formatItemValue(this.get("lastItem").value);"vertical"===this.get("layout")?(this._addText(e+10,n-3,o),this._addText(e+10,3,s)):(this._addText(0,n,o),this._addText(e,n,s))},n._addText=function(t,e,n){var r=this.get("group").addGroup(),a=this.get("textStyle"),o=this.get("titleShape"),s=this.get("titleGap");o&&(s+=o.getBBox().height),"vertical"===this.get("layout")?r.addShape("text",{attrs:i.mix({x:t+this.get("textOffset"),y:e,text:0===n?"0":n},a)}):(e+=s+this.get("textOffset")-20,o||(e+=10),r.addShape("text",{attrs:i.mix({x:t,y:e,text:0===n?"0":n},a)}))},e}(n(49));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"size-circle-legend",width:100,height:200,_unslidableCircleStyle:{stroke:"rgb(99, 161, 248)",fill:"rgb(99, 161, 248)",fillOpacity:.3,lineWidth:1.5},triggerAttr:{fill:"white",shadowOffsetX:-2,shadowOffsetY:2,shadowBlur:10,shadowColor:"#ccc"},frontMiddleBarStyle:{fill:"rgb(64, 141, 251)"}})},n._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("layout"),n="vertical"===e?2:this.get("width"),r="vertical"===e?this.get("height"):2,a=this.get("height")/2,o=this.get("frontMiddleBarStyle"),s="vertical"===e?[[0,0],[n,0],[n,r],[0,r]]:[[0,a+r],[0,a-r],[5+n-4,a-r],[5+n-4,a+r]];return this._addMiddleBar(t,"Polygon",i.mix({points:s},o))},n._addHorizontalTrigger=function(t,e,n,r){var a=this.get("slider").get(t+"HandleElement"),o=-this.get("height")/2,s=a.addShape("circle",{attrs:i.mix({x:0,y:o,r:r},e)}),u=a.addShape("text",{attrs:i.mix(n,{x:0,y:o+r+10,textAlign:"center",textBaseline:"middle"})}),c="vertical"===this.get("layout")?"ns-resize":"ew-resize";s.attr("cursor",c),u.attr("cursor",c),this.set(t+"ButtonElement",s),this.set(t+"TextElement",u)},n._addVerticalTrigger=function(t,e,n,r){var a=this.get("slider").get(t+"HandleElement"),o=a.addShape("circle",{attrs:i.mix({x:0,y:0,r:r},e)}),s=a.addShape("text",{attrs:i.mix(n,{x:r+10,y:0,textAlign:"start",textBaseline:"middle"})}),u="vertical"===this.get("layout")?"ns-resize":"ew-resize";o.attr("cursor",u),s.attr("cursor",u),this.set(t+"ButtonElement",o),this.set(t+"TextElement",s)},n._renderTrigger=function(){var t=this.get("firstItem"),e=this.get("lastItem"),n=this.get("layout"),r=this.get("textStyle"),a=this.get("triggerAttr"),o=i.mix({},a),s=i.mix({},a),u=i.mix({text:this._formatItemValue(t.value)+""},r),c=i.mix({text:this._formatItemValue(e.value)+""},r);"vertical"===n?(this._addVerticalTrigger("min",o,u,5),this._addVerticalTrigger("max",s,c,16)):(this._addHorizontalTrigger("min",o,u,5),this._addHorizontalTrigger("max",s,c,16))},n._bindEvents=function(){var t=this;if(this.get("slidable")){this.get("slider").on("sliderchange",function(e){var n=e.range,r=t.get("firstItem").value,i=t.get("lastItem").value,a=r+n[0]/100*(i-r),o=r+n[1]/100*(i-r),s=5+n[0]/100*11,u=5+n[1]/100*11;t._updateElement(a,o,s,u);var c=new Event("itemfilter",e,!0,!0);c.range=[a,o],t.emit("itemfilter",c)})}},n._updateElement=function(e,n,r,i){t.prototype._updateElement.call(this,e,n);var a=this.get("minTextElement"),o=this.get("maxTextElement"),s=this.get("minButtonElement"),u=this.get("maxButtonElement");s.attr("r",r),u.attr("r",i);if("vertical"===this.get("layout"))a.attr("x",r+10),o.attr("x",i+10);else{var c=-this.get("height")/2;a.attr("y",c+r+10),o.attr("y",c+i+10)}},n._addCircle=function(t,e,n,r,a){var o=this.get("group").addGroup(),s=this.get("_unslidableCircleStyle"),u=this.get("textStyle"),c=this.get("titleShape"),l=this.get("titleGap");c&&(l+=c.getBBox().height),o.addShape("circle",{attrs:i.mix({x:t,y:e+l,r:0===n?1:n},s)}),"vertical"===this.get("layout")?o.addShape("text",{attrs:i.mix({x:a+20+this.get("textOffset"),y:e+l,text:0===r?"0":r},u)}):o.addShape("text",{attrs:i.mix({x:t,y:e+l+a+13+this.get("textOffset"),text:0===r?"0":r},u)})},n._renderUnslidable=function(){var t=this.get("firstItem").value,e=this.get("lastItem").value;if(t>e){var n=e;e=t,t=n}var r=this._formatItemValue(t),i=this._formatItemValue(e),a=t<5?5:t,o=e>16?16:e;a>o&&(a=5,o=16),"vertical"===this.get("layout")?(this._addCircle(o,o,a,r,2*o),this._addCircle(o,2*o+16+a,o,i,2*o)):(this._addCircle(o,o,a,r,2*o),this._addCircle(2*o+16+a,o,o,i,2*o))},n.activate=function(e){this.get("slidable")&&t.prototype.activate.call(this,e)},e}(n(49));t.exports=a},function(t,e,n){var r=n(50);r.Html=n(279),r.Canvas=n(126),r.Mini=n(281),t.exports=r},function(t,e,n){function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){return t.getElementsByClassName(e)[0]}var s=n(22),u=n(50),c=n(1),l=c.DomUtil,h=n(280),f=n(123),g=n(124),p=n(125),d=s.Marker,v=function(t){function e(e){var n;n=t.call(this,e)||this,c.assign(i(n),g),c.assign(i(n),p);var r=h;n.style=function(t,e){return Object.keys(t).forEach(function(n){e[n]&&(t[n]=c.mix(t[n],e[n]))}),t}(r,e),n._init_(),n.get("items")&&n.render();var a=n.get("crosshairs");if(a){var o="rect"===a.type?n.get("backPlot"):n.get("frontPlot"),s=new f(c.mix({plot:o,plotRange:n.get("plotRange"),canvas:n.get("canvas")},n.get("crosshairs")));s.hide(),n.set("crosshairGroup",s)}return n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return c.mix({},e,{containerTpl:' <div class="g2-tooltip"> <div class="g2-tooltip-title"></div><ul class="g2-tooltip-list"></ul></div>',itemTpl:'<li data-index={index}>\n <svg viewBox="0 0 5 5" class="g2-tooltip-marker"></svg>\n {name}<span class="g2-tooltip-value">{value}</span></li>',htmlContent:null,follow:!0,enterable:!1})},n._init_=function(){var t,e=this.get("containerTpl"),n=this.get("canvas").get("el").parentNode;if(!this.get("htmlContent")){if(/^\#/.test(e)){var r=e.replace("#","");t=document.getElementById(r)}else t=l.createDom(e),l.modifyCSS(t,this.style["g2-tooltip"]),n.appendChild(t),n.style.position="relative";this.set("container",t)}},n.render=function(){if(this.clear(),this.get("htmlContent")){var t=this.get("canvas").get("el").parentNode,e=this._getHtmlContent();t.appendChild(e),this.set("container",e)}else this._renderTpl()},n._renderTpl=function(){var t=this,e=t.get("showTitle"),n=t.get("titleContent"),r=t.get("container"),i=o(r,"g2-tooltip-title"),a=o(r,"g2-tooltip-list"),s=t.get("items");i&&e&&(l.modifyCSS(i,t.style["g2-tooltip-title"]),i.innerHTML=n),a&&(l.modifyCSS(a,t.style["g2-tooltip-list"]),c.each(s,function(e,n){a.appendChild(t._addItem(e,n))}))},n.clear=function(){var t=this.get("container");if(this.get("htmlContent"))t&&t.remove();else{var e=o(t,"g2-tooltip-title"),n=o(t,"g2-tooltip-list");e&&(e.innerHTML=""),n&&(n.innerHTML="")}},n.show=function(){var e=this.get("container");if(e&&!this.destroyed){e.style.visibility="visible",e.style.display="block";var n=this.get("crosshairGroup");n&&n.show();var r=this.get("markerGroup");r&&r.show(),t.prototype.show.call(this),this.get("canvas").draw()}},n.hide=function(){var e=this.get("container");if(e&&!this.destroyed){e.style.visibility="hidden",e.style.display="none";var n=this.get("crosshairGroup");n&&n.hide();var r=this.get("markerGroup");r&&r.hide(),t.prototype.hide.call(this),this.get("canvas").draw()}},n.destroy=function(){var e=this.get("container"),n=this.get("containerTpl");e&&!/^\#/.test(n)&&e.parentNode.removeChild(e);var r=this.get("crosshairGroup");r&&r.destroy();var i=this.get("markerGroup");i&&i.remove(),t.prototype.destroy.call(this)},n._getMarkerSvg=function(t){var e,n=t.marker||{},r=n.activeSymbol||n.symbol;c.isFunction(r)?e=r:c.isString(r)&&(e=d.Symbols[r]);return'<path d="'+(e=c.isFunction(e)?e:d.Symbols.circle)(2.5,2.5,2.5).reduce(function(t,e){return""+t+e[0]+e.slice(1).join(",")},"")+'" fill="'+(n.fill||"none")+'" stroke="'+(n.stroke||"none")+'" />'},n._addItem=function(t,e){var n=this.get("itemTpl"),i=c.substitute(n,c.mix({index:e},t)),a=l.createDom(i);l.modifyCSS(a,this.style["g2-tooltip-list-item"]);var s=o(a,"g2-tooltip-marker");if(s){l.modifyCSS(s,r({},this.style["g2-tooltip-marker"],{borderRadius:"unset"}));var u=this._getMarkerSvg(t);s.innerHTML=u}var h=o(a,"g2-tooltip-value");return h&&l.modifyCSS(h,this.style["g2-tooltip-value"]),a},n._getHtmlContent=function(){var t=this.get("htmlContent")(this.get("titleContent"),this.get("items"));return l.createDom(t)},n.setPosition=function(e,n,r){var i,a=this.get("container"),o=this.get("canvas").get("el"),s=l.getWidth(o),u=l.getHeight(o),h=a.clientWidth,f=a.clientHeight,g=e,p=n,d=this.get("prePosition")||{x:0,y:0};if(h||(a.style.display="block",h=a.clientWidth,f=a.clientHeight,a.style.display="none"),this.get("enterable")?(i=[e,n-=a.clientHeight/2],d&&e-d.x>0?e-=a.clientWidth+1:e+=1):this.get("position")?(e=(i=this._calcTooltipPosition(e,n,this.get("position"),h,f,r))[0],n=i[1]):(e=(i=this._constraintPositionInBoundary(e,n,h,f,s,u))[0],n=i[1]),this.get("inPlot")){var v=this.get("plotRange");e=(i=this._constraintPositionInPlot(e,n,h,f,v,this.get("enterable")))[0],n=i[1]}var x=this.get("markerItems");c.isEmpty(x)||(g=x[0].x,p=x[0].y),this.set("prePosition",i);this.get("follow")&&(a.style.left=e+"px",a.style.top=n+"px");var m=this.get("crosshairGroup");if(m){var y=this.get("items");m.setPosition(g,p,y)}t.prototype.setPosition.call(this,e,n)},e}(u);t.exports=v},function(t,e,n){var r,i=n(9).FONT_FAMILY,a=(r={crosshairs:!1,offset:15},r["g2-tooltip"]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:i,lineHeight:"20px",padding:"10px 10px 6px 10px"},r["g2-tooltip-title"]={marginBottom:"4px"},r["g2-tooltip-list"]={margin:0,listStyleType:"none",padding:0},r["g2-tooltip-list-item"]={marginBottom:"4px"},r["g2-tooltip-marker"]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["g2-tooltip-value"]={display:"inline-block",float:"right",marginLeft:"30px"},r);t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(126),o=n(9).FONT_FAMILY,s=i.DomUtil,u=i.MatrixUtil,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{boardStyle:{x:0,y:0,width:0,height:0,radius:3},valueStyle:{x:0,y:0,text:"",fontFamily:o,fontSize:12,stroke:"#fff",lineWidth:2,fill:"black",textBaseline:"top",textAlign:"start"},padding:{top:5,right:5,bottom:0,left:5},triangleWidth:10,triangleHeight:4})},n._init_=function(){var t=this.get("padding"),e=this.get("frontPlot").addGroup();this.set("container",e);var n=e.addShape("rect",{attrs:i.mix({},this.get("boardStyle"))});this.set("board",n);var r=e.addShape("path",{attrs:{fill:this.get("boardStyle").fill}});this.set("triangleShape",r);var a=e.addGroup();a.move(t.left,t.top);var o=a.addShape("text",{attrs:i.mix({},this.get("valueStyle"))});this.set("valueShape",o)},n.render=function(){this.clear();var t=this.get("board"),e=this.get("valueShape"),n=this.get("padding"),r=this.get("items")[0];e&&e.attr("text",r.value);var i=e?e.getBBox():{width:80,height:30},a=n.left+i.width+n.right,o=n.top+i.height+n.bottom;t.attr("width",a),t.attr("height",o),this._centerTriangleShape()},n.clear=function(){this.get("valueShape").attr("text","")},n.setPosition=function(t,e,n){var r=this.get("container"),i=this.get("plotRange"),a=r.getBBox(),o=a.width,c=a.height;if(t-=o/2,n&&("point"===n.name||"interval"===n.name)){e=n.getBBox().y}if(e-=c,this.get("inPlot"))t<i.tl.x?(t=i.tl.x,this._leftTriangleShape()):t+o/2>i.tr.x?(t=i.tr.x-o,this._rightTriangleShape()):this._centerTriangleShape(),e<i.tl.y?e=i.tl.y:e+c>i.bl.y&&(e=i.bl.y-c);else{var l=this.get("canvas").get("el"),h=s.getWidth(l),f=s.getHeight(l);t<0?(t=0,this._leftTriangleShape()):t+o/2>h?(t=h-o,this._rightTriangleShape()):this._centerTriangleShape(),e<0?e=0:e+c>f&&(e=f-c)}var g=u.transform([1,0,0,0,1,0,0,0,1],[["t",t,e]]);r.stopAnimate(),r.animate({matrix:g},this.get("animationDuration"))},n._centerTriangleShape=function(){var t=this.get("triangleShape"),e=this.get("triangleWidth"),n=this.get("triangleHeight"),r=this.get("board").getBBox(),i=r.width,a=r.height,o=[["M",0,0],["L",e,0],["L",e/2,n],["L",0,0],["Z"]];t.attr("path",o),t.move(i/2-e/2,a-1)},n._leftTriangleShape=function(){var t=this.get("triangleShape"),e=this.get("triangleWidth"),n=this.get("triangleHeight"),r=this.get("board").getBBox().height,i=[["M",0,0],["L",e,0],["L",0,n+3],["L",0,0],["Z"]];t.attr("path",i),t.move(0,r-3)},n._rightTriangleShape=function(){var t=this.get("triangleShape"),e=this.get("triangleWidth"),n=this.get("triangleHeight"),r=this.get("board").getBBox(),i=r.width,a=r.height,o=[["M",0,0],["L",e,0],["L",e,n+4],["L",0,0],["Z"]];t.attr("path",o),t.move(i-e-1,a-4)},e}(a);t.exports=c}])}); |