lookatstudy-mobile 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/package.json +1 -1
  2. package/server.cjs +410 -309
  3. package/web/assets/Tableau10-Cz3F1amA.js +1 -0
  4. package/web/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
  5. package/web/assets/abnfDiagram-N423BO3Z-BqeMquUh.js +1 -0
  6. package/web/assets/abnfDiagram-VCTEODGH-ODA7YWAP-BuesB7xR.js +1 -0
  7. package/web/assets/api-web-DeJFZI02.js +1 -0
  8. package/web/assets/arc-Bb-hQPAI.js +1 -0
  9. package/web/assets/architectureDiagram-5GKGNRK7-C4PU3XN7-0sZWP2Gt.js +36 -0
  10. package/web/assets/{architectureDiagram-T3A2C74G-djSyr1mz.js → architectureDiagram-T3A2C74G-BUX7eVzV.js} +3 -3
  11. package/web/assets/band-dPffDWoQ.js +1 -0
  12. package/web/assets/blockDiagram-NRAW4CY4-UMJ6PMQQ-DMEi53vA.js +129 -0
  13. package/web/assets/{blockDiagram-VBNYF7ZC-CMyKXBrP.js → blockDiagram-VBNYF7ZC-CquWGiud.js} +4 -4
  14. package/web/assets/c-BIGW1oBm.js +1 -0
  15. package/web/assets/{c4Diagram-5PPSVZJV-BIkHBEIX.js → c4Diagram-5PPSVZJV-DwhWxb7s.js} +2 -2
  16. package/web/assets/c4Diagram-UCG6FXSJ-75X3U2P3-Cw6KuLDN.js +38 -0
  17. package/web/assets/channel-BTMwuCXz.js +1 -0
  18. package/web/assets/chunk-2GRJ4B5K-CzGtEVrd.js +1 -0
  19. package/web/assets/{chunk-2Q5K7J3B-5KwfG7mC.js → chunk-2Q5K7J3B-svQDV2bG.js} +1 -1
  20. package/web/assets/{chunk-5RXB4S5H-BfjkbTOR.js → chunk-5RXB4S5H-CkBumCja.js} +3 -3
  21. package/web/assets/{chunk-5VM5RSS4-CknJ0UrM.js → chunk-5VM5RSS4-DmqVK3OP.js} +1 -1
  22. package/web/assets/{chunk-6Q2QTUOP-PEKlwd8q.js → chunk-6Q2QTUOP-j-yShG78.js} +3 -3
  23. package/web/assets/chunk-7XDTSPCN-BF54U_Qe.js +338 -0
  24. package/web/assets/chunk-CTNIYPP6-BLGT5nzg.js +1 -0
  25. package/web/assets/chunk-CXNFBKHE-CHtCVUVZ.js +15 -0
  26. package/web/assets/{chunk-GF5L2VYU-FwREiZq-.js → chunk-GF5L2VYU-HY4EUgWS.js} +4 -4
  27. package/web/assets/chunk-ISA7TJRJ-AUc9mrxX.js +1 -0
  28. package/web/assets/{chunk-JWPE2WC7-Df8WvQEt.js → chunk-JWPE2WC7-DmzvUH3q.js} +1 -1
  29. package/web/assets/chunk-KBJHAD2P-C3HnMhHX.js +1 -0
  30. package/web/assets/chunk-LV3HUYFY-D3kDosNp.js +1 -0
  31. package/web/assets/chunk-M3IUQBOH-CMBqYbjd.js +231 -0
  32. package/web/assets/chunk-NDIOYS4C-D4XcxlS5.js +1 -0
  33. package/web/assets/chunk-RE4WF27V-ANjTafEs.js +1 -0
  34. package/web/assets/{chunk-RYQCIY6F-w-ex678p.js → chunk-RYQCIY6F-CV9wg8xs.js} +1 -1
  35. package/web/assets/chunk-VII2H2IX-DK2MWM1y.js +1 -0
  36. package/web/assets/chunk-X5GNSKZ3-YRz76YFi.js +206 -0
  37. package/web/assets/chunk-XCWWM2C3-CSRjUbE8.js +88 -0
  38. package/web/assets/chunk-XXDRQBXY-j9X99vQo.js +1 -0
  39. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-D00H1X9p.js +1 -0
  40. package/web/assets/classDiagram-JCYQIIEL-ClQHMNoR.js +1 -0
  41. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-D00H1X9p.js +1 -0
  42. package/web/assets/classDiagram-v2-OCEON4UE-ClQHMNoR.js +1 -0
  43. package/web/assets/colors-Cc3OSVma.js +1 -0
  44. package/web/assets/core-Drxo65nc.js +12 -0
  45. package/web/assets/{cose-bilkent-JH36ORCC-CuRVnite.js → cose-bilkent-JH36ORCC-CN6Mp4ds.js} +1 -1
  46. package/web/assets/cose-bilkent-JH36ORCC-OB24KH3T-Bvxs1RhI.js +1 -0
  47. package/web/assets/cpp-DddhVWhK.js +1 -0
  48. package/web/assets/csharp-DSvCPggb.js +1 -0
  49. package/web/assets/css-CLj8gQPS.js +1 -0
  50. package/web/assets/cynefin-OW5HDTMX-GVF3BKWE-BVXFZGhi.js +178 -0
  51. package/web/assets/{cynefin-VYW2F7L2-deqxDK2d.js → cynefin-VYW2F7L2-CBHvDLlv.js} +1 -1
  52. package/web/assets/cynefinDiagram-5FMLGOSQ-H3WIRU3N-CM4Mj-Vd.js +62 -0
  53. package/web/assets/cynefinDiagram-MW4NZA55-aMzbAFWs.js +62 -0
  54. package/web/assets/dagre-3AP2YEHR-DCERTXHT-BMVGWTPf.js +4 -0
  55. package/web/assets/{dagre-VZM6K2ZE-CGNHDakS.js → dagre-VZM6K2ZE-DhQcrBKB.js} +2 -2
  56. package/web/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-5voVPcsN.js} +1 -1
  57. package/web/assets/{diagram-7IWD3JNH-D_gUTAQc.js → diagram-7IWD3JNH-neTaugq1.js} +4 -4
  58. package/web/assets/{diagram-B4RE2ZJO-YGyPH2BM.js → diagram-B4RE2ZJO-D9KmoYBV.js} +3 -3
  59. package/web/assets/diagram-LBJQPF4R-9J-F2MVE.js +24 -0
  60. package/web/assets/diagram-Q27KOJAE-Dz9KITJh.js +24 -0
  61. package/web/assets/diagram-S7CK7UJ4-MULGZGEL-r3BljA8e.js +30 -0
  62. package/web/assets/diagram-UB23O5K3-BA5gPgQ7.js +41 -0
  63. package/web/assets/diagram-UQ7AKVKN-YQBY353J-IIvT6Y42.js +41 -0
  64. package/web/assets/diagram-VSXAHHWV-WLNH2ELY-BMCz6ope.js +3 -0
  65. package/web/assets/diagram-VX7I27RA-XW6YQV5G-Z3lYjMVR.js +24 -0
  66. package/web/assets/diagram-Z3DM3KII-HG7RF65D-CsLqhzUJ.js +24 -0
  67. package/web/assets/diff-D97Zzqfu.js +1 -0
  68. package/web/assets/dockerfile-BcOcwvcX.js +1 -0
  69. package/web/assets/ebnfDiagram-BXEA7PRR-BoUlG0c_.js +1 -0
  70. package/web/assets/ebnfDiagram-PWID7BFC-OKY4VHYD-CgMcEf9P.js +1 -0
  71. package/web/assets/elk.bundled-DjGexDyy.js +24 -0
  72. package/web/assets/engine-javascript-DBd1bXLz.js +141 -0
  73. package/web/assets/{erDiagram-JOGREHBK-BuY7vR4r.js → erDiagram-JOGREHBK-DV_Tzdk0.js} +4 -4
  74. package/web/assets/erDiagram-SSCWMZ5O-PIPKOIK7-Ct9t5yN5.js +99 -0
  75. package/web/assets/flowDiagram-A5DVABFB-2Z4AVO5R-C4iDReFc.js +168 -0
  76. package/web/assets/{flowDiagram-UKHOOZJN-TxEOjs8K.js → flowDiagram-UKHOOZJN-DvQGnBrF.js} +10 -10
  77. package/web/assets/ganttDiagram-EL5Y4UJY-JZNG7GOG-BPWBTDqB.js +292 -0
  78. package/web/assets/ganttDiagram-PKOTCBZU-7gjvaw6I.js +292 -0
  79. package/web/assets/{gitGraphDiagram-DS77QQ5N-rZzK4UXV.js → gitGraphDiagram-DS77QQ5N-B54T3l5T.js} +7 -7
  80. package/web/assets/gitGraphDiagram-WWUBYQGX-DMWMLL3G-CmG0_dMg.js +106 -0
  81. package/web/assets/github-dark-DHJKELXO.js +1 -0
  82. package/web/assets/github-light-DAi9KRSo.js +1 -0
  83. package/web/assets/go-C27-OAKa.js +1 -0
  84. package/web/assets/graphql-ChdNCCLP.js +1 -0
  85. package/web/assets/html-pp8916En.js +1 -0
  86. package/web/assets/{index-DFfbtrtQ.js → index-B6q9ygFx.js} +9 -9
  87. package/web/assets/index-CU6ublfJ.js +1 -0
  88. package/web/assets/index-CvYzv8kf.js +1 -0
  89. package/web/assets/index-Cz8nGS3-.css +1 -0
  90. package/web/assets/index-H1bePBGl.js +3 -0
  91. package/web/assets/index-yzG6be5R.js +416 -0
  92. package/web/assets/infoDiagram-6WML65LV-BJSGxY2D.js +2 -0
  93. package/web/assets/infoDiagram-RXCK75RN-HANS5KVC-Cz3Y1Unl.js +2 -0
  94. package/web/assets/ini-BEwlwnbL.js +1 -0
  95. package/web/assets/ishikawaDiagram-5VMMS53U-7GCIT7WU-BT6MsYfb.js +70 -0
  96. package/web/assets/{ishikawaDiagram-WSZJBQD7-B4Ja0YPZ.js → ishikawaDiagram-WSZJBQD7-BsYCRLYP.js} +6 -6
  97. package/web/assets/java-CylS5w8V.js +1 -0
  98. package/web/assets/javascript-wDzz0qaB.js +1 -0
  99. package/web/assets/journeyDiagram-EYS64GPL-OAPELBT7-Bx1wxARt.js +139 -0
  100. package/web/assets/{journeyDiagram-NVQOT4AX-BmhpGG29.js → journeyDiagram-NVQOT4AX-DkJv2QF6.js} +2 -2
  101. package/web/assets/json-Cp-IABpG.js +1 -0
  102. package/web/assets/jsx-g9-lgVsj.js +1 -0
  103. package/web/assets/{kanban-definition-27J2QSJJ-CiuTLc9W.js → kanban-definition-27J2QSJJ-BCWiZznF.js} +8 -8
  104. package/web/assets/kanban-definition-3QL26DDD-I7RKWQQY-uHjeKCG_.js +89 -0
  105. package/web/assets/katex-N6JRN4PM-D4hrRJKq.js +257 -0
  106. package/web/assets/kotlin-BdnUsdx6.js +1 -0
  107. package/web/assets/latex-B2nUCzCX.js +1 -0
  108. package/web/assets/linear-BHfMepXe.js +1 -0
  109. package/web/assets/lua-BaeVxFsk.js +1 -0
  110. package/web/assets/main-B239_4z1.js +796 -0
  111. package/web/assets/makefile-CHLpvVh8.js +1 -0
  112. package/web/assets/markdown-Cvjx9yec.js +1 -0
  113. package/web/assets/mermaid-layout-elk.core-C4McJve2.js +2 -0
  114. package/web/assets/mermaid.core-CmjrekXI.js +314 -0
  115. package/web/assets/min-tv6RD-6E.js +1 -0
  116. package/web/assets/{mindmap-definition-FAOFIHXS-Bt-VPht2.js → mindmap-definition-FAOFIHXS-PIVNjK20.js} +4 -4
  117. package/web/assets/mindmap-definition-FBJOCRG2-KIYZG64Y-C8ko7Fkc.js +96 -0
  118. package/web/assets/pegDiagram-VL7TDLO6-D0oejFBc.js +1 -0
  119. package/web/assets/pegDiagram-XKGWAZYB-OIP57N6J-Cqs1jeYc.js +1 -0
  120. package/web/assets/{pet-a4xGZJ4o.js → pet-CZ36ImJS.js} +1 -1
  121. package/web/assets/php-Csjmro_R.js +1 -0
  122. package/web/assets/pie-xhYaZtwS.js +1 -0
  123. package/web/assets/pieDiagram-7S7Q4E2Y-CdvhM-aN.js +39 -0
  124. package/web/assets/pieDiagram-E7YTZNPT-2UOTW327-BMlCBlPI.js +39 -0
  125. package/web/assets/python-B6aJPvgy.js +1 -0
  126. package/web/assets/quadrantDiagram-AXDQQJYC-SN3ASJJK-CEEgxhrf.js +7 -0
  127. package/web/assets/{quadrantDiagram-CIZ2JOQS-B-1McWhJ.js → quadrantDiagram-CIZ2JOQS-BrKm5erH.js} +2 -2
  128. package/web/assets/r-Cf5RLm7j.js +1 -0
  129. package/web/assets/railroadDiagram-AXF67PYL-CJudf8AD.js +1 -0
  130. package/web/assets/railroadDiagram-O6MQD6OU-34742W6X-C8RacTGn.js +1 -0
  131. package/web/assets/render-O7CIS3YK-BtRzL6gS.js +354 -0
  132. package/web/assets/requirementDiagram-EFPCY7ZU-NGAFFSMB-CTXLwcL9.js +84 -0
  133. package/web/assets/{requirementDiagram-LRYGKXZP-BVqLmmFw.js → requirementDiagram-LRYGKXZP-mS__tKrf.js} +4 -4
  134. package/web/assets/ruby-B6QtyW_S.js +1 -0
  135. package/web/assets/rust-B1yitclQ.js +1 -0
  136. package/web/assets/sankeyDiagram-P5KCCOFB-3D3M4XPB-DyuDtBvQ.js +40 -0
  137. package/web/assets/sankeyDiagram-W5VNT64P-COKGPXfA.js +40 -0
  138. package/web/assets/scss-D5BDwBP9.js +1 -0
  139. package/web/assets/{sequenceDiagram-SI44F4Z6-7pBYtwXq.js → sequenceDiagram-SI44F4Z6-CNMY38eS.js} +3 -3
  140. package/web/assets/sequenceDiagram-WJ2MYXX4-Q2IOPB4R-_u4WjXk1.js +162 -0
  141. package/web/assets/shellscript-Yzrsuije.js +1 -0
  142. package/web/assets/sizeCapture-X5ZJPWSS-DWdLSp6i.js +1 -0
  143. package/web/assets/sizeCapture-X5ZJPWSS-PSGVOMYM-Cs-f36Xi.js +1 -0
  144. package/web/assets/sql-CRqJ_cUM.js +1 -0
  145. package/web/assets/stateDiagram-HBIQ2CUA-4M2S6MAN-D3Vb1Yoi.js +1 -0
  146. package/web/assets/stateDiagram-OKZ733FA-DWpXAgAW.js +1 -0
  147. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-C6PXffxU.js +1 -0
  148. package/web/assets/stateDiagram-v2-UEYNNEHI-D3rCYZ7F.js +1 -0
  149. package/web/assets/step-SI6FXFD6.js +1 -0
  150. package/web/assets/swift-C2oV4EkX.js +1 -0
  151. package/web/assets/swimlanes-SLNWSIFB--qlM3PH1.js +2 -0
  152. package/web/assets/swimlanes-XN3QIQJK-N6N2CCQ6-Dq7F7g7w.js +1 -0
  153. package/web/assets/swimlanesDiagram-ULZ7WXOC-C2JzshU-.js +8 -0
  154. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-C1mY3FR0.js +8 -0
  155. package/web/assets/time-CLfYygnx.js +1 -0
  156. package/web/assets/timeline-definition-24CTP7MA-KN7RSRVM-BRP9kk4o.js +120 -0
  157. package/web/assets/{timeline-definition-Z64GVDOM-CPyFZDbL.js → timeline-definition-Z64GVDOM-CGIURnLx.js} +4 -4
  158. package/web/assets/toml-vGWfd6FD.js +1 -0
  159. package/web/assets/transform-CzGDKG_M.js +1 -0
  160. package/web/assets/tsx-COt5Ahok.js +1 -0
  161. package/web/assets/typescript-BPQ3VLAy.js +1 -0
  162. package/web/assets/vennDiagram-4TSXK5OY-AKJ7LXAN-Row28BrM.js +34 -0
  163. package/web/assets/{vennDiagram-T6HMQDX7-CrYCZIBM.js → vennDiagram-T6HMQDX7-CCAqbOji.js} +5 -5
  164. package/web/assets/vue-CHlpWS_5.js +1 -0
  165. package/web/assets/{wardleyDiagram-T6FBY63Y-C-bOW3CV.js → wardleyDiagram-T6FBY63Y-BsHQ7eqA.js} +2 -2
  166. package/web/assets/wardleyDiagram-VM6X3IG4-3B6A3BN5-DBcNZZDs.js +78 -0
  167. package/web/assets/xml-sdJ4AIDG.js +1 -0
  168. package/web/assets/xychartDiagram-ELKLHX3M-Bdjq4REQ.js +7 -0
  169. package/web/assets/xychartDiagram-S5SC5T6Z-OBDNV6WG-ClGm8SGz.js +7 -0
  170. package/web/assets/yaml-Buea-lGh.js +1 -0
  171. package/web/index.html +3 -3
  172. package/web/pet.html +3 -3
  173. package/web/assets/abnfDiagram-N423BO3Z-BgfNjjBj.js +0 -1
  174. package/web/assets/api-web-DI50TDfG.js +0 -1
  175. package/web/assets/arc-RE7zZVS-.js +0 -1
  176. package/web/assets/channel-BhfjE8vu.js +0 -1
  177. package/web/assets/chunk-2GRJ4B5K-Cam0QBnt.js +0 -1
  178. package/web/assets/chunk-KBJHAD2P-BsrsrevO.js +0 -1
  179. package/web/assets/chunk-XXDRQBXY-BtPTE4dn.js +0 -1
  180. package/web/assets/classDiagram-JCYQIIEL-mL7PrSyJ.js +0 -1
  181. package/web/assets/classDiagram-v2-OCEON4UE-mL7PrSyJ.js +0 -1
  182. package/web/assets/cynefinDiagram-MW4NZA55-BVpP0nLh.js +0 -62
  183. package/web/assets/diagram-LBJQPF4R-B32aZsIz.js +0 -24
  184. package/web/assets/diagram-Q27KOJAE-DwwhihNN.js +0 -24
  185. package/web/assets/diagram-UB23O5K3-BdxB0b3R.js +0 -41
  186. package/web/assets/ebnfDiagram-BXEA7PRR-PAN05I_q.js +0 -1
  187. package/web/assets/ganttDiagram-PKOTCBZU-BqnBC4Aw.js +0 -292
  188. package/web/assets/index-D8iAKGNi.css +0 -1
  189. package/web/assets/infoDiagram-6WML65LV-B4sR-B3M.js +0 -2
  190. package/web/assets/linear-l0VVDmXM.js +0 -1
  191. package/web/assets/main-5hScumEl.js +0 -792
  192. package/web/assets/mermaid.core-DZ6Z8vWa.js +0 -314
  193. package/web/assets/pegDiagram-VL7TDLO6-CANPvqfq.js +0 -1
  194. package/web/assets/pieDiagram-7S7Q4E2Y-HpK8uEiY.js +0 -39
  195. package/web/assets/railroadDiagram-AXF67PYL-DA507-no.js +0 -1
  196. package/web/assets/sankeyDiagram-W5VNT64P-WV_Swfln.js +0 -40
  197. package/web/assets/sizeCapture-X5ZJPWSS-Ba9eWTxX.js +0 -1
  198. package/web/assets/stateDiagram-OKZ733FA-lonr0yA-.js +0 -1
  199. package/web/assets/stateDiagram-v2-UEYNNEHI-Dt1VC3TV.js +0 -1
  200. package/web/assets/swimlanes-SLNWSIFB-BSQT7r6F.js +0 -2
  201. package/web/assets/swimlanesDiagram-ULZ7WXOC-Dhdnb080.js +0 -8
  202. package/web/assets/xychartDiagram-ELKLHX3M-BB-TjDfD.js +0 -7
