docmedown 0.1.7 → 0.9.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 (304) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +86 -37
  3. package/dist/architecture-7GRP2DOG-B8Xs9IfY.mjs +2 -0
  4. package/dist/architecture-7GRP2DOG-Vdsw7WC7.js +1 -0
  5. package/dist/cli.js +672 -1294
  6. package/dist/cynefin-OW5HDTMX-DU6kwwck.js +1 -0
  7. package/dist/cynefin-OW5HDTMX-F0P2M_lQ.mjs +2 -0
  8. package/dist/docmedown-compiler.js +228 -0
  9. package/dist/docmedown-mermaid.js +3588 -0
  10. package/dist/docmedown.cjs +7264 -80
  11. package/dist/docmedown.iife.js +7624 -424
  12. package/dist/docmedown.mjs +15531 -15009
  13. package/dist/docmedown.web.js +7628 -0
  14. package/dist/eventmodeling-NTZA5JFV-D58ICByZ.js +1 -0
  15. package/dist/eventmodeling-NTZA5JFV-SxxTo5cJ.mjs +2 -0
  16. package/dist/gitGraph-4MIJSDKK-C_R2a4aQ.mjs +2 -0
  17. package/dist/gitGraph-4MIJSDKK-CdMj8HJ8.js +1 -0
  18. package/dist/info-A6RAGUB7-CG4UBCfn.js +1 -0
  19. package/dist/info-A6RAGUB7-DmjQlHTj.mjs +2 -0
  20. package/dist/mermaid-BvOI3ZSW.js +3334 -0
  21. package/dist/mermaid-Cx9uSfoz.mjs +116948 -0
  22. package/dist/packet-AYTQ26CC-CMuoEJn0.js +1 -0
  23. package/dist/packet-AYTQ26CC-tdMo_iPL.mjs +2 -0
  24. package/dist/pie-WAS4IAKB-C1hjX8y0.js +1 -0
  25. package/dist/pie-WAS4IAKB-DG2Bio1G.mjs +2 -0
  26. package/dist/prism-CeBRmKvl.js +2 -0
  27. package/dist/prism-CummdiZX.mjs +1588 -0
  28. package/dist/radar-RG4KPBEZ-DHxYOB0f.mjs +2 -0
  29. package/dist/radar-RG4KPBEZ-Dvyo3gdA.js +1 -0
  30. package/dist/railroad-74A4TZTK-1sb9Z_QQ.js +1 -0
  31. package/dist/railroad-74A4TZTK-CwztrSkE.mjs +2 -0
  32. package/dist/railroad-abnf-HS5TGJTU-4264fZjH.js +1 -0
  33. package/dist/railroad-abnf-HS5TGJTU-BKCsR9iC.mjs +2 -0
  34. package/dist/railroad-ebnf-LZEXJU2U-BXErl5kO.js +1 -0
  35. package/dist/railroad-ebnf-LZEXJU2U-DzDOfuxK.mjs +2 -0
  36. package/dist/railroad-peg-WCYAUIDC-B6gNHamV.mjs +2 -0
  37. package/dist/railroad-peg-WCYAUIDC-D7pSwRGa.js +1 -0
  38. package/dist/rolldown-runtime-B0aSnxlc.mjs +20 -0
  39. package/dist/rolldown-runtime-DF3sbh8G.js +1 -0
  40. package/dist/svelte-compiler-loader-Deqbdbvf.js +1 -0
  41. package/dist/svelte-compiler-loader-DtYQgEKV.mjs +50 -0
  42. package/dist/svelte-runtime-Brc440dp.js +5 -0
  43. package/dist/svelte-runtime-CgCk_bw1.mjs +40 -0
  44. package/dist/treeView-Q6P3EWNA-DArM8kFH.mjs +2 -0
  45. package/dist/treeView-Q6P3EWNA-JstiGzov.js +1 -0
  46. package/dist/treemap-WGGIJYW6-CMIcmEVN.mjs +2 -0
  47. package/dist/treemap-WGGIJYW6-Dq6fFckz.js +1 -0
  48. package/dist/ts-compiler-BMDmcNn5.mjs +93 -0
  49. package/dist/ts-compiler-U7pTMJjY.js +3 -0
  50. package/dist/types/runtime/bridges/dynamic-component.d.ts +43 -0
  51. package/dist/types/runtime/bridges/element-bridge.d.ts +24 -0
  52. package/dist/types/runtime/bridges/index.d.ts +3 -0
  53. package/dist/types/runtime/bridges/react-bridge.d.ts +35 -0
  54. package/dist/types/runtime/compiler-cache.d.ts +18 -0
  55. package/dist/types/runtime/config-schema.d.ts +2 -0
  56. package/dist/types/runtime/favicons.d.ts +28 -0
  57. package/dist/types/runtime/loader/local-loader.d.ts +13 -0
  58. package/dist/types/runtime/markdown/component-body.d.ts +7 -0
  59. package/dist/types/runtime/markdown/escape.d.ts +1 -0
  60. package/dist/types/runtime/markdown/highlighter.d.ts +32 -6
  61. package/dist/types/runtime/markdown/katex.d.ts +5 -0
  62. package/dist/types/runtime/markdown/mermaid-engine.d.ts +1 -0
  63. package/dist/types/runtime/markdown/mermaid-loader.d.ts +19 -0
  64. package/dist/types/runtime/markdown/mermaid.d.ts +6 -0
  65. package/dist/types/runtime/markdown/tables.d.ts +68 -0
  66. package/dist/types/runtime/media.d.ts +30 -0
  67. package/dist/types/runtime/motion.d.ts +134 -0
  68. package/dist/types/runtime/offline-export.d.ts +9 -2
  69. package/dist/types/runtime/router.d.ts +40 -2
  70. package/dist/types/runtime/splash.d.ts +90 -0
  71. package/dist/types/runtime/svelte-compiler-engine.d.ts +1 -0
  72. package/dist/types/runtime/svelte-compiler-loader.d.ts +14 -0
  73. package/dist/types/runtime/svelte-runtime.d.ts +29 -0
  74. package/dist/types/runtime/svelte-tag.d.ts +7 -0
  75. package/dist/types/runtime/ts-compiler.d.ts +24 -0
  76. package/dist/types/runtime/types.d.ts +1 -0
  77. package/dist/types/ui/doc-context.svelte.d.ts +198 -0
  78. package/dist/types/ui/index.d.ts +33 -0
  79. package/dist/types/ui/registry.d.ts +52 -0
  80. package/dist/types/ui/theme.svelte.d.ts +32 -0
  81. package/dist/wardley-WFR3VGLG-BK9BA6h6.mjs +2 -0
  82. package/dist/wardley-WFR3VGLG-Cbs7W-dU.js +1 -0
  83. package/package.json +61 -48
  84. package/schemas/docs.schema.json +186 -181
  85. package/templates/.dmd/CounterWidget.svelte +29 -0
  86. package/templates/README.md +2 -2
  87. package/templates/favicon.svg +12 -0
  88. package/templates/favicons/favicon-book.svg +11 -0
  89. package/templates/favicons/favicon-markdown.svg +11 -0
  90. package/templates/favicons/favicon-minimal.svg +15 -0
  91. package/templates/favicons/favicon-terminal.svg +14 -0
  92. package/templates/favicons/favicon.svg +12 -0
  93. package/templates/guides/custom-components.md +82 -22
  94. package/templates/index.html +6 -3
  95. package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +0 -89
  96. package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +0 -1
  97. package/dist/arc-DgPKXEdT.mjs +0 -82
  98. package/dist/arc-n7TW7Bis.js +0 -1
  99. package/dist/architecture-7GRP2DOG-B7myQ46f.js +0 -1
  100. package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +0 -3
  101. package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +0 -36
  102. package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +0 -4154
  103. package/dist/array-CApNbSU9.mjs +0 -6
  104. package/dist/array-DZSRzHA_.js +0 -1
  105. package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +0 -129
  106. package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +0 -1922
  107. package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +0 -38
  108. package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +0 -3010
  109. package/dist/channel-LgHproiI.mjs +0 -5
  110. package/dist/channel-yqu0m4cl.js +0 -1
  111. package/dist/chunk-2E4U76K2-BOyeRQsI.js +0 -1
  112. package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +0 -348
  113. package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +0 -15
  114. package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +0 -1
  115. package/dist/chunk-4HAMMTFA-GFyfmcSO.js +0 -62
  116. package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +0 -4188
  117. package/dist/chunk-5VM5RSS4-GINalzIv.js +0 -15
  118. package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +0 -5
  119. package/dist/chunk-75Z2AOVW-DYouz5MZ.js +0 -2
  120. package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +0 -1330
  121. package/dist/chunk-CLGD4ZFX-C5J-e2io.js +0 -1
  122. package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +0 -14
  123. package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +0 -3836
  124. package/dist/chunk-DU6HZSFF-CWc5ewtb.js +0 -127
  125. package/dist/chunk-F27PBJKO-8jvY_jJK.js +0 -1
  126. package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +0 -61
  127. package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +0 -21456
  128. package/dist/chunk-FOHPRMQF-tmTlwTeH.js +0 -161
  129. package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +0 -1863
  130. package/dist/chunk-GMAD6QVW-DEQiTa0c.js +0 -72
  131. package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +0 -37
  132. package/dist/chunk-GVQU2GXP-CdJIWN41.js +0 -1
  133. package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +0 -2042
  134. package/dist/chunk-IMKFNOWR-CPJsszGN.js +0 -231
  135. package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +0 -8
  136. package/dist/chunk-JWPE2WC7-p1fYVdYc.js +0 -1
  137. package/dist/chunk-L3NEJ4N5-TzDiVs78.js +0 -1
  138. package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +0 -245
  139. package/dist/chunk-LNGE3PJU-BQX75wkM.js +0 -34
  140. package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +0 -1521
  141. package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +0 -672
  142. package/dist/chunk-OSK3NFVY-CHzvVe8m.js +0 -10
  143. package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +0 -67
  144. package/dist/chunk-P2QGCYS3-DKZzpRQW.js +0 -1
  145. package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +0 -26
  146. package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +0 -1
  147. package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +0 -275
  148. package/dist/chunk-PWAF6VOD-DxZLuCEw.js +0 -1
  149. package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +0 -4183
  150. package/dist/chunk-SHT3W25Y-BQjHSn5K.js +0 -168
  151. package/dist/chunk-SVP7TREG-BFMd615E.js +0 -88
  152. package/dist/chunk-SVP7TREG-CynckzeF.mjs +0 -490
  153. package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +0 -3357
  154. package/dist/chunk-TICWLB2K-agcyBfUp.js +0 -206
  155. package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +0 -59
  156. package/dist/chunk-TLUHSLCS-Drx_a7am.js +0 -1
  157. package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +0 -1
  158. package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +0 -9
  159. package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +0 -1
  160. package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +0 -12
  161. package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +0 -1
  162. package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +0 -30
  163. package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +0 -1
  164. package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +0 -30
  165. package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +0 -1
  166. package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +0 -2253
  167. package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +0 -3
  168. package/dist/cynefin-OW5HDTMX-lNKysi7S.js +0 -1
  169. package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +0 -62
  170. package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +0 -355
  171. package/dist/cytoscape.esm-C5TvPYYm.mjs +0 -18148
  172. package/dist/cytoscape.esm-CBmWJr5M.js +0 -321
  173. package/dist/dagre-CZ6P9L_h.js +0 -1
  174. package/dist/dagre-GXQ25YYZ-CQszk-7P.js +0 -4
  175. package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +0 -425
  176. package/dist/dagre-J_1oH0eY.mjs +0 -1934
  177. package/dist/defaultLocale-N-0uLSyg.mjs +0 -198
  178. package/dist/defaultLocale-ybN1Vtvg.js +0 -1
  179. package/dist/diagram-S7CK7UJ4-CTMvxX__.js +0 -30
  180. package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +0 -301
  181. package/dist/diagram-UQ7AKVKN-1viEkqlG.js +0 -41
  182. package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +0 -214
  183. package/dist/diagram-VSXAHHWV-DgVT19mq.js +0 -3
  184. package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +0 -432
  185. package/dist/diagram-VX7I27RA-CNw0pOX_.js +0 -24
  186. package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +0 -527
  187. package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +0 -134
  188. package/dist/diagram-Z3DM3KII-CPkBr3FT.js +0 -24
  189. package/dist/dist-CXWJafG_.js +0 -1
  190. package/dist/dist-DNdLIC8h.mjs +0 -59
  191. package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +0 -1
  192. package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +0 -100
  193. package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +0 -99
  194. package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +0 -1966
  195. package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +0 -1
  196. package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +0 -3
  197. package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +0 -1
  198. package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +0 -17
  199. package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +0 -3072
  200. package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +0 -292
  201. package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +0 -1
  202. package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +0 -3
  203. package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +0 -106
  204. package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +0 -733
  205. package/dist/graphlib-BaETKKSa.js +0 -1
  206. package/dist/graphlib-XW-Jr8pF.mjs +0 -1267
  207. package/dist/info-A6RAGUB7-ClYskpn6.mjs +0 -3
  208. package/dist/info-A6RAGUB7-DDvvt-fW.js +0 -1
  209. package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +0 -20
  210. package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +0 -2
  211. package/dist/init-BJdqMO10.js +0 -1
  212. package/dist/init-CsQUQz36.mjs +0 -13
  213. package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +0 -70
  214. package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +0 -719
  215. package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +0 -139
  216. package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +0 -884
  217. package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +0 -976
  218. package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +0 -89
  219. package/dist/line-BEwhHSLl.js +0 -1
  220. package/dist/line-CiXRog8O.mjs +0 -34
  221. package/dist/linear-75tfjrny.js +0 -1
  222. package/dist/linear-Ncx_RuON.mjs +0 -288
  223. package/dist/mermaid-parser.core-BBApyu_y.js +0 -6
  224. package/dist/mermaid-parser.core-BRHibdUE.mjs +0 -638
  225. package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +0 -1006
  226. package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +0 -96
  227. package/dist/ordinal-B1BNQwUR.mjs +0 -65
  228. package/dist/ordinal-B9aFWmF9.js +0 -1
  229. package/dist/packet-AYTQ26CC-CorIy9Ul.js +0 -1
  230. package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +0 -3
  231. package/dist/path-CnWkkRiY.mjs +0 -84
  232. package/dist/path-DIS6ck99.js +0 -1
  233. package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +0 -1
  234. package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +0 -94
  235. package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +0 -3
  236. package/dist/pie-WAS4IAKB-D84xrSoY.js +0 -1
  237. package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +0 -39
  238. package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +0 -203
  239. package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +0 -7
  240. package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +0 -2001
  241. package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +0 -3
  242. package/dist/radar-RG4KPBEZ-R2sQOLL9.js +0 -1
  243. package/dist/railroad-74A4TZTK-BOZIf6ts.js +0 -1
  244. package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +0 -3
  245. package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +0 -3
  246. package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +0 -1
  247. package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +0 -1
  248. package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +0 -3
  249. package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +0 -3
  250. package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +0 -1
  251. package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +0 -76
  252. package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +0 -1
  253. package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +0 -84
  254. package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +0 -2224
  255. package/dist/rough.esm-ChRLLRha.js +0 -1
  256. package/dist/rough.esm-DXYGHN3m.mjs +0 -1361
  257. package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +0 -972
  258. package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +0 -40
  259. package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +0 -162
  260. package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +0 -4156
  261. package/dist/sizeCapture-INFHLROL-BihkCH-7.js +0 -1
  262. package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +0 -46
  263. package/dist/src-B4mN2BMl.js +0 -1
  264. package/dist/src-D_hsMyeP.mjs +0 -2154
  265. package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +0 -220
  266. package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +0 -1
  267. package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +0 -30
  268. package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +0 -1
  269. package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +0 -4979
  270. package/dist/swimlanes-42K2YHIH-DlggBCTy.js +0 -1
  271. package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +0 -8
  272. package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +0 -31
  273. package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +0 -120
  274. package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +0 -1069
  275. package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +0 -3
  276. package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +0 -1
  277. package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +0 -3
  278. package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +0 -1
  279. package/dist/types/runtime/app.d.ts +0 -9
  280. package/dist/types/runtime/components/AppearanceMenu.d.ts +0 -2
  281. package/dist/types/runtime/components/Builtins.d.ts +0 -44
  282. package/dist/types/runtime/components/Content.d.ts +0 -2
  283. package/dist/types/runtime/components/DmdRegistry.d.ts +0 -19
  284. package/dist/types/runtime/components/Layout.d.ts +0 -2
  285. package/dist/types/runtime/components/MermaidDiagram.d.ts +0 -16
  286. package/dist/types/runtime/components/Navbar.d.ts +0 -2
  287. package/dist/types/runtime/components/OfflineDownloadButton.d.ts +0 -2
  288. package/dist/types/runtime/components/OfflineNotice.d.ts +0 -6
  289. package/dist/types/runtime/components/Sidebar.d.ts +0 -2
  290. package/dist/types/runtime/components/TableOfContents.d.ts +0 -8
  291. package/dist/types/runtime/index.d.ts +0 -8
  292. package/dist/types/runtime/markdown/renderer.d.ts +0 -7
  293. package/dist/types/runtime/provider/DocProvider.d.ts +0 -40
  294. package/dist/types/runtime/provider/ThemeProvider.d.ts +0 -25
  295. package/dist/types/runtime/search/SearchModal.d.ts +0 -11
  296. package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +0 -34
  297. package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +0 -1880
  298. package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +0 -3
  299. package/dist/wardley-WFR3VGLG-DWDqJSgm.js +0 -1
  300. package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +0 -78
  301. package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +0 -645
  302. package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +0 -7
  303. package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +0 -2210
  304. package/templates/.dmd/components.js +0 -25
