All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.chunks.mermaid.esm.min.sequenceDiagram-7SUASMRF.mjs Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

The newest version!
import{a as Te}from"./chunk-VSLJSFIP.mjs";import{a as fe,b as ge,d as xe,e as me,f as Et,g as Lt}from"./chunk-BERL53GW.mjs";import{a as be,k as Ht,m as Y}from"./chunk-2XY5F2HY.mjs";import{a as Ke}from"./chunk-TI4EEUUG.mjs";import{A as Dt,F as It,I as at,J as xt,K as qt,L as I,M as oe,P as ce,Q as zt,R as le,S as de,T as he,U as pe,V as ue,X as Z,b as z,ga as _t,k as ie}from"./chunk-ITX3UAHE.mjs";import"./chunk-6BY5RJGC.mjs";import{a as d,e as He}from"./chunk-GTKDMUJJ.mjs";var Kt=function(){var t=d(function(pt,k,L,A){for(L=L||{},A=pt.length;A--;L[pt[A]]=k);return L},"o"),e=[1,2],c=[1,3],r=[1,4],n=[2,4],a=[1,9],o=[1,11],h=[1,13],p=[1,14],s=[1,16],g=[1,17],T=[1,18],f=[1,24],m=[1,25],E=[1,26],_=[1,27],N=[1,28],V=[1,29],M=[1,30],F=[1,31],C=[1,32],H=[1,33],K=[1,34],Q=[1,35],rt=[1,36],U=[1,37],G=[1,38],q=[1,39],R=[1,41],j=[1,42],J=[1,43],$=[1,44],st=[1,45],v=[1,46],b=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],tt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],it=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],S=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],ee=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",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",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(k,L,A,y,D,l,kt){var u=l.length-1;switch(D){case 3:return y.apply(l[u]),l[u];break;case 4:case 9:this.$=[];break;case 5:case 10:l[u-1].push(l[u]),this.$=l[u-1];break;case 6:case 7:case 11:case 12:this.$=l[u];break;case 8:case 13:this.$=[];break;case 15:l[u].type="createParticipant",this.$=l[u];break;case 16:l[u-1].unshift({type:"boxStart",boxData:y.parseBoxData(l[u-2])}),l[u-1].push({type:"boxEnd",boxText:l[u-2]}),this.$=l[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-2]),sequenceIndexStep:Number(l[u-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:l[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:l[u-1].actor};break;case 29:y.setDiagramTitle(l[u].substring(6)),this.$=l[u].substring(6);break;case 30:y.setDiagramTitle(l[u].substring(7)),this.$=l[u].substring(7);break;case 31:this.$=l[u].trim(),y.setAccTitle(this.$);break;case 32:case 33:this.$=l[u].trim(),y.setAccDescription(this.$);break;case 34:l[u-1].unshift({type:"loopStart",loopText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.LOOP_START}),l[u-1].push({type:"loopEnd",loopText:l[u-2],signalType:y.LINETYPE.LOOP_END}),this.$=l[u-1];break;case 35:l[u-1].unshift({type:"rectStart",color:y.parseMessage(l[u-2]),signalType:y.LINETYPE.RECT_START}),l[u-1].push({type:"rectEnd",color:y.parseMessage(l[u-2]),signalType:y.LINETYPE.RECT_END}),this.$=l[u-1];break;case 36:l[u-1].unshift({type:"optStart",optText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.OPT_START}),l[u-1].push({type:"optEnd",optText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.OPT_END}),this.$=l[u-1];break;case 37:l[u-1].unshift({type:"altStart",altText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.ALT_START}),l[u-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=l[u-1];break;case 38:l[u-1].unshift({type:"parStart",parText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.PAR_START}),l[u-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=l[u-1];break;case 39:l[u-1].unshift({type:"parStart",parText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.PAR_OVER_START}),l[u-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=l[u-1];break;case 40:l[u-1].unshift({type:"criticalStart",criticalText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.CRITICAL_START}),l[u-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=l[u-1];break;case 41:l[u-1].unshift({type:"breakStart",breakText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.BREAK_START}),l[u-1].push({type:"breakEnd",optText:y.parseMessage(l[u-2]),signalType:y.LINETYPE.BREAK_END}),this.$=l[u-1];break;case 43:this.$=l[u-3].concat([{type:"option",optionText:y.parseMessage(l[u-1]),signalType:y.LINETYPE.CRITICAL_OPTION},l[u]]);break;case 45:this.$=l[u-3].concat([{type:"and",parText:y.parseMessage(l[u-1]),signalType:y.LINETYPE.PAR_AND},l[u]]);break;case 47:this.$=l[u-3].concat([{type:"else",altText:y.parseMessage(l[u-1]),signalType:y.LINETYPE.ALT_ELSE},l[u]]);break;case 48:l[u-3].draw="participant",l[u-3].type="addParticipant",l[u-3].description=y.parseMessage(l[u-1]),this.$=l[u-3];break;case 49:l[u-1].draw="participant",l[u-1].type="addParticipant",this.$=l[u-1];break;case 50:l[u-3].draw="actor",l[u-3].type="addParticipant",l[u-3].description=y.parseMessage(l[u-1]),this.$=l[u-3];break;case 51:l[u-1].draw="actor",l[u-1].type="addParticipant",this.$=l[u-1];break;case 52:l[u-1].type="destroyParticipant",this.$=l[u-1];break;case 53:this.$=[l[u-1],{type:"addNote",placement:l[u-2],actor:l[u-1].actor,text:l[u]}];break;case 54:l[u-2]=[].concat(l[u-1],l[u-1]).slice(0,2),l[u-2][0]=l[u-2][0].actor,l[u-2][1]=l[u-2][1].actor,this.$=[l[u-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:l[u-2].slice(0,2),text:l[u]}];break;case 55:this.$=[l[u-1],{type:"addLinks",actor:l[u-1].actor,text:l[u]}];break;case 56:this.$=[l[u-1],{type:"addALink",actor:l[u-1].actor,text:l[u]}];break;case 57:this.$=[l[u-1],{type:"addProperties",actor:l[u-1].actor,text:l[u]}];break;case 58:this.$=[l[u-1],{type:"addDetails",actor:l[u-1].actor,text:l[u]}];break;case 61:this.$=[l[u-2],l[u]];break;case 62:this.$=l[u];break;case 63:this.$=y.PLACEMENT.LEFTOF;break;case 64:this.$=y.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:l[u-1].actor}];break;case 66:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:l[u-4].actor}];break;case 67:this.$=[l[u-3],l[u-1],{type:"addMessage",from:l[u-3].actor,to:l[u-1].actor,signalType:l[u-2],msg:l[u]}];break;case 68:this.$={type:"addParticipant",actor:l[u]};break;case 69:this.$=y.LINETYPE.SOLID_OPEN;break;case 70:this.$=y.LINETYPE.DOTTED_OPEN;break;case 71:this.$=y.LINETYPE.SOLID;break;case 72:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=y.LINETYPE.DOTTED;break;case 74:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=y.LINETYPE.SOLID_CROSS;break;case 76:this.$=y.LINETYPE.DOTTED_CROSS;break;case 77:this.$=y.LINETYPE.SOLID_POINT;break;case 78:this.$=y.LINETYPE.DOTTED_POINT;break;case 79:this.$=y.parseMessage(l[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:c,6:r},{1:[3]},{3:5,4:e,5:c,6:r},{3:6,4:e,5:c,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,12:12,13:h,14:p,17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},t(b,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},t(b,[2,7]),t(b,[2,8]),t(b,[2,14]),{12:48,50:U,52:G,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:v},{22:55,70:v},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(b,[2,29]),t(b,[2,30]),{32:[1,61]},{34:[1,62]},t(b,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:v},{22:72,70:v},{22:73,70:v},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:v},{22:90,70:v},{22:91,70:v},{22:92,70:v},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(b,[2,6]),t(b,[2,15]),t(P,[2,9],{10:93}),t(b,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(b,[2,21]),{5:[1,97]},{5:[1,98]},t(b,[2,24]),t(b,[2,25]),t(b,[2,26]),t(b,[2,27]),t(b,[2,28]),t(b,[2,31]),t(b,[2,32]),t(tt,n,{7:99}),t(tt,n,{7:100}),t(tt,n,{7:101}),t(it,n,{40:102,7:103}),t(S,n,{42:104,7:105}),t(S,n,{7:105,42:106}),t(ee,n,{45:107,7:108}),t(tt,n,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:v},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:v},{22:120,58:119,70:v},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:U,52:G,53:q},{5:[1,131]},t(b,[2,19]),t(b,[2,20]),t(b,[2,22]),t(b,[2,23]),{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[1,133],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[1,134],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{16:[1,135]},{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,49:[1,136],50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{16:[1,137]},{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,48:[1,138],50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{16:[1,139]},{16:[1,140]},{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,47:[1,141],50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{4:a,5:o,8:8,9:10,12:12,13:h,14:p,16:[1,142],17:15,18:s,21:g,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:E,33:_,35:N,36:V,37:M,38:F,39:C,41:H,43:K,44:Q,46:rt,50:U,52:G,53:q,54:R,59:j,60:J,61:$,62:st,70:v},{15:[1,143]},t(b,[2,49]),{15:[1,144]},t(b,[2,51]),t(b,[2,52]),{22:145,70:v},{22:146,70:v},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(b,[2,16]),t(P,[2,10]),{12:151,50:U,52:G,53:q},t(P,[2,12]),t(P,[2,13]),t(b,[2,18]),t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),{15:[1,152]},t(b,[2,38]),{15:[1,153]},t(b,[2,39]),t(b,[2,40]),{15:[1,154]},t(b,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:v},t(P,[2,11]),t(it,n,{7:103,40:160}),t(S,n,{7:105,42:161}),t(ee,n,{7:108,45:162}),t(b,[2,48]),t(b,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(k,L){if(L.recoverable)this.trace(k);else{var A=new Error(k);throw A.hash=L,A}},"parseError"),parse:d(function(k){var L=this,A=[0],y=[],D=[null],l=[],kt=this.table,u="",St=0,re=0,se=0,Fe=2,ne=1,We=l.slice.call(arguments,1),W=Object.create(this.lexer),ft={yy:{}};for(var Bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Bt)&&(ft.yy[Bt]=this.yy[Bt]);W.setInput(k,ft.yy),ft.yy.lexer=W,ft.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Vt=W.yylloc;l.push(Vt);var qe=W.options&&W.options.ranges;typeof ft.yy.parseError=="function"?this.parseError=ft.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xr(et){A.length=A.length-2*et,D.length=D.length-et,l.length=l.length-et}d(Xr,"popStack");function ze(){var et;return et=y.pop()||W.lex()||ne,typeof et!="number"&&(et instanceof Array&&(y=et,et=y.pop()),et=L.symbols_[et]||et),et}d(ze,"lex");for(var X,Yt,gt,nt,Jr,Ft,yt={},vt,ht,ae,Mt;;){if(gt=A[A.length-1],this.defaultActions[gt]?nt=this.defaultActions[gt]:((X===null||typeof X>"u")&&(X=ze()),nt=kt[gt]&&kt[gt][X]),typeof nt>"u"||!nt.length||!nt[0]){var Wt="";Mt=[];for(vt in kt[gt])this.terminals_[vt]&&vt>Fe&&Mt.push("'"+this.terminals_[vt]+"'");W.showPosition?Wt="Parse error on line "+(St+1)+`:
`+W.showPosition()+`
Expecting `+Mt.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Wt="Parse error on line "+(St+1)+": Unexpected "+(X==ne?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Wt,{text:W.match,token:this.terminals_[X]||X,line:W.yylineno,loc:Vt,expected:Mt})}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+X);switch(nt[0]){case 1:A.push(X),D.push(W.yytext),l.push(W.yylloc),A.push(nt[1]),X=null,Yt?(X=Yt,Yt=null):(re=W.yyleng,u=W.yytext,St=W.yylineno,Vt=W.yylloc,se>0&&se--);break;case 2:if(ht=this.productions_[nt[1]][1],yt.$=D[D.length-ht],yt._$={first_line:l[l.length-(ht||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ht||1)].first_column,last_column:l[l.length-1].last_column},qe&&(yt._$.range=[l[l.length-(ht||1)].range[0],l[l.length-1].range[1]]),Ft=this.performAction.apply(yt,[u,re,St,ft.yy,nt[1],D,l].concat(We)),typeof Ft<"u")return Ft;ht&&(A=A.slice(0,-1*ht*2),D=D.slice(0,-1*ht),l=l.slice(0,-1*ht)),A.push(this.productions_[nt[1]][0]),D.push(yt.$),l.push(yt._$),ae=kt[A[A.length-2]][A[A.length-1]],A.push(ae);break;case 3:return!0}}return!0},"parse")},Ye=function(){var pt={EOF:1,parseError:d(function(L,A){if(this.yy.parser)this.yy.parser.parseError(L,A);else throw new Error(L)},"parseError"),setInput:d(function(k,L){return this.yy=L||this.yy||{},this._input=k,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:d(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var L=k.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:d(function(k){var L=k.length,A=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;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),A.length-1&&(this.yylineno-=A.length-1);var D=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:A?(A.length===y.length?this.yylloc.first_column:0)+y[y.length-A.length].length-A[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(k){this.unput(this.match.slice(k))},"less"),pastInput:d(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var k=this.pastInput(),L=new Array(k.length+1).join("-");return k+this.upcomingInput()+`
`+L+"^"},"showPosition"),test_match:d(function(k,L){var A,y,D;if(this.options.backtrack_lexer&&(D={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&&(D.yylloc.range=this.yylloc.range.slice(0))),y=k[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+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,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(k[0].length),this.matched+=k[0],A=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var l in D)this[l]=D[l];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,L,A,y;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),l=0;lL[0].length)){if(L=A,y=l,this.options.backtrack_lexer){if(k=this.test_match(A,D[l]),k!==!1)return k;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(k=this.test_match(L,D[y]),k!==!1?k:!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:d(function(){var L=this.next();return L||this.lex()},"lex"),begin:d(function(L){this.conditionStack.push(L)},"begin"),popState:d(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:d(function(L){this.begin(L)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(L,A,y,D){var l=D;switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return A.yytext=A.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/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,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return pt}();Ct.lexer=Ye;function Ot(){this.yy={}}return d(Ot,"Parser"),Ot.prototype=Ct,Ct.Parser=Ot,new Ot}();Kt.parser=Kt;var ye=Kt;var w=new Te(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),Ue=d(function(t){w.records.boxes.push({name:t.text,wrap:t.wrap??mt(),fill:t.color,actorKeys:[]}),w.records.currentBox=w.records.boxes.slice(-1)[0]},"addBox"),Ut=d(function(t,e,c,r){let n=w.records.currentBox,a=w.records.actors.get(t);if(a){if(w.records.currentBox&&a.box&&w.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${w.records.currentBox.name}' at the same time.`);if(n=a.box?a.box:w.records.currentBox,a.box=n,a&&e===a.name&&c==null)return}if(c?.text==null&&(c={text:e,type:r}),(r==null||c.text==null)&&(c={text:e,type:r}),w.records.actors.set(t,{box:n,name:e,description:c.text,wrap:c.wrap??mt(),prevActor:w.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),w.records.prevActor){let o=w.records.actors.get(w.records.prevActor);o&&(o.nextActor=t)}w.records.currentBox&&w.records.currentBox.actorKeys.push(t),w.records.prevActor=t},"addActor"),Ge=d(t=>{let e,c=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return w.records.messages.push({from:t,to:e,message:c?.text??"",wrap:c?.wrap??mt(),type:r,activate:n}),!0},"addSignal"),Je=d(function(){return w.records.boxes.length>0},"hasAtLeastOneBox"),Ze=d(function(){return w.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),Qe=d(function(){return w.records.messages},"getMessages"),je=d(function(){return w.records.boxes},"getBoxes"),$e=d(function(){return w.records.actors},"getActors"),tr=d(function(){return w.records.createdActors},"getCreatedActors"),er=d(function(){return w.records.destroyedActors},"getDestroyedActors"),At=d(function(t){return w.records.actors.get(t)},"getActor"),rr=d(function(){return[...w.records.actors.keys()]},"getActorKeys"),sr=d(function(){w.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),nr=d(function(){w.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),ar=d(()=>w.records.sequenceNumbersEnabled,"showSequenceNumbers"),ir=d(function(t){w.records.wrapEnabled=t},"setWrap"),Ee=d(t=>{if(t===void 0)return{};t=t.trim();let e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),mt=d(()=>w.records.wrapEnabled!==void 0?w.records.wrapEnabled:Z().sequence?.wrap??!1,"autoWrap"),or=d(function(){w.reset(),ce()},"clear"),cr=d(function(t){let e=t.trim(),{wrap:c,cleanedText:r}=Ee(e),n={text:r,wrap:c};return z.debug(`parseMessage: ${JSON.stringify(n)}`),n},"parseMessage"),lr=d(function(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),c=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",c)||(c="transparent",r=t.trim());else{let o=new Option().style;o.color=c,o.color!==c&&(c="transparent",r=t.trim())}let{wrap:n,cleanedText:a}=Ee(r);return{text:a?It(a,Z()):void 0,color:c,wrap:n}},"parseBoxData"),Pt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},dr={FILLED:0,OPEN:1},hr={LEFTOF:0,RIGHTOF:1,OVER:2},we=d(function(t,e,c){let r={actor:t,placement:e,message:c.text,wrap:c.wrap??mt()},n=[].concat(t,t);w.records.notes.push(r),w.records.messages.push({from:n[0],to:n[1],message:c.text,wrap:c.wrap??mt(),type:Pt.NOTE,placement:e})},"addNote"),ke=d(function(t,e){let c=At(t);try{let r=It(e.text,Z());r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");let n=JSON.parse(r);Gt(c,n)}catch(r){z.error("error while parsing actor link text",r)}},"addLinks"),pr=d(function(t,e){let c=At(t);try{let r={},n=It(e.text,Z()),a=n.indexOf("@");n=n.replace(/&/g,"&"),n=n.replace(/=/g,"=");let o=n.slice(0,a-1).trim(),h=n.slice(a+1).trim();r[o]=h,Gt(c,r)}catch(r){z.error("error while parsing actor link text",r)}},"addALink");function Gt(t,e){if(t.links==null)t.links=e;else for(let c in e)t.links[c]=e[c]}d(Gt,"insertLinks");var Ie=d(function(t,e){let c=At(t);try{let r=It(e.text,Z()),n=JSON.parse(r);_e(c,n)}catch(r){z.error("error while parsing actor properties text",r)}},"addProperties");function _e(t,e){if(t.properties==null)t.properties=e;else for(let c in e)t.properties[c]=e[c]}d(_e,"insertProperties");function ur(){w.records.currentBox=void 0}d(ur,"boxEnd");var Le=d(function(t,e){let c=At(t),r=document.getElementById(e.text);try{let n=r.innerHTML,a=JSON.parse(n);a.properties&&_e(c,a.properties),a.links&&Gt(c,a.links)}catch(n){z.error("error while parsing actor details text",n)}},"addDetails"),fr=d(function(t,e){if(t?.properties!==void 0)return t.properties[e]},"getActorProperty"),Pe=d(function(t){if(Array.isArray(t))t.forEach(function(e){Pe(e)});else switch(t.type){case"sequenceIndex":w.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":Ut(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(w.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");w.records.lastCreated=t.actor,Ut(t.actor,t.actor,t.description,t.draw),w.records.createdActors.set(t.actor,w.records.messages.length);break;case"destroyParticipant":w.records.lastDestroyed=t.actor,w.records.destroyedActors.set(t.actor,w.records.messages.length);break;case"activeStart":B(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":B(t.actor,void 0,void 0,t.signalType);break;case"addNote":we(t.actor,t.placement,t.text);break;case"addLinks":ke(t.actor,t.text);break;case"addALink":pr(t.actor,t.text);break;case"addProperties":Ie(t.actor,t.text);break;case"addDetails":Le(t.actor,t.text);break;case"addMessage":if(w.records.lastCreated){if(t.to!==w.records.lastCreated)throw new Error("The created participant "+w.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");w.records.lastCreated=void 0}else if(w.records.lastDestroyed){if(t.to!==w.records.lastDestroyed&&t.from!==w.records.lastDestroyed)throw new Error("The destroyed participant "+w.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");w.records.lastDestroyed=void 0}B(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":Ue(t.boxData);break;case"boxEnd":ur();break;case"loopStart":B(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":B(void 0,void 0,void 0,t.signalType);break;case"rectStart":B(void 0,void 0,t.color,t.signalType);break;case"rectEnd":B(void 0,void 0,void 0,t.signalType);break;case"optStart":B(void 0,void 0,t.optText,t.signalType);break;case"optEnd":B(void 0,void 0,void 0,t.signalType);break;case"altStart":B(void 0,void 0,t.altText,t.signalType);break;case"else":B(void 0,void 0,t.altText,t.signalType);break;case"altEnd":B(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":zt(t.text);break;case"parStart":B(void 0,void 0,t.parText,t.signalType);break;case"and":B(void 0,void 0,t.parText,t.signalType);break;case"parEnd":B(void 0,void 0,void 0,t.signalType);break;case"criticalStart":B(void 0,void 0,t.criticalText,t.signalType);break;case"option":B(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":B(void 0,void 0,void 0,t.signalType);break;case"breakStart":B(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":B(void 0,void 0,void 0,t.signalType);break}},"apply"),Xt={addActor:Ut,addMessage:Xe,addSignal:B,addLinks:ke,addDetails:Le,addProperties:Ie,autoWrap:mt,setWrap:ir,enableSequenceNumbers:sr,disableSequenceNumbers:nr,showSequenceNumbers:ar,getMessages:Qe,getActors:$e,getCreatedActors:tr,getDestroyedActors:er,getActor:At,getActorKeys:rr,getActorProperty:fr,getAccTitle:le,getBoxes:je,getDiagramTitle:ue,setDiagramTitle:pe,getConfig:d(()=>Z().sequence,"getConfig"),clear:or,parseMessage:cr,parseBoxData:lr,LINETYPE:Pt,ARROWTYPE:dr,PLACEMENT:hr,addNote:we,setAccTitle:zt,apply:Pe,setAccDescription:de,getAccDescription:he,hasAtLeastOneBox:Je,hasAtLeastOneBoxWithTitle:Ze};var gr=d(t=>`.actor {
    stroke: ${t.actorBorder};
    fill: ${t.actorBkg};
  }

  text.actor > tspan {
    fill: ${t.actorTextColor};
    stroke: none;
  }

  .actor-line {
    stroke: ${t.actorLineColor};
  }

  .messageLine0 {
    stroke-width: 1.5;
    stroke-dasharray: none;
    stroke: ${t.signalColor};
  }

  .messageLine1 {
    stroke-width: 1.5;
    stroke-dasharray: 2, 2;
    stroke: ${t.signalColor};
  }

  #arrowhead path {
    fill: ${t.signalColor};
    stroke: ${t.signalColor};
  }

  .sequenceNumber {
    fill: ${t.sequenceNumberColor};
  }

  #sequencenumber {
    fill: ${t.signalColor};
  }

  #crosshead path {
    fill: ${t.signalColor};
    stroke: ${t.signalColor};
  }

  .messageText {
    fill: ${t.signalTextColor};
    stroke: none;
  }

  .labelBox {
    stroke: ${t.labelBoxBorderColor};
    fill: ${t.labelBoxBkgColor};
  }

  .labelText, .labelText > tspan {
    fill: ${t.labelTextColor};
    stroke: none;
  }

  .loopText, .loopText > tspan {
    fill: ${t.loopTextColor};
    stroke: none;
  }

  .loopLine {
    stroke-width: 2px;
    stroke-dasharray: 2, 2;
    stroke: ${t.labelBoxBorderColor};
    fill: ${t.labelBoxBorderColor};
  }

  .note {
    //stroke: #decc93;
    stroke: ${t.noteBorderColor};
    fill: ${t.noteBkgColor};
  }

  .noteText, .noteText > tspan {
    fill: ${t.noteTextColor};
    stroke: none;
  }

  .activation0 {
    fill: ${t.activationBkgColor};
    stroke: ${t.activationBorderColor};
  }

  .activation1 {
    fill: ${t.activationBkgColor};
    stroke: ${t.activationBorderColor};
  }

  .activation2 {
    fill: ${t.activationBkgColor};
    stroke: ${t.activationBorderColor};
  }

  .actorPopupMenu {
    position: absolute;
  }

  .actorPopupMenuPanel {
    position: absolute;
    fill: ${t.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 line {
    stroke: ${t.actorBorder};
    fill: ${t.actorBkg};
  }
  .actor-man circle, line {
    stroke: ${t.actorBorder};
    fill: ${t.actorBkg};
    stroke-width: 2px;
  }
`,"getStyles"),Ae=gr;var Jt=He(Ke(),1);var ut=18*2,Se="actor-top",ve="actor-bottom",mr="actor-box",Ne="actor-man",Zt=d(function(t,e){return fe(t,e)},"drawRect"),br=d(function(t,e,c,r,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,o=e.actorCnt,h=e.rectData;var p="none";n&&(p="block !important");let s=t.append("g");s.attr("id","actor"+o+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",p);var g="";h.class!==void 0&&(g=" "+h.class);let T=h.width>c?h.width:c,f=s.append("rect");if(f.attr("class","actorPopupMenuPanel"+g),f.attr("x",h.x),f.attr("y",h.height),f.attr("fill",h.fill),f.attr("stroke",h.stroke),f.attr("width",T),f.attr("height",h.height),f.attr("rx",h.rx),f.attr("ry",h.ry),a!=null){var m=20;for(let N in a){var E=s.append("a"),_=(0,Jt.sanitizeUrl)(a[N]);E.attr("xlink:href",_),E.attr("target","_blank"),Cr(r)(N,E,h.x+10,h.height+m,T,20,{class:"actor"},r),m+=30}}return f.attr("height",m),{height:h.height+m,width:T}},"drawPopup"),Tr=d(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Nt=d(async function(t,e,c=null){let r=t.append("foreignObject"),n=await qt(e.text,Dt()),o=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(r.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),e.class==="noteText"){let h=t.node().firstChild;h.setAttribute("height",o.height+2*e.textMargin);let p=h.getBBox();r.attr("x",Math.round(p.x+p.width/2-o.width/2)).attr("y",Math.round(p.y+p.height/2-o.height/2))}else if(c){let{startx:h,stopx:p,starty:s}=c;if(h>p){let g=h;h=p,p=g}r.attr("x",Math.round(h+Math.abs(h-p)/2-o.width/2)),e.class==="loopText"?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-o.height))}return[r]},"drawKatex"),bt=d(function(t,e){let c=0,r=0,n=e.text.split(I.lineBreakRegex),[a,o]=Ht(e.fontSize),h=[],p=0,s=d(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=d(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":s=d(()=>Math.round(e.y+(c+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":s=d(()=>Math.round(e.y+(c+r+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[g,T]of n.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(p=g*a);let f=t.append("text");f.attr("x",e.x),f.attr("y",s()),e.anchor!==void 0&&f.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&f.style("font-family",e.fontFamily),o!==void 0&&f.style("font-size",o),e.fontWeight!==void 0&&f.style("font-weight",e.fontWeight),e.fill!==void 0&&f.attr("fill",e.fill),e.class!==void 0&&f.attr("class",e.class),e.dy!==void 0?f.attr("dy",e.dy):p!==0&&f.attr("dy",p);let m=T||be;if(e.tspan){let E=f.append("tspan");E.attr("x",e.x),e.fill!==void 0&&E.attr("fill",e.fill),E.text(m)}else f.text(m);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(f._groups||f)[0][0].getBBox().height,c=r),h.push(f)}return h},"drawText"),Me=d(function(t,e){function c(n,a,o,h,p){return n+","+a+" "+(n+o)+","+a+" "+(n+o)+","+(a+h-p)+" "+(n+o-p*1.2)+","+(a+h)+" "+n+","+(a+h)}d(c,"genPoints");let r=t.append("polygon");return r.attr("points",c(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,bt(t,e),r},"drawLabel"),ct=-1,Qt=d((t,e,c,r)=>{t.select&&c.forEach(n=>{let a=e.get(n),o=t.select("#actor"+a.actorCnt);!r.mirrorActors&&a.stopy?o.attr("y2",a.stopy+a.height/2):r.mirrorActors&&o.attr("y2",a.stopy)})},"fixLifeLineHeights"),yr=d(function(t,e,c,r){let n=r?e.stopy:e.starty,a=e.x+e.width/2,o=n+e.height,h=t.append("g").lower();var p=h;r||(ct++,Object.keys(e.links||{}).length&&!c.forceMenus&&p.attr("onclick",Tr(`actor${ct}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+ct).attr("x1",a).attr("y1",o).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),p=h.append("g"),e.actorCnt=ct,e.links!=null&&p.attr("id","root-"+ct));let s=Et();var g="actor";e.properties?.class?g=e.properties.class:s.fill="#eaeaea",r?g+=` ${ve}`:g+=` ${Se}`,s.x=e.x,s.y=n,s.width=e.width,s.height=e.height,s.class=g,s.rx=3,s.ry=3,s.name=e.name;let T=Zt(p,s);if(e.rectData=s,e.properties?.icon){let m=e.properties.icon.trim();m.charAt(0)==="@"?me(p,s.x+s.width-20,s.y+10,m.substr(1)):xe(p,s.x+s.width-20,s.y+10,m)}jt(c,at(e.description))(e.description,p,s.x,s.y,s.width,s.height,{class:`actor ${mr}`},c);let f=e.height;if(T.node){let m=T.node().getBBox();e.height=m.height,f=m.height}return f},"drawActorTypeParticipant"),Er=d(function(t,e,c,r){let n=r?e.stopy:e.starty,a=e.x+e.width/2,o=n+80,h=t.append("g").lower();r||(ct++,h.append("line").attr("id","actor"+ct).attr("x1",a).attr("y1",o).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=ct);let p=t.append("g"),s=Ne;r?s+=` ${ve}`:s+=` ${Se}`,p.attr("class",s),p.attr("name",e.name);let g=Et();g.x=e.x,g.y=n,g.fill="#eaeaea",g.width=e.width,g.height=e.height,g.class="actor",g.rx=3,g.ry=3,p.append("line").attr("id","actor-man-torso"+ct).attr("x1",a).attr("y1",n+25).attr("x2",a).attr("y2",n+45),p.append("line").attr("id","actor-man-arms"+ct).attr("x1",a-ut/2).attr("y1",n+33).attr("x2",a+ut/2).attr("y2",n+33),p.append("line").attr("x1",a-ut/2).attr("y1",n+60).attr("x2",a).attr("y2",n+45),p.append("line").attr("x1",a).attr("y1",n+45).attr("x2",a+ut/2-2).attr("y2",n+60);let T=p.append("circle");T.attr("cx",e.x+e.width/2),T.attr("cy",n+10),T.attr("r",15),T.attr("width",e.width),T.attr("height",e.height);let f=p.node().getBBox();return e.height=f.height,jt(c,at(e.description))(e.description,p,g.x,g.y+35,g.width,g.height,{class:`actor ${Ne}`},c),e.height},"drawActorTypeActor"),wr=d(async function(t,e,c,r){switch(e.type){case"actor":return await Er(t,e,c,r);case"participant":return await yr(t,e,c,r)}},"drawActor"),kr=d(function(t,e,c){let n=t.append("g");De(n,e),e.name&&jt(c)(e.name,n,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},c),n.lower()},"drawBox"),Ir=d(function(t){return t.append("g")},"anchorElement"),_r=d(function(t,e,c,r,n){let a=Et(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+n%3,a.width=e.stopx-e.startx,a.height=c-e.starty,Zt(o,a)},"drawActivation"),Lr=d(async function(t,e,c,r){let{boxMargin:n,boxTextMargin:a,labelBoxHeight:o,labelBoxWidth:h,messageFontFamily:p,messageFontSize:s,messageFontWeight:g}=r,T=t.append("g"),f=d(function(_,N,V,M){return T.append("line").attr("x1",_).attr("y1",N).attr("x2",V).attr("y2",M).attr("class","loopLine")},"drawLoopLine");f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(_){f(e.startx,_.y,e.stopx,_.y).style("stroke-dasharray","3, 3")});let m=Lt();m.text=c,m.x=e.startx,m.y=e.starty,m.fontFamily=p,m.fontSize=s,m.fontWeight=g,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=h||50,m.height=o||20,m.textMargin=a,m.class="labelText",Me(T,m),m=Re(),m.text=e.title,m.x=e.startx+h/2+(e.stopx-e.startx)/2,m.y=e.starty+n+a,m.anchor="middle",m.valign="middle",m.textMargin=a,m.class="loopText",m.fontFamily=p,m.fontSize=s,m.fontWeight=g,m.wrap=!0;let E=at(m.text)?await Nt(T,m,e):bt(T,m);if(e.sectionTitles!==void 0){for(let[_,N]of Object.entries(e.sectionTitles))if(N.message){m.text=N.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[_].y+n+a,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=p,m.fontSize=s,m.fontWeight=g,m.wrap=e.wrap,at(m.text)?(e.starty=e.sections[_].y,await Nt(T,m,e)):bt(T,m);let V=Math.round(E.map(M=>(M._groups||M)[0][0].getBBox().height).reduce((M,F)=>M+F));e.sections[_].height+=V-(n+a)}}return e.height=Math.round(e.stopy-e.starty),T},"drawLoop"),De=d(function(t,e){ge(t,e)},"drawBackgroundRect"),Pr=d(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Ar=d(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Nr=d(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Sr=d(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),vr=d(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Mr=d(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Dr=d(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Re=d(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Rr=d(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),jt=function(){function t(a,o,h,p,s,g,T){let f=o.append("text").attr("x",h+s/2).attr("y",p+g/2+5).style("text-anchor","middle").text(a);n(f,T)}d(t,"byText");function e(a,o,h,p,s,g,T,f){let{actorFontSize:m,actorFontFamily:E,actorFontWeight:_}=f,[N,V]=Ht(m),M=a.split(I.lineBreakRegex);for(let F=0;Ft.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:d(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:d(function(t){this.boxes.push(t)},"addBox"),addActor:d(function(t){this.actors.push(t)},"addActor"),addLoop:d(function(t){this.loops.push(t)},"addLoop"),addMessage:d(function(t){this.messages.push(t)},"addMessage"),addNote:d(function(t){this.notes.push(t)},"addNote"),lastActor:d(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:d(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:d(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:d(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:d(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Be(Z())},"init"),updateVal:d(function(t,e,c,r){t[e]===void 0?t[e]=c:t[e]=r(c,t[e])},"updateVal"),updateBounds:d(function(t,e,c,r){let n=this,a=0;function o(h){return d(function(s){a++;let g=n.sequenceItems.length-a+1;n.updateVal(s,"starty",e-g*i.boxMargin,Math.min),n.updateVal(s,"stopy",r+g*i.boxMargin,Math.max),n.updateVal(x.data,"startx",t-g*i.boxMargin,Math.min),n.updateVal(x.data,"stopx",c+g*i.boxMargin,Math.max),h!=="activation"&&(n.updateVal(s,"startx",t-g*i.boxMargin,Math.min),n.updateVal(s,"stopx",c+g*i.boxMargin,Math.max),n.updateVal(x.data,"starty",e-g*i.boxMargin,Math.min),n.updateVal(x.data,"stopy",r+g*i.boxMargin,Math.max))},"updateItemBounds")}d(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:d(function(t,e,c,r){let n=I.getMin(t,c),a=I.getMax(t,c),o=I.getMin(e,r),h=I.getMax(e,r);this.updateVal(x.data,"startx",n,Math.min),this.updateVal(x.data,"starty",o,Math.min),this.updateVal(x.data,"stopx",a,Math.max),this.updateVal(x.data,"stopy",h,Math.max),this.updateBounds(n,o,a,h)},"insert"),newActivation:d(function(t,e,c){let r=c.get(t.from),n=Rt(t.from).length||0,a=r.x+r.width/2+(n-1)*i.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+i.activationWidth,stopy:void 0,actor:t.from,anchored:O.anchorElement(e)})},"newActivation"),endActivation:d(function(t){let e=this.activations.map(function(c){return c.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:d(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:d(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:d(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:x.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:d(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:d(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:d(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=I.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:d(function(){return this.verticalPos},"getVerticalPos"),getBounds:d(function(){return{bounds:this.data,models:this.models}},"getBounds")},Or=d(async function(t,e){x.bumpVerticalPos(i.boxMargin),e.height=i.boxMargin,e.starty=x.getVerticalPos();let c=Et();c.x=e.startx,c.y=e.starty,c.width=e.width||i.width,c.class="note";let r=t.append("g"),n=O.drawRect(r,c),a=Lt();a.x=e.startx,a.y=e.starty,a.width=c.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=i.noteFontFamily,a.fontSize=i.noteFontSize,a.fontWeight=i.noteFontWeight,a.anchor=i.noteAlign,a.textMargin=i.noteMargin,a.valign="center";let o=at(a.text)?await Nt(r,a):bt(r,a),h=Math.round(o.map(p=>(p._groups||p)[0][0].getBBox().height).reduce((p,s)=>p+s));n.attr("height",h+2*i.noteMargin),e.height+=h+2*i.noteMargin,x.bumpVerticalPos(h+2*i.noteMargin),e.stopy=e.starty+h+2*i.noteMargin,e.stopx=e.startx+c.width,x.insert(e.startx,e.starty,e.stopx,e.stopy),x.models.addNote(e)},"drawNote"),Tt=d(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),wt=d(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),$t=d(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function Br(t,e){x.bumpVerticalPos(10);let{startx:c,stopx:r,message:n}=e,a=I.splitBreaks(n).length,o=at(n),h=o?await xt(n,Z()):Y.calculateTextDimensions(n,Tt(i));if(!o){let T=h.height/a;e.height+=T,x.bumpVerticalPos(T)}let p,s=h.height-10,g=h.width;if(c===r){p=x.getVerticalPos()+s,i.rightAngles||(s+=i.boxMargin,p=x.getVerticalPos()+s),s+=30;let T=I.getMax(g/2,i.width/2);x.insert(c-T,x.getVerticalPos()-10+s,r+T,x.getVerticalPos()+30+s)}else s+=i.boxMargin,p=x.getVerticalPos()+s,x.insert(c,p-10,r,p);return x.bumpVerticalPos(s),e.height+=s,e.stopy=e.starty+e.height,x.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),p}d(Br,"boundMessage");var Vr=d(async function(t,e,c,r){let{startx:n,stopx:a,starty:o,message:h,type:p,sequenceIndex:s,sequenceVisible:g}=e,T=Y.calculateTextDimensions(h,Tt(i)),f=Lt();f.x=n,f.y=o+10,f.width=a-n,f.class="messageText",f.dy="1em",f.text=h,f.fontFamily=i.messageFontFamily,f.fontSize=i.messageFontSize,f.fontWeight=i.messageFontWeight,f.anchor=i.messageAlign,f.valign="center",f.textMargin=i.wrapPadding,f.tspan=!1,at(f.text)?await Nt(t,f,{startx:n,stopx:a,starty:c}):bt(t,f);let m=T.width,E;n===a?i.rightAngles?E=t.append("path").attr("d",`M  ${n},${c} H ${n+I.getMax(i.width/2,m/2)} V ${c+25} H ${n}`):E=t.append("path").attr("d","M "+n+","+c+" C "+(n+60)+","+(c-10)+" "+(n+60)+","+(c+30)+" "+n+","+(c+20)):(E=t.append("line"),E.attr("x1",n),E.attr("y1",c),E.attr("x2",a),E.attr("y2",c)),p===r.db.LINETYPE.DOTTED||p===r.db.LINETYPE.DOTTED_CROSS||p===r.db.LINETYPE.DOTTED_POINT||p===r.db.LINETYPE.DOTTED_OPEN||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(E.style("stroke-dasharray","3, 3"),E.attr("class","messageLine1")):E.attr("class","messageLine0");let _="";i.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),E.attr("stroke-width",2),E.attr("stroke","none"),E.style("fill","none"),(p===r.db.LINETYPE.SOLID||p===r.db.LINETYPE.DOTTED)&&E.attr("marker-end","url("+_+"#arrowhead)"),(p===r.db.LINETYPE.BIDIRECTIONAL_SOLID||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(E.attr("marker-start","url("+_+"#arrowhead)"),E.attr("marker-end","url("+_+"#arrowhead)")),(p===r.db.LINETYPE.SOLID_POINT||p===r.db.LINETYPE.DOTTED_POINT)&&E.attr("marker-end","url("+_+"#filled-head)"),(p===r.db.LINETYPE.SOLID_CROSS||p===r.db.LINETYPE.DOTTED_CROSS)&&E.attr("marker-end","url("+_+"#crosshead)"),(g||i.showSequenceNumbers)&&(E.attr("marker-start","url("+_+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",c+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),Yr=d(function(t,e,c,r,n,a,o){let h=0,p=0,s,g=0;for(let T of r){let f=e.get(T),m=f.box;s&&s!=m&&(o||x.models.addBox(s),p+=i.boxMargin+s.margin),m&&m!=s&&(o||(m.x=h+p,m.y=n),p+=m.margin),f.width=f.width||i.width,f.height=I.getMax(f.height||i.height,i.height),f.margin=f.margin||i.actorMargin,g=I.getMax(g,f.height),c.get(f.name)&&(p+=f.width/2),f.x=h+p,f.starty=x.getVerticalPos(),x.insert(f.x,n,f.x+f.width,f.height),h+=f.width+p,f.box&&(f.box.width=h+m.margin-f.box.x),p=f.margin,s=f.box,x.models.addActor(f)}s&&!o&&x.models.addBox(s),x.bumpVerticalPos(g)},"addActorRenderingData"),te=d(async function(t,e,c,r){if(r){let n=0;x.bumpVerticalPos(i.boxMargin*2);for(let a of c){let o=e.get(a);o.stopy||(o.stopy=x.getVerticalPos());let h=await O.drawActor(t,o,i,!0);n=I.getMax(n,h)}x.bumpVerticalPos(n+i.boxMargin)}else for(let n of c){let a=e.get(n);await O.drawActor(t,a,i,!1)}},"drawActors"),Oe=d(function(t,e,c,r){let n=0,a=0;for(let o of c){let h=e.get(o),p=zr(h),s=O.drawPopup(t,h,p,i,i.forceMenus,r);s.height>n&&(n=s.height),s.width+h.x>a&&(a=s.width+h.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),Be=d(function(t){ie(i,t),t.fontFamily&&(i.actorFontFamily=i.noteFontFamily=i.messageFontFamily=t.fontFamily),t.fontSize&&(i.actorFontSize=i.noteFontSize=i.messageFontSize=t.fontSize),t.fontWeight&&(i.actorFontWeight=i.noteFontWeight=i.messageFontWeight=t.fontWeight)},"setConf"),Rt=d(function(t){return x.activations.filter(function(e){return e.actor===t})},"actorActivations"),Ce=d(function(t,e){let c=e.get(t),r=Rt(t),n=r.reduce(function(o,h){return I.getMin(o,h.startx)},c.x+c.width/2-1),a=r.reduce(function(o,h){return I.getMax(o,h.stopx)},c.x+c.width/2+1);return[n,a]},"activationBounds");function lt(t,e,c,r,n){x.bumpVerticalPos(c);let a=r;if(e.id&&e.message&&t[e.id]){let o=t[e.id].width,h=Tt(i);e.message=Y.wrapLabel(`[${e.message}]`,o-2*i.wrapPadding,h),e.width=o,e.wrap=!0;let p=Y.calculateTextDimensions(e.message,h),s=I.getMax(p.height,i.labelBoxHeight);a=r+s,z.debug(`${s} - ${e.message}`)}n(e),x.bumpVerticalPos(a)}d(lt,"adjustLoopHeightForWrap");function Fr(t,e,c,r,n,a,o){function h(s,g){s.x{b.add(P.from),b.add(P.to)}),E=E.filter(P=>b.has(P))}Yr(s,g,T,E,0,_,!1);let C=await Gr(_,g,F,r);O.insertArrowHead(s),O.insertArrowCrossHead(s),O.insertArrowFilledHead(s),O.insertSequenceNumber(s);function H(b,P){let tt=x.endActivation(b);tt.starty+18>P&&(tt.starty=P-6,P+=12),O.drawActivation(s,tt,P,i,Rt(b.from).length),x.insert(tt.startx,P-10,tt.stopx,P)}d(H,"activeEnd");let K=1,Q=1,rt=[],U=[],G=0;for(let b of _){let P,tt,it;switch(b.type){case r.db.LINETYPE.NOTE:x.resetVerticalPos(),tt=b.noteModel,await Or(s,tt);break;case r.db.LINETYPE.ACTIVE_START:x.newActivation(b,s,g);break;case r.db.LINETYPE.ACTIVE_END:H(b,x.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:lt(C,b,i.boxMargin,i.boxMargin+i.boxTextMargin,S=>x.newLoop(S));break;case r.db.LINETYPE.LOOP_END:P=x.endLoop(),await O.drawLoop(s,P,"loop",i),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.RECT_START:lt(C,b,i.boxMargin,i.boxMargin,S=>x.newLoop(void 0,S.message));break;case r.db.LINETYPE.RECT_END:P=x.endLoop(),U.push(P),x.models.addLoop(P),x.bumpVerticalPos(P.stopy-x.getVerticalPos());break;case r.db.LINETYPE.OPT_START:lt(C,b,i.boxMargin,i.boxMargin+i.boxTextMargin,S=>x.newLoop(S));break;case r.db.LINETYPE.OPT_END:P=x.endLoop(),await O.drawLoop(s,P,"opt",i),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.ALT_START:lt(C,b,i.boxMargin,i.boxMargin+i.boxTextMargin,S=>x.newLoop(S));break;case r.db.LINETYPE.ALT_ELSE:lt(C,b,i.boxMargin+i.boxTextMargin,i.boxMargin,S=>x.addSectionToLoop(S));break;case r.db.LINETYPE.ALT_END:P=x.endLoop(),await O.drawLoop(s,P,"alt",i),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:lt(C,b,i.boxMargin,i.boxMargin+i.boxTextMargin,S=>x.newLoop(S)),x.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:lt(C,b,i.boxMargin+i.boxTextMargin,i.boxMargin,S=>x.addSectionToLoop(S));break;case r.db.LINETYPE.PAR_END:P=x.endLoop(),await O.drawLoop(s,P,"par",i),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.AUTONUMBER:K=b.message.start||K,Q=b.message.step||Q,b.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:lt(C,b,i.boxMargin,i.boxMargin+i.boxTextMargin,S=>x.newLoop(S));break;case r.db.LINETYPE.CRITICAL_OPTION:lt(C,b,i.boxMargin+i.boxTextMargin,i.boxMargin,S=>x.addSectionToLoop(S));break;case r.db.LINETYPE.CRITICAL_END:P=x.endLoop(),await O.drawLoop(s,P,"critical",i),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.BREAK_START:lt(C,b,i.boxMargin,i.boxMargin+i.boxTextMargin,S=>x.newLoop(S));break;case r.db.LINETYPE.BREAK_END:P=x.endLoop(),await O.drawLoop(s,P,"break",i),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;default:try{it=b.msgModel,it.starty=x.getVerticalPos(),it.sequenceIndex=K,it.sequenceVisible=r.db.showSequenceNumbers();let S=await Br(s,it);Fr(b,it,S,G,g,T,f),rt.push({messageModel:it,lineStartY:S}),x.models.addMessage(it)}catch(S){z.error("error while drawing message",S)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(b.type)&&(K=K+Q),G++}z.debug("createdActors",T),z.debug("destroyedActors",f),await te(s,g,E,!1);for(let b of rt)await Vr(s,b.messageModel,b.lineStartY,r);i.mirrorActors&&await te(s,g,E,!0),U.forEach(b=>O.drawBackgroundRect(s,b)),Qt(s,g,E,i);for(let b of x.models.boxes)b.height=x.getVerticalPos()-b.y,x.insert(b.x,b.y,b.x+b.width,b.height),b.startx=b.x,b.starty=b.y,b.stopx=b.startx+b.width,b.stopy=b.starty+b.height,b.stroke="rgb(0,0,0, 0.5)",O.drawBox(s,b,i);V&&x.bumpVerticalPos(i.boxMargin);let q=Oe(s,g,E,p),{bounds:R}=x.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let j=R.stopy-R.starty;j{let o=Tt(i),h=a.actorKeys.reduce((g,T)=>g+=t.get(T).width+(t.get(T).margin||0),0);h-=2*i.boxTextMargin,a.wrap&&(a.name=Y.wrapLabel(a.name,h-2*i.wrapPadding,o));let p=Y.calculateTextDimensions(a.name,o);n=I.getMax(p.height,n);let s=I.getMax(h,p.width+2*i.wrapPadding);if(a.margin=i.boxTextMargin,ha.textMaxHeight=n),I.getMax(r,i.height)}d(Hr,"calculateActorMargins");var Kr=d(async function(t,e,c){let r=e.get(t.from),n=e.get(t.to),a=r.x,o=n.x,h=t.wrap&&t.message,p=at(t.message)?await xt(t.message,Z()):Y.calculateTextDimensions(h?Y.wrapLabel(t.message,i.width,wt(i)):t.message,wt(i)),s={width:h?i.width:I.getMax(i.width,p.width+2*i.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===c.db.PLACEMENT.RIGHTOF?(s.width=h?I.getMax(i.width,p.width):I.getMax(r.width/2+n.width/2,p.width+2*i.noteMargin),s.startx=a+(r.width+i.actorMargin)/2):t.placement===c.db.PLACEMENT.LEFTOF?(s.width=h?I.getMax(i.width,p.width+2*i.noteMargin):I.getMax(r.width/2+n.width/2,p.width+2*i.noteMargin),s.startx=a-s.width+(r.width-i.actorMargin)/2):t.to===t.from?(p=Y.calculateTextDimensions(h?Y.wrapLabel(t.message,I.getMax(i.width,r.width),wt(i)):t.message,wt(i)),s.width=h?I.getMax(i.width,r.width):I.getMax(r.width,i.width,p.width+2*i.noteMargin),s.startx=a+(r.width-s.width)/2):(s.width=Math.abs(a+r.width/2-(o+n.width/2))+i.actorMargin,s.startx=a2,T=d(_=>h?-_:_,"adjustValue");t.from===t.to?s=p:(t.activate&&!g&&(s+=T(i.activationWidth/2-1)),[c.db.LINETYPE.SOLID_OPEN,c.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(s+=T(3)),[c.db.LINETYPE.BIDIRECTIONAL_SOLID,c.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(p-=T(3)));let f=[r,n,a,o],m=Math.abs(p-s);t.wrap&&t.message&&(t.message=Y.wrapLabel(t.message,I.getMax(m+2*i.wrapPadding,i.width),Tt(i)));let E=Y.calculateTextDimensions(t.message,Tt(i));return{width:I.getMax(t.wrap?0:E.width+2*i.wrapPadding,m+2*i.wrapPadding,i.width),height:0,startx:p,stopx:s,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,f),toBounds:Math.max.apply(null,f)}},"buildMessageModel"),Gr=d(async function(t,e,c,r){let n={},a=[],o,h,p;for(let s of t){switch(s.id=Y.random({length:10}),s.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:s.message&&(o=a.pop(),n[o.id]=o,n[s.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),n[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{let T=e.get(s.from?s.from:s.to.actor),f=Rt(s.from?s.from:s.to.actor).length,m=T.x+T.width/2+(f-1)*i.activationWidth/2,E={startx:m,stopx:m+i.activationWidth,actor:s.from,enabled:!0};x.activations.push(E)}break;case r.db.LINETYPE.ACTIVE_END:{let T=x.activations.map(f=>f.actor).lastIndexOf(s.from);x.activations.splice(T,1).splice(0,1)}break}s.placement!==void 0?(h=await Kr(s,e,r),s.noteModel=h,a.forEach(T=>{o=T,o.from=I.getMin(o.from,h.startx),o.to=I.getMax(o.to,h.startx+h.width),o.width=I.getMax(o.width,Math.abs(o.from-o.to))-i.labelBoxWidth})):(p=Ur(s,e,r),s.msgModel=p,p.startx&&p.stopx&&a.length>0&&a.forEach(T=>{if(o=T,p.startx===p.stopx){let f=e.get(s.from),m=e.get(s.to);o.from=I.getMin(f.x-p.width/2,f.x-f.width/2,o.from),o.to=I.getMax(m.x+p.width/2,m.x+f.width/2,o.to),o.width=I.getMax(o.width,Math.abs(o.to-o.from))-i.labelBoxWidth}else o.from=I.getMin(p.startx,o.from),o.to=I.getMax(p.stopx,o.to),o.width=I.getMax(o.width,p.width)-i.labelBoxWidth}))}return x.activations=[],z.debug("Loop type widths:",n),n},"calculateLoopBounds"),Ve={bounds:x,drawActors:te,drawActorsPopup:Oe,setConf:Be,draw:Wr};var Ls={parser:ye,db:Xt,renderer:Ve,styles:Ae,init:d(({wrap:t})=>{Xt.setWrap(t)},"init")};export{Ls as diagram};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy