@marimo-team/frontend 0.13.7-dev41 → 0.13.7-dev5

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 (283) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-D9o6hCFF.js +22 -0
  2. package/dist/assets/VegaLite-COeaO8XU.js +11 -0
  3. package/dist/assets/_baseEach-Dipk4Qfw.js +1 -0
  4. package/dist/assets/_baseMap-d7_s2dxj.js +1 -0
  5. package/dist/assets/_baseUniq-CWPdB_dq.js +1 -0
  6. package/dist/assets/_createAggregator-CiiGic_e.js +1 -0
  7. package/dist/assets/{any-language-editor-yR7V6EtK.js → any-language-editor-Dvmn1QF2.js} +1 -3
  8. package/dist/assets/apl-CXdQSnD-.js +1 -1
  9. package/dist/assets/arc-Cuwikxov.js +1 -1
  10. package/dist/assets/architectureDiagram-IEHRJDOE-CU0QICJs.js +1 -0
  11. package/dist/assets/asciiarmor-D5V0T9Cu.js +1 -1
  12. package/dist/assets/asn1-DWPaVWf6.js +1 -1
  13. package/dist/assets/asterisk-B46aRdXb.js +1 -1
  14. package/dist/assets/blockDiagram-JOT3LUYC-CatesY43.js +1 -0
  15. package/dist/assets/brainfuck-CtZaYBKt.js +1 -1
  16. package/dist/assets/c4Diagram-VJAJSXHY-C4mhf3Aa.js +1 -0
  17. package/dist/assets/channel-DqVPz42W.js +1 -0
  18. package/dist/assets/chunk-4BMEZGHF-BIy5YQYp.js +1 -0
  19. package/dist/assets/chunk-A2AXSNBT-C_xpJ-hN.js +1 -0
  20. package/dist/assets/chunk-AEK57VVT-k8f1agAG.js +1 -0
  21. package/dist/assets/chunk-D6G4REZN--WuDmds7.js +1 -0
  22. package/dist/assets/chunk-RZ5BOZE2-B3GqrIXs.js +1 -0
  23. package/dist/assets/chunk-XZIHB7SX-Cwjiz9xg.js +1 -0
  24. package/dist/assets/{circle-play-xrzeLSOm.js → circle-play-B3IPtL97.js} +2 -1
  25. package/dist/assets/classDiagram-GIVACNV2-CDT_8kPv.js +1 -0
  26. package/dist/assets/classDiagram-v2-COTLJTTW-CDT_8kPv.js +1 -0
  27. package/dist/assets/clike-BgBwzOhw.js +1 -1
  28. package/dist/assets/clojure-DR_hEDJv.js +1 -1
  29. package/dist/assets/clone-Cei_W01Q.js +1 -0
  30. package/dist/assets/cmake-DXn5xaP-.js +1 -1
  31. package/dist/assets/cobol-stawOqaz.js +1 -1
  32. package/dist/assets/coffeescript-BTDxI-eT.js +1 -1
  33. package/dist/assets/colors-bszWmPJw.js +1 -1
  34. package/dist/assets/commonlisp-vq6DHwts.js +1 -1
  35. package/dist/assets/compile-BVb0Xhkk.js +1 -0
  36. package/dist/assets/crystal-CRzZ78HM.js +1 -1
  37. package/dist/assets/css-ZjFoif2m.js +1 -1
  38. package/dist/assets/cypher-gJDei3ni.js +1 -1
  39. package/dist/assets/cytoscape.esm-bH-fs5wT.js +9 -0
  40. package/dist/assets/d-BShv7fp-.js +1 -1
  41. package/dist/assets/dagre-OKDRZEBW-DE3xoxsa.js +1 -0
  42. package/dist/assets/data-editor-B622NT6D.js +1 -0
  43. package/dist/assets/diagram-SSKATNLV-DRGoOkB7.js +1 -0
  44. package/dist/assets/diagram-VNBRO52H-j3UmS0Ll.js +1 -0
  45. package/dist/assets/diff-UJJ5BM9S.js +1 -1
  46. package/dist/assets/dockerfile-knGOOxt4.js +1 -1
  47. package/dist/assets/dtd-DI9Herc-.js +1 -1
  48. package/dist/assets/dylan-CHJ5qNM_.js +1 -1
  49. package/dist/assets/ebnf-B-Df8AvO.js +1 -1
  50. package/dist/assets/ecl-DPFc0Uaf.js +1 -1
  51. package/dist/assets/edit-page-DBO2lLpw.js +8 -0
  52. package/dist/assets/eiffel-DR5c0IrL.js +1 -1
  53. package/dist/assets/elm-D7xaZ7Da.js +1 -1
  54. package/dist/assets/erDiagram-Q7BY3M3F-DWHoCgAJ.js +1 -0
  55. package/dist/assets/erlang-BuqgqA5h.js +1 -1
  56. package/dist/assets/fcl-CVaBTCzQ.js +1 -1
  57. package/dist/assets/flowDiagram-4HSFHLVR-D_rCoypN.js +1 -0
  58. package/dist/assets/forth-Dri_5nFc.js +1 -1
  59. package/dist/assets/fortran-DL7KluxX.js +1 -1
  60. package/dist/assets/ganttDiagram-APWFNJXF-CHIT-PcJ.js +1 -0
  61. package/dist/assets/gas-5kEe4nk0.js +1 -1
  62. package/dist/assets/gherkin-B6X1vGSW.js +1 -1
  63. package/dist/assets/gitGraphDiagram-7IBYFJ6S-ErZPaKoV.js +1 -0
  64. package/dist/assets/graph-UJGOb4iX.js +1 -0
  65. package/dist/assets/groovy-DnIzCrpZ.js +1 -1
  66. package/dist/assets/haskell-CmdsSjFB.js +1 -1
  67. package/dist/assets/haxe-D25e-2l-.js +1 -1
  68. package/dist/assets/home-page-CS3aipva.js +7 -0
  69. package/dist/assets/http-BKJkqRj4.js +1 -1
  70. package/dist/assets/idl-pcmmZuaN.js +1 -1
  71. package/dist/assets/index-57xNO1if.js +1 -0
  72. package/dist/assets/index-6zO4OfLS.js +1 -0
  73. package/dist/assets/index-BBlc_oCU.js +1 -0
  74. package/dist/assets/index-BFUZwCtx.js +1 -0
  75. package/dist/assets/index-BHXWEyd0.js +1 -0
  76. package/dist/assets/index-BKq2imIU.js +1 -0
  77. package/dist/assets/index-BTHBullW.js +87 -0
  78. package/dist/assets/index-BW8Zm1Wv.js +1 -0
  79. package/dist/assets/index-Bl3VaYjI.js +1 -0
  80. package/dist/assets/index-Br-JkW3g.js +1 -0
  81. package/dist/assets/index-C546D0ll.js +1 -0
  82. package/dist/assets/index-CDSif2Eo.js +1 -0
  83. package/dist/assets/index-CnoBeGie.js +1 -0
  84. package/dist/assets/index-CvPoYLZ2.js +1 -0
  85. package/dist/assets/index-De2hEZfe.js +1 -0
  86. package/dist/assets/index-KBPV2vq8.css +1 -0
  87. package/dist/assets/index-KXLr4M13.js +1 -0
  88. package/dist/assets/index-Z1O8-oVl.js +1 -0
  89. package/dist/assets/index-_0tY9ze_.js +1 -0
  90. package/dist/assets/index-qlq3rtTI.js +1 -0
  91. package/dist/assets/infoDiagram-PH2N3AL5-k9F5eQpB.js +1 -0
  92. package/dist/assets/init-DLRA0X12.js +1 -1
  93. package/dist/assets/javascript-D48wDJXV.js +1 -1
  94. package/dist/assets/jinja2-DhgKlfW7.js +1 -1
  95. package/dist/assets/journeyDiagram-U35MCT3I-DiK9Dw9g.js +1 -0
  96. package/dist/assets/julia-DjdwvFuI.js +1 -1
  97. package/dist/assets/kanban-definition-NDS4AKOZ-CjYNE8xn.js +1 -0
  98. package/dist/assets/katex-Blph-pX_.js +1 -0
  99. package/dist/assets/layout-BjbDeGc_.js +1 -0
  100. package/dist/assets/linear-O-YCKOSR.js +1 -0
  101. package/dist/assets/livescript-HO6ttBFx.js +1 -1
  102. package/dist/assets/lua-8DXOpKDz.js +1 -1
  103. package/dist/assets/mathematica-IIbmv7SK.js +1 -1
  104. package/dist/assets/mbox-DoeuZPxA.js +1 -0
  105. package/dist/assets/mermaid-DNVHAxFt.js +7 -0
  106. package/dist/assets/mhchem-9pkdwevO.js +1 -0
  107. package/dist/assets/min-W2JRkwEB.js +1 -0
  108. package/dist/assets/mindmap-definition-ALO5MXBD-Ds099Ktp.js +1 -0
  109. package/dist/assets/mirc-DkvFAiy5.js +1 -1
  110. package/dist/assets/mllike-3c2dg9RT.js +1 -1
  111. package/dist/assets/modelica-DSrSSXCg.js +1 -1
  112. package/dist/assets/mscgen-B2igx18G.js +1 -1
  113. package/dist/assets/mumps-zvxmGV4l.js +1 -1
  114. package/dist/assets/nginx-B4hAVlXN.js +1 -1
  115. package/dist/assets/ntriples-FFvkTduk.js +1 -1
  116. package/dist/assets/octave-C4hdQ5Hf.js +1 -1
  117. package/dist/assets/ordinal-DDUp3AbE.js +1 -1
  118. package/dist/assets/oz-qQq7irPq.js +1 -1
  119. package/dist/assets/pascal-CafrKXZF.js +1 -1
  120. package/dist/assets/perl-tdMlh9QA.js +1 -1
  121. package/dist/assets/pieDiagram-IB7DONF6--fIB0xWO.js +1 -0
  122. package/dist/assets/pig-CwGJVRC4.js +1 -1
  123. package/dist/assets/powershell-D1ly3AHC.js +1 -1
  124. package/dist/assets/properties-_nPj978X.js +1 -1
  125. package/dist/assets/protobuf-B4y9do6W.js +1 -1
  126. package/dist/assets/pug-_kJOm_E2.js +1 -1
  127. package/dist/assets/puppet-Bc-yJKzi.js +1 -1
  128. package/dist/assets/python-DD-Q2bae.js +1 -1
  129. package/dist/assets/q-B0kTJ4cI.js +1 -1
  130. package/dist/assets/quadrantDiagram-7GDLP6J5-DrySMa8i.js +1 -0
  131. package/dist/assets/r-BA4EbLKE.js +1 -1
  132. package/dist/assets/radar-MK3ICKWK-BJ67P_5r.js +1 -0
  133. package/dist/assets/range-CtcPcB_L.js +1 -1
  134. package/dist/assets/react-plotly-DI7dGePo.js +71 -0
  135. package/dist/assets/requirementDiagram-KVF5MWMF-CrGS2s0Z.js +1 -0
  136. package/dist/assets/rpm-DI_rRufH.js +1 -1
  137. package/dist/assets/ruby-CR-u2WLS.js +1 -1
  138. package/dist/assets/run-page-Q-WbWUmv.js +1 -0
  139. package/dist/assets/sankeyDiagram-QLVOVGJD-DKjckX4b.js +1 -0
  140. package/dist/assets/sas-Bqaci40L.js +1 -1
  141. package/dist/assets/save-worker-CQvBUha3.js +1 -0
  142. package/dist/assets/scheme-qjP0V5Ag.js +1 -1
  143. package/dist/assets/sequenceDiagram-X6HHIX6F-C6VC8LOY.js +1 -0
  144. package/dist/assets/shell-BLav31RL.js +1 -1
  145. package/dist/assets/sieve-r025o_jW.js +1 -1
  146. package/dist/assets/simple-mode-C3vEBAcb.js +1 -1
  147. package/dist/assets/slides-component-BqWYp_FB.js +1 -0
  148. package/dist/assets/smalltalk-C7J3IyEP.js +1 -1
  149. package/dist/assets/solr-78MBEUkU.js +1 -1
  150. package/dist/assets/sortBy-MHvTYKSP.js +1 -0
  151. package/dist/assets/sparql-BRLJFz69.js +1 -1
  152. package/dist/assets/spreadsheet-CGlWr0eM.js +1 -1
  153. package/dist/assets/sql-B3SPsWL6.js +1 -1
  154. package/dist/assets/stateDiagram-DGXRK772-CTMc5Gvb.js +1 -0
  155. package/dist/assets/stateDiagram-v2-YXO3MK2T-DnNajpIH.js +1 -0
  156. package/dist/assets/step-BwsUM5iJ.js +1 -1
  157. package/dist/assets/stylus-OdhglgkO.js +1 -1
  158. package/dist/assets/swift-B_XXVlXX.js +1 -1
  159. package/dist/assets/tcl-B2fODqDH.js +1 -1
  160. package/dist/assets/terminal-DVzybcfs.css +1 -0
  161. package/dist/assets/terminal-mbvW7Xk5.js +1 -0
  162. package/dist/assets/textile-BuVhTOzU.js +1 -1
  163. package/dist/assets/tiddlywiki-BgR6AEZu.js +1 -1
  164. package/dist/assets/tiki-CI-ztowC.js +1 -1
  165. package/dist/assets/time-B69UfemB.js +1 -0
  166. package/dist/assets/timeline-definition-BDJGKUSR-DxC35mOc.js +1 -0
  167. package/dist/assets/timer-DFzT7np-.js +1 -1
  168. package/dist/assets/toml-BQXy8elZ.js +1 -1
  169. package/dist/assets/tracing-DDaw37xD.js +8 -0
  170. package/dist/assets/transform-DjHZbYKP.js +1 -0
  171. package/dist/assets/tree-DxEOaINK.js +8 -0
  172. package/dist/assets/troff-Ce85hlLp.js +1 -1
  173. package/dist/assets/ttcn-BxnYHtq8.js +1 -1
  174. package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -1
  175. package/dist/assets/turtle-BkSuIpt-.js +1 -1
  176. package/dist/assets/useMarimoWebSocket-xQ57O6MQ.js +15 -0
  177. package/dist/assets/vb-BHgjm0DN.js +1 -1
  178. package/dist/assets/vbscript-Dawdd5GZ.js +1 -1
  179. package/dist/assets/vega-component-Cw4CVdyb.js +1 -0
  180. package/dist/assets/velocity-BdD_26Jv.js +1 -1
  181. package/dist/assets/verilog-B4LBqg_1.js +1 -1
  182. package/dist/assets/vhdl-CWWH2SUo.js +1 -1
  183. package/dist/assets/web-vitals-rCWRSGQR.js +1 -0
  184. package/dist/assets/webidl-CGwyPRYs.js +1 -1
  185. package/dist/assets/worker-DMKWnagd.js +1 -0
  186. package/dist/assets/worker-DXe6aoib.js +1 -0
  187. package/dist/assets/xquery-CVDBqZPY.js +1 -1
  188. package/dist/assets/xychartDiagram-VJFVF3MP-DHps7gn-.js +1 -0
  189. package/dist/assets/yacas-I8QjZlxf.js +1 -1
  190. package/dist/assets/z80-D8p3gKXp.js +1 -1
  191. package/dist/assets/zoom-COrs4lFh.js +1 -1
  192. package/dist/index.html +2 -2
  193. package/package.json +4 -5
  194. package/dist/assets/ConnectedDataExplorerComponent-BhPE_DRp.js +0 -19
  195. package/dist/assets/VegaLite-CyF7WA9A.js +0 -189
  196. package/dist/assets/_baseEach-DETfZaAU.js +0 -1
  197. package/dist/assets/_baseMap-ugHDs6Hq.js +0 -1
  198. package/dist/assets/_baseUniq-pQZnr5-m.js +0 -1
  199. package/dist/assets/_createAggregator-D2JVUCzP.js +0 -1
  200. package/dist/assets/architectureDiagram-IEHRJDOE-BFZK5_HO.js +0 -36
  201. package/dist/assets/blockDiagram-JOT3LUYC-Dal53NdF.js +0 -121
  202. package/dist/assets/c4Diagram-VJAJSXHY-Dm5zpp7Y.js +0 -10
  203. package/dist/assets/channel-zxk2KM6z.js +0 -1
  204. package/dist/assets/chunk-4BMEZGHF-BgVXpkIs.js +0 -1
  205. package/dist/assets/chunk-A2AXSNBT-Bu7pxhZ6.js +0 -164
  206. package/dist/assets/chunk-AEK57VVT-sWR3KlR7.js +0 -220
  207. package/dist/assets/chunk-D6G4REZN-kDGSqohH.js +0 -1
  208. package/dist/assets/chunk-RZ5BOZE2-CjYbIVqz.js +0 -1
  209. package/dist/assets/chunk-XZIHB7SX-CTcQ5asc.js +0 -1
  210. package/dist/assets/classDiagram-GIVACNV2-DDww3UD6.js +0 -1
  211. package/dist/assets/classDiagram-v2-COTLJTTW-DDww3UD6.js +0 -1
  212. package/dist/assets/clone-etBi8mp_.js +0 -1
  213. package/dist/assets/compile-DmXlmCt2.js +0 -10
  214. package/dist/assets/cytoscape.esm-C5gjFiAL.js +0 -10
  215. package/dist/assets/dagre-OKDRZEBW-D8N4SX8H.js +0 -4
  216. package/dist/assets/data-editor-BWxs1G52.js +0 -142
  217. package/dist/assets/diagram-SSKATNLV-eAju0qHf.js +0 -43
  218. package/dist/assets/diagram-VNBRO52H-btycJI_U.js +0 -24
  219. package/dist/assets/edit-page-Bludu8gI.js +0 -134
  220. package/dist/assets/erDiagram-Q7BY3M3F-BzfnHeQg.js +0 -60
  221. package/dist/assets/flowDiagram-4HSFHLVR-x-oFzxqK.js +0 -161
  222. package/dist/assets/ganttDiagram-APWFNJXF-BR65Gz1x.js +0 -257
  223. package/dist/assets/gitGraphDiagram-7IBYFJ6S-yOQN1A6K.js +0 -65
  224. package/dist/assets/graph-B51_e674.js +0 -1
  225. package/dist/assets/home-page-MshwCq4r.js +0 -9
  226. package/dist/assets/index-B9hMl89Z.js +0 -1
  227. package/dist/assets/index-BCnVBPO4.js +0 -1
  228. package/dist/assets/index-BM48alvr.js +0 -476
  229. package/dist/assets/index-BPW1rICk.js +0 -1
  230. package/dist/assets/index-BeONax9n.js +0 -1
  231. package/dist/assets/index-BhVUmk5m.js +0 -1
  232. package/dist/assets/index-BnGPRK8x.js +0 -19
  233. package/dist/assets/index-BrPqEBof.js +0 -7
  234. package/dist/assets/index-C2lNcQoF.js +0 -1
  235. package/dist/assets/index-CBi_28jM.js +0 -1
  236. package/dist/assets/index-CFhk8AqC.js +0 -1
  237. package/dist/assets/index-CjKlGdmc.js +0 -1
  238. package/dist/assets/index-CmskT7Gu.js +0 -1
  239. package/dist/assets/index-CqMmw3fb.js +0 -1
  240. package/dist/assets/index-DTVxS1K3.js +0 -1
  241. package/dist/assets/index-Dcd7YSwn.js +0 -1
  242. package/dist/assets/index-Dk8I06Aa.js +0 -1
  243. package/dist/assets/index-DmxXRwxW.js +0 -1
  244. package/dist/assets/index-DredxwTT.css +0 -1
  245. package/dist/assets/index-u0Q-JHUU.js +0 -1
  246. package/dist/assets/infoDiagram-PH2N3AL5-CEfqMoVj.js +0 -2
  247. package/dist/assets/journeyDiagram-U35MCT3I-Bjjtb4F4.js +0 -138
  248. package/dist/assets/kanban-definition-NDS4AKOZ-BCv-QrbZ.js +0 -88
  249. package/dist/assets/katex-BsnJiHtx.js +0 -261
  250. package/dist/assets/layout-CT5QpgGS.js +0 -1
  251. package/dist/assets/linear-CtmUxlJf.js +0 -1
  252. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  253. package/dist/assets/mbox-z_N2Mo3d.js +0 -1
  254. package/dist/assets/mermaid-BW54LQfk.js +0 -152
  255. package/dist/assets/mhchem-C_nT2J_7.js +0 -1
  256. package/dist/assets/min-CAJMxOOO.js +0 -1
  257. package/dist/assets/mindmap-definition-ALO5MXBD-DhNyZuUR.js +0 -95
  258. package/dist/assets/pieDiagram-IB7DONF6-BA_UP_K7.js +0 -30
  259. package/dist/assets/quadrantDiagram-7GDLP6J5-HELlBL5r.js +0 -7
  260. package/dist/assets/radar-MK3ICKWK-eNU8yMhK.js +0 -126
  261. package/dist/assets/react-plotly-9ySyddMa.js +0 -4074
  262. package/dist/assets/requirementDiagram-KVF5MWMF-BSQgxb6e.js +0 -64
  263. package/dist/assets/run-page-CwLfxNqb.js +0 -1
  264. package/dist/assets/sankeyDiagram-QLVOVGJD-gum-aL5i.js +0 -10
  265. package/dist/assets/save-worker-D7xNPs7e.js +0 -1
  266. package/dist/assets/sequenceDiagram-X6HHIX6F-BUgrAHhz.js +0 -122
  267. package/dist/assets/slides-component-BqpIalqg.js +0 -1
  268. package/dist/assets/sortBy-CKjDc2Jv.js +0 -1
  269. package/dist/assets/stateDiagram-DGXRK772-_Z81qrxq.js +0 -1
  270. package/dist/assets/stateDiagram-v2-YXO3MK2T-Blg0s-zk.js +0 -1
  271. package/dist/assets/terminal-WqMRJt5Z.css +0 -1
  272. package/dist/assets/terminal-ZnOOCWe6.js +0 -9
  273. package/dist/assets/time-ByQUSCbd.js +0 -1
  274. package/dist/assets/timeline-definition-BDJGKUSR-wlIPtBDI.js +0 -61
  275. package/dist/assets/tracing-CoCXSx1o.js +0 -2
  276. package/dist/assets/transform-Cyp0GDF-.js +0 -1
  277. package/dist/assets/tree-BOJA365v.js +0 -17
  278. package/dist/assets/useMarimoWebSocket-aoTvFmah.js +0 -27
  279. package/dist/assets/vega-component-Ce7y0Ooq.js +0 -1
  280. package/dist/assets/web-vitals-Buym0gfC.js +0 -1
  281. package/dist/assets/worker-BWN2kUSa.js +0 -1
  282. package/dist/assets/worker-D-UG5-wL.js +0 -1
  283. package/dist/assets/xychartDiagram-VJFVF3MP-D_qA3UEB.js +0 -7
