@inkeep/agents-manage-ui 0.14.7 → 0.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/agents-manage-ui/.next/BUILD_ID +1 -1
- package/.next/standalone/agents-manage-ui/.next/app-build-manifest.json +77 -77
- package/.next/standalone/agents-manage-ui/.next/app-path-routes-manifest.json +4 -4
- package/.next/standalone/agents-manage-ui/.next/build-manifest.json +2 -2
- package/.next/standalone/agents-manage-ui/.next/prerender-manifest.json +15 -15
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/[graphId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/[graphId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/[graphId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/new/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/graphs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.rsc +8 -8
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app-paths-manifest.json +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/chunks/1496.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/1635.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/171.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2141.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2539.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2606.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2954.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3001.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/320.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3547.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/4249.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/4438.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/5217.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/5905.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6086.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6212.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6525.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6575.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6721.js +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6747.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6903.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7065.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/726.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/chunks/{4122.js → 7499.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7975.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8048.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8100.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8953.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9091.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9122.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9128.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9600.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/404.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/500.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{1558-a1e7708ef2c6ccf0.js → 1558-d865bf1f00e7c12b.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{8515-e9cf26a34b9c1437.js → 2868-b52cb3a47ecefa24.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/7167-c5e4e7d94fa15335.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-f7e3e117f38a74cb.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page-3d7ef35e9493d133.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/page-3d7ef35e9493d133.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-a2c87bc3c477622f.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/{page-bfb86e2cf69e76a9.js → page-701709cb2c03cf2a.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/{page-bfb86e2cf69e76a9.js → page-701709cb2c03cf2a.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-3f3e4bbef7c72dfd.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/{page-4926d8b60db48e18.js → page-f128020c91b9e229.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-cd9b26117c4efd7b.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-f092f98f8ca6486d.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/{page-254fe642543eb2e2.js → page-e30a87b6b9edeac2.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/graphs/{page-44d56adc303db287.js → page-4632a08599552d17.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/new/{page-dfb5db140998bb2b.js → page-29a2caba4979a361.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-2c2e969e4ca00b12.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/{page-cbb789d70c01dec2.js → page-0e6e1a98664c34a3.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-e6ae5b14db3b0409.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-afa9d800a7044fbb.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/{layout-9423bb6905309ed6.js → layout-18f5c6d1fb7725b7.js} +1 -1
- package/.next/standalone/agents-manage-ui/package.json +1 -1
- package/.next/standalone/packages/agents-core/package.json +1 -1
- package/package.json +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/chunks/1503.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3366.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/5275.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7807.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/7167-71e3b60508cdd439.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-031cace0a5d53197.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page-3609e351329f37b6.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/page-3609e351329f37b6.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-ff3e1ad5fa0267cd.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-efefe2601c41e4ea.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-5ce88f2ac581ad04.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-156a47cf8b7eb215.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-4579835fe9ce6134.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-33fe8ce956434c19.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-5c539a64e59a1e33.js +0 -1
- /package/.next/standalone/agents-manage-ui/.next/static/{biloVx1F30d-aiix8zisb → nzsahwI7YF76UXtjfSHD1}/_buildManifest.js +0 -0
- /package/.next/standalone/agents-manage-ui/.next/static/{biloVx1F30d-aiix8zisb → nzsahwI7YF76UXtjfSHD1}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
exports.id=726,exports.ids=[726],exports.modules={20132:(a,b,c)=>{"use strict";function d(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}c.d(b,{S:()=>d}),(0,c(18086).K2)(d,"populateCommonDb")},41027:function(a,b,c){var d;d=c(97881),a.exports=(()=>{"use strict";var a={658:a=>{a.exports=null!=Object.assign?Object.assign.bind(Object):function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return c.forEach(function(b){Object.keys(b).forEach(function(c){return a[c]=b[c]})}),a}},548:(a,b,c)=>{var d=function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return function(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}(a,b);throw TypeError("Invalid attempt to destructure non-iterable instance")},e=c(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(a){for(var b={},c=0;c<a.length;c++)b[a[c].id()]=!0;return a.filter(function(a,c){"number"==typeof a&&(a=c);for(var d=a.parent()[0];null!=d;){if(b[d.id()])return!1;d=d.parent()[0]}return!0})},f.connectComponents=function(a,b,c,d){var f=new e,g=new Set,h=[],i=void 0,j=void 0,k=void 0,l=!1,m=1,n=[],o=[];do!function(){var d=a.collection();o.push(d);var e=c[0],p=a.collection();for(p.merge(e).merge(e.descendants().intersection(b)),h.push(e),p.forEach(function(a){f.push(a),g.add(a),d.merge(a)});0!=f.length;)!function(){e=f.shift();var j=a.collection();e.neighborhood().nodes().forEach(function(a){b.intersection(e.edgesWith(a)).length>0&&j.merge(a)});for(var k=0;k<j.length;k++){var l=j[k];null==(i=c.intersection(l.union(l.ancestors())))||g.has(i[0])||i.union(i.descendants()).forEach(function(a){f.push(a),g.add(a),d.merge(a),c.has(a)&&h.push(a)})}}();if(d.forEach(function(a){b.intersection(a.connectedEdges()).forEach(function(a){d.has(a.source())&&d.has(a.target())&&d.merge(a)})}),h.length==c.length&&(l=!0),!l||l&&m>1){k=(j=h[0]).connectedEdges().length,h.forEach(function(a){a.connectedEdges().length<k&&(k=a.connectedEdges().length,j=a)}),n.push(j.id());var q=a.collection();q.merge(h[0]),h.forEach(function(a){q.merge(a)}),h=[],c=c.difference(q),m++}}();while(!l);return d&&n.length>0&&d.set("dummy"+(d.size+1),n),o},f.relocateComponent=function(a,b,c){if(!c.fixedNodeConstraint){var e=1/0,f=-1/0,g=1/0,h=-1/0;if("draft"==c.quality){var i=!0,j=!1,k=void 0;try{for(var l,m=b.nodeIndexes[Symbol.iterator]();!(i=(l=m.next()).done);i=!0){var n=l.value,o=d(n,2),p=o[0],q=o[1],r=c.cy.getElementById(p);if(r){var s=r.boundingBox(),t=b.xCoords[q]-s.w/2,u=b.xCoords[q]+s.w/2,v=b.yCoords[q]-s.h/2,w=b.yCoords[q]+s.h/2;t<e&&(e=t),u>f&&(f=u),v<g&&(g=v),w>h&&(h=w)}}}catch(a){j=!0,k=a}finally{try{!i&&m.return&&m.return()}finally{if(j)throw k}}var x=a.x-(f+e)/2,y=a.y-(h+g)/2;b.xCoords=b.xCoords.map(function(a){return a+x}),b.yCoords=b.yCoords.map(function(a){return a+y})}else{Object.keys(b).forEach(function(a){var c=b[a],d=c.getRect().x,i=c.getRect().x+c.getRect().width,j=c.getRect().y,k=c.getRect().y+c.getRect().height;d<e&&(e=d),i>f&&(f=i),j<g&&(g=j),k>h&&(h=k)});var z=a.x-(f+e)/2,A=a.y-(h+g)/2;Object.keys(b).forEach(function(a){var c=b[a];c.setCenter(c.getCenterX()+z,c.getCenterY()+A)})}}},f.calcBoundingBox=function(a,b,c,d){for(var e=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,i=void 0,j=void 0,k=void 0,l=void 0,m=a.descendants().not(":parent"),n=m.length,o=0;o<n;o++){var p=m[o];i=b[d.get(p.id())]-p.width()/2,j=b[d.get(p.id())]+p.width()/2,k=c[d.get(p.id())]-p.height()/2,l=c[d.get(p.id())]+p.height()/2,e>i&&(e=i),f<j&&(f=j),g>k&&(g=k),h<l&&(h=l)}var q={};return q.topLeftX=e,q.topLeftY=g,q.width=f-e,q.height=h-g,q},f.calcParentsWithoutChildren=function(a,b){var c=a.collection();return b.nodes(":parent").forEach(function(a){var b=!1;a.children().forEach(function(a){"none"!=a.css("display")&&(b=!0)}),b||c.merge(a)}),c},a.exports=f},816:(a,b,c)=>{var d=c(548),e=c(140).CoSELayout,f=c(140).CoSENode,g=c(140).layoutBase.PointD,h=c(140).layoutBase.DimensionD,i=c(140).layoutBase.LayoutConstants,j=c(140).layoutBase.FDLayoutConstants,k=c(140).CoSEConstants;a.exports={coseLayout:function(a,b){var c=a.cy,l=a.eles,m=l.nodes(),n=l.edges(),o=void 0,p=void 0,q=void 0,r={};a.randomize&&(o=b.nodeIndexes,p=b.xCoords,q=b.yCoords);var s=function(a){return"function"==typeof a},t=function(a,b){return s(a)?a(b):a},u=d.calcParentsWithoutChildren(c,l);null!=a.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=j.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.nestingFactor),null!=a.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=j.DEFAULT_GRAVITY_STRENGTH=a.gravity),null!=a.numIter&&(k.MAX_ITERATIONS=j.MAX_ITERATIONS=a.numIter),null!=a.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=j.DEFAULT_GRAVITY_RANGE_FACTOR=a.gravityRange),null!=a.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=j.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.gravityCompound),null!=a.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=j.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.gravityRangeCompound),null!=a.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=j.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.initialEnergyOnIncremental),null!=a.tilingCompareBy&&(k.TILING_COMPARE_BY=a.tilingCompareBy),"proof"==a.quality?i.QUALITY=2:i.QUALITY=0,k.NODE_DIMENSIONS_INCLUDE_LABELS=j.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=a.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=j.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!a.randomize,k.ANIMATE=j.ANIMATE=i.ANIMATE=a.animate,k.TILE=a.tile,k.TILING_PADDING_VERTICAL="function"==typeof a.tilingPaddingVertical?a.tilingPaddingVertical.call():a.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof a.tilingPaddingHorizontal?a.tilingPaddingHorizontal.call():a.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=j.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!a.randomize,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=a.uniformNodeDimensions,"transformed"==a.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==a.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==a.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==a.step&&(a.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint?k.TREE_REDUCTION_ON_INCREMENTAL=!1:k.TREE_REDUCTION_ON_INCREMENTAL=!0;var v=new e,w=v.newGraphManager();return!function a(b,c,e,i){for(var j=c.length,k=0;k<j;k++){var l=c[k],m=null;0==l.intersection(u).length&&(m=l.children());var n=void 0,s=l.layoutDimensions({nodeDimensionsIncludeLabels:i.nodeDimensionsIncludeLabels});if(null!=l.outerWidth()&&null!=l.outerHeight())if(i.randomize)if(l.isParent()){var v=d.calcBoundingBox(l,p,q,o);n=0==l.intersection(u).length?b.add(new f(e.graphManager,new g(v.topLeftX,v.topLeftY),new h(v.width,v.height))):b.add(new f(e.graphManager,new g(v.topLeftX,v.topLeftY),new h(parseFloat(s.w),parseFloat(s.h))))}else n=b.add(new f(e.graphManager,new g(p[o.get(l.id())]-s.w/2,q[o.get(l.id())]-s.h/2),new h(parseFloat(s.w),parseFloat(s.h))));else n=b.add(new f(e.graphManager,new g(l.position("x")-s.w/2,l.position("y")-s.h/2),new h(parseFloat(s.w),parseFloat(s.h))));else n=b.add(new f(this.graphManager));(n.id=l.data("id"),n.nodeRepulsion=t(i.nodeRepulsion,l),n.paddingLeft=parseInt(l.css("padding")),n.paddingTop=parseInt(l.css("padding")),n.paddingRight=parseInt(l.css("padding")),n.paddingBottom=parseInt(l.css("padding")),i.nodeDimensionsIncludeLabels&&(n.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,n.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,n.labelPosVertical=l.css("text-valign"),n.labelPosHorizontal=l.css("text-halign")),r[l.data("id")]=n,isNaN(n.rect.x)&&(n.rect.x=0),isNaN(n.rect.y)&&(n.rect.y=0),null!=m&&m.length>0)&&a(e.getGraphManager().add(e.newGraph(),n),m,e,i)}}(w.addRoot(),d.getTopMostNodes(m),v,a),!function(b,c,d){for(var e=0,f=0,g=0;g<d.length;g++){var h=d[g],i=r[h.data("source")],l=r[h.data("target")];if(i&&l&&i!==l&&0==i.getEdgesBetween(l).length){var m=c.add(b.newEdge(),i,l);m.id=h.id(),m.idealLength=t(a.idealEdgeLength,h),m.edgeElasticity=t(a.edgeElasticity,h),e+=m.idealLength,f++}}null!=a.idealEdgeLength&&(f>0?k.DEFAULT_EDGE_LENGTH=j.DEFAULT_EDGE_LENGTH=e/f:s(a.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=j.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=j.DEFAULT_EDGE_LENGTH=a.idealEdgeLength,k.MIN_REPULSION_DIST=j.MIN_REPULSION_DIST=j.DEFAULT_EDGE_LENGTH/10,k.DEFAULT_RADIAL_SEPARATION=j.DEFAULT_EDGE_LENGTH)}(v,w,n),a.fixedNodeConstraint&&(v.constraints.fixedNodeConstraint=a.fixedNodeConstraint),a.alignmentConstraint&&(v.constraints.alignmentConstraint=a.alignmentConstraint),a.relativePlacementConstraint&&(v.constraints.relativePlacementConstraint=a.relativePlacementConstraint),v.runLayout(),r}}},212:(a,b,c)=>{var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=c(658),f=c(548),g=c(657).spectralLayout,h=c(816).coseLayout,i=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(a){return 4500},idealEdgeLength:function(a){return 50},edgeElasticity:function(a){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}});a.exports=function(){function a(b){if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.options=e({},i,b)}return d(a,[{key:"run",value:function(){var a=this.options,b=a.cy,c=a.eles,d=[],e=[],i=void 0,j=[];a.fixedNodeConstraint&&(!Array.isArray(a.fixedNodeConstraint)||0==a.fixedNodeConstraint.length)&&(a.fixedNodeConstraint=void 0),a.alignmentConstraint&&(a.alignmentConstraint.vertical&&(!Array.isArray(a.alignmentConstraint.vertical)||0==a.alignmentConstraint.vertical.length)&&(a.alignmentConstraint.vertical=void 0),a.alignmentConstraint.horizontal&&(!Array.isArray(a.alignmentConstraint.horizontal)||0==a.alignmentConstraint.horizontal.length)&&(a.alignmentConstraint.horizontal=void 0)),a.relativePlacementConstraint&&(!Array.isArray(a.relativePlacementConstraint)||0==a.relativePlacementConstraint.length)&&(a.relativePlacementConstraint=void 0),(a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint)&&(a.tile=!1,a.packComponents=!1);var k=void 0,l=!1;if(b.layoutUtilities&&a.packComponents&&((k=b.layoutUtilities("get"))||(k=b.layoutUtilities()),l=!0),c.nodes().length>0)if(l){var m=f.getTopMostNodes(a.eles.nodes());if((i=f.connectComponents(b,a.eles,m)).forEach(function(a){var b=a.boundingBox();j.push({x:b.x1+b.w/2,y:b.y1+b.h/2})}),a.randomize&&i.forEach(function(b){a.eles=b,d.push(g(a))}),"default"==a.quality||"proof"==a.quality){var n=b.collection();if(a.tile){var o=new Map,p=0,q={nodeIndexes:o,xCoords:[],yCoords:[]},r=[];if(i.forEach(function(a,b){0==a.edges().length&&(a.nodes().forEach(function(b,c){n.merge(a.nodes()[c]),b.isParent()||(q.nodeIndexes.set(a.nodes()[c].id(),p++),q.xCoords.push(a.nodes()[0].position().x),q.yCoords.push(a.nodes()[0].position().y))}),r.push(b))}),n.length>1){var s=n.boundingBox();j.push({x:s.x1+s.w/2,y:s.y1+s.h/2}),i.push(n),d.push(q);for(var t=r.length-1;t>=0;t--)i.splice(r[t],1),d.splice(r[t],1),j.splice(r[t],1)}}i.forEach(function(b,c){a.eles=b,e.push(h(a,d[c])),f.relocateComponent(j[c],e[c],a)})}else i.forEach(function(b,c){f.relocateComponent(j[c],d[c],a)});var u=new Set;if(i.length>1){var v=[],w=c.filter(function(a){return"none"==a.css("display")});i.forEach(function(b,c){var g=void 0;if("draft"==a.quality&&(g=d[c].nodeIndexes),b.nodes().not(w).length>0){var h={};h.edges=[],h.nodes=[];var i=void 0;b.nodes().not(w).forEach(function(b){if("draft"==a.quality)if(b.isParent()){var j=f.calcBoundingBox(b,d[c].xCoords,d[c].yCoords,g);h.nodes.push({x:j.topLeftX,y:j.topLeftY,width:j.width,height:j.height})}else i=g.get(b.id()),h.nodes.push({x:d[c].xCoords[i]-b.boundingbox().w/2,y:d[c].yCoords[i]-b.boundingbox().h/2,width:b.boundingbox().w,height:b.boundingbox().h});else e[c][b.id()]&&h.nodes.push({x:e[c][b.id()].getLeft(),y:e[c][b.id()].getTop(),width:e[c][b.id()].getWidth(),height:e[c][b.id()].getHeight()})}),b.edges().forEach(function(b){var i=b.source(),j=b.target();if("none"!=i.css("display")&&"none"!=j.css("display"))if("draft"==a.quality){var k=g.get(i.id()),l=g.get(j.id()),m=[],n=[];if(i.isParent()){var o=f.calcBoundingBox(i,d[c].xCoords,d[c].yCoords,g);m.push(o.topLeftX+o.width/2),m.push(o.topLeftY+o.height/2)}else m.push(d[c].xCoords[k]),m.push(d[c].yCoords[k]);if(j.isParent()){var p=f.calcBoundingBox(j,d[c].xCoords,d[c].yCoords,g);n.push(p.topLeftX+p.width/2),n.push(p.topLeftY+p.height/2)}else n.push(d[c].xCoords[l]),n.push(d[c].yCoords[l]);h.edges.push({startX:m[0],startY:m[1],endX:n[0],endY:n[1]})}else e[c][i.id()]&&e[c][j.id()]&&h.edges.push({startX:e[c][i.id()].getCenterX(),startY:e[c][i.id()].getCenterY(),endX:e[c][j.id()].getCenterX(),endY:e[c][j.id()].getCenterY()})}),h.nodes.length>0&&(v.push(h),u.add(c))}});var x=k.packComponents(v,a.randomize).shifts;if("draft"==a.quality)d.forEach(function(a,b){var c=a.xCoords.map(function(a){return a+x[b].dx}),d=a.yCoords.map(function(a){return a+x[b].dy});a.xCoords=c,a.yCoords=d});else{var y=0;u.forEach(function(a){Object.keys(e[a]).forEach(function(b){var c=e[a][b];c.setCenter(c.getCenterX()+x[y].dx,c.getCenterY()+x[y].dy)}),y++})}}}else{var z=a.eles.boundingBox();if(j.push({x:z.x1+z.w/2,y:z.y1+z.h/2}),a.randomize){var A=g(a);d.push(A)}"default"==a.quality||"proof"==a.quality?(e.push(h(a,d[0])),f.relocateComponent(j[0],e[0],a)):f.relocateComponent(j[0],d[0],a)}var B=function(b,c){if("default"==a.quality||"proof"==a.quality){"number"==typeof b&&(b=c);var f=void 0,g=void 0,h=b.data("id");return e.forEach(function(a){h in a&&(f={x:a[h].getRect().getCenterX(),y:a[h].getRect().getCenterY()},g=a[h])}),a.nodeDimensionsIncludeLabels&&(g.labelWidth&&("left"==g.labelPosHorizontal?f.x+=g.labelWidth/2:"right"==g.labelPosHorizontal&&(f.x-=g.labelWidth/2)),g.labelHeight&&("top"==g.labelPosVertical?f.y+=g.labelHeight/2:"bottom"==g.labelPosVertical&&(f.y-=g.labelHeight/2))),void 0==f&&(f={x:b.position("x"),y:b.position("y")}),{x:f.x,y:f.y}}var i=void 0;return d.forEach(function(a){var c=a.nodeIndexes.get(b.id());void 0!=c&&(i={x:a.xCoords[c],y:a.yCoords[c]})}),void 0==i&&(i={x:b.position("x"),y:b.position("y")}),{x:i.x,y:i.y}};if("default"==a.quality||"proof"==a.quality||a.randomize){var C=f.calcParentsWithoutChildren(b,c),D=c.filter(function(a){return"none"==a.css("display")});a.eles=c.not(D),c.nodes().not(":parent").not(D).layoutPositions(this,a,B),C.length>0&&C.forEach(function(a){a.position(B(a))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),a}()},657:(a,b,c)=>{var d=c(548),e=c(140).layoutBase.Matrix,f=c(140).layoutBase.SVD;a.exports={spectralLayout:function(a){var b=a.cy,c=a.eles,g=c.nodes(),h=c.nodes(":parent"),i=new Map,j=new Map,k=new Map,l=[],m=[],n=[],o=[],p=[],q=[],r=[],s=[],t=void 0,u=a.piTol,v=a.samplingType,w=a.nodeSeparation,x=void 0,y=function(){for(var a=0,b=0,c=!1;b<x;){a=Math.floor(Math.random()*t),c=!1;for(var d=0;d<b;d++)if(o[d]==a){c=!0;break}!c&&(o[b]=a,b++)}},z=function(a,b,c){for(var d=[],e=0,f=0,g=0,h=void 0,i=[],k=0,m=1,n=0;n<t;n++)i[n]=1e8;for(d[f]=a,i[a]=0;f>=e;){for(var o=l[g=d[e++]],r=0;r<o.length;r++)1e8==i[h=j.get(o[r])]&&(i[h]=i[g]+1,d[++f]=h);q[g][b]=i[g]*w}if(c){for(var s=0;s<t;s++)q[s][b]<p[s]&&(p[s]=q[s][b]);for(var u=0;u<t;u++)p[u]>k&&(k=p[u],m=u)}return m};d.connectComponents(b,c,d.getTopMostNodes(g),i),h.forEach(function(a){d.connectComponents(b,c,d.getTopMostNodes(a.descendants().intersection(c)),i)});for(var A=0,B=0;B<g.length;B++)g[B].isParent()||j.set(g[B].id(),A++);var C=!0,D=!1,E=void 0;try{for(var F,G=i.keys()[Symbol.iterator]();!(C=(F=G.next()).done);C=!0){var H=F.value;j.set(H,A++)}}catch(a){D=!0,E=a}finally{try{!C&&G.return&&G.return()}finally{if(D)throw E}}for(var I=0;I<j.size;I++)l[I]=[];h.forEach(function(a){for(var b=a.children().intersection(c);0==b.nodes(":childless").length;)b=b.nodes()[0].children().intersection(c);var d=0,e=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(a,b){a.connectedEdges().length<e&&(e=a.connectedEdges().length,d=b)}),k.set(a.id(),b.nodes(":childless")[d].id())}),g.forEach(function(a){var b=void 0;b=a.isParent()?j.get(k.get(a.id())):j.get(a.id()),a.neighborhood().nodes().forEach(function(d){c.intersection(a.edgesWith(d)).length>0&&(d.isParent()?l[b].push(k.get(d.id())):l[b].push(d.id()))})});var J=function(a){var c=j.get(a),d=void 0;i.get(a).forEach(function(e){d=b.getElementById(e).isParent()?k.get(e):e,l[c].push(d),l[j.get(d)].push(a)})},K=!0,L=!1,M=void 0;try{for(var N,O=i.keys()[Symbol.iterator]();!(K=(N=O.next()).done);K=!0){var P=N.value;J(P)}}catch(a){L=!0,M=a}finally{try{!K&&O.return&&O.return()}finally{if(L)throw M}}t=j.size;if(t>2){x=t<a.sampleSize?t:a.sampleSize;for(var Q=0;Q<t;Q++)q[Q]=[];for(var R=0;R<x;R++)s[R]=[];return"draft"==a.quality||"all"==a.step?(!function(a){var b=void 0;if(a){b=Math.floor(Math.random()*t);for(var c=0;c<t;c++)p[c]=1e8;for(var d=0;d<x;d++)o[d]=b,b=z(b,d,a)}else{y();for(var e=0;e<x;e++)z(o[e],e,a,!1)}for(var f=0;f<t;f++)for(var g=0;g<x;g++)q[f][g]*=q[f][g];for(var h=0;h<x;h++)r[h]=[];for(var i=0;i<x;i++)for(var j=0;j<x;j++)r[i][j]=q[o[j]][i]}(v),!function(){for(var a=f.svd(r),b=a.S,c=a.U,d=a.V,g=b[0]*b[0]*b[0],h=[],i=0;i<x;i++){h[i]=[];for(var j=0;j<x;j++)h[i][j]=0,i==j&&(h[i][j]=b[i]/(b[i]*b[i]+g/(b[i]*b[i])))}s=e.multMat(e.multMat(d,h),e.transpose(c))}(),!function(){for(var a=void 0,b=void 0,c=[],d=[],f=[],g=[],h=0;h<t;h++)c[h]=Math.random(),d[h]=Math.random();c=e.normalize(c),d=e.normalize(d);for(var i=0,j=1e-9,k=1e-9,l=void 0;;){i++;for(var o=0;o<t;o++)f[o]=c[o];if(c=e.multGamma(e.multL(e.multGamma(f),q,s)),a=e.dotProduct(f,c),c=e.normalize(c),(l=Math.abs((j=e.dotProduct(f,c))/k))<=1+u&&l>=1)break;k=j}for(var p=0;p<t;p++)f[p]=c[p];for(i=0,k=1e-9;;){i++;for(var r=0;r<t;r++)g[r]=d[r];if(g=e.minusOp(g,e.multCons(f,e.dotProduct(f,g))),d=e.multGamma(e.multL(e.multGamma(g),q,s)),b=e.dotProduct(g,d),d=e.normalize(d),(l=Math.abs((j=e.dotProduct(g,d))/k))<=1+u&&l>=1)break;k=j}for(var v=0;v<t;v++)g[v]=d[v];m=e.multCons(f,Math.sqrt(Math.abs(a))),n=e.multCons(g,Math.sqrt(Math.abs(b)))}()):j.forEach(function(a,c){m.push(b.getElementById(c).position("x")),n.push(b.getElementById(c).position("y"))}),{nodeIndexes:j,xCoords:m,yCoords:n}}var S=j.keys(),T=b.getElementById(S.next().value),U=T.position(),V=T.outerWidth();if(m.push(U.x),n.push(U.y),2==t){var W=b.getElementById(S.next().value).outerWidth();m.push(U.x+V/2+W/2+a.idealEdgeLength),n.push(U.y)}return{nodeIndexes:j,xCoords:m,yCoords:n}}}},579:(a,b,c)=>{var d=c(212),e=function(a){a&&a("layout","fcose",d)};"undefined"!=typeof cytoscape&&e(cytoscape),a.exports=e},140:a=>{a.exports=d}},b={};return function c(d){var e=b[d];if(void 0!==e)return e.exports;var f=b[d]={exports:{}};return a[d](f,f.exports,c),f.exports}(579)})()},70726:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>Y});var d=c(5513),e=c(70967),f=c(20132),g=c(35957),h=c(51142),i=c(18086),j=c(96957),k=c(95411),l=c(41027),m=c(40217),n={L:"left",R:"right",T:"top",B:"bottom"},o={L:(0,i.K2)(a=>`${a},${a/2} 0,${a} 0,0`,"L"),R:(0,i.K2)(a=>`0,${a/2} ${a},0 ${a},${a}`,"R"),T:(0,i.K2)(a=>`0,0 ${a},0 ${a/2},${a}`,"T"),B:(0,i.K2)(a=>`${a/2},0 ${a},${a} 0,${a}`,"B")},p={L:(0,i.K2)((a,b)=>a-b+2,"L"),R:(0,i.K2)((a,b)=>a-2,"R"),T:(0,i.K2)((a,b)=>a-b+2,"T"),B:(0,i.K2)((a,b)=>a-2,"B")},q=(0,i.K2)(function(a){return s(a)?"L"===a?"R":"L":"T"===a?"B":"T"},"getOppositeArchitectureDirection"),r=(0,i.K2)(function(a){return"L"===a||"R"===a||"T"===a||"B"===a},"isArchitectureDirection"),s=(0,i.K2)(function(a){return"L"===a||"R"===a},"isArchitectureDirectionX"),t=(0,i.K2)(function(a){return"T"===a||"B"===a},"isArchitectureDirectionY"),u=(0,i.K2)(function(a,b){let c=s(a)&&t(b),d=t(a)&&s(b);return c||d},"isArchitectureDirectionXY"),v=(0,i.K2)(function(a){let b=a[0],c=a[1],d=s(b)&&t(c),e=t(b)&&s(c);return d||e},"isArchitecturePairXY"),w=(0,i.K2)(function(a){return"LL"!==a&&"RR"!==a&&"TT"!==a&&"BB"!==a},"isValidArchitectureDirectionPair"),x=(0,i.K2)(function(a,b){let c=`${a}${b}`;return w(c)?c:void 0},"getArchitectureDirectionPair"),y=(0,i.K2)(function([a,b],c){let d=c[0],e=c[1];if(s(d))if(t(e))return[a+("L"===d?-1:1),b+("T"===e?1:-1)];else return[a+("L"===d?-1:1),b];return s(e)?[a+("L"===e?1:-1),b+("T"===d?1:-1)]:[a,b+("T"===d?1:-1)]},"shiftPositionByArchitectureDirectionPair"),z=(0,i.K2)(function(a){return"LT"===a||"TL"===a?[1,1]:"BL"===a||"LB"===a?[1,-1]:"BR"===a||"RB"===a?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),A=(0,i.K2)(function(a,b){return u(a,b)?"bend":s(a)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),B=(0,i.K2)(function(a){return"service"===a.type},"isArchitectureService"),C=(0,i.K2)(function(a){return"junction"===a.type},"isArchitectureJunction"),D=(0,i.K2)(a=>a.data(),"edgeData"),E=(0,i.K2)(a=>a.data(),"nodeData"),F=h.UI.architecture,G=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getAccDescription=h.m7,this.setAccDescription=h.EI,this.clear()}static{(0,i.K2)(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,h.IU)()}addService({id:a,icon:b,in:c,title:d,iconText:e}){if(void 0!==this.registeredIds[a])throw Error(`The service id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The service [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[c])throw Error(`The service [${a}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[c])throw Error(`The service [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"service",icon:b,iconText:e,title:d,edges:[],in:c}}getServices(){return Object.values(this.nodes).filter(B)}addJunction({id:a,in:b}){this.registeredIds[a]="node",this.nodes[a]={id:a,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(C)}getNodes(){return Object.values(this.nodes)}getNode(a){return this.nodes[a]??null}addGroup({id:a,icon:b,in:c,title:d}){if(this.registeredIds?.[a]!==void 0)throw Error(`The group id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The group [${a}] cannot be placed within itself`);if(this.registeredIds?.[c]===void 0)throw Error(`The group [${a}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[c]==="node")throw Error(`The group [${a}]'s parent is not a group`)}this.registeredIds[a]="group",this.groups[a]={id:a,icon:b,title:d,in:c}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:a,rhsId:b,lhsDir:c,rhsDir:d,lhsInto:e,rhsInto:f,lhsGroup:g,rhsGroup:h,title:i}){if(!r(c))throw Error(`Invalid direction given for left hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(c)}`);if(!r(d))throw Error(`Invalid direction given for right hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(d)}`);if(void 0===this.nodes[a]&&void 0===this.groups[a])throw Error(`The left-hand id [${a}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[b]&&void 0===this.groups[b])throw Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);let j=this.nodes[a].in,k=this.nodes[b].in;if(g&&j&&k&&j==k)throw Error(`The left-hand id [${a}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(h&&j&&k&&j==k)throw Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:a,lhsDir:c,lhsInto:e,lhsGroup:g,rhsId:b,rhsDir:d,rhsInto:f,rhsGroup:h,title:i}),this.nodes[a]&&this.nodes[b]&&(this.nodes[a].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let a={},b=Object.entries(this.nodes).reduce((b,[c,d])=>(b[c]=d.edges.reduce((b,d)=>{let e=this.getNode(d.lhsId)?.in,f=this.getNode(d.rhsId)?.in;if(e&&f&&e!==f){let b=A(d.lhsDir,d.rhsDir);"bend"!==b&&(a[e]??={},a[e][f]=b,a[f]??={},a[f][e]=b)}if(d.lhsId===c){let a=x(d.lhsDir,d.rhsDir);a&&(b[a]=d.rhsId)}else{let a=x(d.rhsDir,d.lhsDir);a&&(b[a]=d.lhsId)}return b},{}),b),{}),c=Object.keys(b)[0],d={[c]:1},e=Object.keys(b).reduce((a,b)=>b===c?a:{...a,[b]:1},{}),f=(0,i.K2)(a=>{let c={[a]:[0,0]},f=[a];for(;f.length>0;){let a=f.shift();if(a){d[a]=1,delete e[a];let g=b[a],[h,i]=c[a];Object.entries(g).forEach(([a,b])=>{d[b]||(c[b]=y([h,i],a),f.push(b))})}}return c},"BFS"),g=[f(c)];for(;Object.keys(e).length>0;)g.push(f(Object.keys(e)[0]));this.dataStructures={adjList:b,spatialMaps:g,groupAlignments:a}}return this.dataStructures}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}getConfig(){return(0,g.$t)({...F,...(0,h.zj)().architecture})}getConfigField(a){return this.getConfig()[a]}},H=(0,i.K2)((a,b)=>{(0,f.S)(a,b),a.groups.map(a=>b.addGroup(a)),a.services.map(a=>b.addService({...a,type:"service"})),a.junctions.map(a=>b.addJunction({...a,type:"junction"})),a.edges.map(a=>b.addEdge(a))},"populateDb"),I={parser:{yy:void 0},parse:(0,i.K2)(async a=>{let b=await (0,j.qg)("architecture",a);i.Rm.debug(b);let c=I.parser?.yy;if(!(c instanceof G))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");H(b,c)},"parse")},J=(0,i.K2)(a=>`
|
|
1
|
+
exports.id=726,exports.ids=[726],exports.modules={20132:(a,b,c)=>{"use strict";function d(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}c.d(b,{S:()=>d}),(0,c(18086).K2)(d,"populateCommonDb")},41027:function(a,b,c){var d;d=c(97881),a.exports=(()=>{"use strict";var a={658:a=>{a.exports=null!=Object.assign?Object.assign.bind(Object):function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return c.forEach(function(b){Object.keys(b).forEach(function(c){return a[c]=b[c]})}),a}},548:(a,b,c)=>{var d=function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return function(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}(a,b);throw TypeError("Invalid attempt to destructure non-iterable instance")},e=c(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(a){for(var b={},c=0;c<a.length;c++)b[a[c].id()]=!0;return a.filter(function(a,c){"number"==typeof a&&(a=c);for(var d=a.parent()[0];null!=d;){if(b[d.id()])return!1;d=d.parent()[0]}return!0})},f.connectComponents=function(a,b,c,d){var f=new e,g=new Set,h=[],i=void 0,j=void 0,k=void 0,l=!1,m=1,n=[],o=[];do!function(){var d=a.collection();o.push(d);var e=c[0],p=a.collection();for(p.merge(e).merge(e.descendants().intersection(b)),h.push(e),p.forEach(function(a){f.push(a),g.add(a),d.merge(a)});0!=f.length;)!function(){e=f.shift();var j=a.collection();e.neighborhood().nodes().forEach(function(a){b.intersection(e.edgesWith(a)).length>0&&j.merge(a)});for(var k=0;k<j.length;k++){var l=j[k];null==(i=c.intersection(l.union(l.ancestors())))||g.has(i[0])||i.union(i.descendants()).forEach(function(a){f.push(a),g.add(a),d.merge(a),c.has(a)&&h.push(a)})}}();if(d.forEach(function(a){b.intersection(a.connectedEdges()).forEach(function(a){d.has(a.source())&&d.has(a.target())&&d.merge(a)})}),h.length==c.length&&(l=!0),!l||l&&m>1){k=(j=h[0]).connectedEdges().length,h.forEach(function(a){a.connectedEdges().length<k&&(k=a.connectedEdges().length,j=a)}),n.push(j.id());var q=a.collection();q.merge(h[0]),h.forEach(function(a){q.merge(a)}),h=[],c=c.difference(q),m++}}();while(!l);return d&&n.length>0&&d.set("dummy"+(d.size+1),n),o},f.relocateComponent=function(a,b,c){if(!c.fixedNodeConstraint){var e=1/0,f=-1/0,g=1/0,h=-1/0;if("draft"==c.quality){var i=!0,j=!1,k=void 0;try{for(var l,m=b.nodeIndexes[Symbol.iterator]();!(i=(l=m.next()).done);i=!0){var n=l.value,o=d(n,2),p=o[0],q=o[1],r=c.cy.getElementById(p);if(r){var s=r.boundingBox(),t=b.xCoords[q]-s.w/2,u=b.xCoords[q]+s.w/2,v=b.yCoords[q]-s.h/2,w=b.yCoords[q]+s.h/2;t<e&&(e=t),u>f&&(f=u),v<g&&(g=v),w>h&&(h=w)}}}catch(a){j=!0,k=a}finally{try{!i&&m.return&&m.return()}finally{if(j)throw k}}var x=a.x-(f+e)/2,y=a.y-(h+g)/2;b.xCoords=b.xCoords.map(function(a){return a+x}),b.yCoords=b.yCoords.map(function(a){return a+y})}else{Object.keys(b).forEach(function(a){var c=b[a],d=c.getRect().x,i=c.getRect().x+c.getRect().width,j=c.getRect().y,k=c.getRect().y+c.getRect().height;d<e&&(e=d),i>f&&(f=i),j<g&&(g=j),k>h&&(h=k)});var z=a.x-(f+e)/2,A=a.y-(h+g)/2;Object.keys(b).forEach(function(a){var c=b[a];c.setCenter(c.getCenterX()+z,c.getCenterY()+A)})}}},f.calcBoundingBox=function(a,b,c,d){for(var e=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,i=void 0,j=void 0,k=void 0,l=void 0,m=a.descendants().not(":parent"),n=m.length,o=0;o<n;o++){var p=m[o];i=b[d.get(p.id())]-p.width()/2,j=b[d.get(p.id())]+p.width()/2,k=c[d.get(p.id())]-p.height()/2,l=c[d.get(p.id())]+p.height()/2,e>i&&(e=i),f<j&&(f=j),g>k&&(g=k),h<l&&(h=l)}var q={};return q.topLeftX=e,q.topLeftY=g,q.width=f-e,q.height=h-g,q},f.calcParentsWithoutChildren=function(a,b){var c=a.collection();return b.nodes(":parent").forEach(function(a){var b=!1;a.children().forEach(function(a){"none"!=a.css("display")&&(b=!0)}),b||c.merge(a)}),c},a.exports=f},816:(a,b,c)=>{var d=c(548),e=c(140).CoSELayout,f=c(140).CoSENode,g=c(140).layoutBase.PointD,h=c(140).layoutBase.DimensionD,i=c(140).layoutBase.LayoutConstants,j=c(140).layoutBase.FDLayoutConstants,k=c(140).CoSEConstants;a.exports={coseLayout:function(a,b){var c=a.cy,l=a.eles,m=l.nodes(),n=l.edges(),o=void 0,p=void 0,q=void 0,r={};a.randomize&&(o=b.nodeIndexes,p=b.xCoords,q=b.yCoords);var s=function(a){return"function"==typeof a},t=function(a,b){return s(a)?a(b):a},u=d.calcParentsWithoutChildren(c,l);null!=a.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=j.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.nestingFactor),null!=a.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=j.DEFAULT_GRAVITY_STRENGTH=a.gravity),null!=a.numIter&&(k.MAX_ITERATIONS=j.MAX_ITERATIONS=a.numIter),null!=a.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=j.DEFAULT_GRAVITY_RANGE_FACTOR=a.gravityRange),null!=a.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=j.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.gravityCompound),null!=a.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=j.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.gravityRangeCompound),null!=a.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=j.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.initialEnergyOnIncremental),null!=a.tilingCompareBy&&(k.TILING_COMPARE_BY=a.tilingCompareBy),"proof"==a.quality?i.QUALITY=2:i.QUALITY=0,k.NODE_DIMENSIONS_INCLUDE_LABELS=j.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=a.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=j.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!a.randomize,k.ANIMATE=j.ANIMATE=i.ANIMATE=a.animate,k.TILE=a.tile,k.TILING_PADDING_VERTICAL="function"==typeof a.tilingPaddingVertical?a.tilingPaddingVertical.call():a.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof a.tilingPaddingHorizontal?a.tilingPaddingHorizontal.call():a.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=j.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!a.randomize,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=a.uniformNodeDimensions,"transformed"==a.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==a.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==a.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==a.step&&(a.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint?k.TREE_REDUCTION_ON_INCREMENTAL=!1:k.TREE_REDUCTION_ON_INCREMENTAL=!0;var v=new e,w=v.newGraphManager();return!function a(b,c,e,i){for(var j=c.length,k=0;k<j;k++){var l=c[k],m=null;0==l.intersection(u).length&&(m=l.children());var n=void 0,s=l.layoutDimensions({nodeDimensionsIncludeLabels:i.nodeDimensionsIncludeLabels});if(null!=l.outerWidth()&&null!=l.outerHeight())if(i.randomize)if(l.isParent()){var v=d.calcBoundingBox(l,p,q,o);n=0==l.intersection(u).length?b.add(new f(e.graphManager,new g(v.topLeftX,v.topLeftY),new h(v.width,v.height))):b.add(new f(e.graphManager,new g(v.topLeftX,v.topLeftY),new h(parseFloat(s.w),parseFloat(s.h))))}else n=b.add(new f(e.graphManager,new g(p[o.get(l.id())]-s.w/2,q[o.get(l.id())]-s.h/2),new h(parseFloat(s.w),parseFloat(s.h))));else n=b.add(new f(e.graphManager,new g(l.position("x")-s.w/2,l.position("y")-s.h/2),new h(parseFloat(s.w),parseFloat(s.h))));else n=b.add(new f(this.graphManager));(n.id=l.data("id"),n.nodeRepulsion=t(i.nodeRepulsion,l),n.paddingLeft=parseInt(l.css("padding")),n.paddingTop=parseInt(l.css("padding")),n.paddingRight=parseInt(l.css("padding")),n.paddingBottom=parseInt(l.css("padding")),i.nodeDimensionsIncludeLabels&&(n.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,n.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,n.labelPosVertical=l.css("text-valign"),n.labelPosHorizontal=l.css("text-halign")),r[l.data("id")]=n,isNaN(n.rect.x)&&(n.rect.x=0),isNaN(n.rect.y)&&(n.rect.y=0),null!=m&&m.length>0)&&a(e.getGraphManager().add(e.newGraph(),n),m,e,i)}}(w.addRoot(),d.getTopMostNodes(m),v,a),!function(b,c,d){for(var e=0,f=0,g=0;g<d.length;g++){var h=d[g],i=r[h.data("source")],l=r[h.data("target")];if(i&&l&&i!==l&&0==i.getEdgesBetween(l).length){var m=c.add(b.newEdge(),i,l);m.id=h.id(),m.idealLength=t(a.idealEdgeLength,h),m.edgeElasticity=t(a.edgeElasticity,h),e+=m.idealLength,f++}}null!=a.idealEdgeLength&&(f>0?k.DEFAULT_EDGE_LENGTH=j.DEFAULT_EDGE_LENGTH=e/f:s(a.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=j.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=j.DEFAULT_EDGE_LENGTH=a.idealEdgeLength,k.MIN_REPULSION_DIST=j.MIN_REPULSION_DIST=j.DEFAULT_EDGE_LENGTH/10,k.DEFAULT_RADIAL_SEPARATION=j.DEFAULT_EDGE_LENGTH)}(v,w,n),a.fixedNodeConstraint&&(v.constraints.fixedNodeConstraint=a.fixedNodeConstraint),a.alignmentConstraint&&(v.constraints.alignmentConstraint=a.alignmentConstraint),a.relativePlacementConstraint&&(v.constraints.relativePlacementConstraint=a.relativePlacementConstraint),v.runLayout(),r}}},212:(a,b,c)=>{var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=c(658),f=c(548),g=c(657).spectralLayout,h=c(816).coseLayout,i=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(a){return 4500},idealEdgeLength:function(a){return 50},edgeElasticity:function(a){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}});a.exports=function(){function a(b){if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.options=e({},i,b)}return d(a,[{key:"run",value:function(){var a=this.options,b=a.cy,c=a.eles,d=[],e=[],i=void 0,j=[];a.fixedNodeConstraint&&(!Array.isArray(a.fixedNodeConstraint)||0==a.fixedNodeConstraint.length)&&(a.fixedNodeConstraint=void 0),a.alignmentConstraint&&(a.alignmentConstraint.vertical&&(!Array.isArray(a.alignmentConstraint.vertical)||0==a.alignmentConstraint.vertical.length)&&(a.alignmentConstraint.vertical=void 0),a.alignmentConstraint.horizontal&&(!Array.isArray(a.alignmentConstraint.horizontal)||0==a.alignmentConstraint.horizontal.length)&&(a.alignmentConstraint.horizontal=void 0)),a.relativePlacementConstraint&&(!Array.isArray(a.relativePlacementConstraint)||0==a.relativePlacementConstraint.length)&&(a.relativePlacementConstraint=void 0),(a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint)&&(a.tile=!1,a.packComponents=!1);var k=void 0,l=!1;if(b.layoutUtilities&&a.packComponents&&((k=b.layoutUtilities("get"))||(k=b.layoutUtilities()),l=!0),c.nodes().length>0)if(l){var m=f.getTopMostNodes(a.eles.nodes());if((i=f.connectComponents(b,a.eles,m)).forEach(function(a){var b=a.boundingBox();j.push({x:b.x1+b.w/2,y:b.y1+b.h/2})}),a.randomize&&i.forEach(function(b){a.eles=b,d.push(g(a))}),"default"==a.quality||"proof"==a.quality){var n=b.collection();if(a.tile){var o=new Map,p=0,q={nodeIndexes:o,xCoords:[],yCoords:[]},r=[];if(i.forEach(function(a,b){0==a.edges().length&&(a.nodes().forEach(function(b,c){n.merge(a.nodes()[c]),b.isParent()||(q.nodeIndexes.set(a.nodes()[c].id(),p++),q.xCoords.push(a.nodes()[0].position().x),q.yCoords.push(a.nodes()[0].position().y))}),r.push(b))}),n.length>1){var s=n.boundingBox();j.push({x:s.x1+s.w/2,y:s.y1+s.h/2}),i.push(n),d.push(q);for(var t=r.length-1;t>=0;t--)i.splice(r[t],1),d.splice(r[t],1),j.splice(r[t],1)}}i.forEach(function(b,c){a.eles=b,e.push(h(a,d[c])),f.relocateComponent(j[c],e[c],a)})}else i.forEach(function(b,c){f.relocateComponent(j[c],d[c],a)});var u=new Set;if(i.length>1){var v=[],w=c.filter(function(a){return"none"==a.css("display")});i.forEach(function(b,c){var g=void 0;if("draft"==a.quality&&(g=d[c].nodeIndexes),b.nodes().not(w).length>0){var h={};h.edges=[],h.nodes=[];var i=void 0;b.nodes().not(w).forEach(function(b){if("draft"==a.quality)if(b.isParent()){var j=f.calcBoundingBox(b,d[c].xCoords,d[c].yCoords,g);h.nodes.push({x:j.topLeftX,y:j.topLeftY,width:j.width,height:j.height})}else i=g.get(b.id()),h.nodes.push({x:d[c].xCoords[i]-b.boundingbox().w/2,y:d[c].yCoords[i]-b.boundingbox().h/2,width:b.boundingbox().w,height:b.boundingbox().h});else e[c][b.id()]&&h.nodes.push({x:e[c][b.id()].getLeft(),y:e[c][b.id()].getTop(),width:e[c][b.id()].getWidth(),height:e[c][b.id()].getHeight()})}),b.edges().forEach(function(b){var i=b.source(),j=b.target();if("none"!=i.css("display")&&"none"!=j.css("display"))if("draft"==a.quality){var k=g.get(i.id()),l=g.get(j.id()),m=[],n=[];if(i.isParent()){var o=f.calcBoundingBox(i,d[c].xCoords,d[c].yCoords,g);m.push(o.topLeftX+o.width/2),m.push(o.topLeftY+o.height/2)}else m.push(d[c].xCoords[k]),m.push(d[c].yCoords[k]);if(j.isParent()){var p=f.calcBoundingBox(j,d[c].xCoords,d[c].yCoords,g);n.push(p.topLeftX+p.width/2),n.push(p.topLeftY+p.height/2)}else n.push(d[c].xCoords[l]),n.push(d[c].yCoords[l]);h.edges.push({startX:m[0],startY:m[1],endX:n[0],endY:n[1]})}else e[c][i.id()]&&e[c][j.id()]&&h.edges.push({startX:e[c][i.id()].getCenterX(),startY:e[c][i.id()].getCenterY(),endX:e[c][j.id()].getCenterX(),endY:e[c][j.id()].getCenterY()})}),h.nodes.length>0&&(v.push(h),u.add(c))}});var x=k.packComponents(v,a.randomize).shifts;if("draft"==a.quality)d.forEach(function(a,b){var c=a.xCoords.map(function(a){return a+x[b].dx}),d=a.yCoords.map(function(a){return a+x[b].dy});a.xCoords=c,a.yCoords=d});else{var y=0;u.forEach(function(a){Object.keys(e[a]).forEach(function(b){var c=e[a][b];c.setCenter(c.getCenterX()+x[y].dx,c.getCenterY()+x[y].dy)}),y++})}}}else{var z=a.eles.boundingBox();if(j.push({x:z.x1+z.w/2,y:z.y1+z.h/2}),a.randomize){var A=g(a);d.push(A)}"default"==a.quality||"proof"==a.quality?(e.push(h(a,d[0])),f.relocateComponent(j[0],e[0],a)):f.relocateComponent(j[0],d[0],a)}var B=function(b,c){if("default"==a.quality||"proof"==a.quality){"number"==typeof b&&(b=c);var f=void 0,g=void 0,h=b.data("id");return e.forEach(function(a){h in a&&(f={x:a[h].getRect().getCenterX(),y:a[h].getRect().getCenterY()},g=a[h])}),a.nodeDimensionsIncludeLabels&&(g.labelWidth&&("left"==g.labelPosHorizontal?f.x+=g.labelWidth/2:"right"==g.labelPosHorizontal&&(f.x-=g.labelWidth/2)),g.labelHeight&&("top"==g.labelPosVertical?f.y+=g.labelHeight/2:"bottom"==g.labelPosVertical&&(f.y-=g.labelHeight/2))),void 0==f&&(f={x:b.position("x"),y:b.position("y")}),{x:f.x,y:f.y}}var i=void 0;return d.forEach(function(a){var c=a.nodeIndexes.get(b.id());void 0!=c&&(i={x:a.xCoords[c],y:a.yCoords[c]})}),void 0==i&&(i={x:b.position("x"),y:b.position("y")}),{x:i.x,y:i.y}};if("default"==a.quality||"proof"==a.quality||a.randomize){var C=f.calcParentsWithoutChildren(b,c),D=c.filter(function(a){return"none"==a.css("display")});a.eles=c.not(D),c.nodes().not(":parent").not(D).layoutPositions(this,a,B),C.length>0&&C.forEach(function(a){a.position(B(a))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),a}()},657:(a,b,c)=>{var d=c(548),e=c(140).layoutBase.Matrix,f=c(140).layoutBase.SVD;a.exports={spectralLayout:function(a){var b=a.cy,c=a.eles,g=c.nodes(),h=c.nodes(":parent"),i=new Map,j=new Map,k=new Map,l=[],m=[],n=[],o=[],p=[],q=[],r=[],s=[],t=void 0,u=a.piTol,v=a.samplingType,w=a.nodeSeparation,x=void 0,y=function(){for(var a=0,b=0,c=!1;b<x;){a=Math.floor(Math.random()*t),c=!1;for(var d=0;d<b;d++)if(o[d]==a){c=!0;break}!c&&(o[b]=a,b++)}},z=function(a,b,c){for(var d=[],e=0,f=0,g=0,h=void 0,i=[],k=0,m=1,n=0;n<t;n++)i[n]=1e8;for(d[f]=a,i[a]=0;f>=e;){for(var o=l[g=d[e++]],r=0;r<o.length;r++)1e8==i[h=j.get(o[r])]&&(i[h]=i[g]+1,d[++f]=h);q[g][b]=i[g]*w}if(c){for(var s=0;s<t;s++)q[s][b]<p[s]&&(p[s]=q[s][b]);for(var u=0;u<t;u++)p[u]>k&&(k=p[u],m=u)}return m};d.connectComponents(b,c,d.getTopMostNodes(g),i),h.forEach(function(a){d.connectComponents(b,c,d.getTopMostNodes(a.descendants().intersection(c)),i)});for(var A=0,B=0;B<g.length;B++)g[B].isParent()||j.set(g[B].id(),A++);var C=!0,D=!1,E=void 0;try{for(var F,G=i.keys()[Symbol.iterator]();!(C=(F=G.next()).done);C=!0){var H=F.value;j.set(H,A++)}}catch(a){D=!0,E=a}finally{try{!C&&G.return&&G.return()}finally{if(D)throw E}}for(var I=0;I<j.size;I++)l[I]=[];h.forEach(function(a){for(var b=a.children().intersection(c);0==b.nodes(":childless").length;)b=b.nodes()[0].children().intersection(c);var d=0,e=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(a,b){a.connectedEdges().length<e&&(e=a.connectedEdges().length,d=b)}),k.set(a.id(),b.nodes(":childless")[d].id())}),g.forEach(function(a){var b=void 0;b=a.isParent()?j.get(k.get(a.id())):j.get(a.id()),a.neighborhood().nodes().forEach(function(d){c.intersection(a.edgesWith(d)).length>0&&(d.isParent()?l[b].push(k.get(d.id())):l[b].push(d.id()))})});var J=function(a){var c=j.get(a),d=void 0;i.get(a).forEach(function(e){d=b.getElementById(e).isParent()?k.get(e):e,l[c].push(d),l[j.get(d)].push(a)})},K=!0,L=!1,M=void 0;try{for(var N,O=i.keys()[Symbol.iterator]();!(K=(N=O.next()).done);K=!0){var P=N.value;J(P)}}catch(a){L=!0,M=a}finally{try{!K&&O.return&&O.return()}finally{if(L)throw M}}t=j.size;if(t>2){x=t<a.sampleSize?t:a.sampleSize;for(var Q=0;Q<t;Q++)q[Q]=[];for(var R=0;R<x;R++)s[R]=[];return"draft"==a.quality||"all"==a.step?(!function(a){var b=void 0;if(a){b=Math.floor(Math.random()*t);for(var c=0;c<t;c++)p[c]=1e8;for(var d=0;d<x;d++)o[d]=b,b=z(b,d,a)}else{y();for(var e=0;e<x;e++)z(o[e],e,a,!1)}for(var f=0;f<t;f++)for(var g=0;g<x;g++)q[f][g]*=q[f][g];for(var h=0;h<x;h++)r[h]=[];for(var i=0;i<x;i++)for(var j=0;j<x;j++)r[i][j]=q[o[j]][i]}(v),!function(){for(var a=f.svd(r),b=a.S,c=a.U,d=a.V,g=b[0]*b[0]*b[0],h=[],i=0;i<x;i++){h[i]=[];for(var j=0;j<x;j++)h[i][j]=0,i==j&&(h[i][j]=b[i]/(b[i]*b[i]+g/(b[i]*b[i])))}s=e.multMat(e.multMat(d,h),e.transpose(c))}(),!function(){for(var a=void 0,b=void 0,c=[],d=[],f=[],g=[],h=0;h<t;h++)c[h]=Math.random(),d[h]=Math.random();c=e.normalize(c),d=e.normalize(d);for(var i=0,j=1e-9,k=1e-9,l=void 0;;){i++;for(var o=0;o<t;o++)f[o]=c[o];if(c=e.multGamma(e.multL(e.multGamma(f),q,s)),a=e.dotProduct(f,c),c=e.normalize(c),(l=Math.abs((j=e.dotProduct(f,c))/k))<=1+u&&l>=1)break;k=j}for(var p=0;p<t;p++)f[p]=c[p];for(i=0,k=1e-9;;){i++;for(var r=0;r<t;r++)g[r]=d[r];if(g=e.minusOp(g,e.multCons(f,e.dotProduct(f,g))),d=e.multGamma(e.multL(e.multGamma(g),q,s)),b=e.dotProduct(g,d),d=e.normalize(d),(l=Math.abs((j=e.dotProduct(g,d))/k))<=1+u&&l>=1)break;k=j}for(var v=0;v<t;v++)g[v]=d[v];m=e.multCons(f,Math.sqrt(Math.abs(a))),n=e.multCons(g,Math.sqrt(Math.abs(b)))}()):j.forEach(function(a,c){m.push(b.getElementById(c).position("x")),n.push(b.getElementById(c).position("y"))}),{nodeIndexes:j,xCoords:m,yCoords:n}}var S=j.keys(),T=b.getElementById(S.next().value),U=T.position(),V=T.outerWidth();if(m.push(U.x),n.push(U.y),2==t){var W=b.getElementById(S.next().value).outerWidth();m.push(U.x+V/2+W/2+a.idealEdgeLength),n.push(U.y)}return{nodeIndexes:j,xCoords:m,yCoords:n}}}},579:(a,b,c)=>{var d=c(212),e=function(a){a&&a("layout","fcose",d)};"undefined"!=typeof cytoscape&&e(cytoscape),a.exports=e},140:a=>{a.exports=d}},b={};return function c(d){var e=b[d];if(void 0!==e)return e.exports;var f=b[d]={exports:{}};return a[d](f,f.exports,c),f.exports}(579)})()},58965:function(a){a.exports=function(){var a=[function(a,b,c){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,a.exports=d},function(a,b,c){"use strict";var d=c(2),e=c(8),f=c(9);function g(a,b,c){d.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=a,this.target=b}for(var h in g.prototype=Object.create(d.prototype),d)g[h]=d[h];g.prototype.getSource=function(){return this.source},g.prototype.getTarget=function(){return this.target},g.prototype.isInterGraph=function(){return this.isInterGraph},g.prototype.getLength=function(){return this.length},g.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},g.prototype.getBendpoints=function(){return this.bendpoints},g.prototype.getLca=function(){return this.lca},g.prototype.getSourceInLca=function(){return this.sourceInLca},g.prototype.getTargetInLca=function(){return this.targetInLca},g.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"},g.prototype.getOtherEndInGraph=function(a,b){for(var c=this.getOtherEnd(a),d=b.getGraphManager().getRoot();;){if(c.getOwner()==b)return c;if(c.getOwner()==d)break;c=c.getOwner().getParent()}return null},g.prototype.updateLength=function(){var a=[,,,,];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],1>Math.abs(this.lengthX)&&(this.lengthX=f.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=f.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},g.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),1>Math.abs(this.lengthX)&&(this.lengthX=f.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=f.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},a.exports=g},function(a,b,c){"use strict";a.exports=function(a){this.vGraphObject=a}},function(a,b,c){"use strict";var d=c(2),e=c(10),f=c(13),g=c(0),h=c(16),i=c(5);function j(a,b,c,g){null==c&&null==g&&(g=b),d.call(this,g),null!=a.graphManager&&(a=a.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=a,null!=c&&null!=b?this.rect=new f(b.x,b.y,c.width,c.height):this.rect=new f}for(var k in j.prototype=Object.create(d.prototype),d)j[k]=d[k];j.prototype.getEdges=function(){return this.edges},j.prototype.getChild=function(){return this.child},j.prototype.getOwner=function(){return this.owner},j.prototype.getWidth=function(){return this.rect.width},j.prototype.setWidth=function(a){this.rect.width=a},j.prototype.getHeight=function(){return this.rect.height},j.prototype.setHeight=function(a){this.rect.height=a},j.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},j.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},j.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},j.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},j.prototype.getRect=function(){return this.rect},j.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},j.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},j.prototype.setRect=function(a,b){this.rect.x=a.x,this.rect.y=a.y,this.rect.width=b.width,this.rect.height=b.height},j.prototype.setCenter=function(a,b){this.rect.x=a-this.rect.width/2,this.rect.y=b-this.rect.height/2},j.prototype.setLocation=function(a,b){this.rect.x=a,this.rect.y=b},j.prototype.moveBy=function(a,b){this.rect.x+=a,this.rect.y+=b},j.prototype.getEdgeListToNode=function(a){var b=[],c=this;return c.edges.forEach(function(d){if(d.target==a){if(d.source!=c)throw"Incorrect edge source!";b.push(d)}}),b},j.prototype.getEdgesBetween=function(a){var b=[],c=this;return c.edges.forEach(function(d){if(d.source!=c&&d.target!=c)throw"Incorrect edge source and/or target";(d.target==a||d.source==a)&&b.push(d)}),b},j.prototype.getNeighborsList=function(){var a=new Set,b=this;return b.edges.forEach(function(c){if(c.source==b)a.add(c.target);else{if(c.target!=b)throw"Incorrect incidency!";a.add(c.source)}}),a},j.prototype.withChildren=function(){var a=new Set;if(a.add(this),null!=this.child)for(var b=this.child.getNodes(),c=0;c<b.length;c++)b[c].withChildren().forEach(function(b){a.add(b)});return a},j.prototype.getNoOfChildren=function(){var a=0;if(null==this.child)a=1;else for(var b=this.child.getNodes(),c=0;c<b.length;c++)a+=b[c].getNoOfChildren();return 0==a&&(a=1),a},j.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},j.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},j.prototype.scatter=function(){var a,b,c=-g.INITIAL_WORLD_BOUNDARY,d=g.INITIAL_WORLD_BOUNDARY;a=g.WORLD_CENTER_X+h.nextDouble()*(d-c)+c;var e=-g.INITIAL_WORLD_BOUNDARY,f=g.INITIAL_WORLD_BOUNDARY;b=g.WORLD_CENTER_Y+h.nextDouble()*(f-e)+e,this.rect.x=a,this.rect.y=b},j.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var a=this.getChild();if(a.updateBounds(!0),this.rect.x=a.getLeft(),this.rect.y=a.getTop(),this.setWidth(a.getRight()-a.getLeft()),this.setHeight(a.getBottom()-a.getTop()),g.NODE_DIMENSIONS_INCLUDE_LABELS){var b=a.getRight()-a.getLeft(),c=a.getBottom()-a.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(b+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>b?(this.rect.x-=(this.labelWidth-b)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(b+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>c?(this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(c+this.labelHeight))}}},j.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},j.prototype.transform=function(a){var b=this.rect.x;b>g.WORLD_BOUNDARY?b=g.WORLD_BOUNDARY:b<-g.WORLD_BOUNDARY&&(b=-g.WORLD_BOUNDARY);var c=this.rect.y;c>g.WORLD_BOUNDARY?c=g.WORLD_BOUNDARY:c<-g.WORLD_BOUNDARY&&(c=-g.WORLD_BOUNDARY);var d=new i(b,c),e=a.inverseTransformPoint(d);this.setLocation(e.x,e.y)},j.prototype.getLeft=function(){return this.rect.x},j.prototype.getRight=function(){return this.rect.x+this.rect.width},j.prototype.getTop=function(){return this.rect.y},j.prototype.getBottom=function(){return this.rect.y+this.rect.height},j.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},a.exports=j},function(a,b,c){"use strict";var d=c(0);function e(){}for(var f in d)e[f]=d[f];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=3*e.MAX_NODE_DISPLACEMENT_INCREMENTAL,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,a.exports=e},function(a,b,c){"use strict";function d(a,b){null==a&&null==b?(this.x=0,this.y=0):(this.x=a,this.y=b)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(a){this.x=a},d.prototype.setY=function(a){this.y=a},d.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},a.exports=d},function(a,b,c){"use strict";var d=c(2),e=c(10),f=c(0),g=c(7),h=c(3),i=c(1),j=c(13),k=c(12),l=c(11);function m(a,b,c){d.call(this,c),this.estimatedSize=e.MIN_VALUE,this.margin=f.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=a,null!=b&&b instanceof g?this.graphManager=b:null!=b&&b instanceof Layout&&(this.graphManager=b.graphManager)}for(var n in m.prototype=Object.create(d.prototype),d)m[n]=d[n];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(a,b,c){if(null==b&&null==c){if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(a)>-1)throw"Node already in graph!";return a.owner=this,this.getNodes().push(a),a}if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(b.owner!=c.owner||b.owner!=this)throw"Both owners must be this graph!";return b.owner!=c.owner?null:(a.source=b,a.target=c,a.isInterGraph=!1,this.getEdges().push(a),b.edges.push(a),c!=b&&c.edges.push(a),a)},m.prototype.remove=function(a){if(a instanceof h){if(null==a)throw"Node is null!";if(null==a.owner||a.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var b,c=a.edges.slice(),d=c.length,e=0;e<d;e++)(b=c[e]).isInterGraph?this.graphManager.remove(b):b.source.owner.remove(b);var f=this.nodes.indexOf(a);if(-1==f)throw"Node not in owner node list!";this.nodes.splice(f,1)}else if(a instanceof i){var b=a;if(null==b)throw"Edge is null!";if(null==b.source||null==b.target)throw"Source and/or target is null!";if(null==b.source.owner||null==b.target.owner||b.source.owner!=this||b.target.owner!=this)throw"Source and/or target owner is invalid!";var g=b.source.edges.indexOf(b),j=b.target.edges.indexOf(b);if(!(g>-1&&j>-1))throw"Source and/or target doesn't know this edge!";b.source.edges.splice(g,1),b.target!=b.source&&b.target.edges.splice(j,1);var f=b.source.owner.getEdges().indexOf(b);if(-1==f)throw"Not in owner's edge list!";b.source.owner.getEdges().splice(f,1)}},m.prototype.updateLeftTop=function(){for(var a,b,c,d=e.MAX_VALUE,f=e.MAX_VALUE,g=this.getNodes(),h=g.length,i=0;i<h;i++){var j=g[i];a=j.getTop(),b=j.getLeft(),d>a&&(d=a),f>b&&(f=b)}return d==e.MAX_VALUE?null:(c=void 0!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=f-c,this.top=d-c,new k(this.left,this.top))},m.prototype.updateBounds=function(a){for(var b,c,d,f,g,h=e.MAX_VALUE,i=-e.MAX_VALUE,k=e.MAX_VALUE,l=-e.MAX_VALUE,m=this.nodes,n=m.length,o=0;o<n;o++){var p=m[o];a&&null!=p.child&&p.updateBounds(),b=p.getLeft(),c=p.getRight(),d=p.getTop(),f=p.getBottom(),h>b&&(h=b),i<c&&(i=c),k>d&&(k=d),l<f&&(l=f)}var q=new j(h,k,i-h,l-k);h==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),g=void 0!=m[0].getParent().paddingLeft?m[0].getParent().paddingLeft:this.margin,this.left=q.x-g,this.right=q.x+q.width+g,this.top=q.y-g,this.bottom=q.y+q.height+g},m.calculateBounds=function(a){for(var b,c,d,f,g=e.MAX_VALUE,h=-e.MAX_VALUE,i=e.MAX_VALUE,k=-e.MAX_VALUE,l=a.length,m=0;m<l;m++){var n=a[m];b=n.getLeft(),c=n.getRight(),d=n.getTop(),f=n.getBottom(),g>b&&(g=b),h<c&&(h=c),i>d&&(i=d),k<f&&(k=f)}return new j(g,i,h-g,k-i)},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var a=0,b=this.nodes,c=b.length,d=0;d<c;d++)a+=b[d].calcEstimatedSize();return 0==a?this.estimatedSize=f.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=a/Math.sqrt(this.nodes.length),this.estimatedSize},m.prototype.updateConnected=function(){var a,b,c=this;if(0==this.nodes.length){this.isConnected=!0;return}var d=new l,e=new Set,f=this.nodes[0];for(f.withChildren().forEach(function(a){d.push(a),e.add(a)});0!==d.length;)for(var g=(a=(f=d.shift()).getEdges()).length,h=0;h<g;h++)null==(b=a[h].getOtherEndInGraph(f,this))||e.has(b)||b.withChildren().forEach(function(a){d.push(a),e.add(a)});if(this.isConnected=!1,e.size>=this.nodes.length){var i=0;e.forEach(function(a){a.owner==c&&i++}),i==this.nodes.length&&(this.isConnected=!0)}},a.exports=m},function(a,b,c){"use strict";var d,e=c(1);function f(a){d=c(6),this.layout=a,this.graphs=[],this.edges=[]}f.prototype.addRoot=function(){var a=this.layout.newGraph(),b=this.layout.newNode(null),c=this.add(a,b);return this.setRootGraph(c),this.rootGraph},f.prototype.add=function(a,b,c,d,e){if(null==c&&null==d&&null==e){if(null==a)throw"Graph is null!";if(null==b)throw"Parent node is null!";if(this.graphs.indexOf(a)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(a),null!=a.parent)throw"Already has a parent!";if(null!=b.child)throw"Already has a child!";return a.parent=b,b.child=a,a}e=c,d=b,c=a;var f=d.getOwner(),g=e.getOwner();if(null==f||f.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==g||g.getGraphManager()!=this)throw"Target not in this graph mgr!";if(f==g)return c.isInterGraph=!1,f.add(c,d,e);if(c.isInterGraph=!0,c.source=d,c.target=e,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),null==c.source||null==c.target)throw"Edge source and/or target is null!";if(-1!=c.source.edges.indexOf(c)||-1!=c.target.edges.indexOf(c))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c},f.prototype.remove=function(a){if(a instanceof d){if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(a!=this.rootGraph&&(null==a.parent||a.parent.graphManager!=this))throw"Invalid parent node!";for(var b,c,f=[],g=(f=f.concat(a.getEdges())).length,h=0;h<g;h++)b=f[h],a.remove(b);var i=[];g=(i=i.concat(a.getNodes())).length;for(var h=0;h<g;h++)c=i[h],a.remove(c);a==this.rootGraph&&this.setRootGraph(null);var j=this.graphs.indexOf(a);this.graphs.splice(j,1),a.parent=null}else if(a instanceof e){if(null==(b=a))throw"Edge is null!";if(!b.isInterGraph)throw"Not an inter-graph edge!";if(null==b.source||null==b.target)throw"Source and/or target is null!";if(-1==b.source.edges.indexOf(b)||-1==b.target.edges.indexOf(b))throw"Source and/or target doesn't know this edge!";var j=b.source.edges.indexOf(b);if(b.source.edges.splice(j,1),j=b.target.edges.indexOf(b),b.target.edges.splice(j,1),null==b.source.owner||null==b.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==b.source.owner.getGraphManager().edges.indexOf(b))throw"Not in owner graph manager's edge list!";var j=b.source.owner.getGraphManager().edges.indexOf(b);b.source.owner.getGraphManager().edges.splice(j,1)}},f.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},f.prototype.getGraphs=function(){return this.graphs},f.prototype.getAllNodes=function(){if(null==this.allNodes){for(var a=[],b=this.getGraphs(),c=b.length,d=0;d<c;d++)a=a.concat(b[d].getNodes());this.allNodes=a}return this.allNodes},f.prototype.resetAllNodes=function(){this.allNodes=null},f.prototype.resetAllEdges=function(){this.allEdges=null},f.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},f.prototype.getAllEdges=function(){if(null==this.allEdges){var a=[],b=this.getGraphs();b.length;for(var c=0;c<b.length;c++)a=a.concat(b[c].getEdges());a=a.concat(this.edges),this.allEdges=a}return this.allEdges},f.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},f.prototype.setAllNodesToApplyGravitation=function(a){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=a},f.prototype.getRoot=function(){return this.rootGraph},f.prototype.setRootGraph=function(a){if(a.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=a,null==a.parent&&(a.parent=this.layout.newNode("Root node"))},f.prototype.getLayout=function(){return this.layout},f.prototype.isOneAncestorOfOther=function(a,b){if(null==a||null==b)throw"assert failed";if(a==b)return!0;for(var c,d=a.getOwner();null!=(c=d.getParent());){if(c==b)return!0;if(null==(d=c.getOwner()))break}for(d=b.getOwner();null!=(c=d.getParent());){if(c==a)return!0;if(null==(d=c.getOwner()))break}return!1},f.prototype.calcLowestCommonAncestors=function(){for(var a,b,c,d,e,f=this.getAllEdges(),g=f.length,h=0;h<g;h++){if(b=(a=f[h]).source,c=a.target,a.lca=null,a.sourceInLca=b,a.targetInLca=c,b==c){a.lca=b.getOwner();continue}for(d=b.getOwner();null==a.lca;){for(a.targetInLca=c,e=c.getOwner();null==a.lca;){if(e==d){a.lca=e;break}if(e==this.rootGraph)break;if(null!=a.lca)throw"assert failed";a.targetInLca=e.getParent(),e=a.targetInLca.getOwner()}if(d==this.rootGraph)break;null==a.lca&&(a.sourceInLca=d.getParent(),d=a.sourceInLca.getOwner())}if(null==a.lca)throw"assert failed"}},f.prototype.calcLowestCommonAncestor=function(a,b){if(a==b)return a.getOwner();for(var c=a.getOwner();null!=c;){for(var d=b.getOwner();null!=d;){if(d==c)return d;d=d.getParent().getOwner()}c=c.getParent().getOwner()}return c},f.prototype.calcInclusionTreeDepths=function(a,b){null==a&&null==b&&(a=this.rootGraph,b=1);for(var c,d=a.getNodes(),e=d.length,f=0;f<e;f++)(c=d[f]).inclusionTreeDepth=b,null!=c.child&&this.calcInclusionTreeDepths(c.child,b+1)},f.prototype.includesInvalidEdge=function(){for(var a,b=[],c=this.edges.length,d=0;d<c;d++)a=this.edges[d],this.isOneAncestorOfOther(a.source,a.target)&&b.push(a);for(var d=0;d<b.length;d++)this.remove(b[d]);return!1},a.exports=f},function(a,b,c){"use strict";var d=c(12);function e(){}e.calcSeparationAmount=function(a,b,c,d){if(!a.intersects(b))throw"assert failed";var e=[,,];this.decideDirectionsForOverlappingNodes(a,b,e),c[0]=Math.min(a.getRight(),b.getRight())-Math.max(a.x,b.x),c[1]=Math.min(a.getBottom(),b.getBottom())-Math.max(a.y,b.y),a.getX()<=b.getX()&&a.getRight()>=b.getRight()?c[0]+=Math.min(b.getX()-a.getX(),a.getRight()-b.getRight()):b.getX()<=a.getX()&&b.getRight()>=a.getRight()&&(c[0]+=Math.min(a.getX()-b.getX(),b.getRight()-a.getRight())),a.getY()<=b.getY()&&a.getBottom()>=b.getBottom()?c[1]+=Math.min(b.getY()-a.getY(),a.getBottom()-b.getBottom()):b.getY()<=a.getY()&&b.getBottom()>=a.getBottom()&&(c[1]+=Math.min(a.getY()-b.getY(),b.getBottom()-a.getBottom()));var f=Math.abs((b.getCenterY()-a.getCenterY())/(b.getCenterX()-a.getCenterX()));b.getCenterY()===a.getCenterY()&&b.getCenterX()===a.getCenterX()&&(f=1);var g=f*c[0],h=c[1]/f;c[0]<h?h=c[0]:g=c[1],c[0]=-1*e[0]*(h/2+d),c[1]=-1*e[1]*(g/2+d)},e.decideDirectionsForOverlappingNodes=function(a,b,c){a.getCenterX()<b.getCenterX()?c[0]=-1:c[0]=1,a.getCenterY()<b.getCenterY()?c[1]=-1:c[1]=1},e.getIntersection2=function(a,b,c){var d=a.getCenterX(),e=a.getCenterY(),f=b.getCenterX(),g=b.getCenterY();if(a.intersects(b))return c[0]=d,c[1]=e,c[2]=f,c[3]=g,!0;var h=a.getX(),i=a.getY(),j=a.getRight(),k=a.getX(),l=a.getBottom(),m=a.getRight(),n=a.getWidthHalf(),o=a.getHeightHalf(),p=b.getX(),q=b.getY(),r=b.getRight(),s=b.getX(),t=b.getBottom(),u=b.getRight(),v=b.getWidthHalf(),w=b.getHeightHalf(),x=!1,y=!1;if(d===f)e>g?(c[0]=d,c[1]=i,c[2]=f,c[3]=t):e<g&&(c[0]=d,c[1]=l,c[2]=f,c[3]=q);else if(e===g)d>f?(c[0]=h,c[1]=e,c[2]=r,c[3]=g):d<f&&(c[0]=j,c[1]=e,c[2]=p,c[3]=g);else{var z=a.height/a.width,A=b.height/b.width,B=(g-e)/(f-d),C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0;if(-z===B?(d>f?(c[0]=k,c[1]=l):(c[0]=j,c[1]=i),x=!0):z===B&&(d>f?(c[0]=h,c[1]=i):(c[0]=m,c[1]=l),x=!0),-A===B?(f>d?(c[2]=s,c[3]=t):(c[2]=r,c[3]=q),y=!0):A===B&&(f>d?(c[2]=p,c[3]=q):(c[2]=u,c[3]=t),y=!0),x&&y)return!1;if(d>f?e>g?(C=this.getCardinalDirection(z,B,4),D=this.getCardinalDirection(A,B,2)):(C=this.getCardinalDirection(-z,B,3),D=this.getCardinalDirection(-A,B,1)):e>g?(C=this.getCardinalDirection(-z,B,1),D=this.getCardinalDirection(-A,B,3)):(C=this.getCardinalDirection(z,B,2),D=this.getCardinalDirection(A,B,4)),!x)switch(C){case 1:F=i,E=d+-o/B,c[0]=E,c[1]=F;break;case 2:E=m,F=e+n*B,c[0]=E,c[1]=F;break;case 3:F=l,E=d+o/B,c[0]=E,c[1]=F;break;case 4:E=k,F=e+-n*B,c[0]=E,c[1]=F}if(!y)switch(D){case 1:H=q,G=f+-w/B,c[2]=G,c[3]=H;break;case 2:G=u,H=g+v*B,c[2]=G,c[3]=H;break;case 3:H=t,G=f+w/B,c[2]=G,c[3]=H;break;case 4:G=s,H=g+-v*B,c[2]=G,c[3]=H}}return!1},e.getCardinalDirection=function(a,b,c){return a>b?c:1+c%4},e.getIntersection=function(a,b,c,e){if(null==e)return this.getIntersection2(a,b,c);var f=a.x,g=a.y,h=b.x,i=b.y,j=c.x,k=c.y,l=e.x,m=e.y,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0,s=void 0,t=void 0;return(n=i-g,p=f-h,r=h*g-f*i,o=m-k,q=j-l,s=l*k-j*m,0==(t=n*q-o*p))?null:new d((p*s-q*r)/t,(o*r-n*s)/t)},e.angleOfVector=function(a,b,c,d){var e=void 0;return a!==c?(e=Math.atan((d-b)/(c-a)),c<a?e+=Math.PI:d<b&&(e+=this.TWO_PI)):e=d<b?this.ONE_AND_HALF_PI:this.HALF_PI,e},e.doIntersect=function(a,b,c,d){var e=a.x,f=a.y,g=b.x,h=b.y,i=c.x,j=c.y,k=d.x,l=d.y,m=(g-e)*(l-j)-(k-i)*(h-f);if(0===m)return!1;var n=((l-j)*(k-e)+(i-k)*(l-f))/m,o=((f-h)*(k-e)+(g-e)*(l-f))/m;return 0<n&&n<1&&0<o&&o<1},e.findCircleLineIntersections=function(a,b,c,d,e,f,g){var h=(c-a)*(c-a)+(d-b)*(d-b),i=2*((a-e)*(c-a)+(b-f)*(d-b)),j=(a-e)*(a-e)+(b-f)*(b-f)-g*g;if(!(i*i-4*h*j>=0))return null;var k=(-i+Math.sqrt(i*i-4*h*j))/(2*h),l=(-i-Math.sqrt(i*i-4*h*j))/(2*h);return k>=0&&k<=1?[k]:l>=0&&l<=1?[l]:null},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,a.exports=e},function(a,b,c){"use strict";function d(){}d.sign=function(a){return a>0?1:a<0?-1:0},d.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},d.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},a.exports=d},function(a,b,c){"use strict";function d(){}d.MAX_VALUE=0x7fffffff,d.MIN_VALUE=-0x80000000,a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return{value:a,next:null,prev:null}},f=function(a,b,c,d){return null!==a?a.next=b:d.head=b,null!==c?c.prev=b:d.tail=b,b.prev=a,b.next=c,d.length++,b},g=function(a,b){var c=a.prev,d=a.next;return null!==c?c.next=d:b.head=d,null!==d?d.prev=c:b.tail=c,a.prev=a.next=null,b.length--,a};a.exports=function(){function a(b){var c=this;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.length=0,this.head=null,this.tail=null,null!=b&&b.forEach(function(a){return c.push(a)})}return d(a,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(a,b){return f(b.prev,e(a),b,this)}},{key:"insertAfter",value:function(a,b){return f(b,e(a),b.next,this)}},{key:"insertNodeBefore",value:function(a,b){return f(b.prev,a,b,this)}},{key:"insertNodeAfter",value:function(a,b){return f(b,a,b.next,this)}},{key:"push",value:function(a){return f(this.tail,e(a),null,this)}},{key:"unshift",value:function(a){return f(null,e(a),this.head,this)}},{key:"remove",value:function(a){return g(a,this)}},{key:"pop",value:function(){return g(this.tail,this).value}},{key:"popNode",value:function(){return g(this.tail,this)}},{key:"shift",value:function(){return g(this.head,this).value}},{key:"shiftNode",value:function(){return g(this.head,this)}},{key:"get_object_at",value:function(a){if(a<=this.length()){for(var b=1,c=this.head;b<a;)c=c.next,b++;return c.value}}},{key:"set_object_at",value:function(a,b){if(a<=this.length()){for(var c=1,d=this.head;c<a;)d=d.next,c++;d.value=b}}}]),a}()},function(a,b,c){"use strict";function d(a,b,c){this.x=null,this.y=null,null==a&&null==b&&null==c?(this.x=0,this.y=0):"number"==typeof a&&"number"==typeof b&&null==c?(this.x=a,this.y=b):"Point"==a.constructor.name&&null==b&&null==c&&(c=a,this.x=c.x,this.y=c.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(a,b,c){"Point"==a.constructor.name&&null==b&&null==c?(c=a,this.setLocation(c.x,c.y)):"number"==typeof a&&"number"==typeof b&&null==c&&(parseInt(a)==a&&parseInt(b)==b?this.move(a,b):(this.x=Math.floor(a+.5),this.y=Math.floor(b+.5)))},d.prototype.move=function(a,b){this.x=a,this.y=b},d.prototype.translate=function(a,b){this.x+=a,this.y+=b},d.prototype.equals=function(a){return"Point"==a.constructor.name?this.x==a.x&&this.y==a.y:this==a},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},a.exports=d},function(a,b,c){"use strict";function d(a,b,c,d){this.x=0,this.y=0,this.width=0,this.height=0,null!=a&&null!=b&&null!=c&&null!=d&&(this.x=a,this.y=b,this.width=c,this.height=d)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(a){this.x=a},d.prototype.getY=function(){return this.y},d.prototype.setY=function(a){this.y=a},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(a){this.width=a},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(a){this.height=a},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(a){return!(this.getRight()<a.x||this.getBottom()<a.y||a.getRight()<this.x||a.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},a.exports=d},function(a,b,c){"use strict";var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function e(){}e.lastID=0,e.createID=function(a){return e.isPrimitive(a)?a:(null!=a.uniqueID||(a.uniqueID=e.getString(),e.lastID++),a.uniqueID)},e.getString=function(a){return null==a&&(a=e.lastID),"Object#"+a},e.isPrimitive=function(a){var b=void 0===a?"undefined":d(a);return null==a||"object"!=b&&"function"!=b},a.exports=e},function(a,b,c){"use strict";function d(a){if(!Array.isArray(a))return Array.from(a);for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}var e=c(0),f=c(7),g=c(3),h=c(1),i=c(6),j=c(5),k=c(17),l=c(29);function m(a){l.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new f(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=a&&(this.isRemoteUse=a)}m.RANDOM_SEED=1,m.prototype=Object.create(l.prototype),m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},m.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},m.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},m.prototype.newGraphManager=function(){var a=new f(this);return this.graphManager=a,a},m.prototype.newGraph=function(a){return new i(null,this.graphManager,a)},m.prototype.newNode=function(a){return new g(this.graphManager,a)},m.prototype.newEdge=function(a){return new h(null,null,a)},m.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},m.prototype.runLayout=function(){var a;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),a=!this.checkLayoutSuccess()&&this.layout(),"during"!==e.ANIMATE&&(a&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},m.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},m.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),b=0;b<a.length;b++)a[b];for(var c=this.graphManager.getRoot().getNodes(),b=0;b<c.length;b++)c[b];this.update(this.graphManager.getRoot())}},m.prototype.update=function(a){if(null==a)this.update2();else if(a instanceof g){if(null!=a.getChild())for(var b=a.getChild().getNodes(),c=0;c<b.length;c++)update(b[c]);null!=a.vGraphObject&&a.vGraphObject.update(a)}else a instanceof h?null!=a.vGraphObject&&a.vGraphObject.update(a):a instanceof i&&null!=a.vGraphObject&&a.vGraphObject.update(a)},m.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},m.prototype.transform=function(a){if(void 0==a)this.transform(new j(0,0));else{var b=new k,c=this.graphManager.getRoot().updateLeftTop();if(null!=c){b.setWorldOrgX(a.x),b.setWorldOrgY(a.y),b.setDeviceOrgX(c.x),b.setDeviceOrgY(c.y);for(var d=this.getAllNodes(),e=0;e<d.length;e++)d[e].transform(b)}}},m.prototype.positionNodesRandomly=function(a){if(void 0==a)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var b,c,d=a.getNodes(),e=0;e<d.length;e++)null==(c=(b=d[e]).getChild())||0==c.getNodes().length?b.scatter():(this.positionNodesRandomly(c),b.updateBounds())},m.prototype.getFlatForest=function(){for(var a=[],b=!0,c=this.graphManager.getRoot().getNodes(),e=!0,f=0;f<c.length;f++)null!=c[f].getChild()&&(e=!1);if(!e)return a;var g=new Set,h=[],i=new Map,j=[];for(j=j.concat(c);j.length>0&&b;){for(h.push(j[0]);h.length>0&&b;){var k=h[0];h.splice(0,1),g.add(k);for(var l=k.getEdges(),f=0;f<l.length;f++){var m=l[f].getOtherEnd(k);if(i.get(k)!=m)if(g.has(m)){b=!1;break}else h.push(m),i.set(m,k)}}if(b){var n=[].concat(d(g));a.push(n);for(var f=0;f<n.length;f++){var o=n[f],p=j.indexOf(o);p>-1&&j.splice(p,1)}g=new Set,i=new Map}else a=[]}return a},m.prototype.createDummyNodesForBendpoints=function(a){for(var b=[],c=a.source,d=this.graphManager.calcLowestCommonAncestor(a.source,a.target),e=0;e<a.bendpoints.length;e++){var f=this.newNode(null);f.setRect(new Point(0,0),new Dimension(1,1)),d.add(f);var g=this.newEdge(null);this.graphManager.add(g,c,f),b.add(f),c=f}var g=this.newEdge(null);return this.graphManager.add(g,c,a.target),this.edgeToDummyNodes.set(a,b),a.isInterGraph()?this.graphManager.remove(a):d.remove(a),b},m.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(d(this.edgeToDummyNodes.keys())).concat(a);for(var b=0;b<a.length;b++){var c=a[b];if(c.bendpoints.length>0){for(var e=this.edgeToDummyNodes.get(c),f=0;f<e.length;f++){var g=e[f],h=new j(g.getCenterX(),g.getCenterY()),i=c.bendpoints.get(f);i.x=h.x,i.y=h.y,g.getOwner().remove(g)}this.graphManager.add(c,c.source,c.target)}}},m.transform=function(a,b,c,d){if(void 0==c||void 0==d)return a<=50?(e=9*b/500,f=b/10):(e=9*b/50,f=-8*b),e*a+f;var e,f,g=b;return a<=50?g-=(b-b/c)/50*(50-a):g+=(b*d-b)/50*(a-50),g},m.findCenterOfTree=function(a){var b=[];b=b.concat(a);var c=[],d=new Map,e=!1,f=null;(1==b.length||2==b.length)&&(e=!0,f=b[0]);for(var g=0;g<b.length;g++){var h=b[g],i=h.getNeighborsList().size;d.set(h,h.getNeighborsList().size),1==i&&c.push(h)}var j=[];for(j=j.concat(c);!e;){var k=[];k=k.concat(j),j=[];for(var g=0;g<b.length;g++){var h=b[g],l=b.indexOf(h);l>=0&&b.splice(l,1),h.getNeighborsList().forEach(function(a){if(0>c.indexOf(a)){var b=d.get(a)-1;1==b&&j.push(a),d.set(a,b)}})}c=c.concat(j),(1==b.length||2==b.length)&&(e=!0,f=b[0])}return f},m.prototype.setGraphManager=function(a){this.graphManager=a},a.exports=m},function(a,b,c){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=1e4*Math.sin(d.seed++),d.x-Math.floor(d.x)},a.exports=d},function(a,b,c){"use strict";var d=c(5);function e(a,b){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(a){this.lworldExtX=a},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(a){this.lworldExtY=a},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},e.prototype.transformX=function(a){var b=0,c=this.lworldExtX;return 0!=c&&(b=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/c),b},e.prototype.transformY=function(a){var b=0,c=this.lworldExtY;return 0!=c&&(b=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/c),b},e.prototype.inverseTransformX=function(a){var b=0,c=this.ldeviceExtX;return 0!=c&&(b=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/c),b},e.prototype.inverseTransformY=function(a){var b=0,c=this.ldeviceExtY;return 0!=c&&(b=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/c),b},e.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},a.exports=e},function(a,b,c){"use strict";var d=c(15),e=c(4),f=c(0),g=c(8),h=c(9);function i(){d.call(this),this.useSmartIdealEdgeLengthCalculation=e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=e.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=e.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=e.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*e.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=e.MAX_ITERATIONS}for(var j in i.prototype=Object.create(d.prototype),d)i[j]=d[j];i.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var a,b,c,d,g,h,i,j=this.getGraphManager().getAllEdges(),k=0;k<j.length;k++)b=(a=j[k]).idealLength,a.isInterGraph&&(d=a.getSource(),g=a.getTarget(),h=a.getSourceInLca().getEstimatedSize(),i=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=h+i-2*f.SIMPLE_NODE_SIZE),c=a.getLca().getInclusionTreeDepth(),a.idealLength+=b*e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*c))},i.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>e.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(a-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*e.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var a,b=this.getAllEdges(),c=0;c<b.length;c++)a=b[c],this.calcSpringForce(a,a.idealLength)},i.prototype.calcRepulsionForces=function(){var a,b,c,d,f,g=!(arguments.length>0)||void 0===arguments[0]||arguments[0],h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&g&&this.updateGrid(),f=new Set,a=0;a<i.length;a++)c=i[a],this.calculateRepulsionForceOfANode(c,f,g,h),f.add(c);else for(a=0;a<i.length;a++)for(c=i[a],b=a+1;b<i.length;b++)d=i[b],c.getOwner()==d.getOwner()&&this.calcRepulsionForce(c,d)},i.prototype.calcGravitationalForces=function(){for(var a,b=this.getAllNodesToApplyGravitation(),c=0;c<b.length;c++)a=b[c],this.calcGravitationalForce(a)},i.prototype.moveNodes=function(){for(var a=this.getAllNodes(),b=0;b<a.length;b++)a[b].move()},i.prototype.calcSpringForce=function(a,b){var c,d,e,f,g=a.getSource(),h=a.getTarget();if(this.uniformLeafNodeSizes&&null==g.getChild()&&null==h.getChild())a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;0!=(c=a.getLength())&&(e=(d=a.edgeElasticity*(c-b))*(a.lengthX/c),f=d*(a.lengthY/c),g.springForceX+=e,g.springForceY+=f,h.springForceX-=e,h.springForceY-=f)},i.prototype.calcRepulsionForce=function(a,b){var c,d,f,i,j,k,l,m=a.getRect(),n=b.getRect(),o=[,,],p=[,,,,];if(m.intersects(n)){g.calcSeparationAmount(m,n,o,e.DEFAULT_EDGE_LENGTH/2),k=2*o[0],l=2*o[1];var q=a.noOfChildren*b.noOfChildren/(a.noOfChildren+b.noOfChildren);a.repulsionForceX-=q*k,a.repulsionForceY-=q*l,b.repulsionForceX+=q*k,b.repulsionForceY+=q*l}else this.uniformLeafNodeSizes&&null==a.getChild()&&null==b.getChild()?(c=n.getCenterX()-m.getCenterX(),d=n.getCenterY()-m.getCenterY()):(g.getIntersection(m,n,p),c=p[2]-p[0],d=p[3]-p[1]),Math.abs(c)<e.MIN_REPULSION_DIST&&(c=h.sign(c)*e.MIN_REPULSION_DIST),Math.abs(d)<e.MIN_REPULSION_DIST&&(d=h.sign(d)*e.MIN_REPULSION_DIST),i=Math.sqrt(f=c*c+d*d),k=(j=(a.nodeRepulsion/2+b.nodeRepulsion/2)*a.noOfChildren*b.noOfChildren/f)*c/i,l=j*d/i,a.repulsionForceX-=k,a.repulsionForceY-=l,b.repulsionForceX+=k,b.repulsionForceY+=l},i.prototype.calcGravitationalForce=function(a){var b,c,d,e,f,g,h,i;c=((b=a.getOwner()).getRight()+b.getLeft())/2,d=(b.getTop()+b.getBottom())/2,e=a.getCenterX()-c,f=a.getCenterY()-d,g=Math.abs(e)+a.getWidth()/2,h=Math.abs(f)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(g>(i=b.getEstimatedSize()*this.gravityRangeFactor)||h>i)&&(a.gravitationForceX=-this.gravityConstant*e,a.gravitationForceY=-this.gravityConstant*f):(g>(i=b.getEstimatedSize()*this.compoundGravityRangeFactor)||h>i)&&(a.gravitationForceX=-this.gravityConstant*e*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*f*this.compoundGravityConstant)},i.prototype.isConverged=function(){var a,b=!1;return this.totalIterations>this.maxIterations/3&&(b=2>Math.abs(this.totalDisplacement-this.oldTotalDisplacement)),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||b},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,b=this.graphManager.getAllNodes(),c=0;c<b.length;c++)(a=b[c]).noOfChildren=a.getNoOfChildren()},i.prototype.calcGrid=function(a){var b=0,c=0;b=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),c=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var d=Array(b),e=0;e<b;e++)d[e]=Array(c);for(var e=0;e<b;e++)for(var f=0;f<c;f++)d[e][f]=[];return d},i.prototype.addNodeToGrid=function(a,b,c){var d=0,e=0,f=0,g=0;d=parseInt(Math.floor((a.getRect().x-b)/this.repulsionRange)),e=parseInt(Math.floor((a.getRect().width+a.getRect().x-b)/this.repulsionRange)),f=parseInt(Math.floor((a.getRect().y-c)/this.repulsionRange)),g=parseInt(Math.floor((a.getRect().height+a.getRect().y-c)/this.repulsionRange));for(var h=d;h<=e;h++)for(var i=f;i<=g;i++)this.grid[h][i].push(a),a.setGridCoordinates(d,e,f,g)},i.prototype.updateGrid=function(){var a,b,c=this.getAllNodes();for(a=0,this.grid=this.calcGrid(this.graphManager.getRoot());a<c.length;a++)b=c[a],this.addNodeToGrid(b,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(a,b,c,d){if(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&c||d){var f,g=new Set;a.surrounding=[];for(var h=this.grid,i=a.startX-1;i<a.finishX+2;i++)for(var j=a.startY-1;j<a.finishY+2;j++)if(!(i<0||j<0||i>=h.length||j>=h[0].length)){for(var k=0;k<h[i][j].length;k++)if(f=h[i][j][k],a.getOwner()==f.getOwner()&&a!=f&&!b.has(f)&&!g.has(f)){var l=Math.abs(a.getCenterX()-f.getCenterX())-(a.getWidth()/2+f.getWidth()/2),m=Math.abs(a.getCenterY()-f.getCenterY())-(a.getHeight()/2+f.getHeight()/2);l<=this.repulsionRange&&m<=this.repulsionRange&&g.add(f)}}a.surrounding=[].concat(function(a){if(!Array.isArray(a))return Array.from(a);for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}(g))}for(i=0;i<a.surrounding.length;i++)this.calcRepulsionForce(a,a.surrounding[i])},i.prototype.calcRepulsionRange=function(){return 0},a.exports=i},function(a,b,c){"use strict";var d=c(1),e=c(4);function f(a,b,c){d.call(this,a,b,c),this.idealLength=e.DEFAULT_EDGE_LENGTH,this.edgeElasticity=e.DEFAULT_SPRING_STRENGTH}for(var g in f.prototype=Object.create(d.prototype),d)f[g]=d[g];a.exports=f},function(a,b,c){"use strict";var d=c(3),e=c(4);function f(a,b,c,f){d.call(this,a,b,c,f),this.nodeRepulsion=e.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var g in f.prototype=Object.create(d.prototype),d)f[g]=d[g];f.prototype.setGridCoordinates=function(a,b,c,d){this.startX=a,this.finishX=b,this.startY=c,this.finishY=d},a.exports=f},function(a,b,c){"use strict";function d(a,b){this.width=0,this.height=0,null!==a&&null!==b&&(this.height=b,this.width=a)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(a){this.width=a},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(a){this.height=a},a.exports=d},function(a,b,c){"use strict";var d=c(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(a,b){var c=d.createID(a);this.contains(c)||(this.map[c]=b,this.keys.push(a))},e.prototype.contains=function(a){return d.createID(a),null!=this.map[a]},e.prototype.get=function(a){var b=d.createID(a);return this.map[b]},e.prototype.keySet=function(){return this.keys},a.exports=e},function(a,b,c){"use strict";var d=c(14);function e(){this.set={}}e.prototype.add=function(a){var b=d.createID(a);this.contains(b)||(this.set[b]=a)},e.prototype.remove=function(a){delete this.set[d.createID(a)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(a){return this.set[d.createID(a)]==a},e.prototype.isEmpty=function(){return 0===this.size()},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(a){for(var b=Object.keys(this.set),c=b.length,d=0;d<c;d++)a.push(this.set[b[d]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(a){for(var b=a.length,c=0;c<b;c++){var d=a[c];this.add(d)}},a.exports=e},function(a,b,c){"use strict";function d(){}d.multMat=function(a,b){for(var c=[],d=0;d<a.length;d++){c[d]=[];for(var e=0;e<b[0].length;e++){c[d][e]=0;for(var f=0;f<a[0].length;f++)c[d][e]+=a[d][f]*b[f][e]}}return c},d.transpose=function(a){for(var b=[],c=0;c<a[0].length;c++){b[c]=[];for(var d=0;d<a.length;d++)b[c][d]=a[d][c]}return b},d.multCons=function(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=a[d]*b;return c},d.minusOp=function(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=a[d]-b[d];return c},d.dotProduct=function(a,b){for(var c=0,d=0;d<a.length;d++)c+=a[d]*b[d];return c},d.mag=function(a){return Math.sqrt(this.dotProduct(a,a))},d.normalize=function(a){for(var b=[],c=this.mag(a),d=0;d<a.length;d++)b[d]=a[d]/c;return b},d.multGamma=function(a){for(var b=[],c=0,d=0;d<a.length;d++)c+=a[d];c*=-1/a.length;for(var e=0;e<a.length;e++)b[e]=c+a[e];return b},d.multL=function(a,b,c){for(var d=[],e=[],f=[],g=0;g<b[0].length;g++){for(var h=0,i=0;i<b.length;i++)h+=-.5*b[i][g]*a[i];e[g]=h}for(var j=0;j<c.length;j++){for(var k=0,l=0;l<c.length;l++)k+=c[j][l]*e[l];f[j]=k}for(var m=0;m<b.length;m++){for(var n=0,o=0;o<b[0].length;o++)n+=b[m][o]*f[o];d[m]=n}return d},a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=c(11);a.exports=function(){function a(b,c){if(!(this instanceof a))throw TypeError("Cannot call a class as a function");(null!==c||void 0!==c)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;d=b instanceof e?b.size():b.length,this._quicksort(b,0,d-1)}return d(a,[{key:"_quicksort",value:function(a,b,c){if(b<c){var d=this._partition(a,b,c);this._quicksort(a,b,d),this._quicksort(a,d+1,c)}}},{key:"_partition",value:function(a,b,c){for(var d=this._get(a,b),e=b,f=c;;){for(;this.compareFunction(d,this._get(a,f));)f--;for(;this.compareFunction(this._get(a,e),d);)e++;if(!(e<f))return f;this._swap(a,e,f),e++,f--}}},{key:"_get",value:function(a,b){return a instanceof e?a.get_object_at(b):a[b]}},{key:"_set",value:function(a,b,c){a instanceof e?a.set_object_at(b,c):a[b]=c}},{key:"_swap",value:function(a,b,c){var d=this._get(a,b);this._set(a,b,this._get(a,c)),this._set(a,c,d)}},{key:"_defaultCompareFunction",value:function(a,b){return b>a}}]),a}()},function(a,b,c){"use strict";function d(){}d.svd=function(a){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=a.length,this.n=a[0].length;var b=Math.min(this.m,this.n);this.s=function(a){for(var b=[];a-- >0;)b.push(0);return b}(Math.min(this.m+1,this.n)),this.U=function a(b){if(0==b.length)return 0;for(var c=[],d=0;d<b[0];d++)c.push(a(b.slice(1)));return c}([this.m,b]),this.V=function a(b){if(0==b.length)return 0;for(var c=[],d=0;d<b[0];d++)c.push(a(b.slice(1)));return c}([this.n,this.n]);for(var c=function(a){for(var b=[];a-- >0;)b.push(0);return b}(this.n),e=function(a){for(var b=[];a-- >0;)b.push(0);return b}(this.m),f=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),h=0;h<Math.max(f,g);h++){if(h<f){this.s[h]=0;for(var i=h;i<this.m;i++)this.s[h]=d.hypot(this.s[h],a[i][h]);if(0!==this.s[h]){a[h][h]<0&&(this.s[h]=-this.s[h]);for(var j=h;j<this.m;j++)a[j][h]/=this.s[h];a[h][h]+=1}this.s[h]=-this.s[h]}for(var k=h+1;k<this.n;k++){if(p=h<f,q=0!==this.s[h],p&&q){for(var l=0,m=h;m<this.m;m++)l+=a[m][h]*a[m][k];l=-l/a[h][h];for(var n=h;n<this.m;n++)a[n][k]+=l*a[n][h]}c[k]=a[h][k]}if(r=h<f)for(var o=h;o<this.m;o++)this.U[o][h]=a[o][h];if(h<g){c[h]=0;for(var p,q,r,s,t,u=h+1;u<this.n;u++)c[h]=d.hypot(c[h],c[u]);if(0!==c[h]){c[h+1]<0&&(c[h]=-c[h]);for(var v=h+1;v<this.n;v++)c[v]/=c[h];c[h+1]+=1}if(c[h]=-c[h],s=h+1<this.m,t=0!==c[h],s&&t){for(var w=h+1;w<this.m;w++)e[w]=0;for(var x=h+1;x<this.n;x++)for(var y=h+1;y<this.m;y++)e[y]+=c[x]*a[y][x];for(var z=h+1;z<this.n;z++)for(var A=-c[z]/c[h+1],B=h+1;B<this.m;B++)a[B][z]+=A*e[B]}for(var C=h+1;C<this.n;C++)this.V[C][h]=c[C]}}var D=Math.min(this.n,this.m+1);f<this.n&&(this.s[f]=a[f][f]),this.m<D&&(this.s[D-1]=0),g+1<D&&(c[g]=a[g][D-1]),c[D-1]=0;for(var E=f;E<b;E++){for(var F=0;F<this.m;F++)this.U[F][E]=0;this.U[E][E]=1}for(var G=f-1;G>=0;G--)if(0!==this.s[G]){for(var H=G+1;H<b;H++){for(var I=0,J=G;J<this.m;J++)I+=this.U[J][G]*this.U[J][H];I=-I/this.U[G][G];for(var K=G;K<this.m;K++)this.U[K][H]+=I*this.U[K][G]}for(var L=G;L<this.m;L++)this.U[L][G]=-this.U[L][G];this.U[G][G]=1+this.U[G][G];for(var M=0;M<G-1;M++)this.U[M][G]=0}else{for(var N=0;N<this.m;N++)this.U[N][G]=0;this.U[G][G]=1}for(var O=this.n-1;O>=0;O--){if(ak=O<g,al=0!==c[O],ak&&al)for(var P=O+1;P<b;P++){for(var Q=0,R=O+1;R<this.n;R++)Q+=this.V[R][O]*this.V[R][P];Q=-Q/this.V[O+1][O];for(var S=O+1;S<this.n;S++)this.V[S][P]+=Q*this.V[S][O]}for(var T=0;T<this.n;T++)this.V[T][O]=0;this.V[O][O]=1}for(var U=D-1,V=0;D>0;){var W=void 0,X=void 0;for(W=D-2;W>=-1&&-1!==W;W--)if(Math.abs(c[W])<=16033346880071782e-307+2220446049250313e-31*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){c[W]=0;break}if(W===D-2)X=4;else{var Y=void 0;for(Y=D-1;Y>=W&&Y!==W;Y--){var Z=(Y!==D?Math.abs(c[Y]):0)+(Y!==W+1?Math.abs(c[Y-1]):0);if(Math.abs(this.s[Y])<=16033346880071782e-307+2220446049250313e-31*Z){this.s[Y]=0;break}}Y===W?X=3:Y===D-1?X=1:(X=2,W=Y)}switch(W++,X){case 1:var $=c[D-2];c[D-2]=0;for(var _=D-2;_>=W;_--){var aa=d.hypot(this.s[_],$),ab=this.s[_]/aa,ac=$/aa;this.s[_]=aa,_!==W&&($=-ac*c[_-1],c[_-1]=ab*c[_-1]);for(var ad=0;ad<this.n;ad++)aa=ab*this.V[ad][_]+ac*this.V[ad][D-1],this.V[ad][D-1]=-ac*this.V[ad][_]+ab*this.V[ad][D-1],this.V[ad][_]=aa}break;case 2:var ae=c[W-1];c[W-1]=0;for(var af=W;af<D;af++){var ag=d.hypot(this.s[af],ae),ah=this.s[af]/ag,ai=ae/ag;this.s[af]=ag,ae=-ai*c[af],c[af]=ah*c[af];for(var aj=0;aj<this.m;aj++)ag=ah*this.U[aj][af]+ai*this.U[aj][W-1],this.U[aj][W-1]=-ai*this.U[aj][af]+ah*this.U[aj][W-1],this.U[aj][af]=ag}break;case 3:var ak,al,am,an,ao=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[D-1]),Math.abs(this.s[D-2])),Math.abs(c[D-2])),Math.abs(this.s[W])),Math.abs(c[W])),ap=this.s[D-1]/ao,aq=this.s[D-2]/ao,ar=c[D-2]/ao,as=this.s[W]/ao,at=c[W]/ao,au=((aq+ap)*(aq-ap)+ar*ar)/2,av=ap*ar*(ap*ar),aw=0;am=0!==au,an=0!==av,(am||an)&&(aw=Math.sqrt(au*au+av),au<0&&(aw=-aw),aw=av/(au+aw));for(var ax=(as+ap)*(as-ap)+aw,ay=as*at,az=W;az<D-1;az++){var aA=d.hypot(ax,ay),aB=ax/aA,aC=ay/aA;az!==W&&(c[az-1]=aA),ax=aB*this.s[az]+aC*c[az],c[az]=aB*c[az]-aC*this.s[az],ay=aC*this.s[az+1],this.s[az+1]=aB*this.s[az+1];for(var aD=0;aD<this.n;aD++)aA=aB*this.V[aD][az]+aC*this.V[aD][az+1],this.V[aD][az+1]=-aC*this.V[aD][az]+aB*this.V[aD][az+1],this.V[aD][az]=aA;if(aA=d.hypot(ax,ay),aB=ax/aA,aC=ay/aA,this.s[az]=aA,ax=aB*c[az]+aC*this.s[az+1],this.s[az+1]=-aC*c[az]+aB*this.s[az+1],ay=aC*c[az+1],c[az+1]=aB*c[az+1],az<this.m-1)for(var aE=0;aE<this.m;aE++)aA=aB*this.U[aE][az]+aC*this.U[aE][az+1],this.U[aE][az+1]=-aC*this.U[aE][az]+aB*this.U[aE][az+1],this.U[aE][az]=aA}c[D-2]=ax;break;case 4:if(this.s[W]<=0&&(this.s[W]=this.s[W]<0?-this.s[W]:0,1))for(var aF=0;aF<=U;aF++)this.V[aF][W]=-this.V[aF][W];for(;W<U&&!(this.s[W]>=this.s[W+1]);){var aG=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=aG,W<this.n-1)for(var aH=0;aH<this.n;aH++)aG=this.V[aH][W+1],this.V[aH][W+1]=this.V[aH][W],this.V[aH][W]=aG;if(W<this.m-1)for(var aI=0;aI<this.m;aI++)aG=this.U[aI][W+1],this.U[aI][W+1]=this.U[aI][W],this.U[aI][W]=aG;W++}D--}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(a,b){var c=void 0;return Math.abs(a)>Math.abs(b)?(c=b/a,c=Math.abs(a)*Math.sqrt(1+c*c)):0!=b?(c=a/b,c=Math.abs(b)*Math.sqrt(1+c*c)):c=0,c},a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();a.exports=function(){function a(b,c){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.sequence1=b,this.sequence2=c,this.match_score=d,this.mismatch_penalty=e,this.gap_penalty=f,this.iMax=b.length+1,this.jMax=c.length+1,this.grid=Array(this.iMax);for(var g=0;g<this.iMax;g++){this.grid[g]=Array(this.jMax);for(var h=0;h<this.jMax;h++)this.grid[g][h]=0}this.tracebackGrid=Array(this.iMax);for(var i=0;i<this.iMax;i++){this.tracebackGrid[i]=Array(this.jMax);for(var j=0;j<this.jMax;j++)this.tracebackGrid[i][j]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var a=1;a<this.jMax;a++)this.grid[0][a]=this.grid[0][a-1]+this.gap_penalty,this.tracebackGrid[0][a]=[!1,!1,!0];for(var b=1;b<this.iMax;b++)this.grid[b][0]=this.grid[b-1][0]+this.gap_penalty,this.tracebackGrid[b][0]=[!1,!0,!1];for(var c=1;c<this.iMax;c++)for(var d=1;d<this.jMax;d++){var e=[this.sequence1[c-1]===this.sequence2[d-1]?this.grid[c-1][d-1]+this.match_score:this.grid[c-1][d-1]+this.mismatch_penalty,this.grid[c-1][d]+this.gap_penalty,this.grid[c][d-1]+this.gap_penalty],f=this.arrayAllMaxIndexes(e);this.grid[c][d]=e[f[0]],this.tracebackGrid[c][d]=[f.includes(0),f.includes(1),f.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var a=[];for(a.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});a[0];){var b=a[0],c=this.tracebackGrid[b.pos[0]][b.pos[1]];c[0]&&a.push({pos:[b.pos[0]-1,b.pos[1]-1],seq1:this.sequence1[b.pos[0]-1]+b.seq1,seq2:this.sequence2[b.pos[1]-1]+b.seq2}),c[1]&&a.push({pos:[b.pos[0]-1,b.pos[1]],seq1:this.sequence1[b.pos[0]-1]+b.seq1,seq2:"-"+b.seq2}),c[2]&&a.push({pos:[b.pos[0],b.pos[1]-1],seq1:"-"+b.seq1,seq2:this.sequence2[b.pos[1]-1]+b.seq2}),0===b.pos[0]&&0===b.pos[1]&&this.alignments.push({sequence1:b.seq1,sequence2:b.seq2}),a.shift()}return this.alignments}},{key:"getAllIndexes",value:function(a,b){for(var c=[],d=-1;-1!==(d=a.indexOf(b,d+1));)c.push(d);return c}},{key:"arrayAllMaxIndexes",value:function(a){return this.getAllIndexes(a,Math.max.apply(null,a))}}]),a}()},function(a,b,c){"use strict";var d=function(){};d.FDLayout=c(18),d.FDLayoutConstants=c(4),d.FDLayoutEdge=c(19),d.FDLayoutNode=c(20),d.DimensionD=c(21),d.HashMap=c(22),d.HashSet=c(23),d.IGeometry=c(8),d.IMath=c(9),d.Integer=c(10),d.Point=c(12),d.PointD=c(5),d.RandomSeed=c(16),d.RectangleD=c(13),d.Transform=c(17),d.UniqueIDGeneretor=c(14),d.Quicksort=c(25),d.LinkedList=c(11),d.LGraphObject=c(2),d.LGraph=c(6),d.LEdge=c(1),d.LGraphManager=c(7),d.LNode=c(3),d.Layout=c(15),d.LayoutConstants=c(0),d.NeedlemanWunsch=c(27),d.Matrix=c(24),d.SVD=c(26),a.exports=d},function(a,b,c){"use strict";function d(){this.listeners=[]}var e=d.prototype;e.addListener=function(a,b){this.listeners.push({event:a,callback:b})},e.removeListener=function(a,b){for(var c=this.listeners.length;c>=0;c--){var d=this.listeners[c];d.event===a&&d.callback===b&&this.listeners.splice(c,1)}},e.emit=function(a,b){for(var c=0;c<this.listeners.length;c++){var d=this.listeners[c];a===d.event&&d.callback(b)}},a.exports=d}],b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.i=function(a){return a},c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{configurable:!1,enumerable:!0,get:d})},c.n=function(a){var b=a&&a.__esModule?function(){return a.default}:function(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="",c(c.s=28)}()},70726:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>Y});var d=c(5513),e=c(70967),f=c(20132),g=c(35957),h=c(51142),i=c(18086),j=c(96957),k=c(95411),l=c(41027),m=c(40217),n={L:"left",R:"right",T:"top",B:"bottom"},o={L:(0,i.K2)(a=>`${a},${a/2} 0,${a} 0,0`,"L"),R:(0,i.K2)(a=>`0,${a/2} ${a},0 ${a},${a}`,"R"),T:(0,i.K2)(a=>`0,0 ${a},0 ${a/2},${a}`,"T"),B:(0,i.K2)(a=>`${a/2},0 ${a},${a} 0,${a}`,"B")},p={L:(0,i.K2)((a,b)=>a-b+2,"L"),R:(0,i.K2)((a,b)=>a-2,"R"),T:(0,i.K2)((a,b)=>a-b+2,"T"),B:(0,i.K2)((a,b)=>a-2,"B")},q=(0,i.K2)(function(a){return s(a)?"L"===a?"R":"L":"T"===a?"B":"T"},"getOppositeArchitectureDirection"),r=(0,i.K2)(function(a){return"L"===a||"R"===a||"T"===a||"B"===a},"isArchitectureDirection"),s=(0,i.K2)(function(a){return"L"===a||"R"===a},"isArchitectureDirectionX"),t=(0,i.K2)(function(a){return"T"===a||"B"===a},"isArchitectureDirectionY"),u=(0,i.K2)(function(a,b){let c=s(a)&&t(b),d=t(a)&&s(b);return c||d},"isArchitectureDirectionXY"),v=(0,i.K2)(function(a){let b=a[0],c=a[1],d=s(b)&&t(c),e=t(b)&&s(c);return d||e},"isArchitecturePairXY"),w=(0,i.K2)(function(a){return"LL"!==a&&"RR"!==a&&"TT"!==a&&"BB"!==a},"isValidArchitectureDirectionPair"),x=(0,i.K2)(function(a,b){let c=`${a}${b}`;return w(c)?c:void 0},"getArchitectureDirectionPair"),y=(0,i.K2)(function([a,b],c){let d=c[0],e=c[1];if(s(d))if(t(e))return[a+("L"===d?-1:1),b+("T"===e?1:-1)];else return[a+("L"===d?-1:1),b];return s(e)?[a+("L"===e?1:-1),b+("T"===d?1:-1)]:[a,b+("T"===d?1:-1)]},"shiftPositionByArchitectureDirectionPair"),z=(0,i.K2)(function(a){return"LT"===a||"TL"===a?[1,1]:"BL"===a||"LB"===a?[1,-1]:"BR"===a||"RB"===a?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),A=(0,i.K2)(function(a,b){return u(a,b)?"bend":s(a)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),B=(0,i.K2)(function(a){return"service"===a.type},"isArchitectureService"),C=(0,i.K2)(function(a){return"junction"===a.type},"isArchitectureJunction"),D=(0,i.K2)(a=>a.data(),"edgeData"),E=(0,i.K2)(a=>a.data(),"nodeData"),F=h.UI.architecture,G=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getAccDescription=h.m7,this.setAccDescription=h.EI,this.clear()}static{(0,i.K2)(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,h.IU)()}addService({id:a,icon:b,in:c,title:d,iconText:e}){if(void 0!==this.registeredIds[a])throw Error(`The service id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The service [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[c])throw Error(`The service [${a}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[c])throw Error(`The service [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"service",icon:b,iconText:e,title:d,edges:[],in:c}}getServices(){return Object.values(this.nodes).filter(B)}addJunction({id:a,in:b}){this.registeredIds[a]="node",this.nodes[a]={id:a,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(C)}getNodes(){return Object.values(this.nodes)}getNode(a){return this.nodes[a]??null}addGroup({id:a,icon:b,in:c,title:d}){if(this.registeredIds?.[a]!==void 0)throw Error(`The group id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The group [${a}] cannot be placed within itself`);if(this.registeredIds?.[c]===void 0)throw Error(`The group [${a}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[c]==="node")throw Error(`The group [${a}]'s parent is not a group`)}this.registeredIds[a]="group",this.groups[a]={id:a,icon:b,title:d,in:c}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:a,rhsId:b,lhsDir:c,rhsDir:d,lhsInto:e,rhsInto:f,lhsGroup:g,rhsGroup:h,title:i}){if(!r(c))throw Error(`Invalid direction given for left hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(c)}`);if(!r(d))throw Error(`Invalid direction given for right hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(d)}`);if(void 0===this.nodes[a]&&void 0===this.groups[a])throw Error(`The left-hand id [${a}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[b]&&void 0===this.groups[b])throw Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);let j=this.nodes[a].in,k=this.nodes[b].in;if(g&&j&&k&&j==k)throw Error(`The left-hand id [${a}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(h&&j&&k&&j==k)throw Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:a,lhsDir:c,lhsInto:e,lhsGroup:g,rhsId:b,rhsDir:d,rhsInto:f,rhsGroup:h,title:i}),this.nodes[a]&&this.nodes[b]&&(this.nodes[a].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let a={},b=Object.entries(this.nodes).reduce((b,[c,d])=>(b[c]=d.edges.reduce((b,d)=>{let e=this.getNode(d.lhsId)?.in,f=this.getNode(d.rhsId)?.in;if(e&&f&&e!==f){let b=A(d.lhsDir,d.rhsDir);"bend"!==b&&(a[e]??={},a[e][f]=b,a[f]??={},a[f][e]=b)}if(d.lhsId===c){let a=x(d.lhsDir,d.rhsDir);a&&(b[a]=d.rhsId)}else{let a=x(d.rhsDir,d.lhsDir);a&&(b[a]=d.lhsId)}return b},{}),b),{}),c=Object.keys(b)[0],d={[c]:1},e=Object.keys(b).reduce((a,b)=>b===c?a:{...a,[b]:1},{}),f=(0,i.K2)(a=>{let c={[a]:[0,0]},f=[a];for(;f.length>0;){let a=f.shift();if(a){d[a]=1,delete e[a];let g=b[a],[h,i]=c[a];Object.entries(g).forEach(([a,b])=>{d[b]||(c[b]=y([h,i],a),f.push(b))})}}return c},"BFS"),g=[f(c)];for(;Object.keys(e).length>0;)g.push(f(Object.keys(e)[0]));this.dataStructures={adjList:b,spatialMaps:g,groupAlignments:a}}return this.dataStructures}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}getConfig(){return(0,g.$t)({...F,...(0,h.zj)().architecture})}getConfigField(a){return this.getConfig()[a]}},H=(0,i.K2)((a,b)=>{(0,f.S)(a,b),a.groups.map(a=>b.addGroup(a)),a.services.map(a=>b.addService({...a,type:"service"})),a.junctions.map(a=>b.addJunction({...a,type:"junction"})),a.edges.map(a=>b.addEdge(a))},"populateDb"),I={parser:{yy:void 0},parse:(0,i.K2)(async a=>{let b=await (0,j.qg)("architecture",a);i.Rm.debug(b);let c=I.parser?.yy;if(!(c instanceof G))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");H(b,c)},"parse")},J=(0,i.K2)(a=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${a.archEdgeWidth};
|
|
4
4
|
stroke: ${a.archEdgeColor};
|
|
@@ -33,4 +33,4 @@ exports.id=726,exports.ids=[726],exports.modules={20132:(a,b,c)=>{"use strict";f
|
|
|
33
33
|
translate(${E}, ${F-b.height/2})
|
|
34
34
|
translate(${c*f.width/2}, ${e*f.height/2})
|
|
35
35
|
rotate(${-1*c*e*45}, 0, ${b.height/2})
|
|
36
|
-
`)}}}}}))},"drawEdges"),N=(0,i.K2)(async function(a,b,c){let d=.75*c.getConfigField("padding"),f=c.getConfigField("fontSize"),g=c.getConfigField("iconSize")/2;await Promise.all(b.nodes().map(async b=>{let i=E(b);if("group"===i.type){let{h:j,w:k,x1:l,y1:m}=b.boundingBox(),n=a.append("rect");n.attr("id",`group-${i.id}`).attr("x",l+g).attr("y",m+g).attr("width",k).attr("height",j).attr("class","node-bkg");let o=a.append("g"),p=l,q=m;if(i.icon){let a=o.append("g");a.html(`<g>${await (0,e.WY)(i.icon,{height:d,width:d,fallbackPrefix:L.prefix})}</g>`),a.attr("transform","translate("+(p+g+1)+", "+(q+g+1)+")"),p+=d,q+=f/2-1-2}if(i.label){let a=o.append("g");await (0,e.GZ)(a,i.label,{useHtmlLabels:!1,width:k,classes:"architecture-service-label"},(0,h.D7)()),a.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),a.attr("transform","translate("+(p+g+4)+", "+(q+g+2)+")")}c.setElementForId(i.id,n)}}))},"drawGroups"),O=(0,i.K2)(async function(a,b,c){let d=(0,h.D7)();for(let f of c){let c=b.append("g"),g=a.getConfigField("iconSize");if(f.title){let a=c.append("g");await (0,e.GZ)(a,f.title,{useHtmlLabels:!1,width:1.5*g,classes:"architecture-service-label"},d),a.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),a.attr("transform","translate("+g/2+", "+g+")")}let i=c.append("g");if(f.icon)i.html(`<g>${await (0,e.WY)(f.icon,{height:g,width:g,fallbackPrefix:L.prefix})}</g>`);else if(f.iconText){i.html(`<g>${await (0,e.WY)("blank",{height:g,width:g,fallbackPrefix:L.prefix})}</g>`);let a=i.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html((0,h.jZ)(f.iconText,d)),b=parseInt(window.getComputedStyle(a.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;a.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/b)};`)}else i.append("path").attr("class","node-bkg").attr("id","node-"+f.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);c.attr("id",`service-${f.id}`).attr("class","architecture-service");let{width:j,height:k}=c.node().getBBox();f.width=j,f.height=k,a.setElementForId(f.id,c)}return 0},"drawServices"),P=(0,i.K2)(function(a,b,c){c.forEach(c=>{let d=b.append("g"),e=a.getConfigField("iconSize");d.append("g").append("rect").attr("id","node-"+c.id).attr("fill-opacity","0").attr("width",e).attr("height",e),d.attr("class","architecture-junction");let{width:f,height:g}=d._groups[0][0].getBBox();d.width=f,d.height=g,a.setElementForId(c.id,d)})},"drawJunctions");function Q(a,b,c){a.forEach(a=>{b.add({group:"nodes",data:{type:"service",id:a.id,icon:a.icon,label:a.title,parent:a.in,width:c.getConfigField("iconSize"),height:c.getConfigField("iconSize")},classes:"node-service"})})}function R(a,b,c){a.forEach(a=>{b.add({group:"nodes",data:{type:"junction",id:a.id,parent:a.in,width:c.getConfigField("iconSize"),height:c.getConfigField("iconSize")},classes:"node-junction"})})}function S(a,b){b.nodes().map(b=>{let c=E(b);"group"!==c.type&&(c.x=b.position().x,c.y=b.position().y,a.getElementById(c.id).attr("transform","translate("+(c.x||0)+","+(c.y||0)+")"))})}function T(a,b){a.forEach(a=>{b.add({group:"nodes",data:{type:"group",id:a.id,icon:a.icon,label:a.title,parent:a.in},classes:"node-group"})})}function U(a,b){a.forEach(a=>{let{lhsId:c,rhsId:d,lhsInto:e,lhsGroup:f,rhsInto:g,lhsDir:h,rhsDir:i,rhsGroup:j,title:k}=a,l=u(a.lhsDir,a.rhsDir)?"segments":"straight",m={id:`${c}-${d}`,label:k,source:c,sourceDir:h,sourceArrow:e,sourceGroup:f,sourceEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%",target:d,targetDir:i,targetArrow:g,targetGroup:j,targetEndpoint:"L"===i?"0 50%":"R"===i?"100% 50%":"T"===i?"50% 0":"50% 100%"};b.add({group:"edges",data:m,classes:l})})}function V(a,b,c){let d=(0,i.K2)((a,b)=>Object.entries(a).reduce((a,[d,e])=>{let f=0,g=Object.entries(e);if(1===g.length)return a[d]=g[0][1],a;for(let e=0;e<g.length-1;e++)for(let h=e+1;h<g.length;h++){let[i,j]=g[e],[k,l]=g[h];c[i]?.[k]===b||"default"===i||"default"===k?(a[d]??=[],a[d]=[...a[d],...j,...l]):(a[`${d}-${f++}`]=j,a[`${d}-${f++}`]=l)}return a},{}),"flattenAlignments"),[e,f]=b.map(b=>{let c={},e={};return Object.entries(b).forEach(([b,[d,f]])=>{let g=a.getNode(b)?.in??"default";c[f]??={},c[f][g]??=[],c[f][g].push(b),e[d]??={},e[d][g]??=[],e[d][g].push(b)}),{horiz:Object.values(d(c,"horizontal")).filter(a=>a.length>1),vert:Object.values(d(e,"vertical")).filter(a=>a.length>1)}}).reduce(([a,b],{horiz:c,vert:d})=>[[...a,...c],[...b,...d]],[[],[]]);return{horizontal:e,vertical:f}}function W(a,b){let c=[],d=(0,i.K2)(a=>`${a[0]},${a[1]}`,"posToStr"),e=(0,i.K2)(a=>a.split(",").map(a=>parseInt(a)),"strToPos");return a.forEach(a=>{let f=Object.fromEntries(Object.entries(a).map(([a,b])=>[d(b),a])),g=[d([0,0])],h={},i={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;g.length>0;){let a=g.shift();if(a){h[a]=1;let j=f[a];if(j){let k=e(a);Object.entries(i).forEach(([a,e])=>{let i=d([k[0]+e[0],k[1]+e[1]]),l=f[i];l&&!h[i]&&(g.push(i),c.push({[n[a]]:l,[n[q(a)]]:j,gap:1.5*b.getConfigField("iconSize")}))})}}}}),c}function X(a,b,c,d,e,{spatialMaps:f,groupAlignments:g}){return new Promise(h=>{let j=(0,m.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),l=(0,k.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${e.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${e.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});j.remove(),T(c,l),Q(a,l,e),R(b,l,e),U(d,l);let n=V(e,f,g),o=W(f,e),p=l.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(a){let[b,c]=a.connectedNodes(),{parent:d}=E(b),{parent:f}=E(c);return d===f?1.5*e.getConfigField("iconSize"):.5*e.getConfigField("iconSize")},edgeElasticity(a){let[b,c]=a.connectedNodes(),{parent:d}=E(b),{parent:e}=E(c);return d===e?.45:.001},alignmentConstraint:n,relativePlacementConstraint:o});p.one("layoutstop",()=>{function a(a,b,c,d){let e,f,{x:g,y:h}=a,{x:i,y:j}=b;f=(d-h+(g-c)*(h-j)/(g-i))/Math.sqrt(1+Math.pow((h-j)/(g-i),2)),e=Math.sqrt(Math.pow(d-h,2)+Math.pow(c-g,2)-Math.pow(f,2))/Math.sqrt(Math.pow(i-g,2)+Math.pow(j-h,2));let k=(i-g)*(d-h)-(j-h)*(c-g);switch(!0){case k>=0:k=1;break;case k<0:k=-1}let l=(i-g)*(c-g)+(j-h)*(d-h);switch(!0){case l>=0:l=1;break;case l<0:l=-1}return{distances:f=Math.abs(f)*k,weights:e*=l}}for(let b of((0,i.K2)(a,"getSegmentWeights"),l.startBatch(),Object.values(l.edges())))if(b.data?.()){let{x:c,y:d}=b.source().position(),{x:e,y:f}=b.target().position();if(c!==e&&d!==f){let c=b.sourceEndpoint(),d=b.targetEndpoint(),{sourceDir:e}=D(b),[f,g]=t(e)?[c.x,d.y]:[d.x,c.y],{weights:h,distances:i}=a(c,d,f,g);b.style("segment-distances",i),b.style("segment-weights",h)}}l.endBatch(),p.run()}),p.run(),l.ready(a=>{i.Rm.info("Ready",a),h(l)})})}(0,e.pC)([{name:L.prefix,icons:L}]),k.A.use(l),(0,i.K2)(Q,"addServices"),(0,i.K2)(R,"addJunctions"),(0,i.K2)(S,"positionNodes"),(0,i.K2)(T,"addGroups"),(0,i.K2)(U,"addEdges"),(0,i.K2)(V,"getAlignments"),(0,i.K2)(W,"getRelativeConstraints"),(0,i.K2)(X,"layoutArchitecture");var Y={parser:I,get db(){return new G},renderer:{draw:(0,i.K2)(async(a,b,c,e)=>{let f=e.db,g=f.getServices(),i=f.getJunctions(),j=f.getGroups(),k=f.getEdges(),l=f.getDataStructures(),m=(0,d.D)(b),n=m.append("g");n.attr("class","architecture-edges");let o=m.append("g");o.attr("class","architecture-services");let p=m.append("g");p.attr("class","architecture-groups"),await O(f,o,g),P(f,o,i);let q=await X(g,i,j,k,f,l);await M(n,q,f),await N(p,q,f),S(f,q),(0,h.ot)(void 0,m,f.getConfigField("padding"),f.getConfigField("useMaxWidth"))},"draw")},styles:J}},81346:function(a){a.exports=function(){var a=[function(a,b,c){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,a.exports=d},function(a,b,c){"use strict";var d=c(2),e=c(8),f=c(9);function g(a,b,c){d.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=a,this.target=b}for(var h in g.prototype=Object.create(d.prototype),d)g[h]=d[h];g.prototype.getSource=function(){return this.source},g.prototype.getTarget=function(){return this.target},g.prototype.isInterGraph=function(){return this.isInterGraph},g.prototype.getLength=function(){return this.length},g.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},g.prototype.getBendpoints=function(){return this.bendpoints},g.prototype.getLca=function(){return this.lca},g.prototype.getSourceInLca=function(){return this.sourceInLca},g.prototype.getTargetInLca=function(){return this.targetInLca},g.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"},g.prototype.getOtherEndInGraph=function(a,b){for(var c=this.getOtherEnd(a),d=b.getGraphManager().getRoot();;){if(c.getOwner()==b)return c;if(c.getOwner()==d)break;c=c.getOwner().getParent()}return null},g.prototype.updateLength=function(){var a=[,,,,];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],1>Math.abs(this.lengthX)&&(this.lengthX=f.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=f.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},g.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),1>Math.abs(this.lengthX)&&(this.lengthX=f.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=f.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},a.exports=g},function(a,b,c){"use strict";a.exports=function(a){this.vGraphObject=a}},function(a,b,c){"use strict";var d=c(2),e=c(10),f=c(13),g=c(0),h=c(16),i=c(5);function j(a,b,c,g){null==c&&null==g&&(g=b),d.call(this,g),null!=a.graphManager&&(a=a.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=a,null!=c&&null!=b?this.rect=new f(b.x,b.y,c.width,c.height):this.rect=new f}for(var k in j.prototype=Object.create(d.prototype),d)j[k]=d[k];j.prototype.getEdges=function(){return this.edges},j.prototype.getChild=function(){return this.child},j.prototype.getOwner=function(){return this.owner},j.prototype.getWidth=function(){return this.rect.width},j.prototype.setWidth=function(a){this.rect.width=a},j.prototype.getHeight=function(){return this.rect.height},j.prototype.setHeight=function(a){this.rect.height=a},j.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},j.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},j.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},j.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},j.prototype.getRect=function(){return this.rect},j.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},j.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},j.prototype.setRect=function(a,b){this.rect.x=a.x,this.rect.y=a.y,this.rect.width=b.width,this.rect.height=b.height},j.prototype.setCenter=function(a,b){this.rect.x=a-this.rect.width/2,this.rect.y=b-this.rect.height/2},j.prototype.setLocation=function(a,b){this.rect.x=a,this.rect.y=b},j.prototype.moveBy=function(a,b){this.rect.x+=a,this.rect.y+=b},j.prototype.getEdgeListToNode=function(a){var b=[],c=this;return c.edges.forEach(function(d){if(d.target==a){if(d.source!=c)throw"Incorrect edge source!";b.push(d)}}),b},j.prototype.getEdgesBetween=function(a){var b=[],c=this;return c.edges.forEach(function(d){if(d.source!=c&&d.target!=c)throw"Incorrect edge source and/or target";(d.target==a||d.source==a)&&b.push(d)}),b},j.prototype.getNeighborsList=function(){var a=new Set,b=this;return b.edges.forEach(function(c){if(c.source==b)a.add(c.target);else{if(c.target!=b)throw"Incorrect incidency!";a.add(c.source)}}),a},j.prototype.withChildren=function(){var a=new Set;if(a.add(this),null!=this.child)for(var b=this.child.getNodes(),c=0;c<b.length;c++)b[c].withChildren().forEach(function(b){a.add(b)});return a},j.prototype.getNoOfChildren=function(){var a=0;if(null==this.child)a=1;else for(var b=this.child.getNodes(),c=0;c<b.length;c++)a+=b[c].getNoOfChildren();return 0==a&&(a=1),a},j.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},j.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},j.prototype.scatter=function(){var a,b,c=-g.INITIAL_WORLD_BOUNDARY,d=g.INITIAL_WORLD_BOUNDARY;a=g.WORLD_CENTER_X+h.nextDouble()*(d-c)+c;var e=-g.INITIAL_WORLD_BOUNDARY,f=g.INITIAL_WORLD_BOUNDARY;b=g.WORLD_CENTER_Y+h.nextDouble()*(f-e)+e,this.rect.x=a,this.rect.y=b},j.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var a=this.getChild();if(a.updateBounds(!0),this.rect.x=a.getLeft(),this.rect.y=a.getTop(),this.setWidth(a.getRight()-a.getLeft()),this.setHeight(a.getBottom()-a.getTop()),g.NODE_DIMENSIONS_INCLUDE_LABELS){var b=a.getRight()-a.getLeft(),c=a.getBottom()-a.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(b+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>b?(this.rect.x-=(this.labelWidth-b)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(b+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>c?(this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(c+this.labelHeight))}}},j.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},j.prototype.transform=function(a){var b=this.rect.x;b>g.WORLD_BOUNDARY?b=g.WORLD_BOUNDARY:b<-g.WORLD_BOUNDARY&&(b=-g.WORLD_BOUNDARY);var c=this.rect.y;c>g.WORLD_BOUNDARY?c=g.WORLD_BOUNDARY:c<-g.WORLD_BOUNDARY&&(c=-g.WORLD_BOUNDARY);var d=new i(b,c),e=a.inverseTransformPoint(d);this.setLocation(e.x,e.y)},j.prototype.getLeft=function(){return this.rect.x},j.prototype.getRight=function(){return this.rect.x+this.rect.width},j.prototype.getTop=function(){return this.rect.y},j.prototype.getBottom=function(){return this.rect.y+this.rect.height},j.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},a.exports=j},function(a,b,c){"use strict";var d=c(0);function e(){}for(var f in d)e[f]=d[f];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=3*e.MAX_NODE_DISPLACEMENT_INCREMENTAL,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,a.exports=e},function(a,b,c){"use strict";function d(a,b){null==a&&null==b?(this.x=0,this.y=0):(this.x=a,this.y=b)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(a){this.x=a},d.prototype.setY=function(a){this.y=a},d.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},a.exports=d},function(a,b,c){"use strict";var d=c(2),e=c(10),f=c(0),g=c(7),h=c(3),i=c(1),j=c(13),k=c(12),l=c(11);function m(a,b,c){d.call(this,c),this.estimatedSize=e.MIN_VALUE,this.margin=f.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=a,null!=b&&b instanceof g?this.graphManager=b:null!=b&&b instanceof Layout&&(this.graphManager=b.graphManager)}for(var n in m.prototype=Object.create(d.prototype),d)m[n]=d[n];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(a,b,c){if(null==b&&null==c){if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(a)>-1)throw"Node already in graph!";return a.owner=this,this.getNodes().push(a),a}if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(b.owner!=c.owner||b.owner!=this)throw"Both owners must be this graph!";return b.owner!=c.owner?null:(a.source=b,a.target=c,a.isInterGraph=!1,this.getEdges().push(a),b.edges.push(a),c!=b&&c.edges.push(a),a)},m.prototype.remove=function(a){if(a instanceof h){if(null==a)throw"Node is null!";if(null==a.owner||a.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var b,c=a.edges.slice(),d=c.length,e=0;e<d;e++)(b=c[e]).isInterGraph?this.graphManager.remove(b):b.source.owner.remove(b);var f=this.nodes.indexOf(a);if(-1==f)throw"Node not in owner node list!";this.nodes.splice(f,1)}else if(a instanceof i){var b=a;if(null==b)throw"Edge is null!";if(null==b.source||null==b.target)throw"Source and/or target is null!";if(null==b.source.owner||null==b.target.owner||b.source.owner!=this||b.target.owner!=this)throw"Source and/or target owner is invalid!";var g=b.source.edges.indexOf(b),j=b.target.edges.indexOf(b);if(!(g>-1&&j>-1))throw"Source and/or target doesn't know this edge!";b.source.edges.splice(g,1),b.target!=b.source&&b.target.edges.splice(j,1);var f=b.source.owner.getEdges().indexOf(b);if(-1==f)throw"Not in owner's edge list!";b.source.owner.getEdges().splice(f,1)}},m.prototype.updateLeftTop=function(){for(var a,b,c,d=e.MAX_VALUE,f=e.MAX_VALUE,g=this.getNodes(),h=g.length,i=0;i<h;i++){var j=g[i];a=j.getTop(),b=j.getLeft(),d>a&&(d=a),f>b&&(f=b)}return d==e.MAX_VALUE?null:(c=void 0!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=f-c,this.top=d-c,new k(this.left,this.top))},m.prototype.updateBounds=function(a){for(var b,c,d,f,g,h=e.MAX_VALUE,i=-e.MAX_VALUE,k=e.MAX_VALUE,l=-e.MAX_VALUE,m=this.nodes,n=m.length,o=0;o<n;o++){var p=m[o];a&&null!=p.child&&p.updateBounds(),b=p.getLeft(),c=p.getRight(),d=p.getTop(),f=p.getBottom(),h>b&&(h=b),i<c&&(i=c),k>d&&(k=d),l<f&&(l=f)}var q=new j(h,k,i-h,l-k);h==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),g=void 0!=m[0].getParent().paddingLeft?m[0].getParent().paddingLeft:this.margin,this.left=q.x-g,this.right=q.x+q.width+g,this.top=q.y-g,this.bottom=q.y+q.height+g},m.calculateBounds=function(a){for(var b,c,d,f,g=e.MAX_VALUE,h=-e.MAX_VALUE,i=e.MAX_VALUE,k=-e.MAX_VALUE,l=a.length,m=0;m<l;m++){var n=a[m];b=n.getLeft(),c=n.getRight(),d=n.getTop(),f=n.getBottom(),g>b&&(g=b),h<c&&(h=c),i>d&&(i=d),k<f&&(k=f)}return new j(g,i,h-g,k-i)},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var a=0,b=this.nodes,c=b.length,d=0;d<c;d++)a+=b[d].calcEstimatedSize();return 0==a?this.estimatedSize=f.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=a/Math.sqrt(this.nodes.length),this.estimatedSize},m.prototype.updateConnected=function(){var a,b,c=this;if(0==this.nodes.length){this.isConnected=!0;return}var d=new l,e=new Set,f=this.nodes[0];for(f.withChildren().forEach(function(a){d.push(a),e.add(a)});0!==d.length;)for(var g=(a=(f=d.shift()).getEdges()).length,h=0;h<g;h++)null==(b=a[h].getOtherEndInGraph(f,this))||e.has(b)||b.withChildren().forEach(function(a){d.push(a),e.add(a)});if(this.isConnected=!1,e.size>=this.nodes.length){var i=0;e.forEach(function(a){a.owner==c&&i++}),i==this.nodes.length&&(this.isConnected=!0)}},a.exports=m},function(a,b,c){"use strict";var d,e=c(1);function f(a){d=c(6),this.layout=a,this.graphs=[],this.edges=[]}f.prototype.addRoot=function(){var a=this.layout.newGraph(),b=this.layout.newNode(null),c=this.add(a,b);return this.setRootGraph(c),this.rootGraph},f.prototype.add=function(a,b,c,d,e){if(null==c&&null==d&&null==e){if(null==a)throw"Graph is null!";if(null==b)throw"Parent node is null!";if(this.graphs.indexOf(a)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(a),null!=a.parent)throw"Already has a parent!";if(null!=b.child)throw"Already has a child!";return a.parent=b,b.child=a,a}e=c,d=b,c=a;var f=d.getOwner(),g=e.getOwner();if(null==f||f.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==g||g.getGraphManager()!=this)throw"Target not in this graph mgr!";if(f==g)return c.isInterGraph=!1,f.add(c,d,e);if(c.isInterGraph=!0,c.source=d,c.target=e,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),null==c.source||null==c.target)throw"Edge source and/or target is null!";if(-1!=c.source.edges.indexOf(c)||-1!=c.target.edges.indexOf(c))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c},f.prototype.remove=function(a){if(a instanceof d){if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(a!=this.rootGraph&&(null==a.parent||a.parent.graphManager!=this))throw"Invalid parent node!";for(var b,c,f=[],g=(f=f.concat(a.getEdges())).length,h=0;h<g;h++)b=f[h],a.remove(b);var i=[];g=(i=i.concat(a.getNodes())).length;for(var h=0;h<g;h++)c=i[h],a.remove(c);a==this.rootGraph&&this.setRootGraph(null);var j=this.graphs.indexOf(a);this.graphs.splice(j,1),a.parent=null}else if(a instanceof e){if(null==(b=a))throw"Edge is null!";if(!b.isInterGraph)throw"Not an inter-graph edge!";if(null==b.source||null==b.target)throw"Source and/or target is null!";if(-1==b.source.edges.indexOf(b)||-1==b.target.edges.indexOf(b))throw"Source and/or target doesn't know this edge!";var j=b.source.edges.indexOf(b);if(b.source.edges.splice(j,1),j=b.target.edges.indexOf(b),b.target.edges.splice(j,1),null==b.source.owner||null==b.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==b.source.owner.getGraphManager().edges.indexOf(b))throw"Not in owner graph manager's edge list!";var j=b.source.owner.getGraphManager().edges.indexOf(b);b.source.owner.getGraphManager().edges.splice(j,1)}},f.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},f.prototype.getGraphs=function(){return this.graphs},f.prototype.getAllNodes=function(){if(null==this.allNodes){for(var a=[],b=this.getGraphs(),c=b.length,d=0;d<c;d++)a=a.concat(b[d].getNodes());this.allNodes=a}return this.allNodes},f.prototype.resetAllNodes=function(){this.allNodes=null},f.prototype.resetAllEdges=function(){this.allEdges=null},f.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},f.prototype.getAllEdges=function(){if(null==this.allEdges){var a=[],b=this.getGraphs();b.length;for(var c=0;c<b.length;c++)a=a.concat(b[c].getEdges());a=a.concat(this.edges),this.allEdges=a}return this.allEdges},f.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},f.prototype.setAllNodesToApplyGravitation=function(a){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=a},f.prototype.getRoot=function(){return this.rootGraph},f.prototype.setRootGraph=function(a){if(a.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=a,null==a.parent&&(a.parent=this.layout.newNode("Root node"))},f.prototype.getLayout=function(){return this.layout},f.prototype.isOneAncestorOfOther=function(a,b){if(null==a||null==b)throw"assert failed";if(a==b)return!0;for(var c,d=a.getOwner();null!=(c=d.getParent());){if(c==b)return!0;if(null==(d=c.getOwner()))break}for(d=b.getOwner();null!=(c=d.getParent());){if(c==a)return!0;if(null==(d=c.getOwner()))break}return!1},f.prototype.calcLowestCommonAncestors=function(){for(var a,b,c,d,e,f=this.getAllEdges(),g=f.length,h=0;h<g;h++){if(b=(a=f[h]).source,c=a.target,a.lca=null,a.sourceInLca=b,a.targetInLca=c,b==c){a.lca=b.getOwner();continue}for(d=b.getOwner();null==a.lca;){for(a.targetInLca=c,e=c.getOwner();null==a.lca;){if(e==d){a.lca=e;break}if(e==this.rootGraph)break;if(null!=a.lca)throw"assert failed";a.targetInLca=e.getParent(),e=a.targetInLca.getOwner()}if(d==this.rootGraph)break;null==a.lca&&(a.sourceInLca=d.getParent(),d=a.sourceInLca.getOwner())}if(null==a.lca)throw"assert failed"}},f.prototype.calcLowestCommonAncestor=function(a,b){if(a==b)return a.getOwner();for(var c=a.getOwner();null!=c;){for(var d=b.getOwner();null!=d;){if(d==c)return d;d=d.getParent().getOwner()}c=c.getParent().getOwner()}return c},f.prototype.calcInclusionTreeDepths=function(a,b){null==a&&null==b&&(a=this.rootGraph,b=1);for(var c,d=a.getNodes(),e=d.length,f=0;f<e;f++)(c=d[f]).inclusionTreeDepth=b,null!=c.child&&this.calcInclusionTreeDepths(c.child,b+1)},f.prototype.includesInvalidEdge=function(){for(var a,b=[],c=this.edges.length,d=0;d<c;d++)a=this.edges[d],this.isOneAncestorOfOther(a.source,a.target)&&b.push(a);for(var d=0;d<b.length;d++)this.remove(b[d]);return!1},a.exports=f},function(a,b,c){"use strict";var d=c(12);function e(){}e.calcSeparationAmount=function(a,b,c,d){if(!a.intersects(b))throw"assert failed";var e=[,,];this.decideDirectionsForOverlappingNodes(a,b,e),c[0]=Math.min(a.getRight(),b.getRight())-Math.max(a.x,b.x),c[1]=Math.min(a.getBottom(),b.getBottom())-Math.max(a.y,b.y),a.getX()<=b.getX()&&a.getRight()>=b.getRight()?c[0]+=Math.min(b.getX()-a.getX(),a.getRight()-b.getRight()):b.getX()<=a.getX()&&b.getRight()>=a.getRight()&&(c[0]+=Math.min(a.getX()-b.getX(),b.getRight()-a.getRight())),a.getY()<=b.getY()&&a.getBottom()>=b.getBottom()?c[1]+=Math.min(b.getY()-a.getY(),a.getBottom()-b.getBottom()):b.getY()<=a.getY()&&b.getBottom()>=a.getBottom()&&(c[1]+=Math.min(a.getY()-b.getY(),b.getBottom()-a.getBottom()));var f=Math.abs((b.getCenterY()-a.getCenterY())/(b.getCenterX()-a.getCenterX()));b.getCenterY()===a.getCenterY()&&b.getCenterX()===a.getCenterX()&&(f=1);var g=f*c[0],h=c[1]/f;c[0]<h?h=c[0]:g=c[1],c[0]=-1*e[0]*(h/2+d),c[1]=-1*e[1]*(g/2+d)},e.decideDirectionsForOverlappingNodes=function(a,b,c){a.getCenterX()<b.getCenterX()?c[0]=-1:c[0]=1,a.getCenterY()<b.getCenterY()?c[1]=-1:c[1]=1},e.getIntersection2=function(a,b,c){var d=a.getCenterX(),e=a.getCenterY(),f=b.getCenterX(),g=b.getCenterY();if(a.intersects(b))return c[0]=d,c[1]=e,c[2]=f,c[3]=g,!0;var h=a.getX(),i=a.getY(),j=a.getRight(),k=a.getX(),l=a.getBottom(),m=a.getRight(),n=a.getWidthHalf(),o=a.getHeightHalf(),p=b.getX(),q=b.getY(),r=b.getRight(),s=b.getX(),t=b.getBottom(),u=b.getRight(),v=b.getWidthHalf(),w=b.getHeightHalf(),x=!1,y=!1;if(d===f)e>g?(c[0]=d,c[1]=i,c[2]=f,c[3]=t):e<g&&(c[0]=d,c[1]=l,c[2]=f,c[3]=q);else if(e===g)d>f?(c[0]=h,c[1]=e,c[2]=r,c[3]=g):d<f&&(c[0]=j,c[1]=e,c[2]=p,c[3]=g);else{var z=a.height/a.width,A=b.height/b.width,B=(g-e)/(f-d),C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0;if(-z===B?(d>f?(c[0]=k,c[1]=l):(c[0]=j,c[1]=i),x=!0):z===B&&(d>f?(c[0]=h,c[1]=i):(c[0]=m,c[1]=l),x=!0),-A===B?(f>d?(c[2]=s,c[3]=t):(c[2]=r,c[3]=q),y=!0):A===B&&(f>d?(c[2]=p,c[3]=q):(c[2]=u,c[3]=t),y=!0),x&&y)return!1;if(d>f?e>g?(C=this.getCardinalDirection(z,B,4),D=this.getCardinalDirection(A,B,2)):(C=this.getCardinalDirection(-z,B,3),D=this.getCardinalDirection(-A,B,1)):e>g?(C=this.getCardinalDirection(-z,B,1),D=this.getCardinalDirection(-A,B,3)):(C=this.getCardinalDirection(z,B,2),D=this.getCardinalDirection(A,B,4)),!x)switch(C){case 1:F=i,E=d+-o/B,c[0]=E,c[1]=F;break;case 2:E=m,F=e+n*B,c[0]=E,c[1]=F;break;case 3:F=l,E=d+o/B,c[0]=E,c[1]=F;break;case 4:E=k,F=e+-n*B,c[0]=E,c[1]=F}if(!y)switch(D){case 1:H=q,G=f+-w/B,c[2]=G,c[3]=H;break;case 2:G=u,H=g+v*B,c[2]=G,c[3]=H;break;case 3:H=t,G=f+w/B,c[2]=G,c[3]=H;break;case 4:G=s,H=g+-v*B,c[2]=G,c[3]=H}}return!1},e.getCardinalDirection=function(a,b,c){return a>b?c:1+c%4},e.getIntersection=function(a,b,c,e){if(null==e)return this.getIntersection2(a,b,c);var f=a.x,g=a.y,h=b.x,i=b.y,j=c.x,k=c.y,l=e.x,m=e.y,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0,s=void 0,t=void 0;return(n=i-g,p=f-h,r=h*g-f*i,o=m-k,q=j-l,s=l*k-j*m,0==(t=n*q-o*p))?null:new d((p*s-q*r)/t,(o*r-n*s)/t)},e.angleOfVector=function(a,b,c,d){var e=void 0;return a!==c?(e=Math.atan((d-b)/(c-a)),c<a?e+=Math.PI:d<b&&(e+=this.TWO_PI)):e=d<b?this.ONE_AND_HALF_PI:this.HALF_PI,e},e.doIntersect=function(a,b,c,d){var e=a.x,f=a.y,g=b.x,h=b.y,i=c.x,j=c.y,k=d.x,l=d.y,m=(g-e)*(l-j)-(k-i)*(h-f);if(0===m)return!1;var n=((l-j)*(k-e)+(i-k)*(l-f))/m,o=((f-h)*(k-e)+(g-e)*(l-f))/m;return 0<n&&n<1&&0<o&&o<1},e.findCircleLineIntersections=function(a,b,c,d,e,f,g){var h=(c-a)*(c-a)+(d-b)*(d-b),i=2*((a-e)*(c-a)+(b-f)*(d-b)),j=(a-e)*(a-e)+(b-f)*(b-f)-g*g;if(!(i*i-4*h*j>=0))return null;var k=(-i+Math.sqrt(i*i-4*h*j))/(2*h),l=(-i-Math.sqrt(i*i-4*h*j))/(2*h);return k>=0&&k<=1?[k]:l>=0&&l<=1?[l]:null},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,a.exports=e},function(a,b,c){"use strict";function d(){}d.sign=function(a){return a>0?1:a<0?-1:0},d.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},d.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},a.exports=d},function(a,b,c){"use strict";function d(){}d.MAX_VALUE=0x7fffffff,d.MIN_VALUE=-0x80000000,a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return{value:a,next:null,prev:null}},f=function(a,b,c,d){return null!==a?a.next=b:d.head=b,null!==c?c.prev=b:d.tail=b,b.prev=a,b.next=c,d.length++,b},g=function(a,b){var c=a.prev,d=a.next;return null!==c?c.next=d:b.head=d,null!==d?d.prev=c:b.tail=c,a.prev=a.next=null,b.length--,a};a.exports=function(){function a(b){var c=this;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.length=0,this.head=null,this.tail=null,null!=b&&b.forEach(function(a){return c.push(a)})}return d(a,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(a,b){return f(b.prev,e(a),b,this)}},{key:"insertAfter",value:function(a,b){return f(b,e(a),b.next,this)}},{key:"insertNodeBefore",value:function(a,b){return f(b.prev,a,b,this)}},{key:"insertNodeAfter",value:function(a,b){return f(b,a,b.next,this)}},{key:"push",value:function(a){return f(this.tail,e(a),null,this)}},{key:"unshift",value:function(a){return f(null,e(a),this.head,this)}},{key:"remove",value:function(a){return g(a,this)}},{key:"pop",value:function(){return g(this.tail,this).value}},{key:"popNode",value:function(){return g(this.tail,this)}},{key:"shift",value:function(){return g(this.head,this).value}},{key:"shiftNode",value:function(){return g(this.head,this)}},{key:"get_object_at",value:function(a){if(a<=this.length()){for(var b=1,c=this.head;b<a;)c=c.next,b++;return c.value}}},{key:"set_object_at",value:function(a,b){if(a<=this.length()){for(var c=1,d=this.head;c<a;)d=d.next,c++;d.value=b}}}]),a}()},function(a,b,c){"use strict";function d(a,b,c){this.x=null,this.y=null,null==a&&null==b&&null==c?(this.x=0,this.y=0):"number"==typeof a&&"number"==typeof b&&null==c?(this.x=a,this.y=b):"Point"==a.constructor.name&&null==b&&null==c&&(c=a,this.x=c.x,this.y=c.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(a,b,c){"Point"==a.constructor.name&&null==b&&null==c?(c=a,this.setLocation(c.x,c.y)):"number"==typeof a&&"number"==typeof b&&null==c&&(parseInt(a)==a&&parseInt(b)==b?this.move(a,b):(this.x=Math.floor(a+.5),this.y=Math.floor(b+.5)))},d.prototype.move=function(a,b){this.x=a,this.y=b},d.prototype.translate=function(a,b){this.x+=a,this.y+=b},d.prototype.equals=function(a){return"Point"==a.constructor.name?this.x==a.x&&this.y==a.y:this==a},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},a.exports=d},function(a,b,c){"use strict";function d(a,b,c,d){this.x=0,this.y=0,this.width=0,this.height=0,null!=a&&null!=b&&null!=c&&null!=d&&(this.x=a,this.y=b,this.width=c,this.height=d)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(a){this.x=a},d.prototype.getY=function(){return this.y},d.prototype.setY=function(a){this.y=a},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(a){this.width=a},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(a){this.height=a},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(a){return!(this.getRight()<a.x||this.getBottom()<a.y||a.getRight()<this.x||a.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},a.exports=d},function(a,b,c){"use strict";var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function e(){}e.lastID=0,e.createID=function(a){return e.isPrimitive(a)?a:(null!=a.uniqueID||(a.uniqueID=e.getString(),e.lastID++),a.uniqueID)},e.getString=function(a){return null==a&&(a=e.lastID),"Object#"+a},e.isPrimitive=function(a){var b=void 0===a?"undefined":d(a);return null==a||"object"!=b&&"function"!=b},a.exports=e},function(a,b,c){"use strict";function d(a){if(!Array.isArray(a))return Array.from(a);for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}var e=c(0),f=c(7),g=c(3),h=c(1),i=c(6),j=c(5),k=c(17),l=c(29);function m(a){l.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new f(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=a&&(this.isRemoteUse=a)}m.RANDOM_SEED=1,m.prototype=Object.create(l.prototype),m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},m.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},m.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},m.prototype.newGraphManager=function(){var a=new f(this);return this.graphManager=a,a},m.prototype.newGraph=function(a){return new i(null,this.graphManager,a)},m.prototype.newNode=function(a){return new g(this.graphManager,a)},m.prototype.newEdge=function(a){return new h(null,null,a)},m.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},m.prototype.runLayout=function(){var a;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),a=!this.checkLayoutSuccess()&&this.layout(),"during"!==e.ANIMATE&&(a&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},m.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},m.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),b=0;b<a.length;b++)a[b];for(var c=this.graphManager.getRoot().getNodes(),b=0;b<c.length;b++)c[b];this.update(this.graphManager.getRoot())}},m.prototype.update=function(a){if(null==a)this.update2();else if(a instanceof g){if(null!=a.getChild())for(var b=a.getChild().getNodes(),c=0;c<b.length;c++)update(b[c]);null!=a.vGraphObject&&a.vGraphObject.update(a)}else a instanceof h?null!=a.vGraphObject&&a.vGraphObject.update(a):a instanceof i&&null!=a.vGraphObject&&a.vGraphObject.update(a)},m.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},m.prototype.transform=function(a){if(void 0==a)this.transform(new j(0,0));else{var b=new k,c=this.graphManager.getRoot().updateLeftTop();if(null!=c){b.setWorldOrgX(a.x),b.setWorldOrgY(a.y),b.setDeviceOrgX(c.x),b.setDeviceOrgY(c.y);for(var d=this.getAllNodes(),e=0;e<d.length;e++)d[e].transform(b)}}},m.prototype.positionNodesRandomly=function(a){if(void 0==a)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var b,c,d=a.getNodes(),e=0;e<d.length;e++)null==(c=(b=d[e]).getChild())||0==c.getNodes().length?b.scatter():(this.positionNodesRandomly(c),b.updateBounds())},m.prototype.getFlatForest=function(){for(var a=[],b=!0,c=this.graphManager.getRoot().getNodes(),e=!0,f=0;f<c.length;f++)null!=c[f].getChild()&&(e=!1);if(!e)return a;var g=new Set,h=[],i=new Map,j=[];for(j=j.concat(c);j.length>0&&b;){for(h.push(j[0]);h.length>0&&b;){var k=h[0];h.splice(0,1),g.add(k);for(var l=k.getEdges(),f=0;f<l.length;f++){var m=l[f].getOtherEnd(k);if(i.get(k)!=m)if(g.has(m)){b=!1;break}else h.push(m),i.set(m,k)}}if(b){var n=[].concat(d(g));a.push(n);for(var f=0;f<n.length;f++){var o=n[f],p=j.indexOf(o);p>-1&&j.splice(p,1)}g=new Set,i=new Map}else a=[]}return a},m.prototype.createDummyNodesForBendpoints=function(a){for(var b=[],c=a.source,d=this.graphManager.calcLowestCommonAncestor(a.source,a.target),e=0;e<a.bendpoints.length;e++){var f=this.newNode(null);f.setRect(new Point(0,0),new Dimension(1,1)),d.add(f);var g=this.newEdge(null);this.graphManager.add(g,c,f),b.add(f),c=f}var g=this.newEdge(null);return this.graphManager.add(g,c,a.target),this.edgeToDummyNodes.set(a,b),a.isInterGraph()?this.graphManager.remove(a):d.remove(a),b},m.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(d(this.edgeToDummyNodes.keys())).concat(a);for(var b=0;b<a.length;b++){var c=a[b];if(c.bendpoints.length>0){for(var e=this.edgeToDummyNodes.get(c),f=0;f<e.length;f++){var g=e[f],h=new j(g.getCenterX(),g.getCenterY()),i=c.bendpoints.get(f);i.x=h.x,i.y=h.y,g.getOwner().remove(g)}this.graphManager.add(c,c.source,c.target)}}},m.transform=function(a,b,c,d){if(void 0==c||void 0==d)return a<=50?(e=9*b/500,f=b/10):(e=9*b/50,f=-8*b),e*a+f;var e,f,g=b;return a<=50?g-=(b-b/c)/50*(50-a):g+=(b*d-b)/50*(a-50),g},m.findCenterOfTree=function(a){var b=[];b=b.concat(a);var c=[],d=new Map,e=!1,f=null;(1==b.length||2==b.length)&&(e=!0,f=b[0]);for(var g=0;g<b.length;g++){var h=b[g],i=h.getNeighborsList().size;d.set(h,h.getNeighborsList().size),1==i&&c.push(h)}var j=[];for(j=j.concat(c);!e;){var k=[];k=k.concat(j),j=[];for(var g=0;g<b.length;g++){var h=b[g],l=b.indexOf(h);l>=0&&b.splice(l,1),h.getNeighborsList().forEach(function(a){if(0>c.indexOf(a)){var b=d.get(a)-1;1==b&&j.push(a),d.set(a,b)}})}c=c.concat(j),(1==b.length||2==b.length)&&(e=!0,f=b[0])}return f},m.prototype.setGraphManager=function(a){this.graphManager=a},a.exports=m},function(a,b,c){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=1e4*Math.sin(d.seed++),d.x-Math.floor(d.x)},a.exports=d},function(a,b,c){"use strict";var d=c(5);function e(a,b){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(a){this.lworldExtX=a},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(a){this.lworldExtY=a},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},e.prototype.transformX=function(a){var b=0,c=this.lworldExtX;return 0!=c&&(b=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/c),b},e.prototype.transformY=function(a){var b=0,c=this.lworldExtY;return 0!=c&&(b=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/c),b},e.prototype.inverseTransformX=function(a){var b=0,c=this.ldeviceExtX;return 0!=c&&(b=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/c),b},e.prototype.inverseTransformY=function(a){var b=0,c=this.ldeviceExtY;return 0!=c&&(b=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/c),b},e.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},a.exports=e},function(a,b,c){"use strict";var d=c(15),e=c(4),f=c(0),g=c(8),h=c(9);function i(){d.call(this),this.useSmartIdealEdgeLengthCalculation=e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=e.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=e.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=e.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*e.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=e.MAX_ITERATIONS}for(var j in i.prototype=Object.create(d.prototype),d)i[j]=d[j];i.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var a,b,c,d,g,h,i,j=this.getGraphManager().getAllEdges(),k=0;k<j.length;k++)b=(a=j[k]).idealLength,a.isInterGraph&&(d=a.getSource(),g=a.getTarget(),h=a.getSourceInLca().getEstimatedSize(),i=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=h+i-2*f.SIMPLE_NODE_SIZE),c=a.getLca().getInclusionTreeDepth(),a.idealLength+=b*e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*c))},i.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>e.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(a-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*e.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var a,b=this.getAllEdges(),c=0;c<b.length;c++)a=b[c],this.calcSpringForce(a,a.idealLength)},i.prototype.calcRepulsionForces=function(){var a,b,c,d,f,g=!(arguments.length>0)||void 0===arguments[0]||arguments[0],h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&g&&this.updateGrid(),f=new Set,a=0;a<i.length;a++)c=i[a],this.calculateRepulsionForceOfANode(c,f,g,h),f.add(c);else for(a=0;a<i.length;a++)for(c=i[a],b=a+1;b<i.length;b++)d=i[b],c.getOwner()==d.getOwner()&&this.calcRepulsionForce(c,d)},i.prototype.calcGravitationalForces=function(){for(var a,b=this.getAllNodesToApplyGravitation(),c=0;c<b.length;c++)a=b[c],this.calcGravitationalForce(a)},i.prototype.moveNodes=function(){for(var a=this.getAllNodes(),b=0;b<a.length;b++)a[b].move()},i.prototype.calcSpringForce=function(a,b){var c,d,e,f,g=a.getSource(),h=a.getTarget();if(this.uniformLeafNodeSizes&&null==g.getChild()&&null==h.getChild())a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;0!=(c=a.getLength())&&(e=(d=a.edgeElasticity*(c-b))*(a.lengthX/c),f=d*(a.lengthY/c),g.springForceX+=e,g.springForceY+=f,h.springForceX-=e,h.springForceY-=f)},i.prototype.calcRepulsionForce=function(a,b){var c,d,f,i,j,k,l,m=a.getRect(),n=b.getRect(),o=[,,],p=[,,,,];if(m.intersects(n)){g.calcSeparationAmount(m,n,o,e.DEFAULT_EDGE_LENGTH/2),k=2*o[0],l=2*o[1];var q=a.noOfChildren*b.noOfChildren/(a.noOfChildren+b.noOfChildren);a.repulsionForceX-=q*k,a.repulsionForceY-=q*l,b.repulsionForceX+=q*k,b.repulsionForceY+=q*l}else this.uniformLeafNodeSizes&&null==a.getChild()&&null==b.getChild()?(c=n.getCenterX()-m.getCenterX(),d=n.getCenterY()-m.getCenterY()):(g.getIntersection(m,n,p),c=p[2]-p[0],d=p[3]-p[1]),Math.abs(c)<e.MIN_REPULSION_DIST&&(c=h.sign(c)*e.MIN_REPULSION_DIST),Math.abs(d)<e.MIN_REPULSION_DIST&&(d=h.sign(d)*e.MIN_REPULSION_DIST),i=Math.sqrt(f=c*c+d*d),k=(j=(a.nodeRepulsion/2+b.nodeRepulsion/2)*a.noOfChildren*b.noOfChildren/f)*c/i,l=j*d/i,a.repulsionForceX-=k,a.repulsionForceY-=l,b.repulsionForceX+=k,b.repulsionForceY+=l},i.prototype.calcGravitationalForce=function(a){var b,c,d,e,f,g,h,i;c=((b=a.getOwner()).getRight()+b.getLeft())/2,d=(b.getTop()+b.getBottom())/2,e=a.getCenterX()-c,f=a.getCenterY()-d,g=Math.abs(e)+a.getWidth()/2,h=Math.abs(f)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(g>(i=b.getEstimatedSize()*this.gravityRangeFactor)||h>i)&&(a.gravitationForceX=-this.gravityConstant*e,a.gravitationForceY=-this.gravityConstant*f):(g>(i=b.getEstimatedSize()*this.compoundGravityRangeFactor)||h>i)&&(a.gravitationForceX=-this.gravityConstant*e*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*f*this.compoundGravityConstant)},i.prototype.isConverged=function(){var a,b=!1;return this.totalIterations>this.maxIterations/3&&(b=2>Math.abs(this.totalDisplacement-this.oldTotalDisplacement)),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||b},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,b=this.graphManager.getAllNodes(),c=0;c<b.length;c++)(a=b[c]).noOfChildren=a.getNoOfChildren()},i.prototype.calcGrid=function(a){var b=0,c=0;b=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),c=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var d=Array(b),e=0;e<b;e++)d[e]=Array(c);for(var e=0;e<b;e++)for(var f=0;f<c;f++)d[e][f]=[];return d},i.prototype.addNodeToGrid=function(a,b,c){var d=0,e=0,f=0,g=0;d=parseInt(Math.floor((a.getRect().x-b)/this.repulsionRange)),e=parseInt(Math.floor((a.getRect().width+a.getRect().x-b)/this.repulsionRange)),f=parseInt(Math.floor((a.getRect().y-c)/this.repulsionRange)),g=parseInt(Math.floor((a.getRect().height+a.getRect().y-c)/this.repulsionRange));for(var h=d;h<=e;h++)for(var i=f;i<=g;i++)this.grid[h][i].push(a),a.setGridCoordinates(d,e,f,g)},i.prototype.updateGrid=function(){var a,b,c=this.getAllNodes();for(a=0,this.grid=this.calcGrid(this.graphManager.getRoot());a<c.length;a++)b=c[a],this.addNodeToGrid(b,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(a,b,c,d){if(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&c||d){var f,g=new Set;a.surrounding=[];for(var h=this.grid,i=a.startX-1;i<a.finishX+2;i++)for(var j=a.startY-1;j<a.finishY+2;j++)if(!(i<0||j<0||i>=h.length||j>=h[0].length)){for(var k=0;k<h[i][j].length;k++)if(f=h[i][j][k],a.getOwner()==f.getOwner()&&a!=f&&!b.has(f)&&!g.has(f)){var l=Math.abs(a.getCenterX()-f.getCenterX())-(a.getWidth()/2+f.getWidth()/2),m=Math.abs(a.getCenterY()-f.getCenterY())-(a.getHeight()/2+f.getHeight()/2);l<=this.repulsionRange&&m<=this.repulsionRange&&g.add(f)}}a.surrounding=[].concat(function(a){if(!Array.isArray(a))return Array.from(a);for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}(g))}for(i=0;i<a.surrounding.length;i++)this.calcRepulsionForce(a,a.surrounding[i])},i.prototype.calcRepulsionRange=function(){return 0},a.exports=i},function(a,b,c){"use strict";var d=c(1),e=c(4);function f(a,b,c){d.call(this,a,b,c),this.idealLength=e.DEFAULT_EDGE_LENGTH,this.edgeElasticity=e.DEFAULT_SPRING_STRENGTH}for(var g in f.prototype=Object.create(d.prototype),d)f[g]=d[g];a.exports=f},function(a,b,c){"use strict";var d=c(3),e=c(4);function f(a,b,c,f){d.call(this,a,b,c,f),this.nodeRepulsion=e.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var g in f.prototype=Object.create(d.prototype),d)f[g]=d[g];f.prototype.setGridCoordinates=function(a,b,c,d){this.startX=a,this.finishX=b,this.startY=c,this.finishY=d},a.exports=f},function(a,b,c){"use strict";function d(a,b){this.width=0,this.height=0,null!==a&&null!==b&&(this.height=b,this.width=a)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(a){this.width=a},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(a){this.height=a},a.exports=d},function(a,b,c){"use strict";var d=c(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(a,b){var c=d.createID(a);this.contains(c)||(this.map[c]=b,this.keys.push(a))},e.prototype.contains=function(a){return d.createID(a),null!=this.map[a]},e.prototype.get=function(a){var b=d.createID(a);return this.map[b]},e.prototype.keySet=function(){return this.keys},a.exports=e},function(a,b,c){"use strict";var d=c(14);function e(){this.set={}}e.prototype.add=function(a){var b=d.createID(a);this.contains(b)||(this.set[b]=a)},e.prototype.remove=function(a){delete this.set[d.createID(a)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(a){return this.set[d.createID(a)]==a},e.prototype.isEmpty=function(){return 0===this.size()},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(a){for(var b=Object.keys(this.set),c=b.length,d=0;d<c;d++)a.push(this.set[b[d]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(a){for(var b=a.length,c=0;c<b;c++){var d=a[c];this.add(d)}},a.exports=e},function(a,b,c){"use strict";function d(){}d.multMat=function(a,b){for(var c=[],d=0;d<a.length;d++){c[d]=[];for(var e=0;e<b[0].length;e++){c[d][e]=0;for(var f=0;f<a[0].length;f++)c[d][e]+=a[d][f]*b[f][e]}}return c},d.transpose=function(a){for(var b=[],c=0;c<a[0].length;c++){b[c]=[];for(var d=0;d<a.length;d++)b[c][d]=a[d][c]}return b},d.multCons=function(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=a[d]*b;return c},d.minusOp=function(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=a[d]-b[d];return c},d.dotProduct=function(a,b){for(var c=0,d=0;d<a.length;d++)c+=a[d]*b[d];return c},d.mag=function(a){return Math.sqrt(this.dotProduct(a,a))},d.normalize=function(a){for(var b=[],c=this.mag(a),d=0;d<a.length;d++)b[d]=a[d]/c;return b},d.multGamma=function(a){for(var b=[],c=0,d=0;d<a.length;d++)c+=a[d];c*=-1/a.length;for(var e=0;e<a.length;e++)b[e]=c+a[e];return b},d.multL=function(a,b,c){for(var d=[],e=[],f=[],g=0;g<b[0].length;g++){for(var h=0,i=0;i<b.length;i++)h+=-.5*b[i][g]*a[i];e[g]=h}for(var j=0;j<c.length;j++){for(var k=0,l=0;l<c.length;l++)k+=c[j][l]*e[l];f[j]=k}for(var m=0;m<b.length;m++){for(var n=0,o=0;o<b[0].length;o++)n+=b[m][o]*f[o];d[m]=n}return d},a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=c(11);a.exports=function(){function a(b,c){if(!(this instanceof a))throw TypeError("Cannot call a class as a function");(null!==c||void 0!==c)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;d=b instanceof e?b.size():b.length,this._quicksort(b,0,d-1)}return d(a,[{key:"_quicksort",value:function(a,b,c){if(b<c){var d=this._partition(a,b,c);this._quicksort(a,b,d),this._quicksort(a,d+1,c)}}},{key:"_partition",value:function(a,b,c){for(var d=this._get(a,b),e=b,f=c;;){for(;this.compareFunction(d,this._get(a,f));)f--;for(;this.compareFunction(this._get(a,e),d);)e++;if(!(e<f))return f;this._swap(a,e,f),e++,f--}}},{key:"_get",value:function(a,b){return a instanceof e?a.get_object_at(b):a[b]}},{key:"_set",value:function(a,b,c){a instanceof e?a.set_object_at(b,c):a[b]=c}},{key:"_swap",value:function(a,b,c){var d=this._get(a,b);this._set(a,b,this._get(a,c)),this._set(a,c,d)}},{key:"_defaultCompareFunction",value:function(a,b){return b>a}}]),a}()},function(a,b,c){"use strict";function d(){}d.svd=function(a){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=a.length,this.n=a[0].length;var b=Math.min(this.m,this.n);this.s=function(a){for(var b=[];a-- >0;)b.push(0);return b}(Math.min(this.m+1,this.n)),this.U=function a(b){if(0==b.length)return 0;for(var c=[],d=0;d<b[0];d++)c.push(a(b.slice(1)));return c}([this.m,b]),this.V=function a(b){if(0==b.length)return 0;for(var c=[],d=0;d<b[0];d++)c.push(a(b.slice(1)));return c}([this.n,this.n]);for(var c=function(a){for(var b=[];a-- >0;)b.push(0);return b}(this.n),e=function(a){for(var b=[];a-- >0;)b.push(0);return b}(this.m),f=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),h=0;h<Math.max(f,g);h++){if(h<f){this.s[h]=0;for(var i=h;i<this.m;i++)this.s[h]=d.hypot(this.s[h],a[i][h]);if(0!==this.s[h]){a[h][h]<0&&(this.s[h]=-this.s[h]);for(var j=h;j<this.m;j++)a[j][h]/=this.s[h];a[h][h]+=1}this.s[h]=-this.s[h]}for(var k=h+1;k<this.n;k++){if(p=h<f,q=0!==this.s[h],p&&q){for(var l=0,m=h;m<this.m;m++)l+=a[m][h]*a[m][k];l=-l/a[h][h];for(var n=h;n<this.m;n++)a[n][k]+=l*a[n][h]}c[k]=a[h][k]}if(r=h<f)for(var o=h;o<this.m;o++)this.U[o][h]=a[o][h];if(h<g){c[h]=0;for(var p,q,r,s,t,u=h+1;u<this.n;u++)c[h]=d.hypot(c[h],c[u]);if(0!==c[h]){c[h+1]<0&&(c[h]=-c[h]);for(var v=h+1;v<this.n;v++)c[v]/=c[h];c[h+1]+=1}if(c[h]=-c[h],s=h+1<this.m,t=0!==c[h],s&&t){for(var w=h+1;w<this.m;w++)e[w]=0;for(var x=h+1;x<this.n;x++)for(var y=h+1;y<this.m;y++)e[y]+=c[x]*a[y][x];for(var z=h+1;z<this.n;z++)for(var A=-c[z]/c[h+1],B=h+1;B<this.m;B++)a[B][z]+=A*e[B]}for(var C=h+1;C<this.n;C++)this.V[C][h]=c[C]}}var D=Math.min(this.n,this.m+1);f<this.n&&(this.s[f]=a[f][f]),this.m<D&&(this.s[D-1]=0),g+1<D&&(c[g]=a[g][D-1]),c[D-1]=0;for(var E=f;E<b;E++){for(var F=0;F<this.m;F++)this.U[F][E]=0;this.U[E][E]=1}for(var G=f-1;G>=0;G--)if(0!==this.s[G]){for(var H=G+1;H<b;H++){for(var I=0,J=G;J<this.m;J++)I+=this.U[J][G]*this.U[J][H];I=-I/this.U[G][G];for(var K=G;K<this.m;K++)this.U[K][H]+=I*this.U[K][G]}for(var L=G;L<this.m;L++)this.U[L][G]=-this.U[L][G];this.U[G][G]=1+this.U[G][G];for(var M=0;M<G-1;M++)this.U[M][G]=0}else{for(var N=0;N<this.m;N++)this.U[N][G]=0;this.U[G][G]=1}for(var O=this.n-1;O>=0;O--){if(ak=O<g,al=0!==c[O],ak&&al)for(var P=O+1;P<b;P++){for(var Q=0,R=O+1;R<this.n;R++)Q+=this.V[R][O]*this.V[R][P];Q=-Q/this.V[O+1][O];for(var S=O+1;S<this.n;S++)this.V[S][P]+=Q*this.V[S][O]}for(var T=0;T<this.n;T++)this.V[T][O]=0;this.V[O][O]=1}for(var U=D-1,V=0;D>0;){var W=void 0,X=void 0;for(W=D-2;W>=-1&&-1!==W;W--)if(Math.abs(c[W])<=16033346880071782e-307+2220446049250313e-31*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){c[W]=0;break}if(W===D-2)X=4;else{var Y=void 0;for(Y=D-1;Y>=W&&Y!==W;Y--){var Z=(Y!==D?Math.abs(c[Y]):0)+(Y!==W+1?Math.abs(c[Y-1]):0);if(Math.abs(this.s[Y])<=16033346880071782e-307+2220446049250313e-31*Z){this.s[Y]=0;break}}Y===W?X=3:Y===D-1?X=1:(X=2,W=Y)}switch(W++,X){case 1:var $=c[D-2];c[D-2]=0;for(var _=D-2;_>=W;_--){var aa=d.hypot(this.s[_],$),ab=this.s[_]/aa,ac=$/aa;this.s[_]=aa,_!==W&&($=-ac*c[_-1],c[_-1]=ab*c[_-1]);for(var ad=0;ad<this.n;ad++)aa=ab*this.V[ad][_]+ac*this.V[ad][D-1],this.V[ad][D-1]=-ac*this.V[ad][_]+ab*this.V[ad][D-1],this.V[ad][_]=aa}break;case 2:var ae=c[W-1];c[W-1]=0;for(var af=W;af<D;af++){var ag=d.hypot(this.s[af],ae),ah=this.s[af]/ag,ai=ae/ag;this.s[af]=ag,ae=-ai*c[af],c[af]=ah*c[af];for(var aj=0;aj<this.m;aj++)ag=ah*this.U[aj][af]+ai*this.U[aj][W-1],this.U[aj][W-1]=-ai*this.U[aj][af]+ah*this.U[aj][W-1],this.U[aj][af]=ag}break;case 3:var ak,al,am,an,ao=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[D-1]),Math.abs(this.s[D-2])),Math.abs(c[D-2])),Math.abs(this.s[W])),Math.abs(c[W])),ap=this.s[D-1]/ao,aq=this.s[D-2]/ao,ar=c[D-2]/ao,as=this.s[W]/ao,at=c[W]/ao,au=((aq+ap)*(aq-ap)+ar*ar)/2,av=ap*ar*(ap*ar),aw=0;am=0!==au,an=0!==av,(am||an)&&(aw=Math.sqrt(au*au+av),au<0&&(aw=-aw),aw=av/(au+aw));for(var ax=(as+ap)*(as-ap)+aw,ay=as*at,az=W;az<D-1;az++){var aA=d.hypot(ax,ay),aB=ax/aA,aC=ay/aA;az!==W&&(c[az-1]=aA),ax=aB*this.s[az]+aC*c[az],c[az]=aB*c[az]-aC*this.s[az],ay=aC*this.s[az+1],this.s[az+1]=aB*this.s[az+1];for(var aD=0;aD<this.n;aD++)aA=aB*this.V[aD][az]+aC*this.V[aD][az+1],this.V[aD][az+1]=-aC*this.V[aD][az]+aB*this.V[aD][az+1],this.V[aD][az]=aA;if(aA=d.hypot(ax,ay),aB=ax/aA,aC=ay/aA,this.s[az]=aA,ax=aB*c[az]+aC*this.s[az+1],this.s[az+1]=-aC*c[az]+aB*this.s[az+1],ay=aC*c[az+1],c[az+1]=aB*c[az+1],az<this.m-1)for(var aE=0;aE<this.m;aE++)aA=aB*this.U[aE][az]+aC*this.U[aE][az+1],this.U[aE][az+1]=-aC*this.U[aE][az]+aB*this.U[aE][az+1],this.U[aE][az]=aA}c[D-2]=ax;break;case 4:if(this.s[W]<=0&&(this.s[W]=this.s[W]<0?-this.s[W]:0,1))for(var aF=0;aF<=U;aF++)this.V[aF][W]=-this.V[aF][W];for(;W<U&&!(this.s[W]>=this.s[W+1]);){var aG=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=aG,W<this.n-1)for(var aH=0;aH<this.n;aH++)aG=this.V[aH][W+1],this.V[aH][W+1]=this.V[aH][W],this.V[aH][W]=aG;if(W<this.m-1)for(var aI=0;aI<this.m;aI++)aG=this.U[aI][W+1],this.U[aI][W+1]=this.U[aI][W],this.U[aI][W]=aG;W++}D--}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(a,b){var c=void 0;return Math.abs(a)>Math.abs(b)?(c=b/a,c=Math.abs(a)*Math.sqrt(1+c*c)):0!=b?(c=a/b,c=Math.abs(b)*Math.sqrt(1+c*c)):c=0,c},a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();a.exports=function(){function a(b,c){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.sequence1=b,this.sequence2=c,this.match_score=d,this.mismatch_penalty=e,this.gap_penalty=f,this.iMax=b.length+1,this.jMax=c.length+1,this.grid=Array(this.iMax);for(var g=0;g<this.iMax;g++){this.grid[g]=Array(this.jMax);for(var h=0;h<this.jMax;h++)this.grid[g][h]=0}this.tracebackGrid=Array(this.iMax);for(var i=0;i<this.iMax;i++){this.tracebackGrid[i]=Array(this.jMax);for(var j=0;j<this.jMax;j++)this.tracebackGrid[i][j]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var a=1;a<this.jMax;a++)this.grid[0][a]=this.grid[0][a-1]+this.gap_penalty,this.tracebackGrid[0][a]=[!1,!1,!0];for(var b=1;b<this.iMax;b++)this.grid[b][0]=this.grid[b-1][0]+this.gap_penalty,this.tracebackGrid[b][0]=[!1,!0,!1];for(var c=1;c<this.iMax;c++)for(var d=1;d<this.jMax;d++){var e=[this.sequence1[c-1]===this.sequence2[d-1]?this.grid[c-1][d-1]+this.match_score:this.grid[c-1][d-1]+this.mismatch_penalty,this.grid[c-1][d]+this.gap_penalty,this.grid[c][d-1]+this.gap_penalty],f=this.arrayAllMaxIndexes(e);this.grid[c][d]=e[f[0]],this.tracebackGrid[c][d]=[f.includes(0),f.includes(1),f.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var a=[];for(a.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});a[0];){var b=a[0],c=this.tracebackGrid[b.pos[0]][b.pos[1]];c[0]&&a.push({pos:[b.pos[0]-1,b.pos[1]-1],seq1:this.sequence1[b.pos[0]-1]+b.seq1,seq2:this.sequence2[b.pos[1]-1]+b.seq2}),c[1]&&a.push({pos:[b.pos[0]-1,b.pos[1]],seq1:this.sequence1[b.pos[0]-1]+b.seq1,seq2:"-"+b.seq2}),c[2]&&a.push({pos:[b.pos[0],b.pos[1]-1],seq1:"-"+b.seq1,seq2:this.sequence2[b.pos[1]-1]+b.seq2}),0===b.pos[0]&&0===b.pos[1]&&this.alignments.push({sequence1:b.seq1,sequence2:b.seq2}),a.shift()}return this.alignments}},{key:"getAllIndexes",value:function(a,b){for(var c=[],d=-1;-1!==(d=a.indexOf(b,d+1));)c.push(d);return c}},{key:"arrayAllMaxIndexes",value:function(a){return this.getAllIndexes(a,Math.max.apply(null,a))}}]),a}()},function(a,b,c){"use strict";var d=function(){};d.FDLayout=c(18),d.FDLayoutConstants=c(4),d.FDLayoutEdge=c(19),d.FDLayoutNode=c(20),d.DimensionD=c(21),d.HashMap=c(22),d.HashSet=c(23),d.IGeometry=c(8),d.IMath=c(9),d.Integer=c(10),d.Point=c(12),d.PointD=c(5),d.RandomSeed=c(16),d.RectangleD=c(13),d.Transform=c(17),d.UniqueIDGeneretor=c(14),d.Quicksort=c(25),d.LinkedList=c(11),d.LGraphObject=c(2),d.LGraph=c(6),d.LEdge=c(1),d.LGraphManager=c(7),d.LNode=c(3),d.Layout=c(15),d.LayoutConstants=c(0),d.NeedlemanWunsch=c(27),d.Matrix=c(24),d.SVD=c(26),a.exports=d},function(a,b,c){"use strict";function d(){this.listeners=[]}var e=d.prototype;e.addListener=function(a,b){this.listeners.push({event:a,callback:b})},e.removeListener=function(a,b){for(var c=this.listeners.length;c>=0;c--){var d=this.listeners[c];d.event===a&&d.callback===b&&this.listeners.splice(c,1)}},e.emit=function(a,b){for(var c=0;c<this.listeners.length;c++){var d=this.listeners[c];a===d.event&&d.callback(b)}},a.exports=d}],b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.i=function(a){return a},c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{configurable:!1,enumerable:!0,get:d})},c.n=function(a){var b=a&&a.__esModule?function(){return a.default}:function(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="",c(c.s=28)}()},97881:function(a,b,c){var d;d=c(81346),a.exports=(()=>{"use strict";var a={45:(a,b,c)=>{var d={};d.layoutBase=c(551),d.CoSEConstants=c(806),d.CoSEEdge=c(767),d.CoSEGraph=c(880),d.CoSEGraphManager=c(578),d.CoSELayout=c(765),d.CoSENode=c(991),d.ConstraintHandler=c(902),a.exports=d},806:(a,b,c)=>{var d=c(551).FDLayoutConstants;function e(){}for(var f in d)e[f]=d[f];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e},767:(a,b,c)=>{var d=c(551).FDLayoutEdge;function e(a,b,c){d.call(this,a,b,c)}for(var f in e.prototype=Object.create(d.prototype),d)e[f]=d[f];a.exports=e},880:(a,b,c)=>{var d=c(551).LGraph;function e(a,b,c){d.call(this,a,b,c)}for(var f in e.prototype=Object.create(d.prototype),d)e[f]=d[f];a.exports=e},578:(a,b,c)=>{var d=c(551).LGraphManager;function e(a){d.call(this,a)}for(var f in e.prototype=Object.create(d.prototype),d)e[f]=d[f];a.exports=e},765:(a,b,c)=>{var d=c(551).FDLayout,e=c(578),f=c(880),g=c(991),h=c(767),i=c(806),j=c(902),k=c(551).FDLayoutConstants,l=c(551).LayoutConstants,m=c(551).Point,n=c(551).PointD,o=c(551).DimensionD,p=c(551).Layout,q=c(551).Integer,r=c(551).IGeometry,s=c(551).LGraph,t=c(551).Transform,u=c(551).LinkedList;function v(){d.call(this),this.toBeTiled={},this.constraints={}}for(var w in v.prototype=Object.create(d.prototype),d)v[w]=d[w];v.prototype.newGraphManager=function(){var a=new e(this);return this.graphManager=a,a},v.prototype.newGraph=function(a){return new f(null,this.graphManager,a)},v.prototype.newNode=function(a){return new g(this.graphManager,a)},v.prototype.newEdge=function(a){return new h(null,null,a)},v.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=k.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=k.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=k.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},v.prototype.initSpringEmbedder=function(){d.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/k.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},v.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(i.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),b=this.nodesWithGravity.filter(function(b){return a.has(b)});this.graphManager.setAllNodesToApplyGravitation(b)}}else{var c=this.getFlatForest();if(c.length>0)this.positionNodesRadially(c);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),b=this.nodesWithGravity.filter(function(b){return a.has(b)});this.graphManager.setAllNodesToApplyGravitation(b),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(j.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),i.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;if(this.totalIterations%k.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 a=new Set(this.getAllNodes()),b=this.nodesWithGravity.filter(function(b){return a.has(b)});this.graphManager.setAllNodesToApplyGravitation(b),this.graphManager.updateBounds(),this.updateGrid(),i.PURE_INCREMENTAL?this.coolingFactor=k.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=k.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()),i.PURE_INCREMENTAL?this.coolingFactor=k.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=k.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,d=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,d),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),b={},c=0;c<a.length;c++){var d=a[c].rect,e=a[c].id;b[e]={id:e,x:d.getCenterX(),y:d.getCenterY(),w:d.width,h:d.height}}return b},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if("during"===k.ANIMATE)this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},v.prototype.moveNodes=function(){for(var a,b=this.getAllNodes(),c=0;c<b.length;c++)b[c].calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var c=0;c<b.length;c++)b[c].move()},v.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var b=this.graphManager.getAllNodes(),c=0;c<b.length;c++){var d=b[c];this.idToNodeMap.set(d.id,d)}if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(b){a.fixedNodeSet.add(b.nodeId)});for(var d,b=this.graphManager.getAllNodes(),c=0;c<b.length;c++)if(null!=(d=b[c]).getChild()){var e=function b(c){for(var d,e=c.getChild().getNodes(),f=0,g=0;g<e.length;g++)null==(d=e[g]).getChild()?a.fixedNodeSet.has(d.id)&&(f+=100):f+=b(d);return f}(d);e>0&&(d.fixedNodeWeight=e)}}if(this.constraints.relativePlacementConstraint){var f=new Map,g=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(b){a.fixedNodesOnHorizontal.add(b),a.fixedNodesOnVertical.add(b)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var h=this.constraints.alignmentConstraint.vertical,c=0;c<h.length;c++)this.dummyToNodeForVerticalAlignment.set("dummy"+c,[]),h[c].forEach(function(b){f.set(b,"dummy"+c),a.dummyToNodeForVerticalAlignment.get("dummy"+c).push(b),a.fixedNodeSet.has(b)&&a.fixedNodesOnHorizontal.add("dummy"+c)});if(this.constraints.alignmentConstraint.horizontal)for(var j=this.constraints.alignmentConstraint.horizontal,c=0;c<j.length;c++)this.dummyToNodeForHorizontalAlignment.set("dummy"+c,[]),j[c].forEach(function(b){g.set(b,"dummy"+c),a.dummyToNodeForHorizontalAlignment.get("dummy"+c).push(b),a.fixedNodeSet.has(b)&&a.fixedNodesOnVertical.add("dummy"+c)})}if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(a){var b,c,d;for(d=a.length-1;d>=2*a.length/3;d--)b=Math.floor(Math.random()*(d+1)),c=a[d],a[d]=a[b],a[b]=c;return a},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(b){if(b.left){var c=f.has(b.left)?f.get(b.left):b.left,d=f.has(b.right)?f.get(b.right):b.right;a.nodesInRelativeHorizontal.includes(c)||(a.nodesInRelativeHorizontal.push(c),a.nodeToRelativeConstraintMapHorizontal.set(c,[]),a.dummyToNodeForVerticalAlignment.has(c)?a.nodeToTempPositionMapHorizontal.set(c,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(c)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(c,a.idToNodeMap.get(c).getCenterX())),a.nodesInRelativeHorizontal.includes(d)||(a.nodesInRelativeHorizontal.push(d),a.nodeToRelativeConstraintMapHorizontal.set(d,[]),a.dummyToNodeForVerticalAlignment.has(d)?a.nodeToTempPositionMapHorizontal.set(d,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(d)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(d,a.idToNodeMap.get(d).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(c).push({right:d,gap:b.gap}),a.nodeToRelativeConstraintMapHorizontal.get(d).push({left:c,gap:b.gap})}else{var e=g.has(b.top)?g.get(b.top):b.top,h=g.has(b.bottom)?g.get(b.bottom):b.bottom;a.nodesInRelativeVertical.includes(e)||(a.nodesInRelativeVertical.push(e),a.nodeToRelativeConstraintMapVertical.set(e,[]),a.dummyToNodeForHorizontalAlignment.has(e)?a.nodeToTempPositionMapVertical.set(e,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(e,a.idToNodeMap.get(e).getCenterY())),a.nodesInRelativeVertical.includes(h)||(a.nodesInRelativeVertical.push(h),a.nodeToRelativeConstraintMapVertical.set(h,[]),a.dummyToNodeForHorizontalAlignment.has(h)?a.nodeToTempPositionMapVertical.set(h,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(h)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(h,a.idToNodeMap.get(h).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(e).push({bottom:h,gap:b.gap}),a.nodeToRelativeConstraintMapVertical.get(h).push({top:e,gap:b.gap})}});else{var k=new Map,l=new Map;this.constraints.relativePlacementConstraint.forEach(function(a){if(a.left){var b=f.has(a.left)?f.get(a.left):a.left,c=f.has(a.right)?f.get(a.right):a.right;k.has(b)?k.get(b).push(c):k.set(b,[c]),k.has(c)?k.get(c).push(b):k.set(c,[b])}else{var d=g.has(a.top)?g.get(a.top):a.top,e=g.has(a.bottom)?g.get(a.bottom):a.bottom;l.has(d)?l.get(d).push(e):l.set(d,[e]),l.has(e)?l.get(e).push(d):l.set(e,[d])}});var m=function(a,b){var c=[],d=[],e=new u,f=new Set,g=0;return a.forEach(function(h,i){if(!f.has(i)){c[g]=[],d[g]=!1;var j=i;for(e.push(j),f.add(j),c[g].push(j);0!=e.length;)j=e.shift(),b.has(j)&&(d[g]=!0),a.get(j).forEach(function(a){f.has(a)||(e.push(a),f.add(a),c[g].push(a))});g++}}),{components:c,isFixed:d}},n=m(k,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=n.components,this.fixedComponentsOnHorizontal=n.isFixed;var o=m(l,a.fixedNodesOnVertical);this.componentsOnVertical=o.components,this.fixedComponentsOnVertical=o.isFixed}}},v.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(b){var c=a.idToNodeMap.get(b.nodeId);c.displacementX=0,c.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var b=this.constraints.alignmentConstraint.vertical,c=0;c<b.length;c++){for(var d=0,e=0;e<b[c].length;e++){if(this.fixedNodeSet.has(b[c][e])){d=0;break}d+=this.idToNodeMap.get(b[c][e]).displacementX}for(var f=d/b[c].length,e=0;e<b[c].length;e++)this.idToNodeMap.get(b[c][e]).displacementX=f}if(this.constraints.alignmentConstraint.horizontal)for(var g=this.constraints.alignmentConstraint.horizontal,c=0;c<g.length;c++){for(var h=0,e=0;e<g[c].length;e++){if(this.fixedNodeSet.has(g[c][e])){h=0;break}h+=this.idToNodeMap.get(g[c][e]).displacementY}for(var j=h/g[c].length,e=0;e<g[c].length;e++)this.idToNodeMap.get(g[c][e]).displacementY=j}}if(this.constraints.relativePlacementConstraint)if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(b){if(!a.fixedNodesOnHorizontal.has(b)){var c=0;c=a.dummyToNodeForVerticalAlignment.has(b)?a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(b)[0]).displacementX:a.idToNodeMap.get(b).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(b).forEach(function(d){if(d.right){var e=a.nodeToTempPositionMapHorizontal.get(d.right)-a.nodeToTempPositionMapHorizontal.get(b)-c;e<d.gap&&(c-=d.gap-e)}else{var e=a.nodeToTempPositionMapHorizontal.get(b)-a.nodeToTempPositionMapHorizontal.get(d.left)+c;e<d.gap&&(c+=d.gap-e)}}),a.nodeToTempPositionMapHorizontal.set(b,a.nodeToTempPositionMapHorizontal.get(b)+c),a.dummyToNodeForVerticalAlignment.has(b)?a.dummyToNodeForVerticalAlignment.get(b).forEach(function(b){a.idToNodeMap.get(b).displacementX=c}):a.idToNodeMap.get(b).displacementX=c}}),this.nodesInRelativeVertical.forEach(function(b){if(!a.fixedNodesOnHorizontal.has(b)){var c=0;c=a.dummyToNodeForHorizontalAlignment.has(b)?a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(b)[0]).displacementY:a.idToNodeMap.get(b).displacementY,a.nodeToRelativeConstraintMapVertical.get(b).forEach(function(d){if(d.bottom){var e=a.nodeToTempPositionMapVertical.get(d.bottom)-a.nodeToTempPositionMapVertical.get(b)-c;e<d.gap&&(c-=d.gap-e)}else{var e=a.nodeToTempPositionMapVertical.get(b)-a.nodeToTempPositionMapVertical.get(d.top)+c;e<d.gap&&(c+=d.gap-e)}}),a.nodeToTempPositionMapVertical.set(b,a.nodeToTempPositionMapVertical.get(b)+c),a.dummyToNodeForHorizontalAlignment.has(b)?a.dummyToNodeForHorizontalAlignment.get(b).forEach(function(b){a.idToNodeMap.get(b).displacementY=c}):a.idToNodeMap.get(b).displacementY=c}});else{for(var c=0;c<this.componentsOnHorizontal.length;c++){var k=this.componentsOnHorizontal[c];if(this.fixedComponentsOnHorizontal[c])for(var e=0;e<k.length;e++)this.dummyToNodeForVerticalAlignment.has(k[e])?this.dummyToNodeForVerticalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementX=0}):this.idToNodeMap.get(k[e]).displacementX=0;else{for(var l=0,m=0,e=0;e<k.length;e++)if(this.dummyToNodeForVerticalAlignment.has(k[e])){var n=this.dummyToNodeForVerticalAlignment.get(k[e]);l+=n.length*this.idToNodeMap.get(n[0]).displacementX,m+=n.length}else l+=this.idToNodeMap.get(k[e]).displacementX,m++;for(var o=l/m,e=0;e<k.length;e++)this.dummyToNodeForVerticalAlignment.has(k[e])?this.dummyToNodeForVerticalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementX=o}):this.idToNodeMap.get(k[e]).displacementX=o}}for(var c=0;c<this.componentsOnVertical.length;c++){var k=this.componentsOnVertical[c];if(this.fixedComponentsOnVertical[c])for(var e=0;e<k.length;e++)this.dummyToNodeForHorizontalAlignment.has(k[e])?this.dummyToNodeForHorizontalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementY=0}):this.idToNodeMap.get(k[e]).displacementY=0;else{for(var l=0,m=0,e=0;e<k.length;e++)if(this.dummyToNodeForHorizontalAlignment.has(k[e])){var n=this.dummyToNodeForHorizontalAlignment.get(k[e]);l+=n.length*this.idToNodeMap.get(n[0]).displacementY,m+=n.length}else l+=this.idToNodeMap.get(k[e]).displacementY,m++;for(var o=l/m,e=0;e<k.length;e++)this.dummyToNodeForHorizontalAlignment.has(k[e])?this.dummyToNodeForHorizontalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementY=o}):this.idToNodeMap.get(k[e]).displacementY=o}}}},v.prototype.calculateNodesToApplyGravitationTo=function(){var a,b,c=[],d=this.graphManager.getGraphs(),e=d.length;for(b=0;b<e;b++)(a=d[b]).updateConnected(),a.isConnected||(c=c.concat(a.getNodes()));return c},v.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var b=new Set;for(f=0;f<a.length;f++){var c=a[f];if(!b.has(c)){var d=c.getSource(),e=c.getTarget();if(d==e)c.getBendpoints().push(new n),c.getBendpoints().push(new n),this.createDummyNodesForBendpoints(c),b.add(c);else{var f,g,h=[];if(h=(h=h.concat(d.getEdgeListToNode(e))).concat(e.getEdgeListToNode(d)),!b.has(h[0])){if(h.length>1)for(g=0;g<h.length;g++){var i=h[g];i.getBendpoints().push(new n),this.createDummyNodesForBendpoints(i)}h.forEach(function(a){b.add(a)})}}}if(b.size==a.length)break}},v.prototype.positionNodesRadially=function(a){for(var b=new m(0,0),c=Math.ceil(Math.sqrt(a.length)),d=0,e=0,f=0,g=new n(0,0),h=0;h<a.length;h++){h%c==0&&(f=0,e=d,0!=h&&(e+=i.DEFAULT_COMPONENT_SEPERATION),d=0);var j=a[h],k=p.findCenterOfTree(j);b.x=f,b.y=e,(g=v.radialLayout(j,k,b)).y>d&&(d=Math.floor(g.y)),f=Math.floor(g.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new n(l.WORLD_CENTER_X-g.x/2,l.WORLD_CENTER_Y-g.y/2))},v.radialLayout=function(a,b,c){var d=Math.max(this.maxDiagonalInTree(a),i.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(b,null,0,359,0,d);var e=s.calculateBounds(a),f=new t;f.setDeviceOrgX(e.getMinX()),f.setDeviceOrgY(e.getMinY()),f.setWorldOrgX(c.x),f.setWorldOrgY(c.y);for(var g=0;g<a.length;g++)a[g].transform(f);var h=new n(e.getMaxX(),e.getMaxY());return f.inverseTransformPoint(h)},v.branchRadialLayout=function(a,b,c,d,e,f){var g,h=(d-c+1)/2;h<0&&(h+=180);var i=(h+c)%360*r.TWO_PI/360,j=e*Math.cos(i),k=e*Math.sin(i);a.setCenter(j,k);var l=[],m=(l=l.concat(a.getEdges())).length;null!=b&&m--;for(var n=0,o=l.length,p=a.getEdgesBetween(b);p.length>1;){var q=p[0];p.splice(0,1);var s=l.indexOf(q);s>=0&&l.splice(s,1),o--,m--}g=null!=b?(l.indexOf(p[0])+1)%o:0;for(var t=Math.abs(d-c)/m,u=g;n!=m;u=++u%o){var w=l[u].getOtherEnd(a);if(w!=b){var x=(c+n*t)%360,y=(x+t)%360;v.branchRadialLayout(w,a,x,y,e+f,f),n++}}},v.maxDiagonalInTree=function(a){for(var b=q.MIN_VALUE,c=0;c<a.length;c++){var d=a[c].getDiagonal();d>b&&(b=d)}return b},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var a=this,b={};this.memberGroups={},this.idToDummyNode={};for(var c=[],d=this.graphManager.getAllNodes(),e=0;e<d.length;e++){var f=d[e],h=f.getParent();0!==this.getNodeDegreeWithChildren(f)||void 0!=h.id&&this.getToBeTiled(h)||c.push(f)}for(var e=0;e<c.length;e++){var f=c[e],i=f.getParent().id;void 0===b[i]&&(b[i]=[]),b[i]=b[i].concat(f)}Object.keys(b).forEach(function(c){if(b[c].length>1){var d="DummyCompound_"+c;a.memberGroups[d]=b[c];var e=b[c][0].getParent(),f=new g(a.graphManager);f.id=d,f.paddingLeft=e.paddingLeft||0,f.paddingRight=e.paddingRight||0,f.paddingBottom=e.paddingBottom||0,f.paddingTop=e.paddingTop||0,a.idToDummyNode[d]=f;var h=a.getGraphManager().add(a.newGraph(),f),i=e.getChild();i.add(f);for(var j=0;j<b[c].length;j++){var k=b[c][j];i.remove(k),h.add(k)}}})},v.prototype.clearCompounds=function(){var a={},b={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)b[this.compoundOrder[c].id]=this.compoundOrder[c],a[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,b)},v.prototype.clearZeroDegreeMembers=function(){var a=this,b=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var d=a.idToDummyNode[c];if(b[c]=a.tileNodes(a.memberGroups[c],d.paddingLeft+d.paddingRight),d.rect.width=b[c].width,d.rect.height=b[c].height,d.setCenter(b[c].centerX,b[c].centerY),d.labelMarginLeft=0,d.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var e=d.rect.width,f=d.rect.height;d.labelWidth&&("left"==d.labelPosHorizontal?(d.rect.x-=d.labelWidth,d.setWidth(e+d.labelWidth),d.labelMarginLeft=d.labelWidth):"center"==d.labelPosHorizontal&&d.labelWidth>e?(d.rect.x-=(d.labelWidth-e)/2,d.setWidth(d.labelWidth),d.labelMarginLeft=(d.labelWidth-e)/2):"right"==d.labelPosHorizontal&&d.setWidth(e+d.labelWidth)),d.labelHeight&&("top"==d.labelPosVertical?(d.rect.y-=d.labelHeight,d.setHeight(f+d.labelHeight),d.labelMarginTop=d.labelHeight):"center"==d.labelPosVertical&&d.labelHeight>f?(d.rect.y-=(d.labelHeight-f)/2,d.setHeight(d.labelHeight),d.labelMarginTop=(d.labelHeight-f)/2):"bottom"==d.labelPosVertical&&d.setHeight(f+d.labelHeight))}})},v.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var b=this.compoundOrder[a],c=b.id,d=b.paddingLeft,e=b.paddingTop,f=b.labelMarginLeft,g=b.labelMarginTop;this.adjustLocations(this.tiledMemberPack[c],b.rect.x,b.rect.y,d,e,f,g)}},v.prototype.repopulateZeroDegreeMembers=function(){var a=this,b=this.tiledZeroDegreePack;Object.keys(b).forEach(function(c){var d=a.idToDummyNode[c],e=d.paddingLeft,f=d.paddingTop,g=d.labelMarginLeft,h=d.labelMarginTop;a.adjustLocations(b[c],d.rect.x,d.rect.y,e,f,g,h)})},v.prototype.getToBeTiled=function(a){var b=a.id;if(null!=this.toBeTiled[b])return this.toBeTiled[b];var c=a.getChild();if(null==c)return this.toBeTiled[b]=!1,!1;for(var d=c.getNodes(),e=0;e<d.length;e++){var f=d[e];if(this.getNodeDegree(f)>0)return this.toBeTiled[b]=!1,!1;if(null==f.getChild()){this.toBeTiled[f.id]=!1;continue}if(!this.getToBeTiled(f))return this.toBeTiled[b]=!1,!1}return this.toBeTiled[b]=!0,!0},v.prototype.getNodeDegree=function(a){a.id;for(var b=a.getEdges(),c=0,d=0;d<b.length;d++){var e=b[d];e.getSource().id!==e.getTarget().id&&(c+=1)}return c},v.prototype.getNodeDegreeWithChildren=function(a){var b=this.getNodeDegree(a);if(null==a.getChild())return b;for(var c=a.getChild().getNodes(),d=0;d<c.length;d++){var e=c[d];b+=this.getNodeDegreeWithChildren(e)}return b},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(a){for(var b=0;b<a.length;b++){var c=a[b];null!=c.getChild()&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},v.prototype.adjustLocations=function(a,b,c,d,e,f,g){b+=d+f,c+=e+g;for(var h=b,i=0;i<a.rows.length;i++){var j=a.rows[i];b=h;for(var k=0,l=0;l<j.length;l++){var m=j[l];m.rect.x=b,m.rect.y=c,b+=m.rect.width+a.horizontalPadding,m.rect.height>k&&(k=m.rect.height)}c+=k+a.verticalPadding}},v.prototype.tileCompoundMembers=function(a,b){var c=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(d){var e=b[d];if(c.tiledMemberPack[d]=c.tileNodes(a[d],e.paddingLeft+e.paddingRight),e.rect.width=c.tiledMemberPack[d].width,e.rect.height=c.tiledMemberPack[d].height,e.setCenter(c.tiledMemberPack[d].centerX,c.tiledMemberPack[d].centerY),e.labelMarginLeft=0,e.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var f=e.rect.width,g=e.rect.height;e.labelWidth&&("left"==e.labelPosHorizontal?(e.rect.x-=e.labelWidth,e.setWidth(f+e.labelWidth),e.labelMarginLeft=e.labelWidth):"center"==e.labelPosHorizontal&&e.labelWidth>f?(e.rect.x-=(e.labelWidth-f)/2,e.setWidth(e.labelWidth),e.labelMarginLeft=(e.labelWidth-f)/2):"right"==e.labelPosHorizontal&&e.setWidth(f+e.labelWidth)),e.labelHeight&&("top"==e.labelPosVertical?(e.rect.y-=e.labelHeight,e.setHeight(g+e.labelHeight),e.labelMarginTop=e.labelHeight):"center"==e.labelPosVertical&&e.labelHeight>g?(e.rect.y-=(e.labelHeight-g)/2,e.setHeight(e.labelHeight),e.labelMarginTop=(e.labelHeight-g)/2):"bottom"==e.labelPosVertical&&e.setHeight(g+e.labelHeight))}})},v.prototype.tileNodes=function(a,b){var c=this.tileNodesByFavoringDim(a,b,!0),d=this.tileNodesByFavoringDim(a,b,!1),e=this.getOrgRatio(c);return this.getOrgRatio(d)<e?d:c},v.prototype.getOrgRatio=function(a){var b=a.width/a.height;return b<1&&(b=1/b),b},v.prototype.calcIdealRowWidth=function(a,b){var c,d=i.TILING_PADDING_VERTICAL,e=i.TILING_PADDING_HORIZONTAL,f=a.length,g=0,h=0,j=0;a.forEach(function(a){g+=a.getWidth(),h+=a.getHeight(),a.getWidth()>j&&(j=a.getWidth())});var k=g/f,l=Math.pow(d-e,2)+4*(k+e)*(h/f+d)*f,m=(e-d+Math.sqrt(l))/(2*(k+e));b?(c=Math.ceil(m))==m&&c++:c=Math.floor(m);var n=c*(k+e)-e;return j>n&&(n=j),n+=2*e},v.prototype.tileNodesByFavoringDim=function(a,b,c){var d=i.TILING_PADDING_VERTICAL,e=i.TILING_PADDING_HORIZONTAL,f=i.TILING_COMPARE_BY,g={rows:[],rowWidth:[],rowHeight:[],width:0,height:b,verticalPadding:d,horizontalPadding:e,centerX:0,centerY:0};f&&(g.idealRowWidth=this.calcIdealRowWidth(a,c));var h=function(a){return a.rect.width*a.rect.height},j=function(a,b){return h(b)-h(a)};a.sort(function(a,b){var c=j;return g.idealRowWidth?(c=f)(a.id,b.id):c(a,b)});for(var k=0,l=0,m=0;m<a.length;m++){var n=a[m];k+=n.getCenterX(),l+=n.getCenterY()}g.centerX=k/a.length,g.centerY=l/a.length;for(var m=0;m<a.length;m++){var n=a[m];if(0==g.rows.length)this.insertNodeToRow(g,n,0,b);else if(this.canAddHorizontal(g,n.rect.width,n.rect.height)){var o=g.rows.length-1;g.idealRowWidth||(o=this.getShortestRowIndex(g)),this.insertNodeToRow(g,n,o,b)}else this.insertNodeToRow(g,n,g.rows.length,b);this.shiftToLastRow(g)}return g},v.prototype.insertNodeToRow=function(a,b,c,d){c==a.rows.length&&(a.rows.push([]),a.rowWidth.push(d),a.rowHeight.push(0));var e=a.rowWidth[c]+b.rect.width;a.rows[c].length>0&&(e+=a.horizontalPadding),a.rowWidth[c]=e,a.width<e&&(a.width=e);var f=b.rect.height;c>0&&(f+=a.verticalPadding);var g=0;f>a.rowHeight[c]&&(g=a.rowHeight[c],a.rowHeight[c]=f,g=a.rowHeight[c]-g),a.height+=g,a.rows[c].push(b)},v.prototype.getShortestRowIndex=function(a){for(var b=-1,c=Number.MAX_VALUE,d=0;d<a.rows.length;d++)a.rowWidth[d]<c&&(b=d,c=a.rowWidth[d]);return b},v.prototype.getLongestRowIndex=function(a){for(var b=-1,c=5e-324,d=0;d<a.rows.length;d++)a.rowWidth[d]>c&&(b=d,c=a.rowWidth[d]);return b},v.prototype.canAddHorizontal=function(a,b,c){if(a.idealRowWidth){var d,e,f=a.rows.length-1;return a.rowWidth[f]+b+a.horizontalPadding<=a.idealRowWidth}var g=this.getShortestRowIndex(a);if(g<0)return!0;var h=a.rowWidth[g];if(h+a.horizontalPadding+b<=a.width)return!0;var i=0;return a.rowHeight[g]<c&&g>0&&(i=c+a.verticalPadding-a.rowHeight[g]),d=a.width-h>=b+a.horizontalPadding?(a.height+i)/(h+b+a.horizontalPadding):(a.height+i)/a.width,i=c+a.verticalPadding,(e=a.width<b?(a.height+i)/b:(a.height+i)/a.width)<1&&(e=1/e),d<1&&(d=1/d),d<e},v.prototype.shiftToLastRow=function(a){var b=this.getLongestRowIndex(a),c=a.rowWidth.length-1,d=a.rows[b],e=d[d.length-1],f=e.width+a.horizontalPadding;if(a.width-a.rowWidth[c]>f&&b!=c){d.splice(-1,1),a.rows[c].push(e),a.rowWidth[b]=a.rowWidth[b]-f,a.rowWidth[c]=a.rowWidth[c]+f,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var g=5e-324,h=0;h<d.length;h++)d[h].height>g&&(g=d[h].height);b>0&&(g+=a.verticalPadding);var i=a.rowHeight[b]+a.rowHeight[c];a.rowHeight[b]=g,a.rowHeight[c]<e.height+a.verticalPadding&&(a.rowHeight[c]=e.height+a.verticalPadding);var j=a.rowHeight[b]+a.rowHeight[c];a.height+=j-i,this.shiftToLastRow(a)}},v.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var a,b=[],c=!0;c;){var d=this.graphManager.getAllNodes(),e=[];c=!1;for(var f=0;f<d.length;f++)if(1==(a=d[f]).getEdges().length&&!a.getEdges()[0].isInterGraph&&null==a.getChild()){if(i.PURE_INCREMENTAL){var g=a.getEdges()[0].getOtherEnd(a),h=new o(a.getCenterX()-g.getCenterX(),a.getCenterY()-g.getCenterY());e.push([a,a.getEdges()[0],a.getOwner(),h])}else e.push([a,a.getEdges()[0],a.getOwner()]);c=!0}if(!0==c){for(var j=[],k=0;k<e.length;k++)1==e[k][0].getEdges().length&&(j.push(e[k]),e[k][0].getOwner().remove(e[k][0]));b.push(j),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=b},v.prototype.growTree=function(a){for(var b,c=a.length,d=a[c-1],e=0;e<d.length;e++)b=d[e],this.findPlaceforPrunedNode(b),b[2].add(b[0]),b[2].add(b[1],b[1].source,b[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(a){var b=a[0];if(d=b==a[1].source?a[1].target:a[1].source,i.PURE_INCREMENTAL)b.setCenter(d.getCenterX()+a[3].getWidth(),d.getCenterY()+a[3].getHeight());else{var c,d,e,f,g=d.startX,h=d.finishX,j=d.startY,l=d.finishY,m=[0,0,0,0];if(j>0)for(var n=g;n<=h;n++)m[0]+=this.grid[n][j-1].length+this.grid[n][j].length-1;if(h<this.grid.length-1)for(var n=j;n<=l;n++)m[1]+=this.grid[h+1][n].length+this.grid[h][n].length-1;if(l<this.grid[0].length-1)for(var n=g;n<=h;n++)m[2]+=this.grid[n][l+1].length+this.grid[n][l].length-1;if(g>0)for(var n=j;n<=l;n++)m[3]+=this.grid[g-1][n].length+this.grid[g][n].length-1;for(var o=q.MAX_VALUE,p=0;p<m.length;p++)m[p]<o?(o=m[p],e=1,f=p):m[p]==o&&e++;if(3==e&&0==o)0==m[0]&&0==m[1]&&0==m[2]?c=1:0==m[0]&&0==m[1]&&0==m[3]?c=0:0==m[0]&&0==m[2]&&0==m[3]?c=3:0==m[1]&&0==m[2]&&0==m[3]&&(c=2);else if(2==e&&0==o){var r=Math.floor(2*Math.random());c=0==m[0]&&0==m[1]?+(0!=r):0==m[0]&&0==m[2]?2*(0!=r):0==m[0]&&0==m[3]?3*(0!=r):0==m[1]&&0==m[2]?0==r?1:2:0==m[1]&&0==m[3]?0==r?1:3:0==r?2:3}else if(4==e&&0==o){var r=Math.floor(4*Math.random());c=r}else c=f;0==c?b.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-k.DEFAULT_EDGE_LENGTH-b.getHeight()/2):1==c?b.setCenter(d.getCenterX()+d.getWidth()/2+k.DEFAULT_EDGE_LENGTH+b.getWidth()/2,d.getCenterY()):2==c?b.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+k.DEFAULT_EDGE_LENGTH+b.getHeight()/2):b.setCenter(d.getCenterX()-d.getWidth()/2-k.DEFAULT_EDGE_LENGTH-b.getWidth()/2,d.getCenterY())}},a.exports=v},991:(a,b,c)=>{var d=c(551).FDLayoutNode,e=c(551).IMath;function f(a,b,c,e){d.call(this,a,b,c,e)}for(var g in f.prototype=Object.create(d.prototype),d)f[g]=d[g];f.prototype.calculateDisplacement=function(){var a=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=a.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=a.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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*e.sign(this.displacementX)),Math.abs(this.displacementY)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementY=a.coolingFactor*a.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(a,b){for(var c,d=this.getChild().getNodes(),e=0;e<d.length;e++)null==(c=d[e]).getChild()?(c.displacementX+=a,c.displacementY+=b):c.propogateDisplacementToChildren(a,b)},f.prototype.move=function(){var a=this.graphManager.getLayout();(null==this.child||0==this.child.getNodes().length)&&(this.moveBy(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},f.prototype.setPred1=function(a){this.pred1=a},f.prototype.getPred1=function(){return pred1},f.prototype.getPred2=function(){return pred2},f.prototype.setNext=function(a){this.next=a},f.prototype.getNext=function(){return next},f.prototype.setProcessed=function(a){this.processed=a},f.prototype.isProcessed=function(){return processed},a.exports=f},902:(a,b,c)=>{function d(a){if(!Array.isArray(a))return Array.from(a);for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}var e=c(806),f=c(551).LinkedList,g=c(551).Matrix,h=c(551).SVD;function i(){}i.handleConstraints=function(a){var b={};b.fixedNodeConstraint=a.constraints.fixedNodeConstraint,b.alignmentConstraint=a.constraints.alignmentConstraint,b.relativePlacementConstraint=a.constraints.relativePlacementConstraint;for(var c=new Map,i=new Map,j=[],k=[],l=a.getAllNodes(),m=0,n=0;n<l.length;n++){var o=l[n];null==o.getChild()&&(i.set(o.id,m++),j.push(o.getCenterX()),k.push(o.getCenterY()),c.set(o.id,o))}b.relativePlacementConstraint&&b.relativePlacementConstraint.forEach(function(a){a.gap||0==a.gap||(a.left?a.gap=e.DEFAULT_EDGE_LENGTH+c.get(a.left).getWidth()/2+c.get(a.right).getWidth()/2:a.gap=e.DEFAULT_EDGE_LENGTH+c.get(a.top).getHeight()/2+c.get(a.bottom).getHeight()/2)});var p=function(a){var b=0,c=0;return a.forEach(function(a){b+=j[i.get(a)],c+=k[i.get(a)]}),{x:b/a.size,y:c/a.size}},q=function(a,b,c,e,g){var h=new Map;a.forEach(function(a,b){h.set(b,0)}),a.forEach(function(a,b){a.forEach(function(a){h.set(a.id,h.get(a.id)+1)})});var l=new Map,m=new Map,n=new f;for(h.forEach(function(a,d){0==a?(n.push(d),c||("horizontal"==b?l.set(d,i.has(d)?j[i.get(d)]:e.get(d)):l.set(d,i.has(d)?k[i.get(d)]:e.get(d)))):l.set(d,-1/0),c&&m.set(d,new Set([d]))}),c&&g.forEach(function(a){var d=[];if(a.forEach(function(a){c.has(a)&&d.push(a)}),d.length>0){var f=0;d.forEach(function(a){"horizontal"==b?l.set(a,i.has(a)?j[i.get(a)]:e.get(a)):l.set(a,i.has(a)?k[i.get(a)]:e.get(a)),f+=l.get(a)}),f/=d.length,a.forEach(function(a){c.has(a)||l.set(a,f)})}else{var g=0;a.forEach(function(a){"horizontal"==b?g+=i.has(a)?j[i.get(a)]:e.get(a):g+=i.has(a)?k[i.get(a)]:e.get(a)}),g/=a.length,a.forEach(function(a){l.set(a,g)})}});0!=n.length;)!function(){var d=n.shift();a.get(d).forEach(function(a){if(l.get(a.id)<l.get(d)+a.gap)if(c&&c.has(a.id)){var f=void 0;if(f="horizontal"==b?i.has(a.id)?j[i.get(a.id)]:e.get(a.id):i.has(a.id)?k[i.get(a.id)]:e.get(a.id),l.set(a.id,f),f<l.get(d)+a.gap){var g=l.get(d)+a.gap-f;m.get(d).forEach(function(a){l.set(a,l.get(a)-g)})}}else l.set(a.id,l.get(d)+a.gap);h.set(a.id,h.get(a.id)-1),0==h.get(a.id)&&n.push(a.id),c&&m.set(a.id,function(a,b){var c=new Set(a),d=!0,e=!1,f=void 0;try{for(var g,h=b[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var i=g.value;c.add(i)}}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}(m.get(d),m.get(a.id)))})}();if(c){var o=new Set;a.forEach(function(a,b){0==a.length&&o.add(b)});var p=[];m.forEach(function(a,b){if(o.has(b)){var e=!1,f=!0,g=!1,h=void 0;try{for(var i,j=a[Symbol.iterator]();!(f=(i=j.next()).done);f=!0){var k=i.value;c.has(k)&&(e=!0)}}catch(a){g=!0,h=a}finally{try{!f&&j.return&&j.return()}finally{if(g)throw h}}if(!e){var l=!1,m=void 0;p.forEach(function(b,c){b.has([].concat(d(a))[0])&&(l=!0,m=c)}),l?a.forEach(function(a){p[m].add(a)}):p.push(new Set(a))}}}),p.forEach(function(a,c){var d=1/0,f=1/0,g=-1/0,h=-1/0,m=!0,n=!1,o=void 0;try{for(var p,q=a[Symbol.iterator]();!(m=(p=q.next()).done);m=!0){var r=p.value,s=void 0;s="horizontal"==b?i.has(r)?j[i.get(r)]:e.get(r):i.has(r)?k[i.get(r)]:e.get(r);var t=l.get(r);s<d&&(d=s),s>g&&(g=s),t<f&&(f=t),t>h&&(h=t)}}catch(a){n=!0,o=a}finally{try{!m&&q.return&&q.return()}finally{if(n)throw o}}var u=(d+g)/2-(f+h)/2,v=!0,w=!1,x=void 0;try{for(var y,z=a[Symbol.iterator]();!(v=(y=z.next()).done);v=!0){var A=y.value;l.set(A,l.get(A)+u)}}catch(a){w=!0,x=a}finally{try{!v&&z.return&&z.return()}finally{if(w)throw x}}})}return l},r=function(a){var b=0,c=0,d=0,e=0;if(a.forEach(function(a){a.left?j[i.get(a.left)]-j[i.get(a.right)]>=0?b++:c++:k[i.get(a.top)]-k[i.get(a.bottom)]>=0?d++:e++}),b>c&&d>e)for(var f=0;f<i.size;f++)j[f]=-1*j[f],k[f]=-1*k[f];else if(b>c)for(var g=0;g<i.size;g++)j[g]=-1*j[g];else if(d>e)for(var h=0;h<i.size;h++)k[h]=-1*k[h]},s=function(a){var b=[],c=new f,d=new Set,e=0;return a.forEach(function(f,g){if(!d.has(g)){b[e]=[];var h=g;for(c.push(h),d.add(h),b[e].push(h);0!=c.length;)h=c.shift(),a.get(h).forEach(function(a){d.has(a.id)||(c.push(a.id),d.add(a.id),b[e].push(a.id))});e++}}),b},t=function(a){var b=new Map;return a.forEach(function(a,c){b.set(c,[])}),a.forEach(function(a,c){a.forEach(function(a){b.get(c).push(a),b.get(a.id).push({id:c,gap:a.gap,direction:a.direction})})}),b},u=function(a){var b=new Map;return a.forEach(function(a,c){b.set(c,[])}),a.forEach(function(a,c){a.forEach(function(a){b.get(a.id).push({id:c,gap:a.gap,direction:a.direction})})}),b},v=[],w=[],x=!1,y=!1,z=new Set,A=new Map,B=new Map,C=[];if(b.fixedNodeConstraint&&b.fixedNodeConstraint.forEach(function(a){z.add(a.nodeId)}),b.relativePlacementConstraint&&(b.relativePlacementConstraint.forEach(function(a){a.left?(A.has(a.left)?A.get(a.left).push({id:a.right,gap:a.gap,direction:"horizontal"}):A.set(a.left,[{id:a.right,gap:a.gap,direction:"horizontal"}]),A.has(a.right)||A.set(a.right,[])):(A.has(a.top)?A.get(a.top).push({id:a.bottom,gap:a.gap,direction:"vertical"}):A.set(a.top,[{id:a.bottom,gap:a.gap,direction:"vertical"}]),A.has(a.bottom)||A.set(a.bottom,[]))}),C=s(B=t(A))),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(b.fixedNodeConstraint&&b.fixedNodeConstraint.length>1)b.fixedNodeConstraint.forEach(function(a,b){v[b]=[a.position.x,a.position.y],w[b]=[j[i.get(a.nodeId)],k[i.get(a.nodeId)]]}),x=!0;else if(b.alignmentConstraint)!function(){var a=0;if(b.alignmentConstraint.vertical){for(var c=b.alignmentConstraint.vertical,e=0;e<c.length;e++)!function(b){var e=new Set;c[b].forEach(function(a){e.add(a)});var f=new Set([].concat(d(e)).filter(function(a){return z.has(a)})),g=void 0;g=f.size>0?j[i.get(f.values().next().value)]:p(e).x,c[b].forEach(function(b){v[a]=[g,k[i.get(b)]],w[a]=[j[i.get(b)],k[i.get(b)]],a++})}(e);x=!0}if(b.alignmentConstraint.horizontal){for(var f=b.alignmentConstraint.horizontal,g=0;g<f.length;g++)!function(b){var c=new Set;f[b].forEach(function(a){c.add(a)});var e=new Set([].concat(d(c)).filter(function(a){return z.has(a)})),g=void 0;g=e.size>0?j[i.get(e.values().next().value)]:p(c).y,f[b].forEach(function(b){v[a]=[j[i.get(b)],g],w[a]=[j[i.get(b)],k[i.get(b)]],a++})}(g);x=!0}b.relativePlacementConstraint&&(y=!0)}();else if(b.relativePlacementConstraint){for(var D=0,E=0,F=0;F<C.length;F++)C[F].length>D&&(D=C[F].length,E=F);if(D<B.size/2)r(b.relativePlacementConstraint),x=!1,y=!1;else{var G=new Map,H=new Map,I=[];C[E].forEach(function(a){A.get(a).forEach(function(b){"horizontal"==b.direction?(G.has(a)?G.get(a).push(b):G.set(a,[b]),G.has(b.id)||G.set(b.id,[]),I.push({left:a,right:b.id})):(H.has(a)?H.get(a).push(b):H.set(a,[b]),H.has(b.id)||H.set(b.id,[]),I.push({top:a,bottom:b.id}))})}),r(I),y=!1;var J=q(G,"horizontal"),K=q(H,"vertical");C[E].forEach(function(a,b){w[b]=[j[i.get(a)],k[i.get(a)]],v[b]=[],J.has(a)?v[b][0]=J.get(a):v[b][0]=j[i.get(a)],K.has(a)?v[b][1]=K.get(a):v[b][1]=k[i.get(a)]}),x=!0}}if(x){for(var L=void 0,M=g.transpose(v),N=g.transpose(w),O=0;O<M.length;O++)M[O]=g.multGamma(M[O]),N[O]=g.multGamma(N[O]);var P=g.multMat(M,g.transpose(N)),Q=h.svd(P);L=g.multMat(Q.V,g.transpose(Q.U));for(var R=0;R<i.size;R++){var S=[j[R],k[R]],T=[L[0][0],L[1][0]],U=[L[0][1],L[1][1]];j[R]=g.dotProduct(S,T),k[R]=g.dotProduct(S,U)}y&&r(b.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(b.fixedNodeConstraint&&b.fixedNodeConstraint.length>0){var V={x:0,y:0};b.fixedNodeConstraint.forEach(function(a,b){var c,d={x:j[i.get(a.nodeId)],y:k[i.get(a.nodeId)]},e=(c=a.position,{x:c.x-d.x,y:c.y-d.y});V.x+=e.x,V.y+=e.y}),V.x/=b.fixedNodeConstraint.length,V.y/=b.fixedNodeConstraint.length,j.forEach(function(a,b){j[b]+=V.x}),k.forEach(function(a,b){k[b]+=V.y}),b.fixedNodeConstraint.forEach(function(a){j[i.get(a.nodeId)]=a.position.x,k[i.get(a.nodeId)]=a.position.y})}if(b.alignmentConstraint){if(b.alignmentConstraint.vertical)for(var W=b.alignmentConstraint.vertical,X=0;X<W.length;X++)!function(a){var b=new Set;W[a].forEach(function(a){b.add(a)});var c=new Set([].concat(d(b)).filter(function(a){return z.has(a)})),e=void 0;e=c.size>0?j[i.get(c.values().next().value)]:p(b).x,b.forEach(function(a){z.has(a)||(j[i.get(a)]=e)})}(X);if(b.alignmentConstraint.horizontal)for(var Y=b.alignmentConstraint.horizontal,Z=0;Z<Y.length;Z++)!function(a){var b=new Set;Y[a].forEach(function(a){b.add(a)});var c=new Set([].concat(d(b)).filter(function(a){return z.has(a)})),e=void 0;e=c.size>0?k[i.get(c.values().next().value)]:p(b).y,b.forEach(function(a){z.has(a)||(k[i.get(a)]=e)})}(Z)}b.relativePlacementConstraint&&function(){var a=new Map,c=new Map,d=new Map,e=new Map,f=new Map,g=new Map,h=new Set,l=new Set;if(z.forEach(function(a){h.add(a),l.add(a)}),b.alignmentConstraint){if(b.alignmentConstraint.vertical)for(var m=b.alignmentConstraint.vertical,n=function(b){d.set("dummy"+b,[]),m[b].forEach(function(c){a.set(c,"dummy"+b),d.get("dummy"+b).push(c),z.has(c)&&h.add("dummy"+b)}),f.set("dummy"+b,j[i.get(m[b][0])])},o=0;o<m.length;o++)n(o);if(b.alignmentConstraint.horizontal)for(var p=b.alignmentConstraint.horizontal,r=function(a){e.set("dummy"+a,[]),p[a].forEach(function(b){c.set(b,"dummy"+a),e.get("dummy"+a).push(b),z.has(b)&&l.add("dummy"+a)}),g.set("dummy"+a,k[i.get(p[a][0])])},v=0;v<p.length;v++)r(v)}var w=new Map,x=new Map,y=function(b){A.get(b).forEach(function(d){var e=void 0,f=void 0;"horizontal"==d.direction?(e=a.get(b)?a.get(b):b,f=a.get(d.id)?{id:a.get(d.id),gap:d.gap,direction:d.direction}:d,w.has(e)?w.get(e).push(f):w.set(e,[f]),w.has(f.id)||w.set(f.id,[])):(e=c.get(b)?c.get(b):b,f=c.get(d.id)?{id:c.get(d.id),gap:d.gap,direction:d.direction}:d,x.has(e)?x.get(e).push(f):x.set(e,[f]),x.has(f.id)||x.set(f.id,[]))})},B=!0,C=!1,D=void 0;try{for(var E,F=A.keys()[Symbol.iterator]();!(B=(E=F.next()).done);B=!0){var G=E.value;y(G)}}catch(a){C=!0,D=a}finally{try{!B&&F.return&&F.return()}finally{if(C)throw D}}var H=t(w),I=t(x),J=s(H),K=s(I),L=u(w),M=u(x),N=[],O=[];J.forEach(function(a,b){N[b]=[],a.forEach(function(a){0==L.get(a).length&&N[b].push(a)})}),K.forEach(function(a,b){O[b]=[],a.forEach(function(a){0==M.get(a).length&&O[b].push(a)})});var P=q(w,"horizontal",h,f,N),Q=q(x,"vertical",l,g,O),R=function(a){d.get(a)?d.get(a).forEach(function(b){j[i.get(b)]=P.get(a)}):j[i.get(a)]=P.get(a)},S=!0,T=!1,U=void 0;try{for(var V,W=P.keys()[Symbol.iterator]();!(S=(V=W.next()).done);S=!0){var X=V.value;R(X)}}catch(a){T=!0,U=a}finally{try{!S&&W.return&&W.return()}finally{if(T)throw U}}var Y=function(a){e.get(a)?e.get(a).forEach(function(b){k[i.get(b)]=Q.get(a)}):k[i.get(a)]=Q.get(a)},Z=!0,$=!1,_=void 0;try{for(var aa,ab=Q.keys()[Symbol.iterator]();!(Z=(aa=ab.next()).done);Z=!0){var X=aa.value;Y(X)}}catch(a){$=!0,_=a}finally{try{!Z&&ab.return&&ab.return()}finally{if($)throw _}}}()}for(var $=0;$<l.length;$++){var _=l[$];null==_.getChild()&&_.setCenter(j[i.get(_.id)],k[i.get(_.id)])}},a.exports=i},551:a=>{a.exports=d}},b={};return function c(d){var e=b[d];if(void 0!==e)return e.exports;var f=b[d]={exports:{}};return a[d](f,f.exports,c),f.exports}(45)})()}};
|
|
36
|
+
`)}}}}}))},"drawEdges"),N=(0,i.K2)(async function(a,b,c){let d=.75*c.getConfigField("padding"),f=c.getConfigField("fontSize"),g=c.getConfigField("iconSize")/2;await Promise.all(b.nodes().map(async b=>{let i=E(b);if("group"===i.type){let{h:j,w:k,x1:l,y1:m}=b.boundingBox(),n=a.append("rect");n.attr("id",`group-${i.id}`).attr("x",l+g).attr("y",m+g).attr("width",k).attr("height",j).attr("class","node-bkg");let o=a.append("g"),p=l,q=m;if(i.icon){let a=o.append("g");a.html(`<g>${await (0,e.WY)(i.icon,{height:d,width:d,fallbackPrefix:L.prefix})}</g>`),a.attr("transform","translate("+(p+g+1)+", "+(q+g+1)+")"),p+=d,q+=f/2-1-2}if(i.label){let a=o.append("g");await (0,e.GZ)(a,i.label,{useHtmlLabels:!1,width:k,classes:"architecture-service-label"},(0,h.D7)()),a.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),a.attr("transform","translate("+(p+g+4)+", "+(q+g+2)+")")}c.setElementForId(i.id,n)}}))},"drawGroups"),O=(0,i.K2)(async function(a,b,c){let d=(0,h.D7)();for(let f of c){let c=b.append("g"),g=a.getConfigField("iconSize");if(f.title){let a=c.append("g");await (0,e.GZ)(a,f.title,{useHtmlLabels:!1,width:1.5*g,classes:"architecture-service-label"},d),a.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),a.attr("transform","translate("+g/2+", "+g+")")}let i=c.append("g");if(f.icon)i.html(`<g>${await (0,e.WY)(f.icon,{height:g,width:g,fallbackPrefix:L.prefix})}</g>`);else if(f.iconText){i.html(`<g>${await (0,e.WY)("blank",{height:g,width:g,fallbackPrefix:L.prefix})}</g>`);let a=i.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html((0,h.jZ)(f.iconText,d)),b=parseInt(window.getComputedStyle(a.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;a.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/b)};`)}else i.append("path").attr("class","node-bkg").attr("id","node-"+f.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);c.attr("id",`service-${f.id}`).attr("class","architecture-service");let{width:j,height:k}=c.node().getBBox();f.width=j,f.height=k,a.setElementForId(f.id,c)}return 0},"drawServices"),P=(0,i.K2)(function(a,b,c){c.forEach(c=>{let d=b.append("g"),e=a.getConfigField("iconSize");d.append("g").append("rect").attr("id","node-"+c.id).attr("fill-opacity","0").attr("width",e).attr("height",e),d.attr("class","architecture-junction");let{width:f,height:g}=d._groups[0][0].getBBox();d.width=f,d.height=g,a.setElementForId(c.id,d)})},"drawJunctions");function Q(a,b,c){a.forEach(a=>{b.add({group:"nodes",data:{type:"service",id:a.id,icon:a.icon,label:a.title,parent:a.in,width:c.getConfigField("iconSize"),height:c.getConfigField("iconSize")},classes:"node-service"})})}function R(a,b,c){a.forEach(a=>{b.add({group:"nodes",data:{type:"junction",id:a.id,parent:a.in,width:c.getConfigField("iconSize"),height:c.getConfigField("iconSize")},classes:"node-junction"})})}function S(a,b){b.nodes().map(b=>{let c=E(b);"group"!==c.type&&(c.x=b.position().x,c.y=b.position().y,a.getElementById(c.id).attr("transform","translate("+(c.x||0)+","+(c.y||0)+")"))})}function T(a,b){a.forEach(a=>{b.add({group:"nodes",data:{type:"group",id:a.id,icon:a.icon,label:a.title,parent:a.in},classes:"node-group"})})}function U(a,b){a.forEach(a=>{let{lhsId:c,rhsId:d,lhsInto:e,lhsGroup:f,rhsInto:g,lhsDir:h,rhsDir:i,rhsGroup:j,title:k}=a,l=u(a.lhsDir,a.rhsDir)?"segments":"straight",m={id:`${c}-${d}`,label:k,source:c,sourceDir:h,sourceArrow:e,sourceGroup:f,sourceEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%",target:d,targetDir:i,targetArrow:g,targetGroup:j,targetEndpoint:"L"===i?"0 50%":"R"===i?"100% 50%":"T"===i?"50% 0":"50% 100%"};b.add({group:"edges",data:m,classes:l})})}function V(a,b,c){let d=(0,i.K2)((a,b)=>Object.entries(a).reduce((a,[d,e])=>{let f=0,g=Object.entries(e);if(1===g.length)return a[d]=g[0][1],a;for(let e=0;e<g.length-1;e++)for(let h=e+1;h<g.length;h++){let[i,j]=g[e],[k,l]=g[h];c[i]?.[k]===b||"default"===i||"default"===k?(a[d]??=[],a[d]=[...a[d],...j,...l]):(a[`${d}-${f++}`]=j,a[`${d}-${f++}`]=l)}return a},{}),"flattenAlignments"),[e,f]=b.map(b=>{let c={},e={};return Object.entries(b).forEach(([b,[d,f]])=>{let g=a.getNode(b)?.in??"default";c[f]??={},c[f][g]??=[],c[f][g].push(b),e[d]??={},e[d][g]??=[],e[d][g].push(b)}),{horiz:Object.values(d(c,"horizontal")).filter(a=>a.length>1),vert:Object.values(d(e,"vertical")).filter(a=>a.length>1)}}).reduce(([a,b],{horiz:c,vert:d})=>[[...a,...c],[...b,...d]],[[],[]]);return{horizontal:e,vertical:f}}function W(a,b){let c=[],d=(0,i.K2)(a=>`${a[0]},${a[1]}`,"posToStr"),e=(0,i.K2)(a=>a.split(",").map(a=>parseInt(a)),"strToPos");return a.forEach(a=>{let f=Object.fromEntries(Object.entries(a).map(([a,b])=>[d(b),a])),g=[d([0,0])],h={},i={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;g.length>0;){let a=g.shift();if(a){h[a]=1;let j=f[a];if(j){let k=e(a);Object.entries(i).forEach(([a,e])=>{let i=d([k[0]+e[0],k[1]+e[1]]),l=f[i];l&&!h[i]&&(g.push(i),c.push({[n[a]]:l,[n[q(a)]]:j,gap:1.5*b.getConfigField("iconSize")}))})}}}}),c}function X(a,b,c,d,e,{spatialMaps:f,groupAlignments:g}){return new Promise(h=>{let j=(0,m.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),l=(0,k.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${e.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${e.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});j.remove(),T(c,l),Q(a,l,e),R(b,l,e),U(d,l);let n=V(e,f,g),o=W(f,e),p=l.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(a){let[b,c]=a.connectedNodes(),{parent:d}=E(b),{parent:f}=E(c);return d===f?1.5*e.getConfigField("iconSize"):.5*e.getConfigField("iconSize")},edgeElasticity(a){let[b,c]=a.connectedNodes(),{parent:d}=E(b),{parent:e}=E(c);return d===e?.45:.001},alignmentConstraint:n,relativePlacementConstraint:o});p.one("layoutstop",()=>{function a(a,b,c,d){let e,f,{x:g,y:h}=a,{x:i,y:j}=b;f=(d-h+(g-c)*(h-j)/(g-i))/Math.sqrt(1+Math.pow((h-j)/(g-i),2)),e=Math.sqrt(Math.pow(d-h,2)+Math.pow(c-g,2)-Math.pow(f,2))/Math.sqrt(Math.pow(i-g,2)+Math.pow(j-h,2));let k=(i-g)*(d-h)-(j-h)*(c-g);switch(!0){case k>=0:k=1;break;case k<0:k=-1}let l=(i-g)*(c-g)+(j-h)*(d-h);switch(!0){case l>=0:l=1;break;case l<0:l=-1}return{distances:f=Math.abs(f)*k,weights:e*=l}}for(let b of((0,i.K2)(a,"getSegmentWeights"),l.startBatch(),Object.values(l.edges())))if(b.data?.()){let{x:c,y:d}=b.source().position(),{x:e,y:f}=b.target().position();if(c!==e&&d!==f){let c=b.sourceEndpoint(),d=b.targetEndpoint(),{sourceDir:e}=D(b),[f,g]=t(e)?[c.x,d.y]:[d.x,c.y],{weights:h,distances:i}=a(c,d,f,g);b.style("segment-distances",i),b.style("segment-weights",h)}}l.endBatch(),p.run()}),p.run(),l.ready(a=>{i.Rm.info("Ready",a),h(l)})})}(0,e.pC)([{name:L.prefix,icons:L}]),k.A.use(l),(0,i.K2)(Q,"addServices"),(0,i.K2)(R,"addJunctions"),(0,i.K2)(S,"positionNodes"),(0,i.K2)(T,"addGroups"),(0,i.K2)(U,"addEdges"),(0,i.K2)(V,"getAlignments"),(0,i.K2)(W,"getRelativeConstraints"),(0,i.K2)(X,"layoutArchitecture");var Y={parser:I,get db(){return new G},renderer:{draw:(0,i.K2)(async(a,b,c,e)=>{let f=e.db,g=f.getServices(),i=f.getJunctions(),j=f.getGroups(),k=f.getEdges(),l=f.getDataStructures(),m=(0,d.D)(b),n=m.append("g");n.attr("class","architecture-edges");let o=m.append("g");o.attr("class","architecture-services");let p=m.append("g");p.attr("class","architecture-groups"),await O(f,o,g),P(f,o,i);let q=await X(g,i,j,k,f,l);await M(n,q,f),await N(p,q,f),S(f,q),(0,h.ot)(void 0,m,f.getConfigField("padding"),f.getConfigField("useMaxWidth"))},"draw")},styles:J}},97881:function(a,b,c){var d;d=c(58965),a.exports=(()=>{"use strict";var a={45:(a,b,c)=>{var d={};d.layoutBase=c(551),d.CoSEConstants=c(806),d.CoSEEdge=c(767),d.CoSEGraph=c(880),d.CoSEGraphManager=c(578),d.CoSELayout=c(765),d.CoSENode=c(991),d.ConstraintHandler=c(902),a.exports=d},806:(a,b,c)=>{var d=c(551).FDLayoutConstants;function e(){}for(var f in d)e[f]=d[f];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e},767:(a,b,c)=>{var d=c(551).FDLayoutEdge;function e(a,b,c){d.call(this,a,b,c)}for(var f in e.prototype=Object.create(d.prototype),d)e[f]=d[f];a.exports=e},880:(a,b,c)=>{var d=c(551).LGraph;function e(a,b,c){d.call(this,a,b,c)}for(var f in e.prototype=Object.create(d.prototype),d)e[f]=d[f];a.exports=e},578:(a,b,c)=>{var d=c(551).LGraphManager;function e(a){d.call(this,a)}for(var f in e.prototype=Object.create(d.prototype),d)e[f]=d[f];a.exports=e},765:(a,b,c)=>{var d=c(551).FDLayout,e=c(578),f=c(880),g=c(991),h=c(767),i=c(806),j=c(902),k=c(551).FDLayoutConstants,l=c(551).LayoutConstants,m=c(551).Point,n=c(551).PointD,o=c(551).DimensionD,p=c(551).Layout,q=c(551).Integer,r=c(551).IGeometry,s=c(551).LGraph,t=c(551).Transform,u=c(551).LinkedList;function v(){d.call(this),this.toBeTiled={},this.constraints={}}for(var w in v.prototype=Object.create(d.prototype),d)v[w]=d[w];v.prototype.newGraphManager=function(){var a=new e(this);return this.graphManager=a,a},v.prototype.newGraph=function(a){return new f(null,this.graphManager,a)},v.prototype.newNode=function(a){return new g(this.graphManager,a)},v.prototype.newEdge=function(a){return new h(null,null,a)},v.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=k.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=k.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=k.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},v.prototype.initSpringEmbedder=function(){d.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/k.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},v.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(i.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),b=this.nodesWithGravity.filter(function(b){return a.has(b)});this.graphManager.setAllNodesToApplyGravitation(b)}}else{var c=this.getFlatForest();if(c.length>0)this.positionNodesRadially(c);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),b=this.nodesWithGravity.filter(function(b){return a.has(b)});this.graphManager.setAllNodesToApplyGravitation(b),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(j.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),i.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;if(this.totalIterations%k.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 a=new Set(this.getAllNodes()),b=this.nodesWithGravity.filter(function(b){return a.has(b)});this.graphManager.setAllNodesToApplyGravitation(b),this.graphManager.updateBounds(),this.updateGrid(),i.PURE_INCREMENTAL?this.coolingFactor=k.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=k.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()),i.PURE_INCREMENTAL?this.coolingFactor=k.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=k.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,d=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,d),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),b={},c=0;c<a.length;c++){var d=a[c].rect,e=a[c].id;b[e]={id:e,x:d.getCenterX(),y:d.getCenterY(),w:d.width,h:d.height}}return b},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if("during"===k.ANIMATE)this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},v.prototype.moveNodes=function(){for(var a,b=this.getAllNodes(),c=0;c<b.length;c++)b[c].calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var c=0;c<b.length;c++)b[c].move()},v.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var b=this.graphManager.getAllNodes(),c=0;c<b.length;c++){var d=b[c];this.idToNodeMap.set(d.id,d)}if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(b){a.fixedNodeSet.add(b.nodeId)});for(var d,b=this.graphManager.getAllNodes(),c=0;c<b.length;c++)if(null!=(d=b[c]).getChild()){var e=function b(c){for(var d,e=c.getChild().getNodes(),f=0,g=0;g<e.length;g++)null==(d=e[g]).getChild()?a.fixedNodeSet.has(d.id)&&(f+=100):f+=b(d);return f}(d);e>0&&(d.fixedNodeWeight=e)}}if(this.constraints.relativePlacementConstraint){var f=new Map,g=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(b){a.fixedNodesOnHorizontal.add(b),a.fixedNodesOnVertical.add(b)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var h=this.constraints.alignmentConstraint.vertical,c=0;c<h.length;c++)this.dummyToNodeForVerticalAlignment.set("dummy"+c,[]),h[c].forEach(function(b){f.set(b,"dummy"+c),a.dummyToNodeForVerticalAlignment.get("dummy"+c).push(b),a.fixedNodeSet.has(b)&&a.fixedNodesOnHorizontal.add("dummy"+c)});if(this.constraints.alignmentConstraint.horizontal)for(var j=this.constraints.alignmentConstraint.horizontal,c=0;c<j.length;c++)this.dummyToNodeForHorizontalAlignment.set("dummy"+c,[]),j[c].forEach(function(b){g.set(b,"dummy"+c),a.dummyToNodeForHorizontalAlignment.get("dummy"+c).push(b),a.fixedNodeSet.has(b)&&a.fixedNodesOnVertical.add("dummy"+c)})}if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(a){var b,c,d;for(d=a.length-1;d>=2*a.length/3;d--)b=Math.floor(Math.random()*(d+1)),c=a[d],a[d]=a[b],a[b]=c;return a},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(b){if(b.left){var c=f.has(b.left)?f.get(b.left):b.left,d=f.has(b.right)?f.get(b.right):b.right;a.nodesInRelativeHorizontal.includes(c)||(a.nodesInRelativeHorizontal.push(c),a.nodeToRelativeConstraintMapHorizontal.set(c,[]),a.dummyToNodeForVerticalAlignment.has(c)?a.nodeToTempPositionMapHorizontal.set(c,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(c)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(c,a.idToNodeMap.get(c).getCenterX())),a.nodesInRelativeHorizontal.includes(d)||(a.nodesInRelativeHorizontal.push(d),a.nodeToRelativeConstraintMapHorizontal.set(d,[]),a.dummyToNodeForVerticalAlignment.has(d)?a.nodeToTempPositionMapHorizontal.set(d,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(d)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(d,a.idToNodeMap.get(d).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(c).push({right:d,gap:b.gap}),a.nodeToRelativeConstraintMapHorizontal.get(d).push({left:c,gap:b.gap})}else{var e=g.has(b.top)?g.get(b.top):b.top,h=g.has(b.bottom)?g.get(b.bottom):b.bottom;a.nodesInRelativeVertical.includes(e)||(a.nodesInRelativeVertical.push(e),a.nodeToRelativeConstraintMapVertical.set(e,[]),a.dummyToNodeForHorizontalAlignment.has(e)?a.nodeToTempPositionMapVertical.set(e,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(e,a.idToNodeMap.get(e).getCenterY())),a.nodesInRelativeVertical.includes(h)||(a.nodesInRelativeVertical.push(h),a.nodeToRelativeConstraintMapVertical.set(h,[]),a.dummyToNodeForHorizontalAlignment.has(h)?a.nodeToTempPositionMapVertical.set(h,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(h)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(h,a.idToNodeMap.get(h).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(e).push({bottom:h,gap:b.gap}),a.nodeToRelativeConstraintMapVertical.get(h).push({top:e,gap:b.gap})}});else{var k=new Map,l=new Map;this.constraints.relativePlacementConstraint.forEach(function(a){if(a.left){var b=f.has(a.left)?f.get(a.left):a.left,c=f.has(a.right)?f.get(a.right):a.right;k.has(b)?k.get(b).push(c):k.set(b,[c]),k.has(c)?k.get(c).push(b):k.set(c,[b])}else{var d=g.has(a.top)?g.get(a.top):a.top,e=g.has(a.bottom)?g.get(a.bottom):a.bottom;l.has(d)?l.get(d).push(e):l.set(d,[e]),l.has(e)?l.get(e).push(d):l.set(e,[d])}});var m=function(a,b){var c=[],d=[],e=new u,f=new Set,g=0;return a.forEach(function(h,i){if(!f.has(i)){c[g]=[],d[g]=!1;var j=i;for(e.push(j),f.add(j),c[g].push(j);0!=e.length;)j=e.shift(),b.has(j)&&(d[g]=!0),a.get(j).forEach(function(a){f.has(a)||(e.push(a),f.add(a),c[g].push(a))});g++}}),{components:c,isFixed:d}},n=m(k,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=n.components,this.fixedComponentsOnHorizontal=n.isFixed;var o=m(l,a.fixedNodesOnVertical);this.componentsOnVertical=o.components,this.fixedComponentsOnVertical=o.isFixed}}},v.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(b){var c=a.idToNodeMap.get(b.nodeId);c.displacementX=0,c.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var b=this.constraints.alignmentConstraint.vertical,c=0;c<b.length;c++){for(var d=0,e=0;e<b[c].length;e++){if(this.fixedNodeSet.has(b[c][e])){d=0;break}d+=this.idToNodeMap.get(b[c][e]).displacementX}for(var f=d/b[c].length,e=0;e<b[c].length;e++)this.idToNodeMap.get(b[c][e]).displacementX=f}if(this.constraints.alignmentConstraint.horizontal)for(var g=this.constraints.alignmentConstraint.horizontal,c=0;c<g.length;c++){for(var h=0,e=0;e<g[c].length;e++){if(this.fixedNodeSet.has(g[c][e])){h=0;break}h+=this.idToNodeMap.get(g[c][e]).displacementY}for(var j=h/g[c].length,e=0;e<g[c].length;e++)this.idToNodeMap.get(g[c][e]).displacementY=j}}if(this.constraints.relativePlacementConstraint)if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(b){if(!a.fixedNodesOnHorizontal.has(b)){var c=0;c=a.dummyToNodeForVerticalAlignment.has(b)?a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(b)[0]).displacementX:a.idToNodeMap.get(b).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(b).forEach(function(d){if(d.right){var e=a.nodeToTempPositionMapHorizontal.get(d.right)-a.nodeToTempPositionMapHorizontal.get(b)-c;e<d.gap&&(c-=d.gap-e)}else{var e=a.nodeToTempPositionMapHorizontal.get(b)-a.nodeToTempPositionMapHorizontal.get(d.left)+c;e<d.gap&&(c+=d.gap-e)}}),a.nodeToTempPositionMapHorizontal.set(b,a.nodeToTempPositionMapHorizontal.get(b)+c),a.dummyToNodeForVerticalAlignment.has(b)?a.dummyToNodeForVerticalAlignment.get(b).forEach(function(b){a.idToNodeMap.get(b).displacementX=c}):a.idToNodeMap.get(b).displacementX=c}}),this.nodesInRelativeVertical.forEach(function(b){if(!a.fixedNodesOnHorizontal.has(b)){var c=0;c=a.dummyToNodeForHorizontalAlignment.has(b)?a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(b)[0]).displacementY:a.idToNodeMap.get(b).displacementY,a.nodeToRelativeConstraintMapVertical.get(b).forEach(function(d){if(d.bottom){var e=a.nodeToTempPositionMapVertical.get(d.bottom)-a.nodeToTempPositionMapVertical.get(b)-c;e<d.gap&&(c-=d.gap-e)}else{var e=a.nodeToTempPositionMapVertical.get(b)-a.nodeToTempPositionMapVertical.get(d.top)+c;e<d.gap&&(c+=d.gap-e)}}),a.nodeToTempPositionMapVertical.set(b,a.nodeToTempPositionMapVertical.get(b)+c),a.dummyToNodeForHorizontalAlignment.has(b)?a.dummyToNodeForHorizontalAlignment.get(b).forEach(function(b){a.idToNodeMap.get(b).displacementY=c}):a.idToNodeMap.get(b).displacementY=c}});else{for(var c=0;c<this.componentsOnHorizontal.length;c++){var k=this.componentsOnHorizontal[c];if(this.fixedComponentsOnHorizontal[c])for(var e=0;e<k.length;e++)this.dummyToNodeForVerticalAlignment.has(k[e])?this.dummyToNodeForVerticalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementX=0}):this.idToNodeMap.get(k[e]).displacementX=0;else{for(var l=0,m=0,e=0;e<k.length;e++)if(this.dummyToNodeForVerticalAlignment.has(k[e])){var n=this.dummyToNodeForVerticalAlignment.get(k[e]);l+=n.length*this.idToNodeMap.get(n[0]).displacementX,m+=n.length}else l+=this.idToNodeMap.get(k[e]).displacementX,m++;for(var o=l/m,e=0;e<k.length;e++)this.dummyToNodeForVerticalAlignment.has(k[e])?this.dummyToNodeForVerticalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementX=o}):this.idToNodeMap.get(k[e]).displacementX=o}}for(var c=0;c<this.componentsOnVertical.length;c++){var k=this.componentsOnVertical[c];if(this.fixedComponentsOnVertical[c])for(var e=0;e<k.length;e++)this.dummyToNodeForHorizontalAlignment.has(k[e])?this.dummyToNodeForHorizontalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementY=0}):this.idToNodeMap.get(k[e]).displacementY=0;else{for(var l=0,m=0,e=0;e<k.length;e++)if(this.dummyToNodeForHorizontalAlignment.has(k[e])){var n=this.dummyToNodeForHorizontalAlignment.get(k[e]);l+=n.length*this.idToNodeMap.get(n[0]).displacementY,m+=n.length}else l+=this.idToNodeMap.get(k[e]).displacementY,m++;for(var o=l/m,e=0;e<k.length;e++)this.dummyToNodeForHorizontalAlignment.has(k[e])?this.dummyToNodeForHorizontalAlignment.get(k[e]).forEach(function(b){a.idToNodeMap.get(b).displacementY=o}):this.idToNodeMap.get(k[e]).displacementY=o}}}},v.prototype.calculateNodesToApplyGravitationTo=function(){var a,b,c=[],d=this.graphManager.getGraphs(),e=d.length;for(b=0;b<e;b++)(a=d[b]).updateConnected(),a.isConnected||(c=c.concat(a.getNodes()));return c},v.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var b=new Set;for(f=0;f<a.length;f++){var c=a[f];if(!b.has(c)){var d=c.getSource(),e=c.getTarget();if(d==e)c.getBendpoints().push(new n),c.getBendpoints().push(new n),this.createDummyNodesForBendpoints(c),b.add(c);else{var f,g,h=[];if(h=(h=h.concat(d.getEdgeListToNode(e))).concat(e.getEdgeListToNode(d)),!b.has(h[0])){if(h.length>1)for(g=0;g<h.length;g++){var i=h[g];i.getBendpoints().push(new n),this.createDummyNodesForBendpoints(i)}h.forEach(function(a){b.add(a)})}}}if(b.size==a.length)break}},v.prototype.positionNodesRadially=function(a){for(var b=new m(0,0),c=Math.ceil(Math.sqrt(a.length)),d=0,e=0,f=0,g=new n(0,0),h=0;h<a.length;h++){h%c==0&&(f=0,e=d,0!=h&&(e+=i.DEFAULT_COMPONENT_SEPERATION),d=0);var j=a[h],k=p.findCenterOfTree(j);b.x=f,b.y=e,(g=v.radialLayout(j,k,b)).y>d&&(d=Math.floor(g.y)),f=Math.floor(g.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new n(l.WORLD_CENTER_X-g.x/2,l.WORLD_CENTER_Y-g.y/2))},v.radialLayout=function(a,b,c){var d=Math.max(this.maxDiagonalInTree(a),i.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(b,null,0,359,0,d);var e=s.calculateBounds(a),f=new t;f.setDeviceOrgX(e.getMinX()),f.setDeviceOrgY(e.getMinY()),f.setWorldOrgX(c.x),f.setWorldOrgY(c.y);for(var g=0;g<a.length;g++)a[g].transform(f);var h=new n(e.getMaxX(),e.getMaxY());return f.inverseTransformPoint(h)},v.branchRadialLayout=function(a,b,c,d,e,f){var g,h=(d-c+1)/2;h<0&&(h+=180);var i=(h+c)%360*r.TWO_PI/360,j=e*Math.cos(i),k=e*Math.sin(i);a.setCenter(j,k);var l=[],m=(l=l.concat(a.getEdges())).length;null!=b&&m--;for(var n=0,o=l.length,p=a.getEdgesBetween(b);p.length>1;){var q=p[0];p.splice(0,1);var s=l.indexOf(q);s>=0&&l.splice(s,1),o--,m--}g=null!=b?(l.indexOf(p[0])+1)%o:0;for(var t=Math.abs(d-c)/m,u=g;n!=m;u=++u%o){var w=l[u].getOtherEnd(a);if(w!=b){var x=(c+n*t)%360,y=(x+t)%360;v.branchRadialLayout(w,a,x,y,e+f,f),n++}}},v.maxDiagonalInTree=function(a){for(var b=q.MIN_VALUE,c=0;c<a.length;c++){var d=a[c].getDiagonal();d>b&&(b=d)}return b},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var a=this,b={};this.memberGroups={},this.idToDummyNode={};for(var c=[],d=this.graphManager.getAllNodes(),e=0;e<d.length;e++){var f=d[e],h=f.getParent();0!==this.getNodeDegreeWithChildren(f)||void 0!=h.id&&this.getToBeTiled(h)||c.push(f)}for(var e=0;e<c.length;e++){var f=c[e],i=f.getParent().id;void 0===b[i]&&(b[i]=[]),b[i]=b[i].concat(f)}Object.keys(b).forEach(function(c){if(b[c].length>1){var d="DummyCompound_"+c;a.memberGroups[d]=b[c];var e=b[c][0].getParent(),f=new g(a.graphManager);f.id=d,f.paddingLeft=e.paddingLeft||0,f.paddingRight=e.paddingRight||0,f.paddingBottom=e.paddingBottom||0,f.paddingTop=e.paddingTop||0,a.idToDummyNode[d]=f;var h=a.getGraphManager().add(a.newGraph(),f),i=e.getChild();i.add(f);for(var j=0;j<b[c].length;j++){var k=b[c][j];i.remove(k),h.add(k)}}})},v.prototype.clearCompounds=function(){var a={},b={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)b[this.compoundOrder[c].id]=this.compoundOrder[c],a[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,b)},v.prototype.clearZeroDegreeMembers=function(){var a=this,b=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var d=a.idToDummyNode[c];if(b[c]=a.tileNodes(a.memberGroups[c],d.paddingLeft+d.paddingRight),d.rect.width=b[c].width,d.rect.height=b[c].height,d.setCenter(b[c].centerX,b[c].centerY),d.labelMarginLeft=0,d.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var e=d.rect.width,f=d.rect.height;d.labelWidth&&("left"==d.labelPosHorizontal?(d.rect.x-=d.labelWidth,d.setWidth(e+d.labelWidth),d.labelMarginLeft=d.labelWidth):"center"==d.labelPosHorizontal&&d.labelWidth>e?(d.rect.x-=(d.labelWidth-e)/2,d.setWidth(d.labelWidth),d.labelMarginLeft=(d.labelWidth-e)/2):"right"==d.labelPosHorizontal&&d.setWidth(e+d.labelWidth)),d.labelHeight&&("top"==d.labelPosVertical?(d.rect.y-=d.labelHeight,d.setHeight(f+d.labelHeight),d.labelMarginTop=d.labelHeight):"center"==d.labelPosVertical&&d.labelHeight>f?(d.rect.y-=(d.labelHeight-f)/2,d.setHeight(d.labelHeight),d.labelMarginTop=(d.labelHeight-f)/2):"bottom"==d.labelPosVertical&&d.setHeight(f+d.labelHeight))}})},v.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var b=this.compoundOrder[a],c=b.id,d=b.paddingLeft,e=b.paddingTop,f=b.labelMarginLeft,g=b.labelMarginTop;this.adjustLocations(this.tiledMemberPack[c],b.rect.x,b.rect.y,d,e,f,g)}},v.prototype.repopulateZeroDegreeMembers=function(){var a=this,b=this.tiledZeroDegreePack;Object.keys(b).forEach(function(c){var d=a.idToDummyNode[c],e=d.paddingLeft,f=d.paddingTop,g=d.labelMarginLeft,h=d.labelMarginTop;a.adjustLocations(b[c],d.rect.x,d.rect.y,e,f,g,h)})},v.prototype.getToBeTiled=function(a){var b=a.id;if(null!=this.toBeTiled[b])return this.toBeTiled[b];var c=a.getChild();if(null==c)return this.toBeTiled[b]=!1,!1;for(var d=c.getNodes(),e=0;e<d.length;e++){var f=d[e];if(this.getNodeDegree(f)>0)return this.toBeTiled[b]=!1,!1;if(null==f.getChild()){this.toBeTiled[f.id]=!1;continue}if(!this.getToBeTiled(f))return this.toBeTiled[b]=!1,!1}return this.toBeTiled[b]=!0,!0},v.prototype.getNodeDegree=function(a){a.id;for(var b=a.getEdges(),c=0,d=0;d<b.length;d++){var e=b[d];e.getSource().id!==e.getTarget().id&&(c+=1)}return c},v.prototype.getNodeDegreeWithChildren=function(a){var b=this.getNodeDegree(a);if(null==a.getChild())return b;for(var c=a.getChild().getNodes(),d=0;d<c.length;d++){var e=c[d];b+=this.getNodeDegreeWithChildren(e)}return b},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(a){for(var b=0;b<a.length;b++){var c=a[b];null!=c.getChild()&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},v.prototype.adjustLocations=function(a,b,c,d,e,f,g){b+=d+f,c+=e+g;for(var h=b,i=0;i<a.rows.length;i++){var j=a.rows[i];b=h;for(var k=0,l=0;l<j.length;l++){var m=j[l];m.rect.x=b,m.rect.y=c,b+=m.rect.width+a.horizontalPadding,m.rect.height>k&&(k=m.rect.height)}c+=k+a.verticalPadding}},v.prototype.tileCompoundMembers=function(a,b){var c=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(d){var e=b[d];if(c.tiledMemberPack[d]=c.tileNodes(a[d],e.paddingLeft+e.paddingRight),e.rect.width=c.tiledMemberPack[d].width,e.rect.height=c.tiledMemberPack[d].height,e.setCenter(c.tiledMemberPack[d].centerX,c.tiledMemberPack[d].centerY),e.labelMarginLeft=0,e.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var f=e.rect.width,g=e.rect.height;e.labelWidth&&("left"==e.labelPosHorizontal?(e.rect.x-=e.labelWidth,e.setWidth(f+e.labelWidth),e.labelMarginLeft=e.labelWidth):"center"==e.labelPosHorizontal&&e.labelWidth>f?(e.rect.x-=(e.labelWidth-f)/2,e.setWidth(e.labelWidth),e.labelMarginLeft=(e.labelWidth-f)/2):"right"==e.labelPosHorizontal&&e.setWidth(f+e.labelWidth)),e.labelHeight&&("top"==e.labelPosVertical?(e.rect.y-=e.labelHeight,e.setHeight(g+e.labelHeight),e.labelMarginTop=e.labelHeight):"center"==e.labelPosVertical&&e.labelHeight>g?(e.rect.y-=(e.labelHeight-g)/2,e.setHeight(e.labelHeight),e.labelMarginTop=(e.labelHeight-g)/2):"bottom"==e.labelPosVertical&&e.setHeight(g+e.labelHeight))}})},v.prototype.tileNodes=function(a,b){var c=this.tileNodesByFavoringDim(a,b,!0),d=this.tileNodesByFavoringDim(a,b,!1),e=this.getOrgRatio(c);return this.getOrgRatio(d)<e?d:c},v.prototype.getOrgRatio=function(a){var b=a.width/a.height;return b<1&&(b=1/b),b},v.prototype.calcIdealRowWidth=function(a,b){var c,d=i.TILING_PADDING_VERTICAL,e=i.TILING_PADDING_HORIZONTAL,f=a.length,g=0,h=0,j=0;a.forEach(function(a){g+=a.getWidth(),h+=a.getHeight(),a.getWidth()>j&&(j=a.getWidth())});var k=g/f,l=Math.pow(d-e,2)+4*(k+e)*(h/f+d)*f,m=(e-d+Math.sqrt(l))/(2*(k+e));b?(c=Math.ceil(m))==m&&c++:c=Math.floor(m);var n=c*(k+e)-e;return j>n&&(n=j),n+=2*e},v.prototype.tileNodesByFavoringDim=function(a,b,c){var d=i.TILING_PADDING_VERTICAL,e=i.TILING_PADDING_HORIZONTAL,f=i.TILING_COMPARE_BY,g={rows:[],rowWidth:[],rowHeight:[],width:0,height:b,verticalPadding:d,horizontalPadding:e,centerX:0,centerY:0};f&&(g.idealRowWidth=this.calcIdealRowWidth(a,c));var h=function(a){return a.rect.width*a.rect.height},j=function(a,b){return h(b)-h(a)};a.sort(function(a,b){var c=j;return g.idealRowWidth?(c=f)(a.id,b.id):c(a,b)});for(var k=0,l=0,m=0;m<a.length;m++){var n=a[m];k+=n.getCenterX(),l+=n.getCenterY()}g.centerX=k/a.length,g.centerY=l/a.length;for(var m=0;m<a.length;m++){var n=a[m];if(0==g.rows.length)this.insertNodeToRow(g,n,0,b);else if(this.canAddHorizontal(g,n.rect.width,n.rect.height)){var o=g.rows.length-1;g.idealRowWidth||(o=this.getShortestRowIndex(g)),this.insertNodeToRow(g,n,o,b)}else this.insertNodeToRow(g,n,g.rows.length,b);this.shiftToLastRow(g)}return g},v.prototype.insertNodeToRow=function(a,b,c,d){c==a.rows.length&&(a.rows.push([]),a.rowWidth.push(d),a.rowHeight.push(0));var e=a.rowWidth[c]+b.rect.width;a.rows[c].length>0&&(e+=a.horizontalPadding),a.rowWidth[c]=e,a.width<e&&(a.width=e);var f=b.rect.height;c>0&&(f+=a.verticalPadding);var g=0;f>a.rowHeight[c]&&(g=a.rowHeight[c],a.rowHeight[c]=f,g=a.rowHeight[c]-g),a.height+=g,a.rows[c].push(b)},v.prototype.getShortestRowIndex=function(a){for(var b=-1,c=Number.MAX_VALUE,d=0;d<a.rows.length;d++)a.rowWidth[d]<c&&(b=d,c=a.rowWidth[d]);return b},v.prototype.getLongestRowIndex=function(a){for(var b=-1,c=5e-324,d=0;d<a.rows.length;d++)a.rowWidth[d]>c&&(b=d,c=a.rowWidth[d]);return b},v.prototype.canAddHorizontal=function(a,b,c){if(a.idealRowWidth){var d,e,f=a.rows.length-1;return a.rowWidth[f]+b+a.horizontalPadding<=a.idealRowWidth}var g=this.getShortestRowIndex(a);if(g<0)return!0;var h=a.rowWidth[g];if(h+a.horizontalPadding+b<=a.width)return!0;var i=0;return a.rowHeight[g]<c&&g>0&&(i=c+a.verticalPadding-a.rowHeight[g]),d=a.width-h>=b+a.horizontalPadding?(a.height+i)/(h+b+a.horizontalPadding):(a.height+i)/a.width,i=c+a.verticalPadding,(e=a.width<b?(a.height+i)/b:(a.height+i)/a.width)<1&&(e=1/e),d<1&&(d=1/d),d<e},v.prototype.shiftToLastRow=function(a){var b=this.getLongestRowIndex(a),c=a.rowWidth.length-1,d=a.rows[b],e=d[d.length-1],f=e.width+a.horizontalPadding;if(a.width-a.rowWidth[c]>f&&b!=c){d.splice(-1,1),a.rows[c].push(e),a.rowWidth[b]=a.rowWidth[b]-f,a.rowWidth[c]=a.rowWidth[c]+f,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var g=5e-324,h=0;h<d.length;h++)d[h].height>g&&(g=d[h].height);b>0&&(g+=a.verticalPadding);var i=a.rowHeight[b]+a.rowHeight[c];a.rowHeight[b]=g,a.rowHeight[c]<e.height+a.verticalPadding&&(a.rowHeight[c]=e.height+a.verticalPadding);var j=a.rowHeight[b]+a.rowHeight[c];a.height+=j-i,this.shiftToLastRow(a)}},v.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var a,b=[],c=!0;c;){var d=this.graphManager.getAllNodes(),e=[];c=!1;for(var f=0;f<d.length;f++)if(1==(a=d[f]).getEdges().length&&!a.getEdges()[0].isInterGraph&&null==a.getChild()){if(i.PURE_INCREMENTAL){var g=a.getEdges()[0].getOtherEnd(a),h=new o(a.getCenterX()-g.getCenterX(),a.getCenterY()-g.getCenterY());e.push([a,a.getEdges()[0],a.getOwner(),h])}else e.push([a,a.getEdges()[0],a.getOwner()]);c=!0}if(!0==c){for(var j=[],k=0;k<e.length;k++)1==e[k][0].getEdges().length&&(j.push(e[k]),e[k][0].getOwner().remove(e[k][0]));b.push(j),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=b},v.prototype.growTree=function(a){for(var b,c=a.length,d=a[c-1],e=0;e<d.length;e++)b=d[e],this.findPlaceforPrunedNode(b),b[2].add(b[0]),b[2].add(b[1],b[1].source,b[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(a){var b=a[0];if(d=b==a[1].source?a[1].target:a[1].source,i.PURE_INCREMENTAL)b.setCenter(d.getCenterX()+a[3].getWidth(),d.getCenterY()+a[3].getHeight());else{var c,d,e,f,g=d.startX,h=d.finishX,j=d.startY,l=d.finishY,m=[0,0,0,0];if(j>0)for(var n=g;n<=h;n++)m[0]+=this.grid[n][j-1].length+this.grid[n][j].length-1;if(h<this.grid.length-1)for(var n=j;n<=l;n++)m[1]+=this.grid[h+1][n].length+this.grid[h][n].length-1;if(l<this.grid[0].length-1)for(var n=g;n<=h;n++)m[2]+=this.grid[n][l+1].length+this.grid[n][l].length-1;if(g>0)for(var n=j;n<=l;n++)m[3]+=this.grid[g-1][n].length+this.grid[g][n].length-1;for(var o=q.MAX_VALUE,p=0;p<m.length;p++)m[p]<o?(o=m[p],e=1,f=p):m[p]==o&&e++;if(3==e&&0==o)0==m[0]&&0==m[1]&&0==m[2]?c=1:0==m[0]&&0==m[1]&&0==m[3]?c=0:0==m[0]&&0==m[2]&&0==m[3]?c=3:0==m[1]&&0==m[2]&&0==m[3]&&(c=2);else if(2==e&&0==o){var r=Math.floor(2*Math.random());c=0==m[0]&&0==m[1]?+(0!=r):0==m[0]&&0==m[2]?2*(0!=r):0==m[0]&&0==m[3]?3*(0!=r):0==m[1]&&0==m[2]?0==r?1:2:0==m[1]&&0==m[3]?0==r?1:3:0==r?2:3}else if(4==e&&0==o){var r=Math.floor(4*Math.random());c=r}else c=f;0==c?b.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-k.DEFAULT_EDGE_LENGTH-b.getHeight()/2):1==c?b.setCenter(d.getCenterX()+d.getWidth()/2+k.DEFAULT_EDGE_LENGTH+b.getWidth()/2,d.getCenterY()):2==c?b.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+k.DEFAULT_EDGE_LENGTH+b.getHeight()/2):b.setCenter(d.getCenterX()-d.getWidth()/2-k.DEFAULT_EDGE_LENGTH-b.getWidth()/2,d.getCenterY())}},a.exports=v},991:(a,b,c)=>{var d=c(551).FDLayoutNode,e=c(551).IMath;function f(a,b,c,e){d.call(this,a,b,c,e)}for(var g in f.prototype=Object.create(d.prototype),d)f[g]=d[g];f.prototype.calculateDisplacement=function(){var a=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=a.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=a.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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*e.sign(this.displacementX)),Math.abs(this.displacementY)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementY=a.coolingFactor*a.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(a,b){for(var c,d=this.getChild().getNodes(),e=0;e<d.length;e++)null==(c=d[e]).getChild()?(c.displacementX+=a,c.displacementY+=b):c.propogateDisplacementToChildren(a,b)},f.prototype.move=function(){var a=this.graphManager.getLayout();(null==this.child||0==this.child.getNodes().length)&&(this.moveBy(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},f.prototype.setPred1=function(a){this.pred1=a},f.prototype.getPred1=function(){return pred1},f.prototype.getPred2=function(){return pred2},f.prototype.setNext=function(a){this.next=a},f.prototype.getNext=function(){return next},f.prototype.setProcessed=function(a){this.processed=a},f.prototype.isProcessed=function(){return processed},a.exports=f},902:(a,b,c)=>{function d(a){if(!Array.isArray(a))return Array.from(a);for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}var e=c(806),f=c(551).LinkedList,g=c(551).Matrix,h=c(551).SVD;function i(){}i.handleConstraints=function(a){var b={};b.fixedNodeConstraint=a.constraints.fixedNodeConstraint,b.alignmentConstraint=a.constraints.alignmentConstraint,b.relativePlacementConstraint=a.constraints.relativePlacementConstraint;for(var c=new Map,i=new Map,j=[],k=[],l=a.getAllNodes(),m=0,n=0;n<l.length;n++){var o=l[n];null==o.getChild()&&(i.set(o.id,m++),j.push(o.getCenterX()),k.push(o.getCenterY()),c.set(o.id,o))}b.relativePlacementConstraint&&b.relativePlacementConstraint.forEach(function(a){a.gap||0==a.gap||(a.left?a.gap=e.DEFAULT_EDGE_LENGTH+c.get(a.left).getWidth()/2+c.get(a.right).getWidth()/2:a.gap=e.DEFAULT_EDGE_LENGTH+c.get(a.top).getHeight()/2+c.get(a.bottom).getHeight()/2)});var p=function(a){var b=0,c=0;return a.forEach(function(a){b+=j[i.get(a)],c+=k[i.get(a)]}),{x:b/a.size,y:c/a.size}},q=function(a,b,c,e,g){var h=new Map;a.forEach(function(a,b){h.set(b,0)}),a.forEach(function(a,b){a.forEach(function(a){h.set(a.id,h.get(a.id)+1)})});var l=new Map,m=new Map,n=new f;for(h.forEach(function(a,d){0==a?(n.push(d),c||("horizontal"==b?l.set(d,i.has(d)?j[i.get(d)]:e.get(d)):l.set(d,i.has(d)?k[i.get(d)]:e.get(d)))):l.set(d,-1/0),c&&m.set(d,new Set([d]))}),c&&g.forEach(function(a){var d=[];if(a.forEach(function(a){c.has(a)&&d.push(a)}),d.length>0){var f=0;d.forEach(function(a){"horizontal"==b?l.set(a,i.has(a)?j[i.get(a)]:e.get(a)):l.set(a,i.has(a)?k[i.get(a)]:e.get(a)),f+=l.get(a)}),f/=d.length,a.forEach(function(a){c.has(a)||l.set(a,f)})}else{var g=0;a.forEach(function(a){"horizontal"==b?g+=i.has(a)?j[i.get(a)]:e.get(a):g+=i.has(a)?k[i.get(a)]:e.get(a)}),g/=a.length,a.forEach(function(a){l.set(a,g)})}});0!=n.length;)!function(){var d=n.shift();a.get(d).forEach(function(a){if(l.get(a.id)<l.get(d)+a.gap)if(c&&c.has(a.id)){var f=void 0;if(f="horizontal"==b?i.has(a.id)?j[i.get(a.id)]:e.get(a.id):i.has(a.id)?k[i.get(a.id)]:e.get(a.id),l.set(a.id,f),f<l.get(d)+a.gap){var g=l.get(d)+a.gap-f;m.get(d).forEach(function(a){l.set(a,l.get(a)-g)})}}else l.set(a.id,l.get(d)+a.gap);h.set(a.id,h.get(a.id)-1),0==h.get(a.id)&&n.push(a.id),c&&m.set(a.id,function(a,b){var c=new Set(a),d=!0,e=!1,f=void 0;try{for(var g,h=b[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var i=g.value;c.add(i)}}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}(m.get(d),m.get(a.id)))})}();if(c){var o=new Set;a.forEach(function(a,b){0==a.length&&o.add(b)});var p=[];m.forEach(function(a,b){if(o.has(b)){var e=!1,f=!0,g=!1,h=void 0;try{for(var i,j=a[Symbol.iterator]();!(f=(i=j.next()).done);f=!0){var k=i.value;c.has(k)&&(e=!0)}}catch(a){g=!0,h=a}finally{try{!f&&j.return&&j.return()}finally{if(g)throw h}}if(!e){var l=!1,m=void 0;p.forEach(function(b,c){b.has([].concat(d(a))[0])&&(l=!0,m=c)}),l?a.forEach(function(a){p[m].add(a)}):p.push(new Set(a))}}}),p.forEach(function(a,c){var d=1/0,f=1/0,g=-1/0,h=-1/0,m=!0,n=!1,o=void 0;try{for(var p,q=a[Symbol.iterator]();!(m=(p=q.next()).done);m=!0){var r=p.value,s=void 0;s="horizontal"==b?i.has(r)?j[i.get(r)]:e.get(r):i.has(r)?k[i.get(r)]:e.get(r);var t=l.get(r);s<d&&(d=s),s>g&&(g=s),t<f&&(f=t),t>h&&(h=t)}}catch(a){n=!0,o=a}finally{try{!m&&q.return&&q.return()}finally{if(n)throw o}}var u=(d+g)/2-(f+h)/2,v=!0,w=!1,x=void 0;try{for(var y,z=a[Symbol.iterator]();!(v=(y=z.next()).done);v=!0){var A=y.value;l.set(A,l.get(A)+u)}}catch(a){w=!0,x=a}finally{try{!v&&z.return&&z.return()}finally{if(w)throw x}}})}return l},r=function(a){var b=0,c=0,d=0,e=0;if(a.forEach(function(a){a.left?j[i.get(a.left)]-j[i.get(a.right)]>=0?b++:c++:k[i.get(a.top)]-k[i.get(a.bottom)]>=0?d++:e++}),b>c&&d>e)for(var f=0;f<i.size;f++)j[f]=-1*j[f],k[f]=-1*k[f];else if(b>c)for(var g=0;g<i.size;g++)j[g]=-1*j[g];else if(d>e)for(var h=0;h<i.size;h++)k[h]=-1*k[h]},s=function(a){var b=[],c=new f,d=new Set,e=0;return a.forEach(function(f,g){if(!d.has(g)){b[e]=[];var h=g;for(c.push(h),d.add(h),b[e].push(h);0!=c.length;)h=c.shift(),a.get(h).forEach(function(a){d.has(a.id)||(c.push(a.id),d.add(a.id),b[e].push(a.id))});e++}}),b},t=function(a){var b=new Map;return a.forEach(function(a,c){b.set(c,[])}),a.forEach(function(a,c){a.forEach(function(a){b.get(c).push(a),b.get(a.id).push({id:c,gap:a.gap,direction:a.direction})})}),b},u=function(a){var b=new Map;return a.forEach(function(a,c){b.set(c,[])}),a.forEach(function(a,c){a.forEach(function(a){b.get(a.id).push({id:c,gap:a.gap,direction:a.direction})})}),b},v=[],w=[],x=!1,y=!1,z=new Set,A=new Map,B=new Map,C=[];if(b.fixedNodeConstraint&&b.fixedNodeConstraint.forEach(function(a){z.add(a.nodeId)}),b.relativePlacementConstraint&&(b.relativePlacementConstraint.forEach(function(a){a.left?(A.has(a.left)?A.get(a.left).push({id:a.right,gap:a.gap,direction:"horizontal"}):A.set(a.left,[{id:a.right,gap:a.gap,direction:"horizontal"}]),A.has(a.right)||A.set(a.right,[])):(A.has(a.top)?A.get(a.top).push({id:a.bottom,gap:a.gap,direction:"vertical"}):A.set(a.top,[{id:a.bottom,gap:a.gap,direction:"vertical"}]),A.has(a.bottom)||A.set(a.bottom,[]))}),C=s(B=t(A))),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(b.fixedNodeConstraint&&b.fixedNodeConstraint.length>1)b.fixedNodeConstraint.forEach(function(a,b){v[b]=[a.position.x,a.position.y],w[b]=[j[i.get(a.nodeId)],k[i.get(a.nodeId)]]}),x=!0;else if(b.alignmentConstraint)!function(){var a=0;if(b.alignmentConstraint.vertical){for(var c=b.alignmentConstraint.vertical,e=0;e<c.length;e++)!function(b){var e=new Set;c[b].forEach(function(a){e.add(a)});var f=new Set([].concat(d(e)).filter(function(a){return z.has(a)})),g=void 0;g=f.size>0?j[i.get(f.values().next().value)]:p(e).x,c[b].forEach(function(b){v[a]=[g,k[i.get(b)]],w[a]=[j[i.get(b)],k[i.get(b)]],a++})}(e);x=!0}if(b.alignmentConstraint.horizontal){for(var f=b.alignmentConstraint.horizontal,g=0;g<f.length;g++)!function(b){var c=new Set;f[b].forEach(function(a){c.add(a)});var e=new Set([].concat(d(c)).filter(function(a){return z.has(a)})),g=void 0;g=e.size>0?j[i.get(e.values().next().value)]:p(c).y,f[b].forEach(function(b){v[a]=[j[i.get(b)],g],w[a]=[j[i.get(b)],k[i.get(b)]],a++})}(g);x=!0}b.relativePlacementConstraint&&(y=!0)}();else if(b.relativePlacementConstraint){for(var D=0,E=0,F=0;F<C.length;F++)C[F].length>D&&(D=C[F].length,E=F);if(D<B.size/2)r(b.relativePlacementConstraint),x=!1,y=!1;else{var G=new Map,H=new Map,I=[];C[E].forEach(function(a){A.get(a).forEach(function(b){"horizontal"==b.direction?(G.has(a)?G.get(a).push(b):G.set(a,[b]),G.has(b.id)||G.set(b.id,[]),I.push({left:a,right:b.id})):(H.has(a)?H.get(a).push(b):H.set(a,[b]),H.has(b.id)||H.set(b.id,[]),I.push({top:a,bottom:b.id}))})}),r(I),y=!1;var J=q(G,"horizontal"),K=q(H,"vertical");C[E].forEach(function(a,b){w[b]=[j[i.get(a)],k[i.get(a)]],v[b]=[],J.has(a)?v[b][0]=J.get(a):v[b][0]=j[i.get(a)],K.has(a)?v[b][1]=K.get(a):v[b][1]=k[i.get(a)]}),x=!0}}if(x){for(var L=void 0,M=g.transpose(v),N=g.transpose(w),O=0;O<M.length;O++)M[O]=g.multGamma(M[O]),N[O]=g.multGamma(N[O]);var P=g.multMat(M,g.transpose(N)),Q=h.svd(P);L=g.multMat(Q.V,g.transpose(Q.U));for(var R=0;R<i.size;R++){var S=[j[R],k[R]],T=[L[0][0],L[1][0]],U=[L[0][1],L[1][1]];j[R]=g.dotProduct(S,T),k[R]=g.dotProduct(S,U)}y&&r(b.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(b.fixedNodeConstraint&&b.fixedNodeConstraint.length>0){var V={x:0,y:0};b.fixedNodeConstraint.forEach(function(a,b){var c,d={x:j[i.get(a.nodeId)],y:k[i.get(a.nodeId)]},e=(c=a.position,{x:c.x-d.x,y:c.y-d.y});V.x+=e.x,V.y+=e.y}),V.x/=b.fixedNodeConstraint.length,V.y/=b.fixedNodeConstraint.length,j.forEach(function(a,b){j[b]+=V.x}),k.forEach(function(a,b){k[b]+=V.y}),b.fixedNodeConstraint.forEach(function(a){j[i.get(a.nodeId)]=a.position.x,k[i.get(a.nodeId)]=a.position.y})}if(b.alignmentConstraint){if(b.alignmentConstraint.vertical)for(var W=b.alignmentConstraint.vertical,X=0;X<W.length;X++)!function(a){var b=new Set;W[a].forEach(function(a){b.add(a)});var c=new Set([].concat(d(b)).filter(function(a){return z.has(a)})),e=void 0;e=c.size>0?j[i.get(c.values().next().value)]:p(b).x,b.forEach(function(a){z.has(a)||(j[i.get(a)]=e)})}(X);if(b.alignmentConstraint.horizontal)for(var Y=b.alignmentConstraint.horizontal,Z=0;Z<Y.length;Z++)!function(a){var b=new Set;Y[a].forEach(function(a){b.add(a)});var c=new Set([].concat(d(b)).filter(function(a){return z.has(a)})),e=void 0;e=c.size>0?k[i.get(c.values().next().value)]:p(b).y,b.forEach(function(a){z.has(a)||(k[i.get(a)]=e)})}(Z)}b.relativePlacementConstraint&&function(){var a=new Map,c=new Map,d=new Map,e=new Map,f=new Map,g=new Map,h=new Set,l=new Set;if(z.forEach(function(a){h.add(a),l.add(a)}),b.alignmentConstraint){if(b.alignmentConstraint.vertical)for(var m=b.alignmentConstraint.vertical,n=function(b){d.set("dummy"+b,[]),m[b].forEach(function(c){a.set(c,"dummy"+b),d.get("dummy"+b).push(c),z.has(c)&&h.add("dummy"+b)}),f.set("dummy"+b,j[i.get(m[b][0])])},o=0;o<m.length;o++)n(o);if(b.alignmentConstraint.horizontal)for(var p=b.alignmentConstraint.horizontal,r=function(a){e.set("dummy"+a,[]),p[a].forEach(function(b){c.set(b,"dummy"+a),e.get("dummy"+a).push(b),z.has(b)&&l.add("dummy"+a)}),g.set("dummy"+a,k[i.get(p[a][0])])},v=0;v<p.length;v++)r(v)}var w=new Map,x=new Map,y=function(b){A.get(b).forEach(function(d){var e=void 0,f=void 0;"horizontal"==d.direction?(e=a.get(b)?a.get(b):b,f=a.get(d.id)?{id:a.get(d.id),gap:d.gap,direction:d.direction}:d,w.has(e)?w.get(e).push(f):w.set(e,[f]),w.has(f.id)||w.set(f.id,[])):(e=c.get(b)?c.get(b):b,f=c.get(d.id)?{id:c.get(d.id),gap:d.gap,direction:d.direction}:d,x.has(e)?x.get(e).push(f):x.set(e,[f]),x.has(f.id)||x.set(f.id,[]))})},B=!0,C=!1,D=void 0;try{for(var E,F=A.keys()[Symbol.iterator]();!(B=(E=F.next()).done);B=!0){var G=E.value;y(G)}}catch(a){C=!0,D=a}finally{try{!B&&F.return&&F.return()}finally{if(C)throw D}}var H=t(w),I=t(x),J=s(H),K=s(I),L=u(w),M=u(x),N=[],O=[];J.forEach(function(a,b){N[b]=[],a.forEach(function(a){0==L.get(a).length&&N[b].push(a)})}),K.forEach(function(a,b){O[b]=[],a.forEach(function(a){0==M.get(a).length&&O[b].push(a)})});var P=q(w,"horizontal",h,f,N),Q=q(x,"vertical",l,g,O),R=function(a){d.get(a)?d.get(a).forEach(function(b){j[i.get(b)]=P.get(a)}):j[i.get(a)]=P.get(a)},S=!0,T=!1,U=void 0;try{for(var V,W=P.keys()[Symbol.iterator]();!(S=(V=W.next()).done);S=!0){var X=V.value;R(X)}}catch(a){T=!0,U=a}finally{try{!S&&W.return&&W.return()}finally{if(T)throw U}}var Y=function(a){e.get(a)?e.get(a).forEach(function(b){k[i.get(b)]=Q.get(a)}):k[i.get(a)]=Q.get(a)},Z=!0,$=!1,_=void 0;try{for(var aa,ab=Q.keys()[Symbol.iterator]();!(Z=(aa=ab.next()).done);Z=!0){var X=aa.value;Y(X)}}catch(a){$=!0,_=a}finally{try{!Z&&ab.return&&ab.return()}finally{if($)throw _}}}()}for(var $=0;$<l.length;$++){var _=l[$];null==_.getChild()&&_.setCenter(j[i.get(_.id)],k[i.get(_.id)])}},a.exports=i},551:a=>{a.exports=d}},b={};return function c(d){var e=b[d];if(void 0!==e)return e.exports;var f=b[d]={exports:{}};return a[d](f,f.exports,c),f.exports}(45)})()}};
|