github.com/square/finch@v0.0.0-20240412205204-6530c03e2b96/docs/themes/hugo-geekdoc/static/js/899-718e9a6e.chunk.min.js (about)

     1  "use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[899],{2899:function(t,e,a){a.d(e,{diagram:function(){return Tt}});var i=a(6848),r=a(3110),n=a(5740),s=a(1188),o=a(7967),c=(a(7856),a(7484),function(){var t=function(t,e,a,i){for(a=a||{},i=t.length;i--;a[t[i]]=e);return a},e=[1,2],a=[1,3],i=[1,5],r=[1,7],n=[2,5],s=[1,15],o=[1,17],c=[1,19],l=[1,21],h=[1,22],d=[1,23],p=[1,29],u=[1,30],g=[1,31],x=[1,32],m=[1,33],y=[1,34],b=[1,35],f=[1,36],T=[1,37],E=[1,38],w=[1,39],_=[1,40],v=[1,42],k=[1,43],L=[1,45],P=[1,46],I=[1,47],M=[1,48],N=[1,49],A=[1,50],S=[1,53],O=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],D=[4,5,21,54,56],R=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],Y=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],$=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],C=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],B=[71,72,73],F=[1,125],V=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],W={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,a,i,r,n,s){var o=n.length-1;switch(r){case 4:return i.apply(n[o]),n[o];case 5:case 10:case 9:case 14:this.$=[];break;case 6:case 11:n[o-1].push(n[o]),this.$=n[o-1];break;case 7:case 8:case 12:case 13:case 63:this.$=n[o];break;case 18:n[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(n[o-2])}),n[o-1].push({type:"boxEnd",boxText:n[o-2]}),this.$=n[o-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(n[o-2]),sequenceIndexStep:Number(n[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(n[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:n[o-1]};break;case 25:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:n[o-1]};break;case 31:i.setDiagramTitle(n[o].substring(6)),this.$=n[o].substring(6);break;case 32:i.setDiagramTitle(n[o].substring(7)),this.$=n[o].substring(7);break;case 33:this.$=n[o].trim(),i.setAccTitle(this.$);break;case 34:case 35:this.$=n[o].trim(),i.setAccDescription(this.$);break;case 36:n[o-1].unshift({type:"loopStart",loopText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.LOOP_START}),n[o-1].push({type:"loopEnd",loopText:n[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=n[o-1];break;case 37:n[o-1].unshift({type:"rectStart",color:i.parseMessage(n[o-2]),signalType:i.LINETYPE.RECT_START}),n[o-1].push({type:"rectEnd",color:i.parseMessage(n[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=n[o-1];break;case 38:n[o-1].unshift({type:"optStart",optText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.OPT_START}),n[o-1].push({type:"optEnd",optText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=n[o-1];break;case 39:n[o-1].unshift({type:"altStart",altText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.ALT_START}),n[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=n[o-1];break;case 40:n[o-1].unshift({type:"parStart",parText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.PAR_START}),n[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=n[o-1];break;case 41:n[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.CRITICAL_START}),n[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=n[o-1];break;case 42:n[o-1].unshift({type:"breakStart",breakText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.BREAK_START}),n[o-1].push({type:"breakEnd",optText:i.parseMessage(n[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=n[o-1];break;case 45:this.$=n[o-3].concat([{type:"option",optionText:i.parseMessage(n[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},n[o]]);break;case 47:this.$=n[o-3].concat([{type:"and",parText:i.parseMessage(n[o-1]),signalType:i.LINETYPE.PAR_AND},n[o]]);break;case 49:this.$=n[o-3].concat([{type:"else",altText:i.parseMessage(n[o-1]),signalType:i.LINETYPE.ALT_ELSE},n[o]]);break;case 50:n[o-3].type="addParticipant",n[o-3].description=i.parseMessage(n[o-1]),this.$=n[o-3];break;case 51:n[o-1].type="addParticipant",this.$=n[o-1];break;case 52:n[o-3].type="addActor",n[o-3].description=i.parseMessage(n[o-1]),this.$=n[o-3];break;case 53:n[o-1].type="addActor",this.$=n[o-1];break;case 54:this.$=[n[o-1],{type:"addNote",placement:n[o-2],actor:n[o-1].actor,text:n[o]}];break;case 55:n[o-2]=[].concat(n[o-1],n[o-1]).slice(0,2),n[o-2][0]=n[o-2][0].actor,n[o-2][1]=n[o-2][1].actor,this.$=[n[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:n[o-2].slice(0,2),text:n[o]}];break;case 56:this.$=[n[o-1],{type:"addLinks",actor:n[o-1].actor,text:n[o]}];break;case 57:this.$=[n[o-1],{type:"addALink",actor:n[o-1].actor,text:n[o]}];break;case 58:this.$=[n[o-1],{type:"addProperties",actor:n[o-1].actor,text:n[o]}];break;case 59:this.$=[n[o-1],{type:"addDetails",actor:n[o-1].actor,text:n[o]}];break;case 62:this.$=[n[o-2],n[o]];break;case 64:this.$=i.PLACEMENT.LEFTOF;break;case 65:this.$=i.PLACEMENT.RIGHTOF;break;case 66:this.$=[n[o-4],n[o-1],{type:"addMessage",from:n[o-4].actor,to:n[o-1].actor,signalType:n[o-3],msg:n[o]},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:n[o-1]}];break;case 67:this.$=[n[o-4],n[o-1],{type:"addMessage",from:n[o-4].actor,to:n[o-1].actor,signalType:n[o-3],msg:n[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:n[o-4]}];break;case 68:this.$=[n[o-3],n[o-1],{type:"addMessage",from:n[o-3].actor,to:n[o-1].actor,signalType:n[o-2],msg:n[o]}];break;case 69:this.$={type:"addParticipant",actor:n[o]};break;case 70:this.$=i.LINETYPE.SOLID_OPEN;break;case 71:this.$=i.LINETYPE.DOTTED_OPEN;break;case 72:this.$=i.LINETYPE.SOLID;break;case 73:this.$=i.LINETYPE.DOTTED;break;case 74:this.$=i.LINETYPE.SOLID_CROSS;break;case 75:this.$=i.LINETYPE.DOTTED_CROSS;break;case 76:this.$=i.LINETYPE.SOLID_POINT;break;case 77:this.$=i.LINETYPE.DOTTED_POINT;break;case 78:this.$=i.parseMessage(n[o].trim().substring(1));break;case 79:i.parseDirective("%%{","open_directive");break;case 80:i.parseDirective(n[o],"type_directive");break;case 81:n[o]=n[o].trim().replace(/'/g,'"'),i.parseDirective(n[o],"arg_directive");break;case 82:i.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:a,6:4,7:i,14:6,83:r},{1:[3]},{3:8,4:e,5:a,6:4,7:i,14:6,83:r},{3:9,4:e,5:a,6:4,7:i,14:6,83:r},{3:10,4:e,5:a,6:4,7:i,14:6,83:r},t([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],n,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{16:51,17:[1,52],86:S},t([17,86],[2,80]),t(O,[2,6]),{6:41,10:54,13:18,14:6,19:c,22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},t(O,[2,8]),t(O,[2,9]),t(O,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:A},{27:61,73:A},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},t(O,[2,31]),t(O,[2,32]),{37:[1,67]},{39:[1,68]},t(O,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},t(O,[2,43]),{27:76,73:A},{27:77,73:A},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:A},{27:92,73:A},{27:93,73:A},{27:94,73:A},t([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},t(O,[2,7]),t(D,[2,10],{11:98}),t(O,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},t(O,[2,23]),{5:[1,102]},{5:[1,103]},t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),t(O,[2,33]),t(O,[2,34]),t(R,n,{8:104}),t(R,n,{8:105}),t(R,n,{8:106}),t(Y,n,{45:107,8:108}),t($,n,{47:109,8:110}),t(C,n,{49:111,8:112}),t(R,n,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:A},t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),{27:121,73:A},{27:123,61:122,73:A},{73:[2,64]},{73:[2,65]},{59:124,82:F},{59:126,82:F},{59:127,82:F},{59:128,82:F},t(V,[2,15]),{16:129,86:S},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:v,56:k},{5:[1,135]},t(O,[2,21]),t(O,[2,22]),t(O,[2,24]),t(O,[2,25]),{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[1,136],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[1,137],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[1,138],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{21:[1,139]},{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[2,48],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,53:[1,140],54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{21:[1,141]},{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[2,46],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,52:[1,142],54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{21:[1,143]},{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[2,44],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,51:[1,144],54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{4:s,5:o,6:41,9:14,10:16,13:18,14:6,19:c,21:[1,145],22:20,23:l,26:h,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:u,36:g,38:x,40:m,41:y,42:b,43:f,44:T,46:E,48:w,50:_,54:v,56:k,57:L,62:P,63:I,64:M,65:N,73:A,83:r},{20:[1,146]},t(O,[2,51]),{20:[1,147]},t(O,[2,53]),{27:148,73:A},{27:149,73:A},{59:150,82:F},{59:151,82:F},{59:152,82:F},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},t(O,[2,18]),t(D,[2,11]),{13:155,54:v,56:k},t(D,[2,13]),t(D,[2,14]),t(O,[2,20]),t(O,[2,36]),t(O,[2,37]),t(O,[2,38]),t(O,[2,39]),{20:[1,156]},t(O,[2,40]),{20:[1,157]},t(O,[2,41]),{20:[1,158]},t(O,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:F},{59:162,82:F},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:A},t(V,[2,16]),t(D,[2,12]),t(Y,n,{8:108,45:164}),t($,n,{8:110,47:165}),t(C,n,{8:112,49:166}),t(O,[2,50]),t(O,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},parse:function(t){var e=[0],a=[],i=[null],r=[],n=this.table,s="",o=0,c=0,l=r.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);h.setInput(t,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var u=h.yylloc;r.push(u);var g=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,m,y,b,f,T,E,w,_,v={};;){if(m=e[e.length-1],this.defaultActions[m]?y=this.defaultActions[m]:(null==x&&(_=void 0,"number"!=typeof(_=a.pop()||h.lex()||1)&&(_ instanceof Array&&(_=(a=_).pop()),_=this.symbols_[_]||_),x=_),y=n[m]&&n[m][x]),void 0===y||!y.length||!y[0]){var k;for(f in w=[],n[m])this.terminals_[f]&&f>2&&w.push("'"+this.terminals_[f]+"'");k=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(k,{text:h.match,token:this.terminals_[x]||x,line:h.yylineno,loc:u,expected:w})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+x);switch(y[0]){case 1:e.push(x),i.push(h.yytext),r.push(h.yylloc),e.push(y[1]),x=null,c=h.yyleng,s=h.yytext,o=h.yylineno,u=h.yylloc;break;case 2:if(T=this.productions_[y[1]][1],v.$=i[i.length-T],v._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},g&&(v._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(v,[s,c,o,d.yy,y[1],i,r].concat(l))))return b;T&&(e=e.slice(0,-1*T*2),i=i.slice(0,-1*T),r=r.slice(0,-1*T)),e.push(this.productions_[y[1]][0]),i.push(v.$),r.push(v._$),E=n[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},q={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,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},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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 r=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===i.length?this.yylloc.first_column:0)+i[i.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var a,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var n in r)this[n]=r[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,a,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),n=0;n<r.length;n++)if((a=this._input.match(this.rules[r[n]]))&&(!e||a[0].length>e[0].length)){if(e=a,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,a,i){switch(a){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:case 53:case 66:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 54:return e.yytext=e.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\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,/^(?:[^\->:\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,/^(?: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,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};function z(){this.yy={}}return W.lexer=q,z.prototype=W,W.Parser=z,new z}());c.parser=c;const l=c;let h,d,p,u={},g=[],x=[],m=!1;const y=function(t,e,a,i){let r=p;const n=u[t];if(n){if(p&&n.box&&p!==n.box)throw new Error("A same participant should only be defined in one Box: "+n.name+" can't be in '"+n.box.name+"' and in '"+p.name+"' at the same time.");if(r=n.box?n.box:p,n.box=r,n&&e===n.name&&null==a)return}null!=a&&null!=a.text||(a={text:e,wrap:null,type:i}),null!=i&&null!=a.text||(a={text:e,wrap:null,type:i}),u[t]={box:r,name:e,description:a.text,wrap:void 0===a.wrap&&T()||!!a.wrap,prevActor:h,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},h&&u[h]&&(u[h].nextActor=t),p&&p.actorKeys.push(t),h=t},b=function(t,e,a={text:void 0,wrap:void 0},i){if(i===E.ACTIVE_END&&(t=>{let e,a=0;for(e=0;e<x.length;e++)x[e].type===E.ACTIVE_START&&x[e].from.actor===t&&a++,x[e].type===E.ACTIVE_END&&x[e].from.actor===t&&a--;return a})(t.actor)<1){let e=new Error("Trying to inactivate an inactive participant ("+t.actor+")");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 x.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&T()||!!a.wrap,type:i}),!0},f=function(t){return u[t]},T=()=>void 0!==d?d:(0,r.g)().sequence.wrap,E={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},w=function(t,e,a){a.text,void 0===a.wrap&&T()||a.wrap;const i=[].concat(t,t);x.push({from:i[0],to:i[1],message:a.text,wrap:void 0===a.wrap&&T()||!!a.wrap,type:E.NOTE,placement:e})},_=function(t,e){const a=f(t);try{let t=(0,r.b)(e.text,(0,r.g)());t=t.replace(/&amp;/g,"&"),t=t.replace(/&equals;/g,"="),v(a,JSON.parse(t))}catch(t){r.l.error("error while parsing actor link text",t)}};function v(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}const k=function(t,e){const a=f(t);try{let t=(0,r.b)(e.text,(0,r.g)());L(a,JSON.parse(t))}catch(t){r.l.error("error while parsing actor properties text",t)}};function L(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}const P=function(t,e){const a=f(t),i=document.getElementById(e.text);try{const t=i.innerHTML,e=JSON.parse(t);e.properties&&L(a,e.properties),e.links&&v(a,e.links)}catch(t){r.l.error("error while parsing actor details text",t)}},I=function(t){if(Array.isArray(t))t.forEach((function(t){I(t)}));else switch(t.type){case"sequenceIndex":x.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":y(t.actor,t.actor,t.description,"participant");break;case"addActor":y(t.actor,t.actor,t.description,"actor");break;case"activeStart":case"activeEnd":b(t.actor,void 0,void 0,t.signalType);break;case"addNote":w(t.actor,t.placement,t.text);break;case"addLinks":_(t.actor,t.text);break;case"addALink":!function(t,e){const a=f(t);try{const t={};let o=(0,r.b)(e.text,(0,r.g)());var i=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var n=o.slice(0,i-1).trim(),s=o.slice(i+1).trim();t[n]=s,v(a,t)}catch(t){r.l.error("error while parsing actor link text",t)}}(t.actor,t.text);break;case"addProperties":k(t.actor,t.text);break;case"addDetails":P(t.actor,t.text);break;case"addMessage":b(t.from,t.to,t.msg,t.signalType);break;case"boxStart":e=t.boxData,g.push({name:e.text,wrap:void 0===e.wrap&&T()||!!e.wrap,fill:e.color,actorKeys:[]}),p=g.slice(-1)[0];break;case"boxEnd":p=void 0;break;case"loopStart":b(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":b(void 0,void 0,void 0,t.signalType);break;case"rectStart":b(void 0,void 0,t.color,t.signalType);break;case"optStart":b(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":b(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,r.o)(t.text);break;case"parStart":case"and":b(void 0,void 0,t.parText,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"breakStart":b(void 0,void 0,t.breakText,t.signalType)}var e},M={addActor:y,addMessage:function(t,e,a,i){x.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&T()||!!a.wrap,answer:i})},addSignal:b,addLinks:_,addDetails:P,addProperties:k,autoWrap:T,setWrap:function(t){d=t},enableSequenceNumbers:function(){m=!0},disableSequenceNumbers:function(){m=!1},showSequenceNumbers:()=>m,getMessages:function(){return x},getActors:function(){return u},getActor:f,getActorKeys:function(){return Object.keys(u)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:r.p,getBoxes:function(){return g},getDiagramTitle:r.x,setDiagramTitle:r.w,parseDirective:function(t,e,a){i.m.parseDirective(this,t,e,a)},getConfig:()=>(0,r.g)().sequence,clear:function(){u={},g=[],x=[],m=!1,(0,r.y)()},parseMessage:function(t){const e=t.trim(),a={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return r.l.debug("parseMessage:",a),a},parseBoxData:function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let a=null!=e&&e[1]?e[1].trim():"transparent",i=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",a)||(a="transparent",i=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",i=t.trim())}return{color:a,text:void 0!==i?(0,r.b)(i.replace(/^:?(?:no)?wrap:/,""),(0,r.g)()):void 0,wrap:void 0!==i?null!==i.match(/^:?wrap:/)||null===i.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:E,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:w,setAccTitle:r.o,apply:I,setAccDescription:r.v,getAccDescription:r.q,hasAtLeastOneBox:function(){return g.length>0},hasAtLeastOneBoxWithTitle:function(){return g.some((t=>t.name))}},N=function(t,e){const a=t.append("rect");return a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),a.attr("rx",e.rx),a.attr("ry",e.ry),void 0!==e.class&&a.attr("class",e.class),a},A=(t,e)=>{(0,i.a)((()=>{const a=document.querySelectorAll(t);0!==a.length&&(a[0].addEventListener("mouseover",(function(){D("actor"+e+"_popup")})),a[0].addEventListener("mouseout",(function(){R("actor"+e+"_popup")})))}))},S=function(t,e,a,i){const r=t.append("image");r.attr("x",e),r.attr("y",a);var n=(0,o.N)(i);r.attr("xlink:href",n)},O=function(t,e,a,i){const r=t.append("use");r.attr("x",e),r.attr("y",a);var n=(0,o.N)(i);r.attr("xlink:href","#"+n)},D=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},R=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},Y=function(t,e){let a=0,i=0;const n=e.text.split(r.e.lineBreakRegex),[o,c]=(0,s.x)(e.fontSize);let l=[],h=0,d=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":d=()=>Math.round(e.y+(a+i+e.textMargin)/2);break;case"bottom":case"end":d=()=>Math.round(e.y+(a+i+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)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"}for(let[r,s]of n.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==o&&(h=r*o);const n=t.append("text");if(n.attr("x",e.x),n.attr("y",d()),void 0!==e.anchor&&n.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&n.style("font-family",e.fontFamily),void 0!==c&&n.style("font-size",c),void 0!==e.fontWeight&&n.style("font-weight",e.fontWeight),void 0!==e.fill&&n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class),void 0!==e.dy?n.attr("dy",e.dy):0!==h&&n.attr("dy",h),e.tspan){const t=n.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(s)}else n.text(s);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(i+=(n._groups||n)[0][0].getBBox().height,a=i),l.push(n)}return l},$=function(t,e){const a=t.append("polygon");var i,r,n,s;return a.attr("points",(i=e.x)+","+(r=e.y)+" "+(i+(n=e.width))+","+r+" "+(i+n)+","+(r+(s=e.height)-7)+" "+(i+n-8.4)+","+(r+s)+" "+i+","+(r+s)),a.attr("class","labelBox"),e.y=e.y+e.height/2,Y(t,e),a};let C=-1;const B=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},F=function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},V=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}},W=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},q=function(){function t(t,e,a,r,n,s,o){i(e.append("text").attr("x",a+n/2).attr("y",r+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,n,o,c,l,h){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:u}=h,[g,x]=(0,s.x)(d),m=t.split(r.e.lineBreakRegex);for(let t=0;t<m.length;t++){const r=t*g-g*(m.length-1)/2,s=e.append("text").attr("x",a+o/2).attr("y",n).style("text-anchor","middle").style("font-size",x).style("font-weight",u).style("font-family",p);s.append("tspan").attr("x",a+o/2).attr("dy",r).text(m[t]),s.attr("y",n+c/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(s,l)}}function a(t,a,r,n,s,o,c,l){const h=a.append("switch"),d=h.append("foreignObject").attr("x",r).attr("y",n).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,n,s,o,c,l),i(d,c)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(i){return"fo"===i.textPlacement?a:"old"===i.textPlacement?t:e}}(),z=function(){function t(t,e,a,r,n,s,o){i(e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").text(t),o)}function e(t,e,a,n,s,o,c,l){const{actorFontSize:h,actorFontFamily:d,actorFontWeight:p}=l,u=t.split(r.e.lineBreakRegex);for(let t=0;t<u.length;t++){const r=t*h-h*(u.length-1)/2,s=e.append("text").attr("x",a).attr("y",n).style("text-anchor","start").style("font-size",h).style("font-weight",p).style("font-family",d);s.append("tspan").attr("x",a).attr("dy",r).text(u[t]),s.attr("y",n+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(s,c)}}function a(t,a,r,n,s,o,c,l){const h=a.append("switch"),d=h.append("foreignObject").attr("x",r).attr("y",n).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,n,0,o,c,l),i(d,c)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(i){return"fo"===i.textPlacement?a:"old"===i.textPlacement?t:e}}(),H=N,U=function(t,e,a,i){switch(e.type){case"actor":return function(t,e,a,i){const r=e.x+e.width/2,n=e.y+80;i||(C++,t.append("line").attr("id","actor"+C).attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const s=t.append("g");s.attr("class","actor-man");const o={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,s.append("line").attr("id","actor-man-torso"+C).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),s.append("line").attr("id","actor-man-arms"+C).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),s.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),s.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);const c=s.append("circle");c.attr("cx",e.x+e.width/2),c.attr("cy",e.y+10),c.attr("r",15),c.attr("width",e.width),c.attr("height",e.height);const l=s.node().getBBox();return e.height=l.height,q(a)(e.description,s,o.x,o.y+35,o.width,o.height,{class:"actor"},a),e.height}(t,e,a,i);case"participant":return function(t,e,a,i){const r=e.x+e.width/2,n=e.y+5,s=t.append("g");var o=s;i||(C++,o.append("line").attr("id","actor"+C).attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=s.append("g"),e.actorCnt=C,null!=e.links&&(o.attr("id","root-"+C),A("#root-"+C,C)));const c={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};var l="actor";null!=e.properties&&e.properties.class?l=e.properties.class:c.fill="#eaeaea",c.x=e.x,c.y=e.y,c.width=e.width,c.height=e.height,c.class=l,c.rx=3,c.ry=3;const h=N(o,c);if(e.rectData=c,null!=e.properties&&e.properties.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?O(o,c.x+c.width-20,c.y+10,t.substr(1)):S(o,c.x+c.width-20,c.y+10,t)}q(a)(e.description,o,c.x,c.y,c.width,c.height,{class:"actor"},a);let d=e.height;if(h.node){const t=h.node().getBBox();e.height=t.height,d=t.height}return d}(t,e,a,i)}},j=function(t,e,a){const i=t.append("g");F(i,e),e.name&&q(a)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),i.lower()},K=function(t,e,a,i,r){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const n=e.links,s=e.actorCnt,c=e.rectData;var l="none";r&&(l="block !important");const h=t.append("g");h.attr("id","actor"+s+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),A("#actor"+s+"_popup",s);var d="";void 0!==c.class&&(d=" "+c.class);let p=c.width>a?c.width:a;const u=h.append("rect");if(u.attr("class","actorPopupMenuPanel"+d),u.attr("x",c.x),u.attr("y",c.height),u.attr("fill",c.fill),u.attr("stroke",c.stroke),u.attr("width",p),u.attr("height",c.height),u.attr("rx",c.rx),u.attr("ry",c.ry),null!=n){var g=20;for(let t in n){var x=h.append("a"),m=(0,o.N)(n[t]);x.attr("xlink:href",m),x.attr("target","_blank"),z(i)(t,x,c.x+10,c.height+g,p,20,{class:"actor"},i),g+=30}}return u.attr("height",g),{height:c.height+g,width:p}},X=function(t){return t.append("g")},G=function(t,e,a,i,r){const n={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},s=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+r%3,n.width=e.stopx-e.startx,n.height=a-e.starty,N(s,n)},J=function(t,e,a,i){const{boxMargin:r,boxTextMargin:n,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:c,messageFontSize:l,messageFontWeight:h}=i,d=t.append("g"),p=function(t,e,a,i){return d.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",i).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){p(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let u={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};u.text=a,u.x=e.startx,u.y=e.starty,u.fontFamily=c,u.fontSize=l,u.fontWeight=h,u.anchor="middle",u.valign="middle",u.tspan=!1,u.width=o||50,u.height=s||20,u.textMargin=n,u.class="labelText",$(d,u),u={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},u.text=e.title,u.x=e.startx+o/2+(e.stopx-e.startx)/2,u.y=e.starty+r+n,u.anchor="middle",u.valign="middle",u.textMargin=n,u.class="loopText",u.fontFamily=c,u.fontSize=l,u.fontWeight=h,u.wrap=!0;let g=Y(d,u);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,a){if(t.message){u.text=t.message,u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.sections[a].y+r+n,u.class="loopText",u.anchor="middle",u.valign="middle",u.tspan=!1,u.fontFamily=c,u.fontSize=l,u.fontWeight=h,u.wrap=e.wrap,g=Y(d,u);let i=Math.round(g.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[a].height+=i-(r+n)}})),e.height=Math.round(e.stopy-e.starty),d},Q=F,Z=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},tt=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},et=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)},at=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",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")},it=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")},rt=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")},nt=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")},st=V,ot=W;o.N;let ct={};const lt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init: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,xt((0,r.g)())},updateVal:function(t,e,a,i){void 0===t[e]?t[e]=a:t[e]=i(a,t[e])},updateBounds:function(t,e,a,i){const r=this;let n=0;function s(s){return function(o){n++;const c=r.sequenceItems.length-n+1;r.updateVal(o,"starty",e-c*ct.boxMargin,Math.min),r.updateVal(o,"stopy",i+c*ct.boxMargin,Math.max),r.updateVal(lt.data,"startx",t-c*ct.boxMargin,Math.min),r.updateVal(lt.data,"stopx",a+c*ct.boxMargin,Math.max),"activation"!==s&&(r.updateVal(o,"startx",t-c*ct.boxMargin,Math.min),r.updateVal(o,"stopx",a+c*ct.boxMargin,Math.max),r.updateVal(lt.data,"starty",e-c*ct.boxMargin,Math.min),r.updateVal(lt.data,"stopy",i+c*ct.boxMargin,Math.max))}}this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},insert:function(t,e,a,i){const r=Math.min(t,a),n=Math.max(t,a),s=Math.min(e,i),o=Math.max(e,i);this.updateVal(lt.data,"startx",r,Math.min),this.updateVal(lt.data,"starty",s,Math.min),this.updateVal(lt.data,"stopx",n,Math.max),this.updateVal(lt.data,"stopy",o,Math.max),this.updateBounds(r,s,n,o)},newActivation:function(t,e,a){const i=a[t.from.actor],r=mt(t.from.actor).length||0,n=i.x+i.width/2+(r-1)*ct.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+ct.activationWidth,stopy:void 0,actor:t.from.actor,anchored:X(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop: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}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:lt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},ht=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),dt=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),pt=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),ut=function(t,e,a,i,r,n,s){if(!0===r.hideUnusedParticipants){const t=new Set;n.forEach((e=>{t.add(e.from),t.add(e.to)})),a=a.filter((e=>t.has(e)))}let o,c=0,l=0,h=0;for(const r of a){const a=e[r],n=a.box;o&&o!=n&&(s||lt.models.addBox(o),l+=ct.boxMargin+o.margin),n&&n!=o&&(s||(n.x=c+l,n.y=i),l+=n.margin),a.width=a.width||ct.width,a.height=Math.max(a.height||ct.height,ct.height),a.margin=a.margin||ct.actorMargin,a.x=c+l,a.y=lt.getVerticalPos();const d=U(t,a,ct,s);h=Math.max(h,d),lt.insert(a.x,i,a.x+a.width,a.height),c+=a.width+l,a.box&&(a.box.width=c+n.margin-a.box.x),l=a.margin,o=a.box,lt.models.addActor(a)}o&&!s&&lt.models.addBox(o),lt.bumpVerticalPos(h)},gt=function(t,e,a,i){let r=0,n=0;for(const s of a){const a=e[s],o=ft(a),c=K(t,a,o,ct,ct.forceMenus,i);c.height>r&&(r=c.height),c.width+a.x>n&&(n=c.width+a.x)}return{maxHeight:r,maxWidth:n}},xt=function(t){(0,r.d)(ct,t),t.fontFamily&&(ct.actorFontFamily=ct.noteFontFamily=ct.messageFontFamily=t.fontFamily),t.fontSize&&(ct.actorFontSize=ct.noteFontSize=ct.messageFontSize=t.fontSize),t.fontWeight&&(ct.actorFontWeight=ct.noteFontWeight=ct.messageFontWeight=t.fontWeight)},mt=function(t){return lt.activations.filter((function(e){return e.actor===t}))},yt=function(t,e){const a=e[t],i=mt(t);return[i.reduce((function(t,e){return Math.min(t,e.startx)}),a.x+a.width/2),i.reduce((function(t,e){return Math.max(t,e.stopx)}),a.x+a.width/2)]};function bt(t,e,a,i,n){lt.bumpVerticalPos(a);let o=i;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,n=ht(ct);e.message=s.u.wrapLabel(`[${e.message}]`,a-2*ct.wrapPadding,n),e.width=a,e.wrap=!0;const c=s.u.calculateTextDimensions(e.message,n),l=Math.max(c.height,ct.labelBoxHeight);o=i+l,r.l.debug(`${l} - ${e.message}`)}n(e),lt.bumpVerticalPos(o)}const ft=function(t){let e=0;const a=pt(ct);for(const i in t.links){const t=s.u.calculateTextDimensions(i,a).width+2*ct.wrapPadding+2*ct.boxMargin;e<t&&(e=t)}return e},Tt={parser:l,db:M,renderer:{bounds:lt,drawActors:ut,drawActorsPopup:gt,setConf:xt,draw:function(t,e,a,i){const{securityLevel:o,sequence:c}=(0,r.g)();let l;ct=c,i.db.clear(),i.parser.parse(t),"sandbox"===o&&(l=(0,n.Ys)("#i"+e));const h="sandbox"===o?(0,n.Ys)(l.nodes()[0].contentDocument.body):(0,n.Ys)("body"),d="sandbox"===o?l.nodes()[0].contentDocument:document;lt.init(),r.l.debug(i.db);const p="sandbox"===o?h.select(`[id="${e}"]`):(0,n.Ys)(`[id="${e}"]`),u=i.db.getActors(),g=i.db.getBoxes(),x=i.db.getActorKeys(),m=i.db.getMessages(),y=i.db.getDiagramTitle(),b=i.db.hasAtLeastOneBox(),f=i.db.hasAtLeastOneBoxWithTitle(),T=function(t,e,a){const i={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){const r=t[e.to];if(e.placement===a.db.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===a.db.PLACEMENT.RIGHTOF&&!r.nextActor)return;const n=void 0!==e.placement,o=!n,c=n?dt(ct):ht(ct),l=e.wrap?s.u.wrapLabel(e.message,ct.width-2*ct.wrapPadding,c):e.message,h=s.u.calculateTextDimensions(l,c).width+2*ct.wrapPadding;o&&e.from===r.nextActor?i[e.to]=Math.max(i[e.to]||0,h):o&&e.from===r.prevActor?i[e.from]=Math.max(i[e.from]||0,h):o&&e.from===e.to?(i[e.from]=Math.max(i[e.from]||0,h/2),i[e.to]=Math.max(i[e.to]||0,h/2)):e.placement===a.db.PLACEMENT.RIGHTOF?i[e.from]=Math.max(i[e.from]||0,h):e.placement===a.db.PLACEMENT.LEFTOF?i[r.prevActor]=Math.max(i[r.prevActor]||0,h):e.placement===a.db.PLACEMENT.OVER&&(r.prevActor&&(i[r.prevActor]=Math.max(i[r.prevActor]||0,h/2)),r.nextActor&&(i[e.from]=Math.max(i[e.from]||0,h/2)))}})),r.l.debug("maxMessageWidthPerActor:",i),i}(u,m,i);ct.height=function(t,e,a){let i=0;Object.keys(t).forEach((e=>{const a=t[e];a.wrap&&(a.description=s.u.wrapLabel(a.description,ct.width-2*ct.wrapPadding,pt(ct)));const r=s.u.calculateTextDimensions(a.description,pt(ct));a.width=a.wrap?ct.width:Math.max(ct.width,r.width+2*ct.wrapPadding),a.height=a.wrap?Math.max(r.height,ct.height):ct.height,i=Math.max(i,a.height)}));for(const a in e){const i=t[a];if(!i)continue;const r=t[i.nextActor];if(!r){const t=e[a]+ct.actorMargin-i.width/2;i.margin=Math.max(t,ct.actorMargin);continue}const n=e[a]+ct.actorMargin-i.width/2-r.width/2;i.margin=Math.max(n,ct.actorMargin)}let r=0;return a.forEach((e=>{const a=ht(ct);let i=e.actorKeys.reduce(((e,a)=>e+(t[a].width+(t[a].margin||0))),0);i-=2*ct.boxTextMargin,e.wrap&&(e.name=s.u.wrapLabel(e.name,i-2*ct.wrapPadding,a));const n=s.u.calculateTextDimensions(e.name,a);r=Math.max(n.height,r);const o=Math.max(i,n.width+2*ct.wrapPadding);if(e.margin=ct.boxTextMargin,i<o){const t=(o-i)/2;e.margin+=t}})),a.forEach((t=>t.textMaxHeight=r)),Math.max(i,ct.height)}(u,T,g),rt(p),it(p),nt(p),b&&(lt.bumpVerticalPos(ct.boxMargin),f&&lt.bumpVerticalPos(g[0].textMaxHeight)),ut(p,u,x,0,ct,m,!1);const E=function(t,e,a,i){const n={},o=[];let c,l,h;return t.forEach((function(t){switch(t.id=s.u.random({length:10}),t.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:t.message&&(c=o.pop(),n[c.id]=c,n[t.id]=c,o.push(c));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:c=o.pop(),n[c.id]=c;break;case i.db.LINETYPE.ACTIVE_START:{const a=e[t.from?t.from.actor:t.to.actor],i=mt(t.from?t.from.actor:t.to.actor).length,r=a.x+a.width/2+(i-1)*ct.activationWidth/2,n={startx:r,stopx:r+ct.activationWidth,actor:t.from.actor,enabled:!0};lt.activations.push(n)}break;case i.db.LINETYPE.ACTIVE_END:{const e=lt.activations.map((t=>t.actor)).lastIndexOf(t.from.actor);delete lt.activations.splice(e,1)[0]}}void 0!==t.placement?(l=function(t,e,a){const i=e[t.from].x,n=e[t.to].x,o=t.wrap&&t.message;let c=s.u.calculateTextDimensions(o?s.u.wrapLabel(t.message,ct.width,dt(ct)):t.message,dt(ct));const l={width:o?ct.width:Math.max(ct.width,c.width+2*ct.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(l.width=o?Math.max(ct.width,c.width):Math.max(e[t.from].width/2+e[t.to].width/2,c.width+2*ct.noteMargin),l.startx=i+(e[t.from].width+ct.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(l.width=o?Math.max(ct.width,c.width+2*ct.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,c.width+2*ct.noteMargin),l.startx=i-l.width+(e[t.from].width-ct.actorMargin)/2):t.to===t.from?(c=s.u.calculateTextDimensions(o?s.u.wrapLabel(t.message,Math.max(ct.width,e[t.from].width),dt(ct)):t.message,dt(ct)),l.width=o?Math.max(ct.width,e[t.from].width):Math.max(e[t.from].width,ct.width,c.width+2*ct.noteMargin),l.startx=i+(e[t.from].width-l.width)/2):(l.width=Math.abs(i+e[t.from].width/2-(n+e[t.to].width/2))+ct.actorMargin,l.startx=i<n?i+e[t.from].width/2-ct.actorMargin/2:n+e[t.to].width/2-ct.actorMargin/2),o&&(l.message=s.u.wrapLabel(t.message,l.width-2*ct.wrapPadding,dt(ct))),r.l.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l}(t,e,i),t.noteModel=l,o.forEach((t=>{c=t,c.from=Math.min(c.from,l.startx),c.to=Math.max(c.to,l.startx+l.width),c.width=Math.max(c.width,Math.abs(c.from-c.to))-ct.labelBoxWidth}))):(h=function(t,e,a){let i=!1;if([a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const r=yt(t.from,e),n=yt(t.to,e),o=r[0]<=n[0]?1:0,c=r[0]<n[0]?0:1,l=[...r,...n],h=Math.abs(n[c]-r[o]);t.wrap&&t.message&&(t.message=s.u.wrapLabel(t.message,Math.max(h+2*ct.wrapPadding,ct.width),ht(ct)));const d=s.u.calculateTextDimensions(t.message,ht(ct));return{width:Math.max(t.wrap?0:d.width+2*ct.wrapPadding,h+2*ct.wrapPadding,ct.width),height:0,startx:r[o],stopx:n[c],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}}(t,e,i),t.msgModel=h,h.startx&&h.stopx&&o.length>0&&o.forEach((a=>{if(c=a,h.startx===h.stopx){const a=e[t.from],i=e[t.to];c.from=Math.min(a.x-h.width/2,a.x-a.width/2,c.from),c.to=Math.max(i.x+h.width/2,i.x+a.width/2,c.to),c.width=Math.max(c.width,Math.abs(c.to-c.from))-ct.labelBoxWidth}else c.from=Math.min(h.startx,c.from),c.to=Math.max(h.stopx,c.to),c.width=Math.max(c.width,h.width)-ct.labelBoxWidth})))})),lt.activations=[],r.l.debug("Loop type widths:",n),n}(m,u,0,i);Z(p),at(p),tt(p),et(p);let w=1,_=1;const v=[];m.forEach((function(t){let e,a,n;switch(t.type){case i.db.LINETYPE.NOTE:a=t.noteModel,function(t,e){lt.bumpVerticalPos(ct.boxMargin),e.height=ct.boxMargin,e.starty=lt.getVerticalPos();const a=ot();a.x=e.startx,a.y=e.starty,a.width=e.width||ct.width,a.class="note";const i=t.append("g"),r=H(i,a),n=st();n.x=e.startx,n.y=e.starty,n.width=a.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=ct.noteFontFamily,n.fontSize=ct.noteFontSize,n.fontWeight=ct.noteFontWeight,n.anchor=ct.noteAlign,n.textMargin=ct.noteMargin,n.valign="center";const s=Y(i,n),o=Math.round(s.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));r.attr("height",o+2*ct.noteMargin),e.height+=o+2*ct.noteMargin,lt.bumpVerticalPos(o+2*ct.noteMargin),e.stopy=e.starty+o+2*ct.noteMargin,e.stopx=e.startx+a.width,lt.insert(e.startx,e.starty,e.stopx,e.stopy),lt.models.addNote(e)}(p,a);break;case i.db.LINETYPE.ACTIVE_START:lt.newActivation(t,p,u);break;case i.db.LINETYPE.ACTIVE_END:!function(t,e){const a=lt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),G(p,a,e,ct,mt(t.from.actor).length),lt.insert(a.startx,e-10,a.stopx,e)}(t,lt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:bt(E,t,ct.boxMargin,ct.boxMargin+ct.boxTextMargin,(t=>lt.newLoop(t)));break;case i.db.LINETYPE.LOOP_END:e=lt.endLoop(),J(p,e,"loop",ct),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos()),lt.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:bt(E,t,ct.boxMargin,ct.boxMargin,(t=>lt.newLoop(void 0,t.message)));break;case i.db.LINETYPE.RECT_END:e=lt.endLoop(),Q(p,e),lt.models.addLoop(e),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:bt(E,t,ct.boxMargin,ct.boxMargin+ct.boxTextMargin,(t=>lt.newLoop(t)));break;case i.db.LINETYPE.OPT_END:e=lt.endLoop(),J(p,e,"opt",ct),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos()),lt.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:bt(E,t,ct.boxMargin,ct.boxMargin+ct.boxTextMargin,(t=>lt.newLoop(t)));break;case i.db.LINETYPE.ALT_ELSE:bt(E,t,ct.boxMargin+ct.boxTextMargin,ct.boxMargin,(t=>lt.addSectionToLoop(t)));break;case i.db.LINETYPE.ALT_END:e=lt.endLoop(),J(p,e,"alt",ct),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos()),lt.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:bt(E,t,ct.boxMargin,ct.boxMargin+ct.boxTextMargin,(t=>lt.newLoop(t)));break;case i.db.LINETYPE.PAR_AND:bt(E,t,ct.boxMargin+ct.boxTextMargin,ct.boxMargin,(t=>lt.addSectionToLoop(t)));break;case i.db.LINETYPE.PAR_END:e=lt.endLoop(),J(p,e,"par",ct),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos()),lt.models.addLoop(e);break;case i.db.LINETYPE.AUTONUMBER:w=t.message.start||w,_=t.message.step||_,t.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:bt(E,t,ct.boxMargin,ct.boxMargin+ct.boxTextMargin,(t=>lt.newLoop(t)));break;case i.db.LINETYPE.CRITICAL_OPTION:bt(E,t,ct.boxMargin+ct.boxTextMargin,ct.boxMargin,(t=>lt.addSectionToLoop(t)));break;case i.db.LINETYPE.CRITICAL_END:e=lt.endLoop(),J(p,e,"critical",ct),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos()),lt.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:bt(E,t,ct.boxMargin,ct.boxMargin+ct.boxTextMargin,(t=>lt.newLoop(t)));break;case i.db.LINETYPE.BREAK_END:e=lt.endLoop(),J(p,e,"break",ct),lt.bumpVerticalPos(e.stopy-lt.getVerticalPos()),lt.models.addLoop(e);break;default:try{n=t.msgModel,n.starty=lt.getVerticalPos(),n.sequenceIndex=w,n.sequenceVisible=i.db.showSequenceNumbers();const e=function(t,e){lt.bumpVerticalPos(10);const{startx:a,stopx:i,message:n}=e,o=r.e.splitBreaks(n).length,c=s.u.calculateTextDimensions(n,ht(ct)),l=c.height/o;let h;e.height+=l,lt.bumpVerticalPos(l);let d=c.height-10;const p=c.width;if(a===i){h=lt.getVerticalPos()+d,ct.rightAngles||(d+=ct.boxMargin,h=lt.getVerticalPos()+d),d+=30;const t=Math.max(p/2,ct.width/2);lt.insert(a-t,lt.getVerticalPos()-10+d,i+t,lt.getVerticalPos()+30+d)}else d+=ct.boxMargin,h=lt.getVerticalPos()+d,lt.insert(a,h-10,i,h);return lt.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,lt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),h}(0,n);v.push({messageModel:n,lineStartY:e}),lt.models.addMessage(n)}catch(t){r.l.error("error while drawing message",t)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(w+=_)})),v.forEach((t=>function(t,e,a,i){const{startx:r,stopx:n,starty:o,message:c,type:l,sequenceIndex:h,sequenceVisible:d}=e,p=s.u.calculateTextDimensions(c,ht(ct)),u=st();u.x=r,u.y=o+10,u.width=n-r,u.class="messageText",u.dy="1em",u.text=c,u.fontFamily=ct.messageFontFamily,u.fontSize=ct.messageFontSize,u.fontWeight=ct.messageFontWeight,u.anchor=ct.messageAlign,u.valign="center",u.textMargin=ct.wrapPadding,u.tspan=!1,Y(t,u);const g=p.width;let x;r===n?x=ct.rightAngles?t.append("path").attr("d",`M  ${r},${a} H ${r+Math.max(ct.width/2,g/2)} V ${a+25} H ${r}`):t.append("path").attr("d","M "+r+","+a+" C "+(r+60)+","+(a-10)+" "+(r+60)+","+(a+30)+" "+r+","+(a+20)):(x=t.append("line"),x.attr("x1",r),x.attr("y1",a),x.attr("x2",n),x.attr("y2",a)),l===i.db.LINETYPE.DOTTED||l===i.db.LINETYPE.DOTTED_CROSS||l===i.db.LINETYPE.DOTTED_POINT||l===i.db.LINETYPE.DOTTED_OPEN?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0");let m="";ct.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),l!==i.db.LINETYPE.SOLID&&l!==i.db.LINETYPE.DOTTED||x.attr("marker-end","url("+m+"#arrowhead)"),l!==i.db.LINETYPE.SOLID_POINT&&l!==i.db.LINETYPE.DOTTED_POINT||x.attr("marker-end","url("+m+"#filled-head)"),l!==i.db.LINETYPE.SOLID_CROSS&&l!==i.db.LINETYPE.DOTTED_CROSS||x.attr("marker-end","url("+m+"#crosshead)"),(d||ct.showSequenceNumbers)&&(x.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))}(p,t.messageModel,t.lineStartY,i))),ct.mirrorActors&&(lt.bumpVerticalPos(2*ct.boxMargin),ut(p,u,x,lt.getVerticalPos(),ct,m,!0),lt.bumpVerticalPos(ct.boxMargin),B(p,lt.getVerticalPos())),lt.models.boxes.forEach((function(t){t.height=lt.getVerticalPos()-t.y,lt.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",j(p,t,ct)})),b&&lt.bumpVerticalPos(ct.boxMargin);const k=gt(p,u,x,d),{bounds:L}=lt.getBounds();r.l.debug("For line height fix Querying: #"+e+" .actor-line"),(0,n.td_)("#"+e+" .actor-line").attr("y2",L.stopy);let P=L.stopy-L.starty;P<k.maxHeight&&(P=k.maxHeight);let I=P+2*ct.diagramMarginY;ct.mirrorActors&&(I=I-ct.boxMargin+ct.bottomMarginAdj);let M=L.stopx-L.startx;M<k.maxWidth&&(M=k.maxWidth);const N=M+2*ct.diagramMarginX;y&&p.append("text").text(y).attr("x",(L.stopx-L.startx)/2-2*ct.diagramMarginX).attr("y",-25),(0,s.k)(p,I,N,ct.useMaxWidth);const A=y?40:0;p.attr("viewBox",L.startx-ct.diagramMarginX+" -"+(ct.diagramMarginY+A)+" "+N+" "+(I+A)),r.l.debug("models:",lt.models)}},styles:t=>`.actor {\n    stroke: ${t.actorBorder};\n    fill: ${t.actorBkg};\n  }\n\n  text.actor > tspan {\n    fill: ${t.actorTextColor};\n    stroke: none;\n  }\n\n  .actor-line {\n    stroke: ${t.actorLineColor};\n  }\n\n  .messageLine0 {\n    stroke-width: 1.5;\n    stroke-dasharray: none;\n    stroke: ${t.signalColor};\n  }\n\n  .messageLine1 {\n    stroke-width: 1.5;\n    stroke-dasharray: 2, 2;\n    stroke: ${t.signalColor};\n  }\n\n  #arrowhead path {\n    fill: ${t.signalColor};\n    stroke: ${t.signalColor};\n  }\n\n  .sequenceNumber {\n    fill: ${t.sequenceNumberColor};\n  }\n\n  #sequencenumber {\n    fill: ${t.signalColor};\n  }\n\n  #crosshead path {\n    fill: ${t.signalColor};\n    stroke: ${t.signalColor};\n  }\n\n  .messageText {\n    fill: ${t.signalTextColor};\n    stroke: none;\n  }\n\n  .labelBox {\n    stroke: ${t.labelBoxBorderColor};\n    fill: ${t.labelBoxBkgColor};\n  }\n\n  .labelText, .labelText > tspan {\n    fill: ${t.labelTextColor};\n    stroke: none;\n  }\n\n  .loopText, .loopText > tspan {\n    fill: ${t.loopTextColor};\n    stroke: none;\n  }\n\n  .loopLine {\n    stroke-width: 2px;\n    stroke-dasharray: 2, 2;\n    stroke: ${t.labelBoxBorderColor};\n    fill: ${t.labelBoxBorderColor};\n  }\n\n  .note {\n    //stroke: #decc93;\n    stroke: ${t.noteBorderColor};\n    fill: ${t.noteBkgColor};\n  }\n\n  .noteText, .noteText > tspan {\n    fill: ${t.noteTextColor};\n    stroke: none;\n  }\n\n  .activation0 {\n    fill: ${t.activationBkgColor};\n    stroke: ${t.activationBorderColor};\n  }\n\n  .activation1 {\n    fill: ${t.activationBkgColor};\n    stroke: ${t.activationBorderColor};\n  }\n\n  .activation2 {\n    fill: ${t.activationBkgColor};\n    stroke: ${t.activationBorderColor};\n  }\n\n  .actorPopupMenu {\n    position: absolute;\n  }\n\n  .actorPopupMenuPanel {\n    position: absolute;\n    fill: ${t.actorBkg};\n    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n    filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n  .actor-man line {\n    stroke: ${t.actorBorder};\n    fill: ${t.actorBkg};\n  }\n  .actor-man circle, line {\n    stroke: ${t.actorBorder};\n    fill: ${t.actorBkg};\n    stroke-width: 2px;\n  }\n`}}}]);