@@ -0,0 +1 @@
1
+ var t;import{a as e,b as a,g as s,d as r,c as i,e as n}from"./chunk-D6G4REZN--WuDmds7.js";import{I as o}from"./chunk-XZIHB7SX-Cwjiz9xg.js";import{_ as c,n as l,c as d,l as h,i as p,d as g,e as u,j as x,b as y,s as m,p as b,a as T,g as E,q as f,y as w,h as I,u as L,M as P,N as _,O as v,Z as N,P as A,F as k}from"./mermaid-DNVHAxFt.js";import{s as M}from"./transform-DjHZbYKP.js";import"./index-BTHBullW.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var O=function(){var t=c((function(t,e,a,s){for(a=a||{},s=t.length;s--;a[t[s]]=e);return a}),"o"),e=[1,2],a=[1,3],s=[1,4],r=[2,4],i=[1,9],n=[1,11],o=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],E=[1,31],f=[1,32],w=[1,33],I=[1,34],L=[1,35],P=[1,36],_=[1,37],v=[1,38],N=[1,39],A=[1,41],k=[1,42],M=[1,43],O=[1,44],S=[1,45],D=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],C=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],F=[68,69,70],W=[1,122],q={trace:c((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:c((function(t,e,a,s,r,i,n){var o=i.length-1;switch(r){case 3:return s.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:s.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:s.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:s.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:s.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),s.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),s.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:s.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:s.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:s.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:s.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=s.PLACEMENT.LEFTOF;break;case 64:this.$=s.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=s.LINETYPE.SOLID_OPEN;break;case 70:this.$=s.LINETYPE.DOTTED_OPEN;break;case 71:this.$=s.LINETYPE.SOLID;break;case 72:this.$=s.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=s.LINETYPE.DOTTED;break;case 74:this.$=s.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=s.LINETYPE.SOLID_CROSS;break;case 76:this.$=s.LINETYPE.DOTTED_CROSS;break;case 77:this.$=s.LINETYPE.SOLID_POINT;break;case 78:this.$=s.LINETYPE.DOTTED_POINT;break;case 79:this.$=s.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:s},{1:[3]},{3:5,4:e,5:a,6:s},{3:6,4:e,5:a,6:s},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},t(R,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:_,52:v,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:D},{22:55,70:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:D},{22:72,70:D},{22:73,70:D},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:D},{22:90,70:D},{22:91,70:D},{22:92,70:D},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(C,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(B,r,{7:99}),t(B,r,{7:100}),t(B,r,{7:101}),t(Y,r,{40:102,7:103}),t($,r,{42:104,7:105}),t($,r,{7:105,42:106}),t(V,r,{45:107,7:108}),t(B,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:D},t(F,[2,69]),t(F,[2,70]),t(F,[2,71]),t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),{22:118,70:D},{22:120,58:119,70:D},{70:[2,63]},{70:[2,64]},{56:121,81:W},{56:123,81:W},{56:124,81:W},{56:125,81:W},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:_,52:v,53:N},{5:[1,131]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,135]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,49:[1,136],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,137]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,48:[1,138],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,139]},{16:[1,140]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,47:[1,141],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(R,[2,52]),{22:145,70:D},{22:146,70:D},{56:147,81:W},{56:148,81:W},{56:149,81:W},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(R,[2,16]),t(C,[2,10]),{12:151,50:_,52:v,53:N},t(C,[2,12]),t(C,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:W},{56:158,81:W},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:D},t(C,[2,11]),t(Y,r,{7:103,40:160}),t($,r,{7:105,42:161}),t(V,r,{7:108,45:162}),t(R,[2,48]),t(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:c((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:c((function(t){var e=this,a=[0],s=[],r=[null],i=[],n=this.table,o="",l=0,d=0,h=i.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(g.yy[u]=this.yy[u]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var x=p.yylloc;i.push(x);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,c((function(t){a.length=a.length-2*t,r.length=r.length-t,i.length=i.length-t}),"popStack"),c(m,"lex");for(var b,T,E,f,w,I,L,P,_={};;){if(T=a[a.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(null==b&&(b=m()),E=n[T]&&n[T][b]),void 0===E||!E.length||!E[0]){var v="";for(w in P=[],n[T])this.terminals_[w]&&w>2&&P.push("'"+this.terminals_[w]+"'");v=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:x,expected:P})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(E[0]){case 1:a.push(b),r.push(p.yytext),i.push(p.yylloc),a.push(E[1]),b=null,d=p.yyleng,o=p.yytext,l=p.yylineno,x=p.yylloc;break;case 2:if(I=this.productions_[E[1]][1],_.$=r[r.length-I],_._$={first_line:i[i.length-(I||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(I||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(I||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.apply(_,[o,d,l,g.yy,E[1],r,i].concat(h))))return f;I&&(a=a.slice(0,-1*I*2),r=r.slice(0,-1*I),i=i.slice(0,-1*I)),a.push(this.productions_[E[1]][0]),r.push(_.$),i.push(_._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0}),"parse")},z=function(){return{EOF:1,parseError:c((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:c((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:c((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:c((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:c((function(){return this._more=!0,this}),"more"),reject:c((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:c((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:c((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:c((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:c((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:c((function(t,e){var a,s,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1}),"test_match"),next:c((function(){if(this.done)return this.EOF;var t,e,a,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;i<r.length;i++)if((a=this._input.match(this.rules[r[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:c((function(){var t=this.next();return t||this.lex()}),"lex"),begin:c((function(t){this.conditionStack.push(t)}),"begin"),popState:c((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:c((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:c((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:c((function(t){this.begin(t)}),"pushState"),stateStackSize:c((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:c((function(t,e,a,s){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function H(){this.yy={}}return q.lexer=z,c(H,"Parser"),H.prototype=q,q.Parser=H,new H}();O.parser=O;var S=O,D={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},R={FILLED:0,OPEN:1},C={LEFTOF:0,RIGHTOF:1,OVER:2},B=(c(t=class{constructor(){this.state=new o((()=>({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=y,this.setAccDescription=m,this.setDiagramTitle=b,this.getAccTitle=T,this.getAccDescription=E,this.getDiagramTitle=f,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(d().wrap),this.LINETYPE=D,this.ARROWTYPE=R,this.PLACEMENT=C}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,s){let r=this.state.records.currentBox;const i=this.state.records.actors.get(t);if(i){if(this.state.records.currentBox&&i.box&&this.state.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(r=i.box?i.box:this.state.records.currentBox,i.box=r,i&&e===i.name&&null==a)return}if(null==(null==a?void 0:a.text)&&(a={text:e,type:s}),null!=s&&null!=a.text||(a={text:e,type:s}),this.state.records.actors.set(t,{box:r,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,s){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:s})}addSignal(t,e,a,s,r=!1){if(s===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:(null==a?void 0:a.text)??"",wrap:(null==a?void 0:a.wrap)??this.autoWrap(),type:s,activate:r}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some((t=>t.name))}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){var t;return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(null==(t=d().sequence)?void 0:t.wrap)??!1}clear(){this.state.reset(),w()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:s}=this.extractWrap(e),r={text:s,wrap:a};return h.debug(`parseMessage: ${JSON.stringify(r)}`),r}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=(null==e?void 0:e[1])?e[1].trim():"transparent",s=(null==e?void 0:e[2])?e[2].trim():void 0;if(null==window?void 0:window.CSS)window.CSS.supports("color",a)||(a="transparent",s=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",s=t.trim())}const{wrap:r,cleanedText:i}=this.extractWrap(s);return{text:i?I(i,d()):void 0,color:a,wrap:r}}addNote(t,e,a){const s={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},r=[].concat(t,t);this.state.records.notes.push(s),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r[0],to:r[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=I(e.text,d());t=t.replace(/&equals;/g,"="),t=t.replace(/&amp;/g,"&");const s=JSON.parse(t);this.insertLinks(a,s)}catch(s){h.error("error while parsing actor link text",s)}}addALink(t,e){const a=this.getActor(t);try{const t={};let s=I(e.text,d());const r=s.indexOf("@");s=s.replace(/&equals;/g,"="),s=s.replace(/&amp;/g,"&");const i=s.slice(0,r-1).trim(),n=s.slice(r+1).trim();t[i]=n,this.insertLinks(a,t)}catch(s){h.error("error while parsing actor link text",s)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=I(e.text,d()),s=JSON.parse(t);this.insertProperties(a,s)}catch(s){h.error("error while parsing actor properties text",s)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),s=document.getElementById(e.text);try{const t=s.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(r){h.error("error while parsing actor details text",r)}}getActorProperty(t,e){if(void 0!==(null==t?void 0:t.properties))return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach((t=>{this.apply(t)}));else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);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),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":y(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return d().sequence}},"SequenceDB"),t),Y=c((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),$="actor-top",V="actor-bottom",F="actor-man",W=c((function(t,e){return r(t,e)}),"drawRect"),q=c((function(t,e,a,s,r){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";r&&(c="block !important");const l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c);var d="";void 0!==o.class&&(d=" "+o.class);let h=o.width>a?o.width:a;const g=l.append("rect");if(g.attr("class","actorPopupMenuPanel"+d),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",h),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=l.append("a"),y=p.sanitizeUrl(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),ut(s)(t,x,o.x+10,o.height+u,h,20,{class:"actor"},s),u+=30}}return g.attr("height",u),{height:o.height+u,width:h}}),"drawPopup"),z=c((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),H=c((async function(t,e,a=null){let s=t.append("foreignObject");const r=await A(e.text,k()),i=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(s.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const r=a.getBBox();s.attr("x",Math.round(r.x+r.width/2-i.width/2)).attr("y",Math.round(r.y+r.height/2-i.height/2))}else if(a){let{startx:t,stopx:r,starty:n}=a;if(t>r){const e=t;t=r,r=e}s.attr("x",Math.round(t+Math.abs(t-r)/2-i.width/2)),"loopText"===e.class?s.attr("y",Math.round(n)):s.attr("y",Math.round(n-i.height))}return[s]}),"drawKatex"),j=c((function(t,e){let a=0,s=0;const r=e.text.split(x.lineBreakRegex),[i,n]=v(e.fontSize);let o=[],l=0,d=c((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=c((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":d=c((()=>Math.round(e.y+(a+s+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":d=c((()=>Math.round(e.y+(a+s+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[c,h]of r.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(l=c*i);const r=t.append("text");r.attr("x",e.x),r.attr("y",d()),void 0!==e.anchor&&r.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&r.style("font-family",e.fontFamily),void 0!==n&&r.style("font-size",n),void 0!==e.fontWeight&&r.style("font-weight",e.fontWeight),void 0!==e.fill&&r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class),void 0!==e.dy?r.attr("dy",e.dy):0!==l&&r.attr("dy",l);const p=h||N;if(e.tspan){const t=r.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(p)}else r.text(p);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(s+=(r._groups||r)[0][0].getBBox().height,a=s),o.push(r)}return o}),"drawText"),U=c((function(t,e){function a(t,e,a,s,r){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+s-r)+" "+(t+a-1.2*r)+","+(e+s)+" "+t+","+(e+s)}c(a,"genPoints");const s=t.append("polygon");return s.attr("points",a(e.x,e.y,e.width,e.height,7)),s.attr("class","labelBox"),e.y=e.y+e.height/2,j(t,e),s}),"drawLabel"),K=-1,X=c(((t,e,a,s)=>{t.select&&a.forEach((a=>{const r=e.get(a),i=t.select("#actor"+r.actorCnt);!s.mirrorActors&&r.stopy?i.attr("y2",r.stopy+r.height/2):s.mirrorActors&&i.attr("y2",r.stopy)}))}),"fixLifeLineHeights"),G=c((function(t,e,a,r){var o,c;const l=r?e.stopy:e.starty,d=e.x+e.width/2,h=l+e.height,p=t.append("g").lower();var g=p;r||(K++,Object.keys(e.links||{}).length&&!a.forceMenus&&g.attr("onclick",z(`actor${K}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+K).attr("x1",d).attr("y1",h).attr("x2",d).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),g=p.append("g"),e.actorCnt=K,null!=e.links&&g.attr("id","root-"+K));const u=s();var x="actor";(null==(o=e.properties)?void 0:o.class)?x=e.properties.class:u.fill="#eaeaea",x+=r?` ${V}`:` ${$}`,u.x=e.x,u.y=l,u.width=e.width,u.height=e.height,u.class=x,u.rx=3,u.ry=3,u.name=e.name;const y=W(g,u);if(e.rectData=u,null==(c=e.properties)?void 0:c.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?i(g,u.x+u.width-20,u.y+10,t.substr(1)):n(g,u.x+u.width-20,u.y+10,t)}gt(a,P(e.description))(e.description,g,u.x,u.y,u.width,u.height,{class:"actor actor-box"},a);let m=e.height;if(y.node){const t=y.node().getBBox();e.height=t.height,m=t.height}return m}),"drawActorTypeParticipant"),J=c((function(t,e,a,r){const i=r?e.stopy:e.starty,n=e.x+e.width/2,o=i+80,c=t.append("g").lower();r||(K++,c.append("line").attr("id","actor"+K).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=K);const l=t.append("g");let d=F;d+=r?` ${V}`:` ${$}`,l.attr("class",d),l.attr("name",e.name);const h=s();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+K).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+K).attr("x1",n-18).attr("y1",i+33).attr("x2",n+18).attr("y2",i+33),l.append("line").attr("x1",n-18).attr("y1",i+60).attr("x2",n).attr("y2",i+45),l.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+18-2).attr("y2",i+60);const p=l.append("circle");p.attr("cx",e.x+e.width/2),p.attr("cy",i+10),p.attr("r",15),p.attr("width",e.width),p.attr("height",e.height);const g=l.node().getBBox();return e.height=g.height,gt(a,P(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${F}`},a),e.height}),"drawActorTypeActor"),Z=c((async function(t,e,a,s){switch(e.type){case"actor":return await J(t,e,a,s);case"participant":return await G(t,e,a,s)}}),"drawActor"),Q=c((function(t,e,a){const s=t.append("g");st(s,e),e.name&&gt(a)(e.name,s,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),s.lower()}),"drawBox"),tt=c((function(t){return t.append("g")}),"anchorElement"),et=c((function(t,e,a,r,i){const n=s(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,W(o,n)}),"drawActivation"),at=c((async function(t,e,s,r){const{boxMargin:i,boxTextMargin:n,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=r,g=t.append("g"),u=c((function(t,e,a,s){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",s).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=a();x.text=s,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=o||20,x.textMargin=n,x.class="labelText",U(g,x),x=ht(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+n,x.anchor="middle",x.valign="middle",x.textMargin=n,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=P(x.text)?await H(g,x,e):j(g,x);if(void 0!==e.sectionTitles)for(const[a,c]of Object.entries(e.sectionTitles))if(c.message){x.text=c.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[a].y+i+n,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,P(x.text)?(e.starty=e.sections[a].y,await H(g,x,e)):j(g,x);let t=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[a].height+=t-(i+n)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),st=c((function(t,a){e(t,a)}),"drawBackgroundRect"),rt=c((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),it=c((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),nt=c((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),ot=c((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),ct=c((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),lt=c((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),dt=c((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),ht=c((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"),pt=c((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),gt=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a+i/2).attr("y",s+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,s,i,n,o,c){const{actorFontSize:l,actorFontFamily:d,actorFontWeight:h}=c,[p,g]=v(l),u=t.split(x.lineBreakRegex);for(let x=0;x<u.length;x++){const t=x*p-p*(u.length-1)/2,c=e.append("text").attr("x",a+i/2).attr("y",s).style("text-anchor","middle").style("font-size",g).style("font-weight",h).style("font-family",d);c.append("tspan").attr("x",a+i/2).attr("dy",t).text(u[x]),c.attr("y",s+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(c,o)}}function a(t,a,s,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,i,n,o,c,l),r(h,c)}async function s(t,a,s,i,n,o,c,l){const d=await _(t,k()),h=a.append("switch"),p=h.append("foreignObject").attr("x",s+n/2-d.width/2).attr("y",i+o/2-d.height/2).attr("width",d.width).attr("height",d.height).append("xhtml:div").style("height","100%").style("width","100%");p.append("div").style("text-align","center").style("vertical-align","middle").html(await A(t,k())),e(t,h,s,i,n,o,c,l),r(p,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return c(t,"byText"),c(e,"byTspan"),c(a,"byFo"),c(s,"byKatex"),c(r,"_setTextAttrs"),function(r,i=!1){return i?s:"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),ut=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").text(t),o)}function e(t,e,a,r,i,n,o,c){const{actorFontSize:l,actorFontFamily:d,actorFontWeight:h}=c,p=t.split(x.lineBreakRegex);for(let g=0;g<p.length;g++){const t=g*l-l*(p.length-1)/2,i=e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",d);i.append("tspan").attr("x",a).attr("dy",t).text(p[g]),i.attr("y",r+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(i,o)}}function a(t,a,r,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,r,i,0,o,c,l),s(h,c)}function s(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return c(t,"byText"),c(e,"byTspan"),c(a,"byFo"),c(s,"_setTextAttrs"),function(s){return"fo"===s.textPlacement?a:"old"===s.textPlacement?t:e}}(),xt={drawRect:W,drawText:j,drawLabel:U,drawActor:Z,drawBox:Q,drawPopup:q,anchorElement:tt,drawActivation:et,drawLoop:at,drawBackgroundRect:st,insertArrowHead:ot,insertArrowFilledHead:ct,insertSequenceNumber:lt,insertArrowCrossHead:dt,insertDatabaseIcon:rt,insertComputerIcon:it,insertClockIcon:nt,getTextObj:ht,getNoteRect:pt,fixLifeLineHeights:X,sanitizeUrl:p.sanitizeUrl},yt={},mt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:c((function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:c((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:c((function(t){this.boxes.push(t)}),"addBox"),addActor:c((function(t){this.actors.push(t)}),"addActor"),addLoop:c((function(t){this.loops.push(t)}),"addLoop"),addMessage:c((function(t){this.messages.push(t)}),"addMessage"),addNote:c((function(t){this.notes.push(t)}),"addNote"),lastActor:c((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:c((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:c((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:c((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:c((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,vt(d())}),"init"),updateVal:c((function(t,e,a,s){void 0===t[e]?t[e]=a:t[e]=s(a,t[e])}),"updateVal"),updateBounds:c((function(t,e,a,s){const r=this;let i=0;function n(n){return c((function(o){i++;const c=r.sequenceItems.length-i+1;r.updateVal(o,"starty",e-c*yt.boxMargin,Math.min),r.updateVal(o,"stopy",s+c*yt.boxMargin,Math.max),r.updateVal(mt.data,"startx",t-c*yt.boxMargin,Math.min),r.updateVal(mt.data,"stopx",a+c*yt.boxMargin,Math.max),"activation"!==n&&(r.updateVal(o,"startx",t-c*yt.boxMargin,Math.min),r.updateVal(o,"stopx",a+c*yt.boxMargin,Math.max),r.updateVal(mt.data,"starty",e-c*yt.boxMargin,Math.min),r.updateVal(mt.data,"stopy",s+c*yt.boxMargin,Math.max))}),"updateItemBounds")}c(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))}),"updateBounds"),insert:c((function(t,e,a,s){const r=x.getMin(t,a),i=x.getMax(t,a),n=x.getMin(e,s),o=x.getMax(e,s);this.updateVal(mt.data,"startx",r,Math.min),this.updateVal(mt.data,"starty",n,Math.min),this.updateVal(mt.data,"stopx",i,Math.max),this.updateVal(mt.data,"stopy",o,Math.max),this.updateBounds(r,n,i,o)}),"insert"),newActivation:c((function(t,e,a){const s=a.get(t.from),r=Nt(t.from).length||0,i=s.x+s.width/2+(r-1)*yt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+yt.activationWidth,stopy:void 0,actor:t.from,anchored:xt.anchorElement(e)})}),"newActivation"),endActivation:c((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:c((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:c((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:c((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:c((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:c((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:mt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:c((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:c((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:c((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=x.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:c((function(){return this.verticalPos}),"getVerticalPos"),getBounds:c((function(){return{bounds:this.data,models:this.models}}),"getBounds")},bt=c((async function(t,e){mt.bumpVerticalPos(yt.boxMargin),e.height=yt.boxMargin,e.starty=mt.getVerticalPos();const r=s();r.x=e.startx,r.y=e.starty,r.width=e.width||yt.width,r.class="note";const i=t.append("g"),n=xt.drawRect(i,r),o=a();o.x=e.startx,o.y=e.starty,o.width=r.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=yt.noteFontFamily,o.fontSize=yt.noteFontSize,o.fontWeight=yt.noteFontWeight,o.anchor=yt.noteAlign,o.textMargin=yt.noteMargin,o.valign="center";const c=P(o.text)?await H(i,o):j(i,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));n.attr("height",l+2*yt.noteMargin),e.height+=l+2*yt.noteMargin,mt.bumpVerticalPos(l+2*yt.noteMargin),e.stopy=e.starty+l+2*yt.noteMargin,e.stopx=e.startx+r.width,mt.insert(e.startx,e.starty,e.stopx,e.stopy),mt.models.addNote(e)}),"drawNote"),Tt=c((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),Et=c((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),ft=c((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function wt(t,e){mt.bumpVerticalPos(10);const{startx:a,stopx:s,message:r}=e,i=x.splitBreaks(r).length,n=P(r),o=n?await _(r,d()):L.calculateTextDimensions(r,Tt(yt));if(!n){const t=o.height/i;e.height+=t,mt.bumpVerticalPos(t)}let c,l=o.height-10;const h=o.width;if(a===s){c=mt.getVerticalPos()+l,yt.rightAngles||(l+=yt.boxMargin,c=mt.getVerticalPos()+l),l+=30;const t=x.getMax(h/2,yt.width/2);mt.insert(a-t,mt.getVerticalPos()-10+l,s+t,mt.getVerticalPos()+30+l)}else l+=yt.boxMargin,c=mt.getVerticalPos()+l,mt.insert(a,c-10,s,c);return mt.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,mt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),c}c(wt,"boundMessage");var It=c((async function(t,e,s,r){const{startx:i,stopx:n,starty:o,message:c,type:l,sequenceIndex:d,sequenceVisible:h}=e,p=L.calculateTextDimensions(c,Tt(yt)),g=a();g.x=i,g.y=o+10,g.width=n-i,g.class="messageText",g.dy="1em",g.text=c,g.fontFamily=yt.messageFontFamily,g.fontSize=yt.messageFontSize,g.fontWeight=yt.messageFontWeight,g.anchor=yt.messageAlign,g.valign="center",g.textMargin=yt.wrapPadding,g.tspan=!1,P(g.text)?await H(t,g,{startx:i,stopx:n,starty:s}):j(t,g);const u=p.width;let y;i===n?y=yt.rightAngles?t.append("path").attr("d",`M ${i},${s} H ${i+x.getMax(yt.width/2,u/2)} V ${s+25} H ${i}`):t.append("path").attr("d","M "+i+","+s+" C "+(i+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20)):(y=t.append("line"),y.attr("x1",i),y.attr("y1",s),y.attr("x2",n),y.attr("y2",s)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let m="";yt.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),l!==r.db.LINETYPE.SOLID&&l!==r.db.LINETYPE.DOTTED||y.attr("marker-end","url("+m+"#arrowhead)"),l!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&l!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(y.attr("marker-start","url("+m+"#arrowhead)"),y.attr("marker-end","url("+m+"#arrowhead)")),l!==r.db.LINETYPE.SOLID_POINT&&l!==r.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+m+"#filled-head)"),l!==r.db.LINETYPE.SOLID_CROSS&&l!==r.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+m+"#crosshead)"),(h||yt.showSequenceNumbers)&&(y.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",s+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(d))}),"drawMessage"),Lt=c((function(t,e,a,s,r,i,n){let o,c=0,l=0,d=0;for(const h of s){const t=e.get(h),s=t.box;o&&o!=s&&(n||mt.models.addBox(o),l+=yt.boxMargin+o.margin),s&&s!=o&&(n||(s.x=c+l,s.y=r),l+=s.margin),t.width=t.width||yt.width,t.height=x.getMax(t.height||yt.height,yt.height),t.margin=t.margin||yt.actorMargin,d=x.getMax(d,t.height),a.get(t.name)&&(l+=t.width/2),t.x=c+l,t.starty=mt.getVerticalPos(),mt.insert(t.x,r,t.x+t.width,t.height),c+=t.width+l,t.box&&(t.box.width=c+s.margin-t.box.x),l=t.margin,o=t.box,mt.models.addActor(t)}o&&!n&&mt.models.addBox(o),mt.bumpVerticalPos(d)}),"addActorRenderingData"),Pt=c((async function(t,e,a,s){if(s){let s=0;mt.bumpVerticalPos(2*yt.boxMargin);for(const r of a){const a=e.get(r);a.stopy||(a.stopy=mt.getVerticalPos());const i=await xt.drawActor(t,a,yt,!0);s=x.getMax(s,i)}mt.bumpVerticalPos(s+yt.boxMargin)}else for(const r of a){const a=e.get(r);await xt.drawActor(t,a,yt,!1)}}),"drawActors"),_t=c((function(t,e,a,s){let r=0,i=0;for(const n of a){const a=e.get(n),o=Dt(a),c=xt.drawPopup(t,a,o,yt,yt.forceMenus,s);c.height>r&&(r=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:r,maxWidth:i}}),"drawActorsPopup"),vt=c((function(t){u(yt,t),t.fontFamily&&(yt.actorFontFamily=yt.noteFontFamily=yt.messageFontFamily=t.fontFamily),t.fontSize&&(yt.actorFontSize=yt.noteFontSize=yt.messageFontSize=t.fontSize),t.fontWeight&&(yt.actorFontWeight=yt.noteFontWeight=yt.messageFontWeight=t.fontWeight)}),"setConf"),Nt=c((function(t){return mt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),At=c((function(t,e){const a=e.get(t),s=Nt(t);return[s.reduce((function(t,e){return x.getMin(t,e.startx)}),a.x+a.width/2-1),s.reduce((function(t,e){return x.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function kt(t,e,a,s,r){mt.bumpVerticalPos(a);let i=s;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,r=Tt(yt);e.message=L.wrapLabel(`[${e.message}]`,a-2*yt.wrapPadding,r),e.width=a,e.wrap=!0;const n=L.calculateTextDimensions(e.message,r),o=x.getMax(n.height,yt.labelBoxHeight);i=s+o,h.debug(`${o} - ${e.message}`)}r(e),mt.bumpVerticalPos(i)}function Mt(t,e,a,s,r,i,n){function o(a,s){a.x<r.get(t.from).x?(mt.insert(e.stopx-s,e.starty,e.startx,e.stopy+a.height/2+yt.noteMargin),e.stopx=e.stopx+s):(mt.insert(e.startx,e.starty,e.stopx+s,e.stopy+a.height/2+yt.noteMargin),e.stopx=e.stopx-s)}function l(a,s){a.x<r.get(t.to).x?(mt.insert(e.startx-s,e.starty,e.stopx,e.stopy+a.height/2+yt.noteMargin),e.startx=e.startx+s):(mt.insert(e.stopx,e.starty,e.startx+s,e.stopy+a.height/2+yt.noteMargin),e.startx=e.startx-s)}if(c(o,"receiverAdjustment"),c(l,"senderAdjustment"),i.get(t.to)==s){const e=r.get(t.to);o(e,"actor"==e.type?21:e.width/2+3),e.starty=a-e.height/2,mt.bumpVerticalPos(e.height/2)}else if(n.get(t.from)==s){const e=r.get(t.from);if(yt.mirrorActors){l(e,"actor"==e.type?18:e.width/2)}e.stopy=a-e.height/2,mt.bumpVerticalPos(e.height/2)}else if(n.get(t.to)==s){const e=r.get(t.to);if(yt.mirrorActors){o(e,"actor"==e.type?21:e.width/2+3)}e.stopy=a-e.height/2,mt.bumpVerticalPos(e.height/2)}}c(kt,"adjustLoopHeightForWrap"),c(Mt,"adjustCreatedDestroyedData");var Ot=c((async function(t,e,a,s){const{securityLevel:r,sequence:i}=d();let n;yt=i,"sandbox"===r&&(n=M("#i"+e));const o=M("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),l="sandbox"===r?n.nodes()[0].contentDocument:document;mt.init(),h.debug(s.db);const p="sandbox"===r?o.select(`[id="${e}"]`):M(`[id="${e}"]`),u=s.db.getActors(),x=s.db.getCreatedActors(),y=s.db.getDestroyedActors(),m=s.db.getBoxes();let b=s.db.getActorKeys();const T=s.db.getMessages(),E=s.db.getDiagramTitle(),f=s.db.hasAtLeastOneBox(),w=s.db.hasAtLeastOneBoxWithTitle(),I=await St(u,T,s);if(yt.height=await Rt(u,I,m),xt.insertComputerIcon(p),xt.insertDatabaseIcon(p),xt.insertClockIcon(p),f&&(mt.bumpVerticalPos(yt.boxMargin),w&&mt.bumpVerticalPos(m[0].textMaxHeight)),!0===yt.hideUnusedParticipants){const t=new Set;T.forEach((e=>{t.add(e.from),t.add(e.to)})),b=b.filter((e=>t.has(e)))}Lt(p,u,x,b,0,T,!1);const L=await Yt(T,u,I,s);function P(t,e){const a=mt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),xt.drawActivation(p,a,e,yt,Nt(t.from).length),mt.insert(a.startx,e-10,a.stopx,e)}xt.insertArrowHead(p),xt.insertArrowCrossHead(p),xt.insertArrowFilledHead(p),xt.insertSequenceNumber(p),c(P,"activeEnd");let _=1,v=1;const N=[],A=[];let k=0;for(const c of T){let t,e,a;switch(c.type){case s.db.LINETYPE.NOTE:mt.resetVerticalPos(),e=c.noteModel,await bt(p,e);break;case s.db.LINETYPE.ACTIVE_START:mt.newActivation(c,p,u);break;case s.db.LINETYPE.ACTIVE_END:P(c,mt.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.LOOP_END:t=mt.endLoop(),await xt.drawLoop(p,t,"loop",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.RECT_START:kt(L,c,yt.boxMargin,yt.boxMargin,(t=>mt.newLoop(void 0,t.message)));break;case s.db.LINETYPE.RECT_END:t=mt.endLoop(),A.push(t),mt.models.addLoop(t),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos());break;case s.db.LINETYPE.OPT_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.OPT_END:t=mt.endLoop(),await xt.drawLoop(p,t,"opt",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.ALT_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.ALT_ELSE:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.ALT_END:t=mt.endLoop(),await xt.drawLoop(p,t,"alt",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t))),mt.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.PAR_END:t=mt.endLoop(),await xt.drawLoop(p,t,"par",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.AUTONUMBER:_=c.message.start||_,v=c.message.step||v,c.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.CRITICAL_OPTION:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.CRITICAL_END:t=mt.endLoop(),await xt.drawLoop(p,t,"critical",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.BREAK_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.BREAK_END:t=mt.endLoop(),await xt.drawLoop(p,t,"break",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;default:try{a=c.msgModel,a.starty=mt.getVerticalPos(),a.sequenceIndex=_,a.sequenceVisible=s.db.showSequenceNumbers();const t=await wt(0,a);Mt(c,a,t,k,u,x,y),N.push({messageModel:a,lineStartY:t}),mt.models.addMessage(a)}catch($){h.error("error while drawing message",$)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(c.type)&&(_+=v),k++}h.debug("createdActors",x),h.debug("destroyedActors",y),await Pt(p,u,b,!1);for(const c of N)await It(p,c.messageModel,c.lineStartY,s);yt.mirrorActors&&await Pt(p,u,b,!0),A.forEach((t=>xt.drawBackgroundRect(p,t))),X(p,u,b,yt);for(const c of mt.models.boxes)c.height=mt.getVerticalPos()-c.y,mt.insert(c.x,c.y,c.x+c.width,c.height),c.startx=c.x,c.starty=c.y,c.stopx=c.startx+c.width,c.stopy=c.starty+c.height,c.stroke="rgb(0,0,0, 0.5)",xt.drawBox(p,c,yt);f&&mt.bumpVerticalPos(yt.boxMargin);const O=_t(p,u,b,l),{bounds:S}=mt.getBounds();void 0===S.startx&&(S.startx=0),void 0===S.starty&&(S.starty=0),void 0===S.stopx&&(S.stopx=0),void 0===S.stopy&&(S.stopy=0);let D=S.stopy-S.starty;D<O.maxHeight&&(D=O.maxHeight);let R=D+2*yt.diagramMarginY;yt.mirrorActors&&(R=R-yt.boxMargin+yt.bottomMarginAdj);let C=S.stopx-S.startx;C<O.maxWidth&&(C=O.maxWidth);const B=C+2*yt.diagramMarginX;E&&p.append("text").text(E).attr("x",(S.stopx-S.startx)/2-2*yt.diagramMarginX).attr("y",-25),g(p,R,B,yt.useMaxWidth);const Y=E?40:0;p.attr("viewBox",S.startx-yt.diagramMarginX+" -"+(yt.diagramMarginY+Y)+" "+B+" "+(R+Y)),h.debug("models:",mt.models)}),"draw");async function St(t,e,a){const s={};for(const r of e)if(t.get(r.to)&&t.get(r.from)){const e=t.get(r.to);if(r.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(r.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const i=void 0!==r.placement,n=!i,o=i?Et(yt):Tt(yt),c=r.wrap?L.wrapLabel(r.message,yt.width-2*yt.wrapPadding,o):r.message,l=(P(c)?await _(r.message,d()):L.calculateTextDimensions(c,o)).width+2*yt.wrapPadding;n&&r.from===e.nextActor?s[r.to]=x.getMax(s[r.to]||0,l):n&&r.from===e.prevActor?s[r.from]=x.getMax(s[r.from]||0,l):n&&r.from===r.to?(s[r.from]=x.getMax(s[r.from]||0,l/2),s[r.to]=x.getMax(s[r.to]||0,l/2)):r.placement===a.db.PLACEMENT.RIGHTOF?s[r.from]=x.getMax(s[r.from]||0,l):r.placement===a.db.PLACEMENT.LEFTOF?s[e.prevActor]=x.getMax(s[e.prevActor]||0,l):r.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(s[e.prevActor]=x.getMax(s[e.prevActor]||0,l/2)),e.nextActor&&(s[r.from]=x.getMax(s[r.from]||0,l/2)))}return h.debug("maxMessageWidthPerActor:",s),s}c(St,"getMaxMessageWidthPerActor");var Dt=c((function(t){let e=0;const a=ft(yt);for(const s in t.links){const t=L.calculateTextDimensions(s,a).width+2*yt.wrapPadding+2*yt.boxMargin;e<t&&(e=t)}return e}),"getRequiredPopupWidth");async function Rt(t,e,a){let s=0;for(const i of t.keys()){const e=t.get(i);e.wrap&&(e.description=L.wrapLabel(e.description,yt.width-2*yt.wrapPadding,ft(yt)));const a=P(e.description)?await _(e.description,d()):L.calculateTextDimensions(e.description,ft(yt));e.width=e.wrap?yt.width:x.getMax(yt.width,a.width+2*yt.wrapPadding),e.height=e.wrap?x.getMax(a.height,yt.height):yt.height,s=x.getMax(s,e.height)}for(const i in e){const a=t.get(i);if(!a)continue;const s=t.get(a.nextActor);if(!s){const t=e[i]+yt.actorMargin-a.width/2;a.margin=x.getMax(t,yt.actorMargin);continue}const r=e[i]+yt.actorMargin-a.width/2-s.width/2;a.margin=x.getMax(r,yt.actorMargin)}let r=0;return a.forEach((e=>{const a=Tt(yt);let s=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);s-=2*yt.boxTextMargin,e.wrap&&(e.name=L.wrapLabel(e.name,s-2*yt.wrapPadding,a));const i=L.calculateTextDimensions(e.name,a);r=x.getMax(i.height,r);const n=x.getMax(s,i.width+2*yt.wrapPadding);if(e.margin=yt.boxTextMargin,s<n){const t=(n-s)/2;e.margin+=t}})),a.forEach((t=>t.textMaxHeight=r)),x.getMax(s,yt.height)}c(Rt,"calculateActorMargins");var Ct=c((async function(t,e,a){const s=e.get(t.from),r=e.get(t.to),i=s.x,n=r.x,o=t.wrap&&t.message;let c=P(t.message)?await _(t.message,d()):L.calculateTextDimensions(o?L.wrapLabel(t.message,yt.width,Et(yt)):t.message,Et(yt));const l={width:o?yt.width:x.getMax(yt.width,c.width+2*yt.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(l.width=o?x.getMax(yt.width,c.width):x.getMax(s.width/2+r.width/2,c.width+2*yt.noteMargin),l.startx=i+(s.width+yt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(l.width=o?x.getMax(yt.width,c.width+2*yt.noteMargin):x.getMax(s.width/2+r.width/2,c.width+2*yt.noteMargin),l.startx=i-l.width+(s.width-yt.actorMargin)/2):t.to===t.from?(c=L.calculateTextDimensions(o?L.wrapLabel(t.message,x.getMax(yt.width,s.width),Et(yt)):t.message,Et(yt)),l.width=o?x.getMax(yt.width,s.width):x.getMax(s.width,yt.width,c.width+2*yt.noteMargin),l.startx=i+(s.width-l.width)/2):(l.width=Math.abs(i+s.width/2-(n+r.width/2))+yt.actorMargin,l.startx=i<n?i+s.width/2-yt.actorMargin/2:n+r.width/2-yt.actorMargin/2),o&&(l.message=L.wrapLabel(t.message,l.width-2*yt.wrapPadding,Et(yt))),h.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l}),"buildNoteModel"),Bt=c((function(t,e,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[s,r]=At(t.from,e),[i,n]=At(t.to,e),o=s<=i;let l=o?r:s,d=o?i:n;const h=Math.abs(i-n)>2,p=c((t=>o?-t:t),"adjustValue");t.from===t.to?d=l:(t.activate&&!h&&(d+=p(yt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=p(3)));const g=[s,r,i,n],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=L.wrapLabel(t.message,x.getMax(u+2*yt.wrapPadding,yt.width),Tt(yt)));const y=L.calculateTextDimensions(t.message,Tt(yt));return{width:x.getMax(t.wrap?0:y.width+2*yt.wrapPadding,u+2*yt.wrapPadding,yt.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}}),"buildMessageModel"),Yt=c((async function(t,e,a,s){const r={},i=[];let n,o,c;for(const l of t){switch(l.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:i.push({id:l.id,msg:l.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:l.message&&(n=i.pop(),r[n.id]=n,r[l.id]=n,i.push(n));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:n=i.pop(),r[n.id]=n;break;case s.db.LINETYPE.ACTIVE_START:{const t=e.get(l.from?l.from:l.to.actor),a=Nt(l.from?l.from:l.to.actor).length,s=t.x+t.width/2+(a-1)*yt.activationWidth/2,r={startx:s,stopx:s+yt.activationWidth,actor:l.from,enabled:!0};mt.activations.push(r)}break;case s.db.LINETYPE.ACTIVE_END:{const t=mt.activations.map((t=>t.actor)).lastIndexOf(l.from);mt.activations.splice(t,1).splice(0,1)}}void 0!==l.placement?(o=await Ct(l,e,s),l.noteModel=o,i.forEach((t=>{n=t,n.from=x.getMin(n.from,o.startx),n.to=x.getMax(n.to,o.startx+o.width),n.width=x.getMax(n.width,Math.abs(n.from-n.to))-yt.labelBoxWidth}))):(c=Bt(l,e,s),l.msgModel=c,c.startx&&c.stopx&&i.length>0&&i.forEach((t=>{if(n=t,c.startx===c.stopx){const t=e.get(l.from),a=e.get(l.to);n.from=x.getMin(t.x-c.width/2,t.x-t.width/2,n.from),n.to=x.getMax(a.x+c.width/2,a.x+t.width/2,n.to),n.width=x.getMax(n.width,Math.abs(n.to-n.from))-yt.labelBoxWidth}else n.from=x.getMin(c.startx,n.from),n.to=x.getMax(c.stopx,n.to),n.width=x.getMax(n.width,c.width)-yt.labelBoxWidth})))}return mt.activations=[],h.debug("Loop type widths:",r),r}),"calculateLoopBounds"),$t={bounds:mt,drawActors:Pt,drawActorsPopup:_t,setConf:vt,draw:Ot},Vt={parser:S,get db(){return new B},renderer:$t,styles:Y,init:c((t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,l({sequence:{wrap:t.wrap}}))}),"init")};export{Vt as diagram};
@@ -1 +1 @@
1
- var l={};function c(t,e){for(var n=0;n<e.length;n++)l[e[n]]=t}var k=["true","false"],h=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],p=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function g(t,e){if(t.eatSpace())return null;var n,i=t.sol(),r=t.next();if(r==="\\")return t.next(),null;if(r==="'"||r==='"'||r==="`")return e.tokens.unshift(u(r,r==="`"?"quote":"string")),a(t,e);if(r==="#")return i&&t.eat("!")?(t.skipToEnd(),"meta"):(t.skipToEnd(),"comment");if(r==="$")return e.tokens.unshift(d),a(t,e);if(r==="+"||r==="=")return"operator";if(r==="-")return t.eat("-"),t.eatWhile(/\w/),"attribute";if(r=="<"){if(t.match("<<"))return"operator";var s=t.match(/^<-?\s*(?:['"]([^'"]*)['"]|([^'"\s]*))/);if(s)return e.tokens.unshift((n=s[1]||s[2],function(f,m){return f.sol()&&f.string==n&&m.tokens.shift(),f.skipToEnd(),"string.special"})),"string.special"}if(/\d/.test(r)&&(t.eatWhile(/\d/),t.eol()||!/\w/.test(t.peek())))return"number";t.eatWhile(/[\w-]/);var o=t.current();return t.peek()==="="&&/\w+/.test(o)?"def":l.hasOwnProperty(o)?l[o]:null}function u(t,e){var n=t=="("?")":t=="{"?"}":t;return function(i,r){for(var s,o=!1;(s=i.next())!=null;){if(s===n&&!o){r.tokens.shift();break}if(s==="$"&&!o&&t!=="'"&&i.peek()!=n){o=!0,i.backUp(1),r.tokens.unshift(d);break}if(!o&&t!==n&&s===t)return r.tokens.unshift(u(t,e)),a(i,r);if(!o&&/['"]/.test(s)&&!/['"]/.test(t)){r.tokens.unshift(w(s,"string")),i.backUp(1);break}o=!o&&s==="\\"}return e}}function w(t,e){return function(n,i){return i.tokens[0]=u(t,e),n.next(),a(n,i)}}c("atom",k),c("keyword",h),c("builtin",p);var d=function(t,e){e.tokens.length>1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=u(n,n=="("?"quote":n=="{"?"def":"string"),a(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function a(t,e){return(e.tokens[0]||g)(t,e)}const v={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return a(t,e)},languageData:{autocomplete:k.concat(h,p),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};export{v as shell};
1
+ var t={};function e(e,n){for(var r=0;r<n.length;r++)t[n[r]]=e}var n=["true","false"],r=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],s=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function i(e,n){if(e.eatSpace())return null;var r,s=e.sol(),i=e.next();if("\\"===i)return e.next(),null;if("'"===i||'"'===i||"`"===i)return n.tokens.unshift(o(i,"`"===i?"quote":"string")),f(e,n);if("#"===i)return s&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===i)return n.tokens.unshift(a),f(e,n);if("+"===i||"="===i)return"operator";if("-"===i)return e.eat("-"),e.eatWhile(/\w/),"attribute";if("<"==i){if(e.match("<<"))return"operator";var u=e.match(/^<-?\s*(?:['"]([^'"]*)['"]|([^'"\s]*))/);if(u)return n.tokens.unshift((r=u[1]||u[2],function(t,e){return t.sol()&&t.string==r&&e.tokens.shift(),t.skipToEnd(),"string.special"})),"string.special"}if(/\d/.test(i)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var c=e.current();return"="===e.peek()&&/\w+/.test(c)?"def":t.hasOwnProperty(c)?t[c]:null}function o(t,e){var n="("==t?")":"{"==t?"}":t;return function(r,s){for(var i,c=!1;null!=(i=r.next());){if(i===n&&!c){s.tokens.shift();break}if("$"===i&&!c&&"'"!==t&&r.peek()!=n){c=!0,r.backUp(1),s.tokens.unshift(a);break}if(!c&&t!==n&&i===t)return s.tokens.unshift(o(t,e)),f(r,s);if(!c&&/['"]/.test(i)&&!/['"]/.test(t)){s.tokens.unshift(u(i,"string")),r.backUp(1);break}c=!c&&"\\"===i}return e}}function u(t,e){return function(n,r){return r.tokens[0]=o(t,e),n.next(),f(n,r)}}e("atom",n),e("keyword",r),e("builtin",s);var a=function(t,e){e.tokens.length>1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=o(n,"("==n?"quote":"{"==n?"def":"string"),f(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function f(t,e){return(e.tokens[0]||i)(t,e)}const c={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return f(t,e)},languageData:{autocomplete:n.concat(r,s),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};export{c as shell};
@@ -1 +1 @@
1
- function o(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}var d=o("if elsif else stop require"),k=o("true false not");function i(e,t){var r,n=e.next();if(n=="/"&&e.eat("*"))return t.tokenize=f,f(e,t);if(n==="#")return e.skipToEnd(),"comment";if(n=='"')return t.tokenize=(r=n,function(s,p){for(var a,u=!1;(a=s.next())!=null&&(a!=r||u);)u=!u&&a=="\\";return u||(p.tokenize=i),"string"}),t.tokenize(e,t);if(n=="(")return t._indent.push("("),t._indent.push("{"),null;if(n==="{")return t._indent.push("{"),null;if(n==")"&&(t._indent.pop(),t._indent.pop()),n==="}")return t._indent.pop(),null;if(n==","||n==";"||/[{}\(\),;]/.test(n))return null;if(/\d/.test(n))return e.eatWhile(/[\d]/),e.eat(/[KkMmGg]/),"number";if(n==":")return e.eatWhile(/[a-zA-Z_]/),e.eatWhile(/[a-zA-Z0-9_]/),"operator";e.eatWhile(/\w/);var l=e.current();return l=="text"&&e.eat(":")?(t.tokenize=c,"string"):d.propertyIsEnumerable(l)?"keyword":k.propertyIsEnumerable(l)?"atom":null}function c(e,t){return t._multiLineString=!0,e.sol()?(e.next()=="."&&e.eol()&&(t._multiLineString=!1,t.tokenize=i),"string"):(e.eatSpace(),e.peek()=="#"?(e.skipToEnd(),"comment"):(e.skipToEnd(),"string"))}function f(e,t){for(var r,n=!1;(r=e.next())!=null;){if(n&&r=="/"){t.tokenize=i;break}n=r=="*"}return"comment"}const m={name:"sieve",startState:function(e){return{tokenize:i,baseIndent:e||0,_indent:[]}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||i)(e,t)},indent:function(e,t,r){var n=e._indent.length;return t&&t[0]=="}"&&n--,n<0&&(n=0),n*r.unit},languageData:{indentOnInput:/^\s*\}$/}};export{m as sieve};
1
+ function n(n){for(var e={},t=n.split(" "),r=0;r<t.length;++r)e[t[r]]=!0;return e}var e=n("if elsif else stop require"),t=n("true false not");function r(n,o){var l,a=n.next();if("/"==a&&n.eat("*"))return o.tokenize=u,u(n,o);if("#"===a)return n.skipToEnd(),"comment";if('"'==a)return o.tokenize=(l=a,function(n,e){for(var t,i=!1;null!=(t=n.next())&&(t!=l||i);)i=!i&&"\\"==t;return i||(e.tokenize=r),"string"}),o.tokenize(n,o);if("("==a)return o._indent.push("("),o._indent.push("{"),null;if("{"===a)return o._indent.push("{"),null;if(")"==a&&(o._indent.pop(),o._indent.pop()),"}"===a)return o._indent.pop(),null;if(","==a)return null;if(";"==a)return null;if(/[{}\(\),;]/.test(a))return null;if(/\d/.test(a))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(":"==a)return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var f=n.current();return"text"==f&&n.eat(":")?(o.tokenize=i,"string"):e.propertyIsEnumerable(f)?"keyword":t.propertyIsEnumerable(f)?"atom":null}function i(n,e){return e._multiLineString=!0,n.sol()?("."==n.next()&&n.eol()&&(e._multiLineString=!1,e.tokenize=r),"string"):(n.eatSpace(),"#"==n.peek()?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function u(n,e){for(var t,i=!1;null!=(t=n.next());){if(i&&"/"==t){e.tokenize=r;break}i="*"==t}return"comment"}const o={name:"sieve",startState:function(n){return{tokenize:r,baseIndent:n||0,_indent:[]}},token:function(n,e){return n.eatSpace()?null:(e.tokenize||r)(n,e)},indent:function(n,e,t){var r=n._indent.length;return e&&"}"==e[0]&&r--,r<0&&(r=0),r*t.unit},languageData:{indentOnInput:/^\s*\}$/}};export{o as sieve};
@@ -1 +1 @@
1
- function f(t){d(t,"start");var r={},n=t.languageData||{},s=!1;for(var u in t)if(u!=n&&t.hasOwnProperty(u))for(var o=r[u]=[],a=t[u],e=0;e<a.length;e++){var i=a[e];o.push(new l(i,t)),(i.indent||i.dedent)&&(s=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:s?[]:null}},copyState:function(p){var g={state:p.state,pending:p.pending,indent:p.indent&&p.indent.slice(0)};return p.stack&&(g.stack=p.stack.slice(0)),g},token:h(r),indent:c(r,n),mergeTokens:n.mergeTokens,languageData:n}}function d(t,r){if(!t.hasOwnProperty(r))throw new Error("Undefined state "+r+" in simple mode")}function l(t,r){(t.next||t.push)&&d(r,t.next||t.push),this.regex=function(n){if(!n)return/(?:)/;var s="";return n instanceof RegExp?(n.ignoreCase&&(s="i"),n=n.source):n=String(n),new RegExp("^(?:"+n+")",s)}(t.regex),this.token=function(n){if(!n)return null;if(n.apply)return n;if(typeof n=="string")return n.replace(/\./g," ");for(var s=[],u=0;u<n.length;u++)s.push(n[u]&&n[u].replace(/\./g," "));return s}(t.token),this.data=t}function h(t){return function(r,n){if(n.pending){var s=n.pending.shift();return n.pending.length==0&&(n.pending=null),r.pos+=s.text.length,s.token}for(var u=t[n.state],o=0;o<u.length;o++){var a=u[o],e=(!a.data.sol||r.sol())&&r.match(a.regex);if(e){a.data.next?n.state=a.data.next:a.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=a.data.push):a.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),a.data.indent&&n.indent.push(r.indentation()+r.indentUnit),a.data.dedent&&n.indent.pop();var i=a.token;if(i&&i.apply&&(i=i(e)),e.length>2&&a.token&&typeof a.token!="string"){n.pending=[];for(var p=2;p<e.length;p++)e[p]&&n.pending.push({text:e[p],token:a.token[p-1]});return r.backUp(e[0].length-(e[1]?e[1].length:0)),i[0]}return i&&i.join?i[0]:i}}return r.next(),null}}function c(t,r){return function(n,s){if(n.indent==null||r.dontIndentStates&&r.dontIndentStates.indexOf(n.state)>-1)return null;var u=n.indent.length-1,o=t[n.state];n:for(;;){for(var a=0;a<o.length;a++){var e=o[a];if(e.data.dedent&&e.data.dedentIfLineStart!==!1){var i=e.regex.exec(s);if(i&&i[0]){u--,(e.next||e.push)&&(o=t[e.next||e.push]),s=s.slice(i[0].length);continue n}}}break}return u<0?0:n.indent[u]}}export{f as s};
1
+ function t(t){n(t,"start");var i={},s=t.languageData||{},o=!1;for(var d in t)if(d!=s&&t.hasOwnProperty(d))for(var u=i[d]=[],p=t[d],g=0;g<p.length;g++){var l=p[g];u.push(new e(l,t)),(l.indent||l.dedent)&&(o=!0)}return{name:s.name,startState:function(){return{state:"start",pending:null,indent:o?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,indent:t.indent&&t.indent.slice(0)};return t.stack&&(n.stack=t.stack.slice(0)),n},token:a(i),indent:r(i,s),mergeTokens:s.mergeTokens,languageData:s}}function n(t,n){if(!t.hasOwnProperty(n))throw new Error("Undefined state "+n+" in simple mode")}function e(t,e){(t.next||t.push)&&n(e,t.next||t.push),this.regex=function(t){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t=t.source):t=String(t),new RegExp("^(?:"+t+")",n)}(t.regex),this.token=function(t){if(!t)return null;if(t.apply)return t;if("string"==typeof t)return t.replace(/\./g," ");for(var n=[],e=0;e<t.length;e++)n.push(t[e]&&t[e].replace(/\./g," "));return n}(t.token),this.data=t}function a(t){return function(n,e){if(e.pending){var a=e.pending.shift();return 0==e.pending.length&&(e.pending=null),n.pos+=a.text.length,a.token}for(var r=t[e.state],i=0;i<r.length;i++){var s=r[i],o=(!s.data.sol||n.sol())&&n.match(s.regex);if(o){s.data.next?e.state=s.data.next:s.data.push?((e.stack||(e.stack=[])).push(e.state),e.state=s.data.push):s.data.pop&&e.stack&&e.stack.length&&(e.state=e.stack.pop()),s.data.indent&&e.indent.push(n.indentation()+n.indentUnit),s.data.dedent&&e.indent.pop();var d=s.token;if(d&&d.apply&&(d=d(o)),o.length>2&&s.token&&"string"!=typeof s.token){e.pending=[];for(var u=2;u<o.length;u++)o[u]&&e.pending.push({text:o[u],token:s.token[u-1]});return n.backUp(o[0].length-(o[1]?o[1].length:0)),d[0]}return d&&d.join?d[0]:d}}return n.next(),null}}function r(t,n){return function(e,a){if(null==e.indent||n.dontIndentStates&&n.dontIndentStates.indexOf(e.state)>-1)return null;var r=e.indent.length-1,i=t[e.state];t:for(;;){for(var s=0;s<i.length;s++){var o=i[s];if(o.data.dedent&&!1!==o.data.dedentIfLineStart){var d=o.regex.exec(a);if(d&&d[0]){r--,(o.next||o.push)&&(i=t[o.next||o.push]),a=a.slice(d[0].length);continue t}}}break}return r<0?0:e.indent[r]}}export{t as s};