@ashwin_droid/notion-stream 1.0.0 → 1.0.2

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.
Files changed (154) hide show
  1. package/dist/{_baseUniq-DSwfPiGC.js → _baseUniq-D32sgNIc.js} +1 -1
  2. package/dist/{_baseUniq-CT-tc-CG.mjs → _baseUniq-DCnQIx8G.mjs} +51 -51
  3. package/dist/{arc-BBnIBs2j.js → arc-B0uBm0sN.js} +1 -1
  4. package/dist/{arc-DmoYXidQ.mjs → arc-OrNNmmBm.mjs} +1 -1
  5. package/dist/{architecture-U656AL7Q-C0ZB2O9M.js → architecture-U656AL7Q-CLYqYgyv.js} +1 -1
  6. package/dist/{architecture-U656AL7Q-CMPtJMZ-.mjs → architecture-U656AL7Q-seCMyeyz.mjs} +1 -1
  7. package/dist/architectureDiagram-VXUJARFQ-BGsDPmi_.js +36 -0
  8. package/dist/{architectureDiagram-VXUJARFQ-BYzpbF40.mjs → architectureDiagram-VXUJARFQ-BmPLNLcs.mjs} +1846 -1850
  9. package/dist/{blockDiagram-VD42YOAC-DPVTCHn5.mjs → blockDiagram-VD42YOAC-CXKvT-9-.mjs} +913 -922
  10. package/dist/blockDiagram-VD42YOAC-NQhzFvsO.js +122 -0
  11. package/dist/c4Diagram-YG6GDRKO-CMXx6pyB.js +10 -0
  12. package/dist/{c4Diagram-YG6GDRKO-C2Y4q08p.mjs → c4Diagram-YG6GDRKO-DAGMHESb.mjs} +169 -170
  13. package/dist/{channel-DVpqhnow.mjs → channel-BXGyzQA6.mjs} +1 -1
  14. package/dist/channel-Dw8BXC8D.js +1 -0
  15. package/dist/chunk-4BX2VUAB-MnK73C0-.js +1 -0
  16. package/dist/chunk-4BX2VUAB-ZaWvd3Xe.mjs +8 -0
  17. package/dist/{chunk-55IACEB6-P_FVKIbW.js → chunk-55IACEB6-B1EpdpVW.js} +1 -1
  18. package/dist/{chunk-55IACEB6-Du1Simcj.mjs → chunk-55IACEB6-iKbZBHA5.mjs} +1 -1
  19. package/dist/chunk-B4BG7PRW-Bo_sfBKL.js +165 -0
  20. package/dist/{chunk-B4BG7PRW-BUKsa2yH.mjs → chunk-B4BG7PRW-DgqSow4f.mjs} +251 -252
  21. package/dist/{chunk-DI55MBZ5-C9h0qLVI.mjs → chunk-DI55MBZ5-BAHL-2VJ.mjs} +444 -456
  22. package/dist/chunk-DI55MBZ5-BuuMLI1S.js +220 -0
  23. package/dist/{chunk-FMBD7UC4-C08-zA06.mjs → chunk-FMBD7UC4-BE8MbNLe.mjs} +1 -1
  24. package/dist/{chunk-FMBD7UC4-48-zdz-1.js → chunk-FMBD7UC4-Cs1BNv23.js} +1 -1
  25. package/dist/chunk-QN33PNHL-MX1ZMWu-.js +1 -0
  26. package/dist/chunk-QN33PNHL-ZaWv5vaA.mjs +19 -0
  27. package/dist/{chunk-QZHKN3VN-DbO6TJSK.mjs → chunk-QZHKN3VN-D2X7PBDi.mjs} +1 -1
  28. package/dist/{chunk-QZHKN3VN-Dy2264ui.js → chunk-QZHKN3VN-Db6mVb9M.js} +1 -1
  29. package/dist/{chunk-TZMSLE5B-BPmI9i6R.mjs → chunk-TZMSLE5B-AMFXF6mq.mjs} +20 -20
  30. package/dist/{chunk-TZMSLE5B-COENnLAZ.js → chunk-TZMSLE5B-CzjtACDr.js} +1 -1
  31. package/dist/{classDiagram-v2-WZHVMYZB-mzvV1Ifg.mjs → classDiagram-2ON5EDUG-CPwvtUDj.mjs} +2 -2
  32. package/dist/{classDiagram-2ON5EDUG-CFFwYK87.js → classDiagram-2ON5EDUG-UNrH9bQo.js} +1 -1
  33. package/dist/{classDiagram-2ON5EDUG-mzvV1Ifg.mjs → classDiagram-v2-WZHVMYZB-CPwvtUDj.mjs} +2 -2
  34. package/dist/{classDiagram-v2-WZHVMYZB-CFFwYK87.js → classDiagram-v2-WZHVMYZB-UNrH9bQo.js} +1 -1
  35. package/dist/{clone-KtLCwiKH.mjs → clone-CV4F8CSW.mjs} +1 -1
  36. package/dist/clone-HVsPHeK3.js +1 -0
  37. package/dist/{code-block-37QAKDTI-sxlq94xm.js → code-block-37QAKDTI-38K5Mxo2.js} +1 -1
  38. package/dist/{code-block-37QAKDTI-CmykMxjQ.mjs → code-block-37QAKDTI-Q-OOsw6q.mjs} +1 -1
  39. package/dist/cose-bilkent-S5V4N54A-1B77PywG.js +1 -0
  40. package/dist/{cose-bilkent-S5V4N54A-BXcldnso.mjs → cose-bilkent-S5V4N54A-greBbyuM.mjs} +592 -589
  41. package/dist/cytoscape.esm-CNUX3VTg.js +321 -0
  42. package/dist/{cytoscape.esm-ZmItrg9y.mjs → cytoscape.esm-Cvf3sx9F.mjs} +56 -83
  43. package/dist/dagre-6UL2VRFP-DEQXyXKh.js +4 -0
  44. package/dist/dagre-6UL2VRFP-DN5Inkgr.mjs +443 -0
  45. package/dist/diagram-PSM6KHXK-C7tjFZpr.js +24 -0
  46. package/dist/{diagram-PSM6KHXK-DIV3jw9d.mjs → diagram-PSM6KHXK-D-GS1fTc.mjs} +45 -48
  47. package/dist/{diagram-QEK2KX5R-Q0M2_YtR.mjs → diagram-QEK2KX5R-DJXBxeH4.mjs} +10 -14
  48. package/dist/diagram-QEK2KX5R-Doa8ooC_.js +43 -0
  49. package/dist/diagram-S2PKOQOG-BN04h93a.js +24 -0
  50. package/dist/{diagram-S2PKOQOG-_WGA6s2-.mjs → diagram-S2PKOQOG-BuPevKqw.mjs} +22 -23
  51. package/dist/erDiagram-Q2GNP2WA-AS2vnQKc.js +60 -0
  52. package/dist/{erDiagram-Q2GNP2WA-CW0D_QGb.mjs → erDiagram-Q2GNP2WA-DxOmvmqL.mjs} +77 -78
  53. package/dist/flowDiagram-NV44I4VS-BChiRwcp.js +162 -0
  54. package/dist/{flowDiagram-NV44I4VS-DVQ8Ntc4.mjs → flowDiagram-NV44I4VS-Cs_jC87H.mjs} +442 -449
  55. package/dist/{ganttDiagram-JELNMOA3-Bk-dX6qT.mjs → ganttDiagram-JELNMOA3-02b_-xyZ.mjs} +1049 -1041
  56. package/dist/ganttDiagram-JELNMOA3-BGy1b6TD.js +267 -0
  57. package/dist/{gitGraph-F6HP7TQM-CsdwxYUE.mjs → gitGraph-F6HP7TQM-BWm0SBV4.mjs} +1 -1
  58. package/dist/{gitGraph-F6HP7TQM-DvIgo2TM.js → gitGraph-F6HP7TQM-DVfckSNX.js} +1 -1
  59. package/dist/gitGraphDiagram-NY62KEGX-CfzoE07P.mjs +699 -0
  60. package/dist/gitGraphDiagram-NY62KEGX-Cm9ywQoW.js +65 -0
  61. package/dist/{graph-C_T4ZBuC.mjs → graph-DEu7-ZhH.mjs} +8 -8
  62. package/dist/{graph-BNpx6ebg.js → graph-Dw_87ii6.js} +1 -1
  63. package/dist/index-BwYOYPeK.js +670 -0
  64. package/dist/{index-oe4HpmeG.mjs → index-DH3CVXwD.mjs} +22541 -22646
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.js +1 -1
  67. package/dist/index.mjs +3 -3
  68. package/dist/{info-NVLQJR56-BwFQRguW.js → info-NVLQJR56-BpKxONZx.js} +1 -1
  69. package/dist/info-NVLQJR56-MmJP3L6S.mjs +5 -0
  70. package/dist/{infoDiagram-WHAUD3N6-C-gzsm95.mjs → infoDiagram-WHAUD3N6-Bfsucvti.mjs} +2 -2
  71. package/dist/{infoDiagram-WHAUD3N6-CCb5k_S7.js → infoDiagram-WHAUD3N6-q-yX3_By.js} +1 -1
  72. package/dist/journeyDiagram-XKPGCS4Q-BqtyHvQF.js +139 -0
  73. package/dist/{journeyDiagram-XKPGCS4Q-DzkUL_YG.mjs → journeyDiagram-XKPGCS4Q-dFRLmnr-.mjs} +24 -26
  74. package/dist/kanban-definition-3W4ZIXB7-DeOl9Eme.mjs +719 -0
  75. package/dist/kanban-definition-3W4ZIXB7-DraMxv75.js +89 -0
  76. package/dist/{layout-CuWQnP5Y.js → layout-BKTUO8WZ.js} +1 -1
  77. package/dist/{layout-Cd98WJ7r.mjs → layout-CpL-hYTa.mjs} +22 -22
  78. package/dist/{linear-SU4e8MRt.mjs → linear-CLwIU3di.mjs} +20 -20
  79. package/dist/{linear-DFDw13y6.js → linear-DvM229Di.js} +1 -1
  80. package/dist/mermaid-4DMBBIKO-BpqXz0_U.mjs +4 -0
  81. package/dist/{mermaid-4DMBBIKO-BihEtyib.js → mermaid-4DMBBIKO-Cd15t2pT.js} +1 -1
  82. package/dist/mermaid-parser.core-BVlc9Lqd.js +128 -0
  83. package/dist/{mermaid-parser.core-C8Sxzqul.mjs → mermaid-parser.core-CLAapB2-.mjs} +3404 -3369
  84. package/dist/{min-C2k771MZ.mjs → min--ML-ONY_.mjs} +2 -2
  85. package/dist/{min-CppMRDFn.js → min-BQ4NUvNf.js} +1 -1
  86. package/dist/{mindmap-definition-VGOIOE7T-BUd354uH.mjs → mindmap-definition-VGOIOE7T-78K_EDCb.mjs} +170 -172
  87. package/dist/mindmap-definition-VGOIOE7T-ZHY70ZzV.js +68 -0
  88. package/dist/notion-stream.css +1 -0
  89. package/dist/{ordinal-C0oynhte.mjs → ordinal-B-KqvkJf.mjs} +1 -1
  90. package/dist/{packet-BFZMPI3H-Cz_A86d3.mjs → packet-BFZMPI3H-B34lFb6T.mjs} +1 -1
  91. package/dist/{packet-BFZMPI3H-CFx3kSkL.js → packet-BFZMPI3H-C9xcJQVN.js} +1 -1
  92. package/dist/{pie-7BOR55EZ-_1MqisBd.js → pie-7BOR55EZ-Bz_jfTd_.js} +1 -1
  93. package/dist/pie-7BOR55EZ-DW2Zgje5.mjs +5 -0
  94. package/dist/{pieDiagram-ADFJNKIX-Bg0_gu43.js → pieDiagram-ADFJNKIX-CKzchAXU.js} +2 -2
  95. package/dist/{pieDiagram-ADFJNKIX-lRs_rpwI.mjs → pieDiagram-ADFJNKIX-Ctp6QR7f.mjs} +21 -21
  96. package/dist/quadrantDiagram-AYHSOK5B-D2Rt32D2.js +7 -0
  97. package/dist/{quadrantDiagram-AYHSOK5B-D9kypJt6.mjs → quadrantDiagram-AYHSOK5B-D3U_Qicu.mjs} +230 -232
  98. package/dist/{radar-NHE76QYJ-B-PvZD0K.mjs → radar-NHE76QYJ-CO5ECFHq.mjs} +1 -1
  99. package/dist/{radar-NHE76QYJ-CdtC4C8F.js → radar-NHE76QYJ-DI4PJJjm.js} +1 -1
  100. package/dist/requirementDiagram-UZGBJVZJ-CSgb6U9N.js +64 -0
  101. package/dist/{requirementDiagram-UZGBJVZJ-B5ulaHjE.mjs → requirementDiagram-UZGBJVZJ-Da_yWSD1.mjs} +190 -192
  102. package/dist/sankeyDiagram-TZEHDZUN-C8jpBnM0.js +10 -0
  103. package/dist/{sankeyDiagram-TZEHDZUN-DprIPFbe.mjs → sankeyDiagram-TZEHDZUN-Dp3Eyl8Q.mjs} +189 -189
  104. package/dist/sequenceDiagram-WL72ISMW-BZJ7d_X4.js +145 -0
  105. package/dist/{sequenceDiagram-WL72ISMW-B4m4oag0.mjs → sequenceDiagram-WL72ISMW-yJKe02sV.mjs} +222 -229
  106. package/dist/{stateDiagram-FKZM4ZOC-BD4tnS-V.js → stateDiagram-FKZM4ZOC-Cfuygt_P.js} +1 -1
  107. package/dist/{stateDiagram-FKZM4ZOC-DjkdDbQ2.mjs → stateDiagram-FKZM4ZOC-z0IX85WL.mjs} +4 -4
  108. package/dist/{stateDiagram-v2-4FDKWEC3-AK86F3i6.mjs → stateDiagram-v2-4FDKWEC3-BDMFqSat.mjs} +2 -2
  109. package/dist/{stateDiagram-v2-4FDKWEC3-sybMoxOk.js → stateDiagram-v2-4FDKWEC3-BiriAQkj.js} +1 -1
  110. package/dist/{timeline-definition-IT6M3QCI-BFuQEeZP.mjs → timeline-definition-IT6M3QCI-BmEq-RM3.mjs} +217 -223
  111. package/dist/timeline-definition-IT6M3QCI-CBmpRgUM.js +61 -0
  112. package/dist/{treemap-KMMF4GRG-gtrnY16v.mjs → treemap-KMMF4GRG-IaHP18r_.mjs} +1 -1
  113. package/dist/{treemap-KMMF4GRG-DTnRa789.js → treemap-KMMF4GRG-qP0VzKwW.js} +1 -1
  114. package/dist/{xychartDiagram-PRI3JC2R-CjXiy6m0.mjs → xychartDiagram-PRI3JC2R-BSaI76KX.mjs} +7 -7
  115. package/dist/xychartDiagram-PRI3JC2R-CQgij0Fy.js +7 -0
  116. package/package.json +5 -5
  117. package/dist/architectureDiagram-VXUJARFQ-BPQoZmaM.js +0 -36
  118. package/dist/blockDiagram-VD42YOAC-Z3Fc3Bew.js +0 -122
  119. package/dist/c4Diagram-YG6GDRKO-LzDuCZ2V.js +0 -10
  120. package/dist/channel-6dUO0MQi.js +0 -1
  121. package/dist/chunk-4BX2VUAB-BwubFldI.js +0 -1
  122. package/dist/chunk-4BX2VUAB-DldMXCTt.mjs +0 -9
  123. package/dist/chunk-B4BG7PRW-CKX0VJ-S.js +0 -165
  124. package/dist/chunk-DI55MBZ5-CMq-O8k2.js +0 -220
  125. package/dist/chunk-QN33PNHL-B0sO38bZ.js +0 -1
  126. package/dist/chunk-QN33PNHL-B_PGnTkk.mjs +0 -20
  127. package/dist/clone-B0UaPT2Z.js +0 -1
  128. package/dist/cose-bilkent-S5V4N54A-BCaAPmuF.js +0 -1
  129. package/dist/cytoscape.esm-DkGgpG6d.js +0 -331
  130. package/dist/dagre-6UL2VRFP-By42zbLA.mjs +0 -446
  131. package/dist/dagre-6UL2VRFP-DCwfkcWi.js +0 -4
  132. package/dist/diagram-PSM6KHXK-hjXN9n1N.js +0 -24
  133. package/dist/diagram-QEK2KX5R-B04ODMim.js +0 -43
  134. package/dist/diagram-S2PKOQOG-BmCs4MZE.js +0 -24
  135. package/dist/erDiagram-Q2GNP2WA-4KtQUUuI.js +0 -60
  136. package/dist/flowDiagram-NV44I4VS-BwpfJE0U.js +0 -162
  137. package/dist/ganttDiagram-JELNMOA3-D7rI7u8B.js +0 -267
  138. package/dist/gitGraphDiagram-NY62KEGX-BDTsbSkO.mjs +0 -712
  139. package/dist/gitGraphDiagram-NY62KEGX-IQ8KriUw.js +0 -65
  140. package/dist/index-CkYZRBYn.js +0 -676
  141. package/dist/info-NVLQJR56-B5gDnSIT.mjs +0 -5
  142. package/dist/journeyDiagram-XKPGCS4Q-POnSekz9.js +0 -139
  143. package/dist/kanban-definition-3W4ZIXB7-BPr0_7wG.mjs +0 -720
  144. package/dist/kanban-definition-3W4ZIXB7-Bm064qrf.js +0 -89
  145. package/dist/mermaid-4DMBBIKO-DDxvQcE9.mjs +0 -4
  146. package/dist/mermaid-parser.core-BHAgLMGa.js +0 -128
  147. package/dist/mindmap-definition-VGOIOE7T-CV7bD4HY.js +0 -68
  148. package/dist/pie-7BOR55EZ-B0-atE_o.mjs +0 -5
  149. package/dist/quadrantDiagram-AYHSOK5B-B4gVakRV.js +0 -7
  150. package/dist/requirementDiagram-UZGBJVZJ-0zMPj-SD.js +0 -64
  151. package/dist/sankeyDiagram-TZEHDZUN-Cl8-L83T.js +0 -10
  152. package/dist/sequenceDiagram-WL72ISMW-DRQn7Fe4.js +0 -145
  153. package/dist/timeline-definition-IT6M3QCI-2X4dfyLj.js +0 -61
  154. package/dist/xychartDiagram-PRI3JC2R-BaFd1In8.js +0 -7
