mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-21 15:55:36 +08:00
163 lines
114 KiB
JavaScript
163 lines
114 KiB
JavaScript
|
|
import{I as er}from"./chunk-2Q5K7J3B.BGKRutAs.js";import{_ as x,X as rr,c as $,d as Yt,l as at,j as Me,e as ar,f as sr,k as N,b as De,s as ir,o as nr,a as or,g as cr,p as lr,Y as hr,Z as dr,q as Tr,i as Wt,y as Z,$ as Q,a0 as kt,a1 as Be,a2 as pr,z as Ft,a3 as Er,a4 as Ve}from"./mermaid.core.TSSz6aZW.js";import{a as ur,b as se,g as dt,d as fr,c as ie,e as ne}from"./chunk-32BRIVSS.DTslVixY.js";import"./framework.C2AwuPrQ.js";var ee=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],c=[1,12],E=[1,14],h=[1,15],p=[1,17],_=[1,18],u=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],St=[1,74],Dt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],me=[2,78],wt=[4,5,17,51,53,54],vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Xt=[5,52],F=[70,71,72,73],ot=[1,151],Jt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARRO
|
||
|
|
`+J.showPosition()+`
|
||
|
|
Expecting `+Vt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":jt="Parse error on line "+(Mt+1)+": Unexpected "+(rt==Ne?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError(jt,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Qt,expected:Vt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:P.push(rt),z.push(J.yytext),o.push(J.yylloc),P.push(ct[1]),rt=null,we=J.yyleng,d=J.yytext,Mt=J.yylineno,Qt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Lt.$=z[z.length-Tt],Lt._$={first_line:o[o.length-(Tt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Tt||1)].first_column,last_column:o[o.length-1].last_column},je&&(Lt._$.range=[o[o.length-(Tt||1)].range[0],o[o.length-1].range[1]]),$t=this.performAction.apply(Lt,[d,we,Mt,gt.yy,ct[1],z,o].concat($e)),typeof $t<"u")return $t;Tt&&(P=P.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),o=o.slice(0,-1*Tt)),P.push(this.productions_[ct[1]][0]),z.push(Lt.$),o.push(Lt._$),ke=Nt[P[P.length-2]][P[P.length-1]],P.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=(function(){var ut={EOF:1,parseError:x(function(v,P){if(this.yy.parser)this.yy.parser.parseError(v,P);else throw new Error(v)},"parseError"),setInput:x(function(S,v){return this.yy=v||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var v=S.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:x(function(S){var v=S.length,P=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),P.length-1&&(this.yylineno-=P.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:P?(P.length===y.length?this.yylloc.first_column:0)+y[y.length-P.length].length-P[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),v=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
|
||
|
|
`+v+"^"},"showPosition"),test_match:x(function(S,v){var P,y,z;if(this.options.backtrack_lexer&&(z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(z.yylloc.range=this.yylloc.range.slice(0))),y=S[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],P=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var o in z)this[o]=z[o];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,v,P,y;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),o=0;o<z.length;o++)if(P=this._input.match(this.rules[z[o]]),P&&(!v||P[0].length>v[0].length)){if(v=P,y=o,this.options.backtrack_lexer){if(S=this.test_match(P,z[o]),S!==!1)return S;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(S=this.test_match(v,z[y]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var v=this.next();return v||this.lex()},"lex"),begin:x(function(v){this.conditionStack.push(v)},"begin"),popState:x(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:x(function(v){this.begin(v)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(v,P,y,z){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return P.yytext=P.yytext.trim(),73;case 12:return P.yytext=P.yytext.trim(),this.begin("ALIAS"),73;case 13:return P.yytext=P.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return P.yytext=P.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return P.yytext=P.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:brea
|
||
|
|
`)?h=n+`
|
||
|
|
`:h=`{
|
||
|
|
`+n+`
|
||
|
|
}`,c=hr(h,{schema:dr})}i=c?.type??i,c?.alias&&(!r||r.text===a)&&(r={text:c.alias,wrap:r?.wrap,type:i});const E=this.state.records.actors.get(t);if(E){if(this.state.records.currentBox&&E.box&&this.state.records.currentBox!==E.box)throw new Error(`A same participant should only be defined in one Box: ${E.name} can't be in '${E.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=E.box?E.box:this.state.records.currentBox,E.box=s,E&&a===E.name&&r==null)return}if(r?.text==null&&(r={text:a,type:i}),(i==null||r.text==null)&&(r={text:a,type:i}),this.state.records.actors.set(t,{box:s,name:a,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const h=this.state.records.actors.get(this.state.records.prevActor);h&&(h.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let a,r=0;if(!t)return 0;for(a=0;a<this.state.records.messages.length;a++)this.state.records.messages[a].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[a].from===t&&r++,this.state.records.messages[a].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[a].from===t&&r--;return r}addMessage(t,a,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(t,a,r,i,n=!1,s){if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const E=new Error("Trying to inactivate an inactive participant ("+t+")");throw E.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},E}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:n,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const a=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(a===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:a}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:$().sequence?.wrap??!1}clear(){this.state.reset(),Tr()}parseMessage(t){const a=t.trim(),{wrap:r,cleanedText:i}=this.extractWrap(a),n={text:i,wrap:r};return at.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(t){const a=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=a?.[1]?a[1].trim():"transparent",i=a?.[2]?a[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const c=new Option().style;c.color=r,c.color!==r&&(r="transparent",i=t.trim())}const{wrap:n,cleanedText:s}=this.extractWrap(i);return{text:s?Wt(s,$()):void 0,color:r,wrap:n}}addNote(t,a,r){const i={actor:t,placement:a,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:a})}addLinks(t,a){const r=this.getActor(t);try{let i=Wt(a.text,$());i=i.replace(/=/g,"="),i=i.replace(/&/g,
|
||
|
|
stroke: ${e.actorBorder};
|
||
|
|
fill: ${e.actorBkg};
|
||
|
|
stroke-width: ${e.strokeWidth??1};
|
||
|
|
}
|
||
|
|
|
||
|
|
rect.actor.outer-path[data-look="neo"] {
|
||
|
|
filter: ${t};
|
||
|
|
}
|
||
|
|
|
||
|
|
rect.note[data-look="neo"] {
|
||
|
|
stroke:${e.noteBorderColor};
|
||
|
|
fill:${e.noteBkgColor};
|
||
|
|
filter: ${t};
|
||
|
|
}
|
||
|
|
|
||
|
|
text.actor > tspan {
|
||
|
|
fill: ${e.actorTextColor};
|
||
|
|
stroke: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.actor-line {
|
||
|
|
stroke: ${e.actorLineColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.innerArc {
|
||
|
|
stroke-width: 1.5;
|
||
|
|
stroke-dasharray: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.messageLine0 {
|
||
|
|
stroke-width: 1.5;
|
||
|
|
stroke-dasharray: none;
|
||
|
|
stroke: ${e.signalColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.messageLine1 {
|
||
|
|
stroke-width: 1.5;
|
||
|
|
stroke-dasharray: 2, 2;
|
||
|
|
stroke: ${e.signalColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
[id$="-arrowhead"] path {
|
||
|
|
fill: ${e.signalColor};
|
||
|
|
stroke: ${e.signalColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.sequenceNumber {
|
||
|
|
fill: ${e.sequenceNumberColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
[id$="-sequencenumber"] {
|
||
|
|
fill: ${e.signalColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
[id$="-crosshead"] path {
|
||
|
|
fill: ${e.signalColor};
|
||
|
|
stroke: ${e.signalColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.messageText {
|
||
|
|
fill: ${e.signalTextColor};
|
||
|
|
stroke: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.labelBox {
|
||
|
|
stroke: ${e.labelBoxBorderColor};
|
||
|
|
fill: ${e.labelBoxBkgColor};
|
||
|
|
filter: ${a==="neo"?t:"none"};
|
||
|
|
}
|
||
|
|
|
||
|
|
.labelText, .labelText > tspan {
|
||
|
|
fill: ${e.labelTextColor};
|
||
|
|
stroke: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.loopText, .loopText > tspan {
|
||
|
|
fill: ${e.loopTextColor};
|
||
|
|
stroke: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.sectionTitle, .sectionTitle > tspan {
|
||
|
|
fill: ${e.loopTextColor};
|
||
|
|
stroke: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.loopLine {
|
||
|
|
stroke-width: 2px;
|
||
|
|
stroke-dasharray: 2, 2;
|
||
|
|
stroke: ${e.labelBoxBorderColor};
|
||
|
|
fill: ${e.labelBoxBorderColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.note {
|
||
|
|
//stroke: #decc93;
|
||
|
|
stroke: ${e.noteBorderColor};
|
||
|
|
fill: ${e.noteBkgColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.noteText, .noteText > tspan {
|
||
|
|
fill: ${e.noteTextColor};
|
||
|
|
stroke: none;
|
||
|
|
${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""}
|
||
|
|
}
|
||
|
|
|
||
|
|
.activation0 {
|
||
|
|
fill: ${e.activationBkgColor};
|
||
|
|
stroke: ${e.activationBorderColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.activation1 {
|
||
|
|
fill: ${e.activationBkgColor};
|
||
|
|
stroke: ${e.activationBorderColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.activation2 {
|
||
|
|
fill: ${e.activationBkgColor};
|
||
|
|
stroke: ${e.activationBorderColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.actorPopupMenu {
|
||
|
|
position: absolute;
|
||
|
|
}
|
||
|
|
|
||
|
|
.actorPopupMenuPanel {
|
||
|
|
position: absolute;
|
||
|
|
fill: ${e.actorBkg};
|
||
|
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||
|
|
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
||
|
|
}
|
||
|
|
.actor-man circle, line {
|
||
|
|
fill: ${e.actorBkg};
|
||
|
|
stroke-width: 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
g rect.rect {
|
||
|
|
filter: ${t};
|
||
|
|
stroke: ${e.nodeBorder};
|
||
|
|
}
|
||
|
|
`},"getStyles"),Or=Rr,It=36,ft="actor-top",_t="actor-bottom",Ht="actor-box",yt="actor-man",pt=new Set(["redux-color","redux-dark-color"]),Pt=x(function(e,t){const a=fr(e,t);return Ft().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Lr=x(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,s=t.actorCnt,c=t.rectData;var E="none";i&&(E="block !important");const h=e.append("g");h.attr("id","actor"+s+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",E);var p="";c.class!==void 0&&(p=" "+c.class);let _=c.width>a?c.width:a;const u=h.append("rect");if(u.attr("class","actorPopupMenuPanel"+p),u.attr("x",c.x),u.attr("y",c.height),u.attr("fill",c.fill),u.attr("stroke",c.stroke),u.attr("width",_),u.attr("height",c.height),u.attr("rx",c.rx),u.attr("ry",c.ry),n!=null){var O=20;for(let f in n){var T=h.append("a"),g=Me.sanitizeUrl(n[f]);T.attr("xlink:href",g),T.attr("target","_blank"),Gr(r)(f,T,c.x+10,c.height+O,_,20,{class:"actor"},r),O+=30}}return u.attr("height",O),{height:c.height+O,width:_}},"drawPopup"),zt=x(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),qt=x(async function(e,t,a=null){let r=e.append("foreignObject");const i=await Ve(t.text,Ft()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){const c=e.node().firstChild;c.setAttribute("height",s.height+2*t.textMargin);const E=c.getBBox();r.attr("x",Math.round(E.x+E.width/2-s.width/2)).attr("y",Math.round(E.y+E.height/2-s.height/2))}else if(a){let{startx:c,stopx:E,starty:h}=a;if(c>E){const p=c;c=E,E=p}r.attr("x",Math.round(c+Math.abs(c-E)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(h)):r.attr("y",Math.round(h-s.height))}return[r]},"drawKatex"),At=x(function(e,t){let a=0,r=0;const i=t.text.split(N.lineBreakRegex),[n,s]=Be(t.fontSize);let c=[],E=0,h=x(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=x(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=x(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=x(()=>Math.round(t.y+(a+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[p,_]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(E=p*n);const u=e.append("text");u.attr("x",t.x),u.attr("y",h()),t.anchor!==void 0&&u.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&u.style("font-family",t.fontFamily),s!==void 0&&u.style("font-size",s),t.fontWeight!==void 0&&u.style("font-weight",t.fontWeight),t.fill!==void 0&&u.attr("fill",t.fill),t.class!==void 0&&u.attr("class",t.class),t.dy!==void 0?u.attr("dy",t.dy):E!==0&&u.attr("dy",E);const O=_||pr;if(t.tspan){const T=u.append("tspan");T.attr("x",t.x),t.fill!==void 0&&T.attr("fill",t.fill),T.text(O)}else u.text(O);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,a=r),c.push(u)}return c},"drawText"),Ye=x(function(e,t){function a(i,n,s,c,E){return i+","+n+" "+(i+s)+","+n+" "+(i+s)+","+(n+c-E)+" "+(i+s-E*1.2)+","+(n+c)+" "+i+","+(n+c)}x(a,"genPoints");const r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=
|
||
|
|
a ${L},${I} 0 0 0 0,${g.height}
|
||
|
|
h ${g.width-2*L}
|
||
|
|
a ${L},${I} 0 0 0 0,-${g.height}
|
||
|
|
Z
|
||
|
|
`;b.append("path").attr("d",A),w.append("path").attr("d",`M ${g.x},${g.y+I}
|
||
|
|
a ${L},${I} 0 0 0 0,${g.height}`),b.attr("transform",`translate(${L}, ${-(g.height/2)})`),w.attr("transform",`translate(${g.width-L}, ${-g.height/2})`),t.rectData=g,E==="neo"&&b.attr("filter","url(#drop-shadow)");const D=i.get(t.name)??0;if(pt.has(h)&&(b.style("stroke",u[D%u.length]),b.style("fill",_[D%u.length]),w.style("stroke",u[D%u.length]),w.style("fill",_[D%u.length])),t.properties?.icon){const W=t.properties.icon.trim(),U=g.x+g.width-20,G=g.y+10;W.charAt(0)==="@"?ie(T,U,G,W.substr(1)):ne(T,U,G,W)}Et(a,Q(t.description))(t.description,T,g.x,g.y,g.width,g.height,{class:`actor ${Ht}`},a);let M=t.height;const V=b.select("path:last-child");if(V.node()){const W=V.node().getBBox();t.height=W.height,M=W.height}return r||(T.attr("data-et","participant"),T.attr("data-type","queue"),T.attr("data-id",t.name)),M},"drawActorTypeQueue"),Sr=x(function(e,t,a,r,i,n){const s=r?t.stopy:t.starty,c=t.x+t.width/2,E=s+75,{look:h,theme:p,themeVariables:_}=a,{bkgColorArray:u,borderColorArray:O,actorBorder:T,actorBkg:g}=_,f=e.append("g").lower();r||(B++,f.append("line").attr("id","actor"+B).attr("x1",c).attr("y1",E).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const I=e.append("g");let L=yt;r?L+=` ${_t}`:L+=` ${ft}`,I.attr("class",L),I.attr("name",t.name);const b=dt();b.x=t.x,b.y=s,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor";const w=t.x+t.width/2,A=s+32,D=22;I.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",w).attr("cy",A).attr("r",D).attr("filter",`${h==="neo"?"url(#drop-shadow)":""}`),I.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${w}, ${A-D})`);const M=n.get(t.name)??0;pt.has(p)?(I.style("stroke",O[M%O.length]),I.style("fill",u[M%O.length])):(I.style("stroke",T),I.style("fill",g));const V=I.node().getBBox();return t.height=V.height+2*(a?.sequence?.labelBoxHeight??0),Et(a,Q(t.description))(t.description,I,b.x,b.y+D+(r?5:12),b.width,b.height,{class:`actor ${yt}`},a),r||(I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",t.name)),t.height},"drawActorTypeControl"),wr=x(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,c=n+75,{look:E,theme:h,themeVariables:p}=a,{bkgColorArray:_,borderColorArray:u}=p,O=e.append("g").lower(),T=e.append("g");let g="actor";r?g+=` ${_t}`:g+=` ${ft}`,T.attr("class",g),T.attr("name",t.name);const f=dt();f.x=t.x,f.y=n,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor";const I=t.x+t.width/2,L=n+(r?10:25),b=22;T.append("circle").attr("cx",I).attr("cy",L).attr("r",b).attr("width",t.width).attr("height",t.height),T.append("line").attr("x1",I-b).attr("x2",I+b).attr("y1",L+b).attr("y2",L+b).attr("stroke-width",2),E==="neo"&&T.attr("filter","url(#drop-shadow)");const w=i.get(t.name)??0;pt.has(h)&&(T.style("stroke",u[w%u.length]),T.style("fill",_[w%u.length]));const A=T.node().getBBox();return t.height=A.height+(a?.sequence?.labelBoxHeight??0),r||(B++,O.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",c).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B),Et(a,Q(t.description))(t.description,T,f.x,f.y+(r?15:30),f.width,f.height,{class:`actor ${yt}`},a),r?T.attr("transform",`translate(0, ${b})`):(T.attr("transform",`translate(0, ${b/2-5})`),T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Nr=x(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,c=n+t.height+2*a.boxTextMargin,{theme:E,themeVariables:h,look:p}=a,{bkgColorArray:_,borderColorArray:u,actorBorder:O}=h,T=e.app
|
||
|
|
M ${f.x},${f.y+A}
|
||
|
|
a ${w},${A} 0 0 0 ${L},0
|
||
|
|
a ${w},${A} 0 0 0 -${L},0
|
||
|
|
l 0,${b-2*A}
|
||
|
|
a ${w},${A} 0 0 0 ${L},0
|
||
|
|
l 0,-${b-2*A}
|
||
|
|
`;D.append("path").attr("d",M),p==="neo"&&D.attr("filter","url(#drop-shadow)");const V=i.get(t.name)??0;pt.has(E)?(D.style("stroke",u[V%u.length]),D.style("fill",_[V%u.length])):D.style("stroke",O),D.attr("transform",`translate(${L}, ${A})`),t.rectData=f,Et(a,Q(t.description))(t.description,g,f.x,f.y+35,f.width,f.height,{class:`actor ${Ht}`},a);const W=D.select("path:last-child");if(W.node()){const U=W.node().getBBox();t.height=U.height+(a.sequence.labelBoxHeight??0)}return r||(g.attr("data-et","participant"),g.attr("data-type","database"),g.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Pr=x(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,c=n+80,E=22,h=e.append("g").lower(),{look:p,theme:_,themeVariables:u}=a,{bkgColorArray:O,borderColorArray:T,actorBorder:g}=u;r||(B++,h.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",c).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const f=e.append("g");let I=yt;r?I+=` ${_t}`:I+=` ${ft}`,f.attr("class",I),f.attr("name",t.name);const L=dt();L.x=t.x,L.y=n,L.fill="#eaeaea",L.width=t.width,L.height=t.height,L.class="actor",f.append("line").attr("id","actor-man-torso"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",n+12).attr("x2",t.x+t.width/2-15).attr("y2",n+12),f.append("line").attr("id","actor-man-arms"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",n+2).attr("x2",t.x+t.width/2-E*2.5).attr("y2",n+22),f.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+12).attr("r",E),p==="neo"&&f.attr("filter","url(#drop-shadow)");const b=i.get(t.name)??0;pt.has(_)?(f.style("stroke",T[b%T.length]),f.style("fill",O[b%T.length])):f.style("stroke",g);const w=f.node().getBBox();return t.height=w.height+(a.sequence.labelBoxHeight??0),Et(a,Q(t.description))(t.description,f,L.x,L.y+15,L.width,L.height,{class:`actor ${yt}`},a),f.attr("transform",`translate(0,${E/2+10})`),r||(f.attr("data-et","participant"),f.attr("data-type","boundary"),f.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),kr=x(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,c=n+80,{look:E,theme:h,themeVariables:p}=a,{bkgColorArray:_,borderColorArray:u,actorBorder:O}=p,T=e.append("g").lower();r||(B++,T.append("line").attr("id","actor"+B).attr("x1",s).attr("y1",c).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);const g=e.append("g");let f=yt;r?f+=` ${_t}`:f+=` ${ft}`,g.attr("class",f),g.attr("name",t.name),r||g.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);const I=E==="neo"?.5:1,L=E==="neo"?n+(1-I)*30:n;g.append("line").attr("id","actor-man-torso"+B).attr("x1",s).attr("y1",L+25*I).attr("x2",s).attr("y2",L+45*I),g.append("line").attr("id","actor-man-arms"+B).attr("x1",s-It/2*I).attr("y1",L+33*I).attr("x2",s+It/2*I).attr("y2",L+33*I),g.append("line").attr("x1",s-It/2*I).attr("y1",L+60*I).attr("x2",s).attr("y2",L+45*I),g.append("line").attr("x1",s).attr("y1",L+45*I).attr("x2",s+(It/2-2)*I).attr("y2",L+60*I);const b=g.append("circle");b.attr("cx",t.x+t.width/2),b.attr("cy",L+10*I),b.attr("r",15*I),b.attr("width",t.width*I),b.attr("height",t.height*I);const w=g.node().getBBox();t.height=w.height;const A=dt();A.x=t.x,A.y=L,A.fill="#eaeaea",A.width=t.width,A.height=t.height/I,A.class="actor",A.rx=3,A.ry=3;const D=i.get(t.name)??0;return pt.has(h)?(g.style("stroke",u[D%u.length]),g.style("fill",_[D%u.length])):g.style("stroke",O),Et(a,Q(t.description))(t.description,g,A.x,L+35*I-(E==="neo"?10:0),A.width,A.height,{class:`actor ${yt}`},a),t.height},"drawActorTypeActor"),Dr=x(async function(e,t,a,r,i,n,s){const c=s??new Map([...n.db.getActors().values()].map((E,h)=>[E.name,h]));switch(t.type){case"actor":return await kr(e,t,a,r,c);case"participant":return await br(e,t,a,r,c);case"boundary":return await Pr(e,t,a,r,c);case"control":return await Sr(e,t,a,r,i,c);case"entity":retur
|