PageSourceSearch

https://artefatospro.com.br/assets/dagre-VKFMJZFB-j4P7jMw0.js

js artefatospro.com.br collected 2026-09-24 14:36:25 UTC 9,616 bytes, 5 lines download raw bytes

1import{c as D,w as M,a as O,f as P,b as N,s as J}from"./chunk-RYQCIY6F-COmQlXMp.js";import{_ as X,a5 as v,a6 as A,a7 as _,a8 as Y,l as a,c as H,a9 as $,aa as W,$ as j,ab as F,a0 as R,Y as q,ac as z,ad as K,ae as G}from"./percentages-BXMCSKIN-BU-4qp3W.js";import{G as Q}from"./graph-nf4squmD.js";import{l as U}from"./layout-BEYhyRub.js";import"./map-Dv9QI1Rl.js";import"./vendor-react-O1HtssjF.js";import"./index-DE-2a8lD.js";import"./vendor-query-C57Ujfuk.js";import"./vendor-radix-Cn4zZLa9.js";import"./vendor-icons-2dxAfxR_.js";import"./vendor-datefns-RsZNnTnu.js";import"./vendor-openai-PX4_LG7y.js";import"./with-selector-0jzZ2XpP.js";import"./value-BItR2wN3.js";import"./purify.es-R9tISEbc.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="79605656-6072-448b-b8bd-1bf5cc266d19",o._sentryDebugIdIdentifier="sentry-dbid-79605656-6072-448b-b8bd-1bf5cc266d19")}catch{}})();var T=X((o,s,c)=>Math.max(s,Math.min(c,o)),"clamp"),C=X((o="TB")=>{switch(o){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=X(o=>o==="flowchart"||o==="flowchart-v2"||o==="stateDiagram","shouldMergeSelfLoopSegments"),Z=X((o,s,c,y,d)=>{const f=[],p=new Set;if(c.forEach(({start:r,end:t})=>{r!==y&&p.add(r),t!==y&&p.add(t)}),p.forEach(r=>{const t=o.node(r);typeof(t==null?void 0:t.x)=="number"&&typeof(t==null?void 0:t.y)=="number"&&f.push(t)}),f.length===0&&c.forEach(({edge:r})=>{(r.points??[]).forEach(t=>{typeof(t==null?void 0:t.x)=="number"&&typeof(t==null?void 0:t.y)=="number"&&f.push(t)})}),f.length===0)return C(d);const l=f.reduce((r,t)=>({x:r.x+t.x/f.length,y:r.y+t.y/f.length}),{x:0,y:0}),h=l.x-s.x,i=l.y-s.y;return Math.abs(h)>Math.abs(i)?h>0?"right":"left":Math.abs(i)>0?i>0?"bottom":"top":C(d)},"getSelfLoopSide"),ee=X((o,s="top",c=0,y=0)=>{const d=o.x,f=o.y-c,p=o.width/2,l=o.height/2,h=Math.max(36,Math.min(100,o.width*.8)),i=T(Math.max(y,o.width*.35),36,h),r=T(Math.min(o.width,o.height)*.45,24,48);switch(s){case"bottom":{const t=f+l;return[{x:d-i/2,y:t},{x:d-i/2,y:t+r},{x:d+i/2,y:t+r},{x:d+i/2,y:t}]}case"right":{const t=d+p;return[{x:t,y:f-i/2},{x:t+r,y:f-i/2},{x:t+r,y:f+i/2},{x:t,y:f+i/2}]}case"left":{const t=d-p;return[{x:t,y:f-i/2},{x:t-r,y:f-i/2},{x:t-r,y:f+i/2},{x:t,y:f+i/2}]}case"top":default:{const t=f-l;return[{x:d-i/2,y:t},{x:d-i/2,y:t-r},{x:d+i/2,y:t-r},{x:d+i/2,y:t}]}}},"getSelfLoopPoints"),te=X((o,s,c="top",y=0,d={})=>{const p=o.x,l=o.y-y,h=d.width??0,i=d.height??0;switch(c){case"bottom":return{x:p,y:Math.max(...s.map(r=>r.y))+i/2+4};case"right":return{x:Math.max(...s.map(r=>r.x))+h/2+4,y:l};case"left":return{x:Math.min(...s.map(r=>r.x))-h/2-4,y:l};case"top":default:return{x:p,y:Math.min(...s.map(r=>r.y))-i/2-4}}},"getSelfLoopLabelPosition"),se=X((o,s=0,{mergeSelfLoops:c=!0}={})=>{var p;const y=new Map,d=[],f=(p=o.graph())==null?void 0:p.rankdir;
1return o.edges().forEach(l=>{const h=o.edge(l);if(c&&h.selfLoop){const i=h.selfLoop.id;y.has(i)||y.set(i,[]),y.get(i).push({edge:h,start:l.v,end:l.w})}else d.push({edge:h,start:l.v,end:l.w})}),y.forEach(l=>{if(l.length!==3){l.forEach(n=>d.push(n));return}l.sort((n,e)=>n.edge.selfLoop.order-e.edge.selfLoop.order);const[h,i,r]=l,t=h.edge.originalEdge??i.edge.originalEdge??r.edge.originalEdge??i.edge,g=o.node(t.start);if(!g){l.forEach(n=>d.push(n));return}const S={width:i.edge.width,height:i.edge.height},b=Z(o,g,l,t.start,f),w=ee(g,b,s,S.width??0),E=te(g,w,b,s,S),m={...i.edge,...t,id:t.id,points:w,start:t.start,end:t.end,x:E.x,y:E.y,width:S.width,height:S.height,labelStyle:i.edge.labelStyle,fromCluster:h.edge.fromCluster??i.edge.fromCluster??r.edge.fromCluster,toCluster:h.edge.toCluster??i.edge.toCluster??r.edge.toCluster};delete m.selfLoop,delete m.originalEdge,d.push({edge:m,start:m.start,end:m.end})}),d},"getEdgesToRender"),k=X(async(o,s,c,y,d,f)=>{a.warn("Graph in recursive render:XAX",M(s),d);const p=s.graph().rankdir;a.trace("Dir in recursive render - dir:",p);const l=o.insert("g").attr("class","root");s.nodes()?a.info("Recursive render XXX",s.nodes()):a.info("No nodes found for",s),s.edges().length>0&&a.info("Recursive edges",s.edge(s.edges()[0]));const h=l.insert("g").attr("class","clusters"),i=l.insert("g").attr("class","edgePaths"),r=l.insert("g").attr("class","edgeLabels"),t=l.insert("g").attr("class","nodes"),g=V(c);await Promise.all(s.nodes().map(async function(n){const e=s.node(n);if(d!==void 0){const u=JSON.parse(JSON.stringify(d.clusterData));a.trace(`Setting data for parent cluster XXX
2 Node.id = `,n,`
3 data=`,u.height,`
4Parent cluster`,d.height),s.setNode(d.id,u),s.parent(n)||(a.trace("Setting parent",n,d.id),s.setParent(n,d.id,u))}if(a.info("(Insert) Node XXX"+n+": "+JSON.stringify(s.node(n))),e!=null&&e.clusterNode){a.info("Cluster identified XBX",n,e.width,s.node(n));const{ranksep:u,nodesep:x}=s.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const L=await k(t,e.graph,c,y,s.node(n),f),I=L.elem;$(e,I),e.diff=L.diff||0,a.info("New compound node after recursive render XAX",n,"width",e.width,"height",e.height),W(I,e)}else s.children(n).length>0?(a.trace("Cluster - the non recursive path XBX",n,e.id,e,e.width,"Graph:",s),a.trace(P(e.id,s)),N.set(e.id,{id:P(e.id,s),node:e})):(a.trace("Node - the non recursive path XAX",n,t,s.node(n),p),await j(t,s.node(n),{config:f,dir:p}))})),await X(async()=>{const n=s.edges().map(async function(e){const u=s.edge(e.v,e.w,e.name);if(a.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),a.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(s.edge(e))),a.info("Fix",N,"ids:",e.v,e.w,"Translating: ",N.get(e.v),N.get(e.w)),g&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(r,u),u.id=x;return}await G(r,u)});await Promise.all(n)},"processEdges")(),a.info("Graph before layout:",JSON.stringify(M(s))),a.info("############################################# XXX"),a.info("###                Layout                 ### XXX"),a.info("############################################# XXX"),U(s),a.info("Graph after layout:",JSON.stringify(M(s)));let b=0,{subGraphTitleTotalMargin:w}=F(f);await Promise.all(J(s).map(async function(n){var u;const e=s.node(n);if(a.info("Position XBX => "+n+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e!=null&&e.clusterNode)e.y+=w,a.info("A tainted cluster node XBX1",n,e.id,e.width,e.height,e.x,e.y,s.parent(n)),N.get(e.id).node=e,R(e);else if(s.children(n).length>0){a.info("A pure cluster node XBX1",n,e.id,e.x,e.y,e.width,e.height,s.parent(n)),e.height+=w,s.node(e.parentId);const x=(e==null?void 0:e.padding)/2||0,L=((u=e==null?void 0:e.labelBBox)==null?void 0:u.height)||0,I=L-x||0;a.debug("OffsetY",I,"labelHeight",L,"halfPadding",x),await q(h,e),N.get(e.id).node=e}else{const x=s.node(e.parentId);e.y+=w/2,a.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",x,x==null?void 0:x.offsetY,e),R(e)}}));const E=w/2;return se(s,E,{mergeSelfLoops:g}
4).forEach(function({edge:n,start:e,end:u}){a.info("Edge "+e+" -> "+u+": "+JSON.stringify(n),n),n.points.forEach(B=>B.y+=E);const x=s.node(e),L=s.node(u),I=z(i,n,N,c,x,L,y);K(n,I)}),s.nodes().forEach(function(n){const e=s.node(n);a.info(n,e.type,e.diff),e.isGroup&&(b=e.diff)}),a.warn("Returning from recursive render XAX",l,b),{elem:l,diff:b}},"recursiveRender"),be=X(async(o,s)=>{var f,p,l,h,i,r;const c=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:o.direction,nodesep:((f=o.config)==null?void 0:f.nodeSpacing)||((l=(p=o.config)==null?void 0:p.flowchart)==null?void 0:l.nodeSpacing)||o.nodeSpacing,ranksep:((h=o.config)==null?void 0:h.rankSpacing)||((r=(i=o.config)==null?void 0:i.flowchart)==null?void 0:r.rankSpacing)||o.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),y=s.select("g");v(y,o.markers,o.type,o.diagramId),A(),_(),Y(),D(),o.nodes.forEach(t=>{c.setNode(t.id,{...t}),t.parentId&&c.setParent(t.id,t.parentId)}),a.debug("Edges:",o.edges),o.edges.forEach(t=>{if(t.start===t.end){const g=t.start,S=g+"---"+g+"---1",b=g+"---"+g+"---2",w=c.node(g);c.setNode(S,{domId:S,id:S,parentId:w.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),c.setParent(S,w.parentId),c.setNode(b,{domId:b,id:b,parentId:w.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),c.setParent(b,w.parentId);const E=structuredClone(t),m=structuredClone(t),n=structuredClone(t),e=structuredClone(t);m.originalEdge=E,m.selfLoop={id:E.id,order:0},n.originalEdge=E,n.selfLoop={id:E.id,order:1},e.originalEdge=E,e.selfLoop={id:E.id,order:2},m.label="",m.arrowTypeEnd="none",m.endLabelLeft="",m.endLabelRight="",m.startLabelLeft="",m.id=g+"-cyclic-special-1",n.startLabelRight="",n.startLabelLeft="",n.endLabelLeft="",n.endLabelRight="",n.arrowTypeStart="none",n.arrowTypeEnd="none",n.id=g+"-cyclic-special-mid",e.label="",e.startLabelRight="",e.startLabelLeft="",e.arrowTypeStart="none",w.isGroup&&(m.fromCluster=g,e.toCluster=g),e.id=g+"-cyclic-special-2",e.arrowTypeStart="none",c.setEdge(g,S,m,g+"-cyclic-special-0"),c.setEdge(S,b,n,g+"-cyclic-special-1"),c.setEdge(b,g,e,g+"-cyclic-special-2")}else c.setEdge(t.start,t.end,{...t},t.id)}),a.warn("Graph at first:",JSON.stringify(M(c))),O(c),a.warn("Graph after XAX:",JSON.stringify(M(c)));const d=H();await k(y,c,o.type,o.diagramId,void 0,d)},"render");export{se as getEdgesToRender,be as render};
5//# sourceMappingURL=dagre-VKFMJZFB-j4P7jMw0.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.