@theruansilva/omp-web 2.0.0 → 2.2.0

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 (206) hide show
  1. package/dist/cli.js +83 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/client/assets/CodeViewer-DEVekDfo.js +4 -0
  4. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  5. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  6. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  7. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  8. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  9. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  10. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  11. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  12. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  13. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  14. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  15. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  16. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  17. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  18. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  19. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  20. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  21. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  22. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  23. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  24. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  25. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  26. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  27. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  28. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  29. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  30. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  31. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  32. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  33. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  34. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  35. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  36. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  37. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  38. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  39. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  40. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  41. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  42. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  43. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  44. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  45. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  46. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  47. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  48. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  49. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  50. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  51. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  52. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  53. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  54. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  55. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  56. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  57. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  58. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  59. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  60. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  61. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  62. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  63. package/dist/client/assets/{TerminalPanel-B9-LUv7E.js → TerminalPanel-CLZRR8T3.js} +8 -8
  64. package/dist/client/assets/{UnifiedDiffViewer-BUqme4se.js → UnifiedDiffViewer-DkUYn4xn.js} +2 -2
  65. package/dist/client/assets/_basePickBy-vr4256UX.js +1 -0
  66. package/dist/client/assets/_baseUniq-CHc60b6y.js +1 -0
  67. package/dist/client/assets/abnfDiagram-O67JEVCF-CN3HoUk0.js +1 -0
  68. package/dist/client/assets/arc-DfCyV39Y.js +1 -0
  69. package/dist/client/assets/architectureDiagram-NJMV4G6O-B18ZPEpX.js +36 -0
  70. package/dist/client/assets/blockDiagram-BEXU5L5S-DauyTopu.js +140 -0
  71. package/dist/client/assets/c4Diagram-YGBWAQC7-BzItBhD8.js +38 -0
  72. package/dist/client/assets/channel-BeMMNdGw.js +1 -0
  73. package/dist/client/assets/chunk-2Q5K7J3B-CTeOQu6b.js +1 -0
  74. package/dist/client/assets/chunk-3FUC2YCW-OWYL0CxB.js +2 -0
  75. package/dist/client/assets/chunk-5VM5RSS4-BPto9x5-.js +15 -0
  76. package/dist/client/assets/chunk-GTNCS2PH-DqPy7R2d.js +88 -0
  77. package/dist/client/assets/chunk-GWA4HPMP-C4N-dUua.js +1 -0
  78. package/dist/client/assets/chunk-JWPE2WC7-C4b1ijjH.js +1 -0
  79. package/dist/client/assets/chunk-NETBCI7D-Ds_9Juid.js +1 -0
  80. package/dist/client/assets/chunk-WEXAMYUT-DC9hisqc.js +1 -0
  81. package/dist/client/assets/chunk-XXDRQBXY-DZnUPupk.js +1 -0
  82. package/dist/client/assets/classDiagram-v2-NBCMYWYE-CDSg6Hoa.js +217 -0
  83. package/dist/client/assets/cose-bilkent-JH36ORCC-B4ISJxq4.js +1 -0
  84. package/dist/client/assets/cynefin-OW5HDTMX-Dk9BE-CS.js +166 -0
  85. package/dist/client/assets/cynefinDiagram-VND7K2PF-D4LOjD3M.js +62 -0
  86. package/dist/client/assets/cytoscape.esm-BB4DxJjf.js +321 -0
  87. package/dist/client/assets/dagre-6A5THRUB-BdboVbbt.js +4 -0
  88. package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
  89. package/dist/client/assets/diagram-22UHCM2B-D_zb_SLQ.js +200 -0
  90. package/dist/client/assets/diagram-3UASUU5V-D5rEpDmK.js +24 -0
  91. package/dist/client/assets/diagram-ATOU4E4O-BdTFXxOS.js +3 -0
  92. package/dist/client/assets/diagram-CDSNMT55-B8gtHdg9.js +30 -0
  93. package/dist/client/assets/diagram-MLGK6HIB-C-NGINWH.js +24 -0
  94. package/dist/client/assets/diagram-MPIPVDR6-D3_T-c5C.js +41 -0
  95. package/dist/client/assets/ebnfDiagram-ZINNZB2B-BIASbt52.js +1 -0
  96. package/dist/client/assets/elk-276RUBZZ-CuNF0hHg.js +27 -0
  97. package/dist/client/assets/erDiagram-OPXOYQCR-Cmi_qmGj.js +99 -0
  98. package/dist/client/assets/flowDiagram-KWPJA3E3-DP-SrXc2.js +213 -0
  99. package/dist/client/assets/ganttDiagram-FUAMR5RP-olLEnoMM.js +292 -0
  100. package/dist/client/assets/gitGraphDiagram-X574FWY7-uPZ9lEq1.js +106 -0
  101. package/dist/client/assets/graph-C2De1HlQ.js +1 -0
  102. package/dist/client/assets/index-D-PvDSJs.js +5657 -0
  103. package/dist/client/assets/{index-DGBYb2j9.css → index-DSGiUJZL.css} +1 -1
  104. package/dist/client/assets/infoDiagram-VRGFBTTK-D0Q5E5gc.js +2 -0
  105. package/dist/client/assets/init-Gi6I4Gst.js +1 -0
  106. package/dist/client/assets/ishikawaDiagram-OU5B5YK6-C21L3hk6.js +70 -0
  107. package/dist/client/assets/journeyDiagram-ZHPQQLJL-C9o5XEso.js +139 -0
  108. package/dist/client/assets/kanban-definition-PNTS6WVX-BioH9OyY.js +89 -0
  109. package/dist/client/assets/katex-HP8lGamR.js +257 -0
  110. package/dist/client/assets/linear-BwJ7-DLx.js +1 -0
  111. package/dist/client/assets/mindmap-definition-NLK3R4M7-ogoKSGSi.js +96 -0
  112. package/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
  113. package/dist/client/assets/pegDiagram-GJSIUBJH-Ck2_wE3g.js +1 -0
  114. package/dist/client/assets/pieDiagram-5QR66LMP-C5wm07EA.js +39 -0
  115. package/dist/client/assets/quadrantDiagram-O4NWA36T-UKQ2brr3.js +7 -0
  116. package/dist/client/assets/railroadDiagram-XR7U4H2S-BgY4ABv4.js +1 -0
  117. package/dist/client/assets/requirementDiagram-PLB6GJNP-B50WsncI.js +84 -0
  118. package/dist/client/assets/sankeyDiagram-IPEJSGJF-BHtyWxOk.js +40 -0
  119. package/dist/client/assets/sequenceDiagram-PO4LG4MO-D_kxHIBS.js +169 -0
  120. package/dist/client/assets/sizeCapture-INFHLROL-MzN60-aT.js +1 -0
  121. package/dist/client/assets/stateDiagram-v2-GCMORJYK-CBiPlAo0.js +291 -0
  122. package/dist/client/assets/swimlanes-2SLR337P-BCdsVfp-.js +1 -0
  123. package/dist/client/assets/swimlanesDiagram-TC7HE7FX-Da17CLQY.js +8 -0
  124. package/dist/client/assets/timeline-definition-EJHVYXUP-BemXf1bb.js +120 -0
  125. package/dist/client/assets/usecaseDiagram-POWQR4AR-Vqj4Zp6V.js +370 -0
  126. package/dist/client/assets/vendor-editor-core-BG7M-EQ-.js +10 -0
  127. package/dist/client/assets/vendor-editor-languages-pDmyn-oC.js +26 -0
  128. package/dist/client/assets/vennDiagram-UO4OBE2U-2mimeV2G.js +34 -0
  129. package/dist/client/assets/wardleyDiagram-VNRHLVJA-Bg2MjtpE.js +78 -0
  130. package/dist/client/assets/xychartDiagram-PMCCYNJV-7_nvdM0t.js +7 -0
  131. package/dist/client/index.html +4 -4
  132. package/dist/omp-web-plugins/mcps/mcpsLogic.js +78 -0
  133. package/dist/omp-web-plugins/mcps/mcpsPanelElement.js +417 -0
  134. package/dist/omp-web-plugins/mcps/omp-web-plugin.js +45 -0
  135. package/dist/omp-web-plugins/mcps/package.json +9 -0
  136. package/dist/omp-web-plugins/mcps/types.js +2 -0
  137. package/dist/plugin-api.d.ts +1 -0
  138. package/dist/server/app.js +24 -1
  139. package/dist/server/app.js.map +1 -1
  140. package/dist/server/index.js +0 -0
  141. package/dist/server/machines/machineService.js +3 -0
  142. package/dist/server/machines/machineService.js.map +1 -1
  143. package/dist/server/mcpRoutes.js +73 -0
  144. package/dist/server/mcpRoutes.js.map +1 -0
  145. package/dist/server/push/PushNotificationService.js +16 -3
  146. package/dist/server/push/PushNotificationService.js.map +1 -1
  147. package/dist/server/security.js +172 -0
  148. package/dist/server/security.js.map +1 -0
  149. package/dist/server/sessiond/sessionProxyRoutes.js +11 -5
  150. package/dist/server/sessiond/sessionProxyRoutes.js.map +1 -1
  151. package/dist/server/sessiond.js +28 -1
  152. package/dist/server/sessiond.js.map +1 -1
  153. package/dist/server/sessions/piAgentSession.js +2 -1
  154. package/dist/server/sessions/piAgentSession.js.map +1 -1
  155. package/dist/server/sessions/piSessionService.js +168 -16
  156. package/dist/server/sessions/piSessionService.js.map +1 -1
  157. package/dist/server/sessions/schedulePrompt/scheduler.js +17 -13
  158. package/dist/server/sessions/schedulePrompt/scheduler.js.map +1 -1
  159. package/dist/server/sessions/schedulePrompt/tool.js +13 -1
  160. package/dist/server/sessions/schedulePrompt/tool.js.map +1 -1
  161. package/dist/server/sessions/sessionEventMapper.js +36 -2
  162. package/dist/server/sessions/sessionEventMapper.js.map +1 -1
  163. package/dist/server/sessions/sessionRoutes.js +3 -0
  164. package/dist/server/sessions/sessionRoutes.js.map +1 -1
  165. package/dist/server/workspaceExplorerRoutes.js +16 -9
  166. package/dist/server/workspaceExplorerRoutes.js.map +1 -1
  167. package/dist/server/workspaces/fileContentService.js +9 -4
  168. package/dist/server/workspaces/fileContentService.js.map +1 -1
  169. package/dist/server/workspaces/imagePreviewService.js +63 -13
  170. package/dist/server/workspaces/imagePreviewService.js.map +1 -1
  171. package/dist/shared/apiTypes.d.ts +16 -1
  172. package/dist/shared/federatedRoutes.js +2 -0
  173. package/dist/shared/federatedRoutes.js.map +1 -1
  174. package/package.json +4 -1
  175. package/dist/client/assets/CodeViewer-CJNBz-Ox.js +0 -4
  176. package/dist/client/assets/index-uWm_YNRB.js +0 -4427
  177. package/dist/client/assets/vendor-editor-core-D9EJm1dE.js +0 -10
  178. package/dist/client/assets/vendor-editor-languages-N6dcxgRO.js +0 -26
  179. package/dist/client-react/assets/index-BQ6zLLfz.js +0 -51
  180. package/dist/client-react/assets/index-Befs78HG.css +0 -1
  181. package/dist/client-react/index.html +0 -16
  182. package/dist/docker/piWebDockerCommandPlan.js +0 -211
  183. package/dist/docker/piWebDockerCommandPlan.js.map +0 -1
  184. package/dist/pi-web-plugins/info/package.json +0 -9
  185. package/dist/pi-web-plugins/info/pi-web-plugin.js +0 -51
  186. package/dist/pi-web-plugins/schedule-prompts/package.json +0 -9
  187. package/dist/pi-web-plugins/schedule-prompts/pi-web-plugin.js +0 -43
  188. package/dist/pi-web-plugins/schedule-prompts/schedulePromptsPanelElement.js +0 -226
  189. package/dist/pi-web-plugins/schedule-prompts/types.js +0 -2
  190. package/dist/pi-web-plugins/updates/package.json +0 -9
  191. package/dist/pi-web-plugins/updates/pi-web-plugin.js +0 -173
  192. package/dist/pi-web-plugins/updates/updatesLogic.js +0 -97
  193. package/dist/piWebVersionReport.js +0 -225
  194. package/dist/piWebVersionReport.js.map +0 -1
  195. package/dist/server/diagnostics/nodePtySpawnHelper.js +0 -130
  196. package/dist/server/diagnostics/nodePtySpawnHelper.js.map +0 -1
  197. package/dist/server/piWebPluginService.js +0 -283
  198. package/dist/server/piWebPluginService.js.map +0 -1
  199. package/dist/server/piWebStatus.js +0 -602
  200. package/dist/server/piWebStatus.js.map +0 -1
  201. package/dist/server/piWebStatusCache.js +0 -32
  202. package/dist/server/piWebStatusCache.js.map +0 -1
  203. package/dist/server/workspaces/projectPiWebConfig.js +0 -61
  204. package/dist/server/workspaces/projectPiWebConfig.js.map +0 -1
  205. package/dist/shared/piWebStatusParsing.js +0 -102
  206. package/dist/shared/piWebStatusParsing.js.map +0 -1
