You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
30 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8565],{42098:function(t,e,r){r.d(e,{a:function(){return a}});var n=r(89929);function a(t,e){var r=t.append("foreignObject").attr("width","100000"),a=r.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var l=e.label;switch(typeof l){case"function":a.insert(l);break;case"object":a.insert(function(){return l});break;default:a.html(l)}n.bg(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var i=a.node().getBoundingClientRect();return r.attr("width",i.width).attr("height",i.height),r}},89929:function(t,e,r){r.d(e,{$p:function(){return c},O1:function(){return i},WR:function(){return h},bF:function(){return l},bg:function(){return d}});var n=r(6843),a=r(82610);function l(t,e){return!!t.children(e).length}function i(t){return s(t.v)+":"+s(t.w)+":"+s(t.name)}var o=/:/g;function s(t){return t?String(t).replace(o,"\\:"):""}function d(t,e){e&&t.attr("style",e)}function c(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function h(t,e){var r=e.graph();if(n.Z(r)){var l=r.transition;if(a.Z(l))return l(t)}return t}},48565:function(t,e,r){r.d(e,{diagram:function(){return $}});var n=r(9490),a=r(77832),l=r(36783),i=r(51893),o=r(74550),s=r(34218),d=r(10361),c=r(91605),h=r(89929),u={normal:function(t,e,r,n){var a=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");h.bg(a,r[n+"Style"]),r[n+"Class"]&&a.attr("class",r[n+"Class"])},vee:function(t,e,r,n){var a=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");h.bg(a,r[n+"Style"]),r[n+"Class"]&&a.attr("class",r[n+"Class"])},undirected:function(t,e,r,n){var a=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");h.bg(a,r[n+"Style"]),r[n+"Class"]&&a.attr("class",r[n+"Class"])}},p=r(42098);function f(t,e,r){var n,a=e.label,l=t.append("g");"svg"===e.labelType?(l.node().appendChild(e.label),h.bg(l,e.labelStyle)):"string"!=typeof a||"html"===e.labelType?(0,p.a)(l,e):function(t,e){for(var r=t.append("text"),n=(function(t){for(var e,r="",n=!1,a=0;a<t.length;++a)(e=t[a],n)?("n"===e?r+="\n":r+=e,n=!1):"\\"===e?n=!0:r+=e;return r})(e.label).split("\n"),a=0;a<n.length;a++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(n[a]);return h.bg(r,e.labelStyle),r}(l,e);var i=l.node().getBBox();switch(r){case"top":n=-e.height/2;break;case"bottom":n=e.height/2-i.height;break;default:n=-i.height/2}return l.attr("transform","translate("+-i.width/2+","+n+")"),l}var g=function(t,e){var r=e.nodes().filter(function(t){return h.bF(e,t)}),n=t.selectAll("g.cluster").data(r,function(t){return t});h.WR(n.exit(),e).style("opacity",0).remove();var a=n.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),n=l.Ys(this);l.Ys(this).append("rect"),f(n.append("g").attr("class","label"),r,r.clusterLabelPos)});return n=n.merge(a),(n=h.WR(n,e).style("opacity",1)).selectAll("rect").each(function(t){var r=e.node(t),n=l.Ys(this);h.bg(n,r.style)}),n};let y=function(t,e){var r,n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return h.O1(t)}).classed("update",!0);return n.exit().remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(n=t.selectAll("g.edgeLabel")).each(function(t){var r=l.Ys(this);r.select(".label").remove();var n=e.edge(t),a=f(r,e.edge(t),0).classed("label",!0),i=a.node().getBBox();n.labelId&&a.attr("id",n.labelId),o.Z(n,"width")||(n.width=i.width),o.Z(n,"height")||(n.height=i.height)}),r=n.exit?n.exit():n.selectAll(null),h.WR(r,e).style("opacity",0).remove(),n};var b=r(48427),w=r(43301);function x(t,e){return t.intersect(e)}var v=function(t,e,r){var n,a=t.selectAll("g.edgePath").data(e.edges(),function(t){return h.O1(t)}).classed("update",!0),i=((n=a.enter().append("g").attr("class","edgePath").style("opacity",0)).append("path").attr("class","path").attr("d",function(t){var r=e.edge(t),n=e.node(t.v).elem,a=w.Z(r.points.length).map(function(){var t,e;return t=n.getBBox(),{x:(e=n.ownerSVGElement.getScreenCTM().inverse().multiply(n.getScreenCTM()).translate(t.width/2,t.height/2)).e,y:e.f}});return k(r,a)}),n.append("defs"),n);!function(t,e){var r=t.exit();h.WR(r,e).style("opacity",0).remove()}(a,e);var o=void 0!==a.merge?a.merge(i):a;return h.WR(o,e).style("opacity",1),o.each(function(t){var r=l.Ys(this),n=e.edge(t);n.elem=this,n.id&&r.attr("id",n.id),h.$p(r,n.class,(r.classed("update")?"update ":"")+"edgePath")}),o.selectAll("path.path").each(function(t){var r=e.edge(t);r.arrowheadId=b.Z("arrowhead");var n=l.Ys(this).attr("marker-end",function(){var t,e;return"url("+(t=location.href,e=r.arrowheadId,t.split("#")[0]+"#"+e)+")"}).style("fill","none");h.WR(n,e).attr("d",function(t){var r,n,a,l;return r=e.edge(t),n=e.node(t.v),a=e.node(t.w),(l=r.points.slice(1,r.points.length-1)).unshift(x(n,l[0])),l.push(x(a,l[l.length-1])),k(r,l)}),h.bg(n,r.style)}),o.selectAll("defs *").remove(),o.selectAll("defs").each(function(t){var n=e.edge(t);(0,r[n.arrowhead])(l.Ys(this),n.arrowheadId,n,"arrowhead")}),o};function k(t,e){var r=(l.jvg||l.YPS.line)().x(function(t){return t.x}).y(function(t){return t.y});return(r.curve||r.interpolate)(t.curve),r(e)}var m=r(37013),S=function(t,e,r){var n,a=e.nodes().filter(function(t){return!h.bF(e,t)}),i=t.selectAll("g.node").data(a,function(t){return t}).classed("update",!0);return i.exit().remove(),i.enter().append("g").attr("class","node").style("opacity",0),(i=t.selectAll("g.node")).each(function(t){var n=e.node(t),a=l.Ys(this);h.$p(a,n.class,(a.classed("update")?"update ":"")+"node"),a.select("g.label").remove();var i=a.append("g").attr("class","label"),s=f(i,n),d=r[n.shape],c=m.Z(s.node().getBBox(),"width","height");n.elem=this,n.id&&a.attr("id",n.id),n.labelId&&i.attr("id",n.labelId),o.Z(n,"width")&&(c.width=n.width),o.Z(n,"height")&&(c.height=n.height),c.width+=n.paddingLeft+n.paddingRight,c.height+=n.paddingTop+n.paddingBottom,i.attr("transform","translate("+(n.paddingLeft-n.paddingRight)/2+","+(n.paddingTop-n.paddingBottom)/2+")");var u=l.Ys(this);u.select(".label-container").remove();var p=d(u,c,n).classed("label-container",!0);h.bg(p,n.style);var g=p.node().getBBox();n.width=g.width,n.height=g.height}),n=i.exit?i.exit():i.selectAll(null),h.WR(n,e).style("opacity",0).remove(),i};function _(t,e,r,n){var a=t.x,l=t.y,i=a-n.x,o=l-n.y,s=Math.sqrt(e*e*o*o+r*r*i*i),d=Math.abs(e*r*i/s);n.x<a&&(d=-d);var c=Math.abs(e*r*o/s);return n.y<l&&(c=-c),{x:a+d,y:l+c}}function T(t,e,r){var n=t.x,a=t.y,l=[],i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(t){i=Math.min(i,t.x),o=Math.min(o,t.y)});for(var s=n-t.width/2-i,d=a-t.height/2-o,c=0;c<e.length;c++){var h=e[c],u=e[c<e.length-1?c+1:0],p=function(t,e,r,n){var a,l,i,o,s,d,c,h,u,p,f,g,y;if(a=e.y-t.y,i=t.x-e.x,s=e.x*t.y-t.x*e.y,u=a*r.x+i*r.y+s,p=a*n.x+i*n.y+s,(0===u||0===p||!(u*p>0))&&(l=n.y-r.y,o=r.x-n.x,d=n.x*r.y-r.x*n.y,c=l*t.x+o*t.y+d,h=l*e.x+o*e.y+d,!(0!==c&&0!==h&&c*h>0)&&0!=(f=a*o-l*i)))return g=Math.abs(f/2),{x:(y=i*d-o*s)<0?(y-g)/f:(y+g)/f,y:(y=l*s-a*d)<0?(y-g)/f:(y+g)/f}}(t,r,{x:s+h.x,y:d+h.y},{x:s+u.x,y:d+u.y});p&&l.push(p)}return l.length?(l.length>1&&l.sort(function(t,e){var n=t.x-r.x,a=t.y-r.y,l=Math.sqrt(n*n+a*a),i=e.x-r.x,o=e.y-r.y,s=Math.sqrt(i*i+o*o);return l<s?-1:l===s?0:1}),l[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function L(t,e){var r,n,a=t.x,l=t.y,i=e.x-a,o=e.y-l,s=t.width/2,d=t.height/2;return Math.abs(o)*s>Math.abs(i)*d?(o<0&&(d=-d),r=0===o?0:d*i/o,n=d):(i<0&&(s=-s),r=s,n=0===i?0:s*o/i),{x:a+r,y:l+n}}var C={rect:function(t,e,r){var n=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 L(r,t)},n},ellipse:function(t,e,r){var n=e.width/2,a=e.height/2,l=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",a);return r.intersect=function(t){return _(r,n,a,t)},l},circle:function(t,e,r){var n=Math.max(e.width,e.height)/2,a=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return r.intersect=function(t){return _(r,n,n,t)},a},diamond:function(t,e,r){var n=e.width*Math.SQRT2/2,a=e.height*Math.SQRT2/2,l=[{x:0,y:-a},{x:-n,y:0},{x:0,y:a},{x:n,y:0}],i=t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" "));return r.intersect=function(t){return T(r,l,t)},i}};function A(){var t=function(t,e){e.nodes().forEach(function(t){var r=e.node(t);o.Z(r,"label")||e.children(t).length||(r.label=t),o.Z(r,"paddingX")&&s.Z(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),o.Z(r,"paddingY")&&s.Z(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),o.Z(r,"padding")&&s.Z(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),s.Z(r,E),d.Z(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){r[t]=Number(r[t])}),o.Z(r,"width")&&(r._prevWidth=r.width),o.Z(r,"height")&&(r._prevHeight=r.height)}),e.edges().forEach(function(t){var r=e.edge(t);o.Z(r,"label")||(r.label=""),s.Z(r,N)});var r=B(t,"output"),n=B(r,"clusters"),a=B(r,"edgePaths"),i=y(B(r,"edgeLabels"),e),p=S(B(r,"nodes"),e,C);(0,c.bK)(e),function(t,e){function r(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}t.filter(function(){return!l.Ys(this).classed("update")}).attr("transform",r),h.WR(t,e).style("opacity",1).attr("transform",r)}(p,e),function(t,e){function r(t){var r=e.edge(t);return o.Z(r,"x")?"translate("+r.x+","+r.y+")":""}t.filter(function(){return!l.Ys(this).classed("update")}).attr("transform",r),h.WR(t,e).style("opacity",1).attr("transform",r)}(i,e),v(a,e,u),function(t,e){var r=t.filter(function(){return!l.Ys(this).classed("update")});function n(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}r.attr("transform",n),h.WR(t,e).style("opacity",1).attr("transform",n),h.WR(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})}(g(n,e),e),d.Z(e.nodes(),function(t){var r=e.node(t);o.Z(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,o.Z(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})};return t.createNodes=function(e){return arguments.length?(S=e,t):S},t.createClusters=function(e){return arguments.length?(g=e,t):g},t.createEdgeLabels=function(e){return arguments.length?(y=e,t):y},t.createEdgePaths=function(e){return arguments.length?(v=e,t):v},t.shapes=function(e){return arguments.length?(C=e,t):C},t.arrows=function(e){return arguments.length?(u=e,t):u},t}var E={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},N={arrowhead:"normal",curve:l.c_6};function B(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var I=r(92829);function M(t,e,r){let n=(e.width+e.height)*.9,a=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],l=q(t,n,n,a);return r.intersect=function(t){return T(r,a,t)},l}function R(t,e,r){let n=e.height,a=n/4,l=e.width+2*a,i=[{x:a,y:0},{x:l-a,y:0},{x:l,y:-n/2},{x:l-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],o=q(t,l,n,i);return r.intersect=function(t){return T(r,i,t)},o}function Y(t,e,r){let n=e.width,a=e.height,l=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function Z(t,e,r){let n=e.width,a=e.height,l=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function D(t,e,r){let n=e.width,a=e.height,l=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function W(t,e,r){let n=e.width,a=e.height,l=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function U(t,e,r){let n=e.width,a=e.height,l=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function z(t,e,r){let n=e.width,a=e.height,l=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function O(t,e,r){let n=e.height,a=e.width+n/4,l=t.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return r.intersect=function(t){return L(r,t)},l}function P(t,e,r){let n=e.width,a=e.height,l=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],i=q(t,n,a,l);return r.intersect=function(t){return T(r,l,t)},i}function j(t,e,r){let n=e.width,a=n/2,l=a/(2.5+n/50),i=e.height+l,o=t.attr("label-offset-y",l).insert("path",":first-child").attr("d","M 0,"+l+" a "+a+","+l+" 0,0,0 "+n+" 0 a "+a+","+l+" 0,0,0 "+-n+" 0 l 0,"+i+" a "+a+","+l+" 0,0,0 "+n+" 0 l 0,"+-i).attr("transform","translate("+-n/2+","+-(i/2+l)+")");return r.intersect=function(t){let e=L(r,t),n=e.x-r.x;if(0!=a&&(Math.abs(n)<r.width/2||Math.abs(n)==r.width/2&&Math.abs(e.y-r.y)>r.height/2-l)){let i=l*l*(1-n*n/(a*a));0!=i&&(i=Math.sqrt(i)),i=l-i,t.y-r.y>0&&(i=-i),e.y+=i}return e},o}function q(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}r(89539),r(99824),r(68985),r(23780);let V={addToRender:function(t){t.shapes().question=M,t.shapes().hexagon=R,t.shapes().stadium=O,t.shapes().subroutine=P,t.shapes().cylinder=j,t.shapes().rect_left_inv_arrow=Y,t.shapes().lean_right=Z,t.shapes().lean_left=D,t.shapes().trapezoid=W,t.shapes().inv_trapezoid=U,t.shapes().rect_right_inv_arrow=z},addToRenderV2:function(t){t({question:M}),t({hexagon:R}),t({stadium:O}),t({subroutine:P}),t({cylinder:j}),t({rect_left_inv_arrow:Y}),t({lean_right:Z}),t({lean_left:D}),t({trapezoid:W}),t({inv_trapezoid:U}),t({rect_right_inv_arrow:z})}},X={},F=function(t,e,r,n,a,o){let s=n?n.select('[id="'.concat(r,'"]')):(0,l.Ys)('[id="'.concat(r,'"]')),d=a||document;Object.keys(t).forEach(function(r){let n;let a=t[r],l="default";a.classes.length>0&&(l=a.classes.join(" "));let c=(0,i.k)(a.styles),h=void 0!==a.text?a.text:a.id;if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t={label:h.replace(/fa[blrs]?:fa-[\w-]+/g,t=>"<i class='".concat(t.replace(":"," "),"'></i>"))};(n=(0,p.a)(s,t).node()).parentNode.removeChild(n)}else{let t=d.createElementNS("http://www.w3.org/2000/svg","text");for(let e of(t.setAttribute("style",c.labelStyle.replace("color:","fill:")),h.split(i.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)}n=t}let u=0,f="";switch(a.type){case"round":u=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"}i.l.warn("Adding node",a.id,a.domId),e.setNode(o.db.lookUpDomId(a.id),{labelType:"svg",labelStyle:c.labelStyle,shape:f,label:n,rx:u,ry:u,class:l,style:c.style,id:o.db.lookUpDomId(a.id)})})},G=function(t,e,r){let n,a,o=0;if(void 0!==t.defaultStyle){let e=(0,i.k)(t.defaultStyle);n=e.style,a=e.labelStyle}t.forEach(function(s){o++;let d="L-"+s.start+"-"+s.end,c="LS-"+s.start,h="LE-"+s.end,u={};"arrow_open"===s.type?u.arrowhead="none":u.arrowhead="normal";let p="",f="";if(void 0!==s.style){let t=(0,i.k)(s.style);p=t.style,f=t.labelStyle}else switch(s.stroke){case"normal":p="fill:none",void 0!==n&&(p=n),void 0!==a&&(f=a);break;case"dotted":p="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p=" stroke-width: 3.5px;fill:none"}u.style=p,u.labelStyle=f,void 0!==s.interpolate?u.curve=(0,i.n)(s.interpolate,l.c_6):void 0!==t.defaultInterpolate?u.curve=(0,i.n)(t.defaultInterpolate,l.c_6):u.curve=(0,i.n)(X.curve,l.c_6),void 0===s.text?void 0!==s.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",(0,i.m)((0,i.c)().flowchart.htmlLabels)?(u.labelType="html",u.label='<span id="L-'.concat(d,'" class="edgeLabel L-').concat(c,"' L-").concat(h,'" style="').concat(u.labelStyle,'">').concat(s.text.replace(/fa[blrs]?:fa-[\w-]+/g,t=>"<i class='".concat(t.replace(":"," "),"'></i>")),"</span>")):(u.labelType="text",u.label=s.text.replace(i.e.lineBreakRegex,"\n"),void 0===s.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=d,u.class=c+" "+h,u.minlen=s.length||1,e.setEdge(r.db.lookUpDomId(s.start),r.db.lookUpDomId(s.end),u,o)})},H={setConf:function(t){for(let e of Object.keys(t))X[e]=t[e]},addVertices:F,addEdges:G,getClasses:function(t,e){return i.l.info("Extracting classes"),e.db.getClasses()},draw:function(t,e,r,n){let o,s;i.l.info("Drawing flowchart");let{securityLevel:d,flowchart:c}=(0,i.c)();"sandbox"===d&&(o=(0,l.Ys)("#i"+e));let u="sandbox"===d?(0,l.Ys)(o.nodes()[0].contentDocument.body):(0,l.Ys)("body"),p="sandbox"===d?o.nodes()[0].contentDocument:document,f=n.db.getDirection();void 0===f&&(f="TD");let g=c.nodeSpacing||50,y=c.rankSpacing||50,b=new a.k({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:g,ranksep:y,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),w=n.db.getSubGraphs();for(let t=w.length-1;t>=0;t--)s=w[t],n.db.addVertex(s.id,s.title,"group",void 0,s.classes);let x=n.db.getVertices();i.l.warn("Get vertices",x);let v=n.db.getEdges(),k=0;for(k=w.length-1;k>=0;k--){s=w[k],(0,l.td_)("cluster").append("text");for(let t=0;t<s.nodes.length;t++)i.l.warn("Setting subgraph",s.nodes[t],n.db.lookUpDomId(s.nodes[t]),n.db.lookUpDomId(s.id)),b.setParent(n.db.lookUpDomId(s.nodes[t]),n.db.lookUpDomId(s.id))}F(x,b,e,u,p,n),G(v,b,n);let m=new A;V.addToRender(m),m.arrows().none=function(t,e,r,n){let a=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 0 0 L 0 0 z");(0,h.bg)(a,r[n+"Style"])},m.arrows().normal=function(t,e){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").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};let S=u.select('[id="'.concat(e,'"]')),_=u.select("#"+e+" g");for(m(_,b),_.selectAll("g.node").attr("title",function(){return n.db.getTooltip(this.id)}),n.db.indexNodes("subGraph"+k),k=0;k<w.length;k++)if("undefined"!==(s=w[k]).title){let t=p.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(s.id)+'"] rect'),r=p.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(s.id)+'"]'),a=t[0].x.baseVal.value,i=t[0].y.baseVal.value,o=t[0].width.baseVal.value,d=(0,l.Ys)(r[0]).select(".label");d.attr("transform","translate(".concat(a+o/2,", ").concat(i+14,")")),d.attr("id",e+"Text");for(let t=0;t<s.classes.length;t++)r[0].classList.add(s.classes[t])}if(!c.htmlLabels)for(let t of p.querySelectorAll('[id="'+e+'"] .edgeLabel .label')){let e=t.getBBox(),r=p.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("rx",0),r.setAttribute("ry",0),r.setAttribute("width",e.width),r.setAttribute("height",e.height),t.insertBefore(r,t.firstChild)}(0,i.o)(b,S,c.diagramPadding,c.useMaxWidth),Object.keys(x).forEach(function(t){let r=x[t];if(r.link){let a=u.select("#"+e+' [id="'+n.db.lookUpDomId(t)+'"]');if(a){let t=p.createElementNS("http://www.w3.org/2000/svg","a");t.setAttributeNS("http://www.w3.org/2000/svg","class",r.classes.join(" ")),t.setAttributeNS("http://www.w3.org/2000/svg","href",r.link),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===d?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):r.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",r.linkTarget);let e=a.insert(function(){return t},":first-child"),n=a.select(".label-container");n&&e.append(function(){return n.node()});let l=a.select(".label");l&&e.append(function(){return l.node()})}}})}},$={parser:n.p,db:n.f,renderer:I.f,styles:I.a,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,H.setConf(t.flowchart),n.f.clear(),n.f.setGen("gen-1")}}},92829:function(t,e,r){r.d(e,{a:function(){return w},f:function(){return y}});var n=r(77832),a=r(36783),l=r(51893),i=r(15883),o=r(42098),s=r(15926),d=r(34728),c=(t,e)=>s.Z.lang.round(d.Z.parse(t)[e]),h=r(5712);let u={},p=function(t,e,r,n,a,i){let s=n.select('[id="'.concat(r,'"]'));Object.keys(t).forEach(function(r){let n;let d=t[r],c="default";d.classes.length>0&&(c=d.classes.join(" ")),c+=" flowchart-label";let h=(0,l.k)(d.styles),u=void 0!==d.text?d.text:d.id;if(l.l.info("vertex",d,d.labelType),"markdown"===d.labelType)l.l.info("vertex",d,d.labelType);else if((0,l.m)((0,l.c)().flowchart.htmlLabels)){let t={label:u.replace(/fa[blrs]?:fa-[\w-]+/g,t=>"<i class='".concat(t.replace(":"," "),"'></i>"))};(n=(0,o.a)(s,t).node()).parentNode.removeChild(n)}else{let t=a.createElementNS("http://www.w3.org/2000/svg","text");for(let e of(t.setAttribute("style",h.labelStyle.replace("color:","fill:")),u.split(l.e.lineBreakRegex))){let r=a.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)}n=t}let p=0,f="";switch(d.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";break;case"doublecircle":f="doublecircle"}e.setNode(d.id,{labelStyle:h.labelStyle,shape:f,labelText:u,labelType:d.labelType,rx:p,ry:p,class:c,style:h.style,id:d.id,link:d.link,linkTarget:d.linkTarget,tooltip:i.db.getTooltip(d.id)||"",domId:i.db.lookUpDomId(d.id),haveCallback:d.haveCallback,width:"group"===d.type?500:void 0,dir:d.dir,type:d.type,props:d.props,padding:(0,l.c)().flowchart.padding}),l.l.info("setNode",{labelStyle:h.labelStyle,labelType:d.labelType,shape:f,labelText:u,rx:p,ry:p,class:c,style:h.style,id:d.id,domId:i.db.lookUpDomId(d.id),width:"group"===d.type?500:void 0,type:d.type,dir:d.dir,props:d.props,padding:(0,l.c)().flowchart.padding})})},f=function(t,e,r){let n,i;l.l.info("abc78 edges = ",t);let o=0,s={};if(void 0!==t.defaultStyle){let e=(0,l.k)(t.defaultStyle);n=e.style,i=e.labelStyle}t.forEach(function(r){o++;let d="L-"+r.start+"-"+r.end;void 0===s[d]?s[d]=0:s[d]++,l.l.info("abc78 new entry",d,s[d]);let c=d+"-"+s[d];l.l.info("abc78 new link id to be used is",d,c,s[d]);let h="LS-"+r.start,p="LE-"+r.end,f={style:"",labelStyle:""};switch(f.minlen=r.length||1,"arrow_open"===r.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",r.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let g="",y="";switch(r.stroke){case"normal":g="fill:none;",void 0!==n&&(g=n),void 0!==i&&(y=i),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==r.style){let t=(0,l.k)(r.style);g=t.style,y=t.labelStyle}f.style=f.style+=g,f.labelStyle=f.labelStyle+=y,void 0!==r.interpolate?f.curve=(0,l.n)(r.interpolate,a.c_6):void 0!==t.defaultInterpolate?f.curve=(0,l.n)(t.defaultInterpolate,a.c_6):f.curve=(0,l.n)(u.curve,a.c_6),void 0===r.text?void 0!==r.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=r.labelType,f.label=r.text.replace(l.e.lineBreakRegex,"\n"),void 0===r.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=c,f.classes="flowchart-link "+h+" "+p,e.setEdge(r.start,r.end,f,o)})},g=async function(t,e,r,o){let s,d;l.l.info("Drawing flowchart");let c=o.db.getDirection();void 0===c&&(c="TD");let{securityLevel:h,flowchart:u}=(0,l.c)(),g=u.nodeSpacing||50,y=u.rankSpacing||50;"sandbox"===h&&(s=(0,a.Ys)("#i"+e));let b="sandbox"===h?(0,a.Ys)(s.nodes()[0].contentDocument.body):(0,a.Ys)("body"),w="sandbox"===h?s.nodes()[0].contentDocument:document,x=new n.k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:g,ranksep:y,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}}),v=o.db.getSubGraphs();l.l.info("Subgraphs - ",v);for(let t=v.length-1;t>=0;t--)d=v[t],l.l.info("Subgraph - ",d),o.db.addVertex(d.id,{text:d.title,type:d.labelType},"group",void 0,d.classes,d.dir);let k=o.db.getVertices(),m=o.db.getEdges();l.l.info("Edges",m);let S=0;for(S=v.length-1;S>=0;S--){d=v[S],(0,a.td_)("cluster").append("text");for(let t=0;t<d.nodes.length;t++)l.l.info("Setting up subgraphs",d.nodes[t],d.id),x.setParent(d.nodes[t],d.id)}p(k,x,e,b,w,o),f(m,x);let _=b.select('[id="'.concat(e,'"]')),T=b.select("#"+e+" g");if(await (0,i.r)(T,x,["point","circle","cross"],"flowchart",e),l.u.insertTitle(_,"flowchartTitleText",u.titleTopMargin,o.db.getDiagramTitle()),(0,l.o)(x,_,u.diagramPadding,u.useMaxWidth),o.db.indexNodes("subGraph"+S),!u.htmlLabels)for(let t of w.querySelectorAll('[id="'+e+'"] .edgeLabel .label')){let e=t.getBBox(),r=w.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("rx",0),r.setAttribute("ry",0),r.setAttribute("width",e.width),r.setAttribute("height",e.height),t.insertBefore(r,t.firstChild)}Object.keys(k).forEach(function(t){let r=k[t];if(r.link){let n=(0,a.Ys)("#"+e+' [id="'+t+'"]');if(n){let t=w.createElementNS("http://www.w3.org/2000/svg","a");t.setAttributeNS("http://www.w3.org/2000/svg","class",r.classes.join(" ")),t.setAttributeNS("http://www.w3.org/2000/svg","href",r.link),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===h?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):r.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",r.linkTarget);let e=n.insert(function(){return t},":first-child"),a=n.select(".label-container");a&&e.append(function(){return a.node()});let l=n.select(".label");l&&e.append(function(){return l.node()})}}})},y={setConf:function(t){for(let e of Object.keys(t))u[e]=t[e]},addVertices:p,addEdges:f,getClasses:function(t,e){return e.db.getClasses()},draw:g},b=(t,e)=>{let r=c(t,"r"),n=c(t,"g"),a=c(t,"b");return h.Z(r,n,a,e)},w=t=>".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span,p {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span,p {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ").concat(b(t.edgeLabelBackground,.5),";\n // background-color: \n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span,p {\n color: ").concat(t.titleColor,";\n }\n /* .cluster div {\n color: ").concat(t.titleColor,";\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor,";\n }\n")}}]);