2026-06-16 05:58:18 +00:00
import { _ as g , o as er , c as $ , d as Bt , l as at , j as Me , e as rr , f as ar , k as P , b as De , s as sr , q as ir , a as nr , g as or , t as cr , v as lr , J as hr , A as dr , i as Vt , u as Z , a2 as Q , a3 as Nt , a4 as Be , a5 as Tr , F as Wt , a6 as pr , a7 as Ve } from "./mermaid.core.BrszyIat.js" ; import { a as Er , b as re , g as dt , d as ur , e as ae , f as se } from "./chunk-ND2GUHAM.-fZ8rJcG.js" ; import { I as fr } from "./chunk-QZHKN3VN.c-zEMlK3.js" ; import "./framework.C2AwuPrQ.js" ; var jt = ( function ( ) { var e = g ( function ( ut , w , v , k ) { for ( v = v || { } , k = ut . length ; k -- ; v [ ut [ k ] ] = w ) ; return v } , "o" ) , t = [ 1 , 2 ] , a = [ 1 , 3 ] , r = [ 1 , 4 ] , i = [ 2 , 4 ] , n = [ 1 , 9 ] , s = [ 1 , 11 ] , l = [ 1 , 12 ] , E = [ 1 , 14 ] , d = [ 1 , 15 ] , c = [ 1 , 17 ] , x = [ 1 , 18 ] , u = [ 1 , 19 ] , O = [ 1 , 25 ] , p = [ 1 , 26 ] , f = [ 1 , 27 ] , _ = [ 1 , 28 ] , I = [ 1 , 29 ] , L = [ 1 , 30 ] , b = [ 1 , 31 ] , S = [ 1 , 32 ] , A = [ 1 , 33 ] , N = [ 1 , 34 ] , B = [ 1 , 35 ] , V = [ 1 , 36 ] , q = [ 1 , 37 ] , U = [ 1 , 38 ] , G = [ 1 , 39 ] , X = [ 1 , 40 ] , j = [ 1 , 42 ] , H = [ 1 , 43 ] , st = [ 1 , 44 ] , tt = [ 1 , 45 ] , it = [ 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 ] , Pt = [ 1 , 74 ] , m = [ 1 , 80 ] , D = [ 1 , 81 ] , lt = [ 1 , 82 ] , et = [ 1 , 83 ] , W = [ 1 , 84 ] , ie = [ 1 , 85 ] , ne = [ 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 ] , At = [ 4 , 5 , 17 , 51 , 53 , 54 ] , kt = [ 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 ] , zt = [ 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 ] , Ut = [ 5 , 52 ] , K = [ 70 , 71 , 72 , 73 ] , ot = [ 1 , 151 ] , Gt = { trace : g ( 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 _ARR
2026-05-21 07:27:56 +00:00
` +J.showPosition()+ `
Expecting ` +Mt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":Qt="Parse error on line "+(vt+1)+": Unexpected "+(rt==Ne?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError(Qt,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Jt,expected:Mt})}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:k.push(rt),z.push(J.yytext),o.push(J.yylloc),k.push(ct[1]),rt=null,we=J.yyleng,T=J.yytext,vt=J.yylineno,Jt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Ot. $ =z[z.length-Tt],Ot._ $ ={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&&(Ot._ $ .range=[o[o.length-(Tt||1)].range[0],o[o.length-1].range[1]]),Zt=this.performAction.apply(Ot,[T,we,vt,gt.yy,ct[1],z,o].concat( $ e)),typeof Zt<"u")return Zt;Tt&&(k=k.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),o=o.slice(0,-1*Tt)),k.push(this.productions_[ct[1]][0]),z.push(Ot. $ ),o.push(Ot._ $ ),ke=St[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=(function(){var ut={EOF:1,parseError:g(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:g(function(w,v){return this.yy=v||this.yy||{},this._input=w,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:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var v=w.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),w},"input"),unput:g(function(w){var v=w.length,k=w.split(/(?: \r \n ?| \n )/g);this._input=w+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),k.length-1&&(this.yylineno-=k.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:k?(k.length===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[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:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/ \n /g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/ \n /g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),v=new Array(w.length+1).join("-");return w+this.upcomingInput()+ `
` +v+"^"},"showPosition"),test_match:g(function(w,v){var k,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=w[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+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],k=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var o in z)this[o]=z[o];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,v,k,y;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),o=0;o<z.length;o++)if(k=this._input.match(this.rules[z[o]]),k&&(!v||k[0].length>v[0].length)){if(v=k,y=o,this.options.backtrack_lexer){if(w=this.test_match(k,z[o]),w!==!1)return w;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(w=this.test_match(v,z[y]),w!==!1?w:!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:g(function(){var v=this.next();return v||this.lex()},"lex"),begin:g(function(v){this.conditionStack.push(v)},"begin"),popState:g(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:g(function(v){this.begin(v)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(v,k,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 k.yytext=k.yytext.trim(),73;case 12:return k.yytext=k.yytext.trim(),this.begin("ALIAS"),73;case 13:return k.yytext=k.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return k.yytext=k.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 k.yytext=k.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
` )?d=n+ `
` :d= ` {
` +n+ `
} ` ,l=lr(d,{schema:hr})}i=l?.type??i,l?.alias&&(!r||r.text===a)&&(r={text:l.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 d=this.state.records.actors.get(this.state.records.prevActor);d&&(d.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(),dr()}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 l=new Option().style;l.color=r,l.color!==r&&(r=" transparent ",i=t.trim())}const{wrap:n,cleanedText:s}=this.extractWrap(i);return{text:s?Vt(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=Vt(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 : 2 px ;
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 : 0 px 8 px 16 px 0 px rgba ( 0 , 0 , 0 , 0.2 ) ;
filter : drop - shadow ( 3 px 5 px 2 px rgb ( 0 0 0 / 0.4 ) ) ;
}
. actor - man circle , line {
fill : $ { e . actorBkg } ;
stroke - width : 2 px ;
}
g rect . rect {
filter : $ { t } ;
stroke : $ { e . nodeBorder } ;
}
` },"getStyles"),Or=Rr,It=36,ft="actor-top",_t="actor-bottom",Ft="actor-box",yt="actor-man",pt=new Set(["redux-color","redux-dark-color"]),wt=g(function(e,t){const a=ur(e,t);return Wt().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Lr=g(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,l=t.rectData;var E="none";i&&(E="block !important");const d=e.append("g");d.attr("id","actor"+s+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",E);var c="";l.class!==void 0&&(c=" "+l.class);let x=l.width>a?l.width:a;const u=d.append("rect");if(u.attr("class","actorPopupMenuPanel"+c),u.attr("x",l.x),u.attr("y",l.height),u.attr("fill",l.fill),u.attr("stroke",l.stroke),u.attr("width",x),u.attr("height",l.height),u.attr("rx",l.rx),u.attr("ry",l.ry),n!=null){var O=20;for(let _ in n){var p=d.append("a"),f=Me.sanitizeUrl(n[_]);p.attr("xlink:href",f),p.attr("target","_blank"),Gr(r)(_,p,l.x+10,l.height+O,x,20,{class:"actor"},r),O+=30}}return u.attr("height",O),{height:l.height+O,width:x}},"drawPopup"),qt=g(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Kt=g(async function(e,t,a=null){let r=e.append("foreignObject");const i=await Ve(t.text,Wt()),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 l=e.node().firstChild;l.setAttribute("height",s.height+2*t.textMargin);const E=l.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:l,stopx:E,starty:d}=a;if(l>E){const c=l;l=E,E=c}r.attr("x",Math.round(l+Math.abs(l-E)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(d)):r.attr("y",Math.round(d-s.height))}return[r]},"drawKatex"),mt=g(function(e,t){let a=0,r=0;const i=t.text.split(P.lineBreakRegex),[n,s]=Be(t.fontSize);let l=[],E=0,d=g(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":d=g(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":d=g(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":d=g(()=>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[c,x]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(E=c*n);const u=e.append("text");u.attr("x",t.x),u.attr("y",d()),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=x||Tr;if(t.tspan){const p=u.append("tspan");p.attr("x",t.x),t.fill!==void 0&&p.attr("fill",t.fill),p.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),l.push(u)}return l},"drawText"),Ye=g(function(e,t){function a(i,n,s,l,E){return i+","+n+" "+(i+s)+","+n+" "+(i+s)+","+(n+l-E)+" "+(i+s-E*1.2)+","+(n+l)+" "+i+","+(n+l)}g(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 , $ { f . height }
h $ { f . width - 2 * L }
a $ { L } , $ { I } 0 0 0 0 , - $ { f . height }
Z
` ;b.append("path").attr("d",A),S.append("path").attr("d", ` M $ { f . x } , $ { f . y + I }
a $ { L } , $ { I } 0 0 0 0 , $ { f . height } ` ),b.attr("transform", ` translate ( $ { L } , $ { - ( f . height / 2 ) } ) ` ),S.attr("transform", ` translate ( $ { f . width - L } , $ { - f . height / 2 } ) ` ),t.rectData=f,E==="neo"&&b.attr("filter","url(#drop-shadow)");const N=i.get(t.name)??0;if(pt.has(d)&&(b.style("stroke",u[N%u.length]),b.style("fill",x[N%u.length]),S.style("stroke",u[N%u.length]),S.style("fill",x[N%u.length])),t.properties?.icon){const q=t.properties.icon.trim(),U=f.x+f.width-20,G=f.y+10;q.charAt(0)==="@"?ae(p,U,G,q.substr(1)):se(p,U,G,q)}Et(a,Q(t.description))(t.description,p,f.x,f.y,f.width,f.height,{class: ` actor $ { Ft } ` },a);let B=t.height;const V=b.select("path:last-child");if(V.node()){const q=V.node().getBBox();t.height=q.height,B=q.height}return r||(p.attr("data-et","participant"),p.attr("data-type","queue"),p.attr("data-id",t.name)),B},"drawActorTypeQueue"),Sr=g(function(e,t,a,r,i,n){const s=r?t.stopy:t.starty,l=t.x+t.width/2,E=s+75,{look:d,theme:c,themeVariables:x}=a,{bkgColorArray:u,borderColorArray:O,actorBorder:p,actorBkg:f}=x,_=e.append("g").lower();r||(M++,_.append("line").attr("id","actor"+M).attr("x1",l).attr("y1",E).attr("x2",l).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=M);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 S=t.x+t.width/2,A=s+32,N=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",S).attr("cy",A).attr("r",N).attr("filter", ` $ { d === "neo" ? "url(#drop-shadow)" : "" } ` ),I.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform", ` translate ( $ { S } , $ { A - N } ) ` );const B=n.get(t.name)??0;pt.has(c)?(I.style("stroke",O[B%O.length]),I.style("fill",u[B%O.length])):(I.style("stroke",p),I.style("fill",f));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+N+(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=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,l=n+75,{look:E,theme:d,themeVariables:c}=a,{bkgColorArray:x,borderColorArray:u}=c,O=e.append("g").lower(),p=e.append("g");let f="actor";r?f+= ` $ { _t } ` :f+= ` $ { ft } ` ,p.attr("class",f),p.attr("name",t.name);const _=dt();_.x=t.x,_.y=n,_.fill="#eaeaea",_.width=t.width,_.height=t.height,_.class="actor";const I=t.x+t.width/2,L=n+(r?10:25),b=22;p.append("circle").attr("cx",I).attr("cy",L).attr("r",b).attr("width",t.width).attr("height",t.height),p.append("line").attr("x1",I-b).attr("x2",I+b).attr("y1",L+b).attr("y2",L+b).attr("stroke-width",2),E==="neo"&&p.attr("filter","url(#drop-shadow)");const S=i.get(t.name)??0;pt.has(d)&&(p.style("stroke",u[S%u.length]),p.style("fill",x[S%u.length]));const A=p.node().getBBox();return t.height=A.height+(a?.sequence?.labelBoxHeight??0),r||(M++,O.append("line").attr("id","actor"+M).attr("x1",s).attr("y1",l).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=M),Et(a,Q(t.description))(t.description,p,_.x,_.y+(r?15:30),_.width,_.height,{class: ` actor $ { yt } ` },a),r?p.attr("transform", ` translate ( 0 , $ { b } ) ` ):(p.attr("transform", ` translate ( 0 , $ { b / 2 - 5 } ) ` ),p.attr("data-et","participant"),p.attr("data-type","entity"),p.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Nr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,l=n+t.height+2*a.boxTextMargin,{theme:E,themeVariables:d,look:c}=a,{bkgColorArray:x,borderColorArray:u,actorBorder:O}=d,p=e.app
M $ { _ . x } , $ { _ . y + A }
a $ { S } , $ { A } 0 0 0 $ { L } , 0
a $ { S } , $ { A } 0 0 0 - $ { L } , 0
l 0 , $ { b - 2 * A }
a $ { S } , $ { A } 0 0 0 $ { L } , 0
l 0 , - $ { b - 2 * A }
` ;N.append("path").attr("d",B),c==="neo"&&N.attr("filter","url(#drop-shadow)");const V=i.get(t.name)??0;pt.has(E)?(N.style("stroke",u[V%u.length]),N.style("fill",x[V%u.length])):N.style("stroke",O),N.attr("transform", ` translate ( $ { L } , $ { A } ) ` ),t.rectData=_,Et(a,Q(t.description))(t.description,f,_.x,_.y+35,_.width,_.height,{class: ` actor $ { Ft } ` },a);const q=N.select("path:last-child");if(q.node()){const U=q.node().getBBox();t.height=U.height+(a.sequence.labelBoxHeight??0)}return r||(f.attr("data-et","participant"),f.attr("data-type","database"),f.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Pr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,l=n+80,E=22,d=e.append("g").lower(),{look:c,theme:x,themeVariables:u}=a,{bkgColorArray:O,borderColorArray:p,actorBorder:f}=u;r||(M++,d.append("line").attr("id","actor"+M).attr("x1",s).attr("y1",l).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=M);const _=e.append("g");let I=yt;r?I+= ` $ { _t } ` :I+= ` $ { ft } ` ,_.attr("class",I),_.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",_.append("line").attr("id","actor-man-torso"+M).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),_.append("line").attr("id","actor-man-arms"+M).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),_.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+12).attr("r",E),c==="neo"&&_.attr("filter","url(#drop-shadow)");const b=i.get(t.name)??0;pt.has(x)?(_.style("stroke",p[b%p.length]),_.style("fill",O[b%p.length])):_.style("stroke",f);const S=_.node().getBBox();return t.height=S.height+(a.sequence.labelBoxHeight??0),Et(a,Q(t.description))(t.description,_,L.x,L.y+15,L.width,L.height,{class: ` actor $ { yt } ` },a),_.attr("transform", ` translate ( 0 , $ { E / 2 + 10 } ) ` ),r||(_.attr("data-et","participant"),_.attr("data-type","boundary"),_.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),kr=g(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,l=n+80,{look:E,theme:d,themeVariables:c}=a,{bkgColorArray:x,borderColorArray:u,actorBorder:O}=c,p=e.append("g").lower();r||(M++,p.append("line").attr("id","actor"+M).attr("x1",s).attr("y1",l).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=M);const f=e.append("g");let _=yt;r?_+= ` $ { _t } ` :_+= ` $ { ft } ` ,f.attr("class",_),f.attr("name",t.name),r||f.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;f.append("line").attr("id","actor-man-torso"+M).attr("x1",s).attr("y1",L+25*I).attr("x2",s).attr("y2",L+45*I),f.append("line").attr("id","actor-man-arms"+M).attr("x1",s-It/2*I).attr("y1",L+33*I).attr("x2",s+It/2*I).attr("y2",L+33*I),f.append("line").attr("x1",s-It/2*I).attr("y1",L+60*I).attr("x2",s).attr("y2",L+45*I),f.append("line").attr("x1",s).attr("y1",L+45*I).attr("x2",s+(It/2-2)*I).attr("y2",L+60*I);const b=f.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 S=f.node().getBBox();t.height=S.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 N=i.get(t.name)??0;return pt.has(d)?(f.style("stroke",u[N%u.length]),f.style("fill",x[N%u.length])):f.style("stroke",O),Et(a,Q(t.description))(t.description,f,A.x,L+35*I-(E==="neo"?10:0),A.width,A.height,{class: ` actor $ { yt } ` },a),t.height},"drawActorTypeActor"),Dr=g(async function(e,t,a,r,i,n,s){const l=s??new Map([...n.db.getActors().values()].map((E,d)=>[E.name,d]));switch(t.type){case"actor":return await kr(e,t,a,r,l);case"participant":return await br(e,t,a,r,l);case"boundary":return await Pr(e,t,a,r,l);case"control":return await Sr(e,t,a,r,i,l);case"entity":retur