@@ -1,145 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./chunk-TZMSLE5B-COENnLAZ.js"),i=require("./index-CkYZRBYn.js"),ne=require("./chunk-QZHKN3VN-Dy2264ui.js");var Ot=function(){var e=i.__name(function(ot,w,L,v){for(L=L||{},v=ot.length;v--;L[ot[v]]=w);return L},"o"),t=[1,2],o=[1,3],a=[1,4],r=[2,4],n=[1,9],l=[1,11],d=[1,13],c=[1,14],s=[1,16],u=[1,17],f=[1,18],x=[1,24],m=[1,25],y=[1,26],b=[1,27],A=[1,28],P=[1,29],N=[1,30],S=[1,31],D=[1,32],Y=[1,33],q=[1,34],X=[1,35],j=[1,36],z=[1,37],H=[1,38],F=[1,39],C=[1,41],Q=[1,42],K=[1,43],Z=[1,44],tt=[1,45],R=[1,46],T=[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],I=[2,71],U=[4,5,16,50,52,53],J=[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],M=[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],Nt=[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],Yt=[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],st=[69,70,71],it=[1,127],St={trace:i.__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:i.__name(function(w,L,v,E,O,p,Tt){var g=p.length-1;switch(O){case 3:return E.apply(p[g]),p[g];case 4:case 9:this.$=[];break;case 5:case 10:p[g-1].push(p[g]),this.$=p[g-1];break;case 6:case 7:case 11:case 12:this.$=p[g];break;case 8:case 13:this.$=[];break;case 15:p[g].type="createParticipant",this.$=p[g];break;case 16:p[g-1].unshift({type:"boxStart",boxData:E.parseBoxData(p[g-2])}),p[g-1].push({type:"boxEnd",boxText:p[g-2]}),this.$=p[g-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-2]),sequenceIndexStep:Number(p[g-1]),sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:E.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:p[g-1].actor};break;case 23:this.$={type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:p[g-1].actor};break;case 29:E.setDiagramTitle(p[g].substring(6)),this.$=p[g].substring(6);break;case 30:E.setDiagramTitle(p[g].substring(7)),this.$=p[g].substring(7);break;case 31:this.$=p[g].trim(),E.setAccTitle(this.$);break;case 32:case 33:this.$=p[g].trim(),E.setAccDescription(this.$);break;case 34:p[g-1].unshift({type:"loopStart",loopText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.LOOP_START}),p[g-1].push({type:"loopEnd",loopText:p[g-2],signalType:E.LINETYPE.LOOP_END}),this.$=p[g-1];break;case 35:p[g-1].unshift({type:"rectStart",color:E.parseMessage(p[g-2]),signalType:E.LINETYPE.RECT_START}),p[g-1].push({type:"rectEnd",color:E.parseMessage(p[g-2]),signalType:E.LINETYPE.RECT_END}),this.$=p[g-1];break;case 36:p[g-1].unshift({type:"optStart",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.OPT_START}),p[g-1].push({type:"optEnd",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.OPT_END}),this.$=p[g-1];break;case 37:p[g-1].unshift({type:"altStart",altText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.ALT_START}),p[g-1].push({type:"altEnd",signalType:E.LINETYPE.ALT_END}),this.$=p[g-1];break;case 38:p[g-1].unshift({type:"parStart",parText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.PAR_START}),p[g-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=p[g-1];break;case 39:p[g-1].unshift({type:"parStart",parText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.PAR_OVER_START}),p[g-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=p[g-1];break;case 40:p[g-1].unshift({type:"criticalStart",criticalText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.CRITICAL_START}),p[g-1].push({type:"criticalEnd",signalType:E.LINETYPE.CRITICAL_END}),this.$=p[g-1];break;case 41:p[g-1].unshift({type:"breakStart",breakText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.BREAK_START}),p[g-1].push({type:"breakEnd",optText:E.parseMessage(p[g-2]),signalType:E.LINETYPE.BREAK_END}),this.$=p[g-1];break;case 43:this.$=p[g-3].concat([{type:"option",optionText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.CRITICAL_OPTION},p[g]]);break;case 45:this.$=p[g-3].concat([{type:"and",parText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.PAR_AND},p[g]]);break;case 47:this.$=p[g-3].concat([{type:"else",altText:E.parseMessage(p[g-1]),signalType:E.LINETYPE.ALT_ELSE},p[g]]);break;case 48:p[g-3].draw="participant",p[g-3].type="addParticipant",p[g-3].description=E.parseMessage(p[g-1]),this.$=p[g-3];break;case 49:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 50:p[g-3].draw="actor",p[g-3].type="addParticipant",p[g-3].description=E.parseMessage(p[g-1]),this.$=p[g-3];break;case 51:p[g-1].draw="actor",p[g-1].type="addParticipant",this.$=p[g-1];break;case 52:p[g-1].type="destroyParticipant",this.$=p[g-1];break;case 53:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 54:this.$=[p[g-1],{type:"addNote",placement:p[g-2],actor:p[g-1].actor,text:p[g]}];break;case 55:p[g-2]=[].concat(p[g-1],p[g-1]).slice(0,2),p[g-2][0]=p[g-2][0].actor,p[g-2][1]=p[g-2][1].actor,this.$=[p[g-1],{type:"addNote",placement:E.PLACEMENT.OVER,actor:p[g-2].slice(0,2),text:p[g]}];break;case 56:this.$=[p[g-1],{type:"addLinks",actor:p[g-1].actor,text:p[g]}];break;case 57:this.$=[p[g-1],{type:"addALink",actor:p[g-1].actor,text:p[g]}];break;case 58:this.$=[p[g-1],{type:"addProperties",actor:p[g-1].actor,text:p[g]}];break;case 59:this.$=[p[g-1],{type:"addDetails",actor:p[g-1].actor,text:p[g]}];break;case 62:this.$=[p[g-2],p[g]];break;case 63:this.$=p[g];break;case 64:this.$=E.PLACEMENT.LEFTOF;break;case 65:this.$=E.PLACEMENT.RIGHTOF;break;case 66:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g],activate:!0},{type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:p[g-1].actor}];break;case 67:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g]},{type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:p[g-4].actor}];break;case 68:this.$=[p[g-3],p[g-1],{type:"addMessage",from:p[g-3].actor,to:p[g-1].actor,signalType:p[g-2],msg:p[g]}];break;case 69:this.$={type:"addParticipant",actor:p[g-1],config:p[g]};break;case 70:this.$=p[g-1].trim();break;case 71:this.$={type:"addParticipant",actor:p[g]};break;case 72:this.$=E.LINETYPE.SOLID_OPEN;break;case 73:this.$=E.LINETYPE.DOTTED_OPEN;break;case 74:this.$=E.LINETYPE.SOLID;break;case 75:this.$=E.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=E.LINETYPE.DOTTED;break;case 77:this.$=E.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=E.LINETYPE.SOLID_CROSS;break;case 79:this.$=E.LINETYPE.DOTTED_CROSS;break;case 80:this.$=E.LINETYPE.SOLID_POINT;break;case 81:this.$=E.LINETYPE.DOTTED_POINT;break;case 82:this.$=E.parseMessage(p[g].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:o,6:a},{1:[3]},{3:5,4:t,5:o,6:a},{3:6,4:t,5:o,6:a},e([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],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:l,8:8,9:10,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},e(T,[2,5]),{9:47,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},e(T,[2,7]),e(T,[2,8]),e(T,[2,14]),{12:48,50:z,52:H,53:F},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:R},{22:55,71:R},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(T,[2,29]),e(T,[2,30]),{32:[1,61]},{34:[1,62]},e(T,[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:R},{22:75,71:R},{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:R},{22:92,71:R},{22:93,71:R},{22:94,71:R},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],I),e(T,[2,6]),e(T,[2,15]),e(U,[2,9],{10:95}),e(T,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(T,[2,21]),{5:[1,99]},{5:[1,100]},e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,27]),e(T,[2,28]),e(T,[2,31]),e(T,[2,32]),e(J,r,{7:101}),e(J,r,{7:102}),e(J,r,{7:103}),e(M,r,{40:104,7:105}),e(Nt,r,{42:106,7:107}),e(Nt,r,{7:107,42:108}),e(Yt,r,{45:109,7:110}),e(J,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],I,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:R},e(st,[2,72]),e(st,[2,73]),e(st,[2,74]),e(st,[2,75]),e(st,[2,76]),e(st,[2,77]),e(st,[2,78]),e(st,[2,79]),e(st,[2,80]),e(st,[2,81]),{22:123,71:R},{22:125,59:124,71:R},{71:[2,64]},{71:[2,65]},{57:126,86:it},{57:128,86:it},{57:129,86:it},{57:130,86:it},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:z,52:H,53:F},{5:[1,136]},e(T,[2,19]),e(T,[2,20]),e(T,[2,22]),e(T,[2,23]),{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,137],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,138],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,139],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,140]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,46],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,49:[1,141],50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,142]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,44],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,48:[1,143],50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{16:[1,144]},{16:[1,145]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,42],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,47:[1,146],50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,147],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:y,33:b,35:A,36:P,37:N,38:S,39:D,41:Y,43:q,44:X,46:j,50:z,52:H,53:F,55:C,60:Q,61:K,62:Z,63:tt,71:R},{15:[1,148]},e(T,[2,49]),e(T,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(T,[2,51]),e(T,[2,52]),{22:151,71:R},{22:152,71:R},{57:153,86:it},{57:154,86:it},{57:155,86:it},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(T,[2,16]),e(U,[2,10]),{12:157,50:z,52:H,53:F},e(U,[2,12]),e(U,[2,13]),e(T,[2,18]),e(T,[2,34]),e(T,[2,35]),e(T,[2,36]),e(T,[2,37]),{15:[1,158]},e(T,[2,38]),{15:[1,159]},e(T,[2,39]),e(T,[2,40]),{15:[1,160]},e(T,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:it},{57:165,86:it},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:R},e(U,[2,11]),e(M,r,{7:105,40:167}),e(Nt,r,{7:107,42:168}),e(Yt,r,{7:110,45:169}),e(T,[2,48]),{5:[2,70]},e(T,[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:i.__name(function(w,L){if(L.recoverable)this.trace(w);else{var v=new Error(w);throw v.hash=L,v}},"parseError"),parse:i.__name(function(w){var L=this,v=[0],E=[],O=[null],p=[],Tt=this.table,g="",bt=0,Wt=0,ae=2,Ft=1,se=p.slice.call(arguments,1),W=Object.create(this.lexer),dt={yy:{}};for(var Mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mt)&&(dt.yy[Mt]=this.yy[Mt]);W.setInput(w,dt.yy),dt.yy.lexer=W,dt.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Rt=W.yylloc;p.push(Rt);var ie=W.options&&W.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re($){v.length=v.length-2*$,O.length=O.length-$,p.length=p.length-$}i.__name(re,"popStack");function qt(){var $;return $=E.pop()||W.lex()||Ft,typeof $!="number"&&($ instanceof Array&&(E=$,$=E.pop()),$=L.symbols_[$]||$),$}i.__name(qt,"lex");for(var G,pt,et,Dt,ft={},wt,rt,zt,vt;;){if(pt=v[v.length-1],this.defaultActions[pt]?et=this.defaultActions[pt]:((G===null||typeof G>"u")&&(G=qt()),et=Tt[pt]&&Tt[pt][G]),typeof et>"u"||!et.length||!et[0]){var Ct="";vt=[];for(wt in Tt[pt])this.terminals_[wt]&&wt>ae&&vt.push("'"+this.terminals_[wt]+"'");W.showPosition?Ct="Parse error on line "+(bt+1)+`:
2
- `+W.showPosition()+`
3
- Expecting `+vt.join(", ")+", got '"+(this.terminals_[G]||G)+"'":Ct="Parse error on line "+(bt+1)+": Unexpected "+(G==Ft?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(Ct,{text:W.match,token:this.terminals_[G]||G,line:W.yylineno,loc:Rt,expected:vt})}if(et[0]instanceof Array&&et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+G);switch(et[0]){case 1:v.push(G),O.push(W.yytext),p.push(W.yylloc),v.push(et[1]),G=null,Wt=W.yyleng,g=W.yytext,bt=W.yylineno,Rt=W.yylloc;break;case 2:if(rt=this.productions_[et[1]][1],ft.$=O[O.length-rt],ft._$={first_line:p[p.length-(rt||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(rt||1)].first_column,last_column:p[p.length-1].last_column},ie&&(ft._$.range=[p[p.length-(rt||1)].range[0],p[p.length-1].range[1]]),Dt=this.performAction.apply(ft,[g,Wt,bt,dt.yy,et[1],O,p].concat(se)),typeof Dt<"u")return Dt;rt&&(v=v.slice(0,-1*rt*2),O=O.slice(0,-1*rt),p=p.slice(0,-1*rt)),v.push(this.productions_[et[1]][0]),O.push(ft.$),p.push(ft._$),zt=Tt[v[v.length-2]][v[v.length-1]],v.push(zt);break;case 3:return!0}}return!0},"parse")},ee=function(){var ot={EOF:1,parseError:i.__name(function(L,v){if(this.yy.parser)this.yy.parser.parseError(L,v);else throw new Error(L)},"parseError"),setInput:i.__name(function(w,L){return this.yy=L||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i.__name(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var L=w.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:i.__name(function(w){var L=w.length,v=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var E=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),v.length-1&&(this.yylineno-=v.length-1);var O=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:v?(v.length===E.length?this.yylloc.first_column:0)+E[E.length-v.length].length-v[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:i.__name(function(){return this._more=!0,this},"more"),reject:i.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i.__name(function(w){this.unput(this.match.slice(w))},"less"),pastInput:i.__name(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i.__name(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i.__name(function(){var w=this.pastInput(),L=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
- `+L+"^"},"showPosition"),test_match:i.__name(function(w,L){var v,E,O;if(this.options.backtrack_lexer&&(O={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&&(O.yylloc.range=this.yylloc.range.slice(0))),E=w[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],v=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var p in O)this[p]=O[p];return!1}return!1},"test_match"),next:i.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,L,v,E;this._more||(this.yytext="",this.match="");for(var O=this._currentRules(),p=0;p<O.length;p++)if(v=this._input.match(this.rules[O[p]]),v&&(!L||v[0].length>L[0].length)){if(L=v,E=p,this.options.backtrack_lexer){if(w=this.test_match(v,O[p]),w!==!1)return w;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(w=this.test_match(L,O[E]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i.__name(function(){var L=this.next();return L||this.lex()},"lex"),begin:i.__name(function(L){this.conditionStack.push(L)},"begin"),popState:i.__name(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i.__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:i.__name(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:i.__name(function(L){this.begin(L)},"pushState"),stateStackSize:i.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i.__name(function(L,v,E,O){switch(E){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return v.yytext=v.yytext.trim(),71;case 11:return v.yytext=v.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 17:return v.yytext=v.yytext.trim(),this.begin("ALIAS"),71;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 56:return 5;case 57:return v.yytext=v.yytext.trim(),71;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:return 86;case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;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}}};return ot}();St.lexer=ee;function Et(){this.yy={}}return i.__name(Et,"Parser"),Et.prototype=St,St.Parser=Et,new Et}();Ot.parser=Ot;var oe=Ot,ce={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},le={FILLED:0,OPEN:1},he={LEFTOF:0,RIGHTOF:1,OVER:2},It={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},mt,de=(mt=class{constructor(){this.state=new ne.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=i.setAccTitle,this.setAccDescription=i.setAccDescription,this.setDiagramTitle=i.setDiagramTitle,this.getAccTitle=i.getAccTitle,this.getAccDescription=i.getAccDescription,this.getDiagramTitle=i.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(i.getConfig2().wrap),this.LINETYPE=ce,this.ARROWTYPE=le,this.PLACEMENT=he}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,o,a,r,n){let l=this.state.records.currentBox,d;if(n!==void 0){let s;n.includes(`
7
- `)?s=n+`
8
- `:s=`{
9
- `+n+`
10
- }`,d=i.load(s,{schema:i.JSON_SCHEMA})}r=(d==null?void 0:d.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(l=c.box?c.box:this.state.records.currentBox,c.box=l,c&&o===c.name&&a==null)return}if((a==null?void 0:a.text)==null&&(a={text:o,type:r}),(r==null||a.text==null)&&(a={text:o,type:r}),this.state.records.actors.set(t,{box:l,name:o,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){const s=this.state.records.actors.get(this.state.records.prevActor);s&&(s.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let o,a=0;if(!t)return 0;for(o=0;o<this.state.records.messages.length;o++)this.state.records.messages[o].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[o].from===t&&a++,this.state.records.messages[o].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[o].from===t&&a--;return a}addMessage(t,o,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:o,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,o,a,r,n=!1){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const d=new Error("Trying to inactivate an inactive participant ("+t+")");throw d.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},d}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:o,message:(a==null?void 0:a.text)??"",wrap:(a==null?void 0:a.wrap)??this.autoWrap(),type:r,activate:n}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const o=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(o===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:o}}autoWrap(){var t;return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:((t=i.getConfig2().sequence)==null?void 0:t.wrap)??!1}clear(){this.state.reset(),i.clear()}parseMessage(t){const o=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(o),n={text:r,wrap:a};return i.log.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(t){const o=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=o!=null&&o[1]?o[1].trim():"transparent",r=o!=null&&o[2]?o[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const d=new Option().style;d.color=a,d.color!==a&&(a="transparent",r=t.trim())}const{wrap:n,cleanedText:l}=this.extractWrap(r);return{text:l?i.sanitizeText(l,i.getConfig2()):void 0,color:a,wrap:n}}addNote(t,o,a){const r={actor:t,placement:o,message:a.text,wrap:a.wrap??this.autoWrap()},n=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:o})}addLinks(t,o){const a=this.getActor(t);try{let r=i.sanitizeText(o.text,i.getConfig2());r=r.replace(/&equals;/g,"="),r=r.replace(/&amp;/g,"&");const n=JSON.parse(r);this.insertLinks(a,n)}catch(r){i.log.error("error while parsing actor link text",r)}}addALink(t,o){const a=this.getActor(t);try{const r={};let n=i.sanitizeText(o.text,i.getConfig2());const l=n.indexOf("@");n=n.replace(/&equals;/g,"="),n=n.replace(/&amp;/g,"&");const d=n.slice(0,l-1).trim(),c=n.slice(l+1).trim();r[d]=c,this.insertLinks(a,r)}catch(r){i.log.error("error while parsing actor link text",r)}}insertLinks(t,o){if(t.links==null)t.links=o;else for(const a in o)t.links[a]=o[a]}addProperties(t,o){const a=this.getActor(t);try{const r=i.sanitizeText(o.text,i.getConfig2()),n=JSON.parse(r);this.insertProperties(a,n)}catch(r){i.log.error("error while parsing actor properties text",r)}}insertProperties(t,o){if(t.properties==null)t.properties=o;else for(const a in o)t.properties[a]=o[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,o){const a=this.getActor(t),r=document.getElementById(o.text);try{const n=r.innerHTML,l=JSON.parse(n);l.properties&&this.insertProperties(a,l.properties),l.links&&this.insertLinks(a,l.links)}catch(n){i.log.error("error while parsing actor details text",n)}}getActorProperty(t,o){if((t==null?void 0:t.properties)!==void 0)return t.properties[o]}apply(t){if(Array.isArray(t))t.forEach(o=>{this.apply(o)});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":this.addSignal(t.actor,void 0,void 0,t.signalType);break;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":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"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":i.setAccTitle(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,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"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return i.getConfig2().sequence}},i.__name(mt,"SequenceDB"),mt),pe=i.__name(e=>`.actor {
11
- stroke: ${e.actorBorder};
12
- fill: ${e.actorBkg};
13
- }
14
-
15
- text.actor > tspan {
16
- fill: ${e.actorTextColor};
17
- stroke: none;
18
- }
19
-
20
- .actor-line {
21
- stroke: ${e.actorLineColor};
22
- }
23
-
24
- .innerArc {
25
- stroke-width: 1.5;
26
- stroke-dasharray: none;
27
- }
28
-
29
- .messageLine0 {
30
- stroke-width: 1.5;
31
- stroke-dasharray: none;
32
- stroke: ${e.signalColor};
33
- }
34
-
35
- .messageLine1 {
36
- stroke-width: 1.5;
37
- stroke-dasharray: 2, 2;
38
- stroke: ${e.signalColor};
39
- }
40
-
41
- #arrowhead path {
42
- fill: ${e.signalColor};
43
- stroke: ${e.signalColor};
44
- }
45
-
46
- .sequenceNumber {
47
- fill: ${e.sequenceNumberColor};
48
- }
49
-
50
- #sequencenumber {
51
- fill: ${e.signalColor};
52
- }
53
-
54
- #crosshead path {
55
- fill: ${e.signalColor};
56
- stroke: ${e.signalColor};
57
- }
58
-
59
- .messageText {
60
- fill: ${e.signalTextColor};
61
- stroke: none;
62
- }
63
-
64
- .labelBox {
65
- stroke: ${e.labelBoxBorderColor};
66
- fill: ${e.labelBoxBkgColor};
67
- }
68
-
69
- .labelText, .labelText > tspan {
70
- fill: ${e.labelTextColor};
71
- stroke: none;
72
- }
73
-
74
- .loopText, .loopText > tspan {
75
- fill: ${e.loopTextColor};
76
- stroke: none;
77
- }
78
-
79
- .loopLine {
80
- stroke-width: 2px;
81
- stroke-dasharray: 2, 2;
82
- stroke: ${e.labelBoxBorderColor};
83
- fill: ${e.labelBoxBorderColor};
84
- }
85
-
86
- .note {
87
- //stroke: #decc93;
88
- stroke: ${e.noteBorderColor};
89
- fill: ${e.noteBkgColor};
90
- }
91
-
92
- .noteText, .noteText > tspan {
93
- fill: ${e.noteTextColor};
94
- stroke: none;
95
- }
96
-
97
- .activation0 {
98
- fill: ${e.activationBkgColor};
99
- stroke: ${e.activationBorderColor};
100
- }
101
-
102
- .activation1 {
103
- fill: ${e.activationBkgColor};
104
- stroke: ${e.activationBorderColor};
105
- }
106
-
107
- .activation2 {
108
- fill: ${e.activationBkgColor};
109
- stroke: ${e.activationBorderColor};
110
- }
111
-
112
- .actorPopupMenu {
113
- position: absolute;
114
- }
115
-
116
- .actorPopupMenuPanel {
117
- position: absolute;
118
- fill: ${e.actorBkg};
119
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
120
- filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
121
- }
122
- .actor-man line {
123
- stroke: ${e.actorBorder};
124
- fill: ${e.actorBkg};
125
- }
126
- .actor-man circle, line {
127
- stroke: ${e.actorBorder};
128
- fill: ${e.actorBkg};
129
- stroke-width: 2px;
130
- }
131
-
132
- `,"getStyles"),ue=pe,ut=18*2,lt="actor-top",ht="actor-bottom",At="actor-box",ct="actor-man",yt=i.__name(function(e,t){return V.drawRect(e,t)},"drawRect"),ge=i.__name(function(e,t,o,a,r){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,l=t.actorCnt,d=t.rectData;var c="none";r&&(c="block !important");const s=e.append("g");s.attr("id","actor"+l+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",c);var u="";d.class!==void 0&&(u=" "+d.class);let f=d.width>o?d.width:o;const x=s.append("rect");if(x.attr("class","actorPopupMenuPanel"+u),x.attr("x",d.x),x.attr("y",d.height),x.attr("fill",d.fill),x.attr("stroke",d.stroke),x.attr("width",f),x.attr("height",d.height),x.attr("rx",d.rx),x.attr("ry",d.ry),n!=null){var m=20;for(let A in n){var y=s.append("a"),b=i.sanitizeUrl_1(n[A]);y.attr("xlink:href",b),y.attr("target","_blank"),Oe(a)(A,y,d.x+10,d.height+m,f,20,{class:"actor"},a),m+=30}}return x.attr("height",m),{height:d.height+m,width:f}},"drawPopup"),kt=i.__name(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Lt=i.__name(async function(e,t,o=null){let a=e.append("foreignObject");const r=await i.renderKatexSanitized(t.text,i.getConfig()),l=a.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(a.attr("height",Math.round(l.height)).attr("width",Math.round(l.width)),t.class==="noteText"){const d=e.node().firstChild;d.setAttribute("height",l.height+2*t.textMargin);const c=d.getBBox();a.attr("x",Math.round(c.x+c.width/2-l.width/2)).attr("y",Math.round(c.y+c.height/2-l.height/2))}else if(o){let{startx:d,stopx:c,starty:s}=o;if(d>c){const u=d;d=c,c=u}a.attr("x",Math.round(d+Math.abs(d-c)/2-l.width/2)),t.class==="loopText"?a.attr("y",Math.round(s)):a.attr("y",Math.round(s-l.height))}return[a]},"drawKatex"),_t=i.__name(function(e,t){let o=0,a=0;const r=t.text.split(i.common_default.lineBreakRegex),[n,l]=i.parseFontSize(t.fontSize);let d=[],c=0,s=i.__name(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":s=i.__name(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":s=i.__name(()=>Math.round(t.y+(o+a+t.textMargin)/2),"yfunc");break;case"bottom":case"end":s=i.__name(()=>Math.round(t.y+(o+a+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[u,f]of r.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(c=u*n);const x=e.append("text");x.attr("x",t.x),x.attr("y",s()),t.anchor!==void 0&&x.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&x.style("font-family",t.fontFamily),l!==void 0&&x.style("font-size",l),t.fontWeight!==void 0&&x.style("font-weight",t.fontWeight),t.fill!==void 0&&x.attr("fill",t.fill),t.class!==void 0&&x.attr("class",t.class),t.dy!==void 0?x.attr("dy",t.dy):c!==0&&x.attr("dy",c);const m=f||i.ZERO_WIDTH_SPACE;if(t.tspan){const y=x.append("tspan");y.attr("x",t.x),t.fill!==void 0&&y.attr("fill",t.fill),y.text(m)}else x.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(a+=(x._groups||x)[0][0].getBBox().height,o=a),d.push(x)}return d},"drawText"),Kt=i.__name(function(e,t){function o(r,n,l,d,c){return r+","+n+" "+(r+l)+","+n+" "+(r+l)+","+(n+d-c)+" "+(r+l-c*1.2)+","+(n+d)+" "+r+","+(n+d)}i.__name(o,"genPoints");const a=e.append("polygon");return a.attr("points",o(t.x,t.y,t.width,t.height,7)),a.attr("class","labelBox"),t.y=t.y+t.height/2,_t(e,t),a},"drawLabel"),k=-1,Ut=i.__name((e,t,o,a)=>{e.select&&o.forEach(r=>{const n=t.get(r),l=e.select("#actor"+n.actorCnt);!a.mirrorActors&&n.stopy?l.attr("y2",n.stopy+n.height/2):a.mirrorActors&&l.attr("y2",n.stopy)})},"fixLifeLineHeights"),fe=i.__name(function(e,t,o,a){var m,y;const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height,d=e.append("g").lower();var c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();var u="actor";(m=t.properties)!=null&&m.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.rx=3,s.ry=3,s.name=t.name;const f=yt(c,s);if(t.rectData=s,(y=t.properties)!=null&&y.icon){const b=t.properties.icon.trim();b.charAt(0)==="@"?V.drawEmbeddedImage(c,s.x+s.width-20,s.y+10,b.substr(1)):V.drawImage(c,s.x+s.width-20,s.y+10,b)}nt(o,i.hasKatex(t.description))(t.description,c,s.x,s.y,s.width,s.height,{class:`actor ${At}`},o);let x=t.height;if(f.node){const b=f.node().getBBox();t.height=b.height,x=b.height}return x},"drawActorTypeParticipant"),xe=i.__name(function(e,t,o,a){var b,A;const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height,d=e.append("g").lower();var c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();var u="actor";(b=t.properties)!=null&&b.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.name=t.name;const f=6,x={...s,x:s.x+-f,y:s.y+ +f,class:"actor"},m=yt(c,s);if(yt(c,x),t.rectData=s,(A=t.properties)!=null&&A.icon){const P=t.properties.icon.trim();P.charAt(0)==="@"?V.drawEmbeddedImage(c,s.x+s.width-20,s.y+10,P.substr(1)):V.drawImage(c,s.x+s.width-20,s.y+10,P)}nt(o,i.hasKatex(t.description))(t.description,c,s.x-f,s.y+f,s.width,s.height,{class:`actor ${At}`},o);let y=t.height;if(m.node){const P=m.node().getBBox();t.height=P.height,y=P.height}return y},"drawActorTypeCollections"),me=i.__name(function(e,t,o,a){var P,N;const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height,d=e.append("g").lower();let c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();let u="actor";(P=t.properties)!=null&&P.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.name=t.name;const f=s.height/2,x=f/(2.5+s.height/50),m=c.append("g"),y=c.append("g");if(m.append("path").attr("d",`M ${s.x},${s.y+f}
133
- a ${x},${f} 0 0 0 0,${s.height}
134
- h ${s.width-2*x}
135
- a ${x},${f} 0 0 0 0,-${s.height}
136
- Z
137
- `).attr("class",u),y.append("path").attr("d",`M ${s.x},${s.y+f}
138
- a ${x},${f} 0 0 0 0,${s.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",u),m.attr("transform",`translate(${x}, ${-(s.height/2)})`),y.attr("transform",`translate(${s.width-x}, ${-s.height/2})`),t.rectData=s,(N=t.properties)!=null&&N.icon){const S=t.properties.icon.trim(),D=s.x+s.width-20,Y=s.y+10;S.charAt(0)==="@"?V.drawEmbeddedImage(c,D,Y,S.substr(1)):V.drawImage(c,D,Y,S)}nt(o,i.hasKatex(t.description))(t.description,c,s.x,s.y,s.width,s.height,{class:`actor ${At}`},o);let b=t.height;const A=m.select("path:last-child");if(A.node()){const S=A.node().getBBox();t.height=S.height,b=S.height}return b},"drawActorTypeQueue"),_e=i.__name(function(e,t,o,a){var b;const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+75,d=e.append("g").lower();a||(k++,d.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k);const c=e.append("g");let s=ct;a?s+=` ${ht}`:s+=` ${lt}`,c.attr("class",s),c.attr("name",t.name);const u=V.getNoteRect();u.x=t.x,u.y=r,u.fill="#eaeaea",u.width=t.width,u.height=t.height,u.class="actor";const f=t.x+t.width/2,x=r+30,m=18;c.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"),c.append("circle").attr("cx",f).attr("cy",x).attr("r",m).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),c.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${f}, ${x-m})`);const y=c.node().getBBox();return t.height=y.height+2*(((b=o==null?void 0:o.sequence)==null?void 0:b.labelBoxHeight)??0),nt(o,i.hasKatex(t.description))(t.description,c,u.x,u.y+m+(a?5:10),u.width,u.height,{class:`actor ${ct}`},o),t.height},"drawActorTypeControl"),Te=i.__name(function(e,t,o,a){var b;const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+75,d=e.append("g").lower(),c=e.append("g");let s=ct;a?s+=` ${ht}`:s+=` ${lt}`,c.attr("class",s),c.attr("name",t.name);const u=V.getNoteRect();u.x=t.x,u.y=r,u.fill="#eaeaea",u.width=t.width,u.height=t.height,u.class="actor";const f=t.x+t.width/2,x=r+(a?10:25),m=18;c.append("circle").attr("cx",f).attr("cy",x).attr("r",m).attr("width",t.width).attr("height",t.height),c.append("line").attr("x1",f-m).attr("x2",f+m).attr("y1",x+m).attr("y2",x+m).attr("stroke","#333").attr("stroke-width",2);const y=c.node().getBBox();return t.height=y.height+(((b=o==null?void 0:o.sequence)==null?void 0:b.labelBoxHeight)??0),a||(k++,d.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k),nt(o,i.hasKatex(t.description))(t.description,c,u.x,u.y+(a?(x-r+m-5)/2:(x+m-r)/2),u.width,u.height,{class:`actor ${ct}`},o),a?c.attr("transform",`translate(0, ${m/2})`):c.attr("transform",`translate(0, ${m/2})`),t.height},"drawActorTypeEntity"),ye=i.__name(function(e,t,o,a){var N;const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height+2*o.boxTextMargin,d=e.append("g").lower();let c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();let u="actor";(N=t.properties)!=null&&N.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.name=t.name,s.x=t.x,s.y=r;const f=s.width/4,x=s.width/4,m=f/2,y=m/(2.5+f/50),b=c.append("g"),A=`
139
- M ${s.x},${s.y+y}
140
- a ${m},${y} 0 0 0 ${f},0
141
- a ${m},${y} 0 0 0 -${f},0
142
- l 0,${x-2*y}
143
- a ${m},${y} 0 0 0 ${f},0
144
- l 0,-${x-2*y}
145
- `;b.append("path").attr("d",A).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",u),a?b.attr("transform",`translate(${f*1.5}, ${s.height/4-2*y})`):b.attr("transform",`translate(${f*1.5}, ${(s.height+y)/4})`),t.rectData=s,nt(o,i.hasKatex(t.description))(t.description,c,s.x,s.y+(a?(s.height+x)/4:(s.height+y)/2),s.width,s.height,{class:`actor ${At}`},o);const P=b.select("path:last-child");if(P.node()){const S=P.node().getBBox();t.height=S.height+(o.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),Ee=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+80,d=30,c=e.append("g").lower();a||(k++,c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k);const s=e.append("g");let u=ct;a?u+=` ${ht}`:u+=` ${lt}`,s.attr("class",u),s.attr("name",t.name);const f=V.getNoteRect();f.x=t.x,f.y=r,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",s.append("line").attr("id","actor-man-torso"+k).attr("x1",t.x+t.width/2-d*2.5).attr("y1",r+10).attr("x2",t.x+t.width/2-15).attr("y2",r+10),s.append("line").attr("id","actor-man-arms"+k).attr("x1",t.x+t.width/2-d*2.5).attr("y1",r+0).attr("x2",t.x+t.width/2-d*2.5).attr("y2",r+20),s.append("circle").attr("cx",t.x+t.width/2).attr("cy",r+10).attr("r",d);const x=s.node().getBBox();return t.height=x.height+(o.sequence.labelBoxHeight??0),nt(o,i.hasKatex(t.description))(t.description,s,f.x,f.y+(a?d/2-4:d/2+3),f.width,f.height,{class:`actor ${ct}`},o),a?s.attr("transform",`translate(0,${d/2+7})`):s.attr("transform",`translate(0,${d/2+7})`),t.height},"drawActorTypeBoundary"),be=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+80,d=e.append("g").lower();a||(k++,d.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k);const c=e.append("g");let s=ct;a?s+=` ${ht}`:s+=` ${lt}`,c.attr("class",s),c.attr("name",t.name);const u=V.getNoteRect();u.x=t.x,u.y=r,u.fill="#eaeaea",u.width=t.width,u.height=t.height,u.class="actor",u.rx=3,u.ry=3,c.append("line").attr("id","actor-man-torso"+k).attr("x1",n).attr("y1",r+25).attr("x2",n).attr("y2",r+45),c.append("line").attr("id","actor-man-arms"+k).attr("x1",n-ut/2).attr("y1",r+33).attr("x2",n+ut/2).attr("y2",r+33),c.append("line").attr("x1",n-ut/2).attr("y1",r+60).attr("x2",n).attr("y2",r+45),c.append("line").attr("x1",n).attr("y1",r+45).attr("x2",n+ut/2-2).attr("y2",r+60);const f=c.append("circle");f.attr("cx",t.x+t.width/2),f.attr("cy",r+10),f.attr("r",15),f.attr("width",t.width),f.attr("height",t.height);const x=c.node().getBBox();return t.height=x.height,nt(o,i.hasKatex(t.description))(t.description,c,u.x,u.y+35,u.width,u.height,{class:`actor ${ct}`},o),t.height},"drawActorTypeActor"),we=i.__name(async function(e,t,o,a){switch(t.type){case"actor":return await be(e,t,o,a);case"participant":return await fe(e,t,o,a);case"boundary":return await Ee(e,t,o,a);case"control":return await _e(e,t,o,a);case"entity":return await Te(e,t,o,a);case"database":return await ye(e,t,o,a);case"collections":return await xe(e,t,o,a);case"queue":return await me(e,t,o,a)}},"drawActor"),ve=i.__name(function(e,t,o){const r=e.append("g");Gt(r,t),t.name&&nt(o)(t.name,r,t.x,t.y+o.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},o),r.lower()},"drawBox"),Ie=i.__name(function(e){return e.append("g")},"anchorElement"),Le=i.__name(function(e,t,o,a,r){const n=V.getNoteRect(),l=t.anchored;n.x=t.startx,n.y=t.starty,n.class="activation"+r%3,n.width=t.stopx-t.startx,n.height=o-t.starty,yt(l,n)},"drawActivation"),Ae=i.__name(async function(e,t,o,a){const{boxMargin:r,boxTextMargin:n,labelBoxHeight:l,labelBoxWidth:d,messageFontFamily:c,messageFontSize:s,messageFontWeight:u}=a,f=e.append("g"),x=i.__name(function(b,A,P,N){return f.append("line").attr("x1",b).attr("y1",A).attr("x2",P).attr("y2",N).attr("class","loopLine")},"drawLoopLine");x(t.startx,t.starty,t.stopx,t.starty),x(t.stopx,t.starty,t.stopx,t.stopy),x(t.startx,t.stopy,t.stopx,t.stopy),x(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(b){x(t.startx,b.y,t.stopx,b.y).style("stroke-dasharray","3, 3")});let m=V.getTextObj();m.text=o,m.x=t.startx,m.y=t.starty,m.fontFamily=c,m.fontSize=s,m.fontWeight=u,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=d||50,m.height=l||20,m.textMargin=n,m.class="labelText",Kt(f,m),m=Xt(),m.text=t.title,m.x=t.startx+d/2+(t.stopx-t.startx)/2,m.y=t.starty+r+n,m.anchor="middle",m.valign="middle",m.textMargin=n,m.class="loopText",m.fontFamily=c,m.fontSize=s,m.fontWeight=u,m.wrap=!0;let y=i.hasKatex(m.text)?await Lt(f,m,t):_t(f,m);if(t.sectionTitles!==void 0){for(const[b,A]of Object.entries(t.sectionTitles))if(A.message){m.text=A.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[b].y+r+n,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=c,m.fontSize=s,m.fontWeight=u,m.wrap=t.wrap,i.hasKatex(m.text)?(t.starty=t.sections[b].y,await Lt(f,m,t)):_t(f,m);let P=Math.round(y.map(N=>(N._groups||N)[0][0].getBBox().height).reduce((N,S)=>N+S));t.sections[b].height+=P-(r+n)}}return t.height=Math.round(t.stopy-t.starty),f},"drawLoop"),Gt=i.__name(function(e,t){V.drawBackgroundRect(e,t)},"drawBackgroundRect"),ke=i.__name(function(e){e.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"),Pe=i.__name(function(e){e.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"),Ne=i.__name(function(e){e.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"),Se=i.__name(function(e){e.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"),Me=i.__name(function(e){e.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"),Re=i.__name(function(e){e.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"),De=i.__name(function(e){e.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"),Xt=i.__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"),Ce=i.__name(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),nt=function(){function e(n,l,d,c,s,u,f){const x=l.append("text").attr("x",d+s/2).attr("y",c+u/2+5).style("text-anchor","middle").text(n);r(x,f)}i.__name(e,"byText");function t(n,l,d,c,s,u,f,x){const{actorFontSize:m,actorFontFamily:y,actorFontWeight:b}=x,[A,P]=i.parseFontSize(m),N=n.split(i.common_default.lineBreakRegex);for(let S=0;S<N.length;S++){const D=S*A-A*(N.length-1)/2,Y=l.append("text").attr("x",d+s/2).attr("y",c).style("text-anchor","middle").style("font-size",P).style("font-weight",b).style("font-family",y);Y.append("tspan").attr("x",d+s/2).attr("dy",D).text(N[S]),Y.attr("y",c+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(Y,f)}}i.__name(t,"byTspan");function o(n,l,d,c,s,u,f,x){const m=l.append("switch"),b=m.append("foreignObject").attr("x",d).attr("y",c).attr("width",s).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,m,d,c,s,u,f,x),r(b,f)}i.__name(o,"byFo");async function a(n,l,d,c,s,u,f,x){const m=await i.calculateMathMLDimensions(n,i.getConfig()),y=l.append("switch"),A=y.append("foreignObject").attr("x",d+s/2-m.width/2).attr("y",c+u/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");A.append("div").style("text-align","center").style("vertical-align","middle").html(await i.renderKatexSanitized(n,i.getConfig())),t(n,y,d,c,s,u,f,x),r(A,f)}i.__name(a,"byKatex");function r(n,l){for(const d in l)l.hasOwnProperty(d)&&n.attr(d,l[d])}return i.__name(r,"_setTextAttrs"),function(n,l=!1){return l?a:n.textPlacement==="fo"?o:n.textPlacement==="old"?e:t}}(),Oe=function(){function e(r,n,l,d,c,s,u){const f=n.append("text").attr("x",l).attr("y",d).style("text-anchor","start").text(r);a(f,u)}i.__name(e,"byText");function t(r,n,l,d,c,s,u,f){const{actorFontSize:x,actorFontFamily:m,actorFontWeight:y}=f,b=r.split(i.common_default.lineBreakRegex);for(let A=0;A<b.length;A++){const P=A*x-x*(b.length-1)/2,N=n.append("text").attr("x",l).attr("y",d).style("text-anchor","start").style("font-size",x).style("font-weight",y).style("font-family",m);N.append("tspan").attr("x",l).attr("dy",P).text(b[A]),N.attr("y",d+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(N,u)}}i.__name(t,"byTspan");function o(r,n,l,d,c,s,u,f){const x=n.append("switch"),y=x.append("foreignObject").attr("x",l).attr("y",d).attr("width",c).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,x,l,d,c,s,u,f),a(y,u)}i.__name(o,"byFo");function a(r,n){for(const l in n)n.hasOwnProperty(l)&&r.attr(l,n[l])}return i.__name(a,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?o:r.textPlacement==="old"?e:t}}(),B={drawRect:yt,drawText:_t,drawLabel:Kt,drawActor:we,drawBox:ve,drawPopup:ge,anchorElement:Ie,drawActivation:Le,drawLoop:Ae,drawBackgroundRect:Gt,insertArrowHead:Se,insertArrowFilledHead:Me,insertSequenceNumber:Re,insertArrowCrossHead:De,insertDatabaseIcon:ke,insertComputerIcon:Pe,insertClockIcon:Ne,getTextObj:Xt,getNoteRect:Ce,fixLifeLineHeights:Ut,sanitizeUrl:i.sanitizeUrl_1},h={},_={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:i.__name(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:i.__name(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:i.__name(function(e){this.boxes.push(e)},"addBox"),addActor:i.__name(function(e){this.actors.push(e)},"addActor"),addLoop:i.__name(function(e){this.loops.push(e)},"addLoop"),addMessage:i.__name(function(e){this.messages.push(e)},"addMessage"),addNote:i.__name(function(e){this.notes.push(e)},"addNote"),lastActor:i.__name(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:i.__name(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:i.__name(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:i.__name(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:i.__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,Jt(i.getConfig2())},"init"),updateVal:i.__name(function(e,t,o,a){e[t]===void 0?e[t]=o:e[t]=a(o,e[t])},"updateVal"),updateBounds:i.__name(function(e,t,o,a){const r=this;let n=0;function l(d){return i.__name(function(s){n++;const u=r.sequenceItems.length-n+1;r.updateVal(s,"starty",t-u*h.boxMargin,Math.min),r.updateVal(s,"stopy",a+u*h.boxMargin,Math.max),r.updateVal(_.data,"startx",e-u*h.boxMargin,Math.min),r.updateVal(_.data,"stopx",o+u*h.boxMargin,Math.max),d!=="activation"&&(r.updateVal(s,"startx",e-u*h.boxMargin,Math.min),r.updateVal(s,"stopx",o+u*h.boxMargin,Math.max),r.updateVal(_.data,"starty",t-u*h.boxMargin,Math.min),r.updateVal(_.data,"stopy",a+u*h.boxMargin,Math.max))},"updateItemBounds")}i.__name(l,"updateFn"),this.sequenceItems.forEach(l()),this.activations.forEach(l("activation"))},"updateBounds"),insert:i.__name(function(e,t,o,a){const r=i.common_default.getMin(e,o),n=i.common_default.getMax(e,o),l=i.common_default.getMin(t,a),d=i.common_default.getMax(t,a);this.updateVal(_.data,"startx",r,Math.min),this.updateVal(_.data,"starty",l,Math.min),this.updateVal(_.data,"stopx",n,Math.max),this.updateVal(_.data,"stopy",d,Math.max),this.updateBounds(r,l,n,d)},"insert"),newActivation:i.__name(function(e,t,o){const a=o.get(e.from),r=Pt(e.from).length||0,n=a.x+a.width/2+(r-1)*h.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+h.activationWidth,stopy:void 0,actor:e.from,anchored:B.anchorElement(t)})},"newActivation"),endActivation:i.__name(function(e){const t=this.activations.map(function(o){return o.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:i.__name(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:i.__name(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:i.__name(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:i.__name(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:i.__name(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:_.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:i.__name(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:i.__name(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:i.__name(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=i.common_default.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:i.__name(function(){return this.verticalPos},"getVerticalPos"),getBounds:i.__name(function(){return{bounds:this.data,models:this.models}},"getBounds")},Be=i.__name(async function(e,t){_.bumpVerticalPos(h.boxMargin),t.height=h.boxMargin,t.starty=_.getVerticalPos();const o=V.getNoteRect();o.x=t.startx,o.y=t.starty,o.width=t.width||h.width,o.class="note";const a=e.append("g"),r=B.drawRect(a,o),n=V.getTextObj();n.x=t.startx,n.y=t.starty,n.width=o.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=h.noteFontFamily,n.fontSize=h.noteFontSize,n.fontWeight=h.noteFontWeight,n.anchor=h.noteAlign,n.textMargin=h.noteMargin,n.valign="center";const l=i.hasKatex(n.text)?await Lt(a,n):_t(a,n),d=Math.round(l.map(c=>(c._groups||c)[0][0].getBBox().height).reduce((c,s)=>c+s));r.attr("height",d+2*h.noteMargin),t.height+=d+2*h.noteMargin,_.bumpVerticalPos(d+2*h.noteMargin),t.stopy=t.starty+d+2*h.noteMargin,t.stopx=t.startx+o.width,_.insert(t.startx,t.starty,t.stopx,t.stopy),_.models.addNote(t)},"drawNote"),gt=i.__name(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),xt=i.__name(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Bt=i.__name(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function Qt(e,t){_.bumpVerticalPos(10);const{startx:o,stopx:a,message:r}=t,n=i.common_default.splitBreaks(r).length,l=i.hasKatex(r),d=l?await i.calculateMathMLDimensions(r,i.getConfig2()):i.utils_default.calculateTextDimensions(r,gt(h));if(!l){const f=d.height/n;t.height+=f,_.bumpVerticalPos(f)}let c,s=d.height-10;const u=d.width;if(o===a){c=_.getVerticalPos()+s,h.rightAngles||(s+=h.boxMargin,c=_.getVerticalPos()+s),s+=30;const f=i.common_default.getMax(u/2,h.width/2);_.insert(o-f,_.getVerticalPos()-10+s,a+f,_.getVerticalPos()+30+s)}else s+=h.boxMargin,c=_.getVerticalPos()+s,_.insert(o,c-10,a,c);return _.bumpVerticalPos(s),t.height+=s,t.stopy=t.starty+t.height,_.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),c}i.__name(Qt,"boundMessage");var Ve=i.__name(async function(e,t,o,a){const{startx:r,stopx:n,starty:l,message:d,type:c,sequenceIndex:s,sequenceVisible:u}=t,f=i.utils_default.calculateTextDimensions(d,gt(h)),x=V.getTextObj();x.x=r,x.y=l+10,x.width=n-r,x.class="messageText",x.dy="1em",x.text=d,x.fontFamily=h.messageFontFamily,x.fontSize=h.messageFontSize,x.fontWeight=h.messageFontWeight,x.anchor=h.messageAlign,x.valign="center",x.textMargin=h.wrapPadding,x.tspan=!1,i.hasKatex(x.text)?await Lt(e,x,{startx:r,stopx:n,starty:o}):_t(e,x);const m=f.width;let y;r===n?h.rightAngles?y=e.append("path").attr("d",`M ${r},${o} H ${r+i.common_default.getMax(h.width/2,m/2)} V ${o+25} H ${r}`):y=e.append("path").attr("d","M "+r+","+o+" C "+(r+60)+","+(o-10)+" "+(r+60)+","+(o+30)+" "+r+","+(o+20)):(y=e.append("line"),y.attr("x1",r),y.attr("y1",o),y.attr("x2",n),y.attr("y2",o)),c===a.db.LINETYPE.DOTTED||c===a.db.LINETYPE.DOTTED_CROSS||c===a.db.LINETYPE.DOTTED_POINT||c===a.db.LINETYPE.DOTTED_OPEN||c===a.db.LINETYPE.BIDIRECTIONAL_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let b="";h.arrowMarkerAbsolute&&(b=i.getUrl(!0)),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),(c===a.db.LINETYPE.SOLID||c===a.db.LINETYPE.DOTTED)&&y.attr("marker-end","url("+b+"#arrowhead)"),(c===a.db.LINETYPE.BIDIRECTIONAL_SOLID||c===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr("marker-start","url("+b+"#arrowhead)"),y.attr("marker-end","url("+b+"#arrowhead)")),(c===a.db.LINETYPE.SOLID_POINT||c===a.db.LINETYPE.DOTTED_POINT)&&y.attr("marker-end","url("+b+"#filled-head)"),(c===a.db.LINETYPE.SOLID_CROSS||c===a.db.LINETYPE.DOTTED_CROSS)&&y.attr("marker-end","url("+b+"#crosshead)"),(u||h.showSequenceNumbers)&&((c===a.db.LINETYPE.BIDIRECTIONAL_SOLID||c===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(r<n?y.attr("x1",r+2*6):y.attr("x1",r+6)),e.append("line").attr("x1",r).attr("y1",o).attr("x2",r).attr("y2",o).attr("stroke-width",0).attr("marker-start","url("+b+"#sequencenumber)"),e.append("text").attr("x",r).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),Ye=i.__name(function(e,t,o,a,r,n,l){let d=0,c=0,s,u=0;for(const f of a){const x=t.get(f),m=x.box;s&&s!=m&&(l||_.models.addBox(s),c+=h.boxMargin+s.margin),m&&m!=s&&(l||(m.x=d+c,m.y=r),c+=m.margin),x.width=x.width||h.width,x.height=i.common_default.getMax(x.height||h.height,h.height),x.margin=x.margin||h.actorMargin,u=i.common_default.getMax(u,x.height),o.get(x.name)&&(c+=x.width/2),x.x=d+c,x.starty=_.getVerticalPos(),_.insert(x.x,r,x.x+x.width,x.height),d+=x.width+c,x.box&&(x.box.width=d+m.margin-x.box.x),c=x.margin,s=x.box,_.models.addActor(x)}s&&!l&&_.models.addBox(s),_.bumpVerticalPos(u)},"addActorRenderingData"),Vt=i.__name(async function(e,t,o,a){if(a){let r=0;_.bumpVerticalPos(h.boxMargin*2);for(const n of o){const l=t.get(n);l.stopy||(l.stopy=_.getVerticalPos());const d=await B.drawActor(e,l,h,!0);r=i.common_default.getMax(r,d)}_.bumpVerticalPos(r+h.boxMargin)}else for(const r of o){const n=t.get(r);await B.drawActor(e,n,h,!1)}},"drawActors"),Zt=i.__name(function(e,t,o,a){let r=0,n=0;for(const l of o){const d=t.get(l),c=Fe(d),s=B.drawPopup(e,d,c,h,h.forceMenus,a);s.height>r&&(r=s.height),s.width+d.x>n&&(n=s.width+d.x)}return{maxHeight:r,maxWidth:n}},"drawActorsPopup"),Jt=i.__name(function(e){i.assignWithDepth_default(h,e),e.fontFamily&&(h.actorFontFamily=h.noteFontFamily=h.messageFontFamily=e.fontFamily),e.fontSize&&(h.actorFontSize=h.noteFontSize=h.messageFontSize=e.fontSize),e.fontWeight&&(h.actorFontWeight=h.noteFontWeight=h.messageFontWeight=e.fontWeight)},"setConf"),Pt=i.__name(function(e){return _.activations.filter(function(t){return t.actor===e})},"actorActivations"),Ht=i.__name(function(e,t){const o=t.get(e),a=Pt(e),r=a.reduce(function(l,d){return i.common_default.getMin(l,d.startx)},o.x+o.width/2-1),n=a.reduce(function(l,d){return i.common_default.getMax(l,d.stopx)},o.x+o.width/2+1);return[r,n]},"activationBounds");function at(e,t,o,a,r){_.bumpVerticalPos(o);let n=a;if(t.id&&t.message&&e[t.id]){const l=e[t.id].width,d=gt(h);t.message=i.utils_default.wrapLabel(`[${t.message}]`,l-2*h.wrapPadding,d),t.width=l,t.wrap=!0;const c=i.utils_default.calculateTextDimensions(t.message,d),s=i.common_default.getMax(c.height,h.labelBoxHeight);n=a+s,i.log.debug(`${s} - ${t.message}`)}r(t),_.bumpVerticalPos(n)}i.__name(at,"adjustLoopHeightForWrap");function $t(e,t,o,a,r,n,l){function d(u,f){u.x<r.get(e.from).x?(_.insert(t.stopx-f,t.starty,t.startx,t.stopy+u.height/2+h.noteMargin),t.stopx=t.stopx+f):(_.insert(t.startx,t.starty,t.stopx+f,t.stopy+u.height/2+h.noteMargin),t.stopx=t.stopx-f)}i.__name(d,"receiverAdjustment");function c(u,f){u.x<r.get(e.to).x?(_.insert(t.startx-f,t.starty,t.stopx,t.stopy+u.height/2+h.noteMargin),t.startx=t.startx+f):(_.insert(t.stopx,t.starty,t.startx+f,t.stopy+u.height/2+h.noteMargin),t.startx=t.startx-f)}i.__name(c,"senderAdjustment");const s=[It.ACTOR,It.CONTROL,It.ENTITY,It.DATABASE];if(n.get(e.to)==a){const u=r.get(e.to),f=s.includes(u.type)?ut/2+3:u.width/2+3;d(u,f),u.starty=o-u.height/2,_.bumpVerticalPos(u.height/2)}else if(l.get(e.from)==a){const u=r.get(e.from);if(h.mirrorActors){const f=s.includes(u.type)?ut/2:u.width/2;c(u,f)}u.stopy=o-u.height/2,_.bumpVerticalPos(u.height/2)}else if(l.get(e.to)==a){const u=r.get(e.to);if(h.mirrorActors){const f=s.includes(u.type)?ut/2+3:u.width/2+3;d(u,f)}u.stopy=o-u.height/2,_.bumpVerticalPos(u.height/2)}}i.__name($t,"adjustCreatedDestroyedData");var We=i.__name(async function(e,t,o,a){const{securityLevel:r,sequence:n}=i.getConfig2();h=n;let l;r==="sandbox"&&(l=i.select("#i"+t));const d=r==="sandbox"?i.select(l.nodes()[0].contentDocument.body):i.select("body"),c=r==="sandbox"?l.nodes()[0].contentDocument:document;_.init(),i.log.debug(a.db);const s=r==="sandbox"?d.select(`[id="${t}"]`):i.select(`[id="${t}"]`),u=a.db.getActors(),f=a.db.getCreatedActors(),x=a.db.getDestroyedActors(),m=a.db.getBoxes();let y=a.db.getActorKeys();const b=a.db.getMessages(),A=a.db.getDiagramTitle(),P=a.db.hasAtLeastOneBox(),N=a.db.hasAtLeastOneBoxWithTitle(),S=await jt(u,b,a);if(h.height=await te(u,S,m),B.insertComputerIcon(s),B.insertDatabaseIcon(s),B.insertClockIcon(s),P&&(_.bumpVerticalPos(h.boxMargin),N&&_.bumpVerticalPos(m[0].textMaxHeight)),h.hideUnusedParticipants===!0){const T=new Set;b.forEach(I=>{T.add(I.from),T.add(I.to)}),y=y.filter(I=>T.has(I))}Ye(s,u,f,y,0,b,!1);const D=await He(b,u,S,a);B.insertArrowHead(s),B.insertArrowCrossHead(s),B.insertArrowFilledHead(s),B.insertSequenceNumber(s);function Y(T,I){const U=_.endActivation(T);U.starty+18>I&&(U.starty=I-6,I+=12),B.drawActivation(s,U,I,h,Pt(T.from).length),_.insert(U.startx,I-10,U.stopx,I)}i.__name(Y,"activeEnd");let q=1,X=1;const j=[],z=[];let H=0;for(const T of b){let I,U,J;switch(T.type){case a.db.LINETYPE.NOTE:_.resetVerticalPos(),U=T.noteModel,await Be(s,U);break;case a.db.LINETYPE.ACTIVE_START:_.newActivation(T,s,u);break;case a.db.LINETYPE.ACTIVE_END:Y(T,_.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:at(D,T,h.boxMargin,h.boxMargin+h.boxTextMargin,M=>_.newLoop(M));break;case a.db.LINETYPE.LOOP_END:I=_.endLoop(),await B.drawLoop(s,I,"loop",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.RECT_START:at(D,T,h.boxMargin,h.boxMargin,M=>_.newLoop(void 0,M.message));break;case a.db.LINETYPE.RECT_END:I=_.endLoop(),z.push(I),_.models.addLoop(I),_.bumpVerticalPos(I.stopy-_.getVerticalPos());break;case a.db.LINETYPE.OPT_START:at(D,T,h.boxMargin,h.boxMargin+h.boxTextMargin,M=>_.newLoop(M));break;case a.db.LINETYPE.OPT_END:I=_.endLoop(),await B.drawLoop(s,I,"opt",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.ALT_START:at(D,T,h.boxMargin,h.boxMargin+h.boxTextMargin,M=>_.newLoop(M));break;case a.db.LINETYPE.ALT_ELSE:at(D,T,h.boxMargin+h.boxTextMargin,h.boxMargin,M=>_.addSectionToLoop(M));break;case a.db.LINETYPE.ALT_END:I=_.endLoop(),await B.drawLoop(s,I,"alt",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:at(D,T,h.boxMargin,h.boxMargin+h.boxTextMargin,M=>_.newLoop(M)),_.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:at(D,T,h.boxMargin+h.boxTextMargin,h.boxMargin,M=>_.addSectionToLoop(M));break;case a.db.LINETYPE.PAR_END:I=_.endLoop(),await B.drawLoop(s,I,"par",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.AUTONUMBER:q=T.message.start||q,X=T.message.step||X,T.message.visible?a.db.enableSequenceNumbers():a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:at(D,T,h.boxMargin,h.boxMargin+h.boxTextMargin,M=>_.newLoop(M));break;case a.db.LINETYPE.CRITICAL_OPTION:at(D,T,h.boxMargin+h.boxTextMargin,h.boxMargin,M=>_.addSectionToLoop(M));break;case a.db.LINETYPE.CRITICAL_END:I=_.endLoop(),await B.drawLoop(s,I,"critical",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.BREAK_START:at(D,T,h.boxMargin,h.boxMargin+h.boxTextMargin,M=>_.newLoop(M));break;case a.db.LINETYPE.BREAK_END:I=_.endLoop(),await B.drawLoop(s,I,"break",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;default:try{J=T.msgModel,J.starty=_.getVerticalPos(),J.sequenceIndex=q,J.sequenceVisible=a.db.showSequenceNumbers();const M=await Qt(s,J);$t(T,J,M,H,u,f,x),j.push({messageModel:J,lineStartY:M}),_.models.addMessage(J)}catch(M){i.log.error("error while drawing message",M)}}[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(T.type)&&(q=q+X),H++}i.log.debug("createdActors",f),i.log.debug("destroyedActors",x),await Vt(s,u,y,!1);for(const T of j)await Ve(s,T.messageModel,T.lineStartY,a);h.mirrorActors&&await Vt(s,u,y,!0),z.forEach(T=>B.drawBackgroundRect(s,T)),Ut(s,u,y,h);for(const T of _.models.boxes){T.height=_.getVerticalPos()-T.y,_.insert(T.x,T.y,T.x+T.width,T.height);const I=h.boxMargin*2;T.startx=T.x-I,T.starty=T.y-I*.25,T.stopx=T.startx+T.width+2*I,T.stopy=T.starty+T.height+I*.75,T.stroke="rgb(0,0,0, 0.5)",B.drawBox(s,T,h)}P&&_.bumpVerticalPos(h.boxMargin);const F=Zt(s,u,y,c),{bounds:C}=_.getBounds();C.startx===void 0&&(C.startx=0),C.starty===void 0&&(C.starty=0),C.stopx===void 0&&(C.stopx=0),C.stopy===void 0&&(C.stopy=0);let Q=C.stopy-C.starty;Q<F.maxHeight&&(Q=F.maxHeight);let K=Q+2*h.diagramMarginY;h.mirrorActors&&(K=K-h.boxMargin+h.bottomMarginAdj);let Z=C.stopx-C.startx;Z<F.maxWidth&&(Z=F.maxWidth);const tt=Z+2*h.diagramMarginX;A&&s.append("text").text(A).attr("x",(C.stopx-C.startx)/2-2*h.diagramMarginX).attr("y",-25),i.configureSvgSize(s,K,tt,h.useMaxWidth);const R=A?40:0;s.attr("viewBox",C.startx-h.diagramMarginX+" -"+(h.diagramMarginY+R)+" "+tt+" "+(K+R)),i.log.debug("models:",_.models)},"draw");async function jt(e,t,o){const a={};for(const r of t)if(e.get(r.to)&&e.get(r.from)){const n=e.get(r.to);if(r.placement===o.db.PLACEMENT.LEFTOF&&!n.prevActor||r.placement===o.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const l=r.placement!==void 0,d=!l,c=l?xt(h):gt(h),s=r.wrap?i.utils_default.wrapLabel(r.message,h.width-2*h.wrapPadding,c):r.message,f=(i.hasKatex(s)?await i.calculateMathMLDimensions(r.message,i.getConfig2()):i.utils_default.calculateTextDimensions(s,c)).width+2*h.wrapPadding;d&&r.from===n.nextActor?a[r.to]=i.common_default.getMax(a[r.to]||0,f):d&&r.from===n.prevActor?a[r.from]=i.common_default.getMax(a[r.from]||0,f):d&&r.from===r.to?(a[r.from]=i.common_default.getMax(a[r.from]||0,f/2),a[r.to]=i.common_default.getMax(a[r.to]||0,f/2)):r.placement===o.db.PLACEMENT.RIGHTOF?a[r.from]=i.common_default.getMax(a[r.from]||0,f):r.placement===o.db.PLACEMENT.LEFTOF?a[n.prevActor]=i.common_default.getMax(a[n.prevActor]||0,f):r.placement===o.db.PLACEMENT.OVER&&(n.prevActor&&(a[n.prevActor]=i.common_default.getMax(a[n.prevActor]||0,f/2)),n.nextActor&&(a[r.from]=i.common_default.getMax(a[r.from]||0,f/2)))}return i.log.debug("maxMessageWidthPerActor:",a),a}i.__name(jt,"getMaxMessageWidthPerActor");var Fe=i.__name(function(e){let t=0;const o=Bt(h);for(const a in e.links){const n=i.utils_default.calculateTextDimensions(a,o).width+2*h.wrapPadding+2*h.boxMargin;t<n&&(t=n)}return t},"getRequiredPopupWidth");async function te(e,t,o){let a=0;for(const n of e.keys()){const l=e.get(n);l.wrap&&(l.description=i.utils_default.wrapLabel(l.description,h.width-2*h.wrapPadding,Bt(h)));const d=i.hasKatex(l.description)?await i.calculateMathMLDimensions(l.description,i.getConfig2()):i.utils_default.calculateTextDimensions(l.description,Bt(h));l.width=l.wrap?h.width:i.common_default.getMax(h.width,d.width+2*h.wrapPadding),l.height=l.wrap?i.common_default.getMax(d.height,h.height):h.height,a=i.common_default.getMax(a,l.height)}for(const n in t){const l=e.get(n);if(!l)continue;const d=e.get(l.nextActor);if(!d){const f=t[n]+h.actorMargin-l.width/2;l.margin=i.common_default.getMax(f,h.actorMargin);continue}const s=t[n]+h.actorMargin-l.width/2-d.width/2;l.margin=i.common_default.getMax(s,h.actorMargin)}let r=0;return o.forEach(n=>{const l=gt(h);let d=n.actorKeys.reduce((f,x)=>f+=e.get(x).width+(e.get(x).margin||0),0);const c=h.boxMargin*8;d+=c,d-=2*h.boxTextMargin,n.wrap&&(n.name=i.utils_default.wrapLabel(n.name,d-2*h.wrapPadding,l));const s=i.utils_default.calculateTextDimensions(n.name,l);r=i.common_default.getMax(s.height,r);const u=i.common_default.getMax(d,s.width+2*h.wrapPadding);if(n.margin=h.boxTextMargin,d<u){const f=(u-d)/2;n.margin+=f}}),o.forEach(n=>n.textMaxHeight=r),i.common_default.getMax(a,h.height)}i.__name(te,"calculateActorMargins");var qe=i.__name(async function(e,t,o){const a=t.get(e.from),r=t.get(e.to),n=a.x,l=r.x,d=e.wrap&&e.message;let c=i.hasKatex(e.message)?await i.calculateMathMLDimensions(e.message,i.getConfig2()):i.utils_default.calculateTextDimensions(d?i.utils_default.wrapLabel(e.message,h.width,xt(h)):e.message,xt(h));const s={width:d?h.width:i.common_default.getMax(h.width,c.width+2*h.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===o.db.PLACEMENT.RIGHTOF?(s.width=d?i.common_default.getMax(h.width,c.width):i.common_default.getMax(a.width/2+r.width/2,c.width+2*h.noteMargin),s.startx=n+(a.width+h.actorMargin)/2):e.placement===o.db.PLACEMENT.LEFTOF?(s.width=d?i.common_default.getMax(h.width,c.width+2*h.noteMargin):i.common_default.getMax(a.width/2+r.width/2,c.width+2*h.noteMargin),s.startx=n-s.width+(a.width-h.actorMargin)/2):e.to===e.from?(c=i.utils_default.calculateTextDimensions(d?i.utils_default.wrapLabel(e.message,i.common_default.getMax(h.width,a.width),xt(h)):e.message,xt(h)),s.width=d?i.common_default.getMax(h.width,a.width):i.common_default.getMax(a.width,h.width,c.width+2*h.noteMargin),s.startx=n+(a.width-s.width)/2):(s.width=Math.abs(n+a.width/2-(l+r.width/2))+h.actorMargin,s.startx=n<l?n+a.width/2-h.actorMargin/2:l+r.width/2-h.actorMargin/2),d&&(s.message=i.utils_default.wrapLabel(e.message,s.width-2*h.wrapPadding,xt(h))),i.log.debug(`NM:[${s.startx},${s.stopx},${s.starty},${s.stopy}:${s.width},${s.height}=${e.message}]`),s},"buildNoteModel"),ze=i.__name(function(e,t,o){if(![o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[a,r]=Ht(e.from,t),[n,l]=Ht(e.to,t),d=a<=n;let c=d?r:a,s=d?n:l;const u=Math.abs(n-l)>2,f=i.__name(b=>d?-b:b,"adjustValue");e.from===e.to?s=c:(e.activate&&!u&&(s+=f(h.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(s+=f(3)),[o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(c-=f(3)));const x=[a,r,n,l],m=Math.abs(c-s);e.wrap&&e.message&&(e.message=i.utils_default.wrapLabel(e.message,i.common_default.getMax(m+2*h.wrapPadding,h.width),gt(h)));const y=i.utils_default.calculateTextDimensions(e.message,gt(h));return{width:i.common_default.getMax(e.wrap?0:y.width+2*h.wrapPadding,m+2*h.wrapPadding,h.width),height:0,startx:c,stopx:s,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,x),toBounds:Math.max.apply(null,x)}},"buildMessageModel"),He=i.__name(async function(e,t,o,a){const r={},n=[];let l,d,c;for(const s of e){switch(s.type){case a.db.LINETYPE.LOOP_START:case a.db.LINETYPE.ALT_START:case a.db.LINETYPE.OPT_START:case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:case a.db.LINETYPE.CRITICAL_START:case a.db.LINETYPE.BREAK_START:n.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case a.db.LINETYPE.ALT_ELSE:case a.db.LINETYPE.PAR_AND:case a.db.LINETYPE.CRITICAL_OPTION:s.message&&(l=n.pop(),r[l.id]=l,r[s.id]=l,n.push(l));break;case a.db.LINETYPE.LOOP_END:case a.db.LINETYPE.ALT_END:case a.db.LINETYPE.OPT_END:case a.db.LINETYPE.PAR_END:case a.db.LINETYPE.CRITICAL_END:case a.db.LINETYPE.BREAK_END:l=n.pop(),r[l.id]=l;break;case a.db.LINETYPE.ACTIVE_START:{const f=t.get(s.from?s.from:s.to.actor),x=Pt(s.from?s.from:s.to.actor).length,m=f.x+f.width/2+(x-1)*h.activationWidth/2,y={startx:m,stopx:m+h.activationWidth,actor:s.from,enabled:!0};_.activations.push(y)}break;case a.db.LINETYPE.ACTIVE_END:{const f=_.activations.map(x=>x.actor).lastIndexOf(s.from);_.activations.splice(f,1).splice(0,1)}break}s.placement!==void 0?(d=await qe(s,t,a),s.noteModel=d,n.forEach(f=>{l=f,l.from=i.common_default.getMin(l.from,d.startx),l.to=i.common_default.getMax(l.to,d.startx+d.width),l.width=i.common_default.getMax(l.width,Math.abs(l.from-l.to))-h.labelBoxWidth})):(c=ze(s,t,a),s.msgModel=c,c.startx&&c.stopx&&n.length>0&&n.forEach(f=>{if(l=f,c.startx===c.stopx){const x=t.get(s.from),m=t.get(s.to);l.from=i.common_default.getMin(x.x-c.width/2,x.x-x.width/2,l.from),l.to=i.common_default.getMax(m.x+c.width/2,m.x+x.width/2,l.to),l.width=i.common_default.getMax(l.width,Math.abs(l.to-l.from))-h.labelBoxWidth}else l.from=i.common_default.getMin(c.startx,l.from),l.to=i.common_default.getMax(c.stopx,l.to),l.width=i.common_default.getMax(l.width,c.width)-h.labelBoxWidth}))}return _.activations=[],i.log.debug("Loop type widths:",r),r},"calculateLoopBounds"),Ke={bounds:_,drawActors:Vt,drawActorsPopup:Zt,setConf:Jt,draw:We},Ue={parser:oe,get db(){return new de},renderer:Ke,styles:ue,init:i.__name(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,i.setConfig2({sequence:{wrap:e.wrap}}))},"init")};exports.diagram=Ue;
@@ -1,61 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CkYZRBYn.js"),tt=require("./arc-BBnIBs2j.js");var K=function(){var r=n.__name(function(_,s,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=s);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],y=[1,16],f=[1,17],p={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:n.__name(function(s,a,h,u,g,o,S){var x=o.length-1;switch(g){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:u.addTask(o[x],0,""),this.$=o[x];break;case 16:u.addEvent(o[x].substr(2)),this.$=o[x];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},r(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,7],{1:[2,1]}),r(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,5]),r(t,[2,6]),r(t,[2,8]),{13:[1,19]},{15:[1,20]},r(t,[2,11]),r(t,[2,12]),r(t,[2,13]),r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,4]),r(t,[2,9]),r(t,[2,10])],defaultActions:{},parseError:n.__name(function(s,a){if(a.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=a,h}},"parseError"),parse:n.__name(function(s){var a=this,h=[0],u=[],g=[null],o=[],S=this.table,x="",$=0,A=0,W=2,U=1,B=o.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(I.yy[N]=this.yy[N]);k.setInput(s,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var b=k.yylloc;o.push(b);var L=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function C(E){h.length=h.length-2*E,g.length=g.length-E,o.length=o.length-E}n.__name(C,"popStack");function H(){var E;return E=u.pop()||k.lex()||U,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=a.symbols_[E]||E),E}n.__name(H,"lex");for(var w,M,T,Z,F={},O,P,D,j;;){if(M=h[h.length-1],this.defaultActions[M]?T=this.defaultActions[M]:((w===null||typeof w>"u")&&(w=H()),T=S[M]&&S[M][w]),typeof T>"u"||!T.length||!T[0]){var J="";j=[];for(O in S[M])this.terminals_[O]&&O>W&&j.push("'"+this.terminals_[O]+"'");k.showPosition?J="Parse error on line "+($+1)+`:
2
- `+k.showPosition()+`
3
- Expecting `+j.join(", ")+", got '"+(this.terminals_[w]||w)+"'":J="Parse error on line "+($+1)+": Unexpected "+(w==U?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(J,{text:k.match,token:this.terminals_[w]||w,line:k.yylineno,loc:b,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+w);switch(T[0]){case 1:h.push(w),g.push(k.yytext),o.push(k.yylloc),h.push(T[1]),w=null,A=k.yyleng,x=k.yytext,$=k.yylineno,b=k.yylloc;break;case 2:if(P=this.productions_[T[1]][1],F.$=g[g.length-P],F._$={first_line:o[o.length-(P||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(P||1)].first_column,last_column:o[o.length-1].last_column},L&&(F._$.range=[o[o.length-(P||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(F,[x,A,$,I.yy,T[1],g,o].concat(B)),typeof Z<"u")return Z;P&&(h=h.slice(0,-1*P*2),g=g.slice(0,-1*P),o=o.slice(0,-1*P)),h.push(this.productions_[T[1]][0]),g.push(F.$),o.push(F._$),D=S[h[h.length-2]][h[h.length-1]],h.push(D);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:n.__name(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:n.__name(function(s,a){return this.yy=a||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:n.__name(function(s){var a=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=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),h.length-1&&(this.yylineno-=h.length-1);var g=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:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:n.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+a+"^"},"showPosition"),test_match:n.__name(function(s,a){var h,u,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var o in g)this[o]=g[o];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,h,u;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),o=0;o<g.length;o++)if(h=this._input.match(this.rules[g[o]]),h&&(!a||h[0].length>a[0].length)){if(a=h,u=o,this.options.backtrack_lexer){if(s=this.test_match(h,g[o]),s!==!1)return s;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(s=this.test_match(a,g[u]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n.__name(function(){var a=this.next();return a||this.lex()},"lex"),begin:n.__name(function(a){this.conditionStack.push(a)},"begin"),popState:n.__name(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__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:n.__name(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:n.__name(function(a){this.begin(a)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(a,h,u,g){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/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,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return _}();p.lexer=m;function v(){this.yy={}}return n.__name(v,"Parser"),v.prototype=p,p.Parser=v,new v}();K.parser=K;var _t=K,it={};n.__export(it,{addEvent:()=>ut,addSection:()=>ot,addTask:()=>dt,addTaskOrg:()=>pt,clear:()=>lt,default:()=>ft,getCommonDb:()=>at,getSections:()=>ct,getTasks:()=>ht});var z="",st=0,Q=[],G=[],V=[],at=n.__name(()=>n.commonDb_exports,"getCommonDb"),lt=n.__name(function(){Q.length=0,G.length=0,z="",V.length=0,n.clear()},"clear"),ot=n.__name(function(r){z=r,Q.push(r)},"addSection"),ct=n.__name(function(){return Q},"getSections"),ht=n.__name(function(){let r=et();const t=100;let e=0;for(;!r&&e<t;)r=et(),e++;return G.push(...V),G},"getTasks"),dt=n.__name(function(r,t,e){const l={id:st++,section:z,type:z,task:r,score:t||0,events:e?[e]:[]};V.push(l)},"addTask"),ut=n.__name(function(r){V.find(e=>e.id===st-1).events.push(r)},"addEvent"),pt=n.__name(function(r){const t={section:z,type:z,description:r,task:r,classes:[]};G.push(t)},"addTaskOrg"),et=n.__name(function(){const r=n.__name(function(e){return V[e].processed},"compileTask");let t=!0;for(const[e,l]of V.entries())r(e),t=t&&l.processed;return t},"compileTasks"),ft={clear:lt,getCommonDb:at,addSection:ot,getSections:ct,getTasks:ht,addTask:dt,addTaskOrg:pt,addEvent:ut},mt=12,q=n.__name(function(r,t){const e=r.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),xt=n.__name(function(r,t){const l=r.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=r.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(f){const p=tt.d3arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}n.__name(d,"smile");function c(f){const p=tt.d3arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}n.__name(c,"sad");function y(f){f.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return n.__name(y,"ambivalent"),t.score>3?d(i):t.score<3?c(i):y(i),l},"drawFace"),kt=n.__name(function(r,t){const e=r.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),gt=n.__name(function(r,t){const e=t.text.replace(/<br\s*\/?>/gi," "),l=r.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const i=l.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),l},"drawText"),vt=n.__name(function(r,t){function e(i,d,c,y,f){return i+","+d+" "+(i+c)+","+d+" "+(i+c)+","+(d+y-f)+" "+(i+c-f*1.2)+","+(d+y)+" "+i+","+(d+y)}n.__name(e,"genPoints");const l=r.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,gt(r,t)},"drawLabel"),bt=n.__name(function(r,t,e){const l=r.append("g"),i=X();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,q(l,i),yt(e)(t.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),nt=-1,wt=n.__name(function(r,t,e){const l=t.x+e.width/2,i=r.append("g");nt++;const d=300+5*30;i.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",d).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(i,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=X();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,q(i,c),yt(e)(t.task,i,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),St=n.__name(function(r,t){q(r,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Et=n.__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),X=n.__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),yt=function(){function r(i,d,c,y,f,p,m,v){const _=d.append("text").attr("x",c+f/2).attr("y",y+p/2+5).style("font-color",v).style("text-anchor","middle").text(i);l(_,m)}n.__name(r,"byText");function t(i,d,c,y,f,p,m,v,_){const{taskFontSize:s,taskFontFamily:a}=v,h=i.split(/<br\s*\/?>/gi);for(let u=0;u<h.length;u++){const g=u*s-s*(h.length-1)/2,o=d.append("text").attr("x",c+f/2).attr("y",y).attr("fill",_).style("text-anchor","middle").style("font-size",s).style("font-family",a);o.append("tspan").attr("x",c+f/2).attr("dy",g).text(h[u]),o.attr("y",y+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(o,m)}}n.__name(t,"byTspan");function e(i,d,c,y,f,p,m,v){const _=d.append("switch"),a=_.append("foreignObject").attr("x",c).attr("y",y).attr("width",f).attr("height",p).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,c,y,f,p,m,v),l(a,m)}n.__name(e,"byFo");function l(i,d){for(const c in d)c in d&&i.attr(c,d[c])}return n.__name(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?r:t}}(),Tt=n.__name(function(r){r.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function Y(r,t){r.each(function(){var e=n.select(this),l=e.text().split(/(\s+|<br>)/).reverse(),i,d=[],c=1.1,y=e.attr("y"),f=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",f+"em");for(let m=0;m<l.length;m++)i=l[l.length-1-m],d.push(i),p.text(d.join(" ").trim()),(p.node().getComputedTextLength()>t||i==="<br>")&&(d.pop(),p.text(d.join(" ").trim()),i==="<br>"?d=[""]:d=[i],p=e.append("tspan").attr("x",0).attr("y",y).attr("dy",c+"em").text(i))})}n.__name(Y,"wrap");var It=n.__name(function(r,t,e,l){var v;const i=e%mt-1,d=r.append("g");t.section=i,d.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const c=d.append("g"),y=d.append("g"),p=y.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),m=(v=l.fontSize)!=null&&v.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+m*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,y.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),$t(c,t,i,l),t},"drawNode"),Nt=n.__name(function(r,t,e){var y;const l=r.append("g"),d=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),c=(y=e.fontSize)!=null&&y.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),$t=n.__name(function(r,t,e){r.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),r.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),R={drawRect:q,drawCircle:kt,drawSection:bt,drawText:gt,drawLabel:vt,drawTask:wt,drawBackgroundRect:St,getTextObj:Et,getNoteRect:X,initGraphics:Tt,drawNode:It,getVirtualNodeHeight:Nt},Lt=n.__name(function(r,t,e,l){var B,k,I;const i=n.getConfig2(),d=((B=i.timeline)==null?void 0:B.leftMargin)??50;n.log.debug("timeline",l.db);const c=i.securityLevel;let y;c==="sandbox"&&(y=n.select("#i"+t));const p=(c==="sandbox"?n.select(y.nodes()[0].contentDocument.body):n.select("body")).select("#"+t);p.append("g");const m=l.db.getTasks(),v=l.db.getCommonDb().getDiagramTitle();n.log.debug("task",m),R.initGraphics(p);const _=l.db.getSections();n.log.debug("sections",_);let s=0,a=0,h=0,u=0,g=50+d,o=50;u=50;let S=0,x=!0;_.forEach(function(N){const b={number:S,descr:N,section:S,width:150,padding:20,maxHeight:s},L=R.getVirtualNodeHeight(p,b,i);n.log.debug("sectionHeight before draw",L),s=Math.max(s,L+20)});let $=0,A=0;n.log.debug("tasks.length",m.length);for(const[N,b]of m.entries()){const L={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:a},C=R.getVirtualNodeHeight(p,L,i);n.log.debug("taskHeight before draw",C),a=Math.max(a,C+20),$=Math.max($,b.events.length);let H=0;for(const w of b.events){const M={descr:w,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};H+=R.getVirtualNodeHeight(p,M,i)}b.events.length>0&&(H+=(b.events.length-1)*10),A=Math.max(A,H)}n.log.debug("maxSectionHeight before draw",s),n.log.debug("maxTaskHeight before draw",a),_&&_.length>0?_.forEach(N=>{const b=m.filter(w=>w.section===N),L={number:S,descr:N,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:s};n.log.debug("sectionNode",L);const C=p.append("g"),H=R.drawNode(C,L,S,i);n.log.debug("sectionNode output",H),C.attr("transform",`translate(${g}, ${u})`),o+=s+50,b.length>0&&rt(p,b,S,g,o,a,i,$,A,s,!1),g+=200*Math.max(b.length,1),o=u,S++}):(x=!1,rt(p,m,S,g,o,a,i,$,A,s,!0));const W=p.node().getBBox();n.log.debug("bounds",W),v&&p.append("text").text(v).attr("x",W.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),h=x?s+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",h).attr("x2",W.width+3*d).attr("y2",h).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n.setupGraphViewbox(void 0,p,((k=i.timeline)==null?void 0:k.padding)??50,((I=i.timeline)==null?void 0:I.useMaxWidth)??!1)},"draw"),rt=n.__name(function(r,t,e,l,i,d,c,y,f,p,m){var v;for(const _ of t){const s={descr:_.task,section:e,number:e,width:150,padding:20,maxHeight:d};n.log.debug("taskNode",s);const a=r.append("g").attr("class","taskWrapper"),u=R.drawNode(a,s,e,c).height;if(n.log.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${i})`),d=Math.max(d,u),_.events){const g=r.append("g").attr("class","lineWrapper");let o=d;i+=100,o=o+Mt(r,_.events,e,l,i,c),i-=100,g.append("line").attr("x1",l+190/2).attr("y1",i+d).attr("x2",l+190/2).attr("y2",i+d+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,m&&!((v=c.timeline)!=null&&v.disableMulticolor)&&e++}i=i-10},"drawTasks"),Mt=n.__name(function(r,t,e,l,i,d){let c=0;const y=i;i=i+100;for(const f of t){const p={descr:f,section:e,number:e,width:150,padding:20,maxHeight:50};n.log.debug("eventNode",p);const m=r.append("g").attr("class","eventWrapper"),_=R.drawNode(m,p,e,d).height;c=c+_,m.attr("transform",`translate(${l}, ${i})`),i=i+10+_}return i=y,c},"drawEvents"),Pt={setConf:n.__name(()=>{},"setConf"),draw:Lt},Ht=n.__name(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],n.isDark(r["lineColor"+e])?r["lineColor"+e]=n.lighten(r["lineColor"+e],20):r["lineColor"+e]=n.darken(r["lineColor"+e],20);for(let e=0;e<r.THEME_COLOR_LIMIT;e++){const l=""+(17-3*e);t+=`
7
- .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
8
- fill: ${r["cScale"+e]};
9
- }
10
- .section-${e-1} text {
11
- fill: ${r["cScaleLabel"+e]};
12
- }
13
- .node-icon-${e-1} {
14
- font-size: 40px;
15
- color: ${r["cScaleLabel"+e]};
16
- }
17
- .section-edge-${e-1}{
18
- stroke: ${r["cScale"+e]};
19
- }
20
- .edge-depth-${e-1}{
21
- stroke-width: ${l};
22
- }
23
- .section-${e-1} line {
24
- stroke: ${r["cScaleInv"+e]} ;
25
- stroke-width: 3;
26
- }
27
-
28
- .lineWrapper line{
29
- stroke: ${r["cScaleLabel"+e]} ;
30
- }
31
-
32
- .disabled, .disabled circle, .disabled text {
33
- fill: lightgray;
34
- }
35
- .disabled text {
36
- fill: #efefef;
37
- }
38
- `}return t},"genSections"),At=n.__name(r=>`
39
- .edge {
40
- stroke-width: 3;
41
- }
42
- ${Ht(r)}
43
- .section-root rect, .section-root path, .section-root circle {
44
- fill: ${r.git0};
45
- }
46
- .section-root text {
47
- fill: ${r.gitBranchLabel0};
48
- }
49
- .icon-container {
50
- height:100%;
51
- display: flex;
52
- justify-content: center;
53
- align-items: center;
54
- }
55
- .edge {
56
- fill: none;
57
- }
58
- .eventWrapper {
59
- filter: brightness(120%);
60
- }
61
- `,"getStyles"),Ct=At,Rt={db:it,renderer:Pt,parser:_t,styles:Ct};exports.diagram=Rt;