38 lines
145 KiB
JavaScript
38 lines
145 KiB
JavaScript
import{a as Ne}from"./chunk-WMZJ2DJX.min.js";import{a as $e}from"./chunk-R7DHUQMU.min.js";import{a as Ze}from"./chunk-B5WF4DA4.min.js";import{a as qe}from"./chunk-DFMVIMQJ.min.js";import{a as ke}from"./chunk-K7PO6CNQ.min.js";import"./chunk-45RMNOPF.min.js";import"./chunk-NRRWWJ3P.min.js";import"./chunk-53EALYMI.min.js";import"./chunk-DBPRPEV6.min.js";import"./chunk-5KKNARB2.min.js";import"./chunk-TERFBH2B.min.js";import"./chunk-U4DUTLYF.min.js";import"./chunk-IQQ46AC6.min.js";import{a as Ve,b as ze,c as fe}from"./chunk-PYBRKFQJ.min.js";import{d as ce}from"./chunk-24EG6CQZ.min.js";import"./chunk-KF4CENUX.min.js";import"./chunk-CM5D5KZN.min.js";import{P as be,S as Pe,T as Ge,U as Ue,V as Ye,W as Xe,X as He,Y as We,Z as ae,h as at,ia as Be,j as Te,v as Fe}from"./chunk-UOD6J27N.min.js";import"./chunk-CXRPJJJE.min.js";import{a as me,d as ur}from"./chunk-OSRY5VT3.min.js";var Ce=me((ne,Le)=>{(function(w,L){typeof ne=="object"&&typeof Le=="object"?Le.exports=L():typeof define=="function"&&define.amd?define([],L):typeof ne=="object"?ne.layoutBase=L():w.layoutBase=L()})(ne,function(){return function(m){var w={};function L(u){if(w[u])return w[u].exports;var o=w[u]={i:u,l:!1,exports:{}};return m[u].call(o.exports,o,o.exports,L),o.l=!0,o.exports}return L.m=m,L.c=w,L.i=function(u){return u},L.d=function(u,o,n){L.o(u,o)||Object.defineProperty(u,o,{configurable:!1,enumerable:!0,get:n})},L.n=function(u){var o=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(o,"a",o),o},L.o=function(u,o){return Object.prototype.hasOwnProperty.call(u,o)},L.p="",L(L.s=28)}([function(m,w,L){"use strict";function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,m.exports=u},function(m,w,L){"use strict";var u=L(2),o=L(8),n=L(9);function t(f,e,v){u.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=e}t.prototype=Object.create(u.prototype);for(var a in u)t[a]=u[a];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.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"},t.prototype.getOtherEndInGraph=function(f,e){for(var v=this.getOtherEnd(f),i=e.getGraphManager().getRoot();;){if(v.getOwner()==e)return v;if(v.getOwner()==i)break;v=v.getOwner().getParent()}return null},t.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=o.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*
|
|||
|
|
.edge {
|
||
|
|
stroke-width: ${m.archEdgeWidth};
|
||
|
|
stroke: ${m.archEdgeColor};
|
||
|
|
fill: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.arrow {
|
||
|
|
fill: ${m.archEdgeArrowColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.node-bkg {
|
||
|
|
fill: none;
|
||
|
|
stroke: ${m.archGroupBorderColor};
|
||
|
|
stroke-width: ${m.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"),Ur=Gr,re=at(m=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${m}</g>`,"wrapIcon"),he={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(${C}, ${F-E.height/2})
|
||
|
|
translate(${g*d.width/2}, ${T*d.height/2})
|
||
|
|
rotate(${-1*g*T*45}, 0, ${E.height/2})
|
||
|
|
`)}}}}}))},"drawEdges"),Xr=at(async function(m,w){let u=Ut("padding")*.75,o=Ut("fontSize"),t=Ut("iconSize")/2;await Promise.all(w.nodes().map(async a=>{let f=ie(a);if(f.type==="group"){let{h:e,w:v,x1:i,y1:r}=a.boundingBox();m.append("rect").attr("x",i+t).attr("y",r+t).attr("width",v).attr("height",e).attr("class","node-bkg");let h=m.append("g"),c=i,l=r;if(f.icon){let N=h.append("g");N.html(`<g>${await fe(f.icon,{height:u,width:u,fallbackPrefix:he.prefix})}</g>`),N.attr("transform","translate("+(c+t+1)+", "+(l+t+1)+")"),c+=u,l+=o/2-1-2}if(f.label){let N=h.append("g");await ce(N,f.label,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},ae()),N.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),N.attr("transform","translate("+(c+t+4)+", "+(l+t+2)+")")}}}))},"drawGroups"),Hr=at(async function(m,w,L){for(let u of L){let o=w.append("g"),n=Ut("iconSize");if(u.title){let e=o.append("g");await ce(e,u.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},ae()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+n/2+", "+n+")")}let t=o.append("g");if(u.icon)t.html(`<g>${await fe(u.icon,{height:n,width:n,fallbackPrefix:he.prefix})}</g>`);else if(u.iconText){t.html(`<g>${await fe("blank",{height:n,width:n,fallbackPrefix:he.prefix})}</g>`);let i=t.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(u.iconText),r=parseInt(window.getComputedStyle(i.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;i.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/r)};`)}else t.append("path").attr("class","node-bkg").attr("id","node-"+u.id).attr("d",`M0 ${n} v${-n} q0,-5 5,-5 h${n} q5,0 5,5 v${n} H0 Z`);o.attr("class","architecture-service");let{width:a,height:f}=o._groups[0][0].getBBox();u.width=a,u.height=f,m.setElementForId(u.id,o)}return 0},"drawServices"),Wr=at(function(m,w,L){L.forEach(u=>{let o=w.append("g"),n=Ut("iconSize");o.append("g").append("rect").attr("id","node-"+u.id).attr("fill-opacity","0").attr("width",n).attr("height",n),o.attr("class","architecture-junction");let{width:a,height:f}=o._groups[0][0].getBBox();o.width=a,o.height=f,m.setElementForId(u.id,o)})},"drawJunctions");ze([{name:he.prefix,icons:he}]);Ne.use(rr.default);function ir(m,w){m.forEach(L=>{w.add({group:"nodes",data:{type:"service",id:L.id,icon:L.icon,label:L.title,parent:L.in,width:Ut("iconSize"),height:Ut("iconSize")},classes:"node-service"})})}at(ir,"addServices");function ar(m,w){m.forEach(L=>{w.add({group:"nodes",data:{type:"junction",id:L.id,parent:L.in,width:Ut("iconSize"),height:Ut("iconSize")},classes:"node-junction"})})}at(ar,"addJunctions");function nr(m,w){w.nodes().map(L=>{let u=ie(L);if(u.type==="group")return;u.x=L.position().x,u.y=L.position().y,m.getElementById(u.id).attr("transform","translate("+(u.x||0)+","+(u.y||0)+")")})}at(nr,"positionNodes");function or(m,w){m.forEach(L=>{w.add({group:"nodes",data:{type:"group",id:L.id,icon:L.icon,label:L.title,parent:L.in},classes:"node-group"})})}at(or,"addGroups");function sr(m,w){m.forEach(L=>{let{lhsId:u,rhsId:o,lhsInto:n,lhsGroup:t,rhsInto:a,lhsDir:f,rhsDir:e,rhsGroup:v,title:i}=L,r=_e(L.lhsDir,L.rhsDir)?"segments":"straight",h={id:`${u}-${o}`,label:i,source:u,sourceDir:f,sourceArrow:n,sourceGroup:t,sourceEndpoint:f==="L"?"0 50%":f==="R"?"100% 50%":f==="T"?"50% 0":"50% 100%",target:o,targetDir:e,targetArrow:a,targetGroup:v,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};w.add({group:"edges",data:h,classes:r})})}at(sr,"addEdges");function hr(m){let w=m.map(o=>{let n={},t={};return Object.entries(o).forEach(([a,[f,e]])=>{n[e]||(n[e]=[]),t[f]||(t[f]=[]),n[e].push(a),t[f].push(a)}),{horiz:Object.values(n).filter(a=>a.length>1),vert:Object.values(t).filter(a=>a.length>1)}}),[L,u]=w.reduce(([o,n],{horiz:t,vert:a})=>[[...o,...t],[...n,...a]],[[],[]
|
||
|
|
//# sourceMappingURL=architectureDiagram-AYX4OTIS-UEH2Z7UQ.min.js.map
|