@layers-app/editor 0.7.44 → 0.7.46

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 (248) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.js +3 -3
  4. package/dist/{layers.Bt5BEQ6h.js → layers.B88sQYuh.js} +1 -1
  5. package/dist/layers.BgMykHnn.js +154 -0
  6. package/dist/{layers.CsTbIH2o.js → layers.BtvuN20E.js} +8988 -9641
  7. package/dist/{layers.8AV9TJ5y.js → layers.Cfvta__C.js} +1 -1
  8. package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
  9. package/dist/layers.Ct1ojjl3.js +1 -0
  10. package/dist/{layers.BPwGnx6H.js → layers.Hq0pIRX3.js} +24 -24
  11. package/dist/layers.JT_kEFH5.js +129 -0
  12. package/dist/{layers.D5EnJuSD.js → layers.NW1lST7i.js} +1 -1
  13. package/dist/layers.pwc3O6Es.js +261 -0
  14. package/package.json +1 -1
  15. package/dist/layers.03rOzGz6.js +0 -1
  16. package/dist/layers.2ki87-LU.js +0 -5
  17. package/dist/layers.2o06iRgp.js +0 -504
  18. package/dist/layers.52famHy6.js +0 -1
  19. package/dist/layers.5oOWOsbG.js +0 -39
  20. package/dist/layers.7JqFgE4-.js +0 -15
  21. package/dist/layers.8KaGKAU3.js +0 -271
  22. package/dist/layers.9URcRock.js +0 -1
  23. package/dist/layers.9pNaFvaX.js +0 -1
  24. package/dist/layers.B-dneuft.js +0 -373
  25. package/dist/layers.B19hGmey.js +0 -1
  26. package/dist/layers.B1fchoGW.js +0 -1
  27. package/dist/layers.B2cspFhx.js +0 -1034
  28. package/dist/layers.B3D4g2HH.js +0 -1
  29. package/dist/layers.B6soS223.js +0 -8
  30. package/dist/layers.B780IvgC.js +0 -84
  31. package/dist/layers.B7K7JjK6.js +0 -1510
  32. package/dist/layers.B9UunCzG.js +0 -39
  33. package/dist/layers.B9rQcczY.js +0 -14
  34. package/dist/layers.BAtv1CM7.js +0 -1
  35. package/dist/layers.BBcDfITy.js +0 -40
  36. package/dist/layers.BBhmfZot.js +0 -39
  37. package/dist/layers.BDqHBDOj.js +0 -9
  38. package/dist/layers.BFRbDTjY.js +0 -160
  39. package/dist/layers.BIUiVID4.js +0 -10
  40. package/dist/layers.BIeVwYKL.js +0 -1
  41. package/dist/layers.BJDrjORS.js +0 -244
  42. package/dist/layers.BKamPs3H.js +0 -1
  43. package/dist/layers.BLd2spTm.js +0 -1
  44. package/dist/layers.BMWMvKH-.js +0 -806
  45. package/dist/layers.BMxAun-L.js +0 -6
  46. package/dist/layers.BOMgDmQW.js +0 -1
  47. package/dist/layers.BQX_W7-N.js +0 -41
  48. package/dist/layers.BRBbDnyO.js +0 -32
  49. package/dist/layers.BRU1WOyl.js +0 -65
  50. package/dist/layers.BSTBZrFn.js +0 -1
  51. package/dist/layers.BUP7J0N1.js +0 -198
  52. package/dist/layers.BWYHKKSc.js +0 -9
  53. package/dist/layers.B_5Gf5vh.js +0 -7
  54. package/dist/layers.BbCfEXyj.js +0 -55
  55. package/dist/layers.Be7sKoi1.js +0 -36
  56. package/dist/layers.BewWHVmc.js +0 -10
  57. package/dist/layers.Bhbf4Voy.js +0 -1286
  58. package/dist/layers.BhgyYcry.js +0 -2966
  59. package/dist/layers.BjqXvHbh.js +0 -38
  60. package/dist/layers.Bl153Elb.js +0 -772
  61. package/dist/layers.BlVr0EB6.js +0 -35
  62. package/dist/layers.BmBx-JQP.js +0 -9
  63. package/dist/layers.BnDdlKo4.js +0 -39
  64. package/dist/layers.BnWlIV7l.js +0 -9
  65. package/dist/layers.BpilXLfW.js +0 -6
  66. package/dist/layers.BpxcN2Id.js +0 -118
  67. package/dist/layers.Bva7u9LH.js +0 -41
  68. package/dist/layers.Bw9PyPP3.js +0 -40
  69. package/dist/layers.BxxWjVSm.js +0 -7
  70. package/dist/layers.ByfnxHEU.js +0 -11
  71. package/dist/layers.BzrUktHE.js +0 -40
  72. package/dist/layers.Bzx6XYuC.js +0 -1
  73. package/dist/layers.C-oUoVP8.js +0 -11
  74. package/dist/layers.C-v8184a.js +0 -10
  75. package/dist/layers.C2DLU3k6.js +0 -205
  76. package/dist/layers.C4n-fEss.js +0 -9
  77. package/dist/layers.C8LHt7Vy.js +0 -35
  78. package/dist/layers.C8_lu5UH.js +0 -23
  79. package/dist/layers.C8i9MTMT.js +0 -1089
  80. package/dist/layers.C8sUTigy.js +0 -1
  81. package/dist/layers.C9xAxi33.js +0 -2
  82. package/dist/layers.CBBwxyeE.js +0 -36
  83. package/dist/layers.CD1cqEz5.js +0 -40
  84. package/dist/layers.CDMZWhfy.js +0 -61
  85. package/dist/layers.CEGoZtyz.js +0 -42
  86. package/dist/layers.CF5fav1y.js +0 -42
  87. package/dist/layers.CHZsXQcr.js +0 -1
  88. package/dist/layers.CL2zU9v_.js +0 -8
  89. package/dist/layers.CMF1lFeu.js +0 -2482
  90. package/dist/layers.CN4h4dWv.js +0 -40
  91. package/dist/layers.COskFe6S.js +0 -39
  92. package/dist/layers.CPYfnqn5.js +0 -37
  93. package/dist/layers.CQGa02SB.js +0 -8
  94. package/dist/layers.CS1a09mB.js +0 -2
  95. package/dist/layers.CSABgVEk.js +0 -13
  96. package/dist/layers.CSPqTpuh.js +0 -1
  97. package/dist/layers.CUJquY9u.js +0 -40
  98. package/dist/layers.CVpmcvSk.js +0 -425
  99. package/dist/layers.CXNwKrxy.js +0 -2
  100. package/dist/layers.CXbg7PbM.js +0 -32
  101. package/dist/layers.CXtLmfFd.js +0 -4
  102. package/dist/layers.CYQ-eDkR.js +0 -36
  103. package/dist/layers.CYlMzZJI.js +0 -223
  104. package/dist/layers.C_6t44t9.js +0 -7
  105. package/dist/layers.C_AqJZgj.js +0 -1
  106. package/dist/layers.C_IvrzZ3.js +0 -7
  107. package/dist/layers.C_JAqhrY.js +0 -76
  108. package/dist/layers.C_l6mWJZ.js +0 -3
  109. package/dist/layers.Cbn9kFtP.js +0 -22
  110. package/dist/layers.CdC2YLb3.js +0 -189
  111. package/dist/layers.Ce68IynP.js +0 -8
  112. package/dist/layers.Ced46X3q.js +0 -6
  113. package/dist/layers.CgAndu8u.js +0 -437
  114. package/dist/layers.CgKZ3PQQ.js +0 -1
  115. package/dist/layers.CjF61D9D.js +0 -32
  116. package/dist/layers.Ck_mYNSX.js +0 -38
  117. package/dist/layers.Ckb_FqEw.js +0 -9
  118. package/dist/layers.ClK-YSEj.js +0 -10
  119. package/dist/layers.ClPMD0vL.js +0 -1619
  120. package/dist/layers.Cq3WhnzE.js +0 -41
  121. package/dist/layers.CqVTtuYm.js +0 -6
  122. package/dist/layers.CrM-3BQr.js +0 -4
  123. package/dist/layers.CsJQzt0K.js +0 -805
  124. package/dist/layers.Cux05MKl.js +0 -8
  125. package/dist/layers.CwZFs1PA.js +0 -10
  126. package/dist/layers.Cxlebi7D.js +0 -122
  127. package/dist/layers.Cy9EF2DN.js +0 -8
  128. package/dist/layers.Cyzu9PKQ.js +0 -1
  129. package/dist/layers.D0zn4_Mx.js +0 -1
  130. package/dist/layers.D1hB76Bq.js +0 -11
  131. package/dist/layers.D3RHWYgt.js +0 -8
  132. package/dist/layers.D3qdetie.js +0 -9
  133. package/dist/layers.D3xtqcGm.js +0 -42
  134. package/dist/layers.D4T8fTcj.js +0 -1223
  135. package/dist/layers.D54e-Khu.js +0 -9
  136. package/dist/layers.D661e9Xc.js +0 -1225
  137. package/dist/layers.D7cIx_9y.js +0 -7
  138. package/dist/layers.D7jGxypv.js +0 -8
  139. package/dist/layers.D7v-bI_M.js +0 -796
  140. package/dist/layers.DA37YYAX.js +0 -1
  141. package/dist/layers.DBFtWsLd.js +0 -32
  142. package/dist/layers.DBspJRLt.js +0 -9
  143. package/dist/layers.DCYPhLVi.js +0 -139
  144. package/dist/layers.DCeGyOw0.js +0 -32
  145. package/dist/layers.DDBS2bZp.js +0 -10
  146. package/dist/layers.DEV2RzXF.js +0 -35
  147. package/dist/layers.DFOzrTFb.js +0 -6
  148. package/dist/layers.DGbx9JE5.js +0 -70
  149. package/dist/layers.DH1xK3c2.js +0 -48149
  150. package/dist/layers.DH2Fx227.js +0 -38
  151. package/dist/layers.DH7NXYKd.js +0 -21941
  152. package/dist/layers.DHOsMTqa.js +0 -41
  153. package/dist/layers.DJIT4Yuh.js +0 -1
  154. package/dist/layers.DJteL1WD.js +0 -33
  155. package/dist/layers.DLwuMfdd.js +0 -84
  156. package/dist/layers.DMkBISW1.js +0 -1
  157. package/dist/layers.DN58BT2N.js +0 -129
  158. package/dist/layers.DN9HoVxI.js +0 -18
  159. package/dist/layers.DNRniJ59.js +0 -33
  160. package/dist/layers.DOZhGFQj.js +0 -40
  161. package/dist/layers.DOrgOHBr.js +0 -1
  162. package/dist/layers.DP6Pb86W.js +0 -4
  163. package/dist/layers.DQpfAS9_.js +0 -84
  164. package/dist/layers.DSBfJxui.js +0 -2238
  165. package/dist/layers.DUulRicy.js +0 -213
  166. package/dist/layers.DXLQ2q0o.js +0 -794
  167. package/dist/layers.DXqg60IE.js +0 -1
  168. package/dist/layers.DZkyqPUI.js +0 -41
  169. package/dist/layers.D_MAZnF5.js +0 -11
  170. package/dist/layers.DbMx76Zo.js +0 -1
  171. package/dist/layers.DbaKVP5e.js +0 -1
  172. package/dist/layers.DcYYTMWk.js +0 -5
  173. package/dist/layers.DenHSAM-.js +0 -423
  174. package/dist/layers.Dfg_GwXo.js +0 -41
  175. package/dist/layers.Dfv6IVuG.js +0 -39
  176. package/dist/layers.Di5XQ7RG.js +0 -5
  177. package/dist/layers.DiLG4f1T.js +0 -41
  178. package/dist/layers.DjUOC4st.js +0 -16
  179. package/dist/layers.Dksb8xWL.js +0 -21620
  180. package/dist/layers.DnTHkHku.js +0 -1
  181. package/dist/layers.DnbGJb7n.js +0 -10
  182. package/dist/layers.Dp8hIITu.js +0 -39
  183. package/dist/layers.DrGILrJe.js +0 -1
  184. package/dist/layers.DrPZhd4b.js +0 -8
  185. package/dist/layers.DsCDPcQF.js +0 -52
  186. package/dist/layers.DsLXYKq7.js +0 -139
  187. package/dist/layers.DssLE6Ze.js +0 -42
  188. package/dist/layers.DtK0Svqg.js +0 -36
  189. package/dist/layers.DtNKNbtb.js +0 -1268
  190. package/dist/layers.DuuzgAVb.js +0 -7
  191. package/dist/layers.DuyNXGEO.js +0 -5
  192. package/dist/layers.DvSwjIBG.js +0 -37
  193. package/dist/layers.DwPc2_v9.js +0 -1088
  194. package/dist/layers.DxA6ocdw.js +0 -70
  195. package/dist/layers.Dy1naDTQ.js +0 -14
  196. package/dist/layers.DyK8xvHc.js +0 -1
  197. package/dist/layers.G5fXkV2g.js +0 -40
  198. package/dist/layers.GRwgnZ0K.js +0 -1126
  199. package/dist/layers.H9GbooLl.js +0 -11
  200. package/dist/layers.Ii0kosET.js +0 -10
  201. package/dist/layers.IsBK41F6.js +0 -960
  202. package/dist/layers.JFRyjmr3.js +0 -295
  203. package/dist/layers.JWCLFILJ.js +0 -1
  204. package/dist/layers.L1EEfd1U.js +0 -323
  205. package/dist/layers.LgOKQKa4.js +0 -39
  206. package/dist/layers.NsxwBYck.js +0 -907
  207. package/dist/layers.OqunHjml.js +0 -51
  208. package/dist/layers.OziSx6JY.js +0 -8583
  209. package/dist/layers.PW9J5Jxo.js +0 -37
  210. package/dist/layers.R8mPlCA0.js +0 -261
  211. package/dist/layers.S2akqscS.js +0 -1
  212. package/dist/layers.SGT8YAPE.js +0 -7
  213. package/dist/layers.TD8A7YjM.js +0 -44
  214. package/dist/layers.UtIqQK19.js +0 -276
  215. package/dist/layers.VIZ2Xa30.js +0 -1
  216. package/dist/layers.WAvmJfLV.js +0 -7
  217. package/dist/layers.XQpyNRW5.js +0 -116
  218. package/dist/layers.Xco5GVBh.js +0 -40
  219. package/dist/layers.Y0BjACCI.js +0 -39
  220. package/dist/layers.YTMr1YyH.js +0 -42
  221. package/dist/layers._bAvXI7Q.js +0 -934
  222. package/dist/layers._mqWoKOG.js +0 -1
  223. package/dist/layers.al8Vg6zt.js +0 -6
  224. package/dist/layers.b0h5ZBmD.js +0 -61
  225. package/dist/layers.dyRJvH-s.js +0 -6
  226. package/dist/layers.eB1U5Jl6.js +0 -8
  227. package/dist/layers.euNtZlgm.js +0 -37
  228. package/dist/layers.fChmSQjC.js +0 -1
  229. package/dist/layers.feSI_7Kx.js +0 -1
  230. package/dist/layers.frthGoDK.js +0 -9
  231. package/dist/layers.gqLoI9xW.js +0 -5
  232. package/dist/layers.hpuqkyYN.js +0 -257
  233. package/dist/layers.iN3mYsr5.js +0 -34
  234. package/dist/layers.jjNsAaLS.js +0 -10
  235. package/dist/layers.l6EuAdoo.js +0 -7
  236. package/dist/layers.lCpg7dOn.js +0 -21
  237. package/dist/layers.lXs3RYd3.js +0 -10
  238. package/dist/layers.liB8aZ3C.js +0 -207
  239. package/dist/layers.qffllMmW.js +0 -41
  240. package/dist/layers.r1jKcKBb.js +0 -4
  241. package/dist/layers.rFy6_B28.js +0 -32
  242. package/dist/layers.rq1vUYAs.js +0 -6
  243. package/dist/layers.sIeIPQd4.js +0 -40
  244. package/dist/layers.sdxt2Nuu.js +0 -8
  245. package/dist/layers.t8MaTGN8.js +0 -1
  246. package/dist/layers.wKJ5yZVV.js +0 -96
  247. package/dist/layers.x9brO2TV.js +0 -1
  248. package/dist/layers.xQ1jNHSB.js +0 -1583
