Liferay.Loader.define("portal-workflow-kaleo-designer-web$dagre@0.8.2/lib/parent-dummy-chains",["module","exports","require","./lodash"],(function(r,n,a){window;var e=a("./lodash");r.exports=function parentDummyChains(r){var n=function postorder(r){var n={},a=0;return e.forEach(r.children(),(function dfs(o){var i=a;e.forEach(r.children(o),dfs),n[o]={low:i,lim:a++}})),n}(r);e.forEach(r.graph().dummyChains,(function(a){for(var e=r.node(a),o=e.edgeObj,i=function findPath(r,n,a,e){var o,i,t=[],d=[],f=Math.min(n[a].low,n[e].low),l=Math.max(n[a].lim,n[e].lim);o=a;do{o=r.parent(o),t.push(o)}while(o&&(n[o].low>f||l>n[o].lim));for(i=o,o=e;(o=r.parent(o))!==i;)d.push(o);return{path:t.concat(d.reverse()),lca:i}}(r,n,o.v,o.w),t=i.path,d=i.lca,f=0,l=t[f],h=!0;a!==o.w;){if(e=r.node(a),h){for(;(l=t[f])!==d&&r.node(l).maxRank<e.rank;)f++;l===d&&(h=!1)}if(!h){for(;f<t.length-1&&r.node(l=t[f+1]).minRank<=e.rank;)f++;l=t[f]}r.setParent(a,l),a=r.successors(a)[0]}}))}}));
//# sourceMappingURL=parent-dummy-chains.js.map