m&&(N.dx*=m/C,N.dy*=m/C),y.fromGraph(r,O)?N.fixed=!0:(N.x+=N.dx,N.y+=N.dy,N.fixed=!1)}return{converged:x}},Mm}var Md={},oO;function f5(){return oO||(oO=1,Md.assignLayoutChanges=function(e,t,n){const{nodeXAttribute:r,nodeYAttribute:a}=n;e.updateEachNodeAttributes((o,s)=>{const l=t[o];return!l||l.fixed||(s[r]=l.x,s[a]=l.y),s},{attributes:["x","y"]})},Md.collectLayoutChanges=function(e){const t={};for(const n in e){const r=e[n];t[n]={x:r.x,y:r.y}}return t}),Md}var Pm,iO;function p5(){return iO||(iO=1,Pm={nodeXAttribute:"x",nodeYAttribute:"y",isNodeFixed:"fixed",shouldSkipNode:null,shouldSkipEdge:null,settings:{attraction:5e-4,repulsion:.1,gravity:1e-4,inertia:.6,maxMove:200}}),Pm}var Fm,sO;function Jne(){if(sO)return Fm;sO=1;const e=ua(),t=au(),n=d5(),r=f5(),a=p5();function o(l,u,d){if(!e(u))throw new Error("graphology-layout-force: the given graph is not a valid graphology instance.");typeof d=="number"?d={maxIterations:d}:d=d||{};const p=d.maxIterations;if(d=t(d,a),typeof p!="number"||p<=0)throw new Error("graphology-layout-force: you should provide a positive number of maximum iterations.");const g={};let m=null,b;for(b=0;bthis.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},zm=o,zm}var rre=nre();const are=un(rre);function ore(e={maxIterations:100}){return Js(tre,e)}function ire(e={}){return PT(are,e)}var Bm,cO;function sre(){if(cO)return Bm;cO=1;var e=0,t=1,n=2,r=3,a=4,o=5,s=6,l=7,u=8,d=9,p=0,g=1,m=2,b=0,v=1,y=2,k=3,A=4,x=5,R=6,O=7,N=8,C=3,_=10,M=3,I=9,D=10;return Bm=function($,B,W){var K,H,G,z,Y,L,V,j,P,Z,Q=B.length,oe=W.length,ae=$.adjustSizes,ce=$.barnesHutTheta*$.barnesHutTheta,Re,ie,Te,ne,xe,Se,be,J=[];for(G=0;GOe?(he-=(ye-Oe)/2,Ee=he+ye):(pe-=(Oe-ye)/2,ke=pe+Oe),J[0+b]=-1,J[0+v]=(pe+ke)/2,J[0+y]=(he+Ee)/2,J[0+k]=Math.max(ke-pe,Ee-he),J[0+A]=-1,J[0+x]=-1,J[0+R]=0,J[0+O]=0,J[0+N]=0,K=1,G=0;G=0){B[G+e]=0)if(Se=Math.pow(B[G+e]-J[H+O],2)+Math.pow(B[G+t]-J[H+N],2),Z=J[H+k],4*Z*Z/Se0?(be=ie*B[G+s]*J[H+R]/Se,B[G+n]+=Te*be,B[G+r]+=ne*be):Se<0&&(be=-ie*B[G+s]*J[H+R]/Math.sqrt(Se),B[G+n]+=Te*be,B[G+r]+=ne*be):Se>0&&(be=ie*B[G+s]*J[H+R]/Se,B[G+n]+=Te*be,B[G+r]+=ne*be),H=J[H+A],H<0)break;continue}else{H=J[H+x];continue}else{if(L=J[H+b],L>=0&&L!==G&&(Te=B[G+e]-B[L+e],ne=B[G+t]-B[L+t],Se=Te*Te+ne*ne,ae===!0?Se>0?(be=ie*B[G+s]*B[L+s]/Se,B[G+n]+=Te*be,B[G+r]+=ne*be):Se<0&&(be=-ie*B[G+s]*B[L+s]/Math.sqrt(Se),B[G+n]+=Te*be,B[G+r]+=ne*be):Se>0&&(be=ie*B[G+s]*B[L+s]/Se,B[G+n]+=Te*be,B[G+r]+=ne*be)),H=J[H+A],H<0)break;continue}else for(ie=$.scalingRatio,z=0;z0?(be=ie*B[z+s]*B[Y+s]/Se/Se,B[z+n]+=Te*be,B[z+r]+=ne*be,B[Y+n]-=Te*be,B[Y+r]-=ne*be):Se<0&&(be=100*ie*B[z+s]*B[Y+s],B[z+n]+=Te*be,B[z+r]+=ne*be,B[Y+n]-=Te*be,B[Y+r]-=ne*be)):(Se=Math.sqrt(Te*Te+ne*ne),Se>0&&(be=ie*B[z+s]*B[Y+s]/Se/Se,B[z+n]+=Te*be,B[z+r]+=ne*be,B[Y+n]-=Te*be,B[Y+r]-=ne*be));for(P=$.gravity/$.scalingRatio,ie=$.scalingRatio,G=0;G0&&(be=ie*B[G+s]*P):Se>0&&(be=ie*B[G+s]*P/Se),B[G+n]-=Te*be,B[G+r]-=ne*be;for(ie=1*($.outboundAttractionDistribution?Re:1),V=0;V0&&(be=-ie*xe*Math.log(1+Se)/Se/B[z+s]):Se>0&&(be=-ie*xe*Math.log(1+Se)/Se):$.outboundAttractionDistribution?Se>0&&(be=-ie*xe/B[z+s]):Se>0&&(be=-ie*xe)):(Se=Math.sqrt(Math.pow(Te,2)+Math.pow(ne,2)),$.linLogMode?$.outboundAttractionDistribution?Se>0&&(be=-ie*xe*Math.log(1+Se)/Se/B[z+s]):Se>0&&(be=-ie*xe*Math.log(1+Se)/Se):$.outboundAttractionDistribution?(Se=1,be=-ie*xe/B[z+s]):(Se=1,be=-ie*xe)),Se>0&&(B[z+n]+=Te*be,B[z+r]+=ne*be,B[Y+n]-=Te*be,B[Y+r]-=ne*be);var ee,de,Ne,Fe,We,St;if(ae===!0)for(G=0;GD&&(B[G+n]=B[G+n]*D/ee,B[G+r]=B[G+r]*D/ee),de=B[G+s]*Math.sqrt((B[G+a]-B[G+n])*(B[G+a]-B[G+n])+(B[G+o]-B[G+r])*(B[G+o]-B[G+r])),Ne=Math.sqrt((B[G+a]+B[G+n])*(B[G+a]+B[G+n])+(B[G+o]+B[G+r])*(B[G+o]+B[G+r]))/2,Fe=.1*Math.log(1+Ne)/(1+Math.sqrt(de)),We=B[G+e]+B[G+n]*(Fe/$.slowDown),B[G+e]=We,St=B[G+t]+B[G+r]*(Fe/$.slowDown),B[G+t]=St);else for(G=0;G=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in n&&typeof n.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in n&&!(typeof n.gravity=="number"&&n.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in n&&!(typeof n.slowDown=="number"||n.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in n&&typeof n.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in n&&!(typeof n.barnesHutTheta=="number"&&n.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},Da.graphToByteArrays=function(n,r){var a=n.order,o=n.size,s={},l,u=new Float32Array(a*e),d=new Float32Array(o*t);return l=0,n.forEachNode(function(p,g){s[p]=l,u[l]=g.x,u[l+1]=g.y,u[l+2]=0,u[l+3]=0,u[l+4]=0,u[l+5]=0,u[l+6]=1,u[l+7]=1,u[l+8]=g.size||1,u[l+9]=g.fixed?1:0,l+=e}),l=0,n.forEachEdge(function(p,g,m,b,v,y,k){var A=s[m],x=s[b],R=r(p,g,m,b,v,y,k);u[A+6]+=R,u[x+6]+=R,d[l]=A,d[l+1]=x,d[l+2]=R,l+=t}),{nodes:u,edges:d}},Da.assignLayoutChanges=function(n,r,a){var o=0;n.updateEachNodeAttributes(function(s,l){return l.x=r[o],l.y=r[o+1],o+=e,a?a(s,l):l})},Da.readGraphPositions=function(n,r){var a=0;n.forEachNode(function(o,s){r[a]=s.x,r[a+1]=s.y,a+=e})},Da.collectLayoutChanges=function(n,r,a){for(var o=n.nodes(),s={},l=0,u=0,d=r.length;l2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(d)}}var l=o.bind(null,!1);return l.assign=o.bind(null,!0),l.inferSettings=s,Um=l,Um}var cre=lre();const ure=un(cre);var Gm,pO;function dre(){return pO||(pO=1,Gm=function(){var t,n,r={};(function(){var o=0,s=1,l=2,u=3,d=4,p=5,g=6,m=7,b=8,v=9,y=0,k=1,A=2,x=0,R=1,O=2,N=3,C=4,_=5,M=6,I=7,D=8,U=3,$=10,B=3,W=9,K=10;r.exports=function(G,z,Y){var L,V,j,P,Z,Q,oe,ae,ce,Re,ie=z.length,Te=Y.length,ne=G.adjustSizes,xe=G.barnesHutTheta*G.barnesHutTheta,Se,be,J,pe,ke,he,Ee,se=[];for(j=0;jWe?(ye-=(Fe-We)/2,Oe=ye+Fe):(Be-=(We-Fe)/2,je=Be+We),se[0+x]=-1,se[0+R]=(Be+je)/2,se[0+O]=(ye+Oe)/2,se[0+N]=Math.max(je-Be,Oe-ye),se[0+C]=-1,se[0+_]=-1,se[0+M]=0,se[0+I]=0,se[0+D]=0,L=1,j=0;j=0){z[j+o]=0)if(he=Math.pow(z[j+o]-se[V+I],2)+Math.pow(z[j+s]-se[V+D],2),Re=se[V+N],4*Re*Re/he0?(Ee=be*z[j+g]*se[V+M]/he,z[j+l]+=J*Ee,z[j+u]+=pe*Ee):he<0&&(Ee=-be*z[j+g]*se[V+M]/Math.sqrt(he),z[j+l]+=J*Ee,z[j+u]+=pe*Ee):he>0&&(Ee=be*z[j+g]*se[V+M]/he,z[j+l]+=J*Ee,z[j+u]+=pe*Ee),V=se[V+C],V<0)break;continue}else{V=se[V+_];continue}else{if(Q=se[V+x],Q>=0&&Q!==j&&(J=z[j+o]-z[Q+o],pe=z[j+s]-z[Q+s],he=J*J+pe*pe,ne===!0?he>0?(Ee=be*z[j+g]*z[Q+g]/he,z[j+l]+=J*Ee,z[j+u]+=pe*Ee):he<0&&(Ee=-be*z[j+g]*z[Q+g]/Math.sqrt(he),z[j+l]+=J*Ee,z[j+u]+=pe*Ee):he>0&&(Ee=be*z[j+g]*z[Q+g]/he,z[j+l]+=J*Ee,z[j+u]+=pe*Ee)),V=se[V+C],V<0)break;continue}else for(be=G.scalingRatio,P=0;P