@spteck/react-controls-v2 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_arrayEach-BtnPcZvU.cjs → _arrayEach-DBvjR1ge.cjs} +2 -2
- package/dist/{_arrayEach-8mS77K-T.js → _arrayEach-DKae2bvp.js} +2 -2
- package/dist/abstractions/IBrandCenterFonts.d.ts +74 -3
- package/dist/{arc-5yDizpVi.js → arc-BxA6Yg5_.js} +2 -2
- package/dist/{arc-CHX8tzAa.cjs → arc-iq0incG2.cjs} +2 -2
- package/dist/{architecture-7HQA4BMR-C5SMaY7N.cjs → architecture-7HQA4BMR-BV5Wih0x.cjs} +2 -2
- package/dist/architecture-7HQA4BMR-ClndFXiy.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-aOTrDewq.js → architectureDiagram-VXUJARFQ-Qlis18u8.js} +4 -4
- package/dist/{architectureDiagram-VXUJARFQ-BGkw31EW.cjs → architectureDiagram-VXUJARFQ-idhniCOT.cjs} +2 -2
- package/dist/{blockDiagram-VD42YOAC-B-_xQI8-.cjs → blockDiagram-VD42YOAC-3JpJsqTW.cjs} +2 -2
- package/dist/{blockDiagram-VD42YOAC-BmLAe2UB.js → blockDiagram-VD42YOAC-DBPKc5Mp.js} +5 -5
- package/dist/{c4Diagram-YG6GDRKO-B-1eU6OG.cjs → c4Diagram-YG6GDRKO-bFh-ym0I.cjs} +2 -2
- package/dist/{c4Diagram-YG6GDRKO-BLrKS_53.js → c4Diagram-YG6GDRKO-bZ0lq-1j.js} +3 -3
- package/dist/channel-COiQ5BLW.cjs +2 -0
- package/dist/{channel-BlDl0fWH.js → channel-o3CxcuKH.js} +2 -2
- package/dist/{chunk-4BX2VUAB-BPQfw6VK.cjs → chunk-4BX2VUAB-ChffNeve.cjs} +2 -2
- package/dist/{chunk-4BX2VUAB-BhTmbZ0P.js → chunk-4BX2VUAB-FrHmkgoD.js} +2 -2
- package/dist/{chunk-55IACEB6-BFvNZWL0.js → chunk-55IACEB6-B20avCOS.js} +2 -2
- package/dist/{chunk-55IACEB6-CBWgQHsL.cjs → chunk-55IACEB6-CWMSWgS5.cjs} +2 -2
- package/dist/{chunk-B4BG7PRW-CqAtQU-I.js → chunk-B4BG7PRW-1JkjmMxQ.js} +5 -5
- package/dist/{chunk-B4BG7PRW-so74-wMy.cjs → chunk-B4BG7PRW-DHxN3AGv.cjs} +2 -2
- package/dist/{chunk-DI55MBZ5-BhxfU0Wh.cjs → chunk-DI55MBZ5-BHiUtZoK.cjs} +2 -2
- package/dist/{chunk-DI55MBZ5-BdBqxSCP.js → chunk-DI55MBZ5-Cekk--Cm.js} +4 -4
- package/dist/{chunk-FMBD7UC4-BQChMkqq.cjs → chunk-FMBD7UC4-AWB24rK9.cjs} +2 -2
- package/dist/{chunk-FMBD7UC4-CCEhBtde.js → chunk-FMBD7UC4-Bgpu0FwP.js} +2 -2
- package/dist/{chunk-QN33PNHL-DptvB12p.cjs → chunk-QN33PNHL-BDQd2juq.cjs} +2 -2
- package/dist/{chunk-QN33PNHL-C6wEvbod.js → chunk-QN33PNHL-GOKY5hea.js} +2 -2
- package/dist/{chunk-QZHKN3VN-CWjhIJ4p.js → chunk-QZHKN3VN-DXRnlHEw.js} +2 -2
- package/dist/{chunk-QZHKN3VN-BwPGFWEQ.cjs → chunk-QZHKN3VN-DrSljM5O.cjs} +2 -2
- package/dist/{chunk-TZMSLE5B-BulfQyEg.js → chunk-TZMSLE5B-BERoVTPQ.js} +2 -2
- package/dist/{chunk-TZMSLE5B-Md78hDFm.cjs → chunk-TZMSLE5B-CxGg52ib.cjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CZEKavO0.cjs → classDiagram-2ON5EDUG-BPjkW57C.cjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-DBkePYfg.js → classDiagram-2ON5EDUG-DPTzQt7M.js} +3 -3
- package/dist/{classDiagram-v2-WZHVMYZB-CZEKavO0.cjs → classDiagram-v2-WZHVMYZB-BPjkW57C.cjs} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-DBkePYfg.js → classDiagram-v2-WZHVMYZB-DPTzQt7M.js} +3 -3
- package/dist/{cose-bilkent-S5V4N54A-ZBFo9U8K.js → cose-bilkent-S5V4N54A-BCPhea22.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-CKKVaKER.cjs → cose-bilkent-S5V4N54A-C6osVExR.cjs} +2 -2
- package/dist/{dagre-6UL2VRFP-B0QLpgAH.cjs → dagre-6UL2VRFP-D6NU_G7J.cjs} +2 -2
- package/dist/{dagre-6UL2VRFP-gVFAp2xo.js → dagre-6UL2VRFP-DF87v2SP.js} +2 -2
- package/dist/{diagram-PSM6KHXK-B8PzNDiz.cjs → diagram-PSM6KHXK-BpcNw66L.cjs} +2 -2
- package/dist/{diagram-PSM6KHXK-BgpltQW9.js → diagram-PSM6KHXK-DMBrza7v.js} +5 -5
- package/dist/{diagram-QEK2KX5R-BSfzwv7M.cjs → diagram-QEK2KX5R-Bokx4-2m.cjs} +2 -2
- package/dist/{diagram-QEK2KX5R-B59l1ou-.js → diagram-QEK2KX5R-DXPwxq0x.js} +4 -4
- package/dist/{diagram-S2PKOQOG-Bk91GOvc.cjs → diagram-S2PKOQOG-5Lk7Jvxw.cjs} +2 -2
- package/dist/{diagram-S2PKOQOG-CcfpCRwG.js → diagram-S2PKOQOG-BML4CSFv.js} +4 -4
- package/dist/{erDiagram-Q2GNP2WA-BD25OJ7l.cjs → erDiagram-Q2GNP2WA-C0YzWGzs.cjs} +2 -2
- package/dist/{erDiagram-Q2GNP2WA-lrJ1SGpr.js → erDiagram-Q2GNP2WA-DtyOHj8U.js} +5 -5
- package/dist/{flowDiagram-NV44I4VS-Df1uvtZp.js → flowDiagram-NV44I4VS-8LGULBMT.js} +6 -6
- package/dist/{flowDiagram-NV44I4VS-DpxYrjDI.cjs → flowDiagram-NV44I4VS-D9Ha29xd.cjs} +2 -2
- package/dist/{ganttDiagram-JELNMOA3-CTXqXyUF.js → ganttDiagram-JELNMOA3-BTIJYy7v.js} +3 -3
- package/dist/{ganttDiagram-JELNMOA3-BuEjfD0h.cjs → ganttDiagram-JELNMOA3-BfA1s6s8.cjs} +2 -2
- package/dist/gitGraph-G5XIXVHT-4SUZU9x4.js +6 -0
- package/dist/{gitGraph-G5XIXVHT-BWFVrIFT.cjs → gitGraph-G5XIXVHT-CJquxsrP.cjs} +2 -2
- package/dist/{gitGraphDiagram-V2S2FVAM-BEAiApuY.js → gitGraphDiagram-V2S2FVAM-BDuvfgFm.js} +5 -5
- package/dist/{gitGraphDiagram-V2S2FVAM-Bjrr2nre.cjs → gitGraphDiagram-V2S2FVAM-DgaiLSV0.cjs} +2 -2
- package/dist/hooks/useBrandCenterFonts.d.ts +3 -1
- package/dist/{index-CAoOhLkP.cjs → index-DBmfYPjr.cjs} +33 -33
- package/dist/{index-vFWWvdca.js → index-r6bYN_1a.js} +177 -58
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/info-VBDWY6EO-ChLOw2tm.js +6 -0
- package/dist/{info-VBDWY6EO-YkPxeRZ-.cjs → info-VBDWY6EO-hYQZ7BB0.cjs} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-DHcFj6RC.cjs → infoDiagram-HS3SLOUP-CbvZczcy.cjs} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-DPo4m3Oc.js → infoDiagram-HS3SLOUP-FP_yig69.js} +3 -3
- package/dist/{journeyDiagram-XKPGCS4Q-B5mteNXQ.cjs → journeyDiagram-XKPGCS4Q-CEFFFkKd.cjs} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-yOgvceJk.js → journeyDiagram-XKPGCS4Q-CiJ6zb1i.js} +5 -5
- package/dist/{kanban-definition-3W4ZIXB7-B2LjQzC5.js → kanban-definition-3W4ZIXB7-CGmr8XfQ.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-BJdCPi_F.cjs → kanban-definition-3W4ZIXB7-DCwMWi3p.cjs} +2 -2
- package/dist/{linear-DHjw4hvs.cjs → linear-D8E_synt.cjs} +2 -2
- package/dist/{linear-BI5TRYfw.js → linear-DnGQibMg.js} +2 -2
- package/dist/{maplibre-gl-BAtlodKY.js → maplibre-gl-dCwYGQU4.js} +2 -2
- package/dist/{maplibre-gl-BOvA2Ll0.cjs → maplibre-gl-pYF_ngpG.cjs} +2 -2
- package/dist/{mermaid-parser.core-or1HXQYP.js → mermaid-parser.core-CWz1o5JP.js} +10 -10
- package/dist/{mermaid-parser.core-BQzkWune.cjs → mermaid-parser.core-DDF0ccOL.cjs} +2 -2
- package/dist/{mindmap-definition-VGOIOE7T-BX31I3PY.js → mindmap-definition-VGOIOE7T-C5MXjRc9.js} +4 -4
- package/dist/{mindmap-definition-VGOIOE7T-BPCXwiSh.cjs → mindmap-definition-VGOIOE7T-FjKtYkWd.cjs} +2 -2
- package/dist/{packet-DYOGHKS2-ClruFccz.cjs → packet-DYOGHKS2-D1v8Vy1g.cjs} +2 -2
- package/dist/packet-DYOGHKS2-gRUdnnSs.js +6 -0
- package/dist/pie-VRWISCQL-Bvcic2Eu.js +6 -0
- package/dist/{pie-VRWISCQL-DUiOByGp.cjs → pie-VRWISCQL-DmeMueEW.cjs} +2 -2
- package/dist/{pieDiagram-ADFJNKIX-CL_8VDsb.js → pieDiagram-ADFJNKIX-6fWPR7Ls.js} +5 -5
- package/dist/{pieDiagram-ADFJNKIX-OI8gruuh.cjs → pieDiagram-ADFJNKIX-Cvyyoe7M.cjs} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-iD_dxfNt.js → quadrantDiagram-AYHSOK5B-BgXQivu3.js} +3 -3
- package/dist/{quadrantDiagram-AYHSOK5B-DjOcdqwN.cjs → quadrantDiagram-AYHSOK5B-CwDe4KwO.cjs} +2 -2
- package/dist/{radar-ZZBFDIW7-KeBFLHcK.cjs → radar-ZZBFDIW7-DO0muZs0.cjs} +2 -2
- package/dist/radar-ZZBFDIW7-DkPYS2s4.js +6 -0
- package/dist/{requirementDiagram-UZGBJVZJ-DQbSltZv.js → requirementDiagram-UZGBJVZJ-CeIJ08b_.js} +4 -4
- package/dist/{requirementDiagram-UZGBJVZJ-CoPWc6eZ.cjs → requirementDiagram-UZGBJVZJ-z39KmEdg.cjs} +2 -2
- package/dist/{sankeyDiagram-TZEHDZUN-yGUhPXDs.cjs → sankeyDiagram-TZEHDZUN-B9TuJmd0.cjs} +2 -2
- package/dist/{sankeyDiagram-TZEHDZUN-4xAWn_AO.js → sankeyDiagram-TZEHDZUN-DmMl4azI.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-BCilDg3f.js → sequenceDiagram-WL72ISMW-CcjLhIox.js} +4 -4
- package/dist/{sequenceDiagram-WL72ISMW-CQFu5gn5.cjs → sequenceDiagram-WL72ISMW-ChX1PErX.cjs} +2 -2
- package/dist/{stateDiagram-FKZM4ZOC-BKlriLiy.cjs → stateDiagram-FKZM4ZOC-DNXrTtku.cjs} +2 -2
- package/dist/{stateDiagram-FKZM4ZOC-DTQxNxM0.js → stateDiagram-FKZM4ZOC-zQUhlqIe.js} +3 -3
- package/dist/{stateDiagram-v2-4FDKWEC3-C3-DQJ_j.cjs → stateDiagram-v2-4FDKWEC3-BEegnVik.cjs} +2 -2
- package/dist/{stateDiagram-v2-4FDKWEC3-BS-Rbuf4.js → stateDiagram-v2-4FDKWEC3-Dtg323pE.js} +3 -3
- package/dist/{timeline-definition-IT6M3QCI-C-6fhIAz.js → timeline-definition-IT6M3QCI-Cf4OkFlr.js} +3 -3
- package/dist/{timeline-definition-IT6M3QCI-BUZIaC_t.cjs → timeline-definition-IT6M3QCI-Do30fWDV.cjs} +2 -2
- package/dist/{treemap-GDKQZRPO-D-lYWdWn.cjs → treemap-GDKQZRPO-BecKu0FE.cjs} +2 -2
- package/dist/treemap-GDKQZRPO-CoIiWGS-.js +6 -0
- package/dist/{xychartDiagram-PRI3JC2R-DPXNUchU.cjs → xychartDiagram-PRI3JC2R-haWlXFUn.cjs} +2 -2
- package/dist/{xychartDiagram-PRI3JC2R-DV2aHw-9.js → xychartDiagram-PRI3JC2R-zMeDgcPs.js} +3 -3
- package/package.json +1 -1
- package/dist/architecture-7HQA4BMR-QRAO6LZs.js +0 -6
- package/dist/channel-CavBJovq.cjs +0 -2
- package/dist/gitGraph-G5XIXVHT-CQDP2vEd.js +0 -6
- package/dist/info-VBDWY6EO-QvquFFhY.js +0 -6
- package/dist/packet-DYOGHKS2-Bse7YjBO.js +0 -6
- package/dist/pie-VRWISCQL-Q3eU4qER.js +0 -6
- package/dist/radar-ZZBFDIW7-e5irSdhY.js +0 -6
- package/dist/treemap-GDKQZRPO-DYKBo0ui.js +0 -6
package/dist/{sequenceDiagram-WL72ISMW-CQFu5gn5.cjs → sequenceDiagram-WL72ISMW-ChX1PErX.cjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunk-TZMSLE5B-Md78hDFm.cjs"),a=require("./index-CAoOhLkP.cjs"),s=require("./chunk-QZHKN3VN-BwPGFWEQ.cjs");var r=function(){var t=a.__name(function(t,e,a,s){for(a=a||{},s=t.length;s--;a[t[s]]=e);return a},"o"),e=[1,2],s=[1,3],r=[1,4],i=[2,4],n=[1,9],o=[1,11],c=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],m=[1,26],x=[1,27],y=[1,28],_=[1,29],f=[1,30],b=[1,31],T=[1,32],E=[1,33],w=[1,34],I=[1,35],L=[1,36],P=[1,37],k=[1,38],N=[1,39],v=[1,41],A=[1,42],M=[1,43],O=[1,44],S=[1,45],D=[1,46],R=[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,55,60,61,62,63,71],C=[2,71],$=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],Y=[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,55,60,61,62,63,71],V=[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,55,60,61,62,63,71],F=[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,55,60,61,62,63,71],W=[69,70,71],q=[1,127],z={trace:a.__name(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,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$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",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"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],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:a.__name(function(t,e,a,s,r,i,n){var o=i.length-1;switch(r){case 3:return s.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 63:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:s.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:s.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:s.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:s.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),s.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),s.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:s.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:s.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:s.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:case 53:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 54:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 55:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:s.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 59:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-2],i[o]];break;case 64:this.$=s.PLACEMENT.LEFTOF;break;case 65:this.$=s.PLACEMENT.RIGHTOF;break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 67:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 68:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 69:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 70:this.$=i[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:i[o]};break;case 72:this.$=s.LINETYPE.SOLID_OPEN;break;case 73:this.$=s.LINETYPE.DOTTED_OPEN;break;case 74:this.$=s.LINETYPE.SOLID;break;case 75:this.$=s.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=s.LINETYPE.DOTTED;break;case 77:this.$=s.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=s.LINETYPE.SOLID_CROSS;break;case 79:this.$=s.LINETYPE.DOTTED_CROSS;break;case 80:this.$=s.LINETYPE.SOLID_POINT;break;case 81:this.$=s.LINETYPE.DOTTED_POINT;break;case 82:this.$=s.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:s,6:r},{1:[3]},{3:5,4:e,5:s,6:r},{3:6,4:e,5:s,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,55,60,61,62,63,71],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:o,8:8,9:10,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},t(R,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:P,52:k,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:D},{22:55,71:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[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,54:72,71:[1,73]},{22:74,71:D},{22:75,71:D},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:D},{22:92,71:D},{22:93,71:D},{22:94,71:D},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],C),t(R,[2,6]),t(R,[2,15]),t($,[2,9],{10:95}),t(R,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(R,[2,21]),{5:[1,99]},{5:[1,100]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(B,i,{7:101}),t(B,i,{7:102}),t(B,i,{7:103}),t(Y,i,{40:104,7:105}),t(V,i,{42:106,7:107}),t(V,i,{7:107,42:108}),t(F,i,{45:109,7:110}),t(B,i,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],C,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:D},t(W,[2,72]),t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(W,[2,79]),t(W,[2,80]),t(W,[2,81]),{22:123,71:D},{22:125,59:124,71:D},{71:[2,64]},{71:[2,65]},{57:126,86:q},{57:128,86:q},{57:129,86:q},{57:130,86:q},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:P,52:k,53:N},{5:[1,136]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,137],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,138],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,139],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{16:[1,140]},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,49:[1,141],50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{16:[1,142]},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,48:[1,143],50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{16:[1,144]},{16:[1,145]},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,47:[1,146],50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,147],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{15:[1,148]},t(R,[2,49]),t(R,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(R,[2,51]),t(R,[2,52]),{22:151,71:D},{22:152,71:D},{57:153,86:q},{57:154,86:q},{57:155,86:q},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(R,[2,16]),t($,[2,10]),{12:157,50:P,52:k,53:N},t($,[2,12]),t($,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,158]},t(R,[2,38]),{15:[1,159]},t(R,[2,39]),t(R,[2,40]),{15:[1,160]},t(R,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:q},{57:165,86:q},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:D},t($,[2,11]),t(Y,i,{7:105,40:167}),t(V,i,{7:107,42:168}),t(F,i,{7:110,45:169}),t(R,[2,48]),{5:[2,70]},t(R,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:a.__name(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:a.__name(function(t){var e=this,s=[0],r=[],i=[null],n=[],o=this.table,c="",l=0,d=0,h=n.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(g.yy[u]=this.yy[u]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;n.push(m);var x=p.options&&p.options.ranges;function y(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a.__name(function(t){s.length=s.length-2*t,i.length=i.length-t,n.length=n.length-t},"popStack"),a.__name(y,"lex");for(var _,f,b,T,E,w,I,L,P={};;){if(f=s[s.length-1],this.defaultActions[f]?b=this.defaultActions[f]:(null==_&&(_=y()),b=o[f]&&o[f][_]),void 0===b||!b.length||!b[0]){var k="";for(E in L=[],o[f])this.terminals_[E]&&E>2&&L.push("'"+this.terminals_[E]+"'");k=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(k,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:L})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+_);switch(b[0]){case 1:s.push(_),i.push(p.yytext),n.push(p.yylloc),s.push(b[1]),_=null,d=p.yyleng,c=p.yytext,l=p.yylineno,m=p.yylloc;break;case 2:if(w=this.productions_[b[1]][1],P.$=i[i.length-w],P._$={first_line:n[n.length-(w||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(w||1)].first_column,last_column:n[n.length-1].last_column},x&&(P._$.range=[n[n.length-(w||1)].range[0],n[n.length-1].range[1]]),void 0!==(T=this.performAction.apply(P,[c,d,l,g.yy,b[1],i,n].concat(h))))return T;w&&(s=s.slice(0,-1*w*2),i=i.slice(0,-1*w),n=n.slice(0,-1*w)),s.push(this.productions_[b[1]][0]),i.push(P.$),n.push(P._$),I=o[s[s.length-2]][s[s.length-1]],s.push(I);break;case 3:return!0}}return!0},"parse")},H=function(){return{EOF:1,parseError:a.__name(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a.__name(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},"setInput"),input:a.__name(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},"input"),unput:a.__name(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 s=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===s.length?this.yylloc.first_column:0)+s[s.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},"unput"),more:a.__name(function(){return this._more=!0,this},"more"),reject:a.__name(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})},"reject"),less:a.__name(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a.__name(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a.__name(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,"")},"upcomingInput"),showPosition:a.__name(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a.__name(function(t,e){var a,s,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))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.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 i in r)this[i]=r[i];return!1}return!1},"test_match"),next:a.__name(function(){if(this.done)return this.EOF;var t,e,a,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;i<r.length;i++)if((a=this._input.match(this.rules[r[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&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})},"next"),lex:a.__name(function(){var t=this.next();return t||this.lex()},"lex"),begin:a.__name(function(t){this.conditionStack.push(t)},"begin"),popState:a.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a.__name(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:a.__name(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a.__name(function(t){this.begin(t)},"pushState"),stateStackSize:a.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a.__name(function(t,e,a,s){switch(a){case 0:case 56:case 72:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:case 57:return e.yytext=e.yytext.trim(),71;case 11:case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\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,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}}}();function j(){this.yy={}}return z.lexer=H,a.__name(j,"Parser"),j.prototype=z,z.Parser=j,new j}();r.parser=r;var i=r,n={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},o={FILLED:0,OPEN:1},c={LEFTOF:0,RIGHTOF:1,OVER:2},l="actor",d="control",h="database",p="entity",g=(t=class{constructor(){this.state=new s.ImperativeState(()=>({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})),this.setAccTitle=a.setAccTitle,this.setAccDescription=a.setAccDescription,this.setDiagramTitle=a.setDiagramTitle,this.getAccTitle=a.getAccTitle,this.getAccDescription=a.getAccDescription,this.getDiagramTitle=a.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(a.getConfig2().wrap),this.LINETYPE=n,this.ARROWTYPE=o,this.PLACEMENT=c}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,s,r,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=a.load(t,{schema:a.JSON_SCHEMA})}r=(null==n?void 0:n.type)??r;const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==s)return}if(null==(null==s?void 0:s.text)&&(s={text:e,type:r}),null!=r&&null!=s.text||(s={text:e,type:r}),this.state.records.actors.set(t,{box:o,name:e,description:s.text,wrap:s.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,s){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:s})}addSignal(t,e,a,s,r=!1){if(s===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:(null==a?void 0:a.text)??"",wrap:(null==a?void 0:a.wrap)??this.autoWrap(),type:s,activate:r}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){var t;return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(null==(t=a.getConfig2().sequence)?void 0:t.wrap)??!1}clear(){this.state.reset(),a.clear()}parseMessage(t){const e=t.trim(),{wrap:s,cleanedText:r}=this.extractWrap(e),i={text:r,wrap:s};return a.log.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let s=(null==e?void 0:e[1])?e[1].trim():"transparent",r=(null==e?void 0:e[2])?e[2].trim():void 0;if(null==window?void 0:window.CSS)window.CSS.supports("color",s)||(s="transparent",r=t.trim());else{const e=(new Option).style;e.color=s,e.color!==s&&(s="transparent",r=t.trim())}const{wrap:i,cleanedText:n}=this.extractWrap(r);return{text:n?a.sanitizeText(n,a.getConfig2()):void 0,color:s,wrap:i}}addNote(t,e,a){const s={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},r=[].concat(t,t);this.state.records.notes.push(s),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r[0],to:r[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const s=this.getActor(t);try{let t=a.sanitizeText(e.text,a.getConfig2());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const r=JSON.parse(t);this.insertLinks(s,r)}catch(r){a.log.error("error while parsing actor link text",r)}}addALink(t,e){const s=this.getActor(t);try{const t={};let r=a.sanitizeText(e.text,a.getConfig2());const i=r.indexOf("@");r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");const n=r.slice(0,i-1).trim(),o=r.slice(i+1).trim();t[n]=o,this.insertLinks(s,t)}catch(r){a.log.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const s=this.getActor(t);try{const t=a.sanitizeText(e.text,a.getConfig2()),r=JSON.parse(t);this.insertProperties(s,r)}catch(r){a.log.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const s=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(s,e.properties),e.links&&this.insertLinks(s,e.links)}catch(i){a.log.error("error while parsing actor details text",i)}}getActorProperty(t,e){if(void 0!==(null==t?void 0:t.properties))return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.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");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":a.setAccTitle(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return a.getConfig2().sequence}},a.__name(t,"SequenceDB"),t),u=a.__name(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 .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\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\n`,"getStyles"),m="actor-top",x="actor-bottom",y="actor-box",_="actor-man",f=a.__name(function(t,a){return e.drawRect(t,a)},"drawRect"),b=a.__name(function(t,e,s,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const n=e.links,o=e.actorCnt,c=e.rectData;var l="none";i&&(l="block !important");const d=t.append("g");d.attr("id","actor"+o+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==c.class&&(h=" "+c.class);let p=c.width>s?c.width:s;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",c.x),g.attr("y",c.height),g.attr("fill",c.fill),g.attr("stroke",c.stroke),g.attr("width",p),g.attr("height",c.height),g.attr("rx",c.rx),g.attr("ry",c.ry),null!=n){var u=20;for(let t in n){var m=d.append("a"),x=a.sanitizeUrl_1(n[t]);m.attr("xlink:href",x),m.attr("target","_blank"),Z(r)(t,m,c.x+10,c.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:c.height+u,width:p}},"drawPopup"),T=a.__name(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),E=a.__name(async function(t,e,s=null){let r=t.append("foreignObject");const i=await a.renderKatexSanitized(e.text,a.getConfig()),n=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(n.height)).attr("width",Math.round(n.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",n.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-n.width/2)).attr("y",Math.round(s.y+s.height/2-n.height/2))}else if(s){let{startx:t,stopx:a,starty:i}=s;if(t>a){const e=t;t=a,a=e}r.attr("x",Math.round(t+Math.abs(t-a)/2-n.width/2)),"loopText"===e.class?r.attr("y",Math.round(i)):r.attr("y",Math.round(i-n.height))}return[r]},"drawKatex"),w=a.__name(function(t,e){let s=0,r=0;const i=e.text.split(a.common_default.lineBreakRegex),[n,o]=a.parseFontSize(e.fontSize);let c=[],l=0,d=a.__name(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=a.__name(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":d=a.__name(()=>Math.round(e.y+(s+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":d=a.__name(()=>Math.round(e.y+(s+r+2*e.textMargin)-e.textMargin),"yfunc")}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[h,p]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==n&&(l=h*n);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==o&&i.style("font-size",o),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==l&&i.attr("dy",l);const g=p||a.ZERO_WIDTH_SPACE;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else i.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,s=r),c.push(i)}return c},"drawText"),I=a.__name(function(t,e){function s(t,e,a,s,r){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+s-r)+" "+(t+a-1.2*r)+","+(e+s)+" "+t+","+(e+s)}a.__name(s,"genPoints");const r=t.append("polygon");return r.attr("points",s(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,w(t,e),r},"drawLabel"),L=-1,P=a.__name((t,e,a,s)=>{t.select&&a.forEach(a=>{const r=e.get(a),i=t.select("#actor"+r.actorCnt);!s.mirrorActors&&r.stopy?i.attr("y2",r.stopy+r.height/2):s.mirrorActors&&i.attr("y2",r.stopy)})},"fixLifeLineHeights"),k=a.__name(function(t,s,r,i){var n,o;const c=i?s.stopy:s.starty,l=s.x+s.width/2,d=c+s.height,h=t.append("g").lower();var p=h;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&p.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+L).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),p=h.append("g"),s.actorCnt=L,null!=s.links&&p.attr("id","root-"+L));const g=e.getNoteRect();var u="actor";(null==(n=s.properties)?void 0:n.class)?u=s.properties.class:g.fill="#eaeaea",u+=i?` ${x}`:` ${m}`,g.x=s.x,g.y=c,g.width=s.width,g.height=s.height,g.class=u,g.rx=3,g.ry=3,g.name=s.name;const _=f(p,g);if(s.rectData=g,null==(o=s.properties)?void 0:o.icon){const t=s.properties.icon.trim();"@"===t.charAt(0)?e.drawEmbeddedImage(p,g.x+g.width-20,g.y+10,t.substr(1)):e.drawImage(p,g.x+g.width-20,g.y+10,t)}X(r,a.hasKatex(s.description))(s.description,p,g.x,g.y,g.width,g.height,{class:`actor ${y}`},r);let b=s.height;if(_.node){const t=_.node().getBBox();s.height=t.height,b=t.height}return b},"drawActorTypeParticipant"),N=a.__name(function(t,s,r,i){var n,o;const c=i?s.stopy:s.starty,l=s.x+s.width/2,d=c+s.height,h=t.append("g").lower();var p=h;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&p.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+L).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),p=h.append("g"),s.actorCnt=L,null!=s.links&&p.attr("id","root-"+L));const g=e.getNoteRect();var u="actor";(null==(n=s.properties)?void 0:n.class)?u=s.properties.class:g.fill="#eaeaea",u+=i?` ${x}`:` ${m}`,g.x=s.x,g.y=c,g.width=s.width,g.height=s.height,g.class=u,g.name=s.name;const _={...g,x:g.x+-6,y:g.y+6,class:"actor"},b=f(p,g);if(f(p,_),s.rectData=g,null==(o=s.properties)?void 0:o.icon){const t=s.properties.icon.trim();"@"===t.charAt(0)?e.drawEmbeddedImage(p,g.x+g.width-20,g.y+10,t.substr(1)):e.drawImage(p,g.x+g.width-20,g.y+10,t)}X(r,a.hasKatex(s.description))(s.description,p,g.x-6,g.y+6,g.width,g.height,{class:`actor ${y}`},r);let E=s.height;if(b.node){const t=b.node().getBBox();s.height=t.height,E=t.height}return E},"drawActorTypeCollections"),v=a.__name(function(t,s,r,i){var n,o;const c=i?s.stopy:s.starty,l=s.x+s.width/2,d=c+s.height,h=t.append("g").lower();let p=h;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&p.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+L).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),p=h.append("g"),s.actorCnt=L,null!=s.links&&p.attr("id","root-"+L));const g=e.getNoteRect();let u="actor";(null==(n=s.properties)?void 0:n.class)?u=s.properties.class:g.fill="#eaeaea",u+=i?` ${x}`:` ${m}`,g.x=s.x,g.y=c,g.width=s.width,g.height=s.height,g.class=u,g.name=s.name;const _=g.height/2,f=_/(2.5+g.height/50),b=p.append("g"),E=p.append("g");if(b.append("path").attr("d",`M ${g.x},${g.y+_}\n a ${f},${_} 0 0 0 0,${g.height}\n h ${g.width-2*f}\n a ${f},${_} 0 0 0 0,-${g.height}\n Z\n `).attr("class",u),E.append("path").attr("d",`M ${g.x},${g.y+_}\n a ${f},${_} 0 0 0 0,${g.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",u),b.attr("transform",`translate(${f}, ${-g.height/2})`),E.attr("transform",`translate(${g.width-f}, ${-g.height/2})`),s.rectData=g,null==(o=s.properties)?void 0:o.icon){const t=s.properties.icon.trim(),a=g.x+g.width-20,r=g.y+10;"@"===t.charAt(0)?e.drawEmbeddedImage(p,a,r,t.substr(1)):e.drawImage(p,a,r,t)}X(r,a.hasKatex(s.description))(s.description,p,g.x,g.y,g.width,g.height,{class:`actor ${y}`},r);let w=s.height;const I=b.select("path:last-child");if(I.node()){const t=I.node().getBBox();s.height=t.height,w=t.height}return w},"drawActorTypeQueue"),A=a.__name(function(t,s,r,i){var n;const o=i?s.stopy:s.starty,c=s.x+s.width/2,l=o+75,d=t.append("g").lower();i||(L++,d.append("line").attr("id","actor"+L).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L);const h=t.append("g");let p=_;p+=i?` ${x}`:` ${m}`,h.attr("class",p),h.attr("name",s.name);const g=e.getNoteRect();g.x=s.x,g.y=o,g.fill="#eaeaea",g.width=s.width,g.height=s.height,g.class="actor";const u=s.x+s.width/2,y=o+30;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",u).attr("cy",y).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${u}, ${y-18})`);const f=h.node().getBBox();return s.height=f.height+2*((null==(n=null==r?void 0:r.sequence)?void 0:n.labelBoxHeight)??0),X(r,a.hasKatex(s.description))(s.description,h,g.x,g.y+18+(i?5:10),g.width,g.height,{class:`actor ${_}`},r),s.height},"drawActorTypeControl"),M=a.__name(function(t,s,r,i){var n;const o=i?s.stopy:s.starty,c=s.x+s.width/2,l=o+75,d=t.append("g").lower(),h=t.append("g");let p=_;p+=i?` ${x}`:` ${m}`,h.attr("class",p),h.attr("name",s.name);const g=e.getNoteRect();g.x=s.x,g.y=o,g.fill="#eaeaea",g.width=s.width,g.height=s.height,g.class="actor";const u=s.x+s.width/2,y=o+(i?10:25),f=18;h.append("circle").attr("cx",u).attr("cy",y).attr("r",f).attr("width",s.width).attr("height",s.height),h.append("line").attr("x1",u-f).attr("x2",u+f).attr("y1",y+f).attr("y2",y+f).attr("stroke","#333").attr("stroke-width",2);const b=h.node().getBBox();return s.height=b.height+((null==(n=null==r?void 0:r.sequence)?void 0:n.labelBoxHeight)??0),i||(L++,d.append("line").attr("id","actor"+L).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L),X(r,a.hasKatex(s.description))(s.description,h,g.x,g.y+(i?(y-o+f-5)/2:(y+f-o)/2),g.width,g.height,{class:`actor ${_}`},r),h.attr("transform","translate(0, 9)"),s.height},"drawActorTypeEntity"),O=a.__name(function(t,s,r,i){var n;const o=i?s.stopy:s.starty,c=s.x+s.width/2,l=o+s.height+2*r.boxTextMargin,d=t.append("g").lower();let h=d;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&h.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+L).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),h=d.append("g"),s.actorCnt=L,null!=s.links&&h.attr("id","root-"+L));const p=e.getNoteRect();let g="actor";(null==(n=s.properties)?void 0:n.class)?g=s.properties.class:p.fill="#eaeaea",g+=i?` ${x}`:` ${m}`,p.x=s.x,p.y=o,p.width=s.width,p.height=s.height,p.class=g,p.name=s.name,p.x=s.x,p.y=o;const u=p.width/4,_=p.width/4,f=u/2,b=f/(2.5+u/50),E=h.append("g"),w=`\n M ${p.x},${p.y+b}\n a ${f},${b} 0 0 0 ${u},0\n a ${f},${b} 0 0 0 -${u},0\n l 0,${_-2*b}\n a ${f},${b} 0 0 0 ${u},0\n l 0,-${_-2*b}\n`;E.append("path").attr("d",w).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",g),i?E.attr("transform",`translate(${1.5*u}, ${p.height/4-2*b})`):E.attr("transform",`translate(${1.5*u}, ${(p.height+b)/4})`),s.rectData=p,X(r,a.hasKatex(s.description))(s.description,h,p.x,p.y+(i?(p.height+_)/4:(p.height+b)/2),p.width,p.height,{class:`actor ${y}`},r);const I=E.select("path:last-child");if(I.node()){const t=I.node().getBBox();s.height=t.height+(r.sequence.labelBoxHeight??0)}return s.height},"drawActorTypeDatabase"),S=a.__name(function(t,s,r,i){const n=i?s.stopy:s.starty,o=s.x+s.width/2,c=n+80,l=30,d=t.append("g").lower();i||(L++,d.append("line").attr("id","actor"+L).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L);const h=t.append("g");let p=_;p+=i?` ${x}`:` ${m}`,h.attr("class",p),h.attr("name",s.name);const g=e.getNoteRect();g.x=s.x,g.y=n,g.fill="#eaeaea",g.width=s.width,g.height=s.height,g.class="actor",h.append("line").attr("id","actor-man-torso"+L).attr("x1",s.x+s.width/2-75).attr("y1",n+10).attr("x2",s.x+s.width/2-15).attr("y2",n+10),h.append("line").attr("id","actor-man-arms"+L).attr("x1",s.x+s.width/2-75).attr("y1",n+0).attr("x2",s.x+s.width/2-75).attr("y2",n+20),h.append("circle").attr("cx",s.x+s.width/2).attr("cy",n+10).attr("r",l);const u=h.node().getBBox();return s.height=u.height+(r.sequence.labelBoxHeight??0),X(r,a.hasKatex(s.description))(s.description,h,g.x,g.y+(i?11:18),g.width,g.height,{class:`actor ${_}`},r),h.attr("transform","translate(0,22)"),s.height},"drawActorTypeBoundary"),D=a.__name(function(t,s,r,i){const n=i?s.stopy:s.starty,o=s.x+s.width/2,c=n+80,l=t.append("g").lower();i||(L++,l.append("line").attr("id","actor"+L).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L);const d=t.append("g");let h=_;h+=i?` ${x}`:` ${m}`,d.attr("class",h),d.attr("name",s.name);const p=e.getNoteRect();p.x=s.x,p.y=n,p.fill="#eaeaea",p.width=s.width,p.height=s.height,p.class="actor",p.rx=3,p.ry=3,d.append("line").attr("id","actor-man-torso"+L).attr("x1",o).attr("y1",n+25).attr("x2",o).attr("y2",n+45),d.append("line").attr("id","actor-man-arms"+L).attr("x1",o-18).attr("y1",n+33).attr("x2",o+18).attr("y2",n+33),d.append("line").attr("x1",o-18).attr("y1",n+60).attr("x2",o).attr("y2",n+45),d.append("line").attr("x1",o).attr("y1",n+45).attr("x2",o+18-2).attr("y2",n+60);const g=d.append("circle");g.attr("cx",s.x+s.width/2),g.attr("cy",n+10),g.attr("r",15),g.attr("width",s.width),g.attr("height",s.height);const u=d.node().getBBox();return s.height=u.height,X(r,a.hasKatex(s.description))(s.description,d,p.x,p.y+35,p.width,p.height,{class:`actor ${_}`},r),s.height},"drawActorTypeActor"),R=a.__name(async function(t,e,a,s){switch(e.type){case"actor":return await D(t,e,a,s);case"participant":return await k(t,e,a,s);case"boundary":return await S(t,e,a,s);case"control":return await A(t,e,a,s);case"entity":return await M(t,e,a,s);case"database":return await O(t,e,a,s);case"collections":return await N(t,e,a,s);case"queue":return await v(t,e,a,s)}},"drawActor"),C=a.__name(function(t,e,a){const s=t.append("g");V(s,e),e.name&&X(a)(e.name,s,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),s.lower()},"drawBox"),$=a.__name(function(t){return t.append("g")},"anchorElement"),B=a.__name(function(t,a,s,r,i){const n=e.getNoteRect(),o=a.anchored;n.x=a.startx,n.y=a.starty,n.class="activation"+i%3,n.width=a.stopx-a.startx,n.height=s-a.starty,f(o,n)},"drawActivation"),Y=a.__name(async function(t,s,r,i){const{boxMargin:n,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=i,g=t.append("g"),u=a.__name(function(t,e,a,s){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",s).attr("class","loopLine")},"drawLoopLine");u(s.startx,s.starty,s.stopx,s.starty),u(s.stopx,s.starty,s.stopx,s.stopy),u(s.startx,s.stopy,s.stopx,s.stopy),u(s.startx,s.starty,s.startx,s.stopy),void 0!==s.sections&&s.sections.forEach(function(t){u(s.startx,t.y,s.stopx,t.y).style("stroke-dasharray","3, 3")});let m=e.getTextObj();m.text=r,m.x=s.startx,m.y=s.starty,m.fontFamily=d,m.fontSize=h,m.fontWeight=p,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=c||20,m.textMargin=o,m.class="labelText",I(g,m),m=U(),m.text=s.title,m.x=s.startx+l/2+(s.stopx-s.startx)/2,m.y=s.starty+n+o,m.anchor="middle",m.valign="middle",m.textMargin=o,m.class="loopText",m.fontFamily=d,m.fontSize=h,m.fontWeight=p,m.wrap=!0;let x=a.hasKatex(m.text)?await E(g,m,s):w(g,m);if(void 0!==s.sectionTitles)for(const[e,y]of Object.entries(s.sectionTitles))if(y.message){m.text=y.message,m.x=s.startx+(s.stopx-s.startx)/2,m.y=s.sections[e].y+n+o,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=d,m.fontSize=h,m.fontWeight=p,m.wrap=s.wrap,a.hasKatex(m.text)?(s.starty=s.sections[e].y,await E(g,m,s)):w(g,m);let t=Math.round(x.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));s.sections[e].height+=t-(n+o)}return s.height=Math.round(s.stopy-s.starty),g},"drawLoop"),V=a.__name(function(t,a){e.drawBackgroundRect(t,a)},"drawBackgroundRect"),F=a.__name(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"),W=a.__name(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"),q=a.__name(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"),z=a.__name(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"),H=a.__name(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"),j=a.__name(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"),K=a.__name(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"),U=a.__name(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"),G=a.__name(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),X=function(){function t(t,e,a,s,r,n,o){i(e.append("text").attr("x",a+r/2).attr("y",s+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,s,r,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,[g,u]=a.parseFontSize(d),m=t.split(a.common_default.lineBreakRegex);for(let a=0;a<m.length;a++){const t=a*g-g*(m.length-1)/2,l=e.append("text").attr("x",s+n/2).attr("y",r).style("text-anchor","middle").style("font-size",u).style("font-weight",p).style("font-family",h);l.append("tspan").attr("x",s+n/2).attr("dy",t).text(m[a]),l.attr("y",r+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,c)}}function s(t,a,s,r,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",r).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,r,n,o,c,l),i(h,c)}async function r(t,s,r,n,o,c,l,d){const h=await a.calculateMathMLDimensions(t,a.getConfig()),p=s.append("switch"),g=p.append("foreignObject").attr("x",r+o/2-h.width/2).attr("y",n+c/2-h.height/2).attr("width",h.width).attr("height",h.height).append("xhtml:div").style("height","100%").style("width","100%");g.append("div").style("text-align","center").style("vertical-align","middle").html(await a.renderKatexSanitized(t,a.getConfig())),e(t,p,r,n,o,c,l,d),i(g,l)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return a.__name(t,"byText"),a.__name(e,"byTspan"),a.__name(s,"byFo"),a.__name(r,"byKatex"),a.__name(i,"_setTextAttrs"),function(a,i=!1){return i?r:"fo"===a.textPlacement?s:"old"===a.textPlacement?t:e}}(),Z=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").text(t),o)}function e(t,e,s,i,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,g=t.split(a.common_default.lineBreakRegex);for(let a=0;a<g.length;a++){const t=a*d-d*(g.length-1)/2,n=e.append("text").attr("x",s).attr("y",i).style("text-anchor","start").style("font-size",d).style("font-weight",p).style("font-family",h);n.append("tspan").attr("x",s).attr("dy",t).text(g[a]),n.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(n,c)}}function s(t,a,s,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,i,0,o,c,l),r(h,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return a.__name(t,"byText"),a.__name(e,"byTspan"),a.__name(s,"byFo"),a.__name(r,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?s:"old"===a.textPlacement?t:e}}(),J={drawRect:f,drawText:w,drawLabel:I,drawActor:R,drawBox:C,drawPopup:b,anchorElement:$,drawActivation:B,drawLoop:Y,drawBackgroundRect:V,insertArrowHead:z,insertArrowFilledHead:H,insertSequenceNumber:j,insertArrowCrossHead:K,insertDatabaseIcon:F,insertComputerIcon:W,insertClockIcon:q,getTextObj:U,getNoteRect:G,fixLifeLineHeights:P,sanitizeUrl:a.sanitizeUrl_1},Q={},tt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:a.__name(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))},"getHeight"),clear:a.__name(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:a.__name(function(t){this.boxes.push(t)},"addBox"),addActor:a.__name(function(t){this.actors.push(t)},"addActor"),addLoop:a.__name(function(t){this.loops.push(t)},"addLoop"),addMessage:a.__name(function(t){this.messages.push(t)},"addMessage"),addNote:a.__name(function(t){this.notes.push(t)},"addNote"),lastActor:a.__name(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:a.__name(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:a.__name(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:a.__name(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:a.__name(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,dt(a.getConfig2())},"init"),updateVal:a.__name(function(t,e,a,s){void 0===t[e]?t[e]=a:t[e]=s(a,t[e])},"updateVal"),updateBounds:a.__name(function(t,e,s,r){const i=this;let n=0;function o(o){return a.__name(function(a){n++;const c=i.sequenceItems.length-n+1;i.updateVal(a,"starty",e-c*Q.boxMargin,Math.min),i.updateVal(a,"stopy",r+c*Q.boxMargin,Math.max),i.updateVal(tt.data,"startx",t-c*Q.boxMargin,Math.min),i.updateVal(tt.data,"stopx",s+c*Q.boxMargin,Math.max),"activation"!==o&&(i.updateVal(a,"startx",t-c*Q.boxMargin,Math.min),i.updateVal(a,"stopx",s+c*Q.boxMargin,Math.max),i.updateVal(tt.data,"starty",e-c*Q.boxMargin,Math.min),i.updateVal(tt.data,"stopy",r+c*Q.boxMargin,Math.max))},"updateItemBounds")}a.__name(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:a.__name(function(t,e,s,r){const i=a.common_default.getMin(t,s),n=a.common_default.getMax(t,s),o=a.common_default.getMin(e,r),c=a.common_default.getMax(e,r);this.updateVal(tt.data,"startx",i,Math.min),this.updateVal(tt.data,"starty",o,Math.min),this.updateVal(tt.data,"stopx",n,Math.max),this.updateVal(tt.data,"stopy",c,Math.max),this.updateBounds(i,o,n,c)},"insert"),newActivation:a.__name(function(t,e,a){const s=a.get(t.from),r=ht(t.from).length||0,i=s.x+s.width/2+(r-1)*Q.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Q.activationWidth,stopy:void 0,actor:t.from,anchored:J.anchorElement(e)})},"newActivation"),endActivation:a.__name(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:a.__name(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:a.__name(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:a.__name(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:a.__name(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:a.__name(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:tt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:a.__name(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:a.__name(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:a.__name(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=a.common_default.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:a.__name(function(){return this.verticalPos},"getVerticalPos"),getBounds:a.__name(function(){return{bounds:this.data,models:this.models}},"getBounds")},et=a.__name(async function(t,s){tt.bumpVerticalPos(Q.boxMargin),s.height=Q.boxMargin,s.starty=tt.getVerticalPos();const r=e.getNoteRect();r.x=s.startx,r.y=s.starty,r.width=s.width||Q.width,r.class="note";const i=t.append("g"),n=J.drawRect(i,r),o=e.getTextObj();o.x=s.startx,o.y=s.starty,o.width=r.width,o.dy="1em",o.text=s.message,o.class="noteText",o.fontFamily=Q.noteFontFamily,o.fontSize=Q.noteFontSize,o.fontWeight=Q.noteFontWeight,o.anchor=Q.noteAlign,o.textMargin=Q.noteMargin,o.valign="center";const c=a.hasKatex(o.text)?await E(i,o):w(i,o),l=Math.round(c.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",l+2*Q.noteMargin),s.height+=l+2*Q.noteMargin,tt.bumpVerticalPos(l+2*Q.noteMargin),s.stopy=s.starty+l+2*Q.noteMargin,s.stopx=s.startx+r.width,tt.insert(s.startx,s.starty,s.stopx,s.stopy),tt.models.addNote(s)},"drawNote"),at=a.__name(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),st=a.__name(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),rt=a.__name(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function it(t,e){tt.bumpVerticalPos(10);const{startx:s,stopx:r,message:i}=e,n=a.common_default.splitBreaks(i).length,o=a.hasKatex(i),c=o?await a.calculateMathMLDimensions(i,a.getConfig2()):a.utils_default.calculateTextDimensions(i,at(Q));if(!o){const t=c.height/n;e.height+=t,tt.bumpVerticalPos(t)}let l,d=c.height-10;const h=c.width;if(s===r){l=tt.getVerticalPos()+d,Q.rightAngles||(d+=Q.boxMargin,l=tt.getVerticalPos()+d),d+=30;const t=a.common_default.getMax(h/2,Q.width/2);tt.insert(s-t,tt.getVerticalPos()-10+d,r+t,tt.getVerticalPos()+30+d)}else d+=Q.boxMargin,l=tt.getVerticalPos()+d,tt.insert(s,l-10,r,l);return tt.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,tt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}a.__name(it,"boundMessage");var nt=a.__name(async function(t,s,r,i){const{startx:n,stopx:o,starty:c,message:l,type:d,sequenceIndex:h,sequenceVisible:p}=s,g=a.utils_default.calculateTextDimensions(l,at(Q)),u=e.getTextObj();u.x=n,u.y=c+10,u.width=o-n,u.class="messageText",u.dy="1em",u.text=l,u.fontFamily=Q.messageFontFamily,u.fontSize=Q.messageFontSize,u.fontWeight=Q.messageFontWeight,u.anchor=Q.messageAlign,u.valign="center",u.textMargin=Q.wrapPadding,u.tspan=!1,a.hasKatex(u.text)?await E(t,u,{startx:n,stopx:o,starty:r}):w(t,u);const m=g.width;let x;n===o?x=Q.rightAngles?t.append("path").attr("d",`M ${n},${r} H ${n+a.common_default.getMax(Q.width/2,m/2)} V ${r+25} H ${n}`):t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(x=t.append("line"),x.attr("x1",n),x.attr("y1",r),x.attr("x2",o),x.attr("y2",r)),d===i.db.LINETYPE.DOTTED||d===i.db.LINETYPE.DOTTED_CROSS||d===i.db.LINETYPE.DOTTED_POINT||d===i.db.LINETYPE.DOTTED_OPEN||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0");let y="";if(Q.arrowMarkerAbsolute&&(y=a.getUrl(!0)),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),d!==i.db.LINETYPE.SOLID&&d!==i.db.LINETYPE.DOTTED||x.attr("marker-end","url("+y+"#arrowhead)"),d!==i.db.LINETYPE.BIDIRECTIONAL_SOLID&&d!==i.db.LINETYPE.BIDIRECTIONAL_DOTTED||(x.attr("marker-start","url("+y+"#arrowhead)"),x.attr("marker-end","url("+y+"#arrowhead)")),d!==i.db.LINETYPE.SOLID_POINT&&d!==i.db.LINETYPE.DOTTED_POINT||x.attr("marker-end","url("+y+"#filled-head)"),d!==i.db.LINETYPE.SOLID_CROSS&&d!==i.db.LINETYPE.DOTTED_CROSS||x.attr("marker-end","url("+y+"#crosshead)"),p||Q.showSequenceNumbers){if(d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED){const t=6;n<o?x.attr("x1",n+2*t):x.attr("x1",n+t)}t.append("line").attr("x1",n).attr("y1",r).attr("x2",n).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h)}},"drawMessage"),ot=a.__name(function(t,e,s,r,i,n,o){let c,l=0,d=0,h=0;for(const p of r){const t=e.get(p),r=t.box;c&&c!=r&&(o||tt.models.addBox(c),d+=Q.boxMargin+c.margin),r&&r!=c&&(o||(r.x=l+d,r.y=i),d+=r.margin),t.width=t.width||Q.width,t.height=a.common_default.getMax(t.height||Q.height,Q.height),t.margin=t.margin||Q.actorMargin,h=a.common_default.getMax(h,t.height),s.get(t.name)&&(d+=t.width/2),t.x=l+d,t.starty=tt.getVerticalPos(),tt.insert(t.x,i,t.x+t.width,t.height),l+=t.width+d,t.box&&(t.box.width=l+r.margin-t.box.x),d=t.margin,c=t.box,tt.models.addActor(t)}c&&!o&&tt.models.addBox(c),tt.bumpVerticalPos(h)},"addActorRenderingData"),ct=a.__name(async function(t,e,s,r){if(r){let r=0;tt.bumpVerticalPos(2*Q.boxMargin);for(const i of s){const s=e.get(i);s.stopy||(s.stopy=tt.getVerticalPos());const n=await J.drawActor(t,s,Q,!0);r=a.common_default.getMax(r,n)}tt.bumpVerticalPos(r+Q.boxMargin)}else for(const a of s){const s=e.get(a);await J.drawActor(t,s,Q,!1)}},"drawActors"),lt=a.__name(function(t,e,a,s){let r=0,i=0;for(const n of a){const a=e.get(n),o=yt(a),c=J.drawPopup(t,a,o,Q,Q.forceMenus,s);c.height>r&&(r=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:r,maxWidth:i}},"drawActorsPopup"),dt=a.__name(function(t){a.assignWithDepth_default(Q,t),t.fontFamily&&(Q.actorFontFamily=Q.noteFontFamily=Q.messageFontFamily=t.fontFamily),t.fontSize&&(Q.actorFontSize=Q.noteFontSize=Q.messageFontSize=t.fontSize),t.fontWeight&&(Q.actorFontWeight=Q.noteFontWeight=Q.messageFontWeight=t.fontWeight)},"setConf"),ht=a.__name(function(t){return tt.activations.filter(function(e){return e.actor===t})},"actorActivations"),pt=a.__name(function(t,e){const s=e.get(t),r=ht(t);return[r.reduce(function(t,e){return a.common_default.getMin(t,e.startx)},s.x+s.width/2-1),r.reduce(function(t,e){return a.common_default.getMax(t,e.stopx)},s.x+s.width/2+1)]},"activationBounds");function gt(t,e,s,r,i){tt.bumpVerticalPos(s);let n=r;if(e.id&&e.message&&t[e.id]){const s=t[e.id].width,i=at(Q);e.message=a.utils_default.wrapLabel(`[${e.message}]`,s-2*Q.wrapPadding,i),e.width=s,e.wrap=!0;const o=a.utils_default.calculateTextDimensions(e.message,i),c=a.common_default.getMax(o.height,Q.labelBoxHeight);n=r+c,a.log.debug(`${c} - ${e.message}`)}i(e),tt.bumpVerticalPos(n)}function ut(t,e,s,r,i,n,o){function c(a,s){a.x<i.get(t.from).x?(tt.insert(e.stopx-s,e.starty,e.startx,e.stopy+a.height/2+Q.noteMargin),e.stopx=e.stopx+s):(tt.insert(e.startx,e.starty,e.stopx+s,e.stopy+a.height/2+Q.noteMargin),e.stopx=e.stopx-s)}function g(a,s){a.x<i.get(t.to).x?(tt.insert(e.startx-s,e.starty,e.stopx,e.stopy+a.height/2+Q.noteMargin),e.startx=e.startx+s):(tt.insert(e.stopx,e.starty,e.startx+s,e.stopy+a.height/2+Q.noteMargin),e.startx=e.startx-s)}a.__name(c,"receiverAdjustment"),a.__name(g,"senderAdjustment");const u=[l,d,p,h];if(n.get(t.to)==r){const e=i.get(t.to);c(e,u.includes(e.type)?21:e.width/2+3),e.starty=s-e.height/2,tt.bumpVerticalPos(e.height/2)}else if(o.get(t.from)==r){const e=i.get(t.from);if(Q.mirrorActors){g(e,u.includes(e.type)?18:e.width/2)}e.stopy=s-e.height/2,tt.bumpVerticalPos(e.height/2)}else if(o.get(t.to)==r){const e=i.get(t.to);if(Q.mirrorActors){c(e,u.includes(e.type)?21:e.width/2+3)}e.stopy=s-e.height/2,tt.bumpVerticalPos(e.height/2)}}a.__name(gt,"adjustLoopHeightForWrap"),a.__name(ut,"adjustCreatedDestroyedData");var mt=a.__name(async function(t,e,s,r){const{securityLevel:i,sequence:n}=a.getConfig2();let o;Q=n,"sandbox"===i&&(o=a.select("#i"+e));const c="sandbox"===i?a.select(o.nodes()[0].contentDocument.body):a.select("body"),l="sandbox"===i?o.nodes()[0].contentDocument:document;tt.init(),a.log.debug(r.db);const d="sandbox"===i?c.select(`[id="${e}"]`):a.select(`[id="${e}"]`),h=r.db.getActors(),p=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),u=r.db.getBoxes();let m=r.db.getActorKeys();const x=r.db.getMessages(),y=r.db.getDiagramTitle(),_=r.db.hasAtLeastOneBox(),f=r.db.hasAtLeastOneBoxWithTitle(),b=await xt(h,x,r);if(Q.height=await _t(h,b,u),J.insertComputerIcon(d),J.insertDatabaseIcon(d),J.insertClockIcon(d),_&&(tt.bumpVerticalPos(Q.boxMargin),f&&tt.bumpVerticalPos(u[0].textMaxHeight)),!0===Q.hideUnusedParticipants){const t=new Set;x.forEach(e=>{t.add(e.from),t.add(e.to)}),m=m.filter(e=>t.has(e))}ot(d,h,p,m,0,x,!1);const T=await Tt(x,h,b,r);function E(t,e){const a=tt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),J.drawActivation(d,a,e,Q,ht(t.from).length),tt.insert(a.startx,e-10,a.stopx,e)}J.insertArrowHead(d),J.insertArrowCrossHead(d),J.insertArrowFilledHead(d),J.insertSequenceNumber(d),a.__name(E,"activeEnd");let w=1,I=1;const L=[],k=[];let N=0;for(const P of x){let t,e,s;switch(P.type){case r.db.LINETYPE.NOTE:tt.resetVerticalPos(),e=P.noteModel,await et(d,e);break;case r.db.LINETYPE.ACTIVE_START:tt.newActivation(P,d,h);break;case r.db.LINETYPE.ACTIVE_END:E(P,tt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=tt.endLoop(),await J.drawLoop(d,t,"loop",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:gt(T,P,Q.boxMargin,Q.boxMargin,t=>tt.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:t=tt.endLoop(),k.push(t),tt.models.addLoop(t),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=tt.endLoop(),await J.drawLoop(d,t,"opt",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:gt(T,P,Q.boxMargin+Q.boxTextMargin,Q.boxMargin,t=>tt.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=tt.endLoop(),await J.drawLoop(d,t,"alt",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t)),tt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:gt(T,P,Q.boxMargin+Q.boxTextMargin,Q.boxMargin,t=>tt.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=tt.endLoop(),await J.drawLoop(d,t,"par",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:w=P.message.start||w,I=P.message.step||I,P.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:gt(T,P,Q.boxMargin+Q.boxTextMargin,Q.boxMargin,t=>tt.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=tt.endLoop(),await J.drawLoop(d,t,"critical",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=tt.endLoop(),await J.drawLoop(d,t,"break",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;default:try{s=P.msgModel,s.starty=tt.getVerticalPos(),s.sequenceIndex=w,s.sequenceVisible=r.db.showSequenceNumbers();const t=await it(0,s);ut(P,s,t,N,h,p,g),L.push({messageModel:s,lineStartY:t}),tt.models.addMessage(s)}catch(C){a.log.error("error while drawing message",C)}}[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(P.type)&&(w+=I),N++}a.log.debug("createdActors",p),a.log.debug("destroyedActors",g),await ct(d,h,m,!1);for(const a of L)await nt(d,a.messageModel,a.lineStartY,r);Q.mirrorActors&&await ct(d,h,m,!0),k.forEach(t=>J.drawBackgroundRect(d,t)),P(d,h,m,Q);for(const a of tt.models.boxes){a.height=tt.getVerticalPos()-a.y,tt.insert(a.x,a.y,a.x+a.width,a.height);const t=2*Q.boxMargin;a.startx=a.x-t,a.starty=a.y-.25*t,a.stopx=a.startx+a.width+2*t,a.stopy=a.starty+a.height+.75*t,a.stroke="rgb(0,0,0, 0.5)",J.drawBox(d,a,Q)}_&&tt.bumpVerticalPos(Q.boxMargin);const v=lt(d,h,m,l),{bounds:A}=tt.getBounds();void 0===A.startx&&(A.startx=0),void 0===A.starty&&(A.starty=0),void 0===A.stopx&&(A.stopx=0),void 0===A.stopy&&(A.stopy=0);let M=A.stopy-A.starty;M<v.maxHeight&&(M=v.maxHeight);let O=M+2*Q.diagramMarginY;Q.mirrorActors&&(O=O-Q.boxMargin+Q.bottomMarginAdj);let S=A.stopx-A.startx;S<v.maxWidth&&(S=v.maxWidth);const D=S+2*Q.diagramMarginX;y&&d.append("text").text(y).attr("x",(A.stopx-A.startx)/2-2*Q.diagramMarginX).attr("y",-25),a.configureSvgSize(d,O,D,Q.useMaxWidth);const R=y?40:0;d.attr("viewBox",A.startx-Q.diagramMarginX+" -"+(Q.diagramMarginY+R)+" "+D+" "+(O+R)),a.log.debug("models:",tt.models)},"draw");async function xt(t,e,s){const r={};for(const i of e)if(t.get(i.to)&&t.get(i.from)){const e=t.get(i.to);if(i.placement===s.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(i.placement===s.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const n=void 0!==i.placement,o=!n,c=n?st(Q):at(Q),l=i.wrap?a.utils_default.wrapLabel(i.message,Q.width-2*Q.wrapPadding,c):i.message,d=(a.hasKatex(l)?await a.calculateMathMLDimensions(i.message,a.getConfig2()):a.utils_default.calculateTextDimensions(l,c)).width+2*Q.wrapPadding;o&&i.from===e.nextActor?r[i.to]=a.common_default.getMax(r[i.to]||0,d):o&&i.from===e.prevActor?r[i.from]=a.common_default.getMax(r[i.from]||0,d):o&&i.from===i.to?(r[i.from]=a.common_default.getMax(r[i.from]||0,d/2),r[i.to]=a.common_default.getMax(r[i.to]||0,d/2)):i.placement===s.db.PLACEMENT.RIGHTOF?r[i.from]=a.common_default.getMax(r[i.from]||0,d):i.placement===s.db.PLACEMENT.LEFTOF?r[e.prevActor]=a.common_default.getMax(r[e.prevActor]||0,d):i.placement===s.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=a.common_default.getMax(r[e.prevActor]||0,d/2)),e.nextActor&&(r[i.from]=a.common_default.getMax(r[i.from]||0,d/2)))}return a.log.debug("maxMessageWidthPerActor:",r),r}a.__name(xt,"getMaxMessageWidthPerActor");var yt=a.__name(function(t){let e=0;const s=rt(Q);for(const r in t.links){const t=a.utils_default.calculateTextDimensions(r,s).width+2*Q.wrapPadding+2*Q.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function _t(t,e,s){let r=0;for(const n of t.keys()){const e=t.get(n);e.wrap&&(e.description=a.utils_default.wrapLabel(e.description,Q.width-2*Q.wrapPadding,rt(Q)));const s=a.hasKatex(e.description)?await a.calculateMathMLDimensions(e.description,a.getConfig2()):a.utils_default.calculateTextDimensions(e.description,rt(Q));e.width=e.wrap?Q.width:a.common_default.getMax(Q.width,s.width+2*Q.wrapPadding),e.height=e.wrap?a.common_default.getMax(s.height,Q.height):Q.height,r=a.common_default.getMax(r,e.height)}for(const n in e){const s=t.get(n);if(!s)continue;const r=t.get(s.nextActor);if(!r){const t=e[n]+Q.actorMargin-s.width/2;s.margin=a.common_default.getMax(t,Q.actorMargin);continue}const i=e[n]+Q.actorMargin-s.width/2-r.width/2;s.margin=a.common_default.getMax(i,Q.actorMargin)}let i=0;return s.forEach(e=>{const s=at(Q);let r=e.actorKeys.reduce((e,a)=>e+(t.get(a).width+(t.get(a).margin||0)),0);r+=8*Q.boxMargin,r-=2*Q.boxTextMargin,e.wrap&&(e.name=a.utils_default.wrapLabel(e.name,r-2*Q.wrapPadding,s));const n=a.utils_default.calculateTextDimensions(e.name,s);i=a.common_default.getMax(n.height,i);const o=a.common_default.getMax(r,n.width+2*Q.wrapPadding);if(e.margin=Q.boxTextMargin,r<o){const t=(o-r)/2;e.margin+=t}}),s.forEach(t=>t.textMaxHeight=i),a.common_default.getMax(r,Q.height)}a.__name(_t,"calculateActorMargins");var ft=a.__name(async function(t,e,s){const r=e.get(t.from),i=e.get(t.to),n=r.x,o=i.x,c=t.wrap&&t.message;let l=a.hasKatex(t.message)?await a.calculateMathMLDimensions(t.message,a.getConfig2()):a.utils_default.calculateTextDimensions(c?a.utils_default.wrapLabel(t.message,Q.width,st(Q)):t.message,st(Q));const d={width:c?Q.width:a.common_default.getMax(Q.width,l.width+2*Q.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===s.db.PLACEMENT.RIGHTOF?(d.width=c?a.common_default.getMax(Q.width,l.width):a.common_default.getMax(r.width/2+i.width/2,l.width+2*Q.noteMargin),d.startx=n+(r.width+Q.actorMargin)/2):t.placement===s.db.PLACEMENT.LEFTOF?(d.width=c?a.common_default.getMax(Q.width,l.width+2*Q.noteMargin):a.common_default.getMax(r.width/2+i.width/2,l.width+2*Q.noteMargin),d.startx=n-d.width+(r.width-Q.actorMargin)/2):t.to===t.from?(l=a.utils_default.calculateTextDimensions(c?a.utils_default.wrapLabel(t.message,a.common_default.getMax(Q.width,r.width),st(Q)):t.message,st(Q)),d.width=c?a.common_default.getMax(Q.width,r.width):a.common_default.getMax(r.width,Q.width,l.width+2*Q.noteMargin),d.startx=n+(r.width-d.width)/2):(d.width=Math.abs(n+r.width/2-(o+i.width/2))+Q.actorMargin,d.startx=n<o?n+r.width/2-Q.actorMargin/2:o+i.width/2-Q.actorMargin/2),c&&(d.message=a.utils_default.wrapLabel(t.message,d.width-2*Q.wrapPadding,st(Q))),a.log.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`),d},"buildNoteModel"),bt=a.__name(function(t,e,s){if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[r,i]=pt(t.from,e),[n,o]=pt(t.to,e),c=r<=n;let l=c?i:r,d=c?n:o;const h=Math.abs(n-o)>2,p=a.__name(t=>c?-t:t,"adjustValue");t.from===t.to?d=l:(t.activate&&!h&&(d+=p(Q.activationWidth/2-1)),[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)),[s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=p(3)));const g=[r,i,n,o],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=a.utils_default.wrapLabel(t.message,a.common_default.getMax(u+2*Q.wrapPadding,Q.width),at(Q)));const m=a.utils_default.calculateTextDimensions(t.message,at(Q));return{width:a.common_default.getMax(t.wrap?0:m.width+2*Q.wrapPadding,u+2*Q.wrapPadding,Q.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),Tt=a.__name(async function(t,e,s,r){const i={},n=[];let o,c,l;for(const d of t){switch(d.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:n.push({id:d.id,msg:d.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:d.message&&(o=n.pop(),i[o.id]=o,i[d.id]=o,n.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=n.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(d.from?d.from:d.to.actor),a=ht(d.from?d.from:d.to.actor).length,s=t.x+t.width/2+(a-1)*Q.activationWidth/2,r={startx:s,stopx:s+Q.activationWidth,actor:d.from,enabled:!0};tt.activations.push(r)}break;case r.db.LINETYPE.ACTIVE_END:{const t=tt.activations.map(t=>t.actor).lastIndexOf(d.from);tt.activations.splice(t,1).splice(0,1)}}void 0!==d.placement?(c=await ft(d,e,r),d.noteModel=c,n.forEach(t=>{o=t,o.from=a.common_default.getMin(o.from,c.startx),o.to=a.common_default.getMax(o.to,c.startx+c.width),o.width=a.common_default.getMax(o.width,Math.abs(o.from-o.to))-Q.labelBoxWidth})):(l=bt(d,e,r),d.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach(t=>{if(o=t,l.startx===l.stopx){const t=e.get(d.from),s=e.get(d.to);o.from=a.common_default.getMin(t.x-l.width/2,t.x-t.width/2,o.from),o.to=a.common_default.getMax(s.x+l.width/2,s.x+t.width/2,o.to),o.width=a.common_default.getMax(o.width,Math.abs(o.to-o.from))-Q.labelBoxWidth}else o.from=a.common_default.getMin(l.startx,o.from),o.to=a.common_default.getMax(l.stopx,o.to),o.width=a.common_default.getMax(o.width,l.width)-Q.labelBoxWidth}))}return tt.activations=[],a.log.debug("Loop type widths:",i),i},"calculateLoopBounds"),Et={bounds:tt,drawActors:ct,drawActorsPopup:lt,setConf:dt,draw:mt},wt={parser:i,get db(){return new g},renderer:Et,styles:u,init:a.__name(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,a.setConfig2({sequence:{wrap:t.wrap}}))},"init")};exports.diagram=wt;
|
|
2
|
-
//# sourceMappingURL=sequenceDiagram-WL72ISMW-
|
|
1
|
+
"use strict";var t;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunk-TZMSLE5B-CxGg52ib.cjs"),a=require("./index-DBmfYPjr.cjs"),s=require("./chunk-QZHKN3VN-DrSljM5O.cjs");var r=function(){var t=a.__name(function(t,e,a,s){for(a=a||{},s=t.length;s--;a[t[s]]=e);return a},"o"),e=[1,2],s=[1,3],r=[1,4],i=[2,4],n=[1,9],o=[1,11],c=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],m=[1,26],x=[1,27],y=[1,28],_=[1,29],f=[1,30],b=[1,31],T=[1,32],E=[1,33],w=[1,34],I=[1,35],L=[1,36],P=[1,37],k=[1,38],N=[1,39],v=[1,41],A=[1,42],M=[1,43],O=[1,44],S=[1,45],D=[1,46],R=[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,55,60,61,62,63,71],C=[2,71],$=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],Y=[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,55,60,61,62,63,71],V=[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,55,60,61,62,63,71],F=[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,55,60,61,62,63,71],W=[69,70,71],q=[1,127],z={trace:a.__name(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,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$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",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"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],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:a.__name(function(t,e,a,s,r,i,n){var o=i.length-1;switch(r){case 3:return s.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 63:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:s.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:s.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:s.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:s.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),s.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),s.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:s.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:s.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:s.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:case 53:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 54:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 55:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:s.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 59:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-2],i[o]];break;case 64:this.$=s.PLACEMENT.LEFTOF;break;case 65:this.$=s.PLACEMENT.RIGHTOF;break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 67:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 68:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 69:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 70:this.$=i[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:i[o]};break;case 72:this.$=s.LINETYPE.SOLID_OPEN;break;case 73:this.$=s.LINETYPE.DOTTED_OPEN;break;case 74:this.$=s.LINETYPE.SOLID;break;case 75:this.$=s.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=s.LINETYPE.DOTTED;break;case 77:this.$=s.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=s.LINETYPE.SOLID_CROSS;break;case 79:this.$=s.LINETYPE.DOTTED_CROSS;break;case 80:this.$=s.LINETYPE.SOLID_POINT;break;case 81:this.$=s.LINETYPE.DOTTED_POINT;break;case 82:this.$=s.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:s,6:r},{1:[3]},{3:5,4:e,5:s,6:r},{3:6,4:e,5:s,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,55,60,61,62,63,71],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:o,8:8,9:10,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},t(R,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:P,52:k,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:D},{22:55,71:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[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,54:72,71:[1,73]},{22:74,71:D},{22:75,71:D},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:D},{22:92,71:D},{22:93,71:D},{22:94,71:D},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],C),t(R,[2,6]),t(R,[2,15]),t($,[2,9],{10:95}),t(R,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(R,[2,21]),{5:[1,99]},{5:[1,100]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(B,i,{7:101}),t(B,i,{7:102}),t(B,i,{7:103}),t(Y,i,{40:104,7:105}),t(V,i,{42:106,7:107}),t(V,i,{7:107,42:108}),t(F,i,{45:109,7:110}),t(B,i,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],C,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:D},t(W,[2,72]),t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(W,[2,79]),t(W,[2,80]),t(W,[2,81]),{22:123,71:D},{22:125,59:124,71:D},{71:[2,64]},{71:[2,65]},{57:126,86:q},{57:128,86:q},{57:129,86:q},{57:130,86:q},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:P,52:k,53:N},{5:[1,136]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,137],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,138],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,139],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{16:[1,140]},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,49:[1,141],50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{16:[1,142]},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,48:[1,143],50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{16:[1,144]},{16:[1,145]},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,47:[1,146],50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{4:n,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,147],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:m,33:x,35:y,36:_,37:f,38:b,39:T,41:E,43:w,44:I,46:L,50:P,52:k,53:N,55:v,60:A,61:M,62:O,63:S,71:D},{15:[1,148]},t(R,[2,49]),t(R,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(R,[2,51]),t(R,[2,52]),{22:151,71:D},{22:152,71:D},{57:153,86:q},{57:154,86:q},{57:155,86:q},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(R,[2,16]),t($,[2,10]),{12:157,50:P,52:k,53:N},t($,[2,12]),t($,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,158]},t(R,[2,38]),{15:[1,159]},t(R,[2,39]),t(R,[2,40]),{15:[1,160]},t(R,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:q},{57:165,86:q},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:D},t($,[2,11]),t(Y,i,{7:105,40:167}),t(V,i,{7:107,42:168}),t(F,i,{7:110,45:169}),t(R,[2,48]),{5:[2,70]},t(R,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:a.__name(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:a.__name(function(t){var e=this,s=[0],r=[],i=[null],n=[],o=this.table,c="",l=0,d=0,h=n.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(g.yy[u]=this.yy[u]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;n.push(m);var x=p.options&&p.options.ranges;function y(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a.__name(function(t){s.length=s.length-2*t,i.length=i.length-t,n.length=n.length-t},"popStack"),a.__name(y,"lex");for(var _,f,b,T,E,w,I,L,P={};;){if(f=s[s.length-1],this.defaultActions[f]?b=this.defaultActions[f]:(null==_&&(_=y()),b=o[f]&&o[f][_]),void 0===b||!b.length||!b[0]){var k="";for(E in L=[],o[f])this.terminals_[E]&&E>2&&L.push("'"+this.terminals_[E]+"'");k=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(k,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:L})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+_);switch(b[0]){case 1:s.push(_),i.push(p.yytext),n.push(p.yylloc),s.push(b[1]),_=null,d=p.yyleng,c=p.yytext,l=p.yylineno,m=p.yylloc;break;case 2:if(w=this.productions_[b[1]][1],P.$=i[i.length-w],P._$={first_line:n[n.length-(w||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(w||1)].first_column,last_column:n[n.length-1].last_column},x&&(P._$.range=[n[n.length-(w||1)].range[0],n[n.length-1].range[1]]),void 0!==(T=this.performAction.apply(P,[c,d,l,g.yy,b[1],i,n].concat(h))))return T;w&&(s=s.slice(0,-1*w*2),i=i.slice(0,-1*w),n=n.slice(0,-1*w)),s.push(this.productions_[b[1]][0]),i.push(P.$),n.push(P._$),I=o[s[s.length-2]][s[s.length-1]],s.push(I);break;case 3:return!0}}return!0},"parse")},H=function(){return{EOF:1,parseError:a.__name(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a.__name(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},"setInput"),input:a.__name(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},"input"),unput:a.__name(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 s=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===s.length?this.yylloc.first_column:0)+s[s.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},"unput"),more:a.__name(function(){return this._more=!0,this},"more"),reject:a.__name(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})},"reject"),less:a.__name(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a.__name(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a.__name(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,"")},"upcomingInput"),showPosition:a.__name(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a.__name(function(t,e){var a,s,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))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.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 i in r)this[i]=r[i];return!1}return!1},"test_match"),next:a.__name(function(){if(this.done)return this.EOF;var t,e,a,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;i<r.length;i++)if((a=this._input.match(this.rules[r[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&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})},"next"),lex:a.__name(function(){var t=this.next();return t||this.lex()},"lex"),begin:a.__name(function(t){this.conditionStack.push(t)},"begin"),popState:a.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a.__name(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:a.__name(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a.__name(function(t){this.begin(t)},"pushState"),stateStackSize:a.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a.__name(function(t,e,a,s){switch(a){case 0:case 56:case 72:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:case 57:return e.yytext=e.yytext.trim(),71;case 11:case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\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,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}}}();function j(){this.yy={}}return z.lexer=H,a.__name(j,"Parser"),j.prototype=z,z.Parser=j,new j}();r.parser=r;var i=r,n={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},o={FILLED:0,OPEN:1},c={LEFTOF:0,RIGHTOF:1,OVER:2},l="actor",d="control",h="database",p="entity",g=(t=class{constructor(){this.state=new s.ImperativeState(()=>({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})),this.setAccTitle=a.setAccTitle,this.setAccDescription=a.setAccDescription,this.setDiagramTitle=a.setDiagramTitle,this.getAccTitle=a.getAccTitle,this.getAccDescription=a.getAccDescription,this.getDiagramTitle=a.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(a.getConfig2().wrap),this.LINETYPE=n,this.ARROWTYPE=o,this.PLACEMENT=c}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,s,r,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=a.load(t,{schema:a.JSON_SCHEMA})}r=(null==n?void 0:n.type)??r;const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==s)return}if(null==(null==s?void 0:s.text)&&(s={text:e,type:r}),null!=r&&null!=s.text||(s={text:e,type:r}),this.state.records.actors.set(t,{box:o,name:e,description:s.text,wrap:s.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,s){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:s})}addSignal(t,e,a,s,r=!1){if(s===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:(null==a?void 0:a.text)??"",wrap:(null==a?void 0:a.wrap)??this.autoWrap(),type:s,activate:r}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){var t;return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(null==(t=a.getConfig2().sequence)?void 0:t.wrap)??!1}clear(){this.state.reset(),a.clear()}parseMessage(t){const e=t.trim(),{wrap:s,cleanedText:r}=this.extractWrap(e),i={text:r,wrap:s};return a.log.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let s=(null==e?void 0:e[1])?e[1].trim():"transparent",r=(null==e?void 0:e[2])?e[2].trim():void 0;if(null==window?void 0:window.CSS)window.CSS.supports("color",s)||(s="transparent",r=t.trim());else{const e=(new Option).style;e.color=s,e.color!==s&&(s="transparent",r=t.trim())}const{wrap:i,cleanedText:n}=this.extractWrap(r);return{text:n?a.sanitizeText(n,a.getConfig2()):void 0,color:s,wrap:i}}addNote(t,e,a){const s={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},r=[].concat(t,t);this.state.records.notes.push(s),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r[0],to:r[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const s=this.getActor(t);try{let t=a.sanitizeText(e.text,a.getConfig2());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const r=JSON.parse(t);this.insertLinks(s,r)}catch(r){a.log.error("error while parsing actor link text",r)}}addALink(t,e){const s=this.getActor(t);try{const t={};let r=a.sanitizeText(e.text,a.getConfig2());const i=r.indexOf("@");r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");const n=r.slice(0,i-1).trim(),o=r.slice(i+1).trim();t[n]=o,this.insertLinks(s,t)}catch(r){a.log.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const s=this.getActor(t);try{const t=a.sanitizeText(e.text,a.getConfig2()),r=JSON.parse(t);this.insertProperties(s,r)}catch(r){a.log.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const s=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(s,e.properties),e.links&&this.insertLinks(s,e.links)}catch(i){a.log.error("error while parsing actor details text",i)}}getActorProperty(t,e){if(void 0!==(null==t?void 0:t.properties))return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.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");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":a.setAccTitle(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return a.getConfig2().sequence}},a.__name(t,"SequenceDB"),t),u=a.__name(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 .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\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\n`,"getStyles"),m="actor-top",x="actor-bottom",y="actor-box",_="actor-man",f=a.__name(function(t,a){return e.drawRect(t,a)},"drawRect"),b=a.__name(function(t,e,s,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const n=e.links,o=e.actorCnt,c=e.rectData;var l="none";i&&(l="block !important");const d=t.append("g");d.attr("id","actor"+o+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==c.class&&(h=" "+c.class);let p=c.width>s?c.width:s;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",c.x),g.attr("y",c.height),g.attr("fill",c.fill),g.attr("stroke",c.stroke),g.attr("width",p),g.attr("height",c.height),g.attr("rx",c.rx),g.attr("ry",c.ry),null!=n){var u=20;for(let t in n){var m=d.append("a"),x=a.sanitizeUrl_1(n[t]);m.attr("xlink:href",x),m.attr("target","_blank"),Z(r)(t,m,c.x+10,c.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:c.height+u,width:p}},"drawPopup"),T=a.__name(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),E=a.__name(async function(t,e,s=null){let r=t.append("foreignObject");const i=await a.renderKatexSanitized(e.text,a.getConfig()),n=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(n.height)).attr("width",Math.round(n.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",n.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-n.width/2)).attr("y",Math.round(s.y+s.height/2-n.height/2))}else if(s){let{startx:t,stopx:a,starty:i}=s;if(t>a){const e=t;t=a,a=e}r.attr("x",Math.round(t+Math.abs(t-a)/2-n.width/2)),"loopText"===e.class?r.attr("y",Math.round(i)):r.attr("y",Math.round(i-n.height))}return[r]},"drawKatex"),w=a.__name(function(t,e){let s=0,r=0;const i=e.text.split(a.common_default.lineBreakRegex),[n,o]=a.parseFontSize(e.fontSize);let c=[],l=0,d=a.__name(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=a.__name(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":d=a.__name(()=>Math.round(e.y+(s+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":d=a.__name(()=>Math.round(e.y+(s+r+2*e.textMargin)-e.textMargin),"yfunc")}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[h,p]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==n&&(l=h*n);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==o&&i.style("font-size",o),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==l&&i.attr("dy",l);const g=p||a.ZERO_WIDTH_SPACE;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else i.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,s=r),c.push(i)}return c},"drawText"),I=a.__name(function(t,e){function s(t,e,a,s,r){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+s-r)+" "+(t+a-1.2*r)+","+(e+s)+" "+t+","+(e+s)}a.__name(s,"genPoints");const r=t.append("polygon");return r.attr("points",s(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,w(t,e),r},"drawLabel"),L=-1,P=a.__name((t,e,a,s)=>{t.select&&a.forEach(a=>{const r=e.get(a),i=t.select("#actor"+r.actorCnt);!s.mirrorActors&&r.stopy?i.attr("y2",r.stopy+r.height/2):s.mirrorActors&&i.attr("y2",r.stopy)})},"fixLifeLineHeights"),k=a.__name(function(t,s,r,i){var n,o;const c=i?s.stopy:s.starty,l=s.x+s.width/2,d=c+s.height,h=t.append("g").lower();var p=h;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&p.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+L).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),p=h.append("g"),s.actorCnt=L,null!=s.links&&p.attr("id","root-"+L));const g=e.getNoteRect();var u="actor";(null==(n=s.properties)?void 0:n.class)?u=s.properties.class:g.fill="#eaeaea",u+=i?` ${x}`:` ${m}`,g.x=s.x,g.y=c,g.width=s.width,g.height=s.height,g.class=u,g.rx=3,g.ry=3,g.name=s.name;const _=f(p,g);if(s.rectData=g,null==(o=s.properties)?void 0:o.icon){const t=s.properties.icon.trim();"@"===t.charAt(0)?e.drawEmbeddedImage(p,g.x+g.width-20,g.y+10,t.substr(1)):e.drawImage(p,g.x+g.width-20,g.y+10,t)}X(r,a.hasKatex(s.description))(s.description,p,g.x,g.y,g.width,g.height,{class:`actor ${y}`},r);let b=s.height;if(_.node){const t=_.node().getBBox();s.height=t.height,b=t.height}return b},"drawActorTypeParticipant"),N=a.__name(function(t,s,r,i){var n,o;const c=i?s.stopy:s.starty,l=s.x+s.width/2,d=c+s.height,h=t.append("g").lower();var p=h;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&p.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+L).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),p=h.append("g"),s.actorCnt=L,null!=s.links&&p.attr("id","root-"+L));const g=e.getNoteRect();var u="actor";(null==(n=s.properties)?void 0:n.class)?u=s.properties.class:g.fill="#eaeaea",u+=i?` ${x}`:` ${m}`,g.x=s.x,g.y=c,g.width=s.width,g.height=s.height,g.class=u,g.name=s.name;const _={...g,x:g.x+-6,y:g.y+6,class:"actor"},b=f(p,g);if(f(p,_),s.rectData=g,null==(o=s.properties)?void 0:o.icon){const t=s.properties.icon.trim();"@"===t.charAt(0)?e.drawEmbeddedImage(p,g.x+g.width-20,g.y+10,t.substr(1)):e.drawImage(p,g.x+g.width-20,g.y+10,t)}X(r,a.hasKatex(s.description))(s.description,p,g.x-6,g.y+6,g.width,g.height,{class:`actor ${y}`},r);let E=s.height;if(b.node){const t=b.node().getBBox();s.height=t.height,E=t.height}return E},"drawActorTypeCollections"),v=a.__name(function(t,s,r,i){var n,o;const c=i?s.stopy:s.starty,l=s.x+s.width/2,d=c+s.height,h=t.append("g").lower();let p=h;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&p.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+L).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),p=h.append("g"),s.actorCnt=L,null!=s.links&&p.attr("id","root-"+L));const g=e.getNoteRect();let u="actor";(null==(n=s.properties)?void 0:n.class)?u=s.properties.class:g.fill="#eaeaea",u+=i?` ${x}`:` ${m}`,g.x=s.x,g.y=c,g.width=s.width,g.height=s.height,g.class=u,g.name=s.name;const _=g.height/2,f=_/(2.5+g.height/50),b=p.append("g"),E=p.append("g");if(b.append("path").attr("d",`M ${g.x},${g.y+_}\n a ${f},${_} 0 0 0 0,${g.height}\n h ${g.width-2*f}\n a ${f},${_} 0 0 0 0,-${g.height}\n Z\n `).attr("class",u),E.append("path").attr("d",`M ${g.x},${g.y+_}\n a ${f},${_} 0 0 0 0,${g.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",u),b.attr("transform",`translate(${f}, ${-g.height/2})`),E.attr("transform",`translate(${g.width-f}, ${-g.height/2})`),s.rectData=g,null==(o=s.properties)?void 0:o.icon){const t=s.properties.icon.trim(),a=g.x+g.width-20,r=g.y+10;"@"===t.charAt(0)?e.drawEmbeddedImage(p,a,r,t.substr(1)):e.drawImage(p,a,r,t)}X(r,a.hasKatex(s.description))(s.description,p,g.x,g.y,g.width,g.height,{class:`actor ${y}`},r);let w=s.height;const I=b.select("path:last-child");if(I.node()){const t=I.node().getBBox();s.height=t.height,w=t.height}return w},"drawActorTypeQueue"),A=a.__name(function(t,s,r,i){var n;const o=i?s.stopy:s.starty,c=s.x+s.width/2,l=o+75,d=t.append("g").lower();i||(L++,d.append("line").attr("id","actor"+L).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L);const h=t.append("g");let p=_;p+=i?` ${x}`:` ${m}`,h.attr("class",p),h.attr("name",s.name);const g=e.getNoteRect();g.x=s.x,g.y=o,g.fill="#eaeaea",g.width=s.width,g.height=s.height,g.class="actor";const u=s.x+s.width/2,y=o+30;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",u).attr("cy",y).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${u}, ${y-18})`);const f=h.node().getBBox();return s.height=f.height+2*((null==(n=null==r?void 0:r.sequence)?void 0:n.labelBoxHeight)??0),X(r,a.hasKatex(s.description))(s.description,h,g.x,g.y+18+(i?5:10),g.width,g.height,{class:`actor ${_}`},r),s.height},"drawActorTypeControl"),M=a.__name(function(t,s,r,i){var n;const o=i?s.stopy:s.starty,c=s.x+s.width/2,l=o+75,d=t.append("g").lower(),h=t.append("g");let p=_;p+=i?` ${x}`:` ${m}`,h.attr("class",p),h.attr("name",s.name);const g=e.getNoteRect();g.x=s.x,g.y=o,g.fill="#eaeaea",g.width=s.width,g.height=s.height,g.class="actor";const u=s.x+s.width/2,y=o+(i?10:25),f=18;h.append("circle").attr("cx",u).attr("cy",y).attr("r",f).attr("width",s.width).attr("height",s.height),h.append("line").attr("x1",u-f).attr("x2",u+f).attr("y1",y+f).attr("y2",y+f).attr("stroke","#333").attr("stroke-width",2);const b=h.node().getBBox();return s.height=b.height+((null==(n=null==r?void 0:r.sequence)?void 0:n.labelBoxHeight)??0),i||(L++,d.append("line").attr("id","actor"+L).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L),X(r,a.hasKatex(s.description))(s.description,h,g.x,g.y+(i?(y-o+f-5)/2:(y+f-o)/2),g.width,g.height,{class:`actor ${_}`},r),h.attr("transform","translate(0, 9)"),s.height},"drawActorTypeEntity"),O=a.__name(function(t,s,r,i){var n;const o=i?s.stopy:s.starty,c=s.x+s.width/2,l=o+s.height+2*r.boxTextMargin,d=t.append("g").lower();let h=d;i||(L++,Object.keys(s.links||{}).length&&!r.forceMenus&&h.attr("onclick",T(`actor${L}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+L).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),h=d.append("g"),s.actorCnt=L,null!=s.links&&h.attr("id","root-"+L));const p=e.getNoteRect();let g="actor";(null==(n=s.properties)?void 0:n.class)?g=s.properties.class:p.fill="#eaeaea",g+=i?` ${x}`:` ${m}`,p.x=s.x,p.y=o,p.width=s.width,p.height=s.height,p.class=g,p.name=s.name,p.x=s.x,p.y=o;const u=p.width/4,_=p.width/4,f=u/2,b=f/(2.5+u/50),E=h.append("g"),w=`\n M ${p.x},${p.y+b}\n a ${f},${b} 0 0 0 ${u},0\n a ${f},${b} 0 0 0 -${u},0\n l 0,${_-2*b}\n a ${f},${b} 0 0 0 ${u},0\n l 0,-${_-2*b}\n`;E.append("path").attr("d",w).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",g),i?E.attr("transform",`translate(${1.5*u}, ${p.height/4-2*b})`):E.attr("transform",`translate(${1.5*u}, ${(p.height+b)/4})`),s.rectData=p,X(r,a.hasKatex(s.description))(s.description,h,p.x,p.y+(i?(p.height+_)/4:(p.height+b)/2),p.width,p.height,{class:`actor ${y}`},r);const I=E.select("path:last-child");if(I.node()){const t=I.node().getBBox();s.height=t.height+(r.sequence.labelBoxHeight??0)}return s.height},"drawActorTypeDatabase"),S=a.__name(function(t,s,r,i){const n=i?s.stopy:s.starty,o=s.x+s.width/2,c=n+80,l=30,d=t.append("g").lower();i||(L++,d.append("line").attr("id","actor"+L).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L);const h=t.append("g");let p=_;p+=i?` ${x}`:` ${m}`,h.attr("class",p),h.attr("name",s.name);const g=e.getNoteRect();g.x=s.x,g.y=n,g.fill="#eaeaea",g.width=s.width,g.height=s.height,g.class="actor",h.append("line").attr("id","actor-man-torso"+L).attr("x1",s.x+s.width/2-75).attr("y1",n+10).attr("x2",s.x+s.width/2-15).attr("y2",n+10),h.append("line").attr("id","actor-man-arms"+L).attr("x1",s.x+s.width/2-75).attr("y1",n+0).attr("x2",s.x+s.width/2-75).attr("y2",n+20),h.append("circle").attr("cx",s.x+s.width/2).attr("cy",n+10).attr("r",l);const u=h.node().getBBox();return s.height=u.height+(r.sequence.labelBoxHeight??0),X(r,a.hasKatex(s.description))(s.description,h,g.x,g.y+(i?11:18),g.width,g.height,{class:`actor ${_}`},r),h.attr("transform","translate(0,22)"),s.height},"drawActorTypeBoundary"),D=a.__name(function(t,s,r,i){const n=i?s.stopy:s.starty,o=s.x+s.width/2,c=n+80,l=t.append("g").lower();i||(L++,l.append("line").attr("id","actor"+L).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",s.name),s.actorCnt=L);const d=t.append("g");let h=_;h+=i?` ${x}`:` ${m}`,d.attr("class",h),d.attr("name",s.name);const p=e.getNoteRect();p.x=s.x,p.y=n,p.fill="#eaeaea",p.width=s.width,p.height=s.height,p.class="actor",p.rx=3,p.ry=3,d.append("line").attr("id","actor-man-torso"+L).attr("x1",o).attr("y1",n+25).attr("x2",o).attr("y2",n+45),d.append("line").attr("id","actor-man-arms"+L).attr("x1",o-18).attr("y1",n+33).attr("x2",o+18).attr("y2",n+33),d.append("line").attr("x1",o-18).attr("y1",n+60).attr("x2",o).attr("y2",n+45),d.append("line").attr("x1",o).attr("y1",n+45).attr("x2",o+18-2).attr("y2",n+60);const g=d.append("circle");g.attr("cx",s.x+s.width/2),g.attr("cy",n+10),g.attr("r",15),g.attr("width",s.width),g.attr("height",s.height);const u=d.node().getBBox();return s.height=u.height,X(r,a.hasKatex(s.description))(s.description,d,p.x,p.y+35,p.width,p.height,{class:`actor ${_}`},r),s.height},"drawActorTypeActor"),R=a.__name(async function(t,e,a,s){switch(e.type){case"actor":return await D(t,e,a,s);case"participant":return await k(t,e,a,s);case"boundary":return await S(t,e,a,s);case"control":return await A(t,e,a,s);case"entity":return await M(t,e,a,s);case"database":return await O(t,e,a,s);case"collections":return await N(t,e,a,s);case"queue":return await v(t,e,a,s)}},"drawActor"),C=a.__name(function(t,e,a){const s=t.append("g");V(s,e),e.name&&X(a)(e.name,s,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),s.lower()},"drawBox"),$=a.__name(function(t){return t.append("g")},"anchorElement"),B=a.__name(function(t,a,s,r,i){const n=e.getNoteRect(),o=a.anchored;n.x=a.startx,n.y=a.starty,n.class="activation"+i%3,n.width=a.stopx-a.startx,n.height=s-a.starty,f(o,n)},"drawActivation"),Y=a.__name(async function(t,s,r,i){const{boxMargin:n,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=i,g=t.append("g"),u=a.__name(function(t,e,a,s){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",s).attr("class","loopLine")},"drawLoopLine");u(s.startx,s.starty,s.stopx,s.starty),u(s.stopx,s.starty,s.stopx,s.stopy),u(s.startx,s.stopy,s.stopx,s.stopy),u(s.startx,s.starty,s.startx,s.stopy),void 0!==s.sections&&s.sections.forEach(function(t){u(s.startx,t.y,s.stopx,t.y).style("stroke-dasharray","3, 3")});let m=e.getTextObj();m.text=r,m.x=s.startx,m.y=s.starty,m.fontFamily=d,m.fontSize=h,m.fontWeight=p,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=c||20,m.textMargin=o,m.class="labelText",I(g,m),m=U(),m.text=s.title,m.x=s.startx+l/2+(s.stopx-s.startx)/2,m.y=s.starty+n+o,m.anchor="middle",m.valign="middle",m.textMargin=o,m.class="loopText",m.fontFamily=d,m.fontSize=h,m.fontWeight=p,m.wrap=!0;let x=a.hasKatex(m.text)?await E(g,m,s):w(g,m);if(void 0!==s.sectionTitles)for(const[e,y]of Object.entries(s.sectionTitles))if(y.message){m.text=y.message,m.x=s.startx+(s.stopx-s.startx)/2,m.y=s.sections[e].y+n+o,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=d,m.fontSize=h,m.fontWeight=p,m.wrap=s.wrap,a.hasKatex(m.text)?(s.starty=s.sections[e].y,await E(g,m,s)):w(g,m);let t=Math.round(x.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));s.sections[e].height+=t-(n+o)}return s.height=Math.round(s.stopy-s.starty),g},"drawLoop"),V=a.__name(function(t,a){e.drawBackgroundRect(t,a)},"drawBackgroundRect"),F=a.__name(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"),W=a.__name(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"),q=a.__name(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"),z=a.__name(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"),H=a.__name(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"),j=a.__name(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"),K=a.__name(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"),U=a.__name(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"),G=a.__name(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),X=function(){function t(t,e,a,s,r,n,o){i(e.append("text").attr("x",a+r/2).attr("y",s+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,s,r,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,[g,u]=a.parseFontSize(d),m=t.split(a.common_default.lineBreakRegex);for(let a=0;a<m.length;a++){const t=a*g-g*(m.length-1)/2,l=e.append("text").attr("x",s+n/2).attr("y",r).style("text-anchor","middle").style("font-size",u).style("font-weight",p).style("font-family",h);l.append("tspan").attr("x",s+n/2).attr("dy",t).text(m[a]),l.attr("y",r+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,c)}}function s(t,a,s,r,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",r).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,r,n,o,c,l),i(h,c)}async function r(t,s,r,n,o,c,l,d){const h=await a.calculateMathMLDimensions(t,a.getConfig()),p=s.append("switch"),g=p.append("foreignObject").attr("x",r+o/2-h.width/2).attr("y",n+c/2-h.height/2).attr("width",h.width).attr("height",h.height).append("xhtml:div").style("height","100%").style("width","100%");g.append("div").style("text-align","center").style("vertical-align","middle").html(await a.renderKatexSanitized(t,a.getConfig())),e(t,p,r,n,o,c,l,d),i(g,l)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return a.__name(t,"byText"),a.__name(e,"byTspan"),a.__name(s,"byFo"),a.__name(r,"byKatex"),a.__name(i,"_setTextAttrs"),function(a,i=!1){return i?r:"fo"===a.textPlacement?s:"old"===a.textPlacement?t:e}}(),Z=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").text(t),o)}function e(t,e,s,i,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,g=t.split(a.common_default.lineBreakRegex);for(let a=0;a<g.length;a++){const t=a*d-d*(g.length-1)/2,n=e.append("text").attr("x",s).attr("y",i).style("text-anchor","start").style("font-size",d).style("font-weight",p).style("font-family",h);n.append("tspan").attr("x",s).attr("dy",t).text(g[a]),n.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(n,c)}}function s(t,a,s,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,i,0,o,c,l),r(h,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return a.__name(t,"byText"),a.__name(e,"byTspan"),a.__name(s,"byFo"),a.__name(r,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?s:"old"===a.textPlacement?t:e}}(),J={drawRect:f,drawText:w,drawLabel:I,drawActor:R,drawBox:C,drawPopup:b,anchorElement:$,drawActivation:B,drawLoop:Y,drawBackgroundRect:V,insertArrowHead:z,insertArrowFilledHead:H,insertSequenceNumber:j,insertArrowCrossHead:K,insertDatabaseIcon:F,insertComputerIcon:W,insertClockIcon:q,getTextObj:U,getNoteRect:G,fixLifeLineHeights:P,sanitizeUrl:a.sanitizeUrl_1},Q={},tt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:a.__name(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))},"getHeight"),clear:a.__name(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:a.__name(function(t){this.boxes.push(t)},"addBox"),addActor:a.__name(function(t){this.actors.push(t)},"addActor"),addLoop:a.__name(function(t){this.loops.push(t)},"addLoop"),addMessage:a.__name(function(t){this.messages.push(t)},"addMessage"),addNote:a.__name(function(t){this.notes.push(t)},"addNote"),lastActor:a.__name(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:a.__name(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:a.__name(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:a.__name(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:a.__name(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,dt(a.getConfig2())},"init"),updateVal:a.__name(function(t,e,a,s){void 0===t[e]?t[e]=a:t[e]=s(a,t[e])},"updateVal"),updateBounds:a.__name(function(t,e,s,r){const i=this;let n=0;function o(o){return a.__name(function(a){n++;const c=i.sequenceItems.length-n+1;i.updateVal(a,"starty",e-c*Q.boxMargin,Math.min),i.updateVal(a,"stopy",r+c*Q.boxMargin,Math.max),i.updateVal(tt.data,"startx",t-c*Q.boxMargin,Math.min),i.updateVal(tt.data,"stopx",s+c*Q.boxMargin,Math.max),"activation"!==o&&(i.updateVal(a,"startx",t-c*Q.boxMargin,Math.min),i.updateVal(a,"stopx",s+c*Q.boxMargin,Math.max),i.updateVal(tt.data,"starty",e-c*Q.boxMargin,Math.min),i.updateVal(tt.data,"stopy",r+c*Q.boxMargin,Math.max))},"updateItemBounds")}a.__name(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:a.__name(function(t,e,s,r){const i=a.common_default.getMin(t,s),n=a.common_default.getMax(t,s),o=a.common_default.getMin(e,r),c=a.common_default.getMax(e,r);this.updateVal(tt.data,"startx",i,Math.min),this.updateVal(tt.data,"starty",o,Math.min),this.updateVal(tt.data,"stopx",n,Math.max),this.updateVal(tt.data,"stopy",c,Math.max),this.updateBounds(i,o,n,c)},"insert"),newActivation:a.__name(function(t,e,a){const s=a.get(t.from),r=ht(t.from).length||0,i=s.x+s.width/2+(r-1)*Q.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Q.activationWidth,stopy:void 0,actor:t.from,anchored:J.anchorElement(e)})},"newActivation"),endActivation:a.__name(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:a.__name(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:a.__name(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:a.__name(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:a.__name(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:a.__name(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:tt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:a.__name(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:a.__name(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:a.__name(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=a.common_default.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:a.__name(function(){return this.verticalPos},"getVerticalPos"),getBounds:a.__name(function(){return{bounds:this.data,models:this.models}},"getBounds")},et=a.__name(async function(t,s){tt.bumpVerticalPos(Q.boxMargin),s.height=Q.boxMargin,s.starty=tt.getVerticalPos();const r=e.getNoteRect();r.x=s.startx,r.y=s.starty,r.width=s.width||Q.width,r.class="note";const i=t.append("g"),n=J.drawRect(i,r),o=e.getTextObj();o.x=s.startx,o.y=s.starty,o.width=r.width,o.dy="1em",o.text=s.message,o.class="noteText",o.fontFamily=Q.noteFontFamily,o.fontSize=Q.noteFontSize,o.fontWeight=Q.noteFontWeight,o.anchor=Q.noteAlign,o.textMargin=Q.noteMargin,o.valign="center";const c=a.hasKatex(o.text)?await E(i,o):w(i,o),l=Math.round(c.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",l+2*Q.noteMargin),s.height+=l+2*Q.noteMargin,tt.bumpVerticalPos(l+2*Q.noteMargin),s.stopy=s.starty+l+2*Q.noteMargin,s.stopx=s.startx+r.width,tt.insert(s.startx,s.starty,s.stopx,s.stopy),tt.models.addNote(s)},"drawNote"),at=a.__name(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),st=a.__name(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),rt=a.__name(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function it(t,e){tt.bumpVerticalPos(10);const{startx:s,stopx:r,message:i}=e,n=a.common_default.splitBreaks(i).length,o=a.hasKatex(i),c=o?await a.calculateMathMLDimensions(i,a.getConfig2()):a.utils_default.calculateTextDimensions(i,at(Q));if(!o){const t=c.height/n;e.height+=t,tt.bumpVerticalPos(t)}let l,d=c.height-10;const h=c.width;if(s===r){l=tt.getVerticalPos()+d,Q.rightAngles||(d+=Q.boxMargin,l=tt.getVerticalPos()+d),d+=30;const t=a.common_default.getMax(h/2,Q.width/2);tt.insert(s-t,tt.getVerticalPos()-10+d,r+t,tt.getVerticalPos()+30+d)}else d+=Q.boxMargin,l=tt.getVerticalPos()+d,tt.insert(s,l-10,r,l);return tt.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,tt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}a.__name(it,"boundMessage");var nt=a.__name(async function(t,s,r,i){const{startx:n,stopx:o,starty:c,message:l,type:d,sequenceIndex:h,sequenceVisible:p}=s,g=a.utils_default.calculateTextDimensions(l,at(Q)),u=e.getTextObj();u.x=n,u.y=c+10,u.width=o-n,u.class="messageText",u.dy="1em",u.text=l,u.fontFamily=Q.messageFontFamily,u.fontSize=Q.messageFontSize,u.fontWeight=Q.messageFontWeight,u.anchor=Q.messageAlign,u.valign="center",u.textMargin=Q.wrapPadding,u.tspan=!1,a.hasKatex(u.text)?await E(t,u,{startx:n,stopx:o,starty:r}):w(t,u);const m=g.width;let x;n===o?x=Q.rightAngles?t.append("path").attr("d",`M ${n},${r} H ${n+a.common_default.getMax(Q.width/2,m/2)} V ${r+25} H ${n}`):t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(x=t.append("line"),x.attr("x1",n),x.attr("y1",r),x.attr("x2",o),x.attr("y2",r)),d===i.db.LINETYPE.DOTTED||d===i.db.LINETYPE.DOTTED_CROSS||d===i.db.LINETYPE.DOTTED_POINT||d===i.db.LINETYPE.DOTTED_OPEN||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0");let y="";if(Q.arrowMarkerAbsolute&&(y=a.getUrl(!0)),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),d!==i.db.LINETYPE.SOLID&&d!==i.db.LINETYPE.DOTTED||x.attr("marker-end","url("+y+"#arrowhead)"),d!==i.db.LINETYPE.BIDIRECTIONAL_SOLID&&d!==i.db.LINETYPE.BIDIRECTIONAL_DOTTED||(x.attr("marker-start","url("+y+"#arrowhead)"),x.attr("marker-end","url("+y+"#arrowhead)")),d!==i.db.LINETYPE.SOLID_POINT&&d!==i.db.LINETYPE.DOTTED_POINT||x.attr("marker-end","url("+y+"#filled-head)"),d!==i.db.LINETYPE.SOLID_CROSS&&d!==i.db.LINETYPE.DOTTED_CROSS||x.attr("marker-end","url("+y+"#crosshead)"),p||Q.showSequenceNumbers){if(d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED){const t=6;n<o?x.attr("x1",n+2*t):x.attr("x1",n+t)}t.append("line").attr("x1",n).attr("y1",r).attr("x2",n).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h)}},"drawMessage"),ot=a.__name(function(t,e,s,r,i,n,o){let c,l=0,d=0,h=0;for(const p of r){const t=e.get(p),r=t.box;c&&c!=r&&(o||tt.models.addBox(c),d+=Q.boxMargin+c.margin),r&&r!=c&&(o||(r.x=l+d,r.y=i),d+=r.margin),t.width=t.width||Q.width,t.height=a.common_default.getMax(t.height||Q.height,Q.height),t.margin=t.margin||Q.actorMargin,h=a.common_default.getMax(h,t.height),s.get(t.name)&&(d+=t.width/2),t.x=l+d,t.starty=tt.getVerticalPos(),tt.insert(t.x,i,t.x+t.width,t.height),l+=t.width+d,t.box&&(t.box.width=l+r.margin-t.box.x),d=t.margin,c=t.box,tt.models.addActor(t)}c&&!o&&tt.models.addBox(c),tt.bumpVerticalPos(h)},"addActorRenderingData"),ct=a.__name(async function(t,e,s,r){if(r){let r=0;tt.bumpVerticalPos(2*Q.boxMargin);for(const i of s){const s=e.get(i);s.stopy||(s.stopy=tt.getVerticalPos());const n=await J.drawActor(t,s,Q,!0);r=a.common_default.getMax(r,n)}tt.bumpVerticalPos(r+Q.boxMargin)}else for(const a of s){const s=e.get(a);await J.drawActor(t,s,Q,!1)}},"drawActors"),lt=a.__name(function(t,e,a,s){let r=0,i=0;for(const n of a){const a=e.get(n),o=yt(a),c=J.drawPopup(t,a,o,Q,Q.forceMenus,s);c.height>r&&(r=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:r,maxWidth:i}},"drawActorsPopup"),dt=a.__name(function(t){a.assignWithDepth_default(Q,t),t.fontFamily&&(Q.actorFontFamily=Q.noteFontFamily=Q.messageFontFamily=t.fontFamily),t.fontSize&&(Q.actorFontSize=Q.noteFontSize=Q.messageFontSize=t.fontSize),t.fontWeight&&(Q.actorFontWeight=Q.noteFontWeight=Q.messageFontWeight=t.fontWeight)},"setConf"),ht=a.__name(function(t){return tt.activations.filter(function(e){return e.actor===t})},"actorActivations"),pt=a.__name(function(t,e){const s=e.get(t),r=ht(t);return[r.reduce(function(t,e){return a.common_default.getMin(t,e.startx)},s.x+s.width/2-1),r.reduce(function(t,e){return a.common_default.getMax(t,e.stopx)},s.x+s.width/2+1)]},"activationBounds");function gt(t,e,s,r,i){tt.bumpVerticalPos(s);let n=r;if(e.id&&e.message&&t[e.id]){const s=t[e.id].width,i=at(Q);e.message=a.utils_default.wrapLabel(`[${e.message}]`,s-2*Q.wrapPadding,i),e.width=s,e.wrap=!0;const o=a.utils_default.calculateTextDimensions(e.message,i),c=a.common_default.getMax(o.height,Q.labelBoxHeight);n=r+c,a.log.debug(`${c} - ${e.message}`)}i(e),tt.bumpVerticalPos(n)}function ut(t,e,s,r,i,n,o){function c(a,s){a.x<i.get(t.from).x?(tt.insert(e.stopx-s,e.starty,e.startx,e.stopy+a.height/2+Q.noteMargin),e.stopx=e.stopx+s):(tt.insert(e.startx,e.starty,e.stopx+s,e.stopy+a.height/2+Q.noteMargin),e.stopx=e.stopx-s)}function g(a,s){a.x<i.get(t.to).x?(tt.insert(e.startx-s,e.starty,e.stopx,e.stopy+a.height/2+Q.noteMargin),e.startx=e.startx+s):(tt.insert(e.stopx,e.starty,e.startx+s,e.stopy+a.height/2+Q.noteMargin),e.startx=e.startx-s)}a.__name(c,"receiverAdjustment"),a.__name(g,"senderAdjustment");const u=[l,d,p,h];if(n.get(t.to)==r){const e=i.get(t.to);c(e,u.includes(e.type)?21:e.width/2+3),e.starty=s-e.height/2,tt.bumpVerticalPos(e.height/2)}else if(o.get(t.from)==r){const e=i.get(t.from);if(Q.mirrorActors){g(e,u.includes(e.type)?18:e.width/2)}e.stopy=s-e.height/2,tt.bumpVerticalPos(e.height/2)}else if(o.get(t.to)==r){const e=i.get(t.to);if(Q.mirrorActors){c(e,u.includes(e.type)?21:e.width/2+3)}e.stopy=s-e.height/2,tt.bumpVerticalPos(e.height/2)}}a.__name(gt,"adjustLoopHeightForWrap"),a.__name(ut,"adjustCreatedDestroyedData");var mt=a.__name(async function(t,e,s,r){const{securityLevel:i,sequence:n}=a.getConfig2();let o;Q=n,"sandbox"===i&&(o=a.select("#i"+e));const c="sandbox"===i?a.select(o.nodes()[0].contentDocument.body):a.select("body"),l="sandbox"===i?o.nodes()[0].contentDocument:document;tt.init(),a.log.debug(r.db);const d="sandbox"===i?c.select(`[id="${e}"]`):a.select(`[id="${e}"]`),h=r.db.getActors(),p=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),u=r.db.getBoxes();let m=r.db.getActorKeys();const x=r.db.getMessages(),y=r.db.getDiagramTitle(),_=r.db.hasAtLeastOneBox(),f=r.db.hasAtLeastOneBoxWithTitle(),b=await xt(h,x,r);if(Q.height=await _t(h,b,u),J.insertComputerIcon(d),J.insertDatabaseIcon(d),J.insertClockIcon(d),_&&(tt.bumpVerticalPos(Q.boxMargin),f&&tt.bumpVerticalPos(u[0].textMaxHeight)),!0===Q.hideUnusedParticipants){const t=new Set;x.forEach(e=>{t.add(e.from),t.add(e.to)}),m=m.filter(e=>t.has(e))}ot(d,h,p,m,0,x,!1);const T=await Tt(x,h,b,r);function E(t,e){const a=tt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),J.drawActivation(d,a,e,Q,ht(t.from).length),tt.insert(a.startx,e-10,a.stopx,e)}J.insertArrowHead(d),J.insertArrowCrossHead(d),J.insertArrowFilledHead(d),J.insertSequenceNumber(d),a.__name(E,"activeEnd");let w=1,I=1;const L=[],k=[];let N=0;for(const P of x){let t,e,s;switch(P.type){case r.db.LINETYPE.NOTE:tt.resetVerticalPos(),e=P.noteModel,await et(d,e);break;case r.db.LINETYPE.ACTIVE_START:tt.newActivation(P,d,h);break;case r.db.LINETYPE.ACTIVE_END:E(P,tt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=tt.endLoop(),await J.drawLoop(d,t,"loop",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:gt(T,P,Q.boxMargin,Q.boxMargin,t=>tt.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:t=tt.endLoop(),k.push(t),tt.models.addLoop(t),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=tt.endLoop(),await J.drawLoop(d,t,"opt",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:gt(T,P,Q.boxMargin+Q.boxTextMargin,Q.boxMargin,t=>tt.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=tt.endLoop(),await J.drawLoop(d,t,"alt",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t)),tt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:gt(T,P,Q.boxMargin+Q.boxTextMargin,Q.boxMargin,t=>tt.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=tt.endLoop(),await J.drawLoop(d,t,"par",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:w=P.message.start||w,I=P.message.step||I,P.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:gt(T,P,Q.boxMargin+Q.boxTextMargin,Q.boxMargin,t=>tt.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=tt.endLoop(),await J.drawLoop(d,t,"critical",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:gt(T,P,Q.boxMargin,Q.boxMargin+Q.boxTextMargin,t=>tt.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=tt.endLoop(),await J.drawLoop(d,t,"break",Q),tt.bumpVerticalPos(t.stopy-tt.getVerticalPos()),tt.models.addLoop(t);break;default:try{s=P.msgModel,s.starty=tt.getVerticalPos(),s.sequenceIndex=w,s.sequenceVisible=r.db.showSequenceNumbers();const t=await it(0,s);ut(P,s,t,N,h,p,g),L.push({messageModel:s,lineStartY:t}),tt.models.addMessage(s)}catch(C){a.log.error("error while drawing message",C)}}[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(P.type)&&(w+=I),N++}a.log.debug("createdActors",p),a.log.debug("destroyedActors",g),await ct(d,h,m,!1);for(const a of L)await nt(d,a.messageModel,a.lineStartY,r);Q.mirrorActors&&await ct(d,h,m,!0),k.forEach(t=>J.drawBackgroundRect(d,t)),P(d,h,m,Q);for(const a of tt.models.boxes){a.height=tt.getVerticalPos()-a.y,tt.insert(a.x,a.y,a.x+a.width,a.height);const t=2*Q.boxMargin;a.startx=a.x-t,a.starty=a.y-.25*t,a.stopx=a.startx+a.width+2*t,a.stopy=a.starty+a.height+.75*t,a.stroke="rgb(0,0,0, 0.5)",J.drawBox(d,a,Q)}_&&tt.bumpVerticalPos(Q.boxMargin);const v=lt(d,h,m,l),{bounds:A}=tt.getBounds();void 0===A.startx&&(A.startx=0),void 0===A.starty&&(A.starty=0),void 0===A.stopx&&(A.stopx=0),void 0===A.stopy&&(A.stopy=0);let M=A.stopy-A.starty;M<v.maxHeight&&(M=v.maxHeight);let O=M+2*Q.diagramMarginY;Q.mirrorActors&&(O=O-Q.boxMargin+Q.bottomMarginAdj);let S=A.stopx-A.startx;S<v.maxWidth&&(S=v.maxWidth);const D=S+2*Q.diagramMarginX;y&&d.append("text").text(y).attr("x",(A.stopx-A.startx)/2-2*Q.diagramMarginX).attr("y",-25),a.configureSvgSize(d,O,D,Q.useMaxWidth);const R=y?40:0;d.attr("viewBox",A.startx-Q.diagramMarginX+" -"+(Q.diagramMarginY+R)+" "+D+" "+(O+R)),a.log.debug("models:",tt.models)},"draw");async function xt(t,e,s){const r={};for(const i of e)if(t.get(i.to)&&t.get(i.from)){const e=t.get(i.to);if(i.placement===s.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(i.placement===s.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const n=void 0!==i.placement,o=!n,c=n?st(Q):at(Q),l=i.wrap?a.utils_default.wrapLabel(i.message,Q.width-2*Q.wrapPadding,c):i.message,d=(a.hasKatex(l)?await a.calculateMathMLDimensions(i.message,a.getConfig2()):a.utils_default.calculateTextDimensions(l,c)).width+2*Q.wrapPadding;o&&i.from===e.nextActor?r[i.to]=a.common_default.getMax(r[i.to]||0,d):o&&i.from===e.prevActor?r[i.from]=a.common_default.getMax(r[i.from]||0,d):o&&i.from===i.to?(r[i.from]=a.common_default.getMax(r[i.from]||0,d/2),r[i.to]=a.common_default.getMax(r[i.to]||0,d/2)):i.placement===s.db.PLACEMENT.RIGHTOF?r[i.from]=a.common_default.getMax(r[i.from]||0,d):i.placement===s.db.PLACEMENT.LEFTOF?r[e.prevActor]=a.common_default.getMax(r[e.prevActor]||0,d):i.placement===s.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=a.common_default.getMax(r[e.prevActor]||0,d/2)),e.nextActor&&(r[i.from]=a.common_default.getMax(r[i.from]||0,d/2)))}return a.log.debug("maxMessageWidthPerActor:",r),r}a.__name(xt,"getMaxMessageWidthPerActor");var yt=a.__name(function(t){let e=0;const s=rt(Q);for(const r in t.links){const t=a.utils_default.calculateTextDimensions(r,s).width+2*Q.wrapPadding+2*Q.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function _t(t,e,s){let r=0;for(const n of t.keys()){const e=t.get(n);e.wrap&&(e.description=a.utils_default.wrapLabel(e.description,Q.width-2*Q.wrapPadding,rt(Q)));const s=a.hasKatex(e.description)?await a.calculateMathMLDimensions(e.description,a.getConfig2()):a.utils_default.calculateTextDimensions(e.description,rt(Q));e.width=e.wrap?Q.width:a.common_default.getMax(Q.width,s.width+2*Q.wrapPadding),e.height=e.wrap?a.common_default.getMax(s.height,Q.height):Q.height,r=a.common_default.getMax(r,e.height)}for(const n in e){const s=t.get(n);if(!s)continue;const r=t.get(s.nextActor);if(!r){const t=e[n]+Q.actorMargin-s.width/2;s.margin=a.common_default.getMax(t,Q.actorMargin);continue}const i=e[n]+Q.actorMargin-s.width/2-r.width/2;s.margin=a.common_default.getMax(i,Q.actorMargin)}let i=0;return s.forEach(e=>{const s=at(Q);let r=e.actorKeys.reduce((e,a)=>e+(t.get(a).width+(t.get(a).margin||0)),0);r+=8*Q.boxMargin,r-=2*Q.boxTextMargin,e.wrap&&(e.name=a.utils_default.wrapLabel(e.name,r-2*Q.wrapPadding,s));const n=a.utils_default.calculateTextDimensions(e.name,s);i=a.common_default.getMax(n.height,i);const o=a.common_default.getMax(r,n.width+2*Q.wrapPadding);if(e.margin=Q.boxTextMargin,r<o){const t=(o-r)/2;e.margin+=t}}),s.forEach(t=>t.textMaxHeight=i),a.common_default.getMax(r,Q.height)}a.__name(_t,"calculateActorMargins");var ft=a.__name(async function(t,e,s){const r=e.get(t.from),i=e.get(t.to),n=r.x,o=i.x,c=t.wrap&&t.message;let l=a.hasKatex(t.message)?await a.calculateMathMLDimensions(t.message,a.getConfig2()):a.utils_default.calculateTextDimensions(c?a.utils_default.wrapLabel(t.message,Q.width,st(Q)):t.message,st(Q));const d={width:c?Q.width:a.common_default.getMax(Q.width,l.width+2*Q.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===s.db.PLACEMENT.RIGHTOF?(d.width=c?a.common_default.getMax(Q.width,l.width):a.common_default.getMax(r.width/2+i.width/2,l.width+2*Q.noteMargin),d.startx=n+(r.width+Q.actorMargin)/2):t.placement===s.db.PLACEMENT.LEFTOF?(d.width=c?a.common_default.getMax(Q.width,l.width+2*Q.noteMargin):a.common_default.getMax(r.width/2+i.width/2,l.width+2*Q.noteMargin),d.startx=n-d.width+(r.width-Q.actorMargin)/2):t.to===t.from?(l=a.utils_default.calculateTextDimensions(c?a.utils_default.wrapLabel(t.message,a.common_default.getMax(Q.width,r.width),st(Q)):t.message,st(Q)),d.width=c?a.common_default.getMax(Q.width,r.width):a.common_default.getMax(r.width,Q.width,l.width+2*Q.noteMargin),d.startx=n+(r.width-d.width)/2):(d.width=Math.abs(n+r.width/2-(o+i.width/2))+Q.actorMargin,d.startx=n<o?n+r.width/2-Q.actorMargin/2:o+i.width/2-Q.actorMargin/2),c&&(d.message=a.utils_default.wrapLabel(t.message,d.width-2*Q.wrapPadding,st(Q))),a.log.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`),d},"buildNoteModel"),bt=a.__name(function(t,e,s){if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[r,i]=pt(t.from,e),[n,o]=pt(t.to,e),c=r<=n;let l=c?i:r,d=c?n:o;const h=Math.abs(n-o)>2,p=a.__name(t=>c?-t:t,"adjustValue");t.from===t.to?d=l:(t.activate&&!h&&(d+=p(Q.activationWidth/2-1)),[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)),[s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=p(3)));const g=[r,i,n,o],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=a.utils_default.wrapLabel(t.message,a.common_default.getMax(u+2*Q.wrapPadding,Q.width),at(Q)));const m=a.utils_default.calculateTextDimensions(t.message,at(Q));return{width:a.common_default.getMax(t.wrap?0:m.width+2*Q.wrapPadding,u+2*Q.wrapPadding,Q.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),Tt=a.__name(async function(t,e,s,r){const i={},n=[];let o,c,l;for(const d of t){switch(d.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:n.push({id:d.id,msg:d.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:d.message&&(o=n.pop(),i[o.id]=o,i[d.id]=o,n.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=n.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(d.from?d.from:d.to.actor),a=ht(d.from?d.from:d.to.actor).length,s=t.x+t.width/2+(a-1)*Q.activationWidth/2,r={startx:s,stopx:s+Q.activationWidth,actor:d.from,enabled:!0};tt.activations.push(r)}break;case r.db.LINETYPE.ACTIVE_END:{const t=tt.activations.map(t=>t.actor).lastIndexOf(d.from);tt.activations.splice(t,1).splice(0,1)}}void 0!==d.placement?(c=await ft(d,e,r),d.noteModel=c,n.forEach(t=>{o=t,o.from=a.common_default.getMin(o.from,c.startx),o.to=a.common_default.getMax(o.to,c.startx+c.width),o.width=a.common_default.getMax(o.width,Math.abs(o.from-o.to))-Q.labelBoxWidth})):(l=bt(d,e,r),d.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach(t=>{if(o=t,l.startx===l.stopx){const t=e.get(d.from),s=e.get(d.to);o.from=a.common_default.getMin(t.x-l.width/2,t.x-t.width/2,o.from),o.to=a.common_default.getMax(s.x+l.width/2,s.x+t.width/2,o.to),o.width=a.common_default.getMax(o.width,Math.abs(o.to-o.from))-Q.labelBoxWidth}else o.from=a.common_default.getMin(l.startx,o.from),o.to=a.common_default.getMax(l.stopx,o.to),o.width=a.common_default.getMax(o.width,l.width)-Q.labelBoxWidth}))}return tt.activations=[],a.log.debug("Loop type widths:",i),i},"calculateLoopBounds"),Et={bounds:tt,drawActors:ct,drawActorsPopup:lt,setConf:dt,draw:mt},wt={parser:i,get db(){return new g},renderer:Et,styles:u,init:a.__name(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,a.setConfig2({sequence:{wrap:t.wrap}}))},"init")};exports.diagram=wt;
|
|
2
|
+
//# sourceMappingURL=sequenceDiagram-WL72ISMW-ChX1PErX.cjs.map
|