mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-21 07:45:36 +08:00
37 lines
148 KiB
JavaScript
37 lines
148 KiB
JavaScript
|
|
import{p as Ze}from"./chunk-JWPE2WC7.C9webpn6.js";import{b7 as qe,_ as gt,F as Qe,ad as Je,l as Fe,b as Ke,a as je,o as _e,p as tr,g as er,s as rr,q as ir,B as ar,z as nr,D as or,c as Ee,a$ as Te,ai as pe,i as sr,d as hr,r as lr,aj as fr,b8 as cr}from"./mermaid.core.TSSz6aZW.js";import{p as gr}from"./cynefin-VYW2F7L2.DDB6TQyK.js";import{c as be}from"./cytoscape.esm.OyMbaexL.js";import"./framework.C2AwuPrQ.js";var he={exports:{}},le={exports:{}},fe={exports:{}},ur=fe.exports,Oe;function dr(){return Oe||(Oe=1,(function(x,A){(function(R,N){x.exports=N()})(ur,function(){return(function(C){var R={};function N(v){if(R[v])return R[v].exports;var h=R[v]={i:v,l:!1,exports:{}};return C[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=C,N.c=R,N.i=function(v){return v},N.d=function(v,h,a){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(C,R,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v}),(function(C,R,N){var v=N(2),h=N(8),a=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.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"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.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))},r.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)},C.exports=r}),(function(C,R,N){function v(h){this.vGraphObject=h}C.exports=v}),(function(C,R,N){var v=N(2),h=N(10),a=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,n,c){n==null&&c==null&&(c=s),v.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,n!=null&&s!=null?this.rect=new a(s.x,s.y,n.width,n.height):this.rect=new a}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges
|
||
|
|
.edge {
|
||
|
|
stroke-width: ${x.archEdgeWidth};
|
||
|
|
stroke: ${x.archEdgeColor};
|
||
|
|
fill: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.arrow {
|
||
|
|
fill: ${x.archEdgeArrowColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.node-bkg {
|
||
|
|
fill: none;
|
||
|
|
stroke: ${x.archGroupBorderColor};
|
||
|
|
stroke-width: ${x.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"),Sr=Rr;function me(x,A){if(x===0)return A();const C=Math.random;let R=x>>>0;Math.random=function(){R=R+1831565813>>>0;let N=R;return N=Math.imul(N^N>>>15,N|1),N^=N+Math.imul(N^N>>>7,N|61),((N^N>>>14)>>>0)/4294967296};try{return A()}finally{Math.random=C}}gt(me,"withSeededRandom");var re=gt(x=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${x}</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-m
|
||
|
|
translate(${L}, ${b-E.height/2})
|
||
|
|
translate(${p*y.width/2}, ${m*y.height/2})
|
||
|
|
rotate(${-1*p*m*45}, 0, ${E.height/2})
|
||
|
|
`)}}}}}))},"drawEdges"),br=gt(async function(x,A,C,R){const v=C.getConfigField("padding")*.75,h=C.getConfigField("fontSize"),r=C.getConfigField("iconSize")/2;await Promise.all(A.nodes().map(async i=>{const f=ie(i);if(f.type==="group"){const{h:e,w:g,x1:t,y1:s}=i.boundingBox(),n=x.append("rect");n.attr("id",`${R}-group-${f.id}`).attr("x",t+r).attr("y",s+r).attr("width",g).attr("height",e).attr("class","node-bkg");const c=x.append("g");let l=t,T=s;if(f.icon){const u=c.append("g");u.html(`<g>${await pe(f.icon,{height:v,width:v,fallbackPrefix:ne.prefix})}</g>`),u.attr("transform","translate("+(l+r+1)+", "+(T+r+1)+")"),l+=v,T+=h/2-1-2}if(f.label){const u=c.append("g");await Te(u,f.label,{useHtmlLabels:!1,width:g,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+r+4)+", "+(T+r+2)+")")}C.setElementForId(f.id,n)}}))},"drawGroups"),Pr=gt(async function(x,A,C,R){const N=Ee();for(const v of C){const h=A.append("g"),a=x.getConfigField("iconSize");if(v.title){const e=h.append("g");await Te(e,v.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},N),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+a/2+", "+a+")")}const r=h.append("g");if(v.icon)r.html(`<g>${await pe(v.icon,{height:a,width:a,fallbackPrefix:ne.prefix})}</g>`);else if(v.iconText){r.html(`<g>${await pe("blank",{height:a,width:a,fallbackPrefix:ne.prefix})}</g>`);const t=r.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(sr(v.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 r.append("path").attr("class","node-bkg").attr("id",`${R}-node-${v.id}`).attr("d",`M0,${a} V5 Q0,0 5,0 H${a-5} Q${a},0 ${a},5 V${a} Z`);h.attr("id",`${R}-service-${v.id}`).attr("class","architecture-service");const{width:i,height:f}=h.node().getBBox();v.width=i,v.height=f,x.setElementForId(v.id,h)}return 0},"drawServices"),Gr=gt(function(x,A,C,R){C.forEach(N=>{const v=A.append("g"),h=x.getConfigField("iconSize");v.append("g").append("rect").attr("id",`${R}-node-${N.id}`).attr("fill-opacity","0").attr("width",h).attr("height",h),v.attr("class","architecture-junction");const{width:r,height:i}=v._groups[0][0].getBBox();v.width=r,v.height=i,x.setElementForId(N.id,v)})},"drawJunctions");fr([{name:ne.prefix,icons:ne}]);be.use(Tr);function Ye(x,A,C){x.forEach(R=>{A.add({group:"nodes",data:{type:"service",id:R.id,icon:R.icon,label:R.title,parent:R.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-service"})})}gt(Ye,"addServices");function Xe(x,A,C){x.forEach(R=>{A.add({group:"nodes",data:{type:"junction",id:R.id,parent:R.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-junction"})})}gt(Xe,"addJunctions");function He(x,A){A.nodes().map(C=>{const R=ie(C);if(R.type==="group")return;R.x=C.position().x,R.y=C.position().y,x.getElementById(R.id).attr("transform","translate("+(R.x||0)+","+(R.y||0)+")")})}gt(He,"positionNodes");function We(x,A){x.forEach(C=>{A.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}gt(We,"addGroups");function Ve(x,A){x.forEach(C=>{const{lhsId:R,rhsId:N,lhsInto:v,lhsGroup:h,rhsInto:a,lhsDir:r,rhsDir:i,rhsGroup:f,title:e}=C,g=Ne(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${R}-${N}`,label:e,source:R,sourceDir:r,sourceArrow:v,sourceGroup:h,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="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%"};A.add({group:"edges",data:t,classes:g})})}gt(Ve,"addEdges");function ze(x,A,C,R=[]){const N=gt(
|