webapp.flowDiagram-b222e15a.e1df0808.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of langgraph4j-studio Show documentation
Show all versions of langgraph4j-studio Show documentation
an **embed playground webapp** to run a Langgraph4j workflow in visual way
function t(t,e,r,a){Object.defineProperty(t,e,{get:r,set:a,enumerable:!0,configurable:!0})}var e=globalThis.parcelRequire0031,r=e.register;r("ipAiL",function(r,a){t(r.exports,"diagram",()=>U);var n=e("gZQEu"),i=e("4LkSm"),l=e("2YFJl"),s=e("4jcZX");e("8evp0");var o=e("4mVOR"),d=e("fUGrY"),c=e("ilMBJ"),u=e("020TX"),h=e("jTBQv"),p=e("5MNkI");function f(t,e,r){let a=(e.width+e.height)*.9,n=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],i=T(t,a,a,n);return r.intersect=function(t){return(0,u.intersectPolygon)(r,n,t)},i}function g(t,e,r){let a=e.height,n=a/4,i=e.width+2*n,l=[{x:n,y:0},{x:i-n,y:0},{x:i,y:-a/2},{x:i-n,y:-a},{x:n,y:-a},{x:0,y:-a/2}],s=T(t,i,a,l);return r.intersect=function(t){return(0,u.intersectPolygon)(r,l,t)},s}function y(t,e,r){let a=e.width,n=e.height,i=[{x:-n/2,y:0},{x:a,y:0},{x:a,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function x(t,e,r){let a=e.width,n=e.height,i=[{x:-2*n/6,y:0},{x:a-n/6,y:0},{x:a+2*n/6,y:-n},{x:n/6,y:-n}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function b(t,e,r){let a=e.width,n=e.height,i=[{x:2*n/6,y:0},{x:a+n/6,y:0},{x:a-2*n/6,y:-n},{x:-n/6,y:-n}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function v(t,e,r){let a=e.width,n=e.height,i=[{x:-2*n/6,y:0},{x:a+2*n/6,y:0},{x:a-n/6,y:-n},{x:n/6,y:-n}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function w(t,e,r){let a=e.width,n=e.height,i=[{x:n/6,y:0},{x:a-n/6,y:0},{x:a+2*n/6,y:-n},{x:-2*n/6,y:-n}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function m(t,e,r){let a=e.width,n=e.height,i=[{x:0,y:0},{x:a+n/2,y:0},{x:a,y:-n/2},{x:a+n/2,y:-n},{x:0,y:-n}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function k(t,e,r){let a=e.height,n=e.width+a/4,i=t.insert("rect",":first-child").attr("rx",a/2).attr("ry",a/2).attr("x",-n/2).attr("y",-a/2).attr("width",n).attr("height",a);return r.intersect=function(t){return(0,h.intersectRect)(r,t)},i}function L(t,e,r){let a=e.width,n=e.height,i=[{x:0,y:0},{x:a,y:0},{x:a,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],l=T(t,a,n,i);return r.intersect=function(t){return(0,u.intersectPolygon)(r,i,t)},l}function S(t,e,r){let a=e.width,n=a/2,i=n/(2.5+a/50),l=e.height+i,s=t.attr("label-offset-y",i).insert("path",":first-child").attr("d","M 0,"+i+" a "+n+","+i+" 0,0,0 "+a+" 0 a "+n+","+i+" 0,0,0 "+-a+" 0 l 0,"+l+" a "+n+","+i+" 0,0,0 "+a+" 0 l 0,"+-l).attr("transform","translate("+-a/2+","+-(l/2+i)+")");return r.intersect=function(t){let e=(0,h.intersectRect)(r,t),a=e.x-r.x;if(0!=n&&(Math.abs(a)r.height/2-i)){let l=i*i*(1-a*a/(n*n));0!=l&&(l=Math.sqrt(l)),l=i-l,t.y-r.y>0&&(l=-l),e.y+=l}return e},s}function T(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}e("eJNXH"),e("gngdn"),e("2ujND"),e("i8Fxz"),e("hV1gR"),e("c0ySZ");let N=function(t){t.shapes().question=f,t.shapes().hexagon=g,t.shapes().stadium=k,t.shapes().subroutine=L,t.shapes().cylinder=S,t.shapes().rect_left_inv_arrow=y,t.shapes().lean_right=x,t.shapes().lean_left=b,t.shapes().trapezoid=v,t.shapes().inv_trapezoid=w,t.shapes().rect_right_inv_arrow=m},A={},I=async function(t,e,r,a,n,i){let o=a?a.select(`[id="${r}"]`):(0,l.select)(`[id="${r}"]`),d=n||document;for(let r of Object.keys(t)){let a;let n=t[r],l="default";n.classes.length>0&&(l=n.classes.join(" "));let u=(0,s.k)(n.styles),h=void 0!==n.text?n.text:n.id;if((0,s.m)((0,s.c)().flowchart.htmlLabels)){let t={label:await (0,s.r)(h.replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),(0,s.c)())};(a=(0,c.addHtmlLabel)(o,t).node()).parentNode.removeChild(a)}else{let t=d.createElementNS("http://www.w3.org/2000/svg","text");for(let e of(t.setAttribute("style",u.labelStyle.replace("color:","fill:")),h.split(s.e.lineBreakRegex))){let r=d.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","1"),r.textContent=e,t.appendChild(r)}a=t}let p=0,f="";switch(n.type){case"round":p=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder"}(0,s.l).warn("Adding node",n.id,n.domId),e.setNode(i.db.lookUpDomId(n.id),{labelType:"svg",labelStyle:u.labelStyle,shape:f,label:a,rx:p,ry:p,class:l,style:u.style,id:i.db.lookUpDomId(n.id)})}},E=async function(t,e,r){let a,n,i=0;if(void 0!==t.defaultStyle){let e=(0,s.k)(t.defaultStyle);a=e.style,n=e.labelStyle}for(let o of t){i++;let d="L-"+o.start+"-"+o.end,c="LS-"+o.start,u="LE-"+o.end,h={};"arrow_open"===o.type?h.arrowhead="none":h.arrowhead="normal";let p="",f="";if(void 0!==o.style){let t=(0,s.k)(o.style);p=t.style,f=t.labelStyle}else switch(o.stroke){case"normal":p="fill:none",void 0!==a&&(p=a),void 0!==n&&(f=n);break;case"dotted":p="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p=" stroke-width: 3.5px;fill:none"}h.style=p,h.labelStyle=f,void 0!==o.interpolate?h.curve=(0,s.n)(o.interpolate,l.curveLinear):void 0!==t.defaultInterpolate?h.curve=(0,s.n)(t.defaultInterpolate,l.curveLinear):h.curve=(0,s.n)(A.curve,l.curveLinear),void 0===o.text?void 0!==o.style&&(h.arrowheadStyle="fill: #333"):(h.arrowheadStyle="fill: #333",h.labelpos="c",(0,s.m)((0,s.c)().flowchart.htmlLabels)?(h.labelType="html",h.label=`${await (0,s.r)(o.text.replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),(0,s.c)())}`):(h.labelType="text",h.label=o.text.replace(s.e.lineBreakRegex,"\n"),void 0===o.style&&(h.style=h.style||"stroke: #333; stroke-width: 1.5px;fill:none"),h.labelStyle=h.labelStyle.replace("color:","fill:"))),h.id=d,h.class=c+" "+u,h.minlen=o.length||1,e.setEdge(r.db.lookUpDomId(o.start),r.db.lookUpDomId(o.end),h,i)}},B=async function(t,e,r,a){let n,c;(0,s.l).info("Drawing flowchart");let{securityLevel:u,flowchart:h}=(0,s.c)();"sandbox"===u&&(n=(0,l.select)("#i"+e));let p="sandbox"===u?(0,l.select)(n.nodes()[0].contentDocument.body):(0,l.select)("body"),f="sandbox"===u?n.nodes()[0].contentDocument:document,g=a.db.getDirection();void 0===g&&(g="TD");let y=h.nodeSpacing||50,x=h.rankSpacing||50,b=new i.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:g,nodesep:y,ranksep:x,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),v=a.db.getSubGraphs();for(let t=v.length-1;t>=0;t--)c=v[t],a.db.addVertex(c.id,c.title,"group",void 0,c.classes);let w=a.db.getVertices();(0,s.l).warn("Get vertices",w);let m=a.db.getEdges(),k=0;for(k=v.length-1;k>=0;k--){c=v[k],(0,l.selectAll)("cluster").append("text");for(let t=0;t{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,C(t.flowchart),(0,n.f).clear(),(0,n.f).setGen("gen-1")}}}),r("8evp0",function(r,a){t(r.exports,"render",()=>e("4mVOR").render),e("4mVOR"),e("4LkSm"),e("bGsHL")}),r("4mVOR",function(r,a){t(r.exports,"render",()=>b);var n=e("2YFJl"),i=e("bZ3BC"),l=e("fpekr"),s=e("8XLqy"),o=e("hV1gR"),d=e("6M3ec"),c=e("cAF5L"),u=e("h22rD"),h=e("gKfIZ"),p=e("kXQ1r"),f=e("eA9Lm"),g=e("6UAuB"),y=e("c3aLw"),x=e("hvBt2");function b(){var t=function(t,e){e.nodes().forEach(function(t){var r=e.node(t);s.default(r,"label")||e.children(t).length||(r.label=t),s.default(r,"paddingX")&&i.default(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),s.default(r,"paddingY")&&i.default(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),s.default(r,"padding")&&i.default(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),i.default(r,v),l.default(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){r[t]=Number(r[t])}),s.default(r,"width")&&(r._prevWidth=r.width),s.default(r,"height")&&(r._prevHeight=r.height)}),e.edges().forEach(function(t){var r=e.edge(t);s.default(r,"label")||(r.label=""),i.default(r,w)});var r=m(t,"output"),a=m(r,"clusters"),n=m(r,"edgePaths"),b=(0,u.createEdgeLabels)(m(r,"edgeLabels"),e),k=(0,p.createNodes)(m(r,"nodes"),e,x.shapes);(0,o.layout)(e),(0,y.positionNodes)(k,e),(0,g.positionEdgeLabels)(b,e),(0,h.createEdgePaths)(n,e,d.arrows);var L=(0,c.createClusters)(a,e);(0,f.positionClusters)(L,e),l.default(e.nodes(),function(t){var r=e.node(t);s.default(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,s.default(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})};return t.createNodes=function(e){return arguments.length?((0,p.setCreateNodes)(e),t):p.createNodes},t.createClusters=function(e){return arguments.length?((0,c.setCreateClusters)(e),t):c.createClusters},t.createEdgeLabels=function(e){return arguments.length?((0,u.setCreateEdgeLabels)(e),t):u.createEdgeLabels},t.createEdgePaths=function(e){return arguments.length?((0,h.setCreateEdgePaths)(e),t):h.createEdgePaths},t.shapes=function(e){return arguments.length?((0,x.setShapes)(e),t):x.shapes},t.arrows=function(e){return arguments.length?((0,d.setArrows)(e),t):d.arrows},t}var v={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},w={arrowhead:"normal",curve:n.curveLinear};function m(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}}),r("6M3ec",function(r,a){t(r.exports,"arrows",()=>i),t(r.exports,"setArrows",()=>l);var n=e("fUGrY"),i={normal:function(t,e,r,a){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");n.applyStyle(i,r[a+"Style"]),r[a+"Class"]&&i.attr("class",r[a+"Class"])},vee:function(t,e,r,a){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");n.applyStyle(i,r[a+"Style"]),r[a+"Class"]&&i.attr("class",r[a+"Class"])},undirected:function(t,e,r,a){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");n.applyStyle(i,r[a+"Style"]),r[a+"Class"]&&i.attr("class",r[a+"Class"])}};function l(t){i=t}}),r("cAF5L",function(r,a){t(r.exports,"createClusters",()=>s),t(r.exports,"setCreateClusters",()=>o);var n=e("2YFJl"),i=e("dfUtR"),l=e("fUGrY"),s=function(t,e){var r=e.nodes().filter(function(t){return l.isSubgraph(e,t)}),a=t.selectAll("g.cluster").data(r,function(t){return t});l.applyTransition(a.exit(),e).style("opacity",0).remove();var s=a.enter().append("g").attr("class","cluster").attr("id",function(t){return e.node(t).id}).style("opacity",0).each(function(t){var r=e.node(t),a=n.select(this);n.select(this).append("rect");var l=a.append("g").attr("class","label");(0,i.addLabel)(l,r,r.clusterLabelPos)});return a=a.merge(s),(a=l.applyTransition(a,e).style("opacity",1)).selectAll("rect").each(function(t){var r=e.node(t),a=n.select(this);l.applyStyle(a,r.style)}),a};function o(t){s=t}}),r("dfUtR",function(r,a){t(r.exports,"addLabel",()=>s);var n=e("ilMBJ"),i=e("860lz"),l=e("c9RZI");function s(t,e,r){var a,s=e.label,o=t.append("g");"svg"===e.labelType?(0,i.addSVGLabel)(o,e):"string"!=typeof s||"html"===e.labelType?(0,n.addHtmlLabel)(o,e):(0,l.addTextLabel)(o,e);var d=o.node().getBBox();switch(r){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-d.height;break;default:a=-d.height/2}return o.attr("transform","translate("+-d.width/2+","+a+")"),o}}),r("860lz",function(r,a){t(r.exports,"addSVGLabel",()=>i);var n=e("fUGrY");function i(t,e){return t.node().appendChild(e.label),n.applyStyle(t,e.labelStyle),t}}),r("c9RZI",function(r,a){t(r.exports,"addTextLabel",()=>i);var n=e("fUGrY");function i(t,e){for(var r=t.append("text"),a=(function(t){for(var e,r="",a=!1,n=0;no),t(r.exports,"setCreateEdgeLabels",()=>d);var n=e("2YFJl"),i=e("8XLqy"),l=e("dfUtR"),s=e("fUGrY");let o=function(t,e){var r,a=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return s.edgeToId(t)}).classed("update",!0);return a.exit().remove(),a.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(a=t.selectAll("g.edgeLabel")).each(function(t){var r=n.select(this);r.select(".label").remove();var a=e.edge(t),s=(0,l.addLabel)(r,e.edge(t),0).classed("label",!0),o=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),i.default(a,"width")||(a.width=o.width),i.default(a,"height")||(a.height=o.height)}),r=a.exit?a.exit():a.selectAll(null),s.applyTransition(r,e).style("opacity",0).remove(),a};function d(t){o=t}}),r("gKfIZ",function(r,a){t(r.exports,"createEdgePaths",()=>d),t(r.exports,"setCreateEdgePaths",()=>c);var n=e("2YFJl"),i=e("jJJbn"),l=e("5GUsF"),s=e("6O58d"),o=e("fUGrY"),d=function(t,e,r){var a,d=t.selectAll("g.edgePath").data(e.edges(),function(t){return o.edgeToId(t)}).classed("update",!0),c=((a=d.enter().append("g").attr("class","edgePath").style("opacity",0)).append("path").attr("class","path").attr("d",function(t){var r=e.edge(t),a=e.node(t.v).elem,n=i.default(r.points.length).map(function(){var t,e;return t=a.getBBox(),{x:(e=a.ownerSVGElement.getScreenCTM().inverse().multiply(a.getScreenCTM()).translate(t.width/2,t.height/2)).e,y:e.f}});return u(r,n)}),a.append("defs"),a);(function(t,e){var r=t.exit();o.applyTransition(r,e).style("opacity",0).remove()})(d,e);var h=void 0!==d.merge?d.merge(c):d;return o.applyTransition(h,e).style("opacity",1),h.each(function(t){var r=n.select(this),a=e.edge(t);a.elem=this,a.id&&r.attr("id",a.id),o.applyClass(r,a.class,(r.classed("update")?"update ":"")+"edgePath")}),h.selectAll("path.path").each(function(t){var r=e.edge(t);r.arrowheadId=l.default("arrowhead");var a=n.select(this).attr("marker-end",function(){var t,e;return"url("+(t=location.href,e=r.arrowheadId,t.split("#")[0]+"#"+e)+")"}).style("fill","none");o.applyTransition(a,e).attr("d",function(t){var r,a,n,i;return r=e.edge(t),a=e.node(t.v),n=e.node(t.w),(i=r.points.slice(1,r.points.length-1)).unshift((0,s.intersectNode)(a,i[0])),i.push((0,s.intersectNode)(n,i[i.length-1])),u(r,i)}),o.applyStyle(a,r.style)}),h.selectAll("defs *").remove(),h.selectAll("defs").each(function(t){var a=e.edge(t);(0,r[a.arrowhead])(n.select(this),a.arrowheadId,a,"arrowhead")}),h};function c(t){d=t}function u(t,e){var r=(n.line||n.svg.line)().x(function(t){return t.x}).y(function(t){return t.y});return(r.curve||r.interpolate)(t.curve),r(e)}}),r("6O58d",function(e,r){t(e.exports,"intersectNode",()=>a);function a(t,e){return t.intersect(e)}}),r("kXQ1r",function(r,a){t(r.exports,"createNodes",()=>d),t(r.exports,"setCreateNodes",()=>c);var n=e("2YFJl"),i=e("8XLqy"),l=e("3mNDi"),s=e("dfUtR"),o=e("fUGrY"),d=function(t,e,r){var a,d=e.nodes().filter(function(t){return!o.isSubgraph(e,t)}),c=t.selectAll("g.node").data(d,function(t){return t}).classed("update",!0);return c.exit().remove(),c.enter().append("g").attr("class","node").style("opacity",0),(c=t.selectAll("g.node")).each(function(t){var a=e.node(t),d=n.select(this);o.applyClass(d,a.class,(d.classed("update")?"update ":"")+"node"),d.select("g.label").remove();var c=d.append("g").attr("class","label"),u=(0,s.addLabel)(c,a),h=r[a.shape],p=l.default(u.node().getBBox(),"width","height");a.elem=this,a.id&&d.attr("id",a.id),a.labelId&&c.attr("id",a.labelId),i.default(a,"width")&&(p.width=a.width),i.default(a,"height")&&(p.height=a.height),p.width+=a.paddingLeft+a.paddingRight,p.height+=a.paddingTop+a.paddingBottom,c.attr("transform","translate("+(a.paddingLeft-a.paddingRight)/2+","+(a.paddingTop-a.paddingBottom)/2+")");var f=n.select(this);f.select(".label-container").remove();var g=h(f,p,a).classed("label-container",!0);o.applyStyle(g,a.style);var y=g.node().getBBox();a.width=y.width,a.height=y.height}),a=c.exit?c.exit():c.selectAll(null),o.applyTransition(a,e).style("opacity",0).remove(),c};function c(t){d=t}}),r("eA9Lm",function(r,a){t(r.exports,"positionClusters",()=>l);var n=e("2YFJl"),i=e("fUGrY");function l(t,e){var r=t.filter(function(){return!n.select(this).classed("update")});function a(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}r.attr("transform",a),i.applyTransition(t,e).style("opacity",1).attr("transform",a),i.applyTransition(r.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){return-e.node(t).width/2}).attr("y",function(t){return-e.node(t).height/2})}}),r("6UAuB",function(r,a){t(r.exports,"positionEdgeLabels",()=>s);var n=e("2YFJl"),i=e("8XLqy"),l=e("fUGrY");function s(t,e){function r(t){var r=e.edge(t);return i.default(r,"x")?"translate("+r.x+","+r.y+")":""}t.filter(function(){return!n.select(this).classed("update")}).attr("transform",r),l.applyTransition(t,e).style("opacity",1).attr("transform",r)}}),r("c3aLw",function(r,a){t(r.exports,"positionNodes",()=>l);var n=e("2YFJl"),i=e("fUGrY");function l(t,e){function r(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}t.filter(function(){return!n.select(this).classed("update")}).attr("transform",r),i.applyTransition(t,e).style("opacity",1).attr("transform",r)}}),r("hvBt2",function(r,a){t(r.exports,"shapes",()=>o),t(r.exports,"setShapes",()=>d);var n=e("bnaJN"),i=e("33exb"),l=e("020TX"),s=e("jTBQv"),o={rect:function(t,e,r){var a=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(t){return(0,s.intersectRect)(r,t)},a},ellipse:function(t,e,r){var a=e.width/2,n=e.height/2,l=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",a).attr("ry",n);return r.intersect=function(t){return(0,i.intersectEllipse)(r,a,n,t)},l},circle:function(t,e,r){var a=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",a);return r.intersect=function(t){return(0,n.intersectCircle)(r,a,t)},i},diamond:function(t,e,r){var a=e.width*Math.SQRT2/2,n=e.height*Math.SQRT2/2,i=[{x:0,y:-n},{x:-a,y:0},{x:0,y:n},{x:a,y:0}],s=t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" "));return r.intersect=function(t){return(0,l.intersectPolygon)(r,i,t)},s}};function d(t){o=t}}),r("bnaJN",function(r,a){t(r.exports,"intersectCircle",()=>i);var n=e("33exb");function i(t,e,r){return(0,n.intersectEllipse)(t,e,e,r)}}),r("33exb",function(e,r){t(e.exports,"intersectEllipse",()=>a);function a(t,e,r,a){var n=t.x,i=t.y,l=n-a.x,s=i-a.y,o=Math.sqrt(e*e*s*s+r*r*l*l),d=Math.abs(e*r*l/o);a.xi);var n=e("aopqb");function i(t,e,r){var a=t.x,i=t.y,l=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)});for(var d=a-t.width/2-s,c=i-t.height/2-o,u=0;u1&&l.sort(function(t,e){var a=t.x-r.x,n=t.y-r.y,i=Math.sqrt(a*a+n*n),l=e.x-r.x,s=e.y-r.y,o=Math.sqrt(l*l+s*s);return i0))&&(i=a.y-r.y,s=r.x-a.x,d=a.x*r.y-r.x*a.y,c=i*t.x+s*t.y+d,u=i*e.x+s*e.y+d,!(0!==c&&0!==u&&c*u>0)&&0!=(f=n*s-i*l)))return g=Math.abs(f/2),{x:(y=l*d-s*o)<0?(y-g)/f:(y+g)/f,y:(y=i*o-n*d)<0?(y-g)/f:(y+g)/f}}t(e.exports,"intersectLine",()=>a)}),r("jTBQv",function(e,r){t(e.exports,"intersectRect",()=>a);function a(t,e){var r,a,n=t.x,i=t.y,l=e.x-n,s=e.y-i,o=t.width/2,d=t.height/2;return Math.abs(s)*o>Math.abs(l)*d?(s<0&&(d=-d),r=0===s?0:d*l/s,a=d):(l<0&&(o=-o),r=o,a=0===l?0:o*s/l),{x:n+r,y:i+a}}}),r("bGsHL",function(t,r){e("6O58d"),e("bnaJN"),e("33exb"),e("020TX"),e("jTBQv")}),r("hNIl0",function(r,a){t(r.exports,"default",()=>i);var n=e("gbpSA"),i=function(t){return(0,n.default)(t,4)}}),r("jDsny",function(r,a){t(r.exports,"default",()=>l);var n=e("i9He5"),i=e("9VYra"),l=(t,e)=>(0,n.default).lang.round((0,i.default).parse(t)[e])});
//# sourceMappingURL=flowDiagram-b222e15a.e1df0808.js.map