(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-79c8a21a","chunk-1898624e","chunk-614dba81","chunk-410e40fc","chunk-b7b74f52","chunk-b2629d58","chunk-181bbd58","chunk-3b76a4b8","chunk-b7b74f52","chunk-1b26ece6","chunk-1b26ece6","chunk-0495ff90","chunk-0495ff90","chunk-c821bdc2","chunk-2fbef56b","chunk-2d21b4e6","chunk-2d0e24d1"],{"0048":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("8937"),o=n("7a70"),a=n("d531"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dom",e.canFill=!1,e.canStroke=!1,e}return r.__extends(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");i.each(e||n,(function(t,e){o.SVG_ATTR_MAP[e]&&r.setAttribute(o.SVG_ATTR_MAP[e],t)})),r.innerHTML=n["html"]},e}(a.default);e.default=s},"004e":function(t,e,n){var r=n("76e9"),i=n("8d20"),o=n("cd9d");function a(t){return t&&t.length?r(t,o,i):void 0}t.exports=a},"00c0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new Map;function i(t,e){r.set(t,e)}function o(t){return r.get(t)}e.register=i,e.getMethod=o},"00fd":function(t,e,n){var r=n("9e69"),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;function u(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(u){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}t.exports=u},"0125":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("72fb"),i=n("2047"),o=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return r.default(t,(function(n,r){i.default(t)&&"prototype"===r||e.push(n)})),e};e.default=o},"01ce":function(t,e,n){t.exports={Graph:n("9671"),version:n("c3cd")}},"01eb":function(t,e,n){var r=n("33de");function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.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},i.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)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1,n[e].priority.8*f?n.setItemState(t,e.activeState,!0):n.setItemState(t,e.activeState,!1)}))}(0,a.each)(this.targets,(function(n){e.updateCombo(n,t)}))}},onDrop:function(t){var e=this,n=t.item;if(n&&this.targets){var r=this.graph,i=n.getModel();this.targets.map((function(t){var o=t.getModel();o.parentId!==i.id&&(e.activeState&&r.setItemState(n,e.activeState,!1),e.onlyChangeComboSize||r.updateComboTree(t,i.id))})),this.endComparison=!0}},onDragEnter:function(t){if(this.origin){this.validationCombo(t);var e=t.item,n=this.graph;this.activeState&&n.setItemState(e,this.activeState,!0)}},onDragLeave:function(t){if(this.origin){this.validationCombo(t);var e=t.item,n=this.graph;this.activeState&&n.setItemState(e,this.activeState,!1)}},onDragEnd:function(t){var e=this,n=this.graph;this.validationCombo(t),this.enableDelegate&&(0,a.each)(this.targets,(function(n){e.updateCombo(n,t)}));var r=t.item,i=!1,o=r.getModel();if(this.onlyChangeComboSize)n.updateCombos();else{var s=r.getType();if("combo"===s){var u=o.parentId,c=null,f=this.getParentCombo(u);if(f){c=this.enableDelegate?this.delegateShape.getBBox():r.getBBox();var l=c.x,h=c.y,d=c.centerX,p=c.centerY,g=c.width,v=f.getBBox(),y=v.minX,m=v.minY,b=v.maxX,x=v.maxY,w=v.centerX,M=v.centerY,_=v.width;if(l<=y||l>=b||h<=m||h>=x)this.activeState&&n.setItemState(f,this.activeState,!1),i=!0,n.updateComboTree(r);else{var S=d-w,P=p-M,k=2*Math.sqrt(S*S+P*P);g+_-k<.8*g&&(this.activeState&&n.setItemState(f,this.activeState,!1),i=!0,n.updateComboTree(r))}}if(!this.endComparison&&!i){var C=n.getCombos(),O=r.getBBox(),E=O.centerX,A=O.centerY,j=O.width,I=C.filter((function(t){var n=t.getModel();return o.parentId,n.id!==o.id&&!e.currentItemChildCombos.includes(n.id)}));I.map((function(t){var i=t.getModel(),o=t.getBBox(),a=o.centerX,s=o.centerY,u=o.width,c=E-a,f=A-s,l=2*Math.sqrt(c*c+f*f);e.activeState&&n.setItemState(t,e.activeState,!1),j+u-l>.8*j&&n.updateComboTree(r,i.id)}))}}}if(this.delegateShape){var T=n.get("delegateGroup");T.clear(),this.delegateShape=null}var B=this.getParentCombo(o.parentId);B&&this.activeState&&n.setItemState(B,this.activeState,!1),this.point=[],this.origin=null,this.originPoint=null,this.targets.length=0},traverse:function(t,e){var n=this;if(!1!==e(t)&&t){var r=t.get("combos");(0,a.each)(r,(function(t){n.traverse(t,e)}));var i=t.get("nodes");(0,a.each)(i,(function(t){n.traverse(t,e)}))}},updateCombo:function(t,e){var n=this;this.traverse(t,(function(t){return!t.destroyed&&(n.updateSignleItem(t,e),!0)}))},updateSignleItem:function(t,e){var n=this.origin,r=this.graph,i=t.getModel(),o=t.get("id");this.point[o]||(this.point[o]={x:i.x,y:i.y});var a=e.x-n.x+this.point[o].x,s=e.y-n.y+this.point[o].y;r.updateItem(t,{x:a,y:s})},getParentCombo:function(t){var e=this.graph;if(t){var n=e.findById(t);if(n)return n}},updateDelegate:function(t){var e=this.graph;if(this.delegateShape){var n=t.x-this.origin.x+this.originPoint.minX,a=t.y-this.origin.y+this.originPoint.minY;this.delegateShape.attr({x:n,y:a})}else{var s=e.get("delegateGroup"),u=null;u=this.targets.length>1?(0,i.calculationItemsBBox)(this.targets):this.targets[0].getBBox();var c=u.x,f=u.y,l=u.width,h=u.height,d=u.minX,p=u.minY;this.originPoint={x:c,y:f,width:l,height:h,minX:d,minY:p};var g=Object.assign({},o.default.delegateStyle,this.delegateStyle);this.delegateShape=s.addShape("rect",{attrs:(0,r.__assign)({width:u.width,height:u.height,x:u.x,y:u.y},g),name:"combo-delegate-shape"})}}};e.default=c},"04d1":function(t,e,n){var r=n("342f"),i=r.match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]},"0518":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=c(n("72fb")),o=c(n("28f9")),a=c(n("503e")),s=n("0dfa"),u=c(n("f694"));function c(t){return t&&t.__esModule?t:{default:t}}var f="anchorPointsCache",l="bboxCache",h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.__extends)(e,t),e.prototype.getNearestPoint=function(t,e){for(var n=0,r=t[0],i=(0,s.distance)(t[0],e),o=0;o-1&&e.splice(n,1)},e.prototype.clearCache=function(){this.set(l,null),this.set(f,null)},e.prototype.isOnlyMove=function(t){if(!t)return!1;var e=!(0,o.default)(t.x),n=!(0,o.default)(t.y),r=Object.keys(t);return 1===r.length&&(e||n)||2===r.length&&e&&n},e}(u.default),d=h;e.default=d},"0519":function(t,e,n){(function(e,n){t.exports=n()})("undefined"!==typeof self&&self,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";var r=n(4);e["a"]=function(t){return Array.isArray?Array.isArray(t):Object(r["a"])(t,"Array")}},function(t,e,n){"use strict";var r=function(t){return null!==t&&"function"!==typeof t&&isFinite(t.length)};e["a"]=r},function(t,e,n){"use strict";var r=n(0),i=n(13);function o(t,e){var n;if(t)if(Object(r["a"])(t)){for(var o=0,a=t.length;o-1};e["a"]=i},function(t,e,n){"use strict";e["a"]=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";var r=n(2),i=n(1),o=function(t,e){if(!Object(i["a"])(t))return t;var n=[];return Object(r["a"])(t,(function(t,r){e(t,r)&&n.push(t)})),n};e["a"]=o},function(t,e,n){"use strict";var r=function(t){return"object"===typeof t&&null!==t};e["a"]=r},function(t,e,n){"use strict";function r(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function i(t,e,n,i){return e&&r(t,e),n&&r(t,n),i&&r(t,i),t}e["a"]=i},function(t,e,n){var r=n(30),i=["LR","RL","TB","BT","H","V"],o=["LR","RL","H"],a=function(t){return o.indexOf(t)>-1},s=i[0];t.exports=function(t,e,n){var o=e.direction||s;if(e.isHorizontal=a(o),o&&-1===i.indexOf(o))throw new TypeError("Invalid direction: "+o);if(o===i[0])n(t,e);else if(o===i[1])n(t,e),t.right2left();else if(o===i[2])n(t,e);else if(o===i[3])n(t,e),t.bottom2top();else if(o===i[4]||o===i[5]){var u=r(t,e),c=u.left,f=u.right;n(c,e),n(f,e),e.isHorizontal?c.right2left():c.bottom2top(),f.translate(c.x-f.x,c.y-f.y),t.x=c.x,t.y=f.y;var l=t.getBoundingBox();e.isHorizontal?l.top<0&&t.translate(0,-l.top):l.left<0&&t.translate(-l.left,0)}var h=e.fixedRoot;return void 0===h&&(h=!0),h&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),t}},function(t,e,n){var r=n(7),i=18,o=2*i,a=i,s={getId:function(t){return t.id||t.name},getPreH:function(t){return t.preH||0},getPreV:function(t){return t.preV||0},getHGap:function(t){return t.hgap||a},getVGap:function(t){return t.vgap||a},getChildren:function(t){return t.children},getHeight:function(t){return t.height||o},getWidth:function(t){var e=t.label||" ";return t.width||e.split("").length*i}};function u(t,e){var n=this;if(n.vgap=n.hgap=0,t instanceof u)return t;n.data=t;var r=e.getHGap(t),i=e.getVGap(t);return n.preH=e.getPreH(t),n.preV=e.getPreV(t),n.width=e.getWidth(t),n.height=e.getHeight(t),n.width+=n.preH,n.height+=n.preV,n.id=e.getId(t),n.x=n.y=0,n.depth=0,n.children||(n.children=[]),n.addGap(r,i),n}function c(t,e,n){void 0===e&&(e={}),e=r.assign({},s,e);var i,o=new u(t,e),a=[o];if(!n&&!t.collapsed)while(i=a.shift())if(!i.data.collapsed){var c=e.getChildren(i.data),f=c?c.length:0;if(i.children=new Array(f),c&&f)for(var l=0;l-1)i.call(t,s,1)}return t};e["a"]=a},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(9),a=function(t,e,n){if(!Object(i["a"])(t)&&!Object(o["a"])(t))return t;var a=n;return Object(r["a"])(t,(function(t,n){a=e(a,t,n)})),a};e["a"]=a},function(t,e,n){"use strict";var r=n(1),i=n(21),o=function(t,e){var n=[];if(!Object(r["a"])(t))return n;var o=-1,a=[],s=t.length;while(++oe[r])return 1;if(t[r]n?n:t};e["a"]=r},function(t,e,n){"use strict";var r=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))};e["a"]=r},function(t,e,n){"use strict";var r=n(5),i=function(t){return Object(r["a"])(t)&&t%1!==0};e["a"]=i},function(t,e,n){"use strict";var r=n(5),i=function(t){return Object(r["a"])(t)&&t%2===0};e["a"]=i},function(t,e,n){"use strict";var r=n(5),i=Number.isInteger?Number.isInteger:function(t){return Object(r["a"])(t)&&t%1===0};e["a"]=i},function(t,e,n){"use strict";var r=n(5),i=function(t){return Object(r["a"])(t)&&t<0};e["a"]=i},function(t,e,n){"use strict";e["a"]=i;var r=1e-5;function i(t,e,n){return void 0===n&&(n=r),Math.abs(t-e)0};e["a"]=i},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(3);e["a"]=function(t,e){if(Object(i["a"])(t)){var n,a,s=t[0];return n=Object(o["a"])(e)?e(t[0]):t[0][e],Object(r["a"])(t,(function(t){a=Object(o["a"])(e)?e(t):t[e],a>n&&(s=t,n=a)})),s}}},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(3);e["a"]=function(t,e){if(Object(i["a"])(t)){var n,a,s=t[0];return n=Object(o["a"])(e)?e(t[0]):t[0][e],Object(r["a"])(t,(function(t){a=Object(o["a"])(e)?e(t):t[e],ae?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,f)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}},function(t,e,n){"use strict";var r=n(1);e["a"]=function(t){return Object(r["a"])(t)?Array.prototype.slice.call(t):[]}},function(t,e,n){"use strict";var r={};e["a"]=function(t){return t=t||"g",r[t]?r[t]+=1:r[t]=1,t+r[t]}},function(t,e,n){"use strict";e["a"]=function(){}},function(t,e,n){"use strict";e["a"]=function(t){return t}},function(t,e,n){"use strict";e["a"]=o;var r=n(6),i=n(1);function o(t){return Object(r["a"])(t)?0:Object(i["a"])(t)?t.length:Object.keys(t).length}},function(t,e,n){"use strict";var r=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();e["a"]=r},function(t,e){function n(t,e,n,r){void 0===r&&(r=[]);var i=this;i.w=t||0,i.h=e||0,i.y=n||0,i.x=0,i.c=r||[],i.cs=r.length,i.prelim=0,i.mod=0,i.shift=0,i.change=0,i.tl=null,i.tr=null,i.el=null,i.er=null,i.msel=0,i.mser=0}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 o(t,e){var n=i(t,e);r(t,-n,e)}function a(t,e,n){n?e.y=t.x:e.x=t.x,t.c.forEach((function(t,r){a(t,e.children[r],n)}))}function s(t,e,n){void 0===n&&(n=0),e?(t.x=n,n+=t.width):(t.y=n,n+=t.height),t.children.forEach((function(t){s(t,e,n)}))}n.fromNode=function(t,e){if(!t)return null;var r=[];return t.children.forEach((function(t){r.push(n.fromNode(t,e))})),e?new n(t.height,t.width,t.x,r):new n(t.width,t.height,t.y,r)},t.exports=function(t,e){void 0===e&&(e={});var r=e.isHorizontal;function i(t){if(0!==t.cs){i(t.c[0]);for(var e=x(d(t.c[0].el),0,null),n=1;nn.low&&(n=n.nxt);var s=i+r.prelim+r.w-(a+o.prelim);s>0&&(a+=s,f(t,e,n.index,s));var u=d(r),c=d(o);u<=c&&(r=h(r),null!==r&&(i+=r.mod)),u>=c&&(o=l(o),null!==o&&(a+=o.mod))}!r&&o?p(t,e,o,a):r&&!o&&g(t,e,r,i)}function f(t,e,n,r){t.c[e].mod+=r,t.c[e].msel+=r,t.c[e].mser+=r,m(t,e,n,r)}function l(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 d(t){return t.y+t.h}function p(t,e,n,r){var i=t.c[0].el;i.tl=n;var o=r-n.mod-t.c[0].msel;i.mod+=o,i.prelim-=o,t.c[0].el=t.c[e].el,t.c[0].msel=t.c[e].msel}function g(t,e,n,r){var i=t.c[e].er;i.tr=n;var o=r-n.mod-t.c[e].mser;i.mod+=o,i.prelim-=o,t.c[e].er=t.c[e-1].er,t.c[e].mser=t.c[e-1].mser}function v(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 y(t,e){e+=t.mod,t.x=t.prelim+e,b(t);for(var n=0;n=n.low)n=n.nxt;return{low:t,index:e,nxt:n}}s(t,r);var w=n.fromNode(t,r);return i(w),y(w,0),a(w,t,r),o(t,r),t}},function(t,e,n){function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i=n(11),o=n(115),a=n(17),s=n(7),u=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.execute=function(){var t=this;return t.rootNode.width=0,a(t.rootNode,t.options,o)},e}(i),c={};function f(t,e){return e=s.assign({},c,e),new u(t,e).execute()}t.exports=f},function(t,e,n){var r=n(7);function i(t,e){void 0===t&&(t=0),void 0===e&&(e=[]);var n=this;n.x=n.y=0,n.leftChild=n.rightChild=null,n.height=0,n.children=e}var o={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function a(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,r){a(t,e.children[r],n)}))}t.exports=function(t,e){void 0===e&&(e={}),e=r.assign({},o,e);var n,s=0;function u(t){if(!t)return null;t.width=0,t.depth&&t.depth>s&&(s=t.depth);var e=t.children,n=e.length,r=new i(t.height,[]);return e.forEach((function(t,e){var i=u(t);r.children.push(i),0===e&&(r.leftChild=i),e===n-1&&(r.rightChild=i)})),r.originNode=t,r.isLeaf=t.isLeaf(),r}function c(t){if(t.isLeaf||0===t.children.length)t.drawingDepth=s;else{var e=t.children.map((function(t){return c(t)})),n=Math.min.apply(null,e);t.drawingDepth=n-1}return t.drawingDepth}function f(t){t.x=t.drawingDepth*e.rankSep,t.isLeaf?(t.y=0,n&&(t.y=n.y+n.height+e.nodeSep,t.originNode.parent!==n.originNode.parent&&(t.y+=e.subTreeSep)),n=t):(t.children.forEach((function(t){f(t)})),t.y=(t.leftChild.y+t.rightChild.y)/2)}var l=u(t);return c(l),f(l),a(l,t,e.isHorizontal),t}},function(t,e,n){function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i=n(11),o=n(117),a=n(30),s=n(7),u=["LR","RL","H"],c=u[0],f=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.execute=function(){var t=this,e=t.options,n=t.rootNode;e.isHorizontal=!0;var r=e.indent,i=void 0===r?20:r,s=e.dropCap,f=void 0===s||s,l=e.direction||c;if(l&&-1===u.indexOf(l))throw new TypeError("Invalid direction: "+l);if(l===u[0])o(n,i,f);else if(l===u[1])o(n,i,f),n.right2left();else if(l===u[2]){var h=a(n,e),d=h.left,p=h.right;o(d,i,f),d.right2left(),o(p,i,f);var g=d.getBoundingBox();p.translate(g.width,0),n.x=p.x-n.width/2}return n},e}(i),l={};function h(t,e){return e=s.assign({},l,e),new f(t,e).execute()}t.exports=h},function(t,e){function n(t,e,n,r){var i="function"===typeof n?n(t):n*t.depth;if(!r)try{if(t.id===t.parent.children[0].id)return t.x+=i,void(t.y=e?e.y:0)}catch(o){}t.x+=i,t.y=e?e.y+e.height:0}t.exports=function(t,e,r){var i=null;t.eachNode((function(t){n(t,i,e,r),i=t}))}},function(t,e,n){function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i=n(11),o=n(119),a=n(17),s=n(7),u=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.execute=function(){var t=this;return a(t.rootNode,t.options,o)},e}(i),c={};function f(t,e){return e=s.assign({},c,e),new u(t,e).execute()}t.exports=f},function(t,e,n){var r=n(7);function i(t,e){var n=0;return t.children.length?t.children.forEach((function(t){n+=i(t,e)})):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function o(t){var e=t.children,n=e.length;if(n){e.forEach((function(t){o(t)}));var r=e[0],i=e[n-1],a=i.y-r.y+i.height,s=0;if(e.forEach((function(t){s+=t.totalHeight})),a>t.height)t.y=r.y+a/2-t.height/2;else if(1!==e.length||t.height>s){var u=t.y+(t.height-a)/2-r.y;e.forEach((function(t){t.translate(0,u)}))}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}var a={getSubTreeSep:function(){return 0}};t.exports=function(t,e){void 0===e&&(e={}),e=r.assign({},a,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse((function(t){t.x=t.parent.x+t.parent.width})),t.parent=null,i(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode((function(t){var e=t.children,n=e.length;if(n){var r=e[0];if(r.startY=t.startY+t._subTreeSep,1===n)r.y=t.y+t.height/2-r.height/2;else{r.y=r.startY+r.totalHeight/2-r.height/2;for(var i=1;i=u-h&&a<=c+h&&s>=f-h&&s<=l+h&&r.default.pointToLine(t,e,n,i,a,s)<=o/2}e.default=i},"07c7":function(t,e){function n(){return!1}t.exports=n},"07ea":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=n("2047"),o=Object.prototype.hasOwnProperty;function a(t,e){if(!e||!r.default(t))return{};for(var n,a={},s=i.default(e)?e:function(t){return t[e]},u=0;u=(o=(g+y)/2))?g=o:y=o,(f=n>=(a=(v+m)/2))?v=a:m=a,i=d,!(d=d[l=f<<1|c]))return i[l]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(c=e>=(o=(g+y)/2))?g=o:y=o,(f=n>=(a=(v+m)/2))?v=a:m=a}while((l=f<<1|c)===(h=(u>=a)<<1|s>=o));return i[h]=d,i[l]=p,t}function a(t){var e,n,r,i,a=t.length,s=new Array(a),u=new Array(a),c=1/0,f=1/0,l=-1/0,h=-1/0;for(n=0;nl&&(l=r),ih&&(h=i));if(c>l||f>h)return this;for(this.cover(c,f).cover(l,h),n=0;nt||t>=i||r>e||e>=o)switch(s=(ed||(o=u.y0)>p||(a=u.x1)=m)<<1|t>=y)&&(u=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=u)}else{var b=t-+this._x.call(null,v.data),x=e-+this._y.call(null,v.data),w=b*b+x*x;if(w=(s=(p+v)/2))?p=s:v=s,(f=a>=(u=(g+y)/2))?g=u:y=u,e=d,!(d=d[l=f<<1|c]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,h=l)}while(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[h]=d:this._root=d),this):(this._root=i,this)};function d(t){for(var e=0,n=t.length;ec+p||of+p||au.index){var g=c-s.x-s.vx,v=f-s.y-s.vy,y=g*g+v*v;yt.r&&(t.r=t[e].r)}function u(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r[s(t,e,r),t]));for(a=0,i=new Array(c);a{}};function N(){for(var t,e=0,n=arguments.length,r={};e=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 R(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;o=0&&e._call.call(null,t),e=e._next;--X}function rt(){H=(W=$.now())+Z,X=V=0;try{nt()}finally{X=0,ot(),H=0}}function it(){var t=$.now(),e=t-W;e>U&&(Z-=e,W=t)}function ot(){var t,e,n=F,r=1/0;while(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:F=e);G=t,at(r)}function at(t){if(!X){V&&(V=clearTimeout(V));var e=t-H;e>24?(t<1/0&&(V=setTimeout(rt,t-$.now()-Z)),q&&(q=clearInterval(q))):(q||(W=$.now(),q=setInterval(it,U)),X=1,Q(rt))}}tt.prototype=et.prototype={constructor:tt,restart:function(t,e,n){if("function"!==typeof t)throw new TypeError("callback is not a function");n=(null==n?K():+n)+(null==e?0:+e),this._next||G===this||(G?G._next=this:F=this,G=this),this._call=t,this._time=n,at()},stop:function(){this._call&&(this._call=null,this._time=1/0,at())}};const st=1664525,ut=1013904223,ct=4294967296;var ft=function(){let t=1;return()=>(t=(st*t+ut)%ct)/ct};function lt(t){return t.x}function ht(t){return t.y}var dt=10,pt=Math.PI*(3-Math.sqrt(5)),gt=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=et(l),c=Y("tick","end"),f=ft();function l(){h(),c.call("tick",e),n1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,u,c=0,f=t.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(t,n),e):c.on(t)}}},vt=function(){var t,e,n,r,i,o=k(-30),a=1,s=1/0,u=.81;function c(n){var i,o=t.length,a=M(t,lt,ht).visitAfter(l);for(r=n,i=0;i=s)){(t.data!==e||t.next)&&(0===l&&(l=C(n),p+=l*l),0===h&&(h=C(n),p+=h*h),p=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.get("width"),maxY:this.get("height")}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var r=this.get("context"),i=this.get("el"),o=this.getPixelRatio();i.width=o*e,i.height=o*n,o>1&&r.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(e,n){return this.get("quickHit")?o.getShape(this,e,n):t.prototype.getShape.call(this,e,n,null)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements"),n=this.getViewRange();if(e.length&&e[0]===this)t=n;else if(t=u.getMergedRegion(e),t){t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY);var r=this.get("clipView");r&&(t=u.mergeView(t,n))}return t},e.prototype.refreshElement=function(t){var e=this.get("refreshElements");e.push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(c.clearAnimationFrame(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),u.applyAttrsToContext(t,this),u.drawChildren(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),n=this.getChildren(),r=this._getRefreshRegion();r&&(t.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.save(),t.beginPath(),t.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.clip(),u.applyAttrsToContext(t,this),u.drawChildren(t,n,r),t.restore()),c.each(e,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=c.requestAnimationFrame((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e}(i.AbstractCanvas);e.default=f},"0d24":function(t,e,n){(function(t){var r=n("2b3e"),i=n("07c7"),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||i;t.exports=f}).call(this,n("62e4")(t))},"0d3b":function(t,e,n){var r=n("d039"),i=n("b622"),o=n("c430"),a=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e["delete"]("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},"0da4":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("72fb"),i=n("2047"),o=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return r.default(t,(function(n,r){i.default(t)&&"prototype"===r||e.push(r)})),e};e.default=o},"0dfa":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDegree=e.rotate=e.scale=e.move=e.translate=e.getAdjMatrix=e.floydWarshall=e.scaleMatrix=e.distance=e.getCircleCenterByPoints=e.invertMatrix=e.applyMatrix=e.getEllipseIntersectByPoint=e.getCircleIntersectByPoint=e.getRectIntersectByPoint=void 0;var r=n("e897"),i=o(n("01f9"));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t,e,n){return t>=e&&t<=n},s=function(t,e,n,r){var i=.001,o={x:n.x-t.x,y:n.y-t.y},s={x:e.x-t.x,y:e.y-t.y},u={x:r.x-n.x,y:r.y-n.y},c=s.x*u.y-s.y*u.x,f=c*c,l=s.x*s.x+s.y*s.y,h=u.x*u.x+u.y*u.y,d=null;if(f>i*l*h){var p=(o.x*u.y-o.y*u.x)/c,g=(o.x*s.y-o.y*s.x)/c;a(p,0,1)&&a(g,0,1)&&(d={x:t.x+p*s.x,y:t.y+p*s.y})}return d},u=function(t,e){var n=t.x,r=t.y,i=t.width,o=t.height,a=n+i/2,u=r+o/2,c=[],f={x:a,y:u};c.push({x:n,y:r}),c.push({x:n+i,y:r}),c.push({x:n+i,y:r+o}),c.push({x:n,y:r+o}),c.push({x:n,y:r});for(var l=null,h=1;he[r][o]+e[o][i]&&(e[r][i]=e[r][o]+e[o][i]);return e};e.floydWarshall=v;var y=function(t,e){var n=t.nodes,r=t.edges,i=[],o={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach((function(t,e){o[t.id]=e;var n=[];i.push(n)})),r&&r.forEach((function(t){var n=t.source,r=t.target,a=o[n],s=o[r];i[a][s]=1,e||(i[s][a]=1)})),i};e.getAdjMatrix=y;var m=function(t,e){t.translate(e.x,e.y)};e.translate=m;var b=function(t,e){var n=t.getMatrix();n||(n=r.mat3.create());var i=t.getCanvasBBox(),o=e.x-i.minX,a=e.y-i.minY,s=(0,r.transform)(n,[["t",o,a]]);t.setMatrix(s)};e.move=b;var x=function(t,e){var n=t.getMatrix();n||(n=r.mat3.create());var o=e;(0,i.default)(e)||(o=[e,e]),(0,i.default)(e)&&1===e.length&&(o=[e[0],e[0]]),n=(0,r.transform)(n,[["s",o[0],o[1]]]),t.setMatrix(n)};e.scale=x;var w=function(t,e){var n=t.getMatrix();n||(n=r.mat3.create()),n=(0,r.transform)(n,[["r",e]]),t.setMatrix(n)};e.rotate=w;var M=function(t,e,n){for(var r=[],i=0;i0},t.prototype.lessThanOrEqual=function(t,e){return this.lessThan(t,e)||this.equal(t,e)},t.prototype.greaterThanOrEqual=function(t,e){return this.greaterThan(t,e)||this.equal(t,e)},t.prototype.reverse=function(){var t=this.compare;this.compare=function(e,n){return t(n,e)}},t}(),i=r;e.default=i},"100e":function(t,e,n){var r=n("cd9d"),i=n("2286"),o=n("c1c9");function a(t,e){return o(i(t,e,r),t+"")}t.exports=a},1041:function(t,e,n){var r=n("8eeb"),i=n("a029");function o(t,e){return r(t,i(t),e)}t.exports=o},1290:function(t,e){function n(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=n},1304:function(t,e,n){var r=n("cd9d");function i(t){return"function"==typeof t?t:r}t.exports=i},1310:function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},"131a":function(t,e,n){var r=n("23e7"),i=n("d2bb");r({target:"Object",stat:!0},{setPrototypeOf:i})},1322:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("00c0");e.getBBoxMethod=r.getMethod;var i=n("29d7"),o=n("6cac"),a=n("2b23"),s=n("79cf"),u=n("83bc"),c=n("2d1f"),f=n("d5f3"),l=n("71f5");r.register("rect",i.default),r.register("image",i.default),r.register("circle",o.default),r.register("marker",o.default),r.register("polyline",a.default),r.register("polygon",s.default),r.register("text",u.default),r.register("path",c.default),r.register("line",f.default),r.register("ellipse",l.default)},1368:function(t,e,n){var r=n("da03"),i=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function o(t){return!!i&&i in t}t.exports=o},"13c9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n("1b95")),i=a(n("72fb")),o=a(n("eafe"));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(){function t(t){this._cfgs=(0,r.default)(this.getDefaultCfgs(),t),this._events={},this.destroyed=!1}return t.prototype.getDefaultCfgs=function(){return{}},t.prototype.initPlugin=function(t){var e=this;e.set("graph",t);var n=e.getEvents(),r={};(0,i.default)(n,(function(n,i){var a=(0,o.default)(e,n);r[i]=a,t.on(i,a)})),this._events=r,this.init()},t.prototype.init=function(){},t.prototype.getEvents=function(){return{}},t.prototype.get=function(t){return this._cfgs[t]},t.prototype.set=function(t,e){this._cfgs[t]=e},t.prototype.destroy=function(){},t.prototype.destroyPlugin=function(){this.destroy();var t=this.get("graph"),e=this._events;(0,i.default)(e,(function(e,n){t.off(n,e)})),this._events=null,this._cfgs=null,this.destroyed=!0},t}(),u=s;e.default=u},"13ea":function(t,e,n){var r=n("03dd"),i=n("42a2"),o=n("d370"),a=n("6747"),s=n("30c9"),u=n("0d24"),c=n("eac5"),f=n("73ac"),l="[object Map]",h="[object Set]",d=Object.prototype,p=d.hasOwnProperty;function g(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||f(t)||o(t)))return!t.length;var e=i(t);if(e==l||e==h)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}t.exports=g},"14ca":function(t,e,n){"use strict";var r=n("9ab4"),i=n("8937"),o=n("804a"),a=c(n("067f")),s=c(n("7da3")),u=n("6a23");function c(t){return t&&t.__esModule?t:{default:t}}var f={itemType:"node",shapeType:"single-node",labelPosition:"center",offset:a.default.nodeLabel.offset,getSize:function(t){var e=t.size||this.options.size||a.default.defaultNode.size;return(0,i.isArray)(e)&&1===e.length&&(e=[e[0],e[0]]),(0,i.isArray)(e)||(e=[e,e]),e},getLabelStyleByPosition:function(t,e){var n=e.position||this.labelPosition;if("center"===n)return{x:0,y:0,text:t.label};var r=e.offset;(0,i.isNil)(r)&&(r=this.offset);var o,a=this.getSize(t),s=a[0],u=a[1];switch(n){case"top":o={x:0,y:0-u/2-r,textBaseline:"bottom"};break;case"bottom":o={x:0,y:u/2+r,textBaseline:"top"};break;case"left":o={x:0-s/2-r,y:0,textAlign:"right"};break;default:o={x:s/2+r,y:0,textAlign:"left"};break}return o.text=t.label,o},getLabelBgStyleByPosition:function(t,e,n,a){if(!t)return{};var s=t.getBBox(),u=n.style&&n.style.background;if(!u)return{};var c=(0,o.formatPadding)(u.padding),f=s.width+c[1]+c[3],l=s.height+c[0]+c[2],h=n.position||this.labelPosition,d=n.offset;(0,i.isNil)(d)&&(d=this.offset);var p,g=this.getSize(e),v=g[0],y=g[1];switch(h){case"top":p={x:0-s.width/2-c[3],y:0-y/2-d-s.height-c[0]};break;case"bottom":p={x:0-s.width/2-c[3],y:y/2+d-c[2]};break;case"left":p={x:0-v/2-d-s.width-c[3],y:c[0]+c[2]===0?0:-s.height/2+(c[0]+c[2])/2};break;default:p={x:v/2+d-c[3],y:c[0]+c[2]===0?0:-s.height/2+(c[0]+c[2])/2};break}return p=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},p),u),{width:f,height:l}),p},drawShape:function(t,e){var n=this.shapeType,r=this.getShapeStyle(t),i=e.addShape(n,{attrs:r,draggable:!0,name:"node-shape"});return i},updateLinkPoints:function(t,e){var n,o=this.options.linkPoints,a=e.find((function(t){return"link-point-left"===t.get("className")})),s=e.find((function(t){return"link-point-right"===t.get("className")})),u=e.find((function(t){return"link-point-top"===t.get("className")})),c=e.find((function(t){return"link-point-bottom"===t.get("className")}));a&&(n=a.attr()),s&&!n&&(n=s.attr()),u&&!n&&(n=u.attr()),c&&!n&&(n=c.attr()),n||(n=o);var f=(0,i.mix)({},n,t.linkPoints),l=f.fill,h=f.stroke,d=f.lineWidth,p=f.size/2;p||(p=f.r);var g=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,bottom:void 0},v=g.left,y=g.right,m=g.top,b=g.bottom,x=this.getSize(t),w=x[0],M=x[1],_={r:p,fill:l,stroke:h,lineWidth:d};a?v||void 0===v?a.attr((0,r.__assign)((0,r.__assign)({},_),{x:-w/2,y:0})):a.remove():v&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},_),{x:-w/2,y:0}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0}),s?(y||void 0===y||s.remove(),s.attr((0,r.__assign)((0,r.__assign)({},_),{x:w/2,y:0}))):y&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},_),{x:w/2,y:0}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0}),u?(m||void 0===m||u.remove(),u.attr((0,r.__assign)((0,r.__assign)({},_),{x:0,y:-M/2}))):m&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},_),{x:0,y:-M/2}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0}),c?b||void 0===b?c.attr((0,r.__assign)((0,r.__assign)({},_),{x:0,y:M/2})):c.remove():b&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},_),{x:0,y:M/2}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0})},updateShape:function(t,e,n,i){var o=e.get("keyShape");o.attr((0,r.__assign)({},n)),this.updateLabel(t,e),i&&this.updateIcon(t,e)},updateIcon:function(t,e){var n=this,o=e.getContainer(),a=this.options.icon,s=(0,i.mix)({},a,t.icon),u=(t.icon?t.icon:{show:void 0}).show,c=o.find((function(t){return t.get("className")===n.type+"-icon"}));if(c)if(u||void 0===u){var f=(0,i.mix)({},a,c.attr(),t.icon),l=f.width,h=f.height;c.attr((0,r.__assign)((0,r.__assign)({},f),{x:-l/2,y:-h/2}))}else c.remove();else if(u){l=s.width,h=s.height;o.addShape("image",{attrs:(0,r.__assign)((0,r.__assign)({},s),{x:-l/2,y:-h/2}),className:this.type+"-icon",name:this.type+"-icon"});var d=o.find((function(t){return"node-label"===t.get("className")}));d&&d.toFront()}}},l=Object.assign({},u.shapeBase,f);s.default.registerNode("single-node",l)},1529:function(t,e,n){"use strict";var r=n("9ab4"),i=s(n("1b95")),o=s(n("067f")),a=s(n("7da3"));function s(t){return t&&t.__esModule?t:{default:t}}a.default.registerNode("circle",{options:{size:o.default.defaultNode.size,style:{x:0,y:0,stroke:o.default.defaultShapeStrokeColor,fill:o.default.defaultShapeFillColor,lineWidth:o.default.defaultNode.style.lineWidth},labelCfg:{style:{fill:"#595959"}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:3,lineWidth:1,fill:"#72CC4A",stroke:"#72CC4A"},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/basement_prod/012bcf4f-423b-4922-8c24-32a89f8c41ce.svg",width:16,height:16}},shapeType:"circle",labelPosition:"center",drawShape:function(t,e){var n=this.options.icon,o=this.getShapeStyle(t),a=(0,i.default)({},n,t.icon),s=e.addShape("circle",{attrs:o,className:"circle-keyShape",draggable:!0}),u=a.width,c=a.height,f=a.show;if(f)e.addShape("image",{attrs:(0,r.__assign)({x:-u/2,y:-c/2},a),className:"circle-icon",name:"circle-icon",draggable:!0});return this.drawLinkPoints(t,e),s},drawLinkPoints:function(t,e){var n=this.options.linkPoints,o=(0,i.default)({},n,t.linkPoints),a=o.top,s=o.left,u=o.right,c=o.bottom,f=o.size,l=(0,r.__rest)(o,["top","left","right","bottom","size"]),h=this.getSize(t),d=h[0]/2;s&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:-d,y:0,r:f}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0}),u&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:d,y:0,r:f}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0}),a&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:0,y:-d,r:f}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0}),c&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:0,y:d,r:f}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0})},getShapeStyle:function(t){var e=this.options.style,n={stroke:t.color},r=(0,i.default)({},e,n,t.style),o=this.getSize(t),a=o[0]/2,s=Object.assign({},{x:0,y:0,r:a},r);return s},update:function(t,e){var n=e.getContainer(),r=this.getSize(t),o={stroke:t.color,r:r[0]/2},a=e.get("keyShape"),s=(0,i.default)({},a.attr(),o,t.style);this.updateShape(t,e,s,!0),this.updateLinkPoints(t,n)}},"single-node")},"157e":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n("72fb")),i=s(n("01f9")),o=s(n("61d8")),a=s(n("2f92"));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(t){this.graph=t,this.destroyed=!1,this.modes=t.get("modes")||{default:[]},this.formatModes(),this.mode=t.get("defaultMode")||"default",this.currentBehaves=[],this.setMode(this.mode)}return t.prototype.formatModes=function(){var t=this.modes;(0,r.default)(t,(function(t){(0,r.default)(t,(function(e,n){(0,o.default)(e)&&(t[n]={type:e})}))}))},t.prototype.setBehaviors=function(t){var e,n=this.graph,i=this.modes[t],o=[];(0,r.default)(i||[],(function(t){var r=a.default.getBehavior(t.type);r&&(e=new r(t),e&&(e.bind(n),o.push(e)))})),this.currentBehaves=o},t.mergeBehaviors=function(t,e){return(0,r.default)(e,(function(e){t.indexOf(e)<0&&((0,o.default)(e)&&(e={type:e}),t.push(e))})),t},t.filterBehaviors=function(t,e){var n=[];return t.forEach((function(t){var r="";r=(0,o.default)(t)?t:t.type,e.indexOf(r)<0&&n.push(t)})),n},t.prototype.setMode=function(t){var e=this,n=e.modes,i=e.graph,o=t,a=n[o];a&&(i.emit("beforemodechange",{mode:t}),(0,r.default)(this.currentBehaves,(function(t){t.unbind(i)})),this.setBehaviors(o),i.emit("aftermodechange",{mode:t}),this.mode=t)},t.prototype.getMode=function(){return this.mode},t.prototype.manipulateBehaviors=function(e,n,o){var a,s=this;if(a=(0,i.default)(e)?e:[e],(0,i.default)(n))return(0,r.default)(n,(function(e){s.modes[e]?s.modes[e]=o?t.mergeBehaviors(s.modes[e]||[],a):t.filterBehaviors(s.modes[e]||[],a):o&&(s.modes[e]=a)})),this;var u=n;return n||(u=this.mode),this.modes[u]||o&&(this.modes[u]=a),this.modes[u]=o?t.mergeBehaviors(this.modes[u]||[],a):t.filterBehaviors(this.modes[u]||[],a),this.setMode(this.mode),this},t.prototype.destroy=function(){this.graph=null,this.modes=null,this.currentBehaves=null,this.destroyed=!0},t}(),c=u;e.default=c},"159a":function(t,e,n){var r=n("32b3"),i=n("e2e4"),o=n("c098"),a=n("1a8c"),s=n("f4d6");function u(t,e,n,u){if(!a(t))return t;e=i(e,t);var c=-1,f=e.length,l=f-1,h=t;while(null!=h&&++cc&&(f=c),t.zoom(f,a)}},t.prototype.getFormatPadding=function(){var t=this.graph.get("fitViewPadding");return(0,o.formatPadding)(t)},t.prototype.focusPoint=function(t){var e=this.getViewCenter(),n=this.getPointByCanvas(e.x,e.y),r=this.graph.get("group").getMatrix();r||(r=s.mat3.create()),this.graph.translate((n.x-t.x)*r[0],(n.y-t.y)*r[4])},t.prototype.getPointByCanvas=function(t,e){var n=this.graph.get("group").getMatrix();n||(n=s.mat3.create());var r=(0,a.invertMatrix)({x:t,y:e},n);return r},t.prototype.getPointByClient=function(t,e){var n=this.graph.get("canvas"),r=n.getPointByClient(t,e);return this.getPointByCanvas(r.x,r.y)},t.prototype.getClientByPoint=function(t,e){var n=this.graph.get("canvas"),r=this.getCanvasByPoint(t,e),i=n.getClientByPoint(r.x,r.y);return{x:i.x,y:i.y}},t.prototype.getCanvasByPoint=function(t,e){var n=this.graph.get("group").getMatrix();return n||(n=s.mat3.create()),(0,a.applyMatrix)({x:t,y:e},n)},t.prototype.focus=function(t){if((0,i.default)(t)&&(t=this.graph.findById(t)),t){var e=t.get("group"),n=e.getMatrix();n||(n=s.mat3.create()),this.focusPoint({x:n[6],y:n[7]})}},t.prototype.changeSize=function(t,e){var n=this.graph;if(!(0,r.default)(t)||!(0,r.default)(e))throw Error("invalid canvas width & height, please make sure width & height type is number");n.set({width:t,height:e});var i=n.get("canvas");i.changeSize(t,e);var o=n.get("plugins");o.forEach((function(r){if(r.get("gridContainer")){var i=n.get("minZoom");(0,u.default)(r.get("container"),{width:t+"px",height:e+"px"}),(0,u.default)(r.get("gridContainer"),{width:t/i+"px",height:e/i+"px",left:0,top:0})}}))},t.prototype.destroy=function(){this.graph=null,this.destroyed=!1},t}(),l=f;e.default=l},1729:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=d(n("01f9")),o=d(n("842b")),a=d(n("61d8")),s=d(n("2047")),u=n("0dfa"),c=n("804a"),f=n("56fa"),l=d(n("1dfb")),h=d(n("bb07"));function d(t){return t&&t.__esModule?t:{default:t}}function p(t){for(var e=t.length,n=t[0].length,r=[],i=0;ir[0]?r[0]:_-r[0],k=S-r[1]>r[1]?r[1]:S-r[1];0===P&&(P=_/2),0===k&&(k=S/2);var C=k>P?P:k,O=Math.max.apply(Math,M),E=[];M.forEach((function(e,n){t.unitRadius||(t.unitRadius=C/O),E[n]=e*t.unitRadius})),t.radii=E;var A=t.eIdealDisMatrix();t.eIdealDistances=A;var j=p(A);t.weights=j;var I=new l.default({distances:A,linkDistance:f}),T=I.layout();T.forEach((function(t){(0,c.isNaN)(t[0])&&(t[0]=Math.random()*f),(0,c.isNaN)(t[1])&&(t[1]=Math.random()*f)})),t.positions=T,T.forEach((function(t,n){e[n].x=t[0]+r[0],e[n].y=t[1]+r[1]})),T.forEach((function(t){t[0]-=T[m][0],t[1]-=T[m][1]})),t.run();var B,N=t.preventOverlap,D=t.nodeSize,L=t.strictRadial;if(N){var R,z=t.nodeSpacing;R=(0,o.default)(z)?function(){return z}:(0,s.default)(z)?z:function(){return 0},B=D?(0,i.default)(D)?function(t){var e=D[0]>D[1]?D[0]:D[1];return e+R(t)}:function(t){return D+R(t)}:function(t){if(t.size){if((0,i.default)(t.size)){var e=t.size[0]>t.size[1]?t.size[0]:t.size[1];return e+R(t)}return t.size+R(t)}return 10+R(t)};var F={nodeSizeFunc:B,adjMatrix:b,positions:T,radii:E,height:S,width:_,strictRadial:L,focusID:m,iterations:t.maxPreventOverlapIteration||200,k:T.length/4.5,nodes:e},G=new h.default(F);T=G.layout()}T.forEach((function(t,n){e[n].x=t[0]+r[0],e[n].y=t[1]+r[1]}))}},e.prototype.run=function(){for(var t=this,e=t.maxIteration,n=t.positions||[],r=t.weights||[],i=t.eIdealDistances||[],o=t.radii||[],a=0;a<=e;a++){var s=a/e;t.oneIteration(s,n,o,i,r)}},e.prototype.oneIteration=function(t,e,n,r,i){var o=this,a=1-t,s=o.focusIndex;e.forEach((function(o,u){var c=v(o,[0,0]),f=0===c?0:1/c;if(u!==s){var l=0,h=0,d=0;e.forEach((function(t,e){if(u!==e){var n=v(o,t),a=0===n?0:1/n,s=r[e][u];d+=i[u][e],l+=i[u][e]*(t[0]+s*(o[0]-t[0])*a),h+=i[u][e]*(t[1]+s*(o[1]-t[1])*a)}}));var p=0===n[u]?0:1/n[u];d*=a,d+=t*p*p,l*=a,l+=t*p*o[0]*f,o[0]=l/d,h*=a,h+=t*p*o[1]*f,o[1]=h/d}}))},e.prototype.eIdealDisMatrix=function(){var t=this,e=t.nodes;if(!e)return[];var n=t.distances,r=t.linkDistance,i=t.radii||[],o=t.unitRadius||50,s=[];return n&&n.forEach((function(n,u){var c=[];n.forEach((function(n,s){if(u===s)c.push(0);else if(i[u]===i[s])if("data"===t.sortBy)c.push(n*(Math.abs(u-s)*t.sortStrength)/(i[u]/o));else if(t.sortBy){var f=e[u][t.sortBy]||0,l=e[s][t.sortBy]||0;(0,a.default)(f)&&(f=f.charCodeAt(0)),(0,a.default)(l)&&(l=l.charCodeAt(0)),c.push(n*(Math.abs(f-l)*t.sortStrength)/(i[u]/o))}else c.push(n*r/(i[u]/o));else{var h=(r+o)/2;c.push(n*h)}})),s.push(c)})),s},e.prototype.handleInfinity=function(t,e,n){for(var r=t.length,i=0;in?t[e][r]:n);return n},e}(f.BaseLayout),m=y;e.default=m},"17d5":function(t,e,n){var r;try{r=n("e008")}catch(i){}r||(r=window.graphlib),t.exports=r},1838:function(t,e,n){var r=n("c05f"),i=n("9b02"),o=n("8604"),a=n("f608"),s=n("08cc"),u=n("20ec"),c=n("f4d6"),f=1,l=2;function h(t,e){return a(t)&&s(e)?u(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,f|l)}}t.exports=h},1845:function(t,e,n){"use strict";var r=n("6f9c"),i=n("17d5").Graph,o=n("e849").slack;function a(t){var e,n,r=new i({directed:!1}),a=t.nodes()[0],f=t.nodeCount();r.setNode(a,{});while(s(r,t)1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}(0,r.each)(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}e.default=a},"19b2":function(t,e,n){var r=n("33de"),i=n("9671");function o(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:s(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e}function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function s(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}function u(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}t.exports={write:o,read:u}},"19f7":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LAYOUT_MESSAGE=void 0;var r={RUN:"LAYOUT_RUN",END:"LAYOUT_END",ERROR:"LAYOUT_ERROR",TICK:"LAYOUT_TICK"};e.LAYOUT_MESSAGE=r},"1a2d0":function(t,e,n){var r=n("42a2"),i=n("1310"),o="[object Map]";function a(t){return i(t)&&r(t)==o}t.exports=a},"1a8c":function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},"1b8a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();e.default=r},"1b92":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pointsToPolygon=e.getControlPoint=e.getSpline=void 0;var r=n("e897"),i=n("2ef1"),o=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,(function(t,n){return"\\"===t.charAt(0)?t.slice(1):e[n]||""})):t},a=function(t){var e=[];if(t.length<2)throw new Error("point length must largn than 2, now it's "+t.length);for(var n=0,r=t;n0};e.default=i},"1bac":function(t,e,n){var r=n("7d1f"),i=n("a029"),o=n("9934");function a(t){return r(t,o,i)}t.exports=a},"1c3c":function(t,e,n){var r=n("9e69"),i=n("2474"),o=n("9638"),a=n("a2be"),s=n("edfa"),u=n("ac41"),c=1,f=2,l="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Map]",g="[object Number]",v="[object RegExp]",y="[object Set]",m="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",M=r?r.prototype:void 0,_=M?M.valueOf:void 0;function S(t,e,n,r,M,S,P){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case x:return!(t.byteLength!=e.byteLength||!S(new i(t),new i(e)));case l:case h:case g:return o(+t,+e);case d:return t.name==e.name&&t.message==e.message;case v:case m:return t==e+"";case p:var k=s;case y:var C=r&c;if(k||(k=u),t.size!=e.size&&!C)return!1;var O=P.get(t);if(O)return O==e;r|=f,P.set(t,e);var E=a(k(t),k(e),r,M,S,P);return P["delete"](t),E;case b:if(_)return _.call(t)==_.call(e)}return!1}t.exports=S},"1cba":function(t,e,n){var r=n("4796"),i=n("9aff"),o=n("6428");function a(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e2&&(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 while(o.length>=e[s])if(n.push([r].concat(o.splice(0,e[s]))),!e[s])break;return""})),n}e.default=s},"1dfb":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("b4ae"),i=function(){function t(t){this.distances=t.distances,this.dimension=t.dimension||2,this.linkDistance=t.linkDistance}return t.prototype.layout=function(){var t=this,e=t.dimension,n=t.distances,i=t.linkDistance;try{var o=r.Matrix.mul(r.Matrix.pow(n,2),-.5),a=o.mean("row"),s=o.mean("column"),u=o.mean();o.add(u).subRowVector(a).subColumnVector(s);var c=new r.SingularValueDecomposition(o),f=r.Matrix.sqrt(c.diagonalMatrix).diagonal();return c.leftSingularVectors.toJSON().map((function(t){return r.Matrix.mul([t],[f]).toJSON()[0].splice(0,e)}))}catch(g){for(var l=[],h=0;h=u)return c;var f=n[i];return c*("desc"==f?-1:1)}}return t.index-e.index}t.exports=i},"220e":function(t,e,n){var r=n("6f9c"),i=n("b50e");function o(t){function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,u=o.maxRank+1;s1||e<0||t.length<2)return null;var n=o(t),i=n.segments,a=n.totalLength;if(0===a)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+d){var p=(e-s)/d;u=r.default.pointAt(l[0],l[1],h[0],h[1],p);break}s+=d}return u}function u(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=o(t),r=n.segments,i=n.totalLength,a=0,s=0,u=0;u=a&&e<=a+h){s=Math.atan2(l[1]-f[1],l[0]-f[0]);break}a+=h}return s}function c(t,e,n){for(var i=1/0,o=0;ot.length)&&(e=t.length);for(var n=0,r=new Array(e);n0;--s)if(r=e[s].dequeue(),r){i=i.concat(c(t,e,n,r,!0));break}}return i}function c(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,l(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a["in"]-=i,l(e,n,a)})),t.removeNode(i.v),a}function f(t,e){var n=new i,a=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),s=Math.max(s,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w)["in"]+=i)}));var u=r.range(s+a+3).map((function(){return new o})),c=a+1;return r.forEach(n.nodes(),(function(t){l(u,c,n.node(t))})),{graph:n,buckets:u,zeroIdx:c}}function l(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)}},"29d7":function(t,e,n){"use strict";function r(t){var e=t.attr(),n=e.x,r=e.y,i=e.width,o=e.height;return{x:n,y:r,width:i,height:o}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},"29f3":function(t,e){var n=Object.prototype,r=n.toString;function i(t){return r.call(t)}t.exports=i},"29f4":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=1e-5;function i(t,e,n){return void 0===n&&(n=r),Math.abs(t-e)=2),s=f.buildLayerMatrix(t);var v=o(t,s);v?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,it=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,ot=/[\t\n\r]/g,at=function(t,e){var n,r,i;if("["==T(e,0)){if("]"!=T(e,e.length-1))return W;if(n=ut(Y(e,1,-1)),!n)return W;t.host=n}else if(yt(t)){if(e=b(e),B(nt,e))return W;if(n=st(e),null===n)return W;t.host=n}else{if(B(rt,e))return W;for(n="",r=v(e),i=0;i4)return t;for(n=[],r=0;r1&&"0"==T(i,0)&&(o=B(K,i)?16:8,i=Y(i,8==o?1:2)),""===i)a=0;else{if(!B(10==o?tt:8==o?J:et,i))return t;a=A(i,o)}R(n,a)}for(r=0;r=I(256,5-e))return null}else if(a>255)return null;for(s=L(n),r=0;r6)return;r=0;while(h()){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!B(Q,h()))return;while(B(Q,h())){if(o=A(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;l++}u[c]=256*u[c]+i,r++,2!=r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[c++]=e}else{if(null!==f)return;l++,c++,f=c}}if(null!==f){a=c-f,c=7;while(0!=c&&a>0)s=u[c],u[c--]=u[f+a-1],u[f+--a]=s}else if(8!=c)return;return u},ct=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e},ft=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)V(e,t%256),t=j(t/256);return N(e,".")}if("object"==typeof t){for(e="",r=ct(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=D(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},lt={},ht=g({},lt,{" ":1,'"':1,"<":1,">":1,"`":1}),dt=g({},ht,{"#":1,"?":1,"{":1,"}":1}),pt=g({},dt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gt=function(t,e){var n=m(t,0);return n>32&&n<127&&!p(e,t)?t:encodeURIComponent(t)},vt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},yt=function(t){return p(vt,t.scheme)},mt=function(t){return""!=t.username||""!=t.password},bt=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},xt=function(t,e){var n;return 2==t.length&&B(Z,T(t,0))&&(":"==(n=T(t,1))||!e&&"|"==n)},wt=function(t){var e;return t.length>1&&xt(Y(t,0,2))&&(2==t.length||"/"===(e=T(t,2))||"\\"===e||"?"===e||"#"===e)},Mt=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&xt(e[0],!0)||e.length--},_t=function(t){return"."===t||"%2e"===X(t)},St=function(t){return t=X(t),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},Pt={},kt={},Ct={},Ot={},Et={},At={},jt={},It={},Tt={},Bt={},Nt={},Dt={},Lt={},Rt={},zt={},Ft={},Gt={},Yt={},Xt={},Vt={},qt={},Ut=function(t,e,n,i){var o,a,s,u,c=n||Pt,f=0,l="",h=!1,d=!1,g=!1;n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=z(e,it,"")),e=z(e,ot,""),o=v(e);while(f<=o.length){switch(a=o[f],c){case Pt:if(!a||!B(Z,a)){if(n)return U;c=Ct;continue}l+=X(a),c=kt;break;case kt:if(a&&(B($,a)||"+"==a||"-"==a||"."==a))l+=X(a);else{if(":"!=a){if(n)return U;l="",c=Ct,f=0;continue}if(n&&(yt(t)!=p(vt,l)||"file"==l&&(mt(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,n)return void(yt(t)&&vt[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?c=Rt:yt(t)&&i&&i.scheme==t.scheme?c=Ot:yt(t)?c=It:"/"==o[f+1]?(c=Et,f++):(t.cannotBeABaseURL=!0,R(t.path,""),c=Xt)}break;case Ct:if(!i||i.cannotBeABaseURL&&"#"!=a)return U;if(i.cannotBeABaseURL&&"#"==a){t.scheme=i.scheme,t.path=y(i.path),t.query=i.query,t.fragment="",t.cannotBeABaseURL=!0,c=qt;break}c="file"==i.scheme?Rt:At;continue;case Ot:if("/"!=a||"/"!=o[f+1]){c=At;continue}c=Tt,f++;break;case Et:if("/"==a){c=Bt;break}c=Yt;continue;case At:if(t.scheme=i.scheme,a==r)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=y(i.path),t.query=i.query;else if("/"==a||"\\"==a&&yt(t))c=jt;else if("?"==a)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=y(i.path),t.query="",c=Vt;else{if("#"!=a){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=y(i.path),t.path.length--,c=Yt;continue}t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=y(i.path),t.query=i.query,t.fragment="",c=qt}break;case jt:if(!yt(t)||"/"!=a&&"\\"!=a){if("/"!=a){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,c=Yt;continue}c=Bt}else c=Tt;break;case It:if(c=Tt,"/"!=a||"/"!=T(l,f+1))continue;f++;break;case Tt:if("/"!=a&&"\\"!=a){c=Bt;continue}break;case Bt:if("@"==a){h&&(l="%40"+l),h=!0,s=v(l);for(var m=0;m65535)return H;t.port=yt(t)&&w===vt[t.scheme]?null:w,l=""}if(n)return;c=Gt;continue}return H}l+=a;break;case Rt:if(t.scheme="file","/"==a||"\\"==a)c=zt;else{if(!i||"file"!=i.scheme){c=Yt;continue}if(a==r)t.host=i.host,t.path=y(i.path),t.query=i.query;else if("?"==a)t.host=i.host,t.path=y(i.path),t.query="",c=Vt;else{if("#"!=a){wt(N(y(o,f),""))||(t.host=i.host,t.path=y(i.path),Mt(t)),c=Yt;continue}t.host=i.host,t.path=y(i.path),t.query=i.query,t.fragment="",c=qt}}break;case zt:if("/"==a||"\\"==a){c=Ft;break}i&&"file"==i.scheme&&!wt(N(y(o,f),""))&&(xt(i.path[0],!0)?R(t.path,i.path[0]):t.host=i.host),c=Yt;continue;case Ft:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&xt(l))c=Yt;else if(""==l){if(t.host="",n)return;c=Gt}else{if(u=at(t,l),u)return u;if("localhost"==t.host&&(t.host=""),n)return;l="",c=Gt}continue}l+=a;break;case Gt:if(yt(t)){if(c=Yt,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(c=Yt,"/"!=a))continue}else t.fragment="",c=qt;else t.query="",c=Vt;break;case Yt:if(a==r||"/"==a||"\\"==a&&yt(t)||!n&&("?"==a||"#"==a)){if(St(l)?(Mt(t),"/"==a||"\\"==a&&yt(t)||R(t.path,"")):_t(l)?"/"==a||"\\"==a&&yt(t)||R(t.path,""):("file"==t.scheme&&!t.path.length&&xt(l)&&(t.host&&(t.host=""),l=T(l,0)+":"),R(t.path,l)),l="","file"==t.scheme&&(a==r||"?"==a||"#"==a))while(t.path.length>1&&""===t.path[0])F(t.path);"?"==a?(t.query="",c=Vt):"#"==a&&(t.fragment="",c=qt)}else l+=gt(a,dt);break;case Xt:"?"==a?(t.query="",c=Vt):"#"==a?(t.fragment="",c=qt):a!=r&&(t.path[0]+=gt(a,lt));break;case Vt:n||"#"!=a?a!=r&&("'"==a&&yt(t)?t.query+="%27":t.query+="#"==a?"%23":gt(a,lt)):(t.fragment="",c=qt);break;case qt:a!=r&&(t.fragment+=gt(a,ht));break}f++}},Wt=function(t){var e,n,r=d(this,Ht),i=arguments.length>1?arguments[1]:void 0,a=x(t),s=S(r,{type:"URL"});if(void 0!==i)try{e=P(i)}catch(l){if(n=Ut(e={},x(i)),n)throw E(n)}if(n=Ut(s,a,null,e),n)throw E(n);var u=s.searchParams=new k,f=C(u);f.updateSearchParams(s.query),f.updateURL=function(){s.query=x(u)||null},o||(r.href=c(Zt,r),r.origin=c($t,r),r.protocol=c(Qt,r),r.username=c(Kt,r),r.password=c(Jt,r),r.host=c(te,r),r.hostname=c(ee,r),r.port=c(ne,r),r.pathname=c(re,r),r.search=c(ie,r),r.searchParams=c(oe,r),r.hash=c(ae,r))},Ht=Wt.prototype,Zt=function(){var t=P(this),e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,a=t.path,s=t.query,u=t.fragment,c=e+":";return null!==i?(c+="//",mt(t)&&(c+=n+(r?":"+r:"")+"@"),c+=ft(i),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?a[0]:a.length?"/"+N(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},$t=function(){var t=P(this),e=t.scheme,n=t.port;if("blob"==e)try{return new Wt(e.path[0]).origin}catch(r){return"null"}return"file"!=e&&yt(t)?e+"://"+ft(t.host)+(null!==n?":"+n:""):"null"},Qt=function(){return P(this).scheme+":"},Kt=function(){return P(this).username},Jt=function(){return P(this).password},te=function(){var t=P(this),e=t.host,n=t.port;return null===e?"":null===n?ft(e):ft(e)+":"+n},ee=function(){var t=P(this).host;return null===t?"":ft(t)},ne=function(){var t=P(this).port;return null===t?"":x(t)},re=function(){var t=P(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+N(e,"/"):""},ie=function(){var t=P(this).query;return t?"?"+t:""},oe=function(){return P(this).searchParams},ae=function(){var t=P(this).fragment;return t?"#"+t:""},se=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&l(Ht,{href:se(Zt,(function(t){var e=P(this),n=x(t),r=Ut(e,n);if(r)throw E(r);C(e.searchParams).updateSearchParams(e.query)})),origin:se($t),protocol:se(Qt,(function(t){var e=P(this);Ut(e,x(t)+":",Pt)})),username:se(Kt,(function(t){var e=P(this),n=v(x(t));if(!bt(e)){e.username="";for(var r=0;r-1||(this.trigger=a,console.warn("Behavior brush-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),"drag"===this.trigger?{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"clearStates"}:{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"clearStates",keyup:"onKeyUp",keydown:"onKeyDown"}},onMouseDown:function(t){var e=t.item,n=this.brush;e||("drag"===this.trigger||this.keydown)&&(this.selectedNodes&&0!==this.selectedNodes.length&&this.clearStates(),n||(n=this.createBrush()),this.originPoint={x:t.canvasX,y:t.canvasY},n.attr({width:0,height:0}),n.show(),this.dragging=!0)},onMouseMove:function(t){this.dragging&&("drag"===this.trigger||this.keydown)&&this.updateBrush(t)},onMouseUp:function(t){this.graph;(this.brush||this.dragging)&&("drag"===this.trigger||this.keydown)&&(this.brush.remove(!0),this.brush=null,this.getSelectedNodes(t),this.dragging=!1)},clearStates:function(){var t=this,e=t.graph,n=t.selectedState,r=e.findAllByState("node",n),i=e.findAllByState("edge",n);r.forEach((function(t){return e.setItemState(t,n,!1)})),i.forEach((function(t){return e.setItemState(t,n,!1)})),this.selectedNodes=[],this.selectedEdges=[],this.onDeselect&&this.onDeselect(this.selectedNodes,this.selectedEdges),e.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[]},select:!1})},getSelectedNodes:function(t){var e=this,n=this,o=n.graph,a=n.originPoint,s=n.shouldUpdate,u=this.selectedState,c={x:t.x,y:t.y},f=o.getPointByCanvas(a.x,a.y),l=r(c.x,f.x),h=i(c.x,f.x),d=r(c.y,f.y),p=i(c.y,f.y),g=[],v=[];o.getNodes().forEach((function(t){var e=t.getBBox();if(e.centerX>=l&&e.centerX<=h&&e.centerY>=d&&e.centerY<=p&&s(t,"select")){g.push(t);var n=t.getModel();v.push(n.id),o.setItemState(t,u,!0)}}));var y=[];this.includeEdges&&g.forEach((function(t){var n=t.getEdges();n.forEach((function(t){var n=t.getModel(),r=n.source,i=n.target;v.includes(r)&&v.includes(i)&&s(t,"select")&&(y.push(t),o.setItemState(t,e.selectedState,!0))}))})),this.selectedEdges=y,this.selectedNodes=g,this.onSelect&&this.onSelect(g,y),o.emit("nodeselectchange",{selectedItems:{nodes:g,edges:y},select:!0})},createBrush:function(){var t=this,e=t.graph.get("canvas").addShape("rect",{attrs:t.brushStyle,capture:!1,name:"brush-shape"});return this.brush=e,e},updateBrush:function(t){var e=this.originPoint;this.brush.attr({width:o(t.canvasX-e.x),height:o(t.canvasY-e.y),x:r(t.canvasX,e.x),y:r(t.canvasY,e.y)})},onKeyDown:function(t){var e=t.key;e&&(e.toLowerCase()===this.trigger.toLowerCase()||"control"===e.toLowerCase()?this.keydown=!0:this.keydown=!1)},onKeyUp:function(){this.brush&&(this.brush.remove(!0),this.brush=null,this.dragging=!1),this.keydown=!1}};e.default=u},"2c66":function(t,e,n){var r=n("d612"),i=n("8db3"),o=n("5edf"),a=n("c584"),s=n("750a"),u=n("ac41"),c=200;function f(t,e,n){var f=-1,l=i,h=t.length,d=!0,p=[],g=p;if(n)d=!1,l=o;else if(h>=c){var v=e?null:s(t);if(v)return u(v);d=!1,l=a,g=new r}else g=e?[]:p;t:while(++fg[1]?g[0]:g[1],m=y/2;d=function(t){return m}}else{var b=g/2;d=function(t){return b}}else d=function(t){if(t.size){if((0,o.isArray)(t.size)){var e=t.size[0]>t.size[1]?t.size[0]:t.size[1];return e/2}return t.size/2}return 10};this.nodeSize=d;var x,w=t.comboSpacing;x=(0,o.isNumber)(w)?function(){return w}:(0,o.isFunction)(w)?w:function(){return 0},this.comboSpacing=x;var M,_=t.comboPadding;M=(0,o.isNumber)(_)?function(){return _}:(0,o.isArray)(_)?function(){return Math.max.apply(null,_)}:(0,o.isFunction)(_)?_:function(){return 0},this.comboPadding=M;var S,P=this.linkDistance;P||(P=10),S=(0,o.isNumber)(P)?function(t){return P}:P,this.linkDistance=S;var k,C=this.edgeStrength;C||(C=1),k=(0,o.isNumber)(C)?function(t){return C}:C,this.edgeStrength=k;var O,E=this.nodeStrength;E||(E=30),O=(0,o.isNumber)(E)?function(t){return E}:E,this.nodeStrength=O},e.prototype.initPos=function(t){var e=this,n=e.nodes;n.forEach((function(e){if(e.comboId){var n=t[e.comboId];e.x=n.cx+100*Math.random(),e.y=n.cy+100*Math.random()}else e.x=100*Math.random(),e.y=100*Math.random()}))},e.prototype.getComboMap=function(){var t=this,e=t.nodeMap,n=t.nodeIdxMap,r=t.comboTrees,i=t.oriComboMap,s={};return r&&r.forEach((function(r){var u=[];(0,a.traverseTreeUp)(r,(function(r){if("node"===r.itemType)return!0;if(!i[r.id])return!0;if(void 0===s[r.id]){var a={name:r.id,cx:0,cy:0,count:0,depth:t.oriComboMap[r.id].depth,children:[]};s[r.id]=a}var c=r.children;c&&c.forEach((function(t){if(!s[t.id]&&!e[t.id])return!0;u.push(t)}));var f=s[r.id];if(f.cx=0,f.cy=0,0===u.length){f.empty=!0;var l=i[r.id],h=Object.keys(e).length,d=r.id+"-visual-child-"+h,p={id:d,x:l.x,y:l.y,depth:f.depth+1,itemType:"node"};t.nodes.push(p),e[d]=p,n[d]=h,f.cx=l.x,f.cy=l.y,u.push(p)}return u.forEach((function(t){if(f.count++,"node"!==t.itemType){var n=s[t.id];return(0,o.isNumber)(n.cx)&&(f.cx+=n.cx),void((0,o.isNumber)(n.cy)&&(f.cy+=n.cy))}var r=e[t.id];r&&((0,o.isNumber)(r.x)&&(f.cx+=r.x),(0,o.isNumber)(r.y)&&(f.cy+=r.y))})),f.cx/=f.count,f.cy/=f.count,f.children=u,!0}))})),s},e.prototype.applyComboCenterForce=function(t){var e=this,n=e.gravity,r=e.comboGravity||n,i=this.alpha,s=e.comboTrees,u=e.nodeIdxMap,c=e.nodeMap,f=e.comboMap;s&&s.forEach((function(e){(0,a.traverseTreeUp)(e,(function(e){if("node"===e.itemType)return!0;var n=f[e.id];if(!n)return!0;var a=f[e.id],s=.5*(a.depth+1),l=a.cx,h=a.cy;return a.cx=0,a.cy=0,a.children.forEach((function(e){if("node"!==e.itemType){var n=f[e.id];return n&&(0,o.isNumber)(n.cx)&&(a.cx+=n.cx),void(n&&(0,o.isNumber)(n.cy)&&(a.cy+=n.cy))}var d=c[e.id],p=d.x-l||.005,g=d.y-h||.005,v=Math.sqrt(p*p+g*g),y=u[d.id],m=r*i/v*s;t[y].x-=p*m,t[y].y-=g*m,(0,o.isNumber)(d.x)&&(a.cx+=d.x),(0,o.isNumber)(d.y)&&(a.cy+=d.y)})),a.cx/=a.count,a.cy/=a.count,!0}))}))},e.prototype.applyCalculate=function(t){var e=this,n=e.comboMap,r=e.nodes,i={};r.forEach((function(t,e){r.forEach((function(n,r){if(!(eo&&(a.minX=o),a.minY>s&&(a.minY=s),a.maxX1&&r.forEach((function(n,a){if("node"!==n.itemType){var u=e[n.id];u&&r.forEach((function(r,c){if(!(a<=c)&&"node"!==r.itemType){var f=e[r.id];if(f){var l=u.cx-f.cx||.005,h=u.cy-f.cy||.005,d=l*l+h*h,p=u.r,g=f.r,v=p+g,y=g*g,m=p*p;if(di)){var y=e[d.id+"-"+n.id],m=y.vx,b=y.vy,x=Math.abs(n.depth-d.depth)+1||1;n.comboId!==d.comboId&&x++;var w=x?Math.pow(l,x):1,M=o(n)*a/g*w;if(t[p].x+=m*M,t[p].y+=b*M,pMath.PI/2?Math.PI-f:f,l=l>Math.PI/2?Math.PI-l:l;var h={xExtra:Math.cos(c/2-f)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(l-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0};return h}function l(t){var e=t.attr(),n=e.path,r=e.stroke,i=r?e.lineWidth:0,o=t.get("segments")||a.default(n),s=c(o,i),f=s.x,l=s.y,h=s.width,d=s.height,p={minX:f,minY:l,maxX:f+h,maxY:l+d};return p=u.mergeArrowBBox(t,p),{x:p.minX,y:p.minY,width:p.maxX-p.minX,height:p.maxY-p.minY}}e.default=l},"2d2a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=s(n("1b95")),o=s(n("61d8")),a=n("c0b3");function s(t){return t&&t.__esModule?t:{default:t}}var u=null,c=function(){function t(e){this.graph=e;var n=e.get("groupStyle");this.styles=(0,i.default)({},t.getDefaultCfg(),n),this.customGroup={},this.delegateInGroup={},this.nodePoint=[],this.destroyed=!1}return t.getDefaultCfg=function(){return{default:{lineWidth:1,stroke:"#A3B1BF",strokeOpacity:.9,fill:"#F3F9FF",fillOpacity:.8,opacity:.8,disCoefficient:.6,minDis:30,maxDis:30},hover:{stroke:"#faad14",fill:"#ffe58f",fillOpacity:.3,opacity:.3,lineWidth:3},collapse:{r:30,width:80,height:40,stroke:"#A3B1BF",lineWidth:3,fill:"#F3F9FF",offsetX:-15,offsetY:5},icon:"https://gw.alipayobjects.com/zos/rmsportal/MXXetJAxlqrbisIuZxDO.svg",operatorBtn:{collapse:{img:"https://gw.alipayobjects.com/zos/rmsportal/uZVdwjJGqDooqKLKtvGA.svg",width:16,height:16},expand:{width:16,height:16,img:"https://gw.alipayobjects.com/zos/rmsportal/MXXetJAxlqrbisIuZxDO.svg"}},visible:!1}},t.prototype.create=function(t,e,n,i,o,a){void 0===n&&(n="circle"),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===a&&(a={});var s=this.graph,u=s.get("customGroup"),c=u.get("children").map((function(t){return t.get("id")}));if(c.indexOf(t)>-1)console.warn("已经存在ID为 "+t+" 的分组,请重新设置分组ID!");else{var f=u.addGroup({id:t,zIndex:i}),l=this.styles.default,h=this.calculationGroupPosition(e),d=h.x,p=h.y,g=h.width,v=h.height,y=h.maxX,m=this.getGroupPadding(t),b=s.get("groupBBoxs");b[t]={x:d,y:p,width:g,height:v,maxX:y};var x=null;if(o){var w=s.get("groups");e.forEach((function(e){var n=s.findById(e),r=n.getModel();r.groupId||(r.groupId=t)})),w.find((function(e){return e.id===t}))||(w.push({id:t,title:a}),s.set({groups:w}))}var M=s.get("groups").filter((function(e){return e.id===t}));M&&M.length>0&&(x=M[0].title);var _=0,S=0,P=null;if("circle"===n){var k=g>v?g/2:v/2,C=(g+2*d)/2,O=(v+2*p)/2,E=k+m;P=f.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:C,y:O,r:E}),draggable:!0,capture:!0,zIndex:i,groupId:t,name:"circle-group-shape"}),_=C,S=O-E,this.setDeletageGroupByStyle(t,f,{width:g,height:v,x:C,y:O,r:E})}else{var A=m*l.disCoefficient;P=f.addShape("rect",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:d-A,y:p-A,width:g+2*A,height:v+2*A}),draggable:!0,capture:!0,zIndex:i,groupId:t,name:"rect-group-shape"}),_=d-A+15,S=p-A+15,this.setDeletageGroupByStyle(t,f,{x:d-A,y:p-A,width:g+A,height:v+A,btnOffset:y-3})}if(x){var j=x.offsetX,I=void 0===j?0:j,T=x.offsetY,B=void 0===T?0:T,N=x.text,D=void 0===N?x:N,L=(0,r.__rest)(x,["offsetX","offsetY","text"]),R=f.addShape("text",{attrs:(0,r.__assign)({text:D,stroke:"#444",x:_+I,y:S+B},L),className:"group-title",name:"group-title-shape"});R.set("capture",!1)}f.set("keyShape",P),s.get("groupNodes")[t]=e}},t.prototype.setGroupStyle=function(t,e){if(t&&!t.get("destroyed")){var n={},r=this.styles,a=r.hover,s=r.default;(0,o.default)(e)?"default"===e?n=(0,i.default)({},s):"hover"===e&&(n=(0,i.default)({},a)):n=(0,i.default)({},s,e),Object.keys(n).forEach((function(e){t.attr(e,n[e])}))}},t.prototype.calculationGroupPosition=function(t,e){if(void 0===e&&(e={x:100,y:100}),0===t.length)return{x:e.x,y:e.y,width:100,height:100};var n=this.graph,r=1/0,i=-1/0,a=1/0,s=-1/0;t.forEach((function(t){var e=(0,o.default)(t)?n.findById(t):t,u=e.getBBox(),c=u.minX,f=u.minY,l=u.maxX,h=u.maxY;ci&&(i=l),h>s&&(s=h)}));var u=Math.floor(r),c=Math.floor(a),f=Math.ceil(i)-u,l=Math.ceil(s)-c;return{x:u,y:c,width:f,height:l,maxX:Math.ceil(i)}},t.prototype.flatToTree=function(t,e,n){void 0===e&&(e="id"),void 0===n&&(n="parentId");var r="children",i=[],o=[];return t.forEach((function(t){i[t[e]]=t})),t.forEach((function(t){var e=i[t[n]];e?(!e[r]&&(e[r]=[]),e[r].push(t)):o.push(t)})),o},t.prototype.getGroupPadding=function(t){var e=this.graph,n=this.styles.default,r=e.get("groups"),i=r.filter((function(e){return e.parentId===t})),o=1;i.length>0&&(u||(u=this.flatToTree(r)),(0,a.traverseTree)(u[0],(function(e){if(e.parentId===t&&e.children)return o+=e.children.length,!0})));var s=r.filter((function(e){return e.id===t&&!e.parentId}));s.length>0&&(o+=1);var c=!!(r.filter((function(e){return e.parentId===t})).length>0),f=c?n.maxDis+30*(o>1?o/2:1):n.minDis;return f},t.prototype.setDeletageGroupByStyle=function(t,e,n){var r=n.width,o=n.height,a=n.x,s=n.y,u=n.r,c=n.btnOffset,f=this.customGroup[t];if(f){var l=f.groupStyle,h=(0,i.default)({},l,n);this.customGroup[t]={nodeGroup:e,groupStyle:h}}else this.customGroup[t]={nodeGroup:e,groupStyle:{width:r,height:o,x:a,y:s,r:u,btnOffset:c}}},t.prototype.getDeletageGroupById=function(t){return this.customGroup[t]},t.prototype.collapseExpandGroup=function(t){var e=this.getDeletageGroupById(t),n=e.nodeGroup,r=n.get("hasHidden");r?(n.set("hasHidden",!1),this.expandGroup(t)):(n.set("hasHidden",!0),this.collapseGroup(t))},t.prototype.setGroupTmpNode=function(t,e){var n=this.graph,r=n.get("groupNodes"),i=n.get("groups");r[t].indexOf(e)<0&&r[t].push(e);var o=i.filter((function(e){return e.id===t})),a=null;o.length>0&&(a=o[0].parentId),a&&this.setGroupTmpNode(a,e)},t.prototype.collapseGroup=function(t){var e=this,n=this.getDeletageGroupById(t),i=n.nodeGroup,o=this.styles.collapse,a=this.graph,s=a.get("groupType"),u=a.get("groupNodes")[t],c=i.get("keyShape"),f=o.r,l=o.width,h=o.height,d=o.offsetX,p=o.offsetY,g=(0,r.__rest)(o,["r","width","height","offsetX","offsetY"]);Object.keys(g).forEach((function(t){c.attr(t,g[t])}));var v={groupId:t,id:t+"-custom-node",x:c.attr("x"),y:c.attr("y"),style:{r:f},type:"circle"},y=i.find((function(t){return"group-title"===t.get("className")}));"circle"===s?(c.animate({r:f},{duration:500,easing:"easeCubic"}),y&&y.attr({x:c.attr("x")+d,y:c.attr("y")+p})):"rect"===s&&(c.animate({width:l,height:h},{duration:500,easing:"easeCubic"}),y&&y.attr({x:c.attr("x")+10,y:c.attr("y")+h/2+5}),v={groupId:t,id:t+"-custom-node",x:c.attr("x")+l/2,y:c.attr("y")+h/2,size:[l,h],type:"rect"});var m=a.getEdges(),b=m.filter((function(t){var e=t.getModel();return!u.includes(e.source)&&u.includes(e.target)})),x=m.filter((function(t){var e=t.getModel();return u.includes(e.source)&&!u.includes(e.target)})),w=m.filter((function(t){var e=t.getModel();return u.includes(e.source)&&u.includes(e.target)}));if(u.forEach((function(n){var r=a.findById(n),i=r.getModel(),o=i.groupId;if(o&&o!==t){var s=e.getDeletageGroupById(o),u=s.nodeGroup;u.hide()}r.hide()})),w.forEach((function(t){var e=t.getSource(),n=t.getTarget();e.isVisible()&&n.isVisible()?t.show():t.hide()})),b.length>0||x.length>0){var M=a.add("node",v);M.set("capture",!1),M.hide(),this.delegateInGroup[t]={delegateNode:M},this.setGroupTmpNode(t,t+"-custom-node"),this.updateEdgeInGroupLinks(t,b,x)}},t.prototype.updateEdgeInGroupLinks=function(t,e,n){var r=this.graph,o={};e.map((function(e){var n=e.getModel(),i=e.get("id"),a=n.target;return o[i]=a,r.updateItem(e,{target:t+"-custom-node"}),!0}));var a={};n.map((function(e){var n=e.getModel(),i=e.get("id"),o=n.source;return a[i]=o,r.updateItem(e,{source:t+"-custom-node"}),!0})),this.delegateInGroup[t]=(0,i.default)({sourceOutTargetInEdges:e,sourceInTargetOutEdges:n,edgesOuts:o,edgesIn:a},this.delegateInGroup[t])},t.prototype.expandGroup=function(t){var e=this,n=this.graph,r=n.get("groupType"),i=n.get("groupNodes")[t],o=i.filter((function(t){return-1===t.indexOf("custom-node")})),a=this.calculationGroupPosition(o),s=a.width,u=a.height,c=this.getDeletageGroupById(t).nodeGroup,f=c.get("keyShape"),l=this.styles,h=l.default,d=l.collapse;Object.keys(h).forEach((function(t){f.attr(t,h[t])}));var p=c.find((function(t){return"group-title"===t.get("className")})),g=this.getGroupPadding(t);if("circle"===r){var v=s>u?s/2:u/2;f.animate({r:v+g},{duration:500,easing:"easeCubic"})}else if("rect"===r){var y=d.width,m=d.height;f.animate({width:y+s+g*h.disCoefficient*2,height:m+u+g*h.disCoefficient*2},{duration:500,easing:"easeCubic"})}if(p){var b=null,x=n.get("groups").filter((function(e){return e.id===t}));x&&x.length>0&&(b=x[0].title);var w=b.offsetX,M=void 0===w?0:w,_=b.offsetY,S=void 0===_?0:_;"circle"===r?p.animate({x:f.attr("x")+M,y:f.attr("y")-f.attr("r")+S},{duration:600,easing:"easeCubic"}):"rect"===r&&p.animate({x:f.attr("x")+(15+M),y:f.attr("y")+(15+S)},{duration:600,easing:"easeCubic"})}setTimeout((function(){i.forEach((function(r){var i=n.findById(r),o=i.getModel(),a=o.groupId;if(a&&a!==t){var s=e.getDeletageGroupById(a),u=s.nodeGroup;u.show();var c=u.get("hasHidden");c||i.show()}else i.show()}));var r=n.getEdges(),o=r.filter((function(t){var e=t.getModel();return i.includes(e.source)||i.includes(e.target)}));o.forEach((function(t){var e=t.getSource(),n=t.getTarget();e.isVisible()&&n.isVisible()&&t.show()}))}),300);var P=this.delegateInGroup[t];if(P){var k=P.sourceOutTargetInEdges,C=P.sourceInTargetOutEdges,O=P.edgesOuts,E=P.edgesIn,A=P.delegateNode;k.map((function(t){var e=t.get("id"),r=O[e];return n.updateItem(t,{target:r}),!0})),C.map((function(t){var e=t.get("id"),r=E[e];return n.updateItem(t,{source:r}),!0}));var j=A.getModel();this.deleteTmpNode(t,j.id),n.remove(A),delete this.delegateInGroup[t]}},t.prototype.deleteTmpNode=function(t,e){var n=this.graph,r=n.get("groups"),i=n.get("groupNodes")[t],o=i.indexOf(e);i.splice(o,1);var a=r.filter((function(e){return e.id===t})),s=null;a.length>0&&(s=a[0].parentId),s&&this.deleteTmpNode(s,e)},t.prototype.remove=function(t){var e=this.graph,n=this.getDeletageGroupById(t);if(n){var r=n.nodeGroup,i=e.get("groupNodes"),o=i[t];o.forEach((function(n){var r=e.findById(n),i=r.getModel(),o=i.groupId;o&&t===o&&(delete i.groupId,e.updateItem(r,i))})),r.destroy(),delete this.customGroup[t];var a=e.get("groups");if(a.length>0){var s=a.filter((function(e){return e.id!==t}));e.set("groups",s)}for(var u=null,c=null,f=0;fd&&wp)){delete s.parentId;var M=r.get("groupNodes"),_=M[t],S=M[a];M[a]=S.filter((function(t){return-1===_.indexOf(t)}));var P=this.calculationGroupPosition(M[a]),k=P.x,C=P.y,O=P.width,E=P.height,A=this.getGroupPadding(a),j=f.find((function(t){return"group-title"===t.get("className")})),I=0,T=0;if("circle"===i){var B=O>E?O/2:E/2,N=k,D=C;l.attr({r:B+A,x:N,y:D}),I=N,T=D-l.attr("r")}else if("rect"===i){var L=this.styles.default,R=A*L.disCoefficient;l.attr({x:k-R,y:C-R}),I=k-R+15,T=C-R+15}if(j){var z=s.title,F=0,G=0;z&&(F=z.offsetX,G=z.offsetY),j.attr({x:I+F,y:T+G})}}}},t.prototype.updateItemInGroup=function(t,e,n){var r=this,i=this.graph,o=i.get("groupType"),a=i.get("groupNodes"),s=a[t],u=this.getDeletageGroupById(t).nodeGroup,c=u.getBBox(),f=[];s.forEach((function(t,n){var o=i.findById(t),a=o.getModel(),s=a.groupId;s&&!f.includes(s)&&f.push(s),r.nodePoint[n]||(r.nodePoint[n]={x:a.x,y:a.y});var u=e.x-c.x+r.nodePoint[n].x,l=e.y-c.y+r.nodePoint[n].y;r.nodePoint[n]={x:u,y:l},i.updateItem(o,{x:u,y:l})})),f.includes(t)||f.push(t),f.forEach((function(t){var n=r.getDeletageGroupById(t).nodeGroup,i=n.get("keyShape"),s=a[t].filter((function(t){return-1===t.indexOf("custom-node")})),u=r.calculationGroupPosition(s,e),c=u.x,f=u.y,l=u.width,h=u.height,d=0,p=0;if("circle"===o){var g=(l+2*c)/2,v=(h+2*f)/2;i.attr({x:g,y:v}),d=g,p=v-i.attr("r")}else if("rect"===o){var y=n.get("hasHidden"),m=r.getGroupPadding(t),b={},x=r.styles.default,w=m*x.disCoefficient;d=c-w+15,p=f-w+15,y?(b={x:c-w,y:f-w},p+=10):b={x:c-w,y:f-w,width:l+2*w,height:h+2*w},i.attr(b)}r.updateGroupTitle(n,t,d,p)}))},t.prototype.updateGroupTitle=function(t,e,n,r){var i=this.graph,o=t.find((function(t){return"group-title"===t.get("className")}));if(o){var a=null,s=i.get("groups").filter((function(t){return t.id===e}));s&&s.length>0&&(a=s[0].title);var u=0,c=0;a&&(u=a.offsetX||0,c=a.offsetY||0),o.attr({x:n+u,y:r+c})}},t.prototype.dynamicChangeGroupSize=function(t,e,n){var r=t.item,i=r.getModel(),o=i.groupId,a=this.graph,s=a.get("groupType"),u=a.get("groupNodes"),c=u[o];if(0===c.length){delete u[o];var f=a.get("groups");a.set("groups",f.filter((function(t){return t.id!==o}))),e.remove()}else{var l=this.calculationGroupPosition(c),h=l.x,d=l.y,p=l.width,g=l.height,v=this.getGroupPadding(o),y=0,m=0;if("circle"===s){var b=p>g?p/2:g/2,x=(p+2*h)/2,w=(g+2*d)/2;n.attr({r:b+v,x:x,y:w}),y=x,m=w-n.attr("r")}else if("rect"===s){var M=this.styles.default,_=v*M.disCoefficient;n.attr({x:h-_,y:d-_,width:p+2*_,height:g+2*_}),y=h-_+15,m=d-_+15}this.updateGroupTitle(e,o,y,m)}this.setGroupStyle(n,"default")},t.prototype.resetNodePoint=function(){this.nodePoint.length=0},t.prototype.destroy=function(){this.graph=null,this.styles={},this.customGroup={},this.delegateInGroup={},this.resetNodePoint(),this.destroyed=!0},t}(),f=c;e.default=f},"2d5dc":function(t){t.exports=JSON.parse('{"name":"@antv/g6","version":"3.5.2","description":"A Graph Visualization Framework in JavaScript","keywords":["antv","g6","graph","graph analysis","graph editor","graph visualization","relational data"],"homepage":"https://g6.antv.vision","bugs":{"url":"https://github.com/antvis/g6/issues"},"repository":{"type":"git","url":"https://github.com/antvis/g6"},"license":"MIT","author":"https://github.com/orgs/antvis/people","files":["package.json","es","lib","dist","LICENSE","README.md"],"main":"lib/index.js","module":"es/index.js","browser":"dist/g6.min.js","types":"lib/index.d.ts","scripts":{"build":"npm run clean && father build && npm run build:umd","build:umd":"webpack --config webpack.config.js --mode production","ci":"npm run build && npm run coverage","clean":"rimraf es esm lib dist","coverage":"jest --coverage","demos":"start-storybook -p 8080 -c .storybook","doc":"rimraf apis && typedoc","lint":"eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty \\"./\\"","lint:src":"eslint --cache --ext .ts --format=pretty \\"./src\\"","prettier":"prettier -c --write \\"**/*\\"","site:build":"npm run site:clean && GATSBY=true gatsby build --prefix-paths","site:clean":"gatsby clean","site:develop":"GATSBY=true gatsby develop --open","site:deploy":"npm run site:build && gh-pages -d public","start":"npm run site:develop","test":"jest","test-live":"DEBUG_MODE=1 jest --watch ./tests/unit/layout/circular-spec.ts","lint-staged:js":"eslint --ext .js,.jsx,.ts,.tsx","watch":"father build -w","cdn":"antv-bin upload -n @antv/g6"},"husky":{"hooks":{"pre-commit":"npm run lint"}},"lint-staged":{"**/*.{js,jsx,tsx,ts,less,md,json}":["prettier --write","git add"],"**/*.{js,jsx}":"npm run lint-staged:js","**/*.{js,ts,tsx}":"npm run lint-staged:js"},"dependencies":{"@antv/dom-util":"^2.0.1","@antv/event-emitter":"~0.1.0","@antv/g-base":"^0.4.1","@antv/g-canvas":"^0.4.3","@antv/g-math":"^0.1.1","@antv/g-svg":"^0.4.1","@antv/hierarchy":"^0.6.2","@antv/matrix-util":"^2.0.4","@antv/path-util":"^2.0.3","@antv/scale":"^0.3.1","@antv/util":"~2.0.5","d3-force":"^2.0.1","dagre":"^0.8.5","lodash":"^4.17.15","ml-matrix":"^6.5.0"},"devDependencies":{"@antv/gatsby-theme-antv":"^0.10.59","@babel/core":"^7.7.7","@babel/preset-react":"^7.7.4","@storybook/addon-actions":"^5.2.8","@storybook/addon-info":"^5.2.8","@storybook/addon-knobs":"^5.2.8","@storybook/react":"^5.2.8","@turf/turf":"^5.1.6","@types/jest":"^25.2.1","@types/node":"13.11.1","@umijs/fabric":"^2.0.0","awesome-typescript-loader":"^5.2.1","babel-loader":"^8.0.6","event-simulate":"~1.0.0","father":"^2.29.1","gatsby":"2.20.24","gh-pages":"^2.1.1","husky":"^4.2.5","insert-css":"^2.0.0","jest":"^26.0.1","jest-electron":"^0.1.7","jest-extended":"^0.11.2","lint-staged":"^9.2.3","pre-commit":"^1.2.2","prettier":"^2.0.5","react":"^16.13.1","react-dom":"^16.13.1","react-i18next":"^11.1.0","rimraf":"^3.0.0","rollup-plugin-web-worker-loader":"^0.8.1","ts-jest":"^24.1.0","ts-loader":"^7.0.3","ttypescript":"^1.5.8","typedoc":"^0.17.6","typedoc-plugin-markdown":"^2.2.11","typescript":"^3.5.3","webpack":"^4.41.4","webpack-cli":"^3.3.10","worker-loader":"^2.0.0"}}')},"2d7c":function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length,i=0,o=[];while(++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);while(++r1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}Object(r["each"])(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}var s=a,u=n("20e7");function c(t,e,n,r){var i,o,a,s,c,f,l,h=[],d=!!r;if(d){a=r[0],s=r[1];for(var p=0,g=t.length;p=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1]),e}));return f}function p(t,e,n){if(1===n)return[[].concat(t)];var r=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])r=r.concat(d(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var o=0;o<=n-1;o++)r.push(i)}return r}function g(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}if(r=t.length,r0)){t[r]=e[r];break}n=x(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=x(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=x(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t}function M(t,e,n,r,i){return i?[["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"]]:[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]]}var _="\t\n\v\f\r   ᠎              \u2028\u2029",S=new RegExp("([a-z])["+_+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+_+"]*,?["+_+"]*)+)","ig"),P=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+_+"]*,?["+_+"]*","ig");function k(t){if(!t)return null;if(Object(r["isArray"])(t))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(S,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(P,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else while(o.length>=e[a])if(n.push([r].concat(o.splice(0,e[a]))),!e[a])break;return""})),n}var C=/[a-z]/;function O(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function E(t){var e=k(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,u=0,c=0,f=0,l=e[0];"M"!==l[0]&&"m"!==l[0]||(a=+l[1],s=+l[2],u=a,c=s,f++,o[0]=["M",a,s]);r=f;for(var h=e.length;r1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},B=function(t,e,n,r,i,o,a,s,u,c,f,l){var h=Math.pow(i,2),d=Math.pow(o,2),p=Math.pow(f,2),g=Math.pow(l,2),v=h*d-h*g-d*p;v<0&&(v=0),v/=h*g+d*p,v=Math.sqrt(v)*(a===s?-1:1);var y=v*i/o*l,m=v*-o/i*f,b=c*y-u*m+(t+n)/2,x=u*y+c*m+(e+r)/2,w=(f-y)/i,M=(l-m)/o,_=(-f-y)/i,S=(-l-m)/o,P=T(1,0,w,M),k=T(w,M,_,S);return 0===s&&k>0&&(k-=A),1===s&&k<0&&(k+=A),[b,x,P,k]},N=function(t){var e=t.px,n=t.py,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=t.xAxisRotation,u=void 0===s?0:s,c=t.largeArcFlag,f=void 0===c?0:c,l=t.sweepFlag,h=void 0===l?0:l,d=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var p=Math.sin(u*A/360),g=Math.cos(u*A/360),v=g*(e-r)/2+p*(n-i)/2,y=-p*(e-r)/2+g*(n-i)/2;if(0===v&&0===y)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];o=Math.abs(o),a=Math.abs(a);var m=Math.pow(v,2)/Math.pow(o,2)+Math.pow(y,2)/Math.pow(a,2);m>1&&(o*=Math.sqrt(m),a*=Math.sqrt(m));var b=B(e,n,r,i,o,a,f,h,p,g,v,y),x=b[0],w=b[1],M=b[2],_=b[3],S=Math.abs(_)/(A/4);Math.abs(1-S)<1e-7&&(S=1);var P=Math.max(Math.ceil(S),1);_/=P;for(var k=0;k7){t[n].shift();var r=t[n],i=n;while(r.length)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var Y=function(t,e,n,r,i){var o=-3*e+9*n-9*r+3*i,a=t*o+6*e-12*n+6*r;return t*a-3*e+3*n},X=function(t,e,n,r,i,o,a,s,u){null===u&&(u=1),u=u>1?1:u<0?0:u;for(var c=u/2,f=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;p0&&l<1&&h.push(l)}else{var g=c*c-4*f*u,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*u);y>0&&y<1&&h.push(y);var m=(-c-v)/(2*u);m>0&&m<1&&h.push(m)}}var b,x=h.length,w=x;while(x--)l=h[x],b=1-l,d[0][x]=b*b*b*t+3*b*b*l*n+3*b*l*l*i+l*l*l*a,d[1][x]=b*b*b*e+3*b*b*l*r+3*b*l*l*o+l*l*l*s;return d[0][w]=t,d[1][w]=e,d[0][w+1]=a,d[1][w+1]=s,d[0].length=d[1].length=w+2,{min:{x:Math.min.apply(0,d[0]),y:Math.min.apply(0,d[1])},max:{x:Math.max.apply(0,d[0]),y:Math.max.apply(0,d[1])}}},q=function(t,e,n,r,i,o,a,s){if(!(Math.max(t,n)Math.max(i,a)||Math.max(e,r)Math.max(o,s))){var u=(t*r-e*n)*(i-a)-(t-n)*(i*s-o*a),c=(t*r-e*n)*(o-s)-(e-r)*(i*s-o*a),f=(t-n)*(o-s)-(e-r)*(i-a);if(f){var l=u/f,h=c/f,d=+l.toFixed(2),p=+h.toFixed(2);if(!(d<+Math.min(t,n).toFixed(2)||d>+Math.max(t,n).toFixed(2)||d<+Math.min(i,a).toFixed(2)||d>+Math.max(i,a).toFixed(2)||p<+Math.min(e,r).toFixed(2)||p>+Math.max(e,r).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:l,y:h}}}},U=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},W=function(t,e,n,r){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:M(t,e,n,r),vb:[t,e,n,r].join(" ")}},H=function(t,e){return t=W(t),e=W(e),U(e,t.x,t.y)||U(e,t.x2,t.y)||U(e,t.x,t.y2)||U(e,t.x2,t.y2)||U(t,e.x,e.y)||U(t,e.x2,e.y)||U(t,e.x,e.y2)||U(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)},Z=function(t,e,n,i,o,a,s,u){Object(r["isArray"])(t)||(t=[t,e,n,i,o,a,s,u]);var c=V.apply(null,t);return W(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},$=function(t,e,n,r,i,o,a,s,u){var c=1-u,f=Math.pow(c,3),l=Math.pow(c,2),h=u*u,d=h*u,p=f*t+3*l*u*n+3*c*u*u*i+d*a,g=f*e+3*l*u*r+3*c*u*u*o+d*s,v=t+2*u*(n-t)+h*(i-2*n+t),y=e+2*u*(r-e)+h*(o-2*r+e),m=n+2*u*(i-n)+h*(a-2*i+n),b=r+2*u*(o-r)+h*(s-2*o+r),x=c*t+u*n,w=c*e+u*r,M=c*i+u*a,_=c*o+u*s,S=90-180*Math.atan2(v-m,y-b)/Math.PI;return{x:p,y:g,m:{x:v,y:y},n:{x:m,y:b},start:{x:x,y:w},end:{x:M,y:_},alpha:S}},Q=function(t,e,n){var r=Z(t),i=Z(e);if(!H(r,i))return n?0:[];for(var o=X.apply(0,t),a=X.apply(0,e),s=~~(o/8),u=~~(a/8),c=[],f=[],l={},h=n?0:[],d=0;d=0&&_<=1&&S>=0&&S<=1&&(n?h++:h.push({x:M.x,y:M.y,t1:_,t2:S}))}}return h},K=function(t,e,n){var r,i,o,a,s,u,c,f,l,h;t=F(t),e=F(e);for(var d=n?0:[],p=0,g=t.length;p1&&(n*=Math.sqrt(p),i*=Math.sqrt(p));var g=n*n*(d*d)+i*i*(h*h),v=g?Math.sqrt((n*n*(i*i)-g)/g):1;a===s&&(v*=-1),isNaN(v)&&(v=0);var y=i?v*n*d/i:0,m=n?v*-i*h/n:0,b=(u+f)/2+Math.cos(o)*y-Math.sin(o)*m,x=(c+l)/2+Math.sin(o)*y+Math.cos(o)*m,w=[(h-y)/n,(d-m)/i],M=[(-1*h-y)/n,(-1*d-m)/i],_=it([1,0],w),S=it(w,M);return rt(w,M)<=-1&&(S=Math.PI),rt(w,M)>=1&&(S=0),0===s&&S>0&&(S-=2*Math.PI),1===s&&S<0&&(S+=2*Math.PI),{cx:b,cy:x,rx:ot(t,[f,l])?0:n,ry:ot(t,[f,l])?0:i,startAngle:_,endAngle:_+S,xRotation:o,arcFlag:a,sweepFlag:s}}function st(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function ut(t){t=s(t);for(var e=[],n=null,r=null,i=null,o=0,a=t.length,u=0;u=e&&t<=n};function ft(t,e,n,r){var i=.001,o={x:n.x-t.x,y:n.y-t.y},a={x:e.x-t.x,y:e.y-t.y},s={x:r.x-n.x,y:r.y-n.y},u=a.x*s.y-a.y*s.x,c=u*u,f=a.x*a.x+a.y*a.y,l=s.x*s.x+s.y*s.y,h=null;if(c>i*f*l){var d=(o.x*s.y-o.y*s.x)/u,p=(o.x*a.y-o.y*a.x)/u;ct(d,0,1)&&ct(p,0,1)&&(h={x:t.x+d*a.x,y:t.y+d*a.y})}return h}var lt=1e-6;function ht(t){return Math.abs(t)0!==ht(s[1]-n)>0&&ht(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(r=!r)}return r}function gt(t){for(var e=[],n=t.length,r=0;r1){var a=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function vt(t,e){var n=!1;return Object(r["each"])(t,(function(t){if(ft(t.from,t.to,e.from,e.to))return n=!0,!1})),n}function yt(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function mt(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY_?M:_,E=M>_?1:M/_,A=M>_?_/M:1;e.translate(x,w),e.rotate(k),e.scale(E,A),e.arc(0,0,O,S,P,1-C),e.scale(1/E,1/A),e.rotate(-k),e.translate(-x,-w)}break;case"Z":e.closePath();break;default:break}if("Z"===p)c=f;else{var j=d.length;c=[d[j-2],d[j-1]]}}}function h(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw(),t.set("hasChanged",!0)))}function d(t){var e;if(t.destroyed)e=t["_cacheCanvasBBox"];else{var n=t.get("cacheCanvasBBox"),r=n&&!(!n.width||!n.height),i=t.getCanvasBBox(),o=i&&!(!i.width||!i.height);r&&o?e=a.mergeRegion(n,i):r?e=n:o&&(e=i)}return e}function p(t){if(!t.length)return null;var e=[],n=[],i=[],o=[];return r.each(t,(function(t){var r=d(t);r&&(e.push(r.minX),n.push(r.minY),i.push(r.maxX),o.push(r.maxY))})),{minX:Math.min.apply(null,e),minY:Math.min.apply(null,n),maxX:Math.max.apply(null,i),maxY:Math.max.apply(null,o)}}function g(t,e){return t&&e&&a.intersectRect(t,e)?{minX:Math.max(t.minX,e.minX),minY:Math.max(t.minY,e.minY),maxX:Math.min(t.maxX,e.maxX),maxY:Math.min(t.maxY,e.maxY)}:null}e.applyAttrsToContext=c,e.drawChildren=f,e.drawPath=l,e.refreshElement=h,e.getRefreshRegion=d,e.getMergedRegion=p,e.mergeView=g},3234:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5b8d"),i=function(t,e){if(!r.default(t))return t;for(var n=[],i=0;i20&&(i=20),parseFloat(t.toFixed(i))};e.default=r},3729:function(t,e,n){var r=n("9e69"),i=n("00fd"),o=n("29f3"),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;function c(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}t.exports=c},3753:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Math.PI/180,i=function(t){return r*t};e.default=i},"375c":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("9cc4")),i=n("19f7");function o(t){return t&&t.__esModule?t:{default:t}}var a=self;function s(t){var e=t.data.type;return e===i.LAYOUT_MESSAGE.RUN}function u(t){var e=t.data.type;switch(e){case i.LAYOUT_MESSAGE.RUN:var n=t.data,o=n.nodes,s=n.edges,u=n.layoutCfg,c=void 0===u?{}:u,f=c.type,l=r.default[f];if(!l){a.postMessage({type:i.LAYOUT_MESSAGE.ERROR,message:"layout "+f+" not found"});break}var h=new l(c);h.init({nodes:o,edges:s}),h.execute(),a.postMessage({type:i.LAYOUT_MESSAGE.END,nodes:o}),h.destroy();break;default:break}}a.onmessage=function(t){s(t)&&u(t)};var c=null;e.default=c},"37a5":function(t,e,n){"use strict";function r(t){return 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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("9ab4"),o=p(n("0a4a")),a=h(n("01f9")),s=h(n("2047")),u=h(n("842b")),c=h(n("503e")),f=n("56fa"),l=n("19f7");function h(t){return t&&t.__esModule?t:{default:t}}function d(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return d=function(){return t},t}function p(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var e=d();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}return n.default=t,e&&e.set(t,n),n}var g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=[0,0],e.nodeStrength=null,e.edgeStrength=null,e.preventOverlap=!1,e.linkDistance=50,e.alphaDecay=.028,e.alphaMin=.001,e.alpha=.3,e.collideStrength=1,e.workerEnabled=!1,e.tick=function(){},e.onLayoutEnd=function(){},e.onTick=function(){},e.ticking=void 0,e}return(0,i.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{center:[0,0],nodeStrength:null,edgeStrength:null,preventOverlap:!1,nodeSize:void 0,nodeSpacing:void 0,linkDistance:50,forceSimulation:null,alphaDecay:.028,alphaMin:.001,alpha:.3,collideStrength:1,tick:function(){},onLayoutEnd:function(){},onTick:function(){},workerEnabled:!1}},e.prototype.init=function(t){var e=this;e.nodes=t.nodes||[];var n=t.edges||[];e.edges=n.map((function(t){var e={},n=["targetNode","sourceNode","startPoint","endPoint"];return Object.keys(t).forEach((function(r){n.indexOf(r)>-1||(e[r]=t[r])})),e})),e.ticking=!1},e.prototype.execute=function(){var t=this,e=t.nodes,n=t.edges;if(!t.ticking){var r=t.forceSimulation,i=t.alphaMin,a=t.alphaDecay,s=t.alpha;if(r)t.preventOverlap&&t.overlapProcess(r),r.alpha(s).restart(),this.ticking=!0;else try{var u=o.forceManyBody();if(t.nodeStrength&&u.strength(t.nodeStrength),r=o.forceSimulation().nodes(e).force("center",o.forceCenter(t.center[0],t.center[1])).force("charge",u).alpha(s).alphaDecay(a).alphaMin(i),t.preventOverlap&&t.overlapProcess(r),n){var c=o.forceLink().id((function(t){return t.id})).links(n);t.edgeStrength&&c.strength(t.edgeStrength),t.linkDistance&&c.distance(t.linkDistance),r.force("link",c)}if(t.workerEnabled&&!m()&&(t.workerEnabled=!1,console.warn("workerEnabled option is only supported when running in web worker.")),t.workerEnabled){r.stop();for(var f=y(r),h=1;h<=f;h++)r.tick(),postMessage({type:l.LAYOUT_MESSAGE.TICK,currentTick:h,totalTicks:f,nodes:e},void 0);t.ticking=!1}else r.on("tick",(function(){t.tick()})).on("end",(function(){t.ticking=!1,t.onLayoutEnd&&t.onLayoutEnd()})),t.ticking=!0;t.forceSimulation=r,t.ticking=!0}catch(d){t.ticking=!1,console.warn(d)}}},e.prototype.overlapProcess=function(t){var e,n,r=this,i=r.nodeSize,c=r.nodeSpacing,f=r.collideStrength;if(n=(0,u.default)(c)?function(){return c}:(0,s.default)(c)?c:function(){return 0},i)if((0,s.default)(i))e=function(t){var e=i(t);return e+n(t)};else if((0,a.default)(i)){var l=i[0]>i[1]?i[0]:i[1],h=l/2;e=function(t){return h+n(t)}}else if((0,u.default)(i)){var d=i/2;e=function(t){return d+n(t)}}else e=function(){return 10};else e=function(t){if(t.size){if((0,a.default)(t.size)){var e=t.size[0]>t.size[1]?t.size[0]:t.size[1];return e/2+n(t)}return t.size/2+n(t)}return 10+n(t)};t.force("collisionForce",o.forceCollide(e).strength(f))},e.prototype.updateCfg=function(t){var e=this;e.ticking&&(e.forceSimulation.stop(),e.ticking=!1),e.forceSimulation=null,(0,c.default)(e,t)},e.prototype.destroy=function(){var t=this;t.ticking&&(t.forceSimulation.stop(),t.ticking=!1),t.nodes=null,t.edges=null,t.destroyed=!0},e}(f.BaseLayout),v=g;function y(t){var e=t.alphaMin(),n=t.alphaTarget(),r=t.alpha(),i=Math.log((e-n)/(r-n))/Math.log(1-t.alphaDecay()),o=Math.ceil(i);return o}function m(){return"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope}e.default=v},3818:function(t,e,n){var r=n("7e64"),i=n("8057"),o=n("32b3"),a=n("5b01"),s=n("0f0f"),u=n("e5383"),c=n("4359"),f=n("54eb"),l=n("1041"),h=n("a994"),d=n("1bac"),p=n("42a2"),g=n("c87c"),v=n("c2b6"),y=n("fa21"),m=n("6747"),b=n("0d24"),x=n("cc45"),w=n("1a8c"),M=n("d7ee"),_=n("ec69"),S=n("9934"),P=1,k=2,C=4,O="[object Arguments]",E="[object Array]",A="[object Boolean]",j="[object Date]",I="[object Error]",T="[object Function]",B="[object GeneratorFunction]",N="[object Map]",D="[object Number]",L="[object Object]",R="[object RegExp]",z="[object Set]",F="[object String]",G="[object Symbol]",Y="[object WeakMap]",X="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",U="[object Float64Array]",W="[object Int8Array]",H="[object Int16Array]",Z="[object Int32Array]",$="[object Uint8Array]",Q="[object Uint8ClampedArray]",K="[object Uint16Array]",J="[object Uint32Array]",tt={};function et(t,e,n,E,A,j){var I,N=e&P,D=e&k,R=e&C;if(n&&(I=A?n(t,E,A,j):n(t)),void 0!==I)return I;if(!w(t))return t;var z=m(t);if(z){if(I=g(t),!N)return c(t,I)}else{var F=p(t),G=F==T||F==B;if(b(t))return u(t,N);if(F==L||F==O||G&&!A){if(I=D||G?{}:y(t),!N)return D?l(t,s(I,t)):f(t,a(I,t))}else{if(!tt[F])return A?t:{};I=v(t,F,N)}}j||(j=new r);var Y=j.get(t);if(Y)return Y;j.set(t,I),M(t)?t.forEach((function(r){I.add(et(r,e,n,r,t,j))})):x(t)&&t.forEach((function(r,i){I.set(i,et(r,e,n,i,t,j))}));var X=R?D?d:h:D?S:_,V=z?void 0:X(t);return i(V||t,(function(r,i){V&&(i=r,r=t[i]),o(I,i,et(r,e,n,i,t,j))})),I}tt[O]=tt[E]=tt[X]=tt[V]=tt[A]=tt[j]=tt[q]=tt[U]=tt[W]=tt[H]=tt[Z]=tt[N]=tt[D]=tt[L]=tt[R]=tt[z]=tt[F]=tt[G]=tt[$]=tt[Q]=tt[K]=tt[J]=!0,tt[I]=tt[T]=tt[Y]=!1,t.exports=et},3820:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("6855"),o=n("c31b"),a=n("7d16"),s=n("516b"),u=n("076b"),c=n("573a"),f=n("1f05"),l=n("9fe7");function h(t){for(var e=!1,n=t.length,r=0;rP?S:P,I=S>P?1:S/P,T=S>P?P/S:1;f.translate(A,A,[-M,-_]),f.rotate(A,A,-O),f.scale(A,A,[1/I,1/T]),l.transformMat3(E,E,A),i=c.default(0,0,j,k,C,e,E[0],E[1]);break;default:break}if(i)break}}return i}function p(t){for(var e=t.length,n=[],r=[],i=[],o=0;o0&&r.push(i),{polygons:n,polylines:r}}e.default=r.__assign({hasArc:h,extractPolygons:p,isPointInStroke:d},i.PathUtil)},3852:function(t,e,n){var r=n("96f3"),i=n("e2c0");function o(t,e){return null!=t&&i(t,e,r)}t.exports=o},"38e2f":function(t,e,n){var r=n("6f9c"),i=n("1f3a"),o=n("d9f3"),a=n("f352");function s(t,e,n,f){var l=t.children(e),h=t.node(e),d=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,g={};d&&(l=r.filter(l,(function(t){return t!==d&&t!==p})));var v=i(t,l);r.forEach(v,(function(e){if(t.children(e.v).length){var i=s(t,e.v,n,f);g[e.v]=i,r.has(i,"barycenter")&&c(e,i)}}));var y=o(v,n);u(y,g);var m=a(y,f);if(d&&(m.vs=r.flatten([d,m.vs,p],!0),t.predecessors(d).length)){var b=t.node(t.predecessors(d)[0]),x=t.node(t.predecessors(p)[0]);r.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+b.order+x.order)/(m.weight+2),m.weight+=2}return m}function u(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}function c(t,e){r.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)}t.exports=s},"38f9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=n("2047"),o=n("07ea");function a(t,e){if(!e)return{0:t};if(!i.default(e)){var n=r.default(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",r=0,i=n.length;rn||Math.abs(i)>n?Math.sqrt(r*r+i*i):n}function s(t,e){return t.x*e.x+t.y*e.y}function u(t,e){var n=(e.source.y-e.target.y)/(e.source.x-e.target.x),r=(n*n*e.source.x+n*(t.y-e.source.y)+t.x)/(n*n+1),i=n*(r-e.source.x)+e.source.y;return{x:r,y:i}}var c=function(t){function e(e){return t.call(this,e)||this}return(0,r.__extends)(e,t),e.prototype.getDefaultCfgs=function(){return{edgeBundles:[],edgePoints:[],K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:.6666667,bundleThreshold:.6,eps:1e-6,onLayoutEnd:function(){},onTick:function(){}}},e.prototype.init=function(){var t=this.get("graph"),e=this.get("onTick"),n=function(){e&&e(),t.refreshPositions()};this.set("tick",n)},e.prototype.bundling=function(t){var e=this;if(e.set("data",t),!e.isTicking()){var n=t.edges||[],r=t.nodes||[],i={},o=!1;if(r.forEach((function(t){null!==t.x&&null!==!t.y&&void 0!==t.x&&void 0!==!t.y||(o=!0),i[t.id]=t})),o)throw new Error("please layout the graph or assign x and y for nodes first");e.set("nodeIdMap",i);var a=e.get("divisions"),s=e.get("divRate"),u=e.divideEdges(a);e.set("edgePoints",u);var c=e.getEdgeBundles();e.set("edgeBundles",c);for(var f=e.get("cycles"),l=e.get("iterations"),h=e.get("iterRate"),d=e.get("lambda"),p=0;pl){var r=l/n,s={x:i[o][e-1].x,y:i[o][e-1].y};s.x+=r*(t.x-i[o][e-1].x),s.y+=r*(t.y-i[o][e-1].y),h.push(s),n-=l,l=f}l-=n}})),h.push({x:u.x,y:u.y}),i[o]=h}})),i},e.prototype.getEdgeLength=function(t){var e=0;return t.forEach((function(n,r){0!==r&&(e+=a(n,t[r-1]))})),e},e.prototype.getEdgeBundles=function(){var t=this,e=t.get("data"),n=e.edges||[],r=t.get("bundleThreshold"),i=t.get("nodeIdMap"),o=t.get("edgeBundles");return o||(o=[]),n.forEach((function(t,e){o[e]&&void 0!==o[e]||(o[e]=[])})),n.forEach((function(e,a){var s=i[e.source],u=i[e.target];n.forEach((function(e,n){if(!(n<=a)){var c=i[e.source],f=i[e.target],l=t.getBundleScore({source:s,target:u},{source:c,target:f});l>=r&&(o[a].push(n),o[n].push(a))}}))})),o},e.prototype.getBundleScore=function(t,e){var n=this;t.vx=t.target.x-t.source.x,t.vy=t.target.y-t.source.y,e.vx=e.target.x-e.source.x,e.vy=e.target.y-e.source.y,t.length=a({x:t.source.x,y:t.source.y},{x:t.target.x,y:t.target.y}),e.length=a({x:e.source.x,y:e.source.y},{x:e.target.x,y:e.target.y});var r=n.getAngleScore(t,e),i=n.getScaleScore(t,e),o=n.getPositionScore(t,e),s=n.getVisibilityScore(t,e);return r*i*o*s},e.prototype.getAngleScore=function(t,e){var n=s({x:t.vx,y:t.vy},{x:e.vx,y:e.vy});return n/(t.length*e.length)},e.prototype.getScaleScore=function(t,e){var n=(t.length+e.length)/2,r=2/(n/Math.min(t.length,e.length)+Math.max(t.length,e.length)/n);return r},e.prototype.getPositionScore=function(t,e){var n=(t.length+e.length)/2,r={x:(t.source.x+t.target.x)/2,y:(t.source.y+t.target.y)/2},i={x:(e.source.x+e.target.x)/2,y:(e.source.y+e.target.y)/2},o=a(r,i);return n/(n+o)},e.prototype.getVisibilityScore=function(t,e){var n=this.getEdgeVisibility(t,e),r=this.getEdgeVisibility(e,t);return nr||Math.abs(i.y)>r){var s=a(o[n][t],o[e][t]),c=1/s;u.x+=i.x*c,u.y+=i.y*c}})),u},e.prototype.isTicking=function(){return this.get("ticking")},e.prototype.getSimulation=function(){return this.get("forceSimulation")},e.prototype.destroy=function(){this.get("ticking")&&this.getSimulation().stop(),t.prototype.destroy.call(this)},e}(i.default),f=c;e.default=f},"396b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return t.hasOwnProperty(e)}},"398d":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("804a"),i=Math.abs,o=10,a=["shift","ctrl","alt","control"],s={getDefaultCfg:function(){return{direction:"both"}},getEvents:function(){return{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"onMouseUp",keyup:"onKeyUp",focus:"onKeyUp",keydown:"onKeyDown"}},updateViewport:function(t){var e=this.origin,n=+t.clientX,i=+t.clientY;if(!(0,r.isNaN)(n)&&!(0,r.isNaN)(i)){var o=n-e.x,a=i-e.y;"x"===this.get("direction")?a=0:"y"===this.get("direction")&&(o=0),this.origin={x:n,y:i};var s=this.graph.get("width"),u=this.graph.get("height"),c=this.graph.get("canvas").getCanvasBBox();(c.minX+o>s||c.maxX+o<0)&&(o=0),(c.minY+a>u||c.maxY+a<0)&&(a=0),this.graph.translate(o,a),this.graph.paint()}},onMouseDown:function(t){var e=this;e.keydown||t.shape||(e.origin={x:t.clientX,y:t.clientY},e.dragging=!1)},onMouseMove:function(t){var e=this.graph;if(!this.keydown&&!t.shape&&(t=(0,r.cloneEvent)(t),this.origin)){if(this.dragging)t.type="drag",e.emit("canvas:drag",t);else{if(i(this.origin.x-t.clientX)+i(this.origin.y-t.clientY)-1?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){this.keydown=!1}};e.default=s},"39ff":function(t,e,n){var r=n("0b07"),i=n("2b3e"),o=r(i,"WeakMap");t.exports=o},"3a44":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=n("28f9");e.default=function(t,e){for(var n=[],o={},a=0;a2){if(f)return(0,s.getPathWithBorderRadiusByPolyline)(t,f);var l=[];return(0,r.each)(t,(function(t,e){0===e?l.push(["M",t.x,t.y]):l.push(["L",t.x,t.y])})),l}if(f)return n=(0,s.simplifyPolyline)((0,s.getPolylinePoints)(t[0],t[t.length-1],a,u,c)),(0,s.getPathWithBorderRadiusByPolyline)(n,f);n=(0,s.getPolylinePoints)(t[0],t[t.length-1],a,u,c);var h=(0,i.pointsToPolygon)(n);return h}},"single-edge")},"41c3":function(t,e,n){var r=n("1a8c"),i=n("eac5"),o=n("ec8c"),a=Object.prototype,s=a.hasOwnProperty;function u(t){if(!r(t))return o(t);var e=i(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}t.exports=u},4245:function(t,e,n){var r=n("1290");function i(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}t.exports=i},42454:function(t,e,n){var r=n("f909"),i=n("2ec1"),o=i((function(t,e,n){r(t,e,n)}));t.exports=o},4284:function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length;while(++n1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,(function(t,n){isNaN(t)||(e[n]=+t)})),t[n]=e})),t):void 0}e.parseRadius=a,e.parsePath=s},"434a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("2047");e.default=function(t,e){if(!r.default(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;ie)n.insertBefore(t,i);else if(o200&&(l=s/10);for(var h=1/l,d=h/10,p=0;p<=l;p++){var g=p*h,v=[a.apply(null,t.concat([g])),a.apply(null,e.concat([g]))],y=r.distance(f[0],f[1],v[0],v[1]);y=0&&y=0&&n[e].splice(r,1)}},t.cacheState=function(t,e,n){n[e]||(n[e]=[]),n[e].push(t)},t.prototype.updateState=function(e,n,r){var i=this,o=t.checkCache,s=t.cacheState;if(!e.destroyed){var u=this.cachedStates,c=u.enabled,f=u.disabled;r?(o(e,n,f),s(e,n,c)):(o(e,n,c),s(e,n,f)),a&&clearTimeout(a),a=setTimeout((function(){a=null,i.updateGraphStates()}),16)}},t.prototype.updateStates=function(t,e,n){var r=this;(0,i.default)(e)?this.updateState(t,e,n):e.forEach((function(e){r.updateState(t,e,n)}))},t.prototype.updateGraphStates=function(){var t=this.graph.get("states"),e=this.cachedStates;(0,r.default)(e.disabled,(function(e,n){t[n]&&(t[n]=t[n].filter((function(t){return e.indexOf(t)<0&&!e.destroyed})))})),(0,r.default)(e.enabled,(function(e,n){if(t[n]){var r={};t[n].forEach((function(t){t.destroyed||(r[t.get("id")]=!0)})),e.forEach((function(e){if(!e.destroyed){var i=e.get("id");r[i]||(r[i]=!0,t[n].push(e))}}))}else t[n]=e})),this.graph.emit("graphstatechange",{states:t}),this.cachedStates={enabled:{},disabled:{}}},t.prototype.destroy=function(){this.graph=null,this.cachedStates=null,a&&clearTimeout(a),a=null,this.destroyed=!0},t}(),u=s;e.default=u},"4e82":function(t,e,n){"use strict";var r=n("23e7"),i=n("e330"),o=n("59ed"),a=n("7b0b"),s=n("07fa"),u=n("577e"),c=n("d039"),f=n("addb"),l=n("a640"),h=n("04d1"),d=n("d998"),p=n("2d00"),g=n("512c"),v=[],y=i(v.sort),m=i(v.push),b=c((function(){v.sort(void 0)})),x=c((function(){v.sort(null)})),w=l("sort"),M=!c((function(){if(p)return p<70;if(!(h&&h>3)){if(d)return!0;if(g)return g<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;ru(n)?1:-1}};r({target:"Array",proto:!0,forced:_},{sort:function(t){void 0!==t&&o(t);var e=a(this);if(M)return void 0===t?y(e):y(e,t);var n,r,i=[],u=s(e);for(r=0;r=t&&i<=t+n&&o>=e&&o<=e+r}function a(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxYs&&(f=s-c.width,t.canvasX=f),l+c.height>u&&(l=u-c.height,t.canvasY=l),o&&!1===o(t)||(0,i.default)(n,{top:l,left:f,visibility:"visible"})}else o(t);var h=function(){e.onMenuHide()};document.body.addEventListener("click",h),this.set("handler",h)},e.prototype.onMenuHide=function(){var t=this.get("menu"),e=this.get("onHide"),n=e();n&&(t&&(0,i.default)(t,{visibility:"hidden"}),document.body.removeEventListener("click",this.get("handler")))},e.prototype.destroy=function(){var t=this.get("menu"),e=this.get("handler");t&&t.parentNode.removeChild(t),e&&document.body.removeEventListener("click",e)},e}(o.default),u=s;e.default=u},"5439b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("c62f"));function i(t){return t&&t.__esModule?t:{default:t}}function o(t){void 0===t&&(t={});var e=t,n=function(){},r=function(){var t={};return function(e){var n=e.next,r=n.get("id");return!t[r]&&(t[r]=!0,!0)}}();return e.allowTraversal=t.allowTraversal||r,e.enter=t.enter||n,e.leave=t.leave||n,e}var a=function(t,e,n){var i=o(n),a=new r.default,s=t.findById(e);a.enqueue(s);var u=null,c=function(){var e=a.dequeue();i.enter({current:e,previous:u}),t.getSourceNeighbors(e).forEach((function(t){i.allowTraversal({previous:u,current:e,next:t})&&a.enqueue(t)})),i.leave({current:e,previous:u}),u=e};while(!a.isEmpty())c()},s=a;e.default=s},5492:function(t,e,n){var r=n("32b3"),i=n("d70d");function o(t,e){return i(t||[],e||[],r)}t.exports=o},"54eb":function(t,e,n){var r=n("8eeb"),i=n("32f4");function o(t,e){return r(t,i(t),e)}t.exports=o},5598:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("28f9"),i=n("5b8d");function o(t){return r.default(t)?0:i.default(t)?t.length:Object.keys(t).length}e.default=o},"55a3":function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},"56fa":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseLayout=void 0;var r=n("9ab4"),i=a(n("72fb")),o=a(n("503e"));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1}return t.prototype.init=function(t){var e=this;e.nodes=t.nodes||[],e.edges=t.edges||[],e.combos=t.combos||[]},t.prototype.execute=function(){},t.prototype.layout=function(t){var e=this;e.init(t),e.execute()},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){var e=this;(0,o.default)(e,t)},t.prototype.destroy=function(){var t=this;t.positions=null,t.nodes=null,t.edges=null,t.destroyed=!0},t}();e.BaseLayout=s;var u={registerLayout:function(t,e,n){if(void 0===n&&(n=s),!e)throw new Error("please specify handler for this layout: "+t);var a=function(t){function n(n){var r=t.call(this)||this,a=r,s={},u=a.getDefaultCfg();return(0,o.default)(s,u,e,n),(0,i.default)(s,(function(t,e){a[e]=t})),r}return(0,r.__extends)(n,t),n}(n);u[t]=a}},c=u;e.default=c},"573a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("516b");function i(t,e,n,i,o,a,s,u){var c=(Math.atan2(u-e,s-t)+2*Math.PI)%(2*Math.PI);if(co)return!1;var f={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return r.distance(f.x,f.y,s,u)<=a/2}e.default=i},"57a5":function(t,e,n){var r=n("91e9"),i=r(Object.keys,Object);t.exports=i},"57dc":function(t,e){function n(t,e){return t>e}t.exports=n},5833:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("7d16"),o=n("8937"),a=n("9705"),s=n("e3ad"),u=n("be6e"),c=n("31c4"),f=n("bd06"),l=n("83e4"),h=n("3820"),d=n("4dab");function p(t,e,n){for(var r=!1,i=0;i=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var s=a[n];if(o.isNil(s)||o.isNil(n))return null;var u=s.length,c=a[n+1];return i.default.pointAt(s[u-2],s[u-1],c[1],c[2],c[3],c[4],c[5],c[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",h.default.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,r,a=0,s=0,u=[],c=this.get("curve");c&&(o.each(c,(function(t,e){n=c[e+1],r=t.length,n&&(a+=i.default.length(t[r-2],t[r-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",a),0!==a?(o.each(c,(function(o,f){n=c[f+1],r=o.length,n&&(t=[],t[0]=s/a,e=i.default.length(o[r-2],o[r-1],n[1],n[2],n[3],n[4],n[5],n[6]),s+=e||0,t[1]=s/a,u.push(t))})),this.set("tCache",u)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,r=e[1].currentPoint,i=e[1].startTangent;t=[],i?(t.push([n[0]-i[0],n[1]-i[1]]),t.push([n[0],n[1]])):(t.push([r[0],r[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var r=e[n-2].currentPoint,i=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([i[0]-o[0],i[1]-o[1]]),t.push([i[0],i[1]])):(t.push([r[0],r[1]]),t.push([i[0],i[1]]))}return t},e}(a.default);e.default=g},"585a":function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n("c8ba"))},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("e330"),i=n("1d80"),o=n("577e"),a=n("5899"),s=r("".replace),u="["+a+"]",c=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t){return function(e){var n=o(i(e));return 1&t&&(n=s(n,c,"")),2&t&&(n=s(n,f,"")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},"58f7":function(t,e){function n(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}t.exports=n},"59d5":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("bd8b"),i=function(t){return r.default(t,"Error")};e.default=i},"5a3a":function(t,e,n){var r=n("1cba"),i=r();t.exports=i},"5ac6":function(t,e,n){"use strict";function r(t,e){void 0===e&&(e=new Map);var n=[];if(Array.isArray(t))for(var r=0,i=t.length;r0&&n(f)?e>1?o(f,e-1,n,a,s):r(s,f):a||(s[s.length]=f)}return s}t.exports=o},"5ca0":function(t,e,n){var r=n("badf"),i=n("30c9"),o=n("ec69");function a(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,a);return c>-1?s[u?e[c]:c]:void 0}}t.exports=a},"5cd2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("739e"),i=function(t){var e=r.default(t);return e.charAt(0).toLowerCase()+e.substring(1)};e.default=i},"5ced":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7da3"));function i(t){return t&&t.__esModule?t:{default:t}}n("14ca"),n("e9d4"),n("e115"),n("4433"),n("bc08"),n("b7ca");var o=r.default;e.default=o},"5d64":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("d080"),i=n("f4c8");function o(t,e,n){var i=1;if(r.isString(t)&&(i=t.split("\n").length),i>1){var o=a(e,n);return e*i+o*(i-1)}return e}function a(t,e){return e?e-t:.14*t}function s(t,e){var n=i.getOffScreenContext(),o=0;if(r.isNil(t)||""===t)return o;if(n.save(),n.font=e,r.isString(t)&&t.includes("\n")){var a=t.split("\n");r.each(a,(function(t){var e=n.measureText(t).width;o=55296&&i<=56319&&n>1,t+=x(t/e);t>y*u>>1;r+=a)t=x(t/y);return x(r+(y+1)*t/(t+c))},j=function(t){var e=[];t=O(t);var n,r,i=t.length,c=h,f=0,p=l;for(n=0;n=c&&rx((o-f)/M))throw m(v);for(f+=(b-c)*M,c=b,n=0;no)throw m(v);if(r==c){for(var P=f,k=a;;k+=a){var C=k<=p?s:k>=p+u?u:k-p;if(P0){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(f)throw new Error("Input graph is not connected: "+t);f=!0}t.nodeEdges(n).forEach(c)}return a}t.exports=a},"625f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5b8d");function i(t){if(r.default(t))return t[0]}e.default=i},6428:function(t,e,n){var r=n("b4b0"),i=1/0,o=17976931348623157e292;function a(t){if(!t)return 0===t?t:0;if(t=r(t),t===i||t===-i){var e=t<0?-1:1;return e*o}return t===t?t:0}t.exports=a},"642a":function(t,e,n){var r=n("966f"),i=n("3bb4"),o=n("20ec");function a(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}t.exports=a},"64be":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("9705"),o=n("7f6b"),a=n("516b"),s=n("d40f"),u=n("3568"),c=n("bd06"),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),f=o.x,l=o.y,h=o.width,d=o.height,p=o.radius;if(p){var g=!1;return n&&(g=u.default(f,l,h,d,p,i,t,e)),!g&&r&&(g=c.default(this,t,e)),g}var v=i/2;return r&&n?a.inBox(f-v,l-v,h+v,d+v,t,e):r?a.inBox(f,l,h,d,t,e):n?s.default(f,l,h,d,i,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.width,a=e.height,s=e.radius;if(t.beginPath(),0===s)t.rect(n,r,i,a);else{var u=o.parseRadius(s),c=u[0],f=u[1],l=u[2],h=u[3];t.moveTo(n+c,r),t.lineTo(n+i-f,r),0!==f&&t.arc(n+i-f,r+f,f,-Math.PI/2,0),t.lineTo(n+i,r+a-l),0!==l&&t.arc(n+i-l,r+a-l,l,0,Math.PI/2),t.lineTo(n+h,r+a),0!==h&&t.arc(n+h,r+a-h,h,Math.PI/2,Math.PI),t.lineTo(n,r+c),0!==c&&t.arc(n+c,r+c,c,Math.PI,1.5*Math.PI),t.closePath()}},e}(i.default);e.default=f},"656b":function(t,e,n){var r=n("e2e4"),i=n("f4d6");function o(t,e){e=r(e,t);var n=0,o=e.length;while(null!=t&&n0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function C(t,e){return t[0]*e[0]+t[1]*e[1]}function O(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function E(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function A(t,e){e=e||1;var n=2*r["c"]()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function j(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function I(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function T(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function B(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function N(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t}function D(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function L(t){return t[0]=0,t[1]=0,t}function R(t){return"vec2("+t[0]+", "+t[1]+")"}function z(t,e){return t[0]===e[0]&&t[1]===e[1]}function F(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r["b"]*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r["b"]*Math.max(1,Math.abs(i),Math.abs(a))}var G=M,Y=f,X=l,V=h,q=x,U=w,W=_,H=function(){var t=i();return function(e,n,r,i,o,a){var s,u;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s2&&(n.push([i].concat(a.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===a.length&&n.push([i,a[0]]),"r"===s)n.push([i].concat(a));else while(a.length>=e[s])if(n.push([i].concat(a.splice(0,e[s]))),!e[s])break;return t})),n},l=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?o[3]={x:+t[0],y:+t[1]}:i-2===r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},h=function(t,e,n,r,i){var o=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var a=Math.PI/180,s=t+n*Math.cos(-r*a),u=t+n*Math.cos(-i*a),c=e+n*Math.sin(-r*a),f=e+n*Math.sin(-i*a);o=[["M",s,c],["A",n,n,0,+(i-r>180),0,u,f]]}else o=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return o},d=function(t){if(t=f(t),!t||!t.length)return[["M",0,0]];var e,n,r=[],i=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(i=+t[0][1],o=+t[0][2],a=i,s=o,u++,r[0]=["M",i,o]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=void 0,p=void 0,g=u,v=t.length;g1&&(M=Math.sqrt(M),n*=M,r*=M);var _=n*n,S=r*r,P=(o===a?-1:1)*Math.sqrt(Math.abs((_*S-_*w*w-S*x*x)/(_*w*w+S*x*x)));d=P*n*w/r+(t+s)/2,p=P*-r*x/n+(e+u)/2,l=Math.asin(((e-p)/r).toFixed(9)),h=Math.asin(((u-p)/r).toFixed(9)),l=th&&(l-=2*Math.PI),!a&&h>l&&(h-=2*Math.PI)}var k=h-l;if(Math.abs(k)>g){var C=h,O=s,E=u;h=l+g*(a&&h>l?1:-1),s=d+n*Math.cos(h),u=p+r*Math.sin(h),m=v(s,u,n,r,i,0,a,O,E,[h,C,d,p])}k=h-l;var A=Math.cos(l),j=Math.sin(l),I=Math.cos(h),T=Math.sin(h),B=Math.tan(k/4),N=4/3*n*B,D=4/3*r*B,L=[t,e],R=[t+N*j,e-D*A],z=[s+N*T,u-D*I],F=[s,u];if(R[0]=2*L[0]-R[0],R[1]=2*L[1]-R[1],c)return[R,z,F].concat(m);m=[R,z,F].concat(m).join().split(",");for(var G=[],Y=0,X=m.length;Y7){t[e].shift();var o=t[e];while(o.length)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},y=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var m=0;m1?1:u<0?0:u;for(var c=u/2,f=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;p0&&l<1&&h.push(l)}else{var g=c*c-4*f*u,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*u);y>0&&y<1&&h.push(y);var m=(-c-v)/(2*u);m>0&&m<1&&h.push(m)}}var b,x=h.length,w=x;while(x--)l=h[x],b=1-l,d[0][x]=b*b*b*t+3*b*b*l*n+3*b*l*l*i+l*l*l*a,d[1][x]=b*b*b*e+3*b*b*l*r+3*b*l*l*o+l*l*l*s;return d[0][w]=t,d[1][w]=e,d[0][w+1]=a,d[1][w+1]=s,d[0].length=d[1].length=w+2,{min:{x:Math.min.apply(0,d[0]),y:Math.min.apply(0,d[1])},max:{x:Math.max.apply(0,d[0]),y:Math.max.apply(0,d[1])}}},_=function(t,e,n,r,i,o,a,s){if(!(Math.max(t,n)Math.max(i,a)||Math.max(e,r)Math.max(o,s))){var u=(t*r-e*n)*(i-a)-(t-n)*(i*s-o*a),c=(t*r-e*n)*(o-s)-(e-r)*(i*s-o*a),f=(t-n)*(o-s)-(e-r)*(i-a);if(f){var l=u/f,h=c/f,d=+l.toFixed(2),p=+h.toFixed(2);if(!(d<+Math.min(t,n).toFixed(2)||d>+Math.max(t,n).toFixed(2)||d<+Math.min(i,a).toFixed(2)||d>+Math.max(i,a).toFixed(2)||p<+Math.min(e,r).toFixed(2)||p>+Math.max(e,r).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:l,y:h}}}},S=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},P=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var o=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return o.parsePathArray=b,o},k=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:P(t,e,n,r),vb:[t,e,n,r].join(" ")}},C=function(t,e){return t=k(t),e=k(e),S(e,t.x,t.y)||S(e,t.x2,t.y)||S(e,t.x,t.y2)||S(e,t.x2,t.y2)||S(t,e.x,e.y)||S(t,e.x2,e.y)||S(t,e.x,e.y2)||S(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)},O=function(t,e,n,r,i,o,s,u){Object(a["isArray"])(t)||(t=[t,e,n,r,i,o,s,u]);var c=M.apply(null,t);return k(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},E=function(t,e,n,r,i,o,a,s,u){var c=1-u,f=Math.pow(c,3),l=Math.pow(c,2),h=u*u,d=h*u,p=f*t+3*l*u*n+3*c*u*u*i+d*a,g=f*e+3*l*u*r+3*c*u*u*o+d*s,v=t+2*u*(n-t)+h*(i-2*n+t),y=e+2*u*(r-e)+h*(o-2*r+e),m=n+2*u*(i-n)+h*(a-2*i+n),b=r+2*u*(o-r)+h*(s-2*o+r),x=c*t+u*n,w=c*e+u*r,M=c*i+u*a,_=c*o+u*s,S=90-180*Math.atan2(v-m,y-b)/Math.PI;return{x:p,y:g,m:{x:v,y:y},n:{x:m,y:b},start:{x:x,y:w},end:{x:M,y:_},alpha:S}},A=function(t,e,n){var r=O(t),i=O(e);if(!C(r,i))return n?0:[];for(var o=w.apply(0,t),a=w.apply(0,e),s=~~(o/8),u=~~(a/8),c=[],f=[],l={},h=n?0:[],d=0;d=0&&P<=1&&k>=0&&k<=1&&(n?h+=1:h.push({x:S.x,y:S.y,t1:P,t2:k}))}}return h},j=function(t,e,n){var r,i,o,a,s,u,c,f,l,h;t=y(t),e=y(e);for(var d=n?0:[],p=0,g=t.length;p=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1]),e}));return f}var N=function(t,e,n){if(1===n)return[[].concat(t)];var r=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])r=r.concat(B(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var o=0;o<=n-1;o++)r.push(i)}return r},D=function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}r=t.length;var l=i-r;if(r0)){t[r]=e[r];break}n=G(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=G(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=G(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},V=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){var t=this.type;return"[Event (type="+t+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),q=V,U=n("9ab4"),W=n("7fa27"),H=n("28f9"),Z=n.n(H),$=n("2047"),Q=n.n($),K=n("61d8"),J=n.n(K),tt=n("9ab4f"),et=n.n(tt),nt=(n("01f9"),n("503e")),rt=n.n(nt),it=n("72fb"),ot=n.n(it),at=n("3c5c"),st=n.n(at);function ut(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var ct="undefined"!==typeof window&&"undefined"!==typeof window.document;function ft(t,e){if(t.isCanvas())return!0;var n=e.getParent(),r=!1;while(n){if(n===t){r=!0;break}n=n.getParent()}return r}function lt(t){return t.cfg.visible&&t.cfg.capture}var ht=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=rt()(r,e),n}return Object(U["__extends"])(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(W["default"]),dt=ht,pt=n("0c05"),gt=n("20e7");function vt(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return gt["a"].fromTranslation(r,n),gt["a"].multiply(t,r,e)}function yt(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return gt["a"].fromRotation(r,n),gt["a"].multiply(t,r,e)}function mt(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return gt["a"].fromScaling(r,n),gt["a"].multiply(t,r,e)}function bt(t,e,n){return gt["a"].multiply(t,n,e)}function xt(t,e){for(var n=t?[].concat(t):[1,0,0,0,1,0,0,0,1],r=0,i=e.length;r=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r}function _t(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t}function St(t,e){var n=[],r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=t[8],h=e[0],d=e[1],p=e[2],g=e[3],v=e[4],y=e[5],m=e[6],b=e[7],x=e[8];return n[0]=h*r+d*a+p*c,n[1]=h*i+d*s+p*f,n[2]=h*o+d*u+p*l,n[3]=g*r+v*a+y*c,n[4]=g*i+v*s+y*f,n[5]=g*o+v*u+y*l,n[6]=m*r+b*a+x*c,n[7]=m*i+b*s+x*f,n[8]=m*o+b*u+x*l,n}function Pt(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}function kt(t){var e=[],n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],f=t[8],l=f*a-s*c,h=-f*o+s*u,d=c*o-a*u,p=n*l+r*h+i*d;return p?(p=1/p,e[0]=l*p,e[1]=(-f*r+i*c)*p,e[2]=(s*r-i*a)*p,e[3]=h*p,e[4]=(f*n-i*u)*p,e[5]=(-s*n+i*o)*p,e[6]=d*p,e[7]=(-c*n+r*u)*p,e[8]=(a*n-r*o)*p,e):null}var Ct="matrix",Ot=["zIndex","capture","visible","type"],Et=["repeat"],At=":",jt="*";function It(t){for(var e=[],n=0;nt.delay&&Object(a["each"])(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var Dt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return Object(a["mix"])(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return Object(U["__extends"])(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=Nt(r,b):n.addAnimator(this),r.push(b),this.set("animations",r),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");Object(a["each"])(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return Object(a["each"])(e,(function(t){t._paused=!0,t._pauseTime=n,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline"),e=t.getTime(),n=this.get("animations"),r=this.get("_pause").pauseTime;return Object(a["each"])(n,(function(t){t.startTime=t.startTime+(e-r),t._paused=!1,t._pauseTime=null,t.resumeCallback&&t.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},e.prototype.emitDelegation=function(t,e){var n,r=this,i=e.propagationPath;this.getEvents();"mouseenter"===t?n=e.fromShape:"mouseleave"===t&&(n=e.toShape);for(var o=function(t){var o=i[t],u=o.get("name");if(u){if((o.isGroup()||o.isCanvas&&o.isCanvas())&&n&&ft(o,n))return"break";Object(a["isArray"])(u)?Object(a["each"])(u,(function(t){r.emitDelegateEvent(o,t,e)})):s.emitDelegateEvent(o,u,e)}},s=this,u=0;u0)}));a.length>0?(ot()(a,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,o),r=Math.max.apply(null,o)):(t=0,e=0,n=0,r=0);var s={x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n};return s},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));a.length>0?(ot()(a,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,o),r=Math.max.apply(null,o)):(t=0,e=0,n=0,r=0);var s={x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n};return s},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e["children"]=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();ot()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(lt(a)&&(a.isGroup()?i=a.getShape(e,n,r):a.isHit(e,n)&&(i=a)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&Xt(i,t,!1),t.set("parent",this),e&&Gt(t,e),r&&Yt(t,r),n.push(t),Ft(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t=this.getChildren();ot()(t,(function(t,e){return t[zt]=e,t})),t.sort(Vt((function(t,e){return t.get("zIndex")-e.get("zIndex")}))),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){var e=this.getChildren();return e[t]},e.prototype.getCount=function(){var t=this.getChildren();return t.length},e.prototype.contain=function(t){var e=this.getChildren();return e.indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return ot()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return ot()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(Lt),Ht=Wt,Zt=0,$t=0,Qt=0,Kt=1e3,Jt=0,te=0,ee=0,ne="object"===typeof performance&&performance.now?performance:Date,re="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ie(){return te||(re(oe),te=ne.now()+ee)}function oe(){te=0}function ae(){this._call=this._time=this._next=null}function se(t,e,n){var r=new ae;return r.restart(t,e,n),r}function ue(){ie(),++Zt;var t,e=qt;while(e)(t=te-e._time)>=0&&e._call.call(null,t),e=e._next;--Zt}function ce(){te=(Jt=ne.now())+ee,Zt=$t=0;try{ue()}finally{Zt=0,le(),te=0}}function fe(){var t=ne.now(),e=t-Jt;e>Kt&&(ee-=e,Jt=t)}function le(){var t,e,n=qt,r=1/0;while(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:qt=e);Ut=t,he(r)}function he(t){if(!Zt){$t&&($t=clearTimeout($t));var e=t-te;e>24?(t<1/0&&($t=setTimeout(ce,t-ne.now()-ee)),Qt&&(Qt=clearInterval(Qt))):(Qt||(Jt=ne.now(),Qt=setInterval(fe,Kt)),Zt=1,re(ce))}}function de(t){return+t}function pe(t){return t*t}function ge(t){return t*(2-t)}function ve(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ye(t){return t*t*t}function me(t){return--t*t*t+1}function be(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}ae.prototype=se.prototype={constructor:ae,restart:function(t,e,n){if("function"!==typeof t)throw new TypeError("callback is not a function");n=(null==n?ie():+n)+(null==e?0:+e),this._next||Ut===this||(Ut?Ut._next=this:qt=this,Ut=this),this._call=t,this._time=n,he()},stop:function(){this._call&&(this._call=null,this._time=1/0,he())}};var xe=3,we=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(xe),Me=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(xe),_e=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(xe),Se=Math.PI,Pe=Se/2;function ke(t){return 1===+t?1:1-Math.cos(t*Pe)}function Ce(t){return Math.sin(t*Pe)}function Oe(t){return(1-Math.cos(Se*t))/2}function Ee(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ae(t){return Ee(1-+t)}function je(t){return 1-Ee(t)}function Ie(t){return((t*=2)<=1?Ee(1-t):2-Ee(t-1))/2}function Te(t){return 1-Math.sqrt(1-t*t)}function Be(t){return Math.sqrt(1- --t*t)}function Ne(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var De=4/11,Le=6/11,Re=8/11,ze=3/4,Fe=9/11,Ge=10/11,Ye=15/16,Xe=21/22,Ve=63/64,qe=1/De/De;function Ue(t){return 1-We(1-t)}function We(t){return(t=+t)>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Cn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Cn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gn.exec(t))?new An(e[1],e[2],e[3],1):(e=vn.exec(t))?new An(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yn.exec(t))?Cn(e[1],e[2],e[3],e[4]):(e=mn.exec(t))?Cn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=bn.exec(t))?Bn(e[1],e[2]/100,e[3]/100,1):(e=xn.exec(t))?Bn(e[1],e[2]/100,e[3]/100,e[4]):wn.hasOwnProperty(t)?kn(wn[t]):"transparent"===t?new An(NaN,NaN,NaN,0):null}function kn(t){return new An(t>>16&255,t>>8&255,255&t,1)}function Cn(t,e,n,r){return r<=0&&(t=e=n=NaN),new An(t,e,n,r)}function On(t){return t instanceof un||(t=Pn(t)),t?(t=t.rgb(),new An(t.r,t.g,t.b,t.opacity)):new An}function En(t,e,n,r){return 1===arguments.length?On(t):new An(t,e,n,null==r?1:r)}function An(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function jn(){return"#"+Tn(this.r)+Tn(this.g)+Tn(this.b)}function In(){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+")")}function Tn(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function Bn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ln(t,e,n,r)}function Nn(t){if(t instanceof Ln)return new Ln(t.h,t.s,t.l,t.opacity);if(t instanceof un||(t=Pn(t)),!t)return new Ln;if(t instanceof Ln)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new Ln(a,s,u,t.opacity)}function Dn(t,e,n,r){return 1===arguments.length?Nn(t):new Ln(t,e,n,null==r?1:r)}function Ln(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Rn(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 zn(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}an(un,Pn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Mn,formatHex:Mn,formatHsl:_n,formatRgb:Sn,toString:Sn}),an(An,En,sn(un,{brighter:function(t){return t=null==t?fn:Math.pow(fn,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?cn:Math.pow(cn,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jn,formatHex:jn,formatRgb:In,toString:In})),an(Ln,Dn,sn(un,{brighter:function(t){return t=null==t?fn:Math.pow(fn,t),new Ln(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?cn:Math.pow(cn,t),new Ln(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 An(Rn(t>=240?t-240:t+120,i,r),Rn(t,i,r),Rn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Fn=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:tr(n,r)})),o=rr.lastIndex;return ol.length?(c=f(o[u]),l=f(i[u]),l=F(l,c),l=X(l,c),e.fromAttrs.path=l,e.toAttrs.path=c):e.pathFormatted||(c=f(o[u]),l=f(i[u]),l=X(l,c),e.fromAttrs.path=l,e.toAttrs.path=c,e.pathFormatted=!0),r[u]=[];for(var h=0;h0){for(var a=r.animators.length-1;a>=0;a--)if(t=r.animators[a],t.destroyed)r.removeAnimator(a);else{if(!t.isAnimatePaused()){e=t.get("animations");for(var s=e.length-1;s>=0;s--)n=e[s],i=hr(t,n,o),i&&(e.splice(s,1),i=!1,n.callback&&n.callback())}0===e.length&&r.removeAnimator(a)}var u=r.canvas.get("autoDraw");u||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),pr=dr,gr=40,vr=0,yr=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function mr(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function br(t,e,n){if(n.bubbles){var r=void 0,i=!1;if("mouseenter"===e?(r=n.fromShape,i=!0):"mouseleave"===e&&(i=!0,r=n.toShape),t.isCanvas()&&i)return;if(r&&ft(t,r))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var xr=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){var n=e.canvas,r=n.get("el");if(r!==t.target&&(e.dragging||e.currentShape)){var i=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,i,e.draggingShape)}},this._onDocumentMouseUp=function(t){var n=e.canvas,r=n.get("el");if(r!==t.target&&e.dragging){var i=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,i,null),e._emitEvent("dragend",t,i,e.draggingShape),e._afterDrag(e.draggingShape,i,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");ot()(yr,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");ot()(yr,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,r,i,o){var a=new q(t,e);return a.fromShape=i,a.toShape=o,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(r),a},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e=this.canvas,n=e.getClientByEvent(t),r=e.getPointByEvent(t);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),r=this._getShape(n,e),i=this["_on"+t],o=!1;if(i)i.call(this,n,r,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,r),r&&this._emitEvent(t,e,n,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,n,a,a,null),this._emitEvent(t,e,n,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,r,null,null)}if(o||(this.currentShape=r),r&&!r.get("destroyed")){var s=this.canvas,u=s.get("el");u.style.cursor=r.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){n.button===vr&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,r){var i=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",t,e,n,n,r),this._emitEvent("mouseleave",t,e,n,n,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,e,r,n,r),this._emitEvent("mouseenter",t,e,r,n,r)))},t.prototype._emitDragoverEvents=function(t,e,n,r,i){r?(r!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,r),this._emitEvent("dragenter",t,e,r,n,r)),i||this._emitEvent("dragover",t,e,r)):n&&this._emitEvent("dragleave",t,e,n,n,r),i&&this._emitEvent("dragover",t,e,r)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(e,n);r!==t&&this._emitMouseoverEvents(n,e,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,e,n){if(n.button===vr){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,r),this._afterDrag(r,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,t,r,e,!0)},t.prototype._onmousemove=function(t,e,n){var r=this.canvas,i=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,t,i,e,!1),this._emitEvent("drag",n,t,o);else{var a=this.mousedownPoint;if(a){var s=this.mousedownShape,u=n.timeStamp,c=u-this.mousedownTimeStamp,f=a.clientX-t.clientX,l=a.clientY-t.clientY,h=f*f+l*l;c>120||h>gr?s&&s.get("draggable")?(o=this.mousedownShape,o.set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,o){var a=this._getEventObj(t,e,n,r,i,o);if(r){a.shape=r,mr(r,t,a);var s=r.getParent();while(s)s.emitDelegation(t,a),a.propagationStopped||br(s,t,a),a.propagationPath.push(s),s=s.getParent()}else{var u=this.canvas;mr(u,t,a)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),wr=xr,Mr="px",_r=Object(pt["a"])(),Sr=_r&&"firefox"===_r.name,Pr=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return Object(U["__extends"])(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e["cursor"]="default",e["supportCSSTransform"]=!1,e},e.prototype.initContainer=function(){var t=this.get("container");J()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t);var e=this.get("container");e.appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){var t=new wr({canvas:this});t.init(),this.set("eventController",t)},e.prototype.initTimeline=function(){var t=new pr(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");ct&&(n.style.width=t+Mr,n.style.height=e+Mr)},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");ct&&e&&(e.style.cursor=t)},e.prototype.getPointByEvent=function(t){var e=this.get("supportCSSTransform");if(e){if(Sr&&!Z()(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!Z()(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var n=this.getClientByEvent(t),r=n.x,i=n.y;return this.getPointByClient(r,i)},e.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(e="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:e.clientX,y:e.clientY}},e.prototype.getPointByClient=function(t,e){var n=this.get("el"),r=n.getBoundingClientRect();return{x:t-r.left,y:e-r.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el"),r=n.getBoundingClientRect();return{x:t+r.left,y:e+r.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){var t=this.get("eventController");t.destroy()},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Ht),kr=Pr,Cr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(U["__extends"])(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,o=t.maxY;if(e){var a=Pt(e,[t.minX,t.minY]),s=Pt(e,[t.maxX,t.minY]),u=Pt(e,[t.minX,t.maxY]),c=Pt(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),i=Math.max(a[0],s[0],u[0],c[0]),r=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var f=this.attrs;if(f.shadowColor){var l=f.shadowBlur,h=void 0===l?0:l,d=f.shadowOffsetX,p=void 0===d?0:d,g=f.shadowOffsetY,v=void 0===g?0:g,y=n-h+p,m=i+h+p,b=r-h+v,x=o+h+v;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,b),o=Math.max(o,x)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:o,width:i-n,height:o-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1];i=this.invertFromMatrix(i);var o=i[0],a=i[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(r&&r.isHit(o,a))return!0}return!1},e}(Lt),Ar=Er,jr=n("2a37"),Ir=jr.version},6891:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("8937"),i=n("93f6"),o=n("6ba5"),a=n("602a"),s=n("7174"),u=n("e9dd"),c=n("487c"),f=function(){function t(t){var e=c.createSVGElement("defs"),n=r.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i-1||delete m[t]}};for(var w in l)x(w);for(var p in y?b[y]=m:(0,a.mix)(b,m),g){var M=g[p];(0,a.isPlainObject)(M)||(y?(0,a.mix)(v[y],(i={},i[p]=M,i)):(0,a.mix)(v,(r={},r[p]=M,r)),delete g[p])}var _={};(0,a.deepMix)(_,v,b,g);var S=function(t){var e,n,r=_[t];if((0,a.isPlainObject)(r)){var i=h.find((function(e){return e.get("name")===t}));i&&i.attr(r)}else"combo"===s?y||o.attr((e={},e[t]=r,e)):o.attr((n={},n[t]=r,n))};for(var P in _)S(P)}}},getStateStyle:function(t,e,n){var r=n.getModel();if(e){var i=r.stateStyles?r.stateStyles[t]:this.options.stateStyles&&this.options.stateStyles[t];return(0,a.mix)({},r.style,i)}return{}},getControlPoints:function(t){return t.controlPoints},getAnchorPoints:function(t){var e=this.options.anchorPoints,n=t.anchorPoints||e;return n}};e.shapeBase=l},"6a5c":function(t,e,n){var r=n("7948"),i=n("656b"),o=n("badf"),a=n("97d3"),s=n("d4b2"),u=n("b047"),c=n("2164"),f=n("cd9d"),l=n("6747");function h(t,e,n){e=e.length?r(e,(function(t){return l(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[f];var h=-1;e=r(e,u(o));var d=a(t,(function(t,n,i){var o=r(e,(function(e){return e(t)}));return{criteria:o,index:++h,value:t}}));return s(d,(function(t,e){return c(t,e,n)}))}t.exports=h},"6aa2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=n("2047");e.default=function(t,e){if(r.default(t)){for(var n,o=1/0,a=0;a';e.innerHTML=n},t}();e.default=s},"6cac":function(t,e,n){"use strict";function r(t){var e=t.attr(),n=e.x,r=e.y,i=e.r;return{x:n-i,y:r-i,width:2*i,height:2*i}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},"6cd4":function(t,e,n){var r=n("8057"),i=n("48a0"),o=n("1304"),a=n("6747");function s(t,e){var n=a(t)?r:i;return n(t,o(e))}t.exports=s},"6f6c":function(t,e){var n=/\w*$/;function r(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}t.exports=r},"6f9c":function(t,e,n){var r;try{r={cloneDeep:n("0644"),constant:n("72f0"),defaults:n("95ae"),each:n("c641"),filter:n("9380"),find:n("2769"),flatten:n("4d8c"),forEach:n("6cd4"),forIn:n("9948"),has:n("3852"),isUndefined:n("4cfe"),last:n("4416"),map:n("dd61"),mapValues:n("9e86"),max:n("abdd"),merge:n("42454"),min:n("004e"),minBy:n("80f6"),now:n("408c"),pick:n("2593"),range:n("5a3a"),reduce:n("c5a2"),sortBy:n("c707"),uniqueId:n("98dc"),values:n("3ff1"),zipObject:n("5492")}}catch(i){}r||(r=window._),t.exports=r},"6fcd":function(t,e,n){var r=n("50d8"),i=n("d370"),o=n("6747"),a=n("0d24"),s=n("c098"),u=n("73ac"),c=Object.prototype,f=c.hasOwnProperty;function l(t,e){var n=o(t),c=!n&&i(t),l=!n&&!c&&a(t),h=!n&&!c&&!l&&u(t),d=n||c||l||h,p=d?r(t.length,String):[],g=p.length;for(var v in t)!e&&!f.call(t,v)||d&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||p.push(v);return p}t.exports=l},"6fcf":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("8937"),o=n("4a35"),a=n("060b"),s=n("7a70"),u=n("d531"),c=.3,f={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},l={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},h={left:"left",start:"left",center:"middle",right:"end",end:"end"},d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),o=this.get("el");this._setFont(),i.each(e||r,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?a.setTransform(n):s.SVG_ATTR_MAP[e]&&o.setAttribute(s.SVG_ATTR_MAP[e],t)})),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.textBaseline,r=e.textAlign,i=o.detect();i&&"firefox"===i.name?t.setAttribute("dominant-baseline",l[n]||"alphabetic"):t.setAttribute("alignment-baseline",f[n]||"baseline"),t.setAttribute("text-anchor",h[r]||"left")},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),r=n.x,o=n.textBaseline,a=void 0===o?"bottom":o;if(t)if(~t.indexOf("\n")){var s=t.split("\n"),u=s.length-1,f="";i.each(s,(function(t,e){0===e?"alphabetic"===a?f+=''+t+"":"top"===a?f+=''+t+"":"middle"===a?f+=''+t+"":"bottom"===a?f+=''+t+"":"hanging"===a&&(f+=''+t+""):f+=''+t+""})),e.innerHTML=f}else e.innerHTML=t;else e.innerHTML=""},e}(u.default);e.default=d},"6ff6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=M(n("7fa27")),o=M(n("0cc2")),a=M(n("bb3a")),s=n("2470"),u=M(n("e0ef")),c=M(n("1b95")),f=M(n("72fb")),l=M(n("cdca")),h=M(n("61d8")),d=M(n("842b")),p=n("8be5"),g=n("0dfa"),v=n("2ef0"),y=M(n("067f")),m=n("90c8"),b=M(n("d99a")),x=n("c0b3"),w=M(n("ba23"));function M(t){return t&&t.__esModule?t:{default:t}}var _="node",S="svg",P=function(t){function e(e){var n=t.call(this)||this;return n.cfg=(0,c.default)(n.getDefaultCfg(),e),n.init(),n.animating=!1,n.destroyed=!1,n}return(0,r.__extends)(e,t),e.prototype.init=function(){this.initCanvas();var t=new m.EventController(this),e=new m.ViewController(this),n=new m.ModeController(this),r=new m.ItemController(this),i=new m.LayoutController(this),o=new m.StateController(this),a=new m.CustomGroup(this);this.set({eventController:t,viewController:e,modeController:n,itemController:r,layoutController:i,stateController:o,customGroupControll:a}),this.initPlugin()},e.prototype.initCanvas=function(){var t=this.get("container");if((0,h.default)(t)&&(t=document.getElementById(t),this.set("container",t)),!t)throw new Error("invalid container");var e,n=this.get("width"),r=this.get("height"),i=this.get("renderer");e=i===S?new a.default({container:t,width:n,height:r}):new o.default({container:t,width:n,height:r}),this.set("canvas",e),this.initGroups()},e.prototype.initPlugin=function(){var t=this;(0,f.default)(t.get("plugins"),(function(e){!e.destroyed&&e.initPlugin&&e.initPlugin(t)}))},e.prototype.initGroups=function(){var t=this.get("canvas"),e=this.get("canvas").get("el"),n=e.id,r=t.addGroup({id:n+"-root",className:y.default.rootContainerClassName});if(this.get("groupByTypes")){var i=r.addGroup({id:n+"-edge",className:y.default.edgeContainerClassName}),o=r.addGroup({id:n+"-node",className:y.default.nodeContainerClassName}),a=r.addGroup({id:n+"-combo",className:y.default.comboContainerClassName}),s=r.addGroup({id:n+"-group",className:y.default.customGroupContainerClassName});s.toBack(),a.toBack(),this.set({nodeGroup:o,edgeGroup:i,customGroup:s,comboGroup:a})}var u=r.addGroup({id:n+"-delegate",className:y.default.delegateContainerClassName});this.set({delegateGroup:u}),this.set("group",r)},e.prototype.getDefaultCfg=function(){return{container:void 0,width:void 0,height:void 0,renderer:"canvas",modes:{},plugins:[],data:{},fitViewPadding:10,minZoom:.2,maxZoom:10,event:!0,groupByTypes:!0,directed:!1,autoPaint:!0,nodes:[],edges:[],combos:[],vedges:[],itemMap:{},linkCenter:!1,defaultNode:{},defaultEdge:{},nodeStateStyles:{},edgeStateStyles:{},states:{},animate:!1,animateCfg:{onFrame:void 0,duration:500,easing:"easeLinear"},callback:void 0,groupType:"circle",groupBBoxs:{},groupNodes:{},groups:[],groupStyle:{}}},e.prototype.set=function(t,e){return(0,l.default)(t)?this.cfg=Object.assign({},this.cfg,t):this.cfg[t]=e,this},e.prototype.get=function(t){return this.cfg[t]},e.prototype.clearItemStates=function(t,e){(0,h.default)(t)&&(t=this.findById(t));var n=this.get("itemController");n.clearItemStates(t,e),e||(e=t.get("states"));var r=this.get("stateController");r.updateStates(t,e,!1)},e.prototype.node=function(t){"function"===typeof t&&this.set("nodeMapper",t)},e.prototype.edge=function(t){"function"===typeof t&&this.set("edgeMapper",t)},e.prototype.combo=function(t){"function"===typeof t&&this.set("comboMapper",t)},e.prototype.findById=function(t){return this.get("itemMap")[t]},e.prototype.find=function(t,e){var n,r=this.get(t+"s");return(0,f.default)(r,(function(t,r){if(e(t,r))return n=t,n})),n},e.prototype.findAll=function(t,e){var n=[];return(0,f.default)(this.get(t+"s"),(function(t,r){e(t,r)&&n.push(t)})),n},e.prototype.findAllByState=function(t,e){return this.findAll(t,(function(t){return t.hasState(e)}))},e.prototype.translate=function(t,e){var n=this.get("group"),r=(0,u.default)(n.getMatrix());r||(r=s.mat3.create()),s.mat3.translate(r,r,[t,e]),n.setMatrix(r),this.emit("viewportchange",{action:"translate",matrix:n.getMatrix()}),this.autoPaint()},e.prototype.moveTo=function(t,e){var n=this.get("group");(0,g.move)(n,{x:t,y:e}),this.emit("viewportchange",{action:"move",matrix:n.getMatrix()})},e.prototype.fitView=function(t){t&&this.set("fitViewPadding",t);var e=this.get("viewController");e.fitView(),this.autoPaint()},e.prototype.fitCenter=function(){var t=this.get("viewController");t.fitCenter(),this.autoPaint()},e.prototype.addBehaviors=function(t,e){var n=this.get("modeController");return n.manipulateBehaviors(t,e,!0),this},e.prototype.removeBehaviors=function(t,e){var n=this.get("modeController");return n.manipulateBehaviors(t,e,!1),this},e.prototype.zoom=function(t,e){var n=this.get("group"),r=(0,u.default)(n.getMatrix()),i=this.get("minZoom"),o=this.get("maxZoom");r||(r=s.mat3.create()),e?(s.mat3.translate(r,r,[-e.x,-e.y]),s.mat3.scale(r,r,[t,t]),s.mat3.translate(r,r,[e.x,e.y])):s.mat3.scale(r,r,[t,t]),i&&r[0]o||(n.setMatrix(r),this.emit("viewportchange",{action:"zoom",matrix:r}),this.autoPaint())},e.prototype.zoomTo=function(t,e){var n=t/this.getZoom();this.zoom(n,e)},e.prototype.focusItem=function(t){var e=this.get("viewController");e.focus(t),this.autoPaint()},e.prototype.autoPaint=function(){this.get("autoPaint")&&this.paint()},e.prototype.paint=function(){this.emit("beforepaint"),this.get("canvas").draw(),this.emit("afterpaint")},e.prototype.getPointByClient=function(t,e){var n=this.get("viewController");return n.getPointByClient(t,e)},e.prototype.getClientByPoint=function(t,e){var n=this.get("viewController");return n.getClientByPoint(t,e)},e.prototype.getPointByCanvas=function(t,e){var n=this.get("viewController");return n.getPointByCanvas(t,e)},e.prototype.getCanvasByPoint=function(t,e){var n=this.get("viewController");return n.getCanvasByPoint(t,e)},e.prototype.showItem=function(t){var e=this.get("itemController");e.changeItemVisibility(t,!0)},e.prototype.hideItem=function(t){var e=this.get("itemController");e.changeItemVisibility(t,!1)},e.prototype.refreshItem=function(t){var e=this.get("itemController");e.refreshItem(t)},e.prototype.setAutoPaint=function(t){var e=this;e.set("autoPaint",t);var n=e.get("canvas");n.set("autoDraw",t)},e.prototype.remove=function(t){this.removeItem(t)},e.prototype.removeItem=function(t){var e=t;if((0,h.default)(t)&&(e=this.findById(t)),!e&&(0,h.default)(t)){console.warn("The item to be removed does not exist!");var n=this.get("customGroupControll");n.remove(t)}else if(e){var r="";e.getType&&(r=e.getType());var i=this.get("itemController");if(i.removeItem(t),"combo"===r){var o=(0,x.reconstructTree)(this.get("comboTrees"));this.set("comboTrees",o)}}},e.prototype.addItem=function(t,e){var n=this.get("itemController");if("group"===t){var i=e.groupId,o=e.nodes,a=e.type,s=e.zIndex,c=e.title,f=c;return(0,h.default)(c)&&(f={text:c}),this.get("customGroupControll").create(i,o,a,s,!0,f)}if(!e.id||!this.findById(e.id)){var l,d=this.get("comboTrees");if(d||(d=[]),"combo"===t){var p=this.get("itemMap"),g=!1;if(d.forEach((function(i){g||(0,x.traverseTreeUp)(i,(function(i){if(e.parentId===i.id){g=!0;var o=(0,r.__assign)({id:e.id,depth:i.depth+2},e);i.children?i.children.push(o):i.children=[o],e.depth=o.depth,l=n.addItem(t,e)}var a=p[i.id];return g&&a&&a.getType&&"combo"===a.getType()&&n.updateCombo(a,i.children),!0}))})),!g){var v=(0,r.__assign)({id:e.id,depth:0},e);e.depth=v.depth,d.push(v),l=n.addItem(t,e)}this.set("comboTrees",d)}else if("node"===t&&(0,h.default)(e.comboId)&&d){var y=this.findById(e.comboId);if(y&&y.getType&&"combo"!==y.getType())return void console.warn("'"+e.comboId+"' is a not id of a combo in the graph, the node will be added without combo.");l=n.addItem(t,e);var m=this.get("itemMap"),b=!1,w=!1;d&&d.forEach((function(t){w||b||(0,x.traverseTreeUp)(t,(function(t){if(t.id===e.id)return w=!0,!1;if(e.comboId===t.id&&!w){b=!0;var r=(0,u.default)(e);r.itemType="node",t.children?t.children.push(r):t.children=[r],e.depth=t.depth+1}return b&&m[t.id].getType&&"combo"===m[t.id].getType()&&n.updateCombo(m[t.id],t.children),!0}))}))}else l=n.addItem(t,e);if("node"===t&&e.comboId||"combo"===t&&e.parentId){y=this.findById(e.comboId||e.parentId);y&&y.addChild(l)}var M=this.get("combos");return M&&M.length>0&&this.sortCombos(),this.autoPaint(),l}console.warn("This item exists already. Be sure the id is unique.")},e.prototype.add=function(t,e){return this.addItem(t,e)},e.prototype.updateItem=function(t,e){var n,i=this,o=this.get("itemController");n=(0,h.default)(t)?this.findById(t):t;var a="";n.getType&&(a=n.getType());var s=(0,r.__spreadArrays)(n.getStates());"combo"===a&&(0,f.default)(s,(function(t){return i.setItemState(n,t,!1)})),o.updateItem(n,e),"combo"===a&&(0,f.default)(s,(function(t){return i.setItemState(n,t,!0)}))},e.prototype.update=function(t,e){this.updateItem(t,e)},e.prototype.setItemState=function(t,e,n){(0,h.default)(t)&&(t=this.findById(t));var r=this.get("itemController");r.setItemState(t,e,n);var i=this.get("stateController");(0,h.default)(n)?i.updateState(t,e+":"+n,!0):i.updateState(t,e,n)},e.prototype.data=function(t){this.set("data",t)},e.prototype.render=function(){var t=this,e=this.get("data");if(!e)throw new Error("data must be defined first");var n=e.nodes,r=void 0===n?[]:n,i=e.edges,o=void 0===i?[]:i,a=e.combos,s=void 0===a?[]:a;if(this.clear(),this.emit("beforerender"),(0,f.default)(r,(function(e){t.add("node",e)})),s&&0!==s.length){var u=(0,x.plainCombosToTrees)(s,r);this.set("comboTrees",u),t.addCombos(s)}(0,f.default)(o,(function(e){t.add("edge",e)}));var c=t.get("layoutController");function l(){t.get("fitView")?t.fitView():t.get("fitCenter")&&t.fitCenter(),t.autoPaint(),t.emit("afterrender")}if(c.layout(l)||l(),!this.get("groupByTypes"))if(s&&0!==s.length)this.sortCombos();else if(e.nodes&&e.edges&&e.nodes.length0){var g=t.get("groupType");this.renderCustomGroup(e,g)}}},e.prototype.read=function(t){this.data(t),this.render()},e.prototype.diffItems=function(t,e,n){var r,i=this,o=this.get("itemMap");(0,f.default)(n,(function(n){if(r=o[n.id],r){if(i.get("animate")&&t===_){var a=r.getContainer().getMatrix();a||(a=s.mat3.create()),r.set("originAttrs",{x:a[6],y:a[7]})}i.updateItem(r,n)}else r=i.addItem(t,n);e[t+"s"].push(r)}))},e.prototype.changeData=function(t){var e=this;if(!t)return this;this.getNodes().map((function(t){return e.clearItemStates(t)})),this.getEdges().map((function(t){return e.clearItemStates(t)}));var n=this.get("canvas"),r=n.get("localRefresh");n.set("localRefresh",!1),e.get("data")||(e.data(t),e.render());var i=this.get("itemMap"),o={nodes:[],edges:[]},a=t.combos;if(a){var s=(0,x.plainCombosToTrees)(a,t.nodes);this.set("comboTrees",s)}this.diffItems("node",o,t.nodes),this.diffItems("edge",o,t.edges),(0,f.default)(i,(function(t,n){i[n].getModel().depth=0,t.getType&&"combo"===t.getType()?(delete i[n],t.destroy()):o.nodes.indexOf(t)<0&&o.edges.indexOf(t)<0&&(delete i[n],e.remove(t))}));for(var u=this.getCombos(),c=u.length,l=c-1;l>=0;l--)u[l].destroyed&&u.splice(l,1);a&&(e.addCombos(a),this.get("groupByTypes")||this.sortCombos()),this.set({nodes:o.nodes,edges:o.edges});var h=this.get("layoutController");return h.changeData(),e.get("animate")&&!h.getLayoutType()?e.positionsAnimate():e.autoPaint(),setTimeout((function(){n.set("localRefresh",r)}),16),this},e.prototype.addCombos=function(t){var e=this,n=e.get("comboTrees"),r=this.get("itemController");r.addCombos(n,t)},e.prototype.createCombo=function(t,e){var n=this,i="";if((0,h.default)(t))i=t,this.addItem("combo",{id:t});else{if(i=t.id,!i)return void console.warn("Create combo failed. Please assign a unique string id for the adding combo.");this.addItem("combo",t)}var o=this.findById(i),a=e.map((function(t){var e=n.findById(t);o.addChild(e);var a=e.getModel(),s="";return e.getType&&(s=e.getType()),"combo"===s?a.parentId=i:"node"===s&&(a.comboId=i),(0,r.__assign)({depth:1,itemType:s},a)})),s=this.get("comboTrees");s&&s.forEach((function(t){t.id===i&&(t.itemType="combo",t.children=a)})),this.updateCombos()},e.prototype.uncombo=function(t){var e=this,n=this,r=t;if((0,h.default)(t)&&(r=this.findById(t)),!r||r.getType&&"combo"!==r.getType())console.warn("The item is not a combo!");else{var i=r.getModel().parentId,o=n.get("comboTrees");o||(o=[]);var a,s=this.get("itemMap"),u=r.get("id"),c=[],f=this.get("combos"),l=this.findById(i);if(o.forEach((function(n){a||(0,x.traverseTreeUp)(n,(function(n){if(n.id===u){a=n;var o=r.getEdges();o.forEach((function(t){e.removeItem(t)}));var h=f.indexOf(t);f.splice(h,1),delete s[u],r.destroy()}if(i&&a&&n.id===i){l.removeCombo(r),c=n.children;h=c.indexOf(a);return-1!==h&&c.splice(h,1),a.children&&a.children.forEach((function(t){var n=e.findById(t.id),r=n.getModel();n.getType&&"combo"===n.getType()?(t.parentId=i,delete t.comboId,r.parentId=i,delete r.comboId):n.getType&&"node"===n.getType()&&(t.comboId=i,r.comboId=i),l.addChild(n),c.push(t)})),!1}return!0}))})),!i&&a){var d=o.indexOf(a);o.splice(d,1),a.children&&a.children.forEach((function(t){t.parentId=void 0;var n=e.findById(t.id).getModel();n.parentId=void 0,"node"!==t.itemType&&o.push(t)}))}}},e.prototype.updateCombos=function(){var t=this,e=this,n=this.get("comboTrees"),i=e.get("itemController"),o=e.get("itemMap");n&&n.forEach((function(e){(0,x.traverseTreeUp)(e,(function(e){if(!e)return!0;var n=o[e.id];if(n&&n.getType&&"combo"===n.getType()){var a=(0,r.__spreadArrays)(n.getStates());(0,f.default)(a,(function(e){return t.setItemState(n,e,!1)})),i.updateCombo(n,e.children),(0,f.default)(a,(function(e){return t.setItemState(n,e,!0)}))}return!0}))})),e.sortCombos()},e.prototype.updateCombo=function(t){var e,n=this,i=this,o=t;if((0,h.default)(t)&&(o=this.findById(t)),!o||o.getType&&"combo"!==o.getType())console.warn("The item to be updated is not a combo!");else{e=o.get("id");var a=this.get("comboTrees"),s=i.get("itemController"),u=i.get("itemMap");a&&a.forEach((function(t){(0,x.traverseTreeUp)(t,(function(t){if(!t)return!0;var i=u[t.id];if(e===t.id&&i&&i.getType&&"combo"===i.getType()){var o=(0,r.__spreadArrays)(i.getStates());(0,f.default)(o,(function(t){return n.setItemState(i,t,!1)})),s.updateCombo(i,t.children),(0,f.default)(o,(function(t){return n.setItemState(i,t,!0)})),e&&(e=t.parentId)}return!0}))}))}},e.prototype.updateComboTree=function(t,e){var n,r=this;n=(0,h.default)(t)?r.findById(t):t;var i=n.getModel(),o=i.comboId||i.parentId;if(i.parentId||i.comboId){var a=this.findById(i.parentId||i.comboId);a&&a.removeChild(n)}var s="";if(n.getType&&(s=n.getType()),"combo"===s?i.parentId=e:"node"===s&&(i.comboId=e),e){var u=this.findById(e);u&&u.addChild(n)}if(o){u=this.findById(o);u&&u.removeChild(n)}var c=(0,x.reconstructTree)(this.get("comboTrees"),i.id,e);this.set("comboTrees",c),this.updateCombos()},e.prototype.renderCustomGroup=function(t,e){var n=this,r=t.groups,i=t.nodes,o=void 0===i?[]:i,a=10;if(r){this.set({groups:r});var s=(0,p.getAllNodeInGroups)(t);Object.keys(s).forEach((function(t){var r=s[t];n.get("customGroupControll").create(t,r,e,a),a--}));var u=this.get("customGroup");u.sort()}else{var c=o.filter((function(t){return t.groupId})),f=[],l=(0,v.groupBy)(c,"groupId");Object.keys(l).forEach((function(t){var r=l[t].map((function(t){return t.id}));n.get("customGroupControll").create(t,r,e,a),a--,f.find((function(e){return e.id===t}))||f.push({id:t})})),this.set({groups:f})}},e.prototype.save=function(){var t=[],e=[],n=[];return(0,f.default)(this.get("nodes"),(function(e){t.push(e.getModel())})),(0,f.default)(this.get("edges"),(function(t){e.push(t.getModel())})),(0,f.default)(this.get("combos"),(function(t){n.push(t.getModel())})),{nodes:t,edges:e,combos:n,groups:this.get("groups")}},e.prototype.changeSize=function(t,e){var n=this.get("viewController");return n.changeSize(t,e),this},e.prototype.refresh=function(){var t=this;if(t.emit("beforegraphrefresh"),t.get("animate"))t.positionsAnimate();else{var e=t.get("nodes"),n=t.get("edges"),r=t.get("edges");(0,f.default)(e,(function(t){t.refresh()})),(0,f.default)(n,(function(t){t.refresh()})),(0,f.default)(r,(function(t){t.refresh()}))}t.emit("aftergraphrefresh"),t.autoPaint()},e.prototype.getNodes=function(){return this.get("nodes")},e.prototype.getEdges=function(){return this.get("edges")},e.prototype.getCombos=function(){return this.get("combos")},e.prototype.getComboChildren=function(t){if((0,h.default)(t)&&(t=this.findById(t)),t&&(!t.getType||"combo"===t.getType()))return t.getChildren();console.warn("The combo does not exist!")},e.prototype.positionsAnimate=function(){var t=this;t.emit("beforeanimate");var e=t.get("animateCfg"),n=e.onFrame,r=t.getNodes(),i=r.map((function(t){var e=t.getModel();return{id:e.id,x:e.x,y:e.y}}));t.isAnimating()&&t.stopAnimate();var o=t.get("canvas");o.animate((function(e){(0,f.default)(i,(function(r){var i=t.findById(r.id);if(i&&!i.destroyed){var o=i.get("originAttrs"),a=i.get("model");if(!o){var u=i.getContainer().getMatrix();u||(u=s.mat3.create()),o={x:u[6],y:u[7]},i.set("originAttrs",o)}if(n){var c=n(i,e,r,o);i.set("model",Object.assign(a,c))}else a.x=o.x+(r.x-o.x)*e,a.y=o.y+(r.y-o.y)*e}})),t.refreshPositions()}),{duration:e.duration,easing:e.easing,callback:function(){(0,f.default)(r,(function(t){t.set("originAttrs",null)})),e.callback&&e.callback(),t.emit("afteranimate"),t.animating=!1}})},e.prototype.refreshPositions=function(){var t=this;t.emit("beforegraphrefreshposition");var e,n=t.get("nodes"),r=t.get("edges"),i=t.get("vedges"),o=t.get("combos"),a={};(0,f.default)(n,(function(t){e=t.getModel();var n=t.get("originAttrs");n&&e.x===n.x&&e.y===n.y||(t.updatePosition({x:e.x,y:e.y}),a[e.id]=!0,e.comboId&&(a[e.comboId]=!0))})),o&&0!==o.length&&t.updateCombos(),(0,f.default)(r,(function(t){var e=t.getSource().getModel(),n=t.getTarget().getModel();(a[e.id]||a[n.id]||t.getModel().isComboEdge)&&t.refresh()})),(0,f.default)(i,(function(t){t.refresh()})),t.emit("aftergraphrefreshposition"),t.autoPaint()},e.prototype.stopAnimate=function(){this.get("canvas").stopAnimate()},e.prototype.isAnimating=function(){return this.animating},e.prototype.getZoom=function(){var t=this.get("group").getMatrix();return t?t[0]:1},e.prototype.getCurrentMode=function(){var t=this.get("modeController");return t.getMode()},e.prototype.setMode=function(t){var e=this.get("modeController");return e.setMode(t),this},e.prototype.clear=function(){var t=this.get("canvas");return t.clear(),this.initGroups(),this.set({itemMap:{},nodes:[],edges:[],groups:[]}),this},e.prototype.toDataURL=function(t,e){var n=this.get("canvas"),r=n.getRenderer(),i=n.get("el");t||(t="image/png");var o="";if("svg"===r){var a=i.cloneNode(!0),s=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),u=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",s);u.replaceChild(a,u.documentElement);var c=(new XMLSerializer).serializeToString(u);o="data:image/svg+xml;charset=utf8,"+encodeURIComponent(c)}else{var f=void 0,l=i.getContext("2d"),h=this.get("width"),d=this.get("height"),p=void 0;if(e){var g=window.devicePixelRatio;f=l.getImageData(0,0,h*g,d*g),p=l.globalCompositeOperation,l.globalCompositeOperation="destination-over",l.fillStyle=e,l.fillRect(0,0,h,d)}o=i.toDataURL(t),e&&(l.clearRect(0,0,h,d),l.putImageData(f,0,0),l.globalCompositeOperation=p)}return o},e.prototype.downloadFullImage=function(t,e){var n=this,r=this.get("group").getCanvasBBox(),i=r.height,c=r.width,f=this.get("renderer"),l=(0,b.default)(''),h=e?e.backgroundColor:void 0,p=e?e.padding:void 0;p?(0,d.default)(p)&&(p=[p,p,p,p]):p=[0,0,0,0];var g=i+p[0]+p[2],v=c+p[1]+p[3],y={container:l,height:g,width:v},m="svg"===f?new a.default(y):new o.default(y),x=this.get("group"),w=x.clone(),M=(0,u.default)(w.getMatrix());M||(M=s.mat3.create());var _=(r.maxX+r.minX)/2,S=(r.maxY+r.minY)/2;s.mat3.translate(M,M,[-_,-S]),s.mat3.translate(M,M,[c/2+p[3],i/2+p[0]]),w.resetMatrix(),w.setMatrix(M),m.add(w);var P=m.get("el");setTimeout((function(){var e="image/png",r="";if("svg"===f){var i=P.cloneNode(!0),o=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),a=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",o);a.replaceChild(i,a.documentElement);var s=(new XMLSerializer).serializeToString(a);r="data:image/svg+xml;charset=utf8,"+encodeURIComponent(s)}else{var u=void 0,c=P.getContext("2d"),l=void 0;if(h){var d=window.devicePixelRatio;u=c.getImageData(0,0,v*d,g*d),l=c.globalCompositeOperation,c.globalCompositeOperation="destination-over",c.fillStyle=h,c.fillRect(0,0,v,g)}r=P.toDataURL(e),h&&(c.clearRect(0,0,v,g),c.putImageData(u,0,0),c.globalCompositeOperation=l)}var p=document.createElement("a"),y=(t||"graph")+("svg"===f?".svg":".png");n.dataURLToImage(r,f,p,y);var m=document.createEvent("MouseEvents");m.initEvent("click",!1,!1),p.dispatchEvent(m)}),16)},e.prototype.downloadImage=function(t,e){var n=this,r=this;r.isAnimating()&&r.stopAnimate();var i=r.get("canvas"),o=i.getRenderer(),a=(t||"graph")+("svg"===o?".svg":".png"),s=document.createElement("a");setTimeout((function(){var t=r.toDataURL("image/png",e);n.dataURLToImage(t,o,s,a);var i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),s.dispatchEvent(i)}),16)},e.prototype.dataURLToImage=function(t,e,n,r){if("undefined"!==typeof window)if(window.Blob&&window.URL&&"svg"!==e){var i=t.split(","),o="";if(i&&i.length>0){var a=i[0].match(/:(.*?);/);a&&a.length>=2&&(o=a[1])}var s=atob(i[1]),u=s.length,c=new Uint8Array(u);while(u--)c[u]=s.charCodeAt(u);var f=new Blob([c],{type:o});window.navigator.msSaveBlob?window.navigator.msSaveBlob(f,r):n.addEventListener("click",(function(){n.download=r,n.href=window.URL.createObjectURL(f)}))}else n.addEventListener("click",(function(){n.download=r,n.href=t}))},e.prototype.updateLayout=function(t){var e,n=this.get("layoutController");(0,h.default)(t)?(e=t,t={type:e}):e=t.type;var r=this.get("layout"),i=r?r.type:void 0;if(e&&i!==e)this.set("layout",t),n.changeLayout(e);else{var o={};Object.assign(o,r,t),o.type=i||"random",this.set("layout",o),n.updateLayoutCfg(o)}},e.prototype.layout=function(){var t=this.get("layoutController"),e=this.get("layout");e&&(e.workerEnabled?t.layout():t.layoutMethod?t.relayout(!0):t.layout())},e.prototype.collapseCombo=function(t){var e=this;if((0,h.default)(t)&&(t=this.findById(t)),t){var n=t.getModel(),r=this.getEdges().concat(this.get("vedges")),i=[],o=[],a=this.get("comboTrees"),s=!1,u={};a&&a.forEach((function(t){u[t.id]=t})),a&&a.forEach((function(t){s||(0,x.traverseTree)(t,(function(t){if(s&&u[t.id])return!1;if(n.parentId===t.id?(u={},t.children.forEach((function(t){u[t.id]=t}))):n.id===t.id&&(s=!0),s){var r=e.findById(t.id);r&&r.getType&&"combo"===r.getType()&&(i=i.concat(r.getNodes()),o=o.concat(r.getCombos()))}return!0}))}));var c={},f=[];r.forEach((function(t){var r=t.getSource(),a=t.getTarget();if((i.includes(r)||o.includes(r))&&!i.includes(a)&&!o.includes(a)||r.getModel().id===n.id){var s=t.getModel();if(s.isVEdge)return void e.removeItem(t);var u=a.getModel();while(!a.isVisible()){if(a=e.findById(u.parentId||u.comboId),!a||!u.parentId&&!u.comboId)return;u=a.getModel()}var l=u.id;if(c[n.id+"-"+l])return void(c[n.id+"-"+l]+=s.size||1);var h=e.addItem("vedge",{source:n.id,target:l,isVEdge:!0});c[n.id+"-"+l]=s.size||1,f.push(h)}else if(!i.includes(r)&&!o.includes(r)&&(i.includes(a)||o.includes(a))||a.getModel().id===n.id){s=t.getModel();if(s.isVEdge)return void e.removeItem(t);var d=r.getModel();while(!r.isVisible()){if(r=e.findById(d.parentId||d.comboId),!r||!d.parentId&&!d.comboId)return;d=r.getModel()}var p=d.id;if(c[p+"-"+n.id])return void(c[p+"-"+n.id]+=s.size||1);h=e.addItem("vedge",{target:n.id,source:p,isVEdge:!0});c[p+"-"+n.id]=s.size||1,f.push(h)}})),f.forEach((function(t){var n=t.getModel();e.updateItem(t,{size:c[n.source+"-"+n.target]})}));var l=this.get("itemController");l.collapseCombo(t),n.collapsed=!0}else console.warn("The combo to be collapsed does not exist!")},e.prototype.expandCombo=function(t){var e=this;if((0,h.default)(t)&&(t=this.findById(t)),!t||t.getType&&"combo"!==t.getType())console.warn("The combo to be collapsed does not exist!");else{var n=t.getModel(),r=this.get("itemController");r.expandCombo(t),n.collapsed=!1;var i=this.getEdges().concat(this.get("vedges")),o=[],a=[],s=this.get("comboTrees"),u=!1,c={};s&&s.forEach((function(t){c[t.id]=t})),s&&s.forEach((function(t){u||(0,x.traverseTree)(t,(function(t){if(u&&c[t.id])return!1;if(n.parentId===t.id?(c={},t.children.forEach((function(t){c[t.id]=t}))):n.id===t.id&&(u=!0),u){var r=e.findById(t.id);r&&r.getType&&"combo"===r.getType()&&(o=o.concat(r.getNodes()),a=a.concat(r.getCombos()))}return!0}))}));var f={},l={};i.forEach((function(t){var r=t.getSource(),i=t.getTarget(),s=r.get("id"),u=i.get("id");if((o.includes(r)||a.includes(r))&&!o.includes(i)&&!a.includes(i)||s===n.id){if(t.getModel().isVEdge)return void e.removeItem(t);var c=i.getModel();while(!i.isVisible()){if(i=e.findById(c.comboId||c.parentId),!i||!c.parentId&&!c.comboId)return;c=i.getModel()}u=c.id;var h=r.getModel();while(!r.isVisible()){if(r=e.findById(h.comboId||h.parentId),!r||!h.parentId&&!h.comboId)return;if(h.comboId===n.id||h.parentId===n.id)break;h=r.getModel()}if(s=h.id,u){var d=s+"-"+u;if(f[d])return f[d]+=t.getModel().size||1,void e.updateItem(l[d],{size:f[d]});var p=e.addItem("vedge",{source:s,target:u,isVEdge:!0});f[d]=t.getModel().size||1,l[d]=p}}else if(!o.includes(r)&&!a.includes(r)&&(o.includes(i)||a.includes(i))||u===n.id){if(t.getModel().isVEdge)return void e.removeItem(t);h=r.getModel();while(!r.isVisible()){if(r=e.findById(h.comboId||h.parentId),!r||!h.parentId&&!h.comboId)return;h=r.getModel()}s=h.id;c=i.getModel();while(!i.isVisible()){if(i=e.findById(c.comboId||c.parentId),!i||!c.parentId&&!c.comboId)return;if(c.comboId===n.id||c.parentId===n.id)break;c=i.getModel()}if(u=c.id,s){d=s+"-"+u;if(f[d])return f[d]+=t.getModel().size||1,void e.updateItem(l[d],{size:f[d]});p=e.addItem("vedge",{target:u,source:s,isVEdge:!0});f[d]=t.getModel().size||1,l[d]=p}}}))}},e.prototype.collapseExpandCombo=function(t){if((0,h.default)(t)&&(t=this.findById(t)),!t.getType||"combo"===t.getType()){var e=t.getModel(),n=this.findById(e.parentId);while(n){var r=n.getModel();if(r.collapsed)return console.warn("Fail to expand the combo since it's ancestor combo is collapsed."),void(n=void 0);n=this.findById(r.parentId)}var i=e.collapsed;i?this.expandCombo(t):this.collapseCombo(t)}},e.prototype.collapseGroup=function(t){var e=this.get("customGroupControll");e.collapseGroup(t)},e.prototype.expandGroup=function(t){var e=this.get("customGroupControll");e.expandGroup(t)},e.prototype.addPlugin=function(t){var e=this;t.destroyed||(e.get("plugins").push(t),t.initPlugin(e))},e.prototype.removePlugin=function(t){var e=this.get("plugins"),n=e.indexOf(t);n>=0&&(t.destroyPlugin(),e.splice(n,1))},e.prototype.sortCombos=function(){var t=this,e=[],n={},r=this.get("comboTrees");r&&r.forEach((function(t){(0,x.traverseTree)(t,(function(t){return e[t.depth]?e[t.depth].push(t.id):e[t.depth]=[t.id],n[t.id]=t.depth,!0}))}));var i=this.getEdges().concat(this.get("vedges"));i&&i.forEach((function(t){var r=t.getModel(),i=n[r.source]||0,o=n[r.target]||0,a=Math.max(i,o);e[a]?e[a].push(r.id):e[a]=[r.id]})),e.forEach((function(e){if(e&&e.length)for(var n=e.length-1;n>=0;n--){var r=t.findById(e[n]);r&&r.toFront()}}))},e.prototype.getNeighbors=function(t){var e=t;return(0,h.default)(t)&&(e=this.findById(t)),e.getNeighbors()},e.prototype.getSourceNeighbors=function(t){var e=t;return(0,h.default)(t)&&(e=this.findById(t)),e.getSourceNeighbors()},e.prototype.getTargetNeighbors=function(t){var e=t;return(0,h.default)(t)&&(e=this.findById(t)),e.getTargetNeighbors()},e.prototype.getNodeDegree=function(t,e){void 0===e&&(e=void 0);var n=t;(0,h.default)(t)&&(n=this.findById(t));var r=this.get("degrees");r||(r=(0,w.default)(this)),this.set("degees",r);var i,o=r[n.getID()];switch(e){case"in":i=o.inDegree;break;case"out":i=o.outDegree;break;case"all":i=o;break;default:i=o.degree;break}return i},e.prototype.destroy=function(){this.clear(),(0,f.default)(this.get("plugins"),(function(t){t.destroyPlugin()})),this.get("eventController").destroy(),this.get("itemController").destroy(),this.get("modeController").destroy(),this.get("viewController").destroy(),this.get("stateController").destroy(),this.get("layoutController").destroy(),this.get("customGroupControll").destroy(),this.get("canvas").destroy(),this.cfg=null,this.destroyed=!0},e}(i.default),k=P;e.default=k},7037:function(t,e,n){function r(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports["default"]=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports["default"]=t.exports,t.exports.__esModule=!0),r(e)}n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),t.exports=r,t.exports["default"]=t.exports,t.exports.__esModule=!0},7174:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("8937"),i=n("487c"),o=function(){function t(t){this.type="clip",this.cfg={};var e=i.createSVGElement("clipPath");this.el=e,this.id=r.uniqueId("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=o},"71f5":function(t,e,n){"use strict";function r(t){var e=t.attr(),n=e.x,r=e.y,i=e.rx,o=e.ry;return{x:n-i,y:r-o,width:2*i,height:2*o}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},"72af":function(t,e,n){var r=n("99cd"),i=r();t.exports=i},"72f0":function(t,e){function n(t){return function(){return t}}t.exports=n},"72fb":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=n("9ab4f");function o(t,e){var n;if(t)if(r.default(t)){for(var o=0,a=t.length;ou.lim&&(c=u,f=!0);var l=r.filter(e.edges(),(function(e){return f===w(t,t.node(e.v),c)&&f!==w(t,t.node(e.w),c)}));return r.minBy(l,(function(t){return o(e,t)}))}function m(t,e,n,r){var i=n.v,o=n.w;t.removeEdge(i,o),t.setEdge(r.v,r.w,{}),p(t),l(t,e),b(t,e)}function b(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}function x(t,e,n){return t.hasEdge(e,n)}function w(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=f,f.initLowLimValues=p,f.initCutValues=l,f.calcCutValue=d,f.leaveEdge=v,f.enterEdge=y,f.exchangeEdges=m},"750a":function(t,e,n){var r=n("c869"),i=n("bcdf"),o=n("ac41"),a=1/0,s=r&&1/o(new r([,-0]))[1]==a?function(t){return new r(t)}:i;t.exports=s},7530:function(t,e,n){var r=n("1a8c"),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},7680:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={" ":.3329986572265625,a:.5589996337890625,A:.6569992065429687,b:.58599853515625,B:.6769989013671875,c:.5469985961914062,C:.7279998779296875,d:.58599853515625,D:.705999755859375,e:.554998779296875,E:.63699951171875,f:.37299957275390627,F:.5769989013671875,g:.5909988403320312,G:.7479995727539063,h:.555999755859375,H:.7199996948242188,i:.255999755859375,I:.23699951171875,j:.26699981689453123,J:.5169998168945312,k:.5289993286132812,K:.6899993896484375,l:.23499908447265624,L:.5879989624023437,m:.854998779296875,M:.8819992065429687,n:.5589996337890625,N:.7189987182617188,o:.58599853515625,O:.7669998168945312,p:.58599853515625,P:.6419998168945312,q:.58599853515625,Q:.7669998168945312,r:.3649993896484375,R:.6759994506835938,s:.504998779296875,S:.6319992065429687,t:.354998779296875,T:.6189987182617187,u:.5599990844726562,U:.7139999389648437,v:.48199920654296874,V:.6389999389648438,w:.754998779296875,W:.929998779296875,x:.5089996337890625,X:.63699951171875,y:.4959991455078125,Y:.66199951171875,z:.48699951171875,Z:.6239990234375,0:.6,1:.40099945068359377,2:.6,3:.6,4:.6,5:.6,6:.6,7:.5469985961914062,8:.6,9:.6,"[":.3329986572265625,"]":.3329986572265625,",":.26399993896484375,".":.26399993896484375,";":.26399993896484375,":":.26399993896484375,"{":.3329986572265625,"}":.3329986572265625,"\\":.5,"|":.19499969482421875,"=":.604998779296875,"+":.604998779296875,"-":.604998779296875,_:.5,"`":.3329986572265625," ~":.8329986572265625,"!":.3329986572265625,"@":.8579986572265625,"#":.6,$:.6,"%":.9699996948242188,"^":.517999267578125,"&":.7259994506835937,"*":.505999755859375,"(":.3329986572265625,")":.3329986572265625,"<":.604998779296875,">":.604998779296875,"/":.5,"?":.53699951171875};e.default=r},"76dd":function(t,e,n){var r=n("ce86");function i(t){return null==t?"":r(t)}t.exports=i},"76e9":function(t,e,n){var r=n("ffd6");function i(t,e,n){var i=-1,o=t.length;while(++i0){var n=t.graph.findById(e[0]);n||(n=t.getNodeInSubProcess(e[0])),t.selectedModel=Object(a["a"])({},n.getModel())}else t.selectedModel=t.processModel}));var e=this.$refs["canvas"],n=this.graph,r=this.height-1;this.resizeFunc=function(){n.changeSize(e.offsetWidth,r)},window.addEventListener("resize",this.resizeFunc)},onItemCfgChange:function(t,e){var n=this.graph.get("selectedItems");if(n&&n.length>0){var r=this.graph.findById(n[0]);r||(r=this.getNodeInSubProcess(n[0])),this.graph.executeCommand?this.graph.executeCommand("update",{itemId:n[0],updateModel:Object(o["a"])({},t,e)}):this.graph.updateItem(r,Object(o["a"])({},t,e)),this.selectedModel=Object(a["a"])({},r.getModel())}else{var i=Object(a["a"])(Object(a["a"])({},this.processModel),{},Object(o["a"])({},t,e));this.selectedModel=i,this.processModel=i}},getNodeInSubProcess:function(t){var e=this.graph.find("node",(function(e){if(e.get("model")){var n=e.get("model").clazz;if("subProcess"===n){var r=e.getContainer(),i=r.subGroup,o=i.findById(t);return i.contain(o)}return!1}return!1}));if(e){var n=e.getContainer();return n.getItem(e,t)}return null}},destroyed:function(){window.removeEventListener("resize",this.resizeFunc),this.graph.getNodes().forEach((function(t){t.getKeyShape().stopAnimate()}))},mounted:function(){var t=this,e=[];if(!this.isView){this.cmdPlugin=new f["default"];var n=new l["default"]({container:this.$refs["toolbar"].$el}),r=new h["default"]({container:this.$refs["addItemPanel"].$el}),i=new d["default"]({container:this.$refs["canvas"]});e=[this.cmdPlugin,n,r,i]}var o=this.$refs["canvas"].offsetWidth;this.graph=new u.a.Graph({plugins:e,container:this.$refs["canvas"],height:this.height,width:o,modes:{default:["drag-canvas","clickSelected"],view:[],edit:["drag-canvas","hoverNodeActived","hoverAnchorActived","dragNode","dragEdge","dragPanelItemAddNode","clickSelected","deleteItem","itemAlign","dragPoint","brush-select"]},defaultEdge:{shape:"flow-polyline-round"}}),this.graph.saveXML=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Object(m["exportXML"])(t.graph.save(),t.processModel,e)},this.graph.saveImg=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Object(m["exportImg"])(t.$refs["canvas"],t.processModel.name,e)},this.isView?this.graph.setMode("view"):this.graph.setMode(this.mode),this.graph.data(this.initShape(this.data)),this.graph.render(),this.isView&&this.data&&this.data.nodes&&this.graph.fitView(5),this.initEvents()},created:function(){this.processModel=this.propProcessModel,this.selectedModel=this.processModel}},M=w,_=(n("d008"),n("2877")),S=Object(_["a"])(M,r,i,!1,null,"ab9dcc2e",null);e["default"]=S.exports},"7c64":function(t,e,n){var r=n("e24b"),i=n("5e2e"),o=n("79bc");function a(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}t.exports=a},"7c8a":function(t,e,n){"use strict";var r,i,o,a;function s(){r=document.createElement("table"),i=document.createElement("tr"),o=/^\s*<(\w+|!)[^>]*>/,a={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:i,th:i,"*":document.createElement("div")}}function u(t){r||s();var e=o.test(t)&&RegExp.$1;e&&e in a||(e="*");var n=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var i=n.childNodes[0];return n.removeChild(i),i}function c(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return c}))},"7d16":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("b455"),i=n("c3e2"),o=n("493b");function a(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function s(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function u(t,e,n,i){var o,a,s,u=-3*t+9*e-9*n+3*i,c=6*t-12*e+6*n,f=3*e-3*t,l=[];if(r.isNumberEqual(u,0))r.isNumberEqual(c,0)||(o=-f/c,o>=0&&o<=1&&l.push(o));else{var h=c*c-4*u*f;r.isNumberEqual(h,0)?l.push(-c/(2*u)):h>0&&(s=Math.sqrt(h),o=(-c+s)/(2*u),a=(-c-s)/(2*u),o>=0&&o<=1&&l.push(o),a>=0&&a<=1&&l.push(a))}return l}function c(t,e,n,r,o,s,u,c,f){var l=a(t,n,o,u,f),h=a(e,r,s,c,f),d=i.default.pointAt(t,e,n,r,f),p=i.default.pointAt(n,r,o,s,f),g=i.default.pointAt(o,s,u,c,f),v=i.default.pointAt(d.x,d.y,p.x,p.y,f),y=i.default.pointAt(p.x,p.y,g.x,g.y,f);return[[t,e,d.x,d.y,v.x,v.y,l,h],[l,h,y.x,y.y,g.x,g.y,u,c]]}function f(t,e,n,r,i,a,s,u,l){if(0===l)return o.snapLength([t,n,i,s],[e,r,a,u]);var h=c(t,e,n,r,i,a,s,u,.5),d=h[0],p=h[1];return d.push(l-1),p.push(l-1),f.apply(null,d)+f.apply(null,p)}e.default={extrema:u,box:function(t,e,n,i,o,s,c,f){for(var l=[t,c],h=[e,f],d=u(t,n,o,c),p=u(e,i,s,f),g=0;gu[1]?u[0]:u[1],l=f/2;a=function(t){return l+s(t)}}else if((0,o.isNumber)(u)){var h=u/2;a=function(t){return h+s(t)}}else a=function(){return 10};else a=function(t){if(t.size){if((0,o.isArray)(t.size)){var e=t.size[0]>t.size[1]?t.size[0]:t.size[1];return e/2+s(t)}return t.size/2+s(t)}return 10+s(t)};this.nodeSize=a;var d,p=this.linkDistance;p&&(p=50),(0,o.isNumber)(p)&&(d=function(t){return p}),this.linkDistance=d;var g,v=this.linkStrength;v||(v=1),(0,o.isNumber)(v)&&(g=function(t){return v}),this.linkStrength=g;var y,m=this.nodeStrength;m||(m=30),(0,o.isNumber)(m)&&(y=function(t){return m}),this.nodeStrength=y},e.prototype.getClusterMap=function(){var t=this,e=t.nodes,n={};for(var r in e.forEach((function(t){if(void 0===n[t.cluster]){var e={name:t.cluster,cx:0,cy:0,count:0};n[t.cluster]=e}var r=n[t.cluster];(0,o.isNumber)(t.x)&&(r.cx+=t.x),(0,o.isNumber)(t.y)&&(r.cy+=t.y),r.count++})),n)n[r].cx/=n[r].count,n[r].cy/=n[r].count;return n},e.prototype.applyClusterForce=function(t,e){var n=this,r=n.gravity,i=n.nodes,a=n.clusterGravity||r,s=this.alpha;for(var u in i.forEach((function(n,r){if((0,o.isNumber)(n.x)&&(0,o.isNumber)(n.y)){var i=t[n.cluster],u=n.x-i.cx,c=n.y-i.cy,f=Math.sqrt(u*u+c*c);e[r].x-=u*a*s/f,e[r].y-=c*a*s/f}})),t)t[u].cx=0,t[u].cy=0,t[u].count=0;for(var u in i.forEach((function(e){var n=t[e.cluster];(0,o.isNumber)(e.x)&&(n.cx+=e.x),(0,o.isNumber)(e.y)&&(n.cy+=e.y),n.count++})),t)t[u].cx/=t[u].count,t[u].cy/=t[u].count},e.prototype.applyCalculate=function(t,e,n){var r=this,i={};t.forEach((function(e,r){n[r]={x:0,y:0},t.forEach((function(t,n){if(!(rr)&&(e[l].x+=g*i(t)*a/p,e[l].y+=v*i(t)*a/p,u&&l1?arguments[1]:void 0)}}),o(a)},"7db1":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("842b"),i=Number.isInteger?Number.isInteger:function(t){return r.default(t)&&t%1===0};e.default=i},"7e64":function(t,e,n){var r=n("5e2e"),i=n("efb6"),o=n("2fcc"),a=n("802a"),s=n("55a3"),u=n("d02c");function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype["delete"]=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},"7ec0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("b455");function i(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,r){return{x:t-n,y:e-r,width:2*n,height:2*r}},length:function(t,e,n,r){return Math.PI*(3*(n+r)-Math.sqrt((3*n+r)*(n+3*r)))},nearestPoint:function(t,e,n,r,o,a){var s=n,u=r;if(0===s||0===u)return{x:t,y:e};for(var c,f,l=o-t,h=a-e,d=Math.abs(l),p=Math.abs(h),g=s*s,v=u*u,y=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(y),f=u*Math.sin(y);var b=(g-v)*Math.pow(Math.cos(y),3)/s,x=(v-g)*Math.pow(Math.sin(y),3)/u,w=c-b,M=f-x,_=d-b,S=p-x,P=Math.hypot(M,w),k=Math.hypot(S,_),C=P*Math.asin((w*S-M*_)/(P*k)),O=C/Math.sqrt(g+v-c*c-f*f);y+=O,y=Math.min(Math.PI/2,Math.max(0,y))}return{x:t+i(c,l),y:e+i(f,h)}},pointDistance:function(t,e,n,i,o,a){var s=this.nearestPoint(t,e,n,i,o,a);return r.distance(s.x,s.y,o,a)},pointAt:function(t,e,n,r,i){var o=2*Math.PI*i;return{x:t+n*Math.cos(o),y:e+r*Math.sin(o)}},tangentAngle:function(t,e,n,i,o){var a=2*Math.PI*o,s=Math.atan2(i*Math.cos(a),-n*Math.sin(a));return r.piMod(s)}}},"7ed2":function(t,e){var n="__lodash_hash_undefined__";function r(t){return this.__data__.set(t,n),this}t.exports=r},"7f6b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseRadius=e.parseStyle=e.parsePattern=e.parseRadialGradient=e.parseLineGradient=void 0;var r=n("516b"),i=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,o=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,a=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function u(t,e){var n=t.match(s);r.each(n,(function(t){var n=t.split(":");e.addColorStop(n[0],n[1])}))}function c(t,e,n){var r,o,a=i.exec(n),s=parseFloat(a[1])%360*(Math.PI/180),c=a[2],f=e.getBBox();s>=0&&s<.5*Math.PI?(r={x:f.minX,y:f.minY},o={x:f.maxX,y:f.maxY}):.5*Math.PI<=s&&sn&&(n=f),l>i&&(i=l)}var h=Math.floor(e),d=Math.floor(r),p=Math.ceil(n)-Math.floor(e),g=Math.ceil(i)-Math.floor(r);return{x:h,y:d,width:p,height:g,minX:e,minY:r}};e.calculationItemsBBox=p},8057:function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length;while(++n0!==i(c[1]-n)>0&&i(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(r=!r)}return r}e.default=a},"842b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("bd8b"),i=function(t){return r.default(t,"Number")};e.default=i},8520:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=n("b4ae"),o=n("0dfa"),a=n("56fa"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=[0,0],e.linkDistance=50,e.scaledDistances=null,e}return(0,r.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{center:[0,0],linkDistance:50}},e.prototype.execute=function(){var t=this,e=t.nodes,n=t.edges,r=void 0===n?[]:n,i=t.center;if(e&&0!==e.length){if(1===e.length)return e[0].x=i[0],void(e[0].y=i[1]);var a=t.linkDistance,s=(0,o.getAdjMatrix)({nodes:e,edges:r},!1),u=(0,o.floydWarshall)(s);t.handleInfinity(u);var c=(0,o.scaleMatrix)(u,a);t.scaledDistances=c;var f=t.runMDS();t.positions=f,f.forEach((function(t,n){e[n].x=t[0]+i[0],e[n].y=t[1]+i[1]}))}},e.prototype.runMDS=function(){var t=this,e=2,n=t.scaledDistances,r=i.Matrix.mul(i.Matrix.pow(n,2),-.5),o=r.mean("row"),a=r.mean("column"),s=r.mean();r.add(s).subRowVector(o).subColumnVector(a);var u=new i.SingularValueDecomposition(r),c=i.Matrix.sqrt(u.diagonalMatrix).diagonal();return u.leftSingularVectors.toJSON().map((function(t){return i.Matrix.mul([t],[c]).toJSON()[0].splice(0,e)}))},e.prototype.handleInfinity=function(t){var e=-999999;t.forEach((function(t){t.forEach((function(t){t!==1/0&&eg*this.minMultiple&&pv*this.minMultiple)||this.inGroupId!==i){var b=u[i];u[i]=b.filter((function(t){return t!==o})),a.dynamicChangeGroupSize(t,c,f),delete r.groupId}if(this.inGroupId!==i){var x=s[this.inGroupId].nodeGroup;if(!x)return;var w=x.get("keyShape");-1===u[this.inGroupId].indexOf(o)&&u[this.inGroupId].push(o),r.groupId=this.inGroupId,a.dynamicChangeGroupSize(t,x,w)}a.setGroupStyle(f,"default")}else if(this.inGroupId&&!i){x=s[this.inGroupId].nodeGroup;if(!x)return;f=x.get("keyShape");-1===u[this.inGroupId].indexOf(o)&&u[this.inGroupId].push(o),r.groupId=this.inGroupId,a.dynamicChangeGroupSize(t,x,f)}else if(!this.inGroupId&&i){Object.keys(u).forEach((function(t){var e=u[t];u[t]=e.filter((function(t){return t!==o}))}));c=s[i].nodeGroup;if(!c)return;f=c.get("keyShape");a.dynamicChangeGroupSize(t,c,f),delete r.groupId}this.inGroupId=null},onOutOfRange:function(t){var e=this,n=e.graph.get("canvas").get("el");function r(i){i.target!==n&&(t.item=e.target,e.onDragEnd(t),document.body.removeEventListener("mouseup",r,!0))}e.origin&&s.addEventListener("mouseup",r,!0)},update:function(t,e,n){var r=this.origin,i=t.get("model"),o=t.get("id");this.point[o]||(this.point[o]={x:i.x,y:i.y});var a=e.x-r.x+this.point[o].x,s=e.y-r.y+this.point[o].y;if(n)this.updateDelegate(e,a,s);else{var u={x:a,y:s};this.get("updateEdge")?this.graph.updateItem(t,u):(t.updatePosition(u),this.graph.paint())}},updateDelegate:function(t,e,n){var a=this.graph,s=t.item,u=a.get("groupType"),c=s.get("keyShape").getBBox();if(!this.shape){var f=a.get("delegateGroup"),l=(0,i.default)({},o.default.delegateStyle,this.delegateStyle);this.target&&(this.shape=f.addShape("rect",{attrs:(0,r.__assign)({width:c.width,height:c.height,x:e-c.width/2,y:n-c.height/2},l),name:"delegate-shape"}),this.target.set("delegateShape",this.shape)),this.shape.set("capture",!1)}this.target&&("circle"===u?this.shape.attr({x:e-c.width/2,y:n-c.height/2}):"rect"===u&&this.shape.attr({x:e,y:n}))}};e.default=u},"8adb":function(t,e){function n(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}t.exports=n},"8be5":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllNodeInGroups=void 0;var r=n("9ab4"),i=o(n("07ea"));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){var e=(0,i.default)(t.groups,"id"),n=(0,i.default)(t.groups,"parentId"),o={};for(var a in n)if(a){var s=n[a],u=e[a];if(u&&s){var c=(0,r.__spreadArrays)(s,u);o[a]=c}else s&&(o[a]=s)}var f=Object.assign({},e,o),l={};for(var h in f)if(h&&"undefined"!==h){s=f[h].map((function(t){return t.id}));l[h]=s}var d={},p=function(e){if(!e||"undefined"===e)return"continue";for(var n=l[e],r=[],i=0,o=n;i-1||r.indexOf(t.parentId)>-1})).map((function(t){return t.id})):[];d[e]=u};for(var h in l)p(h);return d};e.getAllNodeInGroups=a},"8c55":function(t,e,n){"use strict";var r=n("6f9c"),i=n("17d5").Graph,o=n("b50e");function a(t,e){var n={};function i(e,i){var o=0,a=0,s=e.length,f=r.last(i);return r.forEach(i,(function(e,l){var h=u(t,e),d=h?t.node(h).order:s;(h||e===f)&&(r.forEach(i.slice(a,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(as)&&c(n,e,u)}))}))}function o(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(o=t.node(c[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,e.length)})),n}return r.reduce(e,o),n}function u(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}function c(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 f(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var u=i(t);if(u.length){u=r.sortBy(u,(function(t){return s[t]}));for(var c=(u.length-1)/2,l=Math.floor(c),h=Math.ceil(c);l<=h;++l){var d=u[l];a[t]===t&&e-1}t.exports=i},"8de2":function(t,e,n){var r=n("8eeb"),i=n("9934");function o(t){return r(t,i(t))}t.exports=o},"8e80":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=n("61d8");function o(t,e){return!(!r.default(t)&&!i.default(t))&&t[0]===e}e.default=o},"8eeb":function(t,e,n){var r=n("32b3"),i=n("872a");function o(t,e,n,o){var a=!n;n||(n={});var s=-1,u=e.length;while(++s0&&(o.isNil(i)||1===i||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(o.isNil(a)||1===a?this.fill(t):(t.globalAlpha=a,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(i.default);e.default=s},"90f6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSamePoint=void 0;var r=n("8937");function i(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function o(t,e){return i(t)*i(e)?(t[0]*e[0]+t[1]*e[1])/(i(t)*i(e)):1}function a(t,e){return(t[0]*e[1]1&&(n*=Math.sqrt(y),i*=Math.sqrt(y));var m=n*n*(v*v)+i*i*(g*g),b=m?Math.sqrt((n*n*(i*i)-m)/m):1;c===f&&(b*=-1),isNaN(b)&&(b=0);var x=i?b*n*v/i:0,w=n?b*-i*g/n:0,M=(l+d)/2+Math.cos(u)*x-Math.sin(u)*w,_=(h+p)/2+Math.sin(u)*x+Math.cos(u)*w,S=[(g-x)/n,(v-w)/i],P=[(-1*g-x)/n,(-1*v-w)/i],k=a([1,0],S),C=a(S,P);return o(S,P)<=-1&&(C=Math.PI),o(S,P)>=1&&(C=0),0===f&&C>0&&(C-=2*Math.PI),1===f&&C<0&&(C+=2*Math.PI),{cx:M,cy:_,rx:s(t,[d,p])?0:n,ry:s(t,[d,p])?0:i,startAngle:k,endAngle:k+C,xRotation:u,arcFlag:c,sweepFlag:f}}e.isSamePoint=s,e.default=u},"91de":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("06ef"),i=n("5b8d"),o=n("61d8"),a=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(o.default(t)||o.default(e))return!1;if(i.default(t)||i.default(e)){if(t.length!==e.length)return!1;for(var n=!0,s=0;s1&&(n*=Math.sqrt(v),i*=Math.sqrt(v));var y=n*n*(g*g)+i*i*(p*p),m=y?Math.sqrt((n*n*(i*i)-y)/y):1;u===c&&(m*=-1),isNaN(m)&&(m=0);var b=i?m*n*g/i:0,x=n?m*-i*p/n:0,w=(f+h)/2+Math.cos(s)*b-Math.sin(s)*x,M=(l+d)/2+Math.sin(s)*b+Math.cos(s)*x,_=[(p-b)/n,(g-x)/i],S=[(-1*p-b)/n,(-1*g-x)/i],P=a([1,0],_),k=a(_,S);return o(_,S)<=-1&&(k=Math.PI),o(_,S)>=1&&(k=0),0===c&&k>0&&(k-=2*Math.PI),1===c&&k<0&&(k+=2*Math.PI),{cx:w,cy:M,rx:r.isSamePoint(t,[h,d])?0:n,ry:r.isSamePoint(t,[h,d])?0:i,startAngle:P,endAngle:P+k,xRotation:s,arcFlag:u,sweepFlag:c}}e.default=s},9380:function(t,e,n){var r=n("2d7c"),i=n("9f74"),o=n("badf"),a=n("6747");function s(t,e){var n=a(t)?r:i;return n(t,o(e,3))}t.exports=s},"93ed":function(t,e,n){var r=n("4245");function i(t){var e=r(this,t)["delete"](t);return this.size-=e?1:0,e}t.exports=i},"93f6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("8937"),i=n("487c"),o=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,a=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function u(t){var e=t.match(s);if(!e)return"";var n="";return e.sort((function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])})),r.each(e,(function(t){t=t.split(":"),n+=''})),n}function c(t,e){var n,i,a=o.exec(t),s=r.mod(r.toRadian(parseFloat(a[1])),2*Math.PI),c=a[2];s>=0&&s<.5*Math.PI?(n={x:0,y:0},i={x:1,y:1}):.5*Math.PI<=s&&s2?e[2]:void 0;c&&o(e[0],e[1],c)&&(r=1);while(++nu){var c=s;s=u,u=c}return s+a+u+a+(r.isUndefined(o)?i:o)}function l(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function h(t,e){return f(t,e.v,e.w,e.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(t){return this._label=t,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},s.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},s.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},s.prototype.setNode=function(t,e){return r.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]=o,this._children[t]={},this._children[o][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},s.prototype.node=function(t){return this._nodes[t]},s.prototype.hasNode=function(t){return r.has(this._nodes,t)},s.prototype.removeNode=function(t){var e=this;if(r.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],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},s.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=o;else{e+="";for(var n=e;!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},s.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},s.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==o)return e}},s.prototype.children=function(t){if(r.isUndefined(t)&&(t=o),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===o)return this.nodes();if(this.hasNode(t))return[]}},s.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},s.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},s.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},s.prototype.isLeaf=function(t){var e;return e=this.isDirected()?this.successors(t):this.neighbors(t),0===e.length},s.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function o(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},s.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},s.prototype.setEdge=function(){var t,e,n,i,o=!1,a=arguments[0];"object"===typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,t,e,n);if(r.has(this._edgeLabels,s))return o&&(this._edgeLabels[s]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=o?i:this._defaultEdgeLabelFn(t,e,n);var c=l(this._isDirected,t,e,n);return t=c.v,e=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[e],t),u(this._sucs[t],e),this._in[e][s]=c,this._out[t][s]=c,this._edgeCount++,this},s.prototype.edge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,t,e,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},s.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(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],c(this._preds[e],t),c(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},s.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},s.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},s.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},"969b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("38f9");e.default=function(t,e){if(!e)return[t];var n=r.default(t,e),i=[];for(var o in n)i.push(n[o]);return i}},"96f3":function(t,e){var n=Object.prototype,r=n.hasOwnProperty;function i(t,e){return null!=t&&r.call(t,e)}t.exports=i},9705:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("6855"),o=n("516b"),a=n("31c4"),s=n("1322"),u=n("92ca"),c=n("c0e4"),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return u},e.prototype.getGroupBase=function(){return c.default},e.prototype.onCanvasChange=function(t){a.refreshElement(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=s.getBBoxMethod(t),r=n(this),i=e/2,o=r.x-i,a=r.y-i,u=r.x+r.width+i,c=r.y+r.height+i;return{x:o,minX:o,y:a,minY:a,width:r.width+e,height:r.height+e,maxX:u,maxY:c}},e.prototype.isFill=function(){return!!this.attrs["fill"]||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs["stroke"]},e.prototype._applyClip=function(t,e){e&&(t.save(),a.applyAttrsToContext(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.draw=function(t,e){var n=this.getClip();if(e){var r=n?a.getMergedRegion([this,n]):this.getCanvasBBox();if(!o.intersectRect(e,r))return void this.set("hasChanged",!1)}t.save(),a.applyAttrsToContext(t,this),this._applyClip(t,this.getClip()),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype._afterDraw=function(){var t=this.getCanvasBBox(),e=this.getCanvas();if(this.set("cacheCanvasBBox",t),e){var n=e.getViewRange();this.set("isInView",o.intersectRect(t,n))}this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,a=e.fillOpacity;this.isFill()&&(o.isNil(a)||1===a?this.fill(t):(t.globalAlpha=a,this.fill(t),t.globalAlpha=r)),this.isStroke()&&n>0&&(o.isNil(i)||1===i||(t.globalAlpha=i),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),r=this.isFill(),i=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t["lineWidth"]+t["lineAppendWidth"]},e}(i.AbstractShape);e.default=f},"97d3":function(t,e,n){var r=n("48a0"),i=n("30c9");function o(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}t.exports=o},"97d6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("8937"),o=n("7a70"),a=n("d531"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ellipse",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");i.each(e||n,(function(t,e){"x"===e||"y"===e?r.setAttribute("c"+e,t):o.SVG_ATTR_MAP[e]&&r.setAttribute(o.SVG_ATTR_MAP[e],t)}))},e}(a.default);e.default=s},"980a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=p(n("0cc2")),o=p(n("bb3a")),a=p(n("13c9")),s=p(n("61d8")),u=p(n("d99a")),c=p(n("c360")),f=p(n("28f9")),l=p(n("72fb")),h=n("e897"),d=n("8937");function p(t){return t&&t.__esModule?t:{default:t}}var g=Math.max,v="default",y="keyShape",m="delegate",b="svg",x=function(t){function e(e){var n=t.call(this,e)||this;return n.handleUpdateCanvas=(0,d.debounce)((function(t){var e=n;e.destroyed||e.updateCanvas()}),100,!1),n}return(0,r.__extends)(e,t),e.prototype.getDefaultCfgs=function(){return{container:null,className:"g6-minimap",viewportClassName:"g6-minimap-viewport",type:"default",padding:50,size:[200,120],delegateStyle:{fill:"#40a9ff",stroke:"#096dd9"},refresh:!0}},e.prototype.getEvents=function(){return{beforepaint:"updateViewport",beforeanimate:"disableRefresh",afteranimate:"enableRefresh",viewportchange:"disableOneRefresh"}},e.prototype.disableRefresh=function(){this.set("refresh",!1)},e.prototype.enableRefresh=function(){this.set("refresh",!0),this.updateCanvas()},e.prototype.disableOneRefresh=function(){this.set("viewportChange",!0)},e.prototype.initViewport=function(){var t=this,e=this._cfgs,n=e.size,r=e.graph;if(!this.destroyed){var i=this.get("canvas"),o=i.get("container"),a=(0,u.default)("
"),s=0,l=0,h=!1,d=0,p=0,g=0,v=0,y=0,m=0;o.addEventListener("mousedown",(function(i){if(e.refresh=!1,i.target===a){var o=a.style;d=parseInt(o.left,10),p=parseInt(o.top,10),g=parseInt(o.width,10),v=parseInt(o.height,10),g>n[0]||v>n[1]||(m=r.getZoom(),y=t.get("ratio"),h=!0,s=i.clientX,l=i.clientY)}}),!1),o.addEventListener("mousemove",(function(t){if(h&&!(0,f.default)(t.clientX)&&!(0,f.default)(t.clientY)){var e=s-t.clientX,i=l-t.clientY;d-e<0?e=d:d-e+g>n[0]&&(e=d+g-n[0]),p-i<0?i=p:p-i+v>n[1]&&(i=p+v-n[1]),d-=e,p-=i,(0,c.default)(a,{left:d+"px",top:p+"px"}),r.translate(e*m/y,i*m/y),s=t.clientX,l=t.clientY}}),!1),o.addEventListener("mouseleave",(function(){h=!1,e.refresh=!0}),!1),o.addEventListener("mouseup",(function(){h=!1,e.refresh=!0}),!1),this.set("viewport",a),o.appendChild(a)}},e.prototype.updateViewport=function(){if(!this.destroyed){var t=this.get("ratio"),e=this.get("dx"),n=this.get("dy"),r=this.get("totaldx"),i=this.get("totaldy"),o=this.get("graph"),a=this.get("size"),s=o.get("width"),u=o.get("height"),f=o.getPointByCanvas(0,0),l=o.getPointByCanvas(s,u),h=o.get("canvas").getCanvasBBox(),d=this.get("viewport");d||this.initViewport();var p=o.getZoom(),g=(l.x-f.x)*t,v=(l.y-f.y)*t,y=f.x*t+r,m=f.y*t+i;g>a[0]&&(g=a[0],y=h.maxX>s?-e-(h.maxX-s)/p*t:e-h.minX/p*t),v>a[1]&&(v=a[1],m=h.maxY>u?-n-(h.maxY-u)/p*t:n-h.minY/p*t),this.set("ratio",t);var b=y+"px",x=m+"px",w=o.get("canvas").getCanvasBBox();g>=a[0]&&w.minX>0&&w.maxX=0&&y+g<=a[0]?b=y+"px":y<0?b=0:y+g>a[0]&&(b=a[0]-g+"px")),v>=a[1]&&w.minY>0&&w.maxY=0&&m+v<=a[1]?x=m+"px":m<0?x=0:m+v>a[1]&&(x=a[1]-v+"px")),(0,c.default)(d,{left:b,top:x,width:g+"px",height:v+"px"})}},e.prototype.updateGraphShapes=function(){var t=this._cfgs.graph,e=this.get("canvas"),n=t.get("group");if(!n.destroyed){var r=n.clone();r.resetMatrix(),e.clear(),e.add(r)}},e.prototype.updateKeyShapes=function(){var t=this,e=this._cfgs.graph;(0,l.default)(e.getEdges(),(function(e){t.updateOneEdgeKeyShape(e)})),(0,l.default)(e.getNodes(),(function(e){t.updateOneNodeKeyShape(e)})),this.clearDestroyedShapes()},e.prototype.updateOneNodeKeyShape=function(t){var e=this.get("canvas"),n=e.get("children")[0]||e.addGroup(),r=this.get("itemMap")||{},i=r[t.get("id")],o=t.getBBox(),a=t.get("keyShape").clone(),s=a.attr(),u={x:o.centerX,y:o.centerY};i?u=Object.assign(s,u):(i=a,n.add(i));var c=i.get("type");"rect"!==c&&"image"!==c||(u.x=o.minX,u.y=o.minY),i.attr(u),t.isVisible()||i.hide(),i.exist=!0,r[t.get("id")]=i,this.set("itemMap",r)},e.prototype.updateDelegateShapes=function(){var t=this,e=this._cfgs.graph;(0,l.default)(e.getEdges(),(function(e){t.updateOneEdgeKeyShape(e)})),(0,l.default)(e.getNodes(),(function(e){t.updateOneNodeDelegateShape(e)})),this.clearDestroyedShapes()},e.prototype.clearDestroyedShapes=function(){var t=this.get("itemMap")||{},e=Object.keys(t);if(e&&0!==e.length)for(var n=e.length-1;n>=0;n--){var r=t[e[n]],i=r.exist;r.exist=!1,i||(r.remove(),delete t[e[n]])}},e.prototype.updateOneEdgeKeyShape=function(t){var e=this.get("canvas"),n=e.get("children")[0]||e.addGroup(),r=this.get("itemMap")||{},i=r[t.get("id")];if(i){var o=t.get("keyShape").attr("path");i.attr("path",o)}else i=t.get("keyShape").clone(),n.add(i),i.toBack();t.isVisible()||i.hide(),i.exist=!0,r[t.get("id")]=i,this.set("itemMap",r)},e.prototype.updateOneNodeDelegateShape=function(t){var e=this.get("canvas"),n=e.get("children")[0]||e.addGroup(),i=this.get("delegateStyle"),o=this.get("itemMap")||{},a=o[t.get("id")],s=t.getBBox();if(a){var u={x:s.minX,y:s.minY,width:s.width,height:s.height};a.attr(u)}else a=n.addShape("rect",{attrs:(0,r.__assign)({x:s.minX,y:s.minY,width:s.width,height:s.height},i),name:"minimap-node-shape"});t.isVisible()||a.hide(),a.exist=!0,o[t.get("id")]=a,this.set("itemMap",o)},e.prototype.init=function(){this.initContainer(),this.get("graph").on("afterupdateitem",this.handleUpdateCanvas),this.get("graph").on("afteritemstatechange",this.handleUpdateCanvas),this.get("graph").on("afteradditem",this.handleUpdateCanvas),this.get("graph").on("afterremoveitem",this.handleUpdateCanvas),this.get("graph").on("afterrender",this.handleUpdateCanvas),this.get("graph").on("afterlayout",this.handleUpdateCanvas)},e.prototype.initContainer=function(){var t=this,e=t.get("graph"),n=t.get("size"),r=t.get("className"),a=t.get("container"),c=(0,u.default)("
");(0,s.default)(a)&&(a=document.getElementById(a)),a?a.appendChild(c):e.get("container").appendChild(c),t.set("container",c);var f,l=(0,u.default)('
');c.appendChild(l);var h=e.get("renderer");f=h===b?new o.default({container:l,width:n[0],height:n[1]}):new i.default({container:l,width:n[0],height:n[1]}),t.set("canvas",f),t.updateCanvas()},e.prototype.updateCanvas=function(){var t=this.get("refresh");if(t){var e=this.get("graph");if(!e.get("destroyed")){this.get("viewportChange")&&(this.set("viewportChange",!1),this.updateViewport());var n=this.get("size"),r=this.get("canvas"),i=this.get("type"),o=this.get("padding");if(!r.destroyed){switch(i){case v:this.updateGraphShapes();break;case y:this.updateKeyShapes();break;case m:this.updateDelegateShapes();break}var a=r.get("children")[0];if(a){a.resetMatrix();var s=a.getCanvasBBox(),u=e.get("canvas").getBBox(),c=u.width,f=u.height;Number.isFinite(s.width)&&(c=g(s.width,c),f=g(s.height,f)),c+=2*o,f+=2*o;var l=Math.min(n[0]/c,n[1]/f),d=h.mat3.create(),p=0,b=0;Number.isFinite(s.minX)&&(p=-s.minX),Number.isFinite(s.minY)&&(b=-s.minY);var x=(n[0]-(c-2*o)*l)/2,w=(n[1]-(f-2*o)*l)/2;d=(0,h.transform)(d,[["t",p,b],["s",l,l],["t",x,w]]),a.setMatrix(d),this.set("ratio",l),this.set("totaldx",x+p*l),this.set("totaldy",w+b*l),this.set("dx",x),this.set("dy",w),this.updateViewport()}}}}},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.getViewport=function(){return this.get("viewport")},e.prototype.getContainer=function(){return this.get("container")},e.prototype.destroy=function(){this.get("canvas").destroy();var t=this.get("container");t.parentNode.removeChild(t)},e}(a.default),w=x;e.default=w},9861:function(t,e,n){"use strict";n("e260");var r=n("23e7"),i=n("da84"),o=n("d066"),a=n("c65b"),s=n("e330"),u=n("0d3b"),c=n("6eeb"),f=n("e2cc"),l=n("d44e"),h=n("9ed3"),d=n("69f3"),p=n("19aa"),g=n("1626"),v=n("1a2d"),y=n("0366"),m=n("f5df"),b=n("825a"),x=n("861d"),w=n("577e"),M=n("7c73"),_=n("5c6c"),S=n("9a1f"),P=n("35a1"),k=n("b622"),C=n("addb"),O=k("iterator"),E="URLSearchParams",A=E+"Iterator",j=d.set,I=d.getterFor(E),T=d.getterFor(A),B=o("fetch"),N=o("Request"),D=o("Headers"),L=N&&N.prototype,R=D&&D.prototype,z=i.RegExp,F=i.TypeError,G=i.decodeURIComponent,Y=i.encodeURIComponent,X=s("".charAt),V=s([].join),q=s([].push),U=s("".replace),W=s([].shift),H=s([].splice),Z=s("".split),$=s("".slice),Q=/\+/g,K=Array(4),J=function(t){return K[t-1]||(K[t-1]=z("((?:%[\\da-f]{2}){"+t+"})","gi"))},tt=function(t){try{return G(t)}catch(e){return t}},et=function(t){var e=U(t,Q," "),n=4;try{return G(e)}catch(r){while(n)e=U(e,J(n--),tt);return e}},nt=/[!'()~]|%20/g,rt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},it=function(t){return rt[t]},ot=function(t){return U(Y(t),nt,it)},at=function(t,e){if(e){var n,r,i=Z(e,"&"),o=0;while(o0?arguments[0]:void 0,l=this,h=[];if(j(l,{type:E,entries:h,updateURL:function(){},updateSearchParams:st}),void 0!==f)if(x(f))if(t=P(f),t){e=S(f,t),n=e.next;while(!(r=a(n,e)).done){if(i=S(b(r.value)),o=i.next,(s=a(o,i)).done||(u=a(o,i)).done||!a(o,i).done)throw F("Expected sequence with length 2");q(h,{key:w(s.value),value:w(u.value)})}}else for(c in f)v(f,c)&&q(h,{key:c,value:w(f[c])});else at(h,"string"==typeof f?"?"===X(f,0)?$(f,1):f:w(f))},lt=ft.prototype;if(f(lt,{append:function(t,e){ut(arguments.length,2);var n=I(this);q(n.entries,{key:w(t),value:w(e)}),n.updateURL()},delete:function(t){ut(arguments.length,1);var e=I(this),n=e.entries,r=w(t),i=0;while(ie.key?1:-1})),t.updateURL()},forEach:function(t){var e,n=I(this).entries,r=y(t,arguments.length>1?arguments[1]:void 0),i=0;while(i1?pt(arguments[1]):{})}}),g(N)){var gt=function(t){return p(this,L),new N(t,arguments.length>1?pt(arguments[1]):{})};L.constructor=gt,gt.prototype=L,r({global:!0,forced:!0},{Request:gt})}}t.exports={URLSearchParams:ft,getState:I}},"98dc":function(t,e,n){var r=n("76dd"),i=0;function o(t){var e=++i;return r(t)+e}t.exports=o},9934:function(t,e,n){var r=n("6fcd"),i=n("41c3"),o=n("30c9");function a(t){return o(t)?r(t,!0):i(t)}t.exports=a},9948:function(t,e,n){var r=n("72af"),i=n("1304"),o=n("9934");function a(t,e){return null==t?t:r(t,i(e),o)}t.exports=a},"99cd":function(t,e){function n(t){return function(e,n,r){var i=-1,o=Object(e),a=r(e),s=a.length;while(s--){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}t.exports=n},"99d3":function(t,e,n){(function(t){var r=n("585a"),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=u}).call(this,n("62e4")(t))},"9ab4f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},"9aff":function(t,e,n){var r=n("9638"),i=n("30c9"),o=n("c098"),a=n("1a8c");function s(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}t.exports=s},"9b02":function(t,e,n){var r=n("656b");function i(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}t.exports=i},"9b7a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("8937"),i=n("67ac");e.default=function(t,e){var n=t?r.clone(t):[1,0,0,0,1,0,0,0,1];return r.each(e,(function(t){switch(t[0]){case"t":i.default.translate(n,n,[t[1],t[2]]);break;case"s":i.default.scale(n,n,[t[1],t[2]]);break;case"r":i.default.rotate(n,n,t[1]);break;case"m":i.default.multiply(n,n,t[1]);break;default:return!1}})),n}},"9b9d":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("9705"),o=n("516b");function a(t){return t instanceof HTMLElement&&o.isString(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(o.isString(t)){var r=new Image;r.onload=function(){if(e.destroyed)return!1;e.attr("img",r),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},r.crossOrigin="Anonymous",r.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):a(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,r=e.y,i=e.width,s=e.height,u=e.sx,c=e.sy,f=e.swidth,l=e.sheight,h=e.img;(h instanceof Image||a(h))&&(o.isNil(u)||o.isNil(c)||o.isNil(f)||o.isNil(l)?t.drawImage(h,n,r,i,s):t.drawImage(h,u,c,f,l,n,r,i,s))},e}(i.default);e.default=s},"9c6b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("c3e2"),o=n("d6a3"),a=n("8937"),s=n("7a70"),u=n("d531"),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");a.each(e||n,(function(t,e){"points"===e&&a.isArray(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):s.SVG_ATTR_MAP[e]&&r.setAttribute(s.SVG_ATTR_MAP[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return a.isNil(e)?(this.set("totalLength",o.default.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,r=this.attr().points,o=this.get("tCache");return o||(this._setTcache(),o=this.get("tCache")),a.each(o,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),i.default.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,o=0,s=[];a.each(t,(function(a,u){t[u+1]&&(n=[],n[0]=o/e,r=i.default.length(a[0],a[1],t[u+1][0],t[u+1][1]),o+=r,n[1]=o/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(u.default);e.default=c},"9cc4":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=v(n("72fb")),i=v(n("56fa")),o=v(n("f128")),a=v(n("9cf8")),s=v(n("5f1d")),u=v(n("37a5")),c=v(n("7d69")),f=v(n("9ecb")),l=v(n("a02d")),h=v(n("8520")),d=v(n("1729")),p=v(n("4d39")),g=v(n("2d0a"));function v(t){return t&&t.__esModule?t:{default:t}}var y={circular:o.default,concentric:a.default,dagre:s.default,force:u.default,g6force:c.default,comboForce:g.default,fruchterman:f.default,grid:l.default,mds:h.default,radial:d.default,random:p.default};(0,r.default)(y,(function(t,e){i.default.registerLayout(e,{},t)}));var m=i.default;e.default=m},"9cf8":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=c(n("01f9")),o=c(n("61d8")),a=n("56fa"),s=n("0dfa"),u=n("8937");function c(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=[0,0],e.nodeSize=30,e.minNodeSpacing=10,e.preventOverlap=!1,e.equidistant=!1,e.startAngle=1.5*Math.PI,e.clockwise=!0,e.sortBy="degree",e.nodes=[],e.edges=[],e.width=300,e.height=300,e}return(0,r.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{center:[0,0],nodeSize:30,minNodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:1.5*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"}},e.prototype.execute=function(){var t=this,e=t.nodes,n=t.edges,r=e.length,a=t.center;if(0!==r){if(1===r)return e[0].x=a[0],void(e[0].y=a[1]);var c,f=[];c=(0,i.default)(t.nodeSize)?Math.max(t.nodeSize[0],t.nodeSize[1]):t.nodeSize,e.forEach((function(t){f.push(t);var e=c;(0,i.default)(t.size)?e=Math.max(t.size[0],t.size[1]):(0,u.isNumber)(t.size)&&(e=t.size),c=Math.max(c,e)})),t.width||"undefined"===typeof window||(t.width=window.innerWidth),t.height||"undefined"===typeof window||(t.height=window.innerHeight),t.clockwise=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise;var l={},h={};if(f.forEach((function(t,e){l[t.id]=t,h[t.id]=e})),("degree"===t.sortBy||!(0,o.default)(t.sortBy)||void 0===f[0][t.sortBy])&&(t.sortBy="degree",!(0,u.isNumber)(e[0].degree))){var d=(0,s.getDegree)(e.length,h,n);f.forEach((function(t,e){t.degree=d[e]}))}f.sort((function(e,n){return n[t.sortBy]-e[t.sortBy]})),t.maxValueNode=f[0],t.maxLevelDiff=t.maxLevelDiff||t.maxValueNode[t.sortBy]/4;var p=[[]],g=p[0];f.forEach((function(e){if(g.length>0){var n=Math.abs(g[0][t.sortBy]-e[t.sortBy]);t.maxLevelDiff&&n>=t.maxLevelDiff&&(g=[],p.push(g))}g.push(e)}));var v=c+t.minNodeSpacing;if(!t.preventOverlap){var y=p.length>0&&p[0].length>1,m=Math.min(t.width,t.height)/2-v,b=m/(p.length+(y?1:0));v=Math.min(v,b)}var x=0;if(p.forEach((function(e){var n=t.sweep;void 0===n&&(n=2*Math.PI-2*Math.PI/e.length);var r=e.dTheta=n/Math.max(1,e.length-1);if(e.length>1&&t.preventOverlap){var i=Math.cos(r)-Math.cos(0),o=Math.sin(r)-Math.sin(0),a=Math.sqrt(v*v/(i*i+o*o));x=Math.max(a,x)}e.r=x,x+=v})),t.equidistant){for(var w=0,M=0,_=0;_o&&(n=s,o=u)}return n}}},"9d9f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("739e"),i=function(t){return r.default(t).toLowerCase()};e.default=i},"9e39":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("28f9"),i=n("01f9"),o=function(t,e){for(var n=null,o=0;o0){var r=Math.min(s*(f/a),n);t.x+=d[e].x/n*r,t.y+=d[e].y/n*r}}}))},g=0;ga?1:-1;s=.01*f,u=.01*f}var l=n*n/c;e[i].x+=s*l,e[i].y+=u*l}}))}))},e.prototype.calAttractive=function(t,e,n){var r=this;t.forEach((function(t){if(t.source&&t.target){var i=r.nodeIdxMap[t.source],a=r.nodeIdxMap[t.target];if(i!==a){var s=r.nodeMap[t.source],u=r.nodeMap[t.target];if((0,o.isNumber)(u.x)&&(0,o.isNumber)(s.x)&&(0,o.isNumber)(u.y)&&(0,o.isNumber)(s.y)){var c=u.x-s.x,f=u.y-s.y,l=Math.sqrt(c*c+f*f),h=l*l/n;e[a].x-=c/l*h,e[a].y-=f/l*h,e[i].x+=c/l*h,e[i].y+=f/l*h}}}}))},e}(i.BaseLayout),u=s;e.default=u},"9f74":function(t,e,n){var r=n("48a0");function i(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}t.exports=i},"9fe7":function(t,e,n){"use strict";n.r(e),n.d(e,"create",(function(){return i})),n.d(e,"clone",(function(){return o})),n.d(e,"length",(function(){return a})),n.d(e,"fromValues",(function(){return s})),n.d(e,"copy",(function(){return u})),n.d(e,"set",(function(){return c})),n.d(e,"add",(function(){return f})),n.d(e,"subtract",(function(){return l})),n.d(e,"multiply",(function(){return h})),n.d(e,"divide",(function(){return d})),n.d(e,"ceil",(function(){return p})),n.d(e,"floor",(function(){return g})),n.d(e,"min",(function(){return v})),n.d(e,"max",(function(){return y})),n.d(e,"round",(function(){return m})),n.d(e,"scale",(function(){return b})),n.d(e,"scaleAndAdd",(function(){return x})),n.d(e,"distance",(function(){return w})),n.d(e,"squaredDistance",(function(){return M})),n.d(e,"squaredLength",(function(){return _})),n.d(e,"negate",(function(){return S})),n.d(e,"inverse",(function(){return P})),n.d(e,"normalize",(function(){return k})),n.d(e,"dot",(function(){return C})),n.d(e,"cross",(function(){return O})),n.d(e,"lerp",(function(){return E})),n.d(e,"hermite",(function(){return A})),n.d(e,"bezier",(function(){return j})),n.d(e,"random",(function(){return I})),n.d(e,"transformMat4",(function(){return T})),n.d(e,"transformMat3",(function(){return B})),n.d(e,"transformQuat",(function(){return N})),n.d(e,"rotateX",(function(){return D})),n.d(e,"rotateY",(function(){return L})),n.d(e,"rotateZ",(function(){return R})),n.d(e,"angle",(function(){return z})),n.d(e,"zero",(function(){return F})),n.d(e,"str",(function(){return G})),n.d(e,"exactEquals",(function(){return Y})),n.d(e,"equals",(function(){return X})),n.d(e,"sub",(function(){return V})),n.d(e,"mul",(function(){return q})),n.d(e,"div",(function(){return U})),n.d(e,"dist",(function(){return W})),n.d(e,"sqrDist",(function(){return H})),n.d(e,"len",(function(){return Z})),n.d(e,"sqrLen",(function(){return $})),n.d(e,"forEach",(function(){return Q}));var r=n("c94d");function i(){var t=new r["a"](3);return r["a"]!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=new r["a"](3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function s(t,e,n){var i=new r["a"](3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function f(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function h(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function d(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function p(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function g(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function v(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function y(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function b(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function x(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function w(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function M(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function _(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function S(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function P(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function k(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function C(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function O(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function E(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function A(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*f,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*f,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*f,t}function j(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,f=3*o*s,l=3*u*a,h=u*o;return t[0]=e[0]*c+n[0]*f+r[0]*l+i[0]*h,t[1]=e[1]*c+n[1]*f+r[1]*l+i[1]*h,t[2]=e[2]*c+n[2]*f+r[2]*l+i[2]*h,t}function I(t,e){e=e||1;var n=2*r["c"]()*Math.PI,i=2*r["c"]()-1,o=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=i*e,t}function T(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function B(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function N(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],f=i*c-o*u,l=o*s-r*c,h=r*u-i*s,d=i*h-o*l,p=o*f-r*h,g=r*l-i*f,v=2*a;return f*=v,l*=v,h*=v,d*=2,p*=2,g*=2,t[0]=s+f+d,t[1]=u+l+p,t[2]=c+h+g,t}function D(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function L(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function R(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function z(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i),c=Math.sqrt(o*o+a*a+s*s),f=u*c,l=f&&C(t,e)/f;return Math.acos(Math.min(Math.max(l,-1),1))}function F(t){return t[0]=0,t[1]=0,t[2]=0,t}function G(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function X(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r["b"]*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r["b"]*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r["b"]*Math.max(1,Math.abs(o),Math.abs(u))}var V=l,q=h,U=d,W=w,H=M,Z=a,$=_,Q=function(){var t=i();return function(e,n,r,i,o,a){var s,u;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;st.cells){var p=t.small(),g=t.large();(p-1)*g>=t.cells?t.small(p-1):(g-1)*p>=t.cells&&t.large(g-1)}else while(t.cols*t.rows=t.cells?t.large(g+1):t.small(p+1)}t.cellWidth=t.width/t.cols,t.cellHeight=t.height/t.rows,t.condense&&(t.cellWidth=0,t.cellHeight=0),t.preventOverlap&&c.forEach((function(e){var n,r;e.x&&e.y||(e.x=0,e.y=0),(0,a.isArray)(e.size)?(n=e.size[0],r=e.size[1]):(0,a.isNumber)(e.size)&&(n=e.size,r=e.size),void 0!==n&&void 0!==r||((0,a.isArray)(t.nodeSize)?(n=t.nodeSize[0],r=t.nodeSize[1]):(0,a.isNumber)(t.nodeSize)?(n=t.nodeSize,r=t.nodeSize):(n=30,r=30));var i=t.preventOverlapPadding,o=n+i,s=r+i;t.cellWidth=Math.max(t.cellWidth,o),t.cellHeight=Math.max(t.cellHeight,s)})),t.cellUsed={},t.row=0,t.col=0,t.id2manPos={};for(var v=0;v=e&&(t.col=0,t.row++)},e.prototype.getPos=function(t){var e,n,r=this,i=r.begin,o=r.cellWidth,a=r.cellHeight,s=r.id2manPos[t.id];if(s)e=s.col*o+o/2+i[0],n=s.row*a+a/2+i[1];else{while(r.used(r.row,r.col))r.moveToNextCell();e=r.col*o+o/2+i[0],n=r.row*a+a/2+i[1],r.use(r.row,r.col),r.moveToNextCell()}t.x=e,t.y=n},e}(o.BaseLayout),l=f;e.default=l},a052:function(t,e,n){"use strict";var r=n("9ab4"),i=n("8937"),o=s(n("067f")),a=s(n("7da3"));function s(t){return t&&t.__esModule?t:{default:t}}a.default.registerNode("star",{options:{size:60,style:{stroke:o.default.defaultShapeStrokeColor,fill:o.default.defaultShapeFillColor,lineWidth:o.default.defaultNode.style.lineWidth},labelCfg:{style:{fill:"#595959"}},linkPoints:{top:!1,right:!1,left:!1,leftBottom:!1,rightBottom:!1,size:3,lineWidth:1,fill:"#fff",stroke:"#72CC4A"},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/basement_prod/012bcf4f-423b-4922-8c24-32a89f8c41ce.svg",width:16,height:16}},shapeType:"star",labelPosition:"center",drawShape:function(t,e){var n=this.options.icon,o=this.getShapeStyle(t),a=(0,i.mix)({},n,t.icon),s=e.addShape("path",{attrs:o,className:"star-keyShape",name:"star-keyShape",draggable:!0}),u=a.width,c=a.height,f=a.show;if(f)e.addShape("image",{attrs:(0,r.__assign)({x:-u/2,y:-c/2},a),className:"star-icon",name:"star-icon",draggable:!0});return this.drawLinkPoints(t,e),s},drawLinkPoints:function(t,e){var n=this.options.linkPoints,o=(0,i.mix)({},n,t.linkPoints),a=o.top,s=o.left,u=o.right,c=o.leftBottom,f=o.rightBottom,l=o.size,h=(0,r.__rest)(o,["top","left","right","leftBottom","rightBottom","size"]),d=this.getSize(t),p=d[0];if(u){var g=Math.cos(.1*Math.PI)*p,v=Math.sin(.1*Math.PI)*p;e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},h),{x:g,y:-v,r:l}),className:"link-point-right",name:"link-point-right"})}if(a){g=Math.cos(.5*Math.PI)*p,v=Math.sin(.5*Math.PI)*p;e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},h),{x:g,y:-v,r:l}),className:"link-point-top",name:"link-point-top"})}if(s){g=Math.cos(.9*Math.PI)*p,v=Math.sin(.9*Math.PI)*p;e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},h),{x:g,y:-v,r:l}),className:"link-point-left",name:"link-point-left"})}if(c){g=Math.cos(1.3*Math.PI)*p,v=Math.sin(1.3*Math.PI)*p;e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},h),{x:g,y:-v,r:l}),className:"link-point-left-bottom",name:"link-point-left-bottom"})}if(f){g=Math.cos(1.7*Math.PI)*p,v=Math.sin(1.7*Math.PI)*p;e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},h),{x:g,y:-v,r:l}),className:"link-point-right-bottom",name:"link-point-right-bottom"})}},getPath:function(t){for(var e=this.getSize(t),n=e[0],r=3*n/8,i=t.innerR||r,o=[],a=0;a<5;a++){var s=Math.cos((18+72*a)/180*Math.PI)*n,u=Math.sin((18+72*a)/180*Math.PI)*n,c=Math.cos((54+72*a)/180*Math.PI)*i,f=Math.sin((54+72*a)/180*Math.PI)*i;0===a?o.push(["M",s,-u]):o.push(["L",s,-u]),o.push(["L",c,-f])}return o.push(["Z"]),o},getShapeStyle:function(t){var e=this.options.style,n={stroke:t.color},o=(0,i.mix)({},e,n,t.style),a=this.getPath(t),s=(0,r.__assign)({path:a},o);return s},update:function(t,e){var n=e.getContainer(),r=this.options.style,o=this.getPath(t),a={stroke:t.color,path:o},s=e.get("keyShape"),u=(0,i.mix)({},r,s.attr(),a);u=(0,i.mix)(u,t.style),this.updateShape(t,e,u,!0),this.updateLinkPoints(t,n)},updateLinkPoints:function(t,e){var n=this.options.linkPoints,o=e.find((function(t){return"link-point-left"===t.get("className")})),a=e.find((function(t){return"link-point-right"===t.get("className")})),s=e.find((function(t){return"link-point-top"===t.get("className")})),u=e.find((function(t){return"link-point-left-bottom"===t.get("className")})),c=e.find((function(t){return"link-point-right-bottom"===t.get("className")})),f=n,l=o||a||s||u||c;l&&(f=l.attr());var h=(0,i.mix)({},f,t.linkPoints),d=h.fill,p=h.stroke,g=h.lineWidth,v=h.size;v||(v=h.r);var y=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,leftBottom:void 0,rightBottom:void 0},m=y.left,b=y.right,x=y.top,w=y.leftBottom,M=y.rightBottom,_=this.getSize(t),S=_[0],P={r:v,fill:d,stroke:p,lineWidth:g},k=Math.cos(.1*Math.PI)*S,C=Math.sin(.1*Math.PI)*S;a?b||void 0===b?a.attr((0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C})):a.remove():b&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0}),k=Math.cos(.5*Math.PI)*S,C=Math.sin(.5*Math.PI)*S,s?x||void 0===x?s.attr((0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C})):s.remove():x&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0}),k=Math.cos(.9*Math.PI)*S,C=Math.sin(.9*Math.PI)*S,o?m||void 0===m?o.attr((0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C})):o.remove():m&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0}),k=Math.cos(1.3*Math.PI)*S,C=Math.sin(1.3*Math.PI)*S,u?w||void 0===w?u.attr((0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C})):u.remove():w&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C}),className:"link-point-left-bottom",name:"link-point-left-bottom",isAnchorPoint:!0}),k=Math.cos(1.7*Math.PI)*S,C=Math.sin(1.7*Math.PI)*S,c?M||void 0===M?c.attr((0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C})):u.remove():M&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},P),{x:k,y:-C}),className:"link-point-right-bottom",name:"link-point-right-bottom",isAnchorPoint:!0})}},"single-node")},a08e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.prototype,i=function(t){var e=t&&t.constructor,n="function"===typeof e&&e.prototype||r;return t===n};e.default=i},a0a3:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9");function i(t){var e=0,n=0,i=0,o=0;return r.default(t)?1===t.length?e=n=i=o=t[0]:2===t.length?(e=i=t[0],n=o=t[1]):3===t.length?(e=t[0],n=o=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],o=t[3]):e=n=i=o=t,{r1:e,r2:n,r3:i,r4:o}}e.default=i},a120:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("9705"),o=n("516b"),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var a=this.attr(),s=a.x,u=a.y,c=a.r,f=i/2,l=o.distance(s,u,t,e);return r&&n?l<=c+f:r?l<=c:!!n&&(l>=c-f&&l<=c+f)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()},e}(i.default);e.default=a},a12b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("b455"),i=n("7ec0");function o(t,e,n,r,i,o,a,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}function a(t,e,n,r,i,o,a,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}function s(t,e,n){return Math.atan(-e/t*Math.tan(n))}function u(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function c(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function f(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}function l(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+2*Math.PI)%(2*Math.PI)}function h(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function d(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}e.default={box:function(t,e,n,r,i,o,a){for(var l=s(n,r,i),h=1/0,d=-1/0,p=[o,a],g=2*-Math.PI;g<=2*Math.PI;g+=Math.PI){var v=l+g;od&&(d=y)}var m=u(n,r,i),b=1/0,x=-1/0,w=[o,a];for(g=2*-Math.PI;g<=2*Math.PI;g+=Math.PI){var M=m+g;ox&&(x=_)}return{x:h,y:b,width:d-h,height:x-b}},length:function(t,e,n,r,i,o,a){},nearestPoint:function(t,e,n,r,o,a,s,u,c){var f=d(u-t,c-e,-o),p=f[0],g=f[1],v=i.default.nearestPoint(0,0,n,r,p,g),y=l(n,r,v.x,v.y);ys&&(v=h(n,r,s));var m=d(v.x,v.y,o);return{x:m[0]+t,y:m[1]+e}},pointDistance:function(t,e,n,i,o,a,s,u,c){var f=this.nearestPoint(t,e,n,i,u,c);return r.distance(f.x,f.y,u,c)},pointAt:function(t,e,n,r,i,o,a,s){var u=(a-o)*s+o;return{x:c(t,e,n,r,i,u),y:f(t,e,n,r,i,u)}},tangentAngle:function(t,e,n,i,s,u,c,f){var l=(c-u)*f+u,h=o(t,e,n,i,s,u,c,l),d=a(t,e,n,i,s,u,c,l);return r.piMod(Math.atan2(d,h))}}},a233:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5b8d"),i=function(t,e){if(!r.default(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var i=-1,o=0;oh))return!1;var p=f.get(t),g=f.get(e);if(p&&g)return p==e&&g==t;var v=-1,y=!0,m=n&s?new r:void 0;f.set(t,e),f.set(e,t);while(++vv)throw d(y);for(i=c(b,r),l=0;lx-r+n;l--)delete b[l-1]}else if(n>r)for(l=x-r;l>w;l--)h=l+r-1,m=l+n-1,h in b?b[m]=b[h]:delete b[m];for(l=0;l0){if(o=u.removeMin(),a=s[o],a.distance===Number.POSITIVE_INFINITY)break;r(o).forEach(c)}return s}},a4a4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r="dblclick",i=["click","dblclick"],o={getDefaultCfg:function(){return{trigger:r}},getEvents:function(){var t,e;return i.includes(this.trigger)?e=this.trigger:(e=r,console.warn("Behavior collapse-expand-group 的 trigger 参数不合法,请输入 'click' 或 'dblclick'")),t={},t[""+e]="onComboClick",t},onComboClick:function(t){var e=t.item,n=this.graph;if(e&&"combo"===e.getType()){var r=e.getModel(),i=r.id;i&&(n.collapseExpandCombo(i),n.get("layout")?n.layout():n.refreshPositions())}}};e.default=o},a524:function(t,e,n){var r=n("4245");function i(t){return r(this,t).has(t)}t.exports=i},a5d2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("72fb"),i=n("cdca"),o=Object.prototype.hasOwnProperty;e.default=function(t,e){if(null===t||!i.default(t))return{};var n={};return r.default(e,(function(e){o.call(t,e)&&(n[e]=t[e])})),n}},a645:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("842b"),i=function(t){return r.default(t)&&t%1!==0};e.default=i},a6d1:function(t,e,n){"use strict";var r=n("6f9c"),i=n("299f");function o(t){var e="greedy"===t.graph().acyclicer?i(t,n(t)):a(t);function n(t){return function(e){return t.edge(e).weight}}r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))}function a(t){var e=[],n={},i={};function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a])}return r.forEach(t.nodes(),o),e}function s(t){r.forEach(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)}}))}t.exports={run:o,undo:s}},a864:function(t,e,n){"use strict";var r=n("6f9c");function i(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||a(t)}function o(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||u(t),"lr"!==e&&"rl"!==e||(f(t),a(t))}function a(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){s(t.edge(e))}))}function s(t){var e=t.width;t.width=t.height,t.height=e}function u(t){r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,c),r.has(n,"y")&&c(n)}))}function c(t){t.y=-t.y}function f(t){r.forEach(t.nodes(),(function(e){l(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,l),r.has(n,"x")&&l(n)}))}function l(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:i,undo:o}},a994:function(t,e,n){var r=n("7d1f"),i=n("32f4"),o=n("ec69");function a(t){return r(t,o,i)}t.exports=a},a9e3:function(t,e,n){"use strict";var r=n("83ab"),i=n("da84"),o=n("e330"),a=n("94ca"),s=n("6eeb"),u=n("1a2d"),c=n("7156"),f=n("3a9b"),l=n("d9b5"),h=n("c04e"),d=n("d039"),p=n("241c").f,g=n("06cf").f,v=n("9bf2").f,y=n("408a"),m=n("58a8").trim,b="Number",x=i[b],w=x.prototype,M=i.TypeError,_=o("".slice),S=o("".charCodeAt),P=function(t){var e=h(t,"number");return"bigint"==typeof e?e:k(e)},k=function(t){var e,n,r,i,o,a,s,u,c=h(t,"number");if(l(c))throw M("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),e=S(c,0),43===e||45===e){if(n=S(c,2),88===n||120===n)return NaN}else if(48===e){switch(S(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(o=_(c,2),a=o.length,s=0;si)return NaN;return parseInt(o,r)}return+c};if(a(b,!x(" 0o1")||!x("0b1")||x("+0x1"))){for(var C,O=function(t){var e=arguments.length<1?0:x(P(t)),n=this;return f(w,n)&&d((function(){y(n)}))?c(Object(e),n,O):e},E=r?p(x):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),A=0;E.length>A;A++)u(x,C=E[A])&&!u(O,C)&&v(O,C,g(x,C));O.prototype=w,w.constructor=O,s(i,b,O)}},aaec:function(t,e){var n="\\ud800-\\udfff",r="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",a=r+i+o,s="\\ufe0e\\ufe0f",u="\\u200d",c=RegExp("["+u+n+a+s+"]");function f(t){return c.test(t)}t.exports=f},aaf9:function(t,e,n){var r=n("df2e");function i(t,e){return r(t,e,"pre")}t.exports=i},ab81:function(t,e){var n="\\ud800-\\udfff",r="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",a=r+i+o,s="\\ufe0e\\ufe0f",u="["+n+"]",c="["+a+"]",f="\\ud83c[\\udffb-\\udfff]",l="(?:"+c+"|"+f+")",h="[^"+n+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",v=l+"?",y="["+s+"]?",m="(?:"+g+"(?:"+[h,d,p].join("|")+")"+y+v+")*",b=y+v+m,x="(?:"+[h+c+"?",c,d,p,u].join("|")+")",w=RegExp(f+"(?="+f+")|"+x+b,"g");function M(t){var e=w.lastIndex=0;while(w.test(t))++e;return e}t.exports=M},abdd:function(t,e,n){var r=n("76e9"),i=n("57dc"),o=n("cd9d");function a(t){return t&&t.length?r(t,o,i):void 0}t.exports=a},ac0d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("c3e2"),o=n("d6a3"),a=n("8937"),s=n("9705"),u=n("3dfb"),c=n("4dab"),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),this.setArrow(),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.setArrow=function(){var t=this.attr(),e=this.attrs,n=e.points,r=e.startArrow,i=e.endArrow,o=n.length,a=n[0][0],s=n[0][1],u=n[o-1][0],f=n[o-1][1];r&&c.addStartArrow(this,t,n[1][0],n[1][1],a,s),i&&c.addEndArrow(this,t,n[o-2][0],n[o-2][1],u,f)},e.prototype.isFill=function(){return!1},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){if(!n||!i)return!1;var o=this.attr().points;return u.default(o,i,t,e,!1)},e.prototype.isStroke=function(){return!0},e.prototype.createPath=function(t){var e=this.attr(),n=e.points,r=e.startArrow,i=e.endArrow,o=n.length;if(!(n.length<2)){var a=n[0][0],s=n[0][1],u=n[o-1][0],f=n[o-1][1];if(r&&r.d){var l=c.getShortenOffset(a,s,n[1][0],n[1][1],r.d);a+=l.dx,s+=l.dy}if(i&&i.d){l=c.getShortenOffset(n[o-2][0],n[o-2][1],u,f,i.d);u-=l.dx,f-=l.dy}t.beginPath(),t.moveTo(a,s);for(var h=0;h=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),i.default.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,o=0,s=[];a.each(t,(function(a,u){t[u+1]&&(n=[],n[0]=o/e,r=i.default.length(a[0],a[1],t[u+1][0],t[u+1][1]),o+=r,n[1]=o/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(s.default);e.default=f},ac41:function(t,e){function n(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}t.exports=n},ac5d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"depthFirstSearch",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"breadthFirstSearch",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"detectDirectedCycle",{enumerable:!0,get:function(){return o.default}});var r=a(n("c01c")),i=a(n("5439b")),o=a(n("b449"));function a(t){return t&&t.__esModule?t:{default:t}}},acd5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("8937"),o=n("7a70"),a=n("d531"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="path",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),a=this.get("el");i.each(e||r,(function(e,s){if("path"===s&&i.isArray(e))a.setAttribute("d",n._formatPath(e));else if("startArrow"===s||"endArrow"===s)if(e){var u=i.isObject(e)?t.addArrow(r,o.SVG_ATTR_MAP[s]):t.getDefaultArrow(r,o.SVG_ATTR_MAP[s]);a.setAttribute(o.SVG_ATTR_MAP[s],"url(#"+u+")")}else a.removeAttribute(o.SVG_ATTR_MAP[s]);else o.SVG_ATTR_MAP[s]&&a.setAttribute(o.SVG_ATTR_MAP[s],e)}))},e.prototype._formatPath=function(t){var e=t.map((function(t){return t.join(" ")})).join("");return~e.indexOf("NaN")?"":e},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var e=this.get("el"),n=this.getTotalLength(),r=e?e.getPointAtLength(t*n):null;return r?{x:r.x,y:r.y}:null},e}(a.default);e.default=s},ace6:function(t,e,n){"use strict";var r=n("9ab4"),i=n("8937"),o=s(n("067f")),a=s(n("7da3"));function s(t){return t&&t.__esModule?t:{default:t}}a.default.registerNode("ellipse",{options:{size:[120,60],style:{x:0,y:0,stroke:o.default.defaultShapeStrokeColor,fill:o.default.defaultShapeFillColor,lineWidth:1},labelCfg:{style:{fill:"#595959"}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:3,lineWidth:1,fill:"#72CC4A",stroke:"#72CC4A"},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/basement_prod/012bcf4f-423b-4922-8c24-32a89f8c41ce.svg",width:36,height:36}},shapeType:"ellipse",labelPosition:"center",drawShape:function(t,e){var n=this.options.icon,o=this.getShapeStyle(t),a=(0,i.mix)({},n,t.icon),s=e.addShape("ellipse",{attrs:o,className:"ellipse-keyShape",name:"ellipse-keyShape",draggable:!0}),u=a.width,c=a.height,f=a.show;if(f)e.addShape("image",{attrs:(0,r.__assign)({x:-u/2,y:-c/2},a),className:"ellipse-icon",name:"ellipse-icon",draggable:!0});return this.drawLinkPoints(t,e),s},drawLinkPoints:function(t,e){var n=this.options.linkPoints,o=(0,i.mix)({},n,t.linkPoints),a=o.top,s=o.left,u=o.right,c=o.bottom,f=o.size,l=(0,r.__rest)(o,["top","left","right","bottom","size"]),h=this.getSize(t),d=h[0]/2,p=h[1]/2;s&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:-d,y:0,r:f}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0}),u&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:d,y:0,r:f}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0}),a&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:0,y:-p,r:f}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0}),c&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},l),{x:0,y:p,r:f}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0})},getShapeStyle:function(t){var e=this.options.style,n={stroke:t.color},r=(0,i.mix)({},e,n,t.style),o=this.getSize(t),a=o[0]/2,s=o[1]/2,u=Object.assign({},{x:0,y:0,rx:a,ry:s},r);return u},update:function(t,e){var n=e.getContainer(),r=this.options.style,o=this.getSize(t),a={stroke:t.color,rx:o[0]/2,ry:o[1]/2},s=e.get("keyShape"),u=(0,i.mix)({},r,s.attr(),a);u=(0,i.mix)(u,t.style),this.updateShape(t,e,u,!0),this.updateLinkPoints(t,n)}},"single-node")},ad5a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5830"),i=n("8937");r.angle=function(t,e){var n=r.dot(t,e)/(r.length(t)*r.length(e));return Math.acos(i.clamp(n,-1,1))},r.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},r.angleTo=function(t,e,n){var i=r.angle(t,e),o=r.direction(t,e)>=0;return n?o?2*Math.PI-i:i:o?i:2*Math.PI-i},r.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},e.default=r},addb:function(t,e,n){var r=n("f36a"),i=Math.floor,o=function(t,e){var n=t.length,u=i(n/2);return n<8?a(t,e):s(t,o(r(t,0,u),e),o(r(t,u),e),e)},a=function(t,e){var n,r,i=t.length,o=1;while(o0)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},s=function(t,e,n,r){var i=e.length,o=n.length,a=0,s=0;while(athis.get("maxZoom")||s-1&&t%1==0&&t<=n}t.exports=r},b3b0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(!i(t))throw new TypeError("input must be an array");if(0===t.length)throw new TypeError("input must not be empty");var n=e.fromIndex,r=void 0===n?0:n,o=e.toIndex,a=void 0===o?t.length:o;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(a<=r||a>t.length||!Number.isInteger(a))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],u=r+1;us&&(s=t[u]);return s}var a=o;function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i(t))throw new TypeError("input must be an array");if(0===t.length)throw new TypeError("input must not be empty");var n=e.fromIndex,r=void 0===n?0:n,o=e.toIndex,a=void 0===o?t.length:o;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(a<=r||a>t.length||!Number.isInteger(a))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],u=r+1;u1&&void 0!==arguments[1]?arguments[1]:{};if(!i(t))throw new TypeError("input must be an array");if(0===t.length)throw new TypeError("input must not be empty");if(void 0!==n.output){if(!i(n.output))throw new TypeError("output option must be an array if specified");e=n.output}else e=new Array(t.length);var r=u(t),o=a(t);if(r===o)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var s=n.min,c=void 0===s?n.autoMinMax?r:0:s,f=n.max,l=void 0===f?n.autoMinMax?o:1:f;if(c>=l)throw new RangeError("min option must be smaller than max option");for(var h=(l-c)/(o-r),d=0;d>t);return this},t.prototype.signPropagatingRightShiftM=function(t){if(t=e.checkMatrix(t),this.rows!==t.rows||this.columns!==t.columns)throw new RangeError("Matrices dimensions must be equal");for(let e=0;e>t.get(e,n));return this},t.signPropagatingRightShift=function(t,n){const r=new e(t);return r.signPropagatingRightShift(n)},t.prototype.rightShift=function(t){return"number"===typeof t?this.rightShiftS(t):this.rightShiftM(t)},t.prototype.rightShiftS=function(t){for(let e=0;e>>t);return this},t.prototype.rightShiftM=function(t){if(t=e.checkMatrix(t),this.rows!==t.rows||this.columns!==t.columns)throw new RangeError("Matrices dimensions must be equal");for(let e=0;e>>t.get(e,n));return this},t.rightShift=function(t,n){const r=new e(t);return r.rightShift(n)},t.prototype.zeroFillRightShift=t.prototype.rightShift,t.prototype.zeroFillRightShiftS=t.prototype.rightShiftS,t.prototype.zeroFillRightShiftM=t.prototype.rightShiftM,t.zeroFillRightShift=t.rightShift,t.prototype.not=function(){for(let t=0;tr)throw new RangeError("Row index out of range")}function m(t,e,n){let r=n?t.columns:t.columns-1;if(e<0||e>r)throw new RangeError("Column index out of range")}function b(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.columns)throw new RangeError("vector size must be the same as the number of columns");return e}function x(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.rows)throw new RangeError("vector size must be the same as the number of rows");return e}function w(t,e,n){return{row:M(t,e),column:_(t,n)}}function M(t,e){if("object"!==typeof e)throw new TypeError("unexpected type for row indices");let n=e.some(e=>e<0||e>=t.rows);if(n)throw new RangeError("row indices are out of range");return Array.isArray(e)||(e=Array.from(e)),e}function _(t,e){if("object"!==typeof e)throw new TypeError("unexpected type for column indices");let n=e.some(e=>e<0||e>=t.columns);if(n)throw new RangeError("column indices are out of range");return Array.isArray(e)||(e=Array.from(e)),e}function S(t,e,n,r,i){if(5!==arguments.length)throw new RangeError("expected 4 arguments");if(k("startRow",e),k("endRow",n),k("startColumn",r),k("endColumn",i),e>n||r>i||e<0||e>=t.rows||n<0||n>=t.rows||r<0||r>=t.columns||i<0||i>=t.columns)throw new RangeError("Submatrix indices are out of range")}function P(t,e=0){let n=[];for(let r=0;r=i)throw new RangeError("min must be smaller than max");let a=i-r,s=new H(t,e);for(let u=0;un?(i=!0,n=e):(r=!1,i=!0);t++}return r}isReducedEchelonForm(){let t=0,e=0,n=-1,r=!0,i=!1;while(tn?(i=!0,n=e):(r=!1,i=!0);for(let n=e+1;nt.get(r,n)&&(r=i);if(0===t.get(r,n))n++;else{t.swapRows(e,r);let i=t.get(e,n);for(let r=n;r=0)if(0===t.maxRow(r))r--;else{let i=0,o=!1;while(it&&(t=this.get(e,n));return t}maxIndex(){C(this);let t=this.get(0,0),e=[0,0];for(let n=0;nt&&(t=this.get(n,r),e[0]=n,e[1]=r);return e}min(){if(this.isEmpty())return NaN;let t=this.get(0,0);for(let e=0;ee&&(e=this.get(t,n));return e}maxRowIndex(t){y(this,t),C(this);let e=this.get(t,0),n=[t,0];for(let r=1;re&&(e=this.get(t,r),n[1]=r);return n}minRow(t){if(y(this,t),this.isEmpty())return NaN;let e=this.get(t,0);for(let n=1;ne&&(e=this.get(n,t));return e}maxColumnIndex(t){m(this,t),C(this);let e=this.get(0,t),n=[0,t];for(let r=1;re&&(e=this.get(r,t),n[0]=r);return n}minColumn(t){if(m(this,t),this.isEmpty())return NaN;let e=this.get(0,t);for(let n=1;n=n)throw new RangeError("min must be smaller than max");let r=new H(this.rows,this.columns);for(let i=0;i0&&c(t,{min:e,max:n,output:t}),r.setRow(i,t)}return r}scaleColumns(t={}){if("object"!==typeof t)throw new TypeError("options must be an object");const{min:e=0,max:n=1}=t;if(!Number.isFinite(e))throw new TypeError("min must be a number");if(!Number.isFinite(n))throw new TypeError("max must be a number");if(e>=n)throw new RangeError("min must be smaller than max");let r=new H(this.rows,this.columns);for(let i=0;in||e<0||e>=this.columns||n<0||n>=this.columns)throw new RangeError("Argument out of range");let r=new H(t.length,n-e+1);for(let i=0;i=this.rows)throw new RangeError("Row index out of range: "+t[i]);r.set(i,o-e,this.get(t[i],o))}return r}subMatrixColumn(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=this.rows-1),e>n||e<0||e>=this.rows||n<0||n>=this.rows)throw new RangeError("Argument out of range");let r=new H(n-e+1,t.length);for(let i=0;i=this.columns)throw new RangeError("Column index out of range: "+t[i]);r.set(o-e,i,this.get(o,t[i]))}return r}setSubMatrix(t,e,n){if(t=H.checkMatrix(t),t.isEmpty())return this;let r=e+t.rows-1,i=n+t.columns-1;S(this,e,r,n,i);for(let o=0;o=0){if(this.data=[],!(Number.isInteger(e)&&e>=0))throw new TypeError("nColumns must be a positive integer");for(let n=0;nMath.abs(u[i])&&(i=e);if(i!==n){for(r=0;r=0;o--){for(i=0;ie?r.set(i,e,t.get(i,e)):i===e?r.set(i,e,1):r.set(i,e,0);return r}get upperTriangularMatrix(){let t=this.LU,e=t.rows,n=t.columns,r=new H(e,n);for(let i=0;iMath.abs(e)?(n=e/t,Math.abs(t)*Math.sqrt(1+n*n)):0!==e?(n=t/e,Math.abs(e)*Math.sqrt(1+n*n)):0}class ft{constructor(t){t=at.checkMatrix(t);let e,n,r,i,o=t.clone(),a=t.rows,s=t.columns,u=new Float64Array(s);for(r=0;r=0;o--){for(i=0;i=0;n--){for(t=0;t=0;t--)if(0!==d[t]){for(let e=t+1;e=0;k--){if(k0){let t,e;for(t=M-2;t>=-1;t--){if(-1===t)break;const e=Number.MIN_VALUE+P*Math.abs(d[t]+Math.abs(d[t+1]));if(Math.abs(v[t])<=e||Number.isNaN(v[t])){v[t]=0;break}}if(t===M-2)e=4;else{let n;for(n=M-1;n>=t;n--){if(n===t)break;let e=(n!==M?Math.abs(v[n]):0)+(n!==t+1?Math.abs(v[n-1]):0);if(Math.abs(d[n])<=P*e){d[n]=0;break}}n===t?e=3:n===M-1?e=1:(e=2,t=n)}switch(t++,e){case 1:{let e=v[M-2];v[M-2]=0;for(let n=M-2;n>=t;n--){let i=ct(d[n],e),o=d[n]/i,a=e/i;if(d[n]=i,n!==t&&(e=-a*v[n-1],v[n-1]=o*v[n-1]),c)for(let t=0;t=d[t+1])break;let e=d[t];if(d[t]=d[t+1],d[t+1]=e,c&&te&&i.set(c,n,t.get(c,n)/this.s[n]);let o=this.U,a=o.rows,s=o.columns,u=new H(n,a);for(let c=0;ct&&e++;return e}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return H.diag(this.s)}}function ht(t,e=!1){return t=at.checkMatrix(t),e?new lt(t).inverse():dt(t,H.eye(t.rows))}function dt(t,e,n=!1){return t=at.checkMatrix(t),e=at.checkMatrix(e),n?new lt(t).solve(e):t.isSquare()?new ut(t).solve(e):new ft(t).solve(e)}function pt(t){if(t=H.checkMatrix(t),t.isSquare()){if(0===t.columns)return 1;let e,n,r,i;if(2===t.columns)return e=t.get(0,0),n=t.get(0,1),r=t.get(1,0),i=t.get(1,1),e*i-n*r;if(3===t.columns){let i,o,a;return i=new nt(t,[1,2],[1,2]),o=new nt(t,[1,2],[0,2]),a=new nt(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*pt(i)-n*pt(o)+r*pt(a)}return new ut(t).determinant}throw Error("determinant can only be calculated for a square matrix")}function gt(t,e){let n=[];for(let r=0;ri)return new Array(e.rows+1).fill(0);{let t=e.addRow(n,[0]);for(let e=0;ee?o[a]=1/o[a]:o[a]=0;return i.mmul(H.diag(o).mmul(r.transpose()))}function bt(t,e=t,n={}){t=new H(t);let r=!1;if("object"!==typeof e||H.isMatrix(e)||Array.isArray(e)?e=new H(e):(n=e,e=t,r=!0),t.rows!==e.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:i=!0}=n;i&&(t=t.center("column"),r||(e=e.center("column")));const o=t.transpose().mmul(e);for(let a=0;a0?o.set(t,t+1,r[t]):r[t]<0&&o.set(t,t-1,r[t])}return o}}function Mt(t,e,n,r){let i,o,a,s,u,c,f,l;for(u=0;u0;s--){for(l=0,a=0,c=0;c0&&(o=-o),e[s]=l*o,a-=i*o,n[s-1]=i-o,u=0;uc){x=0;do{for(x+=1,i=n[c],l=(n[c+1]-i)/(2*e[c]),h=ct(l,1),l<0&&(h=-h),n[c]=e[c]/(l+h),n[c+1]=e[c]*(l+h),d=n[c+1],o=i-n[c],a=c+2;a=c;a--)for(v=g,g=p,b=m,i=p*e[a],o=p*l,h=ct(l,e[a]),e[a+1]=m*h,m=e[a]/h,p=l/h,l=p*n[a]-m*i,n[a+1]=o+m*(p*i+m*n[a]),u=0;u_*M)}n[c]=n[c]+w,e[c]=0}for(a=0;a=c;s--)n[s]=e.get(s,c-1)/f,a+=n[s]*n[s];for(o=Math.sqrt(a),n[c]>0&&(o=-o),a-=n[c]*o,n[c]=n[c]-o,u=c;u=c;s--)i+=n[s]*e.get(s,u);for(i/=a,s=c;s<=h;s++)e.set(s,u,e.get(s,u)-i*n[s])}for(s=0;s<=h;s++){for(i=0,u=h;u>=c;u--)i+=n[u]*e.get(s,u);for(i/=a,u=c;u<=h;u++)e.set(s,u,e.get(s,u)-i*n[u])}n[c]=f*n[c],e.set(c,c-1,f*o)}}for(s=0;s=l+1;c--)if(0!==e.get(c,c-1)){for(s=c+1;s<=h;s++)n[s]=e.get(s,c-1);for(u=c;u<=h;u++){for(o=0,s=c;s<=h;s++)o+=n[s]*r.get(s,u);for(o=o/n[c]/e.get(c,c-1),s=c;s<=h;s++)r.set(s,u,r.get(s,u)+o*n[s])}}}function Pt(t,e,n,r,i){let o,a,s,u,c,f,l,h,d,p,g,v,y,m,b,x=t-1,w=0,M=t-1,_=Number.EPSILON,S=0,P=0,k=0,C=0,O=0,E=0,A=0,j=0;for(o=0;oM)&&(n[o]=i.get(o,o),e[o]=0),a=Math.max(o-1,0);a=w){u=x;while(u>w){if(E=Math.abs(i.get(u-1,u-1))+Math.abs(i.get(u,u)),0===E&&(E=P),Math.abs(i.get(u,u-1))<_*E)break;u--}if(u===x)i.set(x,x,i.get(x,x)+S),n[x]=i.get(x,x),e[x]=0,x--,j=0;else if(u===x-1){if(l=i.get(x,x-1)*i.get(x-1,x),k=(i.get(x-1,x-1)-i.get(x,x))/2,C=k*k+l,A=Math.sqrt(Math.abs(C)),i.set(x,x,i.get(x,x)+S),i.set(x-1,x-1,i.get(x-1,x-1)+S),h=i.get(x,x),C>=0){for(A=k>=0?k+A:k-A,n[x-1]=h+A,n[x]=n[x-1],0!==A&&(n[x]=h-l/A),e[x-1]=0,e[x]=0,h=i.get(x,x-1),E=Math.abs(h)+Math.abs(A),k=h/E,C=A/E,O=Math.sqrt(k*k+C*C),k/=O,C/=O,a=x-1;a0)){for(E=Math.sqrt(E),d=u){if(A=i.get(c,c),O=h-A,E=d-A,k=(O*E-l)/i.get(c+1,c)+i.get(c,c+1),C=i.get(c+1,c+1)-A-O-E,O=i.get(c+2,c+1),E=Math.abs(k)+Math.abs(C)+Math.abs(O),k/=E,C/=E,O/=E,c===u)break;if(Math.abs(i.get(c,c-1))*(Math.abs(C)+Math.abs(O))<_*(Math.abs(k)*(Math.abs(i.get(c-1,c-1))+Math.abs(A)+Math.abs(i.get(c+1,c+1)))))break;c--}for(o=c+2;o<=x;o++)i.set(o,o-2,0),o>c+2&&i.set(o,o-3,0);for(s=c;s<=x-1;s++){if(m=s!==x-1,s!==c&&(k=i.get(s,s-1),C=i.get(s+1,s-1),O=m?i.get(s+2,s-1):0,h=Math.abs(k)+Math.abs(C)+Math.abs(O),0!==h&&(k/=h,C/=h,O/=h)),0===h)break;if(E=Math.sqrt(k*k+C*C+O*O),k<0&&(E=-E),0!==E){for(s!==c?i.set(s,s-1,-E*h):u!==c&&i.set(s,s-1,-i.get(s,s-1)),k+=E,h=k/E,d=C/E,A=O/E,C/=k,O/=k,a=s;a=0;x--)if(k=n[x],C=e[x],0===C)for(u=x,i.set(x,x,1),o=x-1;o>=0;o--){for(l=i.get(o,o)-k,O=0,a=u;a<=x;a++)O+=i.get(o,a)*i.get(a,x);if(e[o]<0)A=l,E=O;else if(u=o,0===e[o]?i.set(o,x,0!==l?-O/l:-O/(_*P)):(h=i.get(o,o+1),d=i.get(o+1,o),C=(n[o]-k)*(n[o]-k)+e[o]*e[o],f=(h*E-A*O)/C,i.set(o,x,f),i.set(o+1,x,Math.abs(h)>Math.abs(A)?(-O-l*f)/h:(-E-d*f)/A)),f=Math.abs(i.get(o,x)),_*f*f>1)for(a=o;a<=x;a++)i.set(a,x,i.get(a,x)/f)}else if(C<0)for(u=x-1,Math.abs(i.get(x,x-1))>Math.abs(i.get(x-1,x))?(i.set(x-1,x-1,C/i.get(x,x-1)),i.set(x-1,x,-(i.get(x,x)-k)/i.get(x,x-1))):(b=kt(0,-i.get(x-1,x),i.get(x-1,x-1)-k,C),i.set(x-1,x-1,b[0]),i.set(x-1,x,b[1])),i.set(x,x-1,0),i.set(x,x,1),o=x-2;o>=0;o--){for(p=0,g=0,a=u;a<=x;a++)p+=i.get(o,a)*i.get(a,x-1),g+=i.get(o,a)*i.get(a,x);if(l=i.get(o,o)-k,e[o]<0)A=l,O=p,E=g;else if(u=o,0===e[o]?(b=kt(-p,-g,l,C),i.set(o,x-1,b[0]),i.set(o,x,b[1])):(h=i.get(o,o+1),d=i.get(o+1,o),v=(n[o]-k)*(n[o]-k)+e[o]*e[o]-C*C,y=2*(n[o]-k)*C,0===v&&0===y&&(v=_*P*(Math.abs(l)+Math.abs(C)+Math.abs(h)+Math.abs(d)+Math.abs(A))),b=kt(h*O-A*p+C*g,h*E-A*g-C*p,v,y),i.set(o,x-1,b[0]),i.set(o,x,b[1]),Math.abs(h)>Math.abs(A)+Math.abs(C)?(i.set(o+1,x-1,(-p-l*i.get(o,x-1)+C*i.get(o,x))/h),i.set(o+1,x,(-g-l*i.get(o,x)-C*i.get(o,x-1))/h)):(b=kt(-O-d*i.get(o,x-1),-E-d*i.get(o,x),A,C),i.set(o+1,x-1,b[0]),i.set(o+1,x,b[1]))),f=Math.max(Math.abs(i.get(o,x-1)),Math.abs(i.get(o,x))),_*f*f>1)for(a=o;a<=x;a++)i.set(a,x-1,i.get(a,x-1)/f),i.set(a,x,i.get(a,x)/f)}for(o=0;oM)for(a=o;a=w;a--)for(o=w;o<=M;o++){for(A=0,s=w;s<=Math.min(a,M);s++)A+=r.get(o,s)*i.get(s,a);r.set(o,a,A)}}}function kt(t,e,n,r){let i,o;return Math.abs(n)>Math.abs(r)?(i=r/n,o=n+i*r,[(t+i*e)/o,(e-i*t)/o]):(i=n/r,o=r+i*n,[(i*t+e)/o,(i*e-t)/o])}class Ct{constructor(t){if(t=at.checkMatrix(t),!t.isSymmetric())throw new Error("Matrix is not symmetric");let e,n,r,i=t,o=i.rows,a=new H(o,o),s=!0;for(n=0;n0,a.set(n,n,Math.sqrt(Math.max(t,0))),r=n+1;r=0;o--)for(i=0;io;h++)c=t.transpose().mmul(a).div(a.transpose().mmul(a).get(0,0)),c=c.div(c.norm()),s=t.mmul(c).div(c.transpose().mmul(c).get(0,0)),h>0&&(l=s.clone().sub(f).pow(2).sum()),f=s.clone(),n?(u=n.transpose().mmul(s).div(s.transpose().mmul(s).get(0,0)),u=u.div(u.norm()),a=n.mmul(u).div(u.transpose().mmul(u).get(0,0))):a=s;if(n){let e=t.transpose().mmul(s).div(s.transpose().mmul(s).get(0,0));e=e.div(e.norm());let r=t.clone().sub(s.clone().mmul(e.transpose())),i=a.transpose().mmul(s).div(s.transpose().mmul(s).get(0,0)),o=n.clone().sub(s.clone().mulS(i.get(0,0)).mmul(u.transpose()));this.t=s,this.p=e.transpose(),this.w=c.transpose(),this.q=u,this.u=a,this.s=s.transpose().mmul(s),this.xResidual=r,this.yResidual=o,this.betas=i}else this.w=c.transpose(),this.s=s.transpose().mmul(s).sqrt(),this.t=r?s.clone().div(this.s.get(0,0)):s,this.xResidual=t.sub(s.mmul(c.transpose()))}}},b4b0:function(t,e,n){var r=n("8d74"),i=n("1a8c"),o=n("ffd6"),a=NaN,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function l(t){if("number"==typeof t)return t;if(o(t))return a;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=u.test(t);return n||c.test(t)?f(t.slice(2),n?2:8):s.test(t)?a:+t}t.exports=l},b4c0:function(t,e,n){var r=n("cb5a");function i(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}t.exports=i},b50e:function(t,e,n){"use strict";var r=n("6f9c"),i=n("17d5").Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(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 s(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e}function u(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)}function c(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)}function f(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,c=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a),{x:i+n,y:o+r}}function l(t){var e=r.map(r.range(g(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e}function h(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))}function d(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!==0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))}function p(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(t,"border",i,e)}function g(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}function v(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n}function y(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}}function m(t,e){return e()}t.exports={addDummyNode:o,simplify:a,asNonCompoundGraph:s,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:l,normalizeRanks:h,removeEmptyRanks:d,addBorderNode:p,maxRank:g,partition:v,time:y,notime:m}},b5a7:function(t,e,n){var r=n("0b07"),i=n("2b3e"),o=r(i,"DataView");t.exports=o},b681:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LinkedListNode=void 0;var r=i(n("0f5a"));function i(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(t,e){void 0===e&&(e=null),this.value=t,this.next=e}return t.prototype.toString=function(t){return t?t(this.value):""+this.value},t}();e.LinkedListNode=o;var a=function(){function t(t){void 0===t&&(t=null),this.head=null,this.tail=null,this.compare=new r.default(t)}return t.prototype.prepend=function(t){var e=new o(t,this.head);return this.head=e,this.tail||(this.tail=e),this},t.prototype.append=function(t){var e=new o(t);return this.head?(this.tail.next=e,this.tail=e,this):(this.head=e,this.tail=e,this)},t.prototype.delete=function(t){if(!this.head)return null;var e=null;while(this.head&&this.compare.equal(this.head.value,t))e=this.head,this.head=this.head.next;var n=this.head;if(null!==n)while(n.next)this.compare.equal(n.next.value,t)?(e=n.next,n.next=n.next.next):n=n.next;return this.compare.equal(this.tail.value,t)&&(this.tail=n),e},t.prototype.find=function(t){var e=t.value,n=void 0===e?void 0:e,r=t.callback,i=void 0===r?void 0:r;if(!this.head)return null;var o=this.head;while(o){if(i&&i(o.value))return o;if(void 0!==n&&this.compare.equal(o.value,n))return o;o=o.next}return null},t.prototype.deleteTail=function(){var t=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,t;var e=this.head;while(e.next)e.next.next?e=e.next:e.next=null;return this.tail=e,t},t.prototype.deleteHead=function(){if(!this.head)return null;var t=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),t},t.prototype.fromArray=function(t){var e=this;return t.forEach((function(t){return e.append(t)})),this},t.prototype.toArray=function(){var t=[],e=this.head;while(e)t.push(e),e=e.next;return t},t.prototype.reverse=function(){var t=this.head,e=null,n=null;while(t)n=t.next,t.next=e,e=t,t=n;this.tail=this.head,this.head=e},t.prototype.toString=function(t){return void 0===t&&(t=void 0),this.toArray().map((function(e){return e.toString(t)})).toString()},t}(),s=a;e.default=s},b760:function(t,e,n){var r=n("872a"),i=n("9638");function o(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}t.exports=o},b7ca:function(t,e,n){"use strict";n("4166")},b8ce:function(t,e,n){var r=n("3818"),i=4;function o(t){return r(t,i)}t.exports=o},ba23:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t){var e={};return t.getNodes().forEach((function(t){e[t.getID()]={degree:0,inDegree:0,outDegree:0}})),t.getEdges().forEach((function(t){e[t.getSource().getID()].degree++,e[t.getSource().getID()].outDegree++,e[t.getTarget().getID()].degree++,e[t.getTarget().getID()].inDegree++})),e},i=r;e.default=i},badf:function(t,e,n){var r=n("642a"),i=n("1838"),o=n("cd9d"),a=n("6747"),s=n("f9ce");function u(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}t.exports=u},bb07:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=800,i=function(){function t(t){this.disp=[],this.positions=t.positions,this.adjMatrix=t.adjMatrix,this.focusID=t.focusID,this.radii=t.radii,this.iterations=t.iterations||10,this.height=t.height||10,this.width=t.width||10,this.speed=t.speed||100,this.gravity=t.gravity||10,this.nodeSizeFunc=t.nodeSizeFunc,this.k=t.k||5,this.strictRadial=t.strictRadial,this.nodes=t.nodes}return t.prototype.layout=function(){var t=this,e=t.positions,n=[],r=t.iterations,i=t.width/10;t.maxDisplace=i,t.disp=n;for(var o=0;ou?1:-1;c=.01*h,f=.01*h}if(lMath.PI/2&&(f-=Math.PI/2,s*=-1,u*=-1);var l=Math.cos(f)*c;t.x=s*l,t.y=u*l}));var u=t.radii;e.forEach((function(t,c){if(c!==a){var f=Math.sqrt(n[c].x*n[c].x+n[c].y*n[c].y);if(f>0&&c!==a){var l=Math.min(s*(i/r),f);if(t[0]+=n[c].x/f*l,t[1]+=n[c].y/f*l,o){var h=t[0]-e[a][0],d=t[1]-e[a][1],p=Math.sqrt(h*h+d*d);h=h/p*u[c],d=d/p*u[c],t[0]=e[a][0]+h,t[1]=e[a][1]+d}}}}))},t}(),o=i;e.default=o},bb3a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("6855"),o=n("7a70"),a=n("814b"),s=n("060b"),u=n("487c"),c=n("aeb1"),f=n("a3df"),l=n("6891"),h=function(t){function e(e){return t.call(this,r.__assign(r.__assign({},e),{autoDraw:!0,renderer:"svg"}))||this}return r.__extends(e,t),e.prototype.getShapeBase=function(){return c},e.prototype.getGroupBase=function(){return f.default},e.prototype.getShape=function(t,e,n){var r=n.target||n.srcElement;if(!o.SHAPE_TO_TAGS[r.tagName]){var i=r.parentNode;while(i&&!o.SHAPE_TO_TAGS[i.tagName])i=i.parentNode;r=i}return this.find((function(t){return t.get("el")===r}))},e.prototype.createDom=function(){var t=u.createSVGElement("svg"),e=new l.default(t);return t.setAttribute("width",""+this.get("width")),t.setAttribute("height",""+this.get("height")),this.set("context",e),t},e.prototype.onCanvasChange=function(t){var e=this.get("context"),n=this.get("el");if("sort"===t){var r=this.get("children");r&&r.length&&u.sortDom(this,(function(t,e){return r.indexOf(t)-r.indexOf(e)?1:0}))}else if("clear"===t){if(n){n.innerHTML="";var i=e.el;i.innerHTML="",n.appendChild(i)}}else"matrix"===t?s.setTransform(this):"clip"===t?s.setClip(this,e):"changeSize"===t&&(n.setAttribute("width",""+this.get("width")),n.setAttribute("height",""+this.get("height")))},e.prototype.draw=function(){var t=this.get("context"),e=this.getChildren();s.setClip(this,t),e.length&&a.drawChildren(t,e)},e}(i.AbstractCanvas);e.default=h},bbc0:function(t,e,n){var r=n("6044"),i="__lodash_hash_undefined__",o=Object.prototype,a=o.hasOwnProperty;function s(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return a.call(e,t)?e[t]:void 0}t.exports=s},bc08:function(t,e,n){"use strict";n("1529"),n("f1a7"),n("ace6"),n("1f59"),n("bd87"),n("e2f9"),n("a052"),n("2aaa")},bcdf:function(t,e){function n(){}t.exports=n},bd06:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("f4c8");function i(t,e,n){var i=r.getOffScreenContext();return t.createPath(i),i.isPointInPath(e,n)}e.default=i},bd82:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("c360")),i=o(n("d99a"));function o(t){return t&&t.__esModule?t:{default:t}}var a={onMouseEnter:function(t){var e=t.item;this.shouldBegin(t)&&(this.currentTarget=e,this.showTooltip(t),this.graph.emit("tooltipchange",{item:t.item,action:"show"}))},onMouseMove:function(t){this.shouldUpdate(t)?this.currentTarget&&t.item===this.currentTarget&&this.updatePosition(t):this.hideTooltip()},onMouseLeave:function(t){this.shouldEnd(t)&&(this.hideTooltip(),this.graph.emit("tooltipchange",{item:this.currentTarget,action:"hide"}),this.currentTarget=null)},showTooltip:function(t){var e=this.container;if(t.item){e||(e=this.createTooltip(this.graph.get("canvas")),this.container=e);var n=this.formatText(t.item.get("model"),t);e.innerHTML=n,this.updatePosition(t),(0,r.default)(this.container,{visibility:"visible"})}},hideTooltip:function(){(0,r.default)(this.container,{visibility:"hidden"})},updatePosition:function(t){var e=this,n=e.width,i=e.height,o=e.container,a=t.canvasX,s=t.canvasY,u=o.getBoundingClientRect();a>n/2?a-=u.width:a+=this.offset,s>i/2?s-=u.height:s+=this.offset;var c=a+"px",f=s+"px";(0,r.default)(this.container,{left:c,top:f,visibility:"visible"})},createTooltip:function(t){var e=t.get("el");e.style.position="relative";var n=(0,i.default)('
');return e.parentNode.appendChild(n),(0,r.default)(n,{position:"absolute",visibility:"visible"}),this.width=t.get("width"),this.height=t.get("height"),this.container=n,n}};e.default=a},bd87:function(t,e,n){"use strict";var r=n("9ab4"),i=s(n("7da3")),o=n("8937"),a=s(n("067f"));function s(t){return t&&t.__esModule?t:{default:t}}i.default.registerNode("triangle",{options:{size:40,direction:"up",style:{stroke:a.default.defaultShapeStrokeColor,fill:a.default.defaultShapeFillColor,lineWidth:a.default.defaultNode.style.lineWidth},labelCfg:{style:{fill:"#595959"},offset:15},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:5,lineWidth:1,fill:"#fff",stroke:"#72CC4A"},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/basement_prod/012bcf4f-423b-4922-8c24-32a89f8c41ce.svg",width:16,height:16,offset:6}},shapeType:"triangle",labelPosition:"bottom",drawShape:function(t,e){var n=this.options,i=n.icon,a=n.direction,s=this.getShapeStyle(t),u=(0,o.mix)({},i,t.icon),c=t.direction||a,f=e.addShape("path",{attrs:s,className:"triangle-keyShape",name:"triangle-keyShape",draggable:!0}),l=u.width,h=u.height,d=u.show,p=u.offset;if(d){var g=-l/2,v=-h/2;"up"!==c&&"down"!==c||(v+=p),"left"!==c&&"right"!==c||(g+=p);e.addShape("image",{attrs:(0,r.__assign)({x:g,y:v},u),className:"triangle-icon",name:"triangle-icon",draggable:!0})}return this.drawLinkPoints(t,e),f},drawLinkPoints:function(t,e){var n=this.options,i=n.linkPoints,a=n.direction,s=(0,o.mix)({},i,t.linkPoints),u=t.direction||a,c=s.top,f=s.left,l=s.right,h=s.bottom,d=s.size,p=(0,r.__rest)(s,["top","left","right","bottom","size"]),g=this.getSize(t),v=g[0];if(f){var y=null,m=v*Math.sin(1/3*Math.PI),b=v*Math.sin(1/3*Math.PI);"up"===u?y=[-b,m]:"down"===u?y=[-b,-m]:"left"===u&&(y=[-b,b-m]),y&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},p),{x:y[0],y:y[1],r:d}),className:"link-point-left",name:"link-point-left"})}if(l){var x=null;m=v*Math.sin(1/3*Math.PI),b=v*Math.sin(1/3*Math.PI);"up"===u?x=[b,m]:"down"===u?x=[b,-m]:"right"===u&&(x=[b,b-m]),x&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},p),{x:x[0],y:x[1],r:d}),className:"link-point-right",name:"link-point-right"})}if(c){var w=null;m=v*Math.sin(1/3*Math.PI),b=v*Math.sin(1/3*Math.PI);"up"===u?w=[b-m,-m]:"left"===u?w=[b,-m]:"right"===u&&(w=[-b,-m]),w&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},p),{x:w[0],y:w[1],r:d}),className:"link-point-top",name:"link-point-top"})}if(h){var M=null;m=v*Math.sin(1/3*Math.PI),b=v*Math.sin(1/3*Math.PI);"down"===u?M=[-b+m,m]:"left"===u?M=[b,m]:"right"===u&&(M=[-b,m]),M&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},p),{x:M[0],y:M[1],r:d}),className:"link-point-bottom",name:"link-point-bottom"})}},getPath:function(t){var e=this.options.direction,n=t.direction||e,r=this.getSize(t),i=r[0],o=i*Math.sin(1/3*Math.PI),a=i*Math.sin(1/3*Math.PI),s=[["M",-a,o],["L",0,-o],["L",a,o],["Z"]];return"down"===n?s=[["M",-a,-o],["L",a,-o],["L",0,o],["Z"]]:"left"===n?s=[["M",-a,a-o],["L",a,-a],["L",a,a],["Z"]]:"right"===n&&(s=[["M",a,a-o],["L",-a,a],["L",-a,-a],["Z"]]),s},getShapeStyle:function(t){var e=this.options.style,n={stroke:t.color},i=(0,o.mix)({},e,n,t.style),a=this.getPath(t),s=(0,r.__assign)({path:a},i);return s},update:function(t,e){var n=e.getContainer(),r=this.options.style,i=this.getPath(t),a={stroke:t.color,path:i},s=e.get("keyShape"),u=(0,o.mix)({},r,s.attr(),a);u=(0,o.mix)(u,t.style),this.updateShape(t,e,u,!0),this.updateLinkPoints(t,n)},updateLinkPoints:function(t,e){var n=this.options,i=n.linkPoints,a=n.direction,s=t.direction||a,u=e.find((function(t){return"link-point-left"===t.get("className")})),c=e.find((function(t){return"link-point-right"===t.get("className")})),f=e.find((function(t){return"link-point-top"===t.get("className")})),l=e.find((function(t){return"link-point-bottom"===t.get("className")})),h=i,d=u||c||f||l;d&&(h=d.attr());var p=(0,o.mix)({},h,t.linkPoints),g=p.fill,v=p.stroke,y=p.lineWidth,m=p.size;m||(m=p.r);var b=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,bottom:void 0},x=b.left,w=b.right,M=b.top,_=b.bottom,S=this.getSize(t),P=S[0],k={r:m,fill:g,stroke:v,lineWidth:y},C=null,O=P*Math.sin(1/3*Math.PI),E=P*Math.sin(1/3*Math.PI);"up"===s?C=[-E,O]:"down"===s?C=[-E,-O]:"left"===s&&(C=[-E,E-O]),C&&(u?x||void 0===x?u.attr((0,r.__assign)((0,r.__assign)({},k),{x:C[0],y:C[1]})):u.remove():x&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},k),{x:C[0],y:C[1]}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0}));var A=null;"up"===s?A=[E,O]:"down"===s?A=[E,-O]:"right"===s&&(A=[E,E-O]),A&&(c?w||void 0===w?c.attr((0,r.__assign)((0,r.__assign)({},k),{x:A[0],y:A[1]})):c.remove():w&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},k),{x:A[0],y:A[1]}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0}));var j=null;"up"===s?j=[E-O,-O]:"left"===s?j=[E,-O]:"right"===s&&(j=[-E,-O]),j&&(f?M||void 0===M?f.attr((0,r.__assign)((0,r.__assign)({},k),{x:j[0],y:j[1]})):f.remove():M&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},k),{x:j[0],y:j[1]}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0}));var I=null;"down"===s?I=[-E+O,O]:"left"===s?I=[E,O]:"right"===s&&(I=[-E,O]),I&&(l?_||void 0===_?l.attr((0,r.__assign)((0,r.__assign)({},k),{x:I[0],y:I[1]})):l.remove():_&&e.addShape("circle",{attrs:(0,r.__assign)((0,r.__assign)({},k),{x:I[0],y:I[1]}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))}},"single-node")},bd8b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString,i=function(t,e){return r.call(t)==="[object "+e+"]"};e.default=i},be6e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("90f6"),i=n("90f6"),o=n("18f2");function a(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function s(t){t=(0,o.default)(t);for(var e=[],n=null,s=null,u=null,c=0,f=t.length,l=0;l-1&&t%1==0&&t1-a)s=t.getEndTangent();else{var c=t.getPoint(e+a);s.push([u.x,u.y]),s.push([c.x,c.y])}var d=Math.atan2(s[1][1]-s[0][1],s[1][0]-s[0][0]);if(d<0&&(d+=2*f),n&&(u.x+=h(d)*n,u.y+=l(d)*n),i){var p=d-f/2;d>.5*f&&d<1.5*f&&(p-=f),u.x+=h(p)*i,u.y+=l(p)*i}var g={x:u.x,y:u.y,angle:d};return o?(d>.5*f&&d<1.5*f&&(d-=f),(0,r.__assign)({rotate:d},g)):g};e.getLabelPosition=y;var m=function t(e,n){if(!1===n(e))return!1;if(e&&e.children)for(var r=e.children.length-1;r>=0;r--)if(!t(e.children[r],n))return!1;return!0},b=function t(e,n){if(e&&e.children)for(var r=e.children.length-1;r>=0;r--)if(!t(e.children[r],n))return;return!1!==n(e)},x=function(t,e){"function"===typeof e&&m(t,e)};e.traverseTree=x;var w=function(t,e){"function"===typeof e&&b(t,e)};e.traverseTreeUp=w;var M=function(t,e){var n=["V","TB","BT"],r={x:1/0,y:1/0},i={x:-1/0,y:-1/0},o="x",a="y";e&&n.indexOf(e)>=0&&(a="x",o="y");var s=0;x(t,(function(t){return s++,t.x>i.x&&(i.x=t.x),t.xi.y&&(i.y=t.y),t.y-1&&i.splice(u,1),a||(r={id:e,itemType:"node",comboId:n},o[e]={children:void 0}),e){var c=!1;if(n){var f=0;t&&t.forEach((function(t){c||x(t,(function(t){return n!==t.id||(c=!0,t.children?t.children.push(r):t.children=[r],f=t.depth,"node"===r.itemType?r.depth=f+2:r.depth=f+1,!1)}))}))}else n&&c||"node"===r.itemType||t.push(r);var l=r.depth;x(r,(function(t){return"node"===t.itemType?l+=2:l+=1,t.depth=l,!0}))}return t};e.reconstructTree=k;var C=function(t,e){var n={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,x:void 0,y:void 0,width:void 0,height:void 0};return t&&0!==t.length?(t.forEach((function(t){var r=e.findById(t.id);if(r.isVisible()){r.set("bboxCanvasCache",void 0);var i=r.getCanvasBBox();i.x&&n.minX>i.minX&&(n.minX=i.minX),i.y&&n.minY>i.minY&&(n.minY=i.minY),i.x&&n.maxX-1||(t.trigger=o,console.warn("Behavior brush-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),t.multiple?{"node:click":"onClick","combo:click":"onClick","canvas:click":"onCanvasClick",keyup:"onKeyUp",keydown:"onKeyDown"}:{"node:click":"onClick","combo:click":"onClick","canvas:click":"onCanvasClick"}},onClick:function(t){var e=this,n=t.item;if(n){var i=n.getType(),o=this,a=o.graph,s=o.keydown,u=o.multiple,c=o.shouldUpdate;if(!s||!u){var f=a.findAllByState(i,this.selectedState);(0,r.default)(f,(function(t){t!==n&&a.setItemState(t,e.selectedState,!1)}))}if(n.hasState(this.selectedState)){c.call(this,t)&&a.setItemState(n,this.selectedState,!1);var l=a.findAllByState("node",this.selectedState),h=a.findAllByState("combo",this.selectedState);a.emit("nodeselectchange",{target:n,selectedItems:{nodes:l,combos:h},select:!1})}else{c.call(this,t)&&a.setItemState(n,this.selectedState,!0);l=a.findAllByState("node",this.selectedState),h=a.findAllByState("combo",this.selectedState);a.emit("nodeselectchange",{target:n,selectedItems:{nodes:l,combos:h},select:!0})}}},onCanvasClick:function(){var t=this,e=this.graph,n=e.findAllByState("node",this.selectedState);(0,r.default)(n,(function(n){e.setItemState(n,t.selectedState,!1)}));var i=e.findAllByState("combo",this.selectedState);(0,r.default)(i,(function(n){e.setItemState(n,t.selectedState,!1)})),e.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[],combos:[]},select:!1})},onKeyDown:function(t){var e=t.key;e&&(e.toLowerCase()===this.trigger.toLowerCase()||"control"===e.toLowerCase()?this.keydown=!0:this.keydown=!1)},onKeyUp:function(){this.keydown=!1}};e.default=s},c27f:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShape=void 0;var r=n("d080"),i=n("a00f");function o(t,e){if(e){var n=i.invert(e);return i.multiplyVec2(n,t)}return t}function a(t,e,n){var r=t.getTotalMatrix();if(r){var i=o([e,n,1],r),a=i[0],s=i[1];return[a,s]}return[e,n]}function s(t,e,n){if(t.isCanvas&&t.isCanvas())return!0;if(!r.isAllowCapture(t)&&!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var i=a(t,e,n),o=i[0],s=i[1];if(t.isClipped(o,s))return!1}var u=t.cfg.cacheCanvasBBox;return u||(u=t.getCanvasBBox()),e>=u.minX&&e<=u.maxX&&n>=u.minY&&n<=u.maxY}function u(t,e,n){if(!s(t,e,n))return null;for(var r=null,i=t.getChildren(),o=i.length,c=o-1;c>=0;c--){var f=i[c];if(f.isGroup())r=u(f,e,n);else if(s(f,e,n)){var l=f,h=a(f,e,n),d=h[0],p=h[1];l.isInShape(d,p)&&(r=f)}if(r)break}return r}e.getShape=u},c2aa:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=u(n("0518")),o=u(n("067f")),a=n("c0b3"),s=u(n("842b"));function u(t){return t&&t.__esModule?t:{default:t}}var c="bboxCache",f="bboxCanvasCache",l="sizeCache",h="anchorPointsCache",d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{type:"combo",nodes:[],edges:[],combos:[]}},e.prototype.getShapeCfg=function(t){var e=this.get("styles"),n=this.get("bbox");if(e){var r=t,i={r:Math.hypot(n.height,n.width)/2||o.default.defaultCombo.size[0]/2,width:n.width||o.default.defaultCombo.size[0],height:n.height||o.default.defaultCombo.size[1]};r.style=Object.assign({},e,t.style,i);var a=t.padding||o.default.defaultCombo.padding;return(0,s.default)(a)?(i.r+=a,i.width+=2*a,i.height+=2*a):(i.r+=a[0],i.width+=a[1]+a[3]||2*a[1],i.height+=a[0]+a[2]||2*a[0]),this.set(l,i),r}return t},e.prototype.calculateCanvasBBox=function(){var t=this.get("keyShape"),e=this.get("group"),n=(0,a.getBBox)(t,e);n.x=n.minX,n.y=n.minY,n.centerX=(n.minX+n.maxX)/2,n.centerY=(n.minY+n.maxY)/2;var r=this.get(l);if(r){var i=this.get("keyShape"),o=i.get("type");"circle"===o?(n.width=2*r.r,n.height=2*r.r):(n.width=r.width,n.height=r.height),n.minX=n.centerX-n.width/2,n.minY=n.centerY-n.height/2,n.maxX=n.centerX+n.width/2,n.maxY=n.centerY+n.height/2}else n.width=n.maxX-n.minX,n.height=n.maxY-n.minY;return n},e.prototype.getChildren=function(){var t=this;return{nodes:t.getNodes(),combos:t.getCombos()}},e.prototype.getNodes=function(){var t=this;return t.get("nodes")},e.prototype.getCombos=function(){var t=this;return t.get("combos")},e.prototype.addChild=function(t){var e=this,n=t.getType();switch(n){case"node":e.addNode(t);break;case"combo":e.addCombo(t);break;default:return console.warn("Only node or combo items are allowed to be added into a combo"),!1}return!0},e.prototype.addCombo=function(t){var e=this;return e.get("combos").push(t),!0},e.prototype.addNode=function(t){var e=this;return e.get("nodes").push(t),!0},e.prototype.removeChild=function(t){var e=this,n=t.getType();switch(n){case"node":e.removeNode(t);break;case"combo":e.removeCombo(t);break;default:return console.warn("Only node or combo items are allowed to be added into a combo"),!1}return!0},e.prototype.removeCombo=function(t){var e=this.getCombos(),n=e.indexOf(t);return n>-1&&(e.splice(n,1),!0)},e.prototype.removeNode=function(t){var e=this.getNodes(),n=e.indexOf(t);return n>-1&&(e.splice(n,1),!0)},e.prototype.isOnlyMove=function(t){return!1},e.prototype.getBBox=function(){this.set(f,null);var t=this.calculateCanvasBBox();return t},e.prototype.clearCache=function(){this.set(c,null),this.set(f,null),this.set(h,null)},e.prototype.destroy=function(){if(!this.destroyed){var t=this.get("animate"),e=this.get("group");t&&e.stopAnimate(),this.clearCache(),this.set(l,null),this.set("bbox",null),e.remove(),this._cfg=null,this.destroyed=!0}},e}(i.default),p=d;e.default=p},c2b6:function(t,e,n){var r=n("f8af"),i=n("5d89"),o=n("6f6c"),a=n("a2db"),s=n("c8fe"),u="[object Boolean]",c="[object Date]",f="[object Map]",l="[object Number]",h="[object RegExp]",d="[object Set]",p="[object String]",g="[object Symbol]",v="[object ArrayBuffer]",y="[object DataView]",m="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",M="[object Int32Array]",_="[object Uint8Array]",S="[object Uint8ClampedArray]",P="[object Uint16Array]",k="[object Uint32Array]";function C(t,e,n){var C=t.constructor;switch(e){case v:return r(t);case u:case c:return new C(+t);case y:return i(t,n);case m:case b:case x:case w:case M:case _:case S:case P:case k:return s(t,n);case f:return new C;case l:case p:return new C(t);case h:return o(t);case d:return new C;case g:return a(t)}}t.exports=C},c2c1:function(t,e,n){},c31b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("c3e2"),i=n("b455"),o=n("493b");function a(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function s(t,e,n){var r=t+n-2*e;if(i.isNumberEqual(r,0))return[.5];var o=(t-e)/r;return o<=1&&o>=0?[o]:[]}function u(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function c(t,e,n,i,o,s,u){var c=a(t,n,o,u),f=a(e,i,s,u),l=r.default.pointAt(t,e,n,i,u),h=r.default.pointAt(n,i,o,s,u);return[[t,e,l.x,l.y,c,f],[c,f,h.x,h.y,o,s]]}function f(t,e,n,r,o,a,s){if(0===s)return(i.distance(t,e,n,r)+i.distance(n,r,o,a)+i.distance(t,e,o,a))/2;var u=c(t,e,n,r,o,a,.5),l=u[0],h=u[1];return l.push(s-1),h.push(s-1),f.apply(null,l)+f.apply(null,h)}e.default={box:function(t,e,n,r,o,u){var c=s(t,n,o)[0],f=s(e,r,u)[0],l=[t,o],h=[e,u];return void 0!==c&&l.push(a(t,n,o,c)),void 0!==f&&h.push(a(e,r,u,f)),i.getBBoxByArray(l,h)},length:function(t,e,n,r,i,o){return f(t,e,n,r,i,o,3)},nearestPoint:function(t,e,n,r,i,s,u,c){return o.nearestPoint([t,n,i],[e,r,s],u,c,a)},pointDistance:function(t,e,n,r,o,a,s,u){var c=this.nearestPoint(t,e,n,r,o,a,s,u);return i.distance(c.x,c.y,s,u)},interpolationAt:a,pointAt:function(t,e,n,r,i,o,s){return{x:a(t,n,i,s),y:a(e,r,o,s)}},divide:function(t,e,n,r,i,o,a){return c(t,e,n,r,i,o,a)},tangentAngle:function(t,e,n,r,o,a,s){var c=u(t,n,o,s),f=u(e,r,a,s),l=Math.atan2(f,c);return i.piMod(l)}}},c360:function(t,e,n){"use strict";function r(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},c3cd:function(t,e){t.exports="2.1.8"},c3e2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("b455"),i=n("6711");e.default={box:function(t,e,n,i){return r.getBBoxByArray([t,n],[e,i])},length:function(t,e,n,i){return r.distance(t,e,n,i)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,i,o,a){var s=(n-t)*(o-t)+(i-e)*(a-e);if(s<0)return r.distance(t,e,o,a);var u=(n-t)*(n-t)+(i-e)*(i-e);return s>u?r.distance(n,i,o,a):this.pointToLine(t,e,n,i,o,a)},pointToLine:function(t,e,n,r,o,a){var s=[n-t,r-e];if(i.exactEquals(s,[0,0]))return Math.sqrt((o-t)*(o-t)+(a-e)*(a-e));var u=[-s[1],s[0]];i.normalize(u,u);var c=[o-t,a-e];return Math.abs(i.dot(c,u))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}}},c3e8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("9705");function o(t,e,n,r){return t/(n*n)+e/(r*r)}var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var a=this.attr(),s=i/2,u=a.x,c=a.y,f=a.rx,l=a.ry,h=(t-u)*(t-u),d=(e-c)*(e-c);return r&&n?o(h,d,f+s,l+s)<=1:r?o(h,d,f,l)<=1:!!n&&(o(h,d,f-s,l-s)>=1&&o(h,d,f+s,l+s)<=1)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,r,i,o,0,0,2*Math.PI,!1);else{var a=i>o?i:o,s=i>o?1:i/o,u=i>o?o/i:1;t.save(),t.translate(n,r),t.scale(s,u),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(i.default);e.default=a},c3fc:function(t,e,n){var r=n("42a2"),i=n("1310"),o="[object Set]";function a(t){return i(t)&&r(t)==o}t.exports=a},c584:function(t,e){function n(t,e){return t.has(e)}t.exports=n},c5a2:function(t,e,n){var r=n("6ac0"),i=n("48a0"),o=n("badf"),a=n("58f7"),s=n("6747");function u(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}t.exports=u},c62f:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("b681"));function i(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(){this.linkedList=new r.default}return t.prototype.isEmpty=function(){return!this.linkedList.head},t.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},t.prototype.enqueue=function(t){this.linkedList.append(t)},t.prototype.dequeue=function(){var t=this.linkedList.deleteHead();return t?t.value:null},t.prototype.toString=function(t){return this.linkedList.toString(t)},t}(),a=o;e.default=a},c641:function(t,e,n){t.exports=n("6cd4")},c6c4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=a(n("1b95")),o=a(n("067f"));function a(t){return t&&t.__esModule?t:{default:t}}var s={getDefaultCfg:function(){return{delegate:!0,delegateStyle:{},delegateShapes:{},delegateShapeBBoxs:{}}},getEvents:function(){return{dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd","canvas:mouseleave":"onOutOfRange"}},onDragStart:function(t){var e=this.graph,n=t.target,r=n.get("groupId");if(r){var i=e.get("customGroupControll"),o=i.customGroup,a=o[r].nodeGroup;this.targetGroup=a,this.mouseOrigin={x:t.x,y:t.y};for(var s=e.save().groups,u=null,c=0;cw?x/2:w/2,S=m+_,P=b+_;s=y.addShape("circle",{attrs:(0,r.__assign)({x:S,y:P,r:_},M),name:"circle-delegate-shape"}),this.shapeOrigin={x:S,y:P}}else s=y.addShape("rect",{attrs:(0,r.__assign)({x:m,y:b},M),name:"rect-delegate-shape"}),this.shapeOrigin={x:m,y:b};this.delegateShapes[n]=s,this.delegateShapeBBoxs[n]=s.getBBox()}},onOutOfRange:function(t){var e=this,n=this.graph.get("canvas").get("el"),r=function r(i){i.target!==n&&(e.onDragEnd(t),document.body.removeEventListener("mouseup",r,!0))};this.mouseOrigin&&document.body.addEventListener("mouseup",r,!0)}};e.default=s},c6cf:function(t,e,n){var r=n("4d8c"),i=n("2286"),o=n("c1c9");function a(t){return o(i(t,void 0,r),t+"")}t.exports=a},c707:function(t,e,n){var r=n("5c69"),i=n("6a5c"),o=n("100e"),a=n("9aff"),s=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},c740:function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").findIndex,o=n("44d2"),a="findIndex",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},c75c:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("61d8");e.default=function(t,e,n){var i=0,o=r.default(e)?e.split("."):e;while(t&&ie||a&&s&&c&&!u&&!f||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!f&&t'),l=(0,i.default)("
");f.appendChild(l),(0,o.default)(f,{width:a+"px",height:s+"px"}),(0,o.default)(l,{width:a/e+"px",height:s/e+"px",left:0,top:0}),n.insertBefore(f,r),this.set("container",f),this.set("gridContainer",l)},e.prototype.getEvents=function(){return{viewportchange:"updateGrid"}},e.prototype.updateGrid=function(t){var e=this.get("gridContainer"),n=t.matrix;n||(n=s.mat3.create());var r="matrix("+n[0]+", "+n[1]+", "+n[3]+", "+n[4]+", 0, 0)";(0,o.default)(e,{transform:r})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.destroy=function(){var t=this.get("graph"),e=t.get("container"),n=this.get("container");e.removeChild(n)},e}(a.default),l=f;e.default=l},cc45:function(t,e,n){var r=n("1a2d0"),i=n("b047"),o=n("99d3"),a=o&&o.isMap,s=a?i(a):r;t.exports=s},cd9d:function(t,e){function n(t){return t}t.exports=n},cdca:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("06ef"),i=n("bd8b"),o=function(t){if(!r.default(t)||!i.default(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;var e=t;while(null!==Object.getPrototypeOf(e))e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};e.default=o},ce79:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t instanceof Element||t instanceof HTMLDocument};e.default=r},ce86:function(t,e,n){var r=n("9e69"),i=n("7948"),o=n("6747"),a=n("ffd6"),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;function f(t){if("string"==typeof t)return t;if(o(t))return i(t,f)+"";if(a(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-s?"-0":e}t.exports=f},cee5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("28f9"),i=n("9ab4f"),o=function(t){return t};e.default=function(t,e){void 0===e&&(e=o);var n={};return i.default(t)&&!r.default(t)&&Object.keys(t).forEach((function(r){n[r]=e(t[r],r)})),n}},cfa7:function(t,e,n){var r=n("33de");function i(t){var e=0,n=[],i={},o=[];function a(s){var u=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))})),u.lowlink===u.index){var c,f=[];do{c=n.pop(),i[c].onStack=!1,f.push(c)}while(s!==c);o.push(f)}}return t.nodes().forEach((function(t){r.has(i,t)||a(t)})),o}t.exports=i},cfda:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("9ab4"),i=a(n("1b95")),o=a(n("067f"));function a(t){return t&&t.__esModule?t:{default:t}}var s={getDefaultCfg:function(){return{updateEdge:!0,delegateStyle:{},enableDelegate:!1,onlyChangeComboSize:!1,comboActiveState:"",selectedState:"selected"}},getEvents:function(){return{"node:dragstart":"onDragStart","node:drag":"onDrag","node:dragend":"onDragEnd","combo:dragenter":"onDragEnter","combo:dragleave":"onDragLeave","combo:drop":"onDropCombo"}},validationCombo:function(t){if(this.origin&&t)t.getType()},onDragStart:function(t){var e=this;if(this.shouldBegin.call(this,t)){var n=t.item;if(n&&!n.hasLocked()){var r=n.getContainer();r.set("capture",!1);var i=t.target;if(i){var o=i.get("isAnchorPoint");if(o)return}var a=this.graph;this.targets=[],this.targetCombo=null;var s=a.findAllByState("node",this.selectedState),u=n.get("id"),c=s.filter((function(t){var e=t.get("id");return u===e}));0===c.length?this.targets.push(n):s.length>1?s.forEach((function(t){var n=t.hasLocked();n||e.targets.push(t)})):this.targets.push(n),this.origin={x:t.x,y:t.y},this.point={},this.originPoint={}}}},onDrag:function(t){var e=this;this.origin&&this.shouldUpdate(this,t)&&(this.get("enableDelegate")?this.updateDelegate(t):this.targets.map((function(n){e.update(n,t)})))},onDragEnd:function(t){var e=this;if(this.origin&&this.shouldEnd.call(this,t)){var n=t.item,r=n.getContainer();r.set("capture",!0),this.delegateRect&&(this.delegateRect.remove(),this.delegateRect=null),this.get("enableDelegate")&&this.targets.map((function(n){return e.update(n,t)}));var i=this.graph;if(this.onlyChangeComboSize)i.updateCombos();else if(this.targetCombo){var o=this.targetCombo.getModel();this.targets.map((function(t){var e=t.getModel();e.comboId!==o.id&&i.updateComboTree(t,o.id)}))}else this.targets.map((function(t){var e=t.getModel();e.comboId&&i.updateComboTree(t)}));this.point={},this.origin=null,this.originPoint={},this.targets.length=0,this.targetCombo=null}},onDropCombo:function(t){var e=t.item;this.validationCombo(e);var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!1),this.targetCombo=e},onDragEnter:function(t){var e=t.item;this.validationCombo(e);var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!0)},onDragLeave:function(t){var e=t.item;this.validationCombo(e);var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!1)},update:function(t,e){var n=this.origin,r=t.get("model"),i=t.get("id");this.point[i]||(this.point[i]={x:r.x,y:r.y});var o=e.x-n.x+this.point[i].x,a=e.y-n.y+this.point[i].y,s={x:o,y:a};this.get("updateEdge")?this.graph.updateItem(t,s):t.updatePosition(s)},updateDelegate:function(t){if(this.delegateRect){var e=t.x-this.origin.x+this.originPoint.minX,n=t.y-this.origin.y+this.originPoint.minY;this.delegateRect.attr({x:e,y:n})}else{var a=this.graph.get("group"),s=(0,i.default)({},o.default.delegateStyle,this.delegateStyle),u=this.calculationGroupPosition(t),c=u.x,f=u.y,l=u.width,h=u.height,d=u.minX,p=u.minY;this.originPoint={x:c,y:f,width:l,height:h,minX:d,minY:p},this.delegateRect=a.addShape("rect",{attrs:(0,r.__assign)({width:l,height:h,x:c,y:f},s),name:"rect-delegate-shape"}),this.delegateRect.set("capture",!1)}},calculationGroupPosition:function(t){var e=this.graph,n=e.findAllByState("node",this.selectedState);0===n.length&&n.push(t.item);for(var r=1/0,i=-1/0,o=1/0,a=-1/0,s=0;si&&(i=h),d>a&&(a=d)}var p=Math.floor(r),g=Math.floor(o),v=Math.ceil(i)-Math.floor(r),y=Math.ceil(a)-Math.floor(o);return{x:p,y:g,width:v,height:y,minX:r,minY:o}}};e.default=s},d008:function(t,e,n){"use strict";n("c2c1")},d02c:function(t,e,n){var r=n("5e2e"),i=n("79bc"),o=n("7b83"),a=200;function s(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.lengthr/e.height};e.isHorizontalPort=h;var d=function(t,e){var n=h(e,t);return n?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}};e.getExpandedBBoxPoint=d;var p=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),i=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{centerX:(n+i)/2,centerY:(r+o)/2,minX:n,minY:r,maxX:i,maxY:o,height:o-r,width:i-n}};e.mergeBBox=p;var g=function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:i},{x:e,y:i}]};e.getPointsFromBBox=g;var v=function(t,e){var n=t.x,r=t.y;return ne.maxX||re.maxY};e.isPointOutsideBBox=v;var y=function(t,e){return et.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]};e.getBBoxXCrossPoints=y;var m=function(t,e){return et.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]};e.getBBoxYCrossPoints=m;var b=function(t,e){return y(t,e.x).concat(m(t,e.y))};e.getBBoxCrossPointsByPoint=b;var x=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)};e.distance=x;var w=function(t,e){var n=-2,r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=n),t.y===e.y&&(r+=n))})),r};e._costByPoints=w;var M=function(t,e,n,r,i){return x(t,e)+x(t,n)+w(t,[e,n,r,i])};e.heuristicCostEstimate=M;var _=function t(e,n,r,i,o){void 0===o&&(o=0),e.unshift(n[i]),r[i]&&r[i]!==i&&o<=100&&t(e,n,r,r[i],o+1)};e.reconstructPath=_;var S=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)};e.removeFrom=S;var P=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=r.x-n.x,s=r.y-n.y,u=(-o*(t.x-n.x)+i*(t.y-n.y))/(-a*o+i*s),c=(a*(t.y-n.y)-s*(t.x-n.x))/(-a*o+i*s);return u>=0&&u<=1&&c>=0&&c<=1};e.isSegmentsIntersected=P;var k=function(t,e,n){if(0===n.width&&0===n.height)return!1;var r=g(n),i=r[0],o=r[1],a=r[2],s=r[3];return P(t,e,i,o)||P(t,e,i,s)||P(t,e,o,a)||P(t,e,a,s)};e.isSegmentCrossingBBox=k;var C=function(t,e,n,r){var i=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||k(t,e,n)||k(t,e,r)||i.push(t))})),u(i)};e.getNeighborPoints=C;var O=function(t,e,n,r,o,a,s){var u=[],c=[e],f={},l={},h={};l[e.id]=0,h[e.id]=M(e,n,e);var d={};t.forEach((function(t){d[t.id]=t}));var p=function(){var i,p=1/0;if(c.forEach((function(t){h[t.id]=l[t.id]||(f[t.id]=i.id,l[t.id]=r,h[t.id]=l[t.id]+M(t,n,e,a,s))}}))};while(c.length){var g=p();if("object"===i(g))return g.value}return[e,n]};e.pathFinder=O;var E=function(t,e,n){return!(t.x===e.x&&e.x===n.x||t.y===e.y&&e.y===n.y)};e.isBending=E;var A=function(t,e,n,r){var i=x(t,e),o=x(n,e);i0&&(e?"stroke"in n?this._setColor(t,"stroke",o):"strokeStyle"in n&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),c&&l.setAttribute(u.SVG_ATTR_MAP["strokeOpacity"],c),f&&l.setAttribute(u.SVG_ATTR_MAP["lineWidth"],f))},e.prototype._setColor=function(t,e,n){var r=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var i=t.find("gradient",n);i||(i=t.addGradient(n)),r.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+i+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){i=t.find("pattern",n);i||(i=t.addPattern(n)),r.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+i+")")}else r.setAttribute(u.SVG_ATTR_MAP[e],n);else r.setAttribute(u.SVG_ATTR_MAP[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),r=e||n,i=r.shadowOffsetX,a=r.shadowOffsetY,s=r.shadowBlur,u=r.shadowColor;(i||a||s||u)&&o.setShadow(this,t)},e.prototype.transform=function(t){var e=this.attr(),n=(t||e).matrix;n&&o.setTransform(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),r=this.get("canvas"),i=r.get("el").getBoundingClientRect(),o=t+i.left,a=e+i.top,s=document.elementFromPoint(o,a);return!(!s||!s.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(i.AbstractShape);e.default=h},d5f3:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3d7d");function i(t){var e=t.attr(),n=e.x1,i=e.y1,o=e.x2,a=e.y2,s=Math.min(n,o),u=Math.max(n,o),c=Math.min(i,a),f=Math.max(i,a),l={minX:s,maxX:u,minY:c,maxY:f};return l=r.mergeArrowBBox(t,l),{x:l.minX,y:l.minY,width:l.maxX-l.minX,height:l.maxY-l.minY}}e.default=i},d612:function(t,e,n){var r=n("7b83"),i=n("7ed2"),o=n("dc0f");function a(t){var e=-1,n=null==t?0:t.length;this.__data__=new r;while(++eh&&u>h)break;if(d.push(s),h-=u,l=l.substr(c),!l)return d.join("")}while(1){if(s=l.substr(0,1),u=o.default(s,n),u+f>h)break;if(d.push(s),h-=u,l=l.substr(1),!l)return d.join("")}return""+d.join("")+a}},d70d:function(t,e){function n(t,e,n){var r=-1,i=t.length,o=e.length,a={};while(++r0)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;c+=t.weight*n}))),c}t.exports=i},d7ee:function(t,e,n){var r=n("c3fc"),i=n("b047"),o=n("99d3"),a=o&&o.isSet,s=a?i(a):r;t.exports=s},d89f:function(t,e,n){t.exports={components:n("e44a"),dijkstra:n("a473"),dijkstraAll:n("d312"),findCycles:n("ddac"),floydWarshall:n("6736"),isAcyclic:n("43e8"),postorder:n("4f17"),preorder:n("aaf9"),prim:n("61e9"),tarjan:n("cfa7"),topsort:n("8185")}},d8bc:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("2bdc");e.default=function(t,e){return r.default(t,(function(t,n,r){return e.includes(r)||(t[r]=n),t}),{})}},d998:function(t,e,n){var r=n("342f");t.exports=/MSIE|Trident/.test(r)},d99a:function(t,e,n){"use strict";var r,i,o,a;function s(){r=document.createElement("table"),i=document.createElement("tr"),o=/^\s*<(\w+|!)[^>]*>/,a={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:i,th:i,"*":document.createElement("div")}}function u(t){r||s();var e=o.test(t)&&RegExp.$1;e&&e in a||(e="*");var n=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var i=n.childNodes[0];return n.removeChild(i),i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=u},d9a8:function(t,e){function n(t){return t!==t}t.exports=n},d9f3:function(t,e,n){"use strict";var r=n("6f9c");function i(t,e){var n={};r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))}));var i=r.filter(n,(function(t){return!t.indegree}));return o(i)}function o(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&a(t,e)}}function i(e){return function(n){n["in"].push(e),0===--n.indegree&&t.push(n)}}while(t.length){var o=t.pop();e.push(o),r.forEach(o["in"].reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}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}t.exports=i},da03:function(t,e,n){var r=n("2b3e"),i=r["__core-js_shared__"];t.exports=i},da0a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:Date.now(),r=null,a=t.apply(i,o),r||(i=o=null)},c=function(){var c=Date.now();s||!1!==n.leading||(s=c);var f=e-(c-s);return i=this,o=arguments,f<=0||f>e?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,f)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}},dad5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9");e.default=function(t){if(r.default(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])}},db24:function(t,e,n){"use strict";function r(t){return 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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Graph",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"TreeGraph",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"Layout",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"Global",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return l.default}}),e.Algorithm=e.default=e.registerBehavior=e.Menu=e.Bundling=e.Grid=e.Minimap=e.registerLayout=e.registerEdge=e.registerCombo=e.registerNode=void 0;var i=n("2d5dc"),o=v(n("5ddc")),a=v(n("6ff6")),s=v(n("fb7d")),u=v(n("5ced")),c=v(n("9cc4")),f=v(n("067f")),l=v(n("2967")),h=v(n("8270")),d=g(n("ac5d"));function p(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return p=function(){return t},t}function g(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var e=p();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}return n.default=t,e&&e.set(t,n),n}function v(t){return t&&t.__esModule?t:{default:t}}e.Algorithm=d;var y=u.default.registerNode;e.registerNode=y;var m=u.default.registerEdge;e.registerEdge=m;var b=u.default.registerCombo;e.registerCombo=b;var x=o.default.registerBehavior;e.registerBehavior=x;var w=c.default.registerLayout;e.registerLayout=w;var M=h.default.Minimap;e.Minimap=M;var _=h.default.Grid;e.Grid=_;var S=h.default.Bundling;e.Bundling=S;var P=h.default.Menu;e.Menu=P;var k={version:i.version,Graph:a.default,TreeGraph:s.default,Util:l.default,registerNode:u.default.registerNode,registerEdge:u.default.registerEdge,registerCombo:u.default.registerCombo,registerBehavior:o.default.registerBehavior,registerLayout:c.default.registerLayout,Layout:c.default,Global:f.default,Minimap:h.default.Minimap,Grid:h.default.Grid,Bundling:h.default.Bundling,Menu:h.default.Menu,Algorithm:d};e.default=k},dc0f:function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},dc57:function(t,e){var n=Function.prototype,r=n.toString;function i(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}t.exports=i},dcbe:function(t,e,n){var r=n("30c9"),i=n("1310");function o(t){return i(t)&&r(t)}t.exports=o},dd61:function(t,e,n){var r=n("7948"),i=n("badf"),o=n("97d3"),a=n("6747");function s(t,e){var n=a(t)?r:o;return n(t,i(e,3))}t.exports=s},ddac:function(t,e,n){var r=n("33de"),i=n("cfa7");function o(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}t.exports=o},df01:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){return(t%e+e)%e};e.default=r},df2e:function(t,e,n){var r=n("33de");function i(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);o(t,e,"post"===n,s,i,a)})),a}function o(t,e,n,i,a,s){r.has(i,e)||(i[e]=!0,n||s.push(e),r.each(a(e),(function(e){o(t,e,n,i,a,s)})),n&&s.push(e))}t.exports=i},e008:function(t,e,n){var r=n("01ce");t.exports={Graph:r.Graph,json:n("19b2"),alg:n("d89f"),version:r.version}},e090:function(t,e,n){var r=n("6f9c"),i=n("b50e"),o=n("17d5").Graph;function a(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}t.exports={debugOrdering:a}},e0bf:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("28f9"),i=n("5b8d"),o=n("bec1"),a=n("a08e"),s=Object.prototype.hasOwnProperty;function u(t){if(r.default(t))return!0;if(i.default(t))return!t.length;var e=o.default(t);if("Map"===e||"Set"===e)return!t.size;if(a.default(t))return!Object.keys(t).length;for(var n in t)if(s.call(t,n))return!1;return!0}e.default=u},e0eb:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.G6GraphEvent=void 0;var r=n("9ab4"),i=o(n("9332"));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.item=n.item,r.canvasX=n.canvasX,r.canvasY=n.canvasY,r.wheelDelta=n.wheelDelta,r.detail=n.detail,r}return(0,r.__extends)(e,t),e}(i.default);e.G6GraphEvent=a},e0ef:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=function(t){if("object"!==typeof t||null===t)return t;var e;if(r.default(t)){e=[];for(var n=0,o=t.length;n-1&&i.splice(o,1),r===v){var a=n.get("v"+r+"s"),s=a.indexOf(t);s>-1&&a.splice(s,1)}var c=t.get("id"),f=n.get("itemMap");delete f[c];var l=n.get("comboTrees"),h=t.get("id");if(r===g){if(l){var p=l,y=!1;l.forEach((function(t){y||(0,d.traverseTree)(t,(function(t){if(t.id===h&&p){var e=p.indexOf(t);return p.splice(e,1),y=!0,!1}return p=t.children,!0}))}))}for(var b=t.getEdges(),x=b.length;x>=0;x--)n.removeItem(b[x])}else if(r===m){var w,M=!1;l&&l.forEach((function(t){M||(0,d.traverseTree)(t,(function(t){return t.id!==h||(w=t,M=!0,!1)}))})),w.removed=!0,w&&w.children&&w.children.forEach((function(t){e.removeItem(t.id)}));for(b=t.getEdges(),x=b.length;x>=0;x--)n.removeItem(b[x])}t.destroy(),n.emit("afterremoveitem",{item:t})}},t.prototype.setItemState=function(t,e,n){var r=this.graph,i=e;(0,u.default)(n)&&(i=e+":"+n),t.hasState(i)===n||(0,u.default)(n)&&t.hasState(i)||(r.emit("beforeitemstatechange",{item:t,state:i,enabled:n}),t.setState(e,n),r.autoPaint(),r.emit("afteritemstatechange",{item:t,state:i,enabled:n}))},t.prototype.clearItemStates=function(t,e){var n=this.graph;(0,u.default)(t)&&(t=n.findById(t)),n.emit("beforeitemstatesclear",{item:t,states:e}),t.clearStates(e),n.emit("afteritemstatesclear",{item:t,states:e})},t.prototype.refreshItem=function(t){var e=this.graph;(0,u.default)(t)&&(t=e.findById(t)),e.emit("beforeitemrefresh",{item:t}),t.refresh(),e.emit("afteritemrefresh",{item:t})},t.prototype.addCombos=function(t,e){var n=this;t&&t.forEach((function(t){(0,d.traverseTreeUp)(t,(function(t){var r;return e.forEach((function(e){e.id===t.id&&(e.children=t.children,e.depth=t.depth,r=e)})),r&&n.addItem("combo",r),!0}))}));var r=this.graph.get("comboGroup");r&&r.sort()},t.prototype.changeItemVisibility=function(t,e){var n=this,r=this.graph;if((0,u.default)(t)&&(t=r.findById(t)),t){if(r.emit("beforeitemvisibilitychange",{item:t,visible:e}),t.changeVisibility(e),t.getType&&t.getType()===g){var i=t.getEdges();(0,o.default)(i,(function(t){(!e||t.get("source").isVisible()&&t.get("target").isVisible())&&n.changeItemVisibility(t,e)}))}else if(t.getType&&t.getType()===m){var a=r.get("comboTrees"),s=t.get("id"),c=[],f=!1;a&&a.forEach((function(t){f||t.children&&0!==t.children.length&&(0,d.traverseTree)(t,(function(t){return t.id!==s||(c=t.children,f=!0,!1)}))})),c.forEach((function(t){var i=r.findById(t.id);n.changeItemVisibility(i,e)}));i=t.getEdges();(0,o.default)(i,(function(t){(!e||t.get("source").isVisible()&&t.get("target").isVisible())&&n.changeItemVisibility(t,e)}))}r.emit("afteritemvisibilitychange",{item:t,visible:e})}else console.warn("The item to be shown or hidden does not exist!")},t.prototype.destroy=function(){this.graph=null,this.destroyed=!0},t}(),S=_;e.default=S},e275:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5b8d"),i=function(t,e){return!!r.default(t)&&t.indexOf(e)>-1};e.default=i},e2a0:function(t,e,n){var r=n("3729"),i=n("6747"),o=n("1310"),a="[object String]";function s(t){return"string"==typeof t||!i(t)&&o(t)&&r(t)==a}t.exports=s},e2c0:function(t,e,n){var r=n("e2e4"),i=n("d370"),o=n("6747"),a=n("c098"),s=n("b218"),u=n("f4d6");function c(t,e,n){e=r(e,t);var c=-1,f=e.length,l=!1;while(++c=0){n=!0;break}}if(!n)return e;var u=[],c=0,f=0,l=0,h=0,d=0,p=e[0];"M"!==p[0]&&"m"!==p[0]||(c=+p[1],f=+p[2],l=c,h=f,d++,u[0]=["M",c,f]);a=d;for(var g=e.length;a.5*Math.PI&&w<1.5*Math.PI&&(x=(0,o.getLabelPosition)(y,c,m+l/2,b+h/2,v)),v&&(g.x=x.x,g.y=x.y),g.rotate=x.rotate,g},_getTextAlign:function(t,e){var n="center";return e?(e%=2*Math.PI,"center"!==t&&(n=e>=0&&e<=Math.PI/2||e>=1.5*Math.PI&&e<2*Math.PI?t:g(t)),n):t},getControlPoints:function(t){return t.controlPoints},getPathPoints:function(t){return t},drawShape:function(t,e){var n=this.getShapeStyle(t),r=e.addShape("path",{className:p,name:p,attrs:n});return r},drawLabel:function(t,e){var n=this.options.labelCfg,r=(0,i.deepMix)({},n,t.labelCfg),o=this.getLabelStyle(t,r,e),a=o.rotate;delete o.rotate;var s=e.addShape("text",{attrs:o,name:"text-shape"});if(a&&s.rotateAtStart(a),o.background){var u=this.drawLabelBg(t,e,s),c=this.itemType+f.CLS_LABEL_BG_SUFFIX;u.set("classname",c),s.toFront()}return s},drawLabelBg:function(t,e,n){var r=this.options.labelCfg,o=(0,i.deepMix)({},r,t.labelCfg),a=this.getLabelStyle(t,o,e),s=a.rotate,u=this.getLabelBgStyleByPosition(n,t,o,e);delete u.rotate;var c=e.addShape("rect",{name:"text-bg-shape",attrs:u});return s&&c.rotateAtStart(s),c}},y=Object.assign({},f.shapeBase,v);c.default.registerEdge("single-edge",y),c.default.registerEdge("line",{getControlPoints:function(){}},"single-edge"),c.default.registerEdge("spline",{getPath:function(t){var e=(0,s.getSpline)(t);return e}},"single-edge"),c.default.registerEdge("arc",{curveOffset:20,clockwise:1,getControlPoints:function(t){var e,n,r=t.startPoint,i=t.endPoint,o={x:(r.x+i.x)/2,y:(r.y+i.y)/2};if(void 0!==t.controlPoints){if(n=t.controlPoints[0],e=(0,a.getCircleCenterByPoints)(r,n,i),r.x<=i.x&&r.y>i.y?this.clockwise=e.x>n.x?0:1:r.x<=i.x&&r.yn.x?1:0:r.x>i.x&&r.y<=i.y?this.clockwise=e.ye.degree?1:0}var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=[0,0],e.radius=null,e.startRadius=null,e.endRadius=null,e.startAngle=0,e.endAngle=2*Math.PI,e.clockwise=!0,e.divisions=1,e.ordering=null,e.angleRatio=1,e.nodes=[],e.edges=[],e.nodeMap={},e.degrees=[],e.width=300,e.height=300,e}return(0,r.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{center:[0,0],radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1}},e.prototype.execute=function(){var t=this,e=t.nodes,n=t.edges,r=e.length,i=t.center;if(0!==r){if(1===r)return e[0].x=i[0],void(e[0].y=i[1]);var a=t.radius,s=t.startRadius,u=t.endRadius,c=t.divisions,f=t.startAngle,l=t.endAngle,h=(l-f)/r,d={};e.forEach((function(t,e){d[t.id]=e})),t.nodeMap=d;var p=(0,o.getDegree)(e.length,d,n);t.degrees=p,t.width||"undefined"===typeof window||(t.width=window.innerWidth),t.height||"undefined"===typeof window||(t.height=window.innerHeight),a||s||u?!s&&u?s=u:s&&!u&&(u=s):a=t.height>t.width?t.width/2:t.height/2;var g=t.angleRatio,v=h*g;t.astep=v;var y=t.ordering,m=[];m="topology"===y?t.topologyOrdering():"topology-directed"===y?t.topologyOrdering(!0):"degree"===y?t.degreeOrdering():e;for(var b=t.clockwise,x=Math.ceil(r/c),w=0;wu||c>e[i].lim));o=i,i=r;while((i=t.parent(i))!==o)s.push(i);return{path:a.concat(s.reverse()),lca:o}}function a(t){var e={},n=0;function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}return r.forEach(t.children(),i),e}t.exports=i},f352:function(t,e,n){var r=n("6f9c"),i=n("b50e");function o(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,u=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],f=0,l=0,h=0;o.sort(s(!!e)),h=a(c,u,h),r.forEach(o,(function(t){h+=t.vs.length,c.push(t.vs),f+=t.barycenter*t.weight,l+=t.weight,h=a(c,u,h)}));var d={vs:r.flatten(c,!0)};return l&&(d.barycenter=f/l,d.weight=l),d}function a(t,e,n){var i;while(e.length&&(i=r.last(e)).i<=n)e.pop(),t.push(i.vs),n++;return n}function s(t){return function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i}}t.exports=o},f3c1:function(t,e){var n=800,r=16,i=Date.now;function o(t){var e=0,o=0;return function(){var a=i(),s=r-(a-o);if(o=a,s>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}t.exports=o},f4c8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=null;function i(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r}e.getOffScreenContext=i},f4d6:function(t,e,n){var r=n("ffd6"),i=1/0;function o(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}t.exports=o},f608:function(t,e,n){var r=n("6747"),i=n("ffd6"),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function s(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}t.exports=s},f694:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("8937"),i=s(n("7da3")),o=n("c0b3"),a=n("0dfa");function s(t){return t&&t.__esModule?t:{default:t}}var u="bboxCache",c="bboxCanvasCache",f=["fillStyle","strokeStyle","path","points","img","symbol"],l=function(){function t(t){this._cfg={},this.destroyed=!1;var e={id:void 0,type:"item",model:{},group:void 0,animate:!1,visible:!0,locked:!1,event:!0,keyShape:void 0,states:[]};this._cfg=Object.assign(e,this.getDefaultCfg(),t);var n=this.get("model").id;n||(n=(0,r.uniqueId)(this.get("type")),this.get("model").id=n),this.set("id",n);var i=t.group;i&&(i.set("item",this),i.set("id",n)),this.init(),this.draw()}return t.prototype.calculateBBox=function(){var t=this.get("keyShape"),e=this.get("group"),n=(0,o.getBBox)(t,e);return n.x=n.minX,n.y=n.minY,n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n.centerX=(n.minX+n.maxX)/2,n.centerY=(n.minY+n.maxY)/2,n},t.prototype.calculateCanvasBBox=function(){var t=this.get("keyShape"),e=this.get("group"),n=(0,o.getBBox)(t,e);return n.x=n.minX,n.y=n.minY,n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n.centerX=(n.minX+n.maxX)/2,n.centerY=(n.minY+n.maxY)/2,n},t.prototype.drawInner=function(){var t=this,e=t.get("shapeFactory"),n=t.get("group"),r=t.get("model");if(n.clear(),e){t.updatePosition(r);var i=t.getShapeCfg(r),o=i.shape||i.type,a=e.draw(o,i,n);a&&(t.set("keyShape",a),a.set("isKeyShape",!0),a.set("draggable",!0)),this.setOriginStyle(),this.set("currentShape",o),this.restoreStates(e,o)}},t.prototype.setOriginStyle=function(t){var e={},n=this.get("group"),i=n.get("children"),o=this.getKeyShape(),a=this;(0,r.each)(i,(function(t){var n=t.get("name");if(n)e[n]=a.getShapeStyleByName(n);else{var r=o.get("name"),i=a.getShapeStyleByName();r?e[r]=i:Object.assign(e,i)}}));var s=this.getOriginStyle(),u={};u=t?(0,r.deepMix)({},s,e,t.style,{labelCfg:t.labelCfg}):(0,r.deepMix)({},s,e),a.set("originStyle",u)},t.prototype.restoreStates=function(t,e){var n=this,i=n.get("states");(0,r.each)(i,(function(r){t.setState(e,r,!0,n)}))},t.prototype.init=function(){var t=i.default.getFactory(this.get("type"));this.set("shapeFactory",t)},t.prototype.get=function(t){return this._cfg[t]},t.prototype.set=function(t,e){(0,r.isPlainObject)(t)?this._cfg=Object.assign({},this._cfg,t):this._cfg[t]=e},t.prototype.getDefaultCfg=function(){return{}},t.prototype.clearCache=function(){this.set(u,null),this.set(c,null)},t.prototype.beforeDraw=function(){},t.prototype.afterDraw=function(){},t.prototype.afterUpdate=function(){},t.prototype.draw=function(){this.beforeDraw(),this.drawInner(),this.afterDraw()},t.prototype.getShapeStyleByName=function(t){var e=this,n=this.get("group"),i=this.getKeyShape();if(t&&(i=n.find((function(e){return e.get("name")===t}))),i){var o={},a=this.get("states");return a.map((function(t){var n=e.getStateStyle(t);for(var i in n)if((0,r.isPlainObject)(n[i])){var o=n[i];for(var a in o)f.includes(a)||f.push(a)}else f.includes(i)||f.push(i)})),(0,r.each)(i.attr(),(function(t,e){f.indexOf(e)<0&&(o[e]=t)})),o}return{}},t.prototype.getShapeCfg=function(t){var e=this.get("styles");if(e){var n=t;return n.style=Object.assign({},e,t.style),n}return t},t.prototype.getStateStyle=function(t){var e=this.get("styles"),n=e&&e[t];return n},t.prototype.getOriginStyle=function(){return this.get("originStyle")},t.prototype.getCurrentStatesStyle=function(){var t=this,e={};return(0,r.each)(t.getStates(),(function(n){Object.assign(e,t.getStateStyle(n))})),e},t.prototype.setState=function(t,e){var n=this.get("states"),i=this.get("shapeFactory"),o=t,a=t;(0,r.isString)(e)&&(o=t+":"+e,a=t+":");var s=n;if((0,r.isBoolean)(e)){var u=n.indexOf(a);if(e){if(u>-1)return;n.push(o)}else u>-1&&n.splice(u,1)}else if((0,r.isString)(e)){var c=n.filter((function(t){return t.includes(a)}));c.length>0&&this.clearStates(c),s=s.filter((function(t){return!t.includes(a)})),s.push(o),this.set("states",s)}if(i){var f=this.get("model"),l=f.shape||f.type;i.setState(l,t,e,this)}},t.prototype.clearStates=function(t){var e=this,n=e.getStates(),i=e.get("shapeFactory"),o=e.get("model"),a=o.shape||o.type;t||(t=n),(0,r.isString)(t)&&(t=[t]);var s=n.filter((function(e){return-1===t.indexOf(e)}));e.set("states",s),t.forEach((function(t){i.setState(a,t,!1,e)}))},t.prototype.getContainer=function(){return this.get("group")},t.prototype.getKeyShape=function(){return this.get("keyShape")},t.prototype.getModel=function(){return this.get("model")},t.prototype.getType=function(){return this.get("type")},t.prototype.getID=function(){return this.get("id")},t.prototype.isItem=function(){return!0},t.prototype.getStates=function(){return this.get("states")},t.prototype.hasState=function(t){var e=this.getStates();return e.indexOf(t)>=0},t.prototype.refresh=function(){var t=this.get("model");this.updatePosition(t),this.updateShape(),this.afterUpdate(),this.clearCache()},t.prototype.isOnlyMove=function(t){return!1},t.prototype.update=function(t){var e=this.get("model"),n={x:e.x,y:e.y};t.x=isNaN(t.x)?e.x:t.x,t.y=isNaN(t.y)?e.y:t.y;var i=this.get("styles");if(t.stateStyles){var o=t.stateStyles;(0,r.mix)(i,o),delete t.stateStyles}Object.assign(e,t);var a=this.isOnlyMove(t);a?this.updatePosition(t):(n.x===t.x&&n.y===t.y||this.updatePosition(t),this.updateShape()),this.afterUpdate(),this.clearCache()},t.prototype.updateShape=function(){var t=this.get("shapeFactory"),e=this.get("model"),n=e.shape||e.type;if(t.shouldUpdate(n)&&n===this.get("currentShape")){var r=this.getShapeCfg(e);t.baseUpdate(n,r,this)}else this.draw();this.setOriginStyle(e),this.restoreStates(t,n)},t.prototype.updatePosition=function(t){var e=this.get("model"),n=(0,r.isNil)(t.x)?e.x:t.x,i=(0,r.isNil)(t.y)?e.y:t.y,o=this.get("group");(0,r.isNil)(n)||(0,r.isNil)(i)||(o.resetMatrix(),(0,a.translate)(o,{x:n,y:i}),e.x=n,e.y=i,this.clearCache())},t.prototype.getBBox=function(){var t=this.get(u);return t||(t=this.calculateBBox(),this.set(u,t)),t},t.prototype.getCanvasBBox=function(){var t=this.get(c);return t||(t=this.calculateCanvasBBox(),this.set(c,t)),t},t.prototype.toFront=function(){var t=this.get("group");t.toFront()},t.prototype.toBack=function(){var t=this.get("group");t.toBack()},t.prototype.show=function(){this.changeVisibility(!0)},t.prototype.hide=function(){this.changeVisibility(!1)},t.prototype.changeVisibility=function(t){var e=this.get("group");t?e.show():e.hide(),this.set("visible",t)},t.prototype.isVisible=function(){return this.get("visible")},t.prototype.enableCapture=function(t){var e=this.get("group");e&&e.set("capture",t)},t.prototype.destroy=function(){if(!this.destroyed){var t=this.get("animate"),e=this.get("group");t&&e.stopAnimate(),this.clearCache(),e.remove(),this._cfg=null,this.destroyed=!0}},t}(),h=l;e.default=h},f8af:function(t,e,n){var r=n("2474");function i(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}t.exports=i},f8c9:function(t,e,n){var r=n("23e7"),i=n("da84"),o=n("d44e");r({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},f909:function(t,e,n){var r=n("7e64"),i=n("b760"),o=n("72af"),a=n("4f50"),s=n("1a8c"),u=n("9934"),c=n("8adb");function f(t,e,n,l,h){t!==e&&o(e,(function(o,u){if(h||(h=new r),s(o))a(t,e,u,n,f,l,h);else{var d=l?l(c(t,u),o,u+"",t,e,h):void 0;void 0===d&&(d=o),i(t,u,d)}}),u)}t.exports=f},f9ce:function(t,e,n){var r=n("ef5d"),i=n("e3f8"),o=n("f608"),a=n("f4d6");function s(t){return o(t)?r(a(t)):i(t)}t.exports=s},f9d8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e,n){return tn?n:t};e.default=r},fa21:function(t,e,n){var r=n("7530"),i=n("2dcb"),o=n("eac5");function a(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}t.exports=a},fa89:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("01f9"),i=function(t,e){if(void 0===e&&(e=[]),r.default(t))for(var n=0;ne[r])return 1;if(t[r]0)for(var l=c.length-1;l>=0;l--){var h=c[l].getModel();-1===e.indexOfChild(t.children||[],h.id)&&(i.innerRemoveChild(h.id,{x:t.x,y:t.y},r),c.splice(l,1))}}a.get("originAttrs")&&(s=a.get("originAttrs").x,u=a.get("originAttrs").y);var d=a.getModel();r&&a.set("originAttrs",{x:d.x,y:d.y}),a.set("model",t.data),s===t.x&&u===t.y||a.updatePosition({x:t.x,y:t.y})}else i.innerAddChild(t,n,r)},e.prototype.innerRemoveChild=function(t,e,n){var r=this,i=r.findById(t);if(i)if((0,o.each)(i.get("children"),(function(t){r.innerRemoveChild(t.getModel().id,e,n)})),n){var a=i.getModel();i.set("to",e),i.set("originAttrs",{x:a.x,y:a.y}),r.get("removeList").push(i)}else r.removeItem(i)},e.prototype.changeData=function(t){var e=this;t?(e.data(t),e.render()):e.layout(this.get("fitView"))},e.prototype.changeLayout=function(t){console.warn("Please call updateLayout instead of changeLayout. changeLayout will be discarded soon");var e=this;e.updateLayout(t)},e.prototype.updateLayout=function(t){var e=this;t?(e.set("layout",t),e.set("layoutMethod",e.getLayout()),e.layout()):console.warn("layout cannot be null")},e.prototype.refreshLayout=function(t){console.warn("Please call layout instead of refreshLayout. refreshLayout will be discarded soon");var e=this;e.layout(t)},e.prototype.layout=function(t){var e=this,n=e.get("data"),r=e.get("layoutMethod"),i=r(n,e.get("layout")),o=e.get("animate");if(e.emit("beforerefreshlayout",{data:n,layoutData:i}),e.emit("beforelayout"),e.innerUpdateChild(i,void 0,o),t){var a=e.get("viewController");a.fitView()}o?e.layoutAnimate(i):(e.refresh(),e.paint()),e.emit("afterrefreshlayout",{data:n,layoutData:i}),e.emit("afterlayout")},e.prototype.addChild=function(t,e){var n=this;n.emit("beforeaddchild",{model:t,parent:e}),(0,o.isString)(e)||(e=e.get("id"));var r=n.findDataById(e);r&&(r.children||(r.children=[]),r.children.push(t),n.changeData())},e.prototype.updateChild=function(t,n){var r=this;if(n&&r.findById(n)){var i=r.findById(n).getModel(),o=r.findById(t.id);if(i.children||(i.children=[]),o){var a=e.indexOfChild(i.children,t.id);i.children[a]=t}else i.children.push(t);r.changeData()}else r.changeData(t)},e.prototype.removeChild=function(t){var n=this,r=n.findById(t);if(r){var i=r.get("parent");if(i&&!i.destroyed){var o=n.findDataById(i.get("id")),a=o&&o.children||[],s=r.getModel(),u=e.indexOfChild(a,s.id);a.splice(u,1)}n.changeData()}},e.prototype.findDataById=function(t,e){var n=this;if(e||(e=n.get("data")),t===e.id)return e;var r=null;return(0,o.each)(e.children||[],(function(e){return e.id===t?(r=e,!1):(r=n.findDataById(t,e),!r&&void 0)})),r},e.prototype.layoutAnimate=function(t,e){var n=this,r=this.get("animateCfg");n.emit("beforeanimate",{data:t}),n.getEdges().forEach((function(t){var e=t.get("model");e.sourceAnchor||(e.sourceAnchor=t.get("sourceAnchorIndex"))})),this.get("canvas").animate((function(r){(0,a.traverseTree)(t,(function(i){var o=n.findById(i.id);if(o){var a=o.get("originAttrs"),s=o.get("model");if(a||(a={x:s.x,y:s.y},o.set("originAttrs",a)),e){var u=e(o,r,a,t);o.set("model",Object.assign(s,u))}else s.x=a.x+(i.x-a.x)*r,s.y=a.y+(i.y-a.y)*r}return!0})),(0,o.each)(n.get("removeList"),(function(t){var e=t.getModel(),n=t.get("originAttrs"),i=t.get("to");e.x=n.x+(i.x-n.x)*r,e.y=n.y+(i.y-n.y)*r})),n.refreshPositions()}),{duration:r.duration,easing:r.ease,callback:function(){(0,o.each)(n.getNodes(),(function(t){t.set("originAttrs",null)})),(0,o.each)(n.get("removeList"),(function(t){n.removeItem(t)})),n.set("removeList",[]),r.callback&&r.callback(),n.emit("afteranimate",{data:t})},delay:r.delay})},e.prototype.stopLayoutAnimate=function(){this.get("canvas").stopAnimate(),this.emit("layoutanimateend",{data:this.get("data")}),this.layoutAnimating=!1},e.prototype.isLayoutAnimating=function(){return this.layoutAnimating},e.prototype.render=function(){var t=this,e=t.get("data");if(!e)throw new Error("data must be defined first");t.clear(),t.emit("beforerender"),t.layout(this.get("fitView")),t.emit("afterrender")},e.prototype.save=function(){return this.get("data")},e}(s.default),f=c;e.default=f},fb98:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Array.prototype,i=r.splice,o=r.indexOf,a=function(t){for(var e=[],n=1;n-1)i.call(t,s,1)}return t};e.default=a},fba5:function(t,e,n){var r=n("cb5a");function i(t){return r(this.__data__,t)>-1}t.exports=i},fc63:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("8937"),o=n("7a70"),a=n("d531"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");i.each(e||n,(function(t,e){"points"===e&&i.isArray(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):o.SVG_ATTR_MAP[e]&&r.setAttribute(o.SVG_ATTR_MAP[e],t)}))},e}(a.default);e.default=s},fed9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5b8d");function i(t){if(r.default(t)){var e=t;return e[e.length-1]}}e.default=i},ff69:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ab4"),i=n("9705"),o=n("3dfb"),a=n("83e4"),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var s=this.attr().points,u=!1;return n&&(u=o.default(s,i,t,e,!0)),!u&&r&&(u=a.default(s,t,e)),u},e.prototype.createPath=function(t){var e=this.attr(),n=e.points;if(!(n.length<2)){t.beginPath();for(var r=0;r