Files
static-php-cli/assets/chunks/architectureDiagram-3BPJPVTR.sZZWI0Nt.js

37 lines
146 KiB
JavaScript
Raw Normal View History

import{b4 as ke,_ as dt,L as Ze,af as qe,l as Se,b as Qe,a as Je,q as Ke,t as je,g as _e,s as tr,A as er,H as rr,F as ir,I as ar,c as Ee,aO as me,b5 as pe,i as nr,d as or,y as sr,b6 as hr,b7 as lr}from"./mermaid.core.BrszyIat.js";import{p as fr}from"./chunk-4BX2VUAB.DCv7cNfo.js";import{p as cr}from"./wardley-L42UT6IY.C8rjnVeB.js";import{c as Fe}from"./cytoscape.esm.OyMbaexL.js";import"./framework.C2AwuPrQ.js";var he={exports:{}},le={exports:{}},fe={exports:{}},gr=fe.exports,Me;function ur(){return Me||(Me=1,(function(I,O){(function(G,N){I.exports=N()})(gr,function(){return(function(A){var G={};function N(g){if(G[g])return G[g].exports;var h=G[g]={i:g,l:!1,exports:{}};return A[g].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(g){return g},N.d=function(g,h,a){N.o(g,h)||Object.defineProperty(g,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(g){var h=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(h,"a",h),h},N.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)},N.p="",N(N.s=28)})([(function(A,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g}),(function(A,G,N){var g=N(2),h=N(8),a=N(9);function e(f,r,d){g.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(g.prototype);for(var i in g)e[i]=g[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var d=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(d.getOwner()==r)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,G,N){function g(h){this.vGraphObject=h}A.exports=g}),(function(A,G,N){var g=N(2),h=N(10),a=N(13),e=N(0),i=N(16),f=N(5);function r(t,s,o,c){o==null&&c==null&&(c=s),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(g.prototype);for(var d in g)r[d]=g[d];r.prototype.getEdges
.edge {
stroke-width: ${I.archEdgeWidth};
stroke: ${I.archEdgeColor};
fill: none;
}
.arrow {
fill: ${I.archEdgeArrowColor};
}
.node-bkg {
fill: none;
stroke: ${I.archGroupBorderColor};
stroke-width: ${I.archGroupBorderWidth};
stroke-dasharray: 8;
}
.node-icon-text {
display: flex;
align-items: center;
}
.node-icon-text > div {
color: #fff;
margin: 1px;
height: fit-content;
text-align: center;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
}
`,"getStyles"),Rr=Ir,re=dt(I=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${I}</g>`,"wrapIcon"),ne={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:re('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:re('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px
translate(${L}, ${P-m.height/2})
translate(${p*y.width/2}, ${E*y.height/2})
rotate(${-1*p*E*45}, 0, ${m.height/2})
`)}}}}}))},"drawEdges"),Fr=dt(async function(I,O,A,G){const g=A.getConfigField("padding")*.75,h=A.getConfigField("fontSize"),e=A.getConfigField("iconSize")/2;await Promise.all(O.nodes().map(async i=>{const f=ie(i);if(f.type==="group"){const{h:r,w:d,x1:t,y1:s}=i.boundingBox(),o=I.append("rect");o.attr("id",`${G}-group-${f.id}`).attr("x",t+e).attr("y",s+e).attr("width",d).attr("height",r).attr("class","node-bkg");const c=I.append("g");let l=t,T=s;if(f.icon){const u=c.append("g");u.html(`<g>${await pe(f.icon,{height:g,width:g,fallbackPrefix:ne.prefix})}</g>`),u.attr("transform","translate("+(l+e+1)+", "+(T+e+1)+")"),l+=g,T+=h/2-1-2}if(f.label){const u=c.append("g");await me(u,f.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},Ee()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),u.attr("transform","translate("+(l+e+4)+", "+(T+e+2)+")")}A.setElementForId(f.id,o)}}))},"drawGroups"),br=dt(async function(I,O,A,G){const N=Ee();for(const g of A){const h=O.append("g"),a=I.getConfigField("iconSize");if(g.title){const r=h.append("g");await me(r,g.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},N),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),r.attr("transform","translate("+a/2+", "+a+")")}const e=h.append("g");if(g.icon)e.html(`<g>${await pe(g.icon,{height:a,width:a,fallbackPrefix:ne.prefix})}</g>`);else if(g.iconText){e.html(`<g>${await pe("blank",{height:a,width:a,fallbackPrefix:ne.prefix})}</g>`);const t=e.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(nr(g.iconText,N)),s=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/s)};`)}else e.append("path").attr("class","node-bkg").attr("id",`${G}-node-${g.id}`).attr("d",`M0,${a} V5 Q0,0 5,0 H${a-5} Q${a},0 ${a},5 V${a} Z`);h.attr("id",`${G}-service-${g.id}`).attr("class","architecture-service");const{width:i,height:f}=h.node().getBBox();g.width=i,g.height=f,I.setElementForId(g.id,h)}return 0},"drawServices"),Pr=dt(function(I,O,A,G){A.forEach(N=>{const g=O.append("g"),h=I.getConfigField("iconSize");g.append("g").append("rect").attr("id",`${G}-node-${N.id}`).attr("fill-opacity","0").attr("width",h).attr("height",h),g.attr("class","architecture-junction");const{width:e,height:i}=g._groups[0][0].getBBox();g.width=e,g.height=i,I.setElementForId(N.id,g)})},"drawJunctions");hr([{name:ne.prefix,icons:ne}]);Fe.use(mr);function Ue(I,O,A){I.forEach(G=>{O.add({group:"nodes",data:{type:"service",id:G.id,icon:G.icon,label:G.title,parent:G.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-service"})})}dt(Ue,"addServices");function Ye(I,O,A){I.forEach(G=>{O.add({group:"nodes",data:{type:"junction",id:G.id,parent:G.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ye,"addJunctions");function Xe(I,O){O.nodes().map(A=>{const G=ie(A);if(G.type==="group")return;G.x=A.position().x,G.y=A.position().y,I.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}dt(Xe,"positionNodes");function He(I,O){I.forEach(A=>{O.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}dt(He,"addGroups");function We(I,O){I.forEach(A=>{const{lhsId:G,rhsId:N,lhsInto:g,lhsGroup:h,rhsInto:a,lhsDir:e,rhsDir:i,rhsGroup:f,title:r}=A,d=Te(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:r,source:G,sourceDir:e,sourceArrow:g,sourceGroup:h,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:N,targetDir:i,targetArrow:a,targetGroup:f,targetEndpoint:i==="L"?"0 50%":i==="R"?"100% 50%":i==="T"?"50% 0":"50% 100%"};O.add({group:"edges",data:t,classes:d})})}dt(We,"addEdges");function Ve(I,O,A){const G=dt((a,e)