webapp.flowDiagram-b222e15a.290d4111.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of langgraph4j-studio-jetty Show documentation
Show all versions of langgraph4j-studio-jetty Show documentation
an **embed playground webapp** to run a Langgraph4j workflow in visual way
The newest version!
function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t=globalThis.parcelRequire0031,n=t.register;n("bZ3BC",function(n,r){e(n.exports,"default",()=>l);var u=t("exqIp"),a=t("lvgV1"),o=t("fAzJF"),f=t("ceNjR"),d=Object.prototype,i=d.hasOwnProperty,l=(0,u.default)(function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&(0,o.default)(t[0],t[1],u)&&(r=1);++nt("4eF3g").layout),t("5W7Tz"),t("4eF3g"),t("hYbQT"),t("5kKE0")}),n("5W7Tz",function(n,r){e(n.exports,"run",()=>d),e(n.exports,"undo",()=>i);var u=t("fpekr"),a=t("8XLqy"),o=t("5GUsF"),f=t("2IgCr");function d(e){var t,n,r,d="greedy"===e.graph().acyclicer?(0,f.greedyFAS)(e,function(t){return e.edge(t).weight}):(t=[],n={},r={},u.default(e.nodes(),function o(f){a.default(r,f)||(r[f]=!0,n[f]=!0,u.default(e.outEdges(f),function(e){a.default(n,e.w)?t.push(e):o(e.w)}),delete n[f])}),t);u.default(d,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,o.default("rev"))})}function i(e){u.default(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}),n("5GUsF",function(n,r){e(n.exports,"default",()=>o);var u=t("1fnxW"),a=0,o=function(e){var t=++a;return(0,u.default)(e)+t}}),n("2IgCr",function(n,r){e(n.exports,"greedyFAS",()=>c);var u=t("5Oe6X"),a=t("0MuaS"),o=t("fpekr"),f=t("3kePu"),d=t("jJJbn"),i=t("4LkSm"),l=t("dWsTS"),s=u.default(1);function c(e,t){if(1>=e.nodeCount())return[];var n,r,u,c,g,p,m=(n=t||s,r=new i.Graph,u=0,c=0,o.default(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),o.default(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,a=n(e);r.setEdge(e.v,e.w,t+a),c=Math.max(c,r.node(e.v).out+=a),u=Math.max(u,r.node(e.w).in+=a)}),g=d.default(c+u+3).map(function(){return new l.List}),p=u+1,o.default(r.nodes(),function(e){v(g,p,r.node(e))}),{graph:r,buckets:g,zeroIdx:p}),b=function(e,t,n){for(var r,u=[],a=t[t.length-1],o=t[0];e.nodeCount();){for(;r=o.dequeue();)h(e,t,n,r);for(;r=a.dequeue();)h(e,t,n,r);if(e.nodeCount()){for(var f=t.length-2;f>0;--f)if(r=t[f].dequeue()){u=u.concat(h(e,t,n,r,!0));break}}}return u}(m.graph,m.buckets,m.zeroIdx);return a.default(f.default(b,function(t){return e.outEdges(t.v,t.w)}))}function h(e,t,n,r,u){var a=u?[]:void 0;return o.default(e.inEdges(r.v),function(r){var o=e.edge(r),f=e.node(r.v);u&&a.push({v:r.v,w:r.w}),f.out-=o,v(t,n,f)}),o.default(e.outEdges(r.v),function(r){var u=e.edge(r),a=r.w,o=e.node(a);o.in-=u,v(t,n,o)}),e.removeNode(r.v),a}function v(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}}),n("0MuaS",function(n,r){e(n.exports,"default",()=>a);var u=t("kQGD1"),a=function(e){return(null==e?0:e.length)?(0,u.default)(e,1):[]}}),n("3kePu",function(n,r){e(n.exports,"default",()=>d);var u=t("afgje"),a=t("dKmGr"),o=t("7dWrG"),f=t("hf0C9"),d=function(e,t){return((0,f.default)(e)?u.default:o.default)(e,(0,a.default)(t,3))}}),n("7dWrG",function(n,r){e(n.exports,"default",()=>o);var u=t("irzyZ"),a=t("lAOUf"),o=function(e,t){var n=-1,r=(0,a.default)(e)?Array(e.length):[];return(0,u.default)(e,function(e,u,a){r[++n]=t(e,u,a)}),r}}),n("jJJbn",function(n,r){e(n.exports,"default",()=>u);var u=(0,t("aDTIR").default)()}),n("aDTIR",function(n,r){e(n.exports,"default",()=>f);var u=t("HXpAz"),a=t("fAzJF"),o=t("7exj4"),f=function(e){return function(t,n,r){return r&&"number"!=typeof r&&(0,a.default)(t,n,r)&&(n=r=void 0),t=(0,o.default)(t),void 0===n?(n=t,t=0):n=(0,o.default)(n),r=void 0===r?ta);var r=Math.ceil,u=Math.max,a=function(e,t,n,a){for(var o=-1,f=u(r((t-e)/(n||1)),0),d=Array(f);f--;)d[a?f:++o]=e,e+=n;return d}}),n("7exj4",function(n,r){e(n.exports,"default",()=>o);var u=t("1fkDi"),a=1/0,o=function(e){return e?(e=(0,u.default)(e))===a||e===-a?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}}),n("1fkDi",function(n,r){e(n.exports,"default",()=>c);var u=t("8N45u"),a=t("iYDsF"),o=t("1WN0o"),f=0/0,d=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,c=function(e){if("number"==typeof e)return e;if((0,o.default)(e))return f;if((0,a.default)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.default)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=(0,u.default)(e);var n=i.test(e);return n||l.test(e)?s(e.slice(2),n?2:8):d.test(e)?f:+e}}),n("8N45u",function(n,r){e(n.exports,"default",()=>o);var u=t("iu14O"),a=/^\s+/,o=function(e){return e?e.slice(0,(0,u.default)(e)+1).replace(a,""):e}}),n("iu14O",function(t,n){e(t.exports,"default",()=>u);var r=/\s/,u=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}),n("dWsTS",function(t,n){e(t.exports,"List",()=>r);class r{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return u(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&u(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,a)),n=n._prev;return"["+e.join(", ")+"]"}}function u(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function a(e,t){if("_next"!==e&&"_prev"!==e)return t}}),n("4eF3g",function(n,r){e(n.exports,"layout",()=>E);var u=t("bZ3BC"),a=t("fpekr"),o=t("8XLqy"),f=t("ke5ip"),d=t("hnngZ"),i=t("jPETu"),l=t("gocXo"),s=t("3mNDi"),c=t("4LkSm"),h=t("dQ1Uz"),v=t("1OyGc"),g=t("5W7Tz"),p=t("hYbQT"),m=t("5kKE0"),b=t("3EZuT"),x=t("6B9pM"),y=t("52JBL"),w=t("2Zs6a"),k=t("f1L0M");function E(e,t){var n=t&&t.debugTiming?k.time:k.notime;n("layout",function(){var t=n(" buildLayoutGraph",function(){var t,n;return t=new c.Graph({multigraph:!0,compound:!0}),n=C(e.graph()),t.setGraph(l.default({},L,j(n,N),s.default(n,I))),a.default(e.nodes(),function(n){var r=C(e.node(n));t.setNode(n,u.default(j(r,_),T)),t.setParent(n,e.parent(n))}),a.default(e.edges(),function(n){var r=C(e.edge(n));t.setEdge(n,l.default({},R,j(r,S),s.default(r,M)))}),t});n(" runLayout",function(){n(" makeSpaceForEdgeLabels",function(){var e;e=t.graph(),e.ranksep/=2,a.default(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}),n(" removeSelfEdges",function(){a.default(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),n(" acyclic",function(){g.run(t)}),n(" nestingGraph.run",function(){b.run(t)}),n(" rank",function(){(0,m.rank)(k.asNonCompoundGraph(t))}),n(" injectEdgeLabelProxies",function(){a.default(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),u={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};k.addDummyNode(t,"edge-proxy",u,"_ep")}})}),n(" removeEmptyRanks",function(){k.removeEmptyRanks(t)}),n(" nestingGraph.cleanup",function(){b.cleanup(t)}),n(" normalizeRanks",function(){k.normalizeRanks(t)}),n(" assignRankMinMax",function(){var e;e=0,a.default(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=i.default(e,r.maxRank))}),t.graph().maxRank=e}),n(" removeEdgeLabelProxies",function(){a.default(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}),n(" normalize.run",function(){p.run(t)}),n(" parentDummyChains",function(){(0,y.parentDummyChains)(t)}),n(" addBorderSegments",function(){(0,h.addBorderSegments)(t)}),n(" order",function(){(0,x.order)(t)}),n(" insertSelfEdges",function(){var e;e=k.buildLayerMatrix(t),a.default(e,function(e){var n=0;a.default(e,function(e,r){var u=t.node(e);u.order=r+n,a.default(u.selfEdges,function(e){k.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:u.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete u.selfEdges})})}),n(" adjustCoordinateSystem",function(){v.adjust(t)}),n(" position",function(){(0,w.position)(t)}),n(" positionSelfEdges",function(){a.default(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),u=r.x+r.width/2,a=r.y,o=n.x-u,f=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:u+2*o/3,y:a-f},{x:u+5*o/6,y:a-f},{x:u+o,y:a},{x:u+5*o/6,y:a+f},{x:u+2*o/3,y:a+f}],n.label.x=n.x,n.label.y=n.y}})}),n(" removeBorderNodes",function(){a.default(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),u=t.node(n.borderBottom),a=t.node(f.default(n.borderLeft)),o=t.node(f.default(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(u.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),a.default(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}),n(" normalize.undo",function(){p.undo(t)}),n(" fixupEdgeLabelCoords",function(){a.default(t.edges(),function(e){var n=t.edge(e);if(o.default(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}),n(" undoCoordinateSystem",function(){v.undo(t)}),n(" translateGraph",function(){(function(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,u=0,f=e.graph(),d=f.marginx||0,i=f.marginy||0;function l(e){var a=e.x,o=e.y,f=e.width,d=e.height;t=Math.min(t,a-f/2),n=Math.max(n,a+f/2),r=Math.min(r,o-d/2),u=Math.max(u,o+d/2)}a.default(e.nodes(),function(t){l(e.node(t))}),a.default(e.edges(),function(t){var n=e.edge(t);o.default(n,"x")&&l(n)}),t-=d,r-=i,a.default(e.nodes(),function(n){var u=e.node(n);u.x-=t,u.y-=r}),a.default(e.edges(),function(n){var u=e.edge(n);a.default(u.points,function(e){e.x-=t,e.y-=r}),o.default(u,"x")&&(u.x-=t),o.default(u,"y")&&(u.y-=r)}),f.width=n-t+d,f.height=u-r+i})(t)}),n(" assignNodeIntersects",function(){a.default(t.edges(),function(e){var n,r,u=t.edge(e),a=t.node(e.v),o=t.node(e.w);u.points?(n=u.points[0],r=u.points[u.points.length-1]):(u.points=[],n=o,r=a),u.points.unshift(k.intersectRect(a,n)),u.points.push(k.intersectRect(o,r))})}),n(" reversePoints",function(){a.default(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}),n(" acyclic.undo",function(){g.undo(t)})}),n(" updateInputGraph",function(){a.default(e.nodes(),function(n){var r=e.node(n),u=t.node(n);r&&(r.x=u.x,r.y=u.y,t.children(n).length&&(r.width=u.width,r.height=u.height))}),a.default(e.edges(),function(n){var r=e.edge(n),u=t.edge(n);r.points=u.points,o.default(u,"x")&&(r.x=u.x,r.y=u.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height})})}var N=["nodesep","edgesep","ranksep","marginx","marginy"],L={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],_=["width","height"],T={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],R={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function j(e,t){return d.default(s.default(e,t),Number)}function C(e){var t={};return a.default(e,function(e,n){t[n.toLowerCase()]=e}),t}}),n("ke5ip",function(t,n){e(t.exports,"default",()=>r);var r=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}}),n("hnngZ",function(n,r){e(n.exports,"default",()=>f);var u=t("dLTlW"),a=t("by0Fh"),o=t("dKmGr"),f=function(e,t){var n={};return t=(0,o.default)(t,3),(0,a.default)(e,function(e,r,a){(0,u.default)(n,r,t(e,r,a))}),n}}),n("jPETu",function(n,r){e(n.exports,"default",()=>f);var u=t("eZV2H"),a=t("gnSnX"),o=t("jSR8v"),f=function(e){return e&&e.length?(0,u.default)(e,o.default,a.default):void 0}}),n("eZV2H",function(n,r){e(n.exports,"default",()=>a);var u=t("1WN0o"),a=function(e,t,n){for(var r=-1,a=e.length;++rr);var r=function(e,t){return e>t}}),n("3mNDi",function(n,r){e(n.exports,"default",()=>a);var u=t("5bi5n"),a=(0,t("1GImM").default)(function(e,t){return null==e?{}:(0,u.default)(e,t)})}),n("5bi5n",function(n,r){e(n.exports,"default",()=>o);var u=t("VRtgP"),a=t("cMLDw"),o=function(e,t){return(0,u.default)(e,t,function(t,n){return(0,a.default)(e,n)})}}),n("VRtgP",function(n,r){e(n.exports,"default",()=>f);var u=t("foHRp"),a=t("izsU2"),o=t("dUJCp"),f=function(e,t,n){for(var r=-1,f=t.length,d={};++ri);var u=t("a6l6i"),a=t("dUJCp"),o=t("cBYZY"),f=t("iYDsF"),d=t("ft2bY"),i=function(e,t,n,r){if(!(0,f.default)(e))return e;t=(0,a.default)(t,e);for(var i=-1,l=t.length,s=l-1,c=e;null!=c&&++if);var u=t("0MuaS"),a=t("dQSON"),o=t("3CD6d"),f=function(e){return(0,o.default)((0,a.default)(e,void 0,u.default),e+"")}}),n("dQ1Uz",function(n,r){e(n.exports,"addBorderSegments",()=>f);var u=t("fpekr"),a=t("8XLqy"),o=t("f1L0M");function f(e){u.default(e.children(),function t(n){var r=e.children(n),o=e.node(n);if(r.length&&u.default(r,t),a.default(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var f=o.minRank,i=o.maxRank+1;fv),e(n.exports,"simplify",()=>g),e(n.exports,"asNonCompoundGraph",()=>p),e(n.exports,"intersectRect",()=>m),e(n.exports,"buildLayerMatrix",()=>b),e(n.exports,"normalizeRanks",()=>x),e(n.exports,"removeEmptyRanks",()=>y),e(n.exports,"addBorderNode",()=>w),e(n.exports,"maxRank",()=>k),e(n.exports,"partition",()=>E),e(n.exports,"time",()=>N),e(n.exports,"notime",()=>L);var u=t("fpekr"),a=t("8XLqy"),o=t("1G4S6"),f=t("3kePu"),d=t("jPETu"),i=t("j8eVr"),l=t("2OtHx"),s=t("jJJbn"),c=t("5GUsF");t("cOIXs");var h=t("4LkSm");function v(e,t,n,r){var u;do u=c.default(r);while(e.hasNode(u))return n.dummy=t,e.setNode(u,n),u}function g(e){var t=new(0,h.Graph)().setGraph(e.graph());return u.default(e.nodes(),function(n){t.setNode(n,e.node(n))}),u.default(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},u=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+u.weight,minlen:Math.max(r.minlen,u.minlen)})}),t}function p(e){var t=new(0,h.Graph)({multigraph:e.isMultigraph()}).setGraph(e.graph());return u.default(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),u.default(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function m(e,t){var n,r,u=e.x,a=e.y,o=t.x-u,f=t.y-a,d=e.width/2,i=e.height/2;if(!o&&!f)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(f)*d>Math.abs(o)*i?(f<0&&(i=-i),n=i*o/f,r=i):(o<0&&(d=-d),n=d,r=d*f/o),{x:u+n,y:a+r}}function b(e){var t=f.default(s.default(k(e)+1),function(){return[]});return u.default(e.nodes(),function(n){var r=e.node(n),u=r.rank;o.default(u)||(t[u][r.order]=n)}),t}function x(e){var t=i.default(f.default(e.nodes(),function(t){return e.node(t).rank}));u.default(e.nodes(),function(n){var r=e.node(n);a.default(r,"rank")&&(r.rank-=t)})}function y(e){var t=i.default(f.default(e.nodes(),function(t){return e.node(t).rank})),n=[];u.default(e.nodes(),function(r){var u=e.node(r).rank-t;n[u]||(n[u]=[]),n[u].push(r)});var r=0,a=e.graph().nodeRankFactor;u.default(n,function(t,n){o.default(t)&&n%a!=0?--r:r&&u.default(t,function(t){e.node(t).rank+=r})})}function w(e,t,n,r){var u={width:0,height:0};return arguments.length>=4&&(u.rank=n,u.order=r),v(e,"border",u,t)}function k(e){return d.default(f.default(e.nodes(),function(t){var n=e.node(t).rank;if(!o.default(n))return n}))}function E(e,t){var n={lhs:[],rhs:[]};return u.default(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function N(e,t){var n=l.default();try{return t()}finally{console.log(e+" time: "+(l.default()-n)+"ms")}}function L(e,t){return t()}}),n("j8eVr",function(n,r){e(n.exports,"default",()=>f);var u=t("eZV2H"),a=t("8cZoy"),o=t("jSR8v"),f=function(e){return e&&e.length?(0,u.default)(e,o.default,a.default):void 0}}),n("8cZoy",function(t,n){e(t.exports,"default",()=>r);var r=function(e,t){return ea);var u=t("2mpFt"),a=function(){return(0,u.default).Date.now()}}),n("cOIXs",function(n,r){e(n.exports,"default",()=>o);var u=t("a6l6i"),a=t("vN5jO"),o=function(e,t){return(0,a.default)(e||[],t||[],u.default)}}),n("vN5jO",function(t,n){e(t.exports,"default",()=>r);var r=function(e,t,n){for(var r=-1,u=e.length,a=t.length,o={};++ro),e(n.exports,"undo",()=>f);var u=t("fpekr"),a=t("8XLqy");function o(e){var t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&d(e)}function f(e){var t=e.graph().rankdir.toLowerCase();("bt"===t||"rl"===t)&&(u.default(e.nodes(),function(t){l(e.node(t))}),u.default(e.edges(),function(t){var n=e.edge(t);u.default(n.points,l),a.default(n,"y")&&l(n)})),("lr"===t||"rl"===t)&&(u.default(e.nodes(),function(t){s(e.node(t))}),u.default(e.edges(),function(t){var n=e.edge(t);u.default(n.points,s),a.default(n,"x")&&s(n)}),d(e))}function d(e){u.default(e.nodes(),function(t){i(e.node(t))}),u.default(e.edges(),function(t){i(e.edge(t))})}function i(e){var t=e.width;e.width=e.height,e.height=t}function l(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}}),n("hYbQT",function(n,r){e(n.exports,"run",()=>o),e(n.exports,"undo",()=>f);var u=t("fpekr"),a=t("f1L0M");function o(e){e.graph().dummyChains=[],u.default(e.edges(),function(t){(function(e,t){var n,r,u,o=t.v,f=e.node(o).rank,d=t.w,i=e.node(d).rank,l=t.name,s=e.edge(t),c=s.labelRank;if(i!==f+1){for(e.removeEdge(t),u=0,++f;ff);var u=t("9PJbm"),a=t("V5im8"),o=t("3L0R5");function f(e){switch(e.graph().ranker){case"network-simplex":default:var t;t=e,(0,a.networkSimplex)(t);break;case"tight-tree":(0,o.longestPath)(e),(0,u.feasibleTree)(e);break;case"longest-path":d(e)}}var d=o.longestPath}),n("9PJbm",function(n,r){e(n.exports,"feasibleTree",()=>d);var u=t("fpekr"),a=t("iNbrh"),o=t("4LkSm"),f=t("3L0R5");function d(e){var t,n,r=new o.Graph({directed:!1}),d=e.nodes()[0],i=e.nodeCount();for(r.setNode(d,{});u.default(r.nodes(),function t(n){u.default(e.nodeEdges(n),function(u){var a=u.v,o=n===a?u.w:a;r.hasNode(o)||(0,f.slack)(e,u)||(r.setNode(o,{}),r.setEdge(n,o,{}),t(o))})}),r.nodeCount()f);var u=t("eZV2H"),a=t("dKmGr"),o=t("8cZoy"),f=function(e,t){return e&&e.length?(0,u.default)(e,(0,a.default)(t,2),o.default):void 0}}),n("3L0R5",function(n,r){e(n.exports,"longestPath",()=>d),e(n.exports,"slack",()=>i);var u=t("fpekr"),a=t("8XLqy"),o=t("3kePu"),f=t("j8eVr");function d(e){var t={};u.default(e.sources(),function n(r){var u=e.node(r);if(a.default(t,r))return u.rank;t[r]=!0;var d=f.default(o.default(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(d===Number.POSITIVE_INFINITY||null==d)&&(d=0),u.rank=d})}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}),n("V5im8",function(n,r){e(n.exports,"networkSimplex",()=>v);var u=t("dCscT"),a=t("5ILgR"),o=t("fpekr"),f=t("8XLqy"),d=t("iNbrh");t("g6xsS");var i=t("9THt7"),l=t("2dR5Z"),s=t("f1L0M"),c=t("9PJbm"),h=t("3L0R5");function v(e){e=(0,s.simplify)(e),(0,h.longestPath)(e);var t,n,r=(0,c.feasibleTree)(e);for(m(r),g(r,e);t=b(r);)n=x(r,e,t),y(r,e,t,n)}function g(e,t){var n=i.postorder(e,e.nodes());n=n.slice(0,n.length-1),o.default(n,function(n){var r;r=e.node(n).parent,e.edge(n,r).cutvalue=p(e,t,n)})}function p(e,t,n){var r=e.node(n).parent,u=!0,a=t.edge(n,r),f=0;return a||(u=!1,a=t.edge(r,n)),f=a.weight,o.default(t.nodeEdges(n),function(a){var o=a.v===n,d=o?a.w:a.v;if(d!==r){var i=o===u,l=t.edge(a).weight;if(f+=i?l:-l,e.hasEdge(n,d)){var s=e.edge(n,d).cutvalue;f+=i?-s:s}}}),f}function m(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,n,r,u,a){var d=r,i=t.node(u);return n[u]=!0,o.default(t.neighbors(u),function(a){f.default(n,a)||(r=e(t,n,r,a,u))}),i.low=d,i.lim=r++,a?i.parent=a:delete i.parent,r}(e,{},1,t)}function b(e){return a.default(e.edges(),function(t){return e.edge(t).cutvalue<0})}function x(e,t,n){var r=n.v,a=n.w;t.hasEdge(r,a)||(r=n.w,a=n.v);var o=e.node(r),f=e.node(a),i=o,l=!1;o.lim>f.lim&&(i=f,l=!0);var s=u.default(t.edges(),function(t){return l===w(e,e.node(t.v),i)&&l!==w(e,e.node(t.w),i)});return d.default(s,function(e){return(0,h.slack)(t,e)})}function y(e,t,n,r){var u,f,d=n.v,i=n.w;e.removeEdge(d,i),e.setEdge(r.v,r.w,{}),m(e),g(e,t),u=a.default(e.nodes(),function(e){return!t.node(e).parent}),f=(f=l.preorder(e,u)).slice(1),o.default(f,function(n){var r=e.node(n).parent,u=t.edge(n,r),a=!1;u||(u=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?u.minlen:-u.minlen)})}function w(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}v.initLowLimValues=m,v.initCutValues=g,v.calcCutValue=p,v.leaveEdge=b,v.enterEdge=x,v.exchangeEdges=y}),n("5ILgR",function(n,r){e(n.exports,"default",()=>o);var u=t("hw3Be"),a=t("f58Tb"),o=(0,u.default)(a.default)}),n("hw3Be",function(n,r){e(n.exports,"default",()=>f);var u=t("dKmGr"),a=t("lAOUf"),o=t("8krEv"),f=function(e){return function(t,n,r){var f=Object(t);if(!(0,a.default)(t)){var d=(0,u.default)(n,3);t=(0,o.default)(t),n=function(e){return d(f[e],e,f)}}var i=e(t,n,r);return i>-1?f[d?t[i]:i]:void 0}}}),n("f58Tb",function(n,r){e(n.exports,"default",()=>d);var u=t("38tNx"),a=t("dKmGr"),o=t("bj7KL"),f=Math.max,d=function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var d=null==n?0:(0,o.default)(n);return d<0&&(d=f(r+d,0)),(0,u.default)(e,(0,a.default)(t,3),d)}}),n("bj7KL",function(n,r){e(n.exports,"default",()=>a);var u=t("7exj4"),a=function(e){var t=(0,u.default)(e),n=t%1;return t==t?n?t-n:t:0}}),n("g6xsS",function(n,r){e(n.exports,"postorder",()=>t("9THt7").postorder),e(n.exports,"preorder",()=>t("2dR5Z").preorder),t("aK11Y"),t("gTmJX"),t("aQWKj"),t("3rgvn"),t("fZYvj"),t("3G3TF"),t("9THt7"),t("2dR5Z"),t("kKWb2"),t("lshnt"),t("1pQA6")}),n("aK11Y",function(e,n){t("fpekr"),t("8XLqy")}),n("gTmJX",function(n,r){e(n.exports,"dijkstra",()=>f);var u=t("5Oe6X"),a=t("1DJGF"),o=u.default(1);function f(e,t,n,r){return function(e,t,n,r){var u,o,f={},d=new a.PriorityQueue,i=function(e){var t=e.v!==u?e.v:e.w,r=f[t],a=n(e),i=o.distance+a;if(a<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+a);i0&&(o=f[u=d.removeMin()]).distance!==Number.POSITIVE_INFINITY;)r(u).forEach(i);return f}(e,String(t),n||o,r||function(t){return e.outEdges(t)})}}),n("1DJGF",function(n,r){e(n.exports,"PriorityQueue",()=>a);var u=t("8XLqy");class a{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return u.default(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!u.default(n,e)){var r=this._arr,a=r.length;return n[e]=a,r.push({key:e,priority:t}),this._decrease(a),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,u=e;n>1].priorityv);var u=t("iDECW"),a=t("kgBRQ"),o=t("by0Fh"),f=t("dKmGr"),d=t("bzIQZ"),i=t("hf0C9"),l=t("f3ZL4"),s=t("4VY3C"),c=t("iYDsF"),h=t("cmTeE"),v=function(e,t,n){var r=(0,i.default)(e),v=r||(0,l.default)(e)||(0,h.default)(e);if(t=(0,f.default)(t,4),null==n){var g=e&&e.constructor;n=v?r?new g:[]:(0,c.default)(e)&&(0,s.default)(g)?(0,a.default)((0,d.default)(e)):{}}return(v?(0,u.default):(0,o.default))(e,function(e,r,u){return t(n,e,r,u)}),n}}),n("3rgvn",function(e,n){t("dCscT"),t("lshnt")}),n("lshnt",function(n,r){e(n.exports,"tarjan",()=>a);var u=t("8XLqy");function a(e){var t=0,n=[],r={},a=[];return e.nodes().forEach(function(o){u.default(r,o)||function o(f){var d=r[f]={onStack:!0,lowlink:t,index:t++};if(n.push(f),e.successors(f).forEach(function(e){u.default(r,e)?r[e].onStack&&(d.lowlink=Math.min(d.lowlink,r[e].index)):(o(e),d.lowlink=Math.min(d.lowlink,r[e].lowlink))}),d.lowlink===d.index){var i,l=[];do r[i=n.pop()].onStack=!1,l.push(i);while(f!==i)a.push(l)}}(o)}),a}}),n("fZYvj",function(e,n){t("5Oe6X").default(1)}),n("3G3TF",function(e,n){t("1pQA6")}),n("1pQA6",function(n,r){e(n.exports,"topsort",()=>f),e(n.exports,"CycleException",()=>d);var u=t("fpekr"),a=t("8XLqy"),o=t("bW5IJ");function f(e){var t={},n={},r=[];if(u.default(e.sinks(),function o(f){if(a.default(n,f))throw new d;a.default(t,f)||(n[f]=!0,t[f]=!0,u.default(e.predecessors(f),o),delete n[f],r.push(f))}),o.default(t)!==e.nodeCount())throw new d;return r}function d(){}f.CycleException=d,d.prototype=Error()}),n("bW5IJ",function(n,r){e(n.exports,"default",()=>i);var u=t("lTyg4"),a=t("4wkSQ"),o=t("lAOUf"),f=t("7icKW"),d=t("2GC4v"),i=function(e){if(null==e)return 0;if((0,o.default)(e))return(0,f.default)(e)?(0,d.default)(e):e.length;var t=(0,a.default)(e);return"[object Map]"==t||"[object Set]"==t?e.size:(0,u.default)(e).length}}),n("7icKW",function(n,r){e(n.exports,"default",()=>f);var u=t("hArsG"),a=t("hf0C9"),o=t("f2iog"),f=function(e){return"string"==typeof e||!(0,a.default)(e)&&(0,o.default)(e)&&"[object String]"==(0,u.default)(e)}}),n("2GC4v",function(n,r){e(n.exports,"default",()=>f);var u=t("j4vlp"),a=t("6MCUi"),o=t("7uinB"),f=function(e){return(0,a.default)(e)?(0,o.default)(e):(0,u.default)(e)}}),n("j4vlp",function(n,r){e(n.exports,"default",()=>u);var u=(0,t("7cEkV").default)("length")}),n("6MCUi",function(t,n){e(t.exports,"default",()=>u);var r=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),u=function(e){return r.test(e)}}),n("7uinB",function(t,n){e(t.exports,"default",()=>h);var r="\ud800-\udfff",u="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\ud83c[\udffb-\udfff]",o="[^"+r+"]",f="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",i="(?:"+u+"|"+a+")?",l="[\\ufe0e\\ufe0f]?",s="(?:\\u200d(?:"+[o,f,d].join("|")+")"+l+i+")*",c=RegExp(a+"(?="+a+")|(?:"+[o+u+"?",u,f,d,"["+r+"]"].join("|")+")"+(l+i+s),"g"),h=function(e){for(var t=c.lastIndex=0;c.test(e);)++t;return t}}),n("9THt7",function(n,r){e(n.exports,"postorder",()=>a);var u=t("4O4ag");function a(e,t){return(0,u.dfs)(e,t,"post")}}),n("4O4ag",function(n,r){e(n.exports,"dfs",()=>f);var u=t("fpekr"),a=t("8XLqy"),o=t("hf0C9");function f(e,t,n){o.default(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),f=[],d={};return u.default(t,function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);(function e(t,n,r,o,f,d){!a.default(o,n)&&(o[n]=!0,r||d.push(n),u.default(f(n),function(n){e(t,n,r,o,f,d)}),r&&d.push(n))})(e,t,"post"===n,d,r,f)}),f}}),n("2dR5Z",function(n,r){e(n.exports,"preorder",()=>a);var u=t("4O4ag");function a(e,t){return(0,u.dfs)(e,t,"pre")}}),n("kKWb2",function(e,n){t("fpekr"),t("8XLqy"),t("1DJGF"),t("2rLgF")}),n("3EZuT",function(n,r){e(n.exports,"run",()=>i),e(n.exports,"cleanup",()=>l);var u=t("fpekr"),a=t("jPETu"),o=t("hwphU"),f=t("7pPNr"),d=t("f1L0M");function i(e){var t,n=d.addDummyNode(e,"root",{},"_root"),r=(t={},u.default(e.children(),function(n){!function n(r,a){var o=e.children(r);o&&o.length&&u.default(o,function(e){n(e,a+1)}),t[r]=a}(n,1)}),t),i=a.default(f.default(r))-1,l=2*i+1;e.graph().nestingRoot=n,u.default(e.edges(),function(t){e.edge(t).minlen*=l});var s=o.default(e.edges(),function(t,n){return t+e.edge(n).weight},0)+1;u.default(e.children(),function(t){(function e(t,n,r,a,o,f,i){var l=t.children(i);if(!l.length){i!==n&&t.setEdge(n,i,{weight:0,minlen:r});return}var s=d.addBorderNode(t,"_bt"),c=d.addBorderNode(t,"_bb"),h=t.node(i);t.setParent(s,i),h.borderTop=s,t.setParent(c,i),h.borderBottom=c,u.default(l,function(u){e(t,n,r,a,o,f,u);var d=t.node(u),l=d.borderTop?d.borderTop:u,h=d.borderBottom?d.borderBottom:u,v=d.borderTop?a:2*a,g=l!==h?1:o-f[i]+1;t.setEdge(s,l,{weight:v,minlen:g,nestingEdge:!0}),t.setEdge(h,c,{weight:v,minlen:g,nestingEdge:!0})}),t.parent(i)||t.setEdge(n,s,{weight:0,minlen:o+f[i]})})(e,n,l,s,i,r,t)}),e.graph().nodeRankFactor=l}function l(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,u.default(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}}),n("6B9pM",function(n,r){e(n.exports,"order",()=>g);var u=t("chB0Q"),a=t("fpekr"),o=t("3kePu"),f=t("jJJbn"),d=t("4LkSm"),i=t("f1L0M"),l=t("Kq5UN"),s=t("lmSbe"),c=t("66uKz"),h=t("h2A8Y"),v=t("2sKV1");function g(e){var t=i.maxRank(e),n=p(e,f.default(1,t+1),"inEdges"),r=p(e,f.default(t-1,-1,-1),"outEdges"),o=(0,h.initOrder)(e);m(e,o);for(var s,g=Number.POSITIVE_INFINITY,b=0,x=0;x<4;++b,++x){(function(e,t){var n=new d.Graph;a.default(e,function(e){var r=e.graph().root,u=(0,v.sortSubgraph)(e,r,n,t);a.default(u.vs,function(t,n){e.node(t).order=n}),(0,l.addSubgraphConstraints)(e,n,u.vs)})})(b%2?n:r,b%4>=2),o=i.buildLayerMatrix(e);var y=(0,c.crossCount)(e,o);ya);var u=t("gbpSA"),a=function(e){return(0,u.default)(e,5)}}),n("Kq5UN",function(n,r){e(n.exports,"addSubgraphConstraints",()=>a);var u=t("fpekr");function a(e,t,n){var r,a={};u.default(n,function(n){for(var u,o,f=e.parent(n);f;){if((u=e.parent(f))?(o=a[u],a[u]=f):(o=r,r=f),o&&o!==f){t.setEdge(o,f);return}f=u}})}}),n("lmSbe",function(n,r){e(n.exports,"buildLayerGraph",()=>i);var u=t("fpekr"),a=t("8XLqy"),o=t("1G4S6"),f=t("5GUsF"),d=t("4LkSm");function i(e,t,n){var r=function(e){for(var t;e.hasNode(t=f.default("_root")););return t}(e),i=new(0,d.Graph)({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return u.default(e.nodes(),function(f){var d=e.node(f),l=e.parent(f);(d.rank===t||d.minRank<=t&&t<=d.maxRank)&&(i.setNode(f),i.setParent(f,l||r),u.default(e[n](f),function(t){var n=t.v===f?t.w:t.v,r=i.edge(n,f),u=o.default(r)?0:r.weight;i.setEdge(n,f,{weight:e.edge(t).weight+u})}),a.default(d,"minRank")&&i.setNode(f,{borderLeft:d.borderLeft[t],borderRight:d.borderRight[t]}))}),i}}),n("66uKz",function(n,r){e(n.exports,"crossCount",()=>i);var u=t("0MuaS"),a=t("fpekr"),o=t("3kePu"),f=t("aJn7S"),d=t("cOIXs");function i(e,t){for(var n=0,r=1;r0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;h+=e.weight*n})),h}(e,t[r-1],t[r]);return n}}),n("aJn7S",function(n,r){e(n.exports,"default",()=>d);var u=t("kQGD1"),a=t("l9F4I"),o=t("exqIp"),f=t("fAzJF"),d=(0,o.default)(function(e,t){if(null==e)return[];var n=t.length;return n>1&&(0,f.default)(e,t[0],t[1])?t=[]:n>2&&(0,f.default)(t[0],t[1],t[2])&&(t=[t[0]]),(0,a.default)(e,(0,u.default)(t,1),[])})}),n("l9F4I",function(n,r){e(n.exports,"default",()=>h);var u=t("afgje"),a=t("foHRp"),o=t("dKmGr"),f=t("7dWrG"),d=t("eJHHQ"),i=t("hb0cD"),l=t("b9TPS"),s=t("jSR8v"),c=t("hf0C9"),h=function(e,t,n){t=t.length?(0,u.default)(t,function(e){return(0,c.default)(e)?function(t){return(0,a.default)(t,1===e.length?e[0]:e)}:e}):[s.default];var r=-1;t=(0,u.default)(t,(0,i.default)(o.default));var h=(0,f.default)(e,function(e,n,a){return{criteria:(0,u.default)(t,function(t){return t(e)}),index:++r,value:e}});return(0,d.default)(h,function(e,t){return(0,l.default)(e,t,n)})}}),n("eJHHQ",function(t,n){e(t.exports,"default",()=>r);var r=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}),n("b9TPS",function(n,r){e(n.exports,"default",()=>a);var u=t("6KvMf"),a=function(e,t,n){for(var r=-1,a=e.criteria,o=t.criteria,f=a.length,d=n.length;++r=d)return i;return i*("desc"==n[r]?-1:1)}}return e.index-t.index}}),n("6KvMf",function(n,r){e(n.exports,"default",()=>a);var u=t("1WN0o"),a=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,a=e==e,o=(0,u.default)(e),f=void 0!==t,d=null===t,i=t==t,l=(0,u.default)(t);if(!d&&!l&&!o&&e>t||o&&f&&i&&!d&&!l||r&&f&&i||!n&&i||!a)return 1;if(!r&&!o&&!l&&es);var u=t("dCscT"),a=t("fpekr"),o=t("8XLqy"),f=t("3kePu"),d=t("jPETu"),i=t("jJJbn"),l=t("aJn7S");function s(e){var t={},n=u.default(e.nodes(),function(t){return!e.children(t).length}),r=d.default(f.default(n,function(t){return e.node(t).rank})),s=f.default(i.default(r+1),function(){return[]}),c=l.default(n,function(t){return e.node(t).rank});return a.default(c,function n(r){o.default(t,r)||(t[r]=!0,s[e.node(r).rank].push(r),a.default(e.successors(r),n))}),s}}),n("2sKV1",function(n,r){e(n.exports,"sortSubgraph",()=>function e(t,n,r,c){var h=t.children(n),v=t.node(n),g=v?v.borderLeft:void 0,p=v?v.borderRight:void 0,m={};g&&(h=u.default(h,function(e){return e!==g&&e!==p}));var b=(0,i.barycenter)(t,h);o.default(b,function(n){if(t.children(n.v).length){var u=e(t,n.v,r,c);m[n.v]=u,f.default(u,"barycenter")&&(d.default(n.barycenter)?(n.barycenter=u.barycenter,n.weight=u.weight):(n.barycenter=(n.barycenter*n.weight+u.barycenter*u.weight)/(n.weight+u.weight),n.weight+=u.weight))}});var x=(0,l.resolveConflicts)(b,r);o.default(x,function(e){e.vs=a.default(e.vs.map(function(e){return m[e]?m[e].vs:e}))});var y=(0,s.sort)(x,c);if(g&&(y.vs=a.default([g,y.vs,p]),t.predecessors(g).length)){var w=t.node(t.predecessors(g)[0]),k=t.node(t.predecessors(p)[0]);f.default(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+w.order+k.order)/(y.weight+2),y.weight+=2}return y});var u=t("dCscT"),a=t("0MuaS"),o=t("fpekr"),f=t("8XLqy"),d=t("1G4S6"),i=t("5llzi"),l=t("foFJO"),s=t("JV5Uw")}),n("5llzi",function(n,r){e(n.exports,"barycenter",()=>o);var u=t("3kePu"),a=t("hwphU");function o(e,t){return u.default(t,function(t){var n=e.inEdges(t);if(!n.length)return{v:t};var r=a.default(n,function(t,n){var r=e.edge(n),u=e.node(n.v);return{sum:t.sum+r.weight*u.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}})}}),n("foFJO",function(n,r){e(n.exports,"resolveConflicts",()=>i);var u=t("dCscT"),a=t("fpekr"),o=t("1G4S6"),f=t("3kePu"),d=t("3mNDi");function i(e,t){var n={};return a.default(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};o.default(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),a.default(t.edges(),function(e){var t=n[e.v],r=n[e.w];o.default(t)||o.default(r)||(r.indegree++,t.out.push(n[e.w]))}),function(e){for(var t=[];e.length;){var n=e.pop();t.push(n),a.default(n.in.reverse(),function(e){return function(t){!t.merged&&(o.default(t.barycenter)||o.default(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(n)),a.default(n.out,function(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}(n))}return f.default(u.default(t,function(e){return!e.merged}),function(e){return d.default(e,["vs","i","barycenter","weight"])})}(u.default(n,function(e){return!e.indegree}))}}),n("JV5Uw",function(n,r){e(n.exports,"sort",()=>l);var u=t("0MuaS"),a=t("fpekr"),o=t("8XLqy"),f=t("ke5ip"),d=t("aJn7S"),i=t("f1L0M");function l(e,t){var n,r=i.partition(e,function(e){return o.default(e,"barycenter")}),f=r.lhs,l=d.default(r.rhs,function(e){return-e.i}),c=[],h=0,v=0,g=0;f.sort((n=!!t,function(e,t){return e.barycentert.barycenter?1:n?t.i-e.i:e.i-t.i})),g=s(c,l,g),a.default(f,function(e){g+=e.vs.length,c.push(e.vs),h+=e.barycenter*e.weight,v+=e.weight,g=s(c,l,g)});var p={vs:u.default(c)};return v&&(p.barycenter=h/v,p.weight=v),p}function s(e,t,n){for(var r;t.length&&(r=f.default(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}}),n("52JBL",function(n,r){e(n.exports,"parentDummyChains",()=>a);var u=t("fpekr");function a(e){var t,n,r=(t={},n=0,u.default(e.children(),function r(a){var o=n;u.default(e.children(a),r),t[a]={low:o,lim:n++}}),t);u.default(e.graph().dummyChains,function(t){for(var n=e.node(t),u=n.edgeObj,a=function(e,t,n,r){var u,a,o=[],f=[],d=Math.min(t[n].low,t[r].low),i=Math.max(t[n].lim,t[r].lim);u=n;do o.push(u=e.parent(u));while(u&&(t[u].low>d||i>t[u].lim))for(a=u,u=r;(u=e.parent(u))!==a;)f.push(u);return{path:o.concat(f.reverse()),lca:a}}(e,r,u.v,u.w),o=a.path,f=a.lca,d=0,i=o[0],l=!0;t!==u.w;){if(n=e.node(t),l){for(;(i=o[d])!==f&&e.node(i).maxRankl);var u=t("fpekr"),a=t("jqi0W"),o=t("3kePu"),f=t("jPETu"),d=t("f1L0M"),i=t("edbDb");function l(e){var t,n,r,l;t=e=d.asNonCompoundGraph(e),n=d.buildLayerMatrix(t),r=t.graph().ranksep,l=0,u.default(n,function(e){var n=f.default(o.default(e,function(e){return t.node(e).height}));u.default(e,function(e){t.node(e).y=l+n/2}),l+=n+r}),a.default((0,i.positionX)(e),function(t,n){e.node(n).x=t})}}),n("jqi0W",function(n,r){e(n.exports,"default",()=>o);var u=t("by0Fh"),a=t("lmrTu"),o=function(e,t){return e&&(0,u.default)(e,(0,a.default)(t))}}),n("edbDb",function(n,r){e(n.exports,"positionX",()=>k);var u=t("5ILgR"),a=t("fpekr"),o=t("amOD8"),f=t("8XLqy"),d=t("ke5ip"),i=t("3kePu"),l=t("hnngZ"),s=t("jPETu"),c=t("gocXo"),h=t("j8eVr"),v=t("iNbrh"),g=t("jJJbn"),p=t("hwphU"),m=t("aJn7S"),b=t("7pPNr"),x=t("4LkSm"),y=t("f1L0M");function w(e,t,n){if(t>n){var r=t;t=n,n=r}var u=e[t];u||(e[t]=u={}),u[n]=!0}function k(e){var t,n,r,k,E,N,L=y.buildLayerMatrix(e),I=c.default((t={},p.default(L,function(n,r){var o=0,f=0,i=n.length,l=d.default(r);return a.default(r,function(n,d){var s=function(e,t){if(e.node(t).dummy)return u.default(e.predecessors(t),function(t){return e.node(t).dummy})}(e,n),c=s?e.node(s).order:i;(s||n===l)&&(a.default(r.slice(f,d+1),function(n){a.default(e.predecessors(n),function(r){var u=e.node(r),a=u.order;(af)&&w(n,t,d)})})}return p.default(t,function(t,n){var u,o=-1,f=0;return a.default(n,function(a,d){if("border"===e.node(a).dummy){var i=e.predecessors(a);i.length&&(u=e.node(i[0]).order,r(n,f,d,o,u),f=d,o=u)}r(n,f,n.length,u,t.length)}),n}),n}(e,L)),_={};a.default(["u","d"],function(t){N="u"===t?L:b.default(L).reverse(),a.default(["l","r"],function(n){"r"===n&&(N=i.default(N,function(e){return b.default(e).reverse()}));var r,u,o,d,s=("u"===t?e.predecessors:e.successors).bind(e),c=(r=N,u={},o={},d={},a.default(r,function(e){a.default(e,function(e,t){u[e]=e,o[e]=e,d[e]=t})}),a.default(r,function(e){var t=-1;a.default(e,function(e){var n=s(e);if(n.length)for(var r=((n=m.default(n,function(e){return d[e]})).length-1)/2,a=Math.floor(r),i=Math.ceil(r);a<=i;++a){var l=n[a];o[e]===e&&tn){var r=t;t=n,n=r}return f.default(e[t],n)}(I,e,l)&&(o[l]=e,o[e]=u[e]=u[l],t=d[l])}})}),{root:u,align:o}),h=function(e,t,n,r,u){var o,d,i,l,s,c={},h=(i=new x.Graph,o=(l=e.graph()).nodesep,d=l.edgesep,s=function(e,t,n){var r,a,i=e.node(t),l=e.node(n);if(r=0+i.width/2,f.default(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":a=-i.width/2;break;case"r":a=i.width/2}if(a&&(r+=u?a:-a),a=0,r+=(i.dummy?d:o)/2+(l.dummy?d:o)/2+l.width/2,f.default(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":a=l.width/2;break;case"r":a=-l.width/2}return a&&(r+=u?a:-a),a=0,r},a.default(t,function(t){var r;a.default(t,function(t){var u=n[t];if(i.setNode(u),r){var a=n[r],o=i.edge(a,u);i.setEdge(a,u,Math.max(s(e,t,r),o||0))}r=t})}),i),v=u?"borderLeft":"borderRight";function g(e,t){for(var n=h.nodes(),r=n.pop(),u={};r;)u[r]?e(r):(u[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return g(function(e){c[e]=h.inEdges(e).reduce(function(e,t){return Math.max(e,c[t.v]+h.edge(t))},0)},h.predecessors.bind(h)),g(function(t){var n=h.outEdges(t).reduce(function(e,t){return Math.min(e,c[t.w]-h.edge(t))},Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==v&&(c[t]=Math.max(c[t],n))},h.successors.bind(h)),a.default(r,function(e){c[e]=c[n[e]]}),c}(e,N,c.root,c.align,"r"===n);"r"===n&&(h=l.default(h,function(e){return-e})),_[t+n]=h})});var T=v.default(b.default(_),function(t){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return o.default(t,function(t,u){var a=e.node(u).width/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r});return n=b.default(T),r=h.default(n),k=s.default(n),a.default(["u","d"],function(e){a.default(["l","r"],function(t){var n,u=e+t,a=_[u];if(a!==T){var o=b.default(a);(n="l"===t?r-h.default(o):k-s.default(o))&&(_[u]=l.default(a,function(e){return e+n}))}})}),E=e.graph().align,l.default(_.ul,function(e,t){if(E)return _[E.toLowerCase()][t];var n=m.default(i.default(_,t));return(n[1]+n[2])/2})}}),n("amOD8",function(n,r){e(n.exports,"default",()=>f);var u=t("RlazS"),a=t("lmrTu"),o=t("ceNjR"),f=function(e,t){return null==e?e:(0,u.default)(e,(0,a.default)(t),o.default)}});
//# sourceMappingURL=flowDiagram-b222e15a.290d4111.js.map