@@ -1,4156 +0,0 @@
1
- import { m as e, p as t } from "./src-D_hsMyeP.mjs";
2
- import { n } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
3
- import { A as r, F as i, G as a, H as o, K as s, O as c, U as l, a as u, b as d, c as f, i as p, r as m, s as h, v as g, w as _, x as v, y, z as b } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
4
- import { t as x } from "./dist-DNdLIC8h.mjs";
5
- import { g as S, p as C } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
6
- import { n as w, t as T } from "./chunk-LNGE3PJU-DJ9JuXV6.mjs";
7
- import { a as E, c as D, i as O, n as k, r as A, s as j } from "./chunk-F27PBJKO-DFH3sRZG.mjs";
8
- import { t as M } from "./chunk-2Q5K7J3B-D4EgYPOq.mjs";
9
- //#region node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WJ2MYXX4.mjs
10
- var N = x(), P = (function() {
11
- var e = /* @__PURE__ */ n(function(e, t, n, r) {
12
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
13
- return n;
14
- }, "o"), t = [1, 2], r = [1, 3], i = [1, 4], a = [2, 4], o = [1, 9], s = [1, 11], c = [1, 12], l = [1, 14], u = [1, 15], d = [1, 17], f = [1, 18], p = [1, 19], m = [1, 25], h = [1, 26], g = [1, 27], _ = [1, 28], v = [1, 29], y = [1, 30], b = [1, 31], x = [1, 32], S = [1, 33], C = [1, 34], w = [1, 35], T = [1, 36], E = [1, 37], D = [1, 38], O = [1, 39], k = [1, 40], A = [1, 42], j = [1, 43], M = [1, 44], N = [1, 45], P = [1, 46], F = [1, 47], I = [
15
- 1,
16
- 4,
17
- 5,
18
- 10,
19
- 14,
20
- 15,
21
- 17,
22
- 19,
23
- 22,
24
- 24,
25
- 30,
26
- 31,
27
- 32,
28
- 34,
29
- 36,
30
- 37,
31
- 38,
32
- 39,
33
- 40,
34
- 42,
35
- 44,
36
- 45,
37
- 47,
38
- 48,
39
- 49,
40
- 50,
41
- 51,
42
- 53,
43
- 54,
44
- 56,
45
- 61,
46
- 62,
47
- 63,
48
- 64,
49
- 73
50
- ], ee = [1, 74], L = [1, 80], R = [1, 81], te = [1, 82], ne = [1, 83], z = [1, 84], B = [1, 85], V = [1, 86], re = [1, 87], H = [1, 88], U = [1, 89], W = [1, 90], ie = [1, 91], ae = [1, 92], oe = [1, 93], G = [1, 94], se = [1, 95], K = [1, 96], ce = [1, 97], le = [1, 98], ue = [1, 99], de = [1, 100], fe = [1, 101], pe = [1, 102], me = [1, 103], he = [1, 104], ge = [1, 105], _e = [2, 78], ve = [
51
- 4,
52
- 5,
53
- 17,
54
- 51,
55
- 53,
56
- 54
57
- ], ye = [
58
- 4,
59
- 5,
60
- 10,
61
- 14,
62
- 15,
63
- 17,
64
- 19,
65
- 22,
66
- 24,
67
- 30,
68
- 31,
69
- 32,
70
- 34,
71
- 36,
72
- 37,
73
- 38,
74
- 39,
75
- 40,
76
- 42,
77
- 44,
78
- 45,
79
- 47,
80
- 51,
81
- 53,
82
- 54,
83
- 56,
84
- 61,
85
- 62,
86
- 63,
87
- 64,
88
- 73
89
- ], be = [
90
- 4,
91
- 5,
92
- 10,
93
- 14,
94
- 15,
95
- 17,
96
- 19,
97
- 22,
98
- 24,
99
- 30,
100
- 31,
101
- 32,
102
- 34,
103
- 36,
104
- 37,
105
- 38,
106
- 39,
107
- 40,
108
- 42,
109
- 44,
110
- 45,
111
- 47,
112
- 50,
113
- 51,
114
- 53,
115
- 54,
116
- 56,
117
- 61,
118
- 62,
119
- 63,
120
- 64,
121
- 73
122
- ], xe = [
123
- 4,
124
- 5,
125
- 10,
126
- 14,
127
- 15,
128
- 17,
129
- 19,
130
- 22,
131
- 24,
132
- 30,
133
- 31,
134
- 32,
135
- 34,
136
- 36,
137
- 37,
138
- 38,
139
- 39,
140
- 40,
141
- 42,
142
- 44,
143
- 45,
144
- 47,
145
- 49,
146
- 51,
147
- 53,
148
- 54,
149
- 56,
150
- 61,
151
- 62,
152
- 63,
153
- 64,
154
- 73
155
- ], Se = [
156
- 4,
157
- 5,
158
- 10,
159
- 14,
160
- 15,
161
- 17,
162
- 19,
163
- 22,
164
- 24,
165
- 30,
166
- 31,
167
- 32,
168
- 34,
169
- 36,
170
- 37,
171
- 38,
172
- 39,
173
- 40,
174
- 42,
175
- 44,
176
- 45,
177
- 47,
178
- 48,
179
- 51,
180
- 53,
181
- 54,
182
- 56,
183
- 61,
184
- 62,
185
- 63,
186
- 64,
187
- 73
188
- ], Ce = [5, 52], q = [
189
- 70,
190
- 71,
191
- 72,
192
- 73
193
- ], J = [1, 151], we = {
194
- trace: /* @__PURE__ */ n(function() {}, "trace"),
195
- yy: {},
196
- symbols_: {
197
- error: 2,
198
- start: 3,
199
- SPACE: 4,
200
- NEWLINE: 5,
201
- SD: 6,
202
- document: 7,
203
- line: 8,
204
- statement: 9,
205
- INVALID: 10,
206
- box_section: 11,
207
- box_line: 12,
208
- participant_statement: 13,
209
- create: 14,
210
- box: 15,
211
- restOfLine: 16,
212
- end: 17,
213
- signal: 18,
214
- autonumber: 19,
215
- NUM: 20,
216
- off: 21,
217
- activate: 22,
218
- actor: 23,
219
- deactivate: 24,
220
- note_statement: 25,
221
- links_statement: 26,
222
- link_statement: 27,
223
- properties_statement: 28,
224
- details_statement: 29,
225
- title: 30,
226
- legacy_title: 31,
227
- acc_title: 32,
228
- acc_title_value: 33,
229
- acc_descr: 34,
230
- acc_descr_value: 35,
231
- acc_descr_multiline_value: 36,
232
- loop: 37,
233
- rect: 38,
234
- opt: 39,
235
- alt: 40,
236
- else_sections: 41,
237
- par: 42,
238
- par_sections: 43,
239
- par_over: 44,
240
- critical: 45,
241
- option_sections: 46,
242
- break: 47,
243
- option: 48,
244
- and: 49,
245
- else: 50,
246
- participant: 51,
247
- AS: 52,
248
- participant_actor: 53,
249
- destroy: 54,
250
- actor_with_config: 55,
251
- note: 56,
252
- placement: 57,
253
- text2: 58,
254
- over: 59,
255
- actor_pair: 60,
256
- links: 61,
257
- link: 62,
258
- properties: 63,
259
- details: 64,
260
- spaceList: 65,
261
- ",": 66,
262
- left_of: 67,
263
- right_of: 68,
264
- signaltype: 69,
265
- "+": 70,
266
- "-": 71,
267
- "()": 72,
268
- ACTOR: 73,
269
- config_object: 74,
270
- CONFIG_START: 75,
271
- CONFIG_CONTENT: 76,
272
- CONFIG_END: 77,
273
- SOLID_OPEN_ARROW: 78,
274
- DOTTED_OPEN_ARROW: 79,
275
- SOLID_ARROW: 80,
276
- SOLID_ARROW_TOP: 81,
277
- SOLID_ARROW_BOTTOM: 82,
278
- STICK_ARROW_TOP: 83,
279
- STICK_ARROW_BOTTOM: 84,
280
- SOLID_ARROW_TOP_DOTTED: 85,
281
- SOLID_ARROW_BOTTOM_DOTTED: 86,
282
- STICK_ARROW_TOP_DOTTED: 87,
283
- STICK_ARROW_BOTTOM_DOTTED: 88,
284
- SOLID_ARROW_TOP_REVERSE: 89,
285
- SOLID_ARROW_BOTTOM_REVERSE: 90,
286
- STICK_ARROW_TOP_REVERSE: 91,
287
- STICK_ARROW_BOTTOM_REVERSE: 92,
288
- SOLID_ARROW_TOP_REVERSE_DOTTED: 93,
289
- SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 94,
290
- STICK_ARROW_TOP_REVERSE_DOTTED: 95,
291
- STICK_ARROW_BOTTOM_REVERSE_DOTTED: 96,
292
- BIDIRECTIONAL_SOLID_ARROW: 97,
293
- DOTTED_ARROW: 98,
294
- BIDIRECTIONAL_DOTTED_ARROW: 99,
295
- SOLID_CROSS: 100,
296
- DOTTED_CROSS: 101,
297
- SOLID_POINT: 102,
298
- DOTTED_POINT: 103,
299
- TXT: 104,
300
- $accept: 0,
301
- $end: 1
302
- },
303
- terminals_: {
304
- 2: "error",
305
- 4: "SPACE",
306
- 5: "NEWLINE",
307
- 6: "SD",
308
- 10: "INVALID",
309
- 14: "create",
310
- 15: "box",
311
- 16: "restOfLine",
312
- 17: "end",
313
- 19: "autonumber",
314
- 20: "NUM",
315
- 21: "off",
316
- 22: "activate",
317
- 24: "deactivate",
318
- 30: "title",
319
- 31: "legacy_title",
320
- 32: "acc_title",
321
- 33: "acc_title_value",
322
- 34: "acc_descr",
323
- 35: "acc_descr_value",
324
- 36: "acc_descr_multiline_value",
325
- 37: "loop",
326
- 38: "rect",
327
- 39: "opt",
328
- 40: "alt",
329
- 42: "par",
330
- 44: "par_over",
331
- 45: "critical",
332
- 47: "break",
333
- 48: "option",
334
- 49: "and",
335
- 50: "else",
336
- 51: "participant",
337
- 52: "AS",
338
- 53: "participant_actor",
339
- 54: "destroy",
340
- 56: "note",
341
- 59: "over",
342
- 61: "links",
343
- 62: "link",
344
- 63: "properties",
345
- 64: "details",
346
- 66: ",",
347
- 67: "left_of",
348
- 68: "right_of",
349
- 70: "+",
350
- 71: "-",
351
- 72: "()",
352
- 73: "ACTOR",
353
- 75: "CONFIG_START",
354
- 76: "CONFIG_CONTENT",
355
- 77: "CONFIG_END",
356
- 78: "SOLID_OPEN_ARROW",
357
- 79: "DOTTED_OPEN_ARROW",
358
- 80: "SOLID_ARROW",
359
- 81: "SOLID_ARROW_TOP",
360
- 82: "SOLID_ARROW_BOTTOM",
361
- 83: "STICK_ARROW_TOP",
362
- 84: "STICK_ARROW_BOTTOM",
363
- 85: "SOLID_ARROW_TOP_DOTTED",
364
- 86: "SOLID_ARROW_BOTTOM_DOTTED",
365
- 87: "STICK_ARROW_TOP_DOTTED",
366
- 88: "STICK_ARROW_BOTTOM_DOTTED",
367
- 89: "SOLID_ARROW_TOP_REVERSE",
368
- 90: "SOLID_ARROW_BOTTOM_REVERSE",
369
- 91: "STICK_ARROW_TOP_REVERSE",
370
- 92: "STICK_ARROW_BOTTOM_REVERSE",
371
- 93: "SOLID_ARROW_TOP_REVERSE_DOTTED",
372
- 94: "SOLID_ARROW_BOTTOM_REVERSE_DOTTED",
373
- 95: "STICK_ARROW_TOP_REVERSE_DOTTED",
374
- 96: "STICK_ARROW_BOTTOM_REVERSE_DOTTED",
375
- 97: "BIDIRECTIONAL_SOLID_ARROW",
376
- 98: "DOTTED_ARROW",
377
- 99: "BIDIRECTIONAL_DOTTED_ARROW",
378
- 100: "SOLID_CROSS",
379
- 101: "DOTTED_CROSS",
380
- 102: "SOLID_POINT",
381
- 103: "DOTTED_POINT",
382
- 104: "TXT"
383
- },
384
- productions_: [
385
- 0,
386
- [3, 2],
387
- [3, 2],
388
- [3, 2],
389
- [7, 0],
390
- [7, 2],
391
- [8, 2],
392
- [8, 1],
393
- [8, 1],
394
- [8, 1],
395
- [11, 0],
396
- [11, 2],
397
- [12, 2],
398
- [12, 1],
399
- [12, 1],
400
- [9, 1],
401
- [9, 2],
402
- [9, 4],
403
- [9, 2],
404
- [9, 4],
405
- [9, 3],
406
- [9, 3],
407
- [9, 2],
408
- [9, 3],
409
- [9, 3],
410
- [9, 2],
411
- [9, 2],
412
- [9, 2],
413
- [9, 2],
414
- [9, 2],
415
- [9, 1],
416
- [9, 1],
417
- [9, 2],
418
- [9, 2],
419
- [9, 1],
420
- [9, 4],
421
- [9, 4],
422
- [9, 4],
423
- [9, 4],
424
- [9, 4],
425
- [9, 4],
426
- [9, 4],
427
- [9, 4],
428
- [46, 1],
429
- [46, 4],
430
- [43, 1],
431
- [43, 4],
432
- [41, 1],
433
- [41, 4],
434
- [13, 5],
435
- [13, 3],
436
- [13, 5],
437
- [13, 3],
438
- [13, 3],
439
- [13, 5],
440
- [13, 3],
441
- [13, 5],
442
- [13, 3],
443
- [25, 4],
444
- [25, 4],
445
- [26, 3],
446
- [27, 3],
447
- [28, 3],
448
- [29, 3],
449
- [65, 2],
450
- [65, 1],
451
- [60, 3],
452
- [60, 1],
453
- [57, 1],
454
- [57, 1],
455
- [18, 5],
456
- [18, 5],
457
- [18, 5],
458
- [18, 5],
459
- [18, 6],
460
- [18, 4],
461
- [55, 2],
462
- [74, 3],
463
- [23, 1],
464
- [69, 1],
465
- [69, 1],
466
- [69, 1],
467
- [69, 1],
468
- [69, 1],
469
- [69, 1],
470
- [69, 1],
471
- [69, 1],
472
- [69, 1],
473
- [69, 1],
474
- [69, 1],
475
- [69, 1],
476
- [69, 1],
477
- [69, 1],
478
- [69, 1],
479
- [69, 1],
480
- [69, 1],
481
- [69, 1],
482
- [69, 1],
483
- [69, 1],
484
- [69, 1],
485
- [69, 1],
486
- [69, 1],
487
- [69, 1],
488
- [69, 1],
489
- [69, 1],
490
- [58, 1]
491
- ],
492
- performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
493
- var s = a.length - 1;
494
- switch (i) {
495
- case 3: return r.apply(a[s]), a[s];
496
- case 4:
497
- case 10:
498
- this.$ = [];
499
- break;
500
- case 5:
501
- case 11:
502
- a[s - 1].push(a[s]), this.$ = a[s - 1];
503
- break;
504
- case 6:
505
- case 7:
506
- case 12:
507
- case 13:
508
- this.$ = a[s];
509
- break;
510
- case 8:
511
- case 9:
512
- case 14:
513
- this.$ = [];
514
- break;
515
- case 16:
516
- a[s].type = "createParticipant", this.$ = a[s];
517
- break;
518
- case 17:
519
- a[s - 1].unshift({
520
- type: "boxStart",
521
- boxData: r.parseBoxData(a[s - 2])
522
- }), a[s - 1].push({
523
- type: "boxEnd",
524
- boxText: a[s - 2]
525
- }), this.$ = a[s - 1];
526
- break;
527
- case 19:
528
- this.$ = {
529
- type: "sequenceIndex",
530
- sequenceIndex: Number(a[s - 2]),
531
- sequenceIndexStep: Number(a[s - 1]),
532
- sequenceVisible: !0,
533
- signalType: r.LINETYPE.AUTONUMBER
534
- };
535
- break;
536
- case 20:
537
- this.$ = {
538
- type: "sequenceIndex",
539
- sequenceIndex: Number(a[s - 1]),
540
- sequenceIndexStep: 1,
541
- sequenceVisible: !0,
542
- signalType: r.LINETYPE.AUTONUMBER
543
- };
544
- break;
545
- case 21:
546
- this.$ = {
547
- type: "sequenceIndex",
548
- sequenceVisible: !1,
549
- signalType: r.LINETYPE.AUTONUMBER
550
- };
551
- break;
552
- case 22:
553
- this.$ = {
554
- type: "sequenceIndex",
555
- sequenceVisible: !0,
556
- signalType: r.LINETYPE.AUTONUMBER
557
- };
558
- break;
559
- case 23:
560
- this.$ = {
561
- type: "activeStart",
562
- signalType: r.LINETYPE.ACTIVE_START,
563
- actor: a[s - 1].actor
564
- };
565
- break;
566
- case 24:
567
- this.$ = {
568
- type: "activeEnd",
569
- signalType: r.LINETYPE.ACTIVE_END,
570
- actor: a[s - 1].actor
571
- };
572
- break;
573
- case 30:
574
- r.setDiagramTitle(a[s].substring(6)), this.$ = a[s].substring(6);
575
- break;
576
- case 31:
577
- r.setDiagramTitle(a[s].substring(7)), this.$ = a[s].substring(7);
578
- break;
579
- case 32:
580
- this.$ = a[s].trim(), r.setAccTitle(this.$);
581
- break;
582
- case 33:
583
- case 34:
584
- this.$ = a[s].trim(), r.setAccDescription(this.$);
585
- break;
586
- case 35:
587
- a[s - 1].unshift({
588
- type: "loopStart",
589
- loopText: r.parseMessage(a[s - 2]),
590
- signalType: r.LINETYPE.LOOP_START
591
- }), a[s - 1].push({
592
- type: "loopEnd",
593
- loopText: a[s - 2],
594
- signalType: r.LINETYPE.LOOP_END
595
- }), this.$ = a[s - 1];
596
- break;
597
- case 36:
598
- a[s - 1].unshift({
599
- type: "rectStart",
600
- color: r.parseMessage(a[s - 2]),
601
- signalType: r.LINETYPE.RECT_START
602
- }), a[s - 1].push({
603
- type: "rectEnd",
604
- color: r.parseMessage(a[s - 2]),
605
- signalType: r.LINETYPE.RECT_END
606
- }), this.$ = a[s - 1];
607
- break;
608
- case 37:
609
- a[s - 1].unshift({
610
- type: "optStart",
611
- optText: r.parseMessage(a[s - 2]),
612
- signalType: r.LINETYPE.OPT_START
613
- }), a[s - 1].push({
614
- type: "optEnd",
615
- optText: r.parseMessage(a[s - 2]),
616
- signalType: r.LINETYPE.OPT_END
617
- }), this.$ = a[s - 1];
618
- break;
619
- case 38:
620
- a[s - 1].unshift({
621
- type: "altStart",
622
- altText: r.parseMessage(a[s - 2]),
623
- signalType: r.LINETYPE.ALT_START
624
- }), a[s - 1].push({
625
- type: "altEnd",
626
- signalType: r.LINETYPE.ALT_END
627
- }), this.$ = a[s - 1];
628
- break;
629
- case 39:
630
- a[s - 1].unshift({
631
- type: "parStart",
632
- parText: r.parseMessage(a[s - 2]),
633
- signalType: r.LINETYPE.PAR_START
634
- }), a[s - 1].push({
635
- type: "parEnd",
636
- signalType: r.LINETYPE.PAR_END
637
- }), this.$ = a[s - 1];
638
- break;
639
- case 40:
640
- a[s - 1].unshift({
641
- type: "parStart",
642
- parText: r.parseMessage(a[s - 2]),
643
- signalType: r.LINETYPE.PAR_OVER_START
644
- }), a[s - 1].push({
645
- type: "parEnd",
646
- signalType: r.LINETYPE.PAR_END
647
- }), this.$ = a[s - 1];
648
- break;
649
- case 41:
650
- a[s - 1].unshift({
651
- type: "criticalStart",
652
- criticalText: r.parseMessage(a[s - 2]),
653
- signalType: r.LINETYPE.CRITICAL_START
654
- }), a[s - 1].push({
655
- type: "criticalEnd",
656
- signalType: r.LINETYPE.CRITICAL_END
657
- }), this.$ = a[s - 1];
658
- break;
659
- case 42:
660
- a[s - 1].unshift({
661
- type: "breakStart",
662
- breakText: r.parseMessage(a[s - 2]),
663
- signalType: r.LINETYPE.BREAK_START
664
- }), a[s - 1].push({
665
- type: "breakEnd",
666
- optText: r.parseMessage(a[s - 2]),
667
- signalType: r.LINETYPE.BREAK_END
668
- }), this.$ = a[s - 1];
669
- break;
670
- case 44:
671
- this.$ = a[s - 3].concat([{
672
- type: "option",
673
- optionText: r.parseMessage(a[s - 1]),
674
- signalType: r.LINETYPE.CRITICAL_OPTION
675
- }, a[s]]);
676
- break;
677
- case 46:
678
- this.$ = a[s - 3].concat([{
679
- type: "and",
680
- parText: r.parseMessage(a[s - 1]),
681
- signalType: r.LINETYPE.PAR_AND
682
- }, a[s]]);
683
- break;
684
- case 48:
685
- this.$ = a[s - 3].concat([{
686
- type: "else",
687
- altText: r.parseMessage(a[s - 1]),
688
- signalType: r.LINETYPE.ALT_ELSE
689
- }, a[s]]);
690
- break;
691
- case 49:
692
- a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
693
- break;
694
- case 50:
695
- a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
696
- break;
697
- case 51:
698
- a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
699
- break;
700
- case 52:
701
- case 57:
702
- a[s - 1].draw = "actor", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
703
- break;
704
- case 53:
705
- a[s - 1].type = "destroyParticipant", this.$ = a[s - 1];
706
- break;
707
- case 54:
708
- a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
709
- break;
710
- case 55:
711
- a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
712
- break;
713
- case 56:
714
- a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
715
- break;
716
- case 58:
717
- this.$ = [a[s - 1], {
718
- type: "addNote",
719
- placement: a[s - 2],
720
- actor: a[s - 1].actor,
721
- text: a[s]
722
- }];
723
- break;
724
- case 59:
725
- a[s - 2] = [].concat(a[s - 1], a[s - 1]).slice(0, 2), a[s - 2][0] = a[s - 2][0].actor, a[s - 2][1] = a[s - 2][1].actor, this.$ = [a[s - 1], {
726
- type: "addNote",
727
- placement: r.PLACEMENT.OVER,
728
- actor: a[s - 2].slice(0, 2),
729
- text: a[s]
730
- }];
731
- break;
732
- case 60:
733
- this.$ = [a[s - 1], {
734
- type: "addLinks",
735
- actor: a[s - 1].actor,
736
- text: a[s]
737
- }];
738
- break;
739
- case 61:
740
- this.$ = [a[s - 1], {
741
- type: "addALink",
742
- actor: a[s - 1].actor,
743
- text: a[s]
744
- }];
745
- break;
746
- case 62:
747
- this.$ = [a[s - 1], {
748
- type: "addProperties",
749
- actor: a[s - 1].actor,
750
- text: a[s]
751
- }];
752
- break;
753
- case 63:
754
- this.$ = [a[s - 1], {
755
- type: "addDetails",
756
- actor: a[s - 1].actor,
757
- text: a[s]
758
- }];
759
- break;
760
- case 66:
761
- this.$ = [a[s - 2], a[s]];
762
- break;
763
- case 67:
764
- this.$ = a[s];
765
- break;
766
- case 68:
767
- this.$ = r.PLACEMENT.LEFTOF;
768
- break;
769
- case 69:
770
- this.$ = r.PLACEMENT.RIGHTOF;
771
- break;
772
- case 70:
773
- this.$ = [
774
- a[s - 4],
775
- a[s - 1],
776
- {
777
- type: "addMessage",
778
- from: a[s - 4].actor,
779
- to: a[s - 1].actor,
780
- signalType: a[s - 3],
781
- msg: a[s],
782
- activate: !0
783
- },
784
- {
785
- type: "activeStart",
786
- signalType: r.LINETYPE.ACTIVE_START,
787
- actor: a[s - 1].actor
788
- }
789
- ];
790
- break;
791
- case 71:
792
- this.$ = [
793
- a[s - 4],
794
- a[s - 1],
795
- {
796
- type: "addMessage",
797
- from: a[s - 4].actor,
798
- to: a[s - 1].actor,
799
- signalType: a[s - 3],
800
- msg: a[s]
801
- },
802
- {
803
- type: "activeEnd",
804
- signalType: r.LINETYPE.ACTIVE_END,
805
- actor: a[s - 4].actor
806
- }
807
- ];
808
- break;
809
- case 72:
810
- this.$ = [
811
- a[s - 4],
812
- a[s - 1],
813
- {
814
- type: "addMessage",
815
- from: a[s - 4].actor,
816
- to: a[s - 1].actor,
817
- signalType: a[s - 3],
818
- msg: a[s],
819
- activate: !0,
820
- centralConnection: r.LINETYPE.CENTRAL_CONNECTION
821
- },
822
- {
823
- type: "centralConnection",
824
- signalType: r.LINETYPE.CENTRAL_CONNECTION,
825
- actor: a[s - 1].actor
826
- }
827
- ];
828
- break;
829
- case 73:
830
- this.$ = [
831
- a[s - 4],
832
- a[s - 1],
833
- {
834
- type: "addMessage",
835
- from: a[s - 4].actor,
836
- to: a[s - 1].actor,
837
- signalType: a[s - 2],
838
- msg: a[s],
839
- activate: !1,
840
- centralConnection: r.LINETYPE.CENTRAL_CONNECTION_REVERSE
841
- },
842
- {
843
- type: "centralConnectionReverse",
844
- signalType: r.LINETYPE.CENTRAL_CONNECTION_REVERSE,
845
- actor: a[s - 4].actor
846
- }
847
- ];
848
- break;
849
- case 74:
850
- this.$ = [
851
- a[s - 5],
852
- a[s - 1],
853
- {
854
- type: "addMessage",
855
- from: a[s - 5].actor,
856
- to: a[s - 1].actor,
857
- signalType: a[s - 3],
858
- msg: a[s],
859
- activate: !0,
860
- centralConnection: r.LINETYPE.CENTRAL_CONNECTION_DUAL
861
- },
862
- {
863
- type: "centralConnection",
864
- signalType: r.LINETYPE.CENTRAL_CONNECTION,
865
- actor: a[s - 1].actor
866
- },
867
- {
868
- type: "centralConnectionReverse",
869
- signalType: r.LINETYPE.CENTRAL_CONNECTION_REVERSE,
870
- actor: a[s - 5].actor
871
- }
872
- ];
873
- break;
874
- case 75:
875
- this.$ = [
876
- a[s - 3],
877
- a[s - 1],
878
- {
879
- type: "addMessage",
880
- from: a[s - 3].actor,
881
- to: a[s - 1].actor,
882
- signalType: a[s - 2],
883
- msg: a[s]
884
- }
885
- ];
886
- break;
887
- case 76:
888
- this.$ = {
889
- type: "addParticipant",
890
- actor: a[s - 1],
891
- config: a[s]
892
- };
893
- break;
894
- case 77:
895
- this.$ = a[s - 1].trim();
896
- break;
897
- case 78:
898
- this.$ = {
899
- type: "addParticipant",
900
- actor: a[s]
901
- };
902
- break;
903
- case 79:
904
- this.$ = r.LINETYPE.SOLID_OPEN;
905
- break;
906
- case 80:
907
- this.$ = r.LINETYPE.DOTTED_OPEN;
908
- break;
909
- case 81:
910
- this.$ = r.LINETYPE.SOLID;
911
- break;
912
- case 82:
913
- this.$ = r.LINETYPE.SOLID_TOP;
914
- break;
915
- case 83:
916
- this.$ = r.LINETYPE.SOLID_BOTTOM;
917
- break;
918
- case 84:
919
- this.$ = r.LINETYPE.STICK_TOP;
920
- break;
921
- case 85:
922
- this.$ = r.LINETYPE.STICK_BOTTOM;
923
- break;
924
- case 86:
925
- this.$ = r.LINETYPE.SOLID_TOP_DOTTED;
926
- break;
927
- case 87:
928
- this.$ = r.LINETYPE.SOLID_BOTTOM_DOTTED;
929
- break;
930
- case 88:
931
- this.$ = r.LINETYPE.STICK_TOP_DOTTED;
932
- break;
933
- case 89:
934
- this.$ = r.LINETYPE.STICK_BOTTOM_DOTTED;
935
- break;
936
- case 90:
937
- this.$ = r.LINETYPE.SOLID_ARROW_TOP_REVERSE;
938
- break;
939
- case 91:
940
- this.$ = r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;
941
- break;
942
- case 92:
943
- this.$ = r.LINETYPE.STICK_ARROW_TOP_REVERSE;
944
- break;
945
- case 93:
946
- this.$ = r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;
947
- break;
948
- case 94:
949
- this.$ = r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;
950
- break;
951
- case 95:
952
- this.$ = r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;
953
- break;
954
- case 96:
955
- this.$ = r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;
956
- break;
957
- case 97:
958
- this.$ = r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;
959
- break;
960
- case 98:
961
- this.$ = r.LINETYPE.BIDIRECTIONAL_SOLID;
962
- break;
963
- case 99:
964
- this.$ = r.LINETYPE.DOTTED;
965
- break;
966
- case 100:
967
- this.$ = r.LINETYPE.BIDIRECTIONAL_DOTTED;
968
- break;
969
- case 101:
970
- this.$ = r.LINETYPE.SOLID_CROSS;
971
- break;
972
- case 102:
973
- this.$ = r.LINETYPE.DOTTED_CROSS;
974
- break;
975
- case 103:
976
- this.$ = r.LINETYPE.SOLID_POINT;
977
- break;
978
- case 104:
979
- this.$ = r.LINETYPE.DOTTED_POINT;
980
- break;
981
- case 105: this.$ = r.parseMessage(a[s].trim().substring(1));
982
- }
983
- }, "anonymous"),
984
- table: [
985
- {
986
- 3: 1,
987
- 4: t,
988
- 5: r,
989
- 6: i
990
- },
991
- { 1: [3] },
992
- {
993
- 3: 5,
994
- 4: t,
995
- 5: r,
996
- 6: i
997
- },
998
- {
999
- 3: 6,
1000
- 4: t,
1001
- 5: r,
1002
- 6: i
1003
- },
1004
- e([
1005
- 1,
1006
- 4,
1007
- 5,
1008
- 10,
1009
- 14,
1010
- 15,
1011
- 19,
1012
- 22,
1013
- 24,
1014
- 30,
1015
- 31,
1016
- 32,
1017
- 34,
1018
- 36,
1019
- 37,
1020
- 38,
1021
- 39,
1022
- 40,
1023
- 42,
1024
- 44,
1025
- 45,
1026
- 47,
1027
- 51,
1028
- 53,
1029
- 54,
1030
- 56,
1031
- 61,
1032
- 62,
1033
- 63,
1034
- 64,
1035
- 73
1036
- ], a, { 7: 7 }),
1037
- { 1: [2, 1] },
1038
- { 1: [2, 2] },
1039
- {
1040
- 1: [2, 3],
1041
- 4: o,
1042
- 5: s,
1043
- 8: 8,
1044
- 9: 10,
1045
- 10: c,
1046
- 13: 13,
1047
- 14: l,
1048
- 15: u,
1049
- 18: 16,
1050
- 19: d,
1051
- 22: f,
1052
- 23: 41,
1053
- 24: p,
1054
- 25: 20,
1055
- 26: 21,
1056
- 27: 22,
1057
- 28: 23,
1058
- 29: 24,
1059
- 30: m,
1060
- 31: h,
1061
- 32: g,
1062
- 34: _,
1063
- 36: v,
1064
- 37: y,
1065
- 38: b,
1066
- 39: x,
1067
- 40: S,
1068
- 42: C,
1069
- 44: w,
1070
- 45: T,
1071
- 47: E,
1072
- 51: D,
1073
- 53: O,
1074
- 54: k,
1075
- 56: A,
1076
- 61: j,
1077
- 62: M,
1078
- 63: N,
1079
- 64: P,
1080
- 73: F
1081
- },
1082
- e(I, [2, 5]),
1083
- {
1084
- 9: 48,
1085
- 13: 13,
1086
- 14: l,
1087
- 15: u,
1088
- 18: 16,
1089
- 19: d,
1090
- 22: f,
1091
- 23: 41,
1092
- 24: p,
1093
- 25: 20,
1094
- 26: 21,
1095
- 27: 22,
1096
- 28: 23,
1097
- 29: 24,
1098
- 30: m,
1099
- 31: h,
1100
- 32: g,
1101
- 34: _,
1102
- 36: v,
1103
- 37: y,
1104
- 38: b,
1105
- 39: x,
1106
- 40: S,
1107
- 42: C,
1108
- 44: w,
1109
- 45: T,
1110
- 47: E,
1111
- 51: D,
1112
- 53: O,
1113
- 54: k,
1114
- 56: A,
1115
- 61: j,
1116
- 62: M,
1117
- 63: N,
1118
- 64: P,
1119
- 73: F
1120
- },
1121
- e(I, [2, 7]),
1122
- e(I, [2, 8]),
1123
- e(I, [2, 9]),
1124
- e(I, [2, 15]),
1125
- {
1126
- 13: 49,
1127
- 51: D,
1128
- 53: O,
1129
- 54: k
1130
- },
1131
- { 16: [1, 50] },
1132
- { 5: [1, 51] },
1133
- {
1134
- 5: [1, 54],
1135
- 20: [1, 52],
1136
- 21: [1, 53]
1137
- },
1138
- {
1139
- 23: 55,
1140
- 73: F
1141
- },
1142
- {
1143
- 23: 56,
1144
- 73: F
1145
- },
1146
- { 5: [1, 57] },
1147
- { 5: [1, 58] },
1148
- { 5: [1, 59] },
1149
- { 5: [1, 60] },
1150
- { 5: [1, 61] },
1151
- e(I, [2, 30]),
1152
- e(I, [2, 31]),
1153
- { 33: [1, 62] },
1154
- { 35: [1, 63] },
1155
- e(I, [2, 34]),
1156
- { 16: [1, 64] },
1157
- { 16: [1, 65] },
1158
- { 16: [1, 66] },
1159
- { 16: [1, 67] },
1160
- { 16: [1, 68] },
1161
- { 16: [1, 69] },
1162
- { 16: [1, 70] },
1163
- { 16: [1, 71] },
1164
- {
1165
- 23: 72,
1166
- 55: 73,
1167
- 73: ee
1168
- },
1169
- {
1170
- 23: 75,
1171
- 55: 76,
1172
- 73: ee
1173
- },
1174
- {
1175
- 23: 77,
1176
- 73: F
1177
- },
1178
- {
1179
- 69: 78,
1180
- 72: [1, 79],
1181
- 78: L,
1182
- 79: R,
1183
- 80: te,
1184
- 81: ne,
1185
- 82: z,
1186
- 83: B,
1187
- 84: V,
1188
- 85: re,
1189
- 86: H,
1190
- 87: U,
1191
- 88: W,
1192
- 89: ie,
1193
- 90: ae,
1194
- 91: oe,
1195
- 92: G,
1196
- 93: se,
1197
- 94: K,
1198
- 95: ce,
1199
- 96: le,
1200
- 97: ue,
1201
- 98: de,
1202
- 99: fe,
1203
- 100: pe,
1204
- 101: me,
1205
- 102: he,
1206
- 103: ge
1207
- },
1208
- {
1209
- 57: 106,
1210
- 59: [1, 107],
1211
- 67: [1, 108],
1212
- 68: [1, 109]
1213
- },
1214
- {
1215
- 23: 110,
1216
- 73: F
1217
- },
1218
- {
1219
- 23: 111,
1220
- 73: F
1221
- },
1222
- {
1223
- 23: 112,
1224
- 73: F
1225
- },
1226
- {
1227
- 23: 113,
1228
- 73: F
1229
- },
1230
- e([
1231
- 5,
1232
- 66,
1233
- 72,
1234
- 78,
1235
- 79,
1236
- 80,
1237
- 81,
1238
- 82,
1239
- 83,
1240
- 84,
1241
- 85,
1242
- 86,
1243
- 87,
1244
- 88,
1245
- 89,
1246
- 90,
1247
- 91,
1248
- 92,
1249
- 93,
1250
- 94,
1251
- 95,
1252
- 96,
1253
- 97,
1254
- 98,
1255
- 99,
1256
- 100,
1257
- 101,
1258
- 102,
1259
- 103,
1260
- 104
1261
- ], _e),
1262
- e(I, [2, 6]),
1263
- e(I, [2, 16]),
1264
- e(ve, [2, 10], { 11: 114 }),
1265
- e(I, [2, 18]),
1266
- {
1267
- 5: [1, 116],
1268
- 20: [1, 115]
1269
- },
1270
- { 5: [1, 117] },
1271
- e(I, [2, 22]),
1272
- { 5: [1, 118] },
1273
- { 5: [1, 119] },
1274
- e(I, [2, 25]),
1275
- e(I, [2, 26]),
1276
- e(I, [2, 27]),
1277
- e(I, [2, 28]),
1278
- e(I, [2, 29]),
1279
- e(I, [2, 32]),
1280
- e(I, [2, 33]),
1281
- e(ye, a, { 7: 120 }),
1282
- e(ye, a, { 7: 121 }),
1283
- e(ye, a, { 7: 122 }),
1284
- e(be, a, {
1285
- 41: 123,
1286
- 7: 124
1287
- }),
1288
- e(xe, a, {
1289
- 43: 125,
1290
- 7: 126
1291
- }),
1292
- e(xe, a, {
1293
- 7: 126,
1294
- 43: 127
1295
- }),
1296
- e(Se, a, {
1297
- 46: 128,
1298
- 7: 129
1299
- }),
1300
- e(ye, a, { 7: 130 }),
1301
- {
1302
- 5: [1, 132],
1303
- 52: [1, 131]
1304
- },
1305
- {
1306
- 5: [1, 134],
1307
- 52: [1, 133]
1308
- },
1309
- e(Ce, _e, {
1310
- 74: 135,
1311
- 75: [1, 136]
1312
- }),
1313
- {
1314
- 5: [1, 138],
1315
- 52: [1, 137]
1316
- },
1317
- {
1318
- 5: [1, 140],
1319
- 52: [1, 139]
1320
- },
1321
- { 5: [1, 141] },
1322
- {
1323
- 23: 145,
1324
- 70: [1, 142],
1325
- 71: [1, 143],
1326
- 72: [1, 144],
1327
- 73: F
1328
- },
1329
- {
1330
- 69: 146,
1331
- 78: L,
1332
- 79: R,
1333
- 80: te,
1334
- 81: ne,
1335
- 82: z,
1336
- 83: B,
1337
- 84: V,
1338
- 85: re,
1339
- 86: H,
1340
- 87: U,
1341
- 88: W,
1342
- 89: ie,
1343
- 90: ae,
1344
- 91: oe,
1345
- 92: G,
1346
- 93: se,
1347
- 94: K,
1348
- 95: ce,
1349
- 96: le,
1350
- 97: ue,
1351
- 98: de,
1352
- 99: fe,
1353
- 100: pe,
1354
- 101: me,
1355
- 102: he,
1356
- 103: ge
1357
- },
1358
- e(q, [2, 79]),
1359
- e(q, [2, 80]),
1360
- e(q, [2, 81]),
1361
- e(q, [2, 82]),
1362
- e(q, [2, 83]),
1363
- e(q, [2, 84]),
1364
- e(q, [2, 85]),
1365
- e(q, [2, 86]),
1366
- e(q, [2, 87]),
1367
- e(q, [2, 88]),
1368
- e(q, [2, 89]),
1369
- e(q, [2, 90]),
1370
- e(q, [2, 91]),
1371
- e(q, [2, 92]),
1372
- e(q, [2, 93]),
1373
- e(q, [2, 94]),
1374
- e(q, [2, 95]),
1375
- e(q, [2, 96]),
1376
- e(q, [2, 97]),
1377
- e(q, [2, 98]),
1378
- e(q, [2, 99]),
1379
- e(q, [2, 100]),
1380
- e(q, [2, 101]),
1381
- e(q, [2, 102]),
1382
- e(q, [2, 103]),
1383
- e(q, [2, 104]),
1384
- {
1385
- 23: 147,
1386
- 73: F
1387
- },
1388
- {
1389
- 23: 149,
1390
- 60: 148,
1391
- 73: F
1392
- },
1393
- { 73: [2, 68] },
1394
- { 73: [2, 69] },
1395
- {
1396
- 58: 150,
1397
- 104: J
1398
- },
1399
- {
1400
- 58: 152,
1401
- 104: J
1402
- },
1403
- {
1404
- 58: 153,
1405
- 104: J
1406
- },
1407
- {
1408
- 58: 154,
1409
- 104: J
1410
- },
1411
- {
1412
- 4: [1, 157],
1413
- 5: [1, 159],
1414
- 12: 156,
1415
- 13: 158,
1416
- 17: [1, 155],
1417
- 51: D,
1418
- 53: O,
1419
- 54: k
1420
- },
1421
- { 5: [1, 160] },
1422
- e(I, [2, 20]),
1423
- e(I, [2, 21]),
1424
- e(I, [2, 23]),
1425
- e(I, [2, 24]),
1426
- {
1427
- 4: o,
1428
- 5: s,
1429
- 8: 8,
1430
- 9: 10,
1431
- 10: c,
1432
- 13: 13,
1433
- 14: l,
1434
- 15: u,
1435
- 17: [1, 161],
1436
- 18: 16,
1437
- 19: d,
1438
- 22: f,
1439
- 23: 41,
1440
- 24: p,
1441
- 25: 20,
1442
- 26: 21,
1443
- 27: 22,
1444
- 28: 23,
1445
- 29: 24,
1446
- 30: m,
1447
- 31: h,
1448
- 32: g,
1449
- 34: _,
1450
- 36: v,
1451
- 37: y,
1452
- 38: b,
1453
- 39: x,
1454
- 40: S,
1455
- 42: C,
1456
- 44: w,
1457
- 45: T,
1458
- 47: E,
1459
- 51: D,
1460
- 53: O,
1461
- 54: k,
1462
- 56: A,
1463
- 61: j,
1464
- 62: M,
1465
- 63: N,
1466
- 64: P,
1467
- 73: F
1468
- },
1469
- {
1470
- 4: o,
1471
- 5: s,
1472
- 8: 8,
1473
- 9: 10,
1474
- 10: c,
1475
- 13: 13,
1476
- 14: l,
1477
- 15: u,
1478
- 17: [1, 162],
1479
- 18: 16,
1480
- 19: d,
1481
- 22: f,
1482
- 23: 41,
1483
- 24: p,
1484
- 25: 20,
1485
- 26: 21,
1486
- 27: 22,
1487
- 28: 23,
1488
- 29: 24,
1489
- 30: m,
1490
- 31: h,
1491
- 32: g,
1492
- 34: _,
1493
- 36: v,
1494
- 37: y,
1495
- 38: b,
1496
- 39: x,
1497
- 40: S,
1498
- 42: C,
1499
- 44: w,
1500
- 45: T,
1501
- 47: E,
1502
- 51: D,
1503
- 53: O,
1504
- 54: k,
1505
- 56: A,
1506
- 61: j,
1507
- 62: M,
1508
- 63: N,
1509
- 64: P,
1510
- 73: F
1511
- },
1512
- {
1513
- 4: o,
1514
- 5: s,
1515
- 8: 8,
1516
- 9: 10,
1517
- 10: c,
1518
- 13: 13,
1519
- 14: l,
1520
- 15: u,
1521
- 17: [1, 163],
1522
- 18: 16,
1523
- 19: d,
1524
- 22: f,
1525
- 23: 41,
1526
- 24: p,
1527
- 25: 20,
1528
- 26: 21,
1529
- 27: 22,
1530
- 28: 23,
1531
- 29: 24,
1532
- 30: m,
1533
- 31: h,
1534
- 32: g,
1535
- 34: _,
1536
- 36: v,
1537
- 37: y,
1538
- 38: b,
1539
- 39: x,
1540
- 40: S,
1541
- 42: C,
1542
- 44: w,
1543
- 45: T,
1544
- 47: E,
1545
- 51: D,
1546
- 53: O,
1547
- 54: k,
1548
- 56: A,
1549
- 61: j,
1550
- 62: M,
1551
- 63: N,
1552
- 64: P,
1553
- 73: F
1554
- },
1555
- { 17: [1, 164] },
1556
- {
1557
- 4: o,
1558
- 5: s,
1559
- 8: 8,
1560
- 9: 10,
1561
- 10: c,
1562
- 13: 13,
1563
- 14: l,
1564
- 15: u,
1565
- 17: [2, 47],
1566
- 18: 16,
1567
- 19: d,
1568
- 22: f,
1569
- 23: 41,
1570
- 24: p,
1571
- 25: 20,
1572
- 26: 21,
1573
- 27: 22,
1574
- 28: 23,
1575
- 29: 24,
1576
- 30: m,
1577
- 31: h,
1578
- 32: g,
1579
- 34: _,
1580
- 36: v,
1581
- 37: y,
1582
- 38: b,
1583
- 39: x,
1584
- 40: S,
1585
- 42: C,
1586
- 44: w,
1587
- 45: T,
1588
- 47: E,
1589
- 50: [1, 165],
1590
- 51: D,
1591
- 53: O,
1592
- 54: k,
1593
- 56: A,
1594
- 61: j,
1595
- 62: M,
1596
- 63: N,
1597
- 64: P,
1598
- 73: F
1599
- },
1600
- { 17: [1, 166] },
1601
- {
1602
- 4: o,
1603
- 5: s,
1604
- 8: 8,
1605
- 9: 10,
1606
- 10: c,
1607
- 13: 13,
1608
- 14: l,
1609
- 15: u,
1610
- 17: [2, 45],
1611
- 18: 16,
1612
- 19: d,
1613
- 22: f,
1614
- 23: 41,
1615
- 24: p,
1616
- 25: 20,
1617
- 26: 21,
1618
- 27: 22,
1619
- 28: 23,
1620
- 29: 24,
1621
- 30: m,
1622
- 31: h,
1623
- 32: g,
1624
- 34: _,
1625
- 36: v,
1626
- 37: y,
1627
- 38: b,
1628
- 39: x,
1629
- 40: S,
1630
- 42: C,
1631
- 44: w,
1632
- 45: T,
1633
- 47: E,
1634
- 49: [1, 167],
1635
- 51: D,
1636
- 53: O,
1637
- 54: k,
1638
- 56: A,
1639
- 61: j,
1640
- 62: M,
1641
- 63: N,
1642
- 64: P,
1643
- 73: F
1644
- },
1645
- { 17: [1, 168] },
1646
- { 17: [1, 169] },
1647
- {
1648
- 4: o,
1649
- 5: s,
1650
- 8: 8,
1651
- 9: 10,
1652
- 10: c,
1653
- 13: 13,
1654
- 14: l,
1655
- 15: u,
1656
- 17: [2, 43],
1657
- 18: 16,
1658
- 19: d,
1659
- 22: f,
1660
- 23: 41,
1661
- 24: p,
1662
- 25: 20,
1663
- 26: 21,
1664
- 27: 22,
1665
- 28: 23,
1666
- 29: 24,
1667
- 30: m,
1668
- 31: h,
1669
- 32: g,
1670
- 34: _,
1671
- 36: v,
1672
- 37: y,
1673
- 38: b,
1674
- 39: x,
1675
- 40: S,
1676
- 42: C,
1677
- 44: w,
1678
- 45: T,
1679
- 47: E,
1680
- 48: [1, 170],
1681
- 51: D,
1682
- 53: O,
1683
- 54: k,
1684
- 56: A,
1685
- 61: j,
1686
- 62: M,
1687
- 63: N,
1688
- 64: P,
1689
- 73: F
1690
- },
1691
- {
1692
- 4: o,
1693
- 5: s,
1694
- 8: 8,
1695
- 9: 10,
1696
- 10: c,
1697
- 13: 13,
1698
- 14: l,
1699
- 15: u,
1700
- 17: [1, 171],
1701
- 18: 16,
1702
- 19: d,
1703
- 22: f,
1704
- 23: 41,
1705
- 24: p,
1706
- 25: 20,
1707
- 26: 21,
1708
- 27: 22,
1709
- 28: 23,
1710
- 29: 24,
1711
- 30: m,
1712
- 31: h,
1713
- 32: g,
1714
- 34: _,
1715
- 36: v,
1716
- 37: y,
1717
- 38: b,
1718
- 39: x,
1719
- 40: S,
1720
- 42: C,
1721
- 44: w,
1722
- 45: T,
1723
- 47: E,
1724
- 51: D,
1725
- 53: O,
1726
- 54: k,
1727
- 56: A,
1728
- 61: j,
1729
- 62: M,
1730
- 63: N,
1731
- 64: P,
1732
- 73: F
1733
- },
1734
- { 16: [1, 172] },
1735
- e(I, [2, 50]),
1736
- { 16: [1, 173] },
1737
- e(I, [2, 55]),
1738
- e(Ce, [2, 76]),
1739
- { 76: [1, 174] },
1740
- { 16: [1, 175] },
1741
- e(I, [2, 52]),
1742
- { 16: [1, 176] },
1743
- e(I, [2, 57]),
1744
- e(I, [2, 53]),
1745
- {
1746
- 23: 177,
1747
- 73: F
1748
- },
1749
- {
1750
- 23: 178,
1751
- 73: F
1752
- },
1753
- {
1754
- 23: 179,
1755
- 73: F
1756
- },
1757
- {
1758
- 58: 180,
1759
- 104: J
1760
- },
1761
- {
1762
- 23: 181,
1763
- 72: [1, 182],
1764
- 73: F
1765
- },
1766
- {
1767
- 58: 183,
1768
- 104: J
1769
- },
1770
- {
1771
- 58: 184,
1772
- 104: J
1773
- },
1774
- {
1775
- 66: [1, 185],
1776
- 104: [2, 67]
1777
- },
1778
- { 5: [2, 60] },
1779
- { 5: [2, 105] },
1780
- { 5: [2, 61] },
1781
- { 5: [2, 62] },
1782
- { 5: [2, 63] },
1783
- e(I, [2, 17]),
1784
- e(ve, [2, 11]),
1785
- {
1786
- 13: 186,
1787
- 51: D,
1788
- 53: O,
1789
- 54: k
1790
- },
1791
- e(ve, [2, 13]),
1792
- e(ve, [2, 14]),
1793
- e(I, [2, 19]),
1794
- e(I, [2, 35]),
1795
- e(I, [2, 36]),
1796
- e(I, [2, 37]),
1797
- e(I, [2, 38]),
1798
- { 16: [1, 187] },
1799
- e(I, [2, 39]),
1800
- { 16: [1, 188] },
1801
- e(I, [2, 40]),
1802
- e(I, [2, 41]),
1803
- { 16: [1, 189] },
1804
- e(I, [2, 42]),
1805
- { 5: [1, 190] },
1806
- { 5: [1, 191] },
1807
- { 77: [1, 192] },
1808
- { 5: [1, 193] },
1809
- { 5: [1, 194] },
1810
- {
1811
- 58: 195,
1812
- 104: J
1813
- },
1814
- {
1815
- 58: 196,
1816
- 104: J
1817
- },
1818
- {
1819
- 58: 197,
1820
- 104: J
1821
- },
1822
- { 5: [2, 75] },
1823
- {
1824
- 58: 198,
1825
- 104: J
1826
- },
1827
- {
1828
- 23: 199,
1829
- 73: F
1830
- },
1831
- { 5: [2, 58] },
1832
- { 5: [2, 59] },
1833
- {
1834
- 23: 200,
1835
- 73: F
1836
- },
1837
- e(ve, [2, 12]),
1838
- e(be, a, {
1839
- 7: 124,
1840
- 41: 201
1841
- }),
1842
- e(xe, a, {
1843
- 7: 126,
1844
- 43: 202
1845
- }),
1846
- e(Se, a, {
1847
- 7: 129,
1848
- 46: 203
1849
- }),
1850
- e(I, [2, 49]),
1851
- e(I, [2, 54]),
1852
- e(Ce, [2, 77]),
1853
- e(I, [2, 51]),
1854
- e(I, [2, 56]),
1855
- { 5: [2, 70] },
1856
- { 5: [2, 71] },
1857
- { 5: [2, 72] },
1858
- { 5: [2, 73] },
1859
- {
1860
- 58: 204,
1861
- 104: J
1862
- },
1863
- { 104: [2, 66] },
1864
- { 17: [2, 48] },
1865
- { 17: [2, 46] },
1866
- { 17: [2, 44] },
1867
- { 5: [2, 74] }
1868
- ],
1869
- defaultActions: {
1870
- 5: [2, 1],
1871
- 6: [2, 2],
1872
- 108: [2, 68],
1873
- 109: [2, 69],
1874
- 150: [2, 60],
1875
- 151: [2, 105],
1876
- 152: [2, 61],
1877
- 153: [2, 62],
1878
- 154: [2, 63],
1879
- 180: [2, 75],
1880
- 183: [2, 58],
1881
- 184: [2, 59],
1882
- 195: [2, 70],
1883
- 196: [2, 71],
1884
- 197: [2, 72],
1885
- 198: [2, 73],
1886
- 200: [2, 66],
1887
- 201: [2, 48],
1888
- 202: [2, 46],
1889
- 203: [2, 44],
1890
- 204: [2, 74]
1891
- },
1892
- parseError: /* @__PURE__ */ n(function(e, t) {
1893
- if (t.recoverable) this.trace(e);
1894
- else {
1895
- var n = Error(e);
1896
- throw n.hash = t, n;
1897
- }
1898
- }, "parseError"),
1899
- parse: /* @__PURE__ */ n(function(e) {
1900
- var t = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
1901
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
1902
- h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
1903
- var v = h.yylloc;
1904
- o.push(v);
1905
- var y = h.options && h.options.ranges;
1906
- this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
1907
- function b(e) {
1908
- r.length -= 2 * e, a.length -= e, o.length -= e;
1909
- }
1910
- n(b, "popStack");
1911
- function x() {
1912
- var e = i.pop() || h.lex() || p;
1913
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
1914
- }
1915
- n(x, "lex");
1916
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
1917
- if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
1918
- var M = "";
1919
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
1920
- M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
1921
- text: h.match,
1922
- token: this.terminals_[S] || S,
1923
- line: h.yylineno,
1924
- loc: v,
1925
- expected: j
1926
- });
1927
- }
1928
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1929
- switch (T[0]) {
1930
- case 1:
1931
- r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
1932
- break;
1933
- case 2:
1934
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
1935
- first_line: o[o.length - (k || 1)].first_line,
1936
- last_line: o[o.length - 1].last_line,
1937
- first_column: o[o.length - (k || 1)].first_column,
1938
- last_column: o[o.length - 1].last_column
1939
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
1940
- c,
1941
- u,
1942
- l,
1943
- g.yy,
1944
- T[1],
1945
- a,
1946
- o
1947
- ].concat(m)), E !== void 0) return E;
1948
- k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
1949
- break;
1950
- case 3: return !0;
1951
- }
1952
- }
1953
- return !0;
1954
- }, "parse")
1955
- };
1956
- we.lexer = /* @__PURE__ */ (function() {
1957
- return {
1958
- EOF: 1,
1959
- parseError: /* @__PURE__ */ n(function(e, t) {
1960
- if (this.yy.parser) this.yy.parser.parseError(e, t);
1961
- else throw Error(e);
1962
- }, "parseError"),
1963
- setInput: /* @__PURE__ */ n(function(e, t) {
1964
- return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1965
- first_line: 1,
1966
- first_column: 0,
1967
- last_line: 1,
1968
- last_column: 0
1969
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1970
- }, "setInput"),
1971
- input: /* @__PURE__ */ n(function() {
1972
- var e = this._input[0];
1973
- return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
1974
- }, "input"),
1975
- unput: /* @__PURE__ */ n(function(e) {
1976
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
1977
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
1978
- var r = this.match.split(/(?:\r\n?|\n)/g);
1979
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
1980
- var i = this.yylloc.range;
1981
- return this.yylloc = {
1982
- first_line: this.yylloc.first_line,
1983
- last_line: this.yylineno + 1,
1984
- first_column: this.yylloc.first_column,
1985
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
1986
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
1987
- }, "unput"),
1988
- more: /* @__PURE__ */ n(function() {
1989
- return this._more = !0, this;
1990
- }, "more"),
1991
- reject: /* @__PURE__ */ n(function() {
1992
- if (this.options.backtrack_lexer) this._backtrack = !0;
1993
- 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).\n" + this.showPosition(), {
1994
- text: "",
1995
- token: null,
1996
- line: this.yylineno
1997
- });
1998
- return this;
1999
- }, "reject"),
2000
- less: /* @__PURE__ */ n(function(e) {
2001
- this.unput(this.match.slice(e));
2002
- }, "less"),
2003
- pastInput: /* @__PURE__ */ n(function() {
2004
- var e = this.matched.substr(0, this.matched.length - this.match.length);
2005
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
2006
- }, "pastInput"),
2007
- upcomingInput: /* @__PURE__ */ n(function() {
2008
- var e = this.match;
2009
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
2010
- }, "upcomingInput"),
2011
- showPosition: /* @__PURE__ */ n(function() {
2012
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
2013
- return e + this.upcomingInput() + "\n" + t + "^";
2014
- }, "showPosition"),
2015
- test_match: /* @__PURE__ */ n(function(e, t) {
2016
- var n, r, i;
2017
- if (this.options.backtrack_lexer && (i = {
2018
- yylineno: this.yylineno,
2019
- yylloc: {
2020
- first_line: this.yylloc.first_line,
2021
- last_line: this.last_line,
2022
- first_column: this.yylloc.first_column,
2023
- last_column: this.yylloc.last_column
2024
- },
2025
- yytext: this.yytext,
2026
- match: this.match,
2027
- matches: this.matches,
2028
- matched: this.matched,
2029
- yyleng: this.yyleng,
2030
- offset: this.offset,
2031
- _more: this._more,
2032
- _input: this._input,
2033
- yy: this.yy,
2034
- conditionStack: this.conditionStack.slice(0),
2035
- done: this.done
2036
- }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
2037
- first_line: this.yylloc.last_line,
2038
- last_line: this.yylineno + 1,
2039
- first_column: this.yylloc.last_column,
2040
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
2041
- }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
2042
- if (this._backtrack) {
2043
- for (var a in i) this[a] = i[a];
2044
- return !1;
2045
- }
2046
- return !1;
2047
- }, "test_match"),
2048
- next: /* @__PURE__ */ n(function() {
2049
- if (this.done) return this.EOF;
2050
- this._input || (this.done = !0);
2051
- var e, t, n, r;
2052
- this._more || (this.yytext = "", this.match = "");
2053
- for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
2054
- if (t = n, r = a, this.options.backtrack_lexer) {
2055
- if (e = this.test_match(n, i[a]), e !== !1) return e;
2056
- if (this._backtrack) {
2057
- t = !1;
2058
- continue;
2059
- }
2060
- return !1;
2061
- }
2062
- if (!this.options.flex) break;
2063
- }
2064
- return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
2065
- text: "",
2066
- token: null,
2067
- line: this.yylineno
2068
- });
2069
- }, "next"),
2070
- lex: /* @__PURE__ */ n(function() {
2071
- return this.next() || this.lex();
2072
- }, "lex"),
2073
- begin: /* @__PURE__ */ n(function(e) {
2074
- this.conditionStack.push(e);
2075
- }, "begin"),
2076
- popState: /* @__PURE__ */ n(function() {
2077
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2078
- }, "popState"),
2079
- _currentRules: /* @__PURE__ */ n(function() {
2080
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2081
- }, "_currentRules"),
2082
- topState: /* @__PURE__ */ n(function(e) {
2083
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
2084
- }, "topState"),
2085
- pushState: /* @__PURE__ */ n(function(e) {
2086
- this.begin(e);
2087
- }, "pushState"),
2088
- stateStackSize: /* @__PURE__ */ n(function() {
2089
- return this.conditionStack.length;
2090
- }, "stateStackSize"),
2091
- options: { "case-insensitive": !0 },
2092
- performAction: /* @__PURE__ */ n(function(e, t, n, r) {
2093
- switch (n) {
2094
- case 0: return 5;
2095
- case 1: break;
2096
- case 2: break;
2097
- case 3: break;
2098
- case 4: break;
2099
- case 5: break;
2100
- case 6: return 20;
2101
- case 7: return this.begin("CONFIG"), 75;
2102
- case 8: return 76;
2103
- case 9: return this.popState(), this.begin("ALIAS"), 77;
2104
- case 10: return this.popState(), this.popState(), 77;
2105
- case 11: return t.yytext = t.yytext.trim(), 73;
2106
- case 12: return t.yytext = t.yytext.trim(), this.begin("ALIAS"), 73;
2107
- case 13: return t.yytext = t.yytext.trim(), this.popState(), 73;
2108
- case 14: return this.popState(), 10;
2109
- case 15: return t.yytext = t.yytext.trim(), this.popState(), 10;
2110
- case 16: return this.begin("LINE"), 15;
2111
- case 17: return this.begin("ID"), 51;
2112
- case 18: return this.begin("ID"), 53;
2113
- case 19: return 14;
2114
- case 20: return this.begin("ID"), 54;
2115
- case 21: return this.popState(), this.popState(), this.begin("LINE"), 52;
2116
- case 22: return this.popState(), this.popState(), 5;
2117
- case 23: return this.begin("LINE"), 37;
2118
- case 24: return this.begin("LINE"), 38;
2119
- case 25: return this.begin("LINE"), 39;
2120
- case 26: return this.begin("LINE"), 40;
2121
- case 27: return this.begin("LINE"), 50;
2122
- case 28: return this.begin("LINE"), 42;
2123
- case 29: return this.begin("LINE"), 44;
2124
- case 30: return this.begin("LINE"), 49;
2125
- case 31: return this.begin("LINE"), 45;
2126
- case 32: return this.begin("LINE"), 48;
2127
- case 33: return this.begin("LINE"), 47;
2128
- case 34: return this.popState(), 16;
2129
- case 35: return 17;
2130
- case 36: return 67;
2131
- case 37: return 68;
2132
- case 38: return 61;
2133
- case 39: return 62;
2134
- case 40: return 63;
2135
- case 41: return 64;
2136
- case 42: return 59;
2137
- case 43: return 56;
2138
- case 44: return this.begin("ID"), 22;
2139
- case 45: return this.begin("ID"), 24;
2140
- case 46: return 30;
2141
- case 47: return 31;
2142
- case 48: return this.begin("acc_title"), 32;
2143
- case 49: return this.popState(), "acc_title_value";
2144
- case 50: return this.begin("acc_descr"), 34;
2145
- case 51: return this.popState(), "acc_descr_value";
2146
- case 52:
2147
- this.begin("acc_descr_multiline");
2148
- break;
2149
- case 53:
2150
- this.popState();
2151
- break;
2152
- case 54: return "acc_descr_multiline_value";
2153
- case 55: return 6;
2154
- case 56: return 19;
2155
- case 57: return 21;
2156
- case 58: return 66;
2157
- case 59: return 5;
2158
- case 60: return t.yytext = t.yytext.trim(), 73;
2159
- case 61: return 80;
2160
- case 62: return 97;
2161
- case 63: return 98;
2162
- case 64: return 99;
2163
- case 65: return 78;
2164
- case 66: return 79;
2165
- case 67: return 100;
2166
- case 68: return 101;
2167
- case 69: return 102;
2168
- case 70: return 103;
2169
- case 71: return 85;
2170
- case 72: return 86;
2171
- case 73: return 87;
2172
- case 74: return 88;
2173
- case 75: return 93;
2174
- case 76: return 94;
2175
- case 77: return 95;
2176
- case 78: return 96;
2177
- case 79: return 81;
2178
- case 80: return 82;
2179
- case 81: return 83;
2180
- case 82: return 84;
2181
- case 83: return 89;
2182
- case 84: return 90;
2183
- case 85: return 91;
2184
- case 86: return 92;
2185
- case 87: return 104;
2186
- case 88: return 104;
2187
- case 89: return 70;
2188
- case 90: return 71;
2189
- case 91: return 72;
2190
- case 92: return 5;
2191
- case 93: return 10;
2192
- }
2193
- }, "anonymous"),
2194
- rules: [
2195
- /^(?:[\n]+)/i,
2196
- /^(?:\s+)/i,
2197
- /^(?:((?!\n)\s)+)/i,
2198
- /^(?:#[^\n]*)/i,
2199
- /^(?:%(?!\{)[^\n]*)/i,
2200
- /^(?:[^\}]%%[^\n]*)/i,
2201
- /^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,
2202
- /^(?:@\{)/i,
2203
- /^(?:[^\}]+)/i,
2204
- /^(?:\}(?=\s+as\s))/i,
2205
- /^(?:\})/i,
2206
- /^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,
2207
- /^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,
2208
- /^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,
2209
- /^(?:[^<>:\n,;@]*<[^\n]*)/i,
2210
- /^(?:[^\n]+)/i,
2211
- /^(?:box\b)/i,
2212
- /^(?:participant\b)/i,
2213
- /^(?:actor\b)/i,
2214
- /^(?:create\b)/i,
2215
- /^(?:destroy\b)/i,
2216
- /^(?:as\b)/i,
2217
- /^(?:(?:))/i,
2218
- /^(?:loop\b)/i,
2219
- /^(?:rect\b)/i,
2220
- /^(?:opt\b)/i,
2221
- /^(?:alt\b)/i,
2222
- /^(?:else\b)/i,
2223
- /^(?:par\b)/i,
2224
- /^(?:par_over\b)/i,
2225
- /^(?:and\b)/i,
2226
- /^(?:critical\b)/i,
2227
- /^(?:option\b)/i,
2228
- /^(?:break\b)/i,
2229
- /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,
2230
- /^(?:end\b)/i,
2231
- /^(?:left of\b)/i,
2232
- /^(?:right of\b)/i,
2233
- /^(?:links\b)/i,
2234
- /^(?:link\b)/i,
2235
- /^(?:properties\b)/i,
2236
- /^(?:details\b)/i,
2237
- /^(?:over\b)/i,
2238
- /^(?:note\b)/i,
2239
- /^(?:activate\b)/i,
2240
- /^(?:deactivate\b)/i,
2241
- /^(?:title\s[^#\n;]+)/i,
2242
- /^(?:title:\s[^#\n;]+)/i,
2243
- /^(?:accTitle\s*:\s*)/i,
2244
- /^(?:(?!\n||)*[^\n]*)/i,
2245
- /^(?:accDescr\s*:\s*)/i,
2246
- /^(?:(?!\n||)*[^\n]*)/i,
2247
- /^(?:accDescr\s*\{\s*)/i,
2248
- /^(?:[\}])/i,
2249
- /^(?:[^\}]*)/i,
2250
- /^(?:sequenceDiagram\b)/i,
2251
- /^(?:autonumber\b)/i,
2252
- /^(?:off\b)/i,
2253
- /^(?:,)/i,
2254
- /^(?:;)/i,
2255
- /^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,
2256
- /^(?:->>)/i,
2257
- /^(?:<<->>)/i,
2258
- /^(?:-->>)/i,
2259
- /^(?:<<-->>)/i,
2260
- /^(?:->)/i,
2261
- /^(?:-->)/i,
2262
- /^(?:-[x])/i,
2263
- /^(?:--[x])/i,
2264
- /^(?:-[\)])/i,
2265
- /^(?:--[\)])/i,
2266
- /^(?:--\|\\)/i,
2267
- /^(?:--\|\/)/i,
2268
- /^(?:--\\\\)/i,
2269
- /^(?:--\/\/)/i,
2270
- /^(?:\/\|--)/i,
2271
- /^(?:\\\|--)/i,
2272
- /^(?:\/\/--)/i,
2273
- /^(?:\\\\--)/i,
2274
- /^(?:-\|\\)/i,
2275
- /^(?:-\|\/)/i,
2276
- /^(?:-\\\\)/i,
2277
- /^(?:-\/\/)/i,
2278
- /^(?:\/\|-)/i,
2279
- /^(?:\\\|-)/i,
2280
- /^(?:\/\/-)/i,
2281
- /^(?:\\\\-)/i,
2282
- /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,
2283
- /^(?::)/i,
2284
- /^(?:\+)/i,
2285
- /^(?:-)/i,
2286
- /^(?:\(\))/i,
2287
- /^(?:$)/i,
2288
- /^(?:.)/i
2289
- ],
2290
- conditions: {
2291
- acc_descr_multiline: {
2292
- rules: [53, 54],
2293
- inclusive: !1
2294
- },
2295
- acc_descr: {
2296
- rules: [51],
2297
- inclusive: !1
2298
- },
2299
- acc_title: {
2300
- rules: [49],
2301
- inclusive: !1
2302
- },
2303
- ID: {
2304
- rules: [
2305
- 2,
2306
- 3,
2307
- 7,
2308
- 11,
2309
- 12,
2310
- 13,
2311
- 14,
2312
- 15
2313
- ],
2314
- inclusive: !1
2315
- },
2316
- ALIAS: {
2317
- rules: [
2318
- 2,
2319
- 3,
2320
- 21,
2321
- 22
2322
- ],
2323
- inclusive: !1
2324
- },
2325
- LINE: {
2326
- rules: [
2327
- 2,
2328
- 3,
2329
- 34
2330
- ],
2331
- inclusive: !1
2332
- },
2333
- CONFIG: {
2334
- rules: [
2335
- 8,
2336
- 9,
2337
- 10
2338
- ],
2339
- inclusive: !1
2340
- },
2341
- CONFIG_DATA: {
2342
- rules: [],
2343
- inclusive: !1
2344
- },
2345
- INITIAL: {
2346
- rules: [
2347
- 0,
2348
- 1,
2349
- 3,
2350
- 4,
2351
- 5,
2352
- 6,
2353
- 16,
2354
- 17,
2355
- 18,
2356
- 19,
2357
- 20,
2358
- 23,
2359
- 24,
2360
- 25,
2361
- 26,
2362
- 27,
2363
- 28,
2364
- 29,
2365
- 30,
2366
- 31,
2367
- 32,
2368
- 33,
2369
- 35,
2370
- 36,
2371
- 37,
2372
- 38,
2373
- 39,
2374
- 40,
2375
- 41,
2376
- 42,
2377
- 43,
2378
- 44,
2379
- 45,
2380
- 46,
2381
- 47,
2382
- 48,
2383
- 50,
2384
- 52,
2385
- 55,
2386
- 56,
2387
- 57,
2388
- 58,
2389
- 59,
2390
- 60,
2391
- 61,
2392
- 62,
2393
- 63,
2394
- 64,
2395
- 65,
2396
- 66,
2397
- 67,
2398
- 68,
2399
- 69,
2400
- 70,
2401
- 71,
2402
- 72,
2403
- 73,
2404
- 74,
2405
- 75,
2406
- 76,
2407
- 77,
2408
- 78,
2409
- 79,
2410
- 80,
2411
- 81,
2412
- 82,
2413
- 83,
2414
- 84,
2415
- 85,
2416
- 86,
2417
- 87,
2418
- 88,
2419
- 89,
2420
- 90,
2421
- 91,
2422
- 92,
2423
- 93
2424
- ],
2425
- inclusive: !0
2426
- }
2427
- }
2428
- };
2429
- })();
2430
- function Te() {
2431
- this.yy = {};
2432
- }
2433
- return n(Te, "Parser"), Te.prototype = we, we.Parser = Te, new Te();
2434
- })();
2435
- P.parser = P;
2436
- var F = P, I = {
2437
- SOLID: 0,
2438
- DOTTED: 1,
2439
- NOTE: 2,
2440
- SOLID_CROSS: 3,
2441
- DOTTED_CROSS: 4,
2442
- SOLID_OPEN: 5,
2443
- DOTTED_OPEN: 6,
2444
- LOOP_START: 10,
2445
- LOOP_END: 11,
2446
- ALT_START: 12,
2447
- ALT_ELSE: 13,
2448
- ALT_END: 14,
2449
- OPT_START: 15,
2450
- OPT_END: 16,
2451
- ACTIVE_START: 17,
2452
- ACTIVE_END: 18,
2453
- PAR_START: 19,
2454
- PAR_AND: 20,
2455
- PAR_END: 21,
2456
- RECT_START: 22,
2457
- RECT_END: 23,
2458
- SOLID_POINT: 24,
2459
- DOTTED_POINT: 25,
2460
- AUTONUMBER: 26,
2461
- CRITICAL_START: 27,
2462
- CRITICAL_OPTION: 28,
2463
- CRITICAL_END: 29,
2464
- BREAK_START: 30,
2465
- BREAK_END: 31,
2466
- PAR_OVER_START: 32,
2467
- BIDIRECTIONAL_SOLID: 33,
2468
- BIDIRECTIONAL_DOTTED: 34,
2469
- SOLID_TOP: 41,
2470
- SOLID_BOTTOM: 42,
2471
- STICK_TOP: 43,
2472
- STICK_BOTTOM: 44,
2473
- SOLID_ARROW_TOP_REVERSE: 45,
2474
- SOLID_ARROW_BOTTOM_REVERSE: 46,
2475
- STICK_ARROW_TOP_REVERSE: 47,
2476
- STICK_ARROW_BOTTOM_REVERSE: 48,
2477
- SOLID_TOP_DOTTED: 51,
2478
- SOLID_BOTTOM_DOTTED: 52,
2479
- STICK_TOP_DOTTED: 53,
2480
- STICK_BOTTOM_DOTTED: 54,
2481
- SOLID_ARROW_TOP_REVERSE_DOTTED: 55,
2482
- SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 56,
2483
- STICK_ARROW_TOP_REVERSE_DOTTED: 57,
2484
- STICK_ARROW_BOTTOM_REVERSE_DOTTED: 58,
2485
- CENTRAL_CONNECTION: 59,
2486
- CENTRAL_CONNECTION_REVERSE: 60,
2487
- CENTRAL_CONNECTION_DUAL: 61
2488
- }, ee = {
2489
- FILLED: 0,
2490
- OPEN: 1
2491
- }, L = {
2492
- LEFTOF: 0,
2493
- RIGHTOF: 1,
2494
- OVER: 2
2495
- }, R = {
2496
- ACTOR: "actor",
2497
- BOUNDARY: "boundary",
2498
- COLLECTIONS: "collections",
2499
- CONTROL: "control",
2500
- DATABASE: "database",
2501
- ENTITY: "entity",
2502
- PARTICIPANT: "participant",
2503
- QUEUE: "queue"
2504
- }, te = class {
2505
- constructor() {
2506
- this.state = new M(() => ({
2507
- prevActor: void 0,
2508
- actors: /* @__PURE__ */ new Map(),
2509
- createdActors: /* @__PURE__ */ new Map(),
2510
- destroyedActors: /* @__PURE__ */ new Map(),
2511
- boxes: [],
2512
- messages: [],
2513
- notes: [],
2514
- sequenceNumbersEnabled: !1,
2515
- wrapEnabled: void 0,
2516
- currentBox: void 0,
2517
- lastCreated: void 0,
2518
- lastDestroyed: void 0
2519
- })), this.setAccTitle = l, this.setAccDescription = o, this.setDiagramTitle = s, this.getAccTitle = y, this.getAccDescription = g, this.getDiagramTitle = _, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(v().wrap), this.LINETYPE = I, this.ARROWTYPE = ee, this.PLACEMENT = L;
2520
- }
2521
- static {
2522
- n(this, "SequenceDB");
2523
- }
2524
- addBox(e) {
2525
- this.state.records.boxes.push({
2526
- name: e.text,
2527
- wrap: e.wrap ?? this.autoWrap(),
2528
- fill: e.color,
2529
- actorKeys: []
2530
- }), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
2531
- }
2532
- addActor(e, t, n, r, i) {
2533
- let a = this.state.records.currentBox, o;
2534
- if (i !== void 0) {
2535
- let e;
2536
- e = i.includes("\n") ? i + "\n" : "{\n" + i + "\n}", o = w(e, { schema: T });
2537
- }
2538
- r = o?.type ?? r, o?.alias && (!n || n.text === t) && (n = {
2539
- text: o.alias,
2540
- wrap: n?.wrap,
2541
- type: r
2542
- });
2543
- let s = this.state.records.actors.get(e);
2544
- if (s) {
2545
- if (this.state.records.currentBox && s.box && this.state.records.currentBox !== s.box) throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);
2546
- if (a = s.box ? s.box : this.state.records.currentBox, s.box = a, s && t === s.name && n == null) return;
2547
- }
2548
- if (n?.text ?? (n = {
2549
- text: t,
2550
- type: r
2551
- }), (r == null || n.text == null) && (n = {
2552
- text: t,
2553
- type: r
2554
- }), this.state.records.actors.set(e, {
2555
- box: a,
2556
- name: t,
2557
- description: n.text,
2558
- wrap: n.wrap ?? this.autoWrap(),
2559
- prevActor: this.state.records.prevActor,
2560
- links: {},
2561
- properties: {},
2562
- actorCnt: null,
2563
- rectData: null,
2564
- type: r ?? "participant"
2565
- }), this.state.records.prevActor) {
2566
- let t = this.state.records.actors.get(this.state.records.prevActor);
2567
- t && (t.nextActor = e);
2568
- }
2569
- this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(e), this.state.records.prevActor = e;
2570
- }
2571
- activationCount(e) {
2572
- let t, n = 0;
2573
- if (!e) return 0;
2574
- for (t = 0; t < this.state.records.messages.length; t++) this.state.records.messages[t].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[t].from === e && n++, this.state.records.messages[t].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[t].from === e && n--;
2575
- return n;
2576
- }
2577
- addMessage(e, t, n, r) {
2578
- this.state.records.messages.push({
2579
- id: this.state.records.messages.length.toString(),
2580
- from: e,
2581
- to: t,
2582
- message: n.text,
2583
- wrap: n.wrap ?? this.autoWrap(),
2584
- answer: r
2585
- });
2586
- }
2587
- addSignal(e, t, n, r, i = !1, a) {
2588
- if (r === this.LINETYPE.ACTIVE_END && this.activationCount(e ?? "") < 1) {
2589
- let t = /* @__PURE__ */ Error("Trying to inactivate an inactive participant (" + e + ")");
2590
- throw t.hash = {
2591
- text: "->>-",
2592
- token: "->>-",
2593
- line: "1",
2594
- loc: {
2595
- first_line: 1,
2596
- last_line: 1,
2597
- first_column: 1,
2598
- last_column: 1
2599
- },
2600
- expected: ["'ACTIVE_PARTICIPANT'"]
2601
- }, t;
2602
- }
2603
- return this.state.records.messages.push({
2604
- id: this.state.records.messages.length.toString(),
2605
- from: e,
2606
- to: t,
2607
- message: n?.text ?? "",
2608
- wrap: n?.wrap ?? this.autoWrap(),
2609
- type: r,
2610
- activate: i,
2611
- centralConnection: a ?? 0
2612
- }), !0;
2613
- }
2614
- hasAtLeastOneBox() {
2615
- return this.state.records.boxes.length > 0;
2616
- }
2617
- hasAtLeastOneBoxWithTitle() {
2618
- return this.state.records.boxes.some((e) => e.name);
2619
- }
2620
- getMessages() {
2621
- return this.state.records.messages;
2622
- }
2623
- getBoxes() {
2624
- return this.state.records.boxes;
2625
- }
2626
- getActors() {
2627
- return this.state.records.actors;
2628
- }
2629
- getCreatedActors() {
2630
- return this.state.records.createdActors;
2631
- }
2632
- getDestroyedActors() {
2633
- return this.state.records.destroyedActors;
2634
- }
2635
- getActor(e) {
2636
- return this.state.records.actors.get(e);
2637
- }
2638
- getActorKeys() {
2639
- return [...this.state.records.actors.keys()];
2640
- }
2641
- enableSequenceNumbers() {
2642
- this.state.records.sequenceNumbersEnabled = !0;
2643
- }
2644
- disableSequenceNumbers() {
2645
- this.state.records.sequenceNumbersEnabled = !1;
2646
- }
2647
- showSequenceNumbers() {
2648
- return this.state.records.sequenceNumbersEnabled;
2649
- }
2650
- setWrap(e) {
2651
- this.state.records.wrapEnabled = e;
2652
- }
2653
- extractWrap(e) {
2654
- if (e === void 0) return {};
2655
- e = e.trim();
2656
- let t = /^:?wrap:/.exec(e) !== null || /^:?nowrap:/.exec(e) === null && void 0;
2657
- return {
2658
- cleanedText: (t === void 0 ? e : e.replace(/^:?(?:no)?wrap:/, "")).trim(),
2659
- wrap: t
2660
- };
2661
- }
2662
- autoWrap() {
2663
- return this.state.records.wrapEnabled === void 0 ? v().sequence?.wrap ?? !1 : this.state.records.wrapEnabled;
2664
- }
2665
- clear() {
2666
- this.state.reset(), u();
2667
- }
2668
- parseMessage(t) {
2669
- let n = t.trim(), { wrap: r, cleanedText: i } = this.extractWrap(n), a = {
2670
- text: i,
2671
- wrap: r
2672
- };
2673
- return e.debug(`parseMessage: ${JSON.stringify(a)}`), a;
2674
- }
2675
- parseBoxData(e) {
2676
- let t = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e), n = t?.[1] ? t[1].trim() : "transparent", r = t?.[2] ? t[2].trim() : void 0;
2677
- if (window?.CSS) window.CSS.supports("color", n) || (n = "transparent", r = e.trim());
2678
- else {
2679
- let t = new Option().style;
2680
- t.color = n, t.color !== n && (n = "transparent", r = e.trim());
2681
- }
2682
- let { wrap: i, cleanedText: a } = this.extractWrap(r);
2683
- return {
2684
- text: a ? b(a, v()) : void 0,
2685
- color: n,
2686
- wrap: i
2687
- };
2688
- }
2689
- addNote(e, t, n) {
2690
- let r = {
2691
- actor: e,
2692
- placement: t,
2693
- message: n.text,
2694
- wrap: n.wrap ?? this.autoWrap()
2695
- }, i = [].concat(e, e);
2696
- this.state.records.notes.push(r), this.state.records.messages.push({
2697
- id: this.state.records.messages.length.toString(),
2698
- from: i[0],
2699
- to: i[1],
2700
- message: n.text,
2701
- wrap: n.wrap ?? this.autoWrap(),
2702
- type: this.LINETYPE.NOTE,
2703
- placement: t
2704
- });
2705
- }
2706
- addLinks(t, n) {
2707
- let r = this.getActor(t);
2708
- try {
2709
- let e = b(n.text, v());
2710
- e = e.replace(/&equals;/g, "="), e = e.replace(/&amp;/g, "&");
2711
- let t = JSON.parse(e);
2712
- this.insertLinks(r, t);
2713
- } catch (t) {
2714
- e.error("error while parsing actor link text", t);
2715
- }
2716
- }
2717
- addALink(t, n) {
2718
- let r = this.getActor(t);
2719
- try {
2720
- let e = {}, t = b(n.text, v()), i = t.indexOf("@");
2721
- t = t.replace(/&equals;/g, "="), t = t.replace(/&amp;/g, "&");
2722
- let a = t.slice(0, i - 1).trim();
2723
- e[a] = t.slice(i + 1).trim(), this.insertLinks(r, e);
2724
- } catch (t) {
2725
- e.error("error while parsing actor link text", t);
2726
- }
2727
- }
2728
- insertLinks(e, t) {
2729
- if (e.links == null) e.links = t;
2730
- else for (let n in t) e.links[n] = t[n];
2731
- }
2732
- addProperties(t, n) {
2733
- let r = this.getActor(t);
2734
- try {
2735
- let e = b(n.text, v()), t = JSON.parse(e);
2736
- this.insertProperties(r, t);
2737
- } catch (t) {
2738
- e.error("error while parsing actor properties text", t);
2739
- }
2740
- }
2741
- insertProperties(e, t) {
2742
- if (e.properties == null) e.properties = t;
2743
- else for (let n in t) e.properties[n] = t[n];
2744
- }
2745
- boxEnd() {
2746
- this.state.records.currentBox = void 0;
2747
- }
2748
- addDetails(t, n) {
2749
- let r = this.getActor(t), i = document.getElementById(n.text);
2750
- try {
2751
- let e = i.innerHTML, t = JSON.parse(e);
2752
- t.properties && this.insertProperties(r, t.properties), t.links && this.insertLinks(r, t.links);
2753
- } catch (t) {
2754
- e.error("error while parsing actor details text", t);
2755
- }
2756
- }
2757
- getActorProperty(e, t) {
2758
- if (e?.properties !== void 0) return e.properties[t];
2759
- }
2760
- apply(e) {
2761
- if (Array.isArray(e)) e.forEach((e) => {
2762
- this.apply(e);
2763
- });
2764
- else switch (e.type) {
2765
- case "sequenceIndex":
2766
- this.state.records.messages.push({
2767
- id: this.state.records.messages.length.toString(),
2768
- from: void 0,
2769
- to: void 0,
2770
- message: {
2771
- start: e.sequenceIndex,
2772
- step: e.sequenceIndexStep,
2773
- visible: e.sequenceVisible
2774
- },
2775
- wrap: !1,
2776
- type: e.signalType
2777
- });
2778
- break;
2779
- case "addParticipant":
2780
- this.addActor(e.actor, e.actor, e.description, e.draw, e.config);
2781
- break;
2782
- case "createParticipant":
2783
- if (this.state.records.actors.has(e.actor)) throw 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");
2784
- this.state.records.lastCreated = e.actor, this.addActor(e.actor, e.actor, e.description, e.draw, e.config), this.state.records.createdActors.set(e.actor, this.state.records.messages.length);
2785
- break;
2786
- case "destroyParticipant":
2787
- this.state.records.lastDestroyed = e.actor, this.state.records.destroyedActors.set(e.actor, this.state.records.messages.length);
2788
- break;
2789
- case "activeStart":
2790
- this.addSignal(e.actor, void 0, void 0, e.signalType);
2791
- break;
2792
- case "centralConnection":
2793
- this.addSignal(e.actor, void 0, void 0, e.signalType);
2794
- break;
2795
- case "centralConnectionReverse":
2796
- this.addSignal(e.actor, void 0, void 0, e.signalType);
2797
- break;
2798
- case "activeEnd":
2799
- this.addSignal(e.actor, void 0, void 0, e.signalType);
2800
- break;
2801
- case "addNote":
2802
- this.addNote(e.actor, e.placement, e.text);
2803
- break;
2804
- case "addLinks":
2805
- this.addLinks(e.actor, e.text);
2806
- break;
2807
- case "addALink":
2808
- this.addALink(e.actor, e.text);
2809
- break;
2810
- case "addProperties":
2811
- this.addProperties(e.actor, e.text);
2812
- break;
2813
- case "addDetails":
2814
- this.addDetails(e.actor, e.text);
2815
- break;
2816
- case "addMessage":
2817
- if (this.state.records.lastCreated) {
2818
- if (e.to !== this.state.records.lastCreated) throw Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
2819
- this.state.records.lastCreated = void 0;
2820
- } else if (this.state.records.lastDestroyed) {
2821
- if (e.to !== this.state.records.lastDestroyed && e.from !== this.state.records.lastDestroyed) throw Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
2822
- this.state.records.lastDestroyed = void 0;
2823
- }
2824
- this.addSignal(e.from, e.to, e.msg, e.signalType, e.activate, e.centralConnection);
2825
- break;
2826
- case "boxStart":
2827
- this.addBox(e.boxData);
2828
- break;
2829
- case "boxEnd":
2830
- this.boxEnd();
2831
- break;
2832
- case "loopStart":
2833
- this.addSignal(void 0, void 0, e.loopText, e.signalType);
2834
- break;
2835
- case "loopEnd":
2836
- this.addSignal(void 0, void 0, void 0, e.signalType);
2837
- break;
2838
- case "rectStart":
2839
- this.addSignal(void 0, void 0, e.color, e.signalType);
2840
- break;
2841
- case "rectEnd":
2842
- this.addSignal(void 0, void 0, void 0, e.signalType);
2843
- break;
2844
- case "optStart":
2845
- this.addSignal(void 0, void 0, e.optText, e.signalType);
2846
- break;
2847
- case "optEnd":
2848
- this.addSignal(void 0, void 0, void 0, e.signalType);
2849
- break;
2850
- case "altStart":
2851
- this.addSignal(void 0, void 0, e.altText, e.signalType);
2852
- break;
2853
- case "else":
2854
- this.addSignal(void 0, void 0, e.altText, e.signalType);
2855
- break;
2856
- case "altEnd":
2857
- this.addSignal(void 0, void 0, void 0, e.signalType);
2858
- break;
2859
- case "setAccTitle":
2860
- l(e.text);
2861
- break;
2862
- case "parStart":
2863
- this.addSignal(void 0, void 0, e.parText, e.signalType);
2864
- break;
2865
- case "and":
2866
- this.addSignal(void 0, void 0, e.parText, e.signalType);
2867
- break;
2868
- case "parEnd":
2869
- this.addSignal(void 0, void 0, void 0, e.signalType);
2870
- break;
2871
- case "criticalStart":
2872
- this.addSignal(void 0, void 0, e.criticalText, e.signalType);
2873
- break;
2874
- case "option":
2875
- this.addSignal(void 0, void 0, e.optionText, e.signalType);
2876
- break;
2877
- case "criticalEnd":
2878
- this.addSignal(void 0, void 0, void 0, e.signalType);
2879
- break;
2880
- case "breakStart":
2881
- this.addSignal(void 0, void 0, e.breakText, e.signalType);
2882
- break;
2883
- case "breakEnd": this.addSignal(void 0, void 0, void 0, e.signalType);
2884
- }
2885
- }
2886
- getConfig() {
2887
- return v().sequence;
2888
- }
2889
- }, ne = /* @__PURE__ */ n((e) => {
2890
- let t = e.dropShadow ?? "none", { look: n } = v();
2891
- return `.actor {
2892
- stroke: ${e.actorBorder};
2893
- fill: ${e.actorBkg};
2894
- stroke-width: ${e.strokeWidth ?? 1};
2895
- }
2896
-
2897
- rect.actor.outer-path[data-look="neo"] {
2898
- filter: ${t};
2899
- }
2900
-
2901
- rect.note[data-look="neo"] {
2902
- stroke:${e.noteBorderColor};
2903
- fill:${e.noteBkgColor};
2904
- filter: ${t};
2905
- }
2906
-
2907
- text.actor > tspan {
2908
- fill: ${e.actorTextColor};
2909
- stroke: none;
2910
- }
2911
-
2912
- .actor-line {
2913
- stroke: ${e.actorLineColor};
2914
- }
2915
-
2916
- .innerArc {
2917
- stroke-width: 1.5;
2918
- stroke-dasharray: none;
2919
- }
2920
-
2921
- .messageLine0 {
2922
- stroke-width: 1.5;
2923
- stroke-dasharray: none;
2924
- stroke: ${e.signalColor};
2925
- }
2926
-
2927
- .messageLine1 {
2928
- stroke-width: 1.5;
2929
- stroke-dasharray: 2, 2;
2930
- stroke: ${e.signalColor};
2931
- }
2932
-
2933
- [id$="-arrowhead"] path {
2934
- fill: ${e.signalColor};
2935
- stroke: ${e.signalColor};
2936
- }
2937
-
2938
- .sequenceNumber {
2939
- fill: ${e.sequenceNumberColor};
2940
- }
2941
-
2942
- [id$="-sequencenumber"] {
2943
- fill: ${e.signalColor};
2944
- }
2945
-
2946
- [id$="-crosshead"] path {
2947
- fill: ${e.signalColor};
2948
- stroke: ${e.signalColor};
2949
- }
2950
-
2951
- .messageText {
2952
- fill: ${e.signalTextColor};
2953
- stroke: none;
2954
- }
2955
-
2956
- .labelBox {
2957
- stroke: ${e.labelBoxBorderColor};
2958
- fill: ${e.labelBoxBkgColor};
2959
- filter: ${n === "neo" ? t : "none"};
2960
- }
2961
-
2962
- .labelText, .labelText > tspan {
2963
- fill: ${e.labelTextColor};
2964
- stroke: none;
2965
- }
2966
-
2967
- .loopText, .loopText > tspan {
2968
- fill: ${e.loopTextColor};
2969
- stroke: none;
2970
- }
2971
-
2972
- .sectionTitle, .sectionTitle > tspan {
2973
- fill: ${e.loopTextColor};
2974
- stroke: none;
2975
- }
2976
-
2977
- .loopLine {
2978
- stroke-width: 2px;
2979
- stroke-dasharray: 2, 2;
2980
- stroke: ${e.labelBoxBorderColor};
2981
- fill: ${e.labelBoxBorderColor};
2982
- }
2983
-
2984
- .note {
2985
- //stroke: #decc93;
2986
- stroke: ${e.noteBorderColor};
2987
- fill: ${e.noteBkgColor};
2988
- }
2989
-
2990
- .noteText, .noteText > tspan {
2991
- fill: ${e.noteTextColor};
2992
- stroke: none;
2993
- ${e.noteFontWeight ? `font-weight: ${e.noteFontWeight};` : ""}
2994
- }
2995
-
2996
- .activation0 {
2997
- fill: ${e.activationBkgColor};
2998
- stroke: ${e.activationBorderColor};
2999
- }
3000
-
3001
- .activation1 {
3002
- fill: ${e.activationBkgColor};
3003
- stroke: ${e.activationBorderColor};
3004
- }
3005
-
3006
- .activation2 {
3007
- fill: ${e.activationBkgColor};
3008
- stroke: ${e.activationBorderColor};
3009
- }
3010
-
3011
- .actorPopupMenu {
3012
- position: absolute;
3013
- }
3014
-
3015
- .actorPopupMenuPanel {
3016
- position: absolute;
3017
- fill: ${e.actorBkg};
3018
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
3019
- filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
3020
- }
3021
- .actor-man circle, line {
3022
- fill: ${e.actorBkg};
3023
- stroke-width: 2px;
3024
- }
3025
-
3026
- g rect.rect {
3027
- filter: ${t};
3028
- stroke: ${e.nodeBorder};
3029
- }
3030
- `;
3031
- }, "getStyles"), z = 36, B = "actor-top", V = "actor-bottom", re = "actor-box", H = "actor-man", U = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), W = /* @__PURE__ */ n(function(e, t) {
3032
- let n = E(e, t);
3033
- return d().look === "neo" && n.attr("data-look", "neo"), n;
3034
- }, "drawRect"), ie = /* @__PURE__ */ n(function(e, t, n, r, i) {
3035
- if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0) return {
3036
- height: 0,
3037
- width: 0
3038
- };
3039
- let a = t.links, o = t.actorCnt, s = t.rectData;
3040
- var c = "none";
3041
- i && (c = "block !important");
3042
- let l = e.append("g");
3043
- l.attr("id", "actor" + o + "_popup"), l.attr("class", "actorPopupMenu"), l.attr("display", c);
3044
- var u = "";
3045
- s.class !== void 0 && (u = " " + s.class);
3046
- let d = s.width > n ? s.width : n, f = l.append("rect");
3047
- if (f.attr("class", "actorPopupMenuPanel" + u), f.attr("x", s.x), f.attr("y", s.height), f.attr("fill", s.fill), f.attr("stroke", s.stroke), f.attr("width", d), f.attr("height", s.height), f.attr("rx", s.rx), f.attr("ry", s.ry), a != null) {
3048
- var p = 20;
3049
- for (let e in a) {
3050
- var m = l.append("a"), h = (0, N.sanitizeUrl)(a[e]);
3051
- m.attr("xlink:href", h), m.attr("target", "_blank"), je(r)(e, m, s.x + 10, s.height + p, d, 20, { class: "actor" }, r), p += 30;
3052
- }
3053
- }
3054
- return f.attr("height", p), {
3055
- height: s.height + p,
3056
- width: d
3057
- };
3058
- }, "drawPopup"), ae = /* @__PURE__ */ n(function(e) {
3059
- return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
3060
- }, "popupMenuToggle"), oe = /* @__PURE__ */ n(async function(e, t, n = null) {
3061
- let r = e.append("foreignObject"), a = await i(t.text, d()), o = r.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();
3062
- if (r.attr("height", Math.round(o.height)).attr("width", Math.round(o.width)), t.class === "noteText") {
3063
- let n = e.node().firstChild;
3064
- n.setAttribute("height", o.height + 2 * t.textMargin);
3065
- let i = n.getBBox();
3066
- r.attr("x", Math.round(i.x + i.width / 2 - o.width / 2)).attr("y", Math.round(i.y + i.height / 2 - o.height / 2));
3067
- } else if (n) {
3068
- let { startx: e, stopx: i, starty: a } = n;
3069
- if (e > i) {
3070
- let t = e;
3071
- e = i, i = t;
3072
- }
3073
- r.attr("x", Math.round(e + Math.abs(e - i) / 2 - o.width / 2)), t.class === "loopText" ? r.attr("y", Math.round(a)) : r.attr("y", Math.round(a - o.height));
3074
- }
3075
- return [r];
3076
- }, "drawKatex"), G = /* @__PURE__ */ n(function(e, t) {
3077
- let r = 0, i = 0, a = t.text.split(h.lineBreakRegex), [o, s] = C(t.fontSize), c = [], l = 0, u = /* @__PURE__ */ n(() => t.y, "yfunc");
3078
- if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0) switch (t.valign) {
3079
- case "top":
3080
- case "start":
3081
- u = /* @__PURE__ */ n(() => Math.round(t.y + t.textMargin), "yfunc");
3082
- break;
3083
- case "middle":
3084
- case "center":
3085
- u = /* @__PURE__ */ n(() => Math.round(t.y + (r + i + t.textMargin) / 2), "yfunc");
3086
- break;
3087
- case "bottom":
3088
- case "end": u = /* @__PURE__ */ n(() => Math.round(t.y + (r + i + 2 * t.textMargin) - t.textMargin), "yfunc");
3089
- }
3090
- if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0) switch (t.anchor) {
3091
- case "left":
3092
- case "start":
3093
- t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3094
- break;
3095
- case "middle":
3096
- case "center":
3097
- t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3098
- break;
3099
- case "right":
3100
- case "end": t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3101
- }
3102
- for (let [n, d] of a.entries()) {
3103
- t.textMargin !== void 0 && t.textMargin === 0 && o !== void 0 && (l = n * o);
3104
- let a = e.append("text");
3105
- a.attr("x", t.x), a.attr("y", u()), t.anchor !== void 0 && a.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && a.style("font-family", t.fontFamily), s !== void 0 && a.style("font-size", s), t.fontWeight !== void 0 && a.style("font-weight", t.fontWeight), t.fill !== void 0 && a.attr("fill", t.fill), t.class !== void 0 && a.attr("class", t.class), t.dy === void 0 ? l !== 0 && a.attr("dy", l) : a.attr("dy", t.dy);
3106
- let f = d || "​";
3107
- if (t.tspan) {
3108
- let e = a.append("tspan");
3109
- e.attr("x", t.x), t.fill !== void 0 && e.attr("fill", t.fill), e.text(f);
3110
- } else a.text(f);
3111
- t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (i += (a._groups || a)[0][0].getBBox().height, r = i), c.push(a);
3112
- }
3113
- return c;
3114
- }, "drawText"), se = /* @__PURE__ */ n(function(e, t) {
3115
- function r(e, t, n, r, i) {
3116
- return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
3117
- }
3118
- n(r, "genPoints");
3119
- let i = e.append("polygon");
3120
- return i.attr("points", r(t.x, t.y, t.width, t.height, 7)), i.attr("class", "labelBox"), t.y += t.height / 2, G(e, t), i;
3121
- }, "drawLabel"), K = -1, ce = /* @__PURE__ */ n((e, t, n, r) => {
3122
- e.select && n.forEach((n) => {
3123
- let i = t.get(n), a = e.select("#actor" + i.actorCnt);
3124
- !r.mirrorActors && i.stopy ? a.attr("y2", i.stopy + i.height / 2) : r.mirrorActors && a.attr("y2", i.stopy);
3125
- });
3126
- }, "fixLifeLineHeights"), le = /* @__PURE__ */ n(function(e, t, n, i, a) {
3127
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, m = e.append("g").lower();
3128
- var h = m;
3129
- i || (K++, Object.keys(t.links || {}).length && !n.forceMenus && h.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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), h = m.append("g"), t.actorCnt = K, t.links != null && h.attr("id", "root-" + K), l === "neo" && h.attr("data-look", "neo"));
3130
- let g = j();
3131
- var _ = "actor";
3132
- t.properties?.class ? _ = t.properties.class : g.fill = "#eaeaea", _ += i ? ` ${V}` : ` ${B}`, g.x = t.x, g.y = o, g.width = t.width, g.height = t.height, g.class = _, g.rx = 3, g.ry = 3, g.name = t.name, l === "neo" && (g.rx = 6, g.ry = 6);
3133
- let v = W(h, g), y = a.get(t.name) ?? 0;
3134
- if (U.has(u) && (v.style("stroke", p[y % p.length]), v.style("fill", f[y % p.length])), l === "neo" && v.attr("filter", "url(#drop-shadow)"), t.rectData = g, t.properties?.icon) {
3135
- let e = t.properties.icon.trim();
3136
- e.charAt(0) === "@" ? A(h, g.x + g.width - 20, g.y + 10, e.substr(1)) : O(h, g.x + g.width - 20, g.y + 10, e);
3137
- }
3138
- i || (h.attr("data-et", "participant"), h.attr("data-type", "participant"), h.attr("data-id", t.name)), Y(n, r(t.description))(t.description, h, g.x, g.y, g.width, g.height, { class: `actor ${re}` }, n);
3139
- let b = t.height;
3140
- if (v.node) {
3141
- let e = v.node().getBBox();
3142
- t.height = e.height, b = e.height;
3143
- }
3144
- return b;
3145
- }, "drawActorTypeParticipant"), ue = /* @__PURE__ */ n(function(e, t, n, i, a) {
3146
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, m = e.append("g").lower();
3147
- var h = m;
3148
- i || (K++, Object.keys(t.links || {}).length && !n.forceMenus && h.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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), h = m.append("g"), t.actorCnt = K, t.links != null && h.attr("id", "root-" + K), l === "neo" && h.attr("data-look", "neo"));
3149
- let g = j();
3150
- var _ = "actor";
3151
- t.properties?.class ? _ = t.properties.class : g.fill = "#eaeaea", _ += i ? ` ${V}` : ` ${B}`, g.x = t.x, g.y = o, g.width = t.width, g.height = t.height, g.class = _, g.name = t.name;
3152
- let v = {
3153
- ...g,
3154
- x: g.x + -6,
3155
- y: g.y + 6,
3156
- class: "actor"
3157
- }, y = W(h, g), b = W(h, v);
3158
- t.rectData = g, l === "neo" && h.attr("filter", "url(#drop-shadow)");
3159
- let x = a.get(t.name) ?? 0;
3160
- if (U.has(u) && (y.style("stroke", p[x % p.length]), y.style("fill", f[x % p.length]), b.style("stroke", p[x % p.length]), b.style("fill", f[x % p.length])), t.properties?.icon) {
3161
- let e = t.properties.icon.trim();
3162
- e.charAt(0) === "@" ? A(h, g.x + g.width - 20, g.y + 10, e.substr(1)) : O(h, g.x + g.width - 20, g.y + 10, e);
3163
- }
3164
- Y(n, r(t.description))(t.description, h, g.x - 6, g.y + 6, g.width, g.height, { class: `actor ${re}` }, n);
3165
- let S = t.height;
3166
- if (y.node) {
3167
- let e = y.node().getBBox();
3168
- t.height = e.height, S = e.height;
3169
- }
3170
- return i || (h.attr("data-et", "participant"), h.attr("data-type", "collections"), h.attr("data-id", t.name)), S;
3171
- }, "drawActorTypeCollections"), de = /* @__PURE__ */ n(function(e, t, n, i, a) {
3172
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, m = e.append("g").lower(), h = m;
3173
- i || (K++, Object.keys(t.links || {}).length && !n.forceMenus && h.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), h.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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), h = m.append("g"), t.actorCnt = K, t.links != null && h.attr("id", "root-" + K), l === "neo" && h.attr("data-look", "neo"));
3174
- let g = j(), _ = "actor";
3175
- t.properties?.class ? _ = t.properties.class : g.fill = "#eaeaea", _ += i ? ` ${V}` : ` ${B}`, h.attr("class", _), g.x = t.x, g.y = o, g.width = t.width, g.height = t.height, g.name = t.name;
3176
- let v = g.height / 2, y = v / (2.5 + g.height / 50), b = h.append("g"), x = h.append("g"), S = `M ${g.x},${g.y + v}
3177
- a ${y},${v} 0 0 0 0,${g.height}
3178
- h ${g.width - 2 * y}
3179
- a ${y},${v} 0 0 0 0,-${g.height}
3180
- Z
3181
- `;
3182
- b.append("path").attr("d", S), x.append("path").attr("d", `M ${g.x},${g.y + v}
3183
- a ${y},${v} 0 0 0 0,${g.height}`), b.attr("transform", `translate(${y}, ${-(g.height / 2)})`), x.attr("transform", `translate(${g.width - y}, ${-g.height / 2})`), t.rectData = g, l === "neo" && b.attr("filter", "url(#drop-shadow)");
3184
- let C = a.get(t.name) ?? 0;
3185
- if (U.has(u) && (b.style("stroke", p[C % p.length]), b.style("fill", f[C % p.length]), x.style("stroke", p[C % p.length]), x.style("fill", f[C % p.length])), t.properties?.icon) {
3186
- let e = t.properties.icon.trim(), n = g.x + g.width - 20, r = g.y + 10;
3187
- e.charAt(0) === "@" ? A(h, n, r, e.substr(1)) : O(h, n, r, e);
3188
- }
3189
- Y(n, r(t.description))(t.description, h, g.x, g.y, g.width, g.height, { class: `actor ${re}` }, n);
3190
- let w = t.height, T = b.select("path:last-child");
3191
- if (T.node()) {
3192
- let e = T.node().getBBox();
3193
- t.height = e.height, w = e.height;
3194
- }
3195
- return i || (h.attr("data-et", "participant"), h.attr("data-type", "queue"), h.attr("data-id", t.name)), w;
3196
- }, "drawActorTypeQueue"), fe = /* @__PURE__ */ n(function(e, t, n, i, a, o) {
3197
- let s = i ? t.stopy : t.starty, c = t.x + t.width / 2, l = s + 75, { look: u, theme: d, themeVariables: f } = n, { bkgColorArray: p, borderColorArray: m, actorBorder: h, actorBkg: g } = f, _ = e.append("g").lower();
3198
- i || (K++, _.append("line").attr("id", "actor" + K).attr("x1", c).attr("y1", l).attr("x2", c).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = K);
3199
- let v = e.append("g"), y = H;
3200
- y += i ? ` ${V}` : ` ${B}`, v.attr("class", y), v.attr("name", t.name);
3201
- let b = j();
3202
- b.x = t.x, b.y = s, b.fill = "#eaeaea", b.width = t.width, b.height = t.height, b.class = "actor";
3203
- let x = t.x + t.width / 2, S = s + 32;
3204
- v.append("defs").append("marker").attr("id", a + "-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"), v.append("circle").attr("cx", x).attr("cy", S).attr("r", 22).attr("filter", `${u === "neo" ? "url(#drop-shadow)" : ""}`), v.append("line").attr("marker-end", "url(#" + a + "-filled-head-control)").attr("transform", `translate(${x}, ${S - 22})`);
3205
- let C = o.get(t.name) ?? 0;
3206
- return U.has(d) ? (v.style("stroke", m[C % m.length]), v.style("fill", p[C % m.length])) : (v.style("stroke", h), v.style("fill", g)), t.height = v.node().getBBox().height + 2 * (n?.sequence?.labelBoxHeight ?? 0), Y(n, r(t.description))(t.description, v, b.x, b.y + 22 + (i ? 5 : 12), b.width, b.height, { class: `actor ${H}` }, n), i || (v.attr("data-et", "participant"), v.attr("data-type", "control"), v.attr("data-id", t.name)), t.height;
3207
- }, "drawActorTypeControl"), pe = /* @__PURE__ */ n(function(e, t, n, i, a) {
3208
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + 75, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, m = e.append("g").lower(), h = e.append("g"), g = "actor";
3209
- g += i ? ` ${V}` : ` ${B}`, h.attr("class", g), h.attr("name", t.name);
3210
- let _ = j();
3211
- _.x = t.x, _.y = o, _.fill = "#eaeaea", _.width = t.width, _.height = t.height, _.class = "actor";
3212
- let v = t.x + t.width / 2, y = o + (i ? 10 : 25);
3213
- h.append("circle").attr("cx", v).attr("cy", y).attr("r", 22).attr("width", t.width).attr("height", t.height), h.append("line").attr("x1", v - 22).attr("x2", v + 22).attr("y1", y + 22).attr("y2", y + 22).attr("stroke-width", 2), l === "neo" && h.attr("filter", "url(#drop-shadow)");
3214
- let b = a.get(t.name) ?? 0;
3215
- return U.has(u) && (h.style("stroke", p[b % p.length]), h.style("fill", f[b % p.length])), t.height = h.node().getBBox().height + (n?.sequence?.labelBoxHeight ?? 0), i || (K++, m.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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 = K), Y(n, r(t.description))(t.description, h, _.x, _.y + (i ? 15 : 30), _.width, _.height, { class: `actor ${H}` }, n), i ? h.attr("transform", "translate(0, 22)") : (h.attr("transform", "translate(0, 6)"), h.attr("data-et", "participant"), h.attr("data-type", "entity"), h.attr("data-id", t.name)), t.height;
3216
- }, "drawActorTypeEntity"), me = /* @__PURE__ */ n(function(e, t, n, i, a) {
3217
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height + 2 * n.boxTextMargin, { theme: l, themeVariables: u, look: d } = n, { bkgColorArray: f, borderColorArray: p, actorBorder: m } = u, h = e.append("g").lower(), g = h;
3218
- i || (K++, Object.keys(t.links || {}).length && !n.forceMenus && g.attr("onclick", ae(`actor${K}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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 = h.append("g"), t.actorCnt = K, t.links != null && g.attr("id", "root-" + K), d === "neo" && g.attr("data-look", "neo"));
3219
- let _ = j(), v = "actor";
3220
- t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", v += i ? ` ${V}` : ` ${B}`, _.x = t.x, _.y = o, _.width = t.width, _.height = t.height, _.class = v, _.name = t.name, _.x = t.x, _.y = o;
3221
- let y = _.width / 3, b = _.width / 3, x = y / 2, S = x / (2.5 + y / 50), C = g.append("g");
3222
- C.attr("class", v);
3223
- let w = `
3224
- M ${_.x},${_.y + S}
3225
- a ${x},${S} 0 0 0 ${y},0
3226
- a ${x},${S} 0 0 0 -${y},0
3227
- l 0,${b - 2 * S}
3228
- a ${x},${S} 0 0 0 ${y},0
3229
- l 0,-${b - 2 * S}
3230
- `;
3231
- C.append("path").attr("d", w), d === "neo" && C.attr("filter", "url(#drop-shadow)");
3232
- let T = a.get(t.name) ?? 0;
3233
- U.has(l) ? (C.style("stroke", p[T % p.length]), C.style("fill", f[T % p.length])) : C.style("stroke", m), C.attr("transform", `translate(${y}, ${S})`), t.rectData = _, Y(n, r(t.description))(t.description, g, _.x, _.y + 35, _.width, _.height, { class: `actor ${re}` }, n);
3234
- let E = C.select("path:last-child");
3235
- return E.node() && (t.height = E.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0)), i || (g.attr("data-et", "participant"), g.attr("data-type", "database"), g.attr("data-id", t.name)), t.height;
3236
- }, "drawActorTypeDatabase"), he = /* @__PURE__ */ n(function(e, t, n, i, a) {
3237
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + 80, l = e.append("g").lower(), { look: u, theme: d, themeVariables: f } = n, { bkgColorArray: p, borderColorArray: m, actorBorder: h } = f;
3238
- i || (K++, l.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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 = K);
3239
- let g = e.append("g"), _ = H;
3240
- _ += i ? ` ${V}` : ` ${B}`, g.attr("class", _), g.attr("name", t.name);
3241
- let v = j();
3242
- v.x = t.x, v.y = o, v.fill = "#eaeaea", v.width = t.width, v.height = t.height, v.class = "actor", g.append("line").attr("id", "actor-man-torso" + K).attr("x1", t.x + t.width / 2 - 55).attr("y1", o + 12).attr("x2", t.x + t.width / 2 - 15).attr("y2", o + 12), g.append("line").attr("id", "actor-man-arms" + K).attr("x1", t.x + t.width / 2 - 55).attr("y1", o + 2).attr("x2", t.x + t.width / 2 - 55).attr("y2", o + 22), g.append("circle").attr("cx", t.x + t.width / 2).attr("cy", o + 12).attr("r", 22), u === "neo" && g.attr("filter", "url(#drop-shadow)");
3243
- let y = a.get(t.name) ?? 0;
3244
- return U.has(d) ? (g.style("stroke", m[y % m.length]), g.style("fill", p[y % m.length])) : g.style("stroke", h), t.height = g.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0), Y(n, r(t.description))(t.description, g, v.x, v.y + 15, v.width, v.height, { class: `actor ${H}` }, n), g.attr("transform", "translate(0,21)"), i || (g.attr("data-et", "participant"), g.attr("data-type", "boundary"), g.attr("data-id", t.name)), t.height;
3245
- }, "drawActorTypeBoundary"), ge = /* @__PURE__ */ n(function(e, t, n, i, a) {
3246
- let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + 80, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p, actorBorder: m } = d, h = e.append("g").lower();
3247
- i || (K++, h.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).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 = K);
3248
- let g = e.append("g"), _ = H;
3249
- _ += i ? ` ${V}` : ` ${B}`, g.attr("class", _), g.attr("name", t.name), i || g.attr("data-et", "participant").attr("data-type", "actor").attr("data-id", t.name);
3250
- let v = l === "neo" ? .5 : 1, y = l === "neo" ? o + (1 - v) * 30 : o;
3251
- g.append("line").attr("id", "actor-man-torso" + K).attr("x1", s).attr("y1", y + 25 * v).attr("x2", s).attr("y2", y + 45 * v), g.append("line").attr("id", "actor-man-arms" + K).attr("x1", s - z / 2 * v).attr("y1", y + 33 * v).attr("x2", s + z / 2 * v).attr("y2", y + 33 * v), g.append("line").attr("x1", s - z / 2 * v).attr("y1", y + 60 * v).attr("x2", s).attr("y2", y + 45 * v), g.append("line").attr("x1", s).attr("y1", y + 45 * v).attr("x2", s + (z / 2 - 2) * v).attr("y2", y + 60 * v);
3252
- let b = g.append("circle");
3253
- b.attr("cx", t.x + t.width / 2), b.attr("cy", y + 10 * v), b.attr("r", 15 * v), b.attr("width", t.width * v), b.attr("height", t.height * v), t.height = g.node().getBBox().height;
3254
- let x = j();
3255
- x.x = t.x, x.y = y, x.fill = "#eaeaea", x.width = t.width, x.height = t.height / v, x.class = "actor", x.rx = 3, x.ry = 3;
3256
- let S = a.get(t.name) ?? 0;
3257
- return U.has(u) ? (g.style("stroke", p[S % p.length]), g.style("fill", f[S % p.length])) : g.style("stroke", m), Y(n, r(t.description))(t.description, g, x.x, y + 35 * v - (l === "neo" ? 10 : 0), x.width, x.height, { class: `actor ${H}` }, n), t.height;
3258
- }, "drawActorTypeActor"), _e = /* @__PURE__ */ n(async function(e, t, n, r, i, a, o) {
3259
- let s = o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]));
3260
- switch (t.type) {
3261
- case "actor": return await ge(e, t, n, r, s);
3262
- case "participant": return await le(e, t, n, r, s);
3263
- case "boundary": return await he(e, t, n, r, s);
3264
- case "control": return await fe(e, t, n, r, i, s);
3265
- case "entity": return await pe(e, t, n, r, s);
3266
- case "database": return await me(e, t, n, r, s);
3267
- case "collections": return await ue(e, t, n, r, s);
3268
- case "queue": return await de(e, t, n, r, s);
3269
- }
3270
- }, "drawActor"), ve = /* @__PURE__ */ n(function(e, t, n) {
3271
- let r = e.append("g");
3272
- Se(r, t), t.name && Y(n)(t.name, r, t.x, t.y + n.boxTextMargin + (t.textMaxHeight || 0) / 2, t.width, 0, { class: "text" }, n), r.lower();
3273
- }, "drawBox"), ye = /* @__PURE__ */ n(function(e) {
3274
- return e.append("g");
3275
- }, "anchorElement"), be = /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
3276
- let { theme: s, themeVariables: c } = r, { bkgColorArray: l, borderColorArray: u, mainBkg: d } = c, f = j(), p = t.anchored, m = t.actor;
3277
- f.x = t.startx, f.y = t.starty, f.class = "activation" + i % 3, f.width = t.stopx - t.startx, f.height = n - t.starty;
3278
- let h = W(p, f), g = (o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]))).get(m) ?? 0;
3279
- U.has(s) && (h.style("stroke", u[g % u.length]), h.style("fill", l[g % u.length] ?? d));
3280
- }, "drawActivation"), xe = /* @__PURE__ */ n(async function(e, t, i, a, o) {
3281
- let { boxMargin: s, boxTextMargin: c, labelBoxHeight: l, labelBoxWidth: u, messageFontFamily: d, messageFontSize: f, messageFontWeight: p } = a, m = e.append("g").attr("data-et", "control-structure").attr("data-id", "i" + o.id), h = /* @__PURE__ */ n(function(e, t, n, r) {
3282
- return m.append("line").attr("x1", e).attr("y1", t).attr("x2", n).attr("y2", r).attr("class", "loopLine");
3283
- }, "drawLoopLine");
3284
- h(t.startx, t.starty, t.stopx, t.starty), h(t.stopx, t.starty, t.stopx, t.stopy), h(t.startx, t.stopy, t.stopx, t.stopy), h(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(e) {
3285
- h(t.startx, e.y, t.stopx, e.y).style("stroke-dasharray", "3, 3");
3286
- });
3287
- let g = D();
3288
- g.text = i, g.x = t.startx, g.y = t.starty, g.fontFamily = d, g.fontSize = f, g.fontWeight = p, g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.width = Math.max(u ?? 0, 50), g.height = l + (a.look === "neo" ? 15 : 0) || 20, g.textMargin = c, g.class = "labelText", se(m, g), g = ke(), g.text = t.title, g.x = t.startx + u / 2 + (t.stopx - t.startx) / 2, g.y = t.starty + s + c, g.anchor = "middle", g.valign = "middle", g.textMargin = c, g.class = "loopText", g.fontFamily = d, g.fontSize = f, g.fontWeight = p, g.wrap = !0;
3289
- let _ = r(g.text) ? await oe(m, g, t) : G(m, g);
3290
- if (t.sectionTitles !== void 0) {
3291
- for (let [e, n] of Object.entries(t.sectionTitles)) if (n.message) {
3292
- g.text = n.message, g.x = t.startx + (t.stopx - t.startx) / 2, g.y = t.sections[e].y + s + c, g.class = "sectionTitle", g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.fontFamily = d, g.fontSize = f, g.fontWeight = p, g.wrap = t.wrap, r(g.text) ? (t.starty = t.sections[e].y, await oe(m, g, t)) : G(m, g);
3293
- let i = Math.round(_.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3294
- t.sections[e].height += i - (s + c);
3295
- }
3296
- }
3297
- return t.height = Math.round(t.stopy - t.starty), m;
3298
- }, "drawLoop"), Se = /* @__PURE__ */ n(function(e, t) {
3299
- k(e, t);
3300
- }, "drawBackgroundRect"), Ce = /* @__PURE__ */ n(function(e, t) {
3301
- 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");
3302
- }, "insertDatabaseIcon"), q = /* @__PURE__ */ n(function(e, t) {
3303
- 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");
3304
- }, "insertComputerIcon"), J = /* @__PURE__ */ n(function(e, t) {
3305
- 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");
3306
- }, "insertClockIcon"), we = /* @__PURE__ */ n(function(e, t) {
3307
- 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");
3308
- }, "insertArrowHead"), Te = /* @__PURE__ */ n(function(e, t) {
3309
- 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");
3310
- }, "insertArrowFilledHead"), Ee = /* @__PURE__ */ n(function(e, t) {
3311
- 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);
3312
- }, "insertSequenceNumber"), De = /* @__PURE__ */ n(function(e, t) {
3313
- 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");
3314
- }, "insertArrowCrossHead"), Oe = /* @__PURE__ */ n(function(e, t) {
3315
- let { theme: n } = t;
3316
- 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", `${n === "redux" || n === "redux-color" ? "#000000" : "#FFFFFF"}`);
3317
- }, "insertDropShadow"), ke = /* @__PURE__ */ n(function() {
3318
- return {
3319
- x: 0,
3320
- y: 0,
3321
- fill: void 0,
3322
- anchor: void 0,
3323
- style: "#666",
3324
- width: void 0,
3325
- height: void 0,
3326
- textMargin: 0,
3327
- rx: 0,
3328
- ry: 0,
3329
- tspan: !0,
3330
- valign: void 0
3331
- };
3332
- }, "getTextObj"), Ae = /* @__PURE__ */ n(function() {
3333
- return {
3334
- x: 0,
3335
- y: 0,
3336
- fill: "#EDF2AE",
3337
- stroke: "#666",
3338
- width: 100,
3339
- anchor: "start",
3340
- height: 100,
3341
- rx: 0,
3342
- ry: 0
3343
- };
3344
- }, "getNoteRect"), Y = /* @__PURE__ */ (function() {
3345
- function e(e, t, n, r, i, a, s) {
3346
- o(t.append("text").attr("x", n + i / 2).attr("y", r + a / 2 + 5).style("text-anchor", "middle").text(e), s);
3347
- }
3348
- n(e, "byText");
3349
- function t(e, t, n, r, i, a, s, c) {
3350
- let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, [f, p] = C(l), m = e.split(h.lineBreakRegex);
3351
- for (let e = 0; e < m.length; e++) {
3352
- let c = e * f - f * (m.length - 1) / 2, l = t.append("text").attr("x", n + i / 2).attr("y", r).style("text-anchor", "middle").style("font-size", p).style("font-weight", d).style("font-family", u);
3353
- l.append("tspan").attr("x", n + i / 2).attr("dy", c).text(m[e]), l.attr("y", r + a / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), o(l, s);
3354
- }
3355
- }
3356
- n(t, "byTspan");
3357
- function r(e, n, r, i, a, s, c, l) {
3358
- let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", i).attr("width", a).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3359
- d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, i, a, s, c, l), o(d, c);
3360
- }
3361
- n(r, "byFo");
3362
- async function a(e, n, r, a, s, c, l, u) {
3363
- let f = await p(e, d()), m = n.append("switch"), h = m.append("foreignObject").attr("x", r + s / 2 - f.width / 2).attr("y", a + c / 2 - f.height / 2).attr("width", f.width).attr("height", f.height).append("xhtml:div").style("height", "100%").style("width", "100%");
3364
- h.append("div").style("text-align", "center").style("vertical-align", "middle").html(await i(e, d())), t(e, m, r, a, s, c, l, u), o(h, l);
3365
- }
3366
- n(a, "byKatex");
3367
- function o(e, t) {
3368
- for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3369
- }
3370
- return n(o, "_setTextAttrs"), function(n, i = !1) {
3371
- return i ? a : n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
3372
- };
3373
- })(), je = /* @__PURE__ */ (function() {
3374
- function e(e, t, n, r, a, o, s) {
3375
- i(t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").text(e), s);
3376
- }
3377
- n(e, "byText");
3378
- function t(e, t, n, r, a, o, s, c) {
3379
- let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, f = e.split(h.lineBreakRegex);
3380
- for (let e = 0; e < f.length; e++) {
3381
- let a = e * l - l * (f.length - 1) / 2, c = t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").style("font-size", l).style("font-weight", d).style("font-family", u);
3382
- c.append("tspan").attr("x", n).attr("dy", a).text(f[e]), c.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(c, s);
3383
- }
3384
- }
3385
- n(t, "byTspan");
3386
- function r(e, n, r, a, o, s, c, l) {
3387
- let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", a).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3388
- d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, a, o, s, c, l), i(d, c);
3389
- }
3390
- n(r, "byFo");
3391
- function i(e, t) {
3392
- for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3393
- }
3394
- return n(i, "_setTextAttrs"), function(n) {
3395
- return n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
3396
- };
3397
- })(), X = {
3398
- drawRect: W,
3399
- drawText: G,
3400
- drawLabel: se,
3401
- drawActor: _e,
3402
- drawBox: ve,
3403
- drawPopup: ie,
3404
- anchorElement: ye,
3405
- drawActivation: be,
3406
- drawLoop: xe,
3407
- drawBackgroundRect: Se,
3408
- insertArrowHead: we,
3409
- insertArrowFilledHead: Te,
3410
- insertSequenceNumber: Ee,
3411
- insertArrowCrossHead: De,
3412
- insertDatabaseIcon: Ce,
3413
- insertComputerIcon: q,
3414
- insertClockIcon: J,
3415
- getTextObj: ke,
3416
- getNoteRect: Ae,
3417
- fixLifeLineHeights: ce,
3418
- sanitizeUrl: N.sanitizeUrl,
3419
- insertDropShadow: Oe,
3420
- insertSolidTopArrowHead: /* @__PURE__ */ n(function(e, t) {
3421
- 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");
3422
- }, "insertSolidTopArrowHead"),
3423
- insertSolidBottomArrowHead: /* @__PURE__ */ n(function(e, t) {
3424
- 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");
3425
- }, "insertSolidBottomArrowHead"),
3426
- insertStickTopArrowHead: /* @__PURE__ */ n(function(e, t) {
3427
- 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");
3428
- }, "insertStickTopArrowHead"),
3429
- insertStickBottomArrowHead: /* @__PURE__ */ n(function(e, t) {
3430
- 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");
3431
- }, "insertStickBottomArrowHead")
3432
- }, Z = {}, Q = {
3433
- data: {
3434
- startx: void 0,
3435
- stopx: void 0,
3436
- starty: void 0,
3437
- stopy: void 0
3438
- },
3439
- verticalPos: 0,
3440
- sequenceItems: [],
3441
- activations: [],
3442
- models: {
3443
- getHeight: /* @__PURE__ */ n(function() {
3444
- 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));
3445
- }, "getHeight"),
3446
- clear: /* @__PURE__ */ n(function() {
3447
- this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
3448
- }, "clear"),
3449
- addBox: /* @__PURE__ */ n(function(e) {
3450
- this.boxes.push(e);
3451
- }, "addBox"),
3452
- addActor: /* @__PURE__ */ n(function(e) {
3453
- this.actors.push(e);
3454
- }, "addActor"),
3455
- addLoop: /* @__PURE__ */ n(function(e) {
3456
- this.loops.push(e);
3457
- }, "addLoop"),
3458
- addMessage: /* @__PURE__ */ n(function(e) {
3459
- this.messages.push(e);
3460
- }, "addMessage"),
3461
- addNote: /* @__PURE__ */ n(function(e) {
3462
- this.notes.push(e);
3463
- }, "addNote"),
3464
- lastActor: /* @__PURE__ */ n(function() {
3465
- return this.actors[this.actors.length - 1];
3466
- }, "lastActor"),
3467
- lastLoop: /* @__PURE__ */ n(function() {
3468
- return this.loops[this.loops.length - 1];
3469
- }, "lastLoop"),
3470
- lastMessage: /* @__PURE__ */ n(function() {
3471
- return this.messages[this.messages.length - 1];
3472
- }, "lastMessage"),
3473
- lastNote: /* @__PURE__ */ n(function() {
3474
- return this.notes[this.notes.length - 1];
3475
- }, "lastNote"),
3476
- actors: [],
3477
- boxes: [],
3478
- loops: [],
3479
- messages: [],
3480
- notes: []
3481
- },
3482
- init: /* @__PURE__ */ n(function() {
3483
- this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
3484
- startx: void 0,
3485
- stopx: void 0,
3486
- starty: void 0,
3487
- stopy: void 0
3488
- }, this.verticalPos = 0, He(v());
3489
- }, "init"),
3490
- updateVal: /* @__PURE__ */ n(function(e, t, n, r) {
3491
- e[t] = e[t] === void 0 ? n : r(n, e[t]);
3492
- }, "updateVal"),
3493
- updateBounds: /* @__PURE__ */ n(function(e, t, r, i) {
3494
- let a = this, o = 0;
3495
- function s(s) {
3496
- return /* @__PURE__ */ n(function(n) {
3497
- o++;
3498
- let c = a.sequenceItems.length - o + 1;
3499
- a.updateVal(n, "starty", t - c * Z.boxMargin, Math.min), a.updateVal(n, "stopy", i + c * Z.boxMargin, Math.max), a.updateVal(Q.data, "startx", e - c * Z.boxMargin, Math.min), a.updateVal(Q.data, "stopx", r + c * Z.boxMargin, Math.max), s !== "activation" && (a.updateVal(n, "startx", e - c * Z.boxMargin, Math.min), a.updateVal(n, "stopx", r + c * Z.boxMargin, Math.max), a.updateVal(Q.data, "starty", t - c * Z.boxMargin, Math.min), a.updateVal(Q.data, "stopy", i + c * Z.boxMargin, Math.max));
3500
- }, "updateItemBounds");
3501
- }
3502
- n(s, "updateFn"), this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
3503
- }, "updateBounds"),
3504
- insert: /* @__PURE__ */ n(function(e, t, n, r) {
3505
- let i = h.getMin(e, n), a = h.getMax(e, n), o = h.getMin(t, r), s = h.getMax(t, r);
3506
- this.updateVal(Q.data, "startx", i, Math.min), this.updateVal(Q.data, "starty", o, Math.min), this.updateVal(Q.data, "stopx", a, Math.max), this.updateVal(Q.data, "stopy", s, Math.max), this.updateBounds(i, o, a, s);
3507
- }, "insert"),
3508
- newActivation: /* @__PURE__ */ n(function(e, t, n) {
3509
- let r = n.get(e.from), i = Ue(e.from).length || 0, a = r.x + r.width / 2 + (i - 1) * Z.activationWidth / 2;
3510
- this.activations.push({
3511
- startx: a,
3512
- starty: this.verticalPos + 2,
3513
- stopx: a + Z.activationWidth,
3514
- stopy: void 0,
3515
- actor: e.from,
3516
- anchored: X.anchorElement(t)
3517
- });
3518
- }, "newActivation"),
3519
- endActivation: /* @__PURE__ */ n(function(e) {
3520
- let t = this.activations.map(function(e) {
3521
- return e.actor;
3522
- }).lastIndexOf(e.from);
3523
- return this.activations.splice(t, 1)[0];
3524
- }, "endActivation"),
3525
- createLoop: /* @__PURE__ */ n(function(e = {
3526
- message: void 0,
3527
- wrap: !1,
3528
- width: void 0
3529
- }, t) {
3530
- return {
3531
- startx: void 0,
3532
- starty: this.verticalPos,
3533
- stopx: void 0,
3534
- stopy: void 0,
3535
- title: e.message,
3536
- wrap: e.wrap,
3537
- width: e.width,
3538
- height: 0,
3539
- fill: t
3540
- };
3541
- }, "createLoop"),
3542
- newLoop: /* @__PURE__ */ n(function(e = {
3543
- message: void 0,
3544
- wrap: !1,
3545
- width: void 0
3546
- }, t) {
3547
- this.sequenceItems.push(this.createLoop(e, t));
3548
- }, "newLoop"),
3549
- endLoop: /* @__PURE__ */ n(function() {
3550
- return this.sequenceItems.pop();
3551
- }, "endLoop"),
3552
- isLoopOverlap: /* @__PURE__ */ n(function() {
3553
- return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
3554
- }, "isLoopOverlap"),
3555
- addSectionToLoop: /* @__PURE__ */ n(function(e) {
3556
- let t = this.sequenceItems.pop();
3557
- t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({
3558
- y: Q.getVerticalPos(),
3559
- height: 0
3560
- }), t.sectionTitles.push(e), this.sequenceItems.push(t);
3561
- }, "addSectionToLoop"),
3562
- saveVerticalPos: /* @__PURE__ */ n(function() {
3563
- this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
3564
- }, "saveVerticalPos"),
3565
- resetVerticalPos: /* @__PURE__ */ n(function() {
3566
- this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
3567
- }, "resetVerticalPos"),
3568
- bumpVerticalPos: /* @__PURE__ */ n(function(e) {
3569
- this.verticalPos += e, this.data.stopy = h.getMax(this.data.stopy, this.verticalPos);
3570
- }, "bumpVerticalPos"),
3571
- getVerticalPos: /* @__PURE__ */ n(function() {
3572
- return this.verticalPos;
3573
- }, "getVerticalPos"),
3574
- getBounds: /* @__PURE__ */ n(function() {
3575
- return {
3576
- bounds: this.data,
3577
- models: this.models
3578
- };
3579
- }, "getBounds")
3580
- }, Me = /* @__PURE__ */ n(async function(e, t, n) {
3581
- Q.bumpVerticalPos(Z.boxMargin), t.height = Z.boxMargin, t.starty = Q.getVerticalPos();
3582
- let i = j();
3583
- i.x = t.startx, i.y = t.starty, i.width = t.width || Z.width, i.class = "note";
3584
- let a = e.append("g");
3585
- a.attr("data-et", "note"), a.attr("data-id", "i" + n);
3586
- let o = X.drawRect(a, i), s = D();
3587
- s.x = t.startx, s.y = t.starty, s.width = i.width, s.dy = "1em", s.text = t.message, s.class = "noteText", s.fontFamily = Z.noteFontFamily, s.fontSize = Z.noteFontSize, s.fontWeight = Z.noteFontWeight, s.anchor = Z.noteAlign, s.textMargin = Z.noteMargin, s.valign = "center";
3588
- let c = r(s.text) ? await oe(a, s) : G(a, s), l = Math.round(c.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3589
- o.attr("height", l + 2 * Z.noteMargin), t.height += l + 2 * Z.noteMargin, Q.bumpVerticalPos(l + 2 * Z.noteMargin), t.stopy = t.starty + l + 2 * Z.noteMargin, t.stopx = t.startx + i.width, Q.insert(t.startx, t.starty, t.stopx, t.stopy), Q.models.addNote(t);
3590
- }, "drawNote"), Ne = /* @__PURE__ */ n(function(e, t, r, i, a, o, s) {
3591
- let c = i.db.getActors(), l = c.get(t.from), u = c.get(t.to), d = r.sequenceVisible, f = l.x + l.width / 2, p = u.x + u.width / 2, m = f <= p, h = tt(t, i), g = e.append("g"), _ = /* @__PURE__ */ n((e, t) => {
3592
- let n = e ? 16.5 : -16.5;
3593
- return t ? -n : n;
3594
- }, "getCircleOffset"), v = /* @__PURE__ */ n((e) => {
3595
- g.append("circle").attr("cx", e).attr("cy", s).attr("r", 5).attr("width", 10).attr("height", 10);
3596
- }, "drawCircle"), { CENTRAL_CONNECTION: y, CENTRAL_CONNECTION_REVERSE: b, CENTRAL_CONNECTION_DUAL: x } = i.db.LINETYPE;
3597
- if (d) switch (t.centralConnection) {
3598
- case y:
3599
- h && (p += _(m, !0));
3600
- break;
3601
- case b:
3602
- h || (f += _(m, !1));
3603
- break;
3604
- case x: h ? p += _(m, !0) : f += _(m, !1);
3605
- }
3606
- switch (t.centralConnection) {
3607
- case y:
3608
- v(p);
3609
- break;
3610
- case b:
3611
- v(f);
3612
- break;
3613
- case x: v(f), v(p);
3614
- }
3615
- }, "drawCentralConnection"), Pe = /* @__PURE__ */ n((e) => ({
3616
- fontFamily: e.messageFontFamily,
3617
- fontSize: e.messageFontSize,
3618
- fontWeight: e.messageFontWeight
3619
- }), "messageFont"), Fe = /* @__PURE__ */ n((e) => ({
3620
- fontFamily: e.noteFontFamily,
3621
- fontSize: e.noteFontSize,
3622
- fontWeight: e.noteFontWeight
3623
- }), "noteFont"), Ie = /* @__PURE__ */ n((e) => ({
3624
- fontFamily: e.actorFontFamily,
3625
- fontSize: e.actorFontSize,
3626
- fontWeight: e.actorFontWeight
3627
- }), "actorFont");
3628
- async function Le(e, t) {
3629
- Q.bumpVerticalPos(10);
3630
- let { startx: n, stopx: i, message: a } = t, o = h.splitBreaks(a).length, s = r(a), c = s ? await p(a, v()) : S.calculateTextDimensions(a, Pe(Z));
3631
- if (!s) {
3632
- let e = c.height / o;
3633
- t.height += e, Q.bumpVerticalPos(e);
3634
- }
3635
- let l, u = c.height - 10, d = c.width;
3636
- if (n === i) {
3637
- l = Q.getVerticalPos() + u, Z.rightAngles || (u += Z.boxMargin, l = Q.getVerticalPos() + u), u += 30;
3638
- let e = h.getMax(d / 2, Z.width / 2);
3639
- Q.insert(n - e, Q.getVerticalPos() - 10 + u, i + e, Q.getVerticalPos() + 30 + u);
3640
- } else u += Z.boxMargin, l = Q.getVerticalPos() + u, Q.insert(n, l - 10, i, l);
3641
- return Q.bumpVerticalPos(u), t.height += u, t.stopy = t.starty + t.height, Q.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), l;
3642
- }
3643
- n(Le, "boundMessage");
3644
- var Re = /* @__PURE__ */ n(async function(e, t, n, i, a, o) {
3645
- let { startx: s, stopx: l, starty: u, message: d, type: f, sequenceIndex: p, sequenceVisible: m } = t, g = S.calculateTextDimensions(d, Pe(Z)), _ = D();
3646
- _.x = Math.min(s, l), _.y = u + 10, _.width = Math.abs(l - s), _.class = "messageText", _.dy = "1em", _.text = d, _.fontFamily = Z.messageFontFamily, _.fontSize = Z.messageFontSize, _.fontWeight = Z.messageFontWeight, _.anchor = Z.messageAlign, _.valign = "center", _.textMargin = Z.wrapPadding, _.tspan = !1, r(_.text) ? await oe(e, _, {
3647
- startx: s,
3648
- stopx: l,
3649
- starty: n
3650
- }) : G(e, _);
3651
- let v = g.width, y;
3652
- if (s === l) {
3653
- let r = m || Z.showSequenceNumbers, o = tt(a, i), c = nt(a, i), u = s + (r && (o || c) ? 10 : 0);
3654
- y = Z.rightAngles ? e.append("path").attr("d", `M ${u},${n} H ${s + h.getMax(Z.width / 2, v / 2)} V ${n + 25} H ${s}`) : e.append("path").attr("d", "M " + u + "," + n + " C " + (u + 60) + "," + (n - 10) + " " + (s + 60) + "," + (n + 30) + " " + s + "," + (n + 20)), $e(a, i) && Ne(e, a, t, i, s, l, n);
3655
- } else y = e.append("line"), y.attr("x1", s), y.attr("y1", n), y.attr("x2", l), y.attr("y2", n), $e(a, i) && Ne(e, a, t, i, s, l, n);
3656
- f === i.db.LINETYPE.DOTTED || f === i.db.LINETYPE.DOTTED_CROSS || f === i.db.LINETYPE.DOTTED_POINT || f === i.db.LINETYPE.DOTTED_OPEN || f === i.db.LINETYPE.BIDIRECTIONAL_DOTTED || f === i.db.LINETYPE.SOLID_TOP_DOTTED || f === i.db.LINETYPE.SOLID_BOTTOM_DOTTED || f === i.db.LINETYPE.STICK_TOP_DOTTED || f === i.db.LINETYPE.STICK_BOTTOM_DOTTED || f === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || f === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || f === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || f === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED ? (y.style("stroke-dasharray", "3, 3"), y.attr("class", "messageLine1")) : y.attr("class", "messageLine0"), y.attr("data-et", "message"), y.attr("data-id", "i" + t.id), y.attr("data-from", t.from), y.attr("data-to", t.to);
3657
- let b = "";
3658
- if (Z.arrowMarkerAbsolute && (b = c(!0)), y.attr("stroke-width", 2), y.attr("stroke", "none"), y.style("fill", "none"), (f === i.db.LINETYPE.SOLID_TOP || f === i.db.LINETYPE.SOLID_TOP_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-solidTopArrowHead)"), (f === i.db.LINETYPE.SOLID_BOTTOM || f === i.db.LINETYPE.SOLID_BOTTOM_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-solidBottomArrowHead)"), (f === i.db.LINETYPE.STICK_TOP || f === i.db.LINETYPE.STICK_TOP_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-stickTopArrowHead)"), (f === i.db.LINETYPE.STICK_BOTTOM || f === i.db.LINETYPE.STICK_BOTTOM_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-stickBottomArrowHead)"), (f === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || f === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-solidBottomArrowHead)"), (f === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || f === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-solidTopArrowHead)"), (f === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE || f === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-stickBottomArrowHead)"), (f === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || f === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-stickTopArrowHead)"), (f === i.db.LINETYPE.SOLID || f === i.db.LINETYPE.DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-arrowhead)"), (f === i.db.LINETYPE.BIDIRECTIONAL_SOLID || f === i.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (y.attr("marker-start", "url(" + b + "#" + o + "-arrowhead)"), y.attr("marker-end", "url(" + b + "#" + o + "-arrowhead)")), (f === i.db.LINETYPE.SOLID_POINT || f === i.db.LINETYPE.DOTTED_POINT) && y.attr("marker-end", "url(" + b + "#" + o + "-filled-head)"), (f === i.db.LINETYPE.SOLID_CROSS || f === i.db.LINETYPE.DOTTED_CROSS) && y.attr("marker-end", "url(" + b + "#" + o + "-crosshead)"), m || Z.showSequenceNumbers) {
3659
- let r = f === i.db.LINETYPE.BIDIRECTIONAL_SOLID || f === i.db.LINETYPE.BIDIRECTIONAL_DOTTED, c = f === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || f === i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || f === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || f === i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || f === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE || f === i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || f === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || f === i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED, u = $e(a, i), d = s, m = l;
3660
- r ? (s < l ? d = s + 12 : (d = s - 6 + (u ? -5 : 0), d += a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_DUAL || a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), y.attr("x1", d)) : c ? (l > s ? m = l - 12 : (m = l - 6, d += a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_DUAL || a?.centralConnection === i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), m += u ? 15 : 0, y.attr("x2", m), y.attr("x1", d)) : y.attr("x1", s + 6);
3661
- let h = 0, g = s === l, _ = s <= l;
3662
- h = g ? t.fromBounds + 1 : c ? _ ? t.toBounds - 1 : t.fromBounds + 1 : _ ? t.fromBounds + 1 : t.toBounds - 1;
3663
- let v = "12px", x = p.toString().length;
3664
- x > 5 ? v = "7px" : x > 3 && (v = "9px"), e.append("line").attr("x1", h).attr("y1", n).attr("x2", h).attr("y2", n).attr("stroke-width", 0).attr("marker-start", "url(" + b + "#" + o + "-sequencenumber)"), e.append("text").attr("x", h).attr("y", n + 4).attr("font-family", "sans-serif").attr("font-size", v).attr("text-anchor", "middle").attr("class", "sequenceNumber").text(p);
3665
- }
3666
- }, "drawMessage"), ze = /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
3667
- let s = 0, c = 0, l, u = 0;
3668
- for (let e of r) {
3669
- let r = t.get(e), a = r.box;
3670
- l && l != a && (o || Q.models.addBox(l), c += Z.boxMargin + l.margin), a && a != l && (o || (a.x = s + c, a.y = i), c += a.margin), r.width = h.getMax(r.width || Z.width, Z.width), r.height = h.getMax(r.height || Z.height, Z.height), r.margin = r.margin || Z.actorMargin, u = h.getMax(u, r.height), n.get(r.name) && (c += r.width / 2), r.x = s + c, r.starty = Q.getVerticalPos(), Q.insert(r.x, i, r.x + r.width, r.height), s += r.width + c, r.box && (r.box.width = s + a.margin - r.box.x), c = r.margin, l = r.box, Q.models.addActor(r);
3671
- }
3672
- l && !o && Q.models.addBox(l), Q.bumpVerticalPos(u);
3673
- }, "addActorRenderingData"), Be = /* @__PURE__ */ n(async function(e, t, n, r, i, a, o) {
3674
- if (r) {
3675
- let r = 0;
3676
- Q.bumpVerticalPos(Z.boxMargin * 2);
3677
- for (let s of n) {
3678
- let n = t.get(s);
3679
- n.stopy ||= Q.getVerticalPos();
3680
- let c = await X.drawActor(e, n, Z, !0, i, a, o);
3681
- r = h.getMax(r, c);
3682
- }
3683
- Q.bumpVerticalPos(r + Z.boxMargin);
3684
- } else for (let r of n) {
3685
- let n = t.get(r);
3686
- await X.drawActor(e, n, Z, !1, i, a, o);
3687
- }
3688
- }, "drawActors"), Ve = /* @__PURE__ */ n(function(e, t, n, r) {
3689
- let i = 0, a = 0;
3690
- for (let o of n) {
3691
- let n = t.get(o), s = Je(n), c = X.drawPopup(e, n, s, Z, Z.forceMenus, r);
3692
- c.height > i && (i = c.height), c.width + n.x > a && (a = c.width + n.x);
3693
- }
3694
- return {
3695
- maxHeight: i,
3696
- maxWidth: a
3697
- };
3698
- }, "drawActorsPopup"), He = /* @__PURE__ */ n(function(e) {
3699
- m(Z, e), e.fontFamily && (Z.actorFontFamily = Z.noteFontFamily = Z.messageFontFamily = e.fontFamily), e.fontSize && (Z.actorFontSize = Z.noteFontSize = Z.messageFontSize = e.fontSize), e.fontWeight && (Z.actorFontWeight = Z.noteFontWeight = Z.messageFontWeight = e.fontWeight);
3700
- }, "setConf"), Ue = /* @__PURE__ */ n(function(e) {
3701
- return Q.activations.filter(function(t) {
3702
- return t.actor === e;
3703
- });
3704
- }, "actorActivations"), We = /* @__PURE__ */ n(function(e, t) {
3705
- let n = t.get(e), r = Ue(e);
3706
- return [r.reduce(function(e, t) {
3707
- return h.getMin(e, t.startx);
3708
- }, n.x + n.width / 2 - 1), r.reduce(function(e, t) {
3709
- return h.getMax(e, t.stopx);
3710
- }, n.x + n.width / 2 + 1)];
3711
- }, "activationBounds");
3712
- function $(t, n, r, i, a) {
3713
- Q.bumpVerticalPos(r);
3714
- let o = i;
3715
- if (n.id && n.message && t[n.id]) {
3716
- let r = t[n.id].width, a = Pe(Z);
3717
- n.message = S.wrapLabel(`[${n.message}]`, r - 2 * Z.wrapPadding, a), n.width = r, n.wrap = !0;
3718
- let s = S.calculateTextDimensions(n.message, a), c = h.getMax(s.height, Z.labelBoxHeight);
3719
- o = i + c, e.debug(`${c} - ${n.message}`);
3720
- }
3721
- a(n), Q.bumpVerticalPos(o);
3722
- }
3723
- n($, "adjustLoopHeightForWrap");
3724
- function Ge(e, t, r, i, a, o, s) {
3725
- function c(n, r) {
3726
- n.x < a.get(e.from).x ? (Q.insert(t.stopx - r, t.starty, t.startx, t.stopy + n.height / 2 + Z.noteMargin), t.stopx += r) : (Q.insert(t.startx, t.starty, t.stopx + r, t.stopy + n.height / 2 + Z.noteMargin), t.stopx -= r);
3727
- }
3728
- n(c, "receiverAdjustment");
3729
- function l(n, r) {
3730
- n.x < a.get(e.to).x ? (Q.insert(t.startx - r, t.starty, t.stopx, t.stopy + n.height / 2 + Z.noteMargin), t.startx += r) : (Q.insert(t.stopx, t.starty, t.startx + r, t.stopy + n.height / 2 + Z.noteMargin), t.startx -= r);
3731
- }
3732
- n(l, "senderAdjustment");
3733
- let u = [
3734
- R.ACTOR,
3735
- R.CONTROL,
3736
- R.ENTITY,
3737
- R.DATABASE
3738
- ];
3739
- if (o.get(e.to) == i) {
3740
- let t = a.get(e.to);
3741
- c(t, u.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.starty = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3742
- } else if (s.get(e.from) == i) {
3743
- let t = a.get(e.from);
3744
- Z.mirrorActors && l(t, u.includes(t.type) ? z / 2 : t.width / 2), t.stopy = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3745
- } else if (s.get(e.to) == i) {
3746
- let t = a.get(e.to);
3747
- Z.mirrorActors && c(t, u.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.stopy = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3748
- }
3749
- }
3750
- n(Ge, "adjustCreatedDestroyedData");
3751
- var Ke = /* @__PURE__ */ n(async function(r, i, a, o) {
3752
- let { securityLevel: s, sequence: c, look: l, themeVariables: u } = v();
3753
- Z = c;
3754
- let d;
3755
- s === "sandbox" && (d = t("#i" + i));
3756
- let p = t(s === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), m = s === "sandbox" ? d.nodes()[0].contentDocument : document;
3757
- Q.init(), e.debug(o.db);
3758
- let h = s === "sandbox" ? p.select(`[id="${i}"]`) : t(`[id="${i}"]`), g = o.db.getActors(), _ = o.db.getCreatedActors(), y = o.db.getDestroyedActors(), b = o.db.getBoxes(), x = o.db.getActorKeys(), S = o.db.getMessages(), C = o.db.getDiagramTitle(), w = o.db.hasAtLeastOneBox(), T = o.db.hasAtLeastOneBoxWithTitle(), E = await qe(g, S, o);
3759
- if (Z.height = await Ye(g, E, b), X.insertComputerIcon(h, i), X.insertDatabaseIcon(h, i), X.insertClockIcon(h, i), w && (Q.bumpVerticalPos(Z.boxMargin), T && Q.bumpVerticalPos(b[0].textMaxHeight)), Z.hideUnusedParticipants === !0) {
3760
- let e = /* @__PURE__ */ new Set();
3761
- S.forEach((t) => {
3762
- e.add(t.from), e.add(t.to);
3763
- }), x = x.filter((t) => e.has(t));
3764
- }
3765
- let D = new Map(x.map((e, t) => [g.get(e)?.name ?? e, t]));
3766
- ze(h, g, _, x, 0, S, !1);
3767
- let O = await it(S, g, E, o);
3768
- X.insertArrowHead(h, i), X.insertArrowCrossHead(h, i), X.insertArrowFilledHead(h, i), X.insertSequenceNumber(h, i), X.insertSolidTopArrowHead(h, i), X.insertSolidBottomArrowHead(h, i), X.insertStickTopArrowHead(h, i), X.insertStickBottomArrowHead(h, i), l === "neo" && X.insertDropShadow(h, Z);
3769
- function k(e, t) {
3770
- let n = Q.endActivation(e);
3771
- n.starty + 18 > t && (n.starty = t - 6, t += 12), X.drawActivation(h, n, t, Z, Ue(e.from).length, o, D), Q.insert(n.startx, t - 10, n.stopx, t);
3772
- }
3773
- n(k, "activeEnd");
3774
- let A = 1, j = 1, M = [], N = [], P = 0;
3775
- for (let t of S) {
3776
- let n, r, i;
3777
- switch (t.type) {
3778
- case o.db.LINETYPE.NOTE:
3779
- Q.resetVerticalPos(), r = t.noteModel, await Me(h, r, t.id);
3780
- break;
3781
- case o.db.LINETYPE.ACTIVE_START:
3782
- Q.newActivation(t, h, g);
3783
- break;
3784
- case o.db.LINETYPE.CENTRAL_CONNECTION:
3785
- Q.newActivation(t, h, g);
3786
- break;
3787
- case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:
3788
- Q.newActivation(t, h, g);
3789
- break;
3790
- case o.db.LINETYPE.ACTIVE_END:
3791
- k(t, Q.getVerticalPos());
3792
- break;
3793
- case o.db.LINETYPE.LOOP_START:
3794
- $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3795
- break;
3796
- case o.db.LINETYPE.LOOP_END:
3797
- n = Q.endLoop(), await X.drawLoop(h, n, "loop", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3798
- break;
3799
- case o.db.LINETYPE.RECT_START:
3800
- $(O, t, Z.boxMargin, Z.boxMargin, (e) => {
3801
- let t = e.message;
3802
- t ||= u?.rectBkgColor || u?.actorBkg || "rgba(128, 128, 128, 0.5)", Q.newLoop(void 0, t);
3803
- });
3804
- break;
3805
- case o.db.LINETYPE.RECT_END:
3806
- n = Q.endLoop(), N.push(n), Q.models.addLoop(n), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos());
3807
- break;
3808
- case o.db.LINETYPE.OPT_START:
3809
- $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3810
- break;
3811
- case o.db.LINETYPE.OPT_END:
3812
- n = Q.endLoop(), await X.drawLoop(h, n, "opt", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3813
- break;
3814
- case o.db.LINETYPE.ALT_START:
3815
- $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3816
- break;
3817
- case o.db.LINETYPE.ALT_ELSE:
3818
- $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3819
- break;
3820
- case o.db.LINETYPE.ALT_END:
3821
- n = Q.endLoop(), await X.drawLoop(h, n, "alt", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3822
- break;
3823
- case o.db.LINETYPE.PAR_START:
3824
- case o.db.LINETYPE.PAR_OVER_START:
3825
- $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e)), Q.saveVerticalPos();
3826
- break;
3827
- case o.db.LINETYPE.PAR_AND:
3828
- $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3829
- break;
3830
- case o.db.LINETYPE.PAR_END:
3831
- n = Q.endLoop(), await X.drawLoop(h, n, "par", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3832
- break;
3833
- case o.db.LINETYPE.AUTONUMBER:
3834
- A = t.message.start || A, j = t.message.step || j, t.message.visible ? o.db.enableSequenceNumbers() : o.db.disableSequenceNumbers();
3835
- break;
3836
- case o.db.LINETYPE.CRITICAL_START:
3837
- $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3838
- break;
3839
- case o.db.LINETYPE.CRITICAL_OPTION:
3840
- $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3841
- break;
3842
- case o.db.LINETYPE.CRITICAL_END:
3843
- n = Q.endLoop(), await X.drawLoop(h, n, "critical", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3844
- break;
3845
- case o.db.LINETYPE.BREAK_START:
3846
- $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3847
- break;
3848
- case o.db.LINETYPE.BREAK_END:
3849
- n = Q.endLoop(), await X.drawLoop(h, n, "break", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3850
- break;
3851
- default: try {
3852
- i = t.msgModel, i.starty = Q.getVerticalPos(), i.sequenceIndex = A, i.sequenceVisible = o.db.showSequenceNumbers(), i.id = t.id, i.from = t.from, i.to = t.to;
3853
- let e = await Le(h, i);
3854
- Ge(t, i, e, P, g, _, y), M.push({
3855
- messageModel: i,
3856
- lineStartY: e,
3857
- msg: t
3858
- }), Q.models.addMessage(i);
3859
- } catch (t) {
3860
- e.error("error while drawing message", t);
3861
- }
3862
- }
3863
- [
3864
- o.db.LINETYPE.SOLID_OPEN,
3865
- o.db.LINETYPE.DOTTED_OPEN,
3866
- o.db.LINETYPE.SOLID,
3867
- o.db.LINETYPE.SOLID_TOP,
3868
- o.db.LINETYPE.SOLID_BOTTOM,
3869
- o.db.LINETYPE.STICK_TOP,
3870
- o.db.LINETYPE.STICK_BOTTOM,
3871
- o.db.LINETYPE.SOLID_TOP_DOTTED,
3872
- o.db.LINETYPE.SOLID_BOTTOM_DOTTED,
3873
- o.db.LINETYPE.STICK_TOP_DOTTED,
3874
- o.db.LINETYPE.STICK_BOTTOM_DOTTED,
3875
- o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
3876
- o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
3877
- o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
3878
- o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
3879
- o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
3880
- o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
3881
- o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
3882
- o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
3883
- o.db.LINETYPE.DOTTED,
3884
- o.db.LINETYPE.SOLID_CROSS,
3885
- o.db.LINETYPE.DOTTED_CROSS,
3886
- o.db.LINETYPE.SOLID_POINT,
3887
- o.db.LINETYPE.DOTTED_POINT,
3888
- o.db.LINETYPE.BIDIRECTIONAL_SOLID,
3889
- o.db.LINETYPE.BIDIRECTIONAL_DOTTED
3890
- ].includes(t.type) && (A = Math.round((A + j) * 100) / 100), P++;
3891
- }
3892
- e.debug("createdActors", _), e.debug("destroyedActors", y), await Be(h, g, x, !1, i, o, D);
3893
- for (let e of M) await Re(h, e.messageModel, e.lineStartY, o, e.msg, i);
3894
- Z.mirrorActors && await Be(h, g, x, !0, i, o, D), N.forEach((e) => X.drawBackgroundRect(h, e)), ce(h, g, x, Z);
3895
- for (let e of Q.models.boxes) {
3896
- e.height = Q.getVerticalPos() - e.y, Q.insert(e.x, e.y, e.x + e.width, e.height);
3897
- let t = Z.boxMargin * 2;
3898
- e.startx = e.x - t, e.starty = e.y - t * .25, e.stopx = e.startx + e.width + 2 * t, e.stopy = e.starty + e.height + t * .75, e.stroke = "rgb(0,0,0, 0.5)", X.drawBox(h, e, Z);
3899
- }
3900
- w && Q.bumpVerticalPos(Z.boxMargin);
3901
- let F = Ve(h, g, x, m), { bounds: I } = Q.getBounds();
3902
- I.startx === void 0 && (I.startx = 0), I.starty === void 0 && (I.starty = 0), I.stopx === void 0 && (I.stopx = 0), I.stopy === void 0 && (I.stopy = 0);
3903
- let ee = I.stopy - I.starty;
3904
- ee < F.maxHeight && (ee = F.maxHeight);
3905
- let L = ee + 2 * Z.diagramMarginY;
3906
- Z.mirrorActors && (L = L - Z.boxMargin + Z.bottomMarginAdj);
3907
- let R = I.stopx - I.startx;
3908
- R < F.maxWidth && (R = F.maxWidth);
3909
- let te = R + 2 * Z.diagramMarginX;
3910
- C && h.append("text").text(C).attr("x", (I.stopx - I.startx) / 2 - 2 * Z.diagramMarginX).attr("y", -25), f(h, L, te, Z.useMaxWidth);
3911
- let ne = C ? 40 : 0, z = g.size && l === "neo" ? 30 : 0;
3912
- h.attr("viewBox", I.startx - Z.diagramMarginX + " -" + (Z.diagramMarginY + ne) + " " + te + " " + (L + ne + z)), e.debug("models:", Q.models);
3913
- }, "draw");
3914
- async function qe(t, n, i) {
3915
- let a = {};
3916
- for (let e of n) if (t.get(e.to) && t.get(e.from)) {
3917
- let n = t.get(e.to);
3918
- if (e.placement === i.db.PLACEMENT.LEFTOF && !n.prevActor || e.placement === i.db.PLACEMENT.RIGHTOF && !n.nextActor) continue;
3919
- let o = e.placement !== void 0, s = !o, c = o ? Fe(Z) : Pe(Z), l = e.wrap ? S.wrapLabel(e.message, Z.width - 2 * Z.wrapPadding, c) : e.message, u = (r(l) ? await p(e.message, v()) : S.calculateTextDimensions(l, c)).width + 2 * Z.wrapPadding;
3920
- s && e.from === n.nextActor ? a[e.to] = h.getMax(a[e.to] || 0, u) : s && e.from === n.prevActor ? a[e.from] = h.getMax(a[e.from] || 0, u) : s && e.from === e.to ? (a[e.from] = h.getMax(a[e.from] || 0, u / 2), a[e.to] = h.getMax(a[e.to] || 0, u / 2)) : e.placement === i.db.PLACEMENT.RIGHTOF ? a[e.from] = h.getMax(a[e.from] || 0, u) : e.placement === i.db.PLACEMENT.LEFTOF ? a[n.prevActor] = h.getMax(a[n.prevActor] || 0, u) : e.placement === i.db.PLACEMENT.OVER && (n.prevActor && (a[n.prevActor] = h.getMax(a[n.prevActor] || 0, u / 2)), n.nextActor && (a[e.from] = h.getMax(a[e.from] || 0, u / 2)));
3921
- }
3922
- return e.debug("maxMessageWidthPerActor:", a), a;
3923
- }
3924
- n(qe, "getMaxMessageWidthPerActor");
3925
- var Je = /* @__PURE__ */ n(function(e) {
3926
- let t = 0, n = Ie(Z);
3927
- for (let r in e.links) {
3928
- let e = S.calculateTextDimensions(r, n).width + 2 * Z.wrapPadding + 2 * Z.boxMargin;
3929
- t < e && (t = e);
3930
- }
3931
- return t;
3932
- }, "getRequiredPopupWidth");
3933
- async function Ye(e, t, n) {
3934
- let i = 0;
3935
- for (let t of e.keys()) {
3936
- let n = e.get(t);
3937
- n.wrap && (n.description = S.wrapLabel(n.description, Z.width - 2 * Z.wrapPadding, Ie(Z)));
3938
- let a = r(n.description) ? await p(n.description, v()) : S.calculateTextDimensions(n.description, Ie(Z));
3939
- n.width = n.wrap ? Z.width : h.getMax(Z.width, a.width + 2 * Z.wrapPadding), n.height = n.wrap ? h.getMax(a.height, Z.height) : Z.height, i = h.getMax(i, n.height);
3940
- }
3941
- for (let n in t) {
3942
- let r = e.get(n);
3943
- if (!r) continue;
3944
- let i = e.get(r.nextActor);
3945
- if (!i) {
3946
- let e = t[n] + Z.actorMargin - r.width / 2;
3947
- r.margin = h.getMax(e, Z.actorMargin);
3948
- continue;
3949
- }
3950
- let a = t[n] + Z.actorMargin - r.width / 2 - i.width / 2;
3951
- r.margin = h.getMax(a, Z.actorMargin);
3952
- }
3953
- let a = 0;
3954
- return n.forEach((t) => {
3955
- let n = Pe(Z), r = t.actorKeys.reduce((t, n) => t += e.get(n).width + (e.get(n).margin || 0), 0), i = Z.boxMargin * 8;
3956
- r += i, r -= 2 * Z.boxTextMargin, t.wrap && (t.name = S.wrapLabel(t.name, r - 2 * Z.wrapPadding, n));
3957
- let o = S.calculateTextDimensions(t.name, n);
3958
- a = h.getMax(o.height, a);
3959
- let s = h.getMax(r, o.width + 2 * Z.wrapPadding);
3960
- if (t.margin = Z.boxTextMargin, r < s) {
3961
- let e = (s - r) / 2;
3962
- t.margin += e;
3963
- }
3964
- }), n.forEach((e) => e.textMaxHeight = a), h.getMax(i, Z.height);
3965
- }
3966
- n(Ye, "calculateActorMargins");
3967
- var Xe = /* @__PURE__ */ n(async function(t, n, i) {
3968
- let a = n.get(t.from), o = n.get(t.to), s = a.x, c = o.x, l = t.wrap && t.message, u = r(t.message) ? await p(t.message, v()) : S.calculateTextDimensions(l ? S.wrapLabel(t.message, Z.width, Fe(Z)) : t.message, Fe(Z)), d = {
3969
- width: l ? Z.width : h.getMax(Z.width, u.width + 2 * Z.noteMargin),
3970
- height: 0,
3971
- startx: a.x,
3972
- stopx: 0,
3973
- starty: 0,
3974
- stopy: 0,
3975
- message: t.message
3976
- };
3977
- return t.placement === i.db.PLACEMENT.RIGHTOF ? (d.width = l ? h.getMax(Z.width, u.width) : h.getMax(a.width / 2 + o.width / 2, u.width + 2 * Z.noteMargin), d.startx = s + (a.width + Z.actorMargin) / 2) : t.placement === i.db.PLACEMENT.LEFTOF ? (d.width = l ? h.getMax(Z.width, u.width + 2 * Z.noteMargin) : h.getMax(a.width / 2 + o.width / 2, u.width + 2 * Z.noteMargin), d.startx = s - d.width + (a.width - Z.actorMargin) / 2) : t.to === t.from ? (u = S.calculateTextDimensions(l ? S.wrapLabel(t.message, h.getMax(Z.width, a.width), Fe(Z)) : t.message, Fe(Z)), d.width = l ? h.getMax(Z.width, a.width) : h.getMax(a.width, Z.width, u.width + 2 * Z.noteMargin), d.startx = s + (a.width - d.width) / 2) : (d.width = Math.abs(s + a.width / 2 - (c + o.width / 2)) + Z.actorMargin, d.startx = s < c ? s + a.width / 2 - Z.actorMargin / 2 : c + o.width / 2 - Z.actorMargin / 2), l && (d.message = S.wrapLabel(t.message, d.width - 2 * Z.wrapPadding, Fe(Z))), e.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`), d;
3978
- }, "buildNoteModel"), Ze = 4, Qe = 6, $e = /* @__PURE__ */ n(function(e, t) {
3979
- let { CENTRAL_CONNECTION: n, CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i } = t.db.LINETYPE;
3980
- return [
3981
- n,
3982
- r,
3983
- i
3984
- ].includes(e.centralConnection);
3985
- }, "hasCentralConnection"), et = /* @__PURE__ */ n(function(e, t, n) {
3986
- let { CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i, BIDIRECTIONAL_SOLID: a, BIDIRECTIONAL_DOTTED: o } = t.db.LINETYPE, s = 0;
3987
- return (e.centralConnection === r || e.centralConnection === i) && (s += Ze), (e.centralConnection === r || e.centralConnection === i) && (e.type === a || e.type === o) && (s += n ? 0 : -Qe), s;
3988
- }, "calculateCentralConnectionOffset"), tt = /* @__PURE__ */ n(function(e, t) {
3989
- let { SOLID_ARROW_TOP_REVERSE: n, SOLID_ARROW_TOP_REVERSE_DOTTED: r, SOLID_ARROW_BOTTOM_REVERSE: i, SOLID_ARROW_BOTTOM_REVERSE_DOTTED: a, STICK_ARROW_TOP_REVERSE: o, STICK_ARROW_TOP_REVERSE_DOTTED: s, STICK_ARROW_BOTTOM_REVERSE: c, STICK_ARROW_BOTTOM_REVERSE_DOTTED: l } = t.db.LINETYPE;
3990
- return [
3991
- n,
3992
- r,
3993
- i,
3994
- a,
3995
- o,
3996
- s,
3997
- c,
3998
- l
3999
- ].includes(e.type);
4000
- }, "isReverseArrowType"), nt = /* @__PURE__ */ n(function(e, t) {
4001
- let { BIDIRECTIONAL_SOLID: n, BIDIRECTIONAL_DOTTED: r } = t.db.LINETYPE;
4002
- return [n, r].includes(e.type);
4003
- }, "isBidirectionalArrowType"), rt = /* @__PURE__ */ n(function(e, t, r) {
4004
- let { look: i } = v();
4005
- if (![
4006
- r.db.LINETYPE.SOLID_OPEN,
4007
- r.db.LINETYPE.DOTTED_OPEN,
4008
- r.db.LINETYPE.SOLID,
4009
- r.db.LINETYPE.SOLID_TOP,
4010
- r.db.LINETYPE.SOLID_BOTTOM,
4011
- r.db.LINETYPE.STICK_TOP,
4012
- r.db.LINETYPE.STICK_BOTTOM,
4013
- r.db.LINETYPE.SOLID_TOP_DOTTED,
4014
- r.db.LINETYPE.SOLID_BOTTOM_DOTTED,
4015
- r.db.LINETYPE.STICK_TOP_DOTTED,
4016
- r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4017
- r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4018
- r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
4019
- r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4020
- r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4021
- r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4022
- r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4023
- r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4024
- r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4025
- r.db.LINETYPE.DOTTED,
4026
- r.db.LINETYPE.SOLID_CROSS,
4027
- r.db.LINETYPE.DOTTED_CROSS,
4028
- r.db.LINETYPE.SOLID_POINT,
4029
- r.db.LINETYPE.DOTTED_POINT,
4030
- r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4031
- r.db.LINETYPE.BIDIRECTIONAL_DOTTED
4032
- ].includes(e.type)) return {};
4033
- let [a, o] = We(e.from, t), [s, c] = We(e.to, t), l = a <= s, u = l ? o : a, d = l ? s : c;
4034
- i === "neo" && (e.type !== r.db.LINETYPE.SOLID_OPEN && (d += l ? -3 : 3), (e.type === r.db.LINETYPE.BIDIRECTIONAL_SOLID || e.type === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (u += l ? 3 : -3)), u += et(e, r, l);
4035
- let f = Math.abs(s - c) > 2, p = /* @__PURE__ */ n((e) => l ? -e : e, "adjustValue");
4036
- e.from === e.to ? d = u : (e.activate && !f && (d += p(Z.activationWidth / 2 - 1)), [
4037
- r.db.LINETYPE.SOLID_OPEN,
4038
- r.db.LINETYPE.DOTTED_OPEN,
4039
- r.db.LINETYPE.STICK_TOP,
4040
- r.db.LINETYPE.STICK_BOTTOM,
4041
- r.db.LINETYPE.STICK_TOP_DOTTED,
4042
- r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4043
- r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4044
- r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4045
- r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4046
- r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4047
- r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4048
- r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4049
- r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4050
- r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4051
- ].includes(e.type) || (d += p(3)), [
4052
- r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4053
- r.db.LINETYPE.BIDIRECTIONAL_DOTTED,
4054
- r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4055
- r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4056
- r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4057
- r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4058
- ].includes(e.type) && (u -= p(3)));
4059
- let m = [
4060
- a,
4061
- o,
4062
- s,
4063
- c
4064
- ], g = Math.abs(u - d);
4065
- e.wrap && e.message && (e.message = S.wrapLabel(e.message, h.getMax(g + 2 * Z.wrapPadding, Z.width), Pe(Z)));
4066
- let _ = S.calculateTextDimensions(e.message, Pe(Z));
4067
- return {
4068
- width: h.getMax(e.wrap ? 0 : _.width + 2 * Z.wrapPadding, g + 2 * Z.wrapPadding, Z.width),
4069
- height: 0,
4070
- startx: u,
4071
- stopx: d,
4072
- starty: 0,
4073
- stopy: 0,
4074
- message: e.message,
4075
- type: e.type,
4076
- wrap: e.wrap,
4077
- fromBounds: Math.min.apply(null, m),
4078
- toBounds: Math.max.apply(null, m)
4079
- };
4080
- }, "buildMessageModel"), it = /* @__PURE__ */ n(async function(t, n, r, i) {
4081
- let a = {}, o = [], s, c, l;
4082
- for (let e of t) {
4083
- switch (e.type) {
4084
- case i.db.LINETYPE.LOOP_START:
4085
- case i.db.LINETYPE.ALT_START:
4086
- case i.db.LINETYPE.OPT_START:
4087
- case i.db.LINETYPE.PAR_START:
4088
- case i.db.LINETYPE.PAR_OVER_START:
4089
- case i.db.LINETYPE.CRITICAL_START:
4090
- case i.db.LINETYPE.BREAK_START:
4091
- o.push({
4092
- id: e.id,
4093
- msg: e.message,
4094
- from: 2 ** 53 - 1,
4095
- to: -(2 ** 53 - 1),
4096
- width: 0
4097
- });
4098
- break;
4099
- case i.db.LINETYPE.ALT_ELSE:
4100
- case i.db.LINETYPE.PAR_AND:
4101
- case i.db.LINETYPE.CRITICAL_OPTION:
4102
- e.message && (s = o.pop(), a[s.id] = s, a[e.id] = s, o.push(s));
4103
- break;
4104
- case i.db.LINETYPE.LOOP_END:
4105
- case i.db.LINETYPE.ALT_END:
4106
- case i.db.LINETYPE.OPT_END:
4107
- case i.db.LINETYPE.PAR_END:
4108
- case i.db.LINETYPE.CRITICAL_END:
4109
- case i.db.LINETYPE.BREAK_END:
4110
- s = o.pop(), a[s.id] = s;
4111
- break;
4112
- case i.db.LINETYPE.ACTIVE_START:
4113
- {
4114
- let t = n.get(e.from ? e.from : e.to.actor), r = Ue(e.from ? e.from : e.to.actor).length, i = t.x + t.width / 2 + (r - 1) * Z.activationWidth / 2, a = {
4115
- startx: i,
4116
- stopx: i + Z.activationWidth,
4117
- actor: e.from,
4118
- enabled: !0
4119
- };
4120
- Q.activations.push(a);
4121
- }
4122
- break;
4123
- case i.db.LINETYPE.ACTIVE_END: {
4124
- let t = Q.activations.map((e) => e.actor).lastIndexOf(e.from);
4125
- Q.activations.splice(t, 1).splice(0, 1);
4126
- }
4127
- }
4128
- e.placement === void 0 ? (l = rt(e, n, i), e.msgModel = l, l.startx && l.stopx && o.length > 0 && o.forEach((t) => {
4129
- if (s = t, l.startx === l.stopx) {
4130
- let t = n.get(e.from), r = n.get(e.to);
4131
- s.from = h.getMin(t.x - l.width / 2, t.x - t.width / 2, s.from), s.to = h.getMax(r.x + l.width / 2, r.x + t.width / 2, s.to), s.width = h.getMax(s.width, Math.abs(s.to - s.from)) - Z.labelBoxWidth;
4132
- } else s.from = h.getMin(l.startx, s.from), s.to = h.getMax(l.stopx, s.to), s.width = h.getMax(s.width, l.width) - Z.labelBoxWidth;
4133
- })) : (c = await Xe(e, n, i), e.noteModel = c, o.forEach((e) => {
4134
- s = e, s.from = h.getMin(s.from, c.startx), s.to = h.getMax(s.to, c.startx + c.width), s.width = h.getMax(s.width, Math.abs(s.from - s.to)) - Z.labelBoxWidth;
4135
- }));
4136
- }
4137
- return Q.activations = [], e.debug("Loop type widths:", a), a;
4138
- }, "calculateLoopBounds"), at = {
4139
- parser: F,
4140
- get db() {
4141
- return new te();
4142
- },
4143
- renderer: {
4144
- bounds: Q,
4145
- drawActors: Be,
4146
- drawActorsPopup: Ve,
4147
- setConf: He,
4148
- draw: Ke
4149
- },
4150
- styles: ne,
4151
- init: /* @__PURE__ */ n((e) => {
4152
- e.sequence ||= {}, e.wrap && (e.sequence.wrap = e.wrap, a({ sequence: { wrap: e.wrap } }));
4153
- }, "init")
4154
- };
4155
- //#endregion
4156
- export { at as diagram };