⬆️ chore(deps): upgrade mermaid to v11.12.1 (#574)
This commit is contained in:
1 parent
83a8f9e438
commit
742c61aba2
1 file changed
+2
-2
Vendored
+2
-2
@@ -511,7 +511,7 @@ You have to call mermaid.initialize.`);D.info("Pushing edge..."),this.edges.push
|
||||
node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.x<n.x?s-r:s+r,l=e.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(t-n.y)*s>Math.abs(a-n.x)*l)return e=i.y<n.y?n.y-l-t:t-l-n.y,o=h*e/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-e:i.y-c+e},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),D.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,t=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+e:i.y-e;return D.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=n.x,r=n.y),0===h&&(t=n.x),0===c&&(r=n.y),{x:t,y:r}}},"intersection"),NO=mt((e,n)=>{D.warn("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(D.info("abc88 checking point",e,n),AO(n,e)||s)D.warn("abc88 outside",e,a),a=e,s||i.push(e);else{let t=LO(n,a,e),r=(D.debug("abc88 inside",e,a,t),D.debug("abc88 intersection",t,n),!1);i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)?D.warn("abc88 no intersect",t,i):i.push(t),s=!0}}),D.debug("returning points",i),i},"cutPathAtIntersect"),mt(vO,"extractCornerPoints"),IO=mt(function(e,t,r){var n=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(n*n+e*e);return{x:t.x-r*n,y:t.y-r*e}},"findAdjacentPoint"),RO=mt(function(n){var e=vO(n).cornerPointPositions,i=[];for(let r=0;r<n.length;r++)if(e.includes(r)){var a=n[r-1],s=n[r+1],o=n[r],l=IO(a,o,5),c=IO(s,o,5),h=c.x-l.x,u=c.y-l.y;i.push(l);let e=2*Math.sqrt(2),t={x:o.x,y:o.y};10<Math.abs(s.x-a.x)&&10<=Math.abs(s.y-a.y)?(D.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),t=o.x===l.x?{x:h<0?l.x-5+e:l.x+5-e,y:u<0?l.y-e:l.y+e}:{x:h<0?l.x-e:l.x+e,y:u<0?l.y-5+e:l.y+5-e}):D.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),i.push(t,c)}else i.push(n[r]);return i},"fixCorners"),MO=mt((e,t,r)=>(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),DO=mt(function(n,i,a,e,t,r,s,o=!1){let l=O().handDrawnSeed,c=i.points,h=!1,u=t,d=r;var p,g=[];for(p in i.cssCompiledStyles)SN(p)||g.push(i.cssCompiledStyles[p]);D.debug("UIO intersect check",i.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((c=c.slice(1,i.points.length-1)).unshift(u.intersect(c[0])),D.debug("Last point UIO",i.start,"--\x3e",i.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),t=btoa(JSON.stringify(c)),i.toCluster&&(D.info("to cluster abc88",a.get(i.toCluster)),c=NO(i.points,a.get(i.toCluster).node),h=!0),i.fromCluster&&(D.debug("from cluster abc88",a.get(i.fromCluster),JSON.stringify(c,null,2)),c=NO(c.reverse(),a.get(i.fromCluster).node).reverse(),h=!0),r=c.filter(e=>!Number.isNaN(e.y)),r=RO(r);let f=v3;switch(f=Z5,i.curve){case"linear":f=Z5;break;case"basis":f=v3;break;case"cardinal":f=I3;break;case"bumpX":f=h3;break;case"bumpY":f=u3;break;case"catmullRom":f=G3;break;case"monotoneX":f=aw;break;case"monotoneY":f=sw;break;case"natural":f=hw;break;case"step":f=pw;break;case"stepAfter":f=fw;break;case"stepBefore":f=gw;break;default:f=v3}let{x:m,y}=uO(i),v=r3().x(m).y(y).curve(f),x;switch(i.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(i.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let b,w="rounded"===i.curve?xO(wO(r,i),5):v(r),k=Array.isArray(i.style)?i.style:[i.style],T=k.find(e=>e?.startsWith("stroke:")),E;if("handDrawn"===i.look)o=FI.svg(n),Object.assign([],r),a=o.path(w,{roughness:.3,seed:l}),x+=" transition",o=(b=H(a).select("path").attr("id",i.id).attr("class"," "+x+(i.classes?" "+i.classes:"")).attr("style",k?k.reduce((e,t)=>e+";"+t,""):"")).attr("d"),b.attr("d",o),n.node().appendChild(b.node());else{let e=g.join(";"),t=k?k.reduce((e,t)=>e+t+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=(e?e+";"+t+";":t)+";"+(k?k.reduce((e,t)=>e+";"+t,""):""),b=n.append("path").attr("d",w).attr("id",i.id).attr("class"," "+x+(i.classes?" "+i.classes:"")+(r??"")).attr("style",a),T=a.match(/stroke:([^;]+)/)?.[1],E=!0===i.animate||!!i.animation||e.includes("animation");var a="function"==typeof(o=b.node()).getTotalLength?o.getTotalLength():0,o=cO[i.arrowTypeStart]||0,C=cO[i.arrowTypeEnd]||0;"neo"!==i.look||E||(a=`stroke-dasharray: ${"dotted"===i.pattern||"dashed"===i.pattern?MO(a,o,C):`0 ${o} ${a-o-C} `+C}; stroke-dashoffset: 0;`,b.attr("style",a+b.attr("style")))}b.attr("data-edge",!0),b.attr("data-et","edge"),b.attr("data-id",i.id),b.attr("data-points",t),i.showPoints&&r.forEach(e=>{n.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let _="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(_=(_=window.location.protocol+"//"+window.location.host+wi
Line truncated
|
||||
L20,10
|
||||
M20,10
|
||||
L0,20`)},"requirement_arrow"),KO=mt((e,t,r)=>{(e=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ZO={extension:PO,composition:BO,aggregation:$O,dependency:FO,lollipop:zO,point:GO,circle:UO,cross:qO,barb:jO,only_one:YO,zero_or_one:WO,one_or_more:HO,zero_or_more:VO,requirement_arrow:XO,requirement_contains:KO},QO=OO});async function tP(t,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?qD[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===n.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(i,r,n)}else a=await s(t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),rP.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var rP,nP,iP,aP,sP,oP=b(()=>{e(),rO(),rP=new Map,mt(tP,"insertNode"),nP=mt((e,t)=>{rP.set(t.id,e)},"setNodeElem"),iP=mt(()=>{rP.clear()},"clear"),aP=mt(e=>{var t=rP.get(e.id),r=(D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")}),lP=b(()=>{rn(),Oc(),e(),sO(),JO(),eP(),oP(),i(),i_(),sP={common:L,getConfig:ar,insertCluster:eO,insertEdge:DO,insertEdgeLabel:_O,insertMarkers:QO,insertNode:tP,interpolateToCurve:fC,labelHelper:nN,log:D,positionEdgeLabel:SO}});function cP(e){return"symbol"==typeof e||V7(e)&&"[object Symbol]"==_6(e)}var hP,uP=b(()=>{S6(),X7(),mt(cP,"isSymbol"),hP=cP});function dP(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var pP,gP=b(()=>{mt(dP,"arrayMap"),pP=dP});function fP(e){var t;return"string"==typeof e?e:n8(e)?pP(e,fP)+"":hP(e)?vP?vP.call(e):"":"0"==(t=e+"")&&1/e==-mP?"-0":t}var mP,yP,vP,xP,bP=b(()=>{u6(),gP(),s8(),uP(),mP=1/0,yP=Jw?Jw.prototype:void 0,vP=yP?yP.toString:void 0,mt(fP,"baseToString"),xP=fP});function wP(e){for(var t=e.length;t--&&kP.test(e.charAt(t)););return t}var kP,TP,EP=b(()=>{kP=/\s/,mt(wP,"trimmedEndIndex"),TP=wP});function CP(e){return e&&e.slice(0,TP(e)+1).replace(_P,"")}var _P,SP,AP=b(()=>{EP(),_P=/^\s+/,mt(CP,"baseTrim"),SP=CP});function LP(e){if("number"==typeof e)return e;if(hP(e))return NP;if(L6(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=L6(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=SP(e);var t=RP.test(e);return t||MP.test(e)?DP(e.slice(2),t?2:8):IP.test(e)?NP:+e}var NP,IP,RP,MP,DP,OP,PP=b(()=>{AP(),N6(),uP(),NP=NaN,IP=/^[-+]0x[0-9a-f]+$/i,RP=/^0b[01]+$/i,MP=/^0o[0-7]+$/i,DP=parseInt,mt(LP,"toNumber"),OP=LP});function BP(e){return e?(e=OP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var $P,FP=b(()=>{PP(),mt(BP,"toFinite"),$P=BP});function zP(e){var t=(e=$P(e))%1;return e==e?t?e-t:e:0}var GP,UP,qP,jP=b(()=>{FP(),mt(zP,"toInteger"),GP=zP}),YP=b(()=>{ok(),h6(),UP=ik(Zw,"WeakMap"),qP=UP});function WP(){}var HP,VP=b(()=>{mt(WP,"noop"),HP=WP});function XP(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var KP,ZP=b(()=>{mt(XP,"arrayEach"),KP=XP});function QP(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var JP,eB=b(()=>{mt(QP,"baseFindIndex"),JP=QP});function tB(e){return e!=e}var rB,nB=b(()=>{mt(tB,"baseIsNaN"),rB=tB});function iB(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var aB,sB=b(()=>{mt(iB,"strictIndexOf"),aB=iB});function oB(e,t,r){return t==t?aB(e,t,r):JP(e,rB,r)}var lB,cB=b(()=>{eB(),nB(),sB(),mt(oB,"baseIndexOf"),lB=oB});function hB(e,t){return!(null==e||!e.length)&&-1<lB(e,t,0)}var uB,dB,pB,gB=b(()=>{cB(),mt(hB,"arrayIncludes"),uB=hB}),fB=b(()=>{$7(),dB=O7(Object.keys,Object),pB=dB});function mB(e){if(!U7(e))return pB(e);var t,r=[];for(t in Object(e))vB.call(e,t)&&"constructor"!=t&&r.push(t);return r}var yB,vB,xB,bB=b(()=>{q7(),fB(),yB=Object.prototype,vB=yB.hasOwnProperty,mt(mB,"baseKeys"),xB=mB});function wB(e){return(u8(e)?pE:xB)(e)}var kB,TB,EB,CB,_B=b(()=>{gE(),bB(),d8(),mt(wB,"keys"),kB=wB}),SB=b(()=>{J8(),rE(),pC(),d8(),q7(),_B(),EB=Object.prototype,TB=EB.hasOwnProperty,EB=hC(function(e,t){if(U7(t)||u8(t))tE(t,kB(t),e);else for(var r in t)TB.call(t,r)&&Q8(e,r,t[r])}),CB=EB});function AB(e,t){var r;return!n8(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!hP(e))||NB.test(e)||!LB.test(e)||null!=t&&e in Object(t))}var LB,NB,IB,RB=b(()=>{s8(),uP(),LB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NB=
Line truncated
|
||||
L0,20`)},"requirement_arrow"),KO=mt((e,t,r)=>{(e=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ZO={extension:PO,composition:BO,aggregation:$O,dependency:FO,lollipop:zO,point:GO,circle:UO,cross:qO,barb:jO,only_one:YO,zero_or_one:WO,one_or_more:HO,zero_or_more:VO,requirement_arrow:XO,requirement_contains:KO},QO=OO});async function tP(t,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?qD[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===n.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(i,r,n)}else a=await s(t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),rP.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var rP,nP,iP,aP,sP,oP=b(()=>{e(),rO(),rP=new Map,mt(tP,"insertNode"),nP=mt((e,t)=>{rP.set(t.id,e)},"setNodeElem"),iP=mt(()=>{rP.clear()},"clear"),aP=mt(e=>{var t=rP.get(e.id),r=(D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")}),lP=b(()=>{rn(),Oc(),e(),sO(),JO(),eP(),oP(),i(),i_(),sP={common:L,getConfig:ar,insertCluster:eO,insertEdge:DO,insertEdgeLabel:_O,insertMarkers:QO,insertNode:tP,interpolateToCurve:fC,labelHelper:nN,log:D,positionEdgeLabel:SO}});function cP(e){return"symbol"==typeof e||V7(e)&&"[object Symbol]"==_6(e)}var hP,uP=b(()=>{S6(),X7(),mt(cP,"isSymbol"),hP=cP});function dP(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var pP,gP=b(()=>{mt(dP,"arrayMap"),pP=dP});function fP(e){var t;return"string"==typeof e?e:n8(e)?pP(e,fP)+"":hP(e)?vP?vP.call(e):"":"0"==(t=e+"")&&1/e==-mP?"-0":t}var mP,yP,vP,xP,bP=b(()=>{u6(),gP(),s8(),uP(),mP=1/0,yP=Jw?Jw.prototype:void 0,vP=yP?yP.toString:void 0,mt(fP,"baseToString"),xP=fP});function wP(e){for(var t=e.length;t--&&kP.test(e.charAt(t)););return t}var kP,TP,EP=b(()=>{kP=/\s/,mt(wP,"trimmedEndIndex"),TP=wP});function CP(e){return e&&e.slice(0,TP(e)+1).replace(_P,"")}var _P,SP,AP=b(()=>{EP(),_P=/^\s+/,mt(CP,"baseTrim"),SP=CP});function LP(e){if("number"==typeof e)return e;if(hP(e))return NP;if(L6(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=L6(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=SP(e);var t=RP.test(e);return t||MP.test(e)?DP(e.slice(2),t?2:8):IP.test(e)?NP:+e}var NP,IP,RP,MP,DP,OP,PP=b(()=>{AP(),N6(),uP(),NP=NaN,IP=/^[-+]0x[0-9a-f]+$/i,RP=/^0b[01]+$/i,MP=/^0o[0-7]+$/i,DP=parseInt,mt(LP,"toNumber"),OP=LP});function BP(e){return e?(e=OP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var $P,FP=b(()=>{PP(),mt(BP,"toFinite"),$P=BP});function zP(e){var t=(e=$P(e))%1;return e==e?t?e-t:e:0}var GP,UP,qP,jP=b(()=>{FP(),mt(zP,"toInteger"),GP=zP}),YP=b(()=>{ok(),h6(),UP=ik(Zw,"WeakMap"),qP=UP});function WP(){}var HP,VP=b(()=>{mt(WP,"noop"),HP=WP});function XP(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var KP,ZP=b(()=>{mt(XP,"arrayEach"),KP=XP});function QP(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var JP,eB=b(()=>{mt(QP,"baseFindIndex"),JP=QP});function tB(e){return e!=e}var rB,nB=b(()=>{mt(tB,"baseIsNaN"),rB=tB});function iB(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var aB,sB=b(()=>{mt(iB,"strictIndexOf"),aB=iB});function oB(e,t,r){return t==t?aB(e,t,r):JP(e,rB,r)}var lB,cB=b(()=>{eB(),nB(),sB(),mt(oB,"baseIndexOf"),lB=oB});function hB(e,t){return!(null==e||!e.length)&&-1<lB(e,t,0)}var uB,dB,pB,gB=b(()=>{cB(),mt(hB,"arrayIncludes"),uB=hB}),fB=b(()=>{$7(),dB=O7(Object.keys,Object),pB=dB});function mB(e){if(!U7(e))return pB(e);var t,r=[];for(t in Object(e))vB.call(e,t)&&"constructor"!=t&&r.push(t);return r}var yB,vB,xB,bB=b(()=>{q7(),fB(),yB=Object.prototype,vB=yB.hasOwnProperty,mt(mB,"baseKeys"),xB=mB});function wB(e){return(u8(e)?pE:xB)(e)}var kB,TB,EB,CB,_B=b(()=>{gE(),bB(),d8(),mt(wB,"keys"),kB=wB}),SB=b(()=>{J8(),rE(),pC(),d8(),q7(),_B(),EB=Object.prototype,TB=EB.hasOwnProperty,EB=hC(function(e,t){if(U7(t)||u8(t))tE(t,kB(t),e);else for(var r in t)TB.call(t,r)&&Q8(e,r,t[r])}),CB=EB});function AB(e,t){var r;return!n8(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!hP(e))||NB.test(e)||!LB.test(e)||null!=t&&e in Object(t))}var LB,NB,IB,RB=b(()=>{s8(),uP(),LB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NB=
Line truncated
|
||||
Node.id = `,e,`
|
||||
data=`,t.height,`
|
||||
Parent cluster`,o.height),i.setNode(o.id,t),i.parent(e)||(D.trace("Setting parent",e,o.id),i.setParent(e,o.id,t))),D.info("(Insert) Node XXX"+e+": "+JSON.stringify(i.node(e))),n?.clusterNode?(D.info("Cluster identified XBX",e,n.width,i.node(e)),{ranksep:t,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:t+25,nodesep:r}),r=(t=await zK(u,n.graph,a,s,i.node(e),l)).elem,aN(n,r),n.diff=t.diff||0,D.info("New compound node after recursive render XAX",e,"width",n.width,"height",n.height),nP(r,n)):0<i.children(e).length?(D.trace("Cluster - the non recursive path XBX",e,n.id,n,n.width,"Graph:",i),D.trace(IK(n.id,i)),kK.set(n.id,{id:IK(n.id,i),node:n})):(D.trace("Node - the non recursive path XAX",e,u,i.node(e),c),await tP(u,i.node(e),{config:l,dir:c}))})),await mt(async()=>{var e=i.edges().map(async function(e){var t=i.edge(e.v,e.w,e.name);D.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),D.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(i.edge(e))),D.info("Fix",kK,"ids:",e.v,e.w,"Translating: ",kK.get(e.v),kK.get(e.w)),await _O(r,t)});await Promise.all(e)},"processEdges")(),D.info("Graph before layout:",JSON.stringify(xK(i))),D.info("############################################# XXX"),D.info("### Layout ### XXX"),D.info("############################################# XXX"),YX(i),D.info("Graph after layout:",JSON.stringify(xK(i))),0),p=WD(l).subGraphTitleTotalMargin;return await Promise.all(PK(i).map(async function(e){var t,r=i.node(e);D.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,D.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,i.parent(e)),kK.get(r.id).node=r,aP(r)):0<i.children(e).length?(D.info("A pure cluster node XBX1",e,r.id,r.x,r.y,r.width,r.height,i.parent(e)),r.height+=p,i.node(r.parentId),e=r?.padding/2||0,t=r?.labelBBox?.height||0,D.debug("OffsetY",t-e||0,"labelHeight",t,"halfPadding",e),await eO(n,r),kK.get(r.id).node=r):(t=i.node(r.parentId),r.y+=p/2,D.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",t,t?.offsetY,r),aP(r))})),i.edges().forEach(function(e){var t=i.edge(e),r=(D.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),i.node(e.v)),e=i.node(e.w),r=DO(h,t,kK,a,r,e,s);SO(t,r)}),i.nodes().forEach(function(e){var t=i.node(e);D.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),D.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),GK=mt(async(e,t)=>{let l=new nH({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=t.select("g");QO(r,e.markers,e.type,e.diagramId),iP(),EO(),tO(),CK(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),D.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,n,i,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",n=t+"---"+t+"---2",i=l.node(t),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.id=t+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",i.isGroup&&(a.fromCluster=t,o.toCluster=t),o.id=t+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(t,r,a,t+"-cyclic-special-0"),l.setEdge(r,n,s,t+"-cyclic-special-1"),l.setEdge(n,t,o,t+"-cyc<lic-special-2")):l.setEdge(e.start,e.end,{...e},e.id)}),D.warn("Graph at first:",JSON.stringify(xK(l))),MK(l),D.warn("Graph after XAX:",JSON.stringify(xK(l))),t=O(),await zK(r,l,e.type,e.diagramId,void 0,t)},"render")});function qK(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function jK(e){if(Array.isArray(e))return e}function YK(e){if(Array.isArray(e))return qK(e)}function WK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HK(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iZ(n.key),n)}}function VK(e,t,r){return t&&HK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XK(e,t){var r,n,i,a,s=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(n=!0),{s:mt(function(){s=s.call(e)},"s"),n:mt(function(){var e=s.next();return n=e.done,e},"n"),e:mt(function(e){i=!0,r=e},"e"),f:mt(function(){try{n||null==s.return||s.return()}finally{if(i)throw r}},"f")};if(Array.isArray(e)||(s=sZ(e))|
Line truncated
|
||||
@@ -1518,7 +1518,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l
|
||||
fill: ${e.titleColor||e.textColor};
|
||||
font-family: ${e.fontFamily};
|
||||
}
|
||||
`,"getStyles"),uEe=hEe}),fEe={};OFe(fEe,{diagram:()=>mEe});var mEe,yEe,vEe,xEe,bEe,wEe,kEe,TEe,EEe,CEe=b(()=>{D7e(),dEe(),pEe(),gEe(),mEe={parser:R7e,db:rEe,renderer:cEe,styles:uEe}}),_Ee=b(()=>{oTe(),e(),yEe={parse:mt(async e=>{e=await nTe("info",e),D.debug(e)},"parse")}}),SEe=b(()=>{vEe={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),AEe=b(()=>{SEe(),xEe={version:vEe.version+""},bEe=mt(()=>xEe.version,"getVersion"),wEe={getVersion:bEe}}),LEe=b(()=>{i6(),Tu(),kEe=mt(e=>{let t=O().securityLevel,r=H("body"),n;return"sandbox"===t&&(n=H("#i"+e).node()?.contentDocument??document,r=H(n.body)),r.select("#"+e)},"selectSvgElement")}),NEe=b(()=>{e(),LEe(),lh(),TEe=mt((e,t,r)=>{D.debug(`rendering info diagram
|
||||
`,"getStyles"),uEe=hEe}),fEe={};OFe(fEe,{diagram:()=>mEe});var mEe,yEe,vEe,xEe,bEe,wEe,kEe,TEe,EEe,CEe=b(()=>{D7e(),dEe(),pEe(),gEe(),mEe={parser:R7e,db:rEe,renderer:cEe,styles:uEe}}),_Ee=b(()=>{oTe(),e(),yEe={parse:mt(async e=>{e=await nTe("info",e),D.debug(e)},"parse")}}),SEe=b(()=>{vEe={name:"mermaid",version:"11.12.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),AEe=b(()=>{SEe(),xEe={version:vEe.version+""},bEe=mt(()=>xEe.version,"getVersion"),wEe={getVersion:bEe}}),LEe=b(()=>{i6(),Tu(),kEe=mt(e=>{let t=O().securityLevel,r=H("body"),n;return"sandbox"===t&&(n=H("#i"+e).node()?.contentDocument??document,r=H(n.body)),r.select("#"+e)},"selectSvgElement")}),NEe=b(()=>{e(),LEe(),lh(),TEe=mt((e,t,r)=>{D.debug(`rendering info diagram
|
||||
`+e),e=kEe(t),Zc(e,100,400,!0),e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),EEe={draw:TEe}}),IEe={};OFe(IEe,{diagram:()=>REe});var REe,MEe,DEe,OEe,PEe,BEe,$Ee,FEe,zEe,GEe,UEe,qEe,jEe,YEe,WEe,HEe,VEe,XEe,KEe,ZEe=b(()=>{_Ee(),AEe(),NEe(),REe={parser:yEe,db:wEe,renderer:EEe}}),QEe=b(()=>{e(),ku(),en(),BEe=Yt.pie,MEe={sections:new Map,showData:!1,config:BEe},DEe=MEe.sections,OEe=MEe.showData,PEe=structuredClone(BEe),BEe=mt(()=>structuredClone(PEe),"getConfig"),$Ee=mt(()=>{DEe=new Map,OEe=MEe.showData,fh()},"clear"),FEe=mt(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);DEe.has(e)||(DEe.set(e,t),D.debug(`added new section: ${e}, with value: `+t))},"addSection"),zEe=mt(()=>DEe,"getSections"),GEe=mt(e=>{OEe=e},"setShowData"),UEe=mt(()=>OEe,"getShowData"),qEe={getConfig:BEe,clear:$Ee,setDiagramTitle:bh,getDiagramTitle:wh,setAccTitle:mh,getAccTitle:yh,setAccDescription:vh,getAccDescription:xh,addSection:FEe,getSections:zEe,setShowData:GEe,getShowData:UEe}}),JEe=b(()=>{oTe(),e(),uTe(),QEe(),jEe=mt((e,t)=>{lTe(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),YEe={parse:mt(async e=>{e=await nTe("pie",e),D.debug(e),jEe(e,qEe)},"parse")}}),eCe=b(()=>{WEe=mt(e=>`
|
||||
.pieCircle{
|
||||
stroke: ${e.pieStrokeColor};
|
||||
|
||||
Reference in new issue
Block a user