UNPKG

581 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("G6Plugins",[],e):"object"==typeof exports?exports.G6Plugins=e():t.G6Plugins=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),r=t[e[0]];return function(t,e,i){r.apply(this,[t,e,i].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=r(i),o={"enhance.d3.mapper":n(243),"enhance.g2.mapper":n(244),"layout.circle":n(245),"layout.grid":n(250),"layout.d3.force":n(247),"layout.dagre":n(248),"template.analysis.maxSpanningForest":n(97),"template.analysis.simple.graph":n(97),"template.analysis.sankey":n(257),"tool.minimap":n(260)};a.default.Plugins=o,t.exports=o},function(t,e,n){var r=n(158);t.exports=r},function(t,e,n){var r={Matrix3:n(150),Vector2:n(151),Vector3:n(152)};t.exports=r},function(t,e){"use strict";var n={resetMode:function(t,e){var r=void 0;e._off();for(var i=0;i<t.length;i++){if(r=n[t[i]],!r)return;r.dependences&&r.dependences.forEach(function(n){t.indexOf(n)===-1&&n&&n(e)}),r&&r(e)}},registBehaviour:function(t,e){n[t]=e}};t.exports=n},function(t,e,n){"use strict";var r=n(1),i=n(41),a=n(25),o=n(40),s=n(186),u=n(189),c=n(85),h={};r.mix(h,r,o,i,a,u,c,s),t.exports=h},function(t,e,n){var r;try{r=n(108)}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){"use strict";var r={},i=n(80);r.Color=n(109),r.Math=n(8),r.Matrix=n(2),r.Tween=n(76),r.Canvas=n(7),r.Layouts=n(90),r.Graph=n(19),r.Net=n(236),r.Tree=n(240),r.Global=r.Graph.Global,r.Handler=r.Graph.Handler,r.Shape=r.Graph.Shape,r.Util=r.Graph.Util,r.Item=r.Graph.Item,r.registNode=r.Graph.registNode,r.registEdge=r.Graph.registEdge,r.Layout=r.Layouts,r.registerNode=r.Graph.registNode,r.registerEdge=r.Graph.registEdge,r.registBehaviour=r.Handler.registBehaviour,i.tracking=!0,r.track=function(t){i.tracking=t},n(238),t.exports=r},function(t,e,n){var r=n(124),i=n(59);r.G=i,r.Group=i.Group,r.Shape={},r.Shape.Marker=i.Marker,r.Util=n(75),r.Matrix=n(2),t.exports=r},function(t,e,n){var r=n(149);t.exports=r},function(t,e,n){var r=n(1),i=n(57),a=n(10),o=n(2).Vector3,s=function(t){s.superclass.constructor.call(this,t)};s.ATTRS={},r.extend(s,i),r.augment(s,{isShape:!0,createPath:function(){},drawInner:function(t){var e=this,n=e.__attrs;e.createPath(t);var i=t.globalAlpha;if(e.hasFill()){var a=n.fillOpacity;r.isNull(a)||1===a?t.fill():(t.globalAlpha=a,t.fill(),t.globalAlpha=i)}if(e.hasStroke()){var o=e.__attrs.lineWidth;if(o>0){var s=n.strokeOpacity;r.isNull(s)||1===s||(t.globalAlpha=s),t.stroke()}}},isPointInPath:function(){return!1},isHitBox:function(){return!0},isHit:function(t,e){var n=this,r=new o(t,e,1);if(n.invert(r),n.isHitBox()){var i=n.getBBox();if(i&&!a.box(i.minX,i.maxX,i.minY,i.maxY,r.x,r.y))return!1}var s=n.__attrs.clip;return s?!!s.inside(t,e)&&n.isPointInPath(r.x,r.y):n.isPointInPath(r.x,r.y)},calculateBox:function(){return null},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&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this.__cfg.box=t),t}}),t.exports=s},function(t,e,n){var r=n(30),i=n(31),a=n(23),o=n(29);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,h,l){return a.pointDistance(t,e,n,r,i,o,s,u,h,l)<=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){"use strict";t.exports={colors:["#4E7CCC","#36B3C3","#4ECDA5","#94E08A","#E2F194","#EDCC72","#F8AB60","#F9815C","#EB4456","#C82B3D"],guide:{},grid:{line:{stroke:"#F5F5F5",lineWidth:1},forceAlign:!0,cell:10},nodeStyle:{stroke:"#666",fill:"#fff",lineWidth:1,radius:4,fillOpacity:.1},nodeDelegationStyle:{stroke:"#108EE9",lineDash:[3,3]},edgeDelegationStyle:{stroke:"#108EE9",lineDash:[3,3]},nodePadding:[8,16],nodeLabelStyle:{fill:"#666",textAlign:"center",textBaseline:"middle",fontSize:14},edgeStyle:{lineWidth:1,stroke:"#999",lineAppendWidth:10},edgeLabelStyle:{fill:"#666",textAlign:"center",textBaseline:"middle"},edgeLabelRectStyle:{fill:"white"},anchorPointStyle:{fill:"#108EE9",lineWidth:.1,r:4},anchorPointHoverStyle:{lineWidth:6,stroke:"#108EE9",strokeOpacity:.2},frameRectStyle:{fill:"blue",opacity:.1},nodeControlPointStyle:{r:4,fill:"#fff",shadowBlur:4,shadowColor:"#666"},edgeControlPointStyle:{r:4,fill:"#fff",shadowBlur:4,shadowColor:"#666"},nodeAcitvedBoxStyle:{},nodeActivedBoxStyle:{stroke:"#108EE9",lineDash:[3,3]},modalRectStyle:{fill:"white",fillOpacity:.8},zIndex:{node:1,edge:0,nodeLabel:5,edgeLabel:4,edgeLabelBackground:3},treeButtonStyle:{fill:"#fff",stroke:"#333"},wheelZoomTimeout:200,toolTipTimeout:200,treeButtonRadius:6,treeButtonPadding:3,fitViewPadding:10,updateDuration:450,enterDuration:450,leaveDuration:450,updateEasing:"easeOutQuart",enterEasing:"easeOutQuart",leaveEasing:"easeOutQuart",fontFamily:'"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\u5fae\u8f6f\u96c5\u9ed1", SimSun, "sans-serif"'}},function(t,e,n){"use strict";function r(t,e,n,r){var i;do i=m.uniqueId(r);while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function i(t){var e=(new y).setGraph(t.graph());return m.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),m.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}function a(t){var e=new y({multigraph:t.isMultigraph()}).setGraph(t.graph());return m.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),m.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function o(t){var e=m.map(t.nodes(),function(e){var n={};return m.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return m.zipObject(t.nodes(),e)}function s(t){var e=m.map(t.nodes(),function(e){var n={};return m.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return m.zipObject(t.nodes(),e)}function u(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r,o=t.width/2,s=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,c;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,c=s):(i<0&&(o=-o),u=o,c=o*a/i),{x:n+u,y:r+c}}function c(t){var e=m.map(m.range(d(t)+1),function(){return[]});return m.each(t.nodes(),function(n){var r=t.node(n),i=r.rank;m.isUndefined(i)||(e[i][r.order]=n)}),e}function h(t){var e=m.min(m.map(t.nodes(),function(e){return t.node(e).rank}));m.each(t.nodes(),function(n){var r=t.node(n);m.has(r,"rank")&&(r.rank-=e)})}function l(t){var e=m.min(m.map(t.nodes(),function(e){return t.node(e).rank})),n=[];m.each(t.nodes(),function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;m.each(n,function(e,n){m.isUndefined(e)&&n%i!==0?--r:r&&m.each(e,function(e){t.node(e).rank+=r})})}function f(t,e,n,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(t,"border",a,e)}function d(t){return m.max(m.map(t.nodes(),function(e){var n=t.node(e).rank;if(!m.isUndefined(n))return n}))}function g(t,e){var n={lhs:[],rhs:[]};return m.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function p(t,e){var n=m.now();try{return e()}finally{console.log(t+" time: "+(m.now()-n)+"ms")}}function v(t,e){return e()}var m=n(5),y=n(15).Graph;t.exports={addDummyNode:r,simplify:i,asNonCompoundGraph:a,successorWeights:o,predecessorWeights:s,intersectRect:u,buildLayerMatrix:c,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:f,maxRank:d,partition:g,time:p,notime:v}},5,function(t,e,n){"use strict";var r=n(11),i=n(4),a={addNode:function(t,e){var n=void 0,r=void 0,i=void 0,o=t.get("gridAssist"),s=o&&o.forceAlign;t._on(e,function(e){n=t.get("addingType"),r=t.get("addingModel"),"node"===n&&(r.x=e.x,r.y=e.y,s&&a.alignPoint(r,o.cell),i=t.addItem("node",r),t.clearAllActived(),t.setItemActived(i),t.updateRollback(),t.draw(!1),t.endAdd(i))})},onWheelZoom:function(t,e,n){var i=setTimeout(function(){},r.wheelZoomTimeout),a=1;t._on("wheelzoom",function(){clearTimeout(i),a&&(e(),a=0),i=setTimeout(function(){n(),a=1},r.wheelZoomTimeout)})},autoText:function(t){var e=t.getKeyShape(),n=t.getGroup(),r=i.getBBox(e,n.getParent().getParent().getParent()),a=r.maxX-r.minX;n.traverseChildren(function(t){if("text"===t.type&&t.get("freezePoint")){var e=t.getBBox(),n=e.maxX-e.minX;n>7/3*a?(t.hide(),t.set("autoTextHide",!0)):(t.set("autoTextHide",!1),t.show())}})},autoTexts:function(t){var e=t.getNodes();i.each(e,function(t){a.autoText(t)}),t.draw()},hideTexts:function(t){var e=t.get("rootGroup");e.traverseChildren(function(t){"text"===t.type&&t.hide()}),t.draw(!1)},showText:function(t){var e=t.getGroup();e.traverseChildren(function(t){"text"===t.type&&t.show()})},showTexts:function(t){var e=t.get("rootGroup");e.traverseChildren(function(t){"text"===t.type&&t.show()}),t.draw(!1)},alignPoint:function(t,e){t.x=Math.round(t.x/e)*e,t.y=Math.round(t.y/e)*e},getControlInfo:function(t,e,n,r,i){var a=t.x-n.x,o=t.y-n.y,s=r.getBBox(),u=r.getPosition(),c=void 0,h=void 0;switch("frontCanvas"===i&&(u=r.getCenter()),e){case 0:c=s.width-a,h=s.height-o;break;case 1:c=s.width+a,h=s.height-o;break;case 2:c=s.width+a,h=s.height+o;break;default:c=s.width-a,h=s.height+o}var l=[c,h];return{x:u.x+a/2,y:u.y+o/2,size:l}},dragEdgeExtremePoint:function(t,e,n,r){var i=t.get("behaviourSignal"),a=void 0,o=void 0,s=void 0,u=void 0,c=void 0,h=void 0,l=void 0;t._on("mousedown",function(t){o=t.shape,s=t.shape,u=e(t),c=n(t,u),!u||u.isSourcePoint(c)||u.isTargetPoint(c)||(u=void 0),u&&o&&o.hasClass("anchor-point")&&u.updateModel({controlPoints:[o.get("point"),o.get("point")],sourceAnchor:o.get("index")})}),t._on("dragmove",function(e){t.isEdge(u)&&(i.draggingEdge=!0,a=e.item,l={x:e.x,y:e.y,controlPointIndex:c},u.showDelegation(l),t.refreshFront())}),t.on("mouseup",function(e){t.isEdge(u)&&(a=e.item,o=e.shape,h={},i.draggingEdge&&(o&&"anchor-point"===o.get("class")?o.get("linkable")!==!1&&o!==s&&(u.isSourcePoint(c)?(h.source=a.get("id"),h.sourceAnchor=o.get("index")):u.isTargetPoint(c)&&(h.target=a.get("id"),h.targetAnchor=o.get("index"))):t.isNode(a)&&(u.isSourcePoint(c)?(h.source=a.get("id"),h.sourceAnchor=null):u.isTargetPoint(c)&&(h.target=a.get("id"),h.targetAnchor=null)),u.hideDelegation()),r(u,h),t.fire("dragedgeend",{edge:u,shape:o,item:a}),s=void 0,a=void 0,u=void 0,h=void 0,c=void 0,l=void 0,o=void 0,i.draggingEdge=void 0)})}};t.exports=a},function(t,e,n){var r;try{r=n(297)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(6),i=n(17),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={},r.Util.extend(a,i),r.Util.augment(a,{init:function(){}}),t.exports=a},function(t,e,n){var r=n(111);t.exports=r},function(t,e,n){function r(t,e,n){var r=new s(1,0).angleTo(t),i=r-u,a=r+u,o=6+3*n;return[{x:e.x-o*Math.cos(i),y:e.y-o*Math.sin(i)},e,{x:e.x-o*Math.cos(a),y:e.y-o*Math.sin(a)}]}function i(t,e){t.moveTo(e[0].x,e[0].y),t.lineTo(e[1].x,e[1].y),t.lineTo(e[2].x,e[2].y)}function a(t,e,n,a){i(t,r(e,n,a))}function o(t,e,n){var r=n/Math.sin(u);return t.setLength(r/2),e.sub(t),e}var s=n(2).Vector2,u=Math.PI/6;t.exports={makeArrow:a,getEndPoint:o}},function(t,e,n){"use strict";var r=n(171);n(168),n(170),r.Mapper=n(83),r.Item=n(82),r.Shape=n(84),r.Util=n(4),r.Global=n(11),r.Handler=n(3),r.IdGroup=n(36),r.SortGroup=n(81),r.HtmlShape=n(169),r.registNode=r.Shape.registNode,r.registEdge=r.Shape.registEdge,t.exports=r},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(43),o=n(1),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=this;n.options=e,o.isFunction(e.callback)||(n.options.callback=function(){})}return i(t,[{key:"_prepareRoot",value:function(){var t=this;t.rootNode=new a(t.root,t.options)}},{key:"execute",value:function(){throw new Error("please override this method")}},{key:"getNodes",value:function(){var t=this,e=t.execute();e.translate(-(e.x+e.width/2+e.hgap),-(e.y+e.height/2+e.vgap));var n=[];return e.eachNode(function(t){n.push(t.data)}),n}},{key:"getEdges",value:function(){var t=this,e=t.options,n=e.extraEdges,r=this.rootNode,i=[];return r.eachNode(function(t){t.children.forEach(function(e){i.push({id:t.id+"-"+e.id,source:t.id,target:e.id})})}),i.concat(n),i}}]),t}();t.exports=s},function(t,e,n){"use strict";var r=n(1),i=n(51),a=n(7).Group,o=i.ShowLabels,s="x-chart-axis",u=n(114),c=function(t){c.superclass.constructor.call(this,t)};c.CFG={zIndex:4,ticks:null,line:null,tickLine:null,subTick:null,grid:null,labels:{label:{},autoRotate:!0},title:{},autoPaint:!0,labelOffset:10,titleOffset:20,formatter:null,firstTick:!0},r.mixin(c,[o]),r.extend(c,a),r.augment(c,{_renderUI:function(){var t=this.get("labels");t&&this.renderLabels(),this.get("autoPaint")&&this.paint(),r.isNull(this.get("title"))||this.renderTitle(),this.sort()},_parseTicks:function(t){t=t||[];for(var e=t.length,n=0;n<e;n++){var i=t[n];r.isObject(i)||(t[n]=this.parseTick(i,n,e))}return this.set("ticks",t),t},_addTickItem:function(t,e,n){var r=this.get("tickItems"),i={x1:e.x,y1:e.y},a=this.getTickEnd(e,n,t);i.x2=a.x,i.y2=a.y,r||(r=[],this.set("tickItems",r)),r.push(i)},_formatPoint:function(t){var e=this.get("formatter");return e&&(t=e.call(this,t)),t},_renderLines:function(){var t,e=this.get("line"),n=this.get("id");if(e){t=this.getLinePath(),e=r.mix({path:t},e);var i=this.addShape("path",{elCls:s+"-line",attrs:e});i.id=n+"axisLine",i.animateType="axisLine",this.set("lineShape",i)}},_processTicks:function(){var t=this,e=t.get("labels"),n=t.get("subTick"),i=t.get("tickLine"),a=t.get("ticks");a=t._parseTicks(a),r.each(a,function(n,r){var a=t.getTickPoint(n.value,r);i&&t._addTickItem(r,a),e&&t.addLabel(t._formatPoint(n.text),a,r,n.value)}),n&&r.each(a,function(e,r){var o=r?e.value-a[r-1].value:e.value;o/=t.get("subTick");for(var s=1;s<n;s++){var u={text:"",value:r?a[r-1].value+s*o:s*o};if(i){var c=t.getTickPoint(u.value),h=parseInt(.6*i.value,10);t._addTickItem(s-1,c,h)}}})},_renderTicks:function(){var t=this,e=t.get("tickItems"),n=t.get("tickLine"),i=t.get("id"),a="",o=r.mix({},n);if(e){r.each(e,function(t){var e=r.substitute("M{x1} {y1}L{x2} {y2}",t);a+=e}),delete o.value,o.path=a;var u=t.addShape("path",{elCls:s+"-ticks",attrs:o});u.id=i+"axisTick",u.animateType="axisTick",t.set("tickShape",u)}},_renderGrid:function(){var t=this.get("grid");if(t){r.isNull(t.animate)&&(t.animate=this.get("animate")),this.get("start")&&(t.start=this.get("start"));var e=this.addGroup(u,t);this.set("gridGroup",e)}},paint:function(){this._renderLines(),this._processTicks(),this._renderTicks(),this._renderGrid();var t=this.get("labels");t&&t.autoRotate&&this.autoRotateLabels()},parseTick:function(t,e,n){return{text:t,value:e/(n-1)}},getTextAnchor:function(t){var e,n=Math.abs(t.y/t.x);return e=n>=1?"center":t.x>0?"left":"right"},addLabel:function(t,e,n,r){var i,a=this.get("id")+"label"+r,o=this.get("labelsGroup"),s={};if(o){var u=this.get("labelOffset")||10,c=this.getSideVector(u,e,n);e={x:e.x+c.x,y:e.y+c.y},s.text=t,s.x=e.x,s.y=e.y,s.textAlign=this.getTextAnchor(c),s.id=a?a:t,i=o.addLabel(s)}return i},getMaxLabelWidth:function(t){var e=t.get("children"),n=0;return r.each(e,function(t){var e=t.getBBox(),r=e.width;n<r&&(n=r)}),n},remove:function(){c.superclass.remove.call(this);var t=this.get("gridGroup");t&&t.remove(),this.removeLabels()},autoRotateLabels:function(){},renderTitle:function(){},getLinePath:function(){},getTickPoint:function(){},getTickEnd:function(){},getSideVector:function(){}}),t.exports=c},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,r,i){var a=1-i;return 3*(((e-t)*a+2*(n-e)*i)*a+(r-n)*i*i)}function a(t,e,n,i,a,o,s,u,h,l,f){var d,g,p,v,m,y,x,b,_=.005,w=1/0,M=1e-4,S=new c(h,l);for(g=0;g<1;g+=.05)p=new c(r(t,n,a,s,g),r(e,i,o,u,g)),v=p.distanceToSquared(S),v<w&&(d=g,w=v);w=1/0;for(var k=0;k<32&&!(_<M);k++)x=d-_,b=d+_,p=new c(r(t,n,a,s,x),r(e,i,o,u,x)),v=p.distanceToSquared(S),x>=0&&v<w?(d=x,w=v):(y=new c(r(t,n,a,s,b),r(e,i,o,u,b)),m=y.distanceToSquared(S),b<=1&&m<w?(d=b,w=m):_*=.5);return f&&(f.x=r(t,n,a,s,d),f.y=r(e,i,o,u,d)),Math.sqrt(w)}function o(t,e,n,r){var i,a,o,s=3*t-9*e+9*n-3*r,u=6*e-12*n+6*r,c=3*n-3*r,l=[];if(h.equal(s,0))h.equal(u,0)||(i=-c/u,i>=0&&i<=1&&l.push(i));else{var f=u*u-4*s*c;h.equal(f,0)?l.push(-u/(2*s)):f>0&&(o=Math.sqrt(f),i=(-u+o)/(2*s),a=(-u-o)/(2*s),i>=0&&i<=1&&l.push(i),a>=0&&a<=1&&l.push(a))}return l}function s(t,e,n,r,i){var a=-3*e+9*n-9*r+3*i,o=t*a+6*e-12*n+6*r;return t*o-3*e+3*n}function u(t,e,n,r,i,a,o,u,c){l.isNull(c)&&(c=1),c=c>1?1:c<0?0:c;for(var h=c/2,f=12,d=[-.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,v=0;v<f;v++){var m=h*d[v]+h,y=s(m,t,n,i,o),x=s(m,e,r,a,u),b=y*y+x*x;p+=g[v]*Math.sqrt(b)}return h*p}var c=n(2).Vector2,h=n(8),l=n(1);t.exports={at:r,derivativeAt:i,projectPoint:function(t,e,n,r,i,o,s,u,c,h){var l={};return a(t,e,n,r,i,o,s,u,c,h,l),l},pointDistance:a,extrema:o,len:u}},function(t,e,n){"use strict";function r(t,e){if(a.isNumeric(t)&&a.isNumeric(e))return o.number(t,e);if(a.isString(t)&&a.isString(e)){var n=new u(t),r=new u(e);if(n.getType()&&r.getType())return s.color(n,r)}}function i(t,e){if(a.isNumeric(t)&&a.isNumeric(e))return o.unNumber(t,e);if(a.isString(t)&&a.isString(e)){var n=new u(t),r=new u(e);if(n.getType()&&r.getType())return s.unColor(n,r)}}var a=n(1),o=n(146),s=n(143),u=n(20);t.exports={singular:r,unSingular:i}},function(t,e,n){"use strict";function r(t){var e=[];return i.each(t,function(t){e.push(t.x),e.push(t.y)}),e}var i=n(1),a=n(153),o={};i.mix(o,{pathToArray:a.toArray,pathToString:a.toString,pathToCurve:a.toCurve,pathToAbsolute:a.toAbsolute,pathCatmullRomToBezier:a.catmullRomToBezier,getRectPath:a.rectPath,pathIntersection:a.intersection,getEllipsePath:function(t,e,n,r){var i=[["M",t,e-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return i},pointsToPolygon:function(t,e){if(!t.length)return"";for(var n="",r="",a=0,o=t.length;a<o;a++){var s=t[a];r=0===a?"M{x} {y}":"L{x} {y}",n+=i.substitute(r,s)}return e&&(n+="Z"),n},pointsToCurve:function(t){t=r(t);var e=o.pathCatmullRomToBezier(t);return e.unshift(["M",t[0],t[1]]),e},getWaterPositions:function(t,e,n,r){return 0===e?[[t+.5*n/Math.PI/2,r/2],[t+.5*n/Math.PI,r],[t+n/4,r]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),r],[t+.5*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-r/2],[t+.5*n/Math.PI,-r],[t+n/4,-r]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-r],[t+.5*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]},getWaterPath:function(t,e,n,r,i,a,s){for(var u=2*Math.ceil(2*t/n*4),c=[];r<2*-Math.PI;)r+=2*Math.PI;for(;r>0;)r-=2*Math.PI;r=r/Math.PI/2*n;var h=a-t+r-2*t;c.push(["M",h,e]);for(var l=0,f=0;f<u;++f){var d=f%4,g=o.getWaterPositions(f*n/4,d,n,i);c.push(["C",g[0][0]+h,-g[0][1]+e,g[1][0]+h,-g[1][1]+e,g[2][0]+h,-g[2][1]+e]),f===u-1&&(l=g[2][0])}return c.push(["L",l+h,s+t]),c.push(["L",h,s+t]),c.push(["L",h,e]),c}}),t.exports=o},function(t,e,n){"use strict";var r=n(3),i=function(t,e,n,r){var i=t.get("rootGroup"),a=void 0,o=void 0,s=void 0,u=void 0,c=void 0;t._on("mousedown",function(t){e&&(t.shape||t.frontEvObj.shape)||(a={x:t.domX,y:t.domY},o=i.getMatrix())}),t._on("dragmove",function(e){a&&(u=e.domX-a.x,c=e.domY-a.y,s=o.clone(),n===!1&&(u=0),r===!1&&(c=0),s.translate(u,c),t.updateMatrix(s),t.setCapture(!1),t.draw(!1))}),t._on("dommouseleave",function(){t.setCapture(!0),a=void 0,o=void 0,u=void 0,c=void 0,s=void 0}),t._on("mouseup",function(){t.setCapture(!0),a=void 0,o=void 0,u=void 0,c=void 0,s=void 0})};r.dragCanvas=i,t.exports=i},function(t,e,n){"use strict";function r(t){function e(r){var i=t.node(r);if(a.has(n,r))return i.rank;n[r]=!0;var o=a.min(a.map(t.outEdges(r),function(n){return e(n.w)-t.edge(n).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),i.rank=o}var n={};a.each(t.sources(),e)}function i(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var a=n(5);t.exports={longestPath:r,slack:i}},function(t,e,n){"use strict";var r=n(1),i=n(7).Group,a=function(t){a.superclass.constructor.call(this,t)};a.CFG={title:{},titleText:null,dx:0,dy:0,position:!0,animate:!1},r.extend(a,i),r.augment(a,{_beforeRenderUI:function(){var t=this.get("title");r.isNull(t)&&this.set("titleText",null),this.set("itemsGroup",this.addGroup()),this.set("titleShape",this.addShape("text",{attrs:r.mix({x:0,y:0},t)}))},_renderUI:function(){this._renderTitle()},_renderTitle:function(){var t=this.get("titleShape"),e=this.get("titleText");t.attr({x:0,y:0,text:e})},setPosition:function(t){t=t?t:this.get("position");var e=this.get("plotRange");if(e){var n=e.tl,r=e.br,i=this.get("dx"),a=this.get("dy"),o=this.getBBox().width,s=0,u=0;switch(t){case"top":s=n.x,u=n.y;break;case"left":s=n.x,u=(n.y+r.y)/2;break;case"right":s=r.x-o,u=(n.y+r.y)/2;break;case"bottom":s=(n.x+r.x)/2-o/2,u=r.y}this.move(s+i,u+a),this.set("position",t)}},getCount:function(){return this.get("itemsGroup").get("children").length},getLeaveCount:function(){var t=this.get("itemsGroup"),e=t.get("children"),n=[];return n=r.filter(e,function(t){return t.get("checked")}),n.length},setItems:function(t){this.set("items",t),this.clearItems(),this._renderUI()},addItem:function(t){var e=this.get("items");e.push(t),this.clearItems(),this._renderUI()},clearItems:function(){var t=this.get("itemsGroup");t.clear()}}),t.exports=a},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=c.mod(e,2*Math.PI),n=c.mod(n,2*Math.PI)+a,t=c.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,s,c,h){var l=new u(s,c),f=new u(t,e),d=new u(1,0),g=u.sub(l,f),p=d.angleTo(g);p=a(p,r,i,o);var v=new u(n*Math.cos(p)+t,n*Math.sin(p)+e);h&&(h.x=v.x,h.y=v.y);var m=l.distanceTo(v);return m}function s(t,e,n,i,o,s){var u=0,c=Math.PI/2,l=Math.PI,f=3*Math.PI/2,d=[],g=a(u,i,o,s);g===u&&d.push(r(t,e,n,u)),g=a(c,i,o,s),g===c&&d.push(r(t,e,n,c)),g=a(l,i,o,s),g===l&&d.push(r(t,e,n,l)),g=a(f,i,o,s),g===f&&d.push(r(t,e,n,f)),d.push(r(t,e,n,i)),d.push(r(t,e,n,o));var p=1/0,v=-(1/0),m=1/0,y=-(1/0);return h.each(d,function(t){p>t.x&&(p=t.x),v<t.x&&(v=t.x),m>t.y&&(m=t.y),y<t.y&&(y=t.y)}),{minX:p,minY:m,maxX:v,maxY:y}}var u=n(2).Vector2,c=n(8),h=n(1);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:s}},function(t,e,n){var r=n(2).Vector2;t.exports={at:function(t,e,n){return(e-t)*n+t},pointDistance:function(t,e,n,i,a,o){var s=new r(n-t,i-e);if(s.isZero())return NaN;var u=s.vertical();u.normalize();var c=new r(a-t,o-e);return Math.abs(c.dot(u))},box:function(t,e,n,r,i){var a=i/2,o=Math.min(t,n),s=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r);return{minX:o-a,minY:u-a,maxX:s+a,maxY:c+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){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function i(t,e,n,i,a,s,u,c,h){var l,f,d,g,p,v,m,y=.005,x=1/0,b=1e-4,_=new o(u,c);for(p=0;p<1;p+=.05)d=new o(r(t,n,a,p),r(e,i,s,p)),f=d.distanceToSquared(_),f<x&&(l=p,x=f);for(x=1/0,m=0;m<32&&!(y<b);m++){var w=l-y,M=l+y;d=new o(r(t,n,a,w),r(e,i,s,w)),f=d.distanceToSquared(_),w>=0&&f<x?(l=w,x=f):(g=new o(r(t,n,a,M),r(e,i,s,M)),v=g.distanceToSquared(_),M<=1&&v<x?(l=M,x=v):y*=.5)}return h&&(h.x=r(t,n,a,l),h.y=r(e,i,s,l)),Math.sqrt(x)}function a(t,e,n){var r=t+n-2*e;if(s.equal(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}var o=n(2).Vector2,s=n(8);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:a}},function(t,e,n){var r=n(140);t.exports=r},function(t,e,n){"use strict";var r=(n(1),"\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\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"),o=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(i,function(t,r,i){var o=[],s=r.toLowerCase();if(i.replace(a,function(t,e){e&&o.push(+e)}),"m"==s&&o.length>2&&(n.push([r].concat(o.splice(0,2))),s="l",r="m"==r?"l":"L"),"o"==s&&1==o.length&&n.push([r,o[0]]),"r"==s)n.push([r].concat(o));else for(;o.length>=e[s]&&(n.push([r].concat(o.splice(0,e[s]))),e[s]););}),n},s=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},u=function(t,e,n,r,i){if(null==i&&null==r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!=i)var a=Math.PI/180,o=t+n*Math.cos(-r*a),s=t+n*Math.cos(-i*a),u=e+n*Math.sin(-r*a),c=e+n*Math.sin(-i*a),h=[["M",o,u],["A",n,n,0,+(i-r>180),0,s,c]];else h=[["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 h},c=function(t){if(t=o(t),!t||!t.length)return[["M",0,0]];var e,n=[],r=0,i=0,a=0,c=0,h=0;"M"==t[0][0]&&(r=+t[0][1],i=+t[0][2],a=r,c=i,h++,n[0]=["M",r,i]);for(var l,f,d=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),g=h,p=t.length;g<p;g++){if(n.push(l=[]),f=t[g],e=f[0],e!=e.toUpperCase())switch(l[0]=e.toUpperCase(),l[0]){case"A":l[1]=f[1],l[2]=f[2],l[3]=f[3],l[4]=f[4],l[5]=f[5],l[6]=+f[6]+r,l[7]=+f[7]+i;break;case"V":l[1]=+f[1]+i;break;case"H":l[1]=+f[1]+r;break;case"R":for(var v=[r,i].concat(f.slice(1)),m=2,y=v.length;m<y;m++)v[m]=+v[m]+r,v[++m]=+v[m]+i;n.pop(),n=n.concat(s(v,d));break;case"O":n.pop(),v=u(r,i,f[1],f[2]),v.push(v[0]),n=n.concat(v);break;case"U":n.pop(),n=n.concat(u(r,i,f[1],f[2],f[3])),l=["U"].concat(n[n.length-1].slice(-2));break;case"M":a=+f[1]+r,c=+f[2]+i;default:for(m=1,y=f.length;m<y;m++)l[m]=+f[m]+(m%2?r:i)}else if("R"==e)v=[r,i].concat(f.slice(1)),n.pop(),n=n.concat(s(v,d)),l=["R"].concat(f.slice(-2));else if("O"==e)n.pop(),v=u(r,i,f[1],f[2]),v.push(v[0]),n=n.concat(v);else if("U"==e)n.pop(),n=n.concat(u(r,i,f[1],f[2],f[3])),l=["U"].concat(n[n.length-1].slice(-2));else for(var x=0,b=f.length;x<b;x++)l[x]=f[x];if(e=e.toUpperCase(),"O"!=e)switch(l[0]){case"Z":r=+a,i=+c;break;case"H":r=l[1];break;case"V":i=l[1];break;case"M":a=l[l.length-2],c=l[l.length-1];default:r=l[l.length-2],i=l[l.length-1]}}return n},h=function(t,e,n,r){return[t,e,n,r,n,r]},l=function(t,e,n,r,i,a){var o=1/3,s=2/3;return[o*t+s*n,o*e+s*r,o*i+s*n,o*a+s*r,i,a]},f=function(t,e,n,r,i,a,o,s,u,c){n===r&&(n+=1);var h,l=120*Math.PI/180,d=Math.PI/180*(+i||0),g=[],p=function(t,e,n){var r=t*Math.cos(n)-e*Math.sin(n),i=t*Math.sin(n)+e*Math.cos(n);return{x:r,y:i}};if(c)S=c[0],k=c[1],w=c[2],M=c[3];else{h=p(t,e,-d),t=h.x,e=h.y,h=p(s,u,-d),s=h.x,u=h.y,t===s&&e===u&&(s+=1,u+=1);var v=(Math.cos(Math.PI/180*i),Math.sin(Math.PI/180*i),(t-s)/2),m=(e-u)/2,y=v*v/(n*n)+m*m/(r*r);y>1&&(y=Math.sqrt(y),n*=y,r*=y);var x=n*n,b=r*r,_=(a==o?-1:1)*Math.sqrt(Math.abs((x*b-x*m*m-b*v*v)/(x*m*m+b*v*v))),w=_*n*m/r+(t+s)/2,M=_*-r*v/n+(e+u)/2,S=Math.asin(((e-M)/r).toFixed(9)),k=Math.asin(((u-M)/r).toFixed(9));S=t<w?Math.PI-S:S,k=s<w?Math.PI-k:k,S<0&&(S=2*Math.PI+S),k<0&&(k=2*Math.PI+k),o&&S>k&&(S-=2*Math.PI),!o&&k>S&&(k-=2*Math.PI)}var A=k-S;if(Math.abs(A)>l){var C=k,T=s,E=u;k=S+l*(o&&k>S?1:-1),s=w+n*Math.cos(k),u=M+r*Math.sin(k),g=f(s,u,n,r,i,0,o,T,E,[k,C,w,M])}A=k-S;var P=Math.cos(S),I=Math.sin(S),N=Math.cos(k),B=Math.sin(k),F=Math.tan(A/4),O=4/3*n*F,L=4/3*r*F,D=[t,e],R=[t+O*I,e-L*P],z=[s+O*B,u-L*N],G=[s,u];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],c)return[R,z,G].concat(g);g=[R,z,G].concat(g).join().split(",");for(var j=[],U=0,Y=g.length;U<Y;U++)j[U]=U%2?p(g[U-1],g[U],d).y:p(g[U],g[U+1],d).x;return j},d=function(t,e){for(var n=c(t),r=e&&c(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(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(f.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(l(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(l(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(h(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(h(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(h(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(h(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var i=t[e];i.length;)d[e]="A",r&&(g[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),y=Math.max(n.length,r&&r.length||0)}},u=function(t,e,i,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),i.bx=0,i.by=0,i.x=t[o][1],i.y=t[o][2],y=Math.max(n.length,r&&r.length||0))},d=[],g=[],p="",v="",m=0,y=Math.max(n.length,r&&r.length||0);m<y;m++){n[m]&&(p=n[m][0]),"C"!=p&&(d[m]=p,m&&(v=d[m-1])),n[m]=o(n[m],i,v),"A"!=d[m]&&"C"==p&&(d[m]="C"),s(n,m),r&&(r[m]&&(p=r[m][0]),"C"!=p&&(g[m]=p,m&&(v=g[m-1])),r[m]=o(r[m],a,v),"A"!=g[m]&&"C"==p&&(g[m]="C"),s(r,m)),u(n,r,i,a,m),u(r,n,a,i,m);var x=n[m],b=r&&r[m],_=x.length,w=r&&b.length;i.x=x[_-2],i.y=x[_-1],i.bx=parseFloat(x[_-4])||i.x,i.by=parseFloat(x[_-3])||i.y,a.bx=r&&(parseFloat(b[w-4])||a.x),a.by=r&&(parseFloat(b[w-3])||a.y),a.x=r&&b[w-2],a.y=r&&b[w-1]}return r?[n,r]:n},g=/,?([a-z]),?/gi,p=function(t){return t.join(",").replace(g,"$1")},v={toArray:o,toString:p,toCurve:d,toAbsolute:c,catmullRomToBezier:s};t.exports=v},function(t,e,n){"use strict";t.exports={centerScaleIn:n(159),centerScaleOut:n(160),update:n(161),Util:n(35)}},function(t,e,n){"use strict";var r=n(11),i={scaleIn:function(t,e,n,i,a){i=i?i:e,a=a?a:n,t.transform([["t",-i,-a],["s",.01,.01],["t",e,n]]),setTimeout(function(){t&&!t.get("destroyed")&&t.animate({transform:[["t",-e,-n],["s",100,100],["t",i,a]]},r.enterDuration,r.enterEasing)},16)},scaleOut:function(t,e,n){t.animate({transform:[["t",-e,-n],["s",.01,.01],["t",e,n]]},r.leaveDuration,r.leaveEasing,function(){
2t.remove()})}};t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(7).G,a=i.Group,o=function t(e){t.superclass.constructor.call(this,e)};r.extend(o,a),r.augment(o,{init:function(){o.superclass.init.call(this),this.set("gid",this.get("id"))},addShape:function(t,e){var n=this.get("id"),r=o.superclass.addShape.call(this,t,e);return r.set("id",n),r.set("gid",n+"-"+this.get("children").length),r},addGroup:function(t,e){var n=this.get("id"),r=o.superclass.addGroup.call(this,t,e);return r.set("id",n),r.set("gid",n+this.get("children").length),r}}),t.exports=o},function(t,e,n){"use strict";var r=n(17),i=n(4),a=n(176),o=n(38),s=n(84),u=n(11),c=n(34),h=function t(e){t.superclass.constructor.call(this,e),this._init()};h.ATTRS={id:"",type:null,model:{},mapper:null,group:null,controlGroup:null,keyShape:null,class:null,drawFrameObj:{},enterAnimate:c.centerScaleIn,leaveAnimate:c.centerScaleOut},i.extend(h,r),i.mixin(h,[a,o]),i.augment(h,{_init:function(){var t=this,e=t.get("type"),n=s.getShape(e);this.set("shapeManger",n)},_calculateBBox:function(){var t=this,e=t.getKeyShape(),n=e.get("parent"),r=i.getBBox(e,n);return this.set("boxStash",r),r},_setAnimate:function(){var t=this.get("group"),e=this.getShapeObj(),n=this.get("graph"),r=this.get("enterAnimate"),a=this.get("leaveAnimate");if(n){var o=i.mix(!0,{},{enterAnimate:r,leaveAnimate:a},{enterAnimate:n.enterAnimate,leaveAnimate:n.leaveAnimate},{enterAnimate:e.enterAnimate,leaveAnimate:e.leaveAnimate});t.set("enterAnimate",o.enterAnimate),t.set("leaveAnimate",o.leaveAnimate)}},hideControlPoints:function(){var t=this.get("controlGroup");t&&t.remove()},showControlPoints:function(){var t=this,e=t.getControlPoints(),n=t.get("type"),r=u[n+"ControlPointStyle"],a=t.get("controlPointRootGroup"),o=t.get("controlGroup");if(o&&o.remove(!0),o=a.addGroup({zIndex:u.zIndex.controlPoint,id:t.get("id")}),t.set("controlGroup",o),r){var s=r.r?r.r:5;i.each(e,function(e,n){o.addShape("rect",{class:"control-point",freezePoint:e,pointIndex:n,point:e,item:t,attrs:i.mix({},r,{x:e.x-s,y:e.y-s,width:2*s,height:2*s})})})}},isVisible:function(){var t=this.getGroup();return t.get("visible")},_show:function(){var t=this.get("group");t.show()},_hide:function(){var t=this.get("group");t.hide(),this.clearActived()},getLabelShape:function(){var t=this.get("group");return t.findBy(function(t){return t.hasClass("label")})},getType:function(){return this.get("type")},getBBox:function(){var t=this.get("boxStash");return t||this._calculateBBox()},getGroup:function(){return this.get("group")},getKeyShape:function(){var t=this,e=t.get("group"),n=e.get("children"),r=t.get("keyShape");return r||n[0]},getShapeObj:function(){return this.get("shapeObj")},getShapeCfg:function(){return this.get("group").get("shapeCfg")},update:function(){var t=this.get("group"),e=this.get("animate");t.clear(!e),this.draw()},draw:function(){var t=this,e=t.get("model"),n=t.get("mapper"),r=n.mapping(e),a=t.get("group"),o=t.get("shapeManger"),s=void 0,u=void 0,c=void 0;if(a.set("shapeCfg",r),t.beforeDraw(),s=r.shape,i.isArray(r.shape)&&(s=r.shape[0]),s&&s.startsWith&&s.startsWith("http")){if(!r.size)return u=new Image,c=t.getCanvas(),u.src=r.shape,void(u.onload=function(){return!(!t||t.get("destroyed"))&&(e.size=[u.width,u.height],t.draw(),void c.draw())});s="image"}var h=o.draw(s,r,a);t.set("shapeObj",o.getShape(s)),t.set("keyShape",h),a.set("keyShape",h),t._setAnimate(),t.afterDraw()},getCanvas:function(){var t=this.get("group").get("canvas");return t},beforeDraw:function(){},afterDraw:function(){var t=this.get("graph"),e=this.get("actived");e&&this.setActiveStatus(e),t.fire("afteritemrender",{item:this})},destroyItem:function(){},destroy:function(){var t=this.get("group"),e=this.get("controlGroup"),n=this.get("delegateEl"),r=this.get("animate");t&&t.remove(!r),e&&e.remove(),n&&n.remove(),this.destroyItem(),h.superclass.destroy.call(this)},setActiveStatus:function(t,e,n){if(!this.destroyed){var r=this.getShapeObj();r&&i.isFunction(r.setActived)?r.setActived(this,t):t?(this.showControlPoints(),e&&e()):(this.hideControlPoints(),n&&n())}},showDelegation:function(t){var e=this.getDelegationPath(t),n=this.get("delegateEl"),r=t.stroke,a=this.get("delegaRootGroup"),o=this.get("type"),s=i.mix(!0,{},u[o+"DelegationStyle"],{path:e,stroke:r});n?n.attr(s):(n=a.addShape("path",{attrs:s,capture:!1,zIndex:u.zIndex.delegate}),this.set("delegateEl",n))},getModel:function(){return this.get("model")},updateModel:function(t){var e=this.getModel();i.mix(e,t)},getControlPoints:function(){},getDelegationPath:function(){},hideDelegation:function(){var t=this.get("delegateEl");t&&t.remove(),this.set("delegateEl",null)},style:function(t){var e=this.get("group");i.traverseTree(e,function(e){e.attr(t)})}}),t.exports=h},function(t,e,n){"use strict";var r=n(1),i=function(){};r.augment(i,{hasClass:function(t){var e=this.get("class");return!(!e||e.indexOf(t)===-1)}}),t.exports=i},function(t,e,n){"use strict";function r(t,e,n){return n?t.getShape(n):t.getShape(e)}var i=n(1),a={},o={defaultShapeType:null,getShape:function(t){var e=this,n=e[t]||e[e.defaultShapeType]||a.ShapeBase;return n},draw:function(t,e,n){var r=this.getShape(t),a=r.style(e);a&&(i.isObject(e.style)?e.style=i.mix({},a,e.style):e.style=a);var o=r.draw(e,n);return r.afterDraw(e,n,o),o}},s={afterDraw:function(){},draw:function(){},style:function(){}};a.registGeom=function(t,e){var n=i.ucfirst(t),r=i.mix({},o,e);return a[n]=r,r.className=n,r},a.registNode=function(t,e,n){var o=a.Node,s=r(o,t,n),u=i.mix({},s,e);return o[t]=u,u},a.registEdge=function(t,e,n){var o=a.Edge,s=r(o,t,n),u=i.mix({},s,e);return o[t]=u,u},a.getShape=function(t){var e=this;return t=i.ucfirst(t),e[t]||a.ShapeBase},a.GeomShape=o,a.ShapeBase=s,t.exports=a},function(t,e,n){"use strict";var r=n(1),i={};r.mix(i,{traverseTree:function(t,e){var n=t.get("children");r.each(n,function(n){e(n,t),n.get("children")&&r.traverseTree(n,e)})},isNode:function(t){return t&&r.isObject(t)&&"node"===t.get("type")},isEdge:function(t){return t&&r.isObject(t)&&"edge"===t.get("type")},objectToValues:function(t){var e=[],n=void 0;for(n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},frameDraw:function(t){function e(){t.animateHandler=r.requestAnimationFrame(function(){try{t.callback()}catch(t){console.warn(t)}t.animateHandler=void 0})}void 0===t.animateHandler&&e()},drawLabel:function(t,e,n){return t.addShape("text",{attrs:e,class:"label",zIndex:n,freezePoint:{x:e.x,y:e.y}})},getNineBoxPosition:function(t,e,n,r,i){var a={};switch(t){case"tl":a.y=i[0],a.x=i[3];break;case"lc":a.y=(e.height-r)/2,a.x=i[3];break;case"bl":a.y=e.height-r-i[2],a.x=i[3];break;case"cc":a.y=(e.height-r)/2,a.x=(e.width-n)/2;break;case"tc":a.y=i[0],a.x=(e.width-n)/2;break;case"tr":a.y=i[0],a.x=e.width-n-i[1];break;case"rc":a.y=(e.height-r)/2,a.x=e.width-n-i[1];break;case"br":a.y=e.height-r-i[2],a.x=e.width-n-i[1];break;case"bc":a.y=e.height-r-i[2],a.x=(e.width-n)/2;break;default:a.y=e.minX+i[0],a.x=e.minY+i[3]}return a.x+=e.x,a.y+=e.y,a}}),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(8),a=n(2),o=a.Vector2,s=a.Vector3,u=2,c=.001;r.mix(i,{getpointInRectQuadrant:function(t,e){var n=new o(t.maxX-t.minX,t.minY-t.maxY),r=new o(t.maxX-t.minX,t.maxY-t.minY),a=new o(t.minX-t.maxX,t.maxY-t.minY),s=new o(t.minX-t.maxX,t.minY-t.maxY),u=new o(e.x-(t.minX+t.maxX)/2,e.y-(t.minY+t.maxY)/2);return i.getVectorAngle(u,r)<i.getVectorAngle(a,r)?2:i.getVectorAngle(u,n)<i.getVectorAngle(r,n)?1:i.getVectorAngle(u,s)<i.getVectorAngle(n,s)?0:i.getVectorAngle(u,a)<i.getVectorAngle(s,a)?3:void 0},getVectorAngle:function(t,e){var n=t.angleTo(e,!0);return n},isBetween:function(t,e,n){return t>=e&&t<=n},applyPoints:function(t,e,n){var a=[];return r.each(t,function(t){a.push(i.applyPoint(t,e,n))}),a},applyPoint:function(t,e,n){var r=new s(t.x,t.y,1);return e.apply(r,n),t.x=r.x,t.y=r.y,t},getBBox:function(t,e){e=e?e:t;var n=t.getBBox(),r=i.applyPoint({x:n.minX,y:n.minY},t,e),a=i.applyPoint({x:n.maxX,y:n.maxY},t,e),o=i.applyPoint({x:n.maxX,y:n.minY},t,e),s=i.applyPoint({x:n.minX,y:n.maxY},t,e),u=Math.min(r.x,a.x,o.x,s.x),c=Math.min(r.y,a.y,o.y,s.y),h=Math.max(r.x,a.x,o.x,s.x),l=Math.max(r.y,a.y,o.y,s.y),f={minX:u,minY:c,x:u,y:c,maxX:h,maxY:l,centerX:(h+u)/2,centerY:(l+c)/2,width:h-u,height:l-c};return f},radixSort:function(t,e){var n=10,r=1,i=[],a=1,o=void 0,s=void 0,u=void 0,c=void 0,h=void 0,l=void 0,f=void 0;for(u=0;u<t.length;u++)o=e(t[u]),o=parseInt(o,10),s=o.toString().length,o.toString().length>a&&(a=s);for(u=0;u<a;u++,r*=10,n*=10){for(c=0;c<t.length;c++)h=e(t[c]),h=parseInt(h%n/r,10),void 0===i[h]&&(i[h]=[]),i[h].push(t[c]);for(l=0,c=0;c<i.length;c++)if(f=void 0,void 0!==i[c])for(f=i[c].shift();void 0!==f;)t[l++]=f,f=i[c].shift()}return t},scaleMatrix:function(t,e,n){e&&n.translate(-e.x,-e.y),n.scale(t,t),e&&n.translate(e.x,e.y)},invertPoint:function(t,e,n){return e=e.getInverse(),i.converPoint(t,e,n)},converPoint:function(t,e,n){void 0===n&&(n=1);var r=new s(t.x,t.y,n);return r.applyMatrix(e),{x:r.x,y:r.y}},getCircleIntersect:function(t,e,n,r,i){var a=Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2));if(a<i)return null;var o=t-n,s=e-r,u=Math.sign(o),c=Math.sign(s),h=Math.atan(s/o);return{x:n+Math.abs(i*Math.cos(h))*u,y:r+Math.abs(i*Math.sin(h))*c}},getRectIntersect:function(t,e){var n=t.x,r=t.y,a=t.width,o=t.height,s=n+a/2,u=r+o/2,c=[],h={x:s,y:u};c.push({x:n,y:r}),c.push({x:n+a,y:r}),c.push({x:n+a,y:r+o}),c.push({x:n,y:r+o}),c.push({x:n,y:r});for(var l=null,f=1;f<c.length&&!(l=i.getLineIntersect(c[f-1],c[f],h,e));f++);return l},getLineIntersect:function(t,e,n,r){var a=i.vector(t,n),o=i.vector(t,e),s=i.vector(n,r),u=o.x*s.y-o.y*s.x,h=u*u,l=o.x*o.x+o.y*o.y,f=s.x*s.x+s.y*s.y,d=null;if(h>c*l*f){var g=(a.x*s.y-a.y*s.x)/u,p=(a.x*o.y-a.y*o.x)/u;i.isBetween(g,0,1)&&i.isBetween(p,0,1)&&(d={x:t.x+g*o.x,y:t.y+g*o.y})}return d},getSnapPoint:function(t,e){for(var n=i.distance(t[0],e,!1),r=t[0],a=1;a<t.length;a++){var o=t[a],s=i.distance(o,e,!1);s<n&&(r=o,n=s)}return r},distance:function(t,e,n){var r=(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y);return n===!1?r:Math.sqrt(r)},isInRect:function(t,e,n,r,i){return t.x<r&&t.x>e&&t.y<i&&t.y>n},isInSegment:function(t,e,n){if(!t||!e||!n)return!1;var r=i.segmentDistance(t,e,n);return r!==1/0&&r<u},segmentDistance:function(t,e,n){var r=i.vector(t,n),a=i.vector(e,n),o=i.vector(t,e),s=r.angle(o),u=a.angle(o);if(s=s-Math.PI/2>0?1:0,u=u-Math.PI/2>0?1:0,s===u)return 1/0;var c=o.angle(r),h=o.length();return Math.abs(h*Math.sin(c))},vector:function(t,e){return new o(e.x-t.x,e.y-t.y)},guid:function(){return"xxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"===t?e:3&e|8;return n.toString(16)})}}),t.exports=i},function(t,e,n){"use strict";var r=n(224),i=n(233),a=n(95),o=n(94),s=r[0];t.exports=function(t,e,n){var u=e.direction||s;if(e.isHorizontal=i(u),u&&r.indexOf(u)===-1)throw new TypeError("Invalid direction: "+u);if(u===r[0])n(t,e),a(t,"L","R",e);else if(u===r[1])n(t,e),t.right2left(),a(t,"R","L",e);else if(u===r[2])n(t,e),a(t,"T","B",e);else if(u===r[3])n(t,e),t.bottom2top(),a(t,"B","T",e);else if(u===r[4]||u===r[5]){var c=o(t,e),h=c.left,l=c.right;n(h,e),n(l,e),e.isHorizontal?(a(h,"R","L",e),a(l,"L","R",e)):(a(h,"B","T",e),a(l,"T","B",e)),e.isHorizontal?h.right2left():h.bottom2top(),l.translate(h.x-l.x,h.y-l.y),t.x=h.x,t.y=l.y,a(t,"C","C",e,!0);var f=t.getBoundingBox();e.isHorizontal?f.top<0&&t.translate(0,-f.top):f.left<0&&t.translate(-f.left,0)}return t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),t.eachNode(function(t){var e=t.data;e.x=t.x+t.width/2+t.hgap,e.y=t.y+t.height/2+t.vgap,e.align=t.align,e.inAnchor=t.inAnchor?[t.inAnchor.x,t.inAnchor.y]:null,e.outAnchor=t.outAnchor?[t.outAnchor.x,t.outAnchor.y]:null}),t}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(226),o=2*a,s=a,u={getId:function(t){return t.id||t.name},getHGap:function(t){return t.hgap||s},getVGap:function(t){return t.vgap||s},getChildren:function(t){return t.children},getHeight:function(t){return t.height||o},getWidth:function(t){var e=t.name||" ";return t.width||e.split("").length*a}},c=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2];r(this,t);var a=this;if(a.vgap=a.hgap=0,e instanceof t)return e;a.data=e;var o=(n.getHGap||u.getHGap)(e),s=(n.getVGap||u.getVGap)(e);if(a.width=(n.getWidth||u.getWidth)(e),a.height=(n.getHeight||u.getHeight)(e),a.id=(n.getId||u.getId)(e),a.x=a.y=0,a.inAnchor={x:0,y:.5},a.outAnchor={x:1,y:.5},a.depth=0,!i&&!e.isCollapsed)for(var c=[a],h=c.pop();h;){if(!h.data.isCollapsed){var l=(n.getChildren||u.getChildren)(h.data),f=l?l.length:0;if(h.children=[],l&&f)for(var d=0;d<f;d++){var g=new t(l[d],n);h.children.push(g),c.push(g),g.parent=h,g.depth=h.depth+1}}h=c.pop()}a.children||(a.children=[]),a.addGap(o,s)}return i(t,[{key:"isRoot",value:function(){return 0===this.depth}},{key:"isLeaf",value:function(){return 0===this.children.length}},{key:"addGap",value:function(t,e){var n=this;n.hgap+=t,n.vgap+=e,n.width+=2*t,n.height+=2*e}},{key:"eachNode",value:function(t){for(var e=this,n=[e],r=n.pop();r;)t(r),n=n.concat(r.children),r=n.pop()}},{key:"DFTraverse",value:function(t){this.eachNode(t)}},{key:"BFTraverse",value:function(t){for(var e=this,n=[e],r=n.shift();r;)t(r),n=n.concat(r.children),r=n.shift()}},{key:"getBoundingBox",value:function(){var t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(e){t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)}),t}},{key:"translate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.eachNode(function(n){n.x+=t,n.y+=e})}},{key:"right2left",value:function(){var t=this,e=t.getBoundingBox();t.eachNode(function(t){t.x=t.x-2*(t.x-e.left)-t.width}),t.translate(e.width,0)}},{key:"bottom2top",value:function(){var t=this,e=t.getBoundingBox();t.eachNode(function(t){t.y=t.y-2*(t.y-e.top)-t.height}),t.translate(0,e.height)}},{key:"getCenterX",value:function(){var t=this;return t.x+t.width/2}},{key:"getCenterY",value:function(){var t=this;return t.y+t.height/2}},{key:"getActualWidth",value:function(){var t=this;return t.width-2*t.hgap}},{key:"getActualHeight",value:function(){var t=this;return t.height-2*t.vgap}},{key:"getAnchorPoint",value:function(t){var e=this,n=e.getActualWidth(),r=e.getActualHeight();return{x:e.x+e.hgap+n*t.x,y:e.y+e.vgap+r*t.y}}}]),t}();t.exports=c},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(){}function n(t,n){var r=new e;if(t instanceof e)t.each(function(t,e){r.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==n)for(;++a<o;)r.set(a,t[a]);else for(;++a<o;)r.set(n(i=t[a],a,t),i)}else if(t)for(var s in t)r.set(s,t[s]);return r}function r(){return{}}function i(t,e,n){t[e]=n}function a(){return n()}function o(t,e,n){t.set(e,n)}function s(){}function u(t,e){var n=new s;if(t instanceof s)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}var c="$";e.prototype=n.prototype={constructor:e,has:function(t){return c+t in this},get:function(t){return this[c+t]},set:function(t,e){return this[c+t]=e,this},remove:function(t){var e=c+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===c&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===c&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===c&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===c&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===c&&++t;return t},empty:function(){for(var t in this)if(t[0]===c)return!1;return!0},each:function(t){for(var e in this)e[0]===c&&t(this[e],e.slice(1),this)}};var h=function(){function t(e,r,i,a){if(r>=h.length)return null!=s&&e.sort(s),null!=u?u(e):e;for(var o,c,l,f=-1,d=e.length,g=h[r++],p=n(),v=i();++f<d;)(l=p.get(o=g(c=e[f])+""))?l.push(c):p.set(o,[c]);return p.each(function(e,n){a(v,n,t(e,r,i,a))}),v}function e(t,n){if(++n>h.length)return t;var r,i=l[n-1];return null!=u&&n>=h.length?r=t.entries():(r=[],t.each(function(t,i){r.push({key:i,values:e(t,n)})})),null!=i?r.sort(function(t,e){return i(t.key,e.key)}):r}var s,u,c,h=[],l=[];return c={object:function(e){return t(e,0,r,i)},map:function(e){return t(e,0,a,o)},entries:function(n){return e(t(n,0,a,o),0)},key:function(t){return h.push(t),c},sortKeys:function(t){return l[h.length-1]=t,c},sortValues:function(t){return s=t,c},rollup:function(t){return u=t,c}}},l=n.prototype;s.prototype=u.prototype={constructor:s,has:l.has,add:function(t){return t+="",this[c+t]=t,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};var f=function(t){var e=[];for(var n in t)e.push(n);return e},d=function(t){var e=[];for(var n in t)e.push(t[n]);return e},g=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e};t.nest=h,t.set=u,t.map=n,t.keys=f,t.values=d,t.entries=g,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function n(){}function r(t){var e;return t=(t+"").trim().toLowerCase(),(e=B.exec(t))?(e=parseInt(e[1],16),new u(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=F.exec(t))?i(parseInt(e[1],16)):(e=O.exec(t))?new u(e[1],e[2],e[3],1):(e=L.exec(t))?new u(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=D.exec(t))?a(e[1],e[2],e[3],e[4]):(e=R.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=z.exec(t))?c(e[1],e[2]/100,e[3]/100,1):(e=G.exec(t))?c(e[1],e[2]/100,e[3]/100,e[4]):j.hasOwnProperty(t)?i(j[t]):"transparent"===t?new u(NaN,NaN,NaN,0):null}function i(t){return new u(t>>16&255,t>>8&255,255&t,1)}function a(t,e,n,r){return r<=0&&(t=e=n=NaN),new u(t,e,n,r)}function o(t){return t instanceof n||(t=r(t)),t?(t=t.rgb(),new u(t.r,t.g,t.b,t.opacity)):new u}function s(t,e,n,r){return 1===arguments.length?o(t):new u(t,e,n,null==r?1:r)}function u(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function c(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new f(t,e,n,r)}function h(t){if(t instanceof f)return new f(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=r(t)),!t)return new f;if(t instanceof f)return t;t=t.rgb();var e=t.r/255,i=t.g/255,a=t.b/255,o=Math.min(e,i,a),s=Math.max(e,i,a),u=NaN,c=s-o,h=(s+o)/2;return c?(u=e===s?(i-a)/c+6*(i<a):i===s?(a-e)/c+2:(e-i)/c+4,c/=h<.5?s+o:2-s-o,u*=60):c=h>0&&h<1?0:u,new f(u,c,h,t.opacity)}function l(t,e,n,r){return 1===arguments.length?h(t):new f(t,e,n,null==r?1:r)}function f(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function d(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function g(t){if(t instanceof v)return new v(t.l,t.a,t.b,t.opacity);if(t instanceof M){var e=t.h*U;return new v(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof u||(t=o(t));var n=b(t.r),r=b(t.g),i=b(t.b),a=m((.4124564*n+.3575761*r+.1804375*i)/H),s=m((.2126729*n+.7151522*r+.072175*i)/W),c=m((.0193339*n+.119192*r+.9503041*i)/q);return new v(116*s-16,500*(a-s),200*(s-c),t.opacity)}function p(t,e,n,r){return 1===arguments.length?g(t):new v(t,e,n,null==r?1:r)}function v(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function m(t){return t>Q?Math.pow(t,1/3):t/$+V}function y(t){return t>Z?t*t*t:$*(t-V)}function x(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function b(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _(t){if(t instanceof M)return new M(t.h,t.c,t.l,t.opacity);t instanceof v||(t=g(t));var e=Math.atan2(t.b,t.a)*Y;return new M(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w(t,e,n,r){return 1===arguments.length?_(t):new M(t,e,n,null==r?1:r)}function M(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function S(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);t instanceof u||(t=o(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(at*r+rt*e-it*n)/(at+rt-it),a=r-i,s=(nt*(n-i)-tt*a)/et,c=Math.sqrt(s*s+a*a)/(nt*i*(1-i)),h=c?Math.atan2(s,a)*Y-120:NaN;return new A(h<0?h+360:h,c,i,t.opacity)}function k(t,e,n,r){return 1===arguments.length?S(t):new A(t,e,n,null==r?1:r)}function A(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}var C=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},T=.7,E=1/T,P="\\s*([+-]?\\d+)\\s*",I="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",N="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B=/^#([0-9a-f]{3})$/,F=/^#([0-9a-f]{6})$/,O=new RegExp("^rgb\\("+[P,P,P]+"\\)$"),L=new RegExp("^rgb\\("+[N,N,N]+"\\)$"),D=new RegExp("^rgba\\("+[P,P,P,I]+"\\)$"),R=new RegExp("^rgba\\("+[N,N,N,I]+"\\)$"),z=new RegExp("^hsl\\("+[I,N,N]+"\\)$"),G=new RegExp("^hsla\\("+[I,N,N,I]+"\\)$"),j={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};C(n,r,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),C(u,s,e(n,{brighter:function(t){return t=null==t?E:Math.pow(E,t),new u(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?T:Math.pow(T,t),new u(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(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+")")}})),C(f,l,e(n,{brighter:function(t){return t=null==t?E:Math.pow(E,t),new f(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?T:Math.pow(T,t),new f(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 u(d(t>=240?t-240:t+120,i,r),d(t,i,r),d(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}}));var U=Math.PI/180,Y=180/Math.PI,X=18,H=.95047,W=1,q=1.08883,V=4/29,Z=6/29,$=3*Z*Z,Q=Z*Z*Z;C(v,p,e(n,{brighter:function(t){return new v(this.l+X*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new v(this.l-X*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=W*y(t),e=H*y(e),n=q*y(n),new u(x(3.2404542*e-1.5371385*t-.4985314*n),x(-.969266*e+1.8760108*t+.041556*n),x(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),C(M,w,e(n,{brighter:function(t){return new M(this.h,this.c,this.l+X*(null==t?1:t),this.opacity)},darker:function(t){return new M(this.h,this.c,this.l-X*(null==t?1:t),this.opacity)},rgb:function(){return g(this).rgb()}}));var K=-.14861,J=1.78277,tt=-.29227,et=-.90649,nt=1.97294,rt=nt*et,it=nt*J,at=J*tt-et*K;C(A,k,e(n,{brighter:function(t){return t=null==t?E:Math.pow(E,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?T:Math.pow(T,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*U,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new u(255*(e+n*(K*r+J*i)),255*(e+n*(tt*r+et*i)),255*(e+n*(nt*r)),this.opacity)}})),t.color=r,t.rgb=s,t.hsl=l,t.lab=p,t.hcl=w,t.cubehelix=k,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,r){r(e,n(98),n(44),n(100),n(99),n(47),n(101),n(45))}(this,function(t,e,n,r,i,a,o,s){"use strict";function u(t){function e(e){var n=e+"",o=r.get(n);if(!o){if(a!==Y)return a;r.set(n,o=i.push(e))}return t[(o-1)%t.length]}var r=n.map(),i=[],a=Y;return t=null==t?[]:U.call(t),e.domain=function(t){if(!arguments.length)return i.slice();i=[],r=n.map();for(var a,o,s=-1,u=t.length;++s<u;)r.has(o=(a=t[s])+"")||r.set(o,i.push(a));return e},e.range=function(n){return arguments.length?(t=U.call(n),e):t.slice()},e.unknown=function(t){return arguments.length?(a=t,e):a},e.copy=function(){return u().domain(i).range(t).unknown(a)},e}function c(){function t(){var t=a().length,i=s[1]<s[0],u=s[i-0],c=s[1-i];n=(c-u)/Math.max(1,t-l+2*f),h&&(n=Math.floor(n)),u+=(c-u-n*(t-l))*d,r=n*(1-l),h&&(u=Math.round(u),r=Math.round(r));var g=e.range(t).map(function(t){return u+n*t});return o(i?g.reverse():g)}var n,r,i=u().unknown(void 0),a=i.domain,o=i.range,s=[0,1],h=!1,l=0,f=0,d=.5;return delete i.unknown,i.domain=function(e){return arguments.length?(a(e),t()):a()},i.range=function(e){return arguments.length?(s=[+e[0],+e[1]],t()):s.slice()},i.rangeRound=function(e){return s=[+e[0],+e[1]],h=!0,t()},i.bandwidth=function(){return r},i.step=function(){return n},i.round=function(e){return arguments.length?(h=!!e,t()):h},i.padding=function(e){return arguments.length?(l=f=Math.max(0,Math.min(1,e)),t()):l},i.paddingInner=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),t()):l},i.paddingOuter=function(e){return arguments.length?(f=Math.max(0,Math.min(1,e)),t()):f},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),t()):d},i.copy=function(){return c().domain(a()).range(s).round(h).paddingInner(l).paddingOuter(f).align(d)},t()}function h(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return h(e())},t}function l(){return h(c().paddingInner(1))}function f(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:X(e)}function d(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}function g(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}function p(t,e,n,r){var i=t[0],a=t[1],o=e[0],s=e[1];return a<i?(i=n(a,i),o=r(s,o)):(i=n(i,a),o=r(o,s)),function(t){return o(i(t))}}function v(t,n,r,i){var a=Math.min(t.length,n.length)-1,o=new Array(a),s=new Array(a),u=-1;for(t[a]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<a;)o[u]=r(t[u],t[u+1]),s[u]=i(n[u],n[u+1]);return function(n){var r=e.bisect(t,n,1,a)-1;return s[r](o[r](n))}}function m(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function y(t,e){function n(){return a=Math.min(u.length,c.length)>2?v:p,o=s=null,i}function i(e){return(o||(o=a(u,c,l?d(t):t,h)))(+e)}var a,o,s,u=W,c=W,h=r.interpolate,l=!1;return i.invert=function(t){return(s||(s=a(c,u,f,l?g(e):e)))(+t)},i.domain=function(t){return arguments.length?(u=j.call(t,H),n()):u.slice()},i.range=function(t){return arguments.length?(c=U.call(t),n()):c.slice()},i.rangeRound=function(t){return c=U.call(t),h=r.interpolateRound,n()},i.clamp=function(t){return arguments.length?(l=!!t,n()):l},i.interpolate=function(t){return arguments.length?(h=t,n()):h},n()}function x(t){var n=t.domain;return t.ticks=function(t){var r=n();return e.ticks(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,e){return q(n(),t,e)},t.nice=function(r){null==r&&(r=10);var i,a=n(),o=0,s=a.length-1,u=a[o],c=a[s];return c<u&&(i=u,u=c,c=i,i=o,o=s,s=i),i=e.tickIncrement(u,c,r),i>0?(u=Math.floor(u/i)*i,c=Math.ceil(c/i)*i,i=e.tickIncrement(u,c,r)):i<0&&(u=Math.ceil(u*i)/i,c=Math.floor(c*i)/i,i=e.tickIncrement(u,c,r)),i>0?(a[o]=Math.floor(u/i)*i,a[s]=Math.ceil(c/i)*i,n(a)):i<0&&(a[o]=Math.ceil(u*i)/i,a[s]=Math.floor(c*i)/i,n(a)),t},t}function b(){var t=y(f,r.interpolateNumber);return t.copy=function(){return m(t,b())},x(t)}function _(){function t(t){return+t}var e=[0,1];return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=j.call(n,H),t):e.slice()},t.copy=function(){return _().domain(e)},x(t)}function w(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:X(e)}function M(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function S(t){return isFinite(t)?+("1e"+t):t<0?0:t}function k(t){return 10===t?S:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function A(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function C(t){return function(e){return-t(-e)}}function T(){function t(){return o=A(a),s=k(a),r()[0]<0&&(o=C(o),s=C(s)),n}var n=y(w,M).domain([1,10]),r=n.domain,a=10,o=A(10),s=k(10);return n.base=function(e){return arguments.length?(a=+e,t()):a},n.domain=function(e){return arguments.length?(r(e),t()):r()},n.ticks=function(t){var n,i=r(),u=i[0],c=i[i.length-1];(n=c<u)&&(d=u,u=c,c=d);var h,l,f,d=o(u),g=o(c),p=null==t?10:+t,v=[];if(!(a%1)&&g-d<p){if(d=Math.round(d)-1,g=Math.round(g)+1,u>0){for(;d<g;++d)for(l=1,h=s(d);l<a;++l)if(f=h*l,!(f<u)){if(f>c)break;v.push(f)}}else for(;d<g;++d)for(l=a-1,h=s(d);l>=1;--l)if(f=h*l,!(f<u)){if(f>c)break;v.push(f)}}else v=e.ticks(d,g,Math.min(g-d,p)).map(s);return n?v.reverse():v},n.tickFormat=function(t,e){if(null==e&&(e=10===a?".0e":","),
3"function"!=typeof e&&(e=i.format(e)),t===1/0)return e;null==t&&(t=10);var r=Math.max(1,a*t/n.ticks().length);return function(t){var n=t/s(Math.round(o(t)));return n*a<a-.5&&(n*=a),n<=r?e(t):""}},n.nice=function(){return r(V(r(),{floor:function(t){return s(Math.floor(o(t)))},ceil:function(t){return s(Math.ceil(o(t)))}}))},n.copy=function(){return m(n,T().base(a))},n}function E(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function P(){function t(t,e){return(e=E(e,n)-(t=E(t,n)))?function(r){return(E(r,n)-t)/e}:X(e)}function e(t,e){return e=E(e,n)-(t=E(t,n)),function(r){return E(t+e*r,1/n)}}var n=1,r=y(t,e),i=r.domain;return r.exponent=function(t){return arguments.length?(n=+t,i(i())):n},r.copy=function(){return m(r,P().exponent(n))},x(r)}function I(){return P().exponent(.5)}function N(){function t(){var t=0,o=Math.max(1,i.length);for(a=new Array(o-1);++t<o;)a[t-1]=e.quantile(r,t/o);return n}function n(t){if(!isNaN(t=+t))return i[e.bisect(a,t)]}var r=[],i=[],a=[];return n.invertExtent=function(t){var e=i.indexOf(t);return e<0?[NaN,NaN]:[e>0?a[e-1]:r[0],e<a.length?a[e]:r[r.length-1]]},n.domain=function(n){if(!arguments.length)return r.slice();r=[];for(var i,a=0,o=n.length;a<o;++a)i=n[a],null==i||isNaN(i=+i)||r.push(i);return r.sort(e.ascending),t()},n.range=function(e){return arguments.length?(i=U.call(e),t()):i.slice()},n.quantiles=function(){return a.slice()},n.copy=function(){return N().domain(r).range(i)},n}function B(){function t(t){if(t<=t)return s[e.bisect(o,t,0,a)]}function n(){var e=-1;for(o=new Array(a);++e<a;)o[e]=((e+1)*i-(e-a)*r)/(a+1);return t}var r=0,i=1,a=1,o=[.5],s=[0,1];return t.domain=function(t){return arguments.length?(r=+t[0],i=+t[1],n()):[r,i]},t.range=function(t){return arguments.length?(a=(s=U.call(t)).length-1,n()):s.slice()},t.invertExtent=function(t){var e=s.indexOf(t);return e<0?[NaN,NaN]:e<1?[r,o[0]]:e>=a?[o[a-1],i]:[o[e-1],o[e]]},t.copy=function(){return B().domain([r,i]).range(s)},x(t)}function F(){function t(t){if(t<=t)return r[e.bisect(n,t,0,i)]}var n=[.5],r=[0,1],i=1;return t.domain=function(e){return arguments.length?(n=U.call(e),i=Math.min(n.length,r.length-1),t):n.slice()},t.range=function(e){return arguments.length?(r=U.call(e),i=Math.min(n.length,r.length-1),t):r.slice()},t.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},t.copy=function(){return F().domain(n).range(r)},t}function O(t){return new Date(t)}function L(t){return t instanceof Date?+t:+new Date(+t)}function D(t,n,i,a,o,s,u,c,h){function l(e){return(u(e)<e?x:s(e)<e?b:o(e)<e?_:a(e)<e?w:n(e)<e?i(e)<e?M:S:t(e)<e?k:A)(e)}function d(n,r,i,a){if(null==n&&(n=10),"number"==typeof n){var o=Math.abs(i-r)/n,s=e.bisector(function(t){return t[2]}).right(C,o);s===C.length?(a=e.tickStep(r/et,i/et,n),n=t):s?(s=C[o/C[s-1][2]<C[s][2]/o?s-1:s],a=s[1],n=s[0]):(a=Math.max(e.tickStep(r,i,n),1),n=c)}return null==a?n:n.every(a)}var g=y(f,r.interpolateNumber),p=g.invert,v=g.domain,x=h(".%L"),b=h(":%S"),_=h("%I:%M"),w=h("%I %p"),M=h("%a %d"),S=h("%b %d"),k=h("%B"),A=h("%Y"),C=[[u,1,Z],[u,5,5*Z],[u,15,15*Z],[u,30,30*Z],[s,1,$],[s,5,5*$],[s,15,15*$],[s,30,30*$],[o,1,Q],[o,3,3*Q],[o,6,6*Q],[o,12,12*Q],[a,1,K],[a,2,2*K],[i,1,J],[n,1,tt],[n,3,3*tt],[t,1,et]];return g.invert=function(t){return new Date(p(t))},g.domain=function(t){return arguments.length?v(j.call(t,L)):v().map(O)},g.ticks=function(t,e){var n,r=v(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=d(t,i,a,e),n=n?n.range(i,a+1):[],o?n.reverse():n},g.tickFormat=function(t,e){return null==e?l:h(e)},g.nice=function(t,e){var n=v();return(t=d(t,n[0],n[n.length-1],e))?v(V(n,t)):g},g.copy=function(){return m(g,D(t,n,i,a,o,s,u,c,h))},g}function R(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function z(t){function e(e){var a=(e-n)/(r-n);return t(i?Math.max(0,Math.min(1,a)):a)}var n=0,r=1,i=!1;return e.domain=function(t){return arguments.length?(n=+t[0],r=+t[1],e):[n,r]},e.clamp=function(t){return arguments.length?(i=!!t,e):i},e.interpolator=function(n){return arguments.length?(t=n,e):t},e.copy=function(){return z(t).domain([n,r]).clamp(i)},x(e)}var G=Array.prototype,j=G.map,U=G.slice,Y={name:"implicit"},X=function(t){return function(){return t}},H=function(t){return+t},W=[0,1],q=function(t,n,r){var a,o=t[0],s=t[t.length-1],u=e.tickStep(o,s,null==n?10:n);switch(r=i.formatSpecifier(null==r?",f":r),r.type){case"s":var c=Math.max(Math.abs(o),Math.abs(s));return null!=r.precision||isNaN(a=i.precisionPrefix(u,c))||(r.precision=a),i.formatPrefix(r,c);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=i.precisionRound(u,Math.max(Math.abs(o),Math.abs(s))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=i.precisionFixed(u))||(r.precision=a-2*("%"===r.type))}return i.format(r)},V=function(t,e){t=t.slice();var n,r=0,i=t.length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t},Z=1e3,$=60*Z,Q=60*$,K=24*Q,J=7*K,tt=30*K,et=365*K,nt=function(){return D(a.timeYear,a.timeMonth,a.timeWeek,a.timeDay,a.timeHour,a.timeMinute,a.timeSecond,a.timeMillisecond,o.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},rt=function(){return D(a.utcYear,a.utcMonth,a.utcWeek,a.utcDay,a.utcHour,a.utcMinute,a.utcSecond,a.utcMillisecond,o.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},it=function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})},at=it("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ot=it("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),st=it("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ut=it("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ct=r.interpolateCubehelixLong(s.cubehelix(300,.5,0),s.cubehelix(-240,.5,1)),ht=r.interpolateCubehelixLong(s.cubehelix(-100,.75,.35),s.cubehelix(80,1.5,.8)),lt=r.interpolateCubehelixLong(s.cubehelix(260,.75,.35),s.cubehelix(80,1.5,.8)),ft=s.cubehelix(),dt=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return ft.h=360*t-100,ft.s=1.5-1.5*e,ft.l=.8-.9*e,ft+""},gt=R(it("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pt=R(it("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vt=R(it("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),mt=R(it("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));t.scaleBand=c,t.scalePoint=l,t.scaleIdentity=_,t.scaleLinear=b,t.scaleLog=T,t.scaleOrdinal=u,t.scaleImplicit=Y,t.scalePow=P,t.scaleSqrt=I,t.scaleQuantile=N,t.scaleQuantize=B,t.scaleThreshold=F,t.scaleTime=nt,t.scaleUtc=rt,t.schemeCategory10=at,t.schemeCategory20b=ot,t.schemeCategory20c=st,t.schemeCategory20=ut,t.interpolateCubehelixDefault=ct,t.interpolateRainbow=dt,t.interpolateWarm=ht,t.interpolateCool=lt,t.interpolateViridis=gt,t.interpolateMagma=pt,t.interpolateInferno=vt,t.interpolatePlasma=mt,t.scaleSequential=z,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t,n,r,o){function s(e){return t(e=new Date(+e)),e}return s.floor=s,s.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},s.round=function(t){var e=s(t),n=s.ceil(t);return t-e<n-t?e:n},s.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},s.range=function(e,r,i){var a,o=[];if(e=s.ceil(e),i=null==i?1:Math.floor(i),!(e<r&&i>0))return o;do o.push(a=new Date(+e)),n(e,i),t(e);while(a<e&&e<r);return o},s.filter=function(r){return e(function(e){if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!r(t););else for(;--e>=0;)for(;n(t,1),!r(t););})},r&&(s.count=function(e,n){return i.setTime(+e),a.setTime(+n),t(i),t(a),Math.floor(r(i,a))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t===0}:function(e){return s.count(0,e)%t===0}):s:null}),s}function n(t){return e(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*c)/f})}function r(t){return e(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/f})}var i=new Date,a=new Date,o=e(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});o.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?e(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):o:null};var s=o.range,u=1e3,c=6e4,h=36e5,l=864e5,f=6048e5,d=e(function(t){t.setTime(Math.floor(t/u)*u)},function(t,e){t.setTime(+t+e*u)},function(t,e){return(e-t)/u},function(t){return t.getUTCSeconds()}),g=d.range,p=e(function(t){t.setTime(Math.floor(t/c)*c)},function(t,e){t.setTime(+t+e*c)},function(t,e){return(e-t)/c},function(t){return t.getMinutes()}),v=p.range,m=e(function(t){var e=t.getTimezoneOffset()*c%h;e<0&&(e+=h),t.setTime(Math.floor((+t-e)/h)*h+e)},function(t,e){t.setTime(+t+e*h)},function(t,e){return(e-t)/h},function(t){return t.getHours()}),y=m.range,x=e(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*c)/l},function(t){return t.getDate()-1}),b=x.range,_=n(0),w=n(1),M=n(2),S=n(3),k=n(4),A=n(5),C=n(6),T=_.range,E=w.range,P=M.range,I=S.range,N=k.range,B=A.range,F=C.range,O=e(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),L=O.range,D=e(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});D.every=function(t){return isFinite(t=Math.floor(t))&&t>0?e(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var R=D.range,z=e(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*c)},function(t,e){return(e-t)/c},function(t){return t.getUTCMinutes()}),G=z.range,j=e(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*h)},function(t,e){return(e-t)/h},function(t){return t.getUTCHours()}),U=j.range,Y=e(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/l},function(t){return t.getUTCDate()-1}),X=Y.range,H=r(0),W=r(1),q=r(2),V=r(3),Z=r(4),$=r(5),Q=r(6),K=H.range,J=W.range,tt=q.range,et=V.range,nt=Z.range,rt=$.range,it=Q.range,at=e(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),ot=at.range,st=e(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});st.every=function(t){return isFinite(t=Math.floor(t))&&t>0?e(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var ut=st.range;t.timeInterval=e,t.timeMillisecond=o,t.timeMilliseconds=s,t.utcMillisecond=o,t.utcMilliseconds=s,t.timeSecond=d,t.timeSeconds=g,t.utcSecond=d,t.utcSeconds=g,t.timeMinute=p,t.timeMinutes=v,t.timeHour=m,t.timeHours=y,t.timeDay=x,t.timeDays=b,t.timeWeek=_,t.timeWeeks=T,t.timeSunday=_,t.timeSundays=T,t.timeMonday=w,t.timeMondays=E,t.timeTuesday=M,t.timeTuesdays=P,t.timeWednesday=S,t.timeWednesdays=I,t.timeThursday=k,t.timeThursdays=N,t.timeFriday=A,t.timeFridays=B,t.timeSaturday=C,t.timeSaturdays=F,t.timeMonth=O,t.timeMonths=L,t.timeYear=D,t.timeYears=R,t.utcMinute=z,t.utcMinutes=G,t.utcHour=j,t.utcHours=U,t.utcDay=Y,t.utcDays=X,t.utcWeek=H,t.utcWeeks=K,t.utcSunday=H,t.utcSundays=K,t.utcMonday=W,t.utcMondays=J,t.utcTuesday=q,t.utcTuesdays=tt,t.utcWednesday=V,t.utcWednesdays=et,t.utcThursday=Z,t.utcThursdays=nt,t.utcFriday=$,t.utcFridays=rt,t.utcSaturday=Q,t.utcSaturdays=it,t.utcMonth=at,t.utcMonths=ot,t.utcYear=st,t.utcYears=ut,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){"use strict";function r(t){this._isDirected=!c.has(t,"directed")||t.directed,this._isMultigraph=!!c.has(t,"multigraph")&&t.multigraph,this._isCompound=!!c.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=c.constant(void 0),this._defaultEdgeLabelFn=c.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function i(t,e){t[e]?t[e]++:t[e]=1}function a(t,e){--t[e]||delete t[e]}function o(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}return i+f+a+f+(c.isUndefined(r)?h:r)}function s(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function u(t,e){return o(t,e.v,e.w,e.name)}var c=n(13);t.exports=r;var h="\0",l="\0",f="\x01";r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(t){return this._label=t,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(t){return c.isFunction(t)||(t=c.constant(t)),this._defaultNodeLabelFn=t,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return c.keys(this._nodes)},r.prototype.sources=function(){return c.filter(this.nodes(),function(t){return c.isEmpty(this._in[t])},this)},r.prototype.sinks=function(){return c.filter(this.nodes(),function(t){return c.isEmpty(this._out[t])},this)},r.prototype.setNodes=function(t,e){var n=arguments;return c.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},r.prototype.setNode=function(t,e){return c.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},r.prototype.node=function(t){return this._nodes[t]},r.prototype.hasNode=function(t){return c.has(this._nodes,t)},r.prototype.removeNode=function(t){var e=this;if(c.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],c.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),c.each(c.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],c.each(c.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},r.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(c.isUndefined(e))e=l;else{e+="";for(var n=e;!c.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},r.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},r.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},r.prototype.children=function(t){if(c.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return c.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},r.prototype.predecessors=function(t){var e=this._preds[t];if(e)return c.keys(e)},r.prototype.successors=function(t){var e=this._sucs[t];if(e)return c.keys(e)},r.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return c.union(e,this.successors(t))},r.prototype.filterNodes=function(t){function e(t){var a=r.parent(t);return void 0===a||n.hasNode(a)?(i[t]=a,a):a in i?i[a]:e(a)}var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph()),c.each(this._nodes,function(e,r){t(r)&&n.setNode(r,e)},this),c.each(this._edgeObjs,function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,this.edge(t))},this);var r=this,i={};return this._isCompound&&c.each(n.nodes(),function(t){n.setParent(t,e(t))}),n},r.prototype.setDefaultEdgeLabel=function(t){return c.isFunction(t)||(t=c.constant(t)),this._defaultEdgeLabelFn=t,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return c.values(this._edgeObjs)},r.prototype.setPath=function(t,e){var n=this,r=arguments;return c.reduce(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this},r.prototype.setEdge=function(){var t,e,n,r,a=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,e=u.w,n=u.name,2===arguments.length&&(r=arguments[1],a=!0)):(t=u,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],a=!0)),t=""+t,e=""+e,c.isUndefined(n)||(n=""+n);var h=o(this._isDirected,t,e,n);if(c.has(this._edgeLabels,h))return a&&(this._edgeLabels[h]=r),this;if(!c.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[h]=a?r:this._defaultEdgeLabelFn(t,e,n);var l=s(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[h]=l,i(this._preds[e],t),i(this._sucs[t],e),this._in[e][h]=l,this._out[t][h]=l,this._edgeCount++,this},r.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):o(this._isDirected,t,e,n);return this._edgeLabels[r]},r.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):o(this._isDirected,t,e,n);return c.has(this._edgeLabels,r)},r.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):o(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],a(this._preds[e],t),a(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},r.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=c.values(n);return e?c.filter(r,function(t){return t.v===e}):r}},r.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=c.values(n);return e?c.filter(r,function(t){return t.w===e}):r}},r.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e){"use strict";function n(){var t=document.createElement("i");return t.title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),t}var r=/rgb\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i={},a=null;t.exports={toRGB:function(t){a||(a=n());var e;if(i[t])e=i[t];else{a.style.color=t,e=document.defaultView.getComputedStyle(a,"").getPropertyValue("color");var o=r.exec(e);o.shift(),e=this.arr2rgb(o),i[t]=e}return e},toHex:function(t){return t=Math.round(t),t=t.toString(16),1===t.length&&(t="0"+t),t},hsl2Rgb:function(t){var e=t[0],n=t[1],r=t[2],i={};if(0===n)i.r=i.g=i.b=r;else{var a=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t},o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;i.r=a(s,o,e+1/3),i.g=a(s,o,e),i.b=a(s,o,e-1/3)}return i.r=Math.min(Math.round(255*i.r),255),i.g=Math.min(Math.round(255*i.g),255),i.b=Math.min(Math.round(255*i.b),255),"#"+this.toHex(i.r)+this.toHex(i.g)+this.toHex(i.b)},rgb2hsl:function(t){var e,n,r,i=this.rgb2arr(t),a=i[0]/255,o=i[1]/255,s=i[2]/255,u=Math.min(a,o,s),c=Math.max(a,o,s),h=c-u;return c===u?e=0:a===c?e=(o-s)/h:o===c?e=2+(s-a)/h:s===c&&(e=4+(a-o)/h),e=Math.min(60*e,360),e<0&&(e+=360),r=(u+c)/2,n=c===u?0:r<=.5?h/(c+u):h/(2-c-u),[e/360,n,r]},arr2rgb:function(t){return"#"+this.toHex(t[0])+this.toHex(t[1])+this.toHex(t[2])},rgb2arr:function(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}}},function(t,e,n){"use strict";function r(t){r.superclass.constructor.call(this,t)}var i=n(22),a=n(1),o="x-chart-axis",s=n(2),u=s.Vector2,c=n(8);r.CFG={zIndex:4,x:null,y:null,elCls:o,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",value:5},isVertical:!1,start:null,end:null},a.extend(r,i),a.augment(r,{_getAvgLabelLength:function(t){var e=t.get("children");return e[1].attr("x")-e[0].attr("x")},getSideVector:function(t){var e=this,n=e.get("factor"),r=e.get("isVertical"),i=e.get("start"),a=e.get("end"),o=e.getAxisVector(),s=o.normalize(),u=!1;(r&&i.y<a.y||!r&&i.x>a.x)&&(u=!0);var c=s.vertical(u);return c.multiplyScaler(t*n)},getAxisVector:function(){var t=this.get("start"),e=this.get("end");return new u(e.x-t.x,e.y-t.y)},getLinePath:function(){var t=this,e=t.get("start"),n=t.get("end"),r=[];return r.push(["M",e.x,e.y]),r.push(["L",n.x,n.y]),r},getTickEnd:function(t,e){var n,r=this,i=r.get("tickLine");return e=e?e:i.value,n=r.getSideVector(e),{x:t.x+n.x,y:t.y+n.y}},getTickPoint:function(t){var e=this,n=e.get("start"),r=e.get("end"),i=r.x-n.x,a=r.y-n.y;return{x:n.x+i*t,y:n.y+a*t}},renderTitle:function(){var t=this,e=t.get("title"),n=t.getTickPoint(.5),r=t.get("titleOffset"),i=t.get("labelsGroup");if(i){var s=t.getMaxLabelWidth(i),h=t.get("labelOffset")||10;s+h+20<r&&(r=s+h+20)}var l=a.mix({},e);if(e.text){var f=t.getSideVector(r),d={x:n.x+f.x,y:n.y+f.y},g=t.getAxisVector(),p=0;if(!c.equal(g.y,0)){var v=new u(1,0),m=new u(g.x,g.y);p=m.angleTo(v,!0)}l.rotate=p*(180/Math.PI),l.x=d.x,l.y=d.y,t.addShape("Text",{elCls:o+"-title",attrs:l})}},autoRotateLabels:function(){var t=this,e=t.get("labelsGroup"),n=t.get("title");if(e){var r,i,o=t.get("labelOffset")||10,s=o,u=t.get("titleOffset"),h=t.getAxisVector();if(c.equal(h.x,0)&&n&&n.text)i=t.getMaxLabelWidth(e),i+o>u-s&&(r=Math.acos((u-s)/(i+o))*-1);else if(c.equal(h.y,0)&&e.getCount()>1){var l=Math.abs(t._getAvgLabelLength(e));i=t.getMaxLabelWidth(e),i>l&&(r=Math.atan2(1.5*o,l))}if(r){var f=t.get("factor");a.each(e.get("children"),function(t){t.rotateAtStart(r),c.equal(h.y,0)&&(f>0?t.attr("textAlign","left"):t.attr("textAlign","right"))})}}}}),t.exports=r},function(t,e,n){var r=n(52);r.ShowLabels=n(118),t.exports=r},function(t,e,n){"use strict";var r=n(7).Group,i=n(1),a=function(t){a.superclass.constructor.call(this,t)};a.CFG={zIndex:6,items:null,label:null,renderer:null,custom:!1,animate:!1,html:'<div class="g-labels" style="position:absolute;top:0;left:0;"></div>',itemTpl:'<div class="g-label" style="position:absolute;">{text}</div>',duration:400},i.extend(a,r),i.augment(a,{_renderUI:function(){this._drawLabels()},_drawLabels:function(){var t=this,e=t.get("items");i.each(e,function(e,n){t._addLabel(e,n)})},_addLabel:function(t,e){var n=this._getLabelCfg(t,e);return this._createText(n)},_getLabelCfg:function(t,e){var n=this.get("label")||{},r=this.get("renderer");if(!i.isObject(t)){var a=t;t={},t.text=a}r&&(t.text=r(t.text,t,e)),i.isNull(t.text)&&(t.text=""),t.text=t.text+"";var o=i.mix({},t,n,{x:(t.x||0)+(n.x||0),y:(t.y||0)+(n.y||0)});return o},_createText:function(t){var e,n=this,r=n.get("custom"),a=n.get("customDiv");if(!r)return e=this.addShape("text",{attrs:t}),e.id=t.id,e.animateType="label",e;if(!a){var o=n.get("html"),s=n.get("canvas").get("el").parentNode;a=i.createDom(o),s.style.position="relative",s.appendChild(a),n.set("customDiv",a)}var u=n._createDom(t);a.appendChild(u),n._setCustomPosition(t,u)},_setCustomPosition:function(t,e){var n=t.textAlign||"left",r=t.y,a=t.x,o=i.getWidth(e),s=i.getHeight(e);r-=s/2,"center"===n?a-=o/2:"right"===n&&(a-=o),e.style.top=parseInt(r,10)+"px",e.style.left=parseInt(a,10)+"px"},_createDom:function(t){var e=this,n=e.get("itemTpl"),r=i.substitute(n,t),a=i.createDom(r);return a},getLabels:function(){var t=this,e=t.get("customDiv");return e?i.toArray(e.childNodes):t.get("children")},addLabel:function(t){var e=this.get("items"),n=e.length;return e.push(t),this._addLabel(t,n)},changeLabel:function(t,e){var n,r,a=this,o=a.get("custom");if(n=i.indexOf(a.get("children"),t),r=a._getLabelCfg(e,n),t)if(o){var s=a._createDom(r);t.innerHTML=s.innerHTML,a._setCustomPosition(r,t)}else if(t.attr("text",r.text),t.attr("x")!==r.x||t.attr("y")!==r.y){var u=t.get("attrs").rotate;u&&t.rotateAtStart(-u),t.attr(r),u&&t.rotateAtStart(u)}},clear:function(){var t=this,e=t.get("customDiv");e&&(e.innerHTML=""),a.superclass.clear.call(t)},setItems:function(t){var e=this;e.clear(),e.set("items",t),e._drawLabels()},remove:function(){var t=this.get("customDiv");t&&t.parentNode.removeChild(t),a.superclass.remove.call(this)}}),t.exports=a},function(t,e,n){"use strict";var r=n(1);t.exports={addEachItem:function(t,e){var n,i=t.addGroup(e),a=r.mix({fill:"#fff",textBaseline:"middle"},e.word),o=e.wordSpaceing||6,s=r.mix({fill:"red",lineWidth:0,radius:2.5},e.marker),u=e.markerAlign||"center",c=e.items,h=0;if(c.marker&&(n=r.mix({},s,c.marker,{x:"center"===u?0:c.marker.radius,y:0}),n.x+=e.x,n.y+=e.y,n.symbol)){var l=i.addShape("marker",{type:"marker",attrs:n});h+=l.getBBox().width+o}return r.each(c.words,function(t){n=r.mix({},a,t,{x:h,y:0}),n.x+=e.x,n.y+=e.y;var s=i.addShape("text",{attrs:n});h+=o+s.getBBox().width}),i}}},function(t,e,n){"use strict";function r(t,e){return t>e?e:t}function i(t,e){return t>e?t:e}var a=n(1),o=function(t,e){this.reset(t,e)};o.CFG={start:null,end:null,background:null},a.augment(o,{init:function(){var t=this.start,e=this.end,n=this.tl={x:r(t.x,e.x),y:r(t.y,e.y)};this.tr={x:i(t.x,e.x),y:r(t.y,e.y)},this.bl={x:r(t.x,e.x),y:i(t.y,e.y)};var a=this.br={x:i(t.x,e.x),y:i(t.y,e.y)};this.cc={x:(a.x-n.x)/2+n.x,y:(a.y-n.y)/2+n.y}},reset:function(t,e){
4this.start=t,this.end=e,this.init()},isInRange:function(t,e){a.isObject(t)&&(e=t.y,t=t.x);var n=this.tl,r=this.br;return t>=n.x&&t<=r.x&&e>=n.y&&e<=r.y},isInVertical:function(t){a.isObject(t)&&(t=t.y);var e=this.tl,n=this.br;return t>=e.y&&t<=n.y},isInHorizontal:function(t){a.isObject(t)&&(t=t.x);var e=this.tl,n=this.br;return t>=e.x&&t<=n.x},getWidth:function(){var t=this.tl,e=this.br;return e.x-t.x},getHeight:function(){var t=this.tl,e=this.br;return e.y-t.y}}),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(7).Group,a=function(t){a.superclass.constructor.call(this,t)};a.CFG={range:null,middleAttr:null,backgroundElement:null,minHandleElement:null,maxHandleElement:null,middleHandleElement:null,currentTarget:null,layout:"vertical",width:null,height:null,pageX:null,pageY:null,animate:!1,operable:!0},r.extend(a,i),r.augment(a,{_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),this.get("operable")&&(i.set("cursor","move"),n.set("cursor",a),r.set("cursor",a)),this.sort()},_renderUI:function(){var t=this.get("layout");"horizontal"===t?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.initTransform(),s.initTransform(),"horizontal"===t?(u.attr({x:i*n,y:0,width:(r-n)*i,height:a}),o.translate(n*i,0),s.translate(r*i,0)):(u.attr({x:0,y:a*(1-r),width:i,height:(r-n)*a}),o.translate(i/2,(1-n)*a),s.translate(i/2,(1-r)*a))},_renderHorizontal:function(){this._transform("horizontal")},_renderVertical:function(){this._transform("vertical")},_bindUI:function(){this.get("operable")&&(this.on("mousedown",r.wrapBehavior(this,"_onMouseDown")),this.on("mousemove",r.wrapBehavior(this,"_onMouseMove")),this.on("mouseleave",r.wrapBehavior(this,"_onMouseLeave")))},_isElement:function(t,e){var n=this.get(e);if(t===n)return!0;if(n.isGroup){var r=n.get("children");return r.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,i="x"===t?this.get("width"):this.get("height"),a=r.ucfirst(t),o=this.get("range"),s=this.get("page"+a),u=this.get("currentTarget"),c=this.get("rangeStash"),h=this.get("layout"),l="vertical"===h?-1:1,f=e["page"+a],d=f-s,g=d/i*100*l;o[1]<=o[0]?(this._isElement(u,"minHandleElement")||this._isElement(u,"maxHandleElement"))&&(o[0]=this._getRange(g,o[0]),o[1]=this._getRange(g,o[0])):(this._isElement(u,"minHandleElement")&&(o[0]=this._getRange(g,o[0])),this._isElement(u,"maxHandleElement")&&(o[1]=this._getRange(g,o[1]))),this._isElement(u,"middleHandleElement")&&(n=c[1]-c[0],o[0]=this._getRange(g,o[0]),o[1]=o[0]+n,o[1]>100&&(o[1]=100,o[0]=o[1]-n)),this.fire("rangeChange",{range:o}),this.set("page"+a,f),this._renderUI(),this.get("canvas").draw()},_onMouseLeave:function(){var t=this.get("canvas").get("containerDOM");t.style.cursor="default"},_onMouseMove:function(t){var e=t.currentTarget.get("cursor"),n=this.get("canvas").get("containerDOM");n&&(e?n.style.cursor=e:n.style.cursor="default")},_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(){this.onMouseMoveListener=r.addEventListener(document,"mousemove",r.wrapBehavior(this,"_onCanvasMouseMove")),this.onMouseUpListener=r.addEventListener(document,"mouseup",r.wrapBehavior(this,"_onCanvasMouseUp"))},_onCanvasMouseMove:function(t){var e=this.get("layout");"horizontal"===e?this._updateStatus("x",t):this._updateStatus("y",t)},_onCanvasMouseUp:function(){this._removeDocumentEvents()},_removeDocumentEvents:function(){this.onMouseMoveListener.remove(),this.onMouseUpListener.remove()}}),t.exports=a},function(t,e){t.exports={prefix:"g",backupContext:document.createElement("canvas").getContext("2d"),debug:!1,warn:function(){}}},function(t,e,n){var r=n(1),i=n(130),a=n(131),o=n(129),s=n(58),u=n(126),c=["fillStyle","font","globalAlpha","lineCap","lineWidth","lineJoin","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline","lineDash"],h=function(t){this.__cfg={zIndex:0,capture:!0,visible:!0,destroyed:!1},r.simpleMix(this.__cfg,this.getDefaultCfg(),t),this.initAttrs(this.__cfg.attrs),this.initTransform(),this.initEventDispatcher(),this.init()};h.CFG={id:null,zIndex:0,canvas:null,parent:null,capture:!0,context:null,visible:!0,destroyed:!1},r.augment(h,i,u,a,o,{init:function(){this.setSilent("animable",!0);var t=this.__attrs;t&&t.rotate&&this.rotateAtStart(t.rotate)},getParent:function(){return this.get("parent")},getDefaultCfg:function(){return{}},set:function(t,e){var n="__set"+r.ucfirst(t);return this[n]&&(e=this[n](e)),this.__cfg[t]=e,this},setSilent:function(t,e){this.__cfg[t]=e},get:function(t){return this.__cfg[t]},draw:function(t){this.get("destroyed")||this.get("visible")&&(this.setContext(t),this.drawInner(t),this.restoreContext(t))},setContext:function(t){var e=this.__attrs.clip;t.save(),e&&(e.resetTransform(t),e.createPath(t),t.clip()),this.resetContext(t),this.resetTransform(t)},restoreContext:function(t){t.restore()},resetContext:function(t){var e=this.__attrs;if(!this.isGroup)for(var n in e)if(c.indexOf(n)>-1){var i=e[n];"fillStyle"===n&&(i=s.parseStyle(i,this)),"strokeStyle"===n&&(i=s.parseStyle(i,this)),"lineDash"===n&&t.setLineDash?r.isArray(i)?t.setLineDash(i):r.isString(i)&&t.setLineDash(i.split(" ")):t[n]=i}},drawInner:function(){},show:function(){return this.set("visible",!0),this},hide:function(){return this.set("visible",!1),this},remove:function(t){if(void 0===t&&(t=!0),this.get("parent")){var e=this.get("parent"),n=e.get("children");r.remove(n,this)}return t&&this.destroy(),this},destroy:function(){var t=this.get("destroyed");t||(this.__cfg={},this.__attrs=null,this.__listeners=null,this.__m=null,this.set("destroyed",!0))},__setZIndex:function(t){return this.__cfg.zIndex=t,r.notNull(this.get("parent"))&&this.get("parent").sort(),t},__setAttrs:function(t){return this.attr(t),t},clone:function(){return r.clone(this)},getBBox:function(){return{minX:0,maxX:0,minY:0,maxY:0}}}),t.exports=h},function(t,e,n){function r(t,e){if(void 0===e)return t;t=new h(t),t.multiplyA(e);var n=t.getType();return"hsl"===n?t.getHSLStyle():"rgb"===n?t.getRGBStyle():void 0}function i(t,e,n){var i=t.match(v);u.each(i,function(t){t=t.split(":");var i=r(t[1],n);e.addColorStop(t[0],i)})}function a(t,e,n){var r,a,o=d.exec(t),s=c.mod(c.degreeToRad(parseFloat(o[1])),2*Math.PI),u=o[2],h=e.getBBox();s>=0&&s<.5*Math.PI?(r={x:h.minX,y:h.minY},a={x:h.maxX,y:h.maxY}):.5*Math.PI<=s&&s<Math.PI?(r={x:h.maxX,y:h.minY},a={x:h.minX,y:h.maxY}):Math.PI<=s&&s<1.5*Math.PI?(r={x:h.maxX,y:h.maxY},a={x:h.minX,y:h.minY}):(r={x:h.minX,y:h.maxY},a={x:h.maxX,y:h.minY});var l=Math.tan(s),f=l*l,g=(a.x-r.x+l*(a.y-r.y))/(f+1)+r.x,p=l*(a.x-r.x+l*(a.y-r.y))/(f+1)+r.y,v=e.get("context"),m=v.createLinearGradient(r.x,r.y,g,p);return i(u,m,n),m}function o(t,e,n){var r=g.exec(t),a=parseFloat(r[1]),o=parseFloat(r[2]),s=parseFloat(r[3]),u=r[4],c=e.getBBox(),h=e.get("context"),l=c.maxX-c.minX,f=c.maxY-c.minY,d=Math.sqrt(l*l+f*f)/2,p=h.createRadialGradient(c.minX+l*a,c.minY+f*o,s,c.minX+l/2,c.minY+f/2,d);return i(u,p,n),p}function s(t,e){var n=p.exec(t),r=n[1],i=n[2];switch(r){case"a":r="repeat";break;case"x":r="repeat-x";break;case"y":r="repeat-y";break;case"n":r="no-repeat";break;default:r="no-repeat"}var a=document.getElementById(i),o=e.get("context"),s=o.createPattern(a,r);return s}var u=n(1),c=n(8),h=n(20),l=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,f=/[^\s\,]+/gi,d=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,g=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,p=/^p\s*([axyn])\s+(.*)/i,v=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,m={};t.exports={parsePath:function(t){return t=t||[],u.isArray(t)?t:u.isString(t)?(t=t.match(l),u.each(t,function(e,n){if(e=e.match(f),e[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}u.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},parseStyle:function(t,e,n){if(u.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return a(t,e,n);if("r"===t[0])return o(t,e,n);if("p"===t[0])return s(t,e)}return u.isNull(n)?t:r(t,n)}},numberToColor:function(t){var e=m[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,m[t]=e}return e}}},function(t,e,n){var r=n(56),i={Group:n(128),Shape:n(9),Rect:n(73),Circle:n(61),Ellipse:n(63),Path:n(69),Text:n(74),Line:n(67),Image:n(65),Polygon:n(70),Polyline:n(71),Arc:n(60),Fan:n(64),Cubic:n(62),Quadratic:n(72),Marker:n(68),debug:function(t){r.debug=t}};t.exports=i},function(t,e,n){var r=n(1),i=n(2).Vector2,a=n(9),o=n(10),s=n(29),u=n(18),c=function(t){c.superclass.constructor.call(this,t)};c.ATTRS={x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,arrow:!1},r.extend(c,a),r.augment(c,{canStroke:!0,type:"arc",getDefaultAttrs:function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,arrow:!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=t.lineWidth,c=u/2,h=s.box(e,n,r,i,a,o);return h.minX-=c,h.minY-=c,h.maxX+=c,h.maxY+=c,h},isPointInPath:function(t,e){var n=this.__attrs,r=n.x,i=n.y,a=n.r,s=n.startAngle,u=n.endAngle,c=n.clockwise,h=n.lineWidth;return!!this.hasStroke()&&o.arcline(r,i,a,s,u,c,h,t,e)},createPath:function(t){var e=this.__attrs,n=e.x,r=e.y,a=e.r,o=e.startAngle,s=e.endAngle,c=e.clockwise,h=e.lineWidth,l=e.arrow;if(t=t||self.get("context"),t.beginPath(),t.arc(n,r,a,o,s,c),l){var f={x:n+a*Math.cos(s),y:r+a*Math.sin(s)},d=new i(-a*Math.sin(s),a*Math.cos(s));c&&d.multiplyScaler(-1),u.makeArrow(t,d,f,h)}}}),t.exports=c},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=function(t){o.superclass.constructor.call(this,t)};o.ATTRS={x:0,y:0,r:0,lineWidth:1},r.extend(o,i),r.augment(o,{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=t.lineWidth,a=i/2+r;return{minX:e-a,minY:n-a,maxX:e+a,maxY:n+a}},isPointInPath:function(t,e){var n=this.hasFill(),r=this.hasStroke();return n&&r?this.__isPointInFill(t,e)||this.__isPointInStroke(t,e):n?this.__isPointInFill(t,e):!!r&&this.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.r;return a.circle(r,i,o,t,e)},__isPointInStroke:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.r,s=n.lineWidth;return a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e)},createPath:function(t){var e=this.__attrs,n=e.x,r=e.y,i=e.r;t=t||self.get("context"),t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1)}}),t.exports=o},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(18),s=n(23),u=n(2).Vector2,c=function(t){c.superclass.constructor.call(this,t)};c.ATTRS={p1:null,p2:null,p3:null,p4:null,lineWidth:1,arrow:!1},r.extend(c,i),r.augment(c,{canStroke:!0,type:"cubic",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t,e,n=this.__attrs,i=n.p1,a=n.p2,o=n.p3,u=n.p4;if(r.isNull(i)||r.isNull(a)||r.isNull(o)||r.isNull(u))return null;var c=n.lineWidth/2,h=s.extrema(i[0],a[0],o[0],u[0]);for(t=0,e=h.length;t<e;t++)h[t]=s.at(i[0],a[0],o[0],u[0],h[t]);var l=s.extrema(i[1],a[1],o[1],u[1]);for(t=0,e=l.length;t<e;t++)l[t]=s.at(i[1],a[1],o[1],u[1],l[t]);return h.push(i[0],u[0]),l.push(i[1],u[1]),{minX:Math.min.apply(Math,h)-c,maxX:Math.max.apply(Math,h)+c,minY:Math.min.apply(Math,l)-c,maxY:Math.max.apply(Math,l)+c}},isPointInPath:function(t,e){var n=this.__attrs,r=n.p1,i=n.p2,o=n.p3,s=n.p4,u=n.lineWidth;return a.cubicline(r[0],r[1],i[0],i[1],o[0],o[1],s[0],s[1],u,t,e)},createPath:function(t){var e=this.__attrs,n=e.p1,i=e.p2,a=e.p3,s=e.p4,c=e.lineWidth,h=e.arrow;if(t=t||self.get("context"),!(r.isNull(n)||r.isNull(i)||r.isNull(a)||r.isNull(s)))if(t.beginPath(),t.moveTo(n[0],n[1]),h){var l=new u(s[0]-a[0],s[1]-a[1]),f=o.getEndPoint(l,new u(s[0],s[1]),c);t.bezierCurveTo(i[0],i[1],a[0],a[1],f.x,f.y),o.makeArrow(t,l,f,c)}else t.bezierCurveTo(i[0],i[1],a[0],a[1],s[0],s[1])},getPoint:function(t){var e=this.__attrs;return{x:s.at(e.p4[0],e.p3[0],e.p2[0],e.p1[0],t),y:s.at(e.p4[1],e.p3[1],e.p2[1],e.p1[1],t)}}}),t.exports=c},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(2),s=o.Matrix3,u=o.Vector3,c=function(t){c.superclass.constructor.call(this,t)};c.ATTRS={x:0,y:0,rx:1,ry:1,lineWidth:1},r.extend(c,i),r.augment(c,{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=t.lineWidth,o=r+a/2,s=i+a/2;return{minX:e-o,minY:n-s,maxX:e+o,maxY:n+s}},isPointInPath:function(t,e){var n=this.hasFill(),r=this.hasStroke();return n&&r?this.__isPointInFill(t,e)||this.__isPointInStroke(t,e):n?this.__isPointInFill(t,e):!!r&&this.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.rx,c=n.ry,h=o>c?o:c,l=o>c?1:o/c,f=o>c?c/o:1,d=new u(t,e,1),g=new s;g.scale(l,f),g.translate(r,i);var p=g.getInverse();return d.applyMatrix(p),a.circle(0,0,h,d.x,d.y)},__isPointInStroke:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.rx,c=n.ry,h=n.lineWidth,l=o>c?o:c,f=o>c?1:o/c,d=o>c?c/o:1,g=new u(t,e,1),p=new s;p.scale(f,d),p.translate(r,i);var v=p.getInverse();return g.applyMatrix(v),a.arcline(0,0,l,0,2*Math.PI,!1,h,g.x,g.y)},createPath:function(t){var e=this.__attrs,n=e.x,r=e.y,i=e.rx,a=e.ry;t=t||self.get("context");var o=i>a?i:a,u=i>a?1:i/a,c=i>a?a/i:1,h=new s;h.scale(u,c),h.translate(n,r);var l=h.to2DObject();t.beginPath(),t.save(),t.transform(l.a,l.b,l.c,l.d,l.e,l.f),t.arc(0,0,o,0,2*Math.PI),t.restore(),t.closePath()}}),t.exports=c},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(8),s=n(29),u=n(2),c=u.Vector2,h=function(t){h.superclass.constructor.call(this,t)};h.ATTRS={x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1},r.extend(h,i),r.augment(h,{canFill:!0,canStroke:!0,type:"fan",getDefaultAttrs:function(){return{clockwise:!1,lineWidth:1,rs:0,re:0}},calculateBox:function(){var t=this,e=t.__attrs,n=e.x,r=e.y,i=e.rs,a=e.re,o=e.startAngle,u=e.endAngle,c=e.clockwise,h=e.lineWidth,l=s.box(n,r,i,o,u,c),f=s.box(n,r,a,o,u,c),d=Math.min(l.minX,f.minX),g=Math.min(l.minY,f.minY),p=Math.max(l.maxX,f.maxX),v=Math.max(l.maxY,f.maxY),m=h/2;return{minX:d-m,minY:g-m,maxX:p+m,maxY:v+m}},isPointInPath:function(t,e){var n=this.hasFill(),r=this.hasStroke();return n&&r?this.__isPointInFill(t,e)||this.__isPointInStroke(t,e):n?this.__isPointInFill(t,e):!!r&&this.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.__attrs,r=n.x,i=n.y,a=n.rs,u=n.re,h=n.startAngle,l=n.endAngle,f=n.clockwise,d=new c(1,0),g=new c(t-r,e-i),p=d.angleTo(g),v=s.nearAngle(p,h,l,f);if(o.equal(p,v)){var m=g.lengthSq();if(a*a<=m&&m<=u*u)return!0}return!1},__isPointInStroke:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.rs,s=n.re,u=n.startAngle,c=n.endAngle,h=n.clockwise,l=n.lineWidth,f={x:Math.cos(u)*o+r,y:Math.sin(u)*o+i},d={x:Math.cos(u)*s+r,y:Math.sin(u)*s+i},g={x:Math.cos(c)*o+r,y:Math.sin(c)*o+i},p={x:Math.cos(c)*s+r,y:Math.sin(c)*s+i};return!!a.line(f.x,f.y,d.x,d.y,l,t,e)||(!!a.line(g.x,g.y,p.x,p.y,l,t,e)||(!!a.arcline(r,i,o,u,c,h,l,t,e)||!!a.arcline(r,i,s,u,c,h,l,t,e)))},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},h={x:Math.cos(o)*a+n,y:Math.sin(o)*a+r},l={x:Math.cos(s)*i+n,y:Math.sin(s)*i+r};t=t||self.get("context"),t.beginPath(),t.moveTo(c.x,c.y),t.lineTo(h.x,h.y),t.arc(n,r,a,o,s,u),t.lineTo(l.x,l.y),t.arc(n,r,i,s,o,!u),t.closePath()}}),t.exports=h},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=function(t){o.superclass.constructor.call(this,t)};o.ATTRS={x:0,y:0,img:void 0,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null},r.extend(o,i),r.augment(o,{type:"image",__afterSetAttrImg:function(t){this.__setAttrImg(t)},__afterSetAttrAll:function(t){t.img&&this.__setAttrImg(t.img)},isHitBox:function(){return!1},calculateBox:function(){var t=this.__attrs,e=t.x,n=t.y,r=t.width,i=t.height;return{minX:e,minY:n,maxX:e+r,maxY:n+i}},isPointInPath:function(t,e){var n=this.__attrs;if(this.get("toDraw")||!n.img)return!1;var r=n.x,i=n.y,o=n.width,s=n.height;return a.rect(r,i,o,s,t,e)},__setLoading:function(t){var e=this.get("canvas");return t===!1&&this.get("toDraw")===!0&&(this.__cfg.loading=!1,e.draw()),t},__setAttrImg:function(t){var e=this,n=e.__attrs;if(!r.isString(t))return t instanceof Image?(n.width||e.attr("width",t.width),n.height||e.attr("height",t.height),t):t instanceof HTMLElement&&r.isString(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()?(n.width||e.attr("width",Number(t.getAttribute("width"))),n.height||e.attr("height",Number(t.getAttribute("height"))),t):t instanceof ImageData?(n.width||e.attr("width",t.width),n.height||e.attr("height",t.height),t):null;var i=new Image;i.onload=function(){if(e.get("destroyed"))return!1;e.attr("imgSrc",t),e.attr("img",i);var n=e.get("callback");n&&n.call(e),e.set("loading",!1)},i.src=t,e.set("loading",!0)},drawInner:function(t){return this.get("loading")?void this.set("toDraw",!0):void this.__drawImage(t)},__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,h=e.swidth,l=e.sheight;if(this.set("toDraw",!1),a instanceof Image||a instanceof HTMLElement&&r.isString(a.nodeName)&&"CANVAS"===a.nodeName.toUpperCase()){if(r.isNull(u)||r.isNull(c)||r.isNull(h)||r.isNull(l))return void t.drawImage(a,n,i,o,s);if(r.notNull(u)&&r.notNull(c)&&r.notNull(h)&&r.notNull(l))return void t.drawImage(a,u,c,h,l,n,i,o,s)}else if(a instanceof ImageData)return void t.putImageData(a,n,i,u||0,c||0,h||o,l||s)}}),t.exports=o},function(t,e,n){var r={Rect:n(73),Circle:n(61),Ellipse:n(63),Path:n(69),Text:n(74),Line:n(67),Image:n(65),Polygon:n(70),Polyline:n(71),Arc:n(60),Fan:n(64),Cubic:n(62),Quadratic:n(72),Marker:n(68)};t.exports=r},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(18),s=n(30),u=n(2),c=u.Vector2,h=function(t){h.superclass.constructor.call(this,t)};h.ATTRS={x1:0,y1:0,x2:0,y2:0,lineWidth:1,arrow:!1},r.extend(h,i),r.augment(h,{canStroke:!0,type:"line",getDefaultAttrs:function(){return{lineWidth:1,arrow:!1}},calculateBox:function(){var t=this.__attrs,e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=t.lineWidth;return s.box(e,n,r,i,a)},isPointInPath:function(t,e){var n=this.__attrs,r=n.x1,i=n.y1,o=n.x2,s=n.y2,u=n.lineWidth;return!!this.hasStroke()&&a.line(r,i,o,s,u,t,e)},createPath:function(t){var e=this.__attrs,n=e.x1,r=e.y1,i=e.x2,a=e.y2,s=e.arrow,u=e.lineWidth;if(t=t||self.get("context"),t.beginPath(),t.moveTo(n,r),s){var h=new c(i-n,a-r),l=o.getEndPoint(h,new c(i,a),u);t.lineTo(l.x,l.y),o.makeArrow(t,h,l,u)}else t.lineTo(i,a)},getPoint:function(t){var e=this.__attrs;return{x:s.at(e.x1,e.x2,t),y:s.at(e.y1,e.y2,t)}}}),t.exports=h},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=function(t){o.superclass.constructor.call(this,t)};o.Symbols={circle:function(t,e,n,r){r.arc(t,e,n,0,2*Math.PI,!1)},square:function(t,e,n,r){r.moveTo(t-n,e-n),r.lineTo(t+n,e-n),r.lineTo(t+n,e+n),r.lineTo(t-n,e+n),r.closePath()},diamond:function(t,e,n,r){r.moveTo(t-n,e),r.lineTo(t,e-n),r.lineTo(t+n,e),r.lineTo(t,e+n),r.closePath()},triangle:function(t,e,n,r){var i=n/.966,a=n;r.moveTo(t,e-n),r.lineTo(t+i,e+a),r.lineTo(t-i,e+a),r.closePath()},"triangle-down":function(t,e,n,r){var i=n/.966,a=n;r.moveTo(t,e+n),r.lineTo(t+i,e-a),r.lineTo(t-i,e-a),r.closePath()}},o.ATTRS={path:null,lineWidth:1},r.extend(o,i),r.augment(o,{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=t.lineWidth,a=i/2+r;return{minX:e-a,minY:n-a,maxX:e+a,maxY:n+a}},isPointInPath:function(t,e){var n=this.__attrs,r=n.x,i=n.y,o=n.radius;return a.circle(r,i,o,t,e)},createPath:function(t){var e,n=this.__attrs,i=n.x,a=n.y,s=n.radius,u=n.symbol||"circle";e=r.isFunction(u)?u:o.Symbols[u],t.beginPath(),e(i,a,s,t)}}),t.exports=o},function(t,e,n){var r=n(1),i=n(9),a=n(133),o=n(58),s=n(18),u=n(33),c=n(23),h=n(2),l=h.Vector2,f=function(t){f.superclass.constructor.call(this,t)};f.ATTRS={path:null,lineWidth:1,curve:null,tCache:null},r.extend(f,i),r.augment(f,{canFill:!0,canStroke:!0,type:"path",getDefaultAttrs:function(){return{lineWidth:1}},__afterSetAttrPath:function(t){var e=this;if(r.isNull(t))return e.setSilent("segments",null),void e.setSilent("box",void 0);var n,i=o.parsePath(t),s=[];if(r.isArray(i)&&0!==i.length&&("M"===i[0][0]||"m"===i[0][0])){for(var u=i.length,c=0;c<i.length;c++){var h=i[c];n=new a(h,n,c===u-1),s.push(n)}e.setSilent("segments",s),e.set("tCache",null),this.setSilent("box",null)}},__afterSetAttrAll:function(t){t.path&&this.__afterSetAttrPath(t.path)},calculateBox:function(){var t=this,e=t.__attrs,n=e.lineWidth,i=e.lineAppendWidth||0,a=t.get("segments");if(!a)return null;n+=i;var o=1/0,s=-(1/0),u=1/0,c=-(1/0);return r.each(a,function(t){t.getBBox(n);var e=t.box;e&&(e.minX<o&&(o=e.minX),e.maxX>s&&(s=e.maxX),e.minY<u&&(u=e.minY),e.maxY>c&&(c=e.maxY))}),{minX:o,minY:u,maxX:s,maxY:c}},isPointInPath:function(t,e){var n=this,r=n.hasFill(),i=n.hasStroke();return r&&i?n.__isPointInFill(t,e)||n.__isPointInStroke(t,e):r?n.__isPointInFill(t,e):!!i&&n.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this,r=n.get("context");if(r)return n.createPath(),r.isPointInPath(t,e)},__isPointInStroke:function(t,e){var n=this,r=n.get("segments"),i=n.__attrs,a=i.lineWidth,o=i.lineAppendWidth||0;a+=o;for(var s=0,u=r.length;s<u;s++)if(r[s].isInside(t,e,a))return!0;return!1},__setTcache:function(){var t,e,n,i,a=0,o=0,s=[],u=this.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,h){n=u[h+1],i=r.length,n&&(t=[],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.tCache=s)},__calculateCurve:function(){var t=this,e=t.__attrs,n=e.path;this.curve=u.toCurve(n)},getPoint:function(t){var e,n,i,a,o,s,u=this.tCache;return u||(this.__calculateCurve(),this.__setTcache(),u=this.tCache),e=this.curve,u?(r.each(u,function(e,r){t>=e[0]&&t<=e[1]&&(n=(t-e[0])/(e[1]-e[0]),i=r)}),a=e[i],r.isNull(a)||r.isNull(i)?null:(o=a.length,s=e[i+1],{x:c.at(a[o-2],s[1],s[3],s[5],1-n),y:c.at(a[o-1],s[2],s[4],s[6],1-n)})):e?{x:e[0][1],y:e[0][2]}:null},createPath:function(t){var e=this,n=e.__attrs,i=e.get("segments"),a=n.lineWidth,o=n.arrow;if(r.isArray(i)){t=t||e.get("context"),t.beginPath();for(var u=0,c=i.length;u<c;u++)if(u===c-1&&o){var h=i[u],f=i[u].endTangent,d={x:h.params[h.params.length-1].x,y:h.params[h.params.length-1].y};if(h&&r.isFunction(f)){var g=f(),p=s.getEndPoint(g,new l(d.x,d.y),a);h.params[h.params.length-1]=p,i[u].draw(t),s.makeArrow(t,g,p,a),h.params[h.params.length-1]=d}}else i[u].draw(t)}}}),t.exports=f},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=function(t){o.superclass.constructor.call(this,t)};o.ATTRS={points:null,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"polygon",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this,e=t.__attrs,n=e.points,i=e.lineWidth;if(!n||0===n.length)return null;var a=1/0,o=1/0,s=-(1/0),u=-(1/0);r.each(n,function(t){var e=t[0],n=t[1];e<a&&(a=e),e>s&&(s=e),n<o&&(o=n),n>u&&(u=n)});var c=i/2;return{minX:a-c,minY:o-c,maxX:s+c,maxY:u+c}},isPointInPath:function(t,e){var n=this,r=n.hasFill(),i=n.hasStroke();return r&&i?n.__isPointInFill(t,e)||n.__isPointInStroke(t,e):r?n.__isPointInFill(t,e):!!i&&n.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this,r=n.get("context");return n.createPath(),r.isPointInPath(t,e)},__isPointInStroke:function(t,e){var n=this,r=n.__attrs,i=r.points;if(i.length<2)return!1;var o=r.lineWidth,s=i.slice(0);return i.length>=3&&s.push(i[0]),a.polyline(s,o,t,e)},createPath:function(t){var e=this,n=e.__attrs,i=n.points;i.length<2||(t=t||e.get("context"),t.beginPath(),r.each(i,function(e,n){0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])}),t.closePath())}}),t.exports=o},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(18),s=n(30),u=n(2),c=u.Vector2,h=function(t){h.superclass.constructor.call(this,t)};h.ATTRS={points:null,lineWidth:1,arrow:!1,tCache:null},r.extend(h,i),r.augment(h,{canStroke:!0,type:"polyline",tCache:null,getDefaultAttrs:function(){return{lineWidth:1,arrow:!1}},calculateBox:function(){var t=this,e=t.__attrs,n=e.lineWidth,i=e.points;if(!i||0===i.length)return null;var a=1/0,o=1/0,s=-(1/0),u=-(1/0);r.each(i,function(t){var e=t[0],n=t[1];e<a&&(a=e),e>s&&(s=e),n<o&&(o=n),n>u&&(u=n)});var c=n/2;return{minX:a-c,minY:o-c,maxX:s+c,maxY:u+c}},__setTcache:function(){var t,e,n=this,i=n.__attrs,a=i.points,o=0,u=0,c=[];a&&0!==a.length&&(r.each(a,function(t,e){a[e+1]&&(o+=s.len(t[0],t[1],a[e+1][0],a[e+1][1]))}),o<=0||(r.each(a,function(n,r){a[r+1]&&(t=[],t[0]=u/o,e=s.len(n[0],n[1],a[r+1][0],a[r+1][1]),u+=e,t[1]=u/o,c.push(t))}),this.tCache=c))},isPointInPath:function(t,e){var n=this,r=n.__attrs;if(n.hasStroke()){var i=r.points;if(i.length<2)return!1;var o=r.lineWidth;return a.polyline(i,o,t,e)}return!1},createPath:function(t){var e,n,r=this,i=r.__attrs,a=i.points,s=i.arrow,u=i.lineWidth;if(!(a.length<2)){for(t=t||r.get("context"),t.beginPath(),t.moveTo(a[0][0],a[0][1]),n=1,e=a.length-1;n<e;n++)t.lineTo(a[n][0],a[n][1]);if(s){var h=new c(a[e][0]-a[e-1][0],a[e][1]-a[e-1][1]),l=o.getEndPoint(h,new c(a[e][0],a[e][1]),u);t.lineTo(l.x,l.y),o.makeArrow(t,h,l,u)}else t.lineTo(a[e][0],a[e][1])}},getPoint:function(t){var e,n,i=this.__attrs,a=i.points,o=this.tCache;return o||(this.__setTcache(),o=this.tCache),r.each(o,function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}),{x:s.at(a[n][0],a[n+1][0],e),y:s.at(a[n][1],a[n+1][1],e)}}}),t.exports=h},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(18),s=n(31),u=n(2).Vector2,c=function(t){c.superclass.constructor.call(this,t)};c.ATTRS={p1:null,p2:null,p3:null,lineWidth:1,arrow:!1},r.extend(c,i),r.augment(c,{canStroke:!0,type:"quadratic",getDefaultAttrs:function(){return{lineWidth:1,arrow:!1}},calculateBox:function(){var t,e,n=this,i=n.__attrs,a=i.p1,o=i.p2,u=i.p3;if(r.isNull(a)||r.isNull(o)||r.isNull(u))return null;var c=i.lineWidth/2,h=s.extrema(a[0],o[0],u[0]);for(t=0,e=h.length;t<e;t++)h[t]=s.at(a[0],o[0],u[0],h[t]);h.push(a[0],u[0]);var l=s.extrema(a[1],o[1],u[1]);for(t=0,e=l.length;t<e;t++)l[t]=s.at(a[1],o[1],u[1],l[t]);return l.push(a[1],u[1]),{minX:Math.min.apply(Math,h)-c,maxX:Math.max.apply(Math,h)+c,minY:Math.min.apply(Math,l)-c,maxY:Math.max.apply(Math,l)+c}},isPointInPath:function(t,e){var n=this,r=n.__attrs,i=r.p1,o=r.p2,s=r.p3,u=r.lineWidth;return a.quadraticline(i[0],i[1],o[0],o[1],s[0],s[1],u,t,e)},createPath:function(t){var e=this,n=e.__attrs,i=n.p1,a=n.p2,s=n.p3,c=n.lineWidth,h=n.arrow;if(!(r.isNull(i)||r.isNull(a)||r.isNull(s)))if(t=t||e.get("context"),t.beginPath(),t.moveTo(i[0],i[1]),h){var l=new u(s[0]-a[0],s[1]-a[1]),f=o.getEndPoint(l,new u(s[0],s[1]),c);t.quadraticCurveTo(a[0],a[1],f.x,f.y),o.makeArrow(t,l,f,c)}else t.quadraticCurveTo(a[0],a[1],s[0],s[1])},getPoint:function(t){var e=this.__attrs;return{x:s.at(e.p1[0],e.p2[0],e.p3[0],t),y:s.at(e.p1[1],e.p2[1],e.p3[1],t)}}}),t.exports=c},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=function(t){o.superclass.constructor.call(this,t)};o.ATTRS={x:0,y:0,width:0,height:0,radius:0,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"rect",getDefaultAttrs:function(){return{lineWidth:1,radius:0}},calculateBox:function(){var t=this,e=t.__attrs,n=e.x,r=e.y,i=e.width,a=e.height,o=e.lineWidth,s=o/2;return{minX:n-s,minY:r-s,maxX:n+i+s,maxY:r+a+s}},isPointInPath:function(t,e){var n=this,r=n.hasFill(),i=n.hasStroke();return r&&i?n.__isPointInFill(t,e)||n.__isPointInStroke(t,e):r?n.__isPointInFill(t,e):!!i&&n.__isPointInStroke(t,e)},__isPointInFill:function(t,e){var n=this.get("context");return!!n&&(this.createPath(),n.isPointInPath(t,e))},__isPointInStroke:function(t,e){var n=this,r=n.__attrs,i=r.x,o=r.y,s=r.width,u=r.height,c=r.radius,h=r.lineWidth;if(0===c){var l=h/2;return a.line(i-l,o,i+s+l,o,h,t,e)||a.line(i+s,o-l,i+s,o+u+l,h,t,e)||a.line(i+s+l,o+u,i-l,o+u,h,t,e)||a.line(i,o+u+l,i,o-l,h,t,e)}return a.line(i+c,o,i+s-c,o,h,t,e)||a.line(i+s,o+c,i+s,o+u-c,h,t,e)||a.line(i+s-c,o+u,i+c,o+u,h,t,e)||a.line(i,o+u-c,i,o+c,h,t,e)||a.arcline(i+s-c,o+c,c,1.5*Math.PI,2*Math.PI,!1,h,t,e)||a.arcline(i+s-c,o+u-c,c,0,.5*Math.PI,!1,h,t,e)||a.arcline(i+c,o+u-c,c,.5*Math.PI,Math.PI,!1,h,t,e)||a.arcline(i+c,o+c,c,Math.PI,1.5*Math.PI,!1,h,t,e)},createPath:function(t){var e=this,n=e.__attrs,r=n.x,i=n.y,a=n.width,o=n.height,s=n.radius;t=t||e.get("context"),t.beginPath(),0===s?t.rect(r,i,a,o):(t.moveTo(r+s,i),t.lineTo(r+a-s,i),t.arc(r+a-s,i+s,s,-Math.PI/2,0,!1),t.lineTo(r+a,i+o-s),t.arc(r+a-s,i+o-s,s,0,Math.PI/2,!1),t.lineTo(r+s,i+o),t.arc(r+s,i+o-s,s,Math.PI/2,Math.PI,!1),t.lineTo(r,i+s),t.arc(r+s,i+s,s,Math.PI,3*Math.PI/2,!1),t.closePath())}}),t.exports=o},function(t,e,n){var r=n(1),i=n(9),a=n(10),o=n(56),s=function(t){s.superclass.constructor.call(this,t)};s.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(s,i),r.augment(s,{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"}},__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(" ")},__afterSetAttrFontSize:function(){this.__assembleFont()},__afterSetAttrFontFamily:function(){this.__assembleFont()},__afterSetAttrFontWeight:function(){this.__assembleFont()},__afterSetAttrFontStyle:function(){this.__assembleFont()},__afterSetAttrFontVariant:function(){this.__assembleFont()},__afterSetAttrFont:function(){},__afterSetAttrText:function(){var t,e=this.__attrs,n=e.text;if(r.isString(n)&&n.indexOf("\n")!==-1){t=n.split("\n");var i=t.length;e.lineCount=i,e.textArr=t}},__getTextHeight:function(){var t=this.__attrs,e=t.lineCount,n=1*t.fontSize;if(e>1){var r=this.__getSpaceingY();return n*e+r*(e-1)}return n},__afterSetAttrAll:function(t){var e=this;("fontSize"in t||"fontWeight"in t||"fontStyle"in t||"fontVariant"in t||"fontFamily"in t)&&e.__assembleFont(),"text"in t&&e.__afterSetAttrText(t.text)},isHitBox:function(){return!1},calculateBox:function(){var t=this,e=t.__attrs,n=e.x,r=e.y,i=t.measureText();if(!i)return{minX:n,minY:r,maxX:n,maxY:r};var a=t.__getTextHeight(),o=e.textAlign,s=e.textBaseline,u=e.lineWidth,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 h=u/2;return{minX:c.x-h,minY:c.y-h,maxX:c.x+i+h,maxY:c.y+a+h}},__getSpaceingY:function(){var t=this.__attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},isPointInPath:function(t,e){var n=this,r=n.getBBox();if(n.hasFill()||n.hasStroke())return a.box(r.minX,r.maxX,r.minY,r.maxY,t,e)},drawInner:function(t){var e=this,n=e.__attrs,i=n.text;if(i){var a,o=n.textArr,s=1*n.fontSize,u=e.__getSpaceingY(),c=n.x,h=n.y,l=n.textBaseline;if(o){var f=e.getBBox();a=f.maxY-f.minY}var d;if(t.beginPath(),e.hasFill()){var g=n.fillOpacity;r.isNull(g)||1===g||(t.globalAlpha=g),o?r.each(o,function(e,n){d=h+n*(u+s)-a+s,"middle"===l&&(d+=a-s-(a-s)/2),"top"===l&&(d+=a-s),t.fillText(e,c,d)}):t.fillText(i,c,h)}e.hasStroke()&&(o?r.each(o,function(e,n){d=h+n*(u+s)-a+s,"middle"===l&&(d+=a-s-(a-s)/2),"top"===l&&(d+=a-s),t.strokeText(e,c,d)}):t.strokeText(i,c,h))}},measureText:function(){var t,e=this,n=e.__attrs,i=n.text,a=n.font,s=n.textArr,u=0;
5if(!r.isNull(i)){var c=o.backupContext;return c.save(),c.font=a,s?r.each(s,function(e){t=c.measureText(e).width,u<t&&(u=t),c.restore()}):(u=c.measureText(i).width,c.restore()),u}}}),t.exports=s},function(t,e,n){var r=n(1),i=n(135),a=n(134),o=n(33);r.mix(r,a,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var i={};r.each(e,function(e){r.augment(t,e);var a=e[n];a&&r.mix(i,a)}),t[n]=r.mix(i,t[n])}},isPositiveNum:function(t){var e=/^[0-9]*[1-9][0-9]*$/;return e.test(t)},getRatio:function(){return window.devicePixelRatio?window.devicePixelRatio:2},getWidth:function(t){var e=r.getStyle(t,"width");return"auto"===e&&(e=t.offsetWidth),parseFloat(e)},getHeight:function(t){var e=r.getStyle(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)},getOuterHeight:function(t){var e=r.getHeight(t),n=parseFloat(r.getStyle(t,"borderTopWidth"))||0,i=parseFloat(r.getStyle(t,"paddingTop")),a=parseFloat(r.getStyle(t,"paddingBottom")),o=parseFloat(r.getStyle(t,"borderBottomWidth"))||0;return e+n+o+i+a},parsePathString:o.toArray,path2string:o.toString,path2curve:o.toCurve,pathToAbsolute:o.toAbsolute,catmullRom2bezier:o.catmullRomToBezier,parsePathArray:function(t){return r.path2string(t)},path2Absolute:function(t){return r.pathToAbsolute(t)}}),r.MatrixUtil=i,t.exports=r},function(t,e,n){var r=n(154);r.Tween=n(79),r.Ease=n(77),t.exports=r},function(t,e){var n={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1==(t/=1)?1:(n||(n=.3),r<Math.abs(1)?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),-(r*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/n)))},easeOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1==(t/=1)?1:(n||(n=.3),r<Math.abs(1)?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((1*t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:2==(t/=.5)?1:(n||(n=1*(.3*1.5)),r<Math.abs(1)?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),t<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-n.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return t<.5?.5*n.easeInBounce(2*t):.5*n.easeOutBounce(2*t-1)+.5}};t.exports=n},function(t,e,n){"use strict";var r=n(1),i=n(2),a=n(141),o={duration:"duration",destroy:"destroy",delay:"delay",repeat:"repeat",onUpdate:"onUpdate"},s=i.Matrix3,u={getObjectLength:function(t){var e,n=0;for(e in t)t.hasOwnProperty(e)&&n++;return n},isEqual:function(t,e){var n,i;if(typeof t!=typeof e)return!1;if(r.isNumber(t)||r.isString(t))return t===e;if(r.isArray(t)){if(!r.isArray(t[0]))return!!r.equalsArray(t,e);if(t===e)return!0;if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(!r.equalsArray(t[n],e[n]))return!1;return!0}if(r.isObject(t)){if(u.getObjectLength(t)!==u.getObjectLength(e))return!1;for(i in t){if(typeof t[i]!=typeof e[i])return!1;if(t[i]!==e[i])return!1}return!0}return t===e},interpolation:a.interpolation,getFrame:function(t,e,n,i,a){var o={attrs:{},matrix:null},s=n.onUpdate;for(var u in i.attrs)o.attrs[u]=i.attrs[u](t);return i.matrix&&(o.matrix=i.matrix(t)),r.isFunction(s)&&s(o,t),o},getInterpolations:function(t,e){var n,i,a={attrs:{},matrix:null};return r.each(t.attrs,function(t,o){n=null,i=e.attrs[o],u.isEqual(t,i)||(n="path"===o?u.interpolation({path:t,type:"path"},{path:i,type:"path"}):u.interpolation(t,i),r.isFunction(n)&&(a.attrs[o]=n))}),e.matrix&&t.matrix&&!s.equal(t.matrix,e.matrix)&&(n=u.interpolation(t.matrix,e.matrix),r.isFunction(n)&&(a.matrix=n)),a},getKeyFrameByProps:function(t,e){var n=[],r=u.props2frame(t,e),i={attrs:u.getTargetAttrs(t,r.attrs),matrix:t.getMatrix()};return n[0]=i,n[1]=r,n},props2frame:function(t,e){var n={matrix:null,attrs:{}};return r.each(e,function(r,i){"transform"!==i||e.k?"matrix"===i?n.matrix=r:"onUpdate"===i?n.onUpdate=e.onUpdate:o[i]||(n.attrs[i]=r):n.matrix=u.transform(t.getMatrix(),r)}),n},transform:function(t,e){return t=t.clone(),r.each(e,function(e){switch(e[0]){case"t":t.translate(e[1],e[2]);break;case"s":t.scale(e[1],e[2]);break;case"r":t.rotate(e[1]);break;case"m":t.multiply(e[1]);break;default:return!1}}),t},getTargetAttrs:function(t,e){var n,r={};for(n in e)r[n]=t.attr(n);return r}};t.exports=u},function(t,e,n){"use strict";var r=(n(17),n(78)),i=n(1),a=n(77),o=function(t){i.mix(this,t),this._init()};i.augment(o,{type:"tween",canvas:null,target:null,startTime:null,endTime:null,duration:null,ratio:0,destroyTarget:!1,needsDestroy:!1,available:!0,repeat:!1,callBack:null,currentFrame:null,startKeyFrame:{attrs:null,matrix:null},endKeyFrame:{attrs:null,matrix:null},interpolations:null,_init:function(){var t=this.startTime,e=this.duration;this.endTime=t+e},tryStep:function(t){var e=(this.startTime,this.duration,this.startKeyFrame,this.target);if(this.currentTime=t,!e||e.get("destroyed"))return this.needsDestroy=!0,!1;try{this.step(t)}catch(t){return this.needsDestroy=!0,!1}},step:function(t){var e,n,o,s=this.target,u=this.startTime,c=t-u,h=this.duration,l=this.startKeyFrame,f=this.endKeyFrame,d=this.easing,g=this.interpolations;return i.isFunction(d)||(d=a[d]?a[d]:a.linear),n=c/h,n=n<=0?0:n>=1?1:n,o=d(n),e=r.getFrame(o,l,f,g,s),e.attrs&&s.attr(e.attrs),e.matrix&&s.setMatrix(e.matrix),this.ratio=n,this.currentFrame=e,this.updateStatus(),s},updateStatus:function(){var t=this.ratio,e=this.callBack,n=this.destroyTarget,r=this.target,i=this.repeat;if(t>=1)if(i){var a=this.currentTime,o=(this.endTime,this.duration);this.startTime=a,this.endTime=a+o,this.reset()}else this.needsDestroy=!0,e&&e.call(r),n&&!r.get("destroyed")&&r.remove(!0)},reset:function(){var t=this.target,e=this.startKeyFrame;e.attrs&&t.attr(e.attrs),e.matrix&&t.setMatrix(e.matrix),this.ratio=0,this.needsDestroy=!1},destroy:function(){var t=this.target,e=this.endKeyFrame;t&&!t.get("destroyed")&&(e.attrs&&t.attr(e.attrs),e.matrix&&t.setMatrix(e.matrix)),this.destroyed=!0}}),t.exports=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a="https://kcart.alipay.com/web/bi.do",o=n(1),s=function(){function t(e){r(this,t);var n=this,i=e||{},s=new Image;o.mix(n,{image:s,server:a},i)}return i(t,[{key:"log",value:function(t){var e=this,n=t||{},r=o.mix({pg:document.URL,r:(new Date).getTime()},n),i=encodeURIComponent(JSON.stringify([r]));e.image.src=e.server+"?BIProfile=merge&d="+i}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function r(t,e){var n=e.get("children");o.each(n,function(e){e.isGroup&&e.get("visible")?r(t,e):t.push(e)})}function i(t,e,n){for(var r=t.get("parent");r!==n;)e.push(r),r=r.get("parent")}var a=n(7).G,o=n(4),s=a.Group,u=function t(e){t.superclass.constructor.call(this,e)};o.extend(u,s),o.augment(u,{drawInner:function(t){var e=this,n=[],a=void 0;return r(n,e),o.radixSort(n,function(t){return t.get("zIndex")}),o.each(n,function(n){a=[],t.save(),i(n,a,e),o.each(a,function(e){e.resetTransform(t)}),n.draw(t),t.restore()}),e}}),t.exports=u},function(t,e,n){"use strict";var r=n(37);r.Node=n(173),r.Edge=n(172),t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(17),a=["color","shape","size","label","tooltip","style"],o=n(174),s="origin",u=function t(e){t.superclass.constructor.call(this,e),this._init()};u.ATTRS={attrs:null,type:null},r.extend(u,i),r.augment(u,{_init:function(){this._initAttrs()},_initAttrs:function(){var t=this,e={};r.each(a,function(t){e[t]=new o({type:t})}),t.set("attrs",e)},_getAttr:function(t){return this.get("attrs")[t]},_updateCallbackMappingAttr:function(t,e){var n=this._getAttr(t);n.mappingType="custom",n.callback=e},_updateAutoMappingAttr:function(t,e,n){var r=this._getAttr(t);r.dims=this._parseDims(e),r.callback=n},_parseDims:function(t){var e=null;return e=r.isArray(t)?t:r.isString(t)?t.split("*"):[t]},mapping:function(t){var e=this,n=e.get("attrs"),i={};return r.each(n,function(e){var n=e.type;r.isNull(t[n])?i[n]=e.getValue(t):i[n]=t[n]}),i.x=t.x?t.x:0,i.y=t.y?t.y:0,i.style=r.mix({},i.style,t.style),i.labelStyle=t.labelStyle,i[s]=t,i.model=t,i}}),r.each(a,function(t){u.prototype[t]=function(e,n){var i=this;return r.isFunction(e)?i._updateCallbackMappingAttr(t,e):("label"!==t||n||(n=function(){return r.toArray(arguments)}),"tooltip"!==t||n||(n=function(){var t=r.toArray(arguments),n=i._parseDims(e),a=[],o=void 0;for(o=0;o<t.length;o++)a.push([n[o],t[o]]);return a}),i._updateAutoMappingAttr(t,e,n)),i}}),t.exports=u},function(t,e,n){"use strict";var r=n(39);n(185),n(184),t.exports=r},function(t,e,n){"use strict";function r(t){var e=i.mix({},s.nodeStyle);return t.color&&(e.stroke=t.color,e.fill=t.color),t.style&&i.mix(e,t.style),e}var i=n(1),a=n(190),o=n(41),s=n(11);t.exports={drawNode:function(t,e,n){var i=r(e),o=a[t](e,n,i);return"text"!==t&&"html"!==t&&o.attr(i),o.set("zIndex",s.zIndex.node),o.set("class","node-key-shape"),o},getSnapAnchor:function(t,e){if(!t||!e)return!1;var n=t.getCenter(),r=t.getAnchorPoints(),a=o.vector(n,e),s=1/0,u=void 0,c=void 0,h=void 0;return i.each(r,function(t){h=o.vector(n,t),u=a.angleTo(h),u>Math.PI&&(u=2*Math.PI-u),u<s&&(s=u,c=t)}),c}}},function(t,e,n){"use strict";var r=n(3);r.buttonPointer=function(t){t._on("mouseenter",function(e){var n=e.shape;n&&n.hasClass("Button")&&t.css({cursor:"pointer"})}),t._on("mouseleave",function(e){var n=e.shape;n&&n.hasClass("Button")&&t.css({cursor:"default"})})}},function(t,e,n){"use strict";var r=n(3),i=function(t){var e=t.get("el");t._on("mousedown",function(){e.focus()}),t._on("domfocus",function(){t.set("domFocus",!0)}),t._on("domblur",function(){t.set("domFocus",!1)})};r.clickFocus=i,t.exports=i},function(t,e,n){"use strict";var r=n(3),i=n(26);r.dragBlank=function(t){i(t,!0)}},function(t,e,n){"use strict";var r=n(3),i=n(4),a=n(87),o=function(t){var e=1,n=1.05,r=t.get("rootGroup"),a=r.get("canvas"),o=setTimeout(function(){},100),s=t.get("wheelScaleLimit"),u=void 0,c=void 0,h=void 0,l=void 0,f=t.get("el");f.style.outline="none",f.setAttribute("tabindex",1),t._on("mousewheel",function(f){var d=t.get("domFocus");if(d&&(u=f.domEvent,u.preventDefault(),c=u.wheelDelta,Math.abs(c)>10)){if(h=a.getPointByClient(u.clientX,u.clientY),h={x:h.x/a.get("pixelRatio"),y:h.y/a.get("pixelRatio")},l=r.getMatrix().clone(),c>0?(e*=n,i.scaleMatrix(n,h,l)):(e/=n,i.scaleMatrix(1/n,h,l)),!i.isBetween(l.elements[0],s[0],s[1]))return;t.setCapture(!1),t.updateMatrix(l),t.refresh(),t.fire("wheelzoom",i.mix({scale:l.elements[0]},f)),clearTimeout(o),o=setTimeout(function(){t.setCapture(!0),t.fire("wheelzoomend",i.mix({scale:l.elements[0]},f)),t.draw(!1)},60)}})};o.dependences=[a],r.wheelZoom=o},function(t,e,n){"use strict";var r={CompactBoxTree:n(222),Dendrogram:n(227),IndentedTree:n(228),LayeredTidyTree:n(229),TreeLayout:n(21),Flow:n(217),Force:n(218),Linear:n(91),Sankey:n(92)};t.exports=r},function(t,e,n){"use strict";var r=n(1),i=function(t){r.mix(this,t),this._init()};r.augment(i,{nodes:null,edges:null,y:0,hasWeight:!1,idField:"name",valueField:"value",sourceField:"source",targetField:"target",sourceWeightField:"sourceWeight",targetWeightField:"targetWeight",maxValue:null,thickness:.05,margin:.01,detachment:!1,_init:function(){var t=this,e=t.nodes,n=t.valueField,i=t.targetWeightField;if(r.isNull(e)){var a=t.edges.slice(0);t.edges=a,r.isNull(a[0][i])&&(t.targetWeightField=t.sourceWeightField),e=t._createNodes()}else e=e.slice(0),t.nodes=e;t.hasWeight&&r.isNull(e[0][n])&&(t._initNodeMap(),t._calculateValue()),t._setMarginWidth(e)},_createNodes:function(){var t=this,e=t.edges,n=t.sourceField,r=t.targetField,i=[],a={};return e.forEach(function(e){var o=e[n],s=e[r];t._creatNode(o,a,i),t._creatNode(s,a,i)}),t.nodes=i,i},_creatNode:function(t,e,n){if(r.isNull(e[t])){var i={id:t};n.push(i),e[t]=i}},_initNodeMap:function(){var t=this,e=t.idField,n=t.targetField,i=t.sourceField,a=t.nodes;if(r.isObject(a))return a;var o={};return r.each(a,function(a){r.isNull(a.id)&&(a.id=a[e]),r.isNull(a.y)||delete a.y,a.inEdges=t._getEdgeOfCurNode(a,n),a.outEdges=t._getEdgeOfCurNode(a,i),o[a.id]=a}),t.nodesMap=o,t.nodes=a,o},_getEdgeOfCurNode:function(t,e){var n=this.edges,r=n.filter(function(n){return n[e]===t.id});return r},_calculateValue:function(){var t=this,e=t.nodes,n=t.valueField;e.forEach(function(e){r.isNull(e[n])&&t._getValueFromEdges(e)})},_getValueFromEdges:function(t){var e=this.valueField,n=this.sourceField,r=this.targetField,i=this.sourceWeightField,a=this.targetWeightField,o=0,s=this.detachment;if(s){var u=0,c=0;t.outEdges.forEach(function(t){c+=t[i]}),t.inEdges.forEach(function(t){u+=t[a]}),o=Math.max(u,c)}else t.outEdges.forEach(function(t){o+=t[i]}),t.inEdges.forEach(function(t){t[n]!==t[r]&&(o+=t[a])});return t[e]=o,o},_setMarginWidth:function(t){var e=this.margin,n=t.length,r=2*n*e;this.marginWidth=r},getNodes:function(){var t=this,e=t.nodes;return t.hasWeight?t._layoutByWeight(e):t._layout(e),e},_layout:function(t){var e=t.length,n=1/e,r=this.y;t.map(function(t,e){return t.x=(e+.5)*n,t.y=r,!0})},_layoutByWeight:function(t){var e=this.y,n=this.marginWidth,r=this.thickness,i=this.valueField,a=0;t.forEach(function(t){a+=t[i]});var o=this.maxValue||a;t.map(function(t){return t.weight=t[i]/o,t.width=t.weight*(1-n),t.height=r,t.y=e,!0}),this._layoutX(t)},_layoutX:function(t){var e=this.margin;t.map(function(n,r){for(var i=0,a=r-1;a>=0;a--)i+=t[a].width+2*e;return n.x=e+.5*n.width+i,!0})},reset:function(){this._init()}}),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(231),a=n(232),o=n(91),s=function(t){r.mix(this,t),this._init()};r.extend(s,o),r.augment(s,{hasWeight:!0,stepField:"step",totalStep:0,calculationTimes:2,_init:function(){var t=this.edges.slice(0);this.edges=t,this._initNode()},_initNode:function(){var t=this,e=t.nodes,n=t.stepField,i=t.valueField;r.isNull(e)?e=t._createNodes():(e=e.slice(0),t.nodes=e),t._initNodeMap(),r.isNull(e[0][n])&&t._calculateStep(),r.isNull(e[0][i])&&t._calculateValue()},_calculateStep:function(){var t=this,e=t.nodes,n=t.stepField;e.forEach(function(e){r.isNull(e[n])&&t._getStepFromEdges(e)});var i=e.filter(function(t){return 0===t.outEdges.length});i.map(function(e){return e.step=t.totalStep-1,!0})},_getValueFromEdges:function(t){var e=this.valueField,n=0,r=t.step;return 0===r?t.outEdges.forEach(function(t){n+=t[e]}):t.inEdges.forEach(function(t){n+=t[e]}),t.value=n,n},_getStepFromEdges:function(t){var e=this,n=e.sourceField,i=0;return t.inEdges.length>0&&t.inEdges.forEach(function(t){var a=e._findObj(t[n]),o=void 0;o=r.isNull(a.step)?e._getStepFromEdges(a):a.step,i=Math.max(o+1,i)}),t.step=i,e.totalStep=Math.max(e.totalStep,i+1),i},_findObj:function(t){var e=this.nodesMap;return e[t]},getNodes:function(){var t=this,e=t.nodes,n=t.sourceField,i=t.targetField,a=t.stepField,o=t.valueField,s=[],u=[],c=[];e.forEach(function(t){var e=t[a];void 0===u[e]&&(u[e]=[]),u[e].push(t),r.isNull(s[e])?s[e]=t[o]:s[e]+=t[o]}),t.maxValue=Math.max.apply(null,s),t.totalStep=u.length,t._setMarginWidth(u[0]),t._layoutByWeight(u[0]),t._layoutNodes(u,n);for(var h=t.calculationTimes;h>0;h--)t._layoutNodes(u.reverse(),i),t._layoutNodes(u.reverse(),n);return u.forEach(function(t){c=c.concat(t)}),t.normalization(c),c},normalization:function(t){var e=1;t.forEach(function(t){t.x>e&&(e=t.x)}),e>1&&t.map(function(t){return t.x=t.x/e,t.width=t.width/e,!0})},_layoutNodes:function(t,e){var n=this;if(t.length>=2){var r=void 0;for(r=1;r<t.length;r++)n.y=r/(n.totalStep-1),n._layoutHighStep(t[r],e),t[r].sort(function(t,e){return t.x-e.x}),n._handleConflict(t[r]);n._layoutX(t[r-1])}},_handleConflict:function(t){var e=this.margin;t.map(function(n,r){return r>0&&n.x-.5*n.width<=t[r-1].x+.5*t[r-1].width+2*e&&(n.x=t[r-1].x+.5*t[r-1].width+2*e+.5*n.width),!0})},_layoutHighStep:function(t,e){var n=this,r=n.valueField,i=n.maxValue,a=n.thickness,o=n.marginWidth,s=n.y,u=e===n.sourceField?n.targetField:n.sourceField;t.map(function(t){var c=n._getEdgeOfCurNode(t,u),h=0,l=void 0;return c.forEach(function(i){l=n._findObj(i[e]);var a=i[r];h+=l.x*a/t[r]}),t.x=h,t.weight=t[r]/i,t.width=t.weight*(1-o),t.height=a,t.y=void 0===t.y?s:t.y,!0})},getEdges:function(){for(var t=this.calculationTimes;t>0;t--)this._layoutEdges();return this.edges},_layoutEdges:function(){var t=this,e=t.nodes,n=t.stepField,r=t.targetField,i=t.sourceField,a=t.totalStep;e.forEach(function(e){0!==e[n]&&t._edgeSort(e.inEdges,i)}),e.forEach(function(e){e[n]!==a&&t._edgeSort(e.outEdges,r)})},_edgeSort:function(t,e){var n=this,r=n.edges;t.sort(function(t,r){return n._findObj(t[e]).x-n._findObj(r[e]).x}),t.forEach(function(o,s){for(var u=0;u<s;u++){var c=n._findIndex(r,t[u]),h=n._findIndex(r,o);n._findObj(t[u][e]).x>n._findObj(o[e]).x?a(r,h,c):i(r,h,c)}})},_findIndex:function(t,e){var n=this.sourceField,r=this.targetField,i=t.findIndex(function(t){return t[n]===e[n]&&t[r]===e[r]});return i}}),t.exports=s},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e,n){n?t.y+=e:t.x+=e,t.children.forEach(function(t){r(t,e,n)})}function i(t,e){var n=e?t.y:t.x;return t.children.forEach(function(t){n=Math.min(i(t,e),n)}),n}function a(t,e){var n=i(t,e);r(t,-n,e)}function o(t,e,n){n?e.y=t.x:e.x=t.x,t.c.forEach(function(t,r){o(t,e.children[r],n)})}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e?(t.x=n,n+=t.width):(t.y=n,n+=t.height),t.children.forEach(function(t){s(t,e,n)})}var u=function t(e,r,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];n(this,t);var o=this;o.w=e||0,o.h=r||0,o.y=i||0,o.x=0,o.c=a||[],o.cs=a.length,o.prelim=0,o.mod=0,o.shift=0,o.change=0,o.tl=null,o.tr=null,o.el=null,o.er=null,o.msel=0,o.mser=0};u.fromNode=function(t,e){if(!t)return null;var n=[];return t.children.forEach(function(t){n.push(u.fromNode(t,e))}),e?new u(t.height,t.width,t.x,n):new u(t.width,t.height,t.y,n)},t.exports=function(t){function e(t){if(0===t.cs)return void n(t);e(t.c[0]);for(var i=y(l(t.c[0].el),0,null),a=1;a<t.cs;++a){e(t.c[a]);var o=l(t.c[a].er);r(t,a,i),i=y(o,a,i)}g(t),n(t)}function n(t){0===t.cs?(t.el=t,t.er=t,t.msel=t.mser=0):(t.el=t.c[0].el,t.msel=t.c[0].msel,t.er=t.c[t.cs-1].er,t.mser=t.c[t.cs-1].mser)}function r(t,e,n){for(var r=t.c[e-1],a=r.mod,o=t.c[e],s=o.mod;null!==r&&null!==o;){l(r)>n.low&&(n=n.nxt);var u=a+r.prelim+r.w-(s+o.prelim);u>0&&(s+=u,i(t,e,n.index,u));var g=l(r),p=l(o);g<=p&&(r=h(r),null!==r&&(a+=r.mod)),g>=p&&(o=c(o),null!==o&&(s+=o.mod))}!r&&o?f(t,e,o,s):r&&!o&&d(t,e,r,a)}function i(t,e,n,r){t.c[e].mod+=r,t.c[e].msel+=r,t.c[e].mser+=r,v(t,e,n,r)}function c(t){return 0===t.cs?t.tl:t.c[0]}function h(t){return 0===t.cs?t.tr:t.c[t.cs-1]}function l(t){return t.y+t.h}function f(t,e,n,r){var i=t.c[0].el;i.tl=n;var a=r-n.mod-t.c[0].msel;i.mod+=a,i.prelim-=a,t.c[0].el=t.c[e].el,t.c[0].msel=t.c[e].msel}function d(t,e,n,r){var i=t.c[e].er;i.tr=n;var a=r-n.mod-t.c[e].mser;i.mod+=a,i.prelim-=a,t.c[e].er=t.c[e-1].er,t.c[e].mser=t.c[e-1].mser}function g(t){t.prelim=(t.c[0].prelim+t.c[0].mod+t.c[t.cs-1].mod+t.c[t.cs-1].prelim+t.c[t.cs-1].w)/2-t.w/2}function p(t,e){e+=t.mod,t.x=t.prelim+e,m(t);for(var n=0;n<t.cs;n++)p(t.c[n],e)}function v(t,e,n,r){if(n!==e-1){var i=e-n;t.c[n+1].shift+=r/i,t.c[e].shift-=r/i,t.c[e].change-=r-r/i}}function m(t){for(var e=0,n=0,r=0;r<t.cs;r++)e+=t.c[r].shift,n+=e+t.c[r].change,t.c[r].mod+=n}function y(t,e,n){for(;null!==n&&t>=n.low;)n=n.nxt;return{low:t,index:e,nxt:n}}var x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},b=x.isHorizontal;s(t,b);var _=u.fromNode(t,b);return e(_),p(_,0),o(_,t,b),a(t,b),t}},function(t,e,n){"use strict";var r=n(43);t.exports=function(t,e){for(var n=new r(t.data,e,!0),i=new r(t.data,e,!0),a=t.children.length,o=Math.round(a/2),s=0;s<a;s++){var u=t.children[s];s<o?i.children.push(u):n.children.push(u)}return{left:n,right:i}}},function(t,e,n){"use strict";function r(t,e,n,r){r.forceAlign?t.align=r.forceAlign:!t.isRoot()||"H"!==r.direction&&"V"!==r.direction?t.align=t.isLeaf()?a(n):n:t.align=r.isHorizontal?"CH":"CV",t.inAnchor=i[e],t.outAnchor=i[n]}var i=n(223),a=n(230);t.exports=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments[4];a?r(t,e,n,i):t.eachNode(function(t){r(t,e,n,i)})}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){o.default.mix(this,t)}var a=n(1),o=r(a),s=n(264);o.default.augment(i,{dynamic:!1,manyBody:!0,forceCollideRadius:function(t){return Math.max(t.width,t.height)/2+2},manyBodyStrength:function(){return-30},width:null,height:null,center:null,nodes:null,edges:null,maxLineWidth:null,dynamicCallback:null,maxLinkDistance:30,callback:null,edgeDistance:null,edgeStrength:null,manyBodyDistanceMax:function(t){return 3*t},getMaxLineWidth:function(){var t=this.edges,e=-(1/0);return o.default.each(t,function(t){t.lineWidth>e&&(e=t.lineWidth)}),e},assignNodesAndEdges:function(t){var e=this;["nodes","edges"].forEach(function(n){o.default.each(e[n],function(e){var r=t[n].find(function(t){return t.id===e.id});r&&(e.x=r.x,e.y=r.y)})})},execute:function(){var t=this.nodes,e=o.default.clone(this.edges),n=this.width?this.width:this.graphWidth,r=this.height?this.height:this.graphHeight,i=this.center?this.center:{x:n/2,y:r/2},a=this.forceCollideRadius,u=this.dynamic,c=this.manyBody,h=this.dynamicCallback,l=this.callback,f=this.getMaxLineWidth(),d=this.maxLinkDistance,g=this.edgeDistance,p=this.edgeStrength,v=(0,s.forceSimulation)(t).force("link",(0,s.forceLink)(e).id(function(t){return t.id}).distance(g?g:function(t){return t.lineWidth/f*d}).strength(p?p:1)).force("collision",(0,s.forceCollide)().radius(a)).force("center",(0,s.forceCenter)(i.x,i.y));if(v.on("end",function(){t.forEach(function(t){delete t.vx,delete t.vy})}),l&&l(v),c&&v.force("charge",(0,s.forceManyBody)().distanceMax(this.manyBodyDistanceMax(n,r))),u)v.on("tick",h);else{v.stop();for(var m=0,y=Math.ceil(Math.log(v.alphaMin())/Math.log(1-v.alphaDecay()));m<y;++m)v.tick();t.forEach(function(t){delete t.vx,delete t.vy})}this.simulation=v},stop:function(){this.simulation.stop()}}),t.exports=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(253),o=r(a),s=n(16),u=r(s),c=n(96),h=r(c),l=n(255),f=r(l);n(256);var d=function t(e){t.superclass.constructor.call(this,e)};d.ATTRS={layout:null,nodeTool:null,layoutCfg:{},dx:0,dy:0,nodeHoverActived:!0,arrow:function(t){var e=t.attr("stroke");return{stroke:e,strokeOpacity:1}},nodeToolCfg:{class:"node-tool",lists:[{html:"\u663e\u793a\u6240\u6709\u6765\u6e90",event:"click",callback:"showSource"},{html:"\u663e\u793a\u6240\u6709\u53bb\u5411",event:"click",callback:"showTargets"},{html:"\u663e\u793a\u6765\u6e90\u4e0e\u53bb\u5411",event:"click",callback:"showAll"}]}},i.Util.extend(d,u.default),i.Util.augment(d,{init:function(){var t=this,e=this.get("graph");this._registerShape(),e.on("beforeinit",function(){var t={default:["dragCanvas","wheelZoom","clickFocus","wheelZoomAutoTexts","clickBlankClearActive"]};e.set("preciseAnchor",!0),e.set("modes",t),e.set("useFreezeSizeGroup",!0),e.set("useEdgeSortGroup",!1),e.set("useNodeSortGroup",!0),e.set("grid",null)}),e.on("afterinit",function(){var n=t.get("nodeToolCfg"),r=t.get("nodeTool");n&&r!==!1&&(r=new f.default(i.Util.mix({graph:e},n)),t.set("nodeTool",r)),e.node().shape("plugin-template-net-analysis-node-shape"),e.edge().shape(function(t){return t.isTreeEdge?"plugin-template-net-analysis-tree-edge-shape":"plugin-template-net-analysis-out-tree-edge-shape"}),r&&t._clickShowNodeTool()}),e.on("afterinit",function(){var n=t.get("layoutCfg"),r=e.get("width"),a=e.get("height"),o=e.get("layout");o||(o=new h.default(i.Util.mix({},{graphWidth:r,graphHeight:a,dynamicCallback:function(){e.updateNodesPosition()},forceCollideRadius:function(t){return Math.max(t.width,t.height)/2+12}},n)),e.set("layout",o))}),e.on("beforerender",function(){var n=e.get("nodes"),r=e.get("edges"),i=(0,o.default)(n,r);i.edges.forEach(function(t){t.isTreeEdge=!0}),e.set("layoutEdgeFilter",function(t){return t.isTreeEdge}),t.set("forest",i)}),this.on("afterrender",function(){var n=t.get("forest"),r=t.get("dx"),i=t.get("dy"),a=n.maxRankNode;t._bindEvent(),t._switchXY(),e.focusPoint({x:a.x+r,y:a.y+i})}),this.get("nodeHoverActived")&&this._onNodeHover()},_registerShape:function(){var t=this.get("arrow");(0,i.registerEdge)("plugin-template-net-analysis-out-tree-edge-shape",{arrowStyle:t}),(0,i.registerEdge)("plugin-template-net-analysis-tree-edge-shape",{arrowStyle:t})},_switchXY:function(){var t=this.get("graph"),e=t.get("rootGroup"),n=e.getBBox();if(n.maxY-n.minY>n.maxX-n.minX){var r=t.get("nodes");r.forEach(function(t){var e=t.x;t.x=t.y,t.y=e}),t.updateNodesPosition()}},_clickShowNodeTool:function(){var t=this.get("graph"),e=this.get("nodeTool");t.on("itemclick",function(t){var n=t.item;"node"===n.get("type")&&e.show(n,t.domX,t.domY)}),t.on("mousedown",function(){e.hide()})},_onNodeHover:function(){var t=this.get("graph");t.on("itemmouseenter",function(e){var n=e.item;if("node"===e.itemType&&!n.get("actived")){var r=n.getGroup(),i=r.get("acitvedOutterShape");i.show(),t.refresh(),t.css({cursor:"pointer"})}}),t.on("itemmouseleave",function(e){var n=e.item;if("node"===e.itemType){if(!n.get("actived")){var r=n.getGroup(),i=r.get("acitvedOutterShape");i.hide(),t.refresh()}t.css({cursor:"default"})}})}}),t.exports=d},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t){return function(e,n){return o(t(e),n)}}function n(t,e){return[t,e]}function r(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=S?10:a>=k?5:a>=A?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=S?10:a>=k?5:a>=A?2:1)}function i(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=S?i*=10:a>=k?i*=5:a>=A&&(i*=2),e<t?-i:i}function a(t){return t.length}var o=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},s=function(t){return 1===t.length&&(t=e(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}},u=s(o),c=u.right,h=u.left,l=function(t,e){null==e&&(e=n);for(var r=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);r<i;)o[r]=e(a,a=t[++r]);return o},f=function(t,e,r){var i,a,o,s,u=t.length,c=e.length,h=new Array(u*c);for(null==r&&(r=n),i=o=0;i<u;++i)for(s=t[i],a=0;a<c;++a,++o)h[o]=r(s,e[a]);return h},d=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},g=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,u=0;if(null==e)for(;++o<i;)isNaN(n=g(t[o]))||(r=n-s,s+=r/++a,u+=r*(n-s));else for(;++o<i;)isNaN(n=g(e(t[o],o,t)))||(r=n-s,s+=r/++a,u+=r*(n-s));if(a>1)return u/(a-1)},v=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},m=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},y=Array.prototype,x=y.slice,b=y.map,_=function(t){return function(){return t}},w=function(t){return t},M=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},S=Math.sqrt(50),k=Math.sqrt(10),A=Math.sqrt(2),C=function(t,e,n){var i,a,o,s,u=-1;if(e=+e,t=+t,n=+n,t===e&&n>0)return[t];if((i=e<t)&&(a=t,t=e,e=a),0===(s=r(t,e,n))||!isFinite(s))return[];if(s>0)for(t=Math.ceil(t/s),e=Math.floor(e/s),o=new Array(a=Math.ceil(e-t+1));++u<a;)o[u]=(t+u)*s;else for(t=Math.floor(t*s),e=Math.ceil(e*s),o=new Array(a=Math.ceil(t-e+1));++u<a;)o[u]=(t-u)/s;return i&&o.reverse(),o},T=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},E=function(){function t(t){var a,o,s=t.length,u=new Array(s);for(a=0;a<s;++a)u[a]=e(t[a],a,t);var h=n(u),l=h[0],f=h[1],d=r(u,l,f);Array.isArray(d)||(d=i(l,f,d),d=M(Math.ceil(l/d)*d,Math.floor(f/d)*d,d));for(var g=d.length;d[0]<=l;)d.shift(),--g;for(;d[g-1]>f;)d.pop(),--g;var p,v=new Array(g+1);for(a=0;a<=g;++a)p=v[a]=[],p.x0=a>0?d[a-1]:l,p.x1=a<g?d[a]:f;for(a=0;a<s;++a)o=u[a],l<=o&&o<=f&&v[c(d,o,0,g)].push(t[a]);return v}var e=w,n=m,r=T;return t.value=function(n){return arguments.length?(e="function"==typeof n?n:_(n),t):e},t.domain=function(e){return arguments.length?(n="function"==typeof e?e:_([e[0],e[1]]),t):n},t.thresholds=function(e){return arguments.length?(r="function"==typeof e?e:_(Array.isArray(e)?x.call(e):e),t):r},t},P=function(t,e,n){if(null==n&&(n=g),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t),s=+n(t[a+1],a+1,t);return o+(s-o)*(i-a)}},I=function(t,e,n){return t=b.call(t,g).sort(o),Math.ceil((n-e)/(2*(P(t,.75)-P(t,.25))*Math.pow(t.length,-1/3)))},N=function(t,e,n){return Math.ceil((n-e)/(3.5*v(t)*Math.pow(t.length,-1/3)))},B=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},F=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=g(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=g(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},O=function(t,e){var n,r=t.length,i=-1,a=[];if(null==e)for(;++i<r;)isNaN(n=g(t[i]))||a.push(n);else for(;++i<r;)isNaN(n=g(e(t[i],i,t)))||a.push(n);return P(a.sort(o),.5)},L=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(r=t[i],e=r.length;--e>=0;)n[--o]=r[e];return n},D=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r},R=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];
6return r},z=function(t,e){if(n=t.length){var n,r,i=0,a=0,s=t[a];for(null==e&&(e=o);++i<n;)(e(r=t[i],s)<0||0!==e(s,s))&&(s=r,a=i);return 0===e(s,s)?a:void 0}},G=function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},j=function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},U=function(t){if(!(i=t.length))return[];for(var e=-1,n=D(t,a),r=new Array(n);++e<n;)for(var i,o=-1,s=r[e]=new Array(i);++o<i;)s[o]=t[o][e];return r},Y=function(){return U(arguments)};t.bisect=c,t.bisectRight=c,t.bisectLeft=h,t.ascending=o,t.bisector=s,t.cross=f,t.descending=d,t.deviation=v,t.extent=m,t.histogram=E,t.thresholdFreedmanDiaconis=I,t.thresholdScott=N,t.thresholdSturges=T,t.max=B,t.mean=F,t.median=O,t.merge=L,t.min=D,t.pairs=l,t.permute=R,t.quantile=P,t.range=M,t.scan=z,t.shuffle=G,t.sum=j,t.ticks=C,t.tickIncrement=r,t.tickStep=i,t.transpose=U,t.variance=p,t.zip=Y,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t){return new n(t)}function n(t){if(!(e=d.exec(t)))throw new Error("invalid format: "+t);var e,n=e[1]||" ",r=e[2]||">",i=e[3]||"-",a=e[4]||"",o=!!e[5],s=e[6]&&+e[6],u=!!e[7],c=e[8]&&+e[8].slice(1),h=e[9]||"";"n"===h?(u=!0,h="g"):f[h]||(h=""),(o||"0"===n&&"="===r)&&(o=!0,n="0",r="="),this.fill=n,this.align=r,this.sign=i,this.symbol=a,this.zero=o,this.width=s,this.comma=u,this.precision=c,this.type=h}function r(e){return g=m(e),t.format=g.format,t.formatPrefix=g.formatPrefix,g}var i,a=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},o=function(t){return t=a(Math.abs(t)),t?t[1]:NaN},s=function(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}},u=function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}},c=function(t,e){t=t.toPrecision(e);t:for(var n,r=t.length,i=1,a=-1;i<r;++i)switch(t[i]){case".":a=n=i;break;case"0":0===a&&(a=i),n=i;break;case"e":break t;default:a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(n+1):t},h=function(t,e){var n=a(t,e);if(!n)return t+"";var r=n[0],o=n[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=r.length;return s===u?r:s>u?r+new Array(s-u+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+a(t,Math.max(0,e+s-1))[0]},l=function(t,e){var n=a(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},f={"":c,"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:h,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},d=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;e.prototype=n.prototype,n.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var g,p=function(t){return t},v=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],m=function(t){function n(t){function n(t){var e,n,u,c=b,f=_;if("c"===x)f=w(t)+f,t="";else{t=+t;var d=t<0;if(t=w(Math.abs(t),y),d&&0===+t&&(d=!1),c=(d?"("===s?s:"-":"-"===s||"("===s?"":s)+c,f=("s"===x?v[8+i/3]:"")+f+(d&&"("===s?")":""),M)for(e=-1,n=t.length;++e<n;)if(u=t.charCodeAt(e),48>u||u>57){f=(46===u?h+t.slice(e+1):t.slice(e))+f,t=t.slice(0,e);break}}m&&!g&&(t=a(t,1/0));var S=c.length+t.length+f.length,k=S<p?new Array(p-S+1).join(r):"";switch(m&&g&&(t=a(k+t,k.length?p-f.length:1/0),k=""),o){case"<":t=c+t+f+k;break;case"=":t=c+k+t+f;break;case"^":t=k.slice(0,S=k.length>>1)+c+t+f+k.slice(S);break;default:t=k+c+t+f}return l(t)}t=e(t);var r=t.fill,o=t.align,s=t.sign,u=t.symbol,g=t.zero,p=t.width,m=t.comma,y=t.precision,x=t.type,b="$"===u?c[0]:"#"===u&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",_="$"===u?c[1]:/[%p]/.test(x)?d:"",w=f[x],M=!x||/[defgprs%]/.test(x);return y=null==y?x?6:12:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}function r(t,r){var i=n((t=e(t),t.type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor(o(r)/3))),s=Math.pow(10,-a),u=v[8+a/3];return function(t){return i(s*t)+u}}var a=t.grouping&&t.thousands?s(t.grouping,t.thousands):p,c=t.currency,h=t.decimal,l=t.numerals?u(t.numerals):p,d=t.percent||"%";return{format:n,formatPrefix:r}};r({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var y=function(t){return Math.max(0,-o(Math.abs(t)))},x=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(o(e)/3)))-o(Math.abs(t)))},b=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,o(e)-o(t))+1};t.formatDefaultLocale=r,t.formatLocale=m,t.formatSpecifier=e,t.precisionFixed=y,t.precisionPrefix=x,t.precisionRound=b,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,r){r(e,n(45))}(this,function(t,e){"use strict";function n(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}function r(t,e){return function(n){return t+n*e}}function i(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)}}function a(t,e){var n=e-t;return n?r(t,n>180||n<-180?n-360*Math.round(n/360):n):C(isNaN(t)?e:t)}function o(t){return 1===(t=+t)?s:function(e,n){return n-e?i(e,n,t):C(isNaN(e)?n:e)}}function s(t,e){var n=e-t;return n?r(t,n):C(isNaN(t)?e:t)}function u(t){return function(n){var r,i,a=n.length,o=new Array(a),s=new Array(a),u=new Array(a);for(r=0;r<a;++r)i=e.rgb(n[r]),o[r]=i.r||0,s[r]=i.g||0,u[r]=i.b||0;return o=t(o),s=t(s),u=t(u),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=u(t),i+""}}}function c(t){return function(){return t}}function h(t){return function(e){return t(e)+""}}function l(t){return"none"===t?j:(_||(_=document.createElement("DIV"),w=document.documentElement,M=document.defaultView),_.style.transform=t,t=M.getComputedStyle(w.appendChild(_),null).getPropertyValue("transform"),w.removeChild(_),t=t.slice(7,-1).split(","),U(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function f(t){return null==t?j:(S||(S=document.createElementNS("http://www.w3.org/2000/svg","g")),S.setAttribute("transform",t),(t=S.transform.baseVal.consolidate())?(t=t.matrix,U(t.a,t.b,t.c,t.d,t.e,t.f)):j)}function d(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}function a(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:B(t,i)},{i:u-2,x:B(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}function o(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:B(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}function s(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:B(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}function u(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:B(t,n)},{i:s-2,x:B(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}return function(e,n){var r=[],i=[];return e=t(e),n=t(n),a(e.translateX,e.translateY,n.translateX,n.translateY,r,i),o(e.rotate,n.rotate,r,i),s(e.skewX,n.skewX,r,i),u(e.scaleX,e.scaleY,n.scaleX,n.scaleY,r,i),e=n=null,function(t){for(var e,n=-1,a=i.length;++n<a;)r[(e=i[n]).i]=e.x(t);return r.join("")}}}function g(t){return((t=Math.exp(t))+1/t)/2}function p(t){return((t=Math.exp(t))-1/t)/2}function v(t){return((t=Math.exp(2*t))-1)/(t+1)}function m(t){return function(n,r){var i=t((n=e.hsl(n)).h,(r=e.hsl(r)).h),a=s(n.s,r.s),o=s(n.l,r.l),u=s(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=a(t),n.l=o(t),n.opacity=u(t),n+""}}}function y(t,n){var r=s((t=e.lab(t)).l,(n=e.lab(n)).l),i=s(t.a,n.a),a=s(t.b,n.b),o=s(t.opacity,n.opacity);return function(e){return t.l=r(e),t.a=i(e),t.b=a(e),t.opacity=o(e),t+""}}function x(t){return function(n,r){var i=t((n=e.hcl(n)).h,(r=e.hcl(r)).h),a=s(n.c,r.c),o=s(n.l,r.l),u=s(n.opacity,r.opacity);return function(t){return n.h=i(t),n.c=a(t),n.l=o(t),n.opacity=u(t),n+""}}}function b(t){return function n(r){function i(n,i){var a=t((n=e.cubehelix(n)).h,(i=e.cubehelix(i)).h),o=s(n.s,i.s),u=s(n.l,i.l),c=s(n.opacity,i.opacity);return function(t){return n.h=a(t),n.s=o(t),n.l=u(Math.pow(t,r)),n.opacity=c(t),n+""}}return r=+r,i.gamma=n,i}(1)}var _,w,M,S,k=function(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*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 n((r-i/e)*e,s,a,o,u)}},A=function(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],u=t[(i+2)%e];return n((r-i/e)*e,a,o,s,u)}},C=function(t){return function(){return t}},T=function t(n){function r(t,n){var r=i((t=e.rgb(t)).r,(n=e.rgb(n)).r),a=i(t.g,n.g),o=i(t.b,n.b),u=s(t.opacity,n.opacity);return function(e){return t.r=r(e),t.g=a(e),t.b=o(e),t.opacity=u(e),t+""}}var i=o(n);return r.gamma=t,r}(1),E=u(k),P=u(A),I=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=R(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}},N=function(t,e){var n=new Date;return t=+t,e-=t,function(r){return n.setTime(t+e*r),n}},B=function(t,e){return t=+t,e-=t,function(n){return t+e*n}},F=function(t,e){var n,r={},i={};null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={});for(n in e)n in t?r[n]=R(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},O=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,L=new RegExp(O.source,"g"),D=function(t,e){var n,r,i,a=O.lastIndex=L.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=O.exec(t))&&(r=L.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:B(n,r)})),a=L.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?h(u[0].x):c(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})},R=function(t,n){var r,i=typeof n;return null==n||"boolean"===i?C(n):("number"===i?B:"string"===i?(r=e.color(n))?(n=r,T):D:n instanceof e.color?T:n instanceof Date?N:Array.isArray(n)?I:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?F:B)(t,n)},z=function(t,e){return t=+t,e-=t,function(n){return Math.round(t+e*n)}},G=180/Math.PI,j={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},U=function(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*G,skewX:Math.atan(u)*G,scaleX:o,scaleY:s}},Y=d(l,"px, ","px)","deg)"),X=d(f,", ",")",")"),H=Math.SQRT2,W=2,q=4,V=1e-12,Z=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],u=e[1],c=e[2],h=s-i,l=u-a,f=h*h+l*l;if(f<V)r=Math.log(c/o)/H,n=function(t){return[i+t*h,a+t*l,o*Math.exp(H*t*r)]};else{var d=Math.sqrt(f),m=(c*c-o*o+q*f)/(2*o*W*d),y=(c*c-o*o-q*f)/(2*c*W*d),x=Math.log(Math.sqrt(m*m+1)-m),b=Math.log(Math.sqrt(y*y+1)-y);r=(b-x)/H,n=function(t){var e=t*r,n=g(x),s=o/(W*d)*(n*v(H*e+x)-p(x));return[i+s*h,a+s*l,o*n/g(H*e+x)]}}return n.duration=1e3*r,n},$=m(a),Q=m(s),K=x(a),J=x(s),tt=b(a),et=b(s),nt=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n};t.interpolate=R,t.interpolateArray=I,t.interpolateBasis=k,t.interpolateBasisClosed=A,t.interpolateDate=N,t.interpolateNumber=B,t.interpolateObject=F,t.interpolateRound=z,t.interpolateString=D,t.interpolateTransformCss=Y,t.interpolateTransformSvg=X,t.interpolateZoom=Z,t.interpolateRgb=T,t.interpolateRgbBasis=E,t.interpolateRgbBasisClosed=P,t.interpolateHsl=$,t.interpolateHslLong=Q,t.interpolateLab=y,t.interpolateHcl=K,t.interpolateHclLong=J,t.interpolateCubehelix=tt,t.interpolateCubehelixLong=et,t.quantize=nt,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,r){r(e,n(47))}(this,function(t,e){"use strict";function n(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function r(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function i(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function a(t){function a(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=vt[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function o(t,n){return function(a){var o,u,c=i(1900),h=s(c,t,a+="",0);if(h!=a.length)return null;if("Q"in c)return new Date(c.Q);if("p"in c&&(c.H=c.H%12+12*c.p),"V"in c){if(c.V<1||c.V>53)return null;"w"in c||(c.w=1),"Z"in c?(o=r(i(c.y)),u=o.getUTCDay(),o=u>4||0===u?e.utcMonday.ceil(o):e.utcMonday(o),o=e.utcDay.offset(o,7*(c.V-1)),c.y=o.getUTCFullYear(),c.m=o.getUTCMonth(),c.d=o.getUTCDate()+(c.w+6)%7):(o=n(i(c.y)),u=o.getDay(),o=u>4||0===u?e.timeMonday.ceil(o):e.timeMonday(o),o=e.timeDay.offset(o,7*(c.V-1)),c.y=o.getFullYear(),c.m=o.getMonth(),c.d=o.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),u="Z"in c?r(i(c.y)).getUTCDay():n(i(c.y)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(u+5)%7:c.w+7*c.U-(u+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,r(c)):n(c)}}function s(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(i=e.charCodeAt(o++),37===i){if(i=e.charAt(o++),a=Qt[i in vt?e.charAt(o++):i],!a||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function ft(t,e,n){var r=zt.exec(e.slice(n));return r?(t.p=Gt[r[0].toLowerCase()],n+r[0].length):-1}function dt(t,e,n){var r=Yt.exec(e.slice(n));return r?(t.w=Xt[r[0].toLowerCase()],n+r[0].length):-1}function gt(t,e,n){var r=jt.exec(e.slice(n));return r?(t.w=Ut[r[0].toLowerCase()],n+r[0].length):-1}function pt(t,e,n){var r=qt.exec(e.slice(n));return r?(t.m=Vt[r[0].toLowerCase()],n+r[0].length):-1}function mt(t,e,n){var r=Ht.exec(e.slice(n));return r?(t.m=Wt[r[0].toLowerCase()],n+r[0].length):-1}function yt(t,e,n){return s(t,It,e,n)}function xt(t,e,n){return s(t,Nt,e,n)}function bt(t,e,n){return s(t,Bt,e,n)}function _t(t){return Lt[t.getDay()]}function wt(t){return Ot[t.getDay()]}function Mt(t){return Rt[t.getMonth()]}function St(t){return Dt[t.getMonth()]}function kt(t){return Ft[+(t.getHours()>=12)]}function At(t){return Lt[t.getUTCDay()]}function Ct(t){return Ot[t.getUTCDay()]}function Tt(t){return Rt[t.getUTCMonth()]}function Et(t){return Dt[t.getUTCMonth()]}function Pt(t){return Ft[+(t.getUTCHours()>=12)]}var It=t.dateTime,Nt=t.date,Bt=t.time,Ft=t.periods,Ot=t.days,Lt=t.shortDays,Dt=t.months,Rt=t.shortMonths,zt=u(Ft),Gt=c(Ft),jt=u(Ot),Ut=c(Ot),Yt=u(Lt),Xt=c(Lt),Ht=u(Dt),Wt=c(Dt),qt=u(Rt),Vt=c(Rt),Zt={a:_t,A:wt,b:Mt,B:St,c:null,d:E,e:E,f:F,H:P,I:I,j:N,L:B,m:O,M:L,p:kt,Q:ht,s:lt,S:D,u:R,U:z,V:G,w:j,W:U,x:null,X:null,y:Y,Y:X,Z:H,"%":ct},$t={a:At,A:Ct,b:Tt,B:Et,c:null,d:W,e:W,f:Q,H:q,I:V,j:Z,L:$,m:K,M:J,p:Pt,Q:ht,s:lt,S:tt,u:et,U:nt,V:rt,w:it,W:at,x:null,X:null,y:ot,Y:st,Z:ut,"%":ct},Qt={a:dt,A:gt,b:pt,B:mt,c:yt,d:x,e:x,f:k,H:_,I:_,j:b,L:S,m:y,M:w,p:ft,Q:C,s:T,S:M,u:l,U:f,V:d,w:h,W:g,x:xt,X:bt,y:v,Y:p,Z:m,"%":A};return Zt.x=a(Nt,Zt),Zt.X=a(Bt,Zt),Zt.c=a(It,Zt),$t.x=a(Nt,$t),$t.X=a(Bt,$t),$t.c=a(It,$t),{format:function(t){var e=a(t+="",Zt);return e.toString=function(){return t},e},parse:function(t){var e=o(t+="",n);return e.toString=function(){return t},e},utcFormat:function(t){var e=a(t+="",$t);return e.toString=function(){return t},e},utcParse:function(t){var e=o(t,r);return e.toString=function(){return t},e}}}function o(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function s(t){return t.replace(xt,"\\$&")}function u(t){return new RegExp("^(?:"+t.map(s).join("|")+")","i")}function c(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function h(t,e,n){var r=mt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function l(t,e,n){var r=mt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function f(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function d(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function g(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function p(t,e,n){var r=mt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function v(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function m(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function y(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function x(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function b(t,e,n){var r=mt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function _(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function w(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function M(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function S(t,e,n){var r=mt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function k(t,e,n){var r=mt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function A(t,e,n){var r=yt.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function C(t,e,n){var r=mt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function T(t,e,n){var r=mt.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function E(t,e){return o(t.getDate(),e,2)}function P(t,e){return o(t.getHours(),e,2)}function I(t,e){return o(t.getHours()%12||12,e,2)}function N(t,n){return o(1+e.timeDay.count(e.timeYear(t),t),n,3)}function B(t,e){return o(t.getMilliseconds(),e,3)}function F(t,e){return B(t,e)+"000"}function O(t,e){return o(t.getMonth()+1,e,2)}function L(t,e){return o(t.getMinutes(),e,2)}function D(t,e){return o(t.getSeconds(),e,2)}function R(t){var e=t.getDay();return 0===e?7:e}function z(t,n){return o(e.timeSunday.count(e.timeYear(t),t),n,2)}function G(t,n){var r=t.getDay();return t=r>=4||0===r?e.timeThursday(t):e.timeThursday.ceil(t),o(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),n,2)}function j(t){return t.getDay()}function U(t,n){return o(e.timeMonday.count(e.timeYear(t),t),n,2)}function Y(t,e){return o(t.getFullYear()%100,e,2)}function X(t,e){return o(t.getFullYear()%1e4,e,4)}function H(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+o(e/60|0,"0",2)+o(e%60,"0",2)}function W(t,e){return o(t.getUTCDate(),e,2)}function q(t,e){return o(t.getUTCHours(),e,2)}function V(t,e){return o(t.getUTCHours()%12||12,e,2)}function Z(t,n){return o(1+e.utcDay.count(e.utcYear(t),t),n,3)}function $(t,e){return o(t.getUTCMilliseconds(),e,3)}function Q(t,e){return $(t,e)+"000"}function K(t,e){return o(t.getUTCMonth()+1,e,2)}function J(t,e){return o(t.getUTCMinutes(),e,2)}function tt(t,e){return o(t.getUTCSeconds(),e,2)}function et(t){var e=t.getUTCDay();return 0===e?7:e}function nt(t,n){return o(e.utcSunday.count(e.utcYear(t),t),n,2)}function rt(t,n){var r=t.getUTCDay();return t=r>=4||0===r?e.utcThursday(t):e.utcThursday.ceil(t),o(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),n,2)}function it(t){return t.getUTCDay()}function at(t,n){return o(e.utcMonday.count(e.utcYear(t),t),n,2)}function ot(t,e){return o(t.getUTCFullYear()%100,e,2)}function st(t,e){return o(t.getUTCFullYear()%1e4,e,4)}function ut(){return"+0000"}function ct(){return"%"}function ht(t){return+t}function lt(t){return Math.floor(+t/1e3)}function ft(e){return pt=a(e),t.timeFormat=pt.format,t.timeParse=pt.parse,t.utcFormat=pt.utcFormat,t.utcParse=pt.utcParse,pt}function dt(t){return t.toISOString()}function gt(t){var e=new Date(t);return isNaN(e)?null:e}var pt,vt={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,yt=/^%/,xt=/[\\^$*+?|[\]().{}]/g;ft({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var bt="%Y-%m-%dT%H:%M:%S.%LZ",_t=Date.prototype.toISOString?dt:t.utcFormat(bt),wt=+new Date("2000-01-01T00:00:00.000Z")?gt:t.utcParse(bt);t.timeFormatDefaultLocale=ft,t.timeFormatLocale=a,t.isoFormat=_t,t.isoParse=wt,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){"use strict";function r(t){var e=new u({directed:!1}),n=t.nodes()[0],r=t.nodeCount();e.setNode(n,{});for(var s,h;i(e,t)<r;)s=a(e,t),h=e.hasNode(s.v)?c(t,s):-c(t,s),o(e,t,h);return e}function i(t,e){function n(r){s.each(e.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;t.hasNode(o)||c(e,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),n(o))})}return s.each(t.nodes(),n),t.nodeCount()}function a(t,e){return s.min(e.edges(),function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return c(e,n)})}function o(t,e,n){s.each(t.nodes(),function(t){e.node(t).rank+=n})}var s=n(5),u=n(15).Graph,c=n(27).slack;t.exports=r},function(t,e,n){function r(t,e,n){a.isArray(e)||(e=[e]);var r=[],o={};return a.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,o,r)}),r}function i(t,e,n,r,o){a.has(r,e)||(r[e]=!0,n||o.push(e),a.each(t.neighbors(e),function(e){i(t,e,n,r,o)}),n&&o.push(e))}var a=n(13);t.exports=r},function(t,e,n){function r(t,e,n,r){return i(t,String(e),n||s,r||function(e){return t.outEdges(e)})}function i(t,e,n,r){var i,a,s={},u=new o,c=function(t){var e=t.v!==i?t.v:t.w,r=s[e],o=n(t),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(e,c))};for(t.nodes().forEach(function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)});u.size()>0&&(i=u.removeMin(),a=s[i],a.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}var a=n(13),o=n(107);t.exports=r;var s=a.constant(1)},function(t,e,n){function r(t){function e(s){var u=a[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(t){i.has(a,t)?a[t].onStack&&(u.lowlink=Math.min(u.lowlink,a[t].index)):(e(t),u.lowlink=Math.min(u.lowlink,a[t].lowlink))}),u.lowlink===u.index){var c,h=[];do c=r.pop(),a[c].onStack=!1,h.push(c);while(s!==c);o.push(h)}}var n=0,r=[],a={},o=[];return t.nodes().forEach(function(t){i.has(a,t)||e(t)}),o}var i=n(13);t.exports=r},function(t,e,n){function r(t){function e(s){if(a.has(r,s))throw new i;a.has(n,s)||(r[s]=!0,n[s]=!0,a.each(t.predecessors(s),e),delete r[s],o.push(s))}var n={},r={},o=[];if(a.each(t.sinks(),e),a.size(n)!==t.nodeCount())throw new i;return o}function i(){}var a=n(13);t.exports=r,r.CycleException=i},function(t,e,n){function r(){this._arr=[],this._keyIndices={}}var i=n(13);t.exports=r,r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(t){return t.key})},r.prototype.has=function(t){return i.has(this._keyIndices,t)},r.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},r.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!i.has(n,t)){var r=this._arr,a=r.length;return n[t]=a,r.push({key:t,priority:e}),this._decrease(a),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},r.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},r.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},r.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&(e=t>>1,!(n[e].priority<r));)this._swap(t,e),t=e},r.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},function(t,e,n){var r;(function(t,i){(function(){function a(t,e){if(t!==e){var n=null===t,r=t===C,i=t===t,a=null===e,o=e===C,s=e===e;if(t>e&&!a||!i||n&&!o&&s||r&&s)return 1;if(t<e&&!n||!s||a&&!r&&i||o&&i)return-1}return 0}function o(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function s(t,e,n){if(e!==e)return y(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function u(t){return"function"==typeof t||!1}function c(t){return null==t?"":t+""}function h(t,e){for(var n=-1,r=t.length;++n<r&&e.indexOf(t.charAt(n))>-1;);return n}function l(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function f(t,e){return a(t.criteria,e.criteria)||t.index-e.index}function d(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,s=i.length,u=n.length;++r<s;){var c=a(i[r],o[r]);if(c){if(r>=u)return c;var h=n[r];return c*("asc"===h||h===!0?1:-1)}}return t.index-e.index}function g(t){return Wt[t]}function p(t){return qt[t]}function v(t,e,n){return e?t=$t[t]:n&&(t=Qt[t]),"\\"+t}function m(t){return"\\"+Qt[t]}function y(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i<r;){var a=t[i];if(a!==a)return i}return-1}function x(t){return!!t&&"object"==typeof t}function b(t){return t<=160&&t>=9&&t<=13||32==t||160==t||5760==t||6158==t||t>=8192&&(t<=8202||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function _(t,e){for(var n=-1,r=t.length,i=-1,a=[];++n<r;)t[n]===e&&(t[n]=W,a[++i]=n);return a}function w(t,e){for(var n,r=-1,i=t.length,a=-1,o=[];++r<i;){var s=t[r],u=e?e(s,r,t):s;r&&n===u||(n=u,o[++a]=s)}return o}function M(t){for(var e=-1,n=t.length;++e<n&&b(t.charCodeAt(e)););return e}function S(t){for(var e=t.length;e--&&b(t.charCodeAt(e)););return e}function k(t){return Vt[t]}function A(t){function e(t){if(x(t)&&!Es(t)&&!(t instanceof i)){if(t instanceof r)return t;if(to.call(t,"__chain__")&&to.call(t,"__wrapped__"))return dr(t)}return new r(t)}function n(){}function r(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}function i(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=To,this.__views__=[]}function b(){var t=new i(this.__wrapped__);return t.__actions__=te(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=te(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=te(this.__views__),t}function J(){if(this.__filtered__){var t=new i(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function rt(){var t=this.__wrapped__.value(),e=this.__dir__,n=Es(t),r=e<0,i=n?t.length:0,a=Wn(0,i,this.__views__),o=a.start,s=a.end,u=s-o,c=r?s:o-1,h=this.__iteratees__,l=h.length,f=0,d=Mo(u,this.__takeCount__);if(!n||i<U||i==u&&d==u)return nn(r&&n?t.reverse():t,this.__actions__);var g=[];t:for(;u--&&f<d;){c+=e;for(var p=-1,v=t[c];++p<l;){var m=h[p],y=m.iteratee,x=m.type,b=y(v);if(x==X)v=b;else if(!b){if(x==Y)continue t;break t}}g[f++]=v}return g}function at(){this.__data__={}}function Wt(t){return this.has(t)&&delete this.__data__[t]}function qt(t){return"__proto__"==t?C:this.__data__[t]}function Vt(t){return"__proto__"!=t&&to.call(this.__data__,t)}function Zt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function $t(t){var e=t?t.length:0;for(this.data={hash:mo(null),set:new ho};e--;)this.push(t[e])}function Qt(t,e){var n=t.data,r="string"==typeof e||Fi(e)?n.set.has(e):n.hash[e];return r?0:-1}function Kt(t){var e=this.data;"string"==typeof t||Fi(t)?e.set.add(t):e.hash[t]=!0}function Jt(t,e){for(var n=-1,r=t.length,i=-1,a=e.length,o=Ga(r+a);++n<r;)o[n]=t[n];for(;++i<a;)o[n++]=e[i];return o}function te(t,e){var n=-1,r=t.length;for(e||(e=Ga(r));++n<r;)e[n]=t[n];return e}function ee(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function ne(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function ae(t,e){for(var n=-1,r=t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function oe(t,e,n,r){for(var i=-1,a=t.length,o=r,s=o;++i<a;){var u=t[i],c=+e(u);n(c,o)&&(o=c,s=u)}return s}function se(t,e){for(var n=-1,r=t.length,i=-1,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[++i]=o)}return a}function ue(t,e){for(var n=-1,r=t.length,i=Ga(r);++n<r;)i[n]=e(t[n],n,t);return i}function ce(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function he(t,e,n,r){var i=-1,a=t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function le(t,e,n,r){var i=t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function fe(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function de(t,e){for(var n=t.length,r=0;n--;)r+=+e(t[n])||0;return r}function ge(t,e){return t===C?e:t}function pe(t,e,n,r){return t!==C&&to.call(r,n)?t:e}function ve(t,e,n){for(var r=-1,i=Gs(e),a=i.length;++r<a;){var o=i[r],s=t[o],u=n(s,e[o],o,t,e);(u===u?u===s:s!==s)&&(s!==C||o in t)||(t[o]=u)}return t}function me(t,e){return null==e?t:xe(e,Gs(e),t)}function ye(t,e){for(var n=-1,r=null==t,i=!r&&Qn(t),a=i?t.length:0,o=e.length,s=Ga(o);++n<o;){var u=e[n];i?s[n]=Kn(u,a)?t[u]:C:s[n]=r?C:t[u]}return s}function xe(t,e,n){n||(n={});for(var r=-1,i=e.length;++r<i;){var a=e[r];n[a]=t[a]}return n}function be(t,e,n){var r=typeof t;return"function"==r?e===C?t:on(t,e,n):null==t?Ca:"object"==r?ze(t):e===C?Ba(t):Ge(t,e)}function _e(t,e,n,r,i,a,o){var s;if(n&&(s=i?n(t,r,i):n(t)),s!==C)return s;if(!Fi(t))return t;var u=Es(t);if(u){if(s=qn(t),!e)return te(t,s)}else{var c=no.call(t),h=c==K;if(c!=et&&c!=q&&(!h||i))return Ht[c]?Zn(t,c,e):i?t:{};if(s=Vn(h?{}:t),!e)return me(s,t)}a||(a=[]),o||(o=[]);for(var l=a.length;l--;)if(a[l]==t)return o[l];return a.push(t),o.push(s),(u?ee:Ie)(t,function(r,i){s[i]=_e(r,e,n,i,t,a,o)}),s}function we(t,e,n){if("function"!=typeof t)throw new Za(H);return lo(function(){t.apply(C,n)},e)}function Me(t,e){var n=t?t.length:0,r=[];if(!n)return r;var i=-1,a=Yn(),o=a==s,u=o&&e.length>=U?pn(e):null,c=e.length;u&&(a=Qt,o=!1,e=u);t:for(;++i<n;){var h=t[i];if(o&&h===h){for(var l=c;l--;)if(e[l]===h)continue t;r.push(h)}else a(e,h,0)<0&&r.push(h)}return r}function Se(t,e){var n=!0;return Lo(t,function(t,r,i){return n=!!e(t,r,i)}),n}function ke(t,e,n,r){var i=r,a=i;return Lo(t,function(t,o,s){var u=+e(t,o,s);(n(u,i)||u===r&&u===a)&&(i=u,a=t)}),a}function Ae(t,e,n,r){var i=t.length;for(n=null==n?0:+n||0,n<0&&(n=-n>i?0:i+n),r=r===C||r>i?i:+r||0,r<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;n<i;)t[n++]=e;return t}function Ce(t,e){var n=[];return Lo(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Te(t,e,n,r){var i;return n(t,function(t,n,a){if(e(t,n,a))return i=r?n:t,!1}),i}function Ee(t,e,n,r){r||(r=[]);for(var i=-1,a=t.length;++i<a;){var o=t[i];x(o)&&Qn(o)&&(n||Es(o)||ki(o))?e?Ee(o,e,n,r):ce(r,o):n||(r[r.length]=o)}return r;
7}function Pe(t,e){return Ro(t,e,ta)}function Ie(t,e){return Ro(t,e,Gs)}function Ne(t,e){return zo(t,e,Gs)}function Be(t,e){for(var n=-1,r=e.length,i=-1,a=[];++n<r;){var o=e[n];Bi(t[o])&&(a[++i]=o)}return a}function Fe(t,e,n){if(null!=t){n!==C&&n in lr(t)&&(e=[n]);for(var r=0,i=e.length;null!=t&&r<i;)t=t[e[r++]];return r&&r==i?t:C}}function Oe(t,e,n,r,i,a){return t===e||(null==t||null==e||!Fi(t)&&!x(e)?t!==t&&e!==e:Le(t,e,Oe,n,r,i,a))}function Le(t,e,n,r,i,a,o){var s=Es(t),u=Es(e),c=V,h=V;s||(c=no.call(t),c==q?c=et:c!=et&&(s=Yi(t))),u||(h=no.call(e),h==q?h=et:h!=et&&(u=Yi(e)));var l=c==et,f=h==et,d=c==h;if(d&&!s&&!l)return zn(t,e,c);if(!i){var g=l&&to.call(t,"__wrapped__"),p=f&&to.call(e,"__wrapped__");if(g||p)return n(g?t.value():t,p?e.value():e,r,i,a,o)}if(!d)return!1;a||(a=[]),o||(o=[]);for(var v=a.length;v--;)if(a[v]==t)return o[v]==e;a.push(t),o.push(e);var m=(s?Rn:Gn)(t,e,n,r,i,a,o);return a.pop(),o.pop(),m}function De(t,e,n){var r=e.length,i=r,a=!n;if(null==t)return!i;for(t=lr(t);r--;){var o=e[r];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++r<i;){o=e[r];var s=o[0],u=t[s],c=o[1];if(a&&o[2]){if(u===C&&!(s in t))return!1}else{var h=n?n(u,c,s):C;if(!(h===C?Oe(c,u,n,!0):h))return!1}}return!0}function Re(t,e){var n=-1,r=Qn(t)?Ga(t.length):[];return Lo(t,function(t,i,a){r[++n]=e(t,i,a)}),r}function ze(t){var e=Xn(t);if(1==e.length&&e[0][2]){var n=e[0][0],r=e[0][1];return function(t){return null!=t&&(t[n]===r&&(r!==C||n in lr(t)))}}return function(t){return De(t,e)}}function Ge(t,e){var n=Es(t),r=tr(t)&&rr(e),i=t+"";return t=fr(t),function(a){if(null==a)return!1;var o=i;if(a=lr(a),(n||!r)&&!(o in a)){if(a=1==t.length?a:Fe(a,Ve(t,0,-1)),null==a)return!1;o=Ar(t),a=lr(a)}return a[o]===e?e!==C||o in a:Oe(e,a[o],C,!0)}}function je(t,e,n,r,i){if(!Fi(t))return t;var a=Qn(e)&&(Es(e)||Yi(e)),o=a?C:Gs(e);return ee(o||e,function(s,u){if(o&&(u=s,s=e[u]),x(s))r||(r=[]),i||(i=[]),Ue(t,e,u,je,n,r,i);else{var c=t[u],h=n?n(c,s,u,t,e):C,l=h===C;l&&(h=s),h===C&&(!a||u in t)||!l&&(h===h?h===c:c!==c)||(t[u]=h)}}),t}function Ue(t,e,n,r,i,a,o){for(var s=a.length,u=e[n];s--;)if(a[s]==u)return void(t[n]=o[s]);var c=t[n],h=i?i(c,u,n,t,e):C,l=h===C;l&&(h=u,Qn(u)&&(Es(u)||Yi(u))?h=Es(c)?c:Qn(c)?te(c):[]:Gi(u)||ki(u)?h=ki(c)?Vi(c):Gi(c)?c:{}:l=!1),a.push(u),o.push(h),l?t[n]=r(h,u,i,a,o):(h===h?h!==c:c===c)&&(t[n]=h)}function Ye(t){return function(e){return null==e?C:e[t]}}function Xe(t){var e=t+"";return t=fr(t),function(n){return Fe(n,t,e)}}function He(t,e){for(var n=t?e.length:0;n--;){var r=e[n];if(r!=i&&Kn(r)){var i=r;fo.call(t,r,1)}}return t}function We(t,e){return t+yo(Ao()*(e-t+1))}function qe(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n}function Ve(t,e,n){var r=-1,i=t.length;e=null==e?0:+e||0,e<0&&(e=-e>i?0:i+e),n=n===C||n>i?i:+n||0,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Ga(i);++r<i;)a[r]=t[r+e];return a}function Ze(t,e){var n;return Lo(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function $e(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Qe(t,e,n){var r=jn(),i=-1;e=ue(e,function(t){return r(t)});var a=Re(t,function(t){var n=ue(e,function(e){return e(t)});return{criteria:n,index:++i,value:t}});return $e(a,function(t,e){return d(t,e,n)})}function Ke(t,e){var n=0;return Lo(t,function(t,r,i){n+=+e(t,r,i)||0}),n}function Je(t,e){var n=-1,r=Yn(),i=t.length,a=r==s,o=a&&i>=U,u=o?pn():null,c=[];u?(r=Qt,a=!1):(o=!1,u=e?[]:c);t:for(;++n<i;){var h=t[n],l=e?e(h,n,t):h;if(a&&h===h){for(var f=u.length;f--;)if(u[f]===l)continue t;e&&u.push(l),c.push(h)}else r(u,l,0)<0&&((e||o)&&u.push(l),c.push(h))}return c}function tn(t,e){for(var n=-1,r=e.length,i=Ga(r);++n<r;)i[n]=t[e[n]];return i}function en(t,e,n,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&e(t[a],a,t););return n?Ve(t,r?0:a,r?a+1:i):Ve(t,r?a+1:0,r?i:a)}function nn(t,e){var n=t;n instanceof i&&(n=n.value());for(var r=-1,a=e.length;++r<a;){var o=e[r];n=o.func.apply(o.thisArg,ce([n],o.args))}return n}function rn(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e===e&&i<=Io){for(;r<i;){var a=r+i>>>1,o=t[a];(n?o<=e:o<e)&&null!==o?r=a+1:i=a}return i}return an(t,e,Ca,n)}function an(t,e,n,r){e=n(e);for(var i=0,a=t?t.length:0,o=e!==e,s=null===e,u=e===C;i<a;){var c=yo((i+a)/2),h=n(t[c]),l=h!==C,f=h===h;if(o)var d=f||r;else d=s?f&&l&&(r||null!=h):u?f&&(r||l):null!=h&&(r?h<=e:h<e);d?i=c+1:a=c}return Mo(a,Po)}function on(t,e,n){if("function"!=typeof t)return Ca;if(e===C)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,a){return t.call(e,n,r,i,a)};case 5:return function(n,r,i,a,o){return t.call(e,n,r,i,a,o)}}return function(){return t.apply(e,arguments)}}function sn(t){var e=new ao(t.byteLength),n=new go(e);return n.set(new go(t)),e}function un(t,e,n){for(var r=n.length,i=-1,a=wo(t.length-r,0),o=-1,s=e.length,u=Ga(s+a);++o<s;)u[o]=e[o];for(;++i<r;)u[n[i]]=t[i];for(;a--;)u[o++]=t[i++];return u}function cn(t,e,n){for(var r=-1,i=n.length,a=-1,o=wo(t.length-i,0),s=-1,u=e.length,c=Ga(o+u);++a<o;)c[a]=t[a];for(var h=a;++s<u;)c[h+s]=e[s];for(;++r<i;)c[h+n[r]]=t[a++];return c}function hn(t,e){return function(n,r,i){var a=e?e():{};if(r=jn(r,i,3),Es(n))for(var o=-1,s=n.length;++o<s;){var u=n[o];t(a,u,r(u,o,n),n)}else Lo(n,function(e,n,i){t(a,e,r(e,n,i),i)});return a}}function ln(t){return mi(function(e,n){var r=-1,i=null==e?0:n.length,a=i>2?n[i-2]:C,o=i>2?n[2]:C,s=i>1?n[i-1]:C;for("function"==typeof a?(a=on(a,s,5),i-=2):(a="function"==typeof s?s:C,i-=a?1:0),o&&Jn(n[0],n[1],o)&&(a=i<3?C:a,i=1);++r<i;){var u=n[r];u&&t(e,u,a)}return e})}function fn(t,e){return function(n,r){var i=n?Uo(n):0;if(!nr(i))return t(n,r);for(var a=e?i:-1,o=lr(n);(e?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function dn(t){return function(e,n,r){for(var i=lr(e),a=r(e),o=a.length,s=t?o:-1;t?s--:++s<o;){var u=a[s];if(n(i[u],u,i)===!1)break}return e}}function gn(t,e){function n(){var i=this&&this!==re&&this instanceof n?r:t;return i.apply(e,arguments)}var r=mn(t);return n}function pn(t){return mo&&ho?new $t(t):null}function vn(t){return function(e){for(var n=-1,r=Sa(ha(e)),i=r.length,a="";++n<i;)a=t(a,r[n],n);return a}}function mn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Oo(t.prototype),r=t.apply(n,e);return Fi(r)?r:n}}function yn(t){function e(n,r,i){i&&Jn(n,r,i)&&(r=C);var a=Dn(n,t,C,C,C,C,C,r);return a.placeholder=e.placeholder,a}return e}function xn(t,e){return mi(function(n){var r=n[0];return null==r?r:(n.push(e),t.apply(C,n))})}function bn(t,e){return function(n,r,i){if(i&&Jn(n,r,i)&&(r=C),r=jn(r,i,3),1==r.length){n=Es(n)?n:hr(n);var a=oe(n,r,t,e);if(!n.length||a!==e)return a}return ke(n,r,t,e)}}function _n(t,e){return function(n,r,i){if(r=jn(r,i,3),Es(n)){var a=o(n,r,e);return a>-1?n[a]:C}return Te(n,r,t)}}function wn(t){return function(e,n,r){return e&&e.length?(n=jn(n,r,3),o(e,n,t)):-1}}function Mn(t){return function(e,n,r){return n=jn(n,r,3),Te(e,n,t,!0)}}function Sn(t){return function(){for(var e,n=arguments.length,i=t?n:-1,a=0,o=Ga(n);t?i--:++i<n;){var s=o[a++]=arguments[i];if("function"!=typeof s)throw new Za(H);!e&&r.prototype.thru&&"wrapper"==Un(s)&&(e=new r([],!0))}for(i=e?-1:n;++i<n;){s=o[i];var u=Un(s),c="wrapper"==u?jo(s):C;e=c&&er(c[0])&&c[1]==(L|N|F|D)&&!c[4].length&&1==c[9]?e[Un(c[0])].apply(e,c[3]):1==s.length&&er(s)?e[u]():e.thru(s)}return function(){var t=arguments,r=t[0];if(e&&1==t.length&&Es(r)&&r.length>=U)return e.plant(r).value();for(var i=0,a=n?o[i].apply(this,t):r;++i<n;)a=o[i].call(this,a);return a}}}function kn(t,e){return function(n,r,i){return"function"==typeof r&&i===C&&Es(n)?t(n,r):e(n,on(r,i,3))}}function An(t){return function(e,n,r){return"function"==typeof n&&r===C||(n=on(n,r,3)),t(e,n,ta)}}function Cn(t){return function(e,n,r){return"function"==typeof n&&r===C||(n=on(n,r,3)),t(e,n)}}function Tn(t){return function(e,n,r){var i={};return n=jn(n,r,3),Ie(e,function(e,r,a){var o=n(e,r,a);r=t?o:r,e=t?e:o,i[r]=e}),i}}function En(t){return function(e,n,r){return e=c(e),(t?e:"")+Bn(e,n,r)+(t?"":e)}}function Pn(t){var e=mi(function(n,r){var i=_(r,e.placeholder);return Dn(n,t,C,r,i)});return e}function In(t,e){return function(n,r,i,a){var o=arguments.length<3;return"function"==typeof r&&a===C&&Es(n)?t(n,r,i,o):qe(n,jn(r,a,4),i,o,e)}}function Nn(t,e,n,r,i,a,o,s,u,c){function h(){for(var y=arguments.length,x=y,b=Ga(y);x--;)b[x]=arguments[x];if(r&&(b=un(b,r,i)),a&&(b=cn(b,a,o)),g||v){var w=h.placeholder,M=_(b,w);if(y-=M.length,y<c){var S=s?te(s):C,k=wo(c-y,0),A=g?M:C,T=g?C:M,I=g?b:C,N=g?C:b;e|=g?F:O,e&=~(g?O:F),p||(e&=~(E|P));var B=[t,e,n,I,A,N,T,S,u,k],L=Nn.apply(C,B);return er(t)&&Yo(L,B),L.placeholder=w,L}}var D=f?n:this,R=d?D[t]:t;return s&&(b=ur(b,s)),l&&u<b.length&&(b.length=u),this&&this!==re&&this instanceof h&&(R=m||mn(t)),R.apply(D,b)}var l=e&L,f=e&E,d=e&P,g=e&N,p=e&I,v=e&B,m=d?C:mn(t);return h}function Bn(t,e,n){var r=t.length;if(e=+e,r>=e||!bo(e))return"";var i=e-r;return n=null==n?" ":n+"",va(n,vo(i/n.length)).slice(0,i)}function Fn(t,e,n,r){function i(){for(var e=-1,s=arguments.length,u=-1,c=r.length,h=Ga(c+s);++u<c;)h[u]=r[u];for(;s--;)h[u++]=arguments[++e];var l=this&&this!==re&&this instanceof i?o:t;return l.apply(a?n:this,h)}var a=e&E,o=mn(t);return i}function On(t){var e=Xa[t];return function(t,n){return n=n===C?0:+n||0,n?(n=uo(10,n),e(t*n)/n):e(t)}}function Ln(t){return function(e,n,r,i){var a=jn(r);return null==r&&a===be?rn(e,n,t):an(e,n,a(r,i,1),t)}}function Dn(t,e,n,r,i,a,o,s){var u=e&P;if(!u&&"function"!=typeof t)throw new Za(H);var c=r?r.length:0;if(c||(e&=~(F|O),r=i=C),c-=i?i.length:0,e&O){var h=r,l=i;r=i=C}var f=u?C:jo(t),d=[t,e,n,r,i,h,l,a,o,s];if(f&&(ir(d,f),e=d[1],s=d[9]),d[9]=null==s?u?0:t.length:wo(s-c,0)||0,e==E)var g=gn(d[0],d[2]);else g=e!=F&&e!=(E|F)||d[4].length?Nn.apply(C,d):Fn.apply(C,d);var p=f?Go:Yo;return p(g,d)}function Rn(t,e,n,r,i,a,o){var s=-1,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;for(;++s<u;){var h=t[s],l=e[s],f=r?r(i?l:h,i?h:l,s):C;if(f!==C){if(f)continue;return!1}if(i){if(!fe(e,function(t){return h===t||n(h,t,r,i,a,o)}))return!1}else if(h!==l&&!n(h,l,r,i,a,o))return!1}return!0}function zn(t,e,n){switch(n){case Z:case $:return+t==+e;case Q:return t.name==e.name&&t.message==e.message;case tt:return t!=+t?e!=+e:t==+e;case nt:case it:return t==e+""}return!1}function Gn(t,e,n,r,i,a,o){var s=Gs(t),u=s.length,c=Gs(e),h=c.length;if(u!=h&&!i)return!1;for(var l=u;l--;){var f=s[l];if(!(i?f in e:to.call(e,f)))return!1}for(var d=i;++l<u;){f=s[l];var g=t[f],p=e[f],v=r?r(i?p:g,i?g:p,f):C;if(!(v===C?n(g,p,r,i,a,o):v))return!1;d||(d="constructor"==f)}if(!d){var m=t.constructor,y=e.constructor;if(m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y))return!1}return!0}function jn(t,n,r){var i=e.callback||ka;return i=i===ka?be:i,r?i(t,n,r):i}function Un(t){for(var e=t.name,n=Fo[e],r=n?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function Yn(t,n,r){var i=e.indexOf||Sr;return i=i===Sr?s:i,t?i(t,n,r):i}function Xn(t){for(var e=ea(t),n=e.length;n--;)e[n][2]=rr(e[n][1]);return e}function Hn(t,e){var n=null==t?C:t[e];return Di(n)?n:C}function Wn(t,e,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=Mo(e,t+o);break;case"takeRight":t=wo(t,e-o)}}return{start:t,end:e}}function qn(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&to.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Vn(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Wa),new e}function Zn(t,e,n){var r=t.constructor;switch(e){case ot:return sn(t);case Z:case $:return new r(+t);case st:case ut:case ct:case ht:case lt:case ft:case dt:case gt:case pt:var i=t.buffer;return new r(n?sn(i):i,t.byteOffset,t.length);case tt:case it:return new r(t);case nt:var a=new r(t.source,Ft.exec(t));a.lastIndex=t.lastIndex}return a}function $n(t,e,n){null==t||tr(e,t)||(e=fr(e),t=1==e.length?t:Fe(t,Ve(e,0,-1)),e=Ar(e));var r=null==t?t:t[e];return null==r?C:r.apply(t,n)}function Qn(t){return null!=t&&nr(Uo(t))}function Kn(t,e){return t="number"==typeof t||Dt.test(t)?+t:-1,e=null==e?No:e,t>-1&&t%1==0&&t<e}function Jn(t,e,n){if(!Fi(n))return!1;var r=typeof e;if("number"==r?Qn(n)&&Kn(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function tr(t,e){var n=typeof t;if("string"==n&&Ct.test(t)||"number"==n)return!0;if(Es(t))return!1;var r=!At.test(t);return r||null!=e&&t in lr(e)}function er(t){var n=Un(t);if(!(n in i.prototype))return!1;var r=e[n];if(t===r)return!0;var a=jo(r);return!!a&&t===a[0]}function nr(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=No}function rr(t){return t===t&&!Fi(t)}function ir(t,e){var n=t[1],r=e[1],i=n|r,a=i<L,o=r==L&&n==N||r==L&&n==D&&t[7].length<=e[8]||r==(L|D)&&n==N;if(!a&&!o)return t;r&E&&(t[2]=e[2],i|=n&E?0:I);var s=e[3];if(s){var u=t[3];t[3]=u?un(u,s,e[4]):te(s),t[4]=u?_(t[3],W):te(e[4])}return s=e[5],s&&(u=t[5],t[5]=u?cn(u,s,e[6]):te(s),t[6]=u?_(t[5],W):te(e[6])),s=e[7],s&&(t[7]=te(s)),r&L&&(t[8]=null==t[8]?e[8]:Mo(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function ar(t,e){return t===C?e:Ps(t,e,ar)}function or(t,e){t=lr(t);for(var n=-1,r=e.length,i={};++n<r;){var a=e[n];a in t&&(i[a]=t[a])}return i}function sr(t,e){var n={};return Pe(t,function(t,r,i){e(t,r,i)&&(n[r]=t)}),n}function ur(t,e){for(var n=t.length,r=Mo(e.length,n),i=te(t);r--;){var a=e[r];t[r]=Kn(a,n)?i[a]:C}return t}function cr(t){for(var e=ta(t),n=e.length,r=n&&t.length,i=!!r&&nr(r)&&(Es(t)||ki(t)),a=-1,o=[];++a<n;){var s=e[a];(i&&Kn(s,r)||to.call(t,s))&&o.push(s)}return o}function hr(t){return null==t?[]:Qn(t)?Fi(t)?t:Wa(t):aa(t)}function lr(t){return Fi(t)?t:Wa(t)}function fr(t){if(Es(t))return t;var e=[];return c(t).replace(Tt,function(t,n,r,i){e.push(r?i.replace(Nt,"$1"):n||t)}),e}function dr(t){return t instanceof i?t.clone():new r(t.__wrapped__,t.__chain__,te(t.__actions__))}function gr(t,e,n){e=(n?Jn(t,e,n):null==e)?1:wo(yo(e)||1,1);for(var r=0,i=t?t.length:0,a=-1,o=Ga(vo(i/e));r<i;)o[++a]=Ve(t,r,r+=e);return o}function pr(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++e<n;){var a=t[e];a&&(i[++r]=a)}return i}function vr(t,e,n){var r=t?t.length:0;return r?((n?Jn(t,e,n):null==e)&&(e=1),Ve(t,e<0?0:e)):[]}function mr(t,e,n){var r=t?t.length:0;return r?((n?Jn(t,e,n):null==e)&&(e=1),e=r-(+e||0),Ve(t,0,e<0?0:e)):[]}function yr(t,e,n){return t&&t.length?en(t,jn(e,n,3),!0,!0):[]}function xr(t,e,n){return t&&t.length?en(t,jn(e,n,3),!0):[]}function br(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Jn(t,e,n)&&(n=0,r=i),Ae(t,e,n,r)):[]}function _r(t){return t?t[0]:C}function wr(t,e,n){var r=t?t.length:0;return n&&Jn(t,e,n)&&(e=!1),r?Ee(t,e):[]}function Mr(t){var e=t?t.length:0;return e?Ee(t,!0):[]}function Sr(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?wo(r+n,0):n;else if(n){var i=rn(t,e);return i<r&&(e===e?e===t[i]:t[i]!==t[i])?i:-1}return s(t,e,n||0)}function kr(t){return mr(t,1)}function Ar(t){var e=t?t.length:0;return e?t[e-1]:C}function Cr(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?wo(r+n,0):Mo(n||0,r-1))+1;else if(n){i=rn(t,e,!0)-1;var a=t[i];return(e===e?e===a:a!==a)?i:-1}if(e!==e)return y(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Tr(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=Yn(),i=t.length;++n<i;)for(var a=0,o=t[n];(a=r(e,o,a))>-1;)fo.call(e,a,1);return e}function Er(t,e,n){var r=[];if(!t||!t.length)return r;var i=-1,a=[],o=t.length;for(e=jn(e,n,3);++i<o;){var s=t[i];e(s,i,t)&&(r.push(s),a.push(i))}return He(t,a),r}function Pr(t){return vr(t,1)}function Ir(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&Jn(t,e,n)&&(e=0,n=r),Ve(t,e,n)):[]}function Nr(t,e,n){var r=t?t.length:0;return r?((n?Jn(t,e,n):null==e)&&(e=1),Ve(t,0,e<0?0:e)):[]}function Br(t,e,n){var r=t?t.length:0;return r?((n?Jn(t,e,n):null==e)&&(e=1),e=r-(+e||0),Ve(t,e<0?0:e)):[]}function Fr(t,e,n){return t&&t.length?en(t,jn(e,n,3),!1,!0):[]}function Or(t,e,n){return t&&t.length?en(t,jn(e,n,3)):[]}function Lr(t,e,n,r){var i=t?t.length:0;if(!i)return[];null!=e&&"boolean"!=typeof e&&(r=n,n=Jn(t,e,r)?C:e,e=!1);var a=jn();return null==n&&a===be||(n=a(n,r,3)),e&&Yn()==s?w(t,n):Je(t,n)}function Dr(t){if(!t||!t.length)return[];var e=-1,n=0;t=se(t,function(t){if(Qn(t))return n=wo(t.length,n),!0});for(var r=Ga(n);++e<n;)r[e]=ue(t,Ye(e));return r}function Rr(t,e,n){var r=t?t.length:0;if(!r)return[];var i=Dr(t);return null==e?i:(e=on(e,n,4),ue(i,function(t){return he(t,e,C,!0)}))}function zr(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Qn(n))var r=r?ce(Me(r,n),Me(n,r)):n}return r?Je(r):[]}function Gr(t,e){var n=-1,r=t?t.length:0,i={};for(!r||e||Es(t[0])||(e=[]);++n<r;){var a=t[n];e?i[a]=e[n]:a&&(i[a[0]]=a[1])}return i}function jr(t){var n=e(t);return n.__chain__=!0,n}function Ur(t,e,n){return e.call(n,t),t}function Yr(t,e,n){return e.call(n,t)}function Xr(){return jr(this)}function Hr(){return new r(this.value(),this.__chain__)}function Wr(t){for(var e,r=this;r instanceof n;){var i=dr(r);e?a.__wrapped__=i:e=i;var a=i;r=r.__wrapped__}return a.__wrapped__=t,e}function qr(){var t=this.__wrapped__,e=function(t){return n&&n.__dir__<0?t:t.reverse()};if(t instanceof i){var n=t;return this.__actions__.length&&(n=new i(this)),n=n.reverse(),n.__actions__.push({func:Yr,args:[e],thisArg:C}),new r(n,this.__chain__)}return this.thru(e)}function Vr(){return this.value()+""}function Zr(){return nn(this.__wrapped__,this.__actions__)}function $r(t,e,n){var r=Es(t)?ae:Se;return n&&Jn(t,e,n)&&(e=C),"function"==typeof e&&n===C||(e=jn(e,n,3)),r(t,e)}function Qr(t,e,n){var r=Es(t)?se:Ce;return e=jn(e,n,3),r(t,e)}function Kr(t,e){return is(t,ze(e))}function Jr(t,e,n,r){var i=t?Uo(t):0;return nr(i)||(t=aa(t),i=t.length),n="number"!=typeof n||r&&Jn(e,n,r)?0:n<0?wo(i+n,0):n||0,"string"==typeof t||!Es(t)&&Ui(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Yn(t,e,n)>-1}function ti(t,e,n){var r=Es(t)?ue:Re;return e=jn(e,n,3),r(t,e)}function ei(t,e){return ti(t,Ba(e))}function ni(t,e,n){var r=Es(t)?se:Ce;return e=jn(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function ri(t,e,n){if(n?Jn(t,e,n):null==e){t=hr(t);var r=t.length;return r>0?t[We(0,r-1)]:C}var i=-1,a=qi(t),r=a.length,o=r-1;for(e=Mo(e<0?0:+e||0,r);++i<e;){var s=We(i,o),u=a[s];a[s]=a[i],a[i]=u}return a.length=e,a}function ii(t){return ri(t,To)}function ai(t){var e=t?Uo(t):0;return nr(e)?e:Gs(t).length}function oi(t,e,n){var r=Es(t)?fe:Ze;return n&&Jn(t,e,n)&&(e=C),"function"==typeof e&&n===C||(e=jn(e,n,3)),r(t,e)}function si(t,e,n){if(null==t)return[];n&&Jn(t,e,n)&&(e=C);var r=-1;e=jn(e,n,3);var i=Re(t,function(t,n,i){return{criteria:e(t,n,i),index:++r,value:t}});return $e(i,f)}function ui(t,e,n,r){return null==t?[]:(r&&Jn(e,n,r)&&(n=C),Es(e)||(e=null==e?[]:[e]),Es(n)||(n=null==n?[]:[n]),Qe(t,e,n))}function ci(t,e){return Qr(t,ze(e))}function hi(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Za(H);var n=t;t=e,e=n}return t=bo(t=+t)?t:0,function(){if(--t<1)return e.apply(this,arguments)}}function li(t,e,n){return n&&Jn(t,e,n)&&(e=C),e=t&&null==e?t.length:wo(+e||0,0),Dn(t,L,C,C,C,C,e)}function fi(t,e){var n;if("function"!=typeof e){if("function"!=typeof t)throw new Za(H);var r=t;t=e,e=r}return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=C),n}}function di(t,e,n){function r(){d&&oo(d),c&&oo(c),p=0,c=d=g=C}function i(e,n){n&&oo(n),c=d=g=C,e&&(p=ps(),h=t.apply(f,u),d||c||(u=f=C))}function a(){var t=e-(ps()-l);t<=0||t>e?i(g,c):d=lo(a,t)}function o(){i(m,d)}function s(){if(u=arguments,l=ps(),f=this,g=m&&(d||!y),v===!1)var n=y&&!d;else{c||y||(p=l);var r=v-(l-p),i=r<=0||r>v;i?(c&&(c=oo(c)),p=l,h=t.apply(f,u)):c||(c=lo(o,r))}return i&&d?d=oo(d):d||e===v||(d=lo(a,e)),n&&(i=!0,h=t.apply(f,u)),!i||d||c||(u=f=C),h}var u,c,h,l,f,d,g,p=0,v=!1,m=!0;if("function"!=typeof t)throw new Za(H);if(e=e<0?0:+e||0,n===!0){var y=!0;m=!1}else Fi(n)&&(y=!!n.leading,v="maxWait"in n&&wo(+n.maxWait||0,e),m="trailing"in n?!!n.trailing:m);return s.cancel=r,s}function gi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Za(H);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new gi.Cache,n}function pi(t){if("function"!=typeof t)throw new Za(H);return function(){return!t.apply(this,arguments)}}function vi(t){return fi(2,t)}function mi(t,e){if("function"!=typeof t)throw new Za(H);return e=wo(e===C?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=wo(n.length-e,0),a=Ga(i);++r<i;)a[r]=n[e+r];switch(e){case 0:return t.call(this,a);case 1:return t.call(this,n[0],a);case 2:return t.call(this,n[0],n[1],a)}var o=Ga(e+1);for(r=-1;++r<e;)o[r]=n[r];return o[e]=a,t.apply(this,o)}}function yi(t){if("function"!=typeof t)throw new Za(H);return function(e){return t.apply(this,e)}}function xi(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Za(H);return n===!1?r=!1:Fi(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),di(t,e,{leading:r,maxWait:+e,trailing:i})}function bi(t,e){return e=null==e?Ca:e,Dn(e,F,C,[t],[])}function _i(t,e,n,r){return e&&"boolean"!=typeof e&&Jn(t,e,n)?e=!1:"function"==typeof e&&(r=n,n=e,e=!1),"function"==typeof n?_e(t,e,on(n,r,1)):_e(t,e)}function wi(t,e,n){return"function"==typeof e?_e(t,!0,on(e,n,1)):_e(t,!0)}function Mi(t,e){return t>e}function Si(t,e){return t>=e}function ki(t){return x(t)&&Qn(t)&&to.call(t,"callee")&&!co.call(t,"callee")}function Ai(t){return t===!0||t===!1||x(t)&&no.call(t)==Z}function Ci(t){return x(t)&&no.call(t)==$}function Ti(t){return!!t&&1===t.nodeType&&x(t)&&!Gi(t)}function Ei(t){return null==t||(Qn(t)&&(Es(t)||Ui(t)||ki(t)||x(t)&&Bi(t.splice))?!t.length:!Gs(t).length)}function Pi(t,e,n,r){n="function"==typeof n?on(n,r,3):C;var i=n?n(t,e):C;return i===C?Oe(t,e,n):!!i}function Ii(t){return x(t)&&"string"==typeof t.message&&no.call(t)==Q}function Ni(t){return"number"==typeof t&&bo(t)}function Bi(t){return Fi(t)&&no.call(t)==K}function Fi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Oi(t,e,n,r){return n="function"==typeof n?on(n,r,3):C,De(t,Xn(e),n)}function Li(t){return zi(t)&&t!=+t}function Di(t){return null!=t&&(Bi(t)?io.test(Ja.call(t)):x(t)&&Lt.test(t))}function Ri(t){return null===t}function zi(t){return"number"==typeof t||x(t)&&no.call(t)==tt}function Gi(t){var e;if(!x(t)||no.call(t)!=et||ki(t)||!to.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return Pe(t,function(t,e){n=e}),n===C||to.call(t,n)}function ji(t){return Fi(t)&&no.call(t)==nt}function Ui(t){return"string"==typeof t||x(t)&&no.call(t)==it}function Yi(t){return x(t)&&nr(t.length)&&!!Xt[no.call(t)]}function Xi(t){return t===C}function Hi(t,e){return t<e}function Wi(t,e){return t<=e}function qi(t){var e=t?Uo(t):0;return nr(e)?e?te(t):[]:aa(t)}function Vi(t){return xe(t,ta(t))}function Zi(t,e,n){var r=Oo(t);return n&&Jn(t,e,n)&&(e=C),e?me(r,e):r}function $i(t){return Be(t,ta(t))}function Qi(t,e,n){var r=null==t?C:Fe(t,fr(e),e+"");return r===C?n:r}function Ki(t,e){if(null==t)return!1;var n=to.call(t,e);if(!n&&!tr(e)){if(e=fr(e),t=1==e.length?t:Fe(t,Ve(e,0,-1)),null==t)return!1;e=Ar(e),n=to.call(t,e)}return n||nr(t.length)&&Kn(e,t.length)&&(Es(t)||ki(t))}function Ji(t,e,n){n&&Jn(t,e,n)&&(e=C);for(var r=-1,i=Gs(t),a=i.length,o={};++r<a;){var s=i[r],u=t[s];e?to.call(o,u)?o[u].push(s):o[u]=[s]:o[u]=s}return o}function ta(t){if(null==t)return[];Fi(t)||(t=Wa(t));var e=t.length;e=e&&nr(e)&&(Es(t)||ki(t))&&e||0;for(var n=t.constructor,r=-1,i="function"==typeof n&&n.prototype===t,a=Ga(e),o=e>0;++r<e;)a[r]=r+"";for(var s in t)o&&Kn(s,e)||"constructor"==s&&(i||!to.call(t,s))||a.push(s);return a}function ea(t){t=lr(t);for(var e=-1,n=Gs(t),r=n.length,i=Ga(r);++e<r;){var a=n[e];i[e]=[a,t[a]]}return i}function na(t,e,n){var r=null==t?C:t[e];return r===C&&(null==t||tr(e,t)||(e=fr(e),t=1==e.length?t:Fe(t,Ve(e,0,-1)),r=null==t?C:t[Ar(e)]),r=r===C?n:r),Bi(r)?r.call(t):r}function ra(t,e,n){if(null==t)return t;var r=e+"";e=null!=t[r]||tr(e,t)?[r]:fr(e);for(var i=-1,a=e.length,o=a-1,s=t;null!=s&&++i<a;){var u=e[i];Fi(s)&&(i==o?s[u]=n:null==s[u]&&(s[u]=Kn(e[i+1])?[]:{})),s=s[u]}return t}function ia(t,e,n,r){var i=Es(t)||Yi(t);if(e=jn(e,r,4),null==n)if(i||Fi(t)){var a=t.constructor;n=i?Es(t)?new a:[]:Oo(Bi(a)?a.prototype:C)}else n={};return(i?ee:Ie)(t,function(t,r,i){return e(n,t,r,i)}),n}function aa(t){return tn(t,Gs(t))}function oa(t){return tn(t,ta(t))}function sa(t,e,n){return e=+e||0,n===C?(n=e,e=0):n=+n||0,t>=Mo(e,n)&&t<wo(e,n)}function ua(t,e,n){n&&Jn(t,e,n)&&(e=n=C);var r=null==t,i=null==e;if(null==n&&(i&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,i=!0)),r&&i&&(e=1,i=!1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=Ao();return Mo(t+a*(e-t+so("1e-"+((a+"").length-1))),e)}return We(t,e)}function ca(t){return t=c(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function ha(t){return t=c(t),t&&t.replace(Rt,g).replace(It,"")}function la(t,e,n){t=c(t),e+="";var r=t.length;return n=n===C?r:Mo(n<0?0:+n||0,r),n-=e.length,n>=0&&t.indexOf(e,n)==n}function fa(t){return t=c(t),t&&wt.test(t)?t.replace(bt,p):t}function da(t){return t=c(t),t&&Pt.test(t)?t.replace(Et,v):t||"(?:)"}function ga(t,e,n){t=c(t),e=+e;var r=t.length;if(r>=e||!bo(e))return t;var i=(e-r)/2,a=yo(i),o=vo(i);return n=Bn("",o,n),n.slice(0,a)+t+n}function pa(t,e,n){return(n?Jn(t,e,n):null==e)?e=0:e&&(e=+e),t=xa(t),ko(t,e||(Ot.test(t)?16:10))}function va(t,e){var n="";if(t=c(t),e=+e,e<1||!t||!bo(e))return n;do e%2&&(n+=t),e=yo(e/2),t+=t;while(e);return n}function ma(t,e,n){return t=c(t),n=null==n?0:Mo(n<0?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function ya(t,n,r){var i=e.templateSettings;r&&Jn(t,n,r)&&(n=r=C),t=c(t),n=ve(me({},r||n),i,pe);var a,o,s=ve(me({},n.imports),i.imports,pe),u=Gs(s),h=tn(s,u),l=0,f=n.interpolate||zt,d="__p += '",g=qa((n.escape||zt).source+"|"+f.source+"|"+(f===kt?Bt:zt).source+"|"+(n.evaluate||zt).source+"|$","g"),p="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Yt+"]")+"\n";t.replace(g,function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(l,u).replace(Gt,m),n&&(a=!0,d+="' +\n__e("+n+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),d+="';\n";var v=n.variable;v||(d="with (obj) {\n"+d+"\n}\n"),d=(o?d.replace(vt,""):d).replace(mt,"$1").replace(yt,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Qs(function(){return Ya(u,p+"return "+d).apply(C,h)});if(y.source=d,Ii(y))throw y;return y}function xa(t,e,n){var r=t;return(t=c(t))?(n?Jn(r,e,n):null==e)?t.slice(M(t),S(t)+1):(e+="",t.slice(h(t,e),l(t,e)+1)):t}function ba(t,e,n){var r=t;return t=c(t),t?(n?Jn(r,e,n):null==e)?t.slice(M(t)):t.slice(h(t,e+"")):t}function _a(t,e,n){var r=t;return t=c(t),t?(n?Jn(r,e,n):null==e)?t.slice(0,S(t)+1):t.slice(0,l(t,e+"")+1):t}function wa(t,e,n){n&&Jn(t,e,n)&&(e=C);var r=R,i=z;if(null!=e)if(Fi(e)){var a="separator"in e?e.separator:a;r="length"in e?+e.length||0:r,i="omission"in e?c(e.omission):i}else r=+e||0;if(t=c(t),r>=t.length)return t;var o=r-i.length;if(o<1)return i;var s=t.slice(0,o);if(null==a)return s+i;if(ji(a)){if(t.slice(o).search(a)){var u,h,l=t.slice(0,o);for(a.global||(a=qa(a.source,(Ft.exec(a)||"")+"g")),a.lastIndex=0;u=a.exec(l);)h=u.index;s=s.slice(0,null==h?o:h)}}else if(t.indexOf(a,o)!=o){var f=s.lastIndexOf(a);f>-1&&(s=s.slice(0,f))}return s+i}function Ma(t){return t=c(t),t&&_t.test(t)?t.replace(xt,k):t}function Sa(t,e,n){return n&&Jn(t,e,n)&&(e=C),t=c(t),t.match(e||jt)||[]}function ka(t,e,n){return n&&Jn(t,e,n)&&(e=C),x(t)?Ta(t):be(t,e)}function Aa(t){return function(){return t}}function Ca(t){return t}function Ta(t){return ze(_e(t,!0))}function Ea(t,e){return Ge(t,_e(e,!0))}function Pa(t,e,n){if(null==n){var r=Fi(e),i=r?Gs(e):C,a=i&&i.length?Be(e,i):C;(a?a.length:r)||(a=!1,n=e,e=t,t=this)}a||(a=Be(e,Gs(e)));var o=!0,s=-1,u=Bi(t),c=a.length;n===!1?o=!1:Fi(n)&&"chain"in n&&(o=n.chain);for(;++s<c;){var h=a[s],l=e[h];t[h]=l,u&&(t.prototype[h]=function(e){return function(){var n=this.__chain__;if(o||n){var r=t(this.__wrapped__),i=r.__actions__=te(this.__actions__);return i.push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,ce([this.value()],arguments))}}(l))}return t}function Ia(){return re._=ro,this}function Na(){}function Ba(t){return tr(t)?Ye(t):Xe(t)}function Fa(t){return function(e){return Fe(t,fr(e),e+"")}}function Oa(t,e,n){n&&Jn(t,e,n)&&(e=n=C),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var r=-1,i=wo(vo((e-t)/(n||1)),0),a=Ga(i);++r<i;)a[r]=t,t+=n;return a}function La(t,e,n){if(t=yo(t),t<1||!bo(t))return[];var r=-1,i=Ga(Mo(t,Eo));for(e=on(e,n,1);++r<t;)r<Eo?i[r]=e(r):e(r);return i}function Da(t){var e=++eo;return c(t)+e}function Ra(t,e){return(+t||0)+(+e||0)}function za(t,e,n){return n&&Jn(t,e,n)&&(e=C),e=jn(e,n,3),1==e.length?de(Es(t)?t:hr(t),e):Ke(t,e)}t=t?ie.defaults(re.Object(),t,ie.pick(re,Ut)):re;var Ga=t.Array,ja=t.Date,Ua=t.Error,Ya=t.Function,Xa=t.Math,Ha=t.Number,Wa=t.Object,qa=t.RegExp,Va=t.String,Za=t.TypeError,$a=Ga.prototype,Qa=Wa.prototype,Ka=Va.prototype,Ja=Ya.prototype.toString,to=Qa.hasOwnProperty,eo=0,no=Qa.toString,ro=re._,io=qa("^"+Ja.call(to).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=t.ArrayBuffer,oo=t.clearTimeout,so=t.parseFloat,uo=Xa.pow,co=Qa.propertyIsEnumerable,ho=Hn(t,"Set"),lo=t.setTimeout,fo=$a.splice,go=t.Uint8Array,po=Hn(t,"WeakMap"),vo=Xa.ceil,mo=Hn(Wa,"create"),yo=Xa.floor,xo=Hn(Ga,"isArray"),bo=t.isFinite,_o=Hn(Wa,"keys"),wo=Xa.max,Mo=Xa.min,So=Hn(ja,"now"),ko=t.parseInt,Ao=Xa.random,Co=Ha.NEGATIVE_INFINITY,To=Ha.POSITIVE_INFINITY,Eo=4294967295,Po=Eo-1,Io=Eo>>>1,No=9007199254740991,Bo=po&&new po,Fo={};e.support={};e.templateSettings={escape:Mt,evaluate:St,interpolate:kt,variable:"",imports:{_:e}};var Oo=function(){function t(){}return function(e){if(Fi(e)){t.prototype=e;var n=new t;t.prototype=C}return n||{}}}(),Lo=fn(Ie),Do=fn(Ne,!0),Ro=dn(),zo=dn(!0),Go=Bo?function(t,e){return Bo.set(t,e),t}:Ca,jo=Bo?function(t){return Bo.get(t)}:Na,Uo=Ye("length"),Yo=function(){var t=0,e=0;return function(n,r){var i=ps(),a=j-(i-e);if(e=i,a>0){if(++t>=G)return n}else t=0;return Go(n,r)}}(),Xo=mi(function(t,e){return x(t)&&Qn(t)?Me(t,Ee(e,!1,!0)):[]}),Ho=wn(),Wo=wn(!0),qo=mi(function(t){for(var e=t.length,n=e,r=Ga(l),i=Yn(),a=i==s,o=[];n--;){var u=t[n]=Qn(u=t[n])?u:[];r[n]=a&&u.length>=120?pn(n&&u):null}var c=t[0],h=-1,l=c?c.length:0,f=r[0];t:for(;++h<l;)if(u=c[h],(f?Qt(f,u):i(o,u,0))<0){for(var n=e;--n;){var d=r[n];if((d?Qt(d,u):i(t[n],u,0))<0)continue t}f&&f.push(u),o.push(u)}return o}),Vo=mi(function(t,e){e=Ee(e);var n=ye(t,e);return He(t,e.sort(a)),n}),Zo=Ln(),$o=Ln(!0),Qo=mi(function(t){return Je(Ee(t,!1,!0))}),Ko=mi(function(t,e){return Qn(t)?Me(t,e):[]}),Jo=mi(Dr),ts=mi(function(t){var e=t.length,n=e>2?t[e-2]:C,r=e>1?t[e-1]:C;return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof r?(--e,r):C,r=C),t.length=e,Rr(t,n,r)}),es=mi(function(t){return t=Ee(t),this.thru(function(e){return Jt(Es(e)?e:[lr(e)],t)})}),ns=mi(function(t,e){return ye(t,Ee(e))}),rs=hn(function(t,e,n){to.call(t,n)?++t[n]:t[n]=1}),is=_n(Lo),as=_n(Do,!0),os=kn(ee,Lo),ss=kn(ne,Do),us=hn(function(t,e,n){to.call(t,n)?t[n].push(e):t[n]=[e]}),cs=hn(function(t,e,n){t[n]=e}),hs=mi(function(t,e,n){var r=-1,i="function"==typeof e,a=tr(e),o=Qn(t)?Ga(t.length):[];return Lo(t,function(t){var s=i?e:a&&null!=t?t[e]:C;o[++r]=s?s.apply(t,n):$n(t,e,n);
8}),o}),ls=hn(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),fs=In(he,Lo),ds=In(le,Do),gs=mi(function(t,e){if(null==t)return[];var n=e[2];return n&&Jn(e[0],e[1],n)&&(e.length=1),Qe(t,Ee(e),[])}),ps=So||function(){return(new ja).getTime()},vs=mi(function(t,e,n){var r=E;if(n.length){var i=_(n,vs.placeholder);r|=F}return Dn(t,r,e,n,i)}),ms=mi(function(t,e){e=e.length?Ee(e):$i(t);for(var n=-1,r=e.length;++n<r;){var i=e[n];t[i]=Dn(t[i],E,t)}return t}),ys=mi(function(t,e,n){var r=E|P;if(n.length){var i=_(n,ys.placeholder);r|=F}return Dn(e,r,t,n,i)}),xs=yn(N),bs=yn(B),_s=mi(function(t,e){return we(t,1,e)}),ws=mi(function(t,e,n){return we(t,e,n)}),Ms=Sn(),Ss=Sn(!0),ks=mi(function(t,e){if(e=Ee(e),"function"!=typeof t||!ae(e,u))throw new Za(H);var n=e.length;return mi(function(r){for(var i=Mo(r.length,n);i--;)r[i]=e[i](r[i]);return t.apply(this,r)})}),As=Pn(F),Cs=Pn(O),Ts=mi(function(t,e){return Dn(t,D,C,C,C,Ee(e))}),Es=xo||function(t){return x(t)&&nr(t.length)&&no.call(t)==V},Ps=ln(je),Is=ln(function(t,e,n){return n?ve(t,e,n):me(t,e)}),Ns=xn(Is,ge),Bs=xn(Ps,ar),Fs=Mn(Ie),Os=Mn(Ne),Ls=An(Ro),Ds=An(zo),Rs=Cn(Ie),zs=Cn(Ne),Gs=_o?function(t){var e=null==t?C:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Qn(t)?cr(t):Fi(t)?_o(t):[]}:cr,js=Tn(!0),Us=Tn(),Ys=mi(function(t,e){if(null==t)return{};if("function"!=typeof e[0]){var e=ue(Ee(e),Va);return or(t,Me(ta(t),e))}var n=on(e[0],e[1],3);return sr(t,function(t,e,r){return!n(t,e,r)})}),Xs=mi(function(t,e){return null==t?{}:"function"==typeof e[0]?sr(t,on(e[0],e[1],3)):or(t,Ee(e))}),Hs=vn(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),Ws=vn(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),qs=En(),Vs=En(!0),Zs=vn(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),$s=vn(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))}),Qs=mi(function(t,e){try{return t.apply(C,e)}catch(t){return Ii(t)?t:new Ua(t)}}),Ks=mi(function(t,e){return function(n){return $n(n,t,e)}}),Js=mi(function(t,e){return function(n){return $n(t,n,e)}}),tu=On("ceil"),eu=On("floor"),nu=bn(Mi,Co),ru=bn(Hi,To),iu=On("round");return e.prototype=n.prototype,r.prototype=Oo(n.prototype),r.prototype.constructor=r,i.prototype=Oo(n.prototype),i.prototype.constructor=i,at.prototype.delete=Wt,at.prototype.get=qt,at.prototype.has=Vt,at.prototype.set=Zt,$t.prototype.push=Kt,gi.Cache=at,e.after=hi,e.ary=li,e.assign=Is,e.at=ns,e.before=fi,e.bind=vs,e.bindAll=ms,e.bindKey=ys,e.callback=ka,e.chain=jr,e.chunk=gr,e.compact=pr,e.constant=Aa,e.countBy=rs,e.create=Zi,e.curry=xs,e.curryRight=bs,e.debounce=di,e.defaults=Ns,e.defaultsDeep=Bs,e.defer=_s,e.delay=ws,e.difference=Xo,e.drop=vr,e.dropRight=mr,e.dropRightWhile=yr,e.dropWhile=xr,e.fill=br,e.filter=Qr,e.flatten=wr,e.flattenDeep=Mr,e.flow=Ms,e.flowRight=Ss,e.forEach=os,e.forEachRight=ss,e.forIn=Ls,e.forInRight=Ds,e.forOwn=Rs,e.forOwnRight=zs,e.functions=$i,e.groupBy=us,e.indexBy=cs,e.initial=kr,e.intersection=qo,e.invert=Ji,e.invoke=hs,e.keys=Gs,e.keysIn=ta,e.map=ti,e.mapKeys=js,e.mapValues=Us,e.matches=Ta,e.matchesProperty=Ea,e.memoize=gi,e.merge=Ps,e.method=Ks,e.methodOf=Js,e.mixin=Pa,e.modArgs=ks,e.negate=pi,e.omit=Ys,e.once=vi,e.pairs=ea,e.partial=As,e.partialRight=Cs,e.partition=ls,e.pick=Xs,e.pluck=ei,e.property=Ba,e.propertyOf=Fa,e.pull=Tr,e.pullAt=Vo,e.range=Oa,e.rearg=Ts,e.reject=ni,e.remove=Er,e.rest=Pr,e.restParam=mi,e.set=ra,e.shuffle=ii,e.slice=Ir,e.sortBy=si,e.sortByAll=gs,e.sortByOrder=ui,e.spread=yi,e.take=Nr,e.takeRight=Br,e.takeRightWhile=Fr,e.takeWhile=Or,e.tap=Ur,e.throttle=xi,e.thru=Yr,e.times=La,e.toArray=qi,e.toPlainObject=Vi,e.transform=ia,e.union=Qo,e.uniq=Lr,e.unzip=Dr,e.unzipWith=Rr,e.values=aa,e.valuesIn=oa,e.where=ci,e.without=Ko,e.wrap=bi,e.xor=zr,e.zip=Jo,e.zipObject=Gr,e.zipWith=ts,e.backflow=Ss,e.collect=ti,e.compose=Ss,e.each=os,e.eachRight=ss,e.extend=Is,e.iteratee=ka,e.methods=$i,e.object=Gr,e.select=Qr,e.tail=Pr,e.unique=Lr,Pa(e,e),e.add=Ra,e.attempt=Qs,e.camelCase=Hs,e.capitalize=ca,e.ceil=tu,e.clone=_i,e.cloneDeep=wi,e.deburr=ha,e.endsWith=la,e.escape=fa,e.escapeRegExp=da,e.every=$r,e.find=is,e.findIndex=Ho,e.findKey=Fs,e.findLast=as,e.findLastIndex=Wo,e.findLastKey=Os,e.findWhere=Kr,e.first=_r,e.floor=eu,e.get=Qi,e.gt=Mi,e.gte=Si,e.has=Ki,e.identity=Ca,e.includes=Jr,e.indexOf=Sr,e.inRange=sa,e.isArguments=ki,e.isArray=Es,e.isBoolean=Ai,e.isDate=Ci,e.isElement=Ti,e.isEmpty=Ei,e.isEqual=Pi,e.isError=Ii,e.isFinite=Ni,e.isFunction=Bi,e.isMatch=Oi,e.isNaN=Li,e.isNative=Di,e.isNull=Ri,e.isNumber=zi,e.isObject=Fi,e.isPlainObject=Gi,e.isRegExp=ji,e.isString=Ui,e.isTypedArray=Yi,e.isUndefined=Xi,e.kebabCase=Ws,e.last=Ar,e.lastIndexOf=Cr,e.lt=Hi,e.lte=Wi,e.max=nu,e.min=ru,e.noConflict=Ia,e.noop=Na,e.now=ps,e.pad=ga,e.padLeft=qs,e.padRight=Vs,e.parseInt=pa,e.random=ua,e.reduce=fs,e.reduceRight=ds,e.repeat=va,e.result=na,e.round=iu,e.runInContext=A,e.size=ai,e.snakeCase=Zs,e.some=oi,e.sortedIndex=Zo,e.sortedLastIndex=$o,e.startCase=$s,e.startsWith=ma,e.sum=za,e.template=ya,e.trim=xa,e.trimLeft=ba,e.trimRight=_a,e.trunc=wa,e.unescape=Ma,e.uniqueId=Da,e.words=Sa,e.all=$r,e.any=oi,e.contains=Jr,e.eq=Pi,e.detect=is,e.foldl=fs,e.foldr=ds,e.head=_r,e.include=Jr,e.inject=fs,Pa(e,function(){var t={};return Ie(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.sample=ri,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ri(e,t)}):ri(this.value())},e.VERSION=T,ee(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),ee(["drop","take"],function(t,e){i.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new i(this);n=null==n?1:wo(yo(n)||0,0);var a=this.clone();return r?a.__takeCount__=Mo(a.__takeCount__,n):a.__views__.push({size:n,type:t+(a.__dir__<0?"Right":"")}),a},i.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ee(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n!=X;i.prototype[t]=function(t,e){var i=this.clone();return i.__iteratees__.push({iteratee:jn(t,e,1),type:n}),i.__filtered__=i.__filtered__||r,i}}),ee(["first","last"],function(t,e){var n="take"+(e?"Right":"");i.prototype[t]=function(){return this[n](1).value()[0]}}),ee(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");i.prototype[t]=function(){return this.__filtered__?new i(this):this[n](1)}}),ee(["pluck","where"],function(t,e){var n=e?"filter":"map",r=e?ze:Ba;i.prototype[t]=function(t){return this[n](r(t))}}),i.prototype.compact=function(){return this.filter(Ca)},i.prototype.reject=function(t,e){return t=jn(t,e,1),this.filter(function(e){return!t(e)})},i.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=this;return n.__filtered__&&(t>0||e<0)?new i(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==C&&(e=+e||0,n=e<0?n.dropRight(-e):n.take(e-t)),n)},i.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},i.prototype.toArray=function(){return this.take(To)},Ie(i.prototype,function(t,n){var a=/^(?:filter|map|reject)|While$/.test(n),o=/^(?:first|last)$/.test(n),s=e[o?"take"+("last"==n?"Right":""):n];s&&(e.prototype[n]=function(){var e=o?[1]:arguments,n=this.__chain__,u=this.__wrapped__,c=!!this.__actions__.length,h=u instanceof i,l=e[0],f=h||Es(u);f&&a&&"function"==typeof l&&1!=l.length&&(h=f=!1);var d=function(t){return o&&n?s(t,1)[0]:s.apply(C,ce([t],e))},g={func:Yr,args:[d],thisArg:C},p=h&&!c;if(o&&!n)return p?(u=u.clone(),u.__actions__.push(g),t.call(u)):s.call(C,this.value())[0];if(!o&&f){u=p?u:new i(this);var v=t.apply(u,e);return v.__actions__.push(g),new r(v,n)}return this.thru(d)})}),ee(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Ka:$a)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),Ie(i.prototype,function(t,n){var r=e[n];if(r){var i=r.name,a=Fo[i]||(Fo[i]=[]);a.push({name:n,func:r})}}),Fo[Nn(C,P).name]=[{name:"wrapper",func:C}],i.prototype.clone=b,i.prototype.reverse=J,i.prototype.value=rt,e.prototype.chain=Xr,e.prototype.commit=Hr,e.prototype.concat=es,e.prototype.plant=Wr,e.prototype.reverse=qr,e.prototype.toString=Vr,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Zr,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var C,T="3.10.1",E=1,P=2,I=4,N=8,B=16,F=32,O=64,L=128,D=256,R=30,z="...",G=150,j=16,U=200,Y=1,X=2,H="Expected a function",W="__lodash_placeholder__",q="[object Arguments]",V="[object Array]",Z="[object Boolean]",$="[object Date]",Q="[object Error]",K="[object Function]",J="[object Map]",tt="[object Number]",et="[object Object]",nt="[object RegExp]",rt="[object Set]",it="[object String]",at="[object WeakMap]",ot="[object ArrayBuffer]",st="[object Float32Array]",ut="[object Float64Array]",ct="[object Int8Array]",ht="[object Int16Array]",lt="[object Int32Array]",ft="[object Uint8Array]",dt="[object Uint8ClampedArray]",gt="[object Uint16Array]",pt="[object Uint32Array]",vt=/\b__p \+= '';/g,mt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xt=/&(?:amp|lt|gt|quot|#39|#96);/g,bt=/[&<>"'`]/g,_t=RegExp(xt.source),wt=RegExp(bt.source),Mt=/<%-([\s\S]+?)%>/g,St=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ct=/^\w*$/,Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Et=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Pt=RegExp(Et.source),It=/[\u0300-\u036f\ufe20-\ufe23]/g,Nt=/\\(\\)?/g,Bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ft=/\w*$/,Ot=/^0[xX]/,Lt=/^\[object .+?Constructor\]$/,Dt=/^\d+$/,Rt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,zt=/($^)/,Gt=/['\n\r\u2028\u2029\\]/g,jt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Ut=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Yt=-1,Xt={};Xt[st]=Xt[ut]=Xt[ct]=Xt[ht]=Xt[lt]=Xt[ft]=Xt[dt]=Xt[gt]=Xt[pt]=!0,Xt[q]=Xt[V]=Xt[ot]=Xt[Z]=Xt[$]=Xt[Q]=Xt[K]=Xt[J]=Xt[tt]=Xt[et]=Xt[nt]=Xt[rt]=Xt[it]=Xt[at]=!1;var Ht={};Ht[q]=Ht[V]=Ht[ot]=Ht[Z]=Ht[$]=Ht[st]=Ht[ut]=Ht[ct]=Ht[ht]=Ht[lt]=Ht[tt]=Ht[et]=Ht[nt]=Ht[it]=Ht[ft]=Ht[dt]=Ht[gt]=Ht[pt]=!0,Ht[Q]=Ht[K]=Ht[J]=Ht[rt]=Ht[at]=!1;var Wt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},qt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Vt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Zt={function:!0,object:!0},$t={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kt=Zt[typeof e]&&e&&!e.nodeType&&e,Jt=Zt[typeof t]&&t&&!t.nodeType&&t,te=Kt&&Jt&&"object"==typeof i&&i&&i.Object&&i,ee=Zt[typeof self]&&self&&self.Object&&self,ne=Zt[typeof window]&&window&&window.Object&&window,re=(Jt&&Jt.exports===Kt&&Kt,te||ne!==(this&&this.window)&&ne||ee||this),ie=A();re._=ie,r=function(){return ie}.call(e,n,e,t),!(r!==C&&(t.exports=r))}).call(this)}).call(e,n(310)(t),function(){return this}())},function(t,e,n){var r=n(110);r.Util=n(49),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){var i=t[r]+(e[r]-t[r])*n;return i}var i=n(49),a=n(1),o={calColor:function(t,e,n){var a,o=t.length-1,s=Math.floor(o*e),u=o*e-s,c=t[s],h=s===o?c:t[s+1];return"hsl"===n?a=i.hsl2Rgb([r(c,h,u,0),r(c,h,u,1),r(c,h,u,2)]):(a={r:r(c,h,u,0),g:r(c,h,u,1),b:r(c,h,u,2)},a="#"+i.toHex(a.r)+i.toHex(a.g)+i.toHex(a.b)),a},lightness:function(t,e){e=e||0;var n=[[e,1,.9],[e,1,.5]];return o.calColor(n,t,"hsl")},red:function(t){return o.lightness(t,0)},blue:function(t){return o.lightness(t,.66)},green:function(t){return o.lightness(t,.33)},gradient:function(t){var e=[];return a.isString(t)&&(t=t.split("-")),a.each(t,function(t){t.indexOf("#")===-1&&(t=i.toRGB(t)),e.push(i.rgb2arr(t))}),function(t){return o.calColor(e,t)}},gradientHsl:function(t){var e=[];return a.isString(t)&&(t=t.split("-")),a.each(t,function(t){t.indexOf("#")===-1&&(t=i.toRGB(t)),e.push(i.rgb2hsl(t))}),function(t){return o.calColor(e,t,"hsl")}},saturation:function(t,e){e=e||0;var n=[[e,0,.5],[e,1,.5]];return o.calColor(n,t,"hsl")},hue:function(t){var e=[[0,1,.5],[1,1,.5]];return o.calColor(e,t,"hsl")},brightness:function(t){var e=[[255,255,255],[0,0,0]];return o.calColor(e,t)},heat:function(t){var e=[[255,255,255],[255,127.5,0],[0,0,0]];return o.calColor(e,t)},rainbow:function(t){var e=[[0,255,255],[0,0,255],[0,255,0],[255,0,0]];return o.calColor(e,t)},circular:function(t){var e=[[0,0,255],[0,255,0],[255,255,0],[255,0,0],[0,0,255]];return o.calColor(e,t)},bipolar:function(t){var e=[[0,255,0],[0,0,0],[255,0,0]];return o.calColor(e,t)}};t.exports=o},function(t,e,n){"use strict";function r(t){if(!t._attrs&&t!==i){var e=t.superclass.constructor;e&&!e._attrs&&r(e),t._attrs={},a.mix(!0,t._attrs,e._attrs),a.mix(!0,t._attrs,t.ATTRS)}}var i,a=n(1);i=function(t){r(this.constructor),this._attrs={},this.events={};var e=this.getDefaultCfg();a.mix(this._attrs,e,t)},a.augment(i,{getDefaultCfg:function(){var t=this,e=t.constructor,n=e._attrs,r=a.mix(!0,{},n);return r},set:function(t,e){var n="_onRender"+a.ucfirst(t);return this[n]&&this[n](e,this._attrs[t]),this._attrs[t]=e,this},get:function(t){return this._attrs[t]},on:function(t,e){var n=this,r=n.events,i=r[t];return i||(i=r[t]=[]),i.push(e),n},fire:function(t,e){var n=this,r=n.events,i=r[t];i&&a.each(i,function(t){t(e)})},off:function(t,e){var n=this,r=n.events,i=r[t];return t?(i&&a.remove(i,e),n):(n.events={},n)},offEvents:function(t){var e=this,n=e.events;return t?(n[t]=null,e):(e.events={},e)},destroy:function(){var t=this,e=t.destroyed;return e?t:(t._attrs={},t.events={},void(t.destroyed=!0))}}),t.exports=i},function(t,e,n){"use strict";var r={Axis:n(116),Plot:{Back:n(122),Range:n(54)},Labels:n(51),Tooltip:n(123),Legend:n(121),Range:n(55)};t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(22),a=n(2),o=n(8),s=a.Vector2,u=function(t){u.superclass.constructor.call(this,t)};r.extend(u,i),u.CFG={type:"circle",tickInterval:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,grid:{line:{lineWidth:1,stroke:"#C0D0E0"}},labelOffset:5},r.augment(u,{parseTick:function(t,e,n){return{text:t,value:e/n}},_getCirclePoint:function(t,e){var n=this,r=n.get("center");return e=e||n.get("radius"),{x:r.x+Math.cos(t)*e,y:r.y+Math.sin(t)*e}},getTickPoint:function(t){var e=this,n=e.get("startAngle"),r=e.get("endAngle"),i=n+(r-n)*t;return e._getCirclePoint(i)},getSideVector:function(t,e){var n=this,r=n.get("center"),i=new s(e.x-r.x,e.y-r.y);return t&&i.setLength(t),i},getSidePoint:function(t,e){var n=this,r=n.getSideVector(e,t);return{x:t.x+r.x,y:t.y+r.y}},getTickEnd:function(t,e){var n=this,r=n.get("tickLine");return e=e?e:r.value,n.getSidePoint(t,e)},getTextAnchor:function(t){var e;return o.equal(t.x,0)?e="center":t.x>0?e="left":t.x<0&&(e="right"),e},getLinePath:function(){var t=this,e=t.get("center"),n=e.x,r=e.y,i=t.get("radius"),a=i,o=t.get("startAngle"),s=t.get("endAngle"),u=t.get("inner"),c=[];if(Math.abs(s-o)===2*Math.PI)c=[["M",n,r],["m",0,-a],["a",i,a,0,1,1,0,2*a],["a",i,a,0,1,1,0,-2*a],["z"]];else{var h=t._getCirclePoint(o),l=t._getCirclePoint(s),f=Math.abs(s-o)>Math.PI?1:0,d=o>s?0:1;if(u){var g=t.getSideVector(u*i,h),p=t.getSideVector(u*i,l),v={x:g.x+n,y:g.y+r},m={x:p.x+n,y:p.y+r};c=[["M",v.x,v.y],["L",h.x,h.y],["A",i,a,0,f,d,l.x,l.y],["L",m.x,m.y],["A",i*u,a*u,0,f,Math.abs(d-1),v.x,v.y]]}else c=[["M",n,r],["L",h.x,h.y],["A",i,a,0,f,d,l.x,l.y],["L",n,r]]}return c},addLabel:function(t,e,n,r){var i=this,a=i.get("labelOffset")||.001;e=i.getSidePoint(e,a),u.superclass.addLabel.call(i,t,e,n,r)},autoRotateLabels:function(){var t=this,e=t.get("ticks"),n=t.get("labelsGroup");if(n&&e.length>12){var i=t.get("radius"),a=t.get("startAngle"),o=t.get("endAngle"),s=o-a,u=s/(e.length-1),c=Math.sin(u/2)*i*2,h=t.getMaxLabelWidth(n);r.each(n.get("children"),function(t,n){var r=e[n],i=r.value*s+a,o=i%(2*Math.PI);h<c?(o<=0&&(i+=Math.PI),o>Math.PI&&(i-=Math.PI),i-=Math.PI/2,t.attr("textAlign","center")):o>Math.PI/2?i-=Math.PI:o<Math.PI/2*-1&&(i+=Math.PI),t.rotateAtStart(i)})}}}),t.exports=u},function(t,e,n){"use strict";function r(t){r.superclass.constructor.call(this,t)}var i=n(7).Group,a=n(1),o="x-chart-grid";a.extend(r,i),r.CFG={zIndex:1,elCls:o,type:"line",line:null,items:null,odd:null,even:null,animate:!1,matrix:null,duration:1e3},a.augment(r,{_renderUI:function(){r.superclass._renderUI.call(this),this._drawLines()},_drawLines:function(){var t=this,e=t.get("line"),n=t.get("items");n&&n.length>0&&(t._precessItems(n),t._drawGridLines(n,e,o+"-line"))},_precessItems:function(t){var e,n=this;a.each(t,function(t,r){e&&(n.get("odd")||n.get("even"))&&n._drawOddEven(t,e,r),e=t})},_drawGridLines:function(t,e,n){var r,i,o,s,u=this,c=this.get("type"),h=this.get("smooth"),l=this.get("start");"line"===c||"polygon"===c?a.each(t,function(t){l&&l.x===t[0].x&&t[0].y===l.y||(h?(i=[],a.each(t,function(t){i.push(t.x),i.push(t.y)}),o=a.catmullRom2bezier(i),o.unshift(["M",t[0].x,t[0].y])):(o=[],a.each(t,function(t,e){0===e?o.push(["M",t.x,t.y]):o.push(["L",t.x,t.y])})),s=a.mix({},e,{path:o}),r=u.addShape("path",{elCls:n,attrs:s}),r.animateType="gridLine",r.id=t.id+"grid",u.set("gridLine"+n,r))}):a.each(t,function(t){l&&l.x===t[0].x&&t[0].y===l.y||(o=[],a.each(t,function(t,e){var n=t.radius;0===e?o.push(["M",t.x,t.y]):o.push(["A",n,n,0,0,t.flag,t.x,t.y])}),s=a.mix({},e,{path:o}),r=u.addShape("path",{elCls:n,attrs:s}),r.animateType="gridLine",r.id=t.id+"grid",u.set("gridLine"+n,r))})},_drawOddEven:function(t,e,n){var r,i,a=this,s=a.get("odd"),u=a.get("even");n%2===0?u&&(i=a._getBackItem(e,t,u),r="even"):s&&(i=a._getBackItem(e,t,s),r="odd"),i&&a.addShape("Path",{elCls:o+"-"+r,attrs:i})},_getBackItem:function(t,e,n){var r=[],i=this.get("type");if("line"===i||"polygon"===i){a.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--){var s=e[o];r.push(["L",s.x,s.y])}r.push(["Z"])}else{var u=t[0].flag;a.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 c=e.length-1;c>=0;c--){var h=e[c],l=h.radius;c===e.length-1?r.push(["M",h.x,h.y]):r.push(["A",l,l,0,0,1===u?0:1,h.x,h.y])}}return n=a.mix({},n,{path:r})}}),t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(22),a=n(2),o=a.Vector2,s=function(t){s.superclass.constructor.call(this,t)};r.extend(s,i),s.CFG={type:"helix",grid:{line:{"stroke-width":1,stroke:"#C0D0E0"}},labelOffset:5,startAngle:1.25*Math.PI,endAngle:7.25*Math.PI,a:0,center:null,axisStart:null,crp:[]},r.augment(s,{getLinePath:function(){var t=this,e=t.get("crp"),n=t.get("axisStart"),i=r.catmullRom2bezier(e);return i.unshift(["M",n.x,n.y]),i},getTickPoint:function(t){var e=this,n=e.get("startAngle"),r=e.get("endAngle"),i=n+(r-n)*t;return e._getHelixPoint(i)},_getHelixPoint:function(t){var e=this,n=e.get("center"),r=e.get("a"),i=r*t;return{x:n.x+Math.cos(t)*i,y:n.y+Math.sin(t)*i}},getSideVector:function(t,e){var n=this,r=n.get("center"),i=new o(e.x-r.x,e.y-r.y);return t&&i.setLength(t),i},getSidePoint:function(t,e){var n=this,r=n.getSideVector(e,t);return{x:t.x+r.x,y:t.y+r.y}},getTickEnd:function(t,e){var n=this,r=n.get("tickLine");return e=e?e:r.value,n.getSidePoint(t,e)}}),t.exports=s},function(t,e,n){var r=n(50);r.Abstract=n(22),r.Circle=n(113),r.MultLine=n(117),r.Helix=n(115),t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(50),a=n(2),o=a.Vector2,s=function(t){s.superclass.constructor.call(this,t)};s.CFG={type:"multLine"},r.extend(s,i),r.augment(s,{getLinePath:function(){var t=this,e=t.get("tickPoints"),n=t.get("start"),i=t.get("end"),a=[];a.push(n.x),a.push(n.y),r.each(e,function(t){a.push(t.x),a.push(t.y)}),a.push(i.x),a.push(i.y);var o=r.catmullRom2bezier(a);return o.unshift(["M",n.x,n.y]),o},getTickPoint:function(t,e){var n=this.get("tickPoints");return n[e]},getTickEnd:function(t,e,n){var r=this,i=r.get("tickLine"),a=e?e:i.value,o=r.getSideVector(a,t,n);return{x:t.x+o.x,y:t.y+o.y}},getSideVector:function(t,e,n){var r,i=this;if(0===n)r=i.get("start");else{var a=i.get("tickPoints");r=a[n-1]}var s=new o(e.x-r.x,e.y-r.y),u=s.normalize(),c=u.vertical(!1);return c.multiplyScaler(t)}}),t.exports=s},function(t,e,n){"use strict";var r=n(1),i=n(52),a=function(){};a.ATTRS={labels:null},r.augment(a,{renderLabels:function(){var t,e=this,n=e.get("labels");n&&(n.items||(n.items=[]),r.isNull(n.animate)&&(n.animate=e.get("animate")),t=e.addGroup(i,n),e.set("labelsGroup",t))},resetLabels:function(t){var e=this,n=e.get("labels");if(n){var i=e.get("labelsGroup"),a=i.getLabels(),o=a.length;t=t||n.items,r.each(t,function(t,n){if(n<o){var r=a[n];i.changeLabel(r,t)}else e.addLabel(t.text,t)});for(var s=o-1;s>=t.length;s--)a[s].remove()}},addLabel:function(t,e){var n,r=this,i=r.get("labelsGroup"),a={};return i&&(a.text=t,a.x=e.x,a.y=e.y,a.point=e,a.textAlign=e.textAlign,a.id=e.id,e.rotate&&(a.rotate=e.rotate),n=i.addLabel(a)),n},removeLabels:function(){var t=this,e=t.get("labelsGroup");e&&e.remove(),t.set("labelsGroup",null)}}),t.exports=a},function(t,e,n){"use strict";function r(t,e){var n=null;return i.each(t,function(t){if(t.name===e.get("value"))return n=t,!1}),n}var i=n(1),a=n(53),o=n(32),s=n(28),u=function(t){u.superclass.constructor.call(this,t)};u.CFG={type:"category-legend",items:null,spacingX:5,spacingY:10,wordSpaceing:2,itemsGroup:null,layout:"horizontal",leaveChecked:!0,backPadding:[0,0,0,0],checkable:!0,itemsbeginX:0,itemsbeginY:0,unChecked:"#CCC",back:null,itemWrap:!1,maxLength:100,word:{fill:"#333",textBaseline:"middle"},formatter:null},i.extend(u,s),i.augment(u,a,{_formatPoint:function(t){var e=this.get("formatter");return e&&(t=e.call(this,t)),t},_beforeRenderUI:function(){u.superclass._beforeRenderUI.call(this),this.set("back",{})},_renderUI:function(){u.superclass._renderUI.call(this),this._renderTitle(),this._renderItems(),this._wrapItems(),this._renderBack(),this.setPosition()},_wrapItems:function(){var t=this.get("itemWrap"),e=this.get("layout"),n=this.get("maxLength");t&&n>0&&("horizontal"===e?this._warpHorizontal():"vertical"===e&&this._warpVertical())},_warpVertical:function(){var t,e,n,r,a=this.get("itemsGroup"),o=this.get("titleShape"),s=a.get("children"),u=this.get("maxLength"),c=this.get("spacingX"),h=this.get("spacingY"),l=o.getBBox().height+h,f=1,d=l,g=0,p=0,v=0;a.getBBox().height>u&&i.each(s,function(i){r=i.getBBox(),e=r.width+c,n=r.height+h,g=p,p=e>p?e:p,t=d,d+=n,d>u?(v+=g,d=n+l,f++,p=0,g=0,i.move(v,l)):i.move(v,t)})},_warpHorizontal:function(){var t,e,n,r=this.get("itemsGroup"),a=r.get("children"),o=this.get("maxLength"),s=this.get("spacingX"),u=this.get("spacingY"),c=0,h=0,l=0;r.getBBox().width>o&&i.each(a,function(r){n=r.getBBox(),t=n.width+s,e=n.height+u,l=h,h+=t,h>o?(h=t,c++,r.move(0,c*e+u)):r.move(l,c*e+u)})},_bindUI:function(){this._bindOverOut(),this._bindClick()},_bindClick:function(){var t=this.get("checkable");t&&this.on("click",i.wrapBehavior(this,"_onClick"))},_bindOverOut:function(){this.on("mouseenter",i.wrapBehavior(this,"_onMouseenter")),this.on("mouseleave",i.wrapBehavior(this,"_onMouseleave"))},_onClick:function(t){var e,n,i,a,s=this.get("leaveChecked"),u=this._getLi(t.currentTarget),c=this.get("items");if(u){var h=r(c,u);if(a=u.get("checked"),e=new o("itemclick",t),e.item=h,this.trigger(e),s&&a&&1===this.getLeaveCount())return;a?(i=new o("itemunchecked",t),i.item=h,i.currentTarget=u,this.trigger(i)):(n=new o("itemchecked",t),n.item=h,n.currentTarget=u,this.trigger(n))}},_onMouseenter:function(t){var e=this.get("canvas"),n=this._getLi(t.currentTarget);if(n){var a=new o("itemover",t),s=t.currentTarget,u=s.get("canvas").get("el");a.item=n,this.trigger(a),i.modiCSS(u,{cursor:"pointer"});var c=this.get("items"),h=r(c,n);if(n.get("checked")){var l=new o("itemactived",t);l.item=h,l.currentTarget=n,this.trigger(l),e.draw()}}},_onMouseleave:function(t){var e=this.get("canvas"),n=this._getLi(t.currentTarget);if(n){var r=new o("itemout",t),a=e.get("el");if(r.item=n,this.trigger(r),i.modiCSS(a,{cursor:"default"}),n.get("checked")){var s=new o("itemunactived",t);this.trigger(s),e.draw()}}},_renderBack:function(){var t=this.get("itemsGroup"),e=this.get("backPadding"),n=this.get("back");t.renderBack(e,n)},_renderItems:function(){var t=this,e=t.get("items");i.each(e,function(e,n){t._addItem(e,n)})},_addItem:function(t){var e=this.get("itemsGroup"),n=this._getNextX(),r=this._getNextY(),a=this.get("unChecked"),o={words:[{text:this._formatPoint(t.name)}]},s={};t.marker&&(t.checked||(t.marker.fill=a,t.marker.stroke&&(t.marker.stroke=a),s.fill=a),o.marker=t.marker),s=i.mix({},this.get("word"),s),this.addEachItem(e,{word:s,wordSpaceing:this.get("wordSpaceing"),x:n,y:r,items:o,class:"legend-item",checked:t.checked,value:t.name})},_getNextX:function(){var t=this.get("layout"),e=this.get("spacingX"),n=this.get("itemsGroup"),r=n.get("children"),a=0;return"horizontal"===t&&i.each(r,function(t){a+=t.getBBox().width+e}),a},_getNextY:function(){var t=this.get("spacingY"),e=this.get("layout"),n=this.get("itemsGroup"),r=this.get("titleShape"),a=n.get("children"),o=r.getBBox().height+t;return"vertical"===e&&i.each(a,function(e){o+=e.getBBox().height+t}),o},_getLi:function(t){var e=t.get("parent");return"legend-item"===e.get("class")?e:null}}),t.exports=u},function(t,e,n){"use strict";var r=n(1),i=n(28),a=n(20),o=n(32),s=n(7).Group,u=n(55),c=16,h=function(t){h.superclass.constructor.call(this,t)};h.CFG={type:"continuous-legend",items:null,layout:"vertical",width:200,height:60,attrType:null,titleOffset:20,nameOffset:10,range:[0,100],outRange:{fill:"#ccc"},inRange:{fill:"#4E7CCC"},word:{fill:"#333",textAlign:"center",textBaseline:"middle"},middleAttr:{fill:"#fff",fillOpacity:0},checkable:!0,attr:null},r.extend(h,i),r.augment(h,{_formatPoint:function(t){var e=this.get("formatter");return e&&(t=e.call(this,t)),t},_calStartPoint:function(){var t=this.get("titleShape"),e=t.getBBox(),n=this.get("titleOffset"),r={x:0,y:e.height+n};return r},_beforeRenderUI:function(){var t=this.get("items");if(r.isArray(t)&&t.length){h.superclass._beforeRenderUI.call(this);var e=new s,n=new s,i=new s,a=this._calStartPoint(),o=this.addGroup(u,{minHandleElement:e,maxHandleElement:n,backgroundElement:i,middleAttr:this.get("middleAttr"),layout:this.get("layout"),range:this.get("range"),width:this.get("width"),height:this.get("height"),operable:this.get("checkable")});o.translate(a.x,a.y),this.set("rangeElement",o),this.set("firstItem",t[0]),this.set("lastItem",t[t.length-1])}},_bindUI:function(){var t=this.get("checkable");if(t){var e=this,n=e.get("rangeElement");n.on("rangeChange",function(t){var n=t.range,r=1*e.get("firstItem").name,i=1*e.get("lastItem").name,a=r+n[0]/100*(i-r),s=r+n[1]/100*(i-r);s>1&&(a=parseInt(a,10),s=parseInt(s,10)),e._updateElement(a,s);var u=new o("itemfiltered",t);u.range=[a,s],e.trigger(u)})}},_updateElement:function(t,e){var n=this.get("minTextElement"),r=this.get("maxTextElement");if(n.attr("text",this._formatPoint(t)+""),r.attr("text",this._formatPoint(e)+""),"color"===this.get("attrType")){var i=this.get("attr"),a=this.get("minButtonElement"),o=this.get("maxButtonElement");a.attr("fill",i.mappingValues(t).join("")),o.attr("fill",i.mappingValues(e).join(""))}},_renderUI:function(){h.superclass._renderUI.call(this),this._renderBackground(),this._renderTrigger()},_renderBackground:function(){var t,e=this.get("attrType"),n=this.get("rangeElement"),r=n.get("middleHandleElement");"color"===e?t=this._renderGradient():"size"===e&&(t=this._renderTriangle()),t.attr("clip",r)},_renderGradient:function(){var t,e=this.get("rangeElement"),n=e.get("backgroundElement"),i=this.get("width"),o=this.get("height"),s=this.get("layout"),u=this.get("items"),c="";return"vertical"===s?(c+="l (90) ",r.each(u,function(e){t=new a(e.color).getRGBStyle(),c+=1-e.value+":"+t+" "})):(c+="l (0) ",r.each(u,function(e){t=new a(e.color).getRGBStyle(),c+=e.value+":"+t+" "})),this._addBackground(n,"Rect",{x:0,y:0,width:i,height:o,fill:c,strokeOpacity:0})},_renderTriangle:function(){var t=this.get("rangeElement"),e=t.get("backgroundElement"),n=this.get("width"),i=this.get("height"),a=this.get("inRange"),o=this.get("layout"),s="vertical"===o?[[0,0],[n,0],[n,i]]:[[0,i],[n,0],[n,i]];return this._addBackground(e,"Polygon",r.mix({points:s},a))},_addBackground:function(t,e,n){t.addShape(e,{attrs:r.mix({},n,this.get("outRange"))});var i=t.addShape(e,{attrs:n});return i},_renderTrigger:function(){var t,e,n,i,a=this.get("firstItem"),o=this.get("lastItem"),s=this.get("layout"),u=this.get("attrType"),c=this.get("word"),h=this.get("inRange");"color"===u?(t={fill:a.color},e={fill:o.color}):(t=r.mix({},h),e=r.mix({},h)),n=r.mix({text:a.name},c),i=r.mix({text:o.name},c),"vertical"===s?(this._addVerticalTrigger("min",t,n),this._addVerticalTrigger("max",e,i)):(this._addHorizontalTrigger("min",t,n),this._addHorizontalTrigger("max",e,i))},_addVerticalTrigger:function(t,e,n){var i=this.get("rangeElement"),a=i.get(t+"HandleElement"),o=this.get("width"),s=a.addShape("polygon",{attrs:r.mix({points:[[o/2+c,0],[o/2+1,0],[o/2+c,"min"===t?c:-c]]},e)}),u=a.addShape("text",{attrs:r.mix(n,{x:o+8,y:"max"===t?-8:8,textAlign:"start",textBaseline:"middle"})}),h=this.get("layout"),l="vertical"===h?"ns-resize":"ew-resize";s.set("cursor",l),u.set("cursor",l),this.set(t+"ButtonElement",s),this.set(t+"TextElement",u)},_addHorizontalTrigger:function(t,e,n){var i=this.get("rangeElement"),a=i.get(t+"HandleElement"),o=a.addShape("polygon",{attrs:r.mix({points:[[0,0],[0,-1*c],["min"===t?-c:c,-1*c]]},e)}),s=a.addShape("text",{attrs:r.mix(n,{x:"min"===t?-c/2:c/2,y:-1*(8+c),textAlign:"min"===t?"end":"start",textBaseline:"middle"})}),u=this.get("layout"),h="vertical"===u?"ns-resize":"ew-resize";o.set("cursor",h),s.set("cursor",h),this.set(t+"ButtonElement",o),this.set(t+"TextElement",s)}}),t.exports=h},function(t,e,n){var r=n(28);r.Category=n(119),r.Continuous=n(120),t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(7).Group,a=n(54),o=function(t){o.superclass.constructor.call(this,t)};o.CFG={type:"plotBack",margin:null,border:null,plotRange:null,background:null},r.extend(o,i),r.augment(o,{_beforeRenderUI:function(){this._calculateRange()},_renderUI:function(){this._renderBorder(),this._renderBackground()},_renderBorder:function(){var t,e=this,n=e.get("border"),i=e.get("canvas"),a=e.get("borderShape");if(n){var o=e.get("width")||i.get("width"),s=e.get("height")||i.get("height");a?a.attr({x:0,y:0,width:o,height:s}):(t=r.mix({x:0,y:0,width:o,height:s},n),a=this.addShape("rect",{attrs:t}),this.set("borderShape",a))}},_renderBackground:function(){var t,e,n,i,a=this,o=a.get("background"),s=a.get("plotRange"),u=a.get("backShape");o&&(t=s.getWidth(),e=s.getHeight(),n=s.tl,i={x:n.x,y:n.y,width:t,height:e
9},u?u.attr(i):(o.image?(i.img=o.image,u=a.addShape("image",{attrs:i})):(r.mix(i,o),u=a.addShape("rect",{attrs:i})),a.set("backShape",u)))},_calculateRange:function(){var t,e,n=this,i=n.get("margin"),o=n.get("canvas"),s=n.get("width")||o.get("width"),u=n.get("height")||o.get("height"),c=n.get("plotRange"),h=0,l=0,f=0,d=0;r.isNumber(i)&&(h=l=f=d=i),r.isArray(i)&&(h=i[0],f=r.isNull(i[1])?i[0]:i[1],d=r.isNull(i[2])?i[0]:i[2],l=r.isNull(i[3])?f:i[3]),t={x:l,y:u-d},e={x:s-f,y:h},c?c.reset(t,e):(c=new a(t,e),n.set("plotRange",c))},repaint:function(){return this._calculateRange(),this._renderBorder(),this._renderBackground(),this}}),t.exports=o},function(t,e,n){"use strict";function r(t,e){return t.getElementsByClassName(e)[0]}var i=n(1),a=n(2),o=n(7).Group,s=n(53),u="ac-title",c="ac-list",h=[10,10,10,10],l=20,f=function(t){f.superclass.constructor.call(this,t)};f.CFG={zIndex:10,x:0,y:0,items:null,title:{fill:"#fff"},name:{},value:{},crossLine:{stroke:"#999",lineWidth:1},markerCfg:null,titleText:void 0,wordSpaceing:6,crosshairs:!1,titleShape:null,contentGroup:null,crossLineShapeX:null,crossLineShapeY:null,background:{radius:6,fill:"#000",fillOpacity:.7},plotRange:null,shared:!1,offset:10,animate:!0,duration:50,visible:!1,valueSplit:"",valueSuffix:"",custom:!1,customDiv:null,customFollow:!0,timeStamp:0,html:'<div class="ac-tooltip" style="position:absolute;visibility: hidden;"><h4 class="'+u+'"></h4><ul class="'+c+'"></ul></div>',itemTpl:'<li><span style="color:{color}">{name}</span> : {value}</li>',inPlot:!0},i.extend(f,o),i.augment(f,s,{_beforeRenderUI:function(){var t=this.get("custom"),e=this.get("crossLine"),n=this.addGroup({attrs:e}),r=this.addGroup({zIndex:10,attrs:{fill:"#fff",textAlign:"left"}});this.set("crossLineGroup",n),this.set("contentGroup",r),this.set("itemsGroup",r.addGroup()),t&&this._setCustomDiv()},_renderUI:function(){if(this.get("items")){var t=this.get("custom");t?this._renderCustom():this._renderContent()}this._renderCrossLine()},_renderContent:function(){var t=this,e=t.get("items"),n=t.get("title"),r=t.get("titleText"),a=t.get("name"),o=t.get("value"),s=t.get("valueSplit"),u=t.get("valueSuffix"),c=t.get("markerCfg"),f=this.get("itemsGroup");if(f&&f.clear(),n){var d=f.addShape("text",{attrs:i.mix({},n,{x:h[3],y:h[0]+14,text:r})});this.set("titleShape",d)}i.each(e,function(e,n){var r=i.mix({},a,{text:e.name?e.name+":":""}),d=i.mix({},o,{text:e.value+s+u});e.marker===!0&&(e.marker="circle");var g=e.marker?{symbol:e.marker,fill:e.color}:{};t.addEachItem(f,{x:h[3],y:(n+1)*l+h[0]+8,items:{color:e.color,words:[r,d],marker:i.mix(g,c)}})}),f.renderBack(h,this.get("background"))},_renderCrossLine:function(){var t=this.get("crosshairs"),e=this.get("canvas"),n=this.get("plotRange");if(t)switch(this.clearCrossLineGroup(),t.type){case"x":this._renderCrossLineX(e,n);break;case"y":this._renderCrossLineY(e,n);break;case"cross":this._renderCrossLineX(e,n),this._renderCrossLineY(e,n);break;default:this._renderCrossLineY(e,n)}},_renderCrossLineY:function(t,e){var n=i.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},this.get("crossLine"));"dash"===this.get("crosshairs").shape&&(n.lineDash="6 3"),this._addCrossLineShape(n,"Y")},_renderCrossLineX:function(t,e){var n=i.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},this.get("crossLine"));"dash"===this.get("crosshairs").shape&&(n.lineDash="6 3"),this._addCrossLineShape(n,"X")},_addCrossLineShape:function(t,e){var n=this.get("crossLineGroup"),r=n.addShape("line",{attrs:t});return this.set("crossLineShape"+e,r),r},clearCrossLineGroup:function(){var t=this.get("crossLineGroup");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),t.clear()},setMarkers:function(t,e){var n=this,r=n.get("markerGroup");r?r.clear():(r=n.addGroup({zIndex:2}),n.set("markerGroup",r)),i.each(t,function(t){r.addShape("marker",{attrs:i.mix({},e,{stroke:t.color,x:t.point.x,y:t.point.y})})})},clearMarkers:function(){var t=this.get("markerGroup");t&&t.clear()},setCross:function(t){this.set("crosshairs",{type:t}),this._renderCrossLine()},setContent:function(t,e){var n=this._isContentChange(t,e);if(n){var r=this.get("custom"),i=+new Date;this.set("items",e),this.set("titleText",t),this.set("timeStamp",i),r?this._renderCustom():this._renderContent()}return this},_isContentChange:function(t,e){var n=this.get("titleText"),r=this.get("items"),a=!(t===n&&r.length===e.length);return a||i.each(e,function(t,e){var n=r[e];if(a=t.value!==n.value||t.color!==n.color||t.name!==n.name||t.title!==n.title)return!1}),a},getTitle:function(){return this.get("titleShape")},setPosition:function(t,e){var n,r=this.get("canvas"),o=this.get("custom"),s=this.get("customDiv"),u=this.get("plotRange"),c=this.get("offset"),h=this.get("crossLineShapeX"),l=this.get("crossLineShapeY"),f=this.get("contentGroup"),d=(this.get("markerGroup"),f.getBBox()),g=this.get("animate"),p=!0,v=t,m=e;if(s&&this.get("customFollow")?(n=i.getWidth(s)+2*c,t-=n,e=e-i.getHeight(s)-2*c):(n=d.width+c,t-=n,e-=d.height),this.get("inPlot")&&u&&(u.isInRange(t,e)||(u.isInHorizontal(t)||(u.tr.x-u.tl.x>=2*n?(t=Math.max(u.tl.x,v)+c,p=!1):(t=u.tl.x,e-=c)),u.isInVertical(e)||(e=u.tl.y))),this.get("x")!==t||this.get("y")!==e)if(l&&(p?l.move(v,0):l.move(t-c,0)),h&&h.move(0,m),o)this.moveCustom(t,e,p);else{var y=new a.Matrix3;y.translate(t,e),g&&this.get("visible")?f.animate({matrix:y},this.get("duration")):(f.setMatrix(y),this.get("visible")||this.show(),r.draw())}},_setCustomDiv:function(){var t,e,n=this,r=n.get("html"),a=n.get("canvas").get("el").parentNode;/^\#/.test(r)?(e=r.replace("#",""),t=document.getElementById(e)):t=i.createDom(r),n.set("customDiv",t),n.get("customFollow")&&(a.appendChild(t),a.style.position="relative")},_renderCustom:function(){var t=this,e=t.get("title"),n=t.get("titleText"),a=t.get("customDiv"),o=r(a,u),s=r(a,c),h=t.get("items");t._clearCustom(),o&&e&&(o.innerHTML=n),s&&(t.set("titleText",n),i.each(h,function(e,n){t.addCustomItem(e,n)}))},_clearCustom:function(){var t=this.get("customDiv"),e=r(t,u),n=r(t,c);e&&(e.innerHTML=""),n&&(n.innerHTML="")},addCustomItem:function(t,e){var n,a,o=this.get("customDiv"),s=r(o,c),u=this.get("itemTpl"),h=i.mix({index:e},t);n=i.substitute(u,h),a=i.createDom(n),s.appendChild(a)},moveCustom:function(t,e){var n=this.get("customDiv");n&&this.get("customFollow")&&(n.style.left=t+"px",n.style.top=e+"px")},show:function(){var t=this.get("crossLineShapeX"),e=this.get("crossLineShapeY"),n=this.get("markerGroup"),r=this.get("customDiv"),i=this.get("hideHandler");i&&clearTimeout(i),this.sort(),t&&t.show(),e&&e.show(),n&&n.show(),f.superclass.show.call(this),r&&this.get("customFollow")&&(r.style.visibility="visible",this.get("canvas").draw())},hide:function(){var t=this,e=t.get("customDiv"),n=t.get("crossLineShapeX"),r=t.get("crossLineShapeY"),i=t.get("markerGroup"),a=t.get("canvas"),o=setTimeout(function(){e&&t.get("customFollow")&&(e.style.visibility="hidden"),t.set("hideHandler",null),t.get("destroyed")||(f.superclass.hide.call(t),a.draw())},t.get("duration"));t.set("hideHandler",o),n&&n.hide(),r&&r.hide(),i&&i.hide()},remove:function(){var t=this,e=t.get("crossLineShapeX"),n=t.get("crossLineShapeY"),r=t.get("markerGroup"),i=t.get("customDiv"),a=t.get("html");e&&e.remove(),n&&n.remove(),r&&r.remove(),f.superclass.remove.call(this),i&&!/^\#/.test(a)&&i.parentNode.removeChild(i)}}),t.exports=f},function(t,e,n){"use strict";var r=n(75),i=n(127),a=n(59),o=function(t){o.superclass.constructor.call(this,t)};o.CFG={eventEnable:!0,width:null,height:null,widthCanvas:null,heightCanvas:null,widthStyle:null,heightStyle:null,containerDOM:null,canvasDOM:null,pixelRatio:null},r.extend(o,a.Group),r.augment(o,{init:function(){o.superclass.init.call(this),this._setGlobalParam(),this._setDOM(),this._setInitSize(),this._setCanvas(),this._scale(),this.get("eventEnable")&&this._registEvents()},_registEvents:function(){var t=this,e=t.get("el"),n=new i(t);e.addEventListener("mouseout",function(t){n.mouseout(t)},!1),e.addEventListener("mouseover",function(t){n.mouseover(t)},!1),e.addEventListener("mousemove",function(t){n.mousemove(t)},!1),e.addEventListener("mousedown",function(t){n.mousedown(t)},!1),e.addEventListener("mouseup",function(t){n.mouseup(t)},!1),e.addEventListener("click",function(t){n.click(t)},!1),e.addEventListener("dblclick",function(t){n.dblclick(t)},!1)},_scale:function(){var t=this.get("pixelRatio");this.scale(t,t)},_setCanvas:function(){var t=this.get("canvasDOM");this.set("el",t),this.set("context",t.getContext("2d")),this.set("canvas",this)},_setGlobalParam:function(){var t=this.get("pixelRatio");t||this.set("pixelRatio",r.getRatio())},_setDOM:function(){this._setContainer(),this._setLayer()},_setContainer:function(){var t=this.get("containerId"),e=this.get("containerDOM");e||(e=document.getElementById(t),this.set("containerDOM",e)),r.modiCSS(e,{position:"relative"})},_setLayer:function(){var t=this.get("containerDOM"),e=r.guid("canvas_");if(t){var n=r.createDom('<canvas id="'+e+'"></canvas>');t.appendChild(n),this.set("canvasDOM",n)}},_setInitSize:function(){this.get("widthStyle")?this.changeSizeByCss(this.get("widthStyle"),this.get("heightStyle")):this.get("width")&&this.changeSize(this.get("width"),this.get("height"))},_getPx:function(t,e){var n=this.get("canvasDOM");n.style[t]=e;var i=r.getBoundingClientRect(n);return"width"===t?i.right-i.left:"height"===t?i.bottom-i.top:void 0},_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"),e=this.get("width");return e*t},getHeight:function(){var t=this.get("pixelRatio"),e=this.get("height");return e*t},changeSizeByCss:function(t,e){var n=this.get("pixelRatio");t=this._getPx("width",t),e=this._getPx("height",e);var r=t*n,i=e*n;this.set("widthStyle",t),this.set("heightStyle",e),this.set("widthCanvas",r),this.set("heightCanvas",i),this.set("width",t),this.set("height",e),this._reSize()},changeSize:function(t,e){var n=this.get("pixelRatio"),r=t*n,i=e*n;this.set("widthCanvas",r),this.set("heightCanvas",i),this.set("widthStyle",t+"px"),this.set("heightStyle",e+"px"),this.set("width",t),this.set("height",e),this._reSize()},getPointByClient:function(t,e){var n=this.get("el"),r=n.getBoundingClientRect(),i=r.right-r.left,a=r.bottom-r.top;return{x:(t-r.left)*(n.width/i),y:(e-r.top)*(n.height/a)}},getClientByPoint:function(t,e){var n=this.get("el"),r=n.getBoundingClientRect(),i=r.right-r.left,a=r.bottom-r.top;return{clientX:t/(n.width/i)+r.left,clientY:e/(n.height/a)+r.top}},beforeDraw:function(){var t=this.get("context"),e=this.get("el");t&&t.clearRect(0,0,e.width,e.height)},_beginDraw:function(){this.setSilent("toDraw",!0)},_endDraw:function(){this.setSilent("toDraw",!1)},draw:function(){function t(){e.set("animateHandler",r.requestAnimationFrame(function(){e.set("animateHandler",void 0),e.get("toDraw")&&t()})),e.beforeDraw();try{var n=e.get("context");o.superclass.draw.call(e,n)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),e._endDraw()}e._endDraw()}var e=this;e.get("destroyed")||(e.get("animateHandler")?this._beginDraw():t())},destroy:function(){var t=this.get("containerDOM"),e=this.get("canvasDOM");e&&t&&t.removeChild(e),o.superclass.destroy.call(this)}}),t.exports=o},function(t,e,n){"use strict";var r=n(1),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){var r=n(1),i=n(125);t.exports={initEventDispatcher:function(){this.__listeners={}},on:function(t,e){var n=this.__listeners;return r.isNull(n[t])&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e),this},off:function(t,e){var n=this.__listeners;return 0===arguments.length?(this.__listeners={},this):1===arguments.length&&r.isString(t)?(n[t]=[],this):2===arguments.length&&r.isString(t)&&r.isFunction(e)?(r.remove(n[t],e),this):void 0},has:function(t,e){var n=this.__listeners;return 0===arguments.length&&!r.isBlank(n)||(!(1!==arguments.length||!n[t]||r.isBlank(n[t]))||!(2!==arguments.length||!n[t]||n[t].indexOf(e)===-1))},trigger:function(t){var e=this,n=e.__listeners,i=n[t.type];if(t.target=e,r.notNull(i)&&i.forEach(function(n){n.call(e,t)}),t.bubbles){var a=e.get("parent");a&&!t.propagationStopped&&a.trigger(t)}return e},fire:function(t,e){var n=new i(t);r.each(e,function(t,e){n[e]=t}),this.trigger(n)}}},function(t,e,n){"use strict";var r=n(1),i=n(32),a=function(t){this.canvas=t,this.el=t.get("el"),this.current=null,this.pre=null};r.augment(a,{tryTrigger:function(t,e){t.__listeners&&t.trigger(e)},getCurrent:function(t){var e=this.canvas,n=e.getPointByClient(t.clientX,t.clientY);this.point=n,this.pre=this.current,this.current=e.getShape(n.x,n.y)},mousemove:function(t){this.getCurrent(t);var e=this.point,n=this.canvas;if(n.has("canvas-mousemove")){var r=new i("canvas-mousemove",t,!0,!0);r.x=e.x,r.y=e.y,r.clientX=t.clientX,r.clientY=t.clientY,r.currentTarget=n,this.tryTrigger(n,r)}if(this.pre&&this.pre!==this.current){var a=new i("mouseleave",t,!0,!0);a.x=e.x,a.y=e.y,a.clientX=t.clientX,a.clientY=t.clientY,a.currentTarget=this.pre,a.target=this.pre,this.tryTrigger(this.pre,a)}if(this.current){var o=new i("mousemove",t,!0,!0);if(o.x=e.x,o.y=e.y,o.clientX=t.clientX,o.clientY=t.clientY,o.currentTarget=this.current,o.target=this.current,this.tryTrigger(this.current,o),this.pre!==this.current){var s=new i("mouseenter",t,!0,!0);s.x=e.x,s.y=e.y,s.clientX=t.clientX,s.clientY=t.clientY,s.currentTarget=this.current,s.target=this.current,this.tryTrigger(this.current,s)}}},mousedown:function(t){var e=this.point,n=this.canvas;if(n.has("canvas-mousedown")){var r=new i("canvas-mousedown",t,!0,!0);r.x=e.x,r.y=e.y,r.clientX=t.clientX,r.clientY=t.clientY,r.currentTarget=n,this.tryTrigger(n,r)}if(this.current){var a=new i("mousedown",t,!0,!0);a.x=e.x,a.y=e.y,a.clientX=t.clientX,a.clientY=t.clientY,a.currentTarget=this.current,a.target=this.current,this.tryTrigger(this.current,a)}},mouseup:function(t){var e=this.point,n=this.canvas;if(n.has("canvas-mouseup")){var r=new i("canvas-mouseup",t,!0,!0);r.x=e.x,r.y=e.y,r.clientX=t.clientX,r.clientY=t.clientY,r.currentTarget=n,this.tryTrigger(n,r)}if(this.current){var a=new i("mouseup",t,!0,!0);a.x=e.x,a.y=e.y,a.clientX=t.clientX,a.clientY=t.clientY,a.currentTarget=this.current,a.target=this.current,this.tryTrigger(this.current,a)}},click:function(t){this.getCurrent(t);var e=this.point,n=this.canvas;if(n.has("canvas-click")){var r=new i("canvas-click",t,!0,!0);r.x=e.x,r.y=e.y,r.clientX=t.clientX,r.clientY=t.clientY,r.currentTarget=n,this.tryTrigger(n,r)}if(this.current){var a=new i("click",t,!0,!0);a.x=e.x,a.y=e.y,a.clientX=t.clientX,a.clientY=t.clientY,a.currentTarget=this.current,a.target=this.current,this.tryTrigger(this.current,a)}},dblclick:function(t){var e=this.point,n=this.canvas;if(n.has("canvas-dblclick")){var r=new i("canvas-dblclick",t,!0,!0);r.x=e.x,r.y=e.y,r.clientX=t.clientX,r.clientY=t.clientY,r.currentTarget=n,this.tryTrigger(n,r)}if(this.current){var a=new i("dblclick",t,!0,!0);a.x=e.x,a.y=e.y,a.clientX=t.clientX,a.clientY=t.clientY,a.currentTarget=this.current,a.target=this.current,this.tryTrigger(this.current,a)}},mouseout:function(t){var e=this.point,n=this.canvas,r=new i("canvas-mouseleave",t,!0,!0);r.x=e.x,r.y=e.y,r.currentTarget=n,this.tryTrigger(n,r)},mouseover:function(t){var e=this.canvas,n=new i("canvas-mouseenter",t,!0,!0);n.currentTarget=e,this.tryTrigger(e,n)}}),t.exports=a},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!==h){var e=t.superclass.constructor;e&&!e.__cfg&&i(e),t.__cfg={},a.mix(!0,t.__cfg,e.__cfg),a.mix(!0,t.__cfg,t.CFG)}}var a=n(1),o=n(2).Vector3,s=n(57),u=n(66),c={},h=function(t){h.superclass.constructor.call(this,t),this.set("children",[]),this._beforeRenderUI(),this._renderUI(),this._bindUI()};a.extend(h,s),a.augment(h,{isGroup:!0,canFill:!0,canStroke:!0,getDefaultCfg:function(){return i(this.constructor),a.mix(!0,{},this.constructor.__cfg)},_beforeRenderUI:function(){},_renderUI:function(){},_bindUI:function(){},addShape:function(t,e){var n,r=this.get("canvas");e=e||{};var i=c[t];if(i||(i=a.ucfirst(t),c[t]=i),e.attrs){var o=e.attrs;if("text"===t){var s=r.get("fontFamily");s&&(o.fontFamily=o.fontFamily?o.fontFamily:s)}}return e.canvas=r,e.type=t,n=new u[i](e),this.add(n),n},addGroup:function(t,e){var n,r=this.get("canvas");if(e=a.mix({},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 h(t),this.add(n);else{if(void 0!==t)return!1;n=new h,this.add(n)}return n},renderBack:function(t,e){var n=this.get("backShape"),r=this.getBBox(),i=this.get("parent");return a.mix(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=i.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",n),i.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),h.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.__setEvn(t)}),n.push.apply(n,t);else{var r=t,i=r.get("parent");i&&i.removeChild(r,!1),e.__setEvn(r),n.push(r)}return e},contain:function(t){var e=this.get("children");return e.indexOf(t)>-1},getChildByIndex:function(t){var e=this.get("children");return e[t]},getFirst:function(){return this.getChildByIndex(0)},getLast:function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},__setEvn:function(t){var e=this;t.__cfg.parent=e,t.__cfg.context=e.__cfg.context,t.__cfg.canvas=e.__cfg.canvas,t.__cfg.totalMatrix=null;var n=t.__attrs.clip;n&&(n.setSilent("parent",e),n.setSilent("context",e.get("context")));var r=t.__cfg.children;r&&a.each(r,function(e){t.__setEvn(e)})},getBBox:function(){var t=this,e=1/0,n=-(1/0),r=1/0,i=-(1/0),s=t.get("children");a.each(s,function(t){if(t.get("visible")){var a=t.getBBox();if(!a)return!0;var s=new o(a.minX,a.minY,1),u=new o(a.minX,a.maxY,1),c=new o(a.maxX,a.minY,1),h=new o(a.maxX,a.maxY,1);t.apply(s),t.apply(u),t.apply(c),t.apply(h);var l=Math.min(s.x,u.x,c.x,h.x),f=Math.max(s.x,u.x,c.x,h.x),d=Math.min(s.y,u.y,c.y,h.y),g=Math.max(s.y,u.y,c.y,h.y);l<e&&(e=l),f>n&&(n=f),d<r&&(r=d),g>i&&(i=g)}});var u={minX:e,minY:r,maxX:n,maxY:i};return u.x=u.minX,u.y=u.minY,u.width=u.maxX-u.minX,u.height=u.maxY-u.minY,u},drawInner:function(t){for(var e=this.get("children"),n=0;n<e.length;n++){var r=e[n];r.draw(t)}return this},getCount:function(){return this.get("children").length},sort:function(){var t=this.get("children");return t.sort(function(t,e){return t.get("zIndex")-e.get("zIndex")}),this},find:function(t){return this.findBy(function(e){return e.get("id")===t})},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,a=i.__attrs.clip,o=i.__cfg.children;return a?a.inside(t,e)&&(n=r(o,t,e)):n=r(o,t,e),n},clearTotalMatrix:function(){var t=this.get("totalMatrix");if(t){this.setSilent("totalMatrix",null);for(var e=this.__cfg.children,n=0;n<e.length;n++){var r=e[n];r.clearTotalMatrix()}}},clear:function(){for(var t=this.get("children");0!==t.length;)t[t.length-1].remove();return this},destroy:function(){this.get("destroyed")||(this.clear(),h.superclass.destroy.call(this))}}),t.exports=h},function(t,e,n){var r=n(1),i=n(76),a=new i;t.exports={tween:a,animate:function(t,e,n,i){var o=a.getNow(),s=r.mix({},t,{duration:e});a.animate(this).append(o,s,n,i),"silent"===a.get("status")&&a.play()}}},function(t,e,n){var r=n(1),i=n(2).Vector3,a=["strokeStyle","fillStyle","globalAlpha"],o=["circle","ellipse","fan","polygon","rect","path"],s={r:"R",opacity:"Opacity",lineWidth:"LineWidth",clip:"Clip",stroke:"Stroke",fill:"Fill",strokeOpacity:"Stroke",fillOpacity:"Fill",x:"X",y:"Y",rx:"Rx",ry:"Ry",re:"Re",rs:"Rs",width:"Width",height:"Height",img:"Img",x1:"X1",x2:"X2",y1:"Y1",y2:"Y2",points:"Points",p1:"P1",p2:"P2",p3:"P3",p4:"P4",text:"Text",radius:"Radius",textAlign:"TextAlign",textBaseline:"TextBaseline",font:"Font",fontSize:"FontSize",fontStyle:"FontStyle",fontVariant:"FontVariant",fontWeight:"FontWeight",fontFamily:"FontFamily",clockwise:"Clockwise",startAngle:"StartAngle",endAngle:"EndAngle",path:"Path"},u={stroke:"strokeStyle",fill:"fillStyle",opacity:"globalAlpha"};t.exports={canFill:!1,canStroke:!1,initAttrs:function(t){return this.__attrs={opacity:1,fillOpacity:1,strokeOpacity:1},this.attr(r.simpleMix(this.getDefaultAttrs(),t)),this},getDefaultAttrs:function(){return{}},attr:function(t,e){var n=this;if(0===arguments.length)return n.__attrs;if(r.isObject(t)){for(var i in t)if(a.indexOf(i)===-1){var o=t[i];n._setAttr(i,o)}return n.__afterSetAttrAll&&n.__afterSetAttrAll(t),n.clearBBox(),n}if(2===arguments.length){if(n._setAttr(t,e)!==!1){var u="__afterSetAttr"+s[t];n[u]&&n[u](e)}return n.clearBBox(),n}return n._getAttr(t)},clearBBox:function(){this.setSilent("box",null)},__afterSetAttrAll:function(){},_getAttr:function(t){return this.__attrs[t]},_setAttr:function(t,e){var n=this;if("clip"===t)n.__setAttrClip(e),n.__attrs.clip=e;else{n.__attrs[t]=e;var r=u[t];r&&(n.__attrs[r]=e)}return n},hasFill:function(){return this.canFill&&this.__attrs.fillStyle},hasStroke:function(){return this.canStroke&&this.__attrs.strokeStyle},__setAttrOpacity:function(t){return this.__attrs.globalAlpha=t,t},__setAttrClip:function(t){var e=this;return t&&o.indexOf(t.type)>-1?(null===t.get("canvas")&&(t=r.clone(t)),t.set("parent",e.get("parent")),t.set("context",e.get("context")),t.inside=function(n,r){var a=new i(n,r,1);return t.invert(a,e.get("canvas")),t.__isPointInFill(a.x,a.y)},t):null}}},function(t,e,n){function r(t){var e=t.elements;return 1===e[0]&&0===e[1]&&0===e[3]&&1===e[4]&&0===e[6]&&0===e[7]}function i(t){var e=t.elements;return 0===e[1]&&0===e[3]&&0===e[6]&&0===e[7]}function a(t,e){r(e)||(i(e)?(t.elements[0]*=e.elements[0],t.elements[4]*=e.elements[4]):t.multiply(e))}var o=n(1),s=n(2).Matrix3;t.exports={initTransform:function(){this.__m=new s},translate:function(t,e){return this.__m.translate(t,e),this.clearTotalMatrix(),this},rotate:function(t){return this.__m.rotate(t),this.clearTotalMatrix(),this},scale:function(t,e){return this.__m.scale(t,e),this.clearTotalMatrix(),this},rotateAtStart:function(t){var e=this.attr("x"),n=this.attr("y");Math.abs(t)>2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-n],["r",t],["t",e,n]])},move:function(t,e){var n=this.get("x")||0,r=this.get("y")||0;this.translate(t-n,e-r),this.set("x",t),this.set("y",e)},transform:function(t){var e=this;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.__m=s.multiply(t[1],e.__m),e.clearTotalMatrix()}}),e},setTransform:function(t){return this.__m.identity(),this.transform(t)},getMatrix:function(){return this.__m},setMatrix:function(t){return this.__m=t,this.clearTotalMatrix(),this},apply:function(t,e){var n;return n=e?this._getMatrixByRoot(e):this.__m,t.applyMatrix(n),this},_getMatrixByRoot:function(t){var e=this;t=t||e;for(var n=e,r=[];n!==t;)r.unshift(n),n=n.get("parent");r.unshift(n);var i=new s;return o.each(r,function(t){i.multiply(t.__m)}),i},getTotalMatrix:function(){var t=this.__cfg.totalMatrix;if(!t){t=new s;var e=this.__cfg.parent;if(e){var n=e.getTotalMatrix();a(t,n)}a(t,this.__m),this.__cfg.totalMatrix=t}return t},clearTotalMatrix:function(){},invert:function(t){var e=this.getTotalMatrix();if(i(e))t.x/=e.elements[0],t.y/=e.elements[4];else{var n=e.getInverse();t.applyMatrix(n)}return this},resetTransform:function(t){var e=this.__m.to2DObject();r(this.__m)||t.transform(e.a,e.b,e.c,e.d,e.e,e.f)}}},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{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))}function u(t,e,n,r,i,a,u){var c=h.mod(h.degreeToRad(u),2*Math.PI),l=t.x,f=t.y,d=e.x,g=e.y,p=Math.cos(c)*(l-d)/2+Math.sin(c)*(f-g)/2,v=-1*Math.sin(c)*(l-d)/2+Math.cos(c)*(f-g)/2,m=p*p/(i*i)+v*v/(a*a);m>1&&(i*=Math.sqrt(m),a*=Math.sqrt(m));var y=Math.sqrt((i*i*(a*a)-i*i*(v*v)-a*a*(p*p))/(i*i*(v*v)+a*a*(p*p)));n===r&&(y*=-1),isNaN(y)&&(y=0);var x=y*i*v/a,b=y*-a*p/i,_=(l+d)/2+Math.cos(c)*x-Math.sin(c)*b,w=(f+g)/2+Math.sin(c)*x+Math.cos(c)*b,M=s([1,0],[(p-x)/i,(v-b)/a]),S=[(p-x)/i,(v-b)/a],k=[(-1*p-x)/i,(-1*v-b)/a],A=s(S,k);return o(S,k)<=-1&&(A=Math.PI),o(S,k)>=1&&(A=0),0===r&&A>0&&(A-=2*Math.PI),1===r&&A<0&&(A+=2*Math.PI),[t,_,w,i,a,M,A,c,r]}var c=n(1),h=n(8),l=n(10),f=n(23),d=n(31),g=n(132),p=n(2),v=p.Vector2,m=p.Vector3,y=p.Matrix3,x=["m","l","c","a","q","h","v","t","s","z"],b=function(t,e,n){this.preSegment=e,this.isLast=n,this.init(t,e)};c.augment(b,{init:function(t,e){var n=t[0];e=e||{endPoint:{x:0,y:0}};var a,o,s,c,h=x.indexOf(n)>=0,l=h?n.toUpperCase():n,f=t,d=e.endPoint,g=f[1],p=f[2];switch(l){default:break;case"M":c=h?r(g,p,d):{x:g,y:p},this.command="M",this.params=[d,c],this.subStart=c,this.endPoint=c;break;case"L":c=h?r(g,p,d):{x:g,y:p},this.command="L",this.params=[d,c],this.subStart=e.subStart,this.endPoint=c,this.isLast&&(this.endTangent=function(){return new v(c.x-d.x,c.y-d.y)});break;case"H":c=h?r(g,0,d):{x:g,y:d.y},this.command="L",this.params=[d,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return new v(c.x-d.x,c.y-d.y)};break;case"V":c=h?r(0,g,d):{x:d.x,y:g},this.command="L",this.params=[d,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return new v(c.x-d.x,c.y-d.y)};break;case"Q":h?(a=r(g,p,d),o=r(f[3],f[4],d)):(a={x:g,y:p},o={x:f[3],y:f[4]}),this.command="Q",this.params=[d,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return new v(o.x-a.x,o.y-a.y)};break;case"T":o=h?r(g,p,d):{x:g,y:p},"Q"===e.command?(a=i(e.params[1],d),this.command="Q",this.params=[d,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return new v(o.x-a.x,o.y-a.y)}):(this.command="TL",this.params=[d,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return new v(o.x-d.x,o.y-d.y)});break;case"C":h?(a=r(g,p,d),o=r(f[3],f[4],d),s=r(f[5],f[6],d)):(a={x:g,y:p},o={x:f[3],y:f[4]},s={x:f[5],y:f[6]}),this.command="C",this.params=[d,a,o,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return new v(s.x-o.x,s.y-o.y)};break;case"S":h?(o=r(g,p,d),s=r(f[3],f[4],d)):(o={x:g,y:p},s={x:f[3],y:f[4]}),"C"===e.command?(a=i(e.params[2],d),this.command="C",this.params=[d,a,o,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return new v(s.x-o.x,s.y-o.y)}):(this.command="SQ",this.params=[d,o,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return new v(s.x-o.x,s.y-o.y)});break;case"A":var m=g,y=p,b=f[3],_=f[4],w=f[5];c=h?r(f[6],f[7],d):{x:f[6],y:f[7]},this.command="A",this.params=u(d,c,_,w,m,y,b),this.subStart=e.subStart,this.endPoint=c;break;case"Z":this.command="Z",this.params=[d,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this,i=r.command,a=r.params,o=r.box;if(o&&!l.box(o.minX,o.maxX,o.minY,o.maxY,t,e))return!1;switch(i){default:break;case"M":return!1;case"TL":case"L":case"Z":return l.line(a[0].x,a[0].y,a[1].x,a[1].y,n,t,e);case"SQ":case"Q":return l.quadraticline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,n,t,e);case"C":return l.cubicline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,a[3].x,a[3].y,n,t,e);case"A":var s=a,u=s[1],c=s[2],h=s[3],f=s[4],d=s[5],g=s[6],p=s[7],v=s[8],x=h>f?h:f,b=h>f?1:h/f,_=h>f?f/h:1;s=new m(t,e,1);var w=new y;return w.translate(-u,-c),w.rotate(-p),w.scale(1/b,1/_),s.applyMatrix(w),l.arcline(0,0,x,d,d+g,1-v,n,s.x,s.y)}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=s,h=u,l=o[3],f=o[4],d=o[5],g=o[6],p=o[7],v=o[8],m=l>f?l:f,y=l>f?1:l/f,x=l>f?f/l:1;t.translate(c,h),t.rotate(p),t.scale(y,x),t.arc(0,0,m,d,d+g,1-v),t.scale(1/y,1/x),t.rotate(-p),t.translate(-c,-h);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(n=d.extrema(o[0].x,o[1].x,o[2].x),r=0,i=n.length;r<i;r++)n[r]=d.at(o[0].x,o[1].x,o[2].x,n[r]);for(n.push(o[0].x,o[2].x),e=d.extrema(o[0].y,o[1].y,o[2].y),r=0,i=e.length;r<i;r++)e[r]=d.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(n=f.extrema(o[0].x,o[1].x,o[2].x,o[3].x),r=0,i=n.length;r<i;r++)n[r]=f.at(o[0].x,o[1].x,o[2].x,o[3].x,n[r]);for(e=f.extrema(o[0].y,o[1].y,o[2].y,o[3].y),r=0,i=e.length;r<i;r++)e[r]=f.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],h=s[3],l=s[4],p=s[5],v=s[6],m=s[7],y=s[8],x=p,b=p+v,_=g.xExtrema(m,h,l),w=1/0,M=-(1/0),S=[x,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var k=_+r;1===y?x<k&&k<b&&S.push(k):b<k&&k<x&&S.push(k)}for(r=0,i=S.length;r<i;r++){var A=g.xAt(m,h,l,u,S[r]);A<w&&(w=A),A>M&&(M=A)}var C=g.yExtrema(m,h,l),T=1/0,E=-(1/0),P=[x,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var I=C+r;1===y?x<I&&I<b&&P.push(I):b<I&&I<x&&P.push(I)}for(r=0,i=P.length;r<i;r++){var N=g.yAt(m,h,l,c,P[r]);N<T&&(T=N),N>E&&(E=N)}this.box={minX:w-a,maxX:M+a,minY:T-a,maxY:E+a}}}}),t.exports=b},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={getBoundingClientRect:function(t){var e=t.getBoundingClientRect(),n=document.documentElement.clientTop,r=document.documentElement.clientLeft;return{top:e.top-n,bottom:e.bottom-n,left:e.left-r,right:e.right-r}},getStyle:function(t,e){return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]},modiCSS:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t},createDom:function(t){var e=i.test(t)&&RegExp.$1;e in a||(e="*");var n=a[e];
10return t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t,n.childNodes[0]},addEventListener:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0}}},function(t,e){t.exports={transform:function(t,e){t=t.clone();for(var n=0,r=e.length;n<r;n++){var i=e[n];switch(i[0]){case"t":t.translate(i[1],i[2]);break;case"s":t.scale(i[1],i[2]);break;case"r":t.rotate(i[1]);break;case"m":t.multiply(i[1]);break;default:continue}}return t},scale:function(t,e,n,r,i){return t=t.clone(),t.translate(-1*r,-1*i),t.scale(e,n),t.translate(r,i),t},rotate:function(t,e,n,r){return t=t.clone(),t.translate(-1*n,-1*r),t.rotate(e),t.translate(n,r),t},isMatrix3:function(t){return"matrix3"===t.type}}},function(t,e,n){"use strict";function r(t){this.space={},i.isString(t)?this.setStyle(t):t instanceof r&&this.copy(t)}var i=n(1),a=(n(8),n(138)),o=n(139),s=n(137),u={hex:/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/,space:/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)$/,rgbNum:/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*$/,rgbaNum:/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9]*\.?[0-9]+)\s*$/,rgbPre:/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*$/,rgbaPre:/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*([0-9]*\.?[0-9]+)\s*$/,hsl:/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*$/,hsla:/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*([0-9]*\.?[0-9]+)\s*$/};i.augment(r,{getType:function(){return this.space.type},toRGB:function(){var t=this.space;if("rgb"!==t.type){var e=t.toRGB();this.setRGB(e.r,e.g,e.b,e.a)}},toHSL:function(){var t=this.space;if("hsl"!==t.type){var e=t.toHSL();this.setHSL(e.h,e.s,e.l,e.a)}},getR:function(){return this.toRGB(),this.space.r},getG:function(){return this.toRGB(),this.space.g},getB:function(){return this.toRGB(),this.space.b},getH:function(){return this.toHSL(),this.space.h},getS:function(){return this.toHSL(),this.space.s},getL:function(){return this.toHSL(),this.space.l},getA:function(){return this.space.a},multiplyA:function(t){return void 0===t?this:(void 0===this.space.a&&(this.space.a=1),this.space.a*=t,this)},getRGBStyle:function(){return this.toRGB(),this.space.getStyle()},getRGBPreStyle:function(){return this.toRGB(),this.space.getPreStyle()},getHSLStyle:function(){return this.toHSL(),this.space.getStyle()},getHex:function(){return this.toRGB(),this.space.getHex()},setRGB:function(t,e,n,r){return this.space=new o,this.space.setRGB(t,e,n,r),this},setHSL:function(t,e,n,r){return this.space=new a,this.space.setHSL(t,e,n,r),this},setHex:function(t){return this.space=new o,t=Math.floor(t),this.space.r=(t>>16&255)/255,this.space.g=(t>>8&255)/255,this.space.b=(255&t)/255,this},setStyle:function(t){var e;if(e=u.hex.exec(t)){var n=e[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0)+n.charAt(0),16)/255,parseInt(n.charAt(1)+n.charAt(1),16)/255,parseInt(n.charAt(2)+n.charAt(2),16)/255),this;if(6===r)return this.setRGB(parseInt(n.charAt(0)+n.charAt(1),16)/255,parseInt(n.charAt(2)+n.charAt(3),16)/255,parseInt(n.charAt(4)+n.charAt(5),16)/255),this}else if(e=u.space.exec(t)){var i,a=e[1],o=e[2];switch(a){case"rgb":if(i=u.rgbNum.exec(o))return this.setRGB(parseInt(i[1],10)/255,parseInt(i[2],10)/255,parseInt(i[3],10)/255),this;if(i=u.rgbPre.exec(o))return this.setRGB(parseInt(i[1],10)/100,parseInt(i[2],10)/100,parseInt(i[3],10)/100),this;break;case"rgba":if(i=u.rgbaNum.exec(o))return this.setRGB(parseInt(i[1],10)/255,parseInt(i[2],10)/255,parseInt(i[3],10)/255,parseFloat(i[4])),this;if(i=u.rgbaPre.exec(o))return this.setRGB(parseInt(i[1],10)/100,parseInt(i[2],10)/100,parseInt(i[3],10)/100,parseFloat(i[4])),this;break;case"hsl":if(i=u.hsl.exec(o))return this.setHSL(parseInt(i[1],10)/360,parseInt(i[2],10)/100,parseInt(i[3],10)/100),this;break;case"hsla":if(i=u.hsla.exec(o))return this.setHSL(parseInt(i[1],10)/360,parseInt(i[2],10)/100,parseInt(i[3],10)/100,parseFloat(i[4])),this}}else t=t.toLowerCase(),void 0!==s[t]?this.setHex(s[t]):this.setHex(s.black)},copy:function(t){this.space=t.space.clone()},clone:function(){return new r(this)}}),t.exports=r},function(t,e){t.exports={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,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}},function(t,e,n){"use strict";var r=n(1),i=n(8),a=function(){this.h=0,this.s=0,this.l=0};r.augment(a,{type:"hsl",setHSL:function(t,e,n,r){this.h=i.mod(t,1),this.s=i.clamp(e,0,1),this.l=i.clamp(n,0,1),void 0!==r?this.a=i.clamp(r,0,1):this.a=void 0},toRGB:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(){var e=this,n=e.h,r=e.s,i=e.l;if(0===r)return{r:i,g:i,b:i,a:e.a};var a=i<=.5?i*(1+r):i+r-i*r,o=2*i-a;return{r:t(o,a,n+1/3),g:t(o,a,n),b:t(o,a,n-1/3),a:e.a}}}(),clone:function(){var t=new a;return t.h=this.h,t.s=this.s,t.l=this.l,t.a=this.a,t},copy:function(t){return this.h=t.h,this.s=t.s,this.l=t.l,this.a=t.a,this},getStyle:function(){var t=this;return void 0===t.a?"hsl("+Math.round(360*t.h)+", "+Math.round(100*t.s)+"%, "+Math.round(100*t.l)+"%)":"hsla("+Math.round(360*t.h)+", "+Math.round(100*t.s)+"%, "+Math.round(100*t.l)+"%, "+t.a+")"}}),t.exports=a},function(t,e,n){"use strict";var r=n(1),i=n(8),a=function(){this.r=0,this.g=0,this.b=0,this.type="rgb"};r.augment(a,{type:"rgb",setRGB:function(t,e,n,r){this.r=i.clamp(t,0,1),this.g=i.clamp(e,0,1),this.b=i.clamp(n,0,1),void 0!==r?this.a=i.clamp(r,0,1):this.a=void 0},toHSL:function(){var t,e,n=this.r,r=this.g,i=this.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(o+a)/2;if(o===a)t=0,e=0;else{var u=a-o;switch(e=s<=.5?u/(a+o):u/(2-a-o),a){case n:t=(r-i)/u+(r<i?6:0);break;case r:t=(i-n)/u+2;break;case i:t=(n-r)/u+4}t/=6}return{h:t,s:e,l:s,a:this.a}},getHex:function(){var t=255*this.r<<16^255*this.g<<8^255*this.b<<0;return"#"+("000000"+t.toString(16)).slice(-6)},getStyle:function(){return void 0===this.a?"rgb("+Math.round(255*this.r).toString()+", "+Math.round(255*this.g).toString()+", "+Math.round(255*this.b).toString()+")":"rgba("+Math.round(255*this.r).toString()+", "+Math.round(255*this.g).toString()+", "+Math.round(255*this.b).toString()+", "+this.a+")"},getPreStyle:function(){return void 0===this.a?"rgb("+Math.round(100*this.r).toString()+"%, "+Math.round(100*this.g).toString()+"%, "+Math.round(100*this.b).toString()+"%)":"rgba("+Math.round(100*this.r).toString()+"%, "+Math.round(100*this.g).toString()+"%, "+Math.round(100*this.b).toString()+"%, "+this.a+")"},clone:function(){var t=new a;return t.r=this.r,t.g=this.g,t.b=this.b,t.a=this.a,t},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}}),t.exports=a},function(t,e,n){"use strict";var r=n(1),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){var r=n(144);t.exports={interpolation:r.interpolation,unInterpolation:r.unInterpolation}},function(t,e,n){"use strict";function r(t,e){for(var n=[],i=Math.min(t.length,e.length),s=0;s<i;s++)o.isArray(t[s])&&o.isArray(e[s])?n[s]=r(t[s],e[s]):n[s]=a.singular(t[s],e[s]);return function(t){for(var e=[],r=0;r<i;r++)e[r]=n[r](t);return e}}function i(t,e){for(var n=[],r=Math.min(t.length,e.length),s=0;s<r;s++)o.isArray(t[s])&&o.isArray(e[s])?n[s]=i(t[s],e[s]):n[s]=a.unSingular(t[s],e[s]);return function(t){for(var e=Math.min(n.length,t.length),r=0,i=0,a=0;a<e;a++)r+=n[a](t[a]),i++;return 0===i?0:r/i}}var a=n(24),o=n(1);t.exports={array:r,unArray:i}},function(t,e,n){"use strict";function r(t,e){switch(e.getType()){case"rgb":return a(t,e);case"hsl":return s(t,e)}}function i(t,e){switch(e.getType()){case"rgb":return o(t,e);case"hsl":return u(t,e)}}function a(t,e){var n=t.getR(),r=t.getG(),i=t.getB(),a=t.getA(),o=e.getR()-n,s=e.getG()-r,u=e.getB()-i,h=e.getA();return void 0===a&&void 0===h||(a=a||1,h=(void 0===h?1:h)-a),function(t){var e=new c;return e.setRGB(n+o*t,r+s*t,i+u*t,void 0!==a&&void 0!==h?a+h*t:void 0),e.getRGBStyle()}}function o(t,e){var n=t.getR(),r=t.getG(),i=t.getB(),a=t.getA(),o=e.getR()-n,s=e.getG()-r,u=e.getB()-i,h=e.getA();return void 0===a&&void 0===h||(a=a||1,h=(void 0===h?1:h)-a),function(t){if(t=new c(t),!t.getType())return 0;var e=t.getR(),l=t.getG(),f=t.getB(),d=t.getA();d=d||1;var g=0,p=0;return 0!==o&&(g+=(e-n)/o,p++),0!==s&&(g+=(l-r)/s,p++),0!==u&&(g+=(f-i)/u,p++),0!==h&&h&&(g+=(d-a)/h,p++),0===p?0:g/p}}function s(t,e){var n=t.getH(),r=t.getS(),i=t.getL(),a=t.getA(),o=e.getH()-n,s=e.getS()-r,u=e.getL()-i,h=e.getA();return void 0===a&&void 0===h||(a=a||1,h=(void 0===h?1:h)-a),function(t){var e=new c;return e.setHSL(n+o*t,r+s*t,i+u*t,void 0!==a&&void 0!==h?a+h*t:void 0),e.getHSLStyle()}}function u(t,e){var n=t.getH(),r=t.getS(),i=t.getL(),a=t.getA(),o=e.getH()-n,s=e.getS()-r,u=e.getL()-i,h=e.getA();return void 0===a&&void 0===h||(a=a||1,h=(void 0===h?1:h)-a),function(t){if(t=new c(t),!t.getType())return 0;var e=t.getH(),l=t.getS(),f=t.getL(),d=t.getA();d=d||1;var g=0,p=0;return 0!==o&&(g+=(e-n)/o,p++),0!==s&&(g+=(l-r)/s,p++),0!==u&&(g+=(f-i)/u,p++),0!==h&&h&&(g+=(d-a)/h,p++),0===p?0:g/p}}var c=n(20);t.exports={color:r,unColor:i}},function(t,e,n){"use strict";function r(t,e){return a.isObject(t)&&a.isObject(e)?"matrix3"===t.type&&"matrix3"===e.type?h.matrix(t,e):"path"===t.type&&"path"===e.type?o.path(t,e):u.object(t,e):a.isArray(t)&&a.isArray(e)?s.array(t,e):c.singular(t,e)}function i(t,e){return"matrix3"===t.type&&"matrix3"===e.type?h.unMatrix(t,e):a.isArray(t)&&a.isArray(e)?s.unArray(t,e):a.isObject(t)&&a.isObject(e)?u.unObject(t,e):c.unSingular(t,e)}var a=n(1),o=n(148),s=n(142),u=n(147),c=n(24),h=n(145),l=n(2);l.Matrix3;t.exports={interpolation:r,unInterpolation:i}},function(t,e,n){"use strict";function r(t,e){for(var n=[],r=t.elements,i=e.elements,o=0;o<u;o++)n[o]=a.singular(r[o],i[o]);return function(t){for(var e=new s,r=e.elements,i=0;i<u;i++)r[i]=n[i](t);return e}}function i(t,e){for(var n=[],r=t.elements,i=e.elements,o=0;o<u;o++)n[o]=a.unSingular(r[o],i[o]);return function(t){for(var e=t.elements,r=0,i=0,a=0;a<u;a++){var o=n[a](e[a]);0!==o&&(r+=o,i++)}return r/i}}var a=n(24),o=n(2),s=o.Matrix3,u=9;t.exports={matrix:r,unMatrix:i}},function(t,e){"use strict";function n(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function r(t,e){return e-=t,function(n){return 0===e?0:(n-t)/e}}t.exports={number:n,unNumber:r}},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)r in e&&(n[r]=a.singular(t[r],e[r]));return function(t){var e={};for(var r in n)e[r]=n[r](t);return e}}function i(t,e){var n={};for(var r in t)r in e&&(n[r]=a.unSingular(t[r],e[r]));return function(t){var e=0,r=0;for(var i in n)i in t&&(e+=n[i](t[i]),r++);return 0===r?0:e/r}}var a=n(24);t.exports={object:r,unObject:i}},function(t,e,n){"use strict";function r(t,e){var n=i.toCurve(t.path,e.path),r=n[0],a=n[1];return function(n){var i=[];if(n>=1)return e.path;if(n<=0)return t.path;for(var o=0;o<r.length;o++){i[o]=[r[o][0]];for(var s=1;s<r[o].length;s++)i[o][s]=(a[o][s]-r[o][s])*n+r[o][s]}return i}}var i=n(33);t.exports={path:r}},function(t,e){"use strict";function n(t,e){var n=t.length;if(0===n)return NaN;var r=t[0];if(e<t[0])return NaN;if(e>=t[n-1])return t[n-1];for(var i=1;i<t.length&&!(e<t[i]);i++)r=t[i];return r}function r(t,e){var n=t.length;if(0===n)return NaN;var r,i=t[0];if(e>t[n-1])return NaN;if(e<t[0])return t[0];for(var a=1;a<t.length;a++){if(e<=t[a]){r=t[a];break}i=t[a]}return r}var i={PRECISION:1e-5,equal:function(t,e){return Math.abs(t-e)<i.PRECISION},clamp:function(t,e,n){return t<e?e:t>n?n:t},snapTo:function(t,e){var i=n(t,e),a=r(t,e);if(isNaN(i)||isNaN(a)){if(t[0]>=e)return t[0];var o=t[t.length-1];if(o<=e)return o}return Math.abs(e-i)<Math.abs(a-e)?i:a},snapFloor:function(t,e){return n(t,e)},snapCeiling:function(t,e){return r(t,e)},degreeToRad:function(t){return Math.PI/180*t},radToDegree:function(t){return 180/Math.PI*t},mod:function(t,e){return(t%e+e)%e}};t.exports=i},function(t,e,n){"use strict";function r(){this.elements=[1,0,0,0,1,0,0,0,1]}var i=n(1),a=n(8);r.multiply=function(t,e){var n=t.elements,i=e.elements,a=new r;return a.set(n[0]*i[0]+n[3]*i[1]+n[6]*i[2],n[0]*i[3]+n[3]*i[4]+n[6]*i[5],n[0]*i[6]+n[3]*i[7]+n[6]*i[8],n[1]*i[0]+n[4]*i[1]+n[7]*i[2],n[1]*i[3]+n[4]*i[4]+n[7]*i[5],n[1]*i[6]+n[4]*i[7]+n[7]*i[8],n[2]*i[0]+n[5]*i[1]+n[8]*i[2],n[2]*i[3]+n[5]*i[4]+n[8]*i[5],n[2]*i[6]+n[5]*i[7]+n[8]*i[8])},r.equal=function(t,e){for(var n=t.elements,r=e.elements,i=!0,o=0,s=n.length;o<s;o++)if(!a.equal(n[o],r[o])){i=!1;break}return i},i.augment(r,{type:"matrix3",set:function(t,e,n,r,i,a,o,s,u){var c=this.elements;return c[0]=t,c[3]=e,c[6]=n,c[1]=r,c[4]=i,c[7]=a,c[2]=o,c[5]=s,c[8]=u,this},get:function(t,e){return t--,e--,this.elements[3*e+t]},identity:function(){return this.set(1,0,0,0,1,0,0,0,1)},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},det:function(){var t=this.elements,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*a*c-e*o*u-n*i*c+n*o*s+r*i*u-r*a*s},inverse:function(t){return this.copy(this.getInverse(t))},getInverse:function(t){var e=this.det();if(0===e){if(t)throw"matrix exception: get inverse matrix with 0 det";return console.warn("matrix cannot inverse"),new r}var n=this.elements,i=(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8],new r);return i.set(n[4]*n[8]-n[7]*n[5],-(n[3]*n[8]-n[6]*n[5]),n[3]*n[7]-n[6]*n[4],-(n[1]*n[8]-n[7]*n[2]),n[0]*n[8]-n[6]*n[2],-(n[0]*n[7]-n[6]*n[1]),n[1]*n[5]-n[4]*n[2],-(n[0]*n[5]-n[3]*n[2]),n[0]*n[4]-n[3]*n[1]),i.multiplyScalar(1/e),i},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},multiply:function(t){return this.copy(r.multiply(this,t))},translate:function(t,e){var n=new r;return n.set(1,0,t,0,1,e,0,0,1),this.copy(r.multiply(n,this))},rotate:function(t){var e=new r;return e.set(Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0,0,0,1),this.copy(r.multiply(e,this))},scale:function(t,e){var n=new r;return n.set(t,0,0,0,e,0,0,0,1),this.copy(r.multiply(n,this))},equal:function(t){return r.equal(this,t)},copy:function(t){for(var e=t.elements,n=this.elements,r=0,i=e.length;r<i;r++)n[r]=e[r];return this},clone:function(){for(var t=new r,e=t.elements,n=this.elements,i=0,a=n.length;i<a;i++)e[i]=n[i];return t},to2DObject:function(){var t=this.elements;return{a:t[0],b:t[1],c:t[3],d:t[4],e:t[6],f:t[7]}},from2DObject:function(t){var e=this.elements;return e[0]=t.a,e[1]=t.b,e[3]=t.c,e[4]=t.d,e[6]=t.e,e[7]=t.f,this}}),t.exports=r},function(t,e,n){"use strict";function r(t,e){if(1===arguments.length){var n=t;t=n[0],e=n[1]}this.x=t||0,this.y=e||0}var i=n(1),a=n(8);r.add=function(t,e){return new r(t.x+e.x,t.y+e.y)},r.sub=function(t,e){return new r(t.x-e.x,t.y-e.y)},r.lerp=function(t,e,n){return new r(t.x+(e.x-t.x)*n,t.y+(e.y-t.y)*n)},r.angle=function(t,e){var n=t.dot(e)/(t.length()*e.length());return Math.acos(a.clamp(n,-1,1))},r.direction=function(t,e){return t.x*e.y-e.x*t.y},i.augment(r,{type:"vector2",set:function(t,e){return this.x=t,this.y=e,this},setComponent:function(t,e){switch(t){case 0:return this.x=e,this;case 1:return this.y=e,this;default:throw new Error("the index out of range:"+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("the index out of range:"+t)}},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t){return this.copy(r.add(this,t))},sub:function(t){return this.copy(r.sub(this,t))},subBy:function(t){return this.copy(r.sub(t,this))},multiplyScaler:function(t){return this.x*=t,this.y*=t,this},divideScaler:function(t){if(0!==t){var e=1/t;this.x*=e,this.y*=e}else this.x=0,this.y=0;return this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this},max:function(t){return this.x<t.x&&(this.x=t.x),this.y<t.y&&(this.y=t.y),this},clamp:function(t,e){return this.x<t.x?this.x=t.x:this.x>e.x&&(this.x=e.x),this.y<t.y?this.y=t.y:this.y>e.y&&(this.y=e.y),this},clampScale:function(){var t,e;return function(n,i){return void 0===t&&(t=new r,e=new r),t.set(n,n),e.set(i,i),this.clamp(t,e)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.lengthSq())},normalize:function(){return this.divideScaler(this.length())},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},angleTo:function(t,e){var n=this.angle(t),i=r.direction(this,t)>=0;return e?i?2*Math.PI-n:n:i?n:2*Math.PI-n},vertical:function(t){return t?new r(this.y,-this.x):new r(-this.y,this.x)},angle:function(t){return r.angle(this,t)},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScaler(t/e),this},isZero:function(){return 0===this.x&&0===this.y},lerp:function(t,e){return this.copy(r.lerp(this,t,e))},equal:function(t){return a.equal(this.x,t.x)&&a.equal(this.y,t.y)},clone:function(){return new r(this.x,this.y)},rotate:function(t){var e=this.x*Math.cos(t)-this.y*Math.sin(t),n=this.x*Math.sin(t)+this.y*Math.cos(t);return this.x=e,this.y=n,this}}),t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(1===arguments.length)if(i.isArray(t)){var r=t;t=r[0],e=r[1],n=r[2]}else if("vector2"===t.type){var a=t;t=a.x,e=a.y,n=1}this.x=t||0,this.y=e||0,this.z=n||0}var i=n(1),a=n(8);r.add=function(t,e){return new r(t.x+e.x,t.y+e.y,t.z+e.z)},r.sub=function(t,e){return new r(t.x-e.x,t.y-e.y,t.z-e.z)},r.lerp=function(t,e,n){return new r(t.x+(e.x-t.x)*n,t.y+(e.y-t.y)*n,t.z+(e.z-t.z)*n)},r.cross=function(t,e){var n=t.x,i=t.y,a=t.z,o=e.x,s=e.y,u=e.z;return new r(i*u-a*s,a*o-n*u,n*s-i*o)},r.angle=function(t,e){var n=t.dot(e)/(t.length()*e.length());return Math.acos(a.clamp(n,-1,1))},i.augment(r,{type:"vector3",set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setComponent:function(t,e){switch(t){case 0:return this.x=e,this;case 1:return this.y=e,this;case 2:return this.z=e,this;default:throw new Error("index is out of range:"+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range:"+t)}},add:function(t){return this.copy(r.add(this,t))},sub:function(t){return this.copy(r.sub(this,t))},subBy:function(t){return this.copy(r.sub(t,this))},multiplyScaler:function(t){return this.x*=t,this.y*=t,this.z*=t,this},divideScaler:function(t){if(0!==t){var e=1/t;this.x*=e,this.y*=e,this.z*=e}else this.x=0,this.y=0,this.z=0;return this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this.z>t.z&&(this.z=t.z),this},max:function(t){return this.x<t.x&&(this.x=t.x),this.y<t.y&&(this.y=t.y),this.z<t.z&&(this.z=t.z),this},clamp:function(t,e){return this.x<t.x?this.x=t.x:this.x>e.x&&(this.x=e.x),this.y<t.y?this.y=t.y:this.y>e.y&&(this.y=e.y),this.z<t.z?this.z=t.z:this.z>e.z&&(this.z=e.z),this},clampScale:function(){var t,e;return function(n,i){return void 0===t&&(t=new r,e=new r),t.set(n,n,n),e.set(i,i,i),this.clamp(t,e)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.lengthSq())},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScaler(this.length())},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScaler(t/e),this},lerp:function(t,e){return this.copy(r.lerp(this,t,e))},cross:function(t){return this.copy(r.cross(this,t))},angle:function(t){return r.angle(this,t)},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},applyMatrix:function(t){var e=t.elements,n=e[0]*this.x+e[3]*this.y+e[6]*this.z,r=e[1]*this.x+e[4]*this.y+e[7]*this.z,i=e[2]*this.x+e[5]*this.y+e[8]*this.z;return this.x=n,this.y=r,this.z=i,this},copy:function(t){return this.x=t.x,this.y=t.y,this.z=void 0!==t.z?t.z:1,this},equal:function(t){return a.equal(this.x,t.x)&&a.equal(this.y,t.y)&&a.equal(this.z,t.z)},clone:function(){return new r(this.x,this.y,this.z)}}),t.exports=r},function(t,e,n){"use strict";var r=n(1),i=Math.PI,a="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",o=new RegExp("([a-z])["+a+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+a+"]*,?["+a+"]*)+)","ig"),s=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+a+"]*,?["+a+"]*","ig"),u=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(o,function(t,r,i){var a=[],o=r.toLowerCase();if(i.replace(s,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},c=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},h=function(t,e,n,r,i){if(null==i&&null==r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!=i)var a=Math.PI/180,o=t+n*Math.cos(-r*a),s=t+n*Math.cos(-i*a),u=e+n*Math.sin(-r*a),c=e+n*Math.sin(-i*a),h=[["M",o,u],["A",n,n,0,+(i-r>180),0,s,c]];else h=[["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 h},l=function(t){if(t=u(t),!t||!t.length)return[["M",0,0]];var e,n=[],r=0,i=0,a=0,o=0,s=0;"M"==t[0][0]&&(r=+t[0][1],i=+t[0][2],a=r,o=i,s++,n[0]=["M",r,i]);for(var l,f,d=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),g=s,p=t.length;g<p;g++){if(n.push(l=[]),f=t[g],e=f[0],e!=e.toUpperCase())switch(l[0]=e.toUpperCase(),l[0]){case"A":l[1]=f[1],l[2]=f[2],l[3]=f[3],l[4]=f[4],l[5]=f[5],l[6]=+f[6]+r,l[7]=+f[7]+i;break;case"V":l[1]=+f[1]+i;break;case"H":l[1]=+f[1]+r;break;case"R":for(var v=[r,i].concat(f.slice(1)),m=2,y=v.length;m<y;m++)v[m]=+v[m]+r,v[++m]=+v[m]+i;n.pop(),n=n.concat(c(v,d));break;case"O":n.pop(),v=h(r,i,f[1],f[2]),v.push(v[0]),n=n.concat(v);break;case"U":n.pop(),n=n.concat(h(r,i,f[1],f[2],f[3])),l=["U"].concat(n[n.length-1].slice(-2));break;case"M":a=+f[1]+r,o=+f[2]+i;default:for(m=1,y=f.length;m<y;m++)l[m]=+f[m]+(m%2?r:i)}else if("R"==e)v=[r,i].concat(f.slice(1)),n.pop(),n=n.concat(c(v,d)),l=["R"].concat(f.slice(-2));else if("O"==e)n.pop(),v=h(r,i,f[1],f[2]),v.push(v[0]),n=n.concat(v);else if("U"==e)n.pop(),n=n.concat(h(r,i,f[1],f[2],f[3])),l=["U"].concat(n[n.length-1].slice(-2));else for(var x=0,b=f.length;x<b;x++)l[x]=f[x];if(e=e.toUpperCase(),"O"!=e)switch(l[0]){case"Z":r=+a,i=+o;break;case"H":r=l[1];break;case"V":i=l[1];break;case"M":a=l[l.length-2],o=l[l.length-1];default:r=l[l.length-2],i=l[l.length-1]}}return n},f=function(t,e,n,r){return[t,e,n,r,n,r]},d=function(t,e,n,r,i,a){var o=1/3,s=2/3;return[o*t+s*n,o*e+s*r,o*i+s*n,o*a+s*r,i,a]},g=function(t,e,n,r,i,a,o,s,u,c){n===r&&(n+=1);var h,l=120*Math.PI/180,f=Math.PI/180*(+i||0),d=[],p=function(t,e,n){var r=t*Math.cos(n)-e*Math.sin(n),i=t*Math.sin(n)+e*Math.cos(n);return{x:r,y:i}};if(c)S=c[0],k=c[1],w=c[2],M=c[3];else{h=p(t,e,-f),t=h.x,e=h.y,h=p(s,u,-f),s=h.x,u=h.y,t===s&&e===u&&(s+=1,u+=1);var v=(Math.cos(Math.PI/180*i),Math.sin(Math.PI/180*i),(t-s)/2),m=(e-u)/2,y=v*v/(n*n)+m*m/(r*r);y>1&&(y=Math.sqrt(y),n*=y,r*=y);var x=n*n,b=r*r,_=(a==o?-1:1)*Math.sqrt(Math.abs((x*b-x*m*m-b*v*v)/(x*m*m+b*v*v))),w=_*n*m/r+(t+s)/2,M=_*-r*v/n+(e+u)/2,S=Math.asin(((e-M)/r).toFixed(9)),k=Math.asin(((u-M)/r).toFixed(9));S=t<w?Math.PI-S:S,k=s<w?Math.PI-k:k,S<0&&(S=2*Math.PI+S),k<0&&(k=2*Math.PI+k),o&&S>k&&(S-=2*Math.PI),!o&&k>S&&(k-=2*Math.PI)}var A=k-S;if(Math.abs(A)>l){var C=k,T=s,E=u;k=S+l*(o&&k>S?1:-1),s=w+n*Math.cos(k),u=M+r*Math.sin(k),d=g(s,u,n,r,i,0,o,T,E,[k,C,w,M])}A=k-S;var P=Math.cos(S),I=Math.sin(S),N=Math.cos(k),B=Math.sin(k),F=Math.tan(A/4),O=4/3*n*F,L=4/3*r*F,D=[t,e],R=[t+O*I,e-L*P],z=[s+O*B,u-L*N],G=[s,u];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],c)return[R,z,G].concat(d);d=[R,z,G].concat(d).join().split(",");for(var j=[],U=0,Y=d.length;U<Y;U++)j[U]=U%2?p(d[U-1],d[U],f).y:p(d[U],d[U+1],f).x;return j},p=function(t,e){for(var n=l(t),r=e&&l(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(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(g.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(d(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(d(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(f(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(f(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(f(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(f(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var i=t[e];i.length;)c[e]="A",r&&(h[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),y=Math.max(n.length,r&&r.length||0)}},u=function(t,e,i,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),i.bx=0,i.by=0,i.x=t[o][1],i.y=t[o][2],y=Math.max(n.length,r&&r.length||0))},c=[],h=[],p="",v="",m=0,y=Math.max(n.length,r&&r.length||0);m<y;m++){n[m]&&(p=n[m][0]),"C"!=p&&(c[m]=p,m&&(v=c[m-1])),n[m]=o(n[m],i,v),"A"!=c[m]&&"C"==p&&(c[m]="C"),s(n,m),r&&(r[m]&&(p=r[m][0]),"C"!=p&&(h[m]=p,m&&(v=h[m-1])),r[m]=o(r[m],a,v),"A"!=h[m]&&"C"==p&&(h[m]="C"),s(r,m)),u(n,r,i,a,m),u(r,n,a,i,m);var x=n[m],b=r&&r[m],_=x.length,w=r&&b.length;i.x=x[_-2],i.y=x[_-1],i.bx=parseFloat(x[_-4])||i.x,i.by=parseFloat(x[_-3])||i.y,a.bx=r&&(parseFloat(b[w-4])||a.x),a.by=r&&(parseFloat(b[w-3])||a.y),a.x=r&&b[w-2],a.y=r&&b[w-1]}return r?[n,r]:n},v=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,w:n,h:r,cx:t+n/2,cy:e+r/2}},m=/,?([a-z]),?/gi,y=function(t){return t.join(",").replace(m,"$1")},x=function(t,e,n,r,i){var a=-3*e+9*n-9*r+3*i,o=t*a+6*e-12*n+6*r;return t*o-3*e+3*n},b=function(t,e,n,r,i,a,o,s,u){null==u&&(u=1),u=u>1?1:u<0?0:u;for(var c=u/2,h=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<h;g++){var p=c*l[g]+c,v=x(p,t,n,i,o),m=x(p,e,r,a,s),y=v*v+m*m;d+=f[g]*Math.sqrt(y)}return c*d},_=function(t,e,n,r,i,a,o,s){for(var u,c,h,l,f,d,g,p,v=[],m=[[],[]],y=0;y<2;++y)if(0==y?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,h=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,h=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;l=-h/c,0<l&&l<1&&v.push(l)}else g=c*c-4*h*u,p=Math.sqrt(g),g<0||(f=(-c+p)/(2*u),0<f&&f<1&&v.push(f),d=(-c-p)/(2*u),0<d&&d<1&&v.push(d));for(var x,b=v.length,_=b;b--;)l=v[b],x=1-l,m[0][b]=x*x*x*t+3*x*x*l*n+3*x*l*l*i+l*l*l*o,m[1][b]=x*x*x*e+3*x*x*l*r+3*x*l*l*a+l*l*l*s;return m[0][_]=t,m[1][_]=e,m[0][_+1]=o,m[1][_+1]=s,m[0].length=m[1].length=_+2,{min:{x:Math.min.apply(0,m[0]),y:Math.min.apply(0,m[1])},max:{x:Math.max.apply(0,m[0]),y:Math.max.apply(0,m[1])}}},w=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*r-e*n)*(i-o)-(t-n)*(i*s-a*o),c=(t*r-e*n)*(a-s)-(e-r)*(i*s-a*o),h=(t-n)*(a-s)-(e-r)*(i-o);if(h){var l=u/h,f=c/h,d=+l.toFixed(2),g=+f.toFixed(2);if(!(d<+Math.min(t,n).toFixed(2)||d>+Math.max(t,n).toFixed(2)||d<+Math.min(i,o).toFixed(2)||d>+Math.max(i,o).toFixed(2)||g<+Math.min(e,r).toFixed(2)||g>+Math.max(e,r).toFixed(2)||g<+Math.min(a,s).toFixed(2)||g>+Math.max(a,s).toFixed(2)))return{
11x:l,y:f}}}},M=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},S=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.toString=toString,a},v=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:S(t,e,n,r),vb:[t,e,n,r].join(" ")}},k=function(t,e){return t=v(t),e=v(e),M(e,t.x,t.y)||M(e,t.x2,t.y)||M(e,t.x,t.y2)||M(e,t.x2,t.y2)||M(t,e.x,e.y)||M(t,e.x2,e.y)||M(t,e.x,e.y2)||M(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=function(t,e,n,i,a,o,s,u){r.isArray(t)||(t=[t,e,n,i,a,o,s,u]);var c=_.apply(null,t);return v(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},C=function(t,e,n,r,a,o,s,u,c){var h=1-c,l=Math.pow(h,3),f=Math.pow(h,2),d=c*c,g=d*c,p=l*t+3*f*c*n+3*h*c*c*a+g*s,v=l*e+3*f*c*r+3*h*c*c*o+g*u,m=t+2*c*(n-t)+d*(a-2*n+t),y=e+2*c*(r-e)+d*(o-2*r+e),x=n+2*c*(a-n)+d*(s-2*a+n),b=r+2*c*(o-r)+d*(u-2*o+r),_=h*t+c*n,w=h*e+c*r,M=h*a+c*s,S=h*o+c*u,k=90-180*Math.atan2(m-x,y-b)/i;return{x:p,y:v,m:{x:m,y:y},n:{x:x,y:b},start:{x:_,y:w},end:{x:M,y:S},alpha:k}},T=function(t,e,n){var r=A(t),i=A(e);if(!k(r,i))return n?0:[];for(var a=b.apply(0,t),o=b.apply(0,e),s=~~(a/8),u=~~(o/8),c=[],h=[],l={},f=n?0:[],d=0;d<s+1;d++){var g=C.apply(0,t.concat(d/s));c.push({x:g.x,y:g.y,t:d/s})}for(d=0;d<u+1;d++)g=C.apply(0,e.concat(d/u)),h.push({x:g.x,y:g.y,t:d/u});for(d=0;d<s;d++)for(var p=0;p<u;p++){var v=c[d],m=c[d+1],y=h[p],x=h[p+1],_=Math.abs(m.x-v.x)<.001?"y":"x",M=Math.abs(x.x-y.x)<.001?"y":"x",S=w(v.x,v.y,m.x,m.y,y.x,y.y,x.x,x.y);if(S){if(l[S.x.toFixed(4)]==S.y.toFixed(4))continue;l[S.x.toFixed(4)]=S.y.toFixed(4);var T=v.t+Math.abs((S[_]-v[_])/(m[_]-v[_]))*(m.t-v.t),E=y.t+Math.abs((S[M]-y[M])/(x[M]-y[M]))*(x.t-y.t);T>=0&&T<=1&&E>=0&&E<=1&&(n?f++:f.push({x:S.x,y:S.y,t1:T,t2:E}))}}return f},E=function(t,e,n){t=p(t),e=p(e);for(var r,i,a,o,s,u,c,h,l,f,d=n?0:[],g=0,v=t.length;g<v;g++){var m=t[g];if("M"==m[0])r=s=m[1],i=u=m[2];else{"C"==m[0]?(l=[r,i].concat(m.slice(1)),r=l[6],i=l[7]):(l=[r,i,r,i,s,u,s,u],r=s,i=u);for(var y=0,x=e.length;y<x;y++){var b=e[y];if("M"==b[0])a=c=b[1],o=h=b[2];else{"C"==b[0]?(f=[a,o].concat(b.slice(1)),a=f[6],o=f[7]):(f=[a,o,a,o,c,h,c,h],a=c,o=h);var _=T(l,f,n);if(n)d+=_;else{for(var w=0,M=_.length;w<M;w++)_[w].segment1=g,_[w].segment2=y,_[w].bez1=l,_[w].bez2=f;d=d.concat(_)}}}}}return d},P=function(t,e){return E(t,e)},I={toArray:u,toString:y,toCurve:p,toAbsolute:l,catmullRomToBezier:c,rectPath:S,intersection:P};t.exports=I},function(t,e,n){"use strict";var r=n(1),i=n(17),a=n(155),o=function(t){o.superclass.constructor.call(this,t),this._init()};o.ATTRS={time:0,createTime:null,playTime:null,pauseTimeSpace:0,available:!1,canvases:[],tweens:[],endTime:0,autoPlay:!1,status:"silent",autoDraw:!0},r.extend(o,i),r.augment(o,{_init:function(){var t=this.get("autoPlay");this.set("createTime",+new Date),t&&this.play()},_trySetEndTime:function(t){var e=this;r.isObject(t)?e._setEndTime(t):r.isArray(t)&&r.each(t,function(t,n){e._setEndTime(t)})},_trySetCanvases:function(t){var e=this;r.isObject(t)?e._setCanvases(t):r.isArray(t)&&r.each(t,function(t,n){e._setCanvases(t)})},_setEndTime:function(t){var e=this.get("endTime"),n=t.endTime;n>e&&this.set("endTime",n)},_setCanvases:function(t){var e=t.canvas,n=this.get("canvases");n.indexOf(e)===-1&&n.push(e)},_resetTweens:function(){var t=this.get("tweens");t.sort(function(t,e){return e.get("startTime")-t.get("startTime")}),r.each(t,function(t){t.reset()})},_getTime:function(){var t=this.get("playTime"),e=this.get("pauseTimeSpace");return+new Date-t+e},_refresh:function(t){for(var e,n,i=this.get("tweens"),a=(this.get("canvases"),this.get("autoDraw")),o=[],s=[],u=0;u<i.length;u++)n=i[u],e=n.canvas,n.needsDestroy?n.destroy():n.destroyed||n.needsDestroy||n.tryStep(t),n.destroyed||o.push(n),r.inArray(s,e)||n.destroyed||s.push(e);a&&this.draw(),i.length>0&&0===o.length&&this.fire("animateend"),this.set("canvases",s),this.set("tweens",o)},_update:function(){if(this.get("available")){var t,e=this,n=e.get("tweens");n.length>0&&(t=e._getTime(),e._refresh(t)),e.fire("update"),r.requestAnimationFrame(function(){e._update()})}},animate:function(t,e){var n=new a({target:t,timeline:this,startTime:e?e:0});return n},add:function(t){var e,n=this.get("tweens");return r.isArray(t)?e=n.concat(t):r.isObject(t)&&"tween"===t.type?(n.push(t),e=n):console.error("Timeline not Support this type"),this.set("tweens",e),this._trySetCanvases(t),this._trySetEndTime(t),this},getNow:function(){var t=this.get("playTime");return t?+new Date-t:0},getTime:function(){var t=this.get("playTime");return t?+new Date-t:0},play:function(){var t=this.get("status");return"silent"===t&&(this.set("playTime",+new Date),this.set("available",!0),this.set("status","playing"),this._update()),this},stop:function(){this.set("status","silent"),this.set("available",!1),this.set("pauseTimeSpace",0),this._resetTweens(),this._refresh(0),this.draw()},pause:function(){var t=this.get("available");return t&&this.set("pauseTimeSpace",+new Date-this.get("playTime")),this.set("available",!1),this.set("status","silent"),this},reset:function(){this.set("status","silent"),this.set("available",!1),this.set("pauseTimeSpace",0),this.set("playTime",0),this.set("endTime",0),this.set("tweens",[]),this.set("canvases",[])},draw:function(){for(var t,e=this.get("canvases"),n=0;n<e.length;n++)t=e[n],!t.get("destroyed")&&t.draw()}}),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(78),a=(n(17),n(79)),o=function(t){r.mix(this,t)};r.augment(o,{target:null,timeline:null,startTime:null,append:function(t,e,n,o){var s,u=r.guid("tween_"),c=this.target,h=(this.tweens,this.timeline),l=this.startTime,f=i.getKeyFrameByProps(c,e),d=f[0],g=f[1],p=i.getInterpolations(d,g);return p.matrix||0!==i.getObjectLength(p.attrs)||g.onUpdate?(t=t?t:l,e&&e.delay&&(t+=e.delay),s=new a({id:u,canvas:c.get("canvas"),startTime:t,target:c,easing:n,callBack:o,startKeyFrame:d,endKeyFrame:g,interpolations:p,duration:e.duration?e.duration:1e3,repeat:!!e.repeat&&e.repeat,destroyTarget:!!e.destroy&&e.destroy}),h&&h.add(s),this):this}}),t.exports=o},function(t,e,n){var r=n(157);t.exports=r},function(t,e){"use strict";function n(t,e,r){r=r||0;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];null!==s&&o.isObject(s)?(o.isObject(t[i])||(t[i]={}),r<a?n(t[i],e[i],r+1):t[i]=e[i]):o.isArray(s)?(t[i]=[],t[i]=t[i].concat(s)):void 0!==s&&(t[i]=e[i])}}var r=Object.prototype,i=r.toString,a=5,o={substitute:function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]}):t},ucfirst:function(t){return t+="",t.charAt(0).toUpperCase()+t.substring(1)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isArray:"isArray"in Array?Array.isArray:function(t){return"[object Array]"===i.call(t)},isDate:function(t){return"[object Date]"===i.call(t)},isNull:function(t){return void 0===t||null===t},notNull:function(t){return!o.isNull(t)},isBlank:function(t){if(o.isArray(t))return 0===t.length;if(o.isObject(t)){var e=0;return o.each(t,function(t,n){e++}),0===e}return!1},isObject:"[object Object]"===i.call(null)?function(t){return null!==t&&void 0!==t&&"[object Object]"===i.call(t)&&void 0===t.ownerDocument}:function(t){return"[object Object]"===i.call(t)},extend:function(t,e,n,r){o.isFunction(e)||(n=e,e=t,t=function(){});var i=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},a=i(e.prototype,t);return t.prototype=o.mix(a,t.prototype),t.superclass=i(e.prototype,e),o.mix(a,n),o.mix(t,r),t},augment:function(t){for(var e=o.toArray(arguments),n=1;n<e.length;n++){var r=e[n];o.isFunction(r)&&(r=r.prototype),o.mix(t.prototype,r)}},toArray:function(t){return t&&t.length?Array.prototype.slice.call(t):[]},mix:function(){var t=o.toArray(arguments),e=t[0];if(e===!0){e=t[1];for(var r=2;r<t.length;r++){var i=t[r];n(e,i)}}else for(var r=1;r<t.length;r++){var i=t[r];for(var a in i)i.hasOwnProperty(a)&&"constructor"!==a&&(e[a]=i[a])}return e},each:function(t,e){if(t)if(o.isObject(t)){for(var n in t)if(t.hasOwnProperty(n)){var r=e(t[n],n);if(r===!1)break}}else if(t.length)for(var i=0;i<t.length;i++){var r=e(t[i],i);if(r===!1)break}},requestAnimationFrame:function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)};return e(t)},cancelAnimationFrame:function(t){var e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||function(t){return clearTimeout(t)};return e(t)}};t.exports=o},function(t,e,n){"use strict";function r(t,e){var n=e.toString(),r=n.indexOf(".");if(r===-1)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))}function i(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}var a=n(156);a.mix(a,{mixin:function(t,e){if(t&&e){t._mixins=e,t.ATTRS=t.ATTRS||{};var n={};a.each(e,function(e){a.augment(t,e);var r=e.ATTRS;r&&a.mix(n,r)}),t.ATTRS=a.mix(n,t.ATTRS)}},map:function(t,e){var n=[];return a.each(t,function(t,r){n.push(e(t,r))}),n},filter:function(t,e){var n=[];return a.each(t,function(t,r){e(t,r)&&n.push(t)}),n},guid:function(){var t={};return function(e){return e=e||"g",t[e]?t[e]+=1:t[e]=1,e+t[e]}}(),inArray:function(t,e){return a.indexOf(t,e)!==-1},indexOf:function(t,e){var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},remove:function(t,e){var n=a.indexOf(t,e);n!==-1&&t.splice(n,1)},empty:function(t){if(!(t instanceof Array))for(var e=t.length-1;e>=0;e--)delete t[e];t.length=0},equalsArray:function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length;r++)if(t[r]!==e[r]){n=!1;break}return n},wrapBehavior:function(t,e){var n=function(n){t[e](n)};return t["_wrap_"+e]=n,n},getWrapBehavior:function(t,e){return t["_wrap_"+e]},fixedBase:function(t,e){return r(t,e)},length:function(t){if(a.isArray(t))return t.length;if(a.isObject(t)){var e=0;return a.each(t,function(){e++}),e}return 0},clone:function(t){if("object"!=typeof t||null===t)return t;var e;if(a.isArray(t)){e=[];for(var n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=a.clone(t[n]):e[n]=t[n]}else{e={};for(var i in t)"object"==typeof t[i]&&null!=t[i]?e[i]=a.clone(t[i]):e[i]=t[i]}return e},simpleMix:function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}}),t.exports=a},function(t,e,n){"use strict";var r=n(35),i=n(4);t.exports=function(t){var e=i.getBBox(t,t),n=e.centerX,a=e.centerY;r.scaleIn(t,n,a)}},function(t,e,n){"use strict";var r=n(35),i=n(4);t.exports=function(t){var e=i.getBBox(t,t),n=e.centerX,a=e.centerY;r.scaleOut(t,n,a)}},function(t,e,n){"use strict";var r=n(11);t.exports=function(t,e){t.set("capture",!1),setTimeout(function(){t.set("capture",!0)},r.updateDuration+32),t.animate(e,r.updateDuration,r.updateEasing)}},function(t,e,n){"use strict";function r(t,e){if(!t||!e)return!1;var n=t.length,r=e.length,i=r>n?e:t,a={attrs0:{},attrs1:{}},s=!1,u=void 0,h=void 0,l=void 0,f=void 0;return o.each(i,function(n,r){u=t[r],h=e[r],o.isObject(u)||o.isObject(h)||"path"===r&&(l=o.isString(u)?u:o.pathToString(u),f=o.isString(h)?h:o.pathToString(h),l===f||l.indexOf("NaN")!==-1||f.indexOf("NaN")!==-1)||o.isArray(u)&&o.isArray(h)&&o.equalsArray(u,h)||u===h||c[r]||(a.attrs0[r]=u,a.attrs1[r]=h,s=!0)}),!!s&&a}function i(t,e,n){var r=e.get("children"),a=void 0,s=void 0;return o.each(r,function(e){n++,s=e.get("gid"),e.isGroup&&(n=i(t,e,n)),s&&(t[s]={matrix:e.getMatrix().clone(),origin:e},a=e.get("shapeCfg"),a&&(t[s].enterAnimate=e.get("enterAnimate"),t[s].leaveAnimate=e.get("leaveAnimate"),t[s].model=a.origin),e.isShape&&(t[s].attrs=e.getAllAttrs()))}),n}var a=n(2),o=n(4),s=n(34),u=a.Matrix3,c={text:"text",elements:"elements",rotate:"rotate",textAlign:"textAlign",textBaseline:"textBaseline",fontStyle:"fontStyle",font:"font",fontWeight:"fontWeight",fontFamily:"fontFamily"},h=function(t){o.mix(this,t)};o.augment(h,{canvas:null,map0:null,map1:null,run:function(){this.init(),this.count<5e3&&(this._compare(),this._addTween()),o.each(this.canvases,function(t){t.draw()})},init:function(){var t=this.canvases,e=this.elementsStash,n={},r=0;e=e?e:{},o.each(t,function(t){r+=i(n,t,0)}),this.elementsStash=n,this.map0=e,this.map1=n,this.count=r},_compare:function(){var t=this.map0,e=this.map1,n=[],r=[],i=[];o.each(e,function(e,r){t[r]?e.origin.get("type")===t[r].origin.get("type")&&i.push(r):n.push(r)}),o.each(t,function(t,n){e[n]||r.push(n)}),this.enterElements=n,this.leaveElements=r,this.updateElements=i},_addTween:function(){var t=this,e=this.enterElements,n=this.leaveElements,i=this.updateElements,a=this.map0,c=this.map1,h=void 0,l=void 0,f=void 0,d=void 0,g=void 0;o.each(e,function(t){g=c[t],g.enterAnimate&&g.enterAnimate(g.origin,a,c)}),o.each(n,function(t){d=a[t],d.leaveAnimate&&(d.origin.getParent().add(d.origin),d.leaveAnimate(d.origin,a,c))}),o.each(i,function(e){g=c[e],d=a[e],l=r(d.attrs,g.attrs),h=u.equal(d.matrix,g.matrix),f={},l&&(g.origin.attr(l.attrs0),o.mix(f,l.attrs1)),h||(g.origin.setMatrix(d.matrix),f.matrix=g.matrix),!l&&h||s.update(g.origin,f,t),d.origin!==g.origin&&d.origin.remove()})}}),t.exports=h},function(t,e,n){"use strict";function r(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0}var i=n(4),a=function(t){i.mix(this,t),this.init()};i.augment(a,{graph:null,frontCanvas:null,canvas:null,currentItem:null,dragitem:null,rootGroup:null,lastEventObj:null,currentEventObj:null,el:null,init:function(){var t=this.graph;this.frontCanvas=t.get("frontCanvas"),this.canvas=t.get("canvas"),this._initEvent()},_initEvent:function(){var t=this,e=t.frontCanvas,n=e.get("el");this.el=n,this.domMouseEnter=r(n,"mouseenter",i.wrapBehavior(t,"onDomMouseEnter")),this.domMouseLeave=r(n,"mouseleave",i.wrapBehavior(t,"onDomMouseLeave")),this.domMouseDown=r(n,"mousedown",i.wrapBehavior(t,"onMouseDown")),this.domMouseUp=r(n,"mouseup",i.wrapBehavior(t,"onMouseUp")),this.domMouseMove=r(n,"mousemove",i.wrapBehavior(t,"onMouseMove")),this.domDblClick=r(n,"dblclick",i.wrapBehavior(t,"onDblClick")),this.domMouseWheel=r(n,"mousewheel",i.wrapBehavior(t,"onMouseWheel")),this.domKeyDown=r(n,"keydown",i.wrapBehavior(t,"onKeyDown")),this.domKeyUp=r(n,"keyup",i.wrapBehavior(t,"onKeyUp")),this.domContextMenu=r(n,"contextmenu",i.wrapBehavior(t,"onContextMenu")),this.domOnFocus=r(n,"focus",i.wrapBehavior(t,"onFocus")),this.domOnBlur=r(n,"blur",i.wrapBehavior(t,"onBlur"))},_parsePoint:function(t,e){var n=this.canvas.get("pixelRatio"),r=this.graph,i={x:t/n,y:e/n};return r.invertPoint(i)},_getEventObj:function(t,e){var n=this.graph,r=t.clientX,i=t.clientY,a=e.getPointByClient(r,i),o=this._parsePoint(a.x,a.y),s=e.getShape(a.x,a.y),u=n.getItem(s),c=void 0;return u&&(c=u.get("type")),{item:u,itemType:c,shape:s,x:o.x,y:o.y,domX:t.offsetX,domY:t.offsetY,domEvent:t}},getEventObj:function(t){return{item:t.item,itemType:t.itemType,x:t.x,y:t.y,domX:t.domX,domY:t.domY,shape:t.shape,toEvObj:t.toEvObj,frontEvObj:t.frontEvObj,domEvent:t.domEvent}},_processEventObj:function(t){var e=this.canvas,n=this.frontCanvas,r=this.currentEventObj;r&&i.isObject(r)&&(this.lastEventObj=i.mix({},r));var a=this._getEventObj(t,e),o=this._getEventObj(t,n);o.shape&&(a.shape=o.shape),o.item&&(a.item=o.item,a.itemType=o.item.get("type")),a.frontEvObj=o,this.currentEventObj=a,this.currentItem=a.item},onFocus:function(){this.graph.fire("domfocus")},onBlur:function(){this.graph.fire("domblur")},onDomMouseEnter:function(t){this.graph.fire("dommouseenter",t)},onDomMouseLeave:function(t){this.graph.fire("dommouseleave",t)},onContextMenu:function(t){this._processEventObj(t);var e=this.currentEventObj;this.graph.fire("contextmenu",this.getEventObj(e))},onDblClick:function(t){this._processEventObj(t);var e=this.currentEventObj;this.graph.fire("dblclick",this.getEventObj(e))},onKeyUp:function(t){this.graph.fire("keyup",t)},onKeyDown:function(t){this.graph.fire("keydown",t)},onMouseWheel:function(t){this._processEventObj(t);var e=this.currentEventObj;this.graph.fire("mousewheel",this.getEventObj(e))},onMouseDown:function(t){t.preventDefault(),this._processEventObj(t);var e=this.currentEventObj;0===t.button&&(this.pressing=!0,this.dragging=!0,this.pressingPoint={x:e.x,y:e.y},this.graph.fire("mousedown",this.getEventObj(e)),e.item&&this.graph.fire("itemmousedown",this.getEventObj(e)))},onMouseUp:function(t){t.preventDefault(),this._processEventObj(t);var e=this.currentEventObj;0===t.button&&(this.pressing&&(this.graph.fire("click",this.getEventObj(e)),e.item&&this.graph.fire("itemclick",this.getEventObj(e)),this.pressing=!1),this.dragging&&(this.dragStartPoint&&this.graph.fire("dragend",this.getEventObj(e)),this.dragging=!1),this.graph.fire("mouseup",this.getEventObj(e)),e.item&&this.graph.fire("itemmouseup",this.getEventObj(e)),this.dragStartPoint=null,this.dragItem=null)},onMouseMove:function(t){t.preventDefault(),this._processEventObj(t);var e=this.graph,n=this.currentEventObj,r=this.lastEventObj;this.pressing===!0&&n.x===r.x&&n.y===r.y||(this.pressing=!1,r&&n&&(r.toEvObj=n,n.fromEvObj=r,this.isSame(r,n,"shape")||(r.shape&&!r.shape.get("destroyed")&&e.fire("mouseleave",this.getEventObj(r)),n.shape&&!n.shape.get("destroyed")&&e.fire("mouseenter",this.getEventObj(n))),this.isSame(r,n,"item")||(r.item&&!r.item.destroyed&&e.fire("itemmouseleave",this.getEventObj(r)),n.item&&!n.item.destroyed&&e.fire("itemmouseenter",this.getEventObj(n)))),this.dragging&&(this.dragStartPoint?e.fire("dragmove",this.getEventObj(n)):(this.dragStartPoint={x:n.x,y:n.y},this.dragItem=n.item,e.fire("dragstart",this.getEventObj(n)))),n.item&&e.fire("itemhover",this.getEventObj(n)),e.fire("mousemove",this.getEventObj(n)))},isSame:function(t,e,n){var r=t[n],i=e[n];return r===i},destroy:function(){var t=this.domMouseUp,e=this.domMouseDown,n=this.domMouseMove,r=this.domDblClick,i=this.domMouseWheel,a=this.domContextMenu,o=this.domKeyDown,s=this.domKeyUp,u=this.domOnFocus,c=this.domOnBlur,h=this.dommouseleave,l=this.domMouseEnter;a&&a.remove(),s&&s.remove(),i&&i.remove(),o&&o.remove(),r&&r.remove(),t&&t.remove(),e&&e.remove(),n&&n.remove(),h&&h.remove(),l&&l.remove(),u&&u.remove(),c&&c.remove()}}),t.exports=a},function(t,e,n){"use strict";var r=n(1),i=function(t){r.mix(this,t),this.init()};r.augment(i,{group:null,visible:!0,gridEl:null,minX:0,minY:0,cell:10,maxX:1e3,maxY:1e3,line:null,init:function(){var t=this,e=t.group,n=t._getPath(),i=r.mix({},t.line);i.path=n;var a=e.addShape("path",{attrs:i,capture:!1});a.set("visible",t.visible),this.gridEl=a},_getPath:function(){for(var t=this,e=t.minX,n=t.minY,r=t.maxX,i=t.maxY,a=t._getCell(),o=Math.ceil(e/a)*a,s=Math.ceil(n/a)*a,u=[],c=0;c<=r-e;c+=a){var h=o+c;u.push(["M",h,n]),u.push(["L",h,i])}for(var l=0;l<=i-n;l+=a){var f=s+l;u.push(["M",e,f]),u.push(["L",r,f])}return u},_getCell:function(){var t=this.cell?this.cell:10;return t},update:function(t){r.mix(this,t);var e=this._getPath(),n=this.gridEl;n.attr("path",e),n.set("visible",this.visible)},destroy:function(){var t=this,e=t.gridEl;e&&e.remove()}}),t.exports=i},function(t,e,n){"use strict";var r=n(4),i=n(36),a=function(t){r.mix(this,t),this.init()};r.augment(a,{graph:null,guides:[],frontGuideGroup:null,backGuideGroup:null,init:function(){var t=this.graph,e=t.get("frontGroup").addGroup(),n=t.get("backGroup").addGroup();this.frontGuideGroup=e,this.backGuideGroup=n},link:function(t){this.guides.push({type:"link",cfg:t})},_link:function(t){var e=this.guides,n=this.graph,a=n.find(t.source),o=n.find(t.target);if(!a||!o)return!1;var s=t.id?t.id:"guide-link-"+e.length,u=this.frontGuideGroup,c=u.addGroup(i,{data:{type:"link",cfg:t},id:s}),h=a.getCenter(),l=o.getCenter(),f=a.getIntersectionByPoint(l),d=o.getIntersectionByPoint(h),g=r.mix({},t,{source:a,target:o,points:[f,d]}),p=t.shape?t.shape:"line";return r.drawEdge(p,g,c),c},draw:function(){var t=this,e=this.guides;r.each(e,function(e){t["_"+e.type](e.cfg)})},save:function(){return this.guides},remove:function(){},clear:function(t){this.frontGuideGroup.clear(t),this.backGuideGroup.clear(t)},destroy:function(){this.frontGuideGroup.clear(),this.backGuideGroup.clear()}}),t.exports=a},function(t,e,n){"use strict";var r=n(4),i=n(11),a=function(t){r.mix(this,t),this.init()};r.augment(a,{graph:null,tooltipDOM:null,titleDOM:null,listDOM:null,tooltipCSS:{border:"none","border-radius":"4px",background:"rgba(33,33,33,0.7)",color:"white","font-size":"14px",margin:0,padding:"8px 16px"},titleCSS:{margin:0},listCSS:{margin:0,"list-style-type":"none",padding:"0px"},title:"",dx:10,dy:10,margin:10,split:": ",timer:setTimeout(function(){}),tooltipHtml:'<div class="g6-tooltip" style="position: absolute;white-space:nowrap;z-index: 5;"></div>',titleHtml:'<h4 class="g6-tooltip-title"></h4>',listHtml:'<ul class="g6-tooltip-list"></ul>',liTpl:"<li><span>{name}</span>{split}{value}</li>",custom:!1,init:function(){var t=this.custom;t||this._createDOM(),this._bindEvent()},_createDOM:function(){var t=this.graph,e=t.get("graphContainer"),n=r.createDOM(this.tooltipHtml,this.tooltipCSS),i=r.createDOM(this.titleHtml,this.titleCSS),a=r.createDOM(this.listHtml,this.listCSS);e.appendChild(n),n.appendChild(i),n.appendChild(a),n.hide(),i.innerHTML=this.title,this.titleDOM=i,this.listDOM=a,this.tooltipDOM=n},_bindEvent:function(){var t=this.graph;t.on("itemmouseenter",r.wrapBehavior(this,"onMouseenter")),t.on("itemhover",r.wrapBehavior(this,"onItemhover")),t.on("itemmouseleave",r.wrapBehavior(this,"onMouseleave")),t.on("dommouseleave",r.wrapBehavior(this,"onDomMouseleave"))},_changeContent:function(t){var e=this,n=this.listDOM,i=this.liTpl,a="";t&&(r.isArray(t[0])||(t=[t]),r.each(t,function(t){a+=r.substitute(i,{name:t[0],value:t[1],split:e.split})}),n.innerHTML=a)},_getTop:function(t,e,n){var r=this.dy;return 2*t.height>=e.height?"0px":n<t.height+r?n+r+"px":n-t.height-r+"px"},_getLeft:function(t,e,n){var r=this.dx;return 2*t.width>=e.width?"0px":e.width-n-r<t.width?n-t.width-r+"px":n+r+"px"},_changePositon:function(t){var e=this.tooltipDOM,n=this.graph.get("htmlElementContaniner"),r={x:0,y:0,width:e.width()+e.paddingRight()+e.paddingLeft(),height:e.height()+e.paddingTop()+e.paddingBottom()},i={x:0,y:0,width:n.width(),height:n.height()},a=t.domX,o=t.domY;e.css({top:this._getTop(r,i,o),left:this._getLeft(r,i,a)})},onMouseenter:function(t){var e=this.custom;if(e)this.show(t);else{var n=t.item.getShapeCfg().tooltip;n&&(this._changeContent(n),this.show(t))}},onItemhover:function(t){this._changePositon(t)},onMouseleave:function(){this.hide()},onDomMouseleave:function(){this.hide()},show:function(t){var e=this.tooltipDOM,n=this.graph,r=this.timer;clearTimeout(r),r=setTimeout(function(){e.show(),n.fire("tooltipshow",t)},i.toolTipTimeout),this.timer=r},hide:function(){var t=this.tooltipDOM,e=this.timer;clearTimeout(e),t.hide()},destroy:function(){var t=this.graph,e=this.custom,n=this.tooltipDOM;!e&&n.destroy(),t.off("itemhover",r.getWrapBehavior(this,"onItemhover")),t.off("mouseleave",r.getWrapBehavior(this,"onMouseleave"))}}),t.exports=a},function(t,e,n){"use strict";var r=n(7).G,i=n(4),a=r.Group,o=function t(e){t.superclass.constructor.call(this,e)};i.extend(o,a),i.augment(o,{drawInner:function(t){var e=this;this.traverseChildren(function(t){var n=t.get("freezePoint"),r=e.getMatrix().elements[0];t.isShape&&n&&t.get("visible")&&(t.initTransform(),t.transform([["t",-n.x,-n.y],["s",1/r,1/r],["t",n.x,n.y]]))}),o.superclass.drawInner.call(this,t)}}),t.exports=o},function(t,e,n){"use strict";function r(t,e){var n=t.get("children");a.each(n,function(n){e(n,t),n.get("children")&&r(n,e)})}var i=n(7),a=n(4),o=n(38),s=i.G,u=function(){};a.augment(u,{traverseChildren:function(t){r(this,t)},radixSort:function(){var t=this.get("children");this.set("children",a.radixSort(t,function(t){return t.get("zIndex")}))},clear:function(t){var e=this.get("children");for(t=t!==!1;0!==e.length;)e[e.length-1].remove(t);return this},findByCFG:function(t,e){var n=this.get("children"),r=[];return a.each(n,function(n){n.get(t)===e&&r.push(n)}),r}}),a.mixin(s.Group,[u,o]),t.exports=u},function(t,e,n){"use strict";function r(t,e){var n=e.elements,r=n[0]*t.x+n[3]*t.y+n[6],i=n[1]*t.x+n[4]*t.y+n[7];return t.x=r,t.y=i,t}function i(t){var e=t.fill,n=t.fillOpacity,r=new o(e);return t.stroke&&(t.border=""+t.lineWidth+"px solid "+t.stroke),e&&n?void(t["background-color"]="rgba("+255*r.getR()+", "+255*r.getG()+", "+255*r.getB()+", "+n+")"):void(e&&(t.fill=e))}var a=n(7),o=n(20),s=n(66),u=n(4),c=a.G,h=function t(e){t.superclass.constructor.call(this,e)};h.ATTRS={x:0,y:0,width:0,height:0,fillOpacity:1,lineWidth:1},u.extend(h,c.Shape),u.augment(h,{canFill:!0,type:"html",__isPointInFill:function(t,e){var n=this.getBBox(),r=n.minX,i=n.minY,a=n.maxX-n.minX,o=n.maxY-n.minY;return r<=t&&t<=r+a&&i<=e&&e<=i+o},getDefaultAttrs:function(){return h.ATTRS},init:function(){var t=this.get("canvas"),e=this.get("attrs"),n=this.get("autoSize"),r=t.get("htmlElementContaniner"),i=e.html,a=e.cx,o=e.cy,s=u.createDOM(i,{position:"absolute",padding:"0px",margin:"0px",visibility:"hidden"}),c=void 0,h=void 0;r.appendChild(s),n&&(c=s.width(),h=s.height(),this.attr("x",a-c/2),this.attr("y",o-h/2),this.attr("width",c),this.attr("height",h)),this.set("dom",s)},attr:function(t,e){var n=this.get("attrs");return u.isObject(t)?(u.mix(n,t),i(n),void 0===t.x&&void 0===t.y&&void 0===t.width&&void 0===t.height||this.calculateBox(),n):u.isNull(e)?n[t]:(n[t]=e,i(n),"x"!==t&&"y"!==t&&"width"!==t&&"height"!==t||this.calculateBox(),this)},calculateBox:function(){var t=this.attr("x"),e=this.attr("y"),n=this.attr("width"),r=this.attr("height"),i=this.attr("lineWidth");return{minX:t-i/2,minY:e-i/2,maxX:t+n+i/2,maxY:e+r+i/2}},isPointInPath:function(t,e){return this.__isPointInFill(t,e)},applyTransform:function(){var t=this.get("dom"),e=this.get("canvas"),n=e.get("pixelRatio"),i=this.getTotalMatrix(),a=this.attr("x"),o=this.attr("y"),s=this.attr("width"),u=this.attr("height"),c=r({x:a,y:o},i),h=r({x:a+s,y:o+u},i);t.css({left:c.x/n+"px",top:c.y/n+"px",width:(h.x-c.x)/n+"px",height:(h.y-c.y)/n+"px"})},tryAdd:function(){var t=this.get("canvas"),e=t.get("htmlElementContaniner"),n=this.get("dom");n.parentNode!==e&&e.appendChild(n)},createPath:function(){var t=this.get("dom"),e=this.get("attrs");this.tryAdd(),this.applyTransform(),t.css(u.mix({visibility:"visible"},e))},destroy:function(){var t=this.get("dom");t&&(u.isFunction(t.g6Destroy)&&t.g6Destroy(),t.destroy()),h.superclass.destroy.call(this)}}),s.Html=h,t.exports=h},function(t,e,n){"use strict";var r=n(1),i=n(7),a=n(38),o=i.G,s=function(){};r.augment(s,{getAllAttrs:function(){var t=this,e=t.get("attrs"),n={};return r.each(e,function(e,r){n[r]=t.attr(r)}),n}}),r.mixin(o.Shape,[s,a]),t.exports=s},function(t,e,n){"use strict";function r(t,e,n){return new a({width:t,height:e,eventEnable:!1,containerDOM:n})}var i=n(17),a=n(7),o=n(4),s=n(182),u=n(178),c=n(179),h=n(183),l=n(177),f=n(181),d=n(180),g=n(175),p=n(83),v=n(82),m=n(164),y=n(163),x=n(166),b=n(162),_=n(165),w=n(11),M=n(81),S=n(167),k=n(36),A=v.Node,C=v.Edge,T=function t(e){t.superclass.constructor.call(this,e),this._init()};T.ATTRS={id:null,container:null,graphContainer:null,width:null,height:500,addingType:"",itemCache:null,items:[],nodes:[],edges:[],guides:[],canvas:null,eventStash:{},el:null,forceFit:!1,grid:!0,guide:!0,defaultNodeShape:null,animate:!1,drawFrameObj:{},useAnchor:!0,useEdgeSortGroup:!0,useNodeSortGroup:!1,useFreezeSizeGroup:!1,wheelScaleLimit:[-(1/0),1/0],behaviourSignal:{},maxZoom:10,minZoom:.1,domFocus:!1,tooltipDOM:null,preciseAnchor:!1,autoLayout:!0,intersectBox:"rect"},o.extend(T,i),o.mixin(T,[d,f,l,g,s,u,c,h]),o.augment(T,{_init:function(){this._pluginInit(),this.fire("beforeinit"),this._initCfg(),this._initDOM(),this._initData(),this._initMapper(),this._initEvent(),this._initForceFit(),this.get("grid")&&this._initGrid(),this._initModal(),this._initEditor(),this._initMode(),this._initLayout(),this._initAnimate(),this._initGuide(),this.fire("afterinit")},_initGuide:function(){var t=o.mix({graph:this,guides:this.get("guides")},w.guide,this.get("guide")),e=new _(t);this.set("guideAssist",e)},_initGrid:function(){var t=o.mix({minX:0,minY:0,maxX:this.get("width"),maxY:this.get("height"),group:this.get("backGroup")},w.grid,this.get("grid")),e=new m(t);this.set("gridAssist",e)},_initAnimate:function(){var t=this.get("animate"),e=this.get("canvas"),n=this.get("frontCanvas");t&&this.set("animateAssist",new b({canvases:[e,n]}))},_initForceFit:function(){this.get("width")||this.set("forceFit",!0),this.get("forceFit")&&(window.addEventListener("resize",o.wrapBehavior(this,"_initForceFitEvent")),this.forceFit())},_initForceFitEvent:function(){var t=this,e=setTimeout(function(){t.forceFit()},200);clearTimeout(this.get("resizeTimer")),this.set("resizeTimer",e)},_on:function(t,e){var n=this.get("eventStash");n[t]||(n[t]=[]),n[t].push(e),this.on(t,e)},_off:function(){var t=this,e=this.get("eventStash");o.each(e,function(n,r){o.each(n,function(e){t.off(r,e)}),e[r]=[]})},_initData:function(){this.set("itemCache",{}),this.set("items",[]),this.set("nodes",[]),this.set("edges",[])},_initMapper:function(){this.set("nodeMapper",new p),this.set("edgeMapper",new p)},_initDOM:function(){var t=this.get("container");if(!t){var e=this.get("id");if(t=document.getElementById(e),!t)throw new Error("please set the id for the graph")}var n=this.get("useEdgeSortGroup"),i=this.get("useFreezeSizeGroup"),a=this.get("useNodeSortGroup"),s=this.get("width"),u=this.get("height"),c=o.createDOM('<div class="graph-container"></div>',{position:"relative"});t.appendChild(c);var h=r(s,u,c),l=c.appendChild(o.createDOM('<div class="graph-container-html-Elements"></div>')),f=r(s,u,c),d=f.addShape("rect",{attrs:o.mix({},w.modalRectStyle),visible:!1,capture:!1}),g=f.get("el");h.set("htmlElementContaniner",l),l.style.overflow="hidden",l.style.width=s+"px",l.style.height=u+"px",l.style.position="absolute",l.style.top=0,l.style.left=0,g.style.position="absolute",g.style.top=0,g.style.left=0,c.style["font-family"]=w.fontFamily;var p=i?h.addGroup(S):h.addGroup(),v=f.addGroup(S),m=p.addGroup(),y=p.addGroup(),x=n?y.addGroup(M):y.addGroup(),b=a?y.addGroup(M):y.addGroup(),_=p.addGroup(),k=v.addGroup({capture:!1}),A=v.addGroup(),C=v.addGroup(),T=v.addGroup();p.set("gid","rootGroup"),v.set("gid","frontCanvasRootGroup"),m.set("animate",!1);var E=v.addGroup(M,{visible:!1});this.set("rootGroup",p),this.set("itemGroup",y),this.set("backGroup",m),this.set("frontGroup",_),this.set("frontCanvasRootGroup",v),this.set("controlPointRootGroup",T),this.set("delegaRootGroup",A),this.set("activedRectRootGroup",k),this.set("anchorPointRootGroup",C),this.set("nodeGroup",b),this.set("edgeGroup",x),this.set("canvas",h),this.set("frontCanvas",f),this.set("graphContainer",c),this.set("htmlElementContaniner",l),this.set("container",t),this.set("el",g),this.set("modalRect",d),this.set("modalGroup",E)},_initEvent:function(){var t=new y({graph:this,frontCanvas:this.get("frontCanvas"),canvas:this.get("canvas"),rootGroup:this.get("rootGroup")});this.set("eventAssist",t)},getViewPortBox:function(){var t=this.get("width"),e=this.get("height"),n=this.invertPoint({x:0,y:0}),r=this.invertPoint({x:t,y:e});return{minX:n.x,minY:n.y,maxX:r.x,maxY:r.y}},_updateGrid:function(){var t=this.get("gridAssist");if(t){var e=this.getViewPortBox();
12t.update(e)}},_afterAddItem:function(t,e){var n=this.get("itemCache");this.fire("itemadd",{item:e,model:e.get("model")}),this.fire("itemchange",{item:e}),n[t]=e},_clearInner:function(){var t=this.get("guideAssist"),e=this.get("itemCache"),n=this.get("animate"),r=this.get("htmlElementContaniner");r.innerHTML="",o.each(e,function(t){t.destroy()}),t.clear(!n),this.fire("afterclear")},_updateEdgeEnd:function(t,e,n){var r=this,i=r.get("itemCache"),a=e[n],o=t.get(n);if(!o||o.get("id")!==a){o&&o.removeEdge(t);var s=i[a];s.addEdge(t),t.set(n,s)}},_drawInner:function(){this._drawItems(),this._doLayout(),this._drawGuides()},getBBox:function(){var t=this.get("itemGroup");return t.getBBox()},_drawItems:function(){var t=this.get("nodes"),e=this.get("edges");this._addNodes(t),this._addEdges(e)},_drawGuides:function(){var t=this.get("guideAssist");t.draw()},_readGuides:function(t){var e=this;o.each(t,function(t){e.get("guides").push(t)})},_saveGuides:function(){var t=this.get("guideAssist");return t.save()},_getAllActived:function(){var t=this.getAllActived();return t.sort(function(t,e){var n=t.get("group"),r=e.get("group"),i=void 0,a=void 0;return n&&(i=n.get("parent"),a=i.get("children")),a.indexOf(n)-a.indexOf(r)}),t},addItem:function(t,e){t=o.ucfirst(t);var n="_add"+t+"s",r=this[n]([e])[0];return r},removeItem:function(t){var e=this,n=e.get("itemCache");if(t&&!t.destroyed){o.isString(t)&&(t=n[t]);var r=t.get("id");if(this.fire("itemremove",{item:t}),"node"===t.get("type")){var i=t.get("edges").slice();o.each(i,function(t){t&&!t.destroyed&&e.removeItem(t)})}this.fire("itemchange",{item:t}),t.destroy(),delete n[r]}},updateItem:function(t,e){var n=this.get("itemCache");o.isString(t)&&(t=n[t]);var r=t.get("type"),i=t.get("model");if(o.mix(i,e),"edge"===r)this._updateEdgeEnd(t,i,"source"),this._updateEdgeEnd(t,i,"target"),t.update();else if("node"===r){t.update();var a=t.get("edges");o.each(a,function(t){t.update()})}return this.fire("itemupdate",{item:t,model:e}),this.fire("itemchange",{item:t}),t},css:function(t){var e=this.get("el");o.each(t,function(t,n){e.style[n]=t})},_addNodes:function(t){var e=this,n=e.get("nodeGroup"),r=e.get("itemCache"),i=e.get("animate"),a=e.get("intersectBox"),s=[];return o.each(t,function(t){var u=t.id;if(o.isNull(u)&&(u=o.guid(),t.id=u),r[u])throw new Error("id: "+u+" \u5df2\u5b58\u5728\uff01id: "+u+" already exist!");var c=n.addGroup(k,{id:u,type:"node"}),h=new A({id:u,graph:e,group:c,animate:i,model:t,intersectBox:a,mapper:e.get("nodeMapper"),delegaRootGroup:e.get("delegaRootGroup"),useAnchor:e.get("useAnchor"),controlPointRootGroup:e.get("controlPointRootGroup"),activedRectRootGroup:e.get("activedRectRootGroup"),anchorPointRootGroup:e.get("anchorPointRootGroup")});e._afterAddItem(u,h),s.push(h),h.draw(),e.get("items").push(h)}),s},read:function(t){var e=this;o.each(t,function(t,n){e["_read"+o.ucfirst(n)](t)})},save:function(){return{source:this._saveSource(),guides:this._saveGuides()}},_addEdges:function(t){var e=this,n=e.get("animate"),r=e.get("itemCache"),i=e.get("edgeGroup"),a=[];return o.each(t,function(t){var s=t.id,u=r[t.source],c=r[t.target];if(!u||!c)throw new Error("can not find effective node in edge model");if(r[s])throw new Error("id: "+s+" \u5df2\u5b58\u5728\uff01id: "+s+" already exist!");o.isNull(s)&&(s=o.guid(),t.id=s);var h=i.addGroup(k,{id:s,type:"edge"}),l=new C({id:s,graph:e,animate:n,source:u,target:c,model:t,group:h,mapper:e.get("edgeMapper"),useAnchor:e.get("useAnchor"),delegaRootGroup:e.get("delegaRootGroup"),controlPointRootGroup:e.get("controlPointRootGroup")});l.draw(),e._afterAddItem(s,l),a.push(l),e.get("items").push(l)}),a},invertPoint:function(t){var e=this.get("rootGroup").getMatrix();return o.invertPoint(t,e)},converPoint:function(t){var e=this.get("rootGroup").getMatrix();return o.converPoint(t,e)},forceFit:function(){var t=this.get("container"),e=o.getDOMWidth(t),n=this.get("height");e!==this.get("width")&&this.changeSize(e,n)},tooltip:function t(e){var n=this.get("tooltipAssist"),t={graph:this,tooltipDOM:this.get("tooltipDOM")};return e?(o.isObject(n)&&n.destroy(),o.isObject(e)&&o.mix(t,e),n=new x(t),this.set("tooltipAssist",n)):(n&&n.destroy(),this.set("tooltipAssist",null)),this},getItem:function(t){if(!t)return null;var e=t.get("parent"),n=this.get("itemCache"),r=e.get("id");return n[r]},updateMatrix:function(t){var e=this.get("rootGroup"),n=this.get("frontCanvasRootGroup"),r=this.get("minZoom"),i=this.get("maxZoom");t.elements[0]<r||t.elements[0]>i||(e.setMatrix(t),n.setMatrix(t.clone()),this._updateGrid(),this.fire("matrixupdate",{matrix:t}))},getScale:function(){return this.getMatrix().elements[0]},getMatrix:function(){var t=this.get("rootGroup");return t.getMatrix()},toFront:function(t){var e=t.get("group"),n=e.get("parent"),r=n.get("children");return o.remove(r,e),r.push(e),self},toBack:function(t){var e=t.get("group"),n=e.get("parent"),r=n.get("children");return o.remove(r,e),r.unshift(e),self},guide:function(){var t=this.get("guideAssist");return t},node:function(){return this.get("nodeMapper")},edge:function(){return this.get("edgeMapper")},clear:function(){this._clearInner(),this._initMapper(),this._initData()},draw:function(t){var e=this,n=e.get("animateAssist"),r=e.get("drawFrameObj");r.callback=function(){e.destroyed||(n?t!==!1?n.run():(n.init(),e.refresh(!1)):e.refresh(!1))},o.frameDraw(r)},refreshFront:function(){this.get("frontCanvas").draw()},refresh:function(){this.get("canvas").draw(),this.get("frontCanvas").draw()},updateNodesPosition:function(){var t=this.getEdges(),e=this.getNodes();o.each(e,function(t){t.updatePosition()}),o.each(t,function(t){t.update()}),this.draw()},render:function(){this.fire("beforerender"),this._drawInner(),this._fitView(),this.draw(),this.fire("afterrender")},changeData:function(){var t=o.toArray(arguments);this._clearInner(),this._initData(),this.source.apply(this,t),this._drawInner(),this.draw()},getWidth:function(){return this.get("width")},getHeight:function(){return this.get("height")},changeSize:function(t,e){if(Math.abs(t)>=1/0||Math.abs(e)>=1/0)return void console.warn("size parameter more than the maximum");var n=this,r=n.get("canvas"),i=n.get("frontCanvas"),a=n.get("htmlElementContaniner");r.changeSize(t,e),i.changeSize(t,e),n.set("width",t),n.set("height",e),a.css({width:t+"px",height:e+"px"}),n._updateGrid(),n.refresh(),n.fire("changesize",{width:t,height:e})},destroy:function(){var t=this,e=t.get("canvas"),n=t.get("gridAssist"),r=t.get("guideAssist"),i=t.get("tooltipAssist"),a=t.get("eventAssist"),s=t.get("container"),u=t.get("graphContainer");this._pluginDestroy(),s&&s.removeChild(u),a&&a.destroy(),n&&n.destroy(),i&&i.destroy(),r&&r.destroy(),e&&e.destroy(),T.superclass.destroy.call(this),window.removeEventListener("resize",o.getWrapBehavior(this,"_initForceFitEvent"))},find:function(t){var e=this,n=e.get("itemCache");return n[t]},snapshot:function(){var t=this.get("canvas"),e=t.get("el");return e.toDataURL("image/png")},downloadImage:function(t){var e=this.snapshot(),n=document.createElement("a"),r=t?t:"chart.png";return n.download=r,n.href=e.replace("image/png","image/octet-stream"),n.click(),this},showAnchor:function(t){return t.showAnchor(),this.refreshFront(),this},hideAnchor:function(t){return t.hideAnchor(),this.refreshFront(),this},setCapture:function(t){var e=this.get("rootGroup"),n=this.get("frontCanvasRootGroup");e.set("capture",t),n.set("capture",t)},updateAnchor:function(t,e,n){return t.updateAnchor(e,n),this.refreshFront(),this},setAnchorActived:function(t){var e=t.get("hoverStyle");return t.attr(e),this.refreshFront(),this},setAnchorUnActived:function(t){var e=t.get("attrs");return t.attr(e),this.refreshFront(),this},isInGraph:function(t){var e=this.get("itemCache"),n=!1;return o.each(e,function(e){e===t&&(n=!0)}),n},_initCfg:function(){},_initEditor:function(){},_readSource:function(){},_saveSource:function(){},update:function(){},remove:function(){},source:function(){},add:function(){}}),t.exports=T},function(t,e,n){"use strict";var r=n(4),i=n(37),a=function t(e){t.superclass.constructor.call(this,e),this._initEnds()};a.ATTRS={type:"edge",controlPoints:[null,null],source:null,target:null,sourceAnchor:null,targetAnchor:null,useAnchor:!0},r.extend(a,i),r.augment(a,{_initEnds:function(){var t=this,e=t.get("source"),n=t.get("target");e&&e.addEdge(t),n&&n.addEdge(t)},_getEdgePoints:function(){var t=this,e=t.get("model"),n=t.get("source"),i=t.get("target"),a=t.get("useAnchor"),o=t.get("graph"),s=t.getControlPoints(),u=e.sourceAnchor,c=e.targetAnchor,h=n.getCenter(),l=i?i.getCenter():n.getCenter(),f=s.length,d=t.getShapeCfg(),g=t.get("shapeManger"),p=0,v=f-1,m=o.get("preciseAnchor"),y=void 0;return a?(null===u&&delete e.sourceAnchor,null===c&&delete e.targetAnchor,r.isNumber(u)&&n&&(u=n.getAnchor(u)),r.isNumber(c)&&i&&(c=i.getAnchor(c)),f>2?(n&&!u&&(u=n.getAnchor(s[p+1])),i&&!c&&(c=i.getAnchor(s[v-1]))):(y=m&&g.getPath(d.shape,[h,l]),n&&!u&&(u=y?n.getAnchor(y):n.getAnchor(l)),i&&!c&&(c=y?i.getAnchor(y):i.getAnchor(h))),s[0]={x:u.x,y:u.y},s[v]={x:c.x,y:c.y},s):(s[0]={x:h.x,y:h.y},s[v]={x:l.x,y:l.y},s)},beforeDraw:function(){a.superclass.beforeDraw.call(this);var t=this.getShapeCfg(),e=this.get("group");t.points=this._getEdgePoints(),t.target=this.get("target"),t.source=this.get("source"),e.set("controlPoints",this.get("controlPoints"))},getControlPoints:function(){var t=this.get("model"),e=t.controlPoints?t.controlPoints:this.get("controlPoints");return e},addControlPoint:function(t){var e=this.getControlPoints(),n=1/0,i=void 0,a=void 0,o=void 0;return r.each(e,function(s,u){if(a=e[u+1]){if(o=r.segmentDistance(s,a,t),o<1)return i=u,!1;o<n&&(n=o,i=u)}}),e.splice(i+1,0,t),i},getDelegationPath:function(t){var e=this,n=e.getControlPoints(),i=t.controlPointIndex,a=n[i-1],o=n[i+1],s=[{x:t.x,y:t.y}];a&&s.unshift(a),o&&s.push(o);var u=r.pointsToPolygon(s);return u},destroyItem:function(){var t=this,e=t.get("source");e&&!e.destroyed&&e.removeEdge(t);var n=t.get("target");n&&!n.destroyed&&n.removeEdge(t)},isExtremePoint:function(t){var e=this.getControlPoints(),n=void 0;return r.isObject(t)&&(n=e.indexOf(t)),r.isNumber(t)&&(n=t),0===n||n===e.length-1},isSourcePoint:function(t){var e=this.getControlPoints(),n=void 0;return r.isObject(t)&&(n=e.indexOf(t)),r.isNumber(t)&&(n=t),0===n},isTargetPoint:function(t){var e=this.getControlPoints(),n=void 0;return r.isObject(t)&&(n=e.indexOf(t)),r.isNumber(t)&&(n=t),n===e.length-1},showAble:function(){var t=this.get("source"),e=this.get("target");return t.isVisible()&&e.isVisible()},show:function(){this.showAble()&&this._show()},hide:function(){this._hide()}}),t.exports=a},function(t,e,n){"use strict";var r=n(4),i=n(37),a=n(11),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={type:"node",anchorPoints:null,edges:[],anchorGroup:null,boxStash:null,useAnchor:!0},r.extend(o,i),r.augment(o,{calculateAnchorPoints:function(t){var e=this,n=e.get("useAnchor");if(n){var i=e.get("shapeManger"),a=e.getShapeCfg(),o=i.getAnchorPoints(a.shape,a,e.get("group"));if(!r.isArray(o))return o;t=t?t:e.getBBox();var s=[];return r.each(o,function(e){var n=r.mix({},{x:t.minX+e[0]*t.width,y:t.minY+e[1]*t.height},e[2]);s.push(n)}),s}},_calculateAnchorPoints:function(){var t=this.calculateAnchorPoints();return this.set("anchorPoints",t),t},hideBox:function(){var t=this.get("activedRectGroup");t&&t.remove()},showBox:function(){var t=this.getBBox(),e=this.getKeyShape(),n=e.attr("lineWidth"),i=this.get("activedRectRootGroup"),o=this.get("activedRectGroup");o&&o.remove(),o=i.addGroup({zIndex:a.zIndex.activedNodeRect,id:this.get("id")}),this.set("activedRectGroup",o),n=r.isNumber(n)?n:0,o.addShape("rect",{attrs:r.mix({x:t.x+n/2,y:t.y+n/2,width:t.width-n,height:t.height-n},a.nodeActivedBoxStyle,a.nodeAcitvedBoxStyle)})},getAnchorPoints:function(){var t=this.get("anchorPoints");return t||this._calculateAnchorPoints()},setActiveStatus:function(t){var e=this;o.superclass.setActiveStatus.call(this,t,function(){e.showBox()},function(){e.hideBox()})},getCenter:function(){var t=this.getBBox();return{x:t.centerX,y:t.centerY}},getPosition:function(){var t=this.get("model");return{x:t.x,y:t.y}},getAnchor:function(t){var e=this.getCenter(),n=this.getAnchorPoints(),i=void 0;if(r.isNumber(t)&&r.isArray(n))return this.getAnchorByIndex(t);if(r.isObject(t)&&(i=this.getIntersectionByPoint(t)),(r.isArray(t)||r.isString(t))&&(i=this.getIntersectionByPath(t)),i){if("auto"===n)return i;if(r.isArray(n))return r.getSnapAnchor(this,i)}return e},getIntersectionByPoint:function(t){var e=this.getBBox(),n=this.get("intersectBox"),i=void 0;return i="rect"===n?r.getRectIntersect(e,t):r.getCircleIntersect(t.x,t.y,e.centerX,e.centerY,Math.max(e.width,e.height)/2)},getRootKeyShapePath:function(){var t=this.get("graph"),e=this.getKeyShape(),n=r.clone(e.attr("path")),i=this.getGroup(),a=t.get("rootGroup");return n=r.pathToAbsolute(n),r.each(n,function(t){var e=void 0;if("a"===t[0]||"A"===t[0])e={x:t[6],y:t[7]},e=r.applyPoint(e,i,a),t[6]=e.x,t[7]=e.y;else for(var n=1;n<t.length;n+=2)e={x:t[n],y:t[n+1]},e=r.applyPoint(e,i,a),t[n]=e.x,t[n+1]=e.y}),n},getIntersectionByPath:function(t){var e=this.getRootKeyShapePath(),n=r.pathIntersection(t,e)[0];if(!n){var i=this.getBBox(),a=r.getRectPath(i.x,i.y,i.width,i.height);n=r.pathIntersection(t,a)[0]}return n},getAnchorByIndex:function(t){var e=this.getAnchorPoints();return e[t]},getControlPoints:function(){var t=this,e=t.getBBox(),n=[];return n.push({x:e.x,y:e.y}),n.push({x:e.maxX,y:e.y}),n.push({x:e.maxX,y:e.maxY}),n.push({x:e.x,y:e.maxY}),n},getDelegationPath:function(t){var e=this,n=e.getBBox(),r=t.x,i=t.y,a=t.size,o=n.width,s=n.height;a&&(o=a[0],s=a[1]);var u=[];return u.push(["M",r-o/2,i-s/2]),u.push(["L",r+o/2,i-s/2]),u.push(["L",r+o/2,i+s/2]),u.push(["L",r-o/2,i+s/2]),u.push(["Z"]),u},addEdge:function(t){this.get("edges").push(t)},removeEdge:function(t){r.remove(this.get("edges"),t)},showAnchor:function(){var t=this,e=t.getAnchorPoints(),n=t.get("anchorPoints"),i=t.get("anchorPointRootGroup"),o=t.get("anchorGroup");o&&o.remove(!0),o=i.addGroup({zIndex:a.zIndex.anchorPoint,id:t.get("id")}),r.each(e,function(e,i){o.addShape("circle",{class:"anchor-point",item:t,point:e,index:i,anchorPoint:n[i],freezePoint:e,linkable:e.linkable,hoverStyle:r.mix({},a.anchorPointHoverStyle,e.hoverStyle),attrs:r.mix({x:e.x,y:e.y},a.anchorPointStyle,e.style)})}),this.set("anchorGroup",o)},hideAnchor:function(){var t=this.get("anchorGroup");t&&t.remove(!0),this.set("anchorGroup",null)},updateAnchor:function(t,e){var n=this.getAnchorPoints(),i=n[t];i&&r.mix(i,e),this.showAnchor()},beforeDraw:function(){o.superclass.beforeDraw.call(this);var t=this.get("graph"),e=this.get("group"),n=this.getShapeCfg();e.initTransform(),t&&r.isFunction(t.beforeNodeDraw)&&t.beforeNodeDraw(this),n.shape||(n.shape=t.get("defaultNodeShape")),e.translate(n.x,n.y),n.x=0,n.y=0},afterDraw:function(){var t=this.get("graph"),e=this.getShapeObj();t&&r.isFunction(t.afterNodeDraw)&&t.afterNodeDraw(this),this._calculateBBox(),e&&e.class&&this.set("class",e.class),this._calculateAnchorPoints(),o.superclass.afterDraw.call(this)},show:function(){for(var t=this.get("edges"),e=void 0,n=0;n<t.length;n++)e=t[n],!e.isVisible()&&e.showAble()&&e._show();this._show()},hide:function(){for(var t=this.get("edges"),e=void 0,n=0;n<t.length;n++)e=t[n],e.isVisible()&&e._hide();this._hide()},getLinkNodes:function(){var t=this,e=t.get("graph"),n=t.get("edges"),i=e.get("itemCache"),a=[],o=void 0,s=void 0,u=void 0;return r.each(n,function(e){o=e.get("model"),s=i[o.target],u=i[o.source],a.indexOf(s)===-1&&s!==t&&a.push(s),a.indexOf(u)===-1&&u!==t&&a.push(u)}),a},getUnLinkNodes:function(){var t=this.get("id"),e=this.getLinkNodes(),n=this.get("graph"),i=n.get("itemCache"),a=[];return r.each(i,function(n){"node"===n.get("type")&&e.indexOf(n)===-1&&n.get("id")!==t&&a.push(n)}),a},getSourceItems:function(){var t=this.get("id");return this.getRelativeItems(function(e){var n=e.getModel();return n.target===t})},getTargetItems:function(){var t=this.get("id");return this.getRelativeItems(function(e){var n=e.getModel();return n.source===t})},getRelativeItems:function(t){var e=this,n=e.get("id"),i=e.get("graph"),a=e.get("edges"),o=i.get("itemCache"),s=[],u=void 0,c=void 0,h=void 0;return t&&(a=r.filter(a,t)),s=s.concat(a),r.each(a,function(t){h=t.get("model"),u=o[h.target],c=o[h.source],s.indexOf(u)===-1&&u.get("id")!==n&&s.push(u),s.indexOf(c)===-1&&c.get("id")!==n&&s.push(c)}),s},getEdges:function(){return this.get("edges")},getUnRelativeItems:function(){var t=this.get("id"),e=this.get("graph"),n=e.get("itemCache"),i=this.getRelativeItems(),a=[];return r.each(n,function(e){i.indexOf(e)===-1&&e.get("id")!==t&&a.push(e)}),a},destroy:function(t){var e=this.get("anchorGroup"),n=this.get("activedRectGroup");e&&e.remove(),n&&n.remove(),o.superclass.destroy.call(this,t)},updatePosition:function(){var t=this.get("model"),e=this.get("group"),n=this.get("graph");e.initTransform(),e.translate(t.x,t.y),this._calculateBBox(),this._calculateAnchorPoints(),n.fire("afteritemrender",{item:this})}}),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=function(t){r.mix(this,t)};r.augment(i,{type:null,mappingType:"auto",dims:null,callback:null,getValue:function(t){var e=this.dims,n=this.callback,i=this.mappingType,a=null,o=null;if(n)if("auto"===i){var s=[];r.each(e,function(e){s.push(t[e])}),a=n.apply(this,s)}else a=n.call(this,t);else a=e?e:t[this.type];return r.isArray(a)||(a=[a]),o=a.length>1?a:a[0]}}),t.exports=i},function(t,e,n){"use strict";var r=n(4),i=function(){};r.augment(i,{isItemActived:function(t){return t.isActived()},setItemActived:function(t,e){this.setItemsActived([t],e)},setItemsActived:function(t,e){var n=this;0!==t.length&&(e!==!1?r.each(t,function(t){t.setActived(),n.fire("itemactived",{item:t})}):r.each(t,function(t){t.clearActived(),n.fire("itemunactived",{item:t})}),this.refresh())},getActived:function(){var t=this,e=this.getItems(),n=null;return r.each(e,function(e){if(t.isItemActived(e))return n=e,!1}),n},getAllActived:function(){var t=this,e=this.getItems(),n=[];return r.each(e,function(e){t.isItemActived(e)&&n.push(e)}),n},clearAllActived:function(){var t=this.getAllActived();return this.setItemsActived(t,!1),this}}),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=function(){};r.augment(i,{setActiveStatus:function(){},isActived:function(){return this.get("actived")},setActived:function(){this.setActiveStatus(!0),this.set("actived",!0)},clearActived:function(){this.setActiveStatus(!1),this.set("actived",!1)}}),t.exports=i},function(t,e,n){"use strict";var r=n(4),i=function(){};i.ATTRS={nodeFilters:[],edgeFilters:[]},r.augment(i,{_addFilter:function(t,e){var n=this.get(t+"Filters");n.push(e)},_removeFilter:function(t,e){var n=this.get(t+"Filters");this.set(t+"Filters",r.filter(n,function(t){return e!==t}))},_filter:function(t){var e=this,n=this.get(t+"Filters"),i=this.get(t+"s"),a=void 0,o=void 0;r.each(i,function(t){a=e.find(t.id),o=!0,r.each(n,function(e){o&&!e(t)&&(o=!1)}),o?a.show():a.hide()}),this.fire("filter")},addNodeFilter:function(t){this._addFilter("node",t)},addEdgeFilter:function(t){this._addFilter("edge",t)},removeNodeFilter:function(t){this._removeFilter("node",t)},removeEdgeFilter:function(t){this._removeFilter("edge",t)},filterNode:function(){this._filter("node")},filterEdge:function(){this._filter("edge")},filter:function(t){switch(t){case"node":this.filterNode();break;case"edge":this.filterEdge();break;default:this.filterNode(),this.filterEdge()}this.draw(!1)}}),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(2),a=n(11),o=i.Matrix3,s=function(){};s.ATTRS={fitView:null,fitViewPadding:a.fitViewPadding},r.augment(s,{_fitView:function(){var t=this.get("fitView"),e=this.get("items");r.isString(t)&&e.length>0&&this[t](!1),r.isObject(t)&&this.focusPoint(t,!1)},_zoom:function(t,e,n){var r=new o,i=this.get("width"),a=this.get("height"),s=this.get("minZoom"),u=this.getBBox(),c=(u.maxX+u.minX)/2,h=(u.maxY+u.minY)/2,l=this.get("fitViewPadding"),f=c,d=h,g=u.maxX-u.minX+2*l,p=u.maxY-u.minY+2*l;n&&(f=n.x,d=n.y),e&&(i=g,a=p,this.changeSize(g,p)),t||(t=i/g,i/g>a/p&&(t=a/p)),(!t||t<s)&&(t=s),r.translate(-f,-d),r.scale(t,t),r.translate(i/2,a/2),this.updateMatrix(r)},zoomAt:function(t,e,n){var r=new o;r.translate(-t,-e),r.scale(n,n),r.translate(t,e),this.updateMatrix(r),this.draw()},zoom:function(t,e){this._zoom(t),e!==!1&&this.draw()},autoZoom:function(t){this._zoom(),t!==!1&&this.draw()},resetZoom:function(t){var e=new o;this.updateMatrix(e),t!==!1&&this.draw()},autoSize:function(t){this._zoom(void 0,!0),t!==!1&&this.draw()},tl:function(){var t=this.getBBox(),e=new o,n=this.get("fitViewPadding");e.translate(-t.minX+n,-t.minY+n),this.updateMatrix(e)},lc:function(){var t=this.getBBox(),e=new o,n=this.get("fitViewPadding"),r=this.get("height");e.translate(-t.minX+n,-t.minY+r/2-t.height/2),this.updateMatrix(e)},bl:function(){var t=this.getBBox(),e=new o,n=this.get("fitViewPadding"),r=this.get("height");e.translate(-t.minX+n,-t.minY+r-t.height-n),this.updateMatrix(e)},cc:function(){var t=this.getBBox(),e=new o,n=this.get("height"),r=this.get("width");e.translate(-t.minX+(r-t.width)/2,-t.minY+(n-t.height)/2),this.updateMatrix(e)},tc:function(){var t=this.getBBox(),e=new o,n=this.get("width"),r=this.get("fitViewPadding");e.translate(-t.minX+(n-t.width)/2,-t.minY+r),this.updateMatrix(e)},tr:function(){var t=this.getBBox(),e=new o,n=this.get("width"),r=this.get("fitViewPadding");e.translate(-t.minX+n-t.width-r,-t.minY+r),this.updateMatrix(e)},rc:function(){var t=this.getBBox(),e=new o,n=this.get("height"),r=this.get("width"),i=this.get("fitViewPadding");e.translate(-t.minX+r-t.width-i,-t.minY+(n-t.height)/2),this.updateMatrix(e)},br:function(){var t=this.getBBox(),e=new o,n=this.get("height"),r=this.get("width"),i=this.get("fitViewPadding");e.translate(-t.minX+r-t.width-i,-t.minY+n-t.height-i),this.updateMatrix(e)},bc:function(){var t=this.getBBox(),e=new o,n=this.get("height"),r=this.get("width"),i=this.get("fitViewPadding");e.translate(-t.minX+(r-t.width)/2,-t.minY+n-t.height-i),this.updateMatrix(e)},focusPoint:function(t,e){this._zoom(1,void 0,t),e!==!1&&this.draw()}}),t.exports=s},function(t,e,n){"use strict";var r=n(4),i=function(){};r.augment(i,{isNode:r.isNode,isEdge:r.isEdge,getItemsBy:function(t){var e=this.get("itemCache"),n=[];return r.each(e,function(e){t(e)&&n.push(e)}),n},getNodes:function(t){if(t){var e=[];return this.getItemsBy(function(n){r.isNode(n)&&e.push(t(n))}),e}return this.getItemsBy(function(t){return r.isNode(t)})},getEdges:function(t){if(t){var e=[];return this.getItemsBy(function(n){r.isEdge(n)&&e.push(t(n))}),e}return this.getItemsBy(function(t){return r.isEdge(t)})},getItems:function(){var t=this.get("itemCache");return r.objectToValues(t)}}),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=function(){};i.ATTRS={layoutFn:null,layoutCfg:null,layout:null},r.augment(i,{_initLayout:function(){var t=this.get("layoutFn"),e=this.get("layoutCfg"),n=this.get("layout");!n&&t&&e&&(n=new t(e),this.set("layout",n))},layout:function(){},_setNodeSize:function(){var t=this.get("nodes"),e=this.get("itemCache");r.each(t,function(t){var n=e[t.id],r=n.getBBox();t.width=r.width,t.height=r.height})},_setEdgeSize:function(){var t=this.get("edges"),e=this.get("itemCache");r.each(t,function(t){var n=e[t.id],i=n.getKeyShape();r.isNumber(t.lineWidth)||(t.lineWidth=i.attr("lineWidth"))})},_doLayout:function(){var t=this.get("layout"),e=this.get("autoLayout");t&&(this._setNodeSize(),this._setEdgeSize(),e&&this.layout())},changeLayout:function(){}}),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=function(){};i.ATTRS={modalItems:[]},r.augment(i,{_initModal:function(){},_updateModalRect:function(){var t=this.get("modalRect"),e=this.get("width"),n=this.get("height");t.attr({x:0,y:0,width:e,height:n})},showModal:function(){var t=this.get("modalGroup"),e=this.get("modalRect");this._updateModalRect(),t.show(),e.show(),this.draw()},hideModal:function(){var t=this.get("modalGroup"),e=this.get("modalRect");t.hide(),e.hide(),this.draw()},modal:function(t){var e=this.get("modalGroup");r.each(t,function(t){var n=t.getGroup(),r=n.getParent();n.set("originParent",r),e.add(n)}),this.showModal(),this.set("modalItems",t)},unModal:function(){var t=this.get("modalItems");r.each(t,function(t){var e=t.getGroup(),n=e.get("originParent");n.add(e)}),this.set("modalItems",[]),this.hideModal()}}),t.exports=i},function(t,e,n){"use strict";function r(t,e){var n=void 0,r=void 0;for(n=0;n<t.length;n++)for(r=0;r<e.length;r++)t[n]===e[r]&&t.splice(n,1);for(n=0;n<e.length;n++)t.push(e[n]);return t}function i(t,e){for(var n=0;n<t.length;n++)if(t[n]===e){t.splice(n,1);break}}var a=n(1),o=n(3),s=function(){};s.ATTRS={modes:null,mode:"default",behaviourFilter:null,behaviours:null},a.augment(s,{_initMode:function(){var t=this.get("modes"),e=this.get("mode");t||(t=this.constructor.Mode,this.set("modes",t)),this.changeMode(e)},_filterBehaviour:function(t){var e=this.get("behaviourFilter"),n={};return a.each(t,function(t,r){n[r]=a.filter(t,function(t){return e.indexOf(t)===-1})}),n},_mapCursor:function(t){var e={add:"pointer",drag:"move",default:"default",edit:"default"},n=e[t];n&&this.css({cursor:e[t]})},filterBehaviour:function(t){this.set("behaviourFilter",t),this.resetMode()},addBehaviour:function(t,e){var n=this.get("modes");return a.isArray(t)?a.each(n,function(e,i){n[i]=r(e,t)}):n[t]?n[t]=r(n[t],e):n[t]=e,this.resetMode(),this},removeBehaviour:function(t,e){var n=this.get("modes");return a.isArray(t)?a.each(n,function(e){a.each(t,function(t){i(e,t)})}):n[t]&&a.each(e,function(e){i(n[t],e)}),this.resetMode(),this},resetMode:function(){var t=this.get("mode");this.changeMode(t)},changeMode:function(t){var e=this.get("modes"),n=this.get("behaviourFilter");e&&"none"!==e&&(n&&(e=this._filterBehaviour(e)),e[t]&&(o.resetMode(e[t],this),this.set("mode",t),this._mapCursor(t)))}}),t.exports=s},function(t,e,n){"use strict";var r=n(1),i=function(){};i.ATTRS={plugins:null},r.augment(i,{_pluginInit:function(){var t=this,e=this.get("plugins");r.each(e,function(e){e.set("graph",t),e.init()})},_pluginDestroy:function(){var t=this.get("plugins");r.each(t,function(t){t.destroy()})}}),t.exports=i},function(t,e,n){"use strict";var r=n(4),i=n(39);i.registGeom("edge",{defaultShapeType:"line",getPath:function(t,e){var n=this.getShape(t);return!!r.isFunction(n.getPath)&&n.getPath(e)}}),i.registEdge("polyLineFlow",{getPath:function(t){return r.getEdgePath("polyLineFlow",t,"line")},draw:function(t,e){return r.drawEdge("polyLineFlow",t,e,!0,"line")}}),i.registEdge("line",{getPath:function(t){return r.getEdgePath("line",t,"line")},draw:function(t,e){return r.drawEdge("line",t,e,!1,"line")}}),i.registEdge("arrow",{getPath:function(t){return r.getEdgePath("line",t,"line")},draw:function(t,e){return r.drawEdge("line",t,e,!0,"line")}}),i.registEdge("HV",{getPath:function(t){return r.getEdgePath("HV",t,"line")},draw:function(t,e){return r.drawEdge("HV",t,e,!1,"line",!1)}}),i.registEdge("VH",{getPath:function(t){return r.getEdgePath("VH",t,"line")},draw:function(t,e){return r.drawEdge("VH",t,e,!1,"line",!1)}}),i.registEdge("HVH",{getPath:function(t){return r.getEdgePath("HVH",t,"line")},draw:function(t,e){return r.drawEdge("HVH",t,e,!1,"line",!1)}}),i.registEdge("VHV",{getPath:function(t){return r.getEdgePath("VHV",t,"line")},draw:function(t,e){return r.drawEdge("VHV",t,e,!1,"line",!1)}}),i.registEdge("smooth",{getPath:function(t){return r.getEdgePath("bezierAuto",t,"curve")},draw:function(t,e){return r.drawEdge("bezierAuto",t,e,!1,"curve")}}),i.registEdge("smoothArrow",{getPath:function(t){return r.getEdgePath("bezierAuto",t,"curve")},draw:function(t,e){return r.drawEdge("bezierAuto",t,e,!0,"curve")}}),i.registEdge("bezierHorizontal",{getPath:function(t){return r.getEdgePath("bezierHorizontal",t,"curve")},draw:function(t,e){return r.drawEdge("bezierHorizontal",t,e,!1,"curve")}}),i.registEdge("bezierVertical",{getPath:function(t){return r.getEdgePath("bezierVertical",t,"curve")},draw:function(t,e){return r.drawEdge("bezierVertical",t,e,!1,"curve")}}),i.registEdge("bezierQuadratic",{getPath:function(t){return r.getEdgePath("bezierQuadratic",t,"curve")},draw:function(t,e){return r.drawEdge("bezierQuadratic",t,e,!1,"curve",!1)}})},function(t,e,n){"use strict";function r(){return[[.5,0],[1,.5],[.5,1],[0,.5]]}var i=n(4),a=n(39),o=.5/Math.sqrt(2);a.registGeom("node",{defaultShapeType:"rect",getAnchorPoints:function(t,e,n){var r=this.getShape(t);return!!i.isFunction(r.getAnchorPoints)&&r.getAnchorPoints(e,n)}}),a.registNode("rect",{draw:function(t,e){return i.drawNode("rect",t,e)},getAnchorPoints:r}),a.registNode("rhombus",{draw:function(t,e){return i.drawNode("rhombus",t,e)},getAnchorPoints:r}),a.registNode("text",{draw:function(t,e){return i.drawNode("text",t,e)},getAnchorPoints:r}),a.registNode("image",{draw:function(t,e){return i.drawNode("image",t,e)},getAnchorPoints:r}),a.registNode("html",{getHtml:function(t){return t.origin.html},cssSize:!1,draw:function(t,e){var n=i.createDOM('<div class="g6-html-node-container"></div>'),r=this.getHtml(t,e);return r=r?i.createDOM(r):i.createDOM("<div></div>"),n.appendChild(r),t.html=n,this.cssSize&&(t.size="auto"),i.drawNode("html",t,e)},getAnchorPoints:function(){return[[0,.25],[0,.5],[0,.75],[1,.25],[1,.5],[1,.75],[.25,0],[.5,0],[.75,0],[.25,1],[.5,1],[.75,1]]}}),a.registNode("circle",{draw:function(t,e){return i.drawNode("circle",t,e)},getAnchorPoints:function(){return[[.5-o,.5-o],[.5,0],[.5+o,.5-o],[1,.5],[.5+o,.5+o],[.5,1],[.5-o,.5+o],[0,.5]]}})},function(t,e,n){"use strict";var r=n(1),i={getDOMHeight:function(t){var e=r.getStyle(t,"height");return parseFloat(e)},getDOMWidth:function(t){var e=r.getStyle(t,"width");return parseFloat(e)},getOuterHeight:function(t){var e=r.getHeight(t),n=parseFloat(r.getStyle(t,"borderTopWidth"))||0,i=parseFloat(r.getStyle(t,"paddingTop")),a=parseFloat(r.getStyle(t,"paddingBottom")),o=parseFloat(r.getStyle(t,"borderBottomWidth"))||0;return e+n+o+i+a},getOuterWidth:function(t){var e=r.getWidth(t),n=parseFloat(r.getStyle(t,"borderLeftWidth"))||0,i=parseFloat(r.getStyle(t,"paddingLeft")),a=parseFloat(r.getStyle(t,"paddingRight")),o=parseFloat(r.getStyle(t,"borderRightWidth"))||0;return e+n+i+a+o},createDOM:function(t,e){var n=void 0;return n=r.isString(t)?r.createDom(t):t,n.bbox=n.getBoundingClientRect(),n.hide=function(){return n.style.visibility="hidden",n},n.show=function(){return n.style.visibility="visible",n},n.css=function(t){return r.modiCSS(n,t),n},n.outerWidth=function(){return i.getOuterWidth(n)},n.outerHeight=function(){return i.getOuterHeight(n)},n.width=function(){return i.getDOMWidth(n)},n.height=function(){return i.getDOMHeight(n)},n.paddingLeft=function(){return parseFloat(r.getStyle(n,"padding-left"))},n.paddingRight=function(){return parseFloat(r.getStyle(n,"padding-right"))},n.paddingTop=function(){return parseFloat(r.getStyle(n,"padding-top"))},n.paddingBottom=function(){return parseFloat(r.getStyle(n,"padding-bottom"))},n.destroy=function(){n.parentNode&&n.parentNode.removeChild(n)},n.on=function(t,e){n.addEventListener(t,e)},n.off=function(t,e){n.removeEventListener(t,e)},n.attr=function(t){return n.getAttribute(t)},n.css(e),n}};t.exports=i},function(t,e,n){"use strict";function r(t,e){return Math.abs(t.x-e.x)>Math.abs(t.y-e.y)}function i(t,e,n,i,a){var o=[];if("horizontal"===n)o.push({x:1*(t.x+e.x)/2,y:t.y}),o.push({x:1*(t.x+e.x)/2,y:e.y});else if("vertical"===n)o.push({x:t.x,y:1*(t.y+e.y)/2}),o.push({x:e.x,y:1*(t.y+e.y)/2});else{var s=Math.abs(e.x-t.x),u=Math.abs(e.y-t.y),c=t,h=e;i&&i.getCenter&&(c=i.getCenter()),a&&a.getCenter&&(h=a.getCenter()),r(t,c)||t===c&&u<s?o.push({x:1*(t.x+e.x)/2,y:t.y}):o.push({x:t.x,y:1*(t.y+e.y)/2}),r(e,h)||e===h&&u<s?o.push({x:1*(t.x+e.x)/2,y:e.y}):o.push({x:e.x,y:1*(t.y+e.y)/2})}return o}function a(t,e){var n={x:(t.x+e.x)/2,y:(t.y+e.y)/2},r=h.vector(e,t),i=r.vertical(),a=r.length();return i.setLength(.2*a),[d.add(n,i)]}function o(t,e,n,r){var a=t[0],o=t[t.length-1],s=["M",a.x,a.y],c=i(a,o,r,e,n),h=["C"],l=[s];
13return u.each(c,function(t){h.push(t.x,t.y)}),h.push(o.x,o.y),l.push(h),l}function s(t,e){var n=10,r=void 0,i=void 0,a=t.getBBox(),o=a.centerX,s=a.centerY,u=a.height,c=a.width,h=a.maxX,l=a.maxY;if(e=[e.x,e.y],o===e[0]&&(e[1]>=s?(r=n+u/2-Math.abs(s-e[1]),i=[o,e[1]+r]):(r=n+u/2-Math.abs(s-e[1]),i=[o,e[1]-r])),s===e[1]&&(e[0]>=o?(r=n+c/2-Math.abs(o-e[0]),i=[e[0]+r,s]):(r=n+c/2-Math.abs(o-e[0]),i=[e[0]-r,s])),i)return i;var f=Math.abs(o-e[0]),d=Math.abs(s-e[1]),g=Math.sqrt(Math.pow(f,2)+Math.pow(d,2)),p=180*Math.asin(d/g)/Math.PI;return e[0]>=o&&e[0]<=h?e[1]>=s&&e[1]<=l?p>0&&p<=45?(r=n+c/2-Math.abs(o-e[0]),i=[e[0]+r,e[1]]):(r=n+u/2-Math.abs(s-e[1]),i=[e[0],e[1]+r]):p>0&&p<=45?(r=n+c/2-Math.abs(o-e[0]),i=[e[0]+r,e[1]]):(r=n+u/2-Math.abs(s-e[1]),i=[e[0],e[1]-r]):e[1]>=s&&e[1]<=l?p>0&&p<=45?(r=n+c/2-Math.abs(o-e[0]),i=[e[0]-r,e[1]]):(r=n+u/2-Math.abs(s-e[1]),i=[e[0],e[1]+r]):p>0&&p<=45?(r=n+c/2-Math.abs(o-e[0]),i=[e[0]-r,e[1]]):(r=n+u/2-Math.abs(s-e[1]),i=[e[0],e[1]-r]),i}var u=n(1),c=n(2),h=n(41),l=n(25),f=n(188),d=c.Vector2,g={polyLineFlow:function(t,e,n){var r=s(e,t[0]),i=s(n,t[1]);n=n.get("boxStash"),e=e.get("boxStash");var a=new f({source:e,target:n,sourcePosition:[t[0].x,t[0].y],sourceHandlePosition:[r[0],r[1]],targetPosition:[t[1].x,t[1].y],targetHandlePosition:[i[0],i[1]]});return a=a.filter(function(t){return t}).map(function(t){return{x:t[0],y:t[1]}}),l.pointsToPolygon(a)},bezierHorizontal:function(t,e,n){return o(t,e,n,"horizontal")},bezierVertical:function(t,e,n){return o(t,e,n,"vertical")},bezierAuto:function(t,e,n){return o(t,e,n,"auto")},bezierQuadratic:function(t){var e=t[0],n=t[t.length-1],r=["M",e.x,e.y],i=a(e,n),o=["Q"],s=[r];return u.each(i,function(t){o.push(t.x,t.y)}),o.push(n.x,n.y),s.push(o),s},line:function(t){var e=l.pointsToPolygon(t);return e},HV:function(t){var e=t.length,n=l.pointsToPolygon([t[0],{x:t[e-1].x,y:t[0].y},t[e-1]]);return n},VH:function(t){var e=t.length,n=l.pointsToPolygon([t[0],{x:t[0].x,y:t[e-1].y},t[e-1]]);return n},HVH:function(t){var e=t.length,n=l.pointsToPolygon([t[0],{x:(t[0].x+t[e-1].x)/2,y:t[0].y},{x:(t[0].x+t[e-1].x)/2,y:t[e-1].y},t[e-1]]);return n},VHV:function(t){var e=t.length,n=l.pointsToPolygon([t[0],{x:t[0].x,y:(t[0].y+t[e-1].y)/2},{x:t[e-1].x,y:(t[0].y+t[e-1].y)/2},t[e-1]]);return n}};t.exports=g},function(t,e,n){"use strict";function r(t){var e=this,n=t.source,r=t.target,a=t.sourcePosition,o=t.targetPosition,s=t.sourceHandlePosition,u=t.targetHandlePosition,c=e.getMaxConflictArea(i.clone(s),i.clone(u),[n,r]),h=c.minCoor,l=c.maxCoor,f=e.getTurnPointGroup(i.clone(s),i.clone(u),[n,r],h,l);return f=[a,s].concat(f).concat([u,o])}var i=n(1),a=10;r.prototype={getTurnPointGroup:function(t,e,n,r,a){function o(t){return!s.isCrossNode(t[0],t[1],n)}for(var s=this,u=[],c=i.clone(t),h=i.clone(e),l=[{source:c,target:[c[0],r.y]},{source:c,target:[c[0],a.y]},{source:c,target:[r.x,c[1]]},{source:c,target:[a.x,c[1]]}],f=[{source:h,target:[h[0],r.y]},{source:h,target:[h[0],a.y]},{source:h,target:[r.x,h[1]]},{source:h,target:[a.x,h[1]]}],d=l,g=f,p=0;p<d.length;p++)for(var v=0;v<g.length;v++){var m=d[p],y=g[v],x=m.source[0],b=m.source[1],_=m.target[0],w=m.target[1],M=y.source[0],S=y.source[1],k=y.target[0],A=y.target[1],C=(x-_)*(S-A)-(b-w)*(M-k);if(C){var T=((x*w-b*_)*(M-k)-(x-_)*(M*A-S*k))/C,E=((x*w-b*_)*(S-A)-(b-w)*(M*A-S*k))/C,P=[T,E];if(!s.isCrossNode(c,P,n)&&!s.isCrossNode(P,h,n))return[[T,E]]}}if(!s.isCrossNode(c,h,n)&&(s.isEqual(c,h,0)||s.isEqual(c,h,1)))return[c,h];var I=0,N=0;if(i.each(n,function(t){I=Math.max(I,t.width),N=Math.max(N,t.height)}),c[1]===h[1])return[[c[0],c[1]+.8*N],[h[0],h[1]+.8*N]];if(c[0]===h[0])return[[c[0]+.8*I,c[1]],[h[0]+.8*I,h[1]]];for(var B=c[0]<h[0]?c[0]:h[0],F=c[0]>h[0]?c[0]:h[0],O=c[1]<h[1]?c[1]:h[1],L=c[1]>h[1]?c[1]:h[1],D=[],R=1/0,z=B;z<F;z++){var G=[z,c[1]],j=[z,h[1]],U=[[c,G],[G,j],[j,h]].every(o);U&&D.push([G,j])}if(D.length){for(var Y=void 0,X=0;X<D.length;X++){var H=(B+F)/2,W=Math.min(R,Math.abs(H-D[X][0][0]));W!==R&&(Y=D[X],R=W)}return Y}for(var q=[],V=1/0,Z=O;Z<L;Z++){var $=[c[0],Z],Q=[h[0],Z],K=[[c,$],[$,Q],[Q,h]].every(o);K&&q.push([$,Q])}if(q.length){for(var J=void 0,tt=0;tt<q.length;tt++){var et=(O+L)/2,nt=Math.min(V,Math.abs(et-q[tt][0][1]));nt!==V&&(J=q[tt],V=nt)}return J}var rt=[c[0],a.y],it=[h[0],a.y],at=[c[0],r.y],ot=[h[0],r.y],st=[r.x,r.y],ut=[a.x,r.y],ct=[r.x,a.y],ht=[a.x,a.y];if(u=[[c,rt],[rt,it],[it,h]].every(o))return[rt,it];if(u=[[c,at],[at,ot],[ot,h]].every(o))return[at,ot];var lt=[rt,it,at,ot],ft=[st,ut,ct,ht],dt=s.loopFind(c,h,lt,ft,o);return dt?dt:(rt=[r.x,c[1]],it=[r.x,h[1]],at=[a.x,c[1]],ot=[a.x,h[1]],(u=[[c,rt],[rt,it],[it,h]].every(o))?[rt,it]:(u=[[c,at],[at,ot],[ot,h]].every(o))?[at,ot]:(lt=[rt,it,at,ot],(dt=s.loopFind(c,h,lt,ft,o))?dt:(rt=[r.x,c[1]],it=[h[0],a.y],at=[a.x,c[1]],ot=[h[0],r.y],lt=[rt,it,at,ot],(dt=s.loopFind(c,h,lt,ft,o))?dt:(rt=[c[0],a.y],it=[r.x,h[1]],at=[c[0],r.y],ot=[a.x,h[1]],lt=[rt,it,at,ot],dt=s.loopFind(c,h,lt,ft,o),dt?dt:void 0))))},loopFind:function(t,e,n,r,i){for(var a=this,o=0;o<n.length-1;o++)for(var s=1;s<n.length;s++)for(var u=0;u<r.length;u++)if((a.isEqual(t,n[o],0)||a.isEqual(t,n[o],1))&&(a.isEqual(e,n[s],0)||a.isEqual(e,n[s],1))&&(a.isEqual(n[o],r[u],0)||a.isEqual(n[o],r[u],1))&&(a.isEqual(n[s],r[u],0)||a.isEqual(n[s],r[u],1))){var c=[[t,n[o]],[n[o],r[u]],[r[u],n[s]],[n[s],e]].every(i);if(c)return[n[o],r[u],n[s]]}},getMaxConflictArea:function(t,e,n){function r(t){return t.x-a<=i&&t.x+t.width+a>=i&&(i=t.x-a),t.x-a<=o&&t.x+t.width+a>=o&&(o=t.x+t.width+a),t.y-a<=s&&t.y+t.height+a>=s&&(s=t.y-a),t.y-a<=u&&t.y+t.height+a>=u&&(u=t.y+t.height+a),t}for(var i=Math.min(t[0],e[0]),o=Math.max(e[0],t[0]),s=Math.min(t[1],e[1]),u=Math.max(e[1],t[1]),c=0;c<n.length;c++)n.map(r);return{minCoor:{x:i,y:s},maxCoor:{x:o,y:u}}},isEqual:function(t,e,n){return Math.abs(t[n]-e[n])<=1},isCrossNode:function(t,e,n){var r=this;return r.isEqual(t,e,0)?n.some(function(n){return n.x<=t[0]&&n.x+n.width>=t[0]&&(n.y>=t[1]&&n.y<=e[1]||n.y+n.height>=t[1]&&n.y+n.height<=e[1]||n.y<=t[1]&&n.y+n.height>=e[1]||n.y>=t[1]&&n.y+n.height<=e[1])}):r.isEqual(t,e,1)?n.some(function(n){return n.y<=t[1]&&n.y+n.height>=t[1]&&(n.x>=t[0]&&n.x<=e[0]||n.x+n.width>=t[0]&&n.x+n.width<=e[0]||n.x<=t[0]&&n.x+n.width>=e[0]||n.x>=t[0]&&n.x+n.width<=e[0])}):void 0}},t.exports=r},function(t,e,n){"use strict";function r(t,e){var n={};return n.arrow=e,t.color&&(n.stroke=t.color),t.size&&(n.lineWidth=t.size),a.mix({},l.edgeStyle,n,t.style)}function i(t,e,n){if(t.label){var r=void 0,i=void 0;try{r=n.getPoint(.5)}catch(t){}if(!r)return;i=a.isObject(t.label)?a.mix({},l.edgeLabelStyle,t.label,{x:r.x,y:r.y},t.labelStyle):a.mix({},l.edgeLabelStyle,{text:t.label,x:r.x,y:r.y},t.labelStyle);var o=u.drawLabel(e,i,l.zIndex.edgeLabel),s=o.getBBox(),c=s.maxX-s.minX,h=s.maxY-s.minY,f=c+2*d,g=h+2*d;e.addShape("rect",{attrs:a.mix({x:r.x-f/2,y:r.y-g/2,width:f,height:g},l.edgeLabelRectStyle),zIndex:l.zIndex.edgeLabelBackground})}}var a=n(1),o=n(2),s=n(25),u=n(40),c=n(85),h=n(187),l=n(11),f=o.Vector2,d=5,g={getEdgePath:function(t,e,n,r,i){return 2===e.length?h[t](e,r,i):"curve"===n?s.pointsToCurve(e):s.pointsToPolygon(e)},drawEdge:function(t,e,n,a,o){var s=r(e,a),u=g.getEdgePath(t,e.points,o,e.source,e.target);s.path=u;var c=n.addShape("path",{attrs:s,zIndex:l.zIndex.edge});return i(e,n,c),n.radixSort(),c},arrowTo:function(t,e,n,r,i,a,o){var s=new f(1,0),u=new f(a-r,o-i),c=u.angleTo(s,!0);return t.transform([["r",c],["t",e,n]]),t},snapPreciseAnchor:function(t,e){var n=e.getIntersectionByPath(t),r=c.getSnapAnchor(e,n);return r}};t.exports=g},function(t,e,n){"use strict";function r(t){return u.isObject(t.label)?u.mix({},c.nodeLabelStyle,t.label,{x:t.x,y:t.y}):u.mix({},c.nodeLabelStyle,{text:t.label,x:t.x,y:t.y})}function i(t,e){e.attr({y:e.attr("y")+t.attr("height")/2+d})}function a(t){var e=t.getBBox(),n=e.maxX-e.minX,r=e.maxY-e.minY,i=n+2*f[1],a=r+2*f[0];return[i,a]}function o(t,e,n){var i=void 0,o=void 0;return n=n?n:a,u.isNull(t.label)||(i=u.mix(r(t),t.labelStyle),o=l.drawLabel(e,i,c.zIndex.nodeLabel),t.size||(t.size=n(o))),t.size||(t.size=[g,g]),u.isNumber(t.size)&&(t.size=[t.size,t.size]),o}function s(t,e,n){var a={img:n},o=void 0;t.size||(t.size=g),a.width=u.isArray(t.size)?t.size[0]:t.size,a.height=u.isArray(t.size)?t.size[1]:t.size,a.x=t.x-a.width/2,a.y=t.y-a.height/2;var s=e.addShape("image",{attrs:a,zIndex:c.zIndex.node});if(t.label){var h=u.mix(r(t),t.labelStyle);h.textBaseline="top",o=l.drawLabel(e,h,c.zIndex.nodeLabel),i(s,o)}return s}var u=n(1),c=n(11),h=n(25),l=n(40),f=c.nodePadding,d=5,g=50,p={rect:function(t,e,n){o(t,e);var r=t.size[0],i=t.size[1],a=t.x-r/2,s=t.y-i/2,u=void 0;u=n.radius?h.getRectPath(a,s,r,i,n.radius):h.getRectPath(a,s,r,i);var c=e.addShape("path",{attrs:{path:u}});return c},circle:function(t,e){o(t,e,function(t){var e=t.getBBox(),n=e.maxX-e.minX+2*f[1],r=e.maxY-e.minY+2*f[0],i=void 0,a=void 0,o=void 0,s=(n+r/2)/2,u=Math.acos(n/2/s);return o=2*(Math.sin(u)*s),a=2*s,n<r&&(i=o,o=a,a=i),[a,o]});var n=t.size[0],r=t.size[1],i=e.addShape("path",{attrs:{path:h.getEllipsePath(t.x,t.y,n/2,r/2)}});return i},text:function(t,e){t.labelStyle&&!t.labelStyle.fill&&t.color&&(t.labelStyle.fill=t.color),t.color&&(t.labelStyle={fill:t.color}),t.size&&(u.isArray(t.size)&&(t.labelStyle={fontSize:Math.min(t.size[0],t.size[1])}),u.isNumber(t.size)&&(t.labelStyle={fontSize:t.size})),t.label||0===t.label||(t.label=" ");var n=o(t,e);return n},image:function(t,e){var n=t.shape,r=u.isArray(n)?n[1]:n;return s(t,e,r)},rhombus:function(t,e){o(t,e,function(t){var e=t.getBBox(),n=e.maxX-e.minX+2*f[1],r=e.maxY-e.minY+2*f[0],i=Math.sqrt(n/2*r/2),a=n+i,o=r+i;return[a,o]});var n=t.x,r=t.y,i=t.size[0],a=t.size[1],s=[{x:n,y:r-a/2},{x:n+i/2,y:r},{x:n,y:r+a/2},{x:n-i/2,y:r}],u=e.addShape("path",{attrs:{path:h.pointsToPolygon(s,!0)}});return u},html:function(t,e,n){if("auto"===t.size)return e.addShape("html",{attrs:u.mix({cx:t.x,cy:t.y,html:t.html},n),autoSize:!0});t.size||(t.size=[g,g]);var r=t.size[0],i=t.size[1],a=t.x-r/2,o=t.y-i/2;return e.addShape("html",{attrs:u.mix({x:a,y:o,width:r,height:i,html:t.html},n)})}};t.exports=p},function(t,e,n){"use strict";var r=n(3);r.clickActive=function(t){var e=void 0,n=void 0;t._on("itemclick",function(r){e=r.item,n=r.shape,n.get("clickActive")!==!1&&(t.clearAllActived(),t.setItemActived(e),t.refreshFront())})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.clickAddNode=function(t){i.addNode(t,"click")}},function(t,e,n){"use strict";var r=n(3);r.clickBlankClearActive=function(t){t._on("click",function(e){e.shape||(t.clearAllActived(),t.refreshFront())})}},function(t,e,n){"use strict";var r=n(3);r.clickNodeActive=function(t){var e=void 0,n=void 0;t._on("itemclick",function(r){e=r.item,n=r.shape,"node"===r.itemType&&n.get("clickActive")!==!1&&(t.clearAllActived(),t.setItemActived(e),t.refreshFront())})}},function(t,e,n){"use strict";var r=n(3);r.collapse=function(t){t._on("click",function(e){var n=e.shape;n&&n.hasClass("collapseButton")&&(t.fire("collapse",e),t.css({cursor:"default"}))}),t._on("collapse",function(e){var n=t.get("dataMap"),r=e.item,i=r.get("id");n[i].isCollapsed=!0,t.clearAllActived(),t.refreshFront(),t.reRender()})}},function(t,e,n){"use strict";var r=n(3),i=n(14),a=n(4);r.dragAddEdge=function(t){function e(e){var n=e.item,r=t.get("addingType"),i=t.get("addingModel");if(t.fire("beforedragaddedge",e),n&&"edge"===r&&t.isNode(n)&&e.cancel!==!0)return i.source=n.get("id"),i.target=n.get("id"),t.addItem("edge",i)}function n(t,e){if(e)return 1}function r(e,n){a.objectToValues(n).length>0?(t.updateItem(e,n),t.updateRollback(),t.clearAllActived(),t.setItemActived(e),t.draw(!1),t.endAdd(e)):(t.removeItem(e),t.refreshFront(),t.endAdd())}i.dragEdgeExtremePoint(t,e,n,r)}},function(t,e,n){"use strict";var r=n(3),i=n(26);r.dragBlankX=function(t){i(t,!0,!0,!1)}},function(t,e,n){"use strict";var r=n(3),i=n(26);r.dragBlankY=function(t){i(t,!0,!1)}},function(t,e,n){"use strict";var r=n(3),i=n(4);r.dragEdgeEndHideAnchor=function(t){t._on("dragedgeend",function(t){i.isNode(t.item)&&t.item.hideAnchor()})}},function(t,e,n){"use strict";var r=n(3),i=n(14),a=n(4);r.dragEdge=function(t){function e(e){var n=e.shape,r=void 0;if(n&&n.hasClass("control-point")&&(r=n.get("item"),t.isEdge(r)))return r}function n(t,e){var n=t.shape,r=void 0;if(e&&(r=n.get("pointIndex"),e.isExtremePoint(r)))return r}function r(e,n){a.objectToValues(n).length>0?(t.updateItem(e,n),t.updateRollback(),t.draw(!1)):t.refreshFront()}i.dragEdgeExtremePoint(t,e,n,r)}},function(t,e,n){"use strict";var r=n(3);r.dragHideEdges=function(t){var e=t.get("edgeGroup");t._on("dragstart",function(){e.hide(),t.draw(!1)}),t._on("dragend",function(){e.show(),t.draw(!1)}),t._on("dommouseleave",function(){e.show(),t.draw(!1)})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.dragHideTexts=function(t){t._on("dragstart",function(){i.hideTexts(t)}),t._on("dragend",function(){i.showTexts(t)}),t._on("dommouseleave",function(){i.showTexts(t)})}},function(t,e,n){"use strict";var r=n(3);r.dragNodeEndHideAnchor=function(t){t._on("dragnodeend",function(t){1===t.dragItems.length?t.node.showAnchor():t.node.hideAnchor()})}},function(t,e,n){"use strict";var r=n(3);r.dragNodeEndSetActive=function(t){t._on("dragnodeend",function(e){1===e.dragItems.length&&(t.clearAllActived(),t.setItemActived(e.dragItems[0]))})}},function(t,e,n){"use strict";var r=n(1),i=n(3),a=n(14);i.dragNode=function(t){var e=t.get("gridAssist"),n=e&&e.forceAlign,i=t.get("behaviourSignal"),o=[],s=null,u=!1,c=void 0,h=void 0,l=void 0,f=void 0,d=void 0,g=void 0,p=void 0;t._on("mousedown",function(e){l=e.shape,h=e.item,!t.isNode(h)||l&&l.hasClass("control-point")||l&&l.hasClass("anchor-point")||(s={x:e.x,y:e.y},h.isActived()?(c=t._getAllActived(),r.each(c,function(t){o.push(t)})):o.push(h))}),t._on("dragmove",function(e){r.isArray(o)&&0!==o.length&&(u=!0,i.draggingNode=!0,r.each(o,function(n){t.isNode(n)&&(p=n.getBBox(),g={x:(p.x+p.maxX)/2,y:(p.y+p.maxY)/2},n.showDelegation({x:g.x+e.x-s.x,y:g.y+e.y-s.y}))}),t.refreshFront())}),t._on("mouseup",function(l){r.isArray(o)&&0!==o.length&&(u&&(h=l.item,o=r.filter(o,function(e){return t.isInGraph(e)}),r.each(o,function(i){t.isNode(i)?(g=i.getPosition(),f={x:g.x+l.x-s.x,y:g.y+l.y-s.y},h!==i&&i&&!i.hasClass("preventToFront")&&t.toFront(i),n&&a.alignPoint(f,e.cell),i.hideDelegation()):(d=i.getControlPoints(),f={},d.length>2&&(r.each(d,function(t,r){0!==r&&r!==d.length-1&&(t.x=t.x+l.x-s.x,t.y=t.y+l.y-s.y,n&&a.alignPoint(t,e.cell))}),f={controlPoints:d})),t.updateItem(i,f),t.isNode(i)&&t.fire("dragnodeend",{dragItems:o,node:i})}),t.updateRollback(),t.draw(!1)),s=null,h=void 0,g=void 0,d=void 0,c=void 0,f=void 0,o=[],u=!1,i.draggingNode=void 0)})}},function(t,e,n){"use strict";var r=n(3);r.hoverAnchorSetActived=function(t){var e=void 0;t._on("mouseenter",function(n){e=n.shape,e&&e.hasClass("anchor-point")&&t.setAnchorActived(e)}),t._on("mouseleave",function(n){e=n.shape,e&&e.hasClass("anchor-point")&&t.setAnchorUnActived(e)})}},function(t,e,n){"use strict";var r=n(3);r.hoverNodeShowAnchor=function(t){var e=t.get("behaviourSignal"),n=void 0;t._on("itemmouseenter",function(r){"node"!==r.itemType||e.draggingNode||(n=setTimeout(function(){!t.destroyed&&t.showAnchor(r.item)},200))}),t._on("itemmouseleave",function(e){"node"===e.itemType&&(clearTimeout(n),!t.destroyed&&t.hideAnchor(e.item))})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.mouseupAddNode=function(t){i.addNode(t,"mouseup")}},function(t,e,n){"use strict";var r=n(3),i=n(11),a=n(4);r.multiSelect=function(t){var e=t.get("frontCanvasRootGroup"),n=t.get("behaviourSignal"),r=!1,o=[],s=void 0,u=void 0,c=void 0,h=void 0,l=void 0,f=void 0,d=void 0,g=void 0,p=void 0,v=void 0,m=void 0;t._on("mousedown",function(t){h=t.item,l=t.shape,h||f||l||(d={x:t.x,y:t.y},f=e.addShape("rect",{attrs:i.frameRectStyle}),n.frameSelecting=!0)}),t._on("dragmove",function(e){f&&(g=Math.min(d.x,e.x),p=Math.min(d.y,e.y),v=Math.max(d.x,e.x),m=Math.max(d.y,e.y),f.attr({x:g,y:p,width:v-g,height:m-p}),t.refreshFront())}),t._on("mouseup",function(){f&&(s=t.get("itemCache"),a.each(s,function(e){"node"===e.get("type")?(u=e.getBBox(),c=[{x:u.x,y:u.y},{x:u.x,y:u.maxY},{x:u.maxX,y:u.y},{x:u.maxX,y:u.maxY}]):c=e.getControlPoints(),a.each(c,function(n,i){if(r=a.isInRect(n,g,p,v,m),t.isNode(e)){if(r)return o.push(e),!1}else{if(!r)return!1;i===c.length-1&&o.push(e)}})}),t.clearAllActived(),t.setItemsActived(o),f.remove(!0),t.refreshFront(),n.frameSelecting=void 0,h=void 0,f=void 0,d=void 0,g=void 0,p=void 0,v=void 0,m=void 0,o=[])})}},function(t,e,n){"use strict";var r=n(3),i=n(14),a=n(4);r.resizeEdge=function(t){var e=t.get("gridAssist"),n=e&&e.forceAlign,r=void 0,o=void 0,s=void 0,u=void 0,c=void 0,h=void 0,l=void 0,f=void 0,d=void 0,g=void 0,p=void 0,v=void 0;t._on("click",function(e){r=e.item,o=t.getActived(),v=e.shape,!t.isEdge(r)||r!==o||v&&v.hasClass("control-point")||(r.addControlPoint({x:e.x,y:e.y}),c=r.getControlPoints(),t.updateItem(r,{controlPoints:c}),t.updateRollback(),t.refreshFront())}),t._on("mousedown",function(e){if(v=e.shape,v&&v.hasClass("control-point")){if(s=v.get("item"),!t.isEdge(s))return void(s=void 0);if(g=v.get("pointIndex"),s.isExtremePoint(g))return s=void 0,void(g=void 0);u=v.get("point"),c=s.getControlPoints(),h=c[g-1],l=c[g+1]}}),t._on("dragmove",function(e){t.isEdge(s)&&(r=e.item,p={x:e.x,y:e.y,controlPointIndex:g},a.isInSegment(h,l,p)?p.stroke="red":p.stroke="blue",s.showDelegation(p),t.refreshFront())}),t._on("mouseup",function(m){t.isEdge(s)&&(r=m.item,f={x:m.x,y:m.y},d={},s.hideDelegation(),a.isInSegment(h,l,f)?c.splice(g,1):0!==g&&g!==c.length-1&&(u.x=f.x,u.y=f.y,n&&i.alignPoint(u,e.cell),d.controlPoints=c),t.updateItem(s,d),t.updateRollback(),t.draw(!1),r=void 0,o=void 0,s=void 0,u=void 0,c=void 0,h=void 0,l=void 0,f=void 0,d=void 0,g=void 0,p=void 0,v=void 0)})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.resizeNode=function(t){var e=t.get("behaviourSignal"),n=!1,r=void 0,a=void 0,o=void 0,s=void 0,u=void 0,c=void 0,h=void 0;t._on("mousedown",function(t){r=t.shape,r&&r.hasClass("control-point")&&(u=r.get("item"),c=r.get("point"),h=r.get("pointIndex"))}),t._on("dragmove",function(r){t.isNode(u)&&(n=!0,e.resizingNode=!0,a={x:r.x,y:r.y},s=i.getControlInfo(a,h,c,u,"frontCanvas"),o=s.size,o[0]>5&&o[1]>5&&(u.showDelegation(s),t.refreshFront()))}),t._on("mouseup",function(l){t.isNode(u)&&(n&&(a={x:l.x,y:l.y},s=i.getControlInfo(a,h,c,u),o=s.size,o[0]>5&&o[1]>0&&(t.updateItem(u,s),t.updateRollback()),u.hideDelegation(),t.draw(!1)),e.resizingNode=void 0,r=void 0,a=void 0,o=void 0,s=void 0,u=void 0,c=void 0,n=!1,h=void 0)})}},function(t,e,n){"use strict";var r=n(3);r.shortcut=function(t){var e=!1;t._on("keydown",function(n){if(32===n.keyCode){if(e)return;e=!0,"drag"===t.get("mode")?t.changeMode("edit"):t.changeMode("drag"),e=!0}return n.metaKey&&67===n.keyCode?void t.copy():n.metaKey&&86===n.keyCode?void t.paste():n.metaKey&&n.altKey&&90===n.keyCode?void t.redo():n.metaKey&&90===n.keyCode?void t.updo():n.ctrlKey&&67===n.keyCode?void t.copy():n.ctrlKey&&86===n.keyCode?void t.paste():n.ctrlKey&&n.altKey&&90===n.keyCode?void t.redo():n.ctrlKey&&90===n.keyCode?void t.updo():8===n.keyCode||46===n.keyCode?void t.del():void 0}),t._on("keyup",function(){e=!1})}},function(t,e,n){"use strict";var r=n(3);r.spreadout=function(t){t._on("click",function(e){var n=e.shape;n&&n.hasClass("spreadoutButton")&&(t.fire("spreadout",e),t.css({cursor:"default"}))}),t._on("spreadout",function(e){var n=t.get("dataMap"),r=e.item,i=r.get("id");n[i].isCollapsed=!1,t.clearAllActived(),t.refreshFront(),t.reRender()})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.wheelZoomAutoTexts=function(t){t.on("afterrender",function(){i.autoTexts(t)}),t.on("wheelzoomend",function(){i.autoTexts(t)}),t.on("itemmouseenter",function(e){"node"===e.itemType&&(i.showText(e.item),t.draw(!1))}),t.on("itemmouseleave",function(e){if("node"===e.itemType){var n=e.item.getGroup();n.traverseChildren(function(t){var e=t.get("autoTextHide");"text"===t.type&&e!==!1&&t.hide()}),t.draw(!1)}})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.onWheelZoomEdges=function(t){var e=t.get("edgeGroup");i.onWheelZoom(t,function(){e.hide(),t.draw(!1)},function(){e.show(),t.draw(!1)})}},function(t,e,n){"use strict";var r=n(3),i=n(14);r.onWheelZoomTexts=function(t){i.onWheelZoom(t,function(){i.hideTexts(t)},function(){i.showTexts(t)})}},function(t,e,n){"use strict";var r=n(1),i=n(92),a=function(t){r.mix(this,t),this._init()};r.extend(a,i),r.augment(a,{step:0,margin:0,valueField:"..value",_init:function(){var t=this.edges.slice(0);this.edges=t,t.map(function(t){return t["..value"]=1,!0}),this._initNode()},_calculateStep:function(){var t=this,e=t.nodes,n=t.stepField;if(r.isNull(e[0][n])){var i=e.filter(function(t){return 0===t.inEdges.length});0===i.length&&(i=[e[0]]),t._setNodesStep(i)}e.map(function(e){return void 0===e.step&&(e.step=t.step,t.step=t.step+1,t._setNodesStep([e])),!0})},_setNodesStep:function(t){var e=this,n=e.step,i=e.stepField,a=t.filter(function(t){return r.isNull(t[i])});if(a.length>0){a.map(function(t){return t[i]=n,!0}),e.step=n+1;var o=e._getNextNodes(a);o.length>0&&e._setNodesStep(o)}},_getNextNodes:function(t){var e=this,n=e.targetField,i=e.stepField,a=[];return t.forEach(function(t){t.outEdges.length>0&&t.outEdges.forEach(function(o){var s=o[n];if(s!==t.id){var u=e._findObj(s);r.isNull(u[i])&&a.push(u)}})}),a},_calculateValue:function(){var t=this,e=t.nodes,n=t.valueField;e.map(function(t){return t[n]=1,!0})},_layoutByWeight:function(t){var e=t.length,n=1/e,r=this.y,i=this;t.map(function(t,e){return t.x=(e+.5)*n,t.y=void 0===t.y?r:t.y,i.onNodeChange(t.id,{x:t.x,y:t.y}),!0})},_layoutHighStep:function(t,e){var n=this,r=n.y,i=e===n.sourceField?n.targetField:n.sourceField;t.map(function(t){var a=n._getEdgeOfCurNode(t,i),o=0,s=void 0,u=0,c=e===n.sourceField?t.step-1:t.step+1;return a.forEach(function(t){s=n._findObj(t[e]),s.step===c&&(u++,o+=s.x)}),t.x=o/u,t.y=void 0===t.y?r:t.y,n.onNodeChange(t.id,{x:t.x,y:t.y}),!0})},_layoutNodes:function(t,e){var n=this;if(t.length>=2){var r=void 0;for(r=1;r<t.length;r++)n.y=r/(n.totalStep-1),n._layoutHighStep(t[r],e),t[r].sort(function(t,e){return t.x-e.x}),n._layoutByWeight(t[r])}},onNodeChange:function(){},getNodes:function(){var t=a.superclass.getNodes.call(this),e=this.stepField,n=this.valueField;return t.map(function(t){return delete t.inEdges,delete t.outEdges,delete t[e],delete t[n],!0}),t},start:function(){this.getNodes()}}),t.exports=a},function(t,e,n){"use strict";var r=n(1),i=n(219),a=function(t){r.mix(this,t),this._init()};r.augment(a,{graph:null,stiffness:200,repulsion:400,minEnergyThreshold:.01,damping:.3,_init:function(){var t=this,e={nodes:[],edges:[]};r.each(t.nodes,function(t){e.nodes.push(t.id)}),r.each(t.edges,function(t){e.edges.push([t.source,t.target])});var n=new i.Graph,a=new i.Layout.ForceDirected(n,this.stiffness,this.repulsion,this.damping,this.minEnergyThreshold),o=new i.Renderer(a,function(){},function(){},function(e,n){t.onNodeChange(e.id,n)},function(){t.onFinish()},function(){t.onStart()});n.loadJSON(e),this.layout=a,this.renderer=o},onNodeChange:function(){},onEdgeChange:function(){},onClear:function(){},onFinish:function(){},onStart:function(){},start:function(){this.renderer.start()}}),t.exports=a},function(t,e){"use strict";var n={},r=n.Vector=function(t,e){this.x=t,this.y=e},i=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},a=n.Graph=function(){this.nodeSet={},this.nodes=[],this.edges=[],this.adjacency={},this.nextNodeId=0,this.nextEdgeId=0,this.eventListeners=[]},o=n.Node=function(t,e){this.id=t,this.data=void 0!==e?e:{}},s=n.Edge=function(t,e,n,r){this.id=t,this.source=e,this.target=n,this.data=void 0!==r?r:{}};a.prototype.addNode=function(t){return t.id in this.nodeSet||this.nodes.push(t),this.nodeSet[t.id]=t,this.notify(),t},a.prototype.addNodes=function(){for(var t=0;t<arguments.length;t++){var e=arguments[t],n=new o(e,{label:e});this.addNode(n)}},a.prototype.addEdge=function(t){var e=!1;return this.edges.forEach(function(n){t.id===n.id&&(e=!0)}),e||this.edges.push(t),t.source.id in this.adjacency||(this.adjacency[t.source.id]={}),t.target.id in this.adjacency[t.source.id]||(this.adjacency[t.source.id][t.target.id]=[]),e=!1,this.adjacency[t.source.id][t.target.id].forEach(function(n){t.id===n.id&&(e=!0)}),e||this.adjacency[t.source.id][t.target.id].push(t),this.notify(),t},a.prototype.addEdges=function(){for(var t=0;t<arguments.length;t++){var e=arguments[t],n=this.nodeSet[e[0]];if(void 0===n)throw new TypeError("invalid node name: "+e[0]);var r=this.nodeSet[e[1]];if(void 0===r)throw new TypeError("invalid node name: "+e[1]);var i=e[2];this.newEdge(n,r,i)}},a.prototype.newNode=function(t){var e=new o(this.nextNodeId++,t);return this.addNode(e),e},a.prototype.newEdge=function(t,e,n){var r=new s(this.nextEdgeId++,t,e,n);return this.addEdge(r),r},a.prototype.loadJSON=function(t){("string"==typeof t||t instanceof String)&&(t=JSON.parse(t)),("nodes"in t||"edges"in t)&&(this.addNodes.apply(this,t.nodes),this.addEdges.apply(this,t.edges))},a.prototype.getEdges=function(t,e){return t.id in this.adjacency&&e.id in this.adjacency[t.id]?this.adjacency[t.id][e.id]:[]},a.prototype.removeNode=function(t){t.id in this.nodeSet&&delete this.nodeSet[t.id];for(var e=this.nodes.length-1;e>=0;e--)this.nodes[e].id===t.id&&this.nodes.splice(e,1);this.detachNode(t)},a.prototype.detachNode=function(t){var e=this.edges.slice();e.forEach(function(e){e.source.id!==t.id&&e.target.id!==t.id||this.removeEdge(e)},this),this.notify()},a.prototype.removeEdge=function(t){for(var e=this.edges.length-1;e>=0;e--)this.edges[e].id===t.id&&this.edges.splice(e,1);for(var n in this.adjacency){for(var r in this.adjacency[n]){for(var a=this.adjacency[n][r],o=a.length-1;o>=0;o--)this.adjacency[n][r][o].id===t.id&&this.adjacency[n][r].splice(o,1);0===this.adjacency[n][r].length&&delete this.adjacency[n][r]}i(this.adjacency[n])&&delete this.adjacency[n]}this.notify()},a.prototype.merge=function(t){var e=[];t.nodes.forEach(function(t){e.push(this.addNode(new o(t.id,t.data)))},this),t.edges.forEach(function(t){var n=e[t.from],r=e[t.to],i=void 0;i=t.directed?i=t.type+"-"+n.id+"-"+r.id:n.id<r.id?t.type+"-"+n.id+"-"+r.id:t.type+"-"+r.id+"-"+n.id;var a=this.addEdge(new s(i,n,r,t.data));a.data.type=t.type},this)},a.prototype.filterNodes=function(t){var e=this.nodes.slice();e.forEach(function(e){t(e)||this.removeNode(e)},this)},a.prototype.filterEdges=function(t){var e=this.edges.slice();e.forEach(function(e){t(e)||this.removeEdge(e)},this)},a.prototype.addGraphListener=function(t){this.eventListeners.push(t)},a.prototype.notify=function(){this.eventListeners.forEach(function(t){t.graphChanged()})};var u=n.Layout={};u.ForceDirected=function(t,e,n,r,i){this.graph=t,this.stiffness=e,this.repulsion=n,this.damping=r,this.minEnergyThreshold=i||.01,this.nodePoints={},this.edgeSprings={}},u.ForceDirected.prototype.point=function(t){if(!(t.id in this.nodePoints)){var e=void 0!==t.data.mass?t.data.mass:1;this.nodePoints[t.id]=new u.ForceDirected.Point(r.random(),e)}return this.nodePoints[t.id]},u.ForceDirected.prototype.spring=function(t){if(!(t.id in this.edgeSprings)){var e=void 0!==t.data.length?t.data.length:1,n=!1,r=this.graph.getEdges(t.source,t.target);if(r.forEach(function(t){n===!1&&t.id in this.edgeSprings&&(n=this.edgeSprings[t.id])},this),n!==!1)return new u.ForceDirected.Spring(n.point1,n.point2,0,0);if(r.forEach(function(t){n===!1&&t.id in this.edgeSprings&&(n=this.edgeSprings[t.id])},this),n!==!1)return new u.ForceDirected.Spring(n.point2,n.point1,0,0);this.edgeSprings[t.id]=new u.ForceDirected.Spring(this.point(t.source),this.point(t.target),e,this.stiffness)}return this.edgeSprings[t.id]},u.ForceDirected.prototype.eachNode=function(t){var e=this;this.graph.nodes.forEach(function(n){t.call(e,n,e.point(n))})},u.ForceDirected.prototype.eachEdge=function(t){var e=this;this.graph.edges.forEach(function(n){t.call(e,n,e.spring(n))})},u.ForceDirected.prototype.eachSpring=function(t){var e=this;this.graph.edges.forEach(function(n){t.call(e,e.spring(n))})},u.ForceDirected.prototype.applyCoulombsLaw=function(){this.eachNode(function(t,e){this.eachNode(function(t,n){if(e!==n){var r=e.p.subtract(n.p),i=r.magnitude()+.1,a=r.normalise();e.applyForce(a.multiply(this.repulsion).divide(i*i*.5)),n.applyForce(a.multiply(this.repulsion).divide(i*i*-.5))}})})},u.ForceDirected.prototype.applyHookesLaw=function(){this.eachSpring(function(t){var e=t.point2.p.subtract(t.point1.p),n=t.length-e.magnitude(),r=e.normalise();t.point1.applyForce(r.multiply(t.k*n*-.5)),t.point2.applyForce(r.multiply(t.k*n*.5))})},u.ForceDirected.prototype.attractToCentre=function(){this.eachNode(function(t,e){var n=e.p.multiply(-1);e.applyForce(n.multiply(this.repulsion/50))})},u.ForceDirected.prototype.updateVelocity=function(t){this.eachNode(function(e,n){n.v=n.v.add(n.a.multiply(t)).multiply(this.damping),n.a=new r(0,0)})},u.ForceDirected.prototype.updatePosition=function(t){this.eachNode(function(e,n){n.p=n.p.add(n.v.multiply(t))})},u.ForceDirected.prototype.totalEnergy=function(){var t=0;return this.eachNode(function(e,n){var r=n.v.magnitude();t+=.5*n.m*r*r}),t};var c=function(t,e){return function(){return t.apply(e,arguments)}};n.requestAnimationFrame=c(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,10)},void 0),u.ForceDirected.prototype.start=function(t,e,r){var i=this;this._started||(this._started=!0,this._stop=!1,void 0!==r&&r(),n.requestAnimationFrame(function r(){i.tick(.03),void 0!==t&&t(),i._stop||i.totalEnergy()<i.minEnergyThreshold?(i._started=!1,void 0!==e&&e()):n.requestAnimationFrame(r)}))},u.ForceDirected.prototype.stop=function(){this._stop=!0},u.ForceDirected.prototype.tick=function(t){this.applyCoulombsLaw(),this.applyHookesLaw(),this.attractToCentre(),this.updateVelocity(t),this.updatePosition(t)},u.ForceDirected.prototype.nearest=function(t){var e={node:null,point:null,distance:null},n=this;return this.graph.nodes.forEach(function(r){var i=n.point(r),a=i.p.subtract(t).magnitude();(null===e.distance||a<e.distance)&&(e={node:r,point:i,distance:a})}),e},u.ForceDirected.prototype.getBoundingBox=function(){var t=new r(-2,-2),e=new r(2,2);this.eachNode(function(n,r){r.p.x<t.x&&(t.x=r.p.x),r.p.y<t.y&&(t.y=r.p.y),r.p.x>e.x&&(e.x=r.p.x),r.p.y>e.y&&(e.y=r.p.y)});var n=e.subtract(t).multiply(.07);return{bottomleft:t.subtract(n),topright:e.add(n)}},r.random=function(){return new r(10*(Math.random()-.5),10*(Math.random()-.5))},r.prototype.add=function(t){return new r(this.x+t.x,this.y+t.y)},r.prototype.subtract=function(t){return new r(this.x-t.x,this.y-t.y)},r.prototype.multiply=function(t){return new r(this.x*t,this.y*t)},r.prototype.divide=function(t){return new r(this.x/t||0,this.y/t||0)},r.prototype.magnitude=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.normal=function(){return new r(-this.y,this.x)},r.prototype.normalise=function(){return this.divide(this.magnitude())},u.ForceDirected.Point=function(t,e){this.p=t,this.m=e,this.v=new r(0,0),this.a=new r(0,0)},u.ForceDirected.Point.prototype.applyForce=function(t){this.a=this.a.add(t.divide(this.m))},u.ForceDirected.Spring=function(t,e,n,r){this.point1=t,this.point2=e,this.length=n,this.k=r};var h=n.Renderer=function(t,e,n,r,i,a){this.layout=t,this.clear=e,this.drawEdge=n,this.drawNode=r,this.onRenderStop=i,this.onRenderStart=a,this.layout.graph.addGraphListener(this)};h.prototype.graphChanged=function(){this.start()},h.prototype.start=function(){var t=this;this.layout.start(function(){t.clear(),t.layout.eachEdge(function(e,n){t.drawEdge(e,n.point1.p,n.point2.p)}),t.layout.eachNode(function(e,n){t.drawNode(e,n.p)})},this.onRenderStop,this.onRenderStart)},h.prototype.stop=function(){this.layout.stop()},t.exports=n},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");
14}function r(t,e,n){n?(e.x=t.x,e.y=t.y):(e.x=t.y,e.y=t.x),t.children.forEach(function(t,i){r(t,e.children[i],n)})}var i=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n(this,t);var i=this;i.x=i.y=0,i.leftChild=i.rightChild=null,i.height=e||0,i.children=r},a={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};t.exports=function(t){function e(t){if(!t)return null;t.width=0,t.depth&&t.depth>u&&(u=t.depth);var n=t.children,r=n.length,a=new i(t.height,[]);return n.forEach(function(t,n){var i=e(t);a.children.push(i),0===n&&(a.leftChild=i),n===r-1&&(a.rightChild=i)}),a.originNode=t,a.isLeaf=t.isLeaf(),a}function n(t){if(t.isLeaf||0===t.children.length)t.drawingDepth=u;else{var e=t.children.map(function(t){return n(t)}),r=Math.min.apply(null,e);t.drawingDepth=r-1}return t.drawingDepth}function o(t){t.x=t.drawingDepth*s.rankSep,t.isLeaf?(t.y=0,c&&(t.y=c.y+c.height+s.nodeSep,t.originNode.parent!==c.originNode.parent&&(t.y+=s.subTreeSep)),c=t):(t.children.forEach(function(t){o(t)}),t.y=(t.leftChild.y+t.rightChild.y)/2)}var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s=Object.assign({},a,s);var u=0,c=void 0,h=e(t);return n(h),o(h),r(h,t,s.isHorizontal),t}},function(t,e){"use strict";function n(t,e,n){t.x+=n*t.depth,t.y=e?e.y+e.height:0}var r=20;t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=null;t.eachNode(function(t){n(t,i,e),i=t})}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},u=n(21),c=n(93),h=n(42),l=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),o(e,[{key:"execute",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_prepareRoot",this).call(this);var t=this;return t.options.forceAlign="R",h(t.rootNode,t.options,c)}}]),e}(u);t.exports=l},function(t,e){"use strict";t.exports={T:{x:.5,y:0},R:{x:1,y:.5},B:{x:.5,y:1},L:{x:0,y:.5},C:null}},function(t,e){"use strict";t.exports=["LR","RL","TB","BT","H","V"]},function(t,e){"use strict";t.exports=["LR","RL","H","L","R"]},function(t,e){"use strict";t.exports=18},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},u=n(21),c=n(220),h=n(42),l=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),o(e,[{key:"execute",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_prepareRoot",this).call(this);var t=this,n=t.rootNode,r=t.options;return n.width=0,h(n,r,c),n}}]),e}(u);t.exports=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},u=n(21),c=n(221),h=n(95),l=n(94),f=["LR","RL","H"],d=f[0],g=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),o(e,[{key:"execute",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_prepareRoot",this).call(this);var t=this,n=t.rootNode,r=t.options;r.isHorizontal=!0;var i=r.indent;t.options.forceAlign="R";var a=r.direction||d;if(a&&f.indexOf(a)===-1)throw new TypeError("Invalid direction: "+a);if(a===f[0])c(n,i),h(n,"L","L",r);else if(a===f[1])c(n,i),n.right2left(),h(n,"R","R",r);else if(a===f[2]){var o=l(n,r),u=o.left,g=o.right;c(u,i),u.right2left(),h(u,"R","R",r),c(g,i),h(g,"L","L",r);var p=u.getBoundingBox();g.translate(p.width,0),n.x=g.x-n.width/2,h(n,"B","B",r,!0)}return n.eachNode(function(t){var e=t.data;e.x=t.x+t.width/2+t.hgap,e.y=t.y+t.height/2+t.vgap,e.align=t.align,e.inAnchor=t.inAnchor?[t.inAnchor.x,t.inAnchor.y]:null,e.outAnchor=t.outAnchor?[t.outAnchor.x,t.outAnchor.y]:null}),n}}]),e}(u);t.exports=g},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},u=n(43),c=n(21),h=n(93),l=n(42),f={nodeSize:20,nodeSep:20,rankSep:200},d=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),o(e,[{key:"execute",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_prepareRoot",this).call(this);var t=this,n=Object.assign({},f,t.options),r=n.nodeSize||f.nodeSize,i=n.nodeSep||f.nodeSep,a=n.rankSep||f.rankSep;t.rootNode=new u(t.root,Object.assign(n,{getWidth:function(){return r},getHeight:function(){return r},getHGap:function(){return a},getVGap:function(){return i}}));var o=t.rootNode;return l(o,n,h),o}}]),e}(c);t.exports=d},function(t,e){"use strict";var n={R:"L",L:"R",T:"B",B:"T"};t.exports=function(t){return n[t]}},function(t,e){"use strict";t.exports=function(t,e,n){if(!(e>=n)){var r=t.splice(e,1)[0];t.splice(n,0,r)}}},function(t,e){"use strict";t.exports=function(t,e,n){if(!(e<=n)){var r=t.splice(e,1)[0];t.splice(n-1,0,r)}}},function(t,e,n){"use strict";var r=n(225);t.exports=function(t){return r.indexOf(t)>-1}},function(t,e,n){"use strict";n(86),n(191),n(194),n(192),n(208),n(193),n(196),n(88),n(197),n(198),n(26),n(200),n(199),n(201),n(202),n(205),n(203),n(206),n(207),n(209),n(210),n(211),n(212),n(89),n(215),n(216),n(204),n(87),n(214)},function(t,e,n){"use strict";var r=n(1),i=n(19),a=i.Util,o={max:5,current:0,cache:[]},s={nodes:[],edges:[]},u=function(){};u.ATTRS={clipboard:!1,rollback:!1},r.augment(u,{_initEditor:function(){var t=this.get("rollback"),e=this.get("clipboard");t&&(r.isObject(t)?this.set("rollback",r.mix({},o,t)):this.set("rollback",r.clone(o))),e&&this.set("clipboard",r.clone(s))},_changeData:function(t,e){this._clearInner(),this._initData(),this.source(t,e),this.render(!1)},updateRollback:function(){var t=this.get("rollback");if(r.isObject(t)){var e=t.current,n=t.cache,i=t.max,a=n.length,o=this.save().source;n.splice(0,e,o),a>i&&n.splice(i,a-i+1),t.current=0}},copy:function(){var t=this,e=t.getAllActived(),n=t.get("clipboard"),i={},o=void 0,s=void 0,u=void 0;n.nodes=[],n.edges=[],r.each(e,function(c){o=r.mix(!0,{},c.get("model"),{id:a.guid()}),i[c.get("model").id]=o.id,t.isNode(c)?(o.x+=10,o.y-=10,n.nodes.push(o)):(s=c.get("model").target,u=c.get("model").source,s=t.find(s),u=t.find(u),e.indexOf(s)!==-1&&e.indexOf(u)!==-1&&(o.controlPoints&&r.each(o.controlPoints,function(t,e){o.controlPoints[e]={x:t.x+=10,y:t.y-=10}}),o.target=i[o.target],o.source=i[o.source],n.edges.push(o)))}),this.refresh()},paste:function(){var t=this,e=t.get("clipboard"),n=t._addNodes(e.nodes);n=n.concat(t._addEdges(e.edges)),t.clearAllActived(),t.setItemsActived(n),e.nodes=[],e.edges=[],t.updateRollback(),this.refresh()},del:function(){var t=this,e=t.getAllActived();r.each(e,function(e){t.removeItem(e)}),this.updateRollback(),this.refresh()},undo:function(){var t=this.get("rollback");if(r.isObject(t)){var e=t.cache,n=t.current,i=n+1,a=e[i];0!==e.length&&a&&(a=r.clone(a),this._changeData(a.nodes,a.edges),t.current=i,this.refresh())}},updo:function(){this.undo()},redo:function(){var t=this.get("rollback");if(r.isObject(t)){var e=t.cache,n=t.current,i=n-1,a=e[i];0!==e.length&&a&&(a=r.clone(a),this._changeData(a.nodes,a.edges),t.current=i,this.refresh())}},beginAdd:function(t,e){this.changeMode("add"),this.set("addingType",t),this.set("addingModel",e)},endAdd:function(t){this.changeMode("edit"),this.set("addingType",""),this.set("addingModel",null),t&&this.fire("afteradd",{item:t})}}),t.exports=u},function(t,e,n){"use strict";var r=n(237);n(234),r.Mode={default:["dragNode","dragEdge","dragBlank","clickBlankClearActive","resizeEdge","clickActive","resizeNode","wheelZoom","dragNodeEndSetActive","clickFocus"],edit:["dragNode","dragEdge","clickBlankClearActive","resizeEdge","clickActive","dragNodeEndSetActive","multiSelect","resizeNode","shortcut","wheelZoom","hoverNodeShowAnchor","hoverAnchorSetActived","dragEdgeEndHideAnchor","dragNodeEndHideAnchor","clickFocus"],drag:["shortcut","dragCanvas","wheelZoom","clickFocus"],add:["clickAddNode","dragAddEdge","hoverAnchorSetActived","hoverNodeShowAnchor","clickFocus"],complicated:["dragCanvas","wheelZoom","dragHideEdges","wheelZoomHideEdges","clickFocus"],analysis:["dragCanvas","wheelZoom","dragHideEdges","wheelZoomAutoTexts","wheelZoomHideEdges","wheelZoomHideTexts","clickFocus"],none:[]},t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(235),a=n(19),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={defaultNodeShape:"rect",layoutEdgeFilter:null,layoutNodeFilter:null},r.extend(o,a),r.mixin(o,[i]),r.augment(o,{_initCfg:function(){var t=this.get("mode");"analysis"===t&&(this.set("useAnchor",!1),this.set("useFreezeSizeGroup",!0),this.set("useEdgeSortGroup",!1),this.set("grid",null)),"edit"===t&&(this.set("wheelScaleLimit",[.5,4]),this.set("rollback",!0),this.set("clipboard",!0)),o.superclass._initCfg.call(this)},_readSource:function(t){this.source(t.nodes,t.edges)},source:function(t,e){r.isObject(t)?(this.set("nodes",t.nodes),this.set("edges",t.edges)):(this.set("nodes",t),this.set("edges",e))},_saveSource:function(){function t(t,e){r.each(t.get("children"),function(t){var n=t.get("id"),r=s[n];e.push(r.get("model"))})}var e=this,n=[],i=[],a=e.get("nodeGroup"),o=e.get("edgeGroup"),s=e.get("itemCache");return t(a,n),t(o,i),r.clone({nodes:n,edges:i})},getLayoutNodes:function(){var t=this.getNodes(function(t){return t.getModel()}),e=this.get("layoutNodeFilter");return e?r.filter(t,e):t},getLayoutEdges:function(){var t=this.getEdges(function(t){return t.getModel()}),e=this.get("layoutEdgeFilter");return e?r.filter(t,e):t},layout:function t(){var t=this.get("layout"),e=this.getLayoutNodes(),n=this.getLayoutEdges();r.isObject(t)?(t.nodes=e,t.edges=n,t.graphHeight=this.get("height"),t.graphWidth=this.get("width"),t.execute()):r.isFunction(t)&&t(e,n),this.updateNodesPosition()},changeLayout:function(t){this.set("layout",t),this.layout()},render:function(t){void 0===t&&(t=this.get("rollback")),o.superclass.render.call(this),t!==!1&&this.updateRollback()},add:function(t,e){var n=this,r=void 0;return"node"===t?r=n._addNodes([e]):"edge"===t&&(r=n._addEdges([e])),this.draw(),r[0]},update:function(t,e){this.updateItem(t,e),this.draw()},remove:function(t){this.removeItem(t),this.draw()}}),t.exports=o},function(t,e,n){"use strict";var r=n(80),i={g6:!0,version:"1.2.5",page_type:"syslog"};setTimeout(function(){if(r.tracking){var t=new r;t.log(i)}},100),t.exports=i},function(t,e,n){"use strict";n(88),n(195),n(213),n(86),n(89)},function(t,e,n){"use strict";var r=n(19),i=n(241);n(239),i.Mode={default:["dragBlank","collapse","spreadout","buttonPointer","wheelZoom","clickFocus"],none:[]},r.registNode("tree-node",{style:function(){return{fillOpacity:1}}},"rect"),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(90),a=n(34),o=n(242),s=n(11),u=n(19),c=a.Util,h=u.Util,l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={layoutFn:i.CompactBoxTree,layoutCfg:{direction:"LR",getHGap:function(){return 40},getVGap:function(){return 10}},layout:null,grid:null,data:null,dataMap:null,showButton:!0,defaultNodeShape:"tree-node",animate:!0},r.extend(l,u),r.augment(l,{_readSource:function(t){this.source(t)},_saveSource:function(){var t=this.get("data"),e=o.clone(t,{parent:!0});return e},_createMap:function(t){var e={};return o.traverseTree(t,function(n,r){n.id||(n.id=h.guid()),r?n.parent=r:t.root=!0,e[n.id]=n}),e},layout:function t(){var t=this.get("layout"),e=this.get("data");e&&(r.isObject(t)?t.execute():r.isFunction(t)&&t(e),this.updateNodesPosition())},source:function(t){if(t){var e=this._createMap(t),n=this.get("layout"),i=void 0,a=void 0;r.isObject(n)?(n.root=t,i=n.getNodes(),a=n.getEdges()):(i=[],a=[],o.traverseTree(t,function(t,e){i.push(t),e&&a.push({id:e.id+"-"+t.id,source:e.id,target:t.id})},function(t){return t.isCollapsed})),this.set("dataMap",e),this.set("nodes",i),this.set("edges",a)}this.set("data",t)},reRender:function(){var t=this.get("data");this.clearAllActived(),this.refreshFront(),this._clearInner(),this._initData(),this.source(t),this._drawInner(),this.draw()},enterAnimate:function(t,e,n){var r=h.getBBox(t,t),i=r.centerX,a=r.centerY,s=t.get("shapeCfg"),u=s.origin,l=void 0;l="node"===t.get("type")?o.getButtonPoint(u,e,i,a):o.getButtonPoint(n[u.target].model,e,i,a),c.scaleIn(t,l.x,l.y,i,a)},leaveAnimate:function(t,e,n){var r=h.getBBox(t,t),i=r.centerX,a=r.centerY,s=t.get("shapeCfg"),u=s.origin,l=void 0;l="node"===t.get("type")?o.getButtonPoint(u,n,i,a):o.getButtonPoint(e[u.target].model,n,i,a),c.scaleOut(t,l.x,l.y)},beforeNodeDraw:function(t){var e=this,n=t.getShapeCfg(),i=e.get("layout");r.isObject(i)&&(n.direction=i.options.direction),t.addChild=function(n){return e.add(t.get("id"),n)}},afterNodeDraw:function(t){var e=this.get("showButton"),n=t.get("group"),r=t.getShapeCfg(),i=t.getKeyShape(),a=t.get("shapeObj"),u=r.origin,c=i.getBBox(),l=u.inAnchor,f=u.outAnchor,d=void 0;if(l){a.getAnchorPoints=function(){return[l,f]};var g=t.calculateAnchorPoints(c);if(!u.root&&g){switch(d=h.getpointInRectQuadrant(c,g[1])){case 0:r.buttonX=g[1].x,r.buttonY=g[1].y-s.treeButtonRadius;break;case 1:r.buttonX=g[1].x+s.treeButtonRadius,r.buttonY=g[1].y;break;case 2:r.buttonX=g[1].x,r.buttonY=g[1].y+s.treeButtonRadius;break;case 3:r.buttonX=g[1].x-s.treeButtonRadius,r.buttonY=g[1].y;break;default:r.buttonX=g[1].x,r.buttonY=g[1].y}if(u.isCollapsed?r.buttonType="plus":r.buttonType="minus",!e)return n.set("buttonX",(c.minX+c.maxX)/2),void n.set("buttonY",(c.minY+c.maxY)/2);u.children&&0!==u.children.length&&o.drawButton(r,n),n.set("buttonX",r.buttonX),n.set("buttonY",r.buttonY)}}},changeLayout:function(t){this.set("layout",t),this.reRender()},add:function(t,e){var n=this.get("dataMap"),i=n[t],a=e.id;return a||(a=r.guid(),e.id=a),r.isArray(i.children)?i.children.push(e):i.children=[e],this.reRender(),this.find(a)},remove:function(t){var e=this.get("dataMap"),n=void 0;r.isString(t)&&(t=e[t]);var i=t.parent;return i?(n=i.children,i.children=r.filter(n,function(e){return t!==e})):this.source({}),this.reRender(),this},update:function(t,e){return l.superclass.updateItem.call(this,t,e),this.reRender(),t},_checkData:function(t){return t&&r.isObject(t)&&h.objectToValues(t).length>0}}),t.exports=l},function(t,e,n){"use strict";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(1),a=n(19),o=n(11),s=a.Util,u={traverseTree:function(t,e,n,r){var a=t.children;e(t,r),n&&n(t)||a&&i.each(a,function(r){u.traverseTree(r,e,n,t)})},getButtonPoint:function(t,e,n,r){for(var i=t.parent,a=void 0;t&&i&&!e[i.id];)i=i.parent;return i?(a=e[i.id].origin,s.applyPoint({x:a.get("buttonX"),y:a.get("buttonY")},a)):{x:n,y:r}},clone:function(t,e){var n=void 0;if(i.isArray(t)){n=[];for(var a=0,o=t.length;a<o;a++)"object"===r(t[a])&&null!==t[a]?n[a]=u.clone(t[a],e):n[a]=t[a]}else{n={};for(var s in t)e[s]||("object"===r(t[s])&&null!==t[s]?n[s]=u.clone(t[s],e):n[s]=t[s])}return n},drawButton:function(t,e){"plus"===t.buttonType?u.drawspreadoutButton(t.buttonX,t.buttonY,o.treeButtonRadius,o.treeButtonPadding,e):u.drawcollapseButton(t.buttonX,t.buttonY,o.treeButtonRadius,o.treeButtonPadding,e)},drawspreadoutButton:function(t,e,n,r,a){var s=n-r,u=a.addShape("path",{attrs:i.mix({},{path:[["M",0,0-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"],["M",0-s,0],["L",0+s,0],["M",0,0-s],["L",0,0+s]]},o.treeButtonStyle),clickActive:!1,class:"spreadoutButton"});return u.translate(t,e),u},drawcollapseButton:function(t,e,n,r,a){var s=n-r,u=a.addShape("path",{attrs:i.mix({},{path:[["M",0,0-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"],["M",0-s,0],["L",0+s,0]]},o.treeButtonStyle),clickActive:!1,class:"collapseButton"});return u.translate(t,e),u}};t.exports=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(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}var a=n(6),o=n(46),s=i(o),u=n(269),c=n(270),h=r(c),l=n(16),f=r(l),d="#199CFB",g="#199CFB",p=function t(e,n,r,i,o){var s=a.Util.mix({itemType:e,dim:n,channel:r,range:i},o);t.superclass.constructor.call(this,s)};p.ATTRS={itemType:null,dim:null,range:null,channel:null,scaleCfg:{},legendCfg:{},nice:!0},a.Util.extend(p,f.default),a.Util.augment(p,{init:function(){var t=this,e=this.get("graph");e.on("beforerender",function(){t._createScale(),t._mapping(),t.get("legendCfg")&&t._createLegend()})},_trainCategoryScale:function(t){var e=this.get("dim"),n=this.get("graph"),r=n.get(t+"s"),i={},a=[];return r.forEach(function(t){i[t[e]]||(i[t[e]]=!0,a.push(t[e]))}),a},_trainNumberScale:function(t){var e=this.get("dim"),n=this.get("graph"),r=n.get(t+"s"),i=[1/0,-(1/0)];return r.forEach(function(t){i[0]>t[e]&&(i[0]=t[e]),i[1]<t[e]&&(i[1]=t[e])}),i},_getScaleType:function(){var t=this.get("itemType"),e=this.get("dim"),n=this.get("graph"),r=n.get(t+"s"),i=this.get("scaleCfg");return i.type||(a.Util.isNumber(r[0][e])?i.type="linear":i.type="ordinal"),a.Util.ucfirst(i.type)},_createScale:function(){var t=this.get("itemType"),e=this.get("scaleCfg"),n=this._getScaleType(),r=new s["scale"+n],i=this.get("nice"),o=this.get("range"),u=void 0;u="Ordinal"===n?this._trainCategoryScale(t,r):this._trainNumberScale(t,r);var c=o.length,h=u.length;if(c!==h){var l=(u[1]-u[0])/(c-1);o.forEach(function(t,e){u[e]=u[0]+e*l})}u[0]===u[1]&&(u[0]>0?u[0]=0:u[0]<0?u[1]=0:u[0]=-1),r.range(o),r.domain(u),i!==!1&&r.nice&&r.nice(),a.Util.isFunction(e.callBack)&&e.callBack(r,u),this.set("scale",r)},_getLegend:function(){var t=this.get("channel"),e=this.get("scale"),n=this.get("itemType"),r="node"===n?"circle":"line",i=this.get("legendCfg"),o=i.callback,s=h.default["legend"+a.Util.ucfirst(t)]();if("size"===t)if("node"===n){var u=e.copy();u.range([4,16]),s.scale(u).shape(r).shapePadding(8)}else{var c=e.copy();c.range([2,16]),s.scale(c).shape(r).shapePadding(8)}else"node"===n?s.scale(e).shape(r).shapePadding(8).shapeRadius(5):s.scale(e).shape(r);return a.Util.isFunction(o)&&o(s),s},_createLegend:function(){var t=10,e=this.get("channel"),n=this.get("legendCfg"),r=this.get("graph"),i=r.get("width"),o=r.get("height"),s=n.position?n.position:"br",c=r.get("graphContainer"),h=n.marginTop?n.marginTop:0,l=n.marginLeft?n.marginLeft:0,f=n.marginBottom?n.marginBottom:0,p=n.marginRight?n.marginRight:0,v=this._getLegend(),m=(0,u.select)(c).append("svg").style("position","absolute"),y=m.call(v).select(".legendCells"),x=m.call(v).select(".legendTitle"),b=y.selectAll(".swatch"),_=y.node(),w=_.getBBox(),M=a.Util.getNineBoxPosition(s,{x:0,y:0,width:i,height:o},w.width+2*t,w.height+2*t,[h+t,p+t,f+t,l+t]);if(x&&x.attr("font-size","14px"),"size"===e){var S=n.fill?n.fill:d,k=n.fill?n.fill:g;b.attr("fill",S),b.attr("stroke",k)}m.style("overflow","visible").style("padding",t+"px").style("top",M.y+"px").style("left",M.x+"px").style("width",w.width+"px").style("height",w.height+"px")},_mapping:function(){var t=this.get("graph"),e=this.get("dim"),n=this.get("itemType"),r=this.get("scale"),i=this.get("channel");t[n]()[i](function(t){return"node"===n&&"size"===i?2*r(t[e]):r(t[e])})}}),t.exports=p},function(t,e,n){"use strict";function r(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}function i(t){return t&&t.__esModule?t:{default:t}}var a=n(6),o=n(16),s=i(o),u=n(112),c=n(46),h=r(c);a.Util.augment(u.Legend.Continuous,{_addVerticalTrigger:function(t,e,n){var r=this.get("rangeElement"),i=r.get(t+"HandleElement"),o=this.get("width"),s=this.get("trigerWidth")?this.get("trigerWidth"):16,u=i.addShape("polygon",{attrs:a.Util.mix({points:[[o/2+s,0],[o/2+1,0],[o/2+s,"min"===t?s:-s]]},e)}),c=i.addShape("text",{attrs:a.Util.mix(n,{x:o+8,y:"max"===t?-8:8,textAlign:"start",textBaseline:"middle"})}),h=this.get("layout"),l="vertical"===h?"ns-resize":"ew-resize";u.set("cursor",l),c.set("cursor",l),this.set(t+"ButtonElement",u),this.set(t+"TextElement",c)}});var l=function t(e,n,r,i,o){var s=a.Util.mix({itemType:e,dim:n,channel:r,range:i},o);t.superclass.constructor.call(this,s)};l.ATTRS={itemType:null,dim:null,range:null,channel:null,scaleCfg:{},legendCfg:{}},a.Util.extend(l,s.default),a.Util.augment(l,{init:function(){var t=this,e=this.get("graph");e.on("beforerender",function(){if(t._checkInput()){var n=t.get("legendCfg");t._createScale(),t._mapping(),n&&t._createLegend(),e.on("changesize",function(){t.updateLegendPosition()})}}),e.on("afterclear",function(){var e=t.get("legendCanvas"),n=t.get("filterCallback"),r=t.get("graph"),i=t.get("itemType");r["remove"+a.Util.ucfirst(i)+"Filter"](n),e.destroy()})},_trainCategoryScale:function(t){var e=this.get("dim"),n=this.get("graph"),r=n.get(t+"s"),i={},a=[];return r.forEach(function(t){i[t[e]]||(i[t[e]]=!0,a.push(t[e]))}),a},_trainNumberScale:function(t){var e=this.get("dim"),n=this.get("graph"),r=n.get(t+"s"),i=[1/0,-(1/0)];return r.forEach(function(t){i[0]>t[e]&&(i[0]=t[e]),i[1]<t[e]&&(i[1]=t[e])}),i},_getScaleType:function(){var t=this.get("itemType"),e=this.get("dim"),n=this.get("graph"),r=n.get(t+"s"),i=this.get("scaleCfg");return i.type||(a.Util.isNumber(r[0][e])?i.type="linear":i.type="ordinal"),a.Util.ucfirst(i.type)},_createScale:function(){var t=this.get("itemType"),e=this.get("scaleCfg"),n=this._getScaleType(),r=new h["scale"+n],i=this.get("range"),o=e.nice,s=e.domain;r.range(i),s||(s="Ordinal"===n?this._trainCategoryScale(t,r):this._trainNumberScale(t,r));var u=i.length,c=s.length;if(u!==c){var l=(s[1]-s[0])/(u-1);i.forEach(function(t,e){s[e]=s[0]+e*l})}s[0]===s[1]&&(s[0]>0?s[0]=0:s[0]<0?s[1]=0:s[0]=-1),r.domain(s),o!==!1&&r.nice&&r.nice(),a.Util.isFunction(e.callback)&&e.callback(r,s),this.set("scale",r)},_createLegend:function(){var t=this._getScaleType(),e=this.get("channel"),n=this.get("graph"),r=n.get("graphContainer"),i=new a.Canvas({containerDOM:r,width:200,height:200}),o=void 0;o="Ordinal"===t?this._createCatLegend(i):"color"===e?this._createContinuousColorLegend(i):this._createContinuousSizeLegend(i);var s=o.getBBox(),u=6,c=s.maxX-s.minX,h=s.maxY-s.minY;o.move(-s.minX+u,-s.minY+u),i.changeSize(c+2*u,h+2*u),this.set("legend",o),this.set("legendCanvas",i),this.set("legendWidth",c),this.set("legendHeight",h),this.updateLegendPosition(),i.draw()},updateLegendPosition:function(){var t=this.get("legend");if(t){var e=this.get("legendCanvas"),n=this.get("legendCfg"),r=n.marginTop?n.marginTop:0,i=n.marginLeft?n.marginLeft:0,o=n.marginBottom?n.marginBottom:0,s=n.marginRight?n.marginRight:0,u=n.position?n.position:"br",c=this.get("graph"),h=c.get("width"),l=c.get("height"),f=e.get("el"),d=this.get("legendWidth"),g=this.get("legendHeight"),p=a.Util.getNineBoxPosition(u,{x:0,y:0,width:h,height:l},d,g,[r,s,o,i]);f.style.position="absolute",f.style.top=p.y+"px",f.style.left=p.x+"px"}},_createCatLegend:function(t){var e=this.get("scale"),n=e.range(),r=e.domain(),i=this.get("itemType"),o=this.get("legendCfg"),s=[],c=a.Util.mix({items:s,checkable:!1},o);n.forEach(function(t,e){s.push({name:r[e],color:t,type:"node"===i?"circle":"line",layout:"vertical",marker:{symbol:"circle",radius:5,fill:t},checked:!0})});var h=t.addGroup(u.Legend.Category,c);return h},_createContinuousColorLegend:function(t){var e=this.get("itemType"),n=this.get("scale"),r=n.range(),i=n.domain(),o=(i[i.length-1]-i[0])/(r.length-1),s=this.get("legendCfg"),c=[],h=a.Util.mix({items:c,theme:"gradient",attrType:"color",titleText:e,title:{fill:"#333",textBaseline:"bottom"},width:15,height:150},s);r.forEach(function(t,e){var n=i[0]+o*e;c.push({name:n,value:e/(r.length-1),color:t})});var l=t.addGroup(u.Legend.Continuous,h);return this.reBindLegendUI(l,n),l},_createContinuousSizeLegend:function(t){var e=this.get("itemType"),n=this.get("scale"),r=n.range(),i=n.domain(),o=(i[i.length-1]-i[0])/(r.length-1),s=this.get("legendCfg"),c=[];r.forEach(function(t,e){var n=i[0]+o*e;c.push({name:n,value:e/(r.length-1)})});var h=a.Util.mix({items:c,attrType:"size",titleText:e,title:{fill:"#333",textBaseline:"bottom"},width:15,height:150},s),l=t.addGroup(u.Legend.Continuous,h);return this.reBindLegendUI(l,n),l},_mapping:function(){var t=this.get("graph"),e=this.get("dim"),n=this.get("itemType"),r=this.get("scale"),i=this.get("channel");t[n]()[i](function(t){return"node"===n&&"size"===i?2*r(t[e]):r(t[e])})},reBindLegendUI:function(t,e){var n=this.get("graph"),r=this.get("dim"),i=this.get("itemType"),o=e.domain(),s=o[0],u=o[o.length-1],c=[s,u],h=t.get("rangeElement"),l=this.get("legendCfg"),f=function(t){return t[r]>=c[0]&&t[r]<=c[1]},d=l.trigerWidth?l.trigerWidth:16,g=l.trigerMarginLeft?l.trigerMarginLeft:d/2;t.get("minTextElement").translate(g,-(16-d)/2),t.get("maxTextElement").translate(g,+(16-d)/2),n["add"+a.Util.ucfirst(i)+"Filter"](f),h.on("rangeChange",function(t){c[0]=s+(u-s)*(t.range[0]/100),c[1]=s+(u-s)*(t.range[1]/100),n.filter(i)}),t._updateElement=function(n,r){n=Number(n),r=Number(r);var i=t.get("minTextElement"),a=t.get("maxTextElement"),o=l.formatter?l.formatter(n):n,s=l.formatter?l.formatter(r):r;if(i.attr("text",o+""),a.attr("text",s+""),"color"===t.get("attrType")){var u=t.get("minButtonElement"),c=t.get("maxButtonElement");u.attr("fill",e(n)),c.attr("fill",e(r))}},t._updateElement(s,u),this.set("filterCallback",f)},_checkInput:function(){var t=this.get("itemType"),e=this.get("graph"),n=e.get(t+"s");return e&&n&&n.length>0}}),t.exports=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(246),o=r(a),s=n(16),u=r(s);i.Layouts.circle=o.default;var c=function t(e){t.superclass.constructor.call(this,e)};i.Util.extend(c,u.default),i.Util.augment(c,{init:function(){var t=this,e=this.get("graph");e.on("beforeinit",function(){var n=new o.default(t._attrs);e.set("layout",n)})}}),t.exports=c},function(t,e,n){"use strict";function r(t){i.Util.mix(this,t)}var i=n(6);i.Util.augment(r,{nodes:null,radius:null,sweep:null,avoidOverlap:!1,clockwise:!0,startAngle:1.5*Math.PI,width:null,height:null,center:null,execute:function(){var t=this,e=this.nodes,n=this.width?this.width:this.graphWidth,r=this.height?this.height:this.graphHeight,a=this.center?this.center:{x:n/2,y:r/2},o=this.avoidOverlap,s=this.clockwise,u=i.Util.isNull(this.sweep)?2*Math.PI-2*Math.PI/e.length:this.sweep,c=u/Math.max(1,e.length-1),h=this.radius,l=0,f=void 0;for(f=0;f<e.length;f++){var d=e[f],g=d.width,p=d.height;l=Math.max(l,g,p)}if(h=i.Util.isNumber(this.radius)?this.radius:e.length<=1?0:Math.min(r,n)/2-l,e.length>1&&o){l*=1.75;var v=Math.cos(c)-Math.cos(0),m=Math.sin(c)-Math.sin(0),y=Math.sqrt(l*l/(v*v+m*m));h=Math.max(y,h)}i.Util.each(e,function(e,n){var r=t.startAngle+n*c*(s?1:-1),i=h*Math.cos(r),o=h*Math.sin(r);e.x=a.x+i,e.y=a.y+o})}}),t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(96),o=r(a),s=n(16),u=r(s);i.Layouts["d3.force"]=o.default;var c=function t(e){t.superclass.constructor.call(this,e)};c.ATTRS={callback:null},i.Util.extend(c,u.default),i.Util.augment(c,{init:function(){var t=this,e=this.get("graph");e.on("beforeinit",function(){var n=new o.default(i.Util.mix({},t._attrs,{dynamicCallback:function(){e.updateNodesPosition()}}));e.set("layout",n),t.set("layout",n)})},destroy:function(){var t=this.get("layout");t.stop(),c.superclass.destroy.call(this)}}),t.exports=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(249),o=r(a),s=n(16),u=r(s);i.Layouts.dagre=o.default;var c=function t(e){t.superclass.constructor.call(this,e)};i.Util.extend(c,u.default),i.Util.augment(c,{init:function(){var t=this,e=this.get("graph");e.on("beforeinit",function(){var n=new o.default(t._attrs);e.set("layout",n)})}}),t.exports=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){a.Util.mix(this,t)}var a=n(6),o=n(272),s=r(o);a.Util.augment(i,{rankdir:"TB",align:void 0,nodesep:50,edgesep:10,ranksep:50,marginx:0,marginy:0,acyclicer:void 0,useEdgeControlPoint:!0,ranker:"network-simplex",
15getValue:function(t){var e=this[t];return a.Util.isFunction(e)?e():e},execute:function(){var t=this,e=this.nodes,n=this.edges,r={},i=new s.default.graphlib.Graph;i.setGraph({rankdir:this.getValue("rankdir"),align:this.getValue("align"),nodesep:this.getValue("nodesep"),edgesep:this.getValue("edgesep"),ranksep:this.getValue("ranksep"),marginx:this.getValue("marginx"),marginy:this.getValue("marginy"),acyclicer:this.getValue("acyclicer"),ranker:this.getValue("ranker")}),i.setDefaultEdgeLabel(function(){return{}}),e.forEach(function(t){i.setNode(t.id,{width:t.width,height:t.height}),r[t.id]=t}),n.forEach(function(t){i.setEdge(t.source,t.target)}),s.default.layout(i),i.nodes().forEach(function(t){var e=i.node(t);r[t].x=e.x,r[t].y=e.y}),i.edges().forEach(function(e,r){var a=i.edge(e);t.useEdgeControlPoint&&(n[r].controlPoints=a.points)})}}),t.exports=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(251),o=r(a),s=n(16),u=r(s);i.Layouts.grid=o.default;var c=function t(e){t.superclass.constructor.call(this,e)};i.Util.extend(c,u.default),i.Util.augment(c,{init:function(){var t=this,e=this.get("graph");e.on("beforeinit",function(){var n=new o.default(t._attrs);e.set("layout",n)})}}),t.exports=c},function(t,e,n){"use strict";function r(t){i.Util.mix(this,t)}var i=n(6);i.Util.augment(r,{row:10,col:10,marginx:20,marginy:20,width:null,height:null,execute:function(){for(var t=this.nodes,e=this.width?this.width:this.graphWidth,n=this.height?this.height:this.graphHeight,r=this.center?this.center:{x:e/2,y:n/2},i=this.row,a=this.col,o=0;o<t.length;o++){var s=t[o];s.x=r.x-e/2+o%i/i*e+this.marginx,s.y=r.y-n/2+parseInt(o/a)/a*n+this.marginy}}}),t.exports=r},function(t,e,n){"use strict";function r(t){i.Util.mix(this,t)}var i=n(6);i.Util.augment(r,{dx:70,dy:30,execute:function(){var t=this.nodes,e=[],n=this.dy,r=this.dx,i=0,a=0;t.sort(function(t,e){return t.hierarchy-e.hierarchy}),t.forEach(function(t){e[t.hierarchy]?e[t.hierarchy].push(t):e[t.hierarchy]=[t]}),e.forEach(function(t){t.sort(function(t,e){return e.rank-t.rank});var e=-(1/0);a=0,t.forEach(function(t){t.y=a+t.height/2,t.x=i+t.width/2,a+=t.height+n,t.width>e&&(e=t.width)}),i+=e+r})}}),t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=[],r={nodes:[],edges:[],maxRankNode:null},i={},o=-(1/0);return s.Util.each(t,function(t){t.links=[],t.edges=[],i[t.id]=t,s.Util.isNull(t.weight)&&(t.weight=1),s.Util.isNull(t.rank)&&(t.weight?t.rank=t.weight:t.rank=1)}),s.Util.each(e,function(e,n){var r=i[e.source],a=i[e.target];r.links.push(t.indexOf(a)),a.links.push(t.indexOf(r)),r.edges.push(n),a.edges.push(n),s.Util.isNull(e.weight)&&(e.weight=1)}),s.Util.each(t,function(r,i){r.visited||n.push(a(i,t,e))}),s.Util.each(t,function(t){delete t.links,delete t.edges,delete t.visited}),s.Util.each(n,function(t){var e=(0,c.default)(t),n=t.root;r.nodes=r.nodes.concat(e.nodes),r.edges=r.edges.concat(e.edges),n.rank>o&&(o=n.rank,r.maxRankNode=n)}),r}function a(t,e,n){var r={nodes:[],edges:[],root:null},i={},a=[],u=-(1/0);return o(t,e,function(t){var n=e[t];n.rank>u&&(u=n.rank,r.root=n),r.nodes.push(n),r.edges=r.edges.concat(n.edges)}),s.Util.each(r.edges,function(t){i[t]||(a.push(n[t]),i[t]=!0)}),r.edges=a,r}function o(t,e,n){var r=[t];for(e[t].visited=!0,n(t);r.length>0;){var i=r.pop();e[i].links.forEach(function(t){e[t].visited||(e[t].visited=!0,n(t),r.push(t))})}}var s=n(6),u=n(254),c=r(u);t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.nodes,n=t.edges,r=t.root,s={};i.Util.each(e,function(t){t.to=[],t.from=[],s[t.id]=t}),i.Util.each(n,function(t){var e=s[t.source],n=s[t.target];e.to.push(t),n.from.push(t)}),a=[r],o=[];for(var u=function(){var t=-(1/0),e=void 0,n="target";i.Util.each(a,function(r){i.Util.each(r.to,function(r){a.indexOf(s[r[n]])===-1&&r.weight>t&&(t=r.weight,e=r)})}),e||(n="source",i.Util.each(a,function(r){i.Util.each(r.from,function(r){a.indexOf(s[r[n]])===-1&&r.weight>t&&(t=r.weight,e=r)})})),a.push(s[e[n]]),o.push(e)};a.length!==e.length;)u();return i.Util.each(e,function(t){delete t.to,delete t.from}),{nodes:a,edges:o}}var i=n(6),a=[],o=[];t.exports=r},function(t,e,n){"use strict";function r(t){i.Util.mix(this,t),this.init()}var i=n(6);i.Util.augment(r,{class:"node-tool",lists:[],init:function(){var t=this,e=this.graph,n=e.get("graphContainer"),r=this.class,a=i.Util.createDOM('<div class="'+r+'"></div>',{position:"absolute",visibility:"hidden"}),o=this.lists;n.appendChild(a),i.Util.each(o,function(e){e.callBack&&(e.callback=e.callBack);var n=i.Util.createDOM("<li>"+e.html+"</li>");n.on(e.event,function(){var n=t.getNode();i.Util.isString(e.callback)&&t[e.callback](n),i.Util.isFunction(e.callback)&&e.callback(n)}),a.appendChild(n)}),this.container=a},show:function(t,e,n){var r=this.container;r.show(),r.css({top:n+"px",left:e+"px"}),this.node=t},hide:function(){var t=this.container;t.hide()},getNode:function(){return this.node},showSource:function(t){var e=this.graph,n=t.getSourceItems();n=[t].concat(n),e.clearAllActived(),i.Util.each(n,function(t){"edge"===t.get("type")&&t.setActiveStatus(!0)}),!t.get("actived")&&e.setItemActived(t,!0),e.modal(n),this.hide()},showTargets:function(t){var e=this.graph,n=t.getTargetItems();e.clearAllActived(),n=[t].concat(n),i.Util.each(n,function(t){"edge"===t.get("type")&&t.setActiveStatus(!0)}),!t.get("actived")&&e.setItemActived(t,!0),e.modal(n),this.hide()},showAll:function(t){var e=this.graph,n=t.getRelativeItems();e.clearAllActived(),n=[t].concat(n),i.Util.each(n,function(t){"edge"===t.get("type")&&t.setActiveStatus(!0)}),!t.get("actived")&&e.setItemActived(t,!0),e.modal(n),this.hide()}}),t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.attr("fill");return{stroke:e?e:"#666",strokeOpacity:.4,lineWidth:6,fill:null}}function i(t,e,n,r){if(r){var i=t.points,o=i[i.length-1],s=n.getPoint(.76),u=.86*n.attr("lineWidth");u<8&&(u=8),s||(s={x:0,y:0});var c=e.addShape("polyline",{attrs:a.Util.mix({points:[[-u/4,u/2],[u/4,0],[-u/4,-u/2]]},r),class:"arrow"});return a.Util.arrowTo(c,s.x,s.y,s.x,s.y,o.x,o.y),c}}var a=n(6);(0,a.registNode)("plugin-template-net-analysis-node-shape",{afterDraw:function(t,e,n){var r=t.size,i=e.findBy(function(t){return t.hasClass("label")});if(i){i.attr("fontSize",12);var o=i.get("attrs"),s=e.addShape("text",{attrs:a.Util.mix({},o,{fill:"white",stroke:"white",lineWidth:4,fontSize:12}),freezePoint:i.get("freezePoint"),zIndex:4});i.hide=function(){return s.set("visible",!1),i.set("visible",!1),i},i.show=function(){return s.set("visible",!0),i.set("visible",!0),i},s.hide=function(){},s.show=function(){}}var u=void 0;u=a.Util.isFunction(this.acitvedShape)?this.acitvedShape(n):this.acitvedShape;var c=e.addShape(n.type,{attrs:a.Util.mix({},n.get("attrs"),u),zIndex:0}),h=u.lineWidth,l=a.Util.isNull(h)?.05:h/r[0];c.scale(1+l,1+l),e.set("acitvedOutterShape",c),c.hide(),e.sort()},style:function(){return{fillOpacity:.8,stroke:"#505050",lineWidth:.5}},acitvedShape:r,setActived:function(t,e){var n=t.get("graph"),r=t.getGroup(),i=r.get("acitvedOutterShape");if(e)i.show(),n.refresh();else{var o=t.getRelativeItems(),s=[t].concat(o);i.hide(),a.Util.each(s,function(t){"edge"===t.get("type")&&t.setActiveStatus(!1)}),n.unModal()}},getAnchorPoints:function(){return"auto"}},"circle"),(0,a.registEdge)("plugin-template-net-analysis-tree-edge-shape",{arrowStyle:null,afterDraw:function(t,e,n){var r=void 0;r=a.Util.isFunction(this.arrowStyle)?this.arrowStyle(n):this.arrowStyle,i(t,e,n,r)},style:function(){return{stroke:"#979797",strokeOpacity:.5}},setActived:function(){}}),(0,a.registEdge)("plugin-template-net-analysis-out-tree-edge-shape",{arrowStyle:null,afterDraw:function(t,e,n){var r=void 0;r=a.Util.isFunction(this.arrowStyle)?this.arrowStyle(n):this.arrowStyle,i(t,e,n,r),e.hide()},style:function(){return{stroke:"#979797",strokeOpacity:.5}},setActived:function(t,e){var n=t.getGroup();e?n.show():n.hide()}},"bezierQuadratic")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(16),o=r(a),s=n(252),u=r(s),c=n(46);n(258);var h=function t(e){t.superclass.constructor.call(this,e)};h.ATTRS={layout:null,layoutCfg:{},nodeWidth:200,minNodeSize:0,maxNodeSize:500,simplifyEdgeAble:!1},i.Util.extend(h,o.default),i.Util.augment(h,{init:function(){var t=this,e=this.get("graph");e.on("afterinit",function(){e.node().shape("plugin-template-analysis-sankey-node-shape"),e.edge().shape(function(t){return"runoff"===t.type?"plugin-template-analysis-sankey-runoff-edge-shape":"plugin-template-analysis-sankey-edge-shape"})}),e.on("beforerender",function(){t._initMap(),t._createScale(),t._initData(),t._setLayout()})},_createScale:function(){var t=new c.scaleLinear,e=this.get("nodeMap"),n=this.get("minNodeSize"),r=this.get("maxNodeSize"),a=-(1/0);i.Util.each(e,function(t){t.weight>a&&(a=t.weight)}),t.domain([0,a]),t.range([n,r]),this.set("scale",t)},_initMap:function(){var t=this.get("graph"),e=t.get("nodes"),n=t.get("edges"),r={},i={};e.forEach(function(t){r[t.id]=t}),n.forEach(function(t){i[t.id]=t}),this.set("nodeMap",r),this.set("edgeMap",i)},_initData:function(){var t=this.get("graph"),e=t.get("nodes"),n=t.get("edges"),r=this.get("nodeMap"),a=this.get("nodeWidth"),o=this.get("scale"),s=this.get("simplifyEdgeAble");i.Util.each(e,function(t){t.runoutWeight=0,t.inEdges=[],t.outEdges=[]}),i.Util.each(n,function(t){t.points=[],"runoff"!==t.type&&(t.simplifyEdgeAble=s)}),i.Util.each(n,function(t){var e=r[t.source];e.runoutWeight+=t.weight}),i.Util.each(e,function(t){var e=t.weight-t.runoutWeight;e>0&&n.push({source:t.id,target:t.id,type:"runoff",points:[0,0],weight:e})}),i.Util.each(n,function(t){var e=r[t.source],n=r[t.target];"runoff"!==t.type?(e.outEdges.push(t),n.inEdges.push(t)):e.outEdges.push(t)}),i.Util.each(e,function(t){t.size=[a,o(t.weight)]}),i.Util.each(n,function(t){t.size=o(t.weight)}),i.Util.each(e,function(t){t.inEdges.sort(function(t,e){return e.weight-t.weight}),t.outEdges.sort(function(t,e){return"runoff"===t.type||"runoff"!==e.type&&e.weight-t.weight});var e=0;i.Util.each(t.inEdges,function(n,r){var i=n.weight/t.weight;n.points[1]=e+i/2,n.inEdgeIndex=r,e+=i}),e=0,i.Util.each(t.outEdges,function(n,r){var i=n.weight/t.weight;n.points[0]=e+i/2,n.inEdgeIndex=r,e+=i})})},_setLayout:function(){var t=this.get("graph"),e=this.get("layoutCfg"),n=this.get("layout");n||(n=new u.default(e)),t.set("layout",n)}}),t.exports=h},function(t,e,n){"use strict";function r(t,e,n){var r=e.getModel(),i=e.getShapeCfg(),a=n.getModel(),o=n.getShapeCfg(),s=i.size[0],u=i.size[1],c=o.size[0],h=o.size[1],l=r.x,f=r.y,d=a.x,g=a.y;return[{x:l+s/2,y:f-u/2+t[0]*u},{x:d-c/2,y:g-h/2+t[1]*h}]}var i=n(6),a=n(259);(0,i.registNode)("plugin-template-analysis-sankey-node-shape",{draw:function(t,e){var n=i.Util.drawNode("rect",t,e),r=t.origin,o=r.nameText?i.Util.mix({},this.nameTextStyle,{text:r.nameText}):{},s=r.valueText?i.Util.mix({},this.valueTextStyle,{text:r.valueText}):{};return a.drawNodeTexts(t.size,e,o,s),n},nameTextStyle:{textAlign:"left",textBaseline:"top",fontWeight:100,fill:"#473A8D"},valueTextStyle:{textAlign:"left",fontWeight:900,textBaseline:"top",fill:"#473A8D"},getAnchorPoints:function(){return"auto"},style:function(){return{radius:0,stroke:"#69A0C1",strokeOpacity:1,fill:"l (90) 0:#E5F3FF 1:#B7DCFA",fillOpacity:1}}}),(0,i.registEdge)("plugin-template-analysis-sankey-edge-shape",{draw:function(t,e){var n=t.origin,i=n.simplifyEdgeAble,a=t.style,o=t.size,s=r(n.points,t.source,t.target,o),u=this.drawShape(s,o,a,e);return i&&((n.outEdgeIndex>2||n.inEdgeIndex>2)&&0!==n.inEdgeIndex||o<2)&&(u.hide(),e.set("simplifyShape",this.drawSimplify(s,o,a,e))),u},drawSimplify:function(t,e,n,r){return e=e>=2?e:2,n.fill="l (0) 0:"+n.fill+" 0.1:#fff 0.9:#fff 1:"+n.fill,r.addShape("path",{attrs:i.Util.mix({path:a.getSimplifyFlowCurvePath(t[0],t[1],e,e,this.rectRatio)},n)})},drawShape:function(t,e,n,r){return e=e>=2?e:2,r.addShape("path",{attrs:i.Util.mix({path:a.getFlowCurvePath(t[0],t[1],e,e,this.rectRatio)},n)})},style:function(){return{fill:"rgba(224, 238, 247, 0.87)"}},rectRatio:.1}),(0,i.registEdge)("plugin-template-analysis-sankey-runoff-edge-shape",{draw:function(t,e){var n=t.origin,i=r(n.points,t.source,t.target);return this.drawShape(i,t.size,t.style,e)},drawShape:function(t,e,n,r){return r.addShape("path",{attrs:i.Util.mix({path:a.getRunOffPath(t[0],e,this.radius)},n)})},style:function(){return{fill:"l (90) 0:rgba(236, 85, 64, 0.9) 1:rgba(236, 85, 64, 0.3)"}},radius:10})},function(t,e){"use strict";var n={getRunOffPath:function(t,e,n,r){var i=e;r||(r=n),e>n&&(i=n);var a=[],o={x:t.x,y:t.y-e/2},s={x:t.x+i,y:o.y+i},u={x:t.x+i,y:t.y+e/2+r},c={x:t.x,y:t.y+e/2+r};return a.push(["M",o.x,o.y]),a.push(["A",i,i,0,0,1,s.x,s.y]),a.push(["L",u.x,u.y]),a.push(["L",c.x,c.y]),a.push(["Z"]),a},getSimplifyFlowCurvePath:function(t,e,n,r,i){var a=e.x-t.x,o=a*i,s={x:t.x,y:t.y-r/2},u={x:e.x,y:e.y-n/2},c={x:t.x,y:t.y+r/2},h={x:e.x,y:e.y+n/2},l={x:t.x+o,y:t.y-r/2},f={x:e.x-o,y:e.y-n/2},d={x:t.x+o,y:t.y+r/2},g={x:e.x-o,y:e.y+n/2},p=[];return p.push(["M",s.x,s.y]),p.push(["L",l.x,l.y]),p.push(["L",d.x,d.y]),p.push(["L",c.x,c.y]),p.push(["L",s.x,s.y]),p.push(["M",f.x,f.y]),p.push(["L",u.x,u.y]),p.push(["L",h.x,h.y]),p.push(["L",g.x,g.y]),p.push(["Z"]),p},getFlowCurvePath:function(t,e,n,r,i){var a=e.x-t.x,o=a*i,s={x:t.x,y:t.y-r/2},u={x:e.x,y:e.y-n/2},c={x:t.x,y:t.y+r/2},h={x:e.x,y:e.y+n/2},l={x:t.x+o,y:t.y-r/2},f={x:e.x-o,y:e.y-n/2},d={x:t.x+o,y:t.y+r/2},g={x:e.x-o,y:e.y+n/2},p=[];return p.push(["M",s.x,s.y]),p.push(["L",l.x,l.y]),p.push(["C",(l.x+f.x)/2,l.y,(l.x+f.x)/2,f.y,f.x,f.y+.05]),p.push(["L",u.x,u.y]),p.push(["L",h.x,h.y]),p.push(["L",g.x,g.y]),p.push(["C",(d.x+g.x)/2,g.y,(d.x+g.x)/2,d.y,d.x,d.y-.05]),p.push(["L",c.x,c.y]),p.push(["L",s.x,s.y]),p},drawNodeTexts:function(t,e,n,r){var i=t[0],a=t[1],o=6,s=6,u=20,c=void 0,h=void 0;a<20?(r.x=s,r.y=a+o,c=e.addShape("text",{attrs:r}),h=c.getBBox(),n.x=h.maxX-h.minX+s+6,n.y=a+o,c.remove(!0)):a<36?(r.x=s,r.y=o,n.x=s,n.y=a+o/2):(r.x=s,r.y=o,n.x=s,n.y=u+2),r.x-=i/2,r.y-=a/2,n.x-=i/2,n.y-=a/2,r.text&&e.addShape("text",{attrs:r}),n.text&&e.addShape("text",{attrs:n})}};t.exports=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(6),a=n(16),o=r(a),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={width:null,height:null,marginLeft:10,marginTop:10,marginRight:10,marginBottom:10,minimapDOMStyle:{height:"100%",position:"absolute",margin:"auto",left:0,right:0,"z-index":0},navigationDOMStyle:{background:"#fff",position:"absolute",overflow:"hidden",border:"1px solid #333"},miniMapViewPortDOMStyle:{background:"rgba(0, 174, 237, 0.3)",position:"absolute","z-index":1},miniMapControlLayerDOMStyle:{width:"100%",height:"100%",cursor:"move",position:"absolute","z-index":2},position:"bl",miniMapBackgroundRenderFrameObj:{},miniMapViewPortRenderFrameObj:{},miniMapSizeRatio:.2},i.Util.extend(s,o.default),i.Util.augment(s,{init:function(){var t=this,e=this.get("graph");e.on("afterinit",function(){t._initCfg(),t._initContainer(),t._initMiniMap(),t._bindEvent()}),e.on("afterrender",function(){t._renderMinimapContainer(),t._tryRenderMiniMap()})},_initCfg:function(){var t=this.get("graph"),e=t.get("width"),n=t.get("height"),r=this.get("miniMapSizeRatio"),i=this.get("width"),a=this.get("height");i||a||(this.set("width",e*r),this.set("height",n*r)),!i&&a&&this.set("width",a*(e/n)),!a&&i&&this.set("height",i*(n/e))},_bindEvent:function(){var t=this,e=this.get("graph"),n=this.get("miniMapControlLayer"),r=!1,i=void 0,a=void 0,o=void 0,s=void 0;e.on("itemchange",function(){t._tryRenderMiniMap()}),e.on("filter",function(){t._tryRenderMiniMap()}),e.on("matrixupdate",function(){t._renderMiniMapViewPort()}),n.on("mousedown",function(n){r=!0,i=e.getMatrix().clone(),a=t.get("miniMapMatrix").elements[0],o=e.getScale(),s={clientX:n.clientX,clientY:n.clientY}}),n.on("mouseup",function(){r=!1,a=void 0,s=void 0,i=void 0,o=void 0}),n.on("mouseleave",function(){e.set("domFocus",!0),r=!1,a=void 0,s=void 0,i=void 0,o=void 0}),n.on("mousemove",function(t){if(r){var n=s.clientX-t.clientX,u=s.clientY-t.clientY,c=i.clone();c.translate(o*n/a,o*u/a),e.updateMatrix(c),e.refresh()}})},_initMiniMap:function(){var t=this.get("miniMapContainer"),e=this.get("width"),n=this.get("height"),r=new i.Canvas({containerDOM:t,width:e,height:n});t.css({width:e+"px",height:n+"px"}),this.set("miniMapCanvas",r)},_initContainer:function(){var t=this.get("graph"),e=t.get("graphContainer"),n=this.get("minimapDOMStyle"),r=this.get("navigationDOMStyle"),a=this.get("miniMapViewPortDOMStyle"),o=this.get("miniMapControlLayerDOMStyle"),s=i.Util.createDOM('<div class="g6-plugins-navigation"></div>',r),u=i.Util.createDOM('<div class="g6-plugins-minimap"></div>',n),c=i.Util.createDOM('<div class="g6-plugins-minimap-viewport">',a),h=i.Util.createDOM('<div class="g6-plugins-minimap-control-layer">',o);e.appendChild(s),s.appendChild(h),s.appendChild(u),s.appendChild(c),this.set("navigationContainer",s),this.set("miniMapContainer",u),this.set("miniMapViewPort",c),this.set("miniMapControlLayer",h)},_renderMiniMap:function(){var t=this.get("miniMapCanvas"),e=t.get("context"),n=this.get("graph"),r=n.get("canvas"),a=n.get("rootGroup"),o=r.get("context"),s=n.get("width"),u=n.get("height"),c=this.get("width"),h=this.get("height"),l=n.getMatrix().clone(),f=n.get("maxZoom"),d=n.get("minZoom"),g=n.getEdges();r.set("context",e),n.set("maxZoom",1/0),n.set("minZoom",0),n.set("width",c),n.set("height",h),n.autoZoom();var p=n.getScale();this.set("miniMapMatrix",n.getMatrix().clone()),r.beforeDraw(),i.Util.each(g,function(t){t.set("miniMapShouldShow",t.getGroup().get("visible")),t.hide()});var v=[],m=[];a.traverseChildren(function(t){if(t.isShape&&t.hasClass("node-key-shape")&&t.get("visible")){var e=t.getBBox(),n=(e.maxX+e.minX)/2,r=(e.maxY+e.minY)/2,i=e.maxX-e.minX,a=e.maxY-e.minY,o=Math.min(i,a),s=o*p,u=2;s<u&&(t.transform([["t",-n,-r],["s",u/s,u/s],["t",n,r]]),t.resetMniMapTransform=function(){t.transform([["t",-n,-r],["s",s/u,s/u],["t",n,r]])},v.push(t))}if("text"===t.type){var c=t.get("visible");t.resetTextVisible=function(){c&&t.show()},t.hide(),m.push(t)}}),r.constructor.superclass.draw.call(r,e),i.Util.each(v,function(t){t.resetMniMapTransform()}),i.Util.each(m,function(t){t.resetTextVisible()}),i.Util.each(g,function(t){t.get("miniMapShouldShow")&&t.show()}),r.set("context",o),n.set("width",s),n.set("height",u),n.set("maxZoom",f),n.set("minZoom",d),n.updateMatrix(l),r.beforeDraw(),r.constructor.superclass.draw.call(r,o)},_renderMiniMapViewPort:function(){var t=this.get("miniMapViewPort"),e=this.get("graph"),n=e.get("width"),r=e.get("height"),a=e.getMatrix(),o=this.get("miniMapMatrix");if(o){var s=i.Util.invertPoint({x:0,y:0},a),u=i.Util.invertPoint({x:n,y:r},a),c=i.Util.converPoint(s,o),h=i.Util.converPoint(u,o);t.css({top:c.y+"px",left:c.x+"px",width:h.x-c.x+"px",height:h.y-c.y+"px"})}},_renderMinimapContainer:function(){var t=this.get("graph"),e=this.get("navigationContainer"),n=t.get("height"),r=t.get("width"),a=this.get("width"),o=this.get("height"),s=this.get("position"),u=this.get("marginBottom"),c=this.get("marginLeft"),h=this.get("marginRight"),l=this.get("marginTop"),f=i.Util.getNineBoxPosition(s,{x:0,y:0,width:r,height:n},a,o,[l,h,u,c]);e.css({top:f.y+"px",left:f.x+"px",width:a+"px",height:o+"px"})},_tryRenderMiniMap:function(){var t=this,e=this.get("miniMapBackgroundRenderFrameObj");e.callback=function(){t._renderMiniMap()},i.Util.frameDraw(e)}}),t.exports=s},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function n(t){return 1===t.length&&(t=r(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function r(t){return function(n,r){return e(t(n),r)}}function i(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function a(t){return null===t?NaN:+t}function o(t,e){var n,r,i=t.length,o=0,s=0,u=-1,c=0;if(null==e)for(;++u<i;)isNaN(n=a(t[u]))||(r=n-o,o+=r/++c,s+=r*(n-o));else for(;++u<i;)isNaN(n=a(e(t[u],u,t)))||(r=n-o,o+=r/++c,s+=r*(n-o));if(c>1)return s/(c-1)}function s(t,e){var n=o(t,e);return n?Math.sqrt(n):n}function u(t,e){var n,r,i,a=-1,o=t.length;if(null==e){for(;++a<o;)if(null!=(r=t[a])&&r>=r){n=i=r;break}for(;++a<o;)null!=(r=t[a])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++a<o;)if(null!=(r=e(t[a],a,t))&&r>=r){n=i=r;break}for(;++a<o;)null!=(r=e(t[a],a,t))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]}function c(t){return function(){return t}}function h(t){return t}function l(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function f(t,e,n){var r=d(t,e,n);return l(Math.ceil(t/r)*r,Math.floor(e/r)*r+r/2,r)}function d(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=R?i*=10:a>=z?i*=5:a>=G&&(i*=2),e<t?-i:i}function g(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function p(){function t(t){var i,a,o=t.length,s=new Array(o);for(i=0;i<o;++i)s[i]=e(t[i],i,t);var u=n(s),c=u[0],h=u[1],l=r(s,c,h);Array.isArray(l)||(l=f(c,h,l));for(var d=l.length;l[0]<=c;)l.shift(),--d;for(;l[d-1]>=h;)l.pop(),--d;var g,p=new Array(d+1);for(i=0;i<=d;++i)g=p[i]=[],g.x0=i>0?l[i-1]:c,g.x1=i<d?l[i]:h;for(i=0;i<o;++i)a=s[i],c<=a&&a<=h&&p[B(l,a,0,d)].push(t[i]);return p}var e=h,n=u,r=g;return t.value=function(n){return arguments.length?(e="function"==typeof n?n:c(n),t):e},t.domain=function(e){return arguments.length?(n="function"==typeof e?e:c([e[0],e[1]]),t):n},t.thresholds=function(e){return arguments.length?(r="function"==typeof e?e:c(Array.isArray(e)?L.call(e):e),t):r},t}function v(t,e,n){if(null==n&&(n=a),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t),u=+n(t[o+1],o+1,t);return s+(u-s)*(i-o)}}function m(t,n,r){return t=D.call(t,a).sort(e),Math.ceil((r-n)/(2*(v(t,.75)-v(t,.25))*Math.pow(t.length,-1/3)))}function y(t,e,n){return Math.ceil((n-e)/(3.5*s(t)*Math.pow(t.length,-1/3)))}function x(t,e){var n,r,i=-1,a=t.length;if(null==e){for(;++i<a;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<a;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<a;)if(null!=(r=e(t[i],i,t))&&r>=r){n=r;break}for(;++i<a;)null!=(r=e(t[i],i,t))&&r>n&&(n=r)}return n}function b(t,e){var n,r=0,i=t.length,o=-1,s=i;if(null==e)for(;++o<i;)isNaN(n=a(t[o]))?--s:r+=n;else for(;++o<i;)isNaN(n=a(e(t[o],o,t)))?--s:r+=n;if(s)return r/s}function _(t,n){var r,i=[],o=t.length,s=-1;if(null==n)for(;++s<o;)isNaN(r=a(t[s]))||i.push(r);else for(;++s<o;)isNaN(r=a(n(t[s],s,t)))||i.push(r);return v(i.sort(e),.5)}function w(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(r=t[i],e=r.length;--e>=0;)n[--o]=r[e];return n}function M(t,e){var n,r,i=-1,a=t.length;if(null==e){for(;++i<a;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<a;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<a;)if(null!=(r=e(t[i],i,t))&&r>=r){n=r;break}for(;++i<a;)null!=(r=e(t[i],i,t))&&n>r&&(n=r)}return n}function S(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(n<0?0:n);e<n;)i[e]=[r,r=t[++e]];return i}function k(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function A(t,n){if(r=t.length){var r,i,a=0,o=0,s=t[o];for(n||(n=e);++a<r;)(n(i=t[a],s)<0||0!==n(s,s))&&(s=i,o=a);return 0===n(s,s)?o:void 0}}function C(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function T(t,e){var n,r=0,i=t.length,a=-1;if(null==e)for(;++a<i;)(n=+t[a])&&(r+=n);else for(;++a<i;)(n=+e(t[a],a,t))&&(r+=n);return r}function E(t){if(!(i=t.length))return[];for(var e=-1,n=M(t,P),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function P(t){return t.length}function I(){return E(arguments)}var N=n(e),B=N.right,F=N.left,O=Array.prototype,L=O.slice,D=O.map,R=Math.sqrt(50),z=Math.sqrt(10),G=Math.sqrt(2);t.bisect=B,t.bisectRight=B,t.bisectLeft=F,t.ascending=e,t.bisector=n,t.descending=i,t.deviation=s,t.extent=u,t.histogram=p,t.thresholdFreedmanDiaconis=m,t.thresholdScott=y,t.thresholdSturges=g,t.max=x,t.mean=b,t.median=_,t.merge=w,t.min=M,t.pairs=S,t.permute=k,t.quantile=v,t.range=l,t.scan=A,t.shuffle=C,t.sum=T,t.ticks=f,t.tickStep=d,t.transpose=E,t.variance=o,t.zip=I,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new n(i)}function n(t){this._=t}function r(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function i(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function a(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=o,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}var o={value:function(){}};n.prototype=e.prototype={constructor:n,on:function(t,e){var n,o=this._,s=r(t+"",o),u=-1,c=s.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<c;)if(n=(t=s[u]).type)o[n]=a(o[n],t.name,e);else if(null==e)for(n in o)o[n]=a(o[n],t.name,null);return this}for(;++u<c;)if((n=(t=s[u]).type)&&(n=i(o[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],a=0,n=r.length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}},t.dispatch=e,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new n(i)}function n(t){this._=t}function r(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function i(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function a(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=o,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}var o={value:function(){}};n.prototype=e.prototype={constructor:n,on:function(t,e){var n,o=this._,s=r(t+"",o),u=-1,c=s.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<c;)if(n=(t=s[u]).type)o[n]=a(o[n],t.name,e);else if(null==e)for(n in o)o[n]=a(o[n],t.name,null);return this}for(;++u<c;)if((n=(t=s[u]).type)&&(n=i(o[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],a=0,n=r.length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}},t.dispatch=e,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,r){r(e,n(266),n(44),n(263),n(271))}(this,function(t,e,n,r,i){"use strict";function a(t){return t.x+t.vx}function o(t){return t.y+t.vy}function s(t){return t.index}function u(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function c(t){return t.x}function h(t){return t.y}var l=function(t,e){function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n<a;++n)i=r[n],o+=i.x,s+=i.y;for(o=o/a-t,s=s/a-e,n=0;n<a;++n)i=r[n],i.x-=o,i.y-=s}var r;return null==t&&(t=0),null==e&&(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n},f=function(t){return function(){return t}},d=function(){return 1e-6*(Math.random()-.5)},g=function(t){function n(){function t(t,e,n,r,i){var a=t.data,o=t.r,s=p+o;{if(!a)return e>f+s||r<f-s||n>g+s||i<g-s;if(a.index>l.index){var u=f-a.x-a.vx,h=g-a.y-a.vy,m=u*u+h*h;m<s*s&&(0===u&&(u=d(),m+=u*u),0===h&&(h=d(),m+=h*h),m=(s-(m=Math.sqrt(m)))/m*c,l.vx+=(u*=m)*(s=(o*=o)/(v+o)),l.vy+=(h*=m)*s,a.vx-=u*(s=1-s),a.vy-=h*s)}}}for(var n,i,l,f,g,p,v,m=s.length,y=0;y<h;++y)for(i=e.quadtree(s,a,o).visitAfter(r),n=0;n<m;++n)l=s[n],p=u[l.index],v=p*p,f=l.x+l.vx,g=l.y+l.vy,i.visit(t)}function r(t){if(t.data)return t.r=u[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function i(){if(s){var e,n,r=s.length;for(u=new Array(r),e=0;e<r;++e)n=s[e],u[n.index]=+t(n,e,s)}}var s,u,c=1,h=1;return"function"!=typeof t&&(t=f(null==t?1:+t)),n.initialize=function(t){s=t,i()},n.iterations=function(t){return arguments.length?(h=+t,n):h},n.strength=function(t){return arguments.length?(c=+t,n):c},n.radius=function(e){return arguments.length?(t="function"==typeof e?e:f(+e),i(),n):t},n},p=function(t){function e(t){return 1/Math.min(g[t.source.index],g[t.target.index])}function r(e){for(var n=0,r=t.length;n<x;++n)for(var i,a,o,s,u,l,f,g=0;g<r;++g)i=t[g],a=i.source,o=i.target,s=o.x+o.vx-a.x-a.vx||d(),u=o.y+o.vy-a.y-a.vy||d(),l=Math.sqrt(s*s+u*u),l=(l-h[g])/l*e*c[g],s*=l,u*=l,o.vx-=s*(f=p[g]),o.vy-=u*f,a.vx+=s*(f=1-f),a.vy+=u*f}function i(){if(l){var e,r,i=l.length,s=t.length,f=n.map(l,v);for(e=0,g=new Array(i);e<s;++e)r=t[e],r.index=e,"object"!=typeof r.source&&(r.source=u(f,r.source)),"object"!=typeof r.target&&(r.target=u(f,r.target)),g[r.source.index]=(g[r.source.index]||0)+1,g[r.target.index]=(g[r.target.index]||0)+1;for(e=0,p=new Array(s);e<s;++e)r=t[e],p[e]=g[r.source.index]/(g[r.source.index]+g[r.target.index]);c=new Array(s),a(),h=new Array(s),o()}}function a(){if(l)for(var e=0,n=t.length;e<n;++e)c[e]=+m(t[e],e,t)}function o(){if(l)for(var e=0,n=t.length;e<n;++e)h[e]=+y(t[e],e,t)}var c,h,l,g,p,v=s,m=e,y=f(30),x=1;return null==t&&(t=[]),r.initialize=function(t){l=t,i()},r.links=function(e){return arguments.length?(t=e,i(),r):t},r.id=function(t){return arguments.length?(v=t,r):v},r.iterations=function(t){return arguments.length?(x=+t,r):x},r.strength=function(t){return arguments.length?(m="function"==typeof t?t:f(+t),a(),r):m},r.distance=function(t){return arguments.length?(y="function"==typeof t?t:f(+t),o(),r):y},r},v=10,m=Math.PI*(3-Math.sqrt(5)),y=function(t){function e(){a(),y.call("tick",u),c<h&&(p.stop(),y.call("end",u))}function a(){var e,n,r=t.length;for(c+=(f-c)*l,g.each(function(t){t(c)}),e=0;e<r;++e)n=t[e],null==n.fx?n.x+=n.vx*=d:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=d:(n.y=n.fy,n.vy=0)}function o(){for(var e,n=0,r=t.length;n<r;++n){if(e=t[n],e.index=n,isNaN(e.x)||isNaN(e.y)){var i=v*Math.sqrt(n),a=n*m;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function s(e){return e.initialize&&e.initialize(t),e}var u,c=1,h=.001,l=1-Math.pow(h,1/300),f=0,d=.6,g=n.map(),p=i.timer(e),y=r.dispatch("tick","end");return null==t&&(t=[]),o(),u={tick:a,restart:function(){return p.restart(e),u},stop:function(){return p.stop(),u},nodes:function(e){return arguments.length?(t=e,o(),g.each(s),u):t},alpha:function(t){return arguments.length?(c=+t,u):c},alphaMin:function(t){return arguments.length?(h=+t,u):h},alphaDecay:function(t){return arguments.length?(l=+t,u):+l},alphaTarget:function(t){return arguments.length?(f=+t,u):f},velocityDecay:function(t){return arguments.length?(d=1-t,
16u):1-d},force:function(t,e){return arguments.length>1?(null==e?g.remove(t):g.set(t,s(e)),u):g.get(t)},find:function(e,n,r){var i,a,o,s,u,c=0,h=t.length;for(null==r?r=1/0:r*=r,c=0;c<h;++c)s=t[c],i=e-s.x,a=n-s.y,o=i*i+a*a,o<r&&(u=s,r=o);return u},on:function(t,e){return arguments.length>1?(y.on(t,e),u):y.on(t)}}},x=function(){function t(t){var n,u=a.length,l=e.quadtree(a,c,h).visitAfter(r);for(s=t,n=0;n<u;++n)o=a[n],l.visit(i)}function n(){if(a){var t,e,n=a.length;for(u=new Array(n),t=0;t<n;++t)e=a[t],u[e.index]=+l(e,t,a)}}function r(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else{e=t,e.x=e.data.x,e.y=e.data.y;do o+=u[e.data.index];while(e=e.next)}t.value=o}function i(t,e,n,r){if(!t.value)return!0;var i=t.x-o.x,a=t.y-o.y,c=r-e,h=i*i+a*a;if(c*c/v<h)return h<p&&(0===i&&(i=d(),h+=i*i),0===a&&(a=d(),h+=a*a),h<g&&(h=Math.sqrt(g*h)),o.vx+=i*t.value*s/h,o.vy+=a*t.value*s/h),!0;if(!(t.length||h>=p)){(t.data!==o||t.next)&&(0===i&&(i=d(),h+=i*i),0===a&&(a=d(),h+=a*a),h<g&&(h=Math.sqrt(g*h)));do t.data!==o&&(c=u[t.data.index]*s/h,o.vx+=i*c,o.vy+=a*c);while(t=t.next)}}var a,o,s,u,l=f(-30),g=1,p=1/0,v=.81;return t.initialize=function(t){a=t,n()},t.strength=function(e){return arguments.length?(l="function"==typeof e?e:f(+e),n(),t):l},t.distanceMin=function(e){return arguments.length?(g=e*e,t):Math.sqrt(g)},t.distanceMax=function(e){return arguments.length?(p=e*e,t):Math.sqrt(p)},t.theta=function(e){return arguments.length?(v=e*e,t):Math.sqrt(v)},t},b=function(t,e,n){function r(t){for(var r=0,i=a.length;r<i;++r){var u=a[r],c=u.x-e||1e-6,h=u.y-n||1e-6,l=Math.sqrt(c*c+h*h),f=(s[r]-l)*o[r]*t/l;u.vx+=c*f,u.vy+=h*f}}function i(){if(a){var e,n=a.length;for(o=new Array(n),s=new Array(n),e=0;e<n;++e)s[e]=+t(a[e],e,a),o[e]=isNaN(s[e])?0:+u(a[e],e,a)}}var a,o,s,u=f(.1);return"function"!=typeof t&&(t=f(+t)),null==e&&(e=0),null==n&&(n=0),r.initialize=function(t){a=t,i()},r.strength=function(t){return arguments.length?(u="function"==typeof t?t:f(+t),i(),r):u},r.radius=function(e){return arguments.length?(t="function"==typeof e?e:f(+e),i(),r):t},r.x=function(t){return arguments.length?(e=+t,r):e},r.y=function(t){return arguments.length?(n=+t,r):n},r},_=function(t){function e(t){for(var e,n=0,o=r.length;n<o;++n)e=r[n],e.vx+=(a[n]-e.x)*i[n]*t}function n(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)i[e]=isNaN(a[e]=+t(r[e],e,r))?0:+o(r[e],e,r)}}var r,i,a,o=f(.1);return"function"!=typeof t&&(t=f(null==t?0:+t)),e.initialize=function(t){r=t,n()},e.strength=function(t){return arguments.length?(o="function"==typeof t?t:f(+t),n(),e):o},e.x=function(r){return arguments.length?(t="function"==typeof r?r:f(+r),n(),e):t},e},w=function(t){function e(t){for(var e,n=0,o=r.length;n<o;++n)e=r[n],e.vy+=(a[n]-e.y)*i[n]*t}function n(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)i[e]=isNaN(a[e]=+t(r[e],e,r))?0:+o(r[e],e,r)}}var r,i,a,o=f(.1);return"function"!=typeof t&&(t=f(null==t?0:+t)),e.initialize=function(t){r=t,n()},e.strength=function(t){return arguments.length?(o="function"==typeof t?t:f(+t),n(),e):o},e.y=function(r){return arguments.length?(t="function"==typeof r?r:f(+r),n(),e):t},e};t.forceCenter=l,t.forceCollide=g,t.forceLink=p,t.forceManyBody=x,t.forceRadial=b,t.forceSimulation=y,t.forceX=_,t.forceY=w,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function n(t){return t=e(Math.abs(t)),t?t[1]:NaN}function r(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function i(t,e){t=t.toPrecision(e);t:for(var n,r=t.length,i=1,a=-1;i<r;++i)switch(t[i]){case".":a=n=i;break;case"0":0===a&&(a=i),n=i;break;case"e":break t;default:a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(n+1):t}function a(t,n){var r=e(t,n);if(!r)return t+"";var i=r[0],a=r[1],o=a-(p=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+e(t,Math.max(0,n+o-1))[0]}function o(t,n){var r=e(t,n);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}function s(t){return new u(t)}function u(t){if(!(e=m.exec(t)))throw new Error("invalid format: "+t);var e,n=e[1]||" ",r=e[2]||">",i=e[3]||"-",a=e[4]||"",o=!!e[5],s=e[6]&&+e[6],u=!!e[7],c=e[8]&&+e[8].slice(1),h=e[9]||"";"n"===h?(u=!0,h="g"):v[h]||(h=""),(o||"0"===n&&"="===r)&&(o=!0,n="0",r="="),this.fill=n,this.align=r,this.sign=i,this.symbol=a,this.zero=o,this.width=s,this.comma=u,this.precision=c,this.type=h}function c(t){return t}function h(t){function e(t){function e(t){var e,o,s,c=m,v=y;if("c"===g)v=b(t)+v,t="";else{t=+t;var w=(t<0||1/t<0)&&(t*=-1,!0);if(t=b(t,d),w)for(e=-1,o=t.length,w=!1;++e<o;)if(s=t.charCodeAt(e),48<s&&s<58||"x"===g&&96<s&&s<103||"X"===g&&64<s&&s<71){w=!0;break}if(c=(w?"("===i?i:"-":"-"===i||"("===i?"":i)+c,v=v+("s"===g?x[8+p/3]:"")+(w&&"("===i?")":""),_)for(e=-1,o=t.length;++e<o;)if(s=t.charCodeAt(e),48>s||s>57){v=(46===s?u+t.slice(e+1):t.slice(e))+v,t=t.slice(0,e);break}}f&&!h&&(t=a(t,1/0));var M=c.length+t.length+v.length,S=M<l?new Array(l-M+1).join(n):"";switch(f&&h&&(t=a(S+t,S.length?l-v.length:1/0),S=""),r){case"<":return c+t+v+S;case"=":return c+S+t+v;case"^":return S.slice(0,M=S.length>>1)+c+t+v+S.slice(M)}return S+c+t+v}t=s(t);var n=t.fill,r=t.align,i=t.sign,c=t.symbol,h=t.zero,l=t.width,f=t.comma,d=t.precision,g=t.type,m="$"===c?o[0]:"#"===c&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",y="$"===c?o[1]:/[%p]/.test(g)?"%":"",b=v[g],_=!g||/[defgprs%]/.test(g);return d=null==d?g?6:12:/[gprs]/.test(g)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),e.toString=function(){return t+""},e}function i(t,r){var i=e((t=s(t),t.type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor(n(r)/3))),o=Math.pow(10,-a),u=x[8+a/3];return function(t){return i(o*t)+u}}var a=t.grouping&&t.thousands?r(t.grouping,t.thousands):c,o=t.currency,u=t.decimal;return{format:e,formatPrefix:i}}function l(e){return y=h(e),t.format=y.format,t.formatPrefix=y.formatPrefix,y}function f(t){return Math.max(0,-n(Math.abs(t)))}function d(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(e)/3)))-n(Math.abs(t)))}function g(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,n(e)-n(t))+1}var p,v={"":i,"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return o(100*t,e)},r:o,s:a,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},m=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;u.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var y,x=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];l({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),t.formatDefaultLocale=l,t.formatLocale=h,t.formatSpecifier=s,t.precisionFixed=f,t.precisionPrefix=d,t.precisionRound=g,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,u,c,h,l,f,d=t._root,g={data:r},p=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!d)return t._root=g,t;for(;d.length;)if((c=e>=(a=(p+m)/2))?p=a:m=a,(h=n>=(o=(v+y)/2))?v=o:y=o,i=d,!(d=d[l=h<<1|c]))return i[l]=g,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return g.next=d,i?i[l]=g:t._root=g,t;do i=i?i[l]=new Array(4):t._root=new Array(4),(c=e>=(a=(p+m)/2))?p=a:m=a,(h=n>=(o=(v+y)/2))?v=o:y=o;while((l=h<<1|c)===(f=(u>=o)<<1|s>=a));return i[f]=d,i[l]=g,t}function n(t){var n,r,i,a,o=t.length,s=new Array(o),u=new Array(o),c=1/0,h=1/0,l=-(1/0),f=-(1/0);for(r=0;r<o;++r)isNaN(i=+this._x.call(null,n=t[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=i,u[r]=a,i<c&&(c=i),i>l&&(l=i),a<h&&(h=a),a>f&&(f=a));for(l<c&&(c=this._x0,l=this._x1),f<h&&(h=this._y0,f=this._y1),this.cover(c,h).cover(l,f),r=0;r<o;++r)e(this,s[r],u[r],t[r]);return this}function r(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function i(t){return t[0]}function a(t){return t[1]}function o(t,e,n){var r=new s(null==e?i:e,null==n?a:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function s(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function u(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var c=function(t){var n=+this._x.call(null,t),r=+this._y.call(null,t);return e(this.cover(n,r),n,r,t)},h=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{if(!(n>t||t>i||r>e||e>a))return this;var o,s,u=i-n,c=this._root;switch(s=(e<(r+a)/2)<<1|t<(n+i)/2){case 0:do o=new Array(4),o[s]=c,c=o;while(u*=2,i=n+u,a=r+u,t>i||e>a);break;case 1:do o=new Array(4),o[s]=c,c=o;while(u*=2,n=i-u,a=r+u,n>t||e>a);break;case 2:do o=new Array(4),o[s]=c,c=o;while(u*=2,i=n+u,r=a-u,t>i||r>e);break;case 3:do o=new Array(4),o[s]=c,c=o;while(u*=2,n=i-u,r=a-u,n>t||r>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},l=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},f=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},d=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i},g=function(t,e,n){var r,i,a,o,s,u,c,h=this._x0,l=this._y0,f=this._x1,g=this._y1,p=[],v=this._root;for(v&&p.push(new d(v,h,l,f,g)),null==n?n=1/0:(h=t-n,l=e-n,f=t+n,g=e+n,n*=n);u=p.pop();)if(!(!(v=u.node)||(i=u.x0)>f||(a=u.y0)>g||(o=u.x1)<h||(s=u.y1)<l))if(v.length){var m=(i+o)/2,y=(a+s)/2;p.push(new d(v[3],m,y,o,s),new d(v[2],i,y,m,s),new d(v[1],m,a,o,y),new d(v[0],i,a,m,y)),(c=(e>=y)<<1|t>=m)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_<n){var w=Math.sqrt(n=_);h=t-w,l=e-w,f=t+w,g=e+w,r=v.data}}return r},p=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,u,c,h,l,f,d=this._root,g=this._x0,p=this._y0,v=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(g+v)/2))?g=s:v=s,(h=o>=(u=(p+m)/2))?p=u:m=u,e=d,!(d=d[l=h<<1|c]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,f=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},v=function(){return this._root},m=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},y=function(t){var e,n,r,i,a,o,s=[],u=this._root;for(u&&s.push(new d(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&u.length){var c=(r+a)/2,h=(i+o)/2;(n=u[3])&&s.push(new d(n,c,h,a,o)),(n=u[2])&&s.push(new d(n,r,h,c,o)),(n=u[1])&&s.push(new d(n,c,i,a,h)),(n=u[0])&&s.push(new d(n,r,i,c,h))}return this},x=function(t){var e,n=[],r=[];for(this._root&&n.push(new d(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,u=e.x1,c=e.y1,h=(o+u)/2,l=(s+c)/2;(a=i[0])&&n.push(new d(a,o,s,h,l)),(a=i[1])&&n.push(new d(a,h,s,u,l)),(a=i[2])&&n.push(new d(a,o,l,h,c)),(a=i[3])&&n.push(new d(a,h,l,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},b=function(t){return arguments.length?(this._x=t,this):this._x},_=function(t){return arguments.length?(this._y=t,this):this._y},w=o.prototype=s.prototype;w.copy=function(){var t,e,n=new s(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=u(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=u(e));return n},w.add=c,w.addAll=n,w.cover=h,w.data=l,w.extent=f,w.find=g,w.remove=p,w.removeAll=r,w.root=v,w.size=m,w.visit=y,w.visitAfter=x,w.x=b,w.y=_,t.quadtree=o,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,r){r(e,n(98),n(44),n(100),n(99),n(47),n(101),n(45))}(this,function(t,e,n,r,i,a,o,s){"use strict";function u(t){function e(e){var n=e+"",o=r.get(n);if(!o){if(a!==Q)return a;r.set(n,o=i.push(e))}return t[(o-1)%t.length]}var r=n.map(),i=[],a=Q;return t=null==t?[]:$.call(t),e.domain=function(t){if(!arguments.length)return i.slice();i=[],r=n.map();for(var a,o,s=-1,u=t.length;++s<u;)r.has(o=(a=t[s])+"")||r.set(o,i.push(a));return e},e.range=function(n){return arguments.length?(t=$.call(n),e):t.slice()},e.unknown=function(t){return arguments.length?(a=t,e):a},e.copy=function(){return u().domain(i).range(t).unknown(a)},e}function c(){function t(){var t=a().length,i=s[1]<s[0],u=s[i-0],c=s[1-i];n=(c-u)/Math.max(1,t-l+2*f),h&&(n=Math.floor(n)),u+=(c-u-n*(t-l))*d,r=n*(1-l),h&&(u=Math.round(u),r=Math.round(r));var g=e.range(t).map(function(t){return u+n*t});return o(i?g.reverse():g)}var n,r,i=u().unknown(void 0),a=i.domain,o=i.range,s=[0,1],h=!1,l=0,f=0,d=.5;return delete i.unknown,i.domain=function(e){return arguments.length?(a(e),t()):a()},i.range=function(e){return arguments.length?(s=[+e[0],+e[1]],t()):s.slice()},i.rangeRound=function(e){return s=[+e[0],+e[1]],h=!0,t()},i.bandwidth=function(){return r},i.step=function(){return n},i.round=function(e){return arguments.length?(h=!!e,t()):h},i.padding=function(e){return arguments.length?(l=f=Math.max(0,Math.min(1,e)),t()):l},i.paddingInner=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),t()):l},i.paddingOuter=function(e){return arguments.length?(f=Math.max(0,Math.min(1,e)),t()):f},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),t()):d},i.copy=function(){return c().domain(a()).range(s).round(h).paddingInner(l).paddingOuter(f).align(d)},t()}function h(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return h(e())},t}function l(){return h(c().paddingInner(1))}function f(t){return function(){return t}}function d(t){return+t}function g(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:f(e)}function p(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}function v(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}function m(t,e,n,r){var i=t[0],a=t[1],o=e[0],s=e[1];return a<i?(i=n(a,i),o=r(s,o)):(i=n(i,a),o=r(o,s)),function(t){return o(i(t))}}function y(t,n,r,i){var a=Math.min(t.length,n.length)-1,o=new Array(a),s=new Array(a),u=-1;for(t[a]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<a;)o[u]=r(t[u],t[u+1]),s[u]=i(n[u],n[u+1]);return function(n){var r=e.bisect(t,n,1,a)-1;return s[r](o[r](n))}}function x(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function b(t,e){function n(){return a=Math.min(u.length,c.length)>2?y:m,o=s=null,i}function i(e){return(o||(o=a(u,c,l?p(t):t,h)))(+e)}var a,o,s,u=K,c=K,h=r.interpolate,l=!1;return i.invert=function(t){return(s||(s=a(c,u,g,l?v(e):e)))(+t)},i.domain=function(t){return arguments.length?(u=Z.call(t,d),n()):u.slice()},i.range=function(t){return arguments.length?(c=$.call(t),n()):c.slice()},i.rangeRound=function(t){return c=$.call(t),h=r.interpolateRound,n()},i.clamp=function(t){return arguments.length?(l=!!t,n()):l},i.interpolate=function(t){return arguments.length?(h=t,n()):h},n()}function _(t,n,r){var a,o=t[0],s=t[t.length-1],u=e.tickStep(o,s,null==n?10:n);switch(r=i.formatSpecifier(null==r?",f":r),r.type){case"s":var c=Math.max(Math.abs(o),Math.abs(s));return null!=r.precision||isNaN(a=i.precisionPrefix(u,c))||(r.precision=a),i.formatPrefix(r,c);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=i.precisionRound(u,Math.max(Math.abs(o),Math.abs(s))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=i.precisionFixed(u))||(r.precision=a-2*("%"===r.type))}return i.format(r)}function w(t){var n=t.domain;return t.ticks=function(t){var r=n();return e.ticks(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,e){return _(n(),t,e)},t.nice=function(r){var i=n(),a=i.length-1,o=null==r?10:r,s=i[0],u=i[a],c=e.tickStep(s,u,o);return c&&(c=e.tickStep(Math.floor(s/c)*c,Math.ceil(u/c)*c,o),i[0]=Math.floor(s/c)*c,i[a]=Math.ceil(u/c)*c,n(i)),t},t}function M(){var t=b(g,r.interpolateNumber);return t.copy=function(){return x(t,M())},w(t)}function S(){function t(t){return+t}var e=[0,1];return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=Z.call(n,d),t):e.slice()},t.copy=function(){return S().domain(e)},w(t)}function k(t,e){t=t.slice();var n,r=0,i=t.length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function A(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:f(e)}function C(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function T(t){return isFinite(t)?+("1e"+t):t<0?0:t}function E(t){return 10===t?T:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function P(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function I(t){return function(e){return-t(-e)}}function N(){function t(){return o=P(a),s=E(a),r()[0]<0&&(o=I(o),s=I(s)),n}var n=b(A,C).domain([1,10]),r=n.domain,a=10,o=P(10),s=E(10);return n.base=function(e){return arguments.length?(a=+e,t()):a},n.domain=function(e){return arguments.length?(r(e),t()):r()},n.ticks=function(t){var n,i=r(),u=i[0],c=i[i.length-1];(n=c<u)&&(d=u,u=c,c=d);var h,l,f,d=o(u),g=o(c),p=null==t?10:+t,v=[];if(!(a%1)&&g-d<p){if(d=Math.round(d)-1,g=Math.round(g)+1,u>0){for(;d<g;++d)for(l=1,h=s(d);l<a;++l)if(f=h*l,!(f<u)){if(f>c)break;v.push(f)}}else for(;d<g;++d)for(l=a-1,h=s(d);l>=1;--l)if(f=h*l,!(f<u)){if(f>c)break;v.push(f)}}else v=e.ticks(d,g,Math.min(g-d,p)).map(s);return n?v.reverse():v},n.tickFormat=function(t,e){if(null==e&&(e=10===a?".0e":","),"function"!=typeof e&&(e=i.format(e)),t===1/0)return e;null==t&&(t=10);var r=Math.max(1,a*t/n.ticks().length);return function(t){var n=t/s(Math.round(o(t)));return n*a<a-.5&&(n*=a),n<=r?e(t):""}},n.nice=function(){return r(k(r(),{floor:function(t){return s(Math.floor(o(t)))},ceil:function(t){return s(Math.ceil(o(t)))}}))},n.copy=function(){return x(n,N().base(a))},n}function B(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function F(){function t(t,e){return(e=B(e,n)-(t=B(t,n)))?function(r){return(B(r,n)-t)/e}:f(e)}function e(t,e){return e=B(e,n)-(t=B(t,n)),function(r){return B(t+e*r,1/n)}}var n=1,r=b(t,e),i=r.domain;return r.exponent=function(t){return arguments.length?(n=+t,i(i())):n},r.copy=function(){return x(r,F().exponent(n))},w(r)}function O(){return F().exponent(.5)}function L(){function t(){var t=0,o=Math.max(1,i.length);for(a=new Array(o-1);++t<o;)a[t-1]=e.quantile(r,t/o);return n}function n(t){if(!isNaN(t=+t))return i[e.bisect(a,t)]}var r=[],i=[],a=[];return n.invertExtent=function(t){var e=i.indexOf(t);return e<0?[NaN,NaN]:[e>0?a[e-1]:r[0],e<a.length?a[e]:r[r.length-1]]},n.domain=function(n){if(!arguments.length)return r.slice();r=[];for(var i,a=0,o=n.length;a<o;++a)i=n[a],null==i||isNaN(i=+i)||r.push(i);return r.sort(e.ascending),t()},n.range=function(e){return arguments.length?(i=$.call(e),t()):i.slice()},n.quantiles=function(){return a.slice()},n.copy=function(){return L().domain(r).range(i)},n}function D(){function t(t){if(t<=t)return s[e.bisect(o,t,0,a)]}function n(){var e=-1;for(o=new Array(a);++e<a;)o[e]=((e+1)*i-(e-a)*r)/(a+1);return t}var r=0,i=1,a=1,o=[.5],s=[0,1];return t.domain=function(t){return arguments.length?(r=+t[0],i=+t[1],n()):[r,i]},t.range=function(t){return arguments.length?(a=(s=$.call(t)).length-1,n()):s.slice()},t.invertExtent=function(t){var e=s.indexOf(t);return e<0?[NaN,NaN]:e<1?[r,o[0]]:e>=a?[o[a-1],i]:[o[e-1],o[e]]},t.copy=function(){return D().domain([r,i]).range(s)},w(t)}function R(){function t(t){if(t<=t)return r[e.bisect(n,t,0,i)]}var n=[.5],r=[0,1],i=1;return t.domain=function(e){return arguments.length?(n=$.call(e),i=Math.min(n.length,r.length-1),t):n.slice()},t.range=function(e){return arguments.length?(r=$.call(e),i=Math.min(n.length,r.length-1),t):r.slice()},t.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},t.copy=function(){return R().domain(n).range(r)},t}function z(t){return new Date(t)}function G(t){return t instanceof Date?+t:+new Date(+t)}function j(t,n,i,a,o,s,u,c,h){function l(e){return(u(e)<e?m:s(e)<e?y:o(e)<e?_:a(e)<e?w:n(e)<e?i(e)<e?M:S:t(e)<e?A:C)(e)}function f(n,r,i,a){if(null==n&&(n=10),"number"==typeof n){var o=Math.abs(i-r)/n,s=e.bisector(function(t){return t[2]}).right(T,o);s===T.length?(a=e.tickStep(r/at,i/at,n),n=t):s?(s=T[o/T[s-1][2]<T[s][2]/o?s-1:s],a=s[1],n=s[0]):(a=e.tickStep(r,i,n),n=c)}return null==a?n:n.every(a)}var d=b(g,r.interpolateNumber),p=d.invert,v=d.domain,m=h(".%L"),y=h(":%S"),_=h("%I:%M"),w=h("%I %p"),M=h("%a %d"),S=h("%b %d"),A=h("%B"),C=h("%Y"),T=[[u,1,J],[u,5,5*J],[u,15,15*J],[u,30,30*J],[s,1,tt],[s,5,5*tt],[s,15,15*tt],[s,30,30*tt],[o,1,et],[o,3,3*et],[o,6,6*et],[o,12,12*et],[a,1,nt],[a,2,2*nt],[i,1,rt],[n,1,it],[n,3,3*it],[t,1,at]];return d.invert=function(t){return new Date(p(t))},d.domain=function(t){return arguments.length?v(Z.call(t,G)):v().map(z)},d.ticks=function(t,e){var n,r=v(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=f(t,i,a,e),n=n?n.range(i,a+1):[],o?n.reverse():n},d.tickFormat=function(t,e){return null==e?l:h(e)},d.nice=function(t,e){var n=v();return(t=f(t,n[0],n[n.length-1],e))?v(k(n,t)):d},d.copy=function(){return x(d,j(t,n,i,a,o,s,u,c,h))},d}function U(){return j(a.timeYear,a.timeMonth,a.timeWeek,a.timeDay,a.timeHour,a.timeMinute,a.timeSecond,a.timeMillisecond,o.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}function Y(){return j(a.utcYear,a.utcMonth,a.utcWeek,a.utcDay,a.utcHour,a.utcMinute,a.utcSecond,a.utcMillisecond,o.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}function X(t){return t.match(/.{6}/g).map(function(t){return"#"+t})}function H(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return dt.h=360*t-100,dt.s=1.5-1.5*e,dt.l=.8-.9*e,dt+""}function W(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function q(t){function e(e){var a=(e-n)/(r-n);return t(i?Math.max(0,Math.min(1,a)):a)}var n=0,r=1,i=!1;return e.domain=function(t){return arguments.length?(n=+t[0],r=+t[1],e):[n,r]},e.clamp=function(t){return arguments.length?(i=!!t,e):i},e.interpolator=function(n){return arguments.length?(t=n,e):t},e.copy=function(){return q(t).domain([n,r]).clamp(i)},w(e)}var V=Array.prototype,Z=V.map,$=V.slice,Q={name:"implicit"},K=[0,1],J=1e3,tt=60*J,et=60*tt,nt=24*et,rt=7*nt,it=30*nt,at=365*nt,ot=X("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),st=X("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),ut=X("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ct=X("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ht=r.interpolateCubehelixLong(s.cubehelix(300,.5,0),s.cubehelix(-240,.5,1)),lt=r.interpolateCubehelixLong(s.cubehelix(-100,.75,.35),s.cubehelix(80,1.5,.8)),ft=r.interpolateCubehelixLong(s.cubehelix(260,.75,.35),s.cubehelix(80,1.5,.8)),dt=s.cubehelix(),gt=W(X("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pt=W(X("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vt=W(X("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),mt=W(X("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));t.scaleBand=c,t.scalePoint=l,t.scaleIdentity=S,t.scaleLinear=M,t.scaleLog=N,t.scaleOrdinal=u,t.scaleImplicit=Q,t.scalePow=F,t.scaleSqrt=O,t.scaleQuantile=L,t.scaleQuantize=D,t.scaleThreshold=R,t.scaleTime=U,t.scaleUtc=Y,t.schemeCategory10=ot,t.schemeCategory20b=st,t.schemeCategory20c=ut,t.schemeCategory20=ct,t.interpolateCubehelixDefault=ht,t.interpolateRainbow=H,t.interpolateWarm=lt,t.interpolateCool=ft,t.interpolateViridis=gt,t.interpolateMagma=pt,t.interpolateInferno=vt,t.interpolatePlasma=mt,t.scaleSequential=q,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ut.hasOwnProperty(e)?{space:Ut[e],local:t}:t}function n(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===jt&&e.documentElement.namespaceURI===jt?e.createElement(t):e.createElementNS(n,t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(t){var i=e(t);return(i.local?r:n)(i)}function a(){return new o}function o(){this._="@"+(++Yt).toString(36)}function s(t,e,n){return t=u(t,e,n),function(e){var n=e.relatedTarget;
17n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function u(e,n,r){return function(i){var a=t.event;t.event=i;try{e.call(this,this.__data__,n,r)}finally{t.event=a}}}function c(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function h(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function l(t,e,n){var r=Vt.hasOwnProperty(t.type)?s:u;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var h=0,l=u.length;h<l;++h)if((s=u[h]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function f(t,e,n){var r,i,a=c(t+""),o=a.length;{if(!(arguments.length<2)){for(s=e?l:h,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,f=0,d=s.length;f<d;++f)for(r=0,u=s[f];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value}}function d(e,n,r,i){var a=t.event;e.sourceEvent=t.event,t.event=e;try{return n.apply(r,i)}finally{t.event=a}}function g(){for(var e,n=t.event;e=n.sourceEvent;)n=e;return n}function p(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function v(t){var e=g();return e.changedTouches&&(e=e.changedTouches[0]),p(t,e)}function m(){}function y(t){return null==t?m:function(){return this.querySelector(t)}}function x(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,c=r[i]=new Array(u),h=0;h<u;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),c[h]=o);return new Ot(r,this._parents)}function b(){return[]}function _(t){return null==t?b:function(){return this.querySelectorAll(t)}}function w(t){"function"!=typeof t&&(t=_(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new Ot(r,i)}function M(t){"function"!=typeof t&&(t=qt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Ot(r,this._parents)}function S(t){return new Array(t.length)}function k(){return new Ot(this._enter||this._groups.map(S),this._parents)}function A(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function C(t){return function(){return t}}function T(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new A(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function E(t,e,n,r,i,a,o){var s,u,c,h={},l=e.length,f=a.length,d=new Array(l);for(s=0;s<l;++s)(u=e[s])&&(d[s]=c=$t+o.call(u,u.__data__,s,e),c in h?i[s]=u:h[c]=u);for(s=0;s<f;++s)c=$t+o.call(t,a[s],s,a),(u=h[c])?(r[s]=u,u.__data__=a[s],h[c]=null):n[s]=new A(t,a[s]);for(s=0;s<l;++s)(u=e[s])&&h[d[s]]===u&&(i[s]=u)}function P(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each(function(t){d[++c]=t}),d;var n=e?E:T,r=this._parents,i=this._groups;"function"!=typeof t&&(t=C(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),c=0;c<a;++c){var h=r[c],l=i[c],f=l.length,d=t.call(h,h&&h.__data__,c,r),g=d.length,p=s[c]=new Array(g),v=o[c]=new Array(g),m=u[c]=new Array(f);n(h,l,p,v,m,d,e);for(var y,x,b=0,_=0;b<g;++b)if(y=p[b]){for(b>=_&&(_=b+1);!(x=v[_])&&++_<g;);y._next=x||null}}return o=new Ot(o,r),o._enter=s,o._exit=u,o}function I(){return new Ot(this._exit||this._groups.map(S),this._parents)}function N(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],h=n[s],l=c.length,f=o[s]=new Array(l),d=0;d<l;++d)(u=c[d]||h[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Ot(o,this._parents)}function B(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}function F(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=O);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,c=i[a]=new Array(u),h=0;h<u;++h)(o=s[h])&&(c[h]=o);c.sort(e)}return new Ot(i,this._parents).order()}function O(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function L(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function D(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function R(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function z(){var t=0;return this.each(function(){++t}),t}function G(){return!this.node()}function j(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this}function U(t){return function(){this.removeAttribute(t)}}function Y(t){return function(){this.removeAttributeNS(t.space,t.local)}}function X(t,e){return function(){this.setAttribute(t,e)}}function H(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function q(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function V(t,n){var r=e(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==n?r.local?Y:U:"function"==typeof n?r.local?q:W:r.local?H:X)(r,n))}function Z(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $(t){return function(){this.style.removeProperty(t)}}function Q(t,e,n){return function(){this.style.setProperty(t,e,n)}}function K(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function J(t,e,n){var r;return arguments.length>1?this.each((null==e?$:"function"==typeof e?K:Q)(t,e,null==n?"":n)):Z(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function tt(t){return function(){delete this[t]}}function et(t,e){return function(){this[t]=e}}function nt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function rt(t,e){return arguments.length>1?this.each((null==e?tt:"function"==typeof e?nt:et)(t,e)):this.node()[t]}function it(t){return t.trim().split(/^|\s+/)}function at(t){return t.classList||new ot(t)}function ot(t){this._node=t,this._names=it(t.getAttribute("class")||"")}function st(t,e){for(var n=at(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ut(t,e){for(var n=at(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ct(t){return function(){st(this,t)}}function ht(t){return function(){ut(this,t)}}function lt(t,e){return function(){(e.apply(this,arguments)?st:ut)(this,t)}}function ft(t,e){var n=it(t+"");if(arguments.length<2){for(var r=at(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?lt:e?ct:ht)(n,e))}function dt(){this.textContent=""}function gt(t){return function(){this.textContent=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function vt(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?pt:gt)(t)):this.node().textContent}function mt(){this.innerHTML=""}function yt(t){return function(){this.innerHTML=t}}function xt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function bt(t){return arguments.length?this.each(null==t?mt:("function"==typeof t?xt:yt)(t)):this.node().innerHTML}function _t(){this.nextSibling&&this.parentNode.appendChild(this)}function wt(){return this.each(_t)}function Mt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function St(){return this.each(Mt)}function kt(t){var e="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function At(){return null}function Ct(t,e){var n="function"==typeof t?t:i(t),r=null==e?At:"function"==typeof e?e:y(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Tt(){var t=this.parentNode;t&&t.removeChild(this)}function Et(){return this.each(Tt)}function Pt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function It(t,e,n){var r=Z(t),i=r.CustomEvent;i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Nt(t,e){return function(){return It(this,t,e)}}function Bt(t,e){return function(){return It(this,t,e.apply(this,arguments))}}function Ft(t,e){return this.each(("function"==typeof e?Bt:Nt)(t,e))}function Ot(t,e){this._groups=t,this._parents=e}function Lt(){return new Ot([[document.documentElement]],Qt)}function Dt(t){return"string"==typeof t?new Ot([[document.querySelector(t)]],[document.documentElement]):new Ot([[t]],Qt)}function Rt(t){return"string"==typeof t?new Ot([document.querySelectorAll(t)],[document.documentElement]):new Ot([null==t?[]:t],Qt)}function zt(t,e,n){arguments.length<3&&(n=e,e=g().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return p(t,r);return null}function Gt(t,e){null==e&&(e=g().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=p(t,e[n]);return i}var jt="http://www.w3.org/1999/xhtml",Ut={svg:"http://www.w3.org/2000/svg",xhtml:jt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Yt=0;o.prototype=a.prototype={constructor:o,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Xt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Ht=document.documentElement;if(!Ht.matches){var Wt=Ht.webkitMatchesSelector||Ht.msMatchesSelector||Ht.mozMatchesSelector||Ht.oMatchesSelector;Xt=function(t){return function(){return Wt.call(this,t)}}}}var qt=Xt,Vt={};if(t.event=null,"undefined"!=typeof document){var Zt=document.documentElement;"onmouseenter"in Zt||(Vt={mouseenter:"mouseover",mouseleave:"mouseout"})}A.prototype={constructor:A,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var $t="$";ot.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Qt=[null];Ot.prototype=Lt.prototype={constructor:Ot,select:x,selectAll:w,filter:M,data:P,enter:k,exit:I,merge:N,order:B,sort:F,call:L,nodes:D,node:R,size:z,empty:G,each:j,attr:V,style:J,property:rt,classed:ft,text:vt,html:bt,raise:wt,lower:St,append:kt,insert:Ct,remove:Et,datum:Pt,on:f,dispatch:Ft},t.creator=i,t.local=a,t.matcher=qt,t.mouse=v,t.namespace=e,t.namespaces=Ut,t.select=Dt,t.selectAll=Rt,t.selection=Lt,t.selector=y,t.selectorAll=_,t.touch=zt,t.touches=Gt,t.window=Z,t.customEvent=d,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),qt.hasOwnProperty(e)?{space:qt[e],local:t}:t}function n(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Wt&&e.documentElement.namespaceURI===Wt?e.createElement(t):e.createElementNS(n,t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(t){var i=e(t);return(i.local?r:n)(i)}function a(){}function o(t){return null==t?a:function(){return this.querySelector(t)}}function s(t){"function"!=typeof t&&(t=o(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,s,u=e[i],c=u.length,h=r[i]=new Array(c),l=0;l<c;++l)(a=u[l])&&(s=t.call(a,a.__data__,l,u))&&("__data__"in a&&(s.__data__=a.__data__),h[l]=s);return new Ft(r,this._parents)}function u(){return[]}function c(t){return null==t?u:function(){return this.querySelectorAll(t)}}function h(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,h=0;h<u;++h)(o=s[h])&&(r.push(t.call(o,o.__data__,h,s)),i.push(o));return new Ft(r,i)}function l(t){"function"!=typeof t&&(t=Qt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Ft(r,this._parents)}function f(t){return new Array(t.length)}function d(){return new Ft(this._enter||this._groups.map(f),this._parents)}function g(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function p(t){return function(){return t}}function v(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new g(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function m(t,e,n,r,i,a,o){var s,u,c,h={},l=e.length,f=a.length,d=new Array(l);for(s=0;s<l;++s)(u=e[s])&&(d[s]=c=Kt+o.call(u,u.__data__,s,e),c in h?i[s]=u:h[c]=u);for(s=0;s<f;++s)c=Kt+o.call(t,a[s],s,a),(u=h[c])?(r[s]=u,u.__data__=a[s],h[c]=null):n[s]=new g(t,a[s]);for(s=0;s<l;++s)(u=e[s])&&h[d[s]]===u&&(i[s]=u)}function y(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each(function(t){d[++c]=t}),d;var n=e?m:v,r=this._parents,i=this._groups;"function"!=typeof t&&(t=p(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),c=0;c<a;++c){var h=r[c],l=i[c],f=l.length,d=t.call(h,h&&h.__data__,c,r),g=d.length,y=s[c]=new Array(g),x=o[c]=new Array(g),b=u[c]=new Array(f);n(h,l,y,x,b,d,e);for(var _,w,M=0,S=0;M<g;++M)if(_=y[M]){for(M>=S&&(S=M+1);!(w=x[S])&&++S<g;);_._next=w||null}}return o=new Ft(o,r),o._enter=s,o._exit=u,o}function x(){return new Ft(this._exit||this._groups.map(f),this._parents)}function b(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],h=n[s],l=c.length,f=o[s]=new Array(l),d=0;d<l;++d)(u=c[d]||h[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Ft(o,this._parents)}function _(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}function w(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=M);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,c=i[a]=new Array(u),h=0;h<u;++h)(o=s[h])&&(c[h]=o);c.sort(e)}return new Ft(i,this._parents).order()}function M(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function S(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function k(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function A(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function C(){var t=0;return this.each(function(){++t}),t}function T(){return!this.node()}function E(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this}function P(t){return function(){this.removeAttribute(t)}}function I(t){return function(){this.removeAttributeNS(t.space,t.local)}}function N(t,e){return function(){this.setAttribute(t,e)}}function B(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function F(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function O(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function L(t,n){var r=e(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==n?r.local?I:P:"function"==typeof n?r.local?O:F:r.local?B:N)(r,n))}function D(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function z(t,e,n){return function(){this.style.setProperty(t,e,n)}}function G(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function j(t,e,n){return arguments.length>1?this.each((null==e?R:"function"==typeof e?G:z)(t,e,null==n?"":n)):U(this.node(),t)}function U(t,e){return t.style.getPropertyValue(e)||D(t).getComputedStyle(t,null).getPropertyValue(e)}function Y(t){return function(){delete this[t]}}function X(t,e){return function(){this[t]=e}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function W(t,e){return arguments.length>1?this.each((null==e?Y:"function"==typeof e?H:X)(t,e)):this.node()[t]}function q(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new Z(t)}function Z(t){this._node=t,this._names=q(t.getAttribute("class")||"")}function $(t,e){for(var n=V(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Q(t,e){for(var n=V(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function K(t){return function(){$(this,t)}}function J(t){return function(){Q(this,t)}}function tt(t,e){return function(){(e.apply(this,arguments)?$:Q)(this,t)}}function et(t,e){var n=q(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?tt:e?K:J)(n,e))}function nt(){this.textContent=""}function rt(t){return function(){this.textContent=t}}function it(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function at(t){return arguments.length?this.each(null==t?nt:("function"==typeof t?it:rt)(t)):this.node().textContent}function ot(){this.innerHTML=""}function st(t){return function(){this.innerHTML=t}}function ut(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ct(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?ut:st)(t)):this.node().innerHTML}function ht(){this.nextSibling&&this.parentNode.appendChild(this)}function lt(){return this.each(ht)}function ft(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dt(){return this.each(ft)}function gt(t){var e="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function pt(){return null}function vt(t,e){var n="function"==typeof t?t:i(t),r=null==e?pt:"function"==typeof e?e:o(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function mt(){var t=this.parentNode;t&&t.removeChild(this)}function yt(){return this.each(mt)}function xt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function bt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function _t(t){return this.select(t?bt:xt)}function wt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Mt(t,e,n){return t=St(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function St(e,n,r){return function(i){var a=t.event;t.event=i;try{e.call(this,this.__data__,n,r)}finally{t.event=a}}}function kt(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function At(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Ct(t,e,n){var r=Jt.hasOwnProperty(t.type)?Mt:St;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var h=0,l=u.length;h<l;++h)if((s=u[h]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Tt(t,e,n){var r,i,a=kt(t+""),o=a.length;{if(!(arguments.length<2)){for(s=e?Ct:At,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,h=s.length;c<h;++c)for(r=0,u=s[c];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value}}function Et(e,n,r,i){var a=t.event;e.sourceEvent=t.event,t.event=e;try{return n.apply(r,i)}finally{t.event=a}}function Pt(t,e,n){var r=D(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function It(t,e){return function(){return Pt(this,t,e)}}function Nt(t,e){return function(){return Pt(this,t,e.apply(this,arguments))}}function Bt(t,e){return this.each(("function"==typeof e?Nt:It)(t,e))}function Ft(t,e){this._groups=t,this._parents=e}function Ot(){return new Ft([[document.documentElement]],ee)}function Lt(t){return"string"==typeof t?new Ft([[document.querySelector(t)]],[document.documentElement]):new Ft([[t]],ee)}function Dt(t){return Lt(i(t).call(document.documentElement))}function Rt(){return new zt}function zt(){this._="@"+(++ne).toString(36)}function Gt(){for(var e,n=t.event;e=n.sourceEvent;)n=e;return n}function jt(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Ut(t){var e=Gt();return e.changedTouches&&(e=e.changedTouches[0]),jt(t,e)}function Yt(t){return"string"==typeof t?new Ft([document.querySelectorAll(t)],[document.documentElement]):new Ft([null==t?[]:t],ee)}function Xt(t,e,n){arguments.length<3&&(n=e,e=Gt().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return jt(t,r);return null}function Ht(t,e){null==e&&(e=Gt().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=jt(t,e[n]);return i}var Wt="http://www.w3.org/1999/xhtml",qt={svg:"http://www.w3.org/2000/svg",xhtml:Wt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Vt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Zt=document.documentElement;if(!Zt.matches){var $t=Zt.webkitMatchesSelector||Zt.msMatchesSelector||Zt.mozMatchesSelector||Zt.oMatchesSelector;Vt=function(t){return function(){return $t.call(this,t)}}}}var Qt=Vt;g.prototype={constructor:g,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Kt="$";Z.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Jt={};if(t.event=null,"undefined"!=typeof document){var te=document.documentElement;"onmouseenter"in te||(Jt={mouseenter:"mouseover",mouseleave:"mouseout"})}var ee=[null];Ft.prototype=Ot.prototype={constructor:Ft,select:s,selectAll:h,filter:l,data:y,enter:d,exit:x,merge:b,order:_,sort:w,call:S,nodes:k,node:A,size:C,empty:T,each:E,attr:L,style:j,property:W,classed:et,text:at,html:ct,raise:lt,lower:dt,append:gt,insert:vt,remove:yt,clone:_t,datum:wt,on:Tt,dispatch:Bt};var ne=0;zt.prototype=Rt.prototype={constructor:zt,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},t.create=Dt,t.creator=i,t.local=Rt,t.matcher=Qt,t.mouse=Ut,t.namespace=e,t.namespaces=qt,t.clientPoint=jt,t.select=Lt,t.selectAll=Yt,t.selection=Ot,t.selector=o,t.selectorAll=c,t.style=U,t.touch=Xt,t.touches=Ht,t.window=D,t.customEvent=Et,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,r){r(e,n(268),n(265),n(262),n(267),n(261))}(this,function(t,e,n,r,i,a){"use strict";function o(){function t(t){var n=b.d3_calcType(e,k,l,d,m.format(y),w),r=t.selectAll("g").data([e]);r.enter().append("g").attr("class",g+"legendCells"),f&&b.d3_filterCells(n,f);var i=t.select("."+g+"legendCells").selectAll("."+g+"cell").data(n.data),E=i.enter().append("g").attr("class",g+"cell");E.append(o).attr("class",g+"swatch");var P=t.selectAll("g."+g+"cell "+o+"."+g+"swatch").data(n.data);b.d3_addEvents(E,T),i.exit().transition().style("opacity",0).remove(),P.exit().transition().style("opacity",0).remove(),P=P.merge(P),b.d3_drawShapes(o,P,u,s,c,A);var I=b.d3_addText(t,E,n.labels,g,M);i=E.merge(i);var N=I.nodes().map(function(t){return t.getBBox()}),B=P.nodes().map(function(t){return t.getBBox()});p?P.attr("class",function(t){return g+"swatch "+n.feature(t)}):"line"==o?P.style("stroke",n.feature):P.style("fill",n.feature);var F=void 0,O=void 0,L="start"==_?0:"middle"==_?.5:1;"vertical"===S?!function(){var t=N.map(function(t,e){return Math.max(t.height,B[e].height)});F=function(e,n){var r=a.sum(t.slice(0,n));return"translate(0, "+(r+n*h)+")"},O=function(t,e){return"translate( "+(B[e].width+B[e].x+x)+", "+(B[e].y+B[e].height/2+5)+")"}}():"horizontal"===S&&(F=function(t,e){return"translate("+e*(B[e].width+h)+",0)"},O=function(t,e){return"translate("+(B[e].width*L+B[e].x)+",\n "+(B[e].height+B[e].y+x+8)+")"}),b.d3_placement(S,i,F,I,O,_),b.d3_title(t,v,g,C),i.transition().style("opacity",1)}var e=i.scaleLinear(),o="rect",s=15,u=15,c=10,h=2,l=[5],f=void 0,d=[],g="",p=!1,v="",m=b.d3_defaultLocale,y=b.d3_defaultFormatSpecifier,x=10,_="middle",w=b.d3_defaultDelimiter,M=void 0,S="vertical",k=!1,A=void 0,C=void 0,T=r.dispatch("cellover","cellout","cellclick");return t.scale=function(n){return arguments.length?(e=n,t):e},t.cells=function(e){return arguments.length?((e.length>1||e>=2)&&(l=e),t):l},t.cellFilter=function(e){return arguments.length?(f=e,t):f},t.shape=function(e,n){return arguments.length?(("rect"==e||"circle"==e||"line"==e||"path"==e&&"string"==typeof n)&&(o=e,A=n),t):o},t.shapeWidth=function(e){return arguments.length?(s=+e,t):s},t.shapeHeight=function(e){return arguments.length?(u=+e,t):u},t.shapeRadius=function(e){return arguments.length?(c=+e,t):c},t.shapePadding=function(e){return arguments.length?(h=+e,t):h},t.labels=function(e){return arguments.length?(d=e,t):d},t.labelAlign=function(e){return arguments.length?("start"!=e&&"end"!=e&&"middle"!=e||(_=e),t):_},t.locale=function(e){return arguments.length?(m=n.formatLocale(e),t):m},t.labelFormat=function(e){return arguments.length?(y=n.formatSpecifier(e),t):t.locale().format(y)},t.labelOffset=function(e){return arguments.length?(x=+e,t):x},t.labelDelimiter=function(e){return arguments.length?(w=e,t):w},t.labelWrap=function(e){return arguments.length?(M=e,t):M},t.useClass=function(e){return arguments.length?(e!==!0&&e!==!1||(p=e),t):p},t.orient=function(e){return arguments.length?(e=e.toLowerCase(),"horizontal"!=e&&"vertical"!=e||(S=e),t):S},t.ascending=function(e){return arguments.length?(k=!!e,t):k},t.classPrefix=function(e){return arguments.length?(g=e,t):g},t.title=function(e){return arguments.length?(v=e,t):v},t.titleWidth=function(e){return arguments.length?(C=e,t):C},t.textWrap=function(e){return arguments.length?(textWrap=e,t):textWrap},t.on=function(){var e=T.on.apply(T,arguments);return e===T?t:e},t}function s(){function t(t){var n=b.d3_calcType(e,w,c,l,g.format(p),y),r=t.selectAll("g").data([e]);h&&b.d3_filterCells(n,h),r.enter().append("g").attr("class",f+"legendCells");var i=t.select("."+f+"legendCells").selectAll("."+f+"cell").data(n.data),A=i.enter().append("g").attr("class",f+"cell");A.append(o).attr("class",f+"swatch");var C=t.selectAll("g."+f+"cell "+o+"."+f+"swatch");b.d3_addEvents(A,k),i.exit().transition().style("opacity",0).remove(),C.exit().transition().style("opacity",0).remove(),C=C.merge(C),"line"===o?(b.d3_drawShapes(o,C,0,s),C.attr("stroke-width",n.feature)):b.d3_drawShapes(o,C,n.feature,n.feature,n.feature,M);var T=b.d3_addText(t,A,n.labels,f,x);i=A.merge(i);var E=T.nodes().map(function(t){return t.getBBox()}),P=C.nodes().map(function(t,r){var i=t.getBBox(),a=e(n.data[r]);return"line"===o&&"horizontal"===_?i.height=i.height+a:"line"===o&&"vertical"===_&&(i.width=i.width),i}),I=a.max(P,function(t){return t.height+t.y}),N=a.max(P,function(t){return t.width+t.x}),B=void 0,F=void 0,O="start"==m?0:"middle"==m?.5:1;"vertical"===_?!function(){var t=E.map(function(t,e){return Math.max(t.height,P[e].height)}),e="circle"==o||"line"==o?P[0].height/2:0;B=function(n,r){var i=a.sum(t.slice(0,r));return"translate(0, "+(e+i+r*u)+")"},F=function(t,e){return"translate( "+(N+v)+",\n "+(P[e].y+P[e].height/2+5)+")"}}():"horizontal"===_&&!function(){B=function(t,e){var n=a.sum(P.slice(0,e),function(t){return t.width}),r="circle"==o||"line"==o?I/2:0;return"translate("+(n+e*u)+", "+r+")"};var t="line"==o?I/2:I;F=function(e,n){return"translate( "+(P[n].width*O+P[n].x)+",\n "+(t+v)+")"}}(),b.d3_placement(_,i,B,T,F,m),b.d3_title(t,d,f,S),i.transition().style("opacity",1)}var e=i.scaleLinear(),o="rect",s=15,u=2,c=[5],h=void 0,l=[],f="",d="",g=b.d3_defaultLocale,p=b.d3_defaultFormatSpecifier,v=10,m="middle",y=b.d3_defaultDelimiter,x=void 0,_="vertical",w=!1,M=void 0,S=void 0,k=r.dispatch("cellover","cellout","cellclick");return t.scale=function(n){return arguments.length?(e=n,t):e},t.cells=function(e){return arguments.length?((e.length>1||e>=2)&&(c=e),t):c},t.cellFilter=function(e){return arguments.length?(h=e,t):h},t.shape=function(e,n){return arguments.length?("rect"!=e&&"circle"!=e&&"line"!=e||(o=e,M=n),t):o},t.shapeWidth=function(e){return arguments.length?(s=+e,t):s},t.shapePadding=function(e){return arguments.length?(u=+e,t):u},t.labels=function(e){return arguments.length?(l=e,t):l},t.labelAlign=function(e){return arguments.length?("start"!=e&&"end"!=e&&"middle"!=e||(m=e),t):m},t.locale=function(e){return arguments.length?(g=n.formatLocale(e),t):g},t.labelFormat=function(e){return arguments.length?(p=n.formatSpecifier(e),t):t.locale().format(p)},t.labelOffset=function(e){return arguments.length?(v=+e,t):v},t.labelDelimiter=function(e){return arguments.length?(y=e,t):y},t.labelWrap=function(e){return arguments.length?(x=e,t):x},t.orient=function(e){return arguments.length?(e=e.toLowerCase(),"horizontal"!=e&&"vertical"!=e||(_=e),t):_},t.ascending=function(e){return arguments.length?(w=!!e,
18t):w},t.classPrefix=function(e){return arguments.length?(f=e,t):f},t.title=function(e){return arguments.length?(d=e,t):d},t.titleWidth=function(e){return arguments.length?(S=e,t):S},t.on=function(){var e=k.on.apply(k,arguments);return e===k?t:e},t}function u(){function t(t){var n=b.d3_calcType(e,S,l,d,v.format(m),_),r=t.selectAll("g").data([e]);f&&b.d3_filterCells(n,f),r.enter().append("g").attr("class",g+"legendCells");var i=t.select("."+g+"legendCells").selectAll("."+g+"cell").data(n.data),C=i.enter().append("g").attr("class",g+"cell");C.append(o).attr("class",g+"swatch");var T=t.selectAll("g."+g+"cell "+o+"."+g+"swatch");b.d3_addEvents(C,A),i.exit().transition().style("opacity",0).remove(),T.exit().transition().style("opacity",0).remove(),T=T.merge(T),b.d3_drawShapes(o,T,u,s,c,n.feature);var E=b.d3_addText(t,C,n.labels,g,w);i=C.merge(i);var P=E.nodes().map(function(t){return t.getBBox()}),I=T.nodes().map(function(t){return t.getBBox()}),N=a.max(I,function(t){return t.height}),B=a.max(I,function(t){return t.width}),F=void 0,O=void 0,L="start"==y?0:"middle"==y?.5:1;"vertical"===M?!function(){var t=P.map(function(t,e){return Math.max(N,t.height)});F=function(e,n){var r=a.sum(t.slice(0,n));return"translate(0, "+(r+n*h)+" )"},O=function(t,e){return"translate( "+(B+x)+",\n "+(I[e].y+I[e].height/2+5)+")"}}():"horizontal"===M&&(F=function(t,e){return"translate( "+e*(B+h)+",0)"},O=function(t,e){return"translate( "+(I[e].width*L+I[e].x)+",\n "+(N+x)+")"}),b.d3_placement(M,i,F,E,O,y),b.d3_title(t,p,g,k),i.transition().style("opacity",1)}var e=i.scaleLinear(),o="path",s=15,u=15,c=10,h=5,l=[5],f=void 0,d=[],g="",p="",v=b.d3_defaultLocale,m=b.d3_defaultFormatSpecifier,y="middle",x=10,_=b.d3_defaultDelimiter,w=void 0,M="vertical",S=!1,k=void 0,A=r.dispatch("cellover","cellout","cellclick");return t.scale=function(n){return arguments.length?(e=n,t):e},t.cells=function(e){return arguments.length?((e.length>1||e>=2)&&(l=e),t):l},t.cellFilter=function(e){return arguments.length?(f=e,t):f},t.shapePadding=function(e){return arguments.length?(h=+e,t):h},t.labels=function(e){return arguments.length?(d=e,t):d},t.labelAlign=function(e){return arguments.length?("start"!=e&&"end"!=e&&"middle"!=e||(y=e),t):y},t.locale=function(e){return arguments.length?(v=n.formatLocale(e),t):v},t.labelFormat=function(e){return arguments.length?(m=n.formatSpecifier(e),t):t.locale().format(m)},t.labelOffset=function(e){return arguments.length?(x=+e,t):x},t.labelDelimiter=function(e){return arguments.length?(_=e,t):_},t.labelWrap=function(e){return arguments.length?(w=e,t):w},t.orient=function(e){return arguments.length?(e=e.toLowerCase(),"horizontal"!=e&&"vertical"!=e||(M=e),t):M},t.ascending=function(e){return arguments.length?(S=!!e,t):S},t.classPrefix=function(e){return arguments.length?(g=e,t):g},t.title=function(e){return arguments.length?(p=e,t):p},t.titleWidth=function(e){return arguments.length?(k=e,t):k},t.on=function(){var e=A.on.apply(A,arguments);return e===A?t:e},t}var c="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},h=function(t){return t},l=function(t){for(var e=[],n=0,r=t.length;n<r;n++)e[n]=t[r-n-1];return e},f=function(t,n){t.each(function(){for(var t,r=e.select(this),i=r.text().split(/\s+/).reverse(),a=[],o=1.2,s=(r.attr("y"),parseFloat(r.attr("dy"))||0),u=r.text(null).append("tspan").attr("x",0).attr("dy",s+"em");t=i.pop();)a.push(t),u.text(a.join(" ")),u.node().getComputedTextLength()>n&&a.length>1&&(a.pop(),u.text(a.join(" ")),a=[t],u=r.append("tspan").attr("x",0).attr("dy",o+s+"em").text(t))})},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=arguments[2],r=arguments[3];if("object"===("undefined"==typeof e?"undefined":c(e))){if(0===e.length)return t;for(var i=e.length;i<t.length;i++)e.push(t[i]);return e}if("function"==typeof e){for(var a=[],o=t.length,s=0;s<o;s++)a.push(e({i:s,genLength:o,generatedLabels:t,domain:n,range:r}));return a}return t},g=function(t,e,n){var r=[];if(e.length>1)r=e;else for(var i=t.domain(),a=(i[i.length-1]-i[0])/(e-1),o=0;o<e;o++)r.push(i[0]+o*a);var s=r.map(n);return{data:r,labels:s,feature:function(e){return t(e)}}},p=function(t,e,n){var r=t.range().map(function(r){var i=t.invertExtent(r);return e(i[0])+" "+n+" "+e(i[1])});return{data:t.range(),labels:r,feature:h}},v=function(t){return{data:t.domain(),labels:t.domain(),feature:function(e){return t(e)}}},m=function(t,e,n){t.call("cellover",n,e)},y=function(t,e,n){t.call("cellout",n,e)},x=function(t,e,n){t.call("cellclick",n,e)},b={d3_drawShapes:function(t,e,n,r,i,a){"rect"===t?e.attr("height",n).attr("width",r):"circle"===t?e.attr("r",i):"line"===t?e.attr("x1",0).attr("x2",r).attr("y1",0).attr("y2",0):"path"===t&&e.attr("d",a)},d3_addText:function(t,e,n,r,i){e.append("text").attr("class",r+"label");var a=t.selectAll("g."+r+"cell text."+r+"label").data(n).text(h);return i&&t.selectAll("g."+r+"cell text."+r+"label").call(f,i),a},d3_calcType:function(t,e,n,r,i,a){var o=t.invertExtent?p(t,i,a):t.ticks?g(t,n,i):v(t),s=t.range&&t.range()||t.domain();return o.labels=d(o.labels,r,t.domain(),s),e&&(o.labels=l(o.labels),o.data=l(o.data)),o},d3_filterCells:function(t,e){var n=t.data.map(function(e,n){return{data:e,label:t.labels[n]}}).filter(e),r=n.map(function(t){return t.data}),i=n.map(function(t){return t.label});return t.data=t.data.filter(function(t){return r.indexOf(t)!==-1}),t.labels=t.labels.filter(function(t){return i.indexOf(t)!==-1}),t},d3_placement:function(t,e,n,r,i,a){e.attr("transform",n),r.attr("transform",i),"horizontal"===t&&r.style("text-anchor",a)},d3_addEvents:function(t,e){t.on("mouseover.legend",function(t){m(e,t,this)}).on("mouseout.legend",function(t){y(e,t,this)}).on("click.legend",function(t){x(e,t,this)})},d3_title:function(t,e,n,r){if(""!==e){var i=t.selectAll("text."+n+"legendTitle");i.data([e]).enter().append("text").attr("class",n+"legendTitle"),t.selectAll("text."+n+"legendTitle").text(e),r&&t.selectAll("text."+n+"legendTitle").call(f,r);var a=t.select("."+n+"legendCells"),o=t.select("."+n+"legendTitle").nodes().map(function(t){return t.getBBox().height})[0],s=-a.nodes().map(function(t){return t.getBBox().x})[0];a.attr("transform","translate("+s+","+o+")")}},d3_defaultLocale:{format:n.format,formatPrefix:n.formatPrefix},d3_defaultFormatSpecifier:".01f",d3_defaultDelimiter:"to"},_=function(t){var e=t.i,n=t.genLength,r=t.generatedLabels;return 0===e?r[e].replace("NaN to","Less than"):e===n-1?"More than "+r[n-1].replace(" to NaN",""):r[e]},w={thresholdLabels:_},M={legendColor:o,legendSize:s,legendSymbol:u,legendHelpers:w};t.legendColor=o,t.legendSize=s,t.legendSymbol=u,t.legendHelpers=w,t.default=M,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(){return m||(b(n),m=x.now()+y)}function n(){m=0}function r(){this._call=this._time=this._next=null}function i(t,e,n){var i=new r;return i.restart(t,e,n),i}function a(){e(),++f;for(var t,n=h;n;)(t=m-n._time)>=0&&n._call.call(null,t),n=n._next;--f}function o(){m=(v=x.now())+y,f=d=0;try{a()}finally{f=0,u(),m=0}}function s(){var t=x.now(),e=t-v;e>p&&(y-=e,v=t)}function u(){for(var t,e,n=h,r=1/0;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);l=t,c(r)}function c(t){if(!f){d&&(d=clearTimeout(d));var e=t-m;e>24?(t<1/0&&(d=setTimeout(o,t-x.now()-y)),g&&(g=clearInterval(g))):(g||(v=x.now(),g=setInterval(s,p)),f=1,b(o))}}var h,l,f=0,d=0,g=0,p=1e3,v=0,m=0,y=0,x="object"==typeof performance&&performance.now?performance:Date,b="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};r.prototype=i.prototype={constructor:r,restart:function(t,n,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?e():+r)+(null==n?0:+n),this._next||l===this||(l?l._next=this:h=this,l=this),this._call=t,this._time=r,c()},stop:function(){this._call&&(this._call=null,this._time=1/0,c())}};var _=function(t,e,n){var i=new r;return e=null==e?0:+e,i.restart(function(n){i.stop(),t(n+e)},e,n),i},w=function(t,n,i){var a=new r,o=n;return null==n?(a.restart(t,n,i),a):(n=+n,i=null==i?e():+i,a.restart(function e(r){r+=o,a.restart(e,o+=n,i),t(r)},n,i),a)};t.now=e,t.timer=i,t.timerFlush=a,t.timeout=_,t.interval=w,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){t.exports={graphlib:n(15),layout:n(279),debug:n(277),util:{time:n(12).time,notime:n(12).notime},version:n(296)}},function(t,e,n){"use strict";function r(t){function e(t){return function(e){return t.edge(e).weight}}var n="greedy"===t.graph().acyclicer?s(t,e(t)):i(t);o.each(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,o.uniqueId("rev"))})}function i(t){function e(a){o.has(i,a)||(i[a]=!0,r[a]=!0,o.each(t.outEdges(a),function(t){o.has(r,t.w)?n.push(t):e(t.w)}),delete r[a])}var n=[],r={},i={};return o.each(t.nodes(),e),n}function a(t){o.each(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}var o=n(5),s=n(278);t.exports={run:r,undo:a}},function(t,e,n){function r(t){function e(n){var r=t.children(n),o=t.node(n);if(r.length&&a.each(r,e),a.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,u=o.maxRank+1;s<u;++s)i(t,"borderLeft","_bl",n,o,s),i(t,"borderRight","_br",n,o,s)}}a.each(t.children(),e)}function i(t,e,n,r,i,a){var s={width:0,height:0,rank:a,borderType:e},u=i[e][a-1],c=o.addDummyNode(t,"border",s,n);i[e][a]=c,t.setParent(c,r),u&&t.setEdge(u,c,{weight:1})}var a=n(5),o=n(12);t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||a(t)}function i(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||s(t),"lr"!==e&&"rl"!==e||(c(t),a(t))}function a(t){l.each(t.nodes(),function(e){o(t.node(e))}),l.each(t.edges(),function(e){o(t.edge(e))})}function o(t){var e=t.width;t.width=t.height,t.height=e}function s(t){l.each(t.nodes(),function(e){u(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,u),l.has(n,"y")&&u(n)})}function u(t){t.y=-t.y}function c(t){l.each(t.nodes(),function(e){h(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,h),l.has(n,"x")&&h(n)})}function h(t){var e=t.x;t.x=t.y,t.y=e}var l=n(5);t.exports={adjust:r,undo:i}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){function r(t){var e=a.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return i.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),i.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),i.each(e,function(t,e){var r="layer"+e;n.setNode(r,{rank:"same"}),i.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var i=n(5),a=n(12),o=n(15).Graph;t.exports={debugOrdering:r}},function(t,e,n){function r(t,e){if(t.nodeCount()<=1)return[];var n=o(t,e||l),r=i(n.graph,n.buckets,n.zeroIdx);return u.flatten(u.map(r,function(e){return t.outEdges(e.v,e.w)}),!0)}function i(t,e,n){for(var r,i=[],o=e[e.length-1],s=e[0];t.nodeCount();){for(;r=s.dequeue();)a(t,e,n,r);for(;r=o.dequeue();)a(t,e,n,r);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(r=e[u].dequeue()){i=i.concat(a(t,e,n,r,!0));break}}return i}function a(t,e,n,r,i){var a=i?[]:void 0;return u.each(t.inEdges(r.v),function(r){var o=t.edge(r),u=t.node(r.v);i&&a.push({v:r.v,w:r.w}),u.out-=o,s(e,n,u)}),u.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,s(e,n,o)}),t.removeNode(r.v),a}function o(t,e){var n=new c,r=0,i=0;u.each(t.nodes(),function(t){n.setNode(t,{v:t,in:0,out:0})}),u.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,o=e(t),s=a+o;n.setEdge(t.v,t.w,s),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w).in+=o)});var a=u.range(i+r+3).map(function(){return new h}),o=r+1;return u.each(n.nodes(),function(t){s(a,o,n.node(t))}),{graph:n,buckets:a,zeroIdx:o}}function s(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var u=n(5),c=n(15).Graph,h=n(276);t.exports=r;var l=u.constant(1)},function(t,e,n){"use strict";function r(t,e){var n=e&&e.debugTiming?B.time:B.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return o(t)});n(" runLayout",function(){i(e,n)}),n(" updateInputGraph",function(){a(t,e)})})}function i(t,e){e(" makeSpaceForEdgeLabels",function(){s(t)}),e(" removeSelfEdges",function(){v(t)}),e(" acyclic",function(){w.run(t)}),e(" nestingGraph.run",function(){T.run(t)}),e(" rank",function(){S(B.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){u(t)}),e(" removeEmptyRanks",function(){C(t)}),e(" nestingGraph.cleanup",function(){T.cleanup(t)}),e(" normalizeRanks",function(){k(t)}),e(" assignRankMinMax",function(){c(t)}),e(" removeEdgeLabelProxies",function(){h(t)}),e(" normalize.run",function(){M.run(t)}),e(" parentDummyChains",function(){A(t)}),e(" addBorderSegments",function(){E(t)}),e(" order",function(){I(t)}),e(" insertSelfEdges",function(){m(t)}),e(" adjustCoordinateSystem",function(){P.adjust(t)}),e(" position",function(){N(t)}),e(" positionSelfEdges",function(){y(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){M.undo(t)}),e(" fixupEdgeLabelCoords",function(){d(t)}),e(" undoCoordinateSystem",function(){P.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){f(t)}),e(" reversePoints",function(){g(t)}),e(" acyclic.undo",function(){w.undo(t)})}function a(t,e){_.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),_.each(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,_.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function o(t){var e=new F({multigraph:!0,compound:!0}),n=b(t.graph());return e.setGraph(_.merge({},L,x(n,O),_.pick(n,D))),_.each(t.nodes(),function(n){var r=b(t.node(n));e.setNode(n,_.defaults(x(r,R),z)),e.setParent(n,t.parent(n))}),_.each(t.edges(),function(n){var r=b(t.edge(n));e.setEdge(n,_.merge({},j,x(r,G),_.pick(r,U)))}),e}function s(t){var e=t.graph();e.ranksep/=2,_.each(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function u(t){_.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-r.rank)/2+r.rank,e:e};B.addDummyNode(t,"edge-proxy",a,"_ep")}})}function c(t){var e=0;_.each(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=_.max(e,r.maxRank))}),t.graph().maxRank=e}function h(t){_.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,o=t.y,s=t.width,u=t.height;n=Math.min(n,e-s/2),r=Math.max(r,e+s/2),i=Math.min(i,o-u/2),a=Math.max(a,o+u/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,u=o.marginy||0;_.each(t.nodes(),function(n){e(t.node(n))}),_.each(t.edges(),function(n){var r=t.edge(n);_.has(r,"x")&&e(r)}),n-=s,i-=u,_.each(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),_.each(t.edges(),function(e){var r=t.edge(e);_.each(r.points,function(t){t.x-=n,t.y-=i}),_.has(r,"x")&&(r.x-=n),_.has(r,"y")&&(r.y-=i)}),o.width=r-n+s,o.height=a-i+u}function f(t){_.each(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(B.intersectRect(a,n)),i.points.push(B.intersectRect(o,r))})}function d(t){_.each(t.edges(),function(e){var n=t.edge(e);if(_.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function g(t){_.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function p(t){_.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(_.last(n.borderLeft)),o=t.node(_.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),_.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function v(t){_.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function m(t){var e=B.buildLayerMatrix(t);_.each(e,function(e){var n=0;_.each(e,function(e,r){var i=t.node(e);i.order=r+n,_.each(i.selfEdges,function(e){B.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function y(t){_.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function x(t,e){return _.mapValues(_.pick(t,e),Number)}function b(t){var e={};return _.each(t,function(t,n){e[n.toLowerCase()]=t}),e}var _=n(5),w=n(273),M=n(281),S=n(294),k=n(12).normalizeRanks,A=n(291),C=n(12).removeEmptyRanks,T=n(280),E=n(274),P=n(275),I=n(286),N=n(293),B=n(12),F=n(15).Graph;t.exports=r;var O=["nodesep","edgesep","ranksep","marginx","marginy"],L={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},D=["acyclicer","ranker","rankdir","align"],R=["width","height"],z={width:0,height:0},G=["minlen","weight","width","height","labeloffset"],j={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},U=["labelpos"]},function(t,e,n){function r(t){var e=c.addDummyNode(t,"root",{},"_root"),n=a(t),r=u.max(n)-1,s=2*r+1;t.graph().nestingRoot=e,u.each(t.edges(),function(e){t.edge(e).minlen*=s});var h=o(t)+1;u.each(t.children(),function(a){i(t,e,s,h,r,n,a)}),t.graph().nodeRankFactor=s}function i(t,e,n,r,a,o,s){var h=t.children(s);if(!h.length)return void(s!==e&&t.setEdge(e,s,{weight:0,minlen:n}));var l=c.addBorderNode(t,"_bt"),f=c.addBorderNode(t,"_bb"),d=t.node(s);t.setParent(l,s),d.borderTop=l,t.setParent(f,s),d.borderBottom=f,u.each(h,function(u){i(t,e,n,r,a,o,u);var c=t.node(u),h=c.borderTop?c.borderTop:u,d=c.borderBottom?c.borderBottom:u,g=c.borderTop?r:2*r,p=h!==d?1:a-o[s]+1;t.setEdge(l,h,{weight:g,minlen:p,nestingEdge:!0}),t.setEdge(d,f,{weight:g,minlen:p,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:a+o[s]})}function a(t){function e(r,i){var a=t.children(r);a&&a.length&&u.each(a,function(t){e(t,i+1)}),n[r]=i}var n={};return u.each(t.children(),function(t){e(t,1)}),n}function o(t){return u.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function s(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,u.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}var u=n(5),c=n(12);t.exports={run:r,cleanup:s}},function(t,e,n){"use strict";function r(t){t.graph().dummyChains=[],o.each(t.edges(),function(e){i(t,e)})}function i(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,o=e.name,u=t.edge(e),c=u.labelRank;if(a!==r+1){t.removeEdge(e);var h,l,f;for(f=0,++r;r<a;++f,++r)u.points=[],l={width:0,height:0,edgeLabel:u,edgeObj:e,rank:r},h=s.addDummyNode(t,"edge",l,"_d"),r===c&&(l.width=u.width,l.height=u.height,l.dummy="edge-label",l.labelpos=u.labelpos),t.setEdge(n,h,{weight:u.weight},o),0===f&&t.graph().dummyChains.push(h),n=h;t.setEdge(n,i,{weight:u.weight},o)}}function a(t){o.each(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}var o=n(5),s=n(12);t.exports={run:r,undo:a}},function(t,e,n){function r(t,e,n){var r,a={};i.each(n,function(n){for(var i,o,s=t.parent(n);s;){if(i=t.parent(s),i?(o=a[i],a[i]=s):(o=r,r=s),o&&o!==s)return void e.setEdge(o,s);s=i}})}var i=n(5);t.exports=r},function(t,e,n){function r(t,e){return i.map(e,function(e){var n=t.inEdges(e);if(n.length){var r=i.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}})}var i=n(5);t.exports=r},function(t,e,n){function r(t,e,n){var r=i(t),s=new o({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(e){return t.node(e)});return a.each(t.nodes(),function(i){var o=t.node(i),u=t.parent(i);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(s.setNode(i),s.setParent(i,u||r),a.each(t[n](i),function(e){var n=e.v===i?e.w:e.v,r=s.edge(n,i),o=a.isUndefined(r)?0:r.weight;s.setEdge(n,i,{weight:t.edge(e).weight+o})}),a.has(o,"minRank")&&s.setNode(i,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),s}function i(t){for(var e;t.hasNode(e=a.uniqueId("_root")););return e}var a=n(5),o=n(15).Graph;t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}function i(t,e,n){for(var r=a.zipObject(n,a.map(n,function(t,e){return e})),i=a.flatten(a.map(e,function(e){return a.chain(t.outEdges(e)).map(function(e){return{pos:r[e.w],weight:t.edge(e).weight}}).sortBy("pos").value()}),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var u=a.map(new Array(s),function(){return 0}),c=0;return a.each(i.forEach(function(t){var e=t.pos+o;u[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;c+=t.weight*n})),c}var a=n(5);t.exports=r},function(t,e,n){"use strict";function r(t){var e=g.maxRank(t),n=i(t,s.range(1,e+1),"inEdges"),r=i(t,s.range(e-1,-1,-1),"outEdges"),h=u(t);o(t,h);for(var l,f=Number.POSITIVE_INFINITY,d=0,p=0;p<4;++d,++p){a(d%2?n:r,d%4>=2),h=g.buildLayerMatrix(t);var v=c(t,h);v<f&&(p=0,l=s.cloneDeep(h),f=v)}o(t,l)}function i(t,e,n){return s.map(e,function(e){return l(t,e,n)})}function a(t,e){var n=new d;s.each(t,function(t){var r=t.graph().root,i=h(t,r,n,e);s.each(i.vs,function(e,n){t.node(e).order=n}),f(t,n,i.vs)})}function o(t,e){s.each(e,function(e){s.each(e,function(e,n){t.node(e).order=n})})}var s=n(5),u=n(287),c=n(285),h=n(289),l=n(284),f=n(282),d=n(15).Graph,g=n(12);t.exports=r},function(t,e,n){"use strict";function r(t){function e(r){if(!i.has(n,r)){n[r]=!0;var a=t.node(r);o[a.rank].push(r),i.each(t.successors(r),e)}}var n={},r=i.filter(t.nodes(),function(e){return!t.children(e).length}),a=i.max(i.map(r,function(e){return t.node(e).rank})),o=i.map(i.range(a+1),function(){return[]}),s=i.sortBy(r,function(e){return t.node(e).rank});return i.each(s,e),o}var i=n(5);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n={};o.each(t,function(t,e){var r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};o.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),o.each(e.edges(),function(t){var e=n[t.v],r=n[t.w];o.isUndefined(e)||o.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))});var r=o.filter(n,function(t){return!t.indegree});return i(r)}function i(t){function e(t){return function(e){e.merged||(o.isUndefined(e.barycenter)||o.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&a(t,e)}}function n(e){return function(n){n.in.push(e),0===--n.indegree&&t.push(n)}}for(var r=[];t.length;){var i=t.pop();r.push(i),o.each(i.in.reverse(),e(i)),o.each(i.out,n(i))}return o.chain(r).filter(function(t){return!t.merged}).map(function(t){return o.pick(t,["vs","i","barycenter","weight"])}).value()}function a(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}var o=n(5);t.exports=r},function(t,e,n){function r(t,e,n,h){var l=t.children(e),f=t.node(e),d=f?f.borderLeft:void 0,g=f?f.borderRight:void 0,p={};d&&(l=o.filter(l,function(t){return t!==d&&t!==g}));var v=s(t,l);o.each(v,function(e){if(t.children(e.v).length){var i=r(t,e.v,n,h);p[e.v]=i,o.has(i,"barycenter")&&a(e,i)}});var m=u(v,n);i(m,p);var y=c(m,h);if(d&&(y.vs=o.flatten([d,y.vs,g],!0),t.predecessors(d).length)){var x=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(g)[0]);o.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+x.order+b.order)/(y.weight+2),y.weight+=2}return y}function i(t,e){o.each(t,function(t){t.vs=o.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function a(t,e){o.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var o=n(5),s=n(283),u=n(288),c=n(290);t.exports=r},function(t,e,n){function r(t,e){var n=s.partition(t,function(t){return o.has(t,"barycenter")}),r=n.lhs,u=o.sortBy(n.rhs,function(t){return-t.i}),c=[],h=0,l=0,f=0;r.sort(a(!!e)),f=i(c,u,f),o.each(r,function(t){f+=t.vs.length,c.push(t.vs),h+=t.barycenter*t.weight,l+=t.weight,f=i(c,u,f)});var d={vs:o.flatten(c,!0)};return l&&(d.barycenter=h/l,d.weight=l),d}function i(t,e,n){for(var r;e.length&&(r=o.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function a(t){return function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:t?n.i-e.i:e.i-n.i}}var o=n(5),s=n(12);t.exports=r},function(t,e,n){function r(t){var e=a(t);o.each(t.graph().dummyChains,function(n){for(var r=t.node(n),a=r.edgeObj,o=i(t,e,a.v,a.w),s=o.path,u=o.lca,c=0,h=s[c],l=!0;n!==a.w;){if(r=t.node(n),l){for(;(h=s[c])!==u&&t.node(h).maxRank<r.rank;)c++;h===u&&(l=!1)}if(!l){for(;c<s.length-1&&t.node(h=s[c+1]).minRank<=r.rank;)c++;h=s[c]}t.setParent(n,h),n=t.successors(n)[0]}})}function i(t,e,n,r){var i,a,o=[],s=[],u=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do i=t.parent(i),o.push(i);while(i&&(e[i].low>u||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}function a(t){function e(i){var a=r;o.each(t.children(i),e),n[i]={low:a,lim:r++}}var n={},r=0;return o.each(t.children(),e),n}var o=n(5);t.exports=r},function(t,e,n){"use strict";function r(t,e){function n(e,n){var i=0,s=0,u=e.length,c=m.last(n);return m.each(n,function(e,h){var l=a(t,e),f=l?t.node(l).order:u;(l||e===c)&&(m.each(n.slice(s,h+1),function(e){m.each(t.predecessors(e),function(n){var a=t.node(n),s=a.order;!(s<i||f<s)||a.dummy&&t.node(e).dummy||o(r,n,e)})}),s=h+1,i=f)}),n}var r={};return m.reduce(e,n),r}function i(t,e){function n(e,n,r,a,s){var u;m.each(m.range(n,r),function(n){u=e[n],t.node(u).dummy&&m.each(t.predecessors(u),function(e){var n=t.node(e);n.dummy&&(n.order<a||n.order>s)&&o(i,e,u)})})}function r(e,r){var i,a=-1,o=0;return m.each(r,function(s,u){if("border"===t.node(s).dummy){var c=t.predecessors(s);c.length&&(i=t.node(c[0]).order,n(r,o,u,a,i),o=u,a=i)}n(r,o,r.length,i,e.length)}),r}var i={};return m.reduce(e,r),i}function a(t,e){if(t.node(e).dummy)return m.find(t.predecessors(e),function(e){return t.node(e).dummy})}function o(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function s(t,e,n){if(e>n){var r=e;e=n,n=r}return m.has(t[e],n)}function u(t,e,n,r){var i={},a={},o={};return m.each(e,function(t){m.each(t,function(t,e){i[t]=t,a[t]=t,o[t]=e})}),m.each(e,function(t){var e=-1;m.each(t,function(t){var u=r(t);if(u.length){u=m.sortBy(u,function(t){return o[t]});for(var c=(u.length-1)/2,h=Math.floor(c),l=Math.ceil(c);h<=l;++h){var f=u[h];a[t]===t&&e<o[f]&&!s(n,t,f)&&(a[f]=t,a[t]=i[t]=i[f],e=o[f])}}})}),{root:i,align:a}}function c(t,e,n,r,i){function a(t){m.has(c,t)||(c[t]=!0,s[t]=m.reduce(u.inEdges(t),function(t,e){return a(e.v),Math.max(t,s[e.v]+u.edge(e))},0))}function o(e){if(2!==c[e]){c[e]++;var n=t.node(e),r=m.reduce(u.outEdges(e),function(t,e){return o(e.w),Math.min(t,s[e.w]-u.edge(e))},Number.POSITIVE_INFINITY);r!==Number.POSITIVE_INFINITY&&n.borderType!==l&&(s[e]=Math.max(s[e],r))}}var s={},u=h(t,e,n,i),c={};m.each(u.nodes(),a);var l=i?"borderLeft":"borderRight";return m.each(u.nodes(),o),m.each(r,function(t){s[t]=s[n[t]]}),s}function h(t,e,n,r){var i=new y,a=t.graph(),o=p(a.nodesep,a.edgesep,r);return m.each(e,function(e){var r;m.each(e,function(e){var a=n[e];if(i.setNode(a),r){var s=n[r],u=i.edge(s,a);i.setEdge(s,a,Math.max(o(t,e,r),u||0))}r=e})}),i}function l(t,e){return m.min(e,function(e){var n=m.min(e,function(e,n){return e-v(t,n)/2}),r=m.max(e,function(e,n){return e+v(t,n)/2});return r-n})}function f(t,e){var n=m.min(e),r=m.max(e);m.each(["u","d"],function(i){m.each(["l","r"],function(a){var o,s=i+a,u=t[s];u!==e&&(o="l"===a?n-m.min(u):r-m.max(u),o&&(t[s]=m.mapValues(u,function(t){return t+o})))})})}function d(t,e){return m.mapValues(t.ul,function(n,r){if(e)return t[e.toLowerCase()][r];var i=m.sortBy(m.pluck(t,r));return(i[1]+i[2])/2})}function g(t){var e,n=x.buildLayerMatrix(t),a=m.merge(r(t,n),i(t,n)),o={};m.each(["u","d"],function(r){e="u"===r?n:m.values(n).reverse(),m.each(["l","r"],function(n){"r"===n&&(e=m.map(e,function(t){return m.values(t).reverse()}));var i=m.bind("u"===r?t.predecessors:t.successors,t),s=u(t,e,a,i),h=c(t,e,s.root,s.align,"r"===n);"r"===n&&(h=m.mapValues(h,function(t){return-t})),o[r+n]=h})});var s=l(t,o);return f(o,s),d(o,t.graph().align)}function p(t,e,n){return function(r,i,a){var o,s=r.node(i),u=r.node(a),c=0;if(c+=s.width/2,m.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=-s.width/2;break;case"r":o=s.width/2}if(o&&(c+=n?o:-o),o=0,c+=(s.dummy?e:t)/2,c+=(u.dummy?e:t)/2,c+=u.width/2,m.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":o=u.width/2;break;case"r":o=-u.width/2}return o&&(c+=n?o:-o),o=0,c}}function v(t,e){return t.node(e).width}var m=n(5),y=n(15).Graph,x=n(12);t.exports={positionX:g,findType1Conflicts:r,findType2Conflicts:i,addConflict:o,hasConflict:s,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:l,balance:d}},function(t,e,n){"use strict";function r(t){t=o.asNonCompoundGraph(t),i(t),a.each(s(t),function(e,n){t.node(n).x=e})}function i(t){var e=o.buildLayerMatrix(t),n=t.graph().ranksep,r=0;a.each(e,function(e){var i=a.max(a.map(e,function(e){return t.node(e).height}));a.each(e,function(e){t.node(e).y=r+i/2}),r+=i+n})}var a=n(5),o=n(12),s=n(292).positionX;t.exports=r},function(t,e,n){"use strict";function r(t){switch(t.graph().ranker){case"network-simplex":a(t);break;case"tight-tree":i(t);break;case"longest-path":h(t);break;default:a(t)}}function i(t){s(t),u(t)}function a(t){c(t)}var o=n(27),s=o.longestPath,u=n(102),c=n(295);t.exports=r;var h=s},function(t,e,n){"use strict";function r(t){t=_(t),y(t);var e=v(t);s(e),i(e,t);for(var n,r;n=c(e);)r=h(e,t,n),l(e,t,n,r)}function i(t,e){var n=b(t,t.nodes());n=n.slice(0,n.length-1),p.each(n,function(n){a(t,e,n)})}function a(t,e,n){var r=t.node(n),i=r.parent;t.edge(n,i).cutvalue=o(t,e,n)}function o(t,e,n){var r=t.node(n),i=r.parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,p.each(e.nodeEdges(n),function(r){var o=r.v===n,u=o?r.w:r.v;if(u!==i){var c=o===a,h=e.edge(r).weight;
19if(s+=c?h:-h,d(t,n,u)){var l=t.edge(n,u).cutvalue;s+=c?-l:l}}}),s}function s(t,e){arguments.length<2&&(e=t.nodes()[0]),u(t,{},1,e)}function u(t,e,n,r,i){var a=n,o=t.node(r);return e[r]=!0,p.each(t.neighbors(r),function(i){p.has(e,i)||(n=u(t,e,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function c(t){return p.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function h(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var a=t.node(r),o=t.node(i),s=a,u=!1;a.lim>o.lim&&(s=o,u=!0);var c=p.filter(e.edges(),function(e){return u===g(t,t.node(e.v),s)&&u!==g(t,t.node(e.w),s)});return p.min(c,function(t){return m(e,t)})}function l(t,e,n,r){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(r.v,r.w,{}),s(t),i(t,e),f(t,e)}function f(t,e){var n=p.find(t.nodes(),function(t){return!e.node(t).parent}),r=x(t,n);r=r.slice(1),p.each(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}function d(t,e,n){return t.hasEdge(e,n)}function g(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var p=n(5),v=n(102),m=n(27).slack,y=n(27).longestPath,x=n(15).alg.preorder,b=n(15).alg.postorder,_=n(12).simplify;t.exports=r,r.initLowLimValues=s,r.initCutValues=i,r.calcCutValue=o,r.leaveEdge=c,r.enterEdge=h,r.exchangeEdges=l},function(t,e){t.exports="0.7.4"},function(t,e,n){var r=n(307);t.exports={Graph:r.Graph,json:n(308),alg:n(302),version:r.version}},function(t,e,n){function r(t){function e(a){i.has(r,a)||(r[a]=!0,n.push(a),i.each(t.successors(a),e),i.each(t.predecessors(a),e))}var n,r={},a=[];return i.each(t.nodes(),function(t){n=[],e(t),n.length&&a.push(n)}),a}var i=n(13);t.exports=r},function(t,e,n){function r(t,e,n){return a.transform(t.nodes(),function(r,a){r[a]=i(t,a,e,n)},{})}var i=n(104),a=n(13);t.exports=r},function(t,e,n){function r(t){return i.filter(a(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}var i=n(13),a=n(105);t.exports=r},function(t,e,n){function r(t,e,n){return i(t,e||o,n||function(e){return t.outEdges(e)})}function i(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}var a=n(13);t.exports=r;var o=a.constant(1)},function(t,e,n){t.exports={components:n(298),dijkstra:n(104),dijkstraAll:n(299),findCycles:n(300),floydWarshall:n(301),isAcyclic:n(303),postorder:n(304),preorder:n(305),prim:n(306),tarjan:n(105),topsort:n(106)}},function(t,e,n){function r(t){try{i(t)}catch(t){if(t instanceof i.CycleException)return!1;throw t}return!0}var i=n(106);t.exports=r},function(t,e,n){function r(t,e){return i(t,e,"post")}var i=n(103);t.exports=r},function(t,e,n){function r(t,e){return i(t,e,"pre")}var i=n(103);t.exports=r},function(t,e,n){function r(t,e){function n(t){var n=t.v===r?t.w:t.v,i=c.priority(n);if(void 0!==i){var a=e(t);a<i&&(u[n]=r,c.decrease(n,a))}}var r,s=new a,u={},c=new o;if(0===t.nodeCount())return s;i.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),s.setNode(t)}),c.decrease(t.nodes()[0],0);for(var h=!1;c.size()>0;){if(r=c.removeMin(),i.has(u,r))s.setEdge(r,u[r]);else{if(h)throw new Error("Input graph is not connected: "+t);h=!0}t.nodeEdges(r).forEach(n)}return s}var i=n(13),a=n(48),o=n(107);t.exports=r},function(t,e,n){t.exports={Graph:n(48),version:n(309)}},function(t,e,n){function r(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:a(t)};return s.isUndefined(t.graph())||(e.value=s.clone(t.graph())),e}function i(t){return s.map(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return s.isUndefined(n)||(i.value=n),s.isUndefined(r)||(i.parent=r),i})}function a(t){return s.map(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return s.isUndefined(e.name)||(r.name=e.name),s.isUndefined(n)||(r.value=n),r})}function o(t){var e=new u(t.options).setGraph(t.value);return s.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),s.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var s=n(13),u=n(48);t.exports={write:r,read:o}},function(t,e){t.exports="1.0.7"},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}]))});
\No newline at end of file