@@ -0,0 +1,162 @@
1
+ import{I as rr}from"./chunk-RE4WF27V-ANjTafEs.js";import{_ as x,K as ar,c as tt,l as nt,d as sr,e as ir,i as N,b as Ye,s as nr,n as or,a as cr,g as lr,o as hr,L as dr,M as Tr,p as pr,h as Wt,z as Q,N as $,O as vt,r as Er,H as Fe,Z as ur,A as Ht,P as fr,Q as He}from"./render-O7CIS3YK-BtRzL6gS.js";import{a as _r,g as ne,b as Tt,d as gr,c as oe,e as ce}from"./chunk-LV3HUYFY-D3kDosNp.js";import{_ as B,a as xr}from"./mermaid-layout-elk.core-C4McJve2.js";import{s as Kt}from"./transform-CzGDKG_M.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./step-SI6FXFD6.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var qe=xr(Er()),ae=(function(){var e=x(function(ft,w,v,k){for(v=v||{},k=ft.length;k--;v[ft[k]]=w);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],p=[1,14],h=[1,15],E=[1,17],_=[1,18],u=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],P=[1,32],S=[1,33],m=[1,34],M=[1,35],Y=[1,36],W=[1,37],U=[1,38],F=[1,39],J=[1,40],j=[1,42],et=[1,43],G=[1,44],ot=[1,45],rt=[1,46],K=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],wt=[1,74],Ct=[1,80],A=[1,81],D=[1,82],at=[1,83],st=[1,84],H=[1,85],bt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],Ie=[1,94],ye=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],Ae=[1,100],Se=[1,101],me=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[2,78],Nt=[4,5,17,51,53,54],Mt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],De=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Xt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Jt=[5,52],q=[70,71,72,73],lt=[1,151],Zt={trace:x(B(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(B(function(w,v,k,y,X,c,kt){var d=c.length-1;switch(X){case 3:return y.apply(c[d]),c[d];case 4:case 10:this.$=[];break;case 5:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 6:case 7:case 12:case 13:this.$=c[d];break;case 8:case 9:case 14:this.$=[];break;case 16:c[d].type="createParticipant",this.$=c[d];break;case 17:c[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-1].actor};break;case 30:y.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 31:y.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 32:this.$=c[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[d].trim(),y.setAccDescription(this.$);break;case 35:c[d-1].unshift({type:"loopStart",loopText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 36:c[d-1].unshift({type:"rectStart",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[d-1];break;case 37:c[d-1].unshift({type:"optStart",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"altStart",altText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"breakStart",breakText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 44:this.$=c[d-3].concat([{type:"option",optionText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 46:this.$=c[d-3].concat([{type:"and",parText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.PAR_AND},c[d]]);break;case 48:this.$=c[d-3].concat([{type:"else",altText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.ALT_ELSE},c[d]]);break;case 49:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 50:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 51:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 52:case 57:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 53:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 58:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 59:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 63:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 66:this.$=[c[d-2],c[d]];break;case 67:this.$=c[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor}];break;case 71:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-4].actor}];break;case 72:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor}];break;case 73:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-4].actor}];break;case 74:this.$=[c[d-5],c[d-1],{type:"addMessage",from:c[d-5].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-5].actor}];break;case 75:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 76:this.$={type:"addParticipant",actor:c[d-1],config:c[d]};break;case 77:this.$=c[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[d].trim().substring(1));break}},"anonymous"),"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},e(C,[2,5]),{9:48,13:13,14:p,15:h,18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:F,54:J},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:K},{23:56,73:K},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:wt},{23:75,55:76,73:wt},{23:77,73:K},{69:78,72:[1,79],78:Ct,79:A,80:D,81:at,82:st,83:H,84:bt,85:pe,86:Ee,87:ue,88:fe,89:_e,90:ge,91:xe,92:Ie,93:ye,94:Re,95:Oe,96:Le,97:be,98:Ae,99:Se,100:me,101:we,102:Ne,103:Pe},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:K},{23:111,73:K},{23:112,73:K},{23:113,73:K},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ke),e(C,[2,6]),e(C,[2,16]),e(Nt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Mt,i,{7:120}),e(Mt,i,{7:121}),e(Mt,i,{7:122}),e(De,i,{41:123,7:124}),e(Xt,i,{43:125,7:126}),e(Xt,i,{7:126,43:127}),e(ve,i,{46:128,7:129}),e(Mt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Jt,ke,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:K},{69:146,78:Ct,79:A,80:D,81:at,82:st,83:H,84:bt,85:pe,86:Ee,87:ue,88:fe,89:_e,90:ge,91:xe,92:Ie,93:ye,94:Re,95:Oe,96:Le,97:be,98:Ae,99:Se,100:me,101:we,102:Ne,103:Pe},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:K},{23:149,60:148,73:K},{73:[2,68]},{73:[2,69]},{58:150,104:lt},{58:152,104:lt},{58:153,104:lt},{58:154,104:lt},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:F,54:J},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[1,161],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[1,162],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[1,163],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[2,47],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,50:[1,165],51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[2,45],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,49:[1,167],51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[2,43],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,48:[1,170],51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{4:n,5:s,8:8,9:10,10:o,13:13,14:p,15:h,17:[1,171],18:16,19:E,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:m,44:M,45:Y,47:W,51:U,53:F,54:J,56:j,61:et,62:G,63:ot,64:rt,73:K},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Jt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:K},{23:178,73:K},{23:179,73:K},{58:180,104:lt},{23:181,72:[1,182],73:K},{58:183,104:lt},{58:184,104:lt},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(Nt,[2,11]),{13:186,51:U,53:F,54:J},e(Nt,[2,13]),e(Nt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:lt},{58:196,104:lt},{58:197,104:lt},{5:[2,75]},{58:198,104:lt},{23:199,73:K},{5:[2,58]},{5:[2,59]},{23:200,73:K},e(Nt,[2,12]),e(De,i,{7:124,41:201}),e(Xt,i,{7:126,43:202}),e(ve,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Jt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(B(function(w,v){if(v.recoverable)this.trace(w);else{var k=new Error(w);throw k.hash=v,k}},"parseError"),"parseError"),parse:x(B(function(w){var v=this,k=[0],y=[],X=[null],c=[],kt=this.table,d="",Bt=0,Ce=0,je=2,Me=1,tr=c.slice.call(arguments,1),Z=Object.create(this.lexer),xt={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(xt.yy[Qt]=this.yy[Qt]);Z.setInput(w,xt.yy),xt.yy.lexer=Z,xt.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var $t=Z.yylloc;c.push($t);var er=Z.options&&Z.options.ranges;typeof xt.yy.parseError=="function"?this.parseError=xt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Be(ct){k.length=k.length-2*ct,X.length=X.length-ct,c.length=c.length-ct}B(Be,"popStack"),x(Be,"popStack");function jt(){var ct;return ct=y.pop()||Z.lex()||Me,typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=v.symbols_[ct]||ct),ct}B(jt,"lex"),x(jt,"lex");for(var it,It,ht,te,At={},Vt,pt,Ve,Yt;;){if(It=k[k.length-1],this.defaultActions[It]?ht=this.defaultActions[It]:((it===null||typeof it>"u")&&(it=jt()),ht=kt[It]&&kt[It][it]),typeof ht>"u"||!ht.length||!ht[0]){var ee="";Yt=[];for(Vt in kt[It])this.terminals_[Vt]&&Vt>je&&Yt.push("'"+this.terminals_[Vt]+"'");Z.showPosition?ee="Parse error on line "+(Bt+1)+`:
2
+ `+Z.showPosition()+`
3
+ Expecting `+Yt.join(", ")+", got '"+(this.terminals_[it]||it)+"'":ee="Parse error on line "+(Bt+1)+": Unexpected "+(it==Me?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(ee,{text:Z.match,token:this.terminals_[it]||it,line:Z.yylineno,loc:$t,expected:Yt})}if(ht[0]instanceof Array&&ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+It+", token: "+it);switch(ht[0]){case 1:k.push(it),X.push(Z.yytext),c.push(Z.yylloc),k.push(ht[1]),it=null,Ce=Z.yyleng,d=Z.yytext,Bt=Z.yylineno,$t=Z.yylloc;break;case 2:if(pt=this.productions_[ht[1]][1],At.$=X[X.length-pt],At._$={first_line:c[c.length-(pt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(pt||1)].first_column,last_column:c[c.length-1].last_column},er&&(At._$.range=[c[c.length-(pt||1)].range[0],c[c.length-1].range[1]]),te=this.performAction.apply(At,[d,Ce,Bt,xt.yy,ht[1],X,c].concat(tr)),typeof te<"u")return te;pt&&(k=k.slice(0,-1*pt*2),X=X.slice(0,-1*pt),c=c.slice(0,-1*pt)),k.push(this.productions_[ht[1]][0]),X.push(At.$),c.push(At._$),Ve=kt[k[k.length-2]][k[k.length-1]],k.push(Ve);break;case 3:return!0}}return!0},"parse"),"parse")},$e=(function(){var ft={EOF:1,parseError:x(B(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),"parseError"),setInput:x(function(w,v){return this.yy=v||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var v=w.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:x(function(w){var v=w.length,k=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var X=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:k?(k.length===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[X[0],X[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(w){this.unput(this.match.slice(w))},"less"),pastInput:x(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var w=this.pastInput(),v=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+v+"^"},"showPosition"),test_match:x(function(w,v){var k,y,X;if(this.options.backtrack_lexer&&(X={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&&(X.yylloc.range=this.yylloc.range.slice(0))),y=w[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],k=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var c in X)this[c]=X[c];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,v,k,y;this._more||(this.yytext="",this.match="");for(var X=this._currentRules(),c=0;c<X.length;c++)if(k=this._input.match(this.rules[X[c]]),k&&(!v||k[0].length>v[0].length)){if(v=k,y=c,this.options.backtrack_lexer){if(w=this.test_match(k,X[c]),w!==!1)return w;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(w=this.test_match(v,X[y]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(B(function(){var v=this.next();return v||this.lex()},"lex"),"lex"),begin:x(B(function(v){this.conditionStack.push(v)},"begin"),"begin"),popState:x(B(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:x(B(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"),"_currentRules"),topState:x(B(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),"topState"),pushState:x(B(function(v){this.begin(v)},"pushState"),"pushState"),stateStackSize:x(B(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:x(B(function(v,k,y,X){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return k.yytext=k.yytext.trim(),73;case 12:return k.yytext=k.yytext.trim(),this.begin("ALIAS"),73;case 13:return k.yytext=k.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return k.yytext=k.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return k.yytext=k.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return ft})();Zt.lexer=$e;function Pt(){this.yy={}}return B(Pt,"Parser"),x(Pt,"Parser"),Pt.prototype=Zt,Zt.Parser=Pt,new Pt})();ae.parser=ae;var Ir=ae,yr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},Rr={FILLED:0,OPEN:1},Or={LEFTOF:0,RIGHTOF:1,OVER:2},Ft={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},Rt,Lr=(Rt=class{constructor(){this.state=new rr(()=>({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=Ye,this.setAccDescription=nr,this.setDiagramTitle=or,this.getAccTitle=cr,this.getAccDescription=lr,this.getDiagramTitle=hr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(tt().wrap),this.LINETYPE=yr,this.ARROWTYPE=Rr,this.PLACEMENT=Or}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,a,r,i,n){let s=this.state.records.currentBox,o;if(n!==void 0){let h;n.includes(`
7
+ `)?h=n+`
8
+ `:h=`{
9
+ `+n+`
10
+ }`,o=dr(h,{schema:Tr})}i=(o==null?void 0:o.type)??i,o!=null&&o.alias&&(!r||r.text===a)&&(r={text:o.alias,wrap:r==null?void 0:r.wrap,type:i});const p=this.state.records.actors.get(t);if(p){if(this.state.records.currentBox&&p.box&&this.state.records.currentBox!==p.box)throw new Error(`A same participant should only be defined in one Box: ${p.name} can't be in '${p.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=p.box?p.box:this.state.records.currentBox,p.box=s,p&&a===p.name&&r==null)return}if((r==null?void 0:r.text)==null&&(r={text:a,type:i}),(i==null||r.text==null)&&(r={text:a,type:i}),this.state.records.actors.set(t,{box:s,name:a,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const h=this.state.records.actors.get(this.state.records.prevActor);h&&(h.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let a,r=0;if(!t)return 0;for(a=0;a<this.state.records.messages.length;a++)this.state.records.messages[a].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[a].from===t&&r++,this.state.records.messages[a].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[a].from===t&&r--;return r}addMessage(t,a,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(t,a,r,i,n=!1,s){if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const p=new Error("Trying to inactivate an inactive participant ("+t+")");throw p.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},p}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:(r==null?void 0:r.text)??"",wrap:(r==null?void 0:r.wrap)??this.autoWrap(),type:i,activate:n,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const a=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(a===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:a}}autoWrap(){var t;return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:((t=tt().sequence)==null?void 0:t.wrap)??!1}clear(){this.state.reset(),pr()}parseMessage(t){const a=t.trim(),{wrap:r,cleanedText:i}=this.extractWrap(a),n={text:i,wrap:r};return nt.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(t){const a=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=a!=null&&a[1]?a[1].trim():"transparent",i=a!=null&&a[2]?a[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const o=new Option().style;o.color=r,o.color!==r&&(r="transparent",i=t.trim())}const{wrap:n,cleanedText:s}=this.extractWrap(i);return{text:s?Wt(s,tt()):void 0,color:r,wrap:n}}addNote(t,a,r){const i={actor:t,placement:a,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:a})}addLinks(t,a){const r=this.getActor(t);try{let i=Wt(a.text,tt());i=i.replace(/&equals;/g,"="),i=i.replace(/&amp;/g,"&");const n=JSON.parse(i);this.insertLinks(r,n)}catch(i){nt.error("error while parsing actor link text",i)}}addALink(t,a){const r=this.getActor(t);try{const i={};let n=Wt(a.text,tt());const s=n.indexOf("@");n=n.replace(/&equals;/g,"="),n=n.replace(/&amp;/g,"&");const o=n.slice(0,s-1).trim(),p=n.slice(s+1).trim();i[o]=p,this.insertLinks(r,i)}catch(i){nt.error("error while parsing actor link text",i)}}insertLinks(t,a){if(t.links==null)t.links=a;else for(const r in a)t.links[r]=a[r]}addProperties(t,a){const r=this.getActor(t);try{const i=Wt(a.text,tt()),n=JSON.parse(i);this.insertProperties(r,n)}catch(i){nt.error("error while parsing actor properties text",i)}}insertProperties(t,a){if(t.properties==null)t.properties=a;else for(const r in a)t.properties[r]=a[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,a){const r=this.getActor(t),i=document.getElementById(a.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&this.insertProperties(r,s.properties),s.links&&this.insertLinks(r,s.links)}catch(n){nt.error("error while parsing actor details text",n)}}getActorProperty(t,a){if((t==null?void 0:t.properties)!==void 0)return t.properties[a]}apply(t){if(Array.isArray(t))t.forEach(a=>{this.apply(a)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Ye(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return tt().sequence}},B(Rt,"SequenceDB"),x(Rt,"SequenceDB"),Rt),br=x(e=>{const t=e.dropShadow??"none",{look:a}=tt();return`.actor {
11
+ stroke: ${e.actorBorder};
12
+ fill: ${e.actorBkg};
13
+ stroke-width: ${e.strokeWidth??1};
14
+ }
15
+
16
+ rect.actor.outer-path[data-look="neo"] {
17
+ filter: ${t};
18
+ }
19
+
20
+ rect.note[data-look="neo"] {
21
+ stroke:${e.noteBorderColor};
22
+ fill:${e.noteBkgColor};
23
+ filter: ${t};
24
+ }
25
+
26
+ text.actor > tspan {
27
+ fill: ${e.actorTextColor};
28
+ stroke: none;
29
+ }
30
+
31
+ .actor-line {
32
+ stroke: ${e.actorLineColor};
33
+ }
34
+
35
+ .innerArc {
36
+ stroke-width: 1.5;
37
+ stroke-dasharray: none;
38
+ }
39
+
40
+ .messageLine0 {
41
+ stroke-width: 1.5;
42
+ stroke-dasharray: none;
43
+ stroke: ${e.signalColor};
44
+ }
45
+
46
+ .messageLine1 {
47
+ stroke-width: 1.5;
48
+ stroke-dasharray: 2, 2;
49
+ stroke: ${e.signalColor};
50
+ }
51
+
52
+ [id$="-arrowhead"] path {
53
+ fill: ${e.signalColor};
54
+ stroke: ${e.signalColor};
55
+ }
56
+
57
+ .sequenceNumber {
58
+ fill: ${e.sequenceNumberColor};
59
+ }
60
+
61
+ [id$="-sequencenumber"] {
62
+ fill: ${e.signalColor};
63
+ }
64
+
65
+ [id$="-crosshead"] path {
66
+ fill: ${e.signalColor};
67
+ stroke: ${e.signalColor};
68
+ }
69
+
70
+ .messageText {
71
+ fill: ${e.signalTextColor};
72
+ stroke: none;
73
+ }
74
+
75
+ .labelBox {
76
+ stroke: ${e.labelBoxBorderColor};
77
+ fill: ${e.labelBoxBkgColor};
78
+ filter: ${a==="neo"?t:"none"};
79
+ }
80
+
81
+ .labelText, .labelText > tspan {
82
+ fill: ${e.labelTextColor};
83
+ stroke: none;
84
+ }
85
+
86
+ .loopText, .loopText > tspan {
87
+ fill: ${e.loopTextColor};
88
+ stroke: none;
89
+ }
90
+
91
+ .sectionTitle, .sectionTitle > tspan {
92
+ fill: ${e.loopTextColor};
93
+ stroke: none;
94
+ }
95
+
96
+ .loopLine {
97
+ stroke-width: 2px;
98
+ stroke-dasharray: 2, 2;
99
+ stroke: ${e.labelBoxBorderColor};
100
+ fill: ${e.labelBoxBorderColor};
101
+ }
102
+
103
+ .note {
104
+ //stroke: #decc93;
105
+ stroke: ${e.noteBorderColor};
106
+ fill: ${e.noteBkgColor};
107
+ }
108
+
109
+ .noteText, .noteText > tspan {
110
+ fill: ${e.noteTextColor};
111
+ stroke: none;
112
+ ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""}
113
+ }
114
+
115
+ .activation0 {
116
+ fill: ${e.activationBkgColor};
117
+ stroke: ${e.activationBorderColor};
118
+ }
119
+
120
+ .activation1 {
121
+ fill: ${e.activationBkgColor};
122
+ stroke: ${e.activationBorderColor};
123
+ }
124
+
125
+ .activation2 {
126
+ fill: ${e.activationBkgColor};
127
+ stroke: ${e.activationBorderColor};
128
+ }
129
+
130
+ .actorPopupMenu {
131
+ position: absolute;
132
+ }
133
+
134
+ .actorPopupMenuPanel {
135
+ position: absolute;
136
+ fill: ${e.actorBkg};
137
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
138
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
139
+ }
140
+ .actor-man circle, line {
141
+ fill: ${e.actorBkg};
142
+ stroke-width: 2px;
143
+ }
144
+
145
+ g rect.rect {
146
+ filter: ${t};
147
+ stroke: ${e.nodeBorder};
148
+ }
149
+ `},"getStyles"),Ar=br,yt=36,_t="actor-top",gt="actor-bottom",zt="actor-box",Ot="actor-man",Et=new Set(["redux-color","redux-dark-color"]),Dt=x(function(e,t){const a=gr(e,t);return Ht().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Sr=x(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,s=t.actorCnt,o=t.rectData;var p="none";i&&(p="block !important");const h=e.append("g");h.attr("id","actor"+s+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",p);var E="";o.class!==void 0&&(E=" "+o.class);let _=o.width>a?o.width:a;const u=h.append("rect");if(u.attr("class","actorPopupMenuPanel"+E),u.attr("x",o.x),u.attr("y",o.height),u.attr("fill",o.fill),u.attr("stroke",o.stroke),u.attr("width",_),u.attr("height",o.height),u.attr("rx",o.rx),u.attr("ry",o.ry),n!=null){var O=20;for(let f in n){var T=h.append("a"),g=(0,qe.sanitizeUrl)(n[f]);T.attr("xlink:href",g),T.attr("target","_blank"),Zr(r)(f,T,o.x+10,o.height+O,_,20,{class:"actor"},r),O+=30}}return u.attr("height",O),{height:o.height+O,width:_}},"drawPopup"),Ut=x(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),qt=x(async function(e,t,a=null){let r=e.append("foreignObject");const i=await He(t.text,Ht()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){const o=e.node().firstChild;o.setAttribute("height",s.height+2*t.textMargin);const p=o.getBBox();r.attr("x",Math.round(p.x+p.width/2-s.width/2)).attr("y",Math.round(p.y+p.height/2-s.height/2))}else if(a){let{startx:o,stopx:p,starty:h}=a;if(o>p){const E=o;o=p,p=E}r.attr("x",Math.round(o+Math.abs(o-p)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(h)):r.attr("y",Math.round(h-s.height))}return[r]},"drawKatex"),mt=x(function(e,t){let a=0,r=0;const i=t.text.split(N.lineBreakRegex),[n,s]=Fe(t.fontSize);let o=[],p=0,h=x(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=x(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=x(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=x(()=>Math.round(t.y+(a+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[E,_]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(p=E*n);const u=e.append("text");u.attr("x",t.x),u.attr("y",h()),t.anchor!==void 0&&u.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&u.style("font-family",t.fontFamily),s!==void 0&&u.style("font-size",s),t.fontWeight!==void 0&&u.style("font-weight",t.fontWeight),t.fill!==void 0&&u.attr("fill",t.fill),t.class!==void 0&&u.attr("class",t.class),t.dy!==void 0?u.attr("dy",t.dy):p!==0&&u.attr("dy",p);const O=_||ur;if(t.tspan){const T=u.append("tspan");T.attr("x",t.x),t.fill!==void 0&&T.attr("fill",t.fill),T.text(O)}else u.text(O);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,a=r),o.push(u)}return o},"drawText"),ze=x(function(e,t){function a(i,n,s,o,p){return i+","+n+" "+(i+s)+","+n+" "+(i+s)+","+(n+o-p)+" "+(i+s-p*1.2)+","+(n+o)+" "+i+","+(n+o)}B(a,"genPoints"),x(a,"genPoints");const r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,mt(e,t),r},"drawLabel"),V=-1,Ue=x((e,t,a,r)=>{e.select&&a.forEach(i=>{const n=t.get(i),s=e.select("#actor"+n.actorCnt);!r.mirrorActors&&n.stopy?s.attr("y2",n.stopy+n.height/2):r.mirrorActors&&s.attr("y2",n.stopy)})},"fixLifeLineHeights"),mr=x(function(e,t,a,r,i){var P,S;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:p,theme:h,themeVariables:E}=a,{bkgColorArray:_,borderColorArray:u}=E,O=e.append("g").lower();var T=O;r||(V++,Object.keys(t.links||{}).length&&!a.forceMenus&&T.attr("onclick",Ut(`actor${V}_popup`)).attr("cursor","pointer"),T.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),T=O.append("g"),t.actorCnt=V,t.links!=null&&T.attr("id","root-"+V),p==="neo"&&T.attr("data-look","neo"));const g=Tt();var f="actor";(P=t.properties)!=null&&P.class?f=t.properties.class:g.fill="#eaeaea",r?f+=` ${gt}`:f+=` ${_t}`,g.x=t.x,g.y=n,g.width=t.width,g.height=t.height,g.class=f,g.rx=3,g.ry=3,g.name=t.name,p==="neo"&&(g.rx=6,g.ry=6);const I=Dt(T,g),L=i.get(t.name)??0;if(Et.has(h)&&(I.style("stroke",u[L%u.length]),I.style("fill",_[L%u.length])),p==="neo"&&I.attr("filter","url(#drop-shadow)"),t.rectData=g,(S=t.properties)!=null&&S.icon){const m=t.properties.icon.trim();m.charAt(0)==="@"?oe(T,g.x+g.width-20,g.y+10,m.substr(1)):ce(T,g.x+g.width-20,g.y+10,m)}r||(T.attr("data-et","participant"),T.attr("data-type","participant"),T.attr("data-id",t.name)),ut(a,$(t.description))(t.description,T,g.x,g.y,g.width,g.height,{class:`actor ${zt}`},a);let b=t.height;if(I.node){const m=I.node().getBBox();t.height=m.height,b=m.height}return b},"drawActorTypeParticipant"),wr=x(function(e,t,a,r,i){var M,Y;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:p,theme:h,themeVariables:E}=a,{bkgColorArray:_,borderColorArray:u}=E,O=e.append("g").lower();var T=O;r||(V++,Object.keys(t.links||{}).length&&!a.forceMenus&&T.attr("onclick",Ut(`actor${V}_popup`)).attr("cursor","pointer"),T.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),T=O.append("g"),t.actorCnt=V,t.links!=null&&T.attr("id","root-"+V),p==="neo"&&T.attr("data-look","neo"));const g=Tt();var f="actor";(M=t.properties)!=null&&M.class?f=t.properties.class:g.fill="#eaeaea",r?f+=` ${gt}`:f+=` ${_t}`,g.x=t.x,g.y=n,g.width=t.width,g.height=t.height,g.class=f,g.name=t.name;const I=6,L={...g,x:g.x+-I,y:g.y+ +I,class:"actor"},b=Dt(T,g),P=Dt(T,L);t.rectData=g,p==="neo"&&T.attr("filter","url(#drop-shadow)");const S=i.get(t.name)??0;if(Et.has(h)&&(b.style("stroke",u[S%u.length]),b.style("fill",_[S%u.length]),P.style("stroke",u[S%u.length]),P.style("fill",_[S%u.length])),(Y=t.properties)!=null&&Y.icon){const W=t.properties.icon.trim();W.charAt(0)==="@"?oe(T,g.x+g.width-20,g.y+10,W.substr(1)):ce(T,g.x+g.width-20,g.y+10,W)}ut(a,$(t.description))(t.description,T,g.x-I,g.y+I,g.width,g.height,{class:`actor ${zt}`},a);let m=t.height;if(b.node){const W=b.node().getBBox();t.height=W.height,m=W.height}return r||(T.attr("data-et","participant"),T.attr("data-type","collections"),T.attr("data-id",t.name)),m},"drawActorTypeCollections"),Nr=x(function(e,t,a,r,i){var W,U;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height,{look:p,theme:h,themeVariables:E}=a,{bkgColorArray:_,borderColorArray:u}=E,O=e.append("g").lower();let T=O;r||(V++,Object.keys(t.links||{}).length&&!a.forceMenus&&T.attr("onclick",Ut(`actor${V}_popup`)).attr("cursor","pointer"),T.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),T=O.append("g"),t.actorCnt=V,t.links!=null&&T.attr("id","root-"+V),p==="neo"&&T.attr("data-look","neo"));const g=Tt();let f="actor";(W=t.properties)!=null&&W.class?f=t.properties.class:g.fill="#eaeaea",r?f+=` ${gt}`:f+=` ${_t}`,T.attr("class",f),g.x=t.x,g.y=n,g.width=t.width,g.height=t.height,g.name=t.name;const I=g.height/2,L=I/(2.5+g.height/50),b=T.append("g"),P=T.append("g"),S=`M ${g.x},${g.y+I}
150
+ a ${L},${I} 0 0 0 0,${g.height}
151
+ h ${g.width-2*L}
152
+ a ${L},${I} 0 0 0 0,-${g.height}
153
+ Z
154
+ `;b.append("path").attr("d",S),P.append("path").attr("d",`M ${g.x},${g.y+I}
155
+ a ${L},${I} 0 0 0 0,${g.height}`),b.attr("transform",`translate(${L}, ${-(g.height/2)})`),P.attr("transform",`translate(${g.width-L}, ${-g.height/2})`),t.rectData=g,p==="neo"&&b.attr("filter","url(#drop-shadow)");const m=i.get(t.name)??0;if(Et.has(h)&&(b.style("stroke",u[m%u.length]),b.style("fill",_[m%u.length]),P.style("stroke",u[m%u.length]),P.style("fill",_[m%u.length])),(U=t.properties)!=null&&U.icon){const F=t.properties.icon.trim(),J=g.x+g.width-20,j=g.y+10;F.charAt(0)==="@"?oe(T,J,j,F.substr(1)):ce(T,J,j,F)}ut(a,$(t.description))(t.description,T,g.x,g.y,g.width,g.height,{class:`actor ${zt}`},a);let M=t.height;const Y=b.select("path:last-child");if(Y.node()){const F=Y.node().getBBox();t.height=F.height,M=F.height}return r||(T.attr("data-et","participant"),T.attr("data-type","queue"),T.attr("data-id",t.name)),M},"drawActorTypeQueue"),Pr=x(function(e,t,a,r,i,n){var W;const s=r?t.stopy:t.starty,o=t.x+t.width/2,p=s+75,{look:h,theme:E,themeVariables:_}=a,{bkgColorArray:u,borderColorArray:O,actorBorder:T,actorBkg:g}=_,f=e.append("g").lower();r||(V++,f.append("line").attr("id","actor"+V).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=V);const I=e.append("g");let L=Ot;r?L+=` ${gt}`:L+=` ${_t}`,I.attr("class",L),I.attr("name",t.name);const b=Tt();b.x=t.x,b.y=s,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor";const P=t.x+t.width/2,S=s+32,m=22;I.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",P).attr("cy",S).attr("r",m).attr("filter",`${h==="neo"?"url(#drop-shadow)":""}`),I.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${P}, ${S-m})`);const M=n.get(t.name)??0;Et.has(E)?(I.style("stroke",O[M%O.length]),I.style("fill",u[M%O.length])):(I.style("stroke",T),I.style("fill",g));const Y=I.node().getBBox();return t.height=Y.height+2*(((W=a==null?void 0:a.sequence)==null?void 0:W.labelBoxHeight)??0),ut(a,$(t.description))(t.description,I,b.x,b.y+m+(r?5:12),b.width,b.height,{class:`actor ${Ot}`},a),r||(I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",t.name)),t.height},"drawActorTypeControl"),kr=x(function(e,t,a,r,i){var m;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+75,{look:p,theme:h,themeVariables:E}=a,{bkgColorArray:_,borderColorArray:u}=E,O=e.append("g").lower(),T=e.append("g");let g="actor";r?g+=` ${gt}`:g+=` ${_t}`,T.attr("class",g),T.attr("name",t.name);const f=Tt();f.x=t.x,f.y=n,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor";const I=t.x+t.width/2,L=n+(r?10:25),b=22;T.append("circle").attr("cx",I).attr("cy",L).attr("r",b).attr("width",t.width).attr("height",t.height),T.append("line").attr("x1",I-b).attr("x2",I+b).attr("y1",L+b).attr("y2",L+b).attr("stroke-width",2),p==="neo"&&T.attr("filter","url(#drop-shadow)");const P=i.get(t.name)??0;Et.has(h)&&(T.style("stroke",u[P%u.length]),T.style("fill",_[P%u.length]));const S=T.node().getBBox();return t.height=S.height+(((m=a==null?void 0:a.sequence)==null?void 0:m.labelBoxHeight)??0),r||(V++,O.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=V),ut(a,$(t.description))(t.description,T,f.x,f.y+(r?15:30),f.width,f.height,{class:`actor ${Ot}`},a),r?T.attr("transform",`translate(0, ${b})`):(T.attr("transform",`translate(0, ${b/2-5})`),T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Dr=x(function(e,t,a,r,i){var U;const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+t.height+2*a.boxTextMargin,{theme:p,themeVariables:h,look:E}=a,{bkgColorArray:_,borderColorArray:u,actorBorder:O}=h,T=e.append("g").lower();let g=T;r||(V++,Object.keys(t.links||{}).length&&!a.forceMenus&&g.attr("onclick",Ut(`actor${V}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=T.append("g"),t.actorCnt=V,t.links!=null&&g.attr("id","root-"+V),E==="neo"&&g.attr("data-look","neo"));const f=Tt();let I="actor";(U=t.properties)!=null&&U.class?I=t.properties.class:f.fill="#eaeaea",r?I+=` ${gt}`:I+=` ${_t}`,f.x=t.x,f.y=n,f.width=t.width,f.height=t.height,f.class=I,f.name=t.name,f.x=t.x,f.y=n;const L=f.width/3,b=f.width/3,P=L/2,S=P/(2.5+L/50),m=g.append("g");m.attr("class",I);const M=`
156
+ M ${f.x},${f.y+S}
157
+ a ${P},${S} 0 0 0 ${L},0
158
+ a ${P},${S} 0 0 0 -${L},0
159
+ l 0,${b-2*S}
160
+ a ${P},${S} 0 0 0 ${L},0
161
+ l 0,-${b-2*S}
162
+ `;m.append("path").attr("d",M),E==="neo"&&m.attr("filter","url(#drop-shadow)");const Y=i.get(t.name)??0;Et.has(p)?(m.style("stroke",u[Y%u.length]),m.style("fill",_[Y%u.length])):m.style("stroke",O),m.attr("transform",`translate(${L}, ${S})`),t.rectData=f,ut(a,$(t.description))(t.description,g,f.x,f.y+35,f.width,f.height,{class:`actor ${zt}`},a);const W=m.select("path:last-child");if(W.node()){const F=W.node().getBBox();t.height=F.height+(a.sequence.labelBoxHeight??0)}return r||(g.attr("data-et","participant"),g.attr("data-type","database"),g.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),vr=x(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+80,p=22,h=e.append("g").lower(),{look:E,theme:_,themeVariables:u}=a,{bkgColorArray:O,borderColorArray:T,actorBorder:g}=u;r||(V++,h.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=V);const f=e.append("g");let I=Ot;r?I+=` ${gt}`:I+=` ${_t}`,f.attr("class",I),f.attr("name",t.name);const L=Tt();L.x=t.x,L.y=n,L.fill="#eaeaea",L.width=t.width,L.height=t.height,L.class="actor",f.append("line").attr("id","actor-man-torso"+V).attr("x1",t.x+t.width/2-p*2.5).attr("y1",n+12).attr("x2",t.x+t.width/2-15).attr("y2",n+12),f.append("line").attr("id","actor-man-arms"+V).attr("x1",t.x+t.width/2-p*2.5).attr("y1",n+2).attr("x2",t.x+t.width/2-p*2.5).attr("y2",n+22),f.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+12).attr("r",p),E==="neo"&&f.attr("filter","url(#drop-shadow)");const b=i.get(t.name)??0;Et.has(_)?(f.style("stroke",T[b%T.length]),f.style("fill",O[b%T.length])):f.style("stroke",g);const P=f.node().getBBox();return t.height=P.height+(a.sequence.labelBoxHeight??0),ut(a,$(t.description))(t.description,f,L.x,L.y+15,L.width,L.height,{class:`actor ${Ot}`},a),f.attr("transform",`translate(0,${p/2+10})`),r||(f.attr("data-et","participant"),f.attr("data-type","boundary"),f.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),Cr=x(function(e,t,a,r,i){const n=r?t.stopy:t.starty,s=t.x+t.width/2,o=n+80,{look:p,theme:h,themeVariables:E}=a,{bkgColorArray:_,borderColorArray:u,actorBorder:O}=E,T=e.append("g").lower();r||(V++,T.append("line").attr("id","actor"+V).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=V);const g=e.append("g");let f=Ot;r?f+=` ${gt}`:f+=` ${_t}`,g.attr("class",f),g.attr("name",t.name),r||g.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);const I=p==="neo"?.5:1,L=p==="neo"?n+(1-I)*30:n;g.append("line").attr("id","actor-man-torso"+V).attr("x1",s).attr("y1",L+25*I).attr("x2",s).attr("y2",L+45*I),g.append("line").attr("id","actor-man-arms"+V).attr("x1",s-yt/2*I).attr("y1",L+33*I).attr("x2",s+yt/2*I).attr("y2",L+33*I),g.append("line").attr("x1",s-yt/2*I).attr("y1",L+60*I).attr("x2",s).attr("y2",L+45*I),g.append("line").attr("x1",s).attr("y1",L+45*I).attr("x2",s+(yt/2-2)*I).attr("y2",L+60*I);const b=g.append("circle");b.attr("cx",t.x+t.width/2),b.attr("cy",L+10*I),b.attr("r",15*I),b.attr("width",t.width*I),b.attr("height",t.height*I);const P=g.node().getBBox();t.height=P.height;const S=Tt();S.x=t.x,S.y=L,S.fill="#eaeaea",S.width=t.width,S.height=t.height/I,S.class="actor",S.rx=3,S.ry=3;const m=i.get(t.name)??0;return Et.has(h)?(g.style("stroke",u[m%u.length]),g.style("fill",_[m%u.length])):g.style("stroke",O),ut(a,$(t.description))(t.description,g,S.x,L+35*I-(p==="neo"?10:0),S.width,S.height,{class:`actor ${Ot}`},a),t.height},"drawActorTypeActor"),Mr=x(async function(e,t,a,r,i,n,s){const o=s??new Map([...n.db.getActors().values()].map((p,h)=>[p.name,h]));switch(t.type){case"actor":return await Cr(e,t,a,r,o);case"participant":return await mr(e,t,a,r,o);case"boundary":return await vr(e,t,a,r,o);case"control":return await Pr(e,t,a,r,i,o);case"entity":return await kr(e,t,a,r,o);case"database":return await Dr(e,t,a,r,o);case"collections":return await wr(e,t,a,r,o);case"queue":return await Nr(e,t,a,r,o)}},"drawActor"),Br=x(function(e,t,a){const i=e.append("g");Ge(i,t),t.name&&ut(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Vr=x(function(e){return e.append("g")},"anchorElement"),Yr=x(function(e,t,a,r,i,n,s){const{theme:o,themeVariables:p}=r,{bkgColorArray:h,borderColorArray:E,mainBkg:_}=p,u=Tt(),O=t.anchored,T=t.actor;u.x=t.startx,u.y=t.starty,u.class="activation"+i%3,u.width=t.stopx-t.startx,u.height=a-t.starty;const g=Dt(O,u),I=(s??new Map([...n.db.getActors().values()].map((L,b)=>[L.name,b]))).get(T)??0;Et.has(o)&&(g.style("stroke",E[I%E.length]),g.style("fill",h[I%E.length]??_))},"drawActivation"),Wr=x(async function(e,t,a,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:p,messageFontFamily:h,messageFontSize:E,messageFontWeight:_}=r,u=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),O=x(function(f,I,L,b){return u.append("line").attr("x1",f).attr("y1",I).attr("x2",L).attr("y2",b).attr("class","loopLine")},"drawLoopLine");O(t.startx,t.starty,t.stopx,t.starty),O(t.stopx,t.starty,t.stopx,t.stopy),O(t.startx,t.stopy,t.stopx,t.stopy),O(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(f){O(t.startx,f.y,t.stopx,f.y).style("stroke-dasharray","3, 3")});let T=ne();T.text=a,T.x=t.startx,T.y=t.starty,T.fontFamily=h,T.fontSize=E,T.fontWeight=_,T.anchor="middle",T.valign="middle",T.tspan=!1,T.width=Math.max(p??0,50),T.height=o+(r.look==="neo"?15:0)||20,T.textMargin=s,T.class="labelText",ze(u,T),T=Xe(),T.text=t.title,T.x=t.startx+p/2+(t.stopx-t.startx)/2,T.y=t.starty+n+s,T.anchor="middle",T.valign="middle",T.textMargin=s,T.class="loopText",T.fontFamily=h,T.fontSize=E,T.fontWeight=_,T.wrap=!0;let g=$(T.text)?await qt(u,T,t):mt(u,T);if(t.sectionTitles!==void 0){for(const[f,I]of Object.entries(t.sectionTitles))if(I.message){T.text=I.message,T.x=t.startx+(t.stopx-t.startx)/2,T.y=t.sections[f].y+n+s,T.class="sectionTitle",T.anchor="middle",T.valign="middle",T.tspan=!1,T.fontFamily=h,T.fontSize=E,T.fontWeight=_,T.wrap=t.wrap,$(T.text)?(t.starty=t.sections[f].y,await qt(u,T,t)):mt(u,T);let L=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,P)=>b+P));t.sections[f].height+=L-(n+s)}}return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),Ge=x(function(e,t){_r(e,t)},"drawBackgroundRect"),Kr=x(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Fr=x(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Hr=x(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),qr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),zr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Ur=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Gr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Xr=x(function(e,t){const{theme:a}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),Xe=x(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"),Jr=x(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ut=(function(){function e(n,s,o,p,h,E,_){const u=s.append("text").attr("x",o+h/2).attr("y",p+E/2+5).style("text-anchor","middle").text(n);i(u,_)}B(e,"byText"),x(e,"byText");function t(n,s,o,p,h,E,_,u){const{actorFontSize:O,actorFontFamily:T,actorFontWeight:g}=u,[f,I]=Fe(O),L=n.split(N.lineBreakRegex);for(let b=0;b<L.length;b++){const P=b*f-f*(L.length-1)/2,S=s.append("text").attr("x",o+h/2).attr("y",p).style("text-anchor","middle").style("font-size",I).style("font-weight",g).style("font-family",T);S.append("tspan").attr("x",o+h/2).attr("dy",P).text(L[b]),S.attr("y",p+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(S,_)}}B(t,"byTspan"),x(t,"byTspan");function a(n,s,o,p,h,E,_,u){const O=s.append("switch"),g=O.append("foreignObject").attr("x",o).attr("y",p).attr("width",h).attr("height",E).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,O,o,p,h,E,_,u),i(g,_)}B(a,"byFo"),x(a,"byFo");async function r(n,s,o,p,h,E,_,u){const O=await vt(n,Ht()),T=s.append("switch"),f=T.append("foreignObject").attr("x",o+h/2-O.width/2).attr("y",p+E/2-O.height/2).attr("width",O.width).attr("height",O.height).append("xhtml:div").style("height","100%").style("width","100%");f.append("div").style("text-align","center").style("vertical-align","middle").html(await He(n,Ht())),t(n,T,o,p,h,E,_,u),i(f,_)}B(r,"byKatex"),x(r,"byKatex");function i(n,s){for(const o in s)s.hasOwnProperty(o)&&n.attr(o,s[o])}return B(i,"_setTextAttrs"),x(i,"_setTextAttrs"),function(n,s=!1){return s?r:n.textPlacement==="fo"?a:n.textPlacement==="old"?e:t}})(),Zr=(function(){function e(i,n,s,o,p,h,E){const _=n.append("text").attr("x",s).attr("y",o).style("text-anchor","start").text(i);r(_,E)}B(e,"byText"),x(e,"byText");function t(i,n,s,o,p,h,E,_){const{actorFontSize:u,actorFontFamily:O,actorFontWeight:T}=_,g=i.split(N.lineBreakRegex);for(let f=0;f<g.length;f++){const I=f*u-u*(g.length-1)/2,L=n.append("text").attr("x",s).attr("y",o).style("text-anchor","start").style("font-size",u).style("font-weight",T).style("font-family",O);L.append("tspan").attr("x",s).attr("dy",I).text(g[f]),L.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(L,E)}}B(t,"byTspan"),x(t,"byTspan");function a(i,n,s,o,p,h,E,_){const u=n.append("switch"),T=u.append("foreignObject").attr("x",s).attr("y",o).attr("width",p).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");T.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,u,s,o,p,h,E,_),r(T,E)}B(a,"byFo"),x(a,"byFo");function r(i,n){for(const s in n)n.hasOwnProperty(s)&&i.attr(s,n[s])}return B(r,"_setTextAttrs"),x(r,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),Qr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),$r=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),jr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),ta=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),z={drawRect:Dt,drawText:mt,drawLabel:ze,drawActor:Mr,drawBox:Br,drawPopup:Sr,anchorElement:Vr,drawActivation:Yr,drawLoop:Wr,drawBackgroundRect:Ge,insertArrowHead:qr,insertArrowFilledHead:zr,insertSequenceNumber:Ur,insertArrowCrossHead:Gr,insertDatabaseIcon:Kr,insertComputerIcon:Fr,insertClockIcon:Hr,getTextObj:Xe,getNoteRect:Jr,fixLifeLineHeights:Ue,sanitizeUrl:qe.sanitizeUrl,insertDropShadow:Xr,insertSolidTopArrowHead:Qr,insertSolidBottomArrowHead:$r,insertStickTopArrowHead:jr,insertStickBottomArrowHead:ta},l={},R={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:x(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:x(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:x(function(e){this.boxes.push(e)},"addBox"),addActor:x(function(e){this.actors.push(e)},"addActor"),addLoop:x(function(e){this.loops.push(e)},"addLoop"),addMessage:x(function(e){this.messages.push(e)},"addMessage"),addNote:x(function(e){this.notes.push(e)},"addNote"),lastActor:x(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:x(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:x(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:x(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:x(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,Ze(tt())},"init"),updateVal:x(function(e,t,a,r){e[t]===void 0?e[t]=a:e[t]=r(a,e[t])},"updateVal"),updateBounds:x(function(e,t,a,r){const i=this;let n=0;function s(o){return x(B(function(h){n++;const E=i.sequenceItems.length-n+1;i.updateVal(h,"starty",t-E*l.boxMargin,Math.min),i.updateVal(h,"stopy",r+E*l.boxMargin,Math.max),i.updateVal(R.data,"startx",e-E*l.boxMargin,Math.min),i.updateVal(R.data,"stopx",a+E*l.boxMargin,Math.max),o!=="activation"&&(i.updateVal(h,"startx",e-E*l.boxMargin,Math.min),i.updateVal(h,"stopx",a+E*l.boxMargin,Math.max),i.updateVal(R.data,"starty",t-E*l.boxMargin,Math.min),i.updateVal(R.data,"stopy",r+E*l.boxMargin,Math.max))},"updateItemBounds"),"updateItemBounds")}B(s,"updateFn"),x(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:x(function(e,t,a,r){const i=N.getMin(e,a),n=N.getMax(e,a),s=N.getMin(t,r),o=N.getMax(t,r);this.updateVal(R.data,"startx",i,Math.min),this.updateVal(R.data,"starty",s,Math.min),this.updateVal(R.data,"stopx",n,Math.max),this.updateVal(R.data,"stopy",o,Math.max),this.updateBounds(i,s,n,o)},"insert"),newActivation:x(function(e,t,a){const r=a.get(e.from),i=Gt(e.from).length||0,n=r.x+r.width/2+(i-1)*l.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+l.activationWidth,stopy:void 0,actor:e.from,anchored:z.anchorElement(t)})},"newActivation"),endActivation:x(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:x(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:x(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:x(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:x(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:x(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:R.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:x(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:x(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:x(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=N.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return{bounds:this.data,models:this.models}},"getBounds")},ea=x(async function(e,t,a){R.bumpVerticalPos(l.boxMargin),t.height=l.boxMargin,t.starty=R.getVerticalPos();const r=Tt();r.x=t.startx,r.y=t.starty,r.width=t.width||l.width,r.class="note";const i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const n=z.drawRect(i,r),s=ne();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=l.noteFontFamily,s.fontSize=l.noteFontSize,s.fontWeight=l.noteFontWeight,s.anchor=l.noteAlign,s.textMargin=l.noteMargin,s.valign="center";const o=$(s.text)?await qt(i,s):mt(i,s),p=Math.round(o.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,E)=>h+E));n.attr("height",p+2*l.noteMargin),t.height+=p+2*l.noteMargin,R.bumpVerticalPos(p+2*l.noteMargin),t.stopy=t.starty+p+2*l.noteMargin,t.stopx=t.startx+r.width,R.insert(t.startx,t.starty,t.stopx,t.stopy),R.models.addNote(t)},"drawNote"),We=x(function(e,t,a,r,i,n,s){const o=r.db.getActors(),p=o.get(t.from),h=o.get(t.to),E=a.sequenceVisible;let _=p.x+p.width/2,u=h.x+h.width/2;const O=_<=u,T=Qe(t,r),g=e.append("g"),f=16.5,I=x((m,M)=>{const Y=m?f:-f;return M?-Y:Y},"getCircleOffset"),L=x(m=>{g.append("circle").attr("cx",m).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:P,CENTRAL_CONNECTION_DUAL:S}=r.db.LINETYPE;if(E)switch(t.centralConnection){case b:T&&(u+=I(O,!0));break;case P:T||(_+=I(O,!1));break;case S:T?u+=I(O,!0):_+=I(O,!1);break}switch(t.centralConnection){case b:L(u);break;case P:L(_);break;case S:L(_),L(u);break}},"drawCentralConnection"),Lt=x(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),St=x(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),se=x(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function le(e,t){R.bumpVerticalPos(10);const{startx:a,stopx:r,message:i}=t,n=N.splitBreaks(i).length,s=$(i),o=s?await vt(i,tt()):Q.calculateTextDimensions(i,Lt(l));if(!s){const _=o.height/n;t.height+=_,R.bumpVerticalPos(_)}let p,h=o.height-10;const E=o.width;if(a===r){p=R.getVerticalPos()+h,l.rightAngles||(h+=l.boxMargin,p=R.getVerticalPos()+h),h+=30;const _=N.getMax(E/2,l.width/2);R.insert(a-_,R.getVerticalPos()-10+h,r+_,R.getVerticalPos()+30+h)}else h+=l.boxMargin,p=R.getVerticalPos()+h,R.insert(a,p-10,r,p);return R.bumpVerticalPos(h),t.height+=h,t.stopy=t.starty+t.height,R.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),p}B(le,"boundMessage");x(le,"boundMessage");var ra=x(async function(e,t,a,r,i,n){const{startx:s,stopx:o,starty:p,message:h,type:E,sequenceIndex:_,sequenceVisible:u}=t,O=Q.calculateTextDimensions(h,Lt(l)),T=ne();T.x=Math.min(s,o),T.y=p+10,T.width=Math.abs(o-s),T.class="messageText",T.dy="1em",T.text=h,T.fontFamily=l.messageFontFamily,T.fontSize=l.messageFontSize,T.fontWeight=l.messageFontWeight,T.anchor=l.messageAlign,T.valign="center",T.textMargin=l.wrapPadding,T.tspan=!1,$(T.text)?await qt(e,T,{startx:s,stopx:o,starty:a}):mt(e,T);const g=O.width;let f;if(s===o){const L=u||l.showSequenceNumbers,b=Qe(i,r),P=la(i,r),S=s+(L&&(b||P)?10:0);l.rightAngles?f=e.append("path").attr("d",`M ${S},${a} H ${s+N.getMax(l.width/2,g/2)} V ${a+25} H ${s}`):f=e.append("path").attr("d","M "+S+","+a+" C "+(S+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)),re(i,r)&&We(e,i,t,r,s,o,a)}else f=e.append("line"),f.attr("x1",s),f.attr("y1",a),f.attr("x2",o),f.attr("y2",a),re(i,r)&&We(e,i,t,r,s,o,a);E===r.db.LINETYPE.DOTTED||E===r.db.LINETYPE.DOTTED_CROSS||E===r.db.LINETYPE.DOTTED_POINT||E===r.db.LINETYPE.DOTTED_OPEN||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||E===r.db.LINETYPE.SOLID_TOP_DOTTED||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||E===r.db.LINETYPE.STICK_TOP_DOTTED||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0"),f.attr("data-et","message"),f.attr("data-id","i"+t.id),f.attr("data-from",t.from),f.attr("data-to",t.to);let I="";if(l.arrowMarkerAbsolute&&(I=fr(!0)),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),(E===r.db.LINETYPE.SOLID_TOP||E===r.db.LINETYPE.SOLID_TOP_DOTTED)&&f.attr("marker-end","url("+I+"#"+n+"-solidTopArrowHead)"),(E===r.db.LINETYPE.SOLID_BOTTOM||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&f.attr("marker-end","url("+I+"#"+n+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.STICK_TOP||E===r.db.LINETYPE.STICK_TOP_DOTTED)&&f.attr("marker-end","url("+I+"#"+n+"-stickTopArrowHead)"),(E===r.db.LINETYPE.STICK_BOTTOM||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&f.attr("marker-end","url("+I+"#"+n+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&f.attr("marker-start","url("+I+"#"+n+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&f.attr("marker-start","url("+I+"#"+n+"-solidTopArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&f.attr("marker-start","url("+I+"#"+n+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&f.attr("marker-start","url("+I+"#"+n+"-stickTopArrowHead)"),(E===r.db.LINETYPE.SOLID||E===r.db.LINETYPE.DOTTED)&&f.attr("marker-end","url("+I+"#"+n+"-arrowhead)"),(E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(f.attr("marker-start","url("+I+"#"+n+"-arrowhead)"),f.attr("marker-end","url("+I+"#"+n+"-arrowhead)")),(E===r.db.LINETYPE.SOLID_POINT||E===r.db.LINETYPE.DOTTED_POINT)&&f.attr("marker-end","url("+I+"#"+n+"-filled-head)"),(E===r.db.LINETYPE.SOLID_CROSS||E===r.db.LINETYPE.DOTTED_CROSS)&&f.attr("marker-end","url("+I+"#"+n+"-crosshead)"),u||l.showSequenceNumbers){const L=E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,b=E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,P=6,S=re(i,r);let m=s,M=o;L?(s<o?m=s+P*2:(m=s-P+(S?-5:0),m+=(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),f.attr("x1",m)):b?(o>s?M=o-2*P:(M=o-P,m+=(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),M+=S?15:0,f.attr("x2",M),f.attr("x1",m)):f.attr("x1",s+P);let Y=0;const W=s===o,U=s<=o;W?Y=t.fromBounds+1:b?Y=U?t.toBounds-1:t.fromBounds+1:Y=U?t.fromBounds+1:t.toBounds-1;let F="12px";const J=_.toString().length;J>5?F="7px":J>3&&(F="9px"),e.append("line").attr("x1",Y).attr("y1",a).attr("x2",Y).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+I+"#"+n+"-sequencenumber)"),e.append("text").attr("x",Y).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",F).attr("text-anchor","middle").attr("class","sequenceNumber").text(_)}},"drawMessage"),aa=x(function(e,t,a,r,i,n,s){let o=0,p=0,h,E=0;for(const _ of r){const u=t.get(_),O=u.box;h&&h!=O&&(s||R.models.addBox(h),p+=l.boxMargin+h.margin),O&&O!=h&&(s||(O.x=o+p,O.y=i),p+=O.margin),u.width=N.getMax(u.width||l.width,l.width),u.height=N.getMax(u.height||l.height,l.height),u.margin=u.margin||l.actorMargin,E=N.getMax(E,u.height),a.get(u.name)&&(p+=u.width/2),u.x=o+p,u.starty=R.getVerticalPos(),R.insert(u.x,i,u.x+u.width,u.height),o+=u.width+p,u.box&&(u.box.width=o+O.margin-u.box.x),p=u.margin,h=u.box,R.models.addActor(u)}h&&!s&&R.models.addBox(h),R.bumpVerticalPos(E)},"addActorRenderingData"),ie=x(async function(e,t,a,r,i,n,s){if(r){let o=0;R.bumpVerticalPos(l.boxMargin*2);for(const p of a){const h=t.get(p);h.stopy||(h.stopy=R.getVerticalPos());const E=await z.drawActor(e,h,l,!0,i,n,s);o=N.getMax(o,E)}R.bumpVerticalPos(o+l.boxMargin)}else for(const o of a){const p=t.get(o);await z.drawActor(e,p,l,!1,i,n,s)}},"drawActors"),Je=x(function(e,t,a,r){let i=0,n=0;for(const s of a){const o=t.get(s),p=ia(o),h=z.drawPopup(e,o,p,l,l.forceMenus,r);h.height>i&&(i=h.height),h.width+o.x>n&&(n=h.width+o.x)}return{maxHeight:i,maxWidth:n}},"drawActorsPopup"),Ze=x(function(e){ir(l,e),e.fontFamily&&(l.actorFontFamily=l.noteFontFamily=l.messageFontFamily=e.fontFamily),e.fontSize&&(l.actorFontSize=l.noteFontSize=l.messageFontSize=e.fontSize),e.fontWeight&&(l.actorFontWeight=l.noteFontWeight=l.messageFontWeight=e.fontWeight)},"setConf"),Gt=x(function(e){return R.activations.filter(function(t){return t.actor===e})},"actorActivations"),Ke=x(function(e,t){const a=t.get(e),r=Gt(e),i=r.reduce(function(s,o){return N.getMin(s,o.startx)},a.x+a.width/2-1),n=r.reduce(function(s,o){return N.getMax(s,o.stopx)},a.x+a.width/2+1);return[i,n]},"activationBounds");function dt(e,t,a,r,i){R.bumpVerticalPos(a);let n=r;if(t.id&&t.message&&e[t.id]){const s=e[t.id].width,o=Lt(l);t.message=Q.wrapLabel(`[${t.message}]`,s-2*l.wrapPadding,o),t.width=s,t.wrap=!0;const p=Q.calculateTextDimensions(t.message,o),h=N.getMax(p.height,l.labelBoxHeight);n=r+h,nt.debug(`${h} - ${t.message}`)}i(t),R.bumpVerticalPos(n)}B(dt,"adjustLoopHeightForWrap");x(dt,"adjustLoopHeightForWrap");function he(e,t,a,r,i,n,s){function o(E,_){E.x<i.get(e.from).x?(R.insert(t.stopx-_,t.starty,t.startx,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx+_):(R.insert(t.startx,t.starty,t.stopx+_,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx-_)}B(o,"receiverAdjustment"),x(o,"receiverAdjustment");function p(E,_){E.x<i.get(e.to).x?(R.insert(t.startx-_,t.starty,t.stopx,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx+_):(R.insert(t.stopx,t.starty,t.startx+_,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx-_)}B(p,"senderAdjustment"),x(p,"senderAdjustment");const h=[Ft.ACTOR,Ft.CONTROL,Ft.ENTITY,Ft.DATABASE];if(n.get(e.to)==r){const E=i.get(e.to),_=h.includes(E.type)?yt/2+3:E.width/2+3;o(E,_),E.starty=a-E.height/2,R.bumpVerticalPos(E.height/2)}else if(s.get(e.from)==r){const E=i.get(e.from);if(l.mirrorActors){const _=h.includes(E.type)?yt/2:E.width/2;p(E,_)}E.stopy=a-E.height/2,R.bumpVerticalPos(E.height/2)}else if(s.get(e.to)==r){const E=i.get(e.to);if(l.mirrorActors){const _=h.includes(E.type)?yt/2+3:E.width/2+3;o(E,_)}E.stopy=a-E.height/2,R.bumpVerticalPos(E.height/2)}}B(he,"adjustCreatedDestroyedData");x(he,"adjustCreatedDestroyedData");var sa=x(async function(e,t,a,r){const{securityLevel:i,sequence:n,look:s,themeVariables:o}=tt();l=n;let p;i==="sandbox"&&(p=Kt("#i"+t));const h=i==="sandbox"?Kt(p.nodes()[0].contentDocument.body):Kt("body"),E=i==="sandbox"?p.nodes()[0].contentDocument:document;R.init(),nt.debug(r.db);const _=i==="sandbox"?h.select(`[id="${t}"]`):Kt(`[id="${t}"]`),u=r.db.getActors(),O=r.db.getCreatedActors(),T=r.db.getDestroyedActors(),g=r.db.getBoxes();let f=r.db.getActorKeys();const I=r.db.getMessages(),L=r.db.getDiagramTitle(),b=r.db.hasAtLeastOneBox(),P=r.db.hasAtLeastOneBoxWithTitle(),S=await de(u,I,r);if(l.height=await Te(u,S,g),z.insertComputerIcon(_,t),z.insertDatabaseIcon(_,t),z.insertClockIcon(_,t),b&&(R.bumpVerticalPos(l.boxMargin),P&&R.bumpVerticalPos(g[0].textMaxHeight)),l.hideUnusedParticipants===!0){const A=new Set;I.forEach(D=>{A.add(D.from),A.add(D.to)}),f=f.filter(D=>A.has(D))}const m=new Map(f.map((A,D)=>{var at;return[((at=u.get(A))==null?void 0:at.name)??A,D]}));aa(_,u,O,f,0,I,!1);const M=await da(I,u,S,r);z.insertArrowHead(_,t),z.insertArrowCrossHead(_,t),z.insertArrowFilledHead(_,t),z.insertSequenceNumber(_,t),z.insertSolidTopArrowHead(_,t),z.insertSolidBottomArrowHead(_,t),z.insertStickTopArrowHead(_,t),z.insertStickBottomArrowHead(_,t),s==="neo"&&z.insertDropShadow(_,l);function Y(A,D){const at=R.endActivation(A);at.starty+18>D&&(at.starty=D-6,D+=12),z.drawActivation(_,at,D,l,Gt(A.from).length,r,m),R.insert(at.startx,D-10,at.stopx,D)}B(Y,"activeEnd"),x(Y,"activeEnd");let W=1,U=1;const F=[],J=[];let j=0;for(const A of I){let D,at,st;switch(A.type){case r.db.LINETYPE.NOTE:R.resetVerticalPos(),at=A.noteModel,await ea(_,at,A.id);break;case r.db.LINETYPE.ACTIVE_START:R.newActivation(A,_,u);break;case r.db.LINETYPE.CENTRAL_CONNECTION:R.newActivation(A,_,u);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:R.newActivation(A,_,u);break;case r.db.LINETYPE.ACTIVE_END:Y(A,R.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:dt(M,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>R.newLoop(H));break;case r.db.LINETYPE.LOOP_END:D=R.endLoop(),await z.drawLoop(_,D,"loop",l,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.RECT_START:dt(M,A,l.boxMargin,l.boxMargin,H=>{let bt=H.message;bt||(bt=(o==null?void 0:o.rectBkgColor)||(o==null?void 0:o.actorBkg)||"rgba(128, 128, 128, 0.5)"),R.newLoop(void 0,bt)});break;case r.db.LINETYPE.RECT_END:D=R.endLoop(),J.push(D),R.models.addLoop(D),R.bumpVerticalPos(D.stopy-R.getVerticalPos());break;case r.db.LINETYPE.OPT_START:dt(M,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>R.newLoop(H));break;case r.db.LINETYPE.OPT_END:D=R.endLoop(),await z.drawLoop(_,D,"opt",l,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.ALT_START:dt(M,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>R.newLoop(H));break;case r.db.LINETYPE.ALT_ELSE:dt(M,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>R.addSectionToLoop(H));break;case r.db.LINETYPE.ALT_END:D=R.endLoop(),await z.drawLoop(_,D,"alt",l,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:dt(M,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>R.newLoop(H)),R.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:dt(M,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>R.addSectionToLoop(H));break;case r.db.LINETYPE.PAR_END:D=R.endLoop(),await z.drawLoop(_,D,"par",l,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.AUTONUMBER:W=A.message.start||W,U=A.message.step||U,A.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:dt(M,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>R.newLoop(H));break;case r.db.LINETYPE.CRITICAL_OPTION:dt(M,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>R.addSectionToLoop(H));break;case r.db.LINETYPE.CRITICAL_END:D=R.endLoop(),await z.drawLoop(_,D,"critical",l,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;case r.db.LINETYPE.BREAK_START:dt(M,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>R.newLoop(H));break;case r.db.LINETYPE.BREAK_END:D=R.endLoop(),await z.drawLoop(_,D,"break",l,A),R.bumpVerticalPos(D.stopy-R.getVerticalPos()),R.models.addLoop(D);break;default:try{st=A.msgModel,st.starty=R.getVerticalPos(),st.sequenceIndex=W,st.sequenceVisible=r.db.showSequenceNumbers(),st.id=A.id,st.from=A.from,st.to=A.to;const H=await le(_,st);he(A,st,H,j,u,O,T),F.push({messageModel:st,lineStartY:H,msg:A}),R.models.addMessage(st)}catch(H){nt.error("error while drawing message",H)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(A.type)&&(W=Math.round((W+U)*100)/100),j++}nt.debug("createdActors",O),nt.debug("destroyedActors",T),await ie(_,u,f,!1,t,r,m);for(const A of F)await ra(_,A.messageModel,A.lineStartY,r,A.msg,t);l.mirrorActors&&await ie(_,u,f,!0,t,r,m),J.forEach(A=>z.drawBackgroundRect(_,A)),Ue(_,u,f,l);for(const A of R.models.boxes){A.height=R.getVerticalPos()-A.y,R.insert(A.x,A.y,A.x+A.width,A.height);const D=l.boxMargin*2;A.startx=A.x-D,A.starty=A.y-D*.25,A.stopx=A.startx+A.width+2*D,A.stopy=A.starty+A.height+D*.75,A.stroke="rgb(0,0,0, 0.5)",z.drawBox(_,A,l)}b&&R.bumpVerticalPos(l.boxMargin);const et=Je(_,u,f,E),{bounds:G}=R.getBounds();G.startx===void 0&&(G.startx=0),G.starty===void 0&&(G.starty=0),G.stopx===void 0&&(G.stopx=0),G.stopy===void 0&&(G.stopy=0);let ot=G.stopy-G.starty;ot<et.maxHeight&&(ot=et.maxHeight);let rt=ot+2*l.diagramMarginY;l.mirrorActors&&(rt=rt-l.boxMargin+l.bottomMarginAdj);let K=G.stopx-G.startx;K<et.maxWidth&&(K=et.maxWidth);const C=K+2*l.diagramMarginX;L&&_.append("text").text(L).attr("x",(G.stopx-G.startx)/2-2*l.diagramMarginX).attr("y",-25),sr(_,rt,C,l.useMaxWidth);const wt=L?40:0,Ct=u.size&&s==="neo"?30:0;_.attr("viewBox",G.startx-l.diagramMarginX+" -"+(l.diagramMarginY+wt)+" "+C+" "+(rt+wt+Ct)),nt.debug("models:",R.models)},"draw");async function de(e,t,a){const r={};for(const i of t)if(e.get(i.to)&&e.get(i.from)){const n=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!n.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const s=i.placement!==void 0,o=!s,p=s?St(l):Lt(l),h=i.wrap?Q.wrapLabel(i.message,l.width-2*l.wrapPadding,p):i.message,_=($(h)?await vt(i.message,tt()):Q.calculateTextDimensions(h,p)).width+2*l.wrapPadding;o&&i.from===n.nextActor?r[i.to]=N.getMax(r[i.to]||0,_):o&&i.from===n.prevActor?r[i.from]=N.getMax(r[i.from]||0,_):o&&i.from===i.to?(r[i.from]=N.getMax(r[i.from]||0,_/2),r[i.to]=N.getMax(r[i.to]||0,_/2)):i.placement===a.db.PLACEMENT.RIGHTOF?r[i.from]=N.getMax(r[i.from]||0,_):i.placement===a.db.PLACEMENT.LEFTOF?r[n.prevActor]=N.getMax(r[n.prevActor]||0,_):i.placement===a.db.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=N.getMax(r[n.prevActor]||0,_/2)),n.nextActor&&(r[i.from]=N.getMax(r[i.from]||0,_/2)))}return nt.debug("maxMessageWidthPerActor:",r),r}B(de,"getMaxMessageWidthPerActor");x(de,"getMaxMessageWidthPerActor");var ia=x(function(e){let t=0;const a=se(l);for(const r in e.links){const n=Q.calculateTextDimensions(r,a).width+2*l.wrapPadding+2*l.boxMargin;t<n&&(t=n)}return t},"getRequiredPopupWidth");async function Te(e,t,a){let r=0;for(const n of e.keys()){const s=e.get(n);s.wrap&&(s.description=Q.wrapLabel(s.description,l.width-2*l.wrapPadding,se(l)));const o=$(s.description)?await vt(s.description,tt()):Q.calculateTextDimensions(s.description,se(l));s.width=s.wrap?l.width:N.getMax(l.width,o.width+2*l.wrapPadding),s.height=s.wrap?N.getMax(o.height,l.height):l.height,r=N.getMax(r,s.height)}for(const n in t){const s=e.get(n);if(!s)continue;const o=e.get(s.nextActor);if(!o){const _=t[n]+l.actorMargin-s.width/2;s.margin=N.getMax(_,l.actorMargin);continue}const h=t[n]+l.actorMargin-s.width/2-o.width/2;s.margin=N.getMax(h,l.actorMargin)}let i=0;return a.forEach(n=>{const s=Lt(l);let o=n.actorKeys.reduce((_,u)=>_+=e.get(u).width+(e.get(u).margin||0),0);const p=l.boxMargin*8;o+=p,o-=2*l.boxTextMargin,n.wrap&&(n.name=Q.wrapLabel(n.name,o-2*l.wrapPadding,s));const h=Q.calculateTextDimensions(n.name,s);i=N.getMax(h.height,i);const E=N.getMax(o,h.width+2*l.wrapPadding);if(n.margin=l.boxTextMargin,o<E){const _=(E-o)/2;n.margin+=_}}),a.forEach(n=>n.textMaxHeight=i),N.getMax(r,l.height)}B(Te,"calculateActorMargins");x(Te,"calculateActorMargins");var na=x(async function(e,t,a){const r=t.get(e.from),i=t.get(e.to),n=r.x,s=i.x,o=e.wrap&&e.message;let p=$(e.message)?await vt(e.message,tt()):Q.calculateTextDimensions(o?Q.wrapLabel(e.message,l.width,St(l)):e.message,St(l));const h={width:o?l.width:N.getMax(l.width,p.width+2*l.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(h.width=o?N.getMax(l.width,p.width):N.getMax(r.width/2+i.width/2,p.width+2*l.noteMargin),h.startx=n+(r.width+l.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(h.width=o?N.getMax(l.width,p.width+2*l.noteMargin):N.getMax(r.width/2+i.width/2,p.width+2*l.noteMargin),h.startx=n-h.width+(r.width-l.actorMargin)/2):e.to===e.from?(p=Q.calculateTextDimensions(o?Q.wrapLabel(e.message,N.getMax(l.width,r.width),St(l)):e.message,St(l)),h.width=o?N.getMax(l.width,r.width):N.getMax(r.width,l.width,p.width+2*l.noteMargin),h.startx=n+(r.width-h.width)/2):(h.width=Math.abs(n+r.width/2-(s+i.width/2))+l.actorMargin,h.startx=n<s?n+r.width/2-l.actorMargin/2:s+i.width/2-l.actorMargin/2),o&&(h.message=Q.wrapLabel(e.message,h.width-2*l.wrapPadding,St(l))),nt.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${e.message}]`),h},"buildNoteModel"),oa=4,re=x(function(e,t){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,r,i].includes(e.centralConnection)},"hasCentralConnection"),ca=x(function(e,t,a){const{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE;let o=0;return(e.centralConnection===r||e.centralConnection===i)&&(o+=oa),(e.centralConnection===r||e.centralConnection===i)&&(e.type===n||e.type===s)&&(o+=a?0:-6),o},"calculateCentralConnectionOffset"),Qe=x(function(e,t){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:n,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:p,STICK_ARROW_BOTTOM_REVERSE_DOTTED:h}=t.db.LINETYPE;return[a,r,i,n,s,o,p,h].includes(e.type)},"isReverseArrowType"),la=x(function(e,t){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[a,r].includes(e.type)},"isBidirectionalArrowType"),ha=x(function(e,t,a){const{look:r}=tt();if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[i,n]=Ke(e.from,t),[s,o]=Ke(e.to,t),p=i<=s;let h=p?n:i,E=p?s:o;r==="neo"&&(e.type!==a.db.LINETYPE.SOLID_OPEN&&(E+=p?-3:3),(e.type===a.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(h+=p?3:-3)),h+=ca(e,a,p);const _=Math.abs(s-o)>2,u=x(f=>p?-f:f,"adjustValue");e.from===e.to?E=h:(e.activate&&!_&&(E+=u(l.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(E+=u(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=u(3)));const O=[i,n,s,o],T=Math.abs(h-E);e.wrap&&e.message&&(e.message=Q.wrapLabel(e.message,N.getMax(T+2*l.wrapPadding,l.width),Lt(l)));const g=Q.calculateTextDimensions(e.message,Lt(l));return{width:N.getMax(e.wrap?0:g.width+2*l.wrapPadding,T+2*l.wrapPadding,l.width),height:0,startx:h,stopx:E,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,O),toBounds:Math.max.apply(null,O)}},"buildMessageModel"),da=x(async function(e,t,a,r){const i={},n=[];let s,o,p;for(const h of e){switch(h.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:h.message&&(s=n.pop(),i[s.id]=s,i[h.id]=s,n.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=n.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const _=t.get(h.from?h.from:h.to.actor),u=Gt(h.from?h.from:h.to.actor).length,O=_.x+_.width/2+(u-1)*l.activationWidth/2,T={startx:O,stopx:O+l.activationWidth,actor:h.from,enabled:!0};R.activations.push(T)}break;case r.db.LINETYPE.ACTIVE_END:{const _=R.activations.map(u=>u.actor).lastIndexOf(h.from);R.activations.splice(_,1).splice(0,1)}break}h.placement!==void 0?(o=await na(h,t,r),h.noteModel=o,n.forEach(_=>{s=_,s.from=N.getMin(s.from,o.startx),s.to=N.getMax(s.to,o.startx+o.width),s.width=N.getMax(s.width,Math.abs(s.from-s.to))-l.labelBoxWidth})):(p=ha(h,t,r),h.msgModel=p,p.startx&&p.stopx&&n.length>0&&n.forEach(_=>{if(s=_,p.startx===p.stopx){const u=t.get(h.from),O=t.get(h.to);s.from=N.getMin(u.x-p.width/2,u.x-u.width/2,s.from),s.to=N.getMax(O.x+p.width/2,O.x+u.width/2,s.to),s.width=N.getMax(s.width,Math.abs(s.to-s.from))-l.labelBoxWidth}else s.from=N.getMin(p.startx,s.from),s.to=N.getMax(p.stopx,s.to),s.width=N.getMax(s.width,p.width)-l.labelBoxWidth}))}return R.activations=[],nt.debug("Loop type widths:",i),i},"calculateLoopBounds"),Ta={bounds:R,drawActors:ie,drawActorsPopup:Je,setConf:Ze,draw:sa},Ra={parser:Ir,get db(){return new Lr},renderer:Ta,styles:Ar,init:x(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,ar({sequence:{wrap:e.wrap}}))},"init")};export{Ra as diagram};
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse(`{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"')}])([^\\\\t\\\\n\\\\r \\"\\\\&');->\`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|('))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*(('))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=\`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;\`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\['\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}`)),n=[e];export{n as default};
@@ -0,0 +1 @@
1
+ import{_ as n}from"./mermaid.core-CmjrekXI.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./transform-CzGDKG_M.js";import"./step-SI6FXFD6.js";var c=1;function a(){if(!(typeof globalThis>"u"))return globalThis}n(a,"getCaptureGlobal");function m(){var o;return!!((o=a())!=null&&o.mermaidCaptureSizes)}n(m,"shouldCaptureSizes");function d(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}n(d,"capturedFromLocation");function s(o,r){const e=a();if(!e)return;const t=r.node(),i=(t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t,p=(i==null?void 0:i.id)??"(unknown)";e.mermaidCapturedSizes??(e.mermaidCapturedSizes=[]);const u={svgId:p,sizes:o};e.mermaidCapturedSizes.push(u),e.mermaidLastCapturedSizes=u}n(s,"emitCapturedSizes");function l(o,r){const e=[];for(const t of r.nodes)t.isGroup||e.push({id:t.id,width:t.width??0,height:t.height??0});e.length!==0&&s({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:d()},nodes:e},o)}n(l,"captureNodeSizes");export{l as captureNodeSizes,m as shouldCaptureSizes};
@@ -0,0 +1 @@
1
+ import{_ as r}from"./render-O7CIS3YK-BtRzL6gS.js";import{_ as i}from"./mermaid-layout-elk.core-C4McJve2.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./transform-CzGDKG_M.js";import"./step-SI6FXFD6.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var f=1;function n(){if(!(typeof globalThis>"u"))return globalThis}i(n,"getCaptureGlobal");r(n,"getCaptureGlobal");function m(){var o;return!!((o=n())!=null&&o.mermaidCaptureSizes)}i(m,"shouldCaptureSizes");r(m,"shouldCaptureSizes");function d(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}i(d,"capturedFromLocation");r(d,"capturedFromLocation");function s(o,a){const e=n();if(!e)return;const t=a.node(),u=(t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t,l=(u==null?void 0:u.id)??"(unknown)";e.mermaidCapturedSizes??(e.mermaidCapturedSizes=[]);const p={svgId:l,sizes:o};e.mermaidCapturedSizes.push(p),e.mermaidLastCapturedSizes=p}i(s,"emitCapturedSizes");r(s,"emitCapturedSizes");function c(o,a){const e=[];for(const t of a.nodes)t.isGroup||e.push({id:t.id,width:t.width??0,height:t.height??0});e.length!==0&&s({metadata:{captureVersion:f,capturedAt:new Date().toISOString(),capturedFrom:d()},nodes:e},o)}i(c,"captureNodeSizes");r(c,"captureNodeSizes");export{c as captureNodeSizes,m as shouldCaptureSizes};