@@ -1,2238 +0,0 @@
1
- import { a as we, s as ve, c as $t, g as st, o as _e, n as ke, b as Pe, d as Lt, l as X, e as Le, f as Ie, j as v, i as At, q as Ae, u as B, R as nt, S as wt, T as te, Z as Ne, V as ee, W as Bt } from "./layers.OziSx6JY.js";
2
- import { J as se } from "./layers.Dksb8xWL.js";
3
- import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./layers.BRU1WOyl.js";
4
- import "lodash-es/memoize.js";
5
- import "lodash-es/merge.js";
6
- import "lodash-es/isEmpty.js";
7
- var Yt = (function() {
8
- var t = function(dt, w, k, L) {
9
- for (k = k || {}, L = dt.length; L--; k[dt[L]] = w)
10
- ;
11
- return k;
12
- }, e = [1, 2], o = [1, 3], s = [1, 4], i = [2, 4], a = [1, 9], c = [1, 11], l = [1, 13], p = [1, 14], r = [1, 16], x = [1, 17], T = [1, 18], u = [1, 24], g = [1, 25], m = [1, 26], _ = [1, 27], I = [1, 28], V = [1, 29], S = [1, 30], O = [1, 31], R = [1, 32], q = [1, 33], z = [1, 34], J = [1, 35], $ = [1, 36], H = [1, 37], U = [1, 38], F = [1, 39], W = [1, 41], Z = [1, 42], K = [1, 43], Q = [1, 44], tt = [1, 45], N = [1, 46], y = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], P = [4, 5, 16, 50, 52, 53], j = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], rt = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], A = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], Gt = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], ht = [68, 69, 70], ot = [1, 120], Mt = {
13
- trace: function() {
14
- },
15
- yy: {},
16
- symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, box_section: 10, box_line: 11, participant_statement: 12, create: 13, box: 14, restOfLine: 15, end: 16, signal: 17, autonumber: 18, NUM: 19, off: 20, activate: 21, actor: 22, deactivate: 23, note_statement: 24, links_statement: 25, link_statement: 26, properties_statement: 27, details_statement: 28, title: 29, legacy_title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, loop: 36, rect: 37, opt: 38, alt: 39, else_sections: 40, par: 41, par_sections: 42, par_over: 43, critical: 44, option_sections: 45, break: 46, option: 47, and: 48, else: 49, participant: 50, AS: 51, participant_actor: 52, destroy: 53, note: 54, placement: 55, text2: 56, over: 57, actor_pair: 58, links: 59, link: 60, properties: 61, details: 62, spaceList: 63, ",": 64, left_of: 65, right_of: 66, signaltype: 67, "+": 68, "-": 69, ACTOR: 70, SOLID_OPEN_ARROW: 71, DOTTED_OPEN_ARROW: 72, SOLID_ARROW: 73, DOTTED_ARROW: 74, SOLID_CROSS: 75, DOTTED_CROSS: 76, SOLID_POINT: 77, DOTTED_POINT: 78, TXT: 79, $accept: 0, $end: 1 },
17
- terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" },
18
- productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
19
- performAction: function(w, k, L, b, M, h, Et) {
20
- var d = h.length - 1;
21
- switch (M) {
22
- case 3:
23
- return b.apply(h[d]), h[d];
24
- case 4:
25
- case 9:
26
- this.$ = [];
27
- break;
28
- case 5:
29
- case 10:
30
- h[d - 1].push(h[d]), this.$ = h[d - 1];
31
- break;
32
- case 6:
33
- case 7:
34
- case 11:
35
- case 12:
36
- this.$ = h[d];
37
- break;
38
- case 8:
39
- case 13:
40
- this.$ = [];
41
- break;
42
- case 15:
43
- h[d].type = "createParticipant", this.$ = h[d];
44
- break;
45
- case 16:
46
- h[d - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(h[d - 2]) }), h[d - 1].push({ type: "boxEnd", boxText: h[d - 2] }), this.$ = h[d - 1];
47
- break;
48
- case 18:
49
- this.$ = { type: "sequenceIndex", sequenceIndex: Number(h[d - 2]), sequenceIndexStep: Number(h[d - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
50
- break;
51
- case 19:
52
- this.$ = { type: "sequenceIndex", sequenceIndex: Number(h[d - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
53
- break;
54
- case 20:
55
- this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
56
- break;
57
- case 21:
58
- this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
59
- break;
60
- case 22:
61
- this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: h[d - 1] };
62
- break;
63
- case 23:
64
- this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: h[d - 1] };
65
- break;
66
- case 29:
67
- b.setDiagramTitle(h[d].substring(6)), this.$ = h[d].substring(6);
68
- break;
69
- case 30:
70
- b.setDiagramTitle(h[d].substring(7)), this.$ = h[d].substring(7);
71
- break;
72
- case 31:
73
- this.$ = h[d].trim(), b.setAccTitle(this.$);
74
- break;
75
- case 32:
76
- case 33:
77
- this.$ = h[d].trim(), b.setAccDescription(this.$);
78
- break;
79
- case 34:
80
- h[d - 1].unshift({ type: "loopStart", loopText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.LOOP_START }), h[d - 1].push({ type: "loopEnd", loopText: h[d - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = h[d - 1];
81
- break;
82
- case 35:
83
- h[d - 1].unshift({ type: "rectStart", color: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.RECT_START }), h[d - 1].push({ type: "rectEnd", color: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = h[d - 1];
84
- break;
85
- case 36:
86
- h[d - 1].unshift({ type: "optStart", optText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.OPT_START }), h[d - 1].push({ type: "optEnd", optText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = h[d - 1];
87
- break;
88
- case 37:
89
- h[d - 1].unshift({ type: "altStart", altText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.ALT_START }), h[d - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = h[d - 1];
90
- break;
91
- case 38:
92
- h[d - 1].unshift({ type: "parStart", parText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.PAR_START }), h[d - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = h[d - 1];
93
- break;
94
- case 39:
95
- h[d - 1].unshift({ type: "parStart", parText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.PAR_OVER_START }), h[d - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = h[d - 1];
96
- break;
97
- case 40:
98
- h[d - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.CRITICAL_START }), h[d - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = h[d - 1];
99
- break;
100
- case 41:
101
- h[d - 1].unshift({ type: "breakStart", breakText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.BREAK_START }), h[d - 1].push({ type: "breakEnd", optText: b.parseMessage(h[d - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = h[d - 1];
102
- break;
103
- case 43:
104
- this.$ = h[d - 3].concat([{ type: "option", optionText: b.parseMessage(h[d - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, h[d]]);
105
- break;
106
- case 45:
107
- this.$ = h[d - 3].concat([{ type: "and", parText: b.parseMessage(h[d - 1]), signalType: b.LINETYPE.PAR_AND }, h[d]]);
108
- break;
109
- case 47:
110
- this.$ = h[d - 3].concat([{ type: "else", altText: b.parseMessage(h[d - 1]), signalType: b.LINETYPE.ALT_ELSE }, h[d]]);
111
- break;
112
- case 48:
113
- h[d - 3].draw = "participant", h[d - 3].type = "addParticipant", h[d - 3].description = b.parseMessage(h[d - 1]), this.$ = h[d - 3];
114
- break;
115
- case 49:
116
- h[d - 1].draw = "participant", h[d - 1].type = "addParticipant", this.$ = h[d - 1];
117
- break;
118
- case 50:
119
- h[d - 3].draw = "actor", h[d - 3].type = "addParticipant", h[d - 3].description = b.parseMessage(h[d - 1]), this.$ = h[d - 3];
120
- break;
121
- case 51:
122
- h[d - 1].draw = "actor", h[d - 1].type = "addParticipant", this.$ = h[d - 1];
123
- break;
124
- case 52:
125
- h[d - 1].type = "destroyParticipant", this.$ = h[d - 1];
126
- break;
127
- case 53:
128
- this.$ = [h[d - 1], { type: "addNote", placement: h[d - 2], actor: h[d - 1].actor, text: h[d] }];
129
- break;
130
- case 54:
131
- h[d - 2] = [].concat(h[d - 1], h[d - 1]).slice(0, 2), h[d - 2][0] = h[d - 2][0].actor, h[d - 2][1] = h[d - 2][1].actor, this.$ = [h[d - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: h[d - 2].slice(0, 2), text: h[d] }];
132
- break;
133
- case 55:
134
- this.$ = [h[d - 1], { type: "addLinks", actor: h[d - 1].actor, text: h[d] }];
135
- break;
136
- case 56:
137
- this.$ = [h[d - 1], { type: "addALink", actor: h[d - 1].actor, text: h[d] }];
138
- break;
139
- case 57:
140
- this.$ = [h[d - 1], { type: "addProperties", actor: h[d - 1].actor, text: h[d] }];
141
- break;
142
- case 58:
143
- this.$ = [h[d - 1], { type: "addDetails", actor: h[d - 1].actor, text: h[d] }];
144
- break;
145
- case 61:
146
- this.$ = [h[d - 2], h[d]];
147
- break;
148
- case 62:
149
- this.$ = h[d];
150
- break;
151
- case 63:
152
- this.$ = b.PLACEMENT.LEFTOF;
153
- break;
154
- case 64:
155
- this.$ = b.PLACEMENT.RIGHTOF;
156
- break;
157
- case 65:
158
- this.$ = [
159
- h[d - 4],
160
- h[d - 1],
161
- { type: "addMessage", from: h[d - 4].actor, to: h[d - 1].actor, signalType: h[d - 3], msg: h[d], activate: !0 },
162
- { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: h[d - 1] }
163
- ];
164
- break;
165
- case 66:
166
- this.$ = [
167
- h[d - 4],
168
- h[d - 1],
169
- { type: "addMessage", from: h[d - 4].actor, to: h[d - 1].actor, signalType: h[d - 3], msg: h[d] },
170
- { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: h[d - 4] }
171
- ];
172
- break;
173
- case 67:
174
- this.$ = [h[d - 3], h[d - 1], { type: "addMessage", from: h[d - 3].actor, to: h[d - 1].actor, signalType: h[d - 2], msg: h[d] }];
175
- break;
176
- case 68:
177
- this.$ = { type: "addParticipant", actor: h[d] };
178
- break;
179
- case 69:
180
- this.$ = b.LINETYPE.SOLID_OPEN;
181
- break;
182
- case 70:
183
- this.$ = b.LINETYPE.DOTTED_OPEN;
184
- break;
185
- case 71:
186
- this.$ = b.LINETYPE.SOLID;
187
- break;
188
- case 72:
189
- this.$ = b.LINETYPE.DOTTED;
190
- break;
191
- case 73:
192
- this.$ = b.LINETYPE.SOLID_CROSS;
193
- break;
194
- case 74:
195
- this.$ = b.LINETYPE.DOTTED_CROSS;
196
- break;
197
- case 75:
198
- this.$ = b.LINETYPE.SOLID_POINT;
199
- break;
200
- case 76:
201
- this.$ = b.LINETYPE.DOTTED_POINT;
202
- break;
203
- case 77:
204
- this.$ = b.parseMessage(h[d].trim().substring(1));
205
- break;
206
- }
207
- },
208
- table: [{ 3: 1, 4: e, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: s }, { 3: 6, 4: e, 5: o, 6: s }, t([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, t(y, [2, 5]), { 9: 47, 12: 12, 13: l, 14: p, 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 14]), { 12: 48, 50: H, 52: U, 53: F }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: N }, { 22: 55, 70: N }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(y, [2, 29]), t(y, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(y, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: N }, { 22: 72, 70: N }, { 22: 73, 70: N }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: N }, { 22: 88, 70: N }, { 22: 89, 70: N }, { 22: 90, 70: N }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), t(y, [2, 6]), t(y, [2, 15]), t(P, [2, 9], { 10: 91 }), t(y, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, t(y, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, t(y, [2, 24]), t(y, [2, 25]), t(y, [2, 26]), t(y, [2, 27]), t(y, [2, 28]), t(y, [2, 31]), t(y, [2, 32]), t(j, i, { 7: 97 }), t(j, i, { 7: 98 }), t(j, i, { 7: 99 }), t(rt, i, { 40: 100, 7: 101 }), t(A, i, { 42: 102, 7: 103 }), t(A, i, { 7: 103, 42: 104 }), t(Gt, i, { 45: 105, 7: 106 }), t(j, i, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: N }, t(ht, [2, 69]), t(ht, [2, 70]), t(ht, [2, 71]), t(ht, [2, 72]), t(ht, [2, 73]), t(ht, [2, 74]), t(ht, [2, 75]), t(ht, [2, 76]), { 22: 116, 70: N }, { 22: 118, 58: 117, 70: N }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: ot }, { 56: 121, 79: ot }, { 56: 122, 79: ot }, { 56: 123, 79: ot }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: H, 52: U, 53: F }, { 5: [1, 129] }, t(y, [2, 19]), t(y, [2, 20]), t(y, [2, 22]), t(y, [2, 23]), { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 130], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 131], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 132], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 16: [1, 133] }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [2, 46], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 49: [1, 134], 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 16: [1, 135] }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [2, 44], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 48: [1, 136], 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [2, 42], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 47: [1, 139], 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 4: a, 5: c, 8: 8, 9: 10, 12: 12, 13: l, 14: p, 16: [1, 140], 17: 15, 18: r, 21: x, 22: 40, 23: T, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: u, 30: g, 31: m, 33: _, 35: I, 36: V, 37: S, 38: O, 39: R, 41: q, 43: z, 44: J, 46: $, 50: H, 52: U, 53: F, 54: W, 59: Z, 60: K, 61: Q, 62: tt, 70: N }, { 15: [1, 141] }, t(y, [2, 49]), { 15: [1, 142] }, t(y, [2, 51]), t(y, [2, 52]), { 22: 143, 70: N }, { 22: 144, 70: N }, { 56: 145, 79: ot }, { 56: 146, 79: ot }, { 56: 147, 79: ot }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(y, [2, 16]), t(P, [2, 10]), { 12: 149, 50: H, 52: U, 53: F }, t(P, [2, 12]), t(P, [2, 13]), t(y, [2, 18]), t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), { 15: [1, 150] }, t(y, [2, 38]), { 15: [1, 151] }, t(y, [2, 39]), t(y, [2, 40]), { 15: [1, 152] }, t(y, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: ot }, { 56: 156, 79: ot }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: N }, t(P, [2, 11]), t(rt, i, { 7: 101, 40: 158 }), t(A, i, { 7: 103, 42: 159 }), t(Gt, i, { 7: 106, 45: 160 }), t(y, [2, 48]), t(y, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
209
- defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] },
210
- parseError: function(w, k) {
211
- if (k.recoverable)
212
- this.trace(w);
213
- else {
214
- var L = new Error(w);
215
- throw L.hash = k, L;
216
- }
217
- },
218
- parse: function(w) {
219
- var k = this, L = [0], b = [], M = [null], h = [], Et = this.table, d = "", _t = 0, Xt = 0, Te = 2, Jt = 1, be = h.slice.call(arguments, 1), Y = Object.create(this.lexer), pt = { yy: {} };
220
- for (var Ct in this.yy)
221
- Object.prototype.hasOwnProperty.call(this.yy, Ct) && (pt.yy[Ct] = this.yy[Ct]);
222
- Y.setInput(w, pt.yy), pt.yy.lexer = Y, pt.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
223
- var Dt = Y.yylloc;
224
- h.push(Dt);
225
- var Ee = Y.options && Y.options.ranges;
226
- typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
227
- function me() {
228
- var lt;
229
- return lt = b.pop() || Y.lex() || Jt, typeof lt != "number" && (lt instanceof Array && (b = lt, lt = b.pop()), lt = k.symbols_[lt] || lt), lt;
230
- }
231
- for (var G, ut, et, Vt, yt = {}, kt, ct, Zt, Pt; ; ) {
232
- if (ut = L[L.length - 1], this.defaultActions[ut] ? et = this.defaultActions[ut] : ((G === null || typeof G > "u") && (G = me()), et = Et[ut] && Et[ut][G]), typeof et > "u" || !et.length || !et[0]) {
233
- var Ot = "";
234
- Pt = [];
235
- for (kt in Et[ut])
236
- this.terminals_[kt] && kt > Te && Pt.push("'" + this.terminals_[kt] + "'");
237
- Y.showPosition ? Ot = "Parse error on line " + (_t + 1) + `:
238
- ` + Y.showPosition() + `
239
- Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : Ot = "Parse error on line " + (_t + 1) + ": Unexpected " + (G == Jt ? "end of input" : "'" + (this.terminals_[G] || G) + "'"), this.parseError(Ot, {
240
- text: Y.match,
241
- token: this.terminals_[G] || G,
242
- line: Y.yylineno,
243
- loc: Dt,
244
- expected: Pt
245
- });
246
- }
247
- if (et[0] instanceof Array && et.length > 1)
248
- throw new Error("Parse Error: multiple actions possible at state: " + ut + ", token: " + G);
249
- switch (et[0]) {
250
- case 1:
251
- L.push(G), M.push(Y.yytext), h.push(Y.yylloc), L.push(et[1]), G = null, Xt = Y.yyleng, d = Y.yytext, _t = Y.yylineno, Dt = Y.yylloc;
252
- break;
253
- case 2:
254
- if (ct = this.productions_[et[1]][1], yt.$ = M[M.length - ct], yt._$ = {
255
- first_line: h[h.length - (ct || 1)].first_line,
256
- last_line: h[h.length - 1].last_line,
257
- first_column: h[h.length - (ct || 1)].first_column,
258
- last_column: h[h.length - 1].last_column
259
- }, Ee && (yt._$.range = [
260
- h[h.length - (ct || 1)].range[0],
261
- h[h.length - 1].range[1]
262
- ]), Vt = this.performAction.apply(yt, [
263
- d,
264
- Xt,
265
- _t,
266
- pt.yy,
267
- et[1],
268
- M,
269
- h
270
- ].concat(be)), typeof Vt < "u")
271
- return Vt;
272
- ct && (L = L.slice(0, -1 * ct * 2), M = M.slice(0, -1 * ct), h = h.slice(0, -1 * ct)), L.push(this.productions_[et[1]][0]), M.push(yt.$), h.push(yt._$), Zt = Et[L[L.length - 2]][L[L.length - 1]], L.push(Zt);
273
- break;
274
- case 3:
275
- return !0;
276
- }
277
- }
278
- return !0;
279
- }
280
- }, ye = /* @__PURE__ */ (function() {
281
- var dt = {
282
- EOF: 1,
283
- parseError: function(k, L) {
284
- if (this.yy.parser)
285
- this.yy.parser.parseError(k, L);
286
- else
287
- throw new Error(k);
288
- },
289
- // resets the lexer, sets new input
290
- setInput: function(w, k) {
291
- return this.yy = k || this.yy || {}, this._input = w, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
292
- first_line: 1,
293
- first_column: 0,
294
- last_line: 1,
295
- last_column: 0
296
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
297
- },
298
- // consumes and returns one char from the input
299
- input: function() {
300
- var w = this._input[0];
301
- this.yytext += w, this.yyleng++, this.offset++, this.match += w, this.matched += w;
302
- var k = w.match(/(?:\r\n?|\n).*/g);
303
- return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), w;
304
- },
305
- // unshifts one char (or a string) into the input
306
- unput: function(w) {
307
- var k = w.length, L = w.split(/(?:\r\n?|\n)/g);
308
- this._input = w + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - k), this.offset -= k;
309
- var b = this.match.split(/(?:\r\n?|\n)/g);
310
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1);
311
- var M = this.yylloc.range;
312
- return this.yylloc = {
313
- first_line: this.yylloc.first_line,
314
- last_line: this.yylineno + 1,
315
- first_column: this.yylloc.first_column,
316
- last_column: L ? (L.length === b.length ? this.yylloc.first_column : 0) + b[b.length - L.length].length - L[0].length : this.yylloc.first_column - k
317
- }, this.options.ranges && (this.yylloc.range = [M[0], M[0] + this.yyleng - k]), this.yyleng = this.yytext.length, this;
318
- },
319
- // When called from action, caches matched text and appends it on next action
320
- more: function() {
321
- return this._more = !0, this;
322
- },
323
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
324
- reject: function() {
325
- if (this.options.backtrack_lexer)
326
- this._backtrack = !0;
327
- else
328
- 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).
329
- ` + this.showPosition(), {
330
- text: "",
331
- token: null,
332
- line: this.yylineno
333
- });
334
- return this;
335
- },
336
- // retain first n characters of the match
337
- less: function(w) {
338
- this.unput(this.match.slice(w));
339
- },
340
- // displays already matched input, i.e. for error messages
341
- pastInput: function() {
342
- var w = this.matched.substr(0, this.matched.length - this.match.length);
343
- return (w.length > 20 ? "..." : "") + w.substr(-20).replace(/\n/g, "");
344
- },
345
- // displays upcoming input, i.e. for error messages
346
- upcomingInput: function() {
347
- var w = this.match;
348
- return w.length < 20 && (w += this._input.substr(0, 20 - w.length)), (w.substr(0, 20) + (w.length > 20 ? "..." : "")).replace(/\n/g, "");
349
- },
350
- // displays the character position where the lexing error occurred, i.e. for error messages
351
- showPosition: function() {
352
- var w = this.pastInput(), k = new Array(w.length + 1).join("-");
353
- return w + this.upcomingInput() + `
354
- ` + k + "^";
355
- },
356
- // test the lexed token: return FALSE when not a match, otherwise return token
357
- test_match: function(w, k) {
358
- var L, b, M;
359
- if (this.options.backtrack_lexer && (M = {
360
- yylineno: this.yylineno,
361
- yylloc: {
362
- first_line: this.yylloc.first_line,
363
- last_line: this.last_line,
364
- first_column: this.yylloc.first_column,
365
- last_column: this.yylloc.last_column
366
- },
367
- yytext: this.yytext,
368
- match: this.match,
369
- matches: this.matches,
370
- matched: this.matched,
371
- yyleng: this.yyleng,
372
- offset: this.offset,
373
- _more: this._more,
374
- _input: this._input,
375
- yy: this.yy,
376
- conditionStack: this.conditionStack.slice(0),
377
- done: this.done
378
- }, this.options.ranges && (M.yylloc.range = this.yylloc.range.slice(0))), b = w[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = {
379
- first_line: this.yylloc.last_line,
380
- last_line: this.yylineno + 1,
381
- first_column: this.yylloc.last_column,
382
- last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + w[0].length
383
- }, this.yytext += w[0], this.match += w[0], this.matches = w, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(w[0].length), this.matched += w[0], L = this.performAction.call(this, this.yy, this, k, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L)
384
- return L;
385
- if (this._backtrack) {
386
- for (var h in M)
387
- this[h] = M[h];
388
- return !1;
389
- }
390
- return !1;
391
- },
392
- // return next match in input
393
- next: function() {
394
- if (this.done)
395
- return this.EOF;
396
- this._input || (this.done = !0);
397
- var w, k, L, b;
398
- this._more || (this.yytext = "", this.match = "");
399
- for (var M = this._currentRules(), h = 0; h < M.length; h++)
400
- if (L = this._input.match(this.rules[M[h]]), L && (!k || L[0].length > k[0].length)) {
401
- if (k = L, b = h, this.options.backtrack_lexer) {
402
- if (w = this.test_match(L, M[h]), w !== !1)
403
- return w;
404
- if (this._backtrack) {
405
- k = !1;
406
- continue;
407
- } else
408
- return !1;
409
- } else if (!this.options.flex)
410
- break;
411
- }
412
- return k ? (w = this.test_match(k, M[b]), w !== !1 ? w : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
413
- ` + this.showPosition(), {
414
- text: "",
415
- token: null,
416
- line: this.yylineno
417
- });
418
- },
419
- // return next match that has a token
420
- lex: function() {
421
- var k = this.next();
422
- return k || this.lex();
423
- },
424
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
425
- begin: function(k) {
426
- this.conditionStack.push(k);
427
- },
428
- // pop the previously active lexer condition state off the condition stack
429
- popState: function() {
430
- var k = this.conditionStack.length - 1;
431
- return k > 0 ? this.conditionStack.pop() : this.conditionStack[0];
432
- },
433
- // produce the lexer rule set which is active for the currently active lexer condition state
434
- _currentRules: function() {
435
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
436
- },
437
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
438
- topState: function(k) {
439
- return k = this.conditionStack.length - 1 - Math.abs(k || 0), k >= 0 ? this.conditionStack[k] : "INITIAL";
440
- },
441
- // alias for begin(condition)
442
- pushState: function(k) {
443
- this.begin(k);
444
- },
445
- // return the number of states currently on the stack
446
- stateStackSize: function() {
447
- return this.conditionStack.length;
448
- },
449
- options: { "case-insensitive": !0 },
450
- performAction: function(k, L, b, M) {
451
- switch (b) {
452
- case 0:
453
- return 5;
454
- case 1:
455
- break;
456
- case 2:
457
- break;
458
- case 3:
459
- break;
460
- case 4:
461
- break;
462
- case 5:
463
- break;
464
- case 6:
465
- return 19;
466
- case 7:
467
- return this.begin("LINE"), 14;
468
- case 8:
469
- return this.begin("ID"), 50;
470
- case 9:
471
- return this.begin("ID"), 52;
472
- case 10:
473
- return 13;
474
- case 11:
475
- return this.begin("ID"), 53;
476
- case 12:
477
- return L.yytext = L.yytext.trim(), this.begin("ALIAS"), 70;
478
- case 13:
479
- return this.popState(), this.popState(), this.begin("LINE"), 51;
480
- case 14:
481
- return this.popState(), this.popState(), 5;
482
- case 15:
483
- return this.begin("LINE"), 36;
484
- case 16:
485
- return this.begin("LINE"), 37;
486
- case 17:
487
- return this.begin("LINE"), 38;
488
- case 18:
489
- return this.begin("LINE"), 39;
490
- case 19:
491
- return this.begin("LINE"), 49;
492
- case 20:
493
- return this.begin("LINE"), 41;
494
- case 21:
495
- return this.begin("LINE"), 43;
496
- case 22:
497
- return this.begin("LINE"), 48;
498
- case 23:
499
- return this.begin("LINE"), 44;
500
- case 24:
501
- return this.begin("LINE"), 47;
502
- case 25:
503
- return this.begin("LINE"), 46;
504
- case 26:
505
- return this.popState(), 15;
506
- case 27:
507
- return 16;
508
- case 28:
509
- return 65;
510
- case 29:
511
- return 66;
512
- case 30:
513
- return 59;
514
- case 31:
515
- return 60;
516
- case 32:
517
- return 61;
518
- case 33:
519
- return 62;
520
- case 34:
521
- return 57;
522
- case 35:
523
- return 54;
524
- case 36:
525
- return this.begin("ID"), 21;
526
- case 37:
527
- return this.begin("ID"), 23;
528
- case 38:
529
- return 29;
530
- case 39:
531
- return 30;
532
- case 40:
533
- return this.begin("acc_title"), 31;
534
- case 41:
535
- return this.popState(), "acc_title_value";
536
- case 42:
537
- return this.begin("acc_descr"), 33;
538
- case 43:
539
- return this.popState(), "acc_descr_value";
540
- case 44:
541
- this.begin("acc_descr_multiline");
542
- break;
543
- case 45:
544
- this.popState();
545
- break;
546
- case 46:
547
- return "acc_descr_multiline_value";
548
- case 47:
549
- return 6;
550
- case 48:
551
- return 18;
552
- case 49:
553
- return 20;
554
- case 50:
555
- return 64;
556
- case 51:
557
- return 5;
558
- case 52:
559
- return L.yytext = L.yytext.trim(), 70;
560
- case 53:
561
- return 73;
562
- case 54:
563
- return 74;
564
- case 55:
565
- return 71;
566
- case 56:
567
- return 72;
568
- case 57:
569
- return 75;
570
- case 58:
571
- return 76;
572
- case 59:
573
- return 77;
574
- case 60:
575
- return 78;
576
- case 61:
577
- return 79;
578
- case 62:
579
- return 68;
580
- case 63:
581
- return 69;
582
- case 64:
583
- return 5;
584
- case 65:
585
- return "INVALID";
586
- }
587
- },
588
- rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
589
- conditions: { acc_descr_multiline: { rules: [45, 46], inclusive: !1 }, acc_descr: { rules: [43], inclusive: !1 }, acc_title: { rules: [41], inclusive: !1 }, ID: { rules: [2, 3, 12], inclusive: !1 }, ALIAS: { rules: [2, 3, 13, 14], inclusive: !1 }, LINE: { rules: [2, 3, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], inclusive: !0 } }
590
- };
591
- return dt;
592
- })();
593
- Mt.lexer = ye;
594
- function Rt() {
595
- this.yy = {};
596
- }
597
- return Rt.prototype = Mt, Mt.Parser = Rt, new Rt();
598
- })();
599
- Yt.parser = Yt;
600
- const De = Yt;
601
- class Ve {
602
- /**
603
- * @param init - Function that creates the default state.
604
- */
605
- constructor(e) {
606
- this.init = e, this.records = this.init();
607
- }
608
- reset() {
609
- this.records = this.init();
610
- }
611
- }
612
- const E = new Ve(() => ({
613
- prevActor: void 0,
614
- actors: {},
615
- createdActors: {},
616
- destroyedActors: {},
617
- boxes: [],
618
- messages: [],
619
- notes: [],
620
- sequenceNumbersEnabled: !1,
621
- wrapEnabled: void 0,
622
- currentBox: void 0,
623
- lastCreated: void 0,
624
- lastDestroyed: void 0
625
- })), Oe = function(t) {
626
- E.records.boxes.push({
627
- name: t.text,
628
- wrap: t.wrap === void 0 && gt() || !!t.wrap,
629
- fill: t.color,
630
- actorKeys: []
631
- }), E.records.currentBox = E.records.boxes.slice(-1)[0];
632
- }, Ft = function(t, e, o, s) {
633
- let i = E.records.currentBox;
634
- const a = E.records.actors[t];
635
- if (a) {
636
- if (E.records.currentBox && a.box && E.records.currentBox !== a.box)
637
- throw new Error(
638
- "A same participant should only be defined in one Box: " + a.name + " can't be in '" + a.box.name + "' and in '" + E.records.currentBox.name + "' at the same time."
639
- );
640
- if (i = a.box ? a.box : E.records.currentBox, a.box = i, a && e === a.name && o == null)
641
- return;
642
- }
643
- (o == null || o.text == null) && (o = { text: e, wrap: null, type: s }), (s == null || o.text == null) && (o = { text: e, wrap: null, type: s }), E.records.actors[t] = {
644
- box: i,
645
- name: e,
646
- description: o.text,
647
- wrap: o.wrap === void 0 && gt() || !!o.wrap,
648
- prevActor: E.records.prevActor,
649
- links: {},
650
- properties: {},
651
- actorCnt: null,
652
- rectData: null,
653
- type: s || "participant"
654
- }, E.records.prevActor && E.records.actors[E.records.prevActor] && (E.records.actors[E.records.prevActor].nextActor = t), E.records.currentBox && E.records.currentBox.actorKeys.push(t), E.records.prevActor = t;
655
- }, Be = (t) => {
656
- let e, o = 0;
657
- for (e = 0; e < E.records.messages.length; e++)
658
- E.records.messages[e].type === mt.ACTIVE_START && E.records.messages[e].from.actor === t && o++, E.records.messages[e].type === mt.ACTIVE_END && E.records.messages[e].from.actor === t && o--;
659
- return o;
660
- }, Ye = function(t, e, o, s) {
661
- E.records.messages.push({
662
- from: t,
663
- to: e,
664
- message: o.text,
665
- wrap: o.wrap === void 0 && gt() || !!o.wrap,
666
- answer: s
667
- });
668
- }, C = function(t, e, o = { text: void 0, wrap: void 0 }, s, i = !1) {
669
- if (s === mt.ACTIVE_END && Be(t.actor) < 1) {
670
- let c = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
671
- throw c.hash = {
672
- text: "->>-",
673
- token: "->>-",
674
- line: "1",
675
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
676
- expected: ["'ACTIVE_PARTICIPANT'"]
677
- }, c;
678
- }
679
- return E.records.messages.push({
680
- from: t,
681
- to: e,
682
- message: o.text,
683
- wrap: o.wrap === void 0 && gt() || !!o.wrap,
684
- type: s,
685
- activate: i
686
- }), !0;
687
- }, Fe = function() {
688
- return E.records.boxes.length > 0;
689
- }, We = function() {
690
- return E.records.boxes.some((t) => t.name);
691
- }, qe = function() {
692
- return E.records.messages;
693
- }, ze = function() {
694
- return E.records.boxes;
695
- }, He = function() {
696
- return E.records.actors;
697
- }, Ue = function() {
698
- return E.records.createdActors;
699
- }, Ke = function() {
700
- return E.records.destroyedActors;
701
- }, vt = function(t) {
702
- return E.records.actors[t];
703
- }, Ge = function() {
704
- return Object.keys(E.records.actors);
705
- }, Xe = function() {
706
- E.records.sequenceNumbersEnabled = !0;
707
- }, Je = function() {
708
- E.records.sequenceNumbersEnabled = !1;
709
- }, Ze = () => E.records.sequenceNumbersEnabled, Qe = function(t) {
710
- E.records.wrapEnabled = t;
711
- }, gt = () => E.records.wrapEnabled !== void 0 ? E.records.wrapEnabled : st().sequence.wrap, je = function() {
712
- E.reset(), Ae();
713
- }, $e = function(t) {
714
- const e = t.trim(), o = {
715
- text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
716
- wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
717
- };
718
- return X.debug("parseMessage:", o), o;
719
- }, t0 = function(t) {
720
- const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
721
- let o = e != null && e[1] ? e[1].trim() : "transparent", s = e != null && e[2] ? e[2].trim() : void 0;
722
- if (window && window.CSS)
723
- window.CSS.supports("color", o) || (o = "transparent", s = t.trim());
724
- else {
725
- const i = new Option().style;
726
- i.color = o, i.color !== o && (o = "transparent", s = t.trim());
727
- }
728
- return {
729
- color: o,
730
- text: s !== void 0 ? At(s.replace(/^:?(?:no)?wrap:/, ""), st()) : void 0,
731
- wrap: s !== void 0 ? s.match(/^:?wrap:/) !== null ? !0 : s.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
732
- };
733
- }, mt = {
734
- SOLID: 0,
735
- DOTTED: 1,
736
- NOTE: 2,
737
- SOLID_CROSS: 3,
738
- DOTTED_CROSS: 4,
739
- SOLID_OPEN: 5,
740
- DOTTED_OPEN: 6,
741
- LOOP_START: 10,
742
- LOOP_END: 11,
743
- ALT_START: 12,
744
- ALT_ELSE: 13,
745
- ALT_END: 14,
746
- OPT_START: 15,
747
- OPT_END: 16,
748
- ACTIVE_START: 17,
749
- ACTIVE_END: 18,
750
- PAR_START: 19,
751
- PAR_AND: 20,
752
- PAR_END: 21,
753
- RECT_START: 22,
754
- RECT_END: 23,
755
- SOLID_POINT: 24,
756
- DOTTED_POINT: 25,
757
- AUTONUMBER: 26,
758
- CRITICAL_START: 27,
759
- CRITICAL_OPTION: 28,
760
- CRITICAL_END: 29,
761
- BREAK_START: 30,
762
- BREAK_END: 31,
763
- PAR_OVER_START: 32
764
- }, e0 = {
765
- FILLED: 0,
766
- OPEN: 1
767
- }, s0 = {
768
- LEFTOF: 0,
769
- RIGHTOF: 1,
770
- OVER: 2
771
- }, re = function(t, e, o) {
772
- const s = {
773
- actor: t,
774
- placement: e,
775
- message: o.text,
776
- wrap: o.wrap === void 0 && gt() || !!o.wrap
777
- }, i = [].concat(t, t);
778
- E.records.notes.push(s), E.records.messages.push({
779
- from: i[0],
780
- to: i[1],
781
- message: o.text,
782
- wrap: o.wrap === void 0 && gt() || !!o.wrap,
783
- type: mt.NOTE,
784
- placement: e
785
- });
786
- }, ie = function(t, e) {
787
- const o = vt(t);
788
- try {
789
- let s = At(e.text, st());
790
- s = s.replace(/&amp;/g, "&"), s = s.replace(/&equals;/g, "=");
791
- const i = JSON.parse(s);
792
- Ht(o, i);
793
- } catch (s) {
794
- X.error("error while parsing actor link text", s);
795
- }
796
- }, r0 = function(t, e) {
797
- const o = vt(t);
798
- try {
799
- const c = {};
800
- let l = At(e.text, st());
801
- var s = l.indexOf("@");
802
- l = l.replace(/&amp;/g, "&"), l = l.replace(/&equals;/g, "=");
803
- var i = l.slice(0, s - 1).trim(), a = l.slice(s + 1).trim();
804
- c[i] = a, Ht(o, c);
805
- } catch (c) {
806
- X.error("error while parsing actor link text", c);
807
- }
808
- };
809
- function Ht(t, e) {
810
- if (t.links == null)
811
- t.links = e;
812
- else
813
- for (let o in e)
814
- t.links[o] = e[o];
815
- }
816
- const ae = function(t, e) {
817
- const o = vt(t);
818
- try {
819
- let s = At(e.text, st());
820
- const i = JSON.parse(s);
821
- ne(o, i);
822
- } catch (s) {
823
- X.error("error while parsing actor properties text", s);
824
- }
825
- };
826
- function ne(t, e) {
827
- if (t.properties == null)
828
- t.properties = e;
829
- else
830
- for (let o in e)
831
- t.properties[o] = e[o];
832
- }
833
- function i0() {
834
- E.records.currentBox = void 0;
835
- }
836
- const oe = function(t, e) {
837
- const o = vt(t), s = document.getElementById(e.text);
838
- try {
839
- const i = s.innerHTML, a = JSON.parse(i);
840
- a.properties && ne(o, a.properties), a.links && Ht(o, a.links);
841
- } catch (i) {
842
- X.error("error while parsing actor details text", i);
843
- }
844
- }, a0 = function(t, e) {
845
- if (t !== void 0 && t.properties !== void 0)
846
- return t.properties[e];
847
- }, ce = function(t) {
848
- if (Array.isArray(t))
849
- t.forEach(function(e) {
850
- ce(e);
851
- });
852
- else
853
- switch (t.type) {
854
- case "sequenceIndex":
855
- E.records.messages.push({
856
- from: void 0,
857
- to: void 0,
858
- message: {
859
- start: t.sequenceIndex,
860
- step: t.sequenceIndexStep,
861
- visible: t.sequenceVisible
862
- },
863
- wrap: !1,
864
- type: t.signalType
865
- });
866
- break;
867
- case "addParticipant":
868
- Ft(t.actor, t.actor, t.description, t.draw);
869
- break;
870
- case "createParticipant":
871
- if (E.records.actors[t.actor])
872
- throw new Error(
873
- "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"
874
- );
875
- E.records.lastCreated = t.actor, Ft(t.actor, t.actor, t.description, t.draw), E.records.createdActors[t.actor] = E.records.messages.length;
876
- break;
877
- case "destroyParticipant":
878
- E.records.lastDestroyed = t.actor, E.records.destroyedActors[t.actor] = E.records.messages.length;
879
- break;
880
- case "activeStart":
881
- C(t.actor, void 0, void 0, t.signalType);
882
- break;
883
- case "activeEnd":
884
- C(t.actor, void 0, void 0, t.signalType);
885
- break;
886
- case "addNote":
887
- re(t.actor, t.placement, t.text);
888
- break;
889
- case "addLinks":
890
- ie(t.actor, t.text);
891
- break;
892
- case "addALink":
893
- r0(t.actor, t.text);
894
- break;
895
- case "addProperties":
896
- ae(t.actor, t.text);
897
- break;
898
- case "addDetails":
899
- oe(t.actor, t.text);
900
- break;
901
- case "addMessage":
902
- if (E.records.lastCreated) {
903
- if (t.to !== E.records.lastCreated)
904
- throw new Error(
905
- "The created participant " + E.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram."
906
- );
907
- E.records.lastCreated = void 0;
908
- } else if (E.records.lastDestroyed) {
909
- if (t.to !== E.records.lastDestroyed && t.from !== E.records.lastDestroyed)
910
- throw new Error(
911
- "The destroyed participant " + E.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
912
- );
913
- E.records.lastDestroyed = void 0;
914
- }
915
- C(t.from, t.to, t.msg, t.signalType, t.activate);
916
- break;
917
- case "boxStart":
918
- Oe(t.boxData);
919
- break;
920
- case "boxEnd":
921
- i0();
922
- break;
923
- case "loopStart":
924
- C(void 0, void 0, t.loopText, t.signalType);
925
- break;
926
- case "loopEnd":
927
- C(void 0, void 0, void 0, t.signalType);
928
- break;
929
- case "rectStart":
930
- C(void 0, void 0, t.color, t.signalType);
931
- break;
932
- case "rectEnd":
933
- C(void 0, void 0, void 0, t.signalType);
934
- break;
935
- case "optStart":
936
- C(void 0, void 0, t.optText, t.signalType);
937
- break;
938
- case "optEnd":
939
- C(void 0, void 0, void 0, t.signalType);
940
- break;
941
- case "altStart":
942
- C(void 0, void 0, t.altText, t.signalType);
943
- break;
944
- case "else":
945
- C(void 0, void 0, t.altText, t.signalType);
946
- break;
947
- case "altEnd":
948
- C(void 0, void 0, void 0, t.signalType);
949
- break;
950
- case "setAccTitle":
951
- $t(t.text);
952
- break;
953
- case "parStart":
954
- C(void 0, void 0, t.parText, t.signalType);
955
- break;
956
- case "and":
957
- C(void 0, void 0, t.parText, t.signalType);
958
- break;
959
- case "parEnd":
960
- C(void 0, void 0, void 0, t.signalType);
961
- break;
962
- case "criticalStart":
963
- C(void 0, void 0, t.criticalText, t.signalType);
964
- break;
965
- case "option":
966
- C(void 0, void 0, t.optionText, t.signalType);
967
- break;
968
- case "criticalEnd":
969
- C(void 0, void 0, void 0, t.signalType);
970
- break;
971
- case "breakStart":
972
- C(void 0, void 0, t.breakText, t.signalType);
973
- break;
974
- case "breakEnd":
975
- C(void 0, void 0, void 0, t.signalType);
976
- break;
977
- }
978
- }, Qt = {
979
- addActor: Ft,
980
- addMessage: Ye,
981
- addSignal: C,
982
- addLinks: ie,
983
- addDetails: oe,
984
- addProperties: ae,
985
- autoWrap: gt,
986
- setWrap: Qe,
987
- enableSequenceNumbers: Xe,
988
- disableSequenceNumbers: Je,
989
- showSequenceNumbers: Ze,
990
- getMessages: qe,
991
- getActors: He,
992
- getCreatedActors: Ue,
993
- getDestroyedActors: Ke,
994
- getActor: vt,
995
- getActorKeys: Ge,
996
- getActorProperty: a0,
997
- getAccTitle: Pe,
998
- getBoxes: ze,
999
- getDiagramTitle: ke,
1000
- setDiagramTitle: _e,
1001
- getConfig: () => st().sequence,
1002
- clear: je,
1003
- parseMessage: $e,
1004
- parseBoxData: t0,
1005
- LINETYPE: mt,
1006
- ARROWTYPE: e0,
1007
- PLACEMENT: s0,
1008
- addNote: re,
1009
- setAccTitle: $t,
1010
- apply: ce,
1011
- setAccDescription: ve,
1012
- getAccDescription: we,
1013
- hasAtLeastOneBox: Fe,
1014
- hasAtLeastOneBoxWithTitle: We
1015
- }, n0 = (t) => `.actor {
1016
- stroke: ${t.actorBorder};
1017
- fill: ${t.actorBkg};
1018
- }
1019
-
1020
- text.actor > tspan {
1021
- fill: ${t.actorTextColor};
1022
- stroke: none;
1023
- }
1024
-
1025
- .actor-line {
1026
- stroke: ${t.actorLineColor};
1027
- }
1028
-
1029
- .messageLine0 {
1030
- stroke-width: 1.5;
1031
- stroke-dasharray: none;
1032
- stroke: ${t.signalColor};
1033
- }
1034
-
1035
- .messageLine1 {
1036
- stroke-width: 1.5;
1037
- stroke-dasharray: 2, 2;
1038
- stroke: ${t.signalColor};
1039
- }
1040
-
1041
- #arrowhead path {
1042
- fill: ${t.signalColor};
1043
- stroke: ${t.signalColor};
1044
- }
1045
-
1046
- .sequenceNumber {
1047
- fill: ${t.sequenceNumberColor};
1048
- }
1049
-
1050
- #sequencenumber {
1051
- fill: ${t.signalColor};
1052
- }
1053
-
1054
- #crosshead path {
1055
- fill: ${t.signalColor};
1056
- stroke: ${t.signalColor};
1057
- }
1058
-
1059
- .messageText {
1060
- fill: ${t.signalTextColor};
1061
- stroke: none;
1062
- }
1063
-
1064
- .labelBox {
1065
- stroke: ${t.labelBoxBorderColor};
1066
- fill: ${t.labelBoxBkgColor};
1067
- }
1068
-
1069
- .labelText, .labelText > tspan {
1070
- fill: ${t.labelTextColor};
1071
- stroke: none;
1072
- }
1073
-
1074
- .loopText, .loopText > tspan {
1075
- fill: ${t.loopTextColor};
1076
- stroke: none;
1077
- }
1078
-
1079
- .loopLine {
1080
- stroke-width: 2px;
1081
- stroke-dasharray: 2, 2;
1082
- stroke: ${t.labelBoxBorderColor};
1083
- fill: ${t.labelBoxBorderColor};
1084
- }
1085
-
1086
- .note {
1087
- //stroke: #decc93;
1088
- stroke: ${t.noteBorderColor};
1089
- fill: ${t.noteBkgColor};
1090
- }
1091
-
1092
- .noteText, .noteText > tspan {
1093
- fill: ${t.noteTextColor};
1094
- stroke: none;
1095
- }
1096
-
1097
- .activation0 {
1098
- fill: ${t.activationBkgColor};
1099
- stroke: ${t.activationBorderColor};
1100
- }
1101
-
1102
- .activation1 {
1103
- fill: ${t.activationBkgColor};
1104
- stroke: ${t.activationBorderColor};
1105
- }
1106
-
1107
- .activation2 {
1108
- fill: ${t.activationBkgColor};
1109
- stroke: ${t.activationBorderColor};
1110
- }
1111
-
1112
- .actorPopupMenu {
1113
- position: absolute;
1114
- }
1115
-
1116
- .actorPopupMenuPanel {
1117
- position: absolute;
1118
- fill: ${t.actorBkg};
1119
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
1120
- filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
1121
- }
1122
- .actor-man line {
1123
- stroke: ${t.actorBorder};
1124
- fill: ${t.actorBkg};
1125
- }
1126
- .actor-man circle, line {
1127
- stroke: ${t.actorBorder};
1128
- fill: ${t.actorBkg};
1129
- stroke-width: 2px;
1130
- }
1131
- `, o0 = n0, ft = 36, le = "actor-top", he = "actor-bottom", Ut = function(t, e) {
1132
- return Me(t, e);
1133
- }, c0 = function(t, e, o, s, i) {
1134
- if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
1135
- return { height: 0, width: 0 };
1136
- const a = e.links, c = e.actorCnt, l = e.rectData;
1137
- var p = "none";
1138
- i && (p = "block !important");
1139
- const r = t.append("g");
1140
- r.attr("id", "actor" + c + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display", p);
1141
- var x = "";
1142
- l.class !== void 0 && (x = " " + l.class);
1143
- let T = l.width > o ? l.width : o;
1144
- const u = r.append("rect");
1145
- if (u.attr("class", "actorPopupMenuPanel" + x), u.attr("x", l.x), u.attr("y", l.height), u.attr("fill", l.fill), u.attr("stroke", l.stroke), u.attr("width", T), u.attr("height", l.height), u.attr("rx", l.rx), u.attr("ry", l.ry), a != null) {
1146
- var g = 20;
1147
- for (let I in a) {
1148
- var m = r.append("a"), _ = se.sanitizeUrl(a[I]);
1149
- m.attr("xlink:href", _), m.attr("target", "_blank"), k0(s)(
1150
- I,
1151
- m,
1152
- l.x + 10,
1153
- l.height + g,
1154
- T,
1155
- 20,
1156
- { class: "actor" },
1157
- s
1158
- ), g += 30;
1159
- }
1160
- }
1161
- return u.attr("height", g), { height: l.height + g, width: T };
1162
- }, l0 = function(t) {
1163
- return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
1164
- }, It = async function(t, e, o = null) {
1165
- let s = t.append("foreignObject");
1166
- const i = await ee(e.text, Bt()), c = s.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
1167
- if (s.attr("height", Math.round(c.height)).attr("width", Math.round(c.width)), e.class === "noteText") {
1168
- const l = t.node().firstChild;
1169
- l.setAttribute("height", c.height + 2 * e.textMargin);
1170
- const p = l.getBBox();
1171
- s.attr("x", Math.round(p.x + p.width / 2 - c.width / 2)).attr("y", Math.round(p.y + p.height / 2 - c.height / 2));
1172
- } else if (o) {
1173
- let { startx: l, stopx: p, starty: r } = o;
1174
- if (l > p) {
1175
- const x = l;
1176
- l = p, p = x;
1177
- }
1178
- s.attr("x", Math.round(l + Math.abs(l - p) / 2 - c.width / 2)), e.class === "loopText" ? s.attr("y", Math.round(r)) : s.attr("y", Math.round(r - c.height));
1179
- }
1180
- return [s];
1181
- }, bt = function(t, e) {
1182
- let o = 0, s = 0;
1183
- const i = e.text.split(v.lineBreakRegex), [a, c] = te(e.fontSize);
1184
- let l = [], p = 0, r = () => e.y;
1185
- if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
1186
- switch (e.valign) {
1187
- case "top":
1188
- case "start":
1189
- r = () => Math.round(e.y + e.textMargin);
1190
- break;
1191
- case "middle":
1192
- case "center":
1193
- r = () => Math.round(e.y + (o + s + e.textMargin) / 2);
1194
- break;
1195
- case "bottom":
1196
- case "end":
1197
- r = () => Math.round(
1198
- e.y + (o + s + 2 * e.textMargin) - e.textMargin
1199
- );
1200
- break;
1201
- }
1202
- if (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0)
1203
- switch (e.anchor) {
1204
- case "left":
1205
- case "start":
1206
- e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
1207
- break;
1208
- case "middle":
1209
- case "center":
1210
- e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
1211
- break;
1212
- case "right":
1213
- case "end":
1214
- e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
1215
- break;
1216
- }
1217
- for (let [x, T] of i.entries()) {
1218
- e.textMargin !== void 0 && e.textMargin === 0 && a !== void 0 && (p = x * a);
1219
- const u = t.append("text");
1220
- u.attr("x", e.x), u.attr("y", r()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), c !== void 0 && u.style("font-size", c), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) : p !== 0 && u.attr("dy", p);
1221
- const g = T || Ne;
1222
- if (e.tspan) {
1223
- const m = u.append("tspan");
1224
- m.attr("x", e.x), e.fill !== void 0 && m.attr("fill", e.fill), m.text(g);
1225
- } else
1226
- u.text(g);
1227
- e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (s += (u._groups || u)[0][0].getBBox().height, o = s), l.push(u);
1228
- }
1229
- return l;
1230
- }, de = function(t, e) {
1231
- function o(i, a, c, l, p) {
1232
- return i + "," + a + " " + (i + c) + "," + a + " " + (i + c) + "," + (a + l - p) + " " + (i + c - p * 1.2) + "," + (a + l) + " " + i + "," + (a + l);
1233
- }
1234
- const s = t.append("polygon");
1235
- return s.attr("points", o(e.x, e.y, e.width, e.height, 7)), s.attr("class", "labelBox"), e.y = e.y + e.height / 2, bt(t, e), s;
1236
- };
1237
- let at = -1;
1238
- const pe = (t, e, o, s) => {
1239
- t.select && o.forEach((i) => {
1240
- const a = e[i], c = t.select("#actor" + a.actorCnt);
1241
- !s.mirrorActors && a.stopy ? c.attr("y2", a.stopy + a.height / 2) : s.mirrorActors && c.attr("y2", a.stopy);
1242
- });
1243
- }, h0 = async function(t, e, o, s) {
1244
- const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, c = i + 5, l = t.append("g").lower();
1245
- var p = l;
1246
- s || (at++, Object.keys(e.links || {}).length && !o.forceMenus && p.attr("onclick", l0(`actor${at}_popup`)).attr("cursor", "pointer"), p.append("line").attr("id", "actor" + at).attr("x1", a).attr("y1", c).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), p = l.append("g"), e.actorCnt = at, e.links != null && p.attr("id", "root-" + at));
1247
- const r = Nt();
1248
- var x = "actor";
1249
- e.properties != null && e.properties.class ? x = e.properties.class : r.fill = "#eaeaea", s ? x += ` ${he}` : x += ` ${le}`, r.x = e.x, r.y = i, r.width = e.width, r.height = e.height, r.class = x, r.rx = 3, r.ry = 3, r.name = e.name;
1250
- const T = Ut(p, r);
1251
- if (e.rectData = r, e.properties != null && e.properties.icon) {
1252
- const g = e.properties.icon.trim();
1253
- g.charAt(0) === "@" ? Re(p, r.x + r.width - 20, r.y + 10, g.substr(1)) : Ce(p, r.x + r.width - 20, r.y + 10, g);
1254
- }
1255
- await Kt(o, nt(e.description))(
1256
- e.description,
1257
- p,
1258
- r.x,
1259
- r.y,
1260
- r.width,
1261
- r.height,
1262
- { class: "actor" },
1263
- o
1264
- );
1265
- let u = e.height;
1266
- if (T.node) {
1267
- const g = T.node().getBBox();
1268
- e.height = g.height, u = g.height;
1269
- }
1270
- return u;
1271
- }, d0 = async function(t, e, o, s) {
1272
- const i = s ? e.stopy : e.starty, a = e.x + e.width / 2, c = i + 80;
1273
- t.lower(), s || (at++, t.append("line").attr("id", "actor" + at).attr("x1", a).attr("y1", c).attr("x2", a).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), e.actorCnt = at);
1274
- const l = t.append("g");
1275
- let p = "actor-man";
1276
- s ? p += ` ${he}` : p += ` ${le}`, l.attr("class", p), l.attr("name", e.name);
1277
- const r = Nt();
1278
- r.x = e.x, r.y = i, r.fill = "#eaeaea", r.width = e.width, r.height = e.height, r.class = "actor", r.rx = 3, r.ry = 3, l.append("line").attr("id", "actor-man-torso" + at).attr("x1", a).attr("y1", i + 25).attr("x2", a).attr("y2", i + 45), l.append("line").attr("id", "actor-man-arms" + at).attr("x1", a - ft / 2).attr("y1", i + 33).attr("x2", a + ft / 2).attr("y2", i + 33), l.append("line").attr("x1", a - ft / 2).attr("y1", i + 60).attr("x2", a).attr("y2", i + 45), l.append("line").attr("x1", a).attr("y1", i + 45).attr("x2", a + ft / 2 - 2).attr("y2", i + 60);
1279
- const x = l.append("circle");
1280
- x.attr("cx", e.x + e.width / 2), x.attr("cy", i + 10), x.attr("r", 15), x.attr("width", e.width), x.attr("height", e.height);
1281
- const T = l.node().getBBox();
1282
- return e.height = T.height, await Kt(o, nt(e.description))(
1283
- e.description,
1284
- l,
1285
- r.x,
1286
- r.y + 35,
1287
- r.width,
1288
- r.height,
1289
- { class: "actor" },
1290
- o
1291
- ), e.height;
1292
- }, p0 = async function(t, e, o, s) {
1293
- switch (e.type) {
1294
- case "actor":
1295
- return await d0(t, e, o, s);
1296
- case "participant":
1297
- return await h0(t, e, o, s);
1298
- }
1299
- }, u0 = async function(t, e, o) {
1300
- const i = t.append("g");
1301
- ue(i, e), e.name && await Kt(o)(
1302
- e.name,
1303
- i,
1304
- e.x,
1305
- e.y + (e.textMaxHeight || 0) / 2,
1306
- e.width,
1307
- 0,
1308
- { class: "text" },
1309
- o
1310
- ), i.lower();
1311
- }, f0 = function(t) {
1312
- return t.append("g");
1313
- }, g0 = function(t, e, o, s, i) {
1314
- const a = Nt(), c = e.anchored;
1315
- a.x = e.startx, a.y = e.starty, a.class = "activation" + i % 3, a.width = e.stopx - e.startx, a.height = o - e.starty, Ut(c, a);
1316
- }, x0 = async function(t, e, o, s) {
1317
- const {
1318
- boxMargin: i,
1319
- boxTextMargin: a,
1320
- labelBoxHeight: c,
1321
- labelBoxWidth: l,
1322
- messageFontFamily: p,
1323
- messageFontSize: r,
1324
- messageFontWeight: x
1325
- } = s, T = t.append("g"), u = function(_, I, V, S) {
1326
- return T.append("line").attr("x1", _).attr("y1", I).attr("x2", V).attr("y2", S).attr("class", "loopLine");
1327
- };
1328
- u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(_) {
1329
- u(e.startx, _.y, e.stopx, _.y).style(
1330
- "stroke-dasharray",
1331
- "3, 3"
1332
- );
1333
- });
1334
- let g = zt();
1335
- g.text = o, g.x = e.startx, g.y = e.starty, g.fontFamily = p, g.fontSize = r, g.fontWeight = x, g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.width = l || 50, g.height = c || 20, g.textMargin = a, g.class = "labelText", de(T, g), g = fe(), g.text = e.title, g.x = e.startx + l / 2 + (e.stopx - e.startx) / 2, g.y = e.starty + i + a, g.anchor = "middle", g.valign = "middle", g.textMargin = a, g.class = "loopText", g.fontFamily = p, g.fontSize = r, g.fontWeight = x, g.wrap = !0;
1336
- let m = nt(g.text) ? await It(T, g, e) : bt(T, g);
1337
- if (e.sectionTitles !== void 0) {
1338
- for (const [_, I] of Object.entries(e.sectionTitles))
1339
- if (I.message) {
1340
- g.text = I.message, g.x = e.startx + (e.stopx - e.startx) / 2, g.y = e.sections[_].y + i + a, g.class = "loopText", g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.fontFamily = p, g.fontSize = r, g.fontWeight = x, g.wrap = e.wrap, nt(g.text) ? (e.starty = e.sections[_].y, await It(T, g, e)) : bt(T, g);
1341
- let V = Math.round(
1342
- m.map((S) => (S._groups || S)[0][0].getBBox().height).reduce((S, O) => S + O)
1343
- );
1344
- e.sections[_].height += V - (i + a);
1345
- }
1346
- }
1347
- return e.height = Math.round(e.stopy - e.starty), T;
1348
- }, ue = function(t, e) {
1349
- Se(t, e);
1350
- }, y0 = function(t) {
1351
- t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1352
- "d",
1353
- "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"
1354
- );
1355
- }, T0 = function(t) {
1356
- t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1357
- "d",
1358
- "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"
1359
- );
1360
- }, b0 = function(t) {
1361
- t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1362
- "d",
1363
- "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"
1364
- );
1365
- }, E0 = function(t) {
1366
- t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
1367
- }, m0 = function(t) {
1368
- t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1369
- }, w0 = function(t) {
1370
- t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
1371
- }, v0 = function(t) {
1372
- t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
1373
- }, fe = function() {
1374
- return {
1375
- x: 0,
1376
- y: 0,
1377
- fill: void 0,
1378
- anchor: void 0,
1379
- style: "#666",
1380
- width: void 0,
1381
- height: void 0,
1382
- textMargin: 0,
1383
- rx: 0,
1384
- ry: 0,
1385
- tspan: !0,
1386
- valign: void 0
1387
- };
1388
- }, _0 = function() {
1389
- return {
1390
- x: 0,
1391
- y: 0,
1392
- fill: "#EDF2AE",
1393
- stroke: "#666",
1394
- width: 100,
1395
- anchor: "start",
1396
- height: 100,
1397
- rx: 0,
1398
- ry: 0
1399
- };
1400
- }, Kt = /* @__PURE__ */ (function() {
1401
- function t(a, c, l, p, r, x, T) {
1402
- const u = c.append("text").attr("x", l + r / 2).attr("y", p + x / 2 + 5).style("text-anchor", "middle").text(a);
1403
- i(u, T);
1404
- }
1405
- function e(a, c, l, p, r, x, T, u) {
1406
- const { actorFontSize: g, actorFontFamily: m, actorFontWeight: _ } = u, [I, V] = te(g), S = a.split(v.lineBreakRegex);
1407
- for (let O = 0; O < S.length; O++) {
1408
- const R = O * I - I * (S.length - 1) / 2, q = c.append("text").attr("x", l + r / 2).attr("y", p).style("text-anchor", "middle").style("font-size", V).style("font-weight", _).style("font-family", m);
1409
- q.append("tspan").attr("x", l + r / 2).attr("dy", R).text(S[O]), q.attr("y", p + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(q, T);
1410
- }
1411
- }
1412
- function o(a, c, l, p, r, x, T, u) {
1413
- const g = c.append("switch"), _ = g.append("foreignObject").attr("x", l).attr("y", p).attr("width", r).attr("height", x).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1414
- _.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(a), e(a, g, l, p, r, x, T, u), i(_, T);
1415
- }
1416
- async function s(a, c, l, p, r, x, T, u) {
1417
- const g = await wt(a, Bt()), m = c.append("switch"), I = m.append("foreignObject").attr("x", l + r / 2 - g.width / 2).attr("y", p + x / 2 - g.height / 2).attr("width", g.width).attr("height", g.height).append("xhtml:div").style("height", "100%").style("width", "100%");
1418
- I.append("div").style("text-align", "center").style("vertical-align", "middle").html(await ee(a, Bt())), e(a, m, l, p, r, x, T, u), i(I, T);
1419
- }
1420
- function i(a, c) {
1421
- for (const l in c)
1422
- c.hasOwnProperty(l) && a.attr(l, c[l]);
1423
- }
1424
- return function(a, c = !1) {
1425
- return c ? s : a.textPlacement === "fo" ? o : a.textPlacement === "old" ? t : e;
1426
- };
1427
- })(), k0 = /* @__PURE__ */ (function() {
1428
- function t(i, a, c, l, p, r, x) {
1429
- const T = a.append("text").attr("x", c).attr("y", l).style("text-anchor", "start").text(i);
1430
- s(T, x);
1431
- }
1432
- function e(i, a, c, l, p, r, x, T) {
1433
- const { actorFontSize: u, actorFontFamily: g, actorFontWeight: m } = T, _ = i.split(v.lineBreakRegex);
1434
- for (let I = 0; I < _.length; I++) {
1435
- const V = I * u - u * (_.length - 1) / 2, S = a.append("text").attr("x", c).attr("y", l).style("text-anchor", "start").style("font-size", u).style("font-weight", m).style("font-family", g);
1436
- S.append("tspan").attr("x", c).attr("dy", V).text(_[I]), S.attr("y", l + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(S, x);
1437
- }
1438
- }
1439
- function o(i, a, c, l, p, r, x, T) {
1440
- const u = a.append("switch"), m = u.append("foreignObject").attr("x", c).attr("y", l).attr("width", p).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1441
- m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, u, c, l, p, r, x, T), s(m, x);
1442
- }
1443
- function s(i, a) {
1444
- for (const c in a)
1445
- a.hasOwnProperty(c) && i.attr(c, a[c]);
1446
- }
1447
- return function(i) {
1448
- return i.textPlacement === "fo" ? o : i.textPlacement === "old" ? t : e;
1449
- };
1450
- })(), D = {
1451
- drawRect: Ut,
1452
- drawText: bt,
1453
- drawLabel: de,
1454
- drawActor: p0,
1455
- drawBox: u0,
1456
- drawPopup: c0,
1457
- anchorElement: f0,
1458
- drawActivation: g0,
1459
- drawLoop: x0,
1460
- drawBackgroundRect: ue,
1461
- insertArrowHead: E0,
1462
- insertArrowFilledHead: m0,
1463
- insertSequenceNumber: w0,
1464
- insertArrowCrossHead: v0,
1465
- insertDatabaseIcon: y0,
1466
- insertComputerIcon: T0,
1467
- insertClockIcon: b0,
1468
- getTextObj: fe,
1469
- getNoteRect: _0,
1470
- fixLifeLineHeights: pe,
1471
- sanitizeUrl: se.sanitizeUrl
1472
- };
1473
- let n = {};
1474
- const f = {
1475
- data: {
1476
- startx: void 0,
1477
- stopx: void 0,
1478
- starty: void 0,
1479
- stopy: void 0
1480
- },
1481
- verticalPos: 0,
1482
- sequenceItems: [],
1483
- activations: [],
1484
- models: {
1485
- getHeight: function() {
1486
- return Math.max.apply(
1487
- null,
1488
- this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
1489
- ) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e));
1490
- },
1491
- clear: function() {
1492
- this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
1493
- },
1494
- addBox: function(t) {
1495
- this.boxes.push(t);
1496
- },
1497
- addActor: function(t) {
1498
- this.actors.push(t);
1499
- },
1500
- addLoop: function(t) {
1501
- this.loops.push(t);
1502
- },
1503
- addMessage: function(t) {
1504
- this.messages.push(t);
1505
- },
1506
- addNote: function(t) {
1507
- this.notes.push(t);
1508
- },
1509
- lastActor: function() {
1510
- return this.actors[this.actors.length - 1];
1511
- },
1512
- lastLoop: function() {
1513
- return this.loops[this.loops.length - 1];
1514
- },
1515
- lastMessage: function() {
1516
- return this.messages[this.messages.length - 1];
1517
- },
1518
- lastNote: function() {
1519
- return this.notes[this.notes.length - 1];
1520
- },
1521
- actors: [],
1522
- boxes: [],
1523
- loops: [],
1524
- messages: [],
1525
- notes: []
1526
- },
1527
- init: function() {
1528
- this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
1529
- startx: void 0,
1530
- stopx: void 0,
1531
- starty: void 0,
1532
- stopy: void 0
1533
- }, this.verticalPos = 0, xe(st());
1534
- },
1535
- updateVal: function(t, e, o, s) {
1536
- t[e] === void 0 ? t[e] = o : t[e] = s(o, t[e]);
1537
- },
1538
- updateBounds: function(t, e, o, s) {
1539
- const i = this;
1540
- let a = 0;
1541
- function c(l) {
1542
- return function(r) {
1543
- a++;
1544
- const x = i.sequenceItems.length - a + 1;
1545
- i.updateVal(r, "starty", e - x * n.boxMargin, Math.min), i.updateVal(r, "stopy", s + x * n.boxMargin, Math.max), i.updateVal(f.data, "startx", t - x * n.boxMargin, Math.min), i.updateVal(f.data, "stopx", o + x * n.boxMargin, Math.max), l !== "activation" && (i.updateVal(r, "startx", t - x * n.boxMargin, Math.min), i.updateVal(r, "stopx", o + x * n.boxMargin, Math.max), i.updateVal(f.data, "starty", e - x * n.boxMargin, Math.min), i.updateVal(f.data, "stopy", s + x * n.boxMargin, Math.max));
1546
- };
1547
- }
1548
- this.sequenceItems.forEach(c()), this.activations.forEach(c("activation"));
1549
- },
1550
- insert: function(t, e, o, s) {
1551
- const i = v.getMin(t, o), a = v.getMax(t, o), c = v.getMin(e, s), l = v.getMax(e, s);
1552
- this.updateVal(f.data, "startx", i, Math.min), this.updateVal(f.data, "starty", c, Math.min), this.updateVal(f.data, "stopx", a, Math.max), this.updateVal(f.data, "stopy", l, Math.max), this.updateBounds(i, c, a, l);
1553
- },
1554
- newActivation: function(t, e, o) {
1555
- const s = o[t.from.actor], i = St(t.from.actor).length || 0, a = s.x + s.width / 2 + (i - 1) * n.activationWidth / 2;
1556
- this.activations.push({
1557
- startx: a,
1558
- starty: this.verticalPos + 2,
1559
- stopx: a + n.activationWidth,
1560
- stopy: void 0,
1561
- actor: t.from.actor,
1562
- anchored: D.anchorElement(e)
1563
- });
1564
- },
1565
- endActivation: function(t) {
1566
- const e = this.activations.map(function(o) {
1567
- return o.actor;
1568
- }).lastIndexOf(t.from.actor);
1569
- return this.activations.splice(e, 1)[0];
1570
- },
1571
- createLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
1572
- return {
1573
- startx: void 0,
1574
- starty: this.verticalPos,
1575
- stopx: void 0,
1576
- stopy: void 0,
1577
- title: t.message,
1578
- wrap: t.wrap,
1579
- width: t.width,
1580
- height: 0,
1581
- fill: e
1582
- };
1583
- },
1584
- newLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
1585
- this.sequenceItems.push(this.createLoop(t, e));
1586
- },
1587
- endLoop: function() {
1588
- return this.sequenceItems.pop();
1589
- },
1590
- isLoopOverlap: function() {
1591
- return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
1592
- },
1593
- addSectionToLoop: function(t) {
1594
- const e = this.sequenceItems.pop();
1595
- e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: f.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
1596
- },
1597
- saveVerticalPos: function() {
1598
- this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
1599
- },
1600
- resetVerticalPos: function() {
1601
- this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
1602
- },
1603
- bumpVerticalPos: function(t) {
1604
- this.verticalPos = this.verticalPos + t, this.data.stopy = v.getMax(this.data.stopy, this.verticalPos);
1605
- },
1606
- getVerticalPos: function() {
1607
- return this.verticalPos;
1608
- },
1609
- getBounds: function() {
1610
- return { bounds: this.data, models: this.models };
1611
- }
1612
- }, P0 = async function(t, e) {
1613
- f.bumpVerticalPos(n.boxMargin), e.height = n.boxMargin, e.starty = f.getVerticalPos();
1614
- const o = Nt();
1615
- o.x = e.startx, o.y = e.starty, o.width = e.width || n.width, o.class = "note";
1616
- const s = t.append("g"), i = D.drawRect(s, o), a = zt();
1617
- a.x = e.startx, a.y = e.starty, a.width = o.width, a.dy = "1em", a.text = e.message, a.class = "noteText", a.fontFamily = n.noteFontFamily, a.fontSize = n.noteFontSize, a.fontWeight = n.noteFontWeight, a.anchor = n.noteAlign, a.textMargin = n.noteMargin, a.valign = "center";
1618
- const c = nt(a.text) ? await It(s, a) : bt(s, a), l = Math.round(
1619
- c.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, r) => p + r)
1620
- );
1621
- i.attr("height", l + 2 * n.noteMargin), e.height += l + 2 * n.noteMargin, f.bumpVerticalPos(l + 2 * n.noteMargin), e.stopy = e.starty + l + 2 * n.noteMargin, e.stopx = e.startx + o.width, f.insert(e.startx, e.starty, e.stopx, e.stopy), f.models.addNote(e);
1622
- }, xt = (t) => ({
1623
- fontFamily: t.messageFontFamily,
1624
- fontSize: t.messageFontSize,
1625
- fontWeight: t.messageFontWeight
1626
- }), Tt = (t) => ({
1627
- fontFamily: t.noteFontFamily,
1628
- fontSize: t.noteFontSize,
1629
- fontWeight: t.noteFontWeight
1630
- }), Wt = (t) => ({
1631
- fontFamily: t.actorFontFamily,
1632
- fontSize: t.actorFontSize,
1633
- fontWeight: t.actorFontWeight
1634
- });
1635
- async function L0(t, e) {
1636
- f.bumpVerticalPos(10);
1637
- const { startx: o, stopx: s, message: i } = e, a = v.splitBreaks(i).length, c = nt(i), l = c ? await wt(i, st()) : B.calculateTextDimensions(i, xt(n));
1638
- if (!c) {
1639
- const T = l.height / a;
1640
- e.height += T, f.bumpVerticalPos(T);
1641
- }
1642
- let p, r = l.height - 10;
1643
- const x = l.width;
1644
- if (o === s) {
1645
- p = f.getVerticalPos() + r, n.rightAngles || (r += n.boxMargin, p = f.getVerticalPos() + r), r += 30;
1646
- const T = v.getMax(x / 2, n.width / 2);
1647
- f.insert(
1648
- o - T,
1649
- f.getVerticalPos() - 10 + r,
1650
- s + T,
1651
- f.getVerticalPos() + 30 + r
1652
- );
1653
- } else
1654
- r += n.boxMargin, p = f.getVerticalPos() + r, f.insert(o, p - 10, s, p);
1655
- return f.bumpVerticalPos(r), e.height += r, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
1656
- }
1657
- const I0 = async function(t, e, o, s) {
1658
- const { startx: i, stopx: a, starty: c, message: l, type: p, sequenceIndex: r, sequenceVisible: x } = e, T = B.calculateTextDimensions(l, xt(n)), u = zt();
1659
- u.x = i, u.y = c + 10, u.width = a - i, u.class = "messageText", u.dy = "1em", u.text = l, u.fontFamily = n.messageFontFamily, u.fontSize = n.messageFontSize, u.fontWeight = n.messageFontWeight, u.anchor = n.messageAlign, u.valign = "center", u.textMargin = n.wrapPadding, u.tspan = !1, nt(u.text) ? await It(t, u, { startx: i, stopx: a, starty: o }) : bt(t, u);
1660
- const g = T.width;
1661
- let m;
1662
- i === a ? n.rightAngles ? m = t.append("path").attr(
1663
- "d",
1664
- `M ${i},${o} H ${i + v.getMax(n.width / 2, g / 2)} V ${o + 25} H ${i}`
1665
- ) : m = t.append("path").attr(
1666
- "d",
1667
- "M " + i + "," + o + " C " + (i + 60) + "," + (o - 10) + " " + (i + 60) + "," + (o + 30) + " " + i + "," + (o + 20)
1668
- ) : (m = t.append("line"), m.attr("x1", i), m.attr("y1", o), m.attr("x2", a), m.attr("y2", o)), p === s.db.LINETYPE.DOTTED || p === s.db.LINETYPE.DOTTED_CROSS || p === s.db.LINETYPE.DOTTED_POINT || p === s.db.LINETYPE.DOTTED_OPEN ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
1669
- let _ = "";
1670
- n.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (p === s.db.LINETYPE.SOLID || p === s.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + _ + "#arrowhead)"), (p === s.db.LINETYPE.SOLID_POINT || p === s.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + _ + "#filled-head)"), (p === s.db.LINETYPE.SOLID_CROSS || p === s.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + _ + "#crosshead)"), (x || n.showSequenceNumbers) && (m.attr("marker-start", "url(" + _ + "#sequencenumber)"), t.append("text").attr("x", i).attr("y", o + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(r));
1671
- }, A0 = async function(t, e, o, s, i, a, c) {
1672
- let l = 0, p = 0, r, x = 0;
1673
- for (const T of s) {
1674
- const u = e[T], g = u.box;
1675
- r && r != g && (f.models.addBox(r), p += n.boxMargin + r.margin), g && g != r && (g.x = l + p, g.y = i, p += g.margin), u.width = u.width || n.width, u.height = v.getMax(u.height || n.height, n.height), u.margin = u.margin || n.actorMargin, x = v.getMax(x, u.height), o[u.name] && (p += u.width / 2), u.x = l + p, u.starty = f.getVerticalPos(), f.insert(u.x, i, u.x + u.width, u.height), l += u.width + p, u.box && (u.box.width = l + g.margin - u.box.x), p = u.margin, r = u.box, f.models.addActor(u);
1676
- }
1677
- r && f.models.addBox(r), f.bumpVerticalPos(x);
1678
- }, qt = async function(t, e, o, s) {
1679
- if (s) {
1680
- let i = 0;
1681
- f.bumpVerticalPos(n.boxMargin * 2);
1682
- for (const a of o) {
1683
- const c = e[a];
1684
- c.stopy || (c.stopy = f.getVerticalPos());
1685
- const l = await D.drawActor(t, c, n, !0);
1686
- i = v.getMax(i, l);
1687
- }
1688
- f.bumpVerticalPos(i + n.boxMargin);
1689
- } else
1690
- for (const i of o) {
1691
- const a = e[i];
1692
- await D.drawActor(t, a, n, !1);
1693
- }
1694
- }, ge = function(t, e, o, s) {
1695
- let i = 0, a = 0;
1696
- for (const c of o) {
1697
- const l = e[c], p = R0(l), r = D.drawPopup(
1698
- t,
1699
- l,
1700
- p,
1701
- n,
1702
- n.forceMenus,
1703
- s
1704
- );
1705
- r.height > i && (i = r.height), r.width + l.x > a && (a = r.width + l.x);
1706
- }
1707
- return { maxHeight: i, maxWidth: a };
1708
- }, xe = function(t) {
1709
- Ie(n, t), t.fontFamily && (n.actorFontFamily = n.noteFontFamily = n.messageFontFamily = t.fontFamily), t.fontSize && (n.actorFontSize = n.noteFontSize = n.messageFontSize = t.fontSize), t.fontWeight && (n.actorFontWeight = n.noteFontWeight = n.messageFontWeight = t.fontWeight);
1710
- }, St = function(t) {
1711
- return f.activations.filter(function(e) {
1712
- return e.actor === t;
1713
- });
1714
- }, jt = function(t, e) {
1715
- const o = e[t], s = St(t), i = s.reduce(function(c, l) {
1716
- return v.getMin(c, l.startx);
1717
- }, o.x + o.width / 2 - 1), a = s.reduce(function(c, l) {
1718
- return v.getMax(c, l.stopx);
1719
- }, o.x + o.width / 2 + 1);
1720
- return [i, a];
1721
- };
1722
- function it(t, e, o, s, i) {
1723
- f.bumpVerticalPos(o);
1724
- let a = s;
1725
- if (e.id && e.message && t[e.id]) {
1726
- const c = t[e.id].width, l = xt(n);
1727
- e.message = B.wrapLabel(`[${e.message}]`, c - 2 * n.wrapPadding, l), e.width = c, e.wrap = !0;
1728
- const p = B.calculateTextDimensions(e.message, l), r = v.getMax(p.height, n.labelBoxHeight);
1729
- a = s + r, X.debug(`${r} - ${e.message}`);
1730
- }
1731
- i(e), f.bumpVerticalPos(a);
1732
- }
1733
- function N0(t, e, o, s, i, a, c) {
1734
- function l(r, x) {
1735
- r.x < i[t.from].x ? (f.insert(
1736
- e.stopx - x,
1737
- e.starty,
1738
- e.startx,
1739
- e.stopy + r.height / 2 + n.noteMargin
1740
- ), e.stopx = e.stopx + x) : (f.insert(
1741
- e.startx,
1742
- e.starty,
1743
- e.stopx + x,
1744
- e.stopy + r.height / 2 + n.noteMargin
1745
- ), e.stopx = e.stopx - x);
1746
- }
1747
- function p(r, x) {
1748
- r.x < i[t.to].x ? (f.insert(
1749
- e.startx - x,
1750
- e.starty,
1751
- e.stopx,
1752
- e.stopy + r.height / 2 + n.noteMargin
1753
- ), e.startx = e.startx + x) : (f.insert(
1754
- e.stopx,
1755
- e.starty,
1756
- e.startx + x,
1757
- e.stopy + r.height / 2 + n.noteMargin
1758
- ), e.startx = e.startx - x);
1759
- }
1760
- if (a[t.to] == s) {
1761
- const r = i[t.to], x = r.type == "actor" ? ft / 2 + 3 : r.width / 2 + 3;
1762
- l(r, x), r.starty = o - r.height / 2, f.bumpVerticalPos(r.height / 2);
1763
- } else if (c[t.from] == s) {
1764
- const r = i[t.from];
1765
- if (n.mirrorActors) {
1766
- const x = r.type == "actor" ? ft / 2 : r.width / 2;
1767
- p(r, x);
1768
- }
1769
- r.stopy = o - r.height / 2, f.bumpVerticalPos(r.height / 2);
1770
- } else if (c[t.to] == s) {
1771
- const r = i[t.to];
1772
- if (n.mirrorActors) {
1773
- const x = r.type == "actor" ? ft / 2 + 3 : r.width / 2 + 3;
1774
- l(r, x);
1775
- }
1776
- r.stopy = o - r.height / 2, f.bumpVerticalPos(r.height / 2);
1777
- }
1778
- }
1779
- const S0 = async function(t, e, o, s) {
1780
- const { securityLevel: i, sequence: a } = st();
1781
- n = a;
1782
- let c;
1783
- i === "sandbox" && (c = Lt("#i" + e));
1784
- const l = i === "sandbox" ? Lt(c.nodes()[0].contentDocument.body) : Lt("body"), p = i === "sandbox" ? c.nodes()[0].contentDocument : document;
1785
- f.init(), X.debug(s.db);
1786
- const r = i === "sandbox" ? l.select(`[id="${e}"]`) : Lt(`[id="${e}"]`), x = s.db.getActors(), T = s.db.getCreatedActors(), u = s.db.getDestroyedActors(), g = s.db.getBoxes();
1787
- let m = s.db.getActorKeys();
1788
- const _ = s.db.getMessages(), I = s.db.getDiagramTitle(), V = s.db.hasAtLeastOneBox(), S = s.db.hasAtLeastOneBoxWithTitle(), O = await M0(x, _, s);
1789
- if (n.height = await C0(x, O, g), D.insertComputerIcon(r), D.insertDatabaseIcon(r), D.insertClockIcon(r), V && (f.bumpVerticalPos(n.boxMargin), S && f.bumpVerticalPos(g[0].textMaxHeight)), n.hideUnusedParticipants === !0) {
1790
- const y = /* @__PURE__ */ new Set();
1791
- _.forEach((P) => {
1792
- y.add(P.from), y.add(P.to);
1793
- }), m = m.filter((P) => y.has(P));
1794
- }
1795
- await A0(r, x, T, m, 0);
1796
- const R = await O0(_, x, O, s);
1797
- D.insertArrowHead(r), D.insertArrowCrossHead(r), D.insertArrowFilledHead(r), D.insertSequenceNumber(r);
1798
- function q(y, P) {
1799
- const j = f.endActivation(y);
1800
- j.starty + 18 > P && (j.starty = P - 6, P += 12), D.drawActivation(
1801
- r,
1802
- j,
1803
- P,
1804
- n,
1805
- St(y.from.actor).length
1806
- ), f.insert(j.startx, P - 10, j.stopx, P);
1807
- }
1808
- let z = 1, J = 1;
1809
- const $ = [], H = [];
1810
- let U = 0;
1811
- for (const y of _) {
1812
- let P, j, rt;
1813
- switch (y.type) {
1814
- case s.db.LINETYPE.NOTE:
1815
- f.resetVerticalPos(), j = y.noteModel, await P0(r, j);
1816
- break;
1817
- case s.db.LINETYPE.ACTIVE_START:
1818
- f.newActivation(y, r, x);
1819
- break;
1820
- case s.db.LINETYPE.ACTIVE_END:
1821
- q(y, f.getVerticalPos());
1822
- break;
1823
- case s.db.LINETYPE.LOOP_START:
1824
- it(
1825
- R,
1826
- y,
1827
- n.boxMargin,
1828
- n.boxMargin + n.boxTextMargin,
1829
- (A) => f.newLoop(A)
1830
- );
1831
- break;
1832
- case s.db.LINETYPE.LOOP_END:
1833
- P = f.endLoop(), await D.drawLoop(r, P, "loop", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
1834
- break;
1835
- case s.db.LINETYPE.RECT_START:
1836
- it(
1837
- R,
1838
- y,
1839
- n.boxMargin,
1840
- n.boxMargin,
1841
- (A) => f.newLoop(void 0, A.message)
1842
- );
1843
- break;
1844
- case s.db.LINETYPE.RECT_END:
1845
- P = f.endLoop(), H.push(P), f.models.addLoop(P), f.bumpVerticalPos(P.stopy - f.getVerticalPos());
1846
- break;
1847
- case s.db.LINETYPE.OPT_START:
1848
- it(
1849
- R,
1850
- y,
1851
- n.boxMargin,
1852
- n.boxMargin + n.boxTextMargin,
1853
- (A) => f.newLoop(A)
1854
- );
1855
- break;
1856
- case s.db.LINETYPE.OPT_END:
1857
- P = f.endLoop(), await D.drawLoop(r, P, "opt", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
1858
- break;
1859
- case s.db.LINETYPE.ALT_START:
1860
- it(
1861
- R,
1862
- y,
1863
- n.boxMargin,
1864
- n.boxMargin + n.boxTextMargin,
1865
- (A) => f.newLoop(A)
1866
- );
1867
- break;
1868
- case s.db.LINETYPE.ALT_ELSE:
1869
- it(
1870
- R,
1871
- y,
1872
- n.boxMargin + n.boxTextMargin,
1873
- n.boxMargin,
1874
- (A) => f.addSectionToLoop(A)
1875
- );
1876
- break;
1877
- case s.db.LINETYPE.ALT_END:
1878
- P = f.endLoop(), await D.drawLoop(r, P, "alt", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
1879
- break;
1880
- case s.db.LINETYPE.PAR_START:
1881
- case s.db.LINETYPE.PAR_OVER_START:
1882
- it(
1883
- R,
1884
- y,
1885
- n.boxMargin,
1886
- n.boxMargin + n.boxTextMargin,
1887
- (A) => f.newLoop(A)
1888
- ), f.saveVerticalPos();
1889
- break;
1890
- case s.db.LINETYPE.PAR_AND:
1891
- it(
1892
- R,
1893
- y,
1894
- n.boxMargin + n.boxTextMargin,
1895
- n.boxMargin,
1896
- (A) => f.addSectionToLoop(A)
1897
- );
1898
- break;
1899
- case s.db.LINETYPE.PAR_END:
1900
- P = f.endLoop(), await D.drawLoop(r, P, "par", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
1901
- break;
1902
- case s.db.LINETYPE.AUTONUMBER:
1903
- z = y.message.start || z, J = y.message.step || J, y.message.visible ? s.db.enableSequenceNumbers() : s.db.disableSequenceNumbers();
1904
- break;
1905
- case s.db.LINETYPE.CRITICAL_START:
1906
- it(
1907
- R,
1908
- y,
1909
- n.boxMargin,
1910
- n.boxMargin + n.boxTextMargin,
1911
- (A) => f.newLoop(A)
1912
- );
1913
- break;
1914
- case s.db.LINETYPE.CRITICAL_OPTION:
1915
- it(
1916
- R,
1917
- y,
1918
- n.boxMargin + n.boxTextMargin,
1919
- n.boxMargin,
1920
- (A) => f.addSectionToLoop(A)
1921
- );
1922
- break;
1923
- case s.db.LINETYPE.CRITICAL_END:
1924
- P = f.endLoop(), await D.drawLoop(r, P, "critical", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
1925
- break;
1926
- case s.db.LINETYPE.BREAK_START:
1927
- it(
1928
- R,
1929
- y,
1930
- n.boxMargin,
1931
- n.boxMargin + n.boxTextMargin,
1932
- (A) => f.newLoop(A)
1933
- );
1934
- break;
1935
- case s.db.LINETYPE.BREAK_END:
1936
- P = f.endLoop(), await D.drawLoop(r, P, "break", n), f.bumpVerticalPos(P.stopy - f.getVerticalPos()), f.models.addLoop(P);
1937
- break;
1938
- default:
1939
- try {
1940
- rt = y.msgModel, rt.starty = f.getVerticalPos(), rt.sequenceIndex = z, rt.sequenceVisible = s.db.showSequenceNumbers();
1941
- const A = await L0(r, rt);
1942
- N0(
1943
- y,
1944
- rt,
1945
- A,
1946
- U,
1947
- x,
1948
- T,
1949
- u
1950
- ), $.push({ messageModel: rt, lineStartY: A }), f.models.addMessage(rt);
1951
- } catch (A) {
1952
- X.error("error while drawing message", A);
1953
- }
1954
- }
1955
- [
1956
- s.db.LINETYPE.SOLID_OPEN,
1957
- s.db.LINETYPE.DOTTED_OPEN,
1958
- s.db.LINETYPE.SOLID,
1959
- s.db.LINETYPE.DOTTED,
1960
- s.db.LINETYPE.SOLID_CROSS,
1961
- s.db.LINETYPE.DOTTED_CROSS,
1962
- s.db.LINETYPE.SOLID_POINT,
1963
- s.db.LINETYPE.DOTTED_POINT
1964
- ].includes(y.type) && (z = z + J), U++;
1965
- }
1966
- X.debug("createdActors", T), X.debug("destroyedActors", u), await qt(r, x, m, !1);
1967
- for (const y of $)
1968
- await I0(r, y.messageModel, y.lineStartY, s);
1969
- n.mirrorActors && await qt(r, x, m, !0), H.forEach((y) => D.drawBackgroundRect(r, y)), pe(r, x, m, n);
1970
- for (const y of f.models.boxes)
1971
- y.height = f.getVerticalPos() - y.y, f.insert(y.x, y.y, y.x + y.width, y.height), y.startx = y.x, y.starty = y.y, y.stopx = y.startx + y.width, y.stopy = y.starty + y.height, y.stroke = "rgb(0,0,0, 0.5)", await D.drawBox(r, y, n);
1972
- V && f.bumpVerticalPos(n.boxMargin);
1973
- const F = ge(r, x, m, p), { bounds: W } = f.getBounds();
1974
- let Z = W.stopy - W.starty;
1975
- Z < F.maxHeight && (Z = F.maxHeight);
1976
- let K = Z + 2 * n.diagramMarginY;
1977
- n.mirrorActors && (K = K - n.boxMargin + n.bottomMarginAdj);
1978
- let Q = W.stopx - W.startx;
1979
- Q < F.maxWidth && (Q = F.maxWidth);
1980
- const tt = Q + 2 * n.diagramMarginX;
1981
- I && r.append("text").text(I).attr("x", (W.stopx - W.startx) / 2 - 2 * n.diagramMarginX).attr("y", -25), Le(r, K, tt, n.useMaxWidth);
1982
- const N = I ? 40 : 0;
1983
- r.attr(
1984
- "viewBox",
1985
- W.startx - n.diagramMarginX + " -" + (n.diagramMarginY + N) + " " + tt + " " + (K + N)
1986
- ), X.debug("models:", f.models);
1987
- };
1988
- async function M0(t, e, o) {
1989
- const s = {};
1990
- for (const i of e)
1991
- if (t[i.to] && t[i.from]) {
1992
- const a = t[i.to];
1993
- if (i.placement === o.db.PLACEMENT.LEFTOF && !a.prevActor || i.placement === o.db.PLACEMENT.RIGHTOF && !a.nextActor)
1994
- continue;
1995
- const c = i.placement !== void 0, l = !c, p = c ? Tt(n) : xt(n), r = i.wrap ? B.wrapLabel(i.message, n.width - 2 * n.wrapPadding, p) : i.message, T = (nt(r) ? await wt(i.message, st()) : B.calculateTextDimensions(r, p)).width + 2 * n.wrapPadding;
1996
- l && i.from === a.nextActor ? s[i.to] = v.getMax(
1997
- s[i.to] || 0,
1998
- T
1999
- ) : l && i.from === a.prevActor ? s[i.from] = v.getMax(
2000
- s[i.from] || 0,
2001
- T
2002
- ) : l && i.from === i.to ? (s[i.from] = v.getMax(
2003
- s[i.from] || 0,
2004
- T / 2
2005
- ), s[i.to] = v.getMax(
2006
- s[i.to] || 0,
2007
- T / 2
2008
- )) : i.placement === o.db.PLACEMENT.RIGHTOF ? s[i.from] = v.getMax(
2009
- s[i.from] || 0,
2010
- T
2011
- ) : i.placement === o.db.PLACEMENT.LEFTOF ? s[a.prevActor] = v.getMax(
2012
- s[a.prevActor] || 0,
2013
- T
2014
- ) : i.placement === o.db.PLACEMENT.OVER && (a.prevActor && (s[a.prevActor] = v.getMax(
2015
- s[a.prevActor] || 0,
2016
- T / 2
2017
- )), a.nextActor && (s[i.from] = v.getMax(
2018
- s[i.from] || 0,
2019
- T / 2
2020
- )));
2021
- }
2022
- return X.debug("maxMessageWidthPerActor:", s), s;
2023
- }
2024
- const R0 = function(t) {
2025
- let e = 0;
2026
- const o = Wt(n);
2027
- for (const s in t.links) {
2028
- const a = B.calculateTextDimensions(s, o).width + 2 * n.wrapPadding + 2 * n.boxMargin;
2029
- e < a && (e = a);
2030
- }
2031
- return e;
2032
- };
2033
- async function C0(t, e, o) {
2034
- let s = 0;
2035
- for (const a of Object.keys(t)) {
2036
- const c = t[a];
2037
- c.wrap && (c.description = B.wrapLabel(
2038
- c.description,
2039
- n.width - 2 * n.wrapPadding,
2040
- Wt(n)
2041
- ));
2042
- const l = nt(c.description) ? await wt(c.description, st()) : B.calculateTextDimensions(c.description, Wt(n));
2043
- c.width = c.wrap ? n.width : v.getMax(n.width, l.width + 2 * n.wrapPadding), c.height = c.wrap ? v.getMax(l.height, n.height) : n.height, s = v.getMax(s, c.height);
2044
- }
2045
- for (const a in e) {
2046
- const c = t[a];
2047
- if (!c)
2048
- continue;
2049
- const l = t[c.nextActor];
2050
- if (!l) {
2051
- const T = e[a] + n.actorMargin - c.width / 2;
2052
- c.margin = v.getMax(T, n.actorMargin);
2053
- continue;
2054
- }
2055
- const r = e[a] + n.actorMargin - c.width / 2 - l.width / 2;
2056
- c.margin = v.getMax(r, n.actorMargin);
2057
- }
2058
- let i = 0;
2059
- return o.forEach((a) => {
2060
- const c = xt(n);
2061
- let l = a.actorKeys.reduce((x, T) => x += t[T].width + (t[T].margin || 0), 0);
2062
- l -= 2 * n.boxTextMargin, a.wrap && (a.name = B.wrapLabel(a.name, l - 2 * n.wrapPadding, c));
2063
- const p = B.calculateTextDimensions(a.name, c);
2064
- i = v.getMax(p.height, i);
2065
- const r = v.getMax(l, p.width + 2 * n.wrapPadding);
2066
- if (a.margin = n.boxTextMargin, l < r) {
2067
- const x = (r - l) / 2;
2068
- a.margin += x;
2069
- }
2070
- }), o.forEach((a) => a.textMaxHeight = i), v.getMax(s, n.height);
2071
- }
2072
- const D0 = async function(t, e, o) {
2073
- const s = e[t.from].x, i = e[t.to].x, a = t.wrap && t.message;
2074
- let c = nt(t.message) ? await wt(t.message, st()) : B.calculateTextDimensions(
2075
- a ? B.wrapLabel(t.message, n.width, Tt(n)) : t.message,
2076
- Tt(n)
2077
- );
2078
- const l = {
2079
- width: a ? n.width : v.getMax(n.width, c.width + 2 * n.noteMargin),
2080
- height: 0,
2081
- startx: e[t.from].x,
2082
- stopx: 0,
2083
- starty: 0,
2084
- stopy: 0,
2085
- message: t.message
2086
- };
2087
- return t.placement === o.db.PLACEMENT.RIGHTOF ? (l.width = a ? v.getMax(n.width, c.width) : v.getMax(
2088
- e[t.from].width / 2 + e[t.to].width / 2,
2089
- c.width + 2 * n.noteMargin
2090
- ), l.startx = s + (e[t.from].width + n.actorMargin) / 2) : t.placement === o.db.PLACEMENT.LEFTOF ? (l.width = a ? v.getMax(n.width, c.width + 2 * n.noteMargin) : v.getMax(
2091
- e[t.from].width / 2 + e[t.to].width / 2,
2092
- c.width + 2 * n.noteMargin
2093
- ), l.startx = s - l.width + (e[t.from].width - n.actorMargin) / 2) : t.to === t.from ? (c = B.calculateTextDimensions(
2094
- a ? B.wrapLabel(
2095
- t.message,
2096
- v.getMax(n.width, e[t.from].width),
2097
- Tt(n)
2098
- ) : t.message,
2099
- Tt(n)
2100
- ), l.width = a ? v.getMax(n.width, e[t.from].width) : v.getMax(
2101
- e[t.from].width,
2102
- n.width,
2103
- c.width + 2 * n.noteMargin
2104
- ), l.startx = s + (e[t.from].width - l.width) / 2) : (l.width = Math.abs(s + e[t.from].width / 2 - (i + e[t.to].width / 2)) + n.actorMargin, l.startx = s < i ? s + e[t.from].width / 2 - n.actorMargin / 2 : i + e[t.to].width / 2 - n.actorMargin / 2), a && (l.message = B.wrapLabel(
2105
- t.message,
2106
- l.width - 2 * n.wrapPadding,
2107
- Tt(n)
2108
- )), X.debug(
2109
- `NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`
2110
- ), l;
2111
- }, V0 = function(t, e, o) {
2112
- if (![
2113
- o.db.LINETYPE.SOLID_OPEN,
2114
- o.db.LINETYPE.DOTTED_OPEN,
2115
- o.db.LINETYPE.SOLID,
2116
- o.db.LINETYPE.DOTTED,
2117
- o.db.LINETYPE.SOLID_CROSS,
2118
- o.db.LINETYPE.DOTTED_CROSS,
2119
- o.db.LINETYPE.SOLID_POINT,
2120
- o.db.LINETYPE.DOTTED_POINT
2121
- ].includes(t.type))
2122
- return {};
2123
- const [s, i] = jt(t.from, e), [a, c] = jt(t.to, e), l = s <= a, p = l ? i : s;
2124
- let r = l ? a : c;
2125
- const x = Math.abs(a - c) > 2, T = (_) => l ? -_ : _;
2126
- t.from === t.to ? r = p : (t.activate && !x && (r += T(n.activationWidth / 2 - 1)), [o.db.LINETYPE.SOLID_OPEN, o.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (r += T(3)));
2127
- const u = [s, i, a, c], g = Math.abs(p - r);
2128
- t.wrap && t.message && (t.message = B.wrapLabel(
2129
- t.message,
2130
- v.getMax(g + 2 * n.wrapPadding, n.width),
2131
- xt(n)
2132
- ));
2133
- const m = B.calculateTextDimensions(t.message, xt(n));
2134
- return {
2135
- width: v.getMax(
2136
- t.wrap ? 0 : m.width + 2 * n.wrapPadding,
2137
- g + 2 * n.wrapPadding,
2138
- n.width
2139
- ),
2140
- height: 0,
2141
- startx: p,
2142
- stopx: r,
2143
- starty: 0,
2144
- stopy: 0,
2145
- message: t.message,
2146
- type: t.type,
2147
- wrap: t.wrap,
2148
- fromBounds: Math.min.apply(null, u),
2149
- toBounds: Math.max.apply(null, u)
2150
- };
2151
- }, O0 = async function(t, e, o, s) {
2152
- const i = {}, a = [];
2153
- let c, l, p;
2154
- for (const r of t) {
2155
- switch (r.id = B.random({ length: 10 }), r.type) {
2156
- case s.db.LINETYPE.LOOP_START:
2157
- case s.db.LINETYPE.ALT_START:
2158
- case s.db.LINETYPE.OPT_START:
2159
- case s.db.LINETYPE.PAR_START:
2160
- case s.db.LINETYPE.PAR_OVER_START:
2161
- case s.db.LINETYPE.CRITICAL_START:
2162
- case s.db.LINETYPE.BREAK_START:
2163
- a.push({
2164
- id: r.id,
2165
- msg: r.message,
2166
- from: Number.MAX_SAFE_INTEGER,
2167
- to: Number.MIN_SAFE_INTEGER,
2168
- width: 0
2169
- });
2170
- break;
2171
- case s.db.LINETYPE.ALT_ELSE:
2172
- case s.db.LINETYPE.PAR_AND:
2173
- case s.db.LINETYPE.CRITICAL_OPTION:
2174
- r.message && (c = a.pop(), i[c.id] = c, i[r.id] = c, a.push(c));
2175
- break;
2176
- case s.db.LINETYPE.LOOP_END:
2177
- case s.db.LINETYPE.ALT_END:
2178
- case s.db.LINETYPE.OPT_END:
2179
- case s.db.LINETYPE.PAR_END:
2180
- case s.db.LINETYPE.CRITICAL_END:
2181
- case s.db.LINETYPE.BREAK_END:
2182
- c = a.pop(), i[c.id] = c;
2183
- break;
2184
- case s.db.LINETYPE.ACTIVE_START:
2185
- {
2186
- const T = e[r.from ? r.from.actor : r.to.actor], u = St(r.from ? r.from.actor : r.to.actor).length, g = T.x + T.width / 2 + (u - 1) * n.activationWidth / 2, m = {
2187
- startx: g,
2188
- stopx: g + n.activationWidth,
2189
- actor: r.from.actor,
2190
- enabled: !0
2191
- };
2192
- f.activations.push(m);
2193
- }
2194
- break;
2195
- case s.db.LINETYPE.ACTIVE_END:
2196
- {
2197
- const T = f.activations.map((u) => u.actor).lastIndexOf(r.from.actor);
2198
- delete f.activations.splice(T, 1)[0];
2199
- }
2200
- break;
2201
- }
2202
- r.placement !== void 0 ? (l = await D0(r, e, s), r.noteModel = l, a.forEach((T) => {
2203
- c = T, c.from = v.getMin(c.from, l.startx), c.to = v.getMax(c.to, l.startx + l.width), c.width = v.getMax(c.width, Math.abs(c.from - c.to)) - n.labelBoxWidth;
2204
- })) : (p = V0(r, e, s), r.msgModel = p, p.startx && p.stopx && a.length > 0 && a.forEach((T) => {
2205
- if (c = T, p.startx === p.stopx) {
2206
- const u = e[r.from], g = e[r.to];
2207
- c.from = v.getMin(
2208
- u.x - p.width / 2,
2209
- u.x - u.width / 2,
2210
- c.from
2211
- ), c.to = v.getMax(
2212
- g.x + p.width / 2,
2213
- g.x + u.width / 2,
2214
- c.to
2215
- ), c.width = v.getMax(c.width, Math.abs(c.to - c.from)) - n.labelBoxWidth;
2216
- } else
2217
- c.from = v.getMin(p.startx, c.from), c.to = v.getMax(p.stopx, c.to), c.width = v.getMax(c.width, p.width) - n.labelBoxWidth;
2218
- }));
2219
- }
2220
- return f.activations = [], X.debug("Loop type widths:", i), i;
2221
- }, B0 = {
2222
- bounds: f,
2223
- drawActors: qt,
2224
- drawActorsPopup: ge,
2225
- setConf: xe,
2226
- draw: S0
2227
- }, U0 = {
2228
- parser: De,
2229
- db: Qt,
2230
- renderer: B0,
2231
- styles: o0,
2232
- init: ({ wrap: t }) => {
2233
- Qt.setWrap(t);
2234
- }
2235
- };
2236
- export {
2237
- U0 as diagram
2238
- };