filecat 7.12.1 → 7.13.0

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.
Files changed (41) hide show
  1. package/build/dist/2300.3c83fc27783efb65df57.js +2 -0
  2. package/build/dist/2674.2713dbaf7b4dbb6baa4c.js +1 -0
  3. package/build/dist/2728.d0205a036e2caff34c1c.js +1 -0
  4. package/build/dist/3299.b85fad5623f990484bd9.js +1 -0
  5. package/build/dist/3528.55d2faabf2edbde62652.js +1 -0
  6. package/build/dist/4004.ca7e777145c700c5b186.js +1 -0
  7. package/build/dist/{4220.b65b40382726a69ba0bc.js → 4220.6e56dcffa8e57c91e363.js} +1 -1
  8. package/build/dist/4493.f527f1994d14470017f4.js +1 -0
  9. package/build/dist/5602.b92e2770ff00ee6da48a.js +2 -0
  10. package/build/dist/5602.b92e2770ff00ee6da48a.js.LICENSE.txt +28 -0
  11. package/build/dist/{5877.e2316c84a95490f77439.js → 5877.0d338155dc591229a758.js} +1 -1
  12. package/build/dist/6404.bcf224539211a7979990.js +1 -0
  13. package/build/dist/{7310.bf944d03f24fcf109680.js → 7310.258969acc0782007bdf5.js} +1 -1
  14. package/build/dist/735.38718e61fe313f131a3e.js +1 -0
  15. package/build/dist/{8090.8977224618a14ae42159.js → 8090.8b172ffd0f62ceebf881.js} +2 -2
  16. package/build/dist/8277.c76a3bbffade9d2d859b.js +1 -0
  17. package/build/dist/8302.c72a3767319d87419737.js +1 -0
  18. package/build/dist/8725.970abee75f92962aeab9.js +1 -0
  19. package/build/dist/9334.d3102e0ed30ae564f506.js +1 -0
  20. package/build/dist/{9546.2cecad04cf676a6616cd.js → 9546.ba8ea7791f14ee133338.js} +1 -1
  21. package/build/dist/index.html +1 -1
  22. package/build/dist/main.e03c0b1342da0ac83715.js +2 -0
  23. package/build/main.js +1 -1
  24. package/build/ripgrep/rg.exe +0 -0
  25. package/package.json +1 -1
  26. package/shell/config/webpack.web.config.js +5 -0
  27. package/build/dist/1417.d390b18dd58ff5c28160.js +0 -1
  28. package/build/dist/2300.c99b1dd4e752cdfd5e32.js +0 -2
  29. package/build/dist/2479.294792ef5d360ad64abc.js +0 -1
  30. package/build/dist/2674.46c009a7ec426b7d8828.js +0 -1
  31. package/build/dist/3299.5c01eebc0f62cdc7bb39.js +0 -1
  32. package/build/dist/3528.0f8f34028d92fa87c518.js +0 -1
  33. package/build/dist/4004.916c0413a6db61a54e11.js +0 -1
  34. package/build/dist/4193.58d3a34cac783ff289c6.js +0 -1
  35. package/build/dist/7943.acf25a5e98dd13290985.js +0 -1
  36. package/build/dist/8302.894efa465f6037f9f5a8.js +0 -1
  37. package/build/dist/9334.f04716a7e41f783abc47.js +0 -1
  38. package/build/dist/main.65dcea654963fc771a86.js +0 -2
  39. /package/build/dist/{2300.c99b1dd4e752cdfd5e32.js.LICENSE.txt → 2300.3c83fc27783efb65df57.js.LICENSE.txt} +0 -0
  40. /package/build/dist/{8090.8977224618a14ae42159.js.LICENSE.txt → 8090.8b172ffd0f62ceebf881.js.LICENSE.txt} +0 -0
  41. /package/build/dist/{main.65dcea654963fc771a86.js.LICENSE.txt → main.e03c0b1342da0ac83715.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4220],{94220(t,e,a){a.d(e,{diagram:()=>z});var i,n=a(13230),r=(a(96755),a(1672),a(10561),a(338),a(24980),a(27838),a(96865),a(48159),a(44505),a(69793),a(43287),a(12505)),d=a(86535),s=a(31293),o=a(86827),g=a(51444),p=a(84193),h=a(697),c=(0,o.K)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit),"drawStartState"),l=(0,o.K)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),x=(0,o.K)((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a},"drawSimpleState"),D=(0,o.K)((t,e)=>{const a=(0,o.K)(function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,g=!0;e.descriptions.forEach(function(t){s||(a(r,t,g),g=!1),s=!1});const p=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),h=r.node().getBBox(),c=Math.max(h.width,i.width);return p.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",h.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t},"drawDescrState"),u=(0,o.K)((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)<i&&p>s&&(h=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t},"addTitleAndBox"),f=(0,o.K)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2)),"drawEndState"),y=(0,o.K)((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)},"drawForkJoinState"),w=(0,o.K)((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const t of o){const i=t.trim();if(i.length>0){const t=r.append("tspan");if(t.text(i),0===g){g+=t.node().getBBox().height}n+=g,t.attr("x",e+(0,d.D7)().state.noteMargin),t.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}},"_drawLongText"),b=(0,o.K)((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=w(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a},"drawNote"),B=(0,o.K)(function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&c(n),"end"===e.type&&f(n),"fork"!==e.type&&"join"!==e.type||y(n,e),"note"===e.type&&b(e.note.text,n),"divider"===e.type&&l(n),"default"===e.type&&0===e.descriptions.length&&x(n,e),"default"===e.type&&e.descriptions.length>0&&D(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,i},"drawState"),m=0,k=(0,o.K)(function(t,e,a){const i=(0,o.K)(function(t){switch(t){case n.u4.relationType.AGGREGATION:return"aggregation";case n.u4.relationType.EXTENSION:return"extension";case n.u4.relationType.COMPOSITION:return"composition";case n.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const p=e.points,h=(0,g.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(g.qrM),c=t.append("path").attr("d",h(p)).attr("id","edge"+m).attr("class","transition");let l="";if((0,d.D7)().state.arrowMarkerAbsolute&&(l=(0,d.ID)(!0)),c.attr("marker-end","url("+l+"#"+i(n.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:o}=r._K.calcLabelPosition(e.points),g=d.Y2.getRows(a.title);let p=0;const h=[];let c=0,l=0;for(let t=0;t<=g.length;t++){const e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",n).attr("y",o+p),a=e.node().getBBox();if(c=Math.max(c,a.width),l=Math.min(l,a.x),s.R.info(a.x,n,o+p),0===p){const t=e.node().getBBox();p=t.height,s.R.info("Title height",p,o)}h.push(e)}let x=p*g.length;if(g.length>1){const t=(g.length-1)*p*.5;h.forEach((e,a)=>e.attr("y",o+a*p-t)),x=p*g.length}const D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",o-x/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",x+(0,d.D7)().state.padding),s.R.info(D)}m++},"drawEdge"),S={},N=(0,o.K)(function(){},"setConf"),E=(0,o.K)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),M=(0,o.K)(function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,g.Ltv)("#i"+e));const p="sandbox"===r?(0,g.Ltv)(o.nodes()[0].contentDocument.body):(0,g.Ltv)("body"),h="sandbox"===r?o.nodes()[0].contentDocument:document;s.R.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);E(c);const l=n.db.getRootDoc(),x=c.append("g").attr("id",e+"-root");K(l,x,void 0,!1,p,h,n);const D=i.padding,u=c.node().getBBox(),f=u.width+2*D,y=u.height+2*D,w=1.75*f;(0,d.a$)(c,y,w,i.useMaxWidth),c.attr("viewBox",`${u.x-i.padding} ${u.y-i.padding} `+f+" "+y)},"draw"),v=(0,o.K)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),K=(0,o.K)((t,e,a,n,r,o,g)=>{const c=new h.T({compound:!0,multigraph:!0});let l,x=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){x=!1;break}a?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}});const D=g.db.getStates(),f=g.db.getRelations(),y=Object.keys(D);for(const t of y){const d=D[t];let s;if(a&&(d.parentId=a),d.doc){let t=e.append("g").attr("id",d.id).attr("class","stateGroup");s=K(d.doc,t,d.id,!n,r,o,g);{t=u(t,d,n);let e=t.node().getBBox();s.width=e.width,s.height=e.height+i.padding/2,S[d.id]={y:i.compositTitleSize}}}else s=B(e,d,c);if(d.note){const t={descriptions:[],id:d.id+"-note",note:d.note,type:"note"},a=B(e,t,c);"left of"===d.note.position?(c.setNode(s.id+"-note",a),c.setNode(s.id,s)):(c.setNode(s.id,s),c.setNode(s.id+"-note",a)),c.setParent(s.id,s.id+"-group"),c.setParent(s.id+"-note",s.id+"-group")}else c.setNode(s.id,s)}s.R.debug("Count=",c.nodeCount(),c);let w=0;f.forEach(function(t){w++,s.R.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:v(t.title),height:i.labelHeight*d.Y2.getRows(t.title).length,labelpos:"c"},"id"+w)}),(0,p.Zp)(c),s.R.debug("Graph after layout",c.nodes());const b=e.node();c.nodes().forEach(function(t){if(void 0!==t&&void 0!==c.node(t)){s.R.warn("Node "+t+": "+JSON.stringify(c.node(t))),r.select("#"+b.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(S[t]?S[t].y:0)-c.node(t).height/2)+" )"),r.select("#"+b.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2);o.querySelectorAll("#"+b.id+" #"+t+" .divider").forEach(t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})}else s.R.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let m=b.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),k(e,c.edge(t),c.edge(t).relation))}),m=b.getBBox();const N={id:a||"root",label:a||"root",width:0,height:0};return N.width=m.width+2*i.padding,N.height=m.height+2*i.padding,s.R.debug("Doc rendered",N,c),N},"renderDoc"),R={setConf:N,draw:M},z={parser:n.Zk,get db(){return new n.u4(1)},renderer:R,styles:n.tM,init:(0,o.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]);
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4220],{94220(t,e,a){a.d(e,{diagram:()=>z});var i,n=a(13230),r=(a(96755),a(1672),a(10561),a(338),a(24980),a(27838),a(96865),a(48159),a(44505),a(69793),a(43287),a(12505)),d=a(86535),s=a(31293),o=a(86827),g=a(51444),p=a(44493),h=a(697),c=(0,o.K)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit),"drawStartState"),l=(0,o.K)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),x=(0,o.K)((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a},"drawSimpleState"),D=(0,o.K)((t,e)=>{const a=(0,o.K)(function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,g=!0;e.descriptions.forEach(function(t){s||(a(r,t,g),g=!1),s=!1});const p=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),h=r.node().getBBox(),c=Math.max(h.width,i.width);return p.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",h.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t},"drawDescrState"),u=(0,o.K)((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)<i&&p>s&&(h=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t},"addTitleAndBox"),f=(0,o.K)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2)),"drawEndState"),y=(0,o.K)((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)},"drawForkJoinState"),w=(0,o.K)((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const t of o){const i=t.trim();if(i.length>0){const t=r.append("tspan");if(t.text(i),0===g){g+=t.node().getBBox().height}n+=g,t.attr("x",e+(0,d.D7)().state.noteMargin),t.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}},"_drawLongText"),b=(0,o.K)((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=w(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a},"drawNote"),B=(0,o.K)(function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&c(n),"end"===e.type&&f(n),"fork"!==e.type&&"join"!==e.type||y(n,e),"note"===e.type&&b(e.note.text,n),"divider"===e.type&&l(n),"default"===e.type&&0===e.descriptions.length&&x(n,e),"default"===e.type&&e.descriptions.length>0&&D(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,i},"drawState"),m=0,k=(0,o.K)(function(t,e,a){const i=(0,o.K)(function(t){switch(t){case n.u4.relationType.AGGREGATION:return"aggregation";case n.u4.relationType.EXTENSION:return"extension";case n.u4.relationType.COMPOSITION:return"composition";case n.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const p=e.points,h=(0,g.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(g.qrM),c=t.append("path").attr("d",h(p)).attr("id","edge"+m).attr("class","transition");let l="";if((0,d.D7)().state.arrowMarkerAbsolute&&(l=(0,d.ID)(!0)),c.attr("marker-end","url("+l+"#"+i(n.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:o}=r._K.calcLabelPosition(e.points),g=d.Y2.getRows(a.title);let p=0;const h=[];let c=0,l=0;for(let t=0;t<=g.length;t++){const e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",n).attr("y",o+p),a=e.node().getBBox();if(c=Math.max(c,a.width),l=Math.min(l,a.x),s.R.info(a.x,n,o+p),0===p){const t=e.node().getBBox();p=t.height,s.R.info("Title height",p,o)}h.push(e)}let x=p*g.length;if(g.length>1){const t=(g.length-1)*p*.5;h.forEach((e,a)=>e.attr("y",o+a*p-t)),x=p*g.length}const D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",o-x/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",x+(0,d.D7)().state.padding),s.R.info(D)}m++},"drawEdge"),S={},N=(0,o.K)(function(){},"setConf"),E=(0,o.K)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),M=(0,o.K)(function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,g.Ltv)("#i"+e));const p="sandbox"===r?(0,g.Ltv)(o.nodes()[0].contentDocument.body):(0,g.Ltv)("body"),h="sandbox"===r?o.nodes()[0].contentDocument:document;s.R.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);E(c);const l=n.db.getRootDoc(),x=c.append("g").attr("id",e+"-root");K(l,x,void 0,!1,p,h,n);const D=i.padding,u=c.node().getBBox(),f=u.width+2*D,y=u.height+2*D,w=1.75*f;(0,d.a$)(c,y,w,i.useMaxWidth),c.attr("viewBox",`${u.x-i.padding} ${u.y-i.padding} `+f+" "+y)},"draw"),v=(0,o.K)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),K=(0,o.K)((t,e,a,n,r,o,g)=>{const c=new h.T({compound:!0,multigraph:!0});let l,x=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){x=!1;break}a?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}});const D=g.db.getStates(),f=g.db.getRelations(),y=Object.keys(D);for(const t of y){const d=D[t];let s;if(a&&(d.parentId=a),d.doc){let t=e.append("g").attr("id",d.id).attr("class","stateGroup");s=K(d.doc,t,d.id,!n,r,o,g);{t=u(t,d,n);let e=t.node().getBBox();s.width=e.width,s.height=e.height+i.padding/2,S[d.id]={y:i.compositTitleSize}}}else s=B(e,d,c);if(d.note){const t={descriptions:[],id:d.id+"-note",note:d.note,type:"note"},a=B(e,t,c);"left of"===d.note.position?(c.setNode(s.id+"-note",a),c.setNode(s.id,s)):(c.setNode(s.id,s),c.setNode(s.id+"-note",a)),c.setParent(s.id,s.id+"-group"),c.setParent(s.id+"-note",s.id+"-group")}else c.setNode(s.id,s)}s.R.debug("Count=",c.nodeCount(),c);let w=0;f.forEach(function(t){w++,s.R.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:v(t.title),height:i.labelHeight*d.Y2.getRows(t.title).length,labelpos:"c"},"id"+w)}),(0,p.Zp)(c),s.R.debug("Graph after layout",c.nodes());const b=e.node();c.nodes().forEach(function(t){if(void 0!==t&&void 0!==c.node(t)){s.R.warn("Node "+t+": "+JSON.stringify(c.node(t))),r.select("#"+b.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(S[t]?S[t].y:0)-c.node(t).height/2)+" )"),r.select("#"+b.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2);o.querySelectorAll("#"+b.id+" #"+t+" .divider").forEach(t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})}else s.R.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let m=b.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),k(e,c.edge(t),c.edge(t).relation))}),m=b.getBBox();const N={id:a||"root",label:a||"root",width:0,height:0};return N.width=m.width+2*i.padding,N.height=m.height+2*i.padding,s.R.debug("Doc rendered",N,c),N},"renderDoc"),R={setConf:N,draw:M},z={parser:n.Zk,get db(){return new n.u4(1)},renderer:R,styles:n.tM,init:(0,o.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4493],{44493(e,n,r){r.d(n,{Zp:()=>dr});var t=r(8058),o=r(3456),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=r(39142),c=r(87671);const d=function(e){return(null==e?0:e.length)?(0,c.A)(e,1):[]};var f=r(45572),s=r(27753),h=r(94288),v=r(38446);const g=function(e,n){var r=-1,t=(0,v.A)(e)?Array(e.length):[];return(0,h.A)(e,function(e,o,i){t[++r]=n(e,o,i)}),t};var l=r(92049);const p=function(e,n){return((0,l.A)(e)?f.A:g)(e,(0,s.A)(n,3))};var A=Math.ceil,w=Math.max;const b=function(e,n,r,t){for(var o=-1,i=w(A((n-e)/(r||1)),0),u=Array(i);i--;)u[t?i:++o]=e,e+=r;return u};var m=r(6832),y=/\s/;const x=function(e){for(var n=e.length;n--&&y.test(e.charAt(n)););return n};var k=/^\s+/;const E=function(e){return e?e.slice(0,x(e)+1).replace(k,""):e};var O=r(23149),N=r(61882),_=/^[-+]0x[0-9a-f]+$/i,I=/^0b[01]+$/i,P=/^0o[0-7]+$/i,T=parseInt;const j=function(e){if("number"==typeof e)return e;if((0,N.A)(e))return NaN;if((0,O.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,O.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=E(e);var r=I.test(e);return r||P.test(e)?T(e.slice(2),r?2:8):_.test(e)?NaN:+e};var R=1/0;const M=function(e){return e?(e=j(e))===R||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const L=function(e){return function(n,r,t){return t&&"number"!=typeof t&&(0,m.A)(n,r,t)&&(r=t=void 0),n=M(n),void 0===r?(r=n,n=0):r=M(r),t=void 0===t?n<r?1:-1:M(t),b(n,r,t,e)}}();var C=r(697);class S{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return F(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&F(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,G)),r=r._prev;return"["+e.join(", ")+"]"}}function F(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function G(e,n){if("_next"!==e&&"_prev"!==e)return n}var V=a.A(1);function B(e,n){if(e.nodeCount()<=1)return[];var r=function(e,n){var r=new C.T,o=0,i=0;t.A(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t.A(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,u=n(e),a=t+u;r.setEdge(e.v,e.w,a),i=Math.max(i,r.node(e.v).out+=u),o=Math.max(o,r.node(e.w).in+=u)});var u=L(i+o+3).map(function(){return new S}),a=o+1;return t.A(r.nodes(),function(e){Y(u,a,r.node(e))}),{graph:r,buckets:u,zeroIdx:a}}(e,n||V),o=function(e,n,r){var t,o=[],i=n[n.length-1],u=n[0];for(;e.nodeCount();){for(;t=u.dequeue();)q(e,n,r,t);for(;t=i.dequeue();)q(e,n,r,t);if(e.nodeCount())for(var a=n.length-2;a>0;--a)if(t=n[a].dequeue()){o=o.concat(q(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return d(p(o,function(n){return e.outEdges(n.v,n.w)}))}function q(e,n,r,o,i){var u=i?[]:void 0;return t.A(e.inEdges(o.v),function(t){var o=e.edge(t),a=e.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,Y(n,r,a)}),t.A(e.outEdges(o.v),function(t){var o=e.edge(t),i=t.w,u=e.node(i);u.in-=o,Y(n,r,u)}),e.removeNode(o.v),u}function Y(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function z(e){var n="greedy"===e.graph().acyclicer?B(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,r[u]=!0,t.A(e.outEdges(u),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)}),delete r[u])}return t.A(e.nodes(),i),n}(e);t.A(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,u("rev"))})}var D=r(10419),$=r(43937),J=r(52851),Z=r(24878),H=r(25353),K=r(30901);const Q=function(e,n,r,t){if(!(0,O.A)(e))return e;for(var o=-1,i=(n=(0,Z.A)(n,e)).length,u=i-1,a=e;null!=a&&++o<i;){var c=(0,K.A)(n[o]),d=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=u){var f=a[c];void 0===(d=t?t(f,c,a):void 0)&&(d=(0,O.A)(f)?f:(0,H.A)(n[o+1])?[]:{})}(0,J.A)(a,c,d),a=a[c]}return e};const U=function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var u=n[t],a=(0,$.A)(e,u);r(a,u)&&Q(i,(0,Z.A)(u,e),a)}return i};var W=r(46964);const X=function(e,n){return U(e,n,function(n,r){return(0,W.A)(e,r)})};var ee=r(65255),ne=r(57424);const re=function(e){return(0,ne.A)((0,ee.A)(e,void 0,d),e+"")}(function(e,n){return null==e?{}:X(e,n)});var te=r(24326),oe=r(66984),ie=r(79999),ue=Object.prototype,ae=ue.hasOwnProperty;const ce=(0,te.A)(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&(0,m.A)(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],u=(0,ie.A)(i),a=-1,c=u.length;++a<c;){var d=u[a],f=e[d];(void 0===f||(0,oe.A)(f,ue[d])&&!ae.call(e,d))&&(e[d]=i[d])}return e});const de=function(e,n,r){for(var t=-1,o=e.length;++t<o;){var i=e[t],u=n(i);if(null!=u&&(void 0===a?u==u&&!(0,N.A)(u):r(u,a)))var a=u,c=i}return c};const fe=function(e,n){return e>n};var se=r(29008);const he=function(e){return e&&e.length?de(e,se.A,fe):void 0};const ve=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var ge=r(52528),le=r(79841);const pe=function(e,n){var r={};return n=(0,s.A)(n,3),(0,le.A)(e,function(e,t,o){(0,ge.A)(r,t,n(e,t,o))}),r};var Ae=r(69592);const we=function(e,n){return e<n};const be=function(e){return e&&e.length?de(e,se.A,we):void 0};var me=Object.prototype.hasOwnProperty;const ye=function(e,n){return null!=e&&me.call(e,n)};var xe=r(85054);const ke=function(e,n){return null!=e&&(0,xe.A)(e,n,ye)};var Ee=r(41917);const Oe=function(){return Ee.A.Date.now()};function Ne(e,n,r,t){var o;do{o=u(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function _e(e){var n=new C.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return t.A(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Ie(e,n){var r,t,o=e.x,i=e.y,u=n.x-o,a=n.y-i,c=e.width/2,d=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*d?(a<0&&(d=-d),r=d*u/a,t=d):(u<0&&(c=-c),r=c,t=c*a/u),{x:o+r,y:i+t}}function Pe(e){var n=p(L(je(e)+1),function(){return[]});return t.A(e.nodes(),function(r){var t=e.node(r),o=t.rank;Ae.A(o)||(n[o][t.order]=r)}),n}function Te(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),Ne(e,"border",o,n)}function je(e){return he(p(e.nodes(),function(n){var r=e.node(n).rank;if(!Ae.A(r))return r}))}function Re(e,n){var r=Oe();try{return n()}finally{console.log(e+" time: "+(Oe()-r)+"ms")}}function Me(e,n){return n()}function Le(e,n,r,t,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],c=Ne(e,"border",u,r);o[n][i]=c,e.setParent(c,t),a&&e.setEdge(a,c,{weight:1})}function Ce(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.A(e.nodes(),function(n){Ge(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,Ge),Object.prototype.hasOwnProperty.call(r,"y")&&Ge(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){t.A(e.nodes(),function(n){Ve(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,Ve),Object.prototype.hasOwnProperty.call(r,"x")&&Ve(r)})}(e),Se(e))}function Se(e){t.A(e.nodes(),function(n){Fe(e.node(n))}),t.A(e.edges(),function(n){Fe(e.edge(n))})}function Fe(e){var n=e.width;e.width=e.height,e.height=n}function Ge(e){e.y=-e.y}function Ve(e){var n=e.x;e.x=e.y,e.y=n}function Be(e){e.graph().dummyChains=[],t.A(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),c=a.labelRank;if(i===t+1)return;e.removeEdge(n);var d,f,s=void 0;for(f=0,++t;t<i;++f,++t)a.points=[],d=Ne(e,"edge",s={width:0,height:0,edgeLabel:a,edgeObj:n,rank:t},"_d"),t===c&&(s.width=a.width,s.height=a.height,s.dummy="edge-label",s.labelpos=a.labelpos),e.setEdge(r,d,{weight:a.weight},u),0===f&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,o,{weight:a.weight},u)}(e,n)})}const qe=function(e,n){return e&&e.length?de(e,(0,s.A)(n,2),we):void 0};function Ye(e){var n={};t.A(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=be(p(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function ze(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function De(e){var n,r,t=new C.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(t.setNode(o,{});$e(t,e)<i;)n=Je(t,e),r=t.hasNode(n.v)?ze(e,n):-ze(e,n),Ze(t,e,r);return t}function $e(e,n){return t.A(e.nodes(),function r(o){t.A(n.nodeEdges(o),function(t){var i=t.v,u=o===i?t.w:i;e.hasNode(u)||ze(n,t)||(e.setNode(u,{}),e.setEdge(o,u,{}),r(u))})}),e.nodeCount()}function Je(e,n){return qe(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ze(n,r)})}function Ze(e,n,r){t.A(e.nodes(),function(e){n.node(e).rank+=r})}var He=r(27422);const Ke=function(e){return function(n,r,t){var o=Object(n);if(!(0,v.A)(n)){var i=(0,s.A)(r,3);n=(0,He.A)(n),r=function(e){return i(o[e],e,o)}}var u=e(n,r,t);return u>-1?o[i?n[u]:u]:void 0}};var Qe=r(25707);const Ue=function(e){var n=M(e),r=n%1;return n==n?r?n-r:n:0};var We=Math.max;const Xe=Ke(function(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var o=null==r?0:Ue(r);return o<0&&(o=We(t+o,0)),(0,Qe.A)(e,(0,s.A)(n,3),o)});var en=r(66070);a.A(1);a.A(1);r(14453),r(9137),r(2383),r(53098);(0,r(70805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var nn="\\ud800-\\udfff",rn="["+nn+"]",tn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",on="\\ud83c[\\udffb-\\udfff]",un="[^"+nn+"]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",cn="[\\ud800-\\udbff][\\udc00-\\udfff]",dn="(?:"+tn+"|"+on+")"+"?",fn="[\\ufe0e\\ufe0f]?",sn=fn+dn+("(?:\\u200d(?:"+[un,an,cn].join("|")+")"+fn+dn+")*"),hn="(?:"+[un+tn+"?",tn,an,cn,rn].join("|")+")";RegExp(on+"(?="+on+")|"+hn+sn,"g");function vn(){}function gn(e,n,r){l.A(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],u={};return t.A(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);ln(e,n,"post"===r,u,o,i)}),i}function ln(e,n,r,o,i,u){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||u.push(n),t.A(i(n),function(n){ln(e,n,r,o,i,u)}),r&&u.push(n))}vn.prototype=new Error;r(72857);function pn(e){e=function(e){var n=(new C.T).setGraph(e.graph());return t.A(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),Ye(e);var n,r=De(e);for(bn(r),An(r,e);n=yn(r);)kn(r,e,n,xn(r,e,n))}function An(e,n){var r=function(e,n){return gn(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.A(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=wn(e,n,r)}(e,n,r)})}function wn(e,n,r){var o=e.node(r).parent,i=!0,u=n.edge(r,o),a=0;return u||(i=!1,u=n.edge(o,r)),a=u.weight,t.A(n.nodeEdges(r),function(t){var u,c,d=t.v===r,f=d?t.w:t.v;if(f!==o){var s=d===i,h=n.edge(t).weight;if(a+=s?h:-h,u=r,c=f,e.hasEdge(u,c)){var v=e.edge(r,f).cutvalue;a+=s?-v:v}}}),a}function bn(e,n){arguments.length<2&&(n=e.nodes()[0]),mn(e,{},1,n)}function mn(e,n,r,o,i){var u=r,a=e.node(o);return n[o]=!0,t.A(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=mn(e,n,r,t,o))}),a.low=u,a.lim=r++,i?a.parent=i:delete a.parent,r}function yn(e){return Xe(e.edges(),function(n){return e.edge(n).cutvalue<0})}function xn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),u=e.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var d=en.A(n.edges(),function(n){return c===En(e,e.node(n.v),a)&&c!==En(e,e.node(n.w),a)});return qe(d,function(e){return ze(n,e)})}function kn(e,n,r,o){var i=r.v,u=r.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),bn(e),An(e,n),function(e,n){var r=Xe(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return gn(e,n,"pre")}(e,r);o=o.slice(1),t.A(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function En(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function On(e){switch(e.graph().ranker){case"network-simplex":default:_n(e);break;case"tight-tree":!function(e){Ye(e),De(e)}(e);break;case"longest-path":Nn(e)}}pn.initLowLimValues=bn,pn.initCutValues=An,pn.calcCutValue=wn,pn.leaveEdge=yn,pn.enterEdge=xn,pn.exchangeEdges=kn;var Nn=Ye;function _n(e){pn(e)}var In=r(92866),Pn=r(83130);function Tn(e){var n=Ne(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var u=e.children(o);u&&u.length&&t.A(u,function(e){r(e,i+1)}),n[o]=i}return t.A(e.children(),function(e){r(e,1)}),n}(e),o=he(In.A(r))-1,i=2*o+1;e.graph().nestingRoot=n,t.A(e.edges(),function(n){e.edge(n).minlen*=i});var u=function(e){return Pn.A(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.A(e.children(),function(t){jn(e,n,i,u,o,r,t)}),e.graph().nodeRankFactor=i}function jn(e,n,r,o,i,u,a){var c=e.children(a);if(c.length){var d=Te(e,"_bt"),f=Te(e,"_bb"),s=e.node(a);e.setParent(d,a),s.borderTop=d,e.setParent(f,a),s.borderBottom=f,t.A(c,function(t){jn(e,n,r,o,i,u,t);var c=e.node(t),s=c.borderTop?c.borderTop:t,h=c.borderBottom?c.borderBottom:t,v=c.borderTop?o:2*o,g=s!==h?1:i-u[a]+1;e.setEdge(d,s,{weight:v,minlen:g,nestingEdge:!0}),e.setEdge(h,f,{weight:v,minlen:g,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}var Rn=r(35758);function Mn(e,n,r){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new C.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return t.A(e.nodes(),function(u){var a=e.node(u),c=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,c||o),t.A(e[r](u),function(n){var r=n.v===u?n.w:n.v,t=i.edge(r,u),o=Ae.A(t)?0:t.weight;i.setEdge(r,u,{weight:e.edge(n).weight+o})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}const Ln=function(e,n,r){for(var t=-1,o=e.length,i=n.length,u={};++t<o;){var a=t<i?n[t]:void 0;r(u,e[t],a)}return u};const Cn=function(e,n){return Ln(e||[],n||[],J.A)};const Sn=function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e};var Fn=r(52789);const Gn=function(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=(0,N.A)(e),u=void 0!==n,a=null===n,c=n==n,d=(0,N.A)(n);if(!a&&!d&&!i&&e>n||i&&u&&c&&!a&&!d||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!d&&e<n||d&&r&&o&&!t&&!i||a&&r&&o||!u&&o||!c)return-1}return 0};const Vn=function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,u=o.length,a=r.length;++t<u;){var c=Gn(o[t],i[t]);if(c)return t>=a?c:c*("desc"==r[t]?-1:1)}return e.index-n.index};const Bn=function(e,n,r){n=n.length?(0,f.A)(n,function(e){return(0,l.A)(e)?function(n){return(0,$.A)(n,1===e.length?e[0]:e)}:e}):[se.A];var t=-1;n=(0,f.A)(n,(0,Fn.A)(s.A));var o=g(e,function(e,r,o){return{criteria:(0,f.A)(n,function(n){return n(e)}),index:++t,value:e}});return Sn(o,function(e,n){return Vn(e,n,r)})};const qn=(0,te.A)(function(e,n){if(null==e)return[];var r=n.length;return r>1&&(0,m.A)(e,n[0],n[1])?n=[]:r>2&&(0,m.A)(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,(0,c.A)(n,1),[])});function Yn(e,n){for(var r=0,t=1;t<n.length;++t)r+=zn(e,n[t-1],n[t]);return r}function zn(e,n,r){for(var o=Cn(r,p(r,function(e,n){return n})),i=d(p(n,function(n){return qn(p(e.outEdges(n),function(n){return{pos:o[n.w],weight:e.edge(n).weight}}),"pos")})),u=1;u<r.length;)u<<=1;var a=2*u-1;u-=1;var c=p(new Array(a),function(){return 0}),f=0;return t.A(i.forEach(function(e){var n=e.pos+u;c[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=c[n+1]),c[n=n-1>>1]+=e.weight;f+=e.weight*r})),f}function Dn(e,n){var r={};return t.A(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};Ae.A(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),t.A(n.edges(),function(e){var n=r[e.v],t=r[e.w];Ae.A(n)||Ae.A(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(Ae.A(n.barycenter)||Ae.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var i=e.pop();n.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return p(en.A(n,function(e){return!e.merged}),function(e){return re(e,["vs","i","barycenter","weight"])})}(en.A(r,function(e){return!e.indegree}))}function $n(e,n){var r,o=function(e,n){var r={lhs:[],rhs:[]};return t.A(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),i=o.lhs,u=qn(o.rhs,function(e){return-e.i}),a=[],c=0,f=0,s=0;i.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),s=Jn(a,u,s),t.A(i,function(e){s+=e.vs.length,a.push(e.vs),c+=e.barycenter*e.weight,f+=e.weight,s=Jn(a,u,s)});var h={vs:d(a)};return f&&(h.barycenter=c/f,h.weight=f),h}function Jn(e,n,r){for(var t;n.length&&(t=ve(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Zn(e,n,r,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,f={};a&&(i=en.A(i,function(e){return e!==a&&e!==c}));var s=function(e,n){return p(n,function(n){var r=e.inEdges(n);if(r.length){var t=Pn.A(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,i);t.A(s,function(n){if(e.children(n.v).length){var t=Zn(e,n.v,r,o);f[n.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter")&&(i=n,u=t,Ae.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var h=Dn(s,r);!function(e,n){t.A(e,function(e){e.vs=d(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(h,f);var v=$n(h,o);if(a&&(v.vs=d([a,v.vs,c]),e.predecessors(a).length)){var g=e.node(e.predecessors(a)[0]),l=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+g.order+l.order)/(v.weight+2),v.weight+=2}return v}function Hn(e){var n=je(e),r=Kn(e,L(1,n+1),"inEdges"),o=Kn(e,L(n-1,-1,-1),"outEdges"),i=function(e){var n={},r=en.A(e.nodes(),function(n){return!e.children(n).length}),o=he(p(r,function(n){return e.node(n).rank})),i=p(L(o+1),function(){return[]}),u=qn(r,function(n){return e.node(n).rank});return t.A(u,function r(o){if(!ke(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),t.A(e.successors(o),r)}}),i}(e);Un(e,i);for(var u,a=Number.POSITIVE_INFINITY,c=0,d=0;d<4;++c,++d){Qn(c%2?r:o,c%4>=2);var f=Yn(e,i=Pe(e));f<a&&(d=0,u=Rn.A(i),a=f)}Un(e,u)}function Kn(e,n,r){return p(n,function(n){return Mn(e,n,r)})}function Qn(e,n){var r=new C.T;t.A(e,function(e){var o=e.graph().root,i=Zn(e,o,r,n);t.A(i.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var o,i={};t.A(r,function(r){for(var t,u,a=e.parent(r);a;){if((t=e.parent(a))?(u=i[t],i[t]=a):(u=o,o=a),u&&u!==a)return void n.setEdge(u,a);a=t}})}(e,r,i.vs)})}function Un(e,n){t.A(n,function(n){t.A(n,function(n,r){e.node(n).order=r})})}function Wn(e){var n=function(e){var n={},r=0;function o(i){var u=r;t.A(e.children(i),o),n[i]={low:u,lim:r++}}return t.A(e.children(),o),n}(e);t.A(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,u=[],a=[],c=Math.min(n[r].low,n[t].low),d=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),u.push(o)}while(o&&(n[o].low>c||d>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,c=0,d=u[c],f=!0;r!==o.w;){if(t=e.node(r),f){for(;(d=u[c])!==a&&e.node(d).maxRank<t.rank;)c++;d===a&&(f=!1)}if(!f){for(;c<u.length-1&&e.node(d=u[c+1]).minRank<=t.rank;)c++;d=u[c]}e.setParent(r,d),r=e.successors(r)[0]}})}var Xn=r(99922);const er=function(e,n){return e&&(0,le.A)(e,(0,Xn.A)(n))};var nr=r(97132);const rr=function(e,n){return null==e?e:(0,nr.A)(e,(0,Xn.A)(n),ie.A)};function tr(e,n){var r={};return Pn.A(n,function(n,o){var i=0,u=0,a=n.length,c=ve(o);return t.A(o,function(n,d){var f=function(e,n){if(e.node(n).dummy)return Xe(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=f?e.node(f).order:a;(f||n===c)&&(t.A(o.slice(u,d+1),function(n){t.A(e.predecessors(n),function(t){var o=e.node(t),u=o.order;!(u<i||s<u)||o.dummy&&e.node(n).dummy||or(r,t,n)})}),u=d+1,i=s)}),o}),r}function or(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ir(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function ur(e,n,r,o,i){var u={},a=function(e,n,r,o){var i=new C.T,u=e.graph(),a=function(e,n,r){return function(t,o,i){var u,a=t.node(o),c=t.node(i),d=0;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(d+=r?u:-u),u=0,d+=(a.dummy?n:e)/2,d+=(c.dummy?n:e)/2,d+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(d+=r?u:-u),u=0,d}}(u.nodesep,u.edgesep,o);return t.A(n,function(n){var o;t.A(n,function(n){var t=r[n];if(i.setNode(t),o){var u=r[o],c=i.edge(u,t);i.setEdge(u,t,Math.max(a(e,n,o),c||0))}o=n})}),i}(e,n,r,i),c=i?"borderLeft":"borderRight";function d(e,n){for(var r=a.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return d(function(e){u[e]=a.inEdges(e).reduce(function(e,n){return Math.max(e,u[n.v]+a.edge(n))},0)},a.predecessors.bind(a)),d(function(n){var r=a.outEdges(n).reduce(function(e,n){return Math.min(e,u[n.w]-a.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(u[n]=Math.max(u[n],r))},a.successors.bind(a)),t.A(o,function(e){u[e]=u[r[e]]}),u}function ar(e){var n,r=Pe(e),o=D.A(tr(e,r),function(e,n){var r={};function o(n,o,i,u,a){var c;t.A(L(o,i),function(o){c=n[o],e.node(c).dummy&&t.A(e.predecessors(c),function(n){var t=e.node(n);t.dummy&&(t.order<u||t.order>a)&&or(r,n,c)})})}return Pn.A(n,function(n,r){var i,u=-1,a=0;return t.A(r,function(t,c){if("border"===e.node(t).dummy){var d=e.predecessors(t);d.length&&(i=e.node(d[0]).order,o(r,a,c,u,i),a=c,u=i)}o(r,a,r.length,i,n.length)}),r}),r}(e,r)),i={};t.A(["u","d"],function(u){n="u"===u?r:In.A(r).reverse(),t.A(["l","r"],function(r){"r"===r&&(n=p(n,function(e){return In.A(e).reverse()}));var a=("u"===u?e.predecessors:e.successors).bind(e),c=function(e,n,r,o){var i={},u={},a={};return t.A(n,function(e){t.A(e,function(e,n){i[e]=e,u[e]=e,a[e]=n})}),t.A(n,function(e){var n=-1;t.A(e,function(e){var t=o(e);if(t.length){t=qn(t,function(e){return a[e]});for(var c=(t.length-1)/2,d=Math.floor(c),f=Math.ceil(c);d<=f;++d){var s=t[d];u[e]===e&&n<a[s]&&!ir(r,e,s)&&(u[s]=e,u[e]=i[e]=i[s],n=a[s])}}})}),{root:i,align:u}}(0,n,o,a),d=ur(e,n,c.root,c.align,"r"===r);"r"===r&&(d=pe(d,function(e){return-e})),i[u+r]=d})});var u=function(e,n){return qe(In.A(n),function(n){var r=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return rr(n,function(n,o){var i=function(e,n){return e.node(n).width}(e,o)/2;r=Math.max(n+i,r),t=Math.min(n-i,t)}),r-t})}(e,i);return function(e,n){var r=In.A(n),o=be(r),i=he(r);t.A(["u","d"],function(r){t.A(["l","r"],function(t){var u,a=r+t,c=e[a];if(c!==n){var d=In.A(c);(u="l"===t?o-be(d):i-he(d))&&(e[a]=pe(c,function(e){return e+u}))}})})}(i,u),function(e,n){return pe(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=qn(p(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function cr(e){(function(e){var n=Pe(e),r=e.graph().ranksep,o=0;t.A(n,function(n){var i=he(p(n,function(n){return e.node(n).height}));t.A(n,function(n){e.node(n).y=o+i/2}),o+=i+r})})(e=_e(e)),er(ar(e),function(n,r){e.node(r).x=n})}function dr(e,n){var r=n&&n.debugTiming?Re:Me;r("layout",()=>{var n=r(" buildLayoutGraph",()=>function(e){var n=new C.T({multigraph:!0,compound:!0}),r=br(e.graph());return n.setGraph(D.A({},sr,wr(r,fr),re(r,hr))),t.A(e.nodes(),function(r){var t=br(e.node(r));n.setNode(r,ce(wr(t,vr),gr)),n.setParent(r,e.parent(r))}),t.A(e.edges(),function(r){var t=br(e.edge(r));n.setEdge(r,D.A({},pr,wr(t,lr),re(t,Ar)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.A(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.A(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>z(e)),n(" nestingGraph.run",()=>Tn(e)),n(" rank",()=>On(_e(e))),n(" injectEdgeLabelProxies",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};Ne(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=be(p(e.nodes(),function(n){return e.node(n).rank})),r=[];t.A(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,i=e.graph().nodeRankFactor;t.A(r,function(n,r){Ae.A(n)&&r%i!==0?--o:o&&t.A(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.A(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=be(p(e.nodes(),function(n){return e.node(n).rank}));t.A(e.nodes(),function(r){var t=e.node(r);ke(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.A(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=he(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>Be(e)),n(" parentDummyChains",()=>Wn(e)),n(" addBorderSegments",()=>function(e){t.A(e.children(),function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;u<a;++u)Le(e,"borderLeft","_bl",r,i,u),Le(e,"borderRight","_br",r,i,u)}})}(e)),n(" order",()=>Hn(e)),n(" insertSelfEdges",()=>function(e){var n=Pe(e);t.A(n,function(n){var r=0;t.A(n,function(n,o){var i=e.node(n);i.order=o+r,t.A(i.selfEdges,function(n){Ne(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||Se(e)}(e)),n(" position",()=>cr(e)),n(" positionSelfEdges",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.A(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(ve(r.borderLeft)),u=e.node(ve(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),t.A(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.A(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>Ce(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,c=u.marginy||0;function d(e){var t=e.x,u=e.y,a=e.width,c=e.height;n=Math.min(n,t-a/2),r=Math.max(r,t+a/2),o=Math.min(o,u-c/2),i=Math.max(i,u+c/2)}t.A(e.nodes(),function(n){d(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=a,o-=c,t.A(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.A(e.edges(),function(r){var i=e.edge(r);t.A(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),u.width=r-n+a,u.height=i-o+c}(e)),n(" assignNodeIntersects",()=>function(e){t.A(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(Ie(i,r)),o.points.push(Ie(u,t))})}(e)),n(" reversePoints",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.A(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.A(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var fr=["nodesep","edgesep","ranksep","marginx","marginy"],sr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},hr=["acyclicer","ranker","rankdir","align"],vr=["width","height"],gr={width:0,height:0},lr=["minlen","weight","width","height","labeloffset"],pr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ar=["labelpos"];function wr(e,n){return pe(re(e,n),Number)}function br(e){var n={};return t.A(e,function(e,r){n[r.toLowerCase()]=e}),n}}}]);