import{r as Q}from"./chunk-7SRKK4IT-CK9TWH8W.js";import{m as O,p as j,i as st,q as at,aM as q}from"./mermaid.esm.min-CFMguGj4.js";import"./app-FFcgQi-5.js";var Z=q((C,X)=>{O((function(m,L){typeof C=="object"&&typeof X=="object"?X.exports=L():typeof define=="function"&&define.amd?define([],L):typeof C=="object"?C.layoutBase=L():m.layoutBase=L()}),"webpackUniversalModuleDefinition")(C,function(){return(function(m){var L={};function N(i){if(L[i])return L[i].exports;var e=L[i]={i,l:!1,exports:{}};return m[i].call(e.exports,e,e.exports,N),e.l=!0,e.exports}return O(N,"__webpack_require__"),N.m=m,N.c=L,N.i=function(i){return i},N.d=function(i,e,t){N.o(i,e)||Object.defineProperty(i,e,{configurable:!1,enumerable:!0,get:t})},N.n=function(i){var e=i&&i.__esModule?O(function(){return i.default},"getDefault"):O(function(){return i},"getModuleExports");return N.d(e,"a",e),e},N.o=function(i,e){return Object.prototype.hasOwnProperty.call(i,e)},N.p="",N(N.s=26)})([(function(m,L,N){function i(){}O(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,m.exports=i}),(function(m,L,N){var i=N(2),e=N(8),t=N(9);function r(a,o,p){i.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=a,this.target=o}O(r,"LEdge"),r.prototype=Object.create(i.prototype);for(var h in i)r[h]=i[h];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(a,o){for(var p=this.getOtherEnd(a),n=o.getGraphManager().getRoot();;){if(p.getOwner()==o)return p;if(p.getOwner()==n)break;p=p.getOwner().getParent()}return null},r.prototype.updateLength=function(){var a=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=r}),(function(m,L,N){function i(e){this.vGraphObject=e}O(i,"LGraphObject"),m.exports=i}),(function(m,L,N){var i=N(2),e=N(10),t=N(13),r=N(0),h=N(16),a=N(4);function o(n,g,l,f){l==null&&f==null&&(f=g),i.call(this,f),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=n,l!=null&&g!=null?this.rect=new t(g.x,g.y,l.width,l.height):this.rect=new t}O(o,"LNode"),o.prototype=Object.create(i.prototype);for(var p in i)o[p]=i[p];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(n){this.rect.width=n},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(n){this.rect.height=n},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new a(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(n,g){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(n,g){this.rect.x=n-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(n,g){this.rect.x=n,this.rect.y=g},o.prototype.moveBy=function(n,g){this.rect.x+=n,this.rect.y+=g},o.prototype.getEdgeListToNode=function(n){var g=[],l=this;return l.edges.forEach(function(f){if(f.target==n){if(f.source!=l)throw"Incorrect edge source!";g.push(f)}}),g},o.prototype.getEdgesBetween=function(n){var g=[],l=this;return l.edges.forEach(function(f){if(!(f.source==l||f.target==l))throw"Incorrect edge source and/or target";(f.target==n||f.source==n)&&g.push(f)}),g},o.prototype.getNeighborsList=function(){var n=new Set,g=this;return g.edges.forEach(function(l){if(l.source==g)n.add(l.target);else{if(l.target!=g)throw"Incorrect incidency!";n.add(l.source)}}),n},o.prototype.withChildren=function(){var n=new Set,g,l;if(n.add(this),this.child!=null)for(var f=this.child.getNodes(),E=0;Eg&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(n){var g=this.rect.x;g>r.WORLD_BOUNDARY?g=r.WORLD_BOUNDARY:g<-r.WORLD_BOUNDARY&&(g=-r.WORLD_BOUNDARY);var l=this.rect.y;l>r.WORLD_BOUNDARY?l=r.WORLD_BOUNDARY:l<-r.WORLD_BOUNDARY&&(l=-r.WORLD_BOUNDARY);var f=new a(g,l),E=n.inverseTransformPoint(f);this.setLocation(E.x,E.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=o}),(function(m,L,N){function i(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}O(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},m.exports=i}),(function(m,L,N){var i=N(2),e=N(10),t=N(0),r=N(6),h=N(3),a=N(1),o=N(13),p=N(12),n=N(11);function g(f,E,y){i.call(this,y),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,E!=null&&E instanceof r?this.graphManager=E:E!=null&&E instanceof Layout&&(this.graphManager=E.graphManager)}O(g,"LGraph"),g.prototype=Object.create(i.prototype);for(var l in i)g[l]=i[l];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(f,E,y){if(E==null&&y==null){var d=f;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(d)>-1)throw"Node already in graph!";return d.owner=this,this.getNodes().push(d),d}else{var _=f;if(!(this.getNodes().indexOf(E)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(E.owner==y.owner&&E.owner==this))throw"Both owners must be this graph!";return E.owner!=y.owner?null:(_.source=E,_.target=y,_.isInterGraph=!1,this.getEdges().push(_),E.edges.push(_),y!=E&&y.edges.push(_),_)}},g.prototype.remove=function(f){var E=f;if(f instanceof h){if(E==null)throw"Node is null!";if(!(E.owner!=null&&E.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=E.edges.slice(),d,_=y.length,v=0;v<_;v++)d=y[v],d.isInterGraph?this.graphManager.remove(d):d.source.owner.remove(d);var I=this.nodes.indexOf(E);if(I==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(f instanceof a){var d=f;if(d==null)throw"Edge is null!";if(!(d.source!=null&&d.target!=null))throw"Source and/or target is null!";if(!(d.source.owner!=null&&d.target.owner!=null&&d.source.owner==this&&d.target.owner==this))throw"Source and/or target owner is invalid!";var s=d.source.edges.indexOf(d),u=d.target.edges.indexOf(d);if(!(s>-1&&u>-1))throw"Source and/or target doesn't know this edge!";d.source.edges.splice(s,1),d.target!=d.source&&d.target.edges.splice(u,1);var I=d.source.owner.getEdges().indexOf(d);if(I==-1)throw"Not in owner's edge list!";d.source.owner.getEdges().splice(I,1)}},g.prototype.updateLeftTop=function(){for(var f=e.MAX_VALUE,E=e.MAX_VALUE,y,d,_,v=this.getNodes(),I=v.length,s=0;sy&&(f=y),E>d&&(E=d)}return f==e.MAX_VALUE?null:(v[0].getParent().paddingLeft!=null?_=v[0].getParent().paddingLeft:_=this.margin,this.left=E-_,this.top=f-_,new p(this.left,this.top))},g.prototype.updateBounds=function(f){for(var E=e.MAX_VALUE,y=-e.MAX_VALUE,d=e.MAX_VALUE,_=-e.MAX_VALUE,v,I,s,u,c,A=this.nodes,T=A.length,w=0;wv&&(E=v),ys&&(d=s),_v&&(E=v),ys&&(d=s),_=this.nodes.length){var T=0;y.forEach(function(w){w.owner==f&&T++}),T==this.nodes.length&&(this.isConnected=!0)}},m.exports=g}),(function(m,L,N){var i,e=N(1);function t(r){i=N(5),this.layout=r,this.graphs=[],this.edges=[]}O(t,"LGraphManager"),t.prototype.addRoot=function(){var r=this.layout.newGraph(),h=this.layout.newNode(null),a=this.add(r,h);return this.setRootGraph(a),this.rootGraph},t.prototype.add=function(r,h,a,o,p){if(a==null&&o==null&&p==null){if(r==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return r.parent=h,h.child=r,r}else{p=a,o=h,a=r;var n=o.getOwner(),g=p.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==g)return a.isInterGraph=!1,n.add(a,o,p);if(a.isInterGraph=!0,a.source=o,a.target=p,this.edges.indexOf(a)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(a),!(a.source!=null&&a.target!=null))throw"Edge source and/or target is null!";if(!(a.source.edges.indexOf(a)==-1&&a.target.edges.indexOf(a)==-1))throw"Edge already in source and/or target incidency list!";return a.source.edges.push(a),a.target.edges.push(a),a}},t.prototype.remove=function(r){if(r instanceof i){var h=r;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var a=[];a=a.concat(h.getEdges());for(var o,p=a.length,n=0;n=r.getRight()?h[0]+=Math.min(r.getX()-t.getX(),t.getRight()-r.getRight()):r.getX()<=t.getX()&&r.getRight()>=t.getRight()&&(h[0]+=Math.min(t.getX()-r.getX(),r.getRight()-t.getRight())),t.getY()<=r.getY()&&t.getBottom()>=r.getBottom()?h[1]+=Math.min(r.getY()-t.getY(),t.getBottom()-r.getBottom()):r.getY()<=t.getY()&&r.getBottom()>=t.getBottom()&&(h[1]+=Math.min(t.getY()-r.getY(),r.getBottom()-t.getBottom()));var p=Math.abs((r.getCenterY()-t.getCenterY())/(r.getCenterX()-t.getCenterX()));r.getCenterY()===t.getCenterY()&&r.getCenterX()===t.getCenterX()&&(p=1);var n=p*h[0],g=h[1]/p;h[0]n)return h[0]=a,h[1]=l,h[2]=p,h[3]=A,!1;if(op)return h[0]=g,h[1]=o,h[2]=u,h[3]=n,!1;if(ap?(h[0]=E,h[1]=y,M=!0):(h[0]=f,h[1]=l,M=!0):F===x&&(a>p?(h[0]=g,h[1]=l,M=!0):(h[0]=d,h[1]=y,M=!0)),-S===x?p>a?(h[2]=c,h[3]=A,R=!0):(h[2]=u,h[3]=s,R=!0):S===x&&(p>a?(h[2]=I,h[3]=s,R=!0):(h[2]=T,h[3]=A,R=!0)),M&&R)return!1;if(a>p?o>n?(G=this.getCardinalDirection(F,x,4),b=this.getCardinalDirection(S,x,2)):(G=this.getCardinalDirection(-F,x,3),b=this.getCardinalDirection(-S,x,1)):o>n?(G=this.getCardinalDirection(-F,x,1),b=this.getCardinalDirection(-S,x,3)):(G=this.getCardinalDirection(F,x,2),b=this.getCardinalDirection(S,x,4)),!M)switch(G){case 1:U=l,P=a+-v/x,h[0]=P,h[1]=U;break;case 2:P=d,U=o+_*x,h[0]=P,h[1]=U;break;case 3:U=y,P=a+v/x,h[0]=P,h[1]=U;break;case 4:P=E,U=o+-_*x,h[0]=P,h[1]=U;break}if(!R)switch(b){case 1:B=s,Y=p+-D/x,h[2]=Y,h[3]=B;break;case 2:Y=T,B=n+w*x,h[2]=Y,h[3]=B;break;case 3:B=A,Y=p+D/x,h[2]=Y,h[3]=B;break;case 4:Y=c,B=n+-w*x,h[2]=Y,h[3]=B;break}}return!1},e.getCardinalDirection=function(t,r,h){return t>r?h:1+h%4},e.getIntersection=function(t,r,h,a){if(a==null)return this.getIntersection2(t,r,h);var o=t.x,p=t.y,n=r.x,g=r.y,l=h.x,f=h.y,E=a.x,y=a.y,d=void 0,_=void 0,v=void 0,I=void 0,s=void 0,u=void 0,c=void 0,A=void 0,T=void 0;return v=g-p,s=o-n,c=n*p-o*g,I=y-f,u=l-E,A=E*f-l*y,T=v*u-I*s,T===0?null:(d=(s*A-u*c)/T,_=(I*c-v*A)/T,new i(d,_))},e.angleOfVector=function(t,r,h,a){var o=void 0;return t!==h?(o=Math.atan((a-r)/(h-t)),h0?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},m.exports=i}),(function(m,L,N){function i(){}O(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,m.exports=i}),(function(m,L,N){var i=(function(){function o(p,n){for(var g=0;g"u"?"undefined":i(t);return t==null||r!="object"&&r!="function"},m.exports=e}),(function(m,L,N){function i(l){if(Array.isArray(l)){for(var f=0,E=Array(l.length);f0&&f;){for(v.push(s[0]);v.length>0&&f;){var u=v[0];v.splice(0,1),_.add(u);for(var c=u.getEdges(),d=0;d-1&&s.splice(D,1)}_=new Set,I=new Map}}return l},g.prototype.createDummyNodesForBendpoints=function(l){for(var f=[],E=l.source,y=this.graphManager.calcLowestCommonAncestor(l.source,l.target),d=0;d0){for(var y=this.edgeToDummyNodes.get(E),d=0;d=0&&f.splice(A,1);var T=I.getNeighborsList();T.forEach(function(M){if(E.indexOf(M)<0){var R=y.get(M),F=R-1;F==1&&u.push(M),y.set(M,F)}})}E=E.concat(u),(f.length==1||f.length==2)&&(d=!0,_=f[0])}return _},g.prototype.setGraphManager=function(l){this.graphManager=l},m.exports=g}),(function(m,L,N){function i(){}O(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},m.exports=i}),(function(m,L,N){var i=N(4);function e(t,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}O(e,"Transform"),e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var r=0,h=this.lworldExtX;return h!=0&&(r=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/h),r},e.prototype.transformY=function(t){var r=0,h=this.lworldExtY;return h!=0&&(r=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/h),r},e.prototype.inverseTransformX=function(t){var r=0,h=this.ldeviceExtX;return h!=0&&(r=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/h),r},e.prototype.inverseTransformY=function(t){var r=0,h=this.ldeviceExtY;return h!=0&&(r=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/h),r},e.prototype.inverseTransformPoint=function(t){var r=new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return r},m.exports=e}),(function(m,L,N){function i(n){if(Array.isArray(n)){for(var g=0,l=Array(n.length);gt.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(n-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),g,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,f,E,y,d=this.getAllNodes(),_;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),_=new Set,l=0;lv||_>v)&&(n.gravitationForceX=-this.gravityConstant*E,n.gravitationForceY=-this.gravityConstant*y)):(v=g.getEstimatedSize()*this.compoundGravityRangeFactor,(d>v||_>v)&&(n.gravitationForceX=-this.gravityConstant*E*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},o.prototype.isConverged=function(){var n,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=d.length||v>=d[0].length)){for(var I=0;Ia},"_defaultCompareFunction")}]),h})();m.exports=r}),(function(m,L,N){var i=(function(){function r(h,a){for(var o=0;o2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,r),this.sequence1=h,this.sequence2=a,this.match_score=o,this.mismatch_penalty=p,this.gap_penalty=n,this.iMax=h.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var g=0;g=0;h--){var a=this.listeners[h];a.event===t&&a.callback===r&&this.listeners.splice(h,1)}},e.emit=function(t,r){for(var h=0;h{O((function(m,L){typeof C=="object"&&typeof X=="object"?X.exports=L(Z()):typeof define=="function"&&define.amd?define(["layout-base"],L):typeof C=="object"?C.coseBase=L(Z()):m.coseBase=L(m.layoutBase)}),"webpackUniversalModuleDefinition")(C,function(m){return(function(L){var N={};function i(e){if(N[e])return N[e].exports;var t=N[e]={i:e,l:!1,exports:{}};return L[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return O(i,"__webpack_require__"),i.m=L,i.c=N,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?O(function(){return e.default},"getDefault"):O(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=7)})([(function(L,N){L.exports=m}),(function(L,N,i){var e=i(0).FDLayoutConstants;function t(){}O(t,"CoSEConstants");for(var r in e)t[r]=e[r];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,L.exports=t}),(function(L,N,i){var e=i(0).FDLayoutEdge;function t(h,a,o){e.call(this,h,a,o)}O(t,"CoSEEdge"),t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];L.exports=t}),(function(L,N,i){var e=i(0).LGraph;function t(h,a,o){e.call(this,h,a,o)}O(t,"CoSEGraph"),t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];L.exports=t}),(function(L,N,i){var e=i(0).LGraphManager;function t(h){e.call(this,h)}O(t,"CoSEGraphManager"),t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];L.exports=t}),(function(L,N,i){var e=i(0).FDLayoutNode,t=i(0).IMath;function r(a,o,p,n){e.call(this,a,o,p,n)}O(r,"CoSENode"),r.prototype=Object.create(e.prototype);for(var h in e)r[h]=e[h];r.prototype.move=function(){var a=this.graphManager.getLayout();this.displacementX=a.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=a.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementX=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementY=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),a.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(a,o){for(var p=this.getChild().getNodes(),n,g=0;g0)this.positionNodesRadially(c);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(w){return s.has(w)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%p.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(T){return s.has(T)});this.graphManager.setAllNodesToApplyGravitation(u),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,A=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,A),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),u={},c=0;c1){var M;for(M=0;MA&&(A=Math.floor(D.y)),w=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-D.x/2,n.WORLD_CENTER_Y-D.y/2))},v.radialLayout=function(s,u,c){var A=Math.max(this.maxDiagonalInTree(s),o.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(u,null,0,359,0,A);var T=d.calculateBounds(s),w=new _;w.setDeviceOrgX(T.getMinX()),w.setDeviceOrgY(T.getMinY()),w.setWorldOrgX(c.x),w.setWorldOrgY(c.y);for(var D=0;D1;){var B=Y[0];Y.splice(0,1);var k=x.indexOf(B);k>=0&&x.splice(k,1),P--,G--}u!=null?U=(x.indexOf(Y[0])+1)%P:U=0;for(var H=Math.abs(A-c)/G,W=U;b!=G;W=++W%P){var V=x[W].getOtherEnd(s);if(V!=u){var z=(c+b*H)%360,ot=(z+H)%360;v.branchRadialLayout(V,s,z,ot,T+w,w),b++}}},v.maxDiagonalInTree=function(s){for(var u=E.MIN_VALUE,c=0;cu&&(u=T)}return u},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var s=this,u={};this.memberGroups={},this.idToDummyNode={};for(var c=[],A=this.graphManager.getAllNodes(),T=0;T"u"&&(u[M]=[]),u[M]=u[M].concat(w)}Object.keys(u).forEach(function(R){if(u[R].length>1){var F="DummyCompound_"+R;s.memberGroups[F]=u[R];var S=u[R][0].getParent(),x=new h(s.graphManager);x.id=F,x.paddingLeft=S.paddingLeft||0,x.paddingRight=S.paddingRight||0,x.paddingBottom=S.paddingBottom||0,x.paddingTop=S.paddingTop||0,s.idToDummyNode[F]=x;var G=s.getGraphManager().add(s.newGraph(),x),b=S.getChild();b.add(x);for(var P=0;P=0;s--){var u=this.compoundOrder[s],c=u.id,A=u.paddingLeft,T=u.paddingTop;this.adjustLocations(this.tiledMemberPack[c],u.rect.x,u.rect.y,A,T)}},v.prototype.repopulateZeroDegreeMembers=function(){var s=this,u=this.tiledZeroDegreePack;Object.keys(u).forEach(function(c){var A=s.idToDummyNode[c],T=A.paddingLeft,w=A.paddingTop;s.adjustLocations(u[c],A.rect.x,A.rect.y,T,w)})},v.prototype.getToBeTiled=function(s){var u=s.id;if(this.toBeTiled[u]!=null)return this.toBeTiled[u];var c=s.getChild();if(c==null)return this.toBeTiled[u]=!1,!1;for(var A=c.getNodes(),T=0;T0)return this.toBeTiled[u]=!1,!1;if(w.getChild()==null){this.toBeTiled[w.id]=!1;continue}if(!this.getToBeTiled(w))return this.toBeTiled[u]=!1,!1}return this.toBeTiled[u]=!0,!0},v.prototype.getNodeDegree=function(s){for(var u=s.id,c=s.getEdges(),A=0,T=0;TR&&(R=S.rect.height)}c+=R+s.verticalPadding}},v.prototype.tileCompoundMembers=function(s,u){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(A){var T=u[A];c.tiledMemberPack[A]=c.tileNodes(s[A],T.paddingLeft+T.paddingRight),T.rect.width=c.tiledMemberPack[A].width,T.rect.height=c.tiledMemberPack[A].height})},v.prototype.tileNodes=function(s,u){var c=o.TILING_PADDING_VERTICAL,A=o.TILING_PADDING_HORIZONTAL,T={rows:[],rowWidth:[],rowHeight:[],width:0,height:u,verticalPadding:c,horizontalPadding:A};s.sort(function(M,R){return M.rect.width*M.rect.height>R.rect.width*R.rect.height?-1:M.rect.width*M.rect.height0&&(D+=s.horizontalPadding),s.rowWidth[c]=D,s.width0&&(M+=s.verticalPadding);var R=0;M>s.rowHeight[c]&&(R=s.rowHeight[c],s.rowHeight[c]=M,R=s.rowHeight[c]-R),s.height+=R,s.rows[c].push(u)},v.prototype.getShortestRowIndex=function(s){for(var u=-1,c=Number.MAX_VALUE,A=0;Ac&&(u=A,c=s.rowWidth[A]);return u},v.prototype.canAddHorizontal=function(s,u,c){var A=this.getShortestRowIndex(s);if(A<0)return!0;var T=s.rowWidth[A];if(T+s.horizontalPadding+u<=s.width)return!0;var w=0;s.rowHeight[A]0&&(w=c+s.verticalPadding-s.rowHeight[A]);var D;s.width-T>=u+s.horizontalPadding?D=(s.height+w)/(T+u+s.horizontalPadding):D=(s.height+w)/s.width,w=c+s.verticalPadding;var M;return s.widthw&&u!=c){A.splice(-1,1),s.rows[c].push(T),s.rowWidth[u]=s.rowWidth[u]-w,s.rowWidth[c]=s.rowWidth[c]+w,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var D=Number.MIN_VALUE,M=0;MD&&(D=A[M].height);u>0&&(D+=s.verticalPadding);var R=s.rowHeight[u]+s.rowHeight[c];s.rowHeight[u]=D,s.rowHeight[c]0)for(var b=T;b<=w;b++)G[0]+=this.grid[b][D-1].length+this.grid[b][D].length-1;if(w0)for(var b=D;b<=M;b++)G[3]+=this.grid[T-1][b].length+this.grid[T][b].length-1;for(var P=E.MAX_VALUE,U,Y,B=0;B{O((function(m,L){typeof C=="object"&&typeof X=="object"?X.exports=L($()):typeof define=="function"&&define.amd?define(["cose-base"],L):typeof C=="object"?C.cytoscapeCoseBilkent=L($()):m.cytoscapeCoseBilkent=L(m.coseBase)}),"webpackUniversalModuleDefinition")(C,function(m){return(function(L){var N={};function i(e){if(N[e])return N[e].exports;var t=N[e]={i:e,l:!1,exports:{}};return L[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return O(i,"__webpack_require__"),i.m=L,i.c=N,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?O(function(){return e.default},"getDefault"):O(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)})([(function(L,N){L.exports=m}),(function(L,N,i){var e=i(0).layoutBase.LayoutConstants,t=i(0).layoutBase.FDLayoutConstants,r=i(0).CoSEConstants,h=i(0).CoSELayout,a=i(0).CoSENode,o=i(0).layoutBase.PointD,p=i(0).layoutBase.DimensionD,n={ready:O(function(){},"ready"),stop:O(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function g(y,d){var _={};for(var v in y)_[v]=y[v];for(var v in d)_[v]=d[v];return _}O(g,"extend");function l(y){this.options=g(n,y),f(this.options)}O(l,"_CoSELayout");var f=O(function(y){y.nodeRepulsion!=null&&(r.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=y.nodeRepulsion),y.idealEdgeLength!=null&&(r.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=y.idealEdgeLength),y.edgeElasticity!=null&&(r.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=y.edgeElasticity),y.nestingFactor!=null&&(r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=y.nestingFactor),y.gravity!=null&&(r.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=y.gravity),y.numIter!=null&&(r.MAX_ITERATIONS=t.MAX_ITERATIONS=y.numIter),y.gravityRange!=null&&(r.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=y.gravityRange),y.gravityCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=y.gravityCompound),y.gravityRangeCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=y.gravityRangeCompound),y.initialEnergyOnIncremental!=null&&(r.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=y.initialEnergyOnIncremental),y.quality=="draft"?e.QUALITY=0:y.quality=="proof"?e.QUALITY=2:e.QUALITY=1,r.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=y.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!y.randomize,r.ANIMATE=t.ANIMATE=e.ANIMATE=y.animate,r.TILE=y.tile,r.TILING_PADDING_VERTICAL=typeof y.tilingPaddingVertical=="function"?y.tilingPaddingVertical.call():y.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof y.tilingPaddingHorizontal=="function"?y.tilingPaddingHorizontal.call():y.tilingPaddingHorizontal},"getUserOptions");l.prototype.run=function(){var y,d,_=this.options;this.idToLNode={};var v=this.layout=new h,I=this;I.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=v.newGraphManager();this.gm=s;var u=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(u),v);for(var A=0;A0){var M;M=_.getGraphManager().add(_.newGraph(),c),this.processChildrenList(M,u,_)}}},l.prototype.stop=function(){return this.stopped=!0,this};var E=O(function(y){y("layout","cose-bilkent",l)},"register");typeof cytoscape<"u"&&E(cytoscape),L.exports=E})])})}),lt=at(ht());Q.use(lt.default);function K(C,X){C.forEach(m=>{let L={id:m.id,labelText:m.label,height:m.height,width:m.width,padding:m.padding??0};Object.keys(m).forEach(N=>{["id","label","height","width","padding","x","y"].includes(N)||(L[N]=m[N])}),X.add({group:"nodes",data:L,position:{x:m.x??0,y:m.y??0}})})}O(K,"addNodes");function J(C,X){C.forEach(m=>{let L={id:m.id,source:m.start,target:m.end};Object.keys(m).forEach(N=>{["id","start","end"].includes(N)||(L[N]=m[N])}),X.add({group:"edges",data:L})})}O(J,"addEdges");function tt(C){return new Promise(X=>{let m=st("body").append("div").attr("id","cy").attr("style","display:none"),L=Q({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),K(C.nodes,L),J(C.edges,L),L.nodes().forEach(function(i){i.layoutDimensions=()=>{let e=i.data();return{w:e.width,h:e.height}}});let N={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};L.layout(N).run(),L.ready(i=>{j.info("Cytoscape ready",i),X(L)})})}O(tt,"createCytoscapeInstance");function et(C){return C.nodes().map(X=>{let m=X.data(),L=X.position(),N={id:m.id,x:L.x,y:L.y};return Object.keys(m).forEach(i=>{i!=="id"&&(N[i]=m[i])}),N})}O(et,"extractPositionedNodes");function rt(C){return C.edges().map(X=>{let m=X.data(),L=X._private.rscratch,N={id:m.id,source:m.source,target:m.target,startX:L.startX,startY:L.startY,midX:L.midX,midY:L.midY,endX:L.endX,endY:L.endY};return Object.keys(m).forEach(i=>{["id","source","target"].includes(i)||(N[i]=m[i])}),N})}O(rt,"extractPositionedEdges");async function it(C,X){j.debug("Starting cose-bilkent layout algorithm");try{nt(C);let m=await tt(C),L=et(m),N=rt(m);return j.debug(`Layout completed: ${L.length} nodes, ${N.length} edges`),{nodes:L,edges:N}}catch(m){throw j.error("Error in cose-bilkent layout algorithm:",m),m}}O(it,"executeCoseBilkentLayout");function nt(C){if(!C)throw new Error("Layout data is required");if(!C.config)throw new Error("Configuration is required in layout data");if(!C.rootNode)throw new Error("Root node is required");if(!C.nodes||!Array.isArray(C.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(C.edges))throw new Error("Edges array is required in layout data");return!0}O(nt,"validateLayoutData");var gt=O(async(C,X,{insertCluster:m,insertEdge:L,insertEdgeLabel:N,insertMarkers:i,insertNode:e,log:t,positionEdgeLabel:r},{algorithm:h})=>{let a={},o={},p=X.select("g");i(p,C.markers,C.type,C.diagramId);let n=p.insert("g").attr("class","subgraphs"),g=p.insert("g").attr("class","edgePaths"),l=p.insert("g").attr("class","edgeLabels"),f=p.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(C.nodes.map(async d=>{if(d.isGroup){let _={...d};o[d.id]=_,a[d.id]=_,await m(n,d)}else{let _={...d};a[d.id]=_;let v=await e(f,d,{config:C.config,dir:C.direction||"TB"}),I=v.node().getBBox();_.width=I.width,_.height=I.height,_.domId=v,t.debug(`Node ${d.id} dimensions: ${I.width}x${I.height}`)}})),t.debug("Running cose-bilkent layout algorithm");let E={...C,nodes:C.nodes.map(d=>{let _=a[d.id];return{...d,width:_.width,height:_.height}})},y=await it(E,C.config);t.debug("Positioning nodes based on layout results"),y.nodes.forEach(d=>{let _=a[d.id];_?.domId&&(_.domId.attr("transform",`translate(${d.x}, ${d.y})`),_.x=d.x,_.y=d.y,t.debug(`Positioned node ${_.id} at center (${d.x}, ${d.y})`))}),y.edges.forEach(d=>{let _=C.edges.find(v=>v.id===d.id);_&&(_.points=[{x:d.startX,y:d.startY},{x:d.midX,y:d.midY},{x:d.endX,y:d.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(C.edges.map(async d=>{await N(l,d);let _=a[d.start??""],v=a[d.end??""];if(_&&v){let I=y.edges.find(s=>s.id===d.id);if(I){t.debug("APA01 positionedEdge",I);let s={...d},u=L(g,s,o,C.type,_,v,C.diagramId);r(s,u)}else{let s={...d,points:[{x:_.x||0,y:_.y||0},{x:v.x||0,y:v.y||0}]},u=L(g,s,o,C.type,_,v,C.diagramId);r(s,u)}}})),t.debug("Cose-bilkent rendering completed")},"render"),pt=gt;export{pt as render};