@@ -0,0 +1,169 @@
1
+ import{I as hr}from"./chunk-2Q5K7J3B-CTeOQu6b.js";import{_ as f,o as dr,c as $,k as Ht,l as it,S as Fe,d as Tr,e as pr,m as N,b as Ve,s as Er,q as ur,a as fr,g as _r,t as gr,v as xr,J as yr,A as Ir,j as Ft,u as Z,T as j,U as vt,V as qe,Z as Rr,L as zt,W as Or,X as ze}from"./index-D-PvDSJs.js";import{a as Lr,g as le,b as Tt,d as br,e as he,f as de}from"./chunk-GWA4HPMP-C4N-dUua.js";import"./vendor-editor-core-BG7M-EQ-.js";import"./vendor-editor-languages-pDmyn-oC.js";var ne=(function(){var e=f(function(ft,w,C,D){for(C=C||{},D=ft.length;D--;C[ft[D]]=w);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],h=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],L=[1,25],g=[1,26],R=[1,27],T=[1,28],O=[1,29],x=[1,30],m=[1,31],S=[1,32],b=[1,33],P=[1,34],k=[1,35],B=[1,36],V=[1,37],K=[1,38],z=[1,39],X=[1,40],tt=[1,42],et=[1,43],U=[1,44],nt=[1,45],rt=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Nt=[1,74],Mt=[1,80],A=[1,81],v=[1,82],ht=[1,83],at=[1,84],H=[1,85],bt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],ye=[1,94],Ie=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],me=[1,100],Se=[1,101],Ae=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[2,78],Pt=[4,5,17,51,53,54],Bt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],De=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],$t=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],jt=[5,52],F=[70,71,72,73],ct=[1,151],te={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,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],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(w,C,D,y,G,c,kt){var p=c.length-1;switch(G){case 3:return y.apply(c[p]),c[p];case 4:case 10:this.$=[];break;case 5:case 11:c[p-1].push(c[p]),this.$=c[p-1];break;case 6:case 7:case 12:case 13:this.$=c[p];break;case 8:case 9:case 14:this.$=[];break;case 16:c[p].type="createParticipant",this.$=c[p];break;case 17:c[p-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[p-2])}),c[p-1].push({type:"boxEnd",boxText:c[p-2]}),this.$=c[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-2]),sequenceIndexStep:Number(c[p-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-1].actor};break;case 30:y.setDiagramTitle(c[p].substring(6)),this.$=c[p].substring(6);break;case 31:y.setDiagramTitle(c[p].substring(7)),this.$=c[p].substring(7);break;case 32:this.$=c[p].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[p].trim(),y.setAccDescription(this.$);break;case 35:c[p-1].unshift({type:"loopStart",loopText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.LOOP_START}),c[p-1].push({type:"loopEnd",loopText:c[p-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[p-1];break;case 36:c[p-1].unshift({type:"rectStart",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_START}),c[p-1].push({type:"rectEnd",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[p-1];break;case 37:c[p-1].unshift({type:"optStart",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_START}),c[p-1].push({type:"optEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[p-1];break;case 38:c[p-1].unshift({type:"altStart",altText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.ALT_START}),c[p-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[p-1];break;case 39:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 40:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 41:c[p-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.CRITICAL_START}),c[p-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[p-1];break;case 42:c[p-1].unshift({type:"breakStart",breakText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_START}),c[p-1].push({type:"breakEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[p-1];break;case 44:this.$=c[p-3].concat([{type:"option",optionText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[p]]);break;case 46:this.$=c[p-3].concat([{type:"and",parText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.PAR_AND},c[p]]);break;case 48:this.$=c[p-3].concat([{type:"else",altText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.ALT_ELSE},c[p]]);break;case 49:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 50:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 51:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 52:case 57:c[p-1].draw="actor",c[p-1].type="addParticipant",this.$=c[p-1];break;case 53:c[p-1].type="destroyParticipant",this.$=c[p-1];break;case 54:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 55:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 56:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 58:this.$=[c[p-1],{type:"addNote",placement:c[p-2],actor:c[p-1].actor,text:c[p]}];break;case 59:c[p-2]=[].concat(c[p-1],c[p-1]).slice(0,2),c[p-2][0]=c[p-2][0].actor,c[p-2][1]=c[p-2][1].actor,this.$=[c[p-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[p-2].slice(0,2),text:c[p]}];break;case 60:this.$=[c[p-1],{type:"addLinks",actor:c[p-1].actor,text:c[p]}];break;case 61:this.$=[c[p-1],{type:"addALink",actor:c[p-1].actor,text:c[p]}];break;case 62:this.$=[c[p-1],{type:"addProperties",actor:c[p-1].actor,text:c[p]}];break;case 63:this.$=[c[p-1],{type:"addDetails",actor:c[p-1].actor,text:c[p]}];break;case 66:this.$=[c[p-2],c[p]];break;case 67:this.$=c[p];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor}];break;case 71:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-4].actor}];break;case 72:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor}];break;case 73:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-4].actor}];break;case 74:this.$=[c[p-5],c[p-1],{type:"addMessage",from:c[p-5].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-5].actor}];break;case 75:this.$=[c[p-3],c[p-1],{type:"addMessage",from:c[p-3].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p]}];break;case 76:this.$={type:"addParticipant",actor:c[p-1],config:c[p]};break;case 77:this.$=c[p-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[p]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},e(M,[2,5]),{9:48,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:K,53:z,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:W},{23:56,73:W},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(M,[2,30]),e(M,[2,31]),{33:[1,62]},{35:[1,63]},e(M,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Nt},{23:75,55:76,73:Nt},{23:77,73:W},{69:78,72:[1,79],78:Mt,79:A,80:v,81:ht,82:at,83:H,84:bt,85:pe,86:Ee,87:ue,88:fe,89:_e,90:ge,91:xe,92:ye,93:Ie,94:Re,95:Oe,96:Le,97:be,98:me,99:Se,100:Ae,101:we,102:Ne,103:Pe},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:W},{23:111,73:W},{23:112,73:W},{23:113,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ke),e(M,[2,6]),e(M,[2,16]),e(Pt,[2,10],{11:114}),e(M,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(M,[2,22]),{5:[1,118]},{5:[1,119]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Bt,i,{7:120}),e(Bt,i,{7:121}),e(Bt,i,{7:122}),e(De,i,{41:123,7:124}),e($t,i,{43:125,7:126}),e($t,i,{7:126,43:127}),e(ve,i,{46:128,7:129}),e(Bt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(jt,ke,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:W},{69:146,78:Mt,79:A,80:v,81:ht,82:at,83:H,84:bt,85:pe,86:Ee,87:ue,88:fe,89:_e,90:ge,91:xe,92:ye,93:Ie,94:Re,95:Oe,96:Le,97:be,98:me,99:Se,100:Ae,101:we,102:Ne,103:Pe},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:W},{23:149,60:148,73:W},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:K,53:z,54:X},{5:[1,160]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,161],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{17:[1,164]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,50:[1,165],51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{17:[1,166]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,49:[1,167],51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,48:[1,170],51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,171],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:tt,61:et,62:U,63:nt,64:rt,73:W},{16:[1,172]},e(M,[2,50]),{16:[1,173]},e(M,[2,55]),e(jt,[2,76]),{76:[1,174]},{16:[1,175]},e(M,[2,52]),{16:[1,176]},e(M,[2,57]),e(M,[2,53]),{23:177,73:W},{23:178,73:W},{23:179,73:W},{58:180,104:ct},{23:181,72:[1,182],73:W},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Pt,[2,11]),{13:186,51:K,53:z,54:X},e(Pt,[2,13]),e(Pt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,187]},e(M,[2,39]),{16:[1,188]},e(M,[2,40]),e(M,[2,41]),{16:[1,189]},e(M,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:W},{5:[2,58]},{5:[2,59]},{23:200,73:W},e(Pt,[2,12]),e(De,i,{7:124,41:201}),e($t,i,{7:126,43:202}),e(ve,i,{7:129,46:203}),e(M,[2,49]),e(M,[2,54]),e(jt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:f(function(w,C){if(C.recoverable)this.trace(w);else{var D=new Error(w);throw D.hash=C,D}},"parseError"),parse:f(function(w){var C=this,D=[0],y=[],G=[null],c=[],kt=this.table,p="",Vt=0,Ce=0,nr=2,Me=1,or=c.slice.call(arguments,1),Q=Object.create(this.lexer),yt={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(yt.yy[ee]=this.yy[ee]);Q.setInput(w,yt.yy),yt.yy.lexer=Q,yt.yy.parser=this,typeof Q.yylloc>"u"&&(Q.yylloc={});var re=Q.yylloc;c.push(re);var cr=Q.options&&Q.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function lr(ot){D.length=D.length-2*ot,G.length=G.length-ot,c.length=c.length-ot}f(lr,"popStack");function Be(){var ot;return ot=y.pop()||Q.lex()||Me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=C.symbols_[ot]||ot),ot}f(Be,"lex");for(var st,It,lt,ae,mt={},Wt,pt,Ye,Kt;;){if(It=D[D.length-1],this.defaultActions[It]?lt=this.defaultActions[It]:((st===null||typeof st>"u")&&(st=Be()),lt=kt[It]&&kt[It][st]),typeof lt>"u"||!lt.length||!lt[0]){var se="";Kt=[];for(Wt in kt[It])this.terminals_[Wt]&&Wt>nr&&Kt.push("'"+this.terminals_[Wt]+"'");Q.showPosition?se="Parse error on line "+(Vt+1)+`:
2
+ `+Q.showPosition()+`
3
+ Expecting `+Kt.join(", ")+", got '"+(this.terminals_[st]||st)+"'":se="Parse error on line "+(Vt+1)+": Unexpected "+(st==Me?"end of input":"'"+(this.terminals_[st]||st)+"'"),this.parseError(se,{text:Q.match,token:this.terminals_[st]||st,line:Q.yylineno,loc:re,expected:Kt})}if(lt[0]instanceof Array&&lt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+It+", token: "+st);switch(lt[0]){case 1:D.push(st),G.push(Q.yytext),c.push(Q.yylloc),D.push(lt[1]),st=null,Ce=Q.yyleng,p=Q.yytext,Vt=Q.yylineno,re=Q.yylloc;break;case 2:if(pt=this.productions_[lt[1]][1],mt.$=G[G.length-pt],mt._$={first_line:c[c.length-(pt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(pt||1)].first_column,last_column:c[c.length-1].last_column},cr&&(mt._$.range=[c[c.length-(pt||1)].range[0],c[c.length-1].range[1]]),ae=this.performAction.apply(mt,[p,Ce,Vt,yt.yy,lt[1],G,c].concat(or)),typeof ae<"u")return ae;pt&&(D=D.slice(0,-1*pt*2),G=G.slice(0,-1*pt),c=c.slice(0,-1*pt)),D.push(this.productions_[lt[1]][0]),G.push(mt.$),c.push(mt._$),Ye=kt[D[D.length-2]][D[D.length-1]],D.push(Ye);break;case 3:return!0}}return!0},"parse")},ir=(function(){var ft={EOF:1,parseError:f(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:f(function(w,C){return this.yy=C||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:f(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.match(/(?:\r\n?|\n).*/g);return C?(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:f(function(w){var C=w.length,D=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),D.length-1&&(this.yylineno-=D.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:D?(D.length===y.length?this.yylloc.first_column:0)+y[y.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(w){this.unput(this.match.slice(w))},"less"),pastInput:f(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:f(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:f(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+C+"^"},"showPosition"),test_match:f(function(w,C){var D,y,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))),y=w[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],D=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var c in G)this[c]=G[c];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,C,D,y;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),c=0;c<G.length;c++)if(D=this._input.match(this.rules[G[c]]),D&&(!C||D[0].length>C[0].length)){if(C=D,y=c,this.options.backtrack_lexer){if(w=this.test_match(D,G[c]),w!==!1)return w;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(w=this.test_match(C,G[y]),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:f(function(){var C=this.next();return C||this.lex()},"lex"),begin:f(function(C){this.conditionStack.push(C)},"begin"),popState:f(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:f(function(C){this.begin(C)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(C,D,y,G){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return D.yytext=D.yytext.trim(),73;case 12:return D.yytext=D.yytext.trim(),this.begin("ALIAS"),73;case 13:return D.yytext=D.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return D.yytext=D.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return D.yytext=D.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?: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,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return ft})();te.lexer=ir;function Yt(){this.yy={}}return f(Yt,"Parser"),Yt.prototype=te,te.Parser=Yt,new Yt})();ne.parser=ne;var mr=ne,Sr={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,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},Ar={FILLED:0,OPEN:1},wr={LEFTOF:0,RIGHTOF:1,OVER:2},qt={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},At,Nr=(At=class{constructor(){this.state=new hr(()=>({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=Ve,this.setAccDescription=Er,this.setDiagramTitle=ur,this.getAccTitle=fr,this.getAccDescription=_r,this.getDiagramTitle=gr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap($().wrap),this.LINETYPE=Sr,this.ARROWTYPE=Ar,this.PLACEMENT=wr}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,a,r,i,o){let s=this.state.records.currentBox,n;if(o!==void 0){let d;o.includes(`
7
+ `)?d=o+`
8
+ `:d=`{
9
+ `+o+`
10
+ }`,n=xr(d,{schema:yr})}i=n?.type??i,n?.alias&&(!r||r.text===a)&&(r={text:n.alias,wrap:r?.wrap,type:i});const h=this.state.records.actors.get(t);if(h){if(this.state.records.currentBox&&h.box&&this.state.records.currentBox!==h.box)throw new Error(`A same participant should only be defined in one Box: ${h.name} can't be in '${h.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=h.box?h.box:this.state.records.currentBox,h.box=s,h&&a===h.name&&r==null)return}if(r?.text==null&&(r={text:a,type:i}),(i==null||r.text==null)&&(r={text:a,type:i}),this.state.records.actors.set(t,{box:s,name:a,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const d=this.state.records.actors.get(this.state.records.prevActor);d&&(d.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let a,r=0;if(!t)return 0;for(a=0;a<this.state.records.messages.length;a++)this.state.records.messages[a].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[a].from===t&&r++,this.state.records.messages[a].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[a].from===t&&r--;return r}addMessage(t,a,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(t,a,r,i,o=!1,s){if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const h=new Error("Trying to inactivate an inactive participant ("+t+")");throw h.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},h}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:o,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const a=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(a===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:a}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:$().sequence?.wrap??!1}clear(){this.state.reset(),Ir()}parseMessage(t){const a=t.trim(),{wrap:r,cleanedText:i}=this.extractWrap(a),o={text:i,wrap:r};return it.debug(`parseMessage: ${JSON.stringify(o)}`),o}parseBoxData(t){const a=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=a?.[1]?a[1].trim():"transparent",i=a?.[2]?a[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const n=new Option().style;n.color=r,n.color!==r&&(r="transparent",i=t.trim())}const{wrap:o,cleanedText:s}=this.extractWrap(i);return{text:s?Ft(s,$()):void 0,color:r,wrap:o}}addNote(t,a,r){const i={actor:t,placement:a,message:r.text,wrap:r.wrap??this.autoWrap()},o=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:o[0],to:o[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:a})}addLinks(t,a){const r=this.getActor(t);try{let i=Ft(a.text,$());i=i.replace(/&equals;/g,"="),i=i.replace(/&amp;/g,"&");const o=JSON.parse(i);this.insertLinks(r,o)}catch(i){it.error("error while parsing actor link text",i)}}addALink(t,a){const r=this.getActor(t);try{const i={};let o=Ft(a.text,$());const s=o.indexOf("@");o=o.replace(/&equals;/g,"="),o=o.replace(/&amp;/g,"&");const n=o.slice(0,s-1).trim(),h=o.slice(s+1).trim();i[n]=h,this.insertLinks(r,i)}catch(i){it.error("error while parsing actor link text",i)}}insertLinks(t,a){if(t.links==null)t.links=a;else for(const r in a)t.links[r]=a[r]}addProperties(t,a){const r=this.getActor(t);try{const i=Ft(a.text,$()),o=JSON.parse(i);this.insertProperties(r,o)}catch(i){it.error("error while parsing actor properties text",i)}}insertProperties(t,a){if(t.properties==null)t.properties=a;else for(const r in a)t.properties[r]=a[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,a){const r=this.getActor(t),i=document.getElementById(a.text);try{const o=i.innerHTML,s=JSON.parse(o);s.properties&&this.insertProperties(r,s.properties),s.links&&this.insertLinks(r,s.links)}catch(o){it.error("error while parsing actor details text",o)}}getActorProperty(t,a){if(t?.properties!==void 0)return t.properties[a]}apply(t){if(Array.isArray(t))t.forEach(a=>{this.apply(a)});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"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":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,t.centralConnection);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":Ve(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 $().sequence}},f(At,"SequenceDB"),At),Pr=f(e=>{const t=e.dropShadow??"none",{look:a}=$();return`.actor {
11
+ stroke: ${e.actorBorder};
12
+ fill: ${e.actorBkg};
13
+ stroke-width: ${e.strokeWidth??1};
14
+ }
15
+
16
+ rect.actor.outer-path[data-look="neo"] {
17
+ filter: ${t};
18
+ }
19
+
20
+ rect.note[data-look="neo"] {
21
+ stroke:${e.noteBorderColor};
22
+ fill:${e.noteBkgColor};
23
+ filter: ${t};
24
+ }
25
+
26
+ text.actor > tspan {
27
+ fill: ${e.actorTextColor};
28
+ stroke: none;
29
+ }
30
+
31
+ .actor-line {
32
+ stroke: ${e.actorLineColor};
33
+ }
34
+
35
+ .innerArc {
36
+ stroke-width: 1.5;
37
+ stroke-dasharray: none;
38
+ }
39
+
40
+ .messageLine0 {
41
+ stroke-width: 1.5;
42
+ stroke-dasharray: none;
43
+ stroke: ${e.signalColor};
44
+ }
45
+
46
+ .messageLine1 {
47
+ stroke-width: 1.5;
48
+ stroke-dasharray: 2, 2;
49
+ stroke: ${e.signalColor};
50
+ }
51
+
52
+ [id$="-arrowhead"] path {
53
+ fill: ${e.signalColor};
54
+ stroke: ${e.signalColor};
55
+ }
56
+
57
+ .sequenceNumber {
58
+ fill: ${e.sequenceNumberColor};
59
+ }
60
+
61
+ [id$="-sequencenumber"] {
62
+ fill: ${e.signalColor};
63
+ }
64
+
65
+ [id$="-crosshead"] path {
66
+ fill: ${e.signalColor};
67
+ stroke: ${e.signalColor};
68
+ }
69
+
70
+ .messageText {
71
+ fill: ${e.signalTextColor};
72
+ stroke: none;
73
+ }
74
+
75
+ .labelBox {
76
+ stroke: ${e.labelBoxBorderColor};
77
+ fill: ${e.labelBoxBkgColor};
78
+ filter: ${a==="neo"?t:"none"};
79
+ }
80
+
81
+ .labelText, .labelText > tspan {
82
+ fill: ${e.labelTextColor};
83
+ stroke: none;
84
+ }
85
+
86
+ .loopText, .loopText > tspan {
87
+ fill: ${e.loopTextColor};
88
+ stroke: none;
89
+ }
90
+
91
+ .sectionTitle, .sectionTitle > tspan {
92
+ fill: ${e.loopTextColor};
93
+ stroke: none;
94
+ }
95
+
96
+ .loopLine {
97
+ stroke-width: 2px;
98
+ stroke-dasharray: 2, 2;
99
+ stroke: ${e.labelBoxBorderColor};
100
+ fill: ${e.labelBoxBorderColor};
101
+ }
102
+
103
+ .note {
104
+ //stroke: #decc93;
105
+ stroke: ${e.noteBorderColor};
106
+ fill: ${e.noteBkgColor};
107
+ }
108
+
109
+ /*
110
+ * No font-weight here, deliberately. Note text renders inside tspan elements, and a weight emitted at
111
+ * tspan level outranks the inline style drawText puts on the parent text element from the
112
+ * sequence.noteFontWeight config key -- so that documented key would never reach the glyphs.
113
+ * The theme variable formerly emitted here is a different value from that config key, and
114
+ * git/styles.js reads it as its own bold-label weight under redux and neo, so it cannot be
115
+ * lowered there either.
116
+ */
117
+ .noteText, .noteText > tspan {
118
+ fill: ${e.noteTextColor};
119
+ stroke: none;
120
+ }
121
+
122
+ .activation0 {
123
+ fill: ${e.activationBkgColor};
124
+ stroke: ${e.activationBorderColor};
125
+ }
126
+
127
+ .activation1 {
128
+ fill: ${e.activationBkgColor};
129
+ stroke: ${e.activationBorderColor};
130
+ }
131
+
132
+ .activation2 {
133
+ fill: ${e.activationBkgColor};
134
+ stroke: ${e.activationBorderColor};
135
+ }
136
+
137
+ .actorPopupMenu {
138
+ position: absolute;
139
+ }
140
+
141
+ .actorPopupMenuPanel {
142
+ position: absolute;
143
+ fill: ${e.actorBkg};
144
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
145
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
146
+ }
147
+ .actor-man circle, line {
148
+ fill: ${e.actorBkg};
149
+ stroke-width: 2px;
150
+ }
151
+
152
+ g rect.rect {
153
+ filter: ${t};
154
+ stroke: ${e.nodeBorder};
155
+ }
156
+ `},"getStyles"),kr=Pr,Xt=44,Te=6,Ut=6,Dr=f((e,t)=>e.actorTextHeight??Z.calculateTextDimensions(e.description??"",{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}).height,"actorLabelHeight"),Ue=f(e=>Xt+Te+e+Ut,"actorStackHeight"),vr=f((e,t,a)=>{const r=e+t,i=r-Ut-a/2;return{lifelineStartY:r,glyphBottomY:r-Ut-a-Te,labelCenterY:i}},"headerBands"),Cr=f((e,t)=>{const a=e+Ut,r=a+Xt;return{glyphTopY:a,glyphBottomY:r,labelCenterY:r+Te+t/2,stackHeight:Ue(t)}},"footerBands"),Rt=36,Mr=-5,Ge=60,We=Ge-Mr,Ct=f((e,t,a,r)=>{if(t.look!=="neo")return null;const i=Dr(e,t);return a?Cr(r,i):vr(r,e.height,i)},"neoBands"),_t="actor-top",gt="actor-bottom",Jt="actor-box",Ot="actor-man",Et=new Set(["redux-color","redux-dark-color"]),J=f((e,t)=>e?.length?e[t%e.length]:void 0,"paletteColor"),Dt=f(function(e,t){const a=br(e,t);return zt().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Br=f(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const o=t.links,s=t.actorCnt,n=t.rectData;var h="none";i&&(h="block !important");const d=e.append("g");d.attr("id","actor"+s+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",h);var E="";n.class!==void 0&&(E=" "+n.class);let u=n.width>a?n.width:a;const _=d.append("rect");if(_.attr("class","actorPopupMenuPanel"+E),_.attr("x",n.x),_.attr("y",n.height),_.attr("fill",n.fill),_.attr("stroke",n.stroke),_.attr("width",u),_.attr("height",n.height),_.attr("rx",n.rx),_.attr("ry",n.ry),o!=null){var L=20;for(let T in o){var g=d.append("a"),R=Fe.sanitizeUrl(o[T]);g.attr("xlink:href",R),g.attr("target","_blank"),na(r)(T,g,n.x+10,n.height+L,u,20,{class:"actor"},r),L+=30}}return _.attr("height",L),{height:n.height+L,width:u}},"drawPopup"),Zt=f(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Gt=f(async function(e,t,a=null){let r=e.append("foreignObject");const i=await ze(t.text,zt()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){const n=e.node().firstChild;n.setAttribute("height",s.height+2*t.textMargin);const h=n.getBBox();r.attr("x",Math.round(h.x+h.width/2-s.width/2)).attr("y",Math.round(h.y+h.height/2-s.height/2))}else if(a){let{startx:n,stopx:h,starty:d}=a;if(n>h){const E=n;n=h,h=E}r.attr("x",Math.round(n+Math.abs(n-h)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(d)):r.attr("y",Math.round(d-s.height))}return[r]},"drawKatex"),wt=f(function(e,t){let a=0,r=0;const i=t.text.split(N.lineBreakRegex),[o,s]=qe(t.fontSize);let n=[],h=0,d=f(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":d=f(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":d=f(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":d=f(()=>Math.round(t.y+(a+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[E,u]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&o!==void 0&&(h=E*o);const _=e.append("text");_.attr("x",t.x),_.attr("y",d()),t.anchor!==void 0&&_.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&_.style("font-family",t.fontFamily),s!==void 0&&_.style("font-size",s),t.fontWeight!==void 0&&_.style("font-weight",t.fontWeight),t.fill!==void 0&&_.attr("fill",t.fill),t.class!==void 0&&_.attr("class",t.class),t.dy!==void 0?_.attr("dy",t.dy):h!==0&&_.attr("dy",h);const L=u||Rr;if(t.tspan){const g=_.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(L)}else _.text(L);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(_._groups||_)[0][0].getBBox().height,a=r),n.push(_)}return n},"drawText"),Xe=f(function(e,t){function a(i,o,s,n,h){return i+","+o+" "+(i+s)+","+o+" "+(i+s)+","+(o+n-h)+" "+(i+s-h*1.2)+","+(o+n)+" "+i+","+(o+n)}f(a,"genPoints");const r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,wt(e,t),r},"drawLabel"),Y=-1,Je=f((e,t,a,r)=>{e.select&&a.forEach(i=>{const o=t.get(i),s=e.select("#actor"+o.actorCnt);!r.mirrorActors&&o.stopy?s.attr("y2",o.stopy+o.height/2):r.mirrorActors&&s.attr("y2",o.stopy)})},"fixLifeLineHeights"),Yr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:L}=u,g=e.append("g").lower();var R=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",h).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=g.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),d==="neo"&&R.attr("data-look","neo"));const T=Tt();var O="actor";t.properties?.class?O=t.properties.class:T.fill="#eaeaea",r?O+=` ${gt}`:O+=` ${_t}`,T.x=t.x,T.y=s,T.width=t.width,T.height=t.height,T.class=O,T.rx=3,T.ry=3,T.name=t.name,d==="neo"&&(T.rx=6,T.ry=6);const x=Dt(R,T),m=o.get(t.name)??0;if(Et.has(E)&&(x.style("stroke",J(L,m)),x.style("fill",J(_,m))),d==="neo"&&x.attr("filter",`url(#${xt(i)})`),t.rectData=T,t.properties?.icon){const b=t.properties.icon.trim();b.charAt(0)==="@"?he(R,T.x+T.width-20,T.y+10,b.substr(1)):de(R,T.x+T.width-20,T.y+10,b)}r||(R.attr("data-et","participant"),R.attr("data-type","participant"),R.attr("data-id",t.name)),ut(a,j(t.description))(t.description,R,T.x,T.y,T.width,T.height,{class:`actor ${Jt}`},a);let S=t.height;if(x.node){const b=x.node().getBBox();a.look!=="neo"&&(t.height=b.height,S=b.height)}return S},"drawActorTypeParticipant"),Vr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:L}=u,g=e.append("g").lower();var R=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",h).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=g.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),d==="neo"&&R.attr("data-look","neo"));const T=Tt();var O="actor";t.properties?.class?O=t.properties.class:T.fill="#eaeaea",r?O+=` ${gt}`:O+=` ${_t}`,T.x=t.x,T.y=s,T.width=t.width,T.height=t.height,T.class=O,T.name=t.name;const x=6;a.look==="neo"&&(T.height=t.height-x);const m={...T,x:T.x+-x,y:T.y+ +x,class:"actor"},S=Dt(R,T),b=Dt(R,m);t.rectData=T,d==="neo"&&R.attr("filter",`url(#${xt(i)})`);const P=o.get(t.name)??0;if(Et.has(E)&&(S.style("stroke",J(L,P)),S.style("fill",J(_,P)),b.style("stroke",J(L,P)),b.style("fill",J(_,P))),t.properties?.icon){const B=t.properties.icon.trim();B.charAt(0)==="@"?he(R,T.x+T.width-20,T.y+10,B.substr(1)):de(R,T.x+T.width-20,T.y+10,B)}ut(a,j(t.description))(t.description,R,T.x-x,T.y+x,T.width,T.height,{class:`actor ${Jt}`},a);let k=t.height;if(S.node){const B=S.node().getBBox();a.look!=="neo"&&(t.height=B.height,k=B.height)}return r||(R.attr("data-et","participant"),R.attr("data-type","collections"),R.attr("data-id",t.name)),k},"drawActorTypeCollections"),Wr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:L}=u,g=e.append("g").lower();let R=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",h).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=g.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),d==="neo"&&R.attr("data-look","neo"));const T=Tt();let O="actor";t.properties?.class?O=t.properties.class:T.fill="#eaeaea",r?O+=` ${gt}`:O+=` ${_t}`,R.attr("class",O),T.x=t.x,T.y=s,T.width=t.width,T.height=t.height,T.name=t.name;const x=T.height/2,m=x/(2.5+T.height/50),S=R.append("g"),b=R.append("g"),P=`M ${T.x},${T.y+x}
157
+ a ${m},${x} 0 0 0 0,${T.height}
158
+ h ${T.width-2*m}
159
+ a ${m},${x} 0 0 0 0,-${T.height}
160
+ Z
161
+ `;S.append("path").attr("d",P),b.append("path").attr("d",`M ${T.x},${T.y+x}
162
+ a ${m},${x} 0 0 0 0,${T.height}`),S.attr("transform",`translate(${m}, ${-(T.height/2)})`),b.attr("transform",`translate(${T.width-m}, ${-T.height/2})`),t.rectData=T,d==="neo"&&S.attr("filter",`url(#${xt(i)})`);const k=o.get(t.name)??0;if(Et.has(E)&&(S.style("stroke",J(L,k)),S.style("fill",J(_,k)),b.style("stroke",J(L,k)),b.style("fill",J(_,k))),t.properties?.icon){const K=t.properties.icon.trim(),z=T.x+T.width-20,X=T.y+10;K.charAt(0)==="@"?he(R,z,X,K.substr(1)):de(R,z,X,K)}ut(a,j(t.description))(t.description,R,T.x,T.y,T.width,T.height,{class:`actor ${Jt}`},a);let B=t.height;const V=S.select("path:last-child");if(V.node()){const K=V.node().getBBox();a.look!=="neo"&&(t.height=K.height,B=K.height)}return r||(R.attr("data-et","participant"),R.attr("data-type","queue"),R.attr("data-id",t.name)),B},"drawActorTypeQueue"),Kr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+75,{look:E,theme:u,themeVariables:_}=a,{bkgColorArray:L,borderColorArray:g,actorBorder:R,actorBkg:T}=_,O=e.append("g").lower();r||(Y++,O.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);const x=e.append("g");let m=Ot;r?m+=` ${gt}`:m+=` ${_t}`,x.attr("class",m),x.attr("name",t.name);const S=Tt();S.x=t.x,S.y=s,S.fill="#eaeaea",S.width=t.width,S.height=t.height,S.class="actor";const b=t.x+t.width/2,P=h?h.glyphBottomY-22:s+32,k=22;x.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),x.append("circle").attr("cx",b).attr("cy",P).attr("r",k).attr("filter",`${E==="neo"?`url(#${xt(i)})`:""}`),x.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${b}, ${P-k})`);const B=o.get(t.name)??0;if(Et.has(u)?(x.style("stroke",J(g,B)),x.style("fill",J(L,B))):(x.style("stroke",R),x.style("fill",T)),!h){const V=x.node().getBBox();t.height=V.height+2*(a?.sequence?.labelBoxHeight??0)}return ut(a,j(t.description))(t.description,x,S.x,h?h.labelCenterY-S.height/2:S.y+k+(r?5:12),S.width,S.height,{class:`actor ${Ot}`},a),r||(x.attr("data-et","participant"),x.attr("data-type","control"),x.attr("data-id",t.name)),t.height},"drawActorTypeControl"),Hr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+75,{look:E,theme:u,themeVariables:_}=a,{bkgColorArray:L,borderColorArray:g}=_,R=e.append("g").lower(),T=e.append("g");let O="actor";r?O+=` ${gt}`:O+=` ${_t}`,T.attr("class",O),T.attr("name",t.name);const x=Tt();x.x=t.x,x.y=s,x.fill="#eaeaea",x.width=t.width,x.height=t.height,x.class="actor";const m=t.x+t.width/2,S=h?h.glyphBottomY-22:s+(r?10:25),b=22;T.append("circle").attr("cx",m).attr("cy",S).attr("r",b).attr("width",t.width).attr("height",t.height),T.append("line").attr("x1",m-b).attr("x2",m+b).attr("y1",S+b).attr("y2",S+b).attr("stroke-width",2),E==="neo"&&T.attr("filter",`url(#${xt(i)})`);const P=o.get(t.name)??0;if(Et.has(u)&&(T.style("stroke",J(g,P)),T.style("fill",J(L,P))),!h){const k=T.node().getBBox();t.height=k.height+(a?.sequence?.labelBoxHeight??0)}return r||(Y++,R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y),ut(a,j(t.description))(t.description,T,x.x,h?h.labelCenterY-x.height/2:x.y+(r?15:30),x.width,x.height,{class:`actor ${Ot}`},a),h||T.attr("transform",`translate(0, ${r?b:b/2-5})`),r||(T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Fr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+t.height+2*a.boxTextMargin,{theme:E,themeVariables:u,look:_}=a,{bkgColorArray:L,borderColorArray:g,actorBorder:R}=u,T=e.append("g").lower();let O=T;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&O.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),O.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),O=T.append("g"),t.actorCnt=Y,t.links!=null&&O.attr("id","root-"+Y),_==="neo"&&O.attr("data-look","neo"));const x=Tt();let m="actor";t.properties?.class?m=t.properties.class:x.fill="#eaeaea",r?m+=` ${gt}`:m+=` ${_t}`,x.x=t.x,x.y=s,x.width=t.width,x.height=t.height,x.class=m,x.name=t.name,x.x=t.x,x.y=s;const S=x.width/3,b=S/2,P=b/(2.5+S/50),k=h?Xt:x.width/3,B=h?h.glyphBottomY-k-P:x.y,V=O.append("g");V.attr("class",m);const K=`
163
+ M ${x.x},${B+P}
164
+ a ${b},${P} 0 0 0 ${S},0
165
+ a ${b},${P} 0 0 0 -${S},0
166
+ l 0,${k-2*P}
167
+ a ${b},${P} 0 0 0 ${S},0
168
+ l 0,-${k-2*P}
169
+ `;V.append("path").attr("d",K),_==="neo"&&V.attr("filter",`url(#${xt(i)})`);const z=o.get(t.name)??0;if(Et.has(E)?(V.style("stroke",J(g,z)),V.style("fill",J(L,z))):V.style("stroke",R),V.attr("transform",`translate(${S}, ${P})`),t.rectData=x,ut(a,j(t.description))(t.description,O,x.x,h?h.labelCenterY-x.height/2:x.y+35,x.width,x.height,{class:`actor ${Jt}`},a),!h){const X=V.select("path:last-child");if(X.node()){const tt=X.node().getBBox();t.height=tt.height+(a.sequence.labelBoxHeight??0)}}return r||(O.attr("data-et","participant"),O.attr("data-type","database"),O.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),qr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+80,E=22,u=h?h.glyphBottomY-E:s+12,_=e.append("g").lower(),{look:L,theme:g,themeVariables:R}=a,{bkgColorArray:T,borderColorArray:O,actorBorder:x}=R;r||(Y++,_.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);const m=e.append("g");let S=Ot;r?S+=` ${gt}`:S+=` ${_t}`,m.attr("class",S),m.attr("name",t.name);const b=Tt();b.x=t.x,b.y=s,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor",m.append("line").attr("id","actor-man-torso"+Y).attr("x1",t.x+t.width/2-E*2.5).attr("y1",u).attr("x2",t.x+t.width/2-15).attr("y2",u),m.append("line").attr("id","actor-man-arms"+Y).attr("x1",t.x+t.width/2-E*2.5).attr("y1",u-10).attr("x2",t.x+t.width/2-E*2.5).attr("y2",u+10),m.append("circle").attr("cx",t.x+t.width/2).attr("cy",u).attr("r",E),L==="neo"&&m.attr("filter",`url(#${xt(i)})`);const P=o.get(t.name)??0;if(Et.has(g)?(m.style("stroke",J(O,P)),m.style("fill",J(T,P))):m.style("stroke",x),!h){const k=m.node().getBBox();t.height=k.height+(a.sequence.labelBoxHeight??0)}return ut(a,j(t.description))(t.description,m,b.x,h?h.labelCenterY-b.height/2:b.y+15,b.width,b.height,{class:`actor ${Ot}`},a),h||m.attr("transform",`translate(0,${E/2+10})`),r||(m.attr("data-et","participant"),m.attr("data-type","boundary"),m.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),zr=f(function(e,t,a,r,i){const o=r?t.stopy:t.starty,s=t.x+t.width/2,n=Ct(t,a,r,o),h=n?n.lifelineStartY:o+80,{theme:d,themeVariables:E}=a,{bkgColorArray:u,borderColorArray:_,actorBorder:L}=E,g=e.append("g").lower();r||(Y++,g.append("line").attr("id","actor"+Y).attr("x1",s).attr("y1",h).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);const R=e.append("g");let T=Ot;r?T+=` ${gt}`:T+=` ${_t}`,R.attr("class",T),R.attr("name",t.name),r||R.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);const O=n?Xt/We:1,x=f(k=>n?n.glyphBottomY-(Ge-k)*O:o+k,"gy"),m=f(k=>s+k*O,"gx");R.append("line").attr("id","actor-man-torso"+Y).attr("x1",s).attr("y1",x(25)).attr("x2",s).attr("y2",x(45)),R.append("line").attr("id","actor-man-arms"+Y).attr("x1",m(-Rt/2)).attr("y1",x(33)).attr("x2",m(Rt/2)).attr("y2",x(33)),R.append("line").attr("x1",m(-Rt/2)).attr("y1",x(60)).attr("x2",s).attr("y2",x(45)),R.append("line").attr("x1",s).attr("y1",x(45)).attr("x2",m(Rt/2-2)).attr("y2",x(60));const S=R.append("circle");S.attr("cx",t.x+t.width/2),S.attr("cy",x(10)),S.attr("r",15*O),S.attr("width",t.width),S.attr("height",t.height),n||(t.height=We);const b=Tt();b.x=t.x,b.y=o,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor",b.rx=3,b.ry=3;const P=i.get(t.name)??0;return Et.has(d)?(R.style("stroke",J(_,P)),R.style("fill",J(u,P))):R.style("stroke",L),ut(a,j(t.description))(t.description,R,b.x,n?n.labelCenterY-b.height/2:o+35,b.width,b.height,{class:`actor ${Ot}`},a),t.height},"drawActorTypeActor"),Ur=f(async function(e,t,a,r,i,o,s){const n=s??new Map([...o.db.getActors().values()].map((h,d)=>[h.name,d]));switch(t.type){case"actor":return await zr(e,t,a,r,n);case"participant":return await Yr(e,t,a,r,i,n);case"boundary":return await qr(e,t,a,r,i,n);case"control":return await Kr(e,t,a,r,i,n);case"entity":return await Hr(e,t,a,r,i,n);case"database":return await Fr(e,t,a,r,i,n);case"collections":return await Vr(e,t,a,r,i,n);case"queue":return await Wr(e,t,a,r,i,n)}},"drawActor"),Gr=f(function(e,t,a){const i=e.append("g");Ze(i,t),t.name&&ut(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Xr=f(function(e){return e.append("g")},"anchorElement"),Jr=f(function(e,t,a,r,i,o,s){const{theme:n,themeVariables:h}=r,{bkgColorArray:d,borderColorArray:E,mainBkg:u}=h,_=Tt(),L=t.anchored,g=t.actor;_.x=t.startx,_.y=t.starty,_.class="activation"+i%3,_.width=t.stopx-t.startx,_.height=a-t.starty;const R=Dt(L,_),O=(s??new Map([...o.db.getActors().values()].map((x,m)=>[x.name,m]))).get(g)??0;Et.has(n)&&(R.style("stroke",J(E,O)),R.style("fill",J(d,O)??u))},"drawActivation"),Zr=f(async function(e,t,a,r,i){const{boxMargin:o,boxTextMargin:s,labelBoxHeight:n,labelBoxWidth:h,messageFontFamily:d,messageFontSize:E,messageFontWeight:u}=r,_=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),L=f(function(T,O,x,m){return _.append("line").attr("x1",T).attr("y1",O).attr("x2",x).attr("y2",m).attr("class","loopLine")},"drawLoopLine");L(t.startx,t.starty,t.stopx,t.starty),L(t.stopx,t.starty,t.stopx,t.stopy),L(t.startx,t.stopy,t.stopx,t.stopy),L(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(T){L(t.startx,T.y,t.stopx,T.y).style("stroke-dasharray","3, 3")});let g=le();g.text=a,g.x=t.startx,g.y=t.starty,g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(h??0,50),g.height=n+(r.look==="neo"?15:0)||20,g.textMargin=s,g.class="labelText",Xe(_,g),g=Qe(),g.text=t.title,g.x=t.startx+h/2+(t.stopx-t.startx)/2,g.y=t.starty+o+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.wrap=!0;let R=j(g.text)?await Gt(_,g,t):wt(_,g);if(t.sectionTitles!==void 0){for(const[T,O]of Object.entries(t.sectionTitles))if(O.message){g.text=O.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[T].y+o+s,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.wrap=t.wrap,j(g.text)?(t.starty=t.sections[T].y,await Gt(_,g,t)):wt(_,g);let x=Math.round(R.map(m=>(m._groups||m)[0][0].getBBox().height).reduce((m,S)=>m+S));t.sections[T].height+=x-(o+s)}}return t.height=Math.round(t.stopy-t.starty),_},"drawLoop"),Ze=f(function(e,t){Lr(e,t)},"drawBackgroundRect"),Qr=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),$r=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),jr=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),ta=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),ea=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),ra=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),aa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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=f(e=>e?`${e}-drop-shadow`:"drop-shadow","dropShadowId"),sa=f(function(e,t,a){const{theme:r}=t;e.append("defs").append("filter").attr("id",xt(a)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),Qe=f(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"),ia=f(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ut=(function(){function e(o,s,n,h,d,E,u){const _=s.append("text").attr("x",n+d/2).attr("y",h+E/2+5).style("text-anchor","middle").text(o);i(_,u)}f(e,"byText");function t(o,s,n,h,d,E,u,_){const{actorFontSize:L,actorFontFamily:g,actorFontWeight:R}=_,[T,O]=qe(L),x=o.split(N.lineBreakRegex);for(let m=0;m<x.length;m++){const S=m*T-T*(x.length-1)/2,b=s.append("text").attr("x",n+d/2).attr("y",h).style("text-anchor","middle").style("font-size",O).style("font-weight",R).style("font-family",g);b.append("tspan").attr("x",n+d/2).attr("dy",S).text(x[m]),b.attr("y",h+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(b,u)}}f(t,"byTspan");function a(o,s,n,h,d,E,u,_){const L=s.append("switch"),R=L.append("foreignObject").attr("x",n).attr("y",h).attr("width",d).attr("height",E).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");R.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(o),t(o,L,n,h,d,E,u,_),i(R,u)}f(a,"byFo");async function r(o,s,n,h,d,E,u,_){const L=await vt(o,zt()),g=s.append("switch"),T=g.append("foreignObject").attr("x",n+d/2-L.width/2).attr("y",h+E/2-L.height/2).attr("width",L.width).attr("height",L.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await ze(o,zt())),t(o,g,n,h,d,E,u,_),i(T,u)}f(r,"byKatex");function i(o,s){for(const n in s)s.hasOwnProperty(n)&&o.attr(n,s[n])}return f(i,"_setTextAttrs"),function(o,s=!1){return s?r:o.textPlacement==="fo"?a:o.textPlacement==="old"?e:t}})(),na=(function(){function e(i,o,s,n,h,d,E){const u=o.append("text").attr("x",s).attr("y",n).style("text-anchor","start").text(i);r(u,E)}f(e,"byText");function t(i,o,s,n,h,d,E,u){const{actorFontSize:_,actorFontFamily:L,actorFontWeight:g}=u,R=i.split(N.lineBreakRegex);for(let T=0;T<R.length;T++){const O=T*_-_*(R.length-1)/2,x=o.append("text").attr("x",s).attr("y",n).style("text-anchor","start").style("font-size",_).style("font-weight",g).style("font-family",L);x.append("tspan").attr("x",s).attr("dy",O).text(R[T]),x.attr("y",n+d/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(x,E)}}f(t,"byTspan");function a(i,o,s,n,h,d,E,u){const _=o.append("switch"),g=_.append("foreignObject").attr("x",s).attr("y",n).attr("width",h).attr("height",d).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,s,n,h,d,E,u),r(g,E)}f(a,"byFo");function r(i,o){for(const s in o)o.hasOwnProperty(s)&&i.attr(s,o[s])}return f(r,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),oa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),ca=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),la=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),ha=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),q={drawRect:Dt,drawText:wt,drawLabel:Xe,drawActor:Ur,drawBox:Gr,drawPopup:Br,anchorElement:Xr,drawActivation:Jr,drawLoop:Zr,drawBackgroundRect:Ze,insertArrowHead:ta,insertArrowFilledHead:ea,insertSequenceNumber:ra,insertArrowCrossHead:aa,insertDatabaseIcon:Qr,insertComputerIcon:$r,insertClockIcon:jr,getTextObj:Qe,getNoteRect:ia,fixLifeLineHeights:Je,sanitizeUrl:Fe.sanitizeUrl,insertDropShadow:sa,insertSolidTopArrowHead:oa,insertSolidBottomArrowHead:ca,insertStickTopArrowHead:la,insertStickBottomArrowHead:ha},l={},I={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:f(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:f(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:f(function(e){this.boxes.push(e)},"addBox"),addActor:f(function(e){this.actors.push(e)},"addActor"),addLoop:f(function(e){this.loops.push(e)},"addLoop"),addMessage:f(function(e){this.messages.push(e)},"addMessage"),addNote:f(function(e){this.notes.push(e)},"addNote"),lastActor:f(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:f(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:f(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:f(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:f(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,tr($())},"init"),updateVal:f(function(e,t,a,r){e[t]===void 0?e[t]=a:e[t]=r(a,e[t])},"updateVal"),updateBounds:f(function(e,t,a,r){const i=this;let o=0;function s(n){return f(function(d){o++;const E=i.sequenceItems.length-o+1;i.updateVal(d,"starty",t-E*l.boxMargin,Math.min),i.updateVal(d,"stopy",r+E*l.boxMargin,Math.max),i.updateVal(I.data,"startx",e-E*l.boxMargin,Math.min),i.updateVal(I.data,"stopx",a+E*l.boxMargin,Math.max),n!=="activation"&&(i.updateVal(d,"startx",e-E*l.boxMargin,Math.min),i.updateVal(d,"stopx",a+E*l.boxMargin,Math.max),i.updateVal(I.data,"starty",t-E*l.boxMargin,Math.min),i.updateVal(I.data,"stopy",r+E*l.boxMargin,Math.max))},"updateItemBounds")}f(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:f(function(e,t,a,r){const i=N.getMin(e,a),o=N.getMax(e,a),s=N.getMin(t,r),n=N.getMax(t,r);this.updateVal(I.data,"startx",i,Math.min),this.updateVal(I.data,"starty",s,Math.min),this.updateVal(I.data,"stopx",o,Math.max),this.updateVal(I.data,"stopy",n,Math.max),this.updateBounds(i,s,o,n)},"insert"),newActivation:f(function(e,t,a){const r=a.get(e.from),i=Qt(e.from).length||0,o=r.x+r.width/2+(i-1)*l.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+l.activationWidth,stopy:void 0,actor:e.from,anchored:q.anchorElement(t)})},"newActivation"),endActivation:f(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:f(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:f(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:f(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:f(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:f(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:I.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:f(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:f(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:f(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=N.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:f(function(){return this.verticalPos},"getVerticalPos"),getBounds:f(function(){return{bounds:this.data,models:this.models}},"getBounds")},da=f(async function(e,t,a){I.bumpVerticalPos(l.boxMargin),t.height=l.boxMargin,t.starty=I.getVerticalPos();const r=Tt();r.x=t.startx,r.y=t.starty,r.width=t.width||l.width,r.class="note";const i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const o=q.drawRect(i,r),s=le();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=l.noteFontFamily,s.fontSize=l.noteFontSize,s.fontWeight=l.noteFontWeight,s.anchor=l.noteAlign,s.textMargin=l.noteMargin,s.valign="center";const n=j(s.text)?await Gt(i,s):wt(i,s),h=Math.round(n.map(d=>(d._groups||d)[0][0].getBBox().height).reduce((d,E)=>d+E));o.attr("height",h+2*l.noteMargin),t.height+=h+2*l.noteMargin,I.bumpVerticalPos(h+2*l.noteMargin),t.stopy=t.starty+h+2*l.noteMargin,t.stopx=t.startx+r.width,I.insert(t.startx,t.starty,t.stopx,t.stopy),I.models.addNote(t)},"drawNote"),Ke=f(function(e,t,a,r,i,o,s){const n=r.db.getActors(),h=n.get(t.from),d=n.get(t.to),E=a.sequenceVisible;let u=h.x+h.width/2,_=d.x+d.width/2;const L=u<=_,g=sr(t,r),R=e.append("g"),T=16.5,O=f((P,k)=>{const B=P?T:-T;return k?-B:B},"getCircleOffset"),x=f(P=>{R.append("circle").attr("cx",P).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:m,CENTRAL_CONNECTION_REVERSE:S,CENTRAL_CONNECTION_DUAL:b}=r.db.LINETYPE;if(E)switch(t.centralConnection){case m:g&&(_+=O(L,!0));break;case S:g||(u+=O(L,!1));break;case b:g?_+=O(L,!0):u+=O(L,!1);break}switch(t.centralConnection){case m:x(_);break;case S:x(u);break;case b:x(u),x(_);break}},"drawCentralConnection"),Lt=f(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),St=f(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),oe=f(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function $e(e,t){I.bumpVerticalPos(10);const{startx:a,stopx:r,message:i}=t,o=N.splitBreaks(i).length,s=j(i),n=s?await vt(i,$()):Z.calculateTextDimensions(i,Lt(l));if(!s){const u=n.height/o;t.height+=u,I.bumpVerticalPos(u)}let h,d=n.height-10;const E=n.width;if(a===r){h=I.getVerticalPos()+d,l.rightAngles||(d+=l.boxMargin,h=I.getVerticalPos()+d),d+=30;const u=N.getMax(E/2,l.width/2);I.insert(a-u,I.getVerticalPos()-10+d,r+u,I.getVerticalPos()+30+d)}else d+=l.boxMargin,h=I.getVerticalPos()+d,I.insert(a,h-10,r,h);return I.bumpVerticalPos(d),t.height+=d,t.stopy=t.starty+t.height,I.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),h}f($e,"boundMessage");var Ta=f(async function(e,t,a,r,i,o){const{startx:s,stopx:n,starty:h,message:d,type:E,sequenceIndex:u,sequenceVisible:_}=t,L=Z.calculateTextDimensions(d,Lt(l)),g=le();g.x=Math.min(s,n),g.y=h+10,g.width=Math.abs(n-s),g.class="messageText",g.dy="1em",g.text=d,g.fontFamily=l.messageFontFamily,g.fontSize=l.messageFontSize,g.fontWeight=l.messageFontWeight,g.anchor=l.messageAlign,g.valign="center",g.textMargin=l.wrapPadding,g.tspan=!1,j(g.text)?await Gt(e,g,{startx:s,stopx:n,starty:a}):wt(e,g);const R=L.width;let T;if(s===n){const x=_||l.showSequenceNumbers,m=sr(i,r),S=xa(i,r),b=s+(x&&(m||S)?10:0);l.rightAngles?T=e.append("path").attr("d",`M ${b},${a} H ${s+N.getMax(l.width/2,R/2)} V ${a+25} H ${s}`):T=e.append("path").attr("d","M "+b+","+a+" C "+(b+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)),ie(i,r)&&Ke(e,i,t,r,s,n,a)}else T=e.append("line"),T.attr("x1",s),T.attr("y1",a),T.attr("x2",n),T.attr("y2",a),ie(i,r)&&Ke(e,i,t,r,s,n,a);E===r.db.LINETYPE.DOTTED||E===r.db.LINETYPE.DOTTED_CROSS||E===r.db.LINETYPE.DOTTED_POINT||E===r.db.LINETYPE.DOTTED_OPEN||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||E===r.db.LINETYPE.SOLID_TOP_DOTTED||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||E===r.db.LINETYPE.STICK_TOP_DOTTED||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(T.style("stroke-dasharray","3, 3"),T.attr("class","messageLine1")):T.attr("class","messageLine0"),T.attr("data-et","message"),T.attr("data-id","i"+t.id),T.attr("data-from",t.from),T.attr("data-to",t.to);let O="";if(l.arrowMarkerAbsolute&&(O=Or(!0)),T.attr("stroke-width",2),T.attr("stroke","none"),T.style("fill","none"),(E===r.db.LINETYPE.SOLID_TOP||E===r.db.LINETYPE.SOLID_TOP_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-solidTopArrowHead)"),(E===r.db.LINETYPE.SOLID_BOTTOM||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.STICK_TOP||E===r.db.LINETYPE.STICK_TOP_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-stickTopArrowHead)"),(E===r.db.LINETYPE.STICK_BOTTOM||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-solidTopArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-stickTopArrowHead)"),(E===r.db.LINETYPE.SOLID||E===r.db.LINETYPE.DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-arrowhead)"),(E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(T.attr("marker-start","url("+O+"#"+o+"-arrowhead)"),T.attr("marker-end","url("+O+"#"+o+"-arrowhead)")),(E===r.db.LINETYPE.SOLID_POINT||E===r.db.LINETYPE.DOTTED_POINT)&&T.attr("marker-end","url("+O+"#"+o+"-filled-head)"),(E===r.db.LINETYPE.SOLID_CROSS||E===r.db.LINETYPE.DOTTED_CROSS)&&T.attr("marker-end","url("+O+"#"+o+"-crosshead)"),_||l.showSequenceNumbers){const x=E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,m=E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,S=6,b=ie(i,r);let P=s,k=n;x?(s<n?P=s+S*2:(P=s-S+(b?-5:0),P+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),T.attr("x1",P)):m?(n>s?k=n-2*S:(k=n-S,P+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),k+=b?15:0,T.attr("x2",k),T.attr("x1",P)):T.attr("x1",s+S);let B=0;const V=s===n,K=s<=n;V?B=t.fromBounds+1:m?B=K?t.toBounds-1:t.fromBounds+1:B=K?t.fromBounds+1:t.toBounds-1;let z="12px";const X=u.toString().length;X>5?z="7px":X>3&&(z="9px"),e.append("line").attr("x1",B).attr("y1",a).attr("x2",B).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+O+"#"+o+"-sequencenumber)"),e.append("text").attr("x",B).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",z).attr("text-anchor","middle").attr("class","sequenceNumber").text(u)}},"drawMessage"),pa=f(function(e,t,a,r,i,o,s){let n=0,h=0,d,E=0;for(const u of r){const _=t.get(u),L=_.box;d&&d!=L&&(s||I.models.addBox(d),h+=l.boxMargin+d.margin),L&&L!=d&&(s||(L.x=n+h,L.y=i),h+=L.margin),_.width=N.getMax(_.width||l.width,l.width),_.height=N.getMax(_.height||l.height,l.height),_.margin=_.margin||l.actorMargin,E=N.getMax(E,_.height),a.get(_.name)&&(h+=_.width/2),_.x=n+h,_.starty=I.getVerticalPos(),I.insert(_.x,i,_.x+_.width,_.height),n+=_.width+h,_.box&&(_.box.width=n+L.margin-_.box.x),h=_.margin,d=_.box,I.models.addActor(_)}d&&!s&&I.models.addBox(d),I.bumpVerticalPos(E)},"addActorRenderingData"),ce=f(async function(e,t,a,r,i,o,s){if(r){let n=0;I.bumpVerticalPos(l.boxMargin*2);for(const h of a){const d=t.get(h);d.stopy||(d.stopy=I.getVerticalPos());const E=await q.drawActor(e,d,l,!0,i,o,s);n=N.getMax(n,E)}I.bumpVerticalPos(n+l.boxMargin)}else for(const n of a){const h=t.get(n);await q.drawActor(e,h,l,!1,i,o,s)}},"drawActors"),je=f(function(e,t,a,r){let i=0,o=0;for(const s of a){const n=t.get(s),h=ua(n),d=q.drawPopup(e,n,h,l,l.forceMenus,r);d.height>i&&(i=d.height),d.width+n.x>o&&(o=d.width+n.x)}return{maxHeight:i,maxWidth:o}},"drawActorsPopup"),tr=f(function(e){pr(l,e),e.fontFamily&&(l.actorFontFamily=l.noteFontFamily=l.messageFontFamily=e.fontFamily),e.fontSize&&(l.actorFontSize=l.noteFontSize=l.messageFontSize=e.fontSize),e.fontWeight&&(l.actorFontWeight=l.noteFontWeight=l.messageFontWeight=e.fontWeight)},"setConf"),Qt=f(function(e){return I.activations.filter(function(t){return t.actor===e})},"actorActivations"),He=f(function(e,t){const a=t.get(e),r=Qt(e),i=r.reduce(function(s,n){return N.getMin(s,n.startx)},a.x+a.width/2-1),o=r.reduce(function(s,n){return N.getMax(s,n.stopx)},a.x+a.width/2+1);return[i,o]},"activationBounds");function dt(e,t,a,r,i){I.bumpVerticalPos(a);let o=r;if(t.id&&t.message&&e[t.id]){const s=e[t.id].width,n=Lt(l);t.message=Z.wrapLabel(`[${t.message}]`,s-2*l.wrapPadding,n),t.width=s,t.wrap=!0;const h=Z.calculateTextDimensions(t.message,n),d=N.getMax(h.height,l.labelBoxHeight);o=r+d,it.debug(`${d} - ${t.message}`)}i(t),I.bumpVerticalPos(o)}f(dt,"adjustLoopHeightForWrap");function er(e,t,a,r,i,o,s){function n(E,u){E.x<i.get(e.from).x?(I.insert(t.stopx-u,t.starty,t.startx,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx+u):(I.insert(t.startx,t.starty,t.stopx+u,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx-u)}f(n,"receiverAdjustment");function h(E,u){E.x<i.get(e.to).x?(I.insert(t.startx-u,t.starty,t.stopx,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx+u):(I.insert(t.stopx,t.starty,t.startx+u,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx-u)}f(h,"senderAdjustment");const d=[qt.ACTOR,qt.CONTROL,qt.ENTITY,qt.DATABASE];if(o.get(e.to)==r){const E=i.get(e.to),u=d.includes(E.type)?Rt/2+3:E.width/2+3;n(E,u),E.starty=a-E.height/2,I.bumpVerticalPos(E.height/2)}else if(s.get(e.from)==r){const E=i.get(e.from);if(l.mirrorActors){const u=d.includes(E.type)?Rt/2:E.width/2;h(E,u)}E.stopy=a-E.height/2,I.bumpVerticalPos(E.height/2)}else if(s.get(e.to)==r){const E=i.get(e.to);if(l.mirrorActors){const u=d.includes(E.type)?Rt/2+3:E.width/2+3;n(E,u)}E.stopy=a-E.height/2,I.bumpVerticalPos(E.height/2)}}f(er,"adjustCreatedDestroyedData");var Ea=f(async function(e,t,a,r){const{securityLevel:i,sequence:o,look:s,themeVariables:n}=$();l=o;let h;i==="sandbox"&&(h=Ht("#i"+t));const d=i==="sandbox"?Ht(h.nodes()[0].contentDocument.body):Ht("body"),E=i==="sandbox"?h.nodes()[0].contentDocument:document;I.init(),it.debug(r.db);const u=i==="sandbox"?d.select(`[id="${t}"]`):Ht(`[id="${t}"]`),_=r.db.getActors(),L=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),R=r.db.getBoxes();let T=r.db.getActorKeys();const O=r.db.getMessages(),x=r.db.getDiagramTitle(),m=r.db.hasAtLeastOneBox(),S=r.db.hasAtLeastOneBoxWithTitle(),b=await rr(_,O,r);if(l.height=await ar(_,b,R),q.insertComputerIcon(u,t),q.insertDatabaseIcon(u,t),q.insertClockIcon(u,t),m&&(I.bumpVerticalPos(l.boxMargin),S&&I.bumpVerticalPos(R[0].textMaxHeight)),l.hideUnusedParticipants===!0){const A=new Set;O.forEach(v=>{A.add(v.from),A.add(v.to)}),T=T.filter(v=>A.has(v))}const P=new Map(T.map((A,v)=>[_.get(A)?.name??A,v]));pa(u,_,L,T,0,O,!1);const k=await Ia(O,_,b,r);q.insertArrowHead(u,t),q.insertArrowCrossHead(u,t),q.insertArrowFilledHead(u,t),q.insertSequenceNumber(u,t),q.insertSolidTopArrowHead(u,t),q.insertSolidBottomArrowHead(u,t),q.insertStickTopArrowHead(u,t),q.insertStickBottomArrowHead(u,t),s==="neo"&&q.insertDropShadow(u,l,t);function B(A,v){const ht=I.endActivation(A);ht.starty+18>v&&(ht.starty=v-6,v+=12),q.drawActivation(u,ht,v,l,Qt(A.from).length,r,P),I.insert(ht.startx,v-10,ht.stopx,v)}f(B,"activeEnd");let V=1,K=1;const z=[],X=[];let tt=0;for(const A of O){let v,ht,at;switch(A.type){case r.db.LINETYPE.NOTE:I.resetVerticalPos(),ht=A.noteModel,await da(u,ht,A.id);break;case r.db.LINETYPE.ACTIVE_START:I.newActivation(A,u,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION:I.newActivation(A,u,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:I.newActivation(A,u,_);break;case r.db.LINETYPE.ACTIVE_END:B(A,I.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:dt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.LOOP_END:v=I.endLoop(),await q.drawLoop(u,v,"loop",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.RECT_START:dt(k,A,l.boxMargin,l.boxMargin,H=>{let bt=H.message;bt||(bt=n?.rectBkgColor||n?.actorBkg||"rgba(128, 128, 128, 0.5)"),I.newLoop(void 0,bt)});break;case r.db.LINETYPE.RECT_END:v=I.endLoop(),X.push(v),I.models.addLoop(v),I.bumpVerticalPos(v.stopy-I.getVerticalPos());break;case r.db.LINETYPE.OPT_START:dt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.OPT_END:v=I.endLoop(),await q.drawLoop(u,v,"opt",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.ALT_START:dt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.ALT_ELSE:dt(k,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.ALT_END:v=I.endLoop(),await q.drawLoop(u,v,"alt",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:dt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H)),I.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:dt(k,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.PAR_END:v=I.endLoop(),await q.drawLoop(u,v,"par",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.AUTONUMBER:V=A.message.start||V,K=A.message.step||K,A.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:dt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.CRITICAL_OPTION:dt(k,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.CRITICAL_END:v=I.endLoop(),await q.drawLoop(u,v,"critical",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.BREAK_START:dt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.BREAK_END:v=I.endLoop(),await q.drawLoop(u,v,"break",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;default:try{at=A.msgModel,at.starty=I.getVerticalPos(),at.sequenceIndex=V,at.sequenceVisible=r.db.showSequenceNumbers(),at.id=A.id,at.from=A.from,at.to=A.to;const H=await $e(u,at);er(A,at,H,tt,_,L,g),z.push({messageModel:at,lineStartY:H,msg:A}),I.models.addMessage(at)}catch(H){it.error("error while drawing message",H)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(A.type)&&(V=Math.round((V+K)*100)/100),tt++}it.debug("createdActors",L),it.debug("destroyedActors",g),await ce(u,_,T,!1,t,r,P);for(const A of z)await Ta(u,A.messageModel,A.lineStartY,r,A.msg,t);l.mirrorActors&&await ce(u,_,T,!0,t,r,P),X.forEach(A=>q.drawBackgroundRect(u,A)),Je(u,_,T,l);for(const A of I.models.boxes){A.height=I.getVerticalPos()-A.y,I.insert(A.x,A.y,A.x+A.width,A.height);const v=l.boxMargin*2;A.startx=A.x-v,A.starty=A.y-v*.25,A.stopx=A.startx+A.width+2*v,A.stopy=A.starty+A.height+v*.75,A.stroke="rgb(0,0,0, 0.5)",q.drawBox(u,A,l)}m&&I.bumpVerticalPos(l.boxMargin);const et=je(u,_,T,E),{bounds:U}=I.getBounds();U.startx===void 0&&(U.startx=0),U.starty===void 0&&(U.starty=0),U.stopx===void 0&&(U.stopx=0),U.stopy===void 0&&(U.stopy=0);let nt=U.stopy-U.starty;nt<et.maxHeight&&(nt=et.maxHeight);let rt=nt+2*l.diagramMarginY;l.mirrorActors&&(rt=rt-l.boxMargin+l.bottomMarginAdj);let W=U.stopx-U.startx;W<et.maxWidth&&(W=et.maxWidth);const M=W+2*l.diagramMarginX;x&&u.append("text").text(x).attr("x",(U.stopx-U.startx)/2-2*l.diagramMarginX).attr("y",-25),Tr(u,rt,M,l.useMaxWidth);const Nt=x?40:0,Mt=_.size&&s==="neo"?30:0;u.attr("viewBox",U.startx-l.diagramMarginX+" -"+(l.diagramMarginY+Nt)+" "+M+" "+(rt+Nt+Mt)),it.debug("models:",I.models)},"draw");async function rr(e,t,a){const r={};for(const i of t)if(e.get(i.to)&&e.get(i.from)){const o=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!o.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!o.nextActor)continue;const s=i.placement!==void 0,n=!s,h=s?St(l):Lt(l),d=i.wrap?Z.wrapLabel(i.message,l.width-2*l.wrapPadding,h):i.message,u=(j(d)?await vt(i.message,$()):Z.calculateTextDimensions(d,h)).width+2*l.wrapPadding;n&&i.from===o.nextActor?r[i.to]=N.getMax(r[i.to]||0,u):n&&i.from===o.prevActor?r[i.from]=N.getMax(r[i.from]||0,u):n&&i.from===i.to?(r[i.from]=N.getMax(r[i.from]||0,u/2),r[i.to]=N.getMax(r[i.to]||0,u/2)):i.placement===a.db.PLACEMENT.RIGHTOF?r[i.from]=N.getMax(r[i.from]||0,u):i.placement===a.db.PLACEMENT.LEFTOF?r[o.prevActor]=N.getMax(r[o.prevActor]||0,u):i.placement===a.db.PLACEMENT.OVER&&(o.prevActor&&(r[o.prevActor]=N.getMax(r[o.prevActor]||0,u/2)),o.nextActor&&(r[i.from]=N.getMax(r[i.from]||0,u/2)))}return it.debug("maxMessageWidthPerActor:",r),r}f(rr,"getMaxMessageWidthPerActor");var ua=f(function(e){let t=0;const a=oe(l);for(const r in e.links){const o=Z.calculateTextDimensions(r,a).width+2*l.wrapPadding+2*l.boxMargin;t<o&&(t=o)}return t},"getRequiredPopupWidth");async function ar(e,t,a){let r=0;for(const o of e.keys()){const s=e.get(o);s.wrap&&(s.description=Z.wrapLabel(s.description,l.width-2*l.wrapPadding,oe(l)));const n=j(s.description)?await vt(s.description,$()):Z.calculateTextDimensions(s.description,oe(l));s.width=s.wrap?l.width:N.getMax(l.width,n.width+2*l.wrapPadding),$().look==="neo"?(s.actorTextHeight=n.height,s.height=N.getMax(Ue(n.height),l.height)):s.height=s.wrap?N.getMax(n.height,l.height):l.height,r=N.getMax(r,s.height)}for(const o in t){const s=e.get(o);if(!s)continue;const n=e.get(s.nextActor);if(!n){const u=t[o]+l.actorMargin-s.width/2;s.margin=N.getMax(u,l.actorMargin);continue}const d=t[o]+l.actorMargin-s.width/2-n.width/2;s.margin=N.getMax(d,l.actorMargin)}let i=0;return a.forEach(o=>{const s=Lt(l);let n=o.actorKeys.reduce((u,_)=>u+=e.get(_).width+(e.get(_).margin||0),0);const h=l.boxMargin*8;n+=h,n-=2*l.boxTextMargin,o.wrap&&(o.name=Z.wrapLabel(o.name,n-2*l.wrapPadding,s));const d=Z.calculateTextDimensions(o.name,s);i=N.getMax(d.height,i);const E=N.getMax(n,d.width+2*l.wrapPadding);if(o.margin=l.boxTextMargin,n<E){const u=(E-n)/2;o.margin+=u}}),a.forEach(o=>o.textMaxHeight=i),N.getMax(r,l.height)}f(ar,"calculateActorMargins");var fa=f(async function(e,t,a){const r=t.get(e.from),i=t.get(e.to),o=r.x,s=i.x,n=e.wrap&&e.message;let h=j(e.message)?await vt(e.message,$()):Z.calculateTextDimensions(n?Z.wrapLabel(e.message,l.width,St(l)):e.message,St(l));const d={width:n?l.width:N.getMax(l.width,h.width+2*l.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(d.width=n?N.getMax(l.width,h.width):N.getMax(r.width/2+i.width/2,h.width+2*l.noteMargin),d.startx=o+(r.width+l.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(d.width=n?N.getMax(l.width,h.width+2*l.noteMargin):N.getMax(r.width/2+i.width/2,h.width+2*l.noteMargin),d.startx=o-d.width+(r.width-l.actorMargin)/2):e.to===e.from?(h=Z.calculateTextDimensions(n?Z.wrapLabel(e.message,N.getMax(l.width,r.width),St(l)):e.message,St(l)),d.width=n?N.getMax(l.width,r.width):N.getMax(r.width,l.width,h.width+2*l.noteMargin),d.startx=o+(r.width-d.width)/2):(d.width=Math.abs(o+r.width/2-(s+i.width/2))+l.actorMargin,d.startx=o<s?o+r.width/2-l.actorMargin/2:s+i.width/2-l.actorMargin/2),n&&(d.message=Z.wrapLabel(e.message,d.width-2*l.wrapPadding,St(l))),it.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${e.message}]`),d},"buildNoteModel"),_a=4,ie=f(function(e,t){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,r,i].includes(e.centralConnection)},"hasCentralConnection"),ga=f(function(e,t,a){const{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:o,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE;let n=0;return(e.centralConnection===r||e.centralConnection===i)&&(n+=_a),(e.centralConnection===r||e.centralConnection===i)&&(e.type===o||e.type===s)&&(n+=a?0:-6),n},"calculateCentralConnectionOffset"),sr=f(function(e,t){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:o,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:n,STICK_ARROW_BOTTOM_REVERSE:h,STICK_ARROW_BOTTOM_REVERSE_DOTTED:d}=t.db.LINETYPE;return[a,r,i,o,s,n,h,d].includes(e.type)},"isReverseArrowType"),xa=f(function(e,t){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[a,r].includes(e.type)},"isBidirectionalArrowType"),ya=f(function(e,t,a){const{look:r}=$();if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,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(e.type))return{};const[i,o]=He(e.from,t),[s,n]=He(e.to,t),h=i<=s;let d=h?o:i,E=h?s:n;r==="neo"&&(e.type!==a.db.LINETYPE.SOLID_OPEN&&(E+=h?-3:3),(e.type===a.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(d+=h?3:-3)),d+=ga(e,a,h);const u=Math.abs(s-n)>2,_=f(T=>h?-T:T,"adjustValue");e.from===e.to?E=d:(e.activate&&!u&&(E+=_(l.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(E+=_(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(d-=_(3)));const L=[i,o,s,n],g=Math.abs(d-E);e.wrap&&e.message&&(e.message=Z.wrapLabel(e.message,N.getMax(g+2*l.wrapPadding,l.width),Lt(l)));const R=Z.calculateTextDimensions(e.message,Lt(l));return{width:N.getMax(e.wrap?0:R.width+2*l.wrapPadding,g+2*l.wrapPadding,l.width),height:0,startx:d,stopx:E,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,L),toBounds:Math.max.apply(null,L)}},"buildMessageModel"),Ia=f(async function(e,t,a,r){const i={},o=[];let s,n,h;for(const d of e){switch(d.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:d.message&&(s=o.pop(),i[s.id]=s,i[d.id]=s,o.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=o.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const u=t.get(d.from?d.from:d.to.actor),_=Qt(d.from?d.from:d.to.actor).length,L=u.x+u.width/2+(_-1)*l.activationWidth/2,g={startx:L,stopx:L+l.activationWidth,actor:d.from,enabled:!0};I.activations.push(g)}break;case r.db.LINETYPE.ACTIVE_END:{const u=I.activations.map(_=>_.actor).lastIndexOf(d.from);I.activations.splice(u,1).splice(0,1)}break}d.placement!==void 0?(n=await fa(d,t,r),d.noteModel=n,o.forEach(u=>{s=u,s.from=N.getMin(s.from,n.startx),s.to=N.getMax(s.to,n.startx+n.width),s.width=N.getMax(s.width,Math.abs(s.from-s.to))-l.labelBoxWidth})):(h=ya(d,t,r),d.msgModel=h,h.startx&&h.stopx&&o.length>0&&o.forEach(u=>{if(s=u,h.startx===h.stopx){const _=t.get(d.from),L=t.get(d.to);s.from=N.getMin(_.x-h.width/2,_.x-_.width/2,s.from),s.to=N.getMax(L.x+h.width/2,L.x+_.width/2,s.to),s.width=N.getMax(s.width,Math.abs(s.to-s.from))-l.labelBoxWidth}else s.from=N.getMin(h.startx,s.from),s.to=N.getMax(h.stopx,s.to),s.width=N.getMax(s.width,h.width)-l.labelBoxWidth}))}return I.activations=[],it.debug("Loop type widths:",i),i},"calculateLoopBounds"),Ra={bounds:I,drawActors:ce,drawActorsPopup:je,setConf:tr,draw:Ea},Aa={parser:mr,get db(){return new Nr},renderer:Ra,styles:kr,init:f(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,dr({sequence:{wrap:e.wrap}}))},"init")};export{Aa as diagram};
@@ -0,0 +1 @@
1
+ import{_ as o}from"./index-D-PvDSJs.js";import"./vendor-editor-core-BG7M-EQ-.js";import"./vendor-editor-languages-pDmyn-oC.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes};