@layers-app/editor 0.5.4-optimization → 0.5.4

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 (225) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.js +1 -1
  3. package/dist/layers.0Vc5u9wi.js +35 -0
  4. package/dist/layers.0lKxBq_Z.js +10 -0
  5. package/dist/{layers.jU4W5PG5.js → layers.2TEubI7B.js} +24 -24
  6. package/dist/layers.2dSs7BFo.js +6 -0
  7. package/dist/layers.3Dey85Sg.js +5 -0
  8. package/dist/layers.4PnWyG15.js +1 -0
  9. package/dist/layers.52famHy6.js +1 -0
  10. package/dist/layers.7AV5Mjwc.js +1 -0
  11. package/dist/{layers.B_7N5yjX.js → layers.8M-X7Sjs.js} +1 -1
  12. package/dist/layers.8TlBNrhP.js +11 -0
  13. package/dist/layers.9pNaFvaX.js +1 -0
  14. package/dist/layers.AdVOrUHP.js +9 -0
  15. package/dist/layers.B-PN8Ivp.js +1 -0
  16. package/dist/{layers.D4jK2Tet.js → layers.B-p6Dq0Q.js} +1 -1
  17. package/dist/{layers.NABwYdw5.js → layers.B01Mkf43.js} +1 -1
  18. package/dist/layers.B19hGmey.js +1 -0
  19. package/dist/layers.B1ZJQJ9P.js +189 -0
  20. package/dist/layers.B3D4g2HH.js +1 -0
  21. package/dist/{layers.CKaj4dG4.js → layers.B3QTzda5.js} +1 -1
  22. package/dist/layers.B3oxjHQn.js +8 -0
  23. package/dist/{layers.C_XsSNQo.js → layers.B6HtYq4i.js} +1 -1
  24. package/dist/{layers.D-U9uIsP.js → layers.B6_OBDNt.js} +1 -1
  25. package/dist/{layers.BqpcWKH6.js → layers.B78LZkUC.js} +42 -42
  26. package/dist/{layers.BiJ8hfRt.js → layers.B7K7JjK6.js} +3 -3
  27. package/dist/{layers.BxEdkUpI.js → layers.B7WUWYmW.js} +3 -3
  28. package/dist/layers.B8B1EGKw.js +9 -0
  29. package/dist/layers.B8Q6U7WI.js +1 -0
  30. package/dist/layers.BA4OdAcT.js +1 -0
  31. package/dist/{layers.CUPMw0sy.js → layers.BAZKZlZK.js} +1 -1
  32. package/dist/{layers.eTredPK_.js → layers.BAp-ZcKa.js} +1 -1
  33. package/dist/layers.BAtv1CM7.js +1 -0
  34. package/dist/{layers.gIdzfQAa.js → layers.BBcawDfH.js} +1 -1
  35. package/dist/{layers.Djl9Gz6s.js → layers.BBoi-kO8.js} +2 -2
  36. package/dist/{layers.D10WeKck.js → layers.BCH7lv8E.js} +3 -3
  37. package/dist/layers.BCHzCw1h.js +51 -0
  38. package/dist/layers.BGJy9qIc.js +257 -0
  39. package/dist/{layers.CskURloi.js → layers.BHm0Axow.js} +1 -1
  40. package/dist/layers.BHu-pLjy.js +4 -0
  41. package/dist/{layers.B_5zMrI3.js → layers.BIbU3e2i.js} +1 -1
  42. package/dist/layers.BIeVwYKL.js +1 -0
  43. package/dist/layers.BIpjXFWx.js +1 -0
  44. package/dist/{layers.IW4NBP9k.js → layers.BK7bGK5J.js} +1 -1
  45. package/dist/{layers.CUHkTCid.js → layers.BLJRrYDK.js} +1 -1
  46. package/dist/{layers.LGx1jmqd.js → layers.BLNsVsdf.js} +1 -1
  47. package/dist/layers.BLd2spTm.js +1 -0
  48. package/dist/layers.BLfiInYv.js +1 -0
  49. package/dist/layers.BMJEI08z.js +139 -0
  50. package/dist/{layers.C5BFsvzI.js → layers.BNO6yxGi.js} +2 -2
  51. package/dist/{layers.BnZcjRLr.js → layers.BQkD83en.js} +1 -1
  52. package/dist/{layers.DPuVWH3L.js → layers.BRfovdxH.js} +1 -1
  53. package/dist/layers.BSTBZrFn.js +1 -0
  54. package/dist/layers.BTQk3je9.js +8 -0
  55. package/dist/{layers.DBosqi2D.js → layers.BWMcm2Fa.js} +4 -4
  56. package/dist/layers.BWnNwfH5.js +61 -0
  57. package/dist/layers.BXXQl2Zf.js +122 -0
  58. package/dist/{layers.B6W2tqC0.js → layers.BaSdeSdM.js} +1 -1
  59. package/dist/layers.BeLeVyDh.js +160 -0
  60. package/dist/{layers.nPQCmYXI.js → layers.BgHyUng2.js} +1 -1
  61. package/dist/layers.BhCBXy_H.js +2 -0
  62. package/dist/layers.BjdYJwx4.js +1 -0
  63. package/dist/layers.Bn7jNDk7.js +9 -0
  64. package/dist/{layers.CLRiSwgi.js → layers.Bo572hFp.js} +3 -3
  65. package/dist/layers.BoXC0jZK.js +52 -0
  66. package/dist/{layers.DdMwmP4m.js → layers.BpWdUEAy.js} +1 -1
  67. package/dist/{layers.DWSkLlGf.js → layers.Brnh5Tpc.js} +1 -1
  68. package/dist/layers.Bt8AkbAr.js +139 -0
  69. package/dist/layers.BtPpuF7b.js +5 -0
  70. package/dist/layers.BtU3b5tV.js +1 -0
  71. package/dist/layers.Bt_43ZXI.js +11 -0
  72. package/dist/layers.BuwPLLxP.js +1 -0
  73. package/dist/layers.Bw91koAV.js +5 -0
  74. package/dist/layers.BwE0SG5q.js +10 -0
  75. package/dist/{layers.WLeJl9el.js → layers.BxVBZNlm.js} +4 -4
  76. package/dist/layers.By75AUqv.js +11 -0
  77. package/dist/layers.ByJ1e5_6.js +9 -0
  78. package/dist/{layers.BNvAl5dS.js → layers.C-GJGbMF.js} +2 -2
  79. package/dist/layers.C2CT_pu0.js +10 -0
  80. package/dist/{layers.DUsIfvNt.js → layers.C34uefby.js} +8 -8
  81. package/dist/layers.C4zd47gQ.js +7 -0
  82. package/dist/{layers.694DrE1_.js → layers.C7DmNGsM.js} +3 -3
  83. package/dist/{layers.BZ4laUeR.js → layers.C7yxY1d5.js} +1 -1
  84. package/dist/layers.CDR76Utk.js +207 -0
  85. package/dist/{layers.CfGeHh-g.js → layers.CE9TtaVf.js} +1 -1
  86. package/dist/{layers.CGwNL7dH.js → layers.CEW_1Vth.js} +5 -5
  87. package/dist/{layers.DsDjOLHs.js → layers.CHKv58R7.js} +3 -3
  88. package/dist/layers.CHTiuRJ2.js +8 -0
  89. package/dist/layers.CHZsXQcr.js +1 -0
  90. package/dist/{layers.BsAu1GXs.js → layers.CHmO_pnj.js} +1 -1
  91. package/dist/{layers.BESPlBGC.js → layers.CJOaUqZa.js} +1 -1
  92. package/dist/layers.CNwhJl6E.js +3 -0
  93. package/dist/layers.CO3Sytmm.js +1 -0
  94. package/dist/{layers.B7Olyhe8.js → layers.COBiR5mi.js} +1 -1
  95. package/dist/layers.CPotB7xk.js +6 -0
  96. package/dist/{layers.Cj4ezyVr.js → layers.CQjk6uv5.js} +1 -1
  97. package/dist/layers.CS7-jlyg.js +1 -0
  98. package/dist/{layers.BkPPOKBy.js → layers.CUkptGJB.js} +1 -1
  99. package/dist/layers.CYPdHBuP.js +11 -0
  100. package/dist/layers.CYi_BcJI.js +10 -0
  101. package/dist/layers.CZ1mAelj.js +8 -0
  102. package/dist/layers.CZKmXUYL.js +1 -0
  103. package/dist/layers.CZg7_09G.js +6 -0
  104. package/dist/layers.C_CX4lOf.js +230 -0
  105. package/dist/layers.C_IvrzZ3.js +7 -0
  106. package/dist/{layers.DyZ5R-vS.js → layers.Ca6XSV3_.js} +1 -1
  107. package/dist/layers.Cc9iNo-9.js +5 -0
  108. package/dist/layers.CcNvGlTJ.js +10 -0
  109. package/dist/layers.CffIrHwd.js +10 -0
  110. package/dist/layers.CjbtwZr2.js +1 -0
  111. package/dist/{layers.DOKLQ6A3.js → layers.CkglrFct.js} +3 -3
  112. package/dist/{layers.C5WLg9ed.js → layers.Ckt3zLwN.js} +8 -8
  113. package/dist/{layers.BThP74aw.js → layers.Clj6j5Iv.js} +1 -1
  114. package/dist/{layers.Bk3_8qR9.js → layers.ClnUWksj.js} +6 -6
  115. package/dist/{layers.Bv5sK47C.js → layers.Cn_uKK1B.js} +3 -3
  116. package/dist/{layers.CbmlFoXt.js → layers.CoifawpZ.js} +1 -1
  117. package/dist/{layers.Dj-f1_6N.js → layers.CpaBuhmV.js} +1 -1
  118. package/dist/{layers.dEHKcy8J.js → layers.CqIAspBY.js} +2 -2
  119. package/dist/{layers.DjhJT1nZ.js → layers.CqYl5vBW.js} +576 -576
  120. package/dist/layers.CrYs8jr0.js +9 -0
  121. package/dist/layers.CtKjFW4u.js +1 -0
  122. package/dist/layers.CulA-HKW.js +1 -0
  123. package/dist/{layers.DhkyREpW.js → layers.CvCkctiF.js} +3 -3
  124. package/dist/layers.CwbqB-j8.js +8 -0
  125. package/dist/layers.CxUmCpia.js +8 -0
  126. package/dist/layers.Cxs_jg70.js +2 -0
  127. package/dist/{layers.CWb6LiAY.js → layers.Cyd9Kqo2.js} +1 -1
  128. package/dist/layers.Cyzu9PKQ.js +1 -0
  129. package/dist/{layers.DKENAsMv.js → layers.Czj79CMM.js} +4 -4
  130. package/dist/layers.D0zn4_Mx.js +1 -0
  131. package/dist/{layers.B3JNY9Km.js → layers.D11RjmdS.js} +1 -1
  132. package/dist/{layers.DSTh89J8.js → layers.D3ZgR0ob.js} +1 -1
  133. package/dist/{layers.BxUBbVsO.js → layers.D3rsDF_5.js} +1 -1
  134. package/dist/layers.D4Yj3ljo.js +7 -0
  135. package/dist/layers.D5O9Ej7a.js +8 -0
  136. package/dist/{layers.DX1RI3m3.js → layers.D6-ZYEi1.js} +1 -1
  137. package/dist/{layers.CI739wqN.js → layers.D6poOgUD.js} +1 -1
  138. package/dist/layers.D8Q-3JFA.js +84 -0
  139. package/dist/{layers.O-bFTk-n.js → layers.D8nVojnD.js} +4 -4
  140. package/dist/layers.DAJX6HDB.js +1 -0
  141. package/dist/layers.DD4kIsiO.js +9 -0
  142. package/dist/layers.DDyk3QWM.js +10 -0
  143. package/dist/layers.DFZijSB5.js +7 -0
  144. package/dist/layers.DKJ5N6Ku.js +9 -0
  145. package/dist/layers.DKQs7So3.js +425 -0
  146. package/dist/{layers.C-dS7ntQ.js → layers.DKf6DVWp.js} +1 -1
  147. package/dist/{layers.CtTD47i4.js → layers.DM4eQ6Z1.js} +1 -1
  148. package/dist/{layers.mQcENPPW.js → layers.DMTPlZmt.js} +4 -4
  149. package/dist/layers.DM_vG6Lv.js +4 -0
  150. package/dist/layers.DMkBISW1.js +1 -0
  151. package/dist/{layers.0EAb8Ajx.js → layers.DN1GbpLB.js} +2 -2
  152. package/dist/{layers.H2Kl_PC2.js → layers.DNgc6xx-.js} +1 -1
  153. package/dist/layers.DOrgOHBr.js +1 -0
  154. package/dist/layers.DPW4bDAc.js +1 -0
  155. package/dist/layers.DQ3K0Cym.js +9 -0
  156. package/dist/layers.DRdWz10Z.js +1 -0
  157. package/dist/{layers.2wIERhxO.js → layers.DSQyvOKa.js} +1 -1
  158. package/dist/{layers.ntC1foLT.js → layers.DVcE14xf.js} +1 -1
  159. package/dist/{layers.DOBSfaUM.js → layers.DXZWbEKg.js} +1 -1
  160. package/dist/layers.DXs66o83.js +1 -0
  161. package/dist/{layers.C6lAFlKZ.js → layers.DaKR2bve.js} +4 -4
  162. package/dist/{layers.Bzalhqz_.js → layers.DbRnoAe6.js} +1 -1
  163. package/dist/layers.DbaKVP5e.js +1 -0
  164. package/dist/{layers.CxcvEfKe.js → layers.DbsHq_DJ.js} +1 -1
  165. package/dist/{layers.CRSjdIG6.js → layers.DcGVxSQi.js} +1 -1
  166. package/dist/{layers.CN1QkD6D.js → layers.Des2uVtR.js} +1 -1
  167. package/dist/{layers.BJTh7mUo.js → layers.DfvMqZjx.js} +2 -2
  168. package/dist/{layers.B-5aeeDH.js → layers.DiMBnDzx.js} +4 -4
  169. package/dist/layers.Djod0cA3.js +1 -0
  170. package/dist/layers.Dmy0UHGW.js +4 -0
  171. package/dist/{layers.Dn2AP7iE.js → layers.Dng_PTXT.js} +5 -5
  172. package/dist/layers.DoCHsiql.js +116 -0
  173. package/dist/layers.DoOe-Btz.js +10 -0
  174. package/dist/layers.DpTZ84Jn.js +1 -0
  175. package/dist/layers.Dq4U5Vw0.js +7 -0
  176. package/dist/{layers.DuE1l7lR.js → layers.Dqr9FfvL.js} +1 -1
  177. package/dist/layers.Dxb8h6Pl.js +4 -0
  178. package/dist/layers.DykPtL5P.js +7 -0
  179. package/dist/layers.DywP4Z4U.js +118 -0
  180. package/dist/layers.Dyz6i6M_.js +10 -0
  181. package/dist/layers.HD0Vr-xE.js +70 -0
  182. package/dist/{layers.DVfpGIrv.js → layers.HR91wdYz.js} +1 -1
  183. package/dist/{layers.BLL-019k.js → layers.Hao1AIZh.js} +1 -1
  184. package/dist/{layers.CiJxVu9b.js → layers.Ifm4e73K.js} +1 -1
  185. package/dist/layers.JOdNqzvI.js +6 -0
  186. package/dist/layers.JWCLFILJ.js +1 -0
  187. package/dist/layers.KFb7ZtXM.js +1 -0
  188. package/dist/{layers.huV95Ipe.js → layers.Ky_r0B3T.js} +1 -1
  189. package/dist/layers.LnhJpGo4.js +7 -0
  190. package/dist/{layers.BiJBOHr0.js → layers.OAm_JZSI.js} +1 -1
  191. package/dist/{layers.NtwvbkGN.js → layers.Pkyzio9W.js} +3 -3
  192. package/dist/{layers.R_udKe_N.js → layers.QTZ08fgz.js} +1 -1
  193. package/dist/{layers.1Mvzm38Y.js → layers.QgLYm41y.js} +3 -3
  194. package/dist/{layers.Cpb-MRZn.js → layers.RWsaxeRj.js} +1 -1
  195. package/dist/layers.V6FSgQ4T.js +1 -0
  196. package/dist/layers.VftpmJsa.js +8 -0
  197. package/dist/{layers.DGtETOVJ.js → layers.Wcehxj5N.js} +1 -1
  198. package/dist/{layers.BCuuRSaf.js → layers.Ws5ugaAU.js} +1 -1
  199. package/dist/{layers.BdvfoI4U.js → layers.X75KJca-.js} +1 -1
  200. package/dist/{layers.B1S8ufDn.js → layers.Yv4znr1K.js} +1 -1
  201. package/dist/layers._oWisxxl.js +11 -0
  202. package/dist/{layers.Br7D0wMN.js → layers.br9u2FNY.js} +1 -1
  203. package/dist/{layers.TdTDbIzb.js → layers.cttu3sFt.js} +1 -1
  204. package/dist/layers.d0M3Ot24.js +9 -0
  205. package/dist/layers.fiWMRDIw.js +8 -0
  206. package/dist/layers.hweLqW3I.js +261 -0
  207. package/dist/{layers.DxHlP7Pb.js → layers.jxiuUHfs.js} +1 -1
  208. package/dist/layers.ksZ72zjW.js +2 -0
  209. package/dist/{layers.BZByPNdY.js → layers.lyc2_1rn.js} +1 -1
  210. package/dist/layers.mUdFWzjh.js +8 -0
  211. package/dist/{layers.B0winug5.js → layers.nToHNMBf.js} +2 -2
  212. package/dist/layers.ocD8VYnf.js +6 -0
  213. package/dist/{layers.BNJiP8Pw.js → layers.osTZCjn2.js} +1 -1
  214. package/dist/layers.qk2ev6Zp.js +13 -0
  215. package/dist/layers.rVltGhk6.js +96 -0
  216. package/dist/layers.rrWidkhs.js +9 -0
  217. package/dist/layers.sRbJVPJG.js +10 -0
  218. package/dist/layers.sa9_Vizm.js +7 -0
  219. package/dist/{layers.DQVXh43C.js → layers.yHP1LRN4.js} +1 -1
  220. package/dist/layers.yXjyswXG.js +7 -0
  221. package/dist/{layers.CPY6U3g-.js → layers.yZ8tdL03.js} +3 -3
  222. package/dist/{layers.Dqbek_0L.js → layers.yn0JrvOV.js} +1 -1
  223. package/package.json +5 -7
  224. package/dist/layers.DsOaqGXW.js +0 -8
  225. package/dist/layers.uHy1yMbq.js +0 -6
@@ -1,5 +1,5 @@
1
- import { o as mt, n as kt, s as _t, a as xt, c as vt, b as bt, g as rt, p as wt, d as Y, Y as St, q as Lt, j as Et } from "./layers.jU4W5PG5.js";
2
- import "./layers.C5WLg9ed.js";
1
+ import { o as mt, n as kt, s as _t, a as xt, c as vt, b as bt, g as rt, p as wt, d as Y, Y as St, q as Lt, j as Et } from "./layers.2TEubI7B.js";
2
+ import "./layers.Ckt3zLwN.js";
3
3
  import { o as At } from "./layers.b0h5ZBmD.js";
4
4
  import { s as Tt } from "./layers.D7jGxypv.js";
5
5
  function ot(t, n) {
@@ -1,4 +1,4 @@
1
- import "./layers.C5WLg9ed.js";
1
+ import "./layers.Ckt3zLwN.js";
2
2
  var e = { paste: "貼上", pasteAsPlaintext: "", pasteCharts: "貼上圖表", selectAll: "全選", multiSelect: "多重選取", moveCanvas: "移動畫布", cut: "剪下", copy: "複製", copyAsPng: "以 PNG 格式複製", copyAsSvg: "以 SVG 格式複製", copyText: "", copySource: "", convertToCode: "", bringForward: "往上一層移動", sendToBack: "移到最底層", bringToFront: "移到最上層", sendBackward: "往下一層移動", delete: "刪除", copyStyles: "複製樣式", pasteStyles: "套用樣式", stroke: "筆跡顏色", background: "填充顏色", fill: "背景樣式", strokeWidth: "筆跡寬度", strokeStyle: "筆跡線條", strokeStyle_solid: "實線", strokeStyle_dashed: "虛線(較密)", strokeStyle_dotted: "虛線(較疏)", sloppiness: "筆跡風格", opacity: "透明度", textAlign: "文字對齊", edges: "邊角樣式", sharp: "銳角", round: "圓角", arrowheads: "箭嘴", arrowhead_none: "無箭嘴", arrowhead_arrow: "普通箭嘴", arrowhead_bar: "平頭條狀", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "三角箭嘴", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "字型大小", fontFamily: "字體", addWatermark: "加入「使用 Excalidraw 製圖」水印", handDrawn: "手繪體", normal: "電腦字體", code: "等寬體", small: "細", medium: "中", large: "大", veryLarge: "勁大", solid: "實心", hachure: "斜線", zigzag: "", crossHatch: "交叉格仔", thin: "幼", bold: "粗", left: "靠左對齊", center: "置中對齊", right: "靠右對齊", extraBold: "勁粗", architect: "手繪風格", artist: "藝術家風格", cartoonist: "卡通風格", fileTitle: "檔案名稱", colorPicker: "", canvasColors: "", canvasBackground: "畫布背景顏色", drawingCanvas: "畫布", layers: "圖層", actions: "動作", language: "🌏 語言", liveCollaboration: "", duplicateSelection: "製作副本", untitled: "未命名的作品", name: "", yourName: "你的名稱", madeWithExcalidraw: "使用 Excalidraw 製圖", group: "建立物件群組", ungroup: "取消物件群組", collaborators: "已連線的協作者", showGrid: "顯示網格", addToLibrary: "加入作品庫", removeFromLibrary: "從作品庫中移除", libraryLoadingMessage: "正在載入作品庫…", libraries: "瀏覽作品庫", loadingScene: "載入畫布中…", align: "物件對齊", alignTop: "水平置頂", alignBottom: "水平置底", alignLeft: "垂直靠左對齊", alignRight: "垂直靠右對齊", centerVertically: "垂直置中", centerHorizontally: "水平置中", distributeHorizontally: "左右等距", distributeVertically: "上下等距", flipHorizontal: "左右反轉", flipVertical: "上下反轉", viewMode: "唯讀模式", share: "", showStroke: "", showBackground: "", toggleTheme: "", personalLib: "", excalidrawLib: "", decreaseFontSize: "", increaseFontSize: "", unbindText: "", bindText: "", createContainerFromText: "", link: { edit: "", editEmbed: "", create: "", createEmbed: "", label: "", labelEmbed: "", empty: "" }, lineEditor: { edit: "", exit: "" }, elementLock: { lock: "", unlock: "", lockAll: "", unlockAll: "" }, statusPublished: "", sidebarLock: "", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, u = { noItems: "", hint_emptyLibrary: "", hint_emptyPrivateLibrary: "" }, a = { clearReset: "清空畫布", exportJSON: "", exportImage: "", export: "", copyToClipboard: "", save: "", saveAs: "", load: "", getShareableLink: "", close: "", selectLanguage: "", scrollBackToContent: "", zoomIn: "", zoomOut: "", resetZoom: "", menu: "", done: "", edit: "", undo: "", redo: "", resetLibrary: "", createNewRoom: "", fullScreen: "", darkMode: "", lightMode: "", zenMode: "", objectsSnapMode: "", exitZenMode: "", cancel: "", clear: "", remove: "", embed: "", publishLibrary: "", submit: "", confirm: "", embeddableInteractionButton: "" }, o = { clearReset: "【‼️ 警告 ‼️ 無法復原的動作】你確定要清空呢塊畫布嗎?", couldNotCreateShareableLink: "", couldNotCreateShareableLinkTooBig: "", couldNotLoadInvalidFile: "", importBackendFailed: "", cannotExportEmptyCanvas: "無嘢可以匯出喎~畫吓嘢先?", couldNotCopyToClipboard: "", decryptFailed: "", uploadedSecurly: "", loadSceneOverridePrompt: "", collabStopOverridePrompt: "", errorAddingToLibrary: "", errorRemovingFromLibrary: "", confirmAddLibrary: "", imageDoesNotContainScene: "", cannotRestoreFromImage: "", invalidSceneUrl: "", resetLibrary: "", removeItemsFromsLibrary: "", invalidEncryptionKey: "", collabOfflineWarning: "" }, r = { unsupportedFileType: "", imageInsertError: "", fileTooBig: "", svgImageInsertError: "", failedToFetchImage: "", invalidSVGString: "", cannotResolveCollabServer: "", importLibraryError: "", collabSaveFailed: "", collabSaveFailed_sizeExceeded: "", imageToolNotSupported: "", brave_measure_text_error: { line1: "", line2: "", line3: "", line4: "" }, libraryElementTypeError: { embeddable: "", iframe: "", image: "" }, asyncPasteFailedOnRead: "", asyncPasteFailedOnParse: "", copyToSystemClipboardFailed: "" }, t = { selection: "", image: "", rectangle: "", diamond: "", ellipse: "", arrow: "", line: "", freedraw: "", text: "", library: "", lock: "", penMode: "", link: "", eraser: "", frame: "", magicframe: "", embeddable: "", laser: "", hand: "", extraTools: "", mermaidToExcalidraw: "", magicSettings: "" }, i = { canvasActions: "畫布動作", selectedShapeActions: "", shapes: "" }, l = { canvasPanning: "", linearElement: "", freeDraw: "", text: "", embeddable: "", text_selected: "", text_editing: "", linearElementMulti: "", lockAngle: "", resize: "", resizeImage: "", rotate: "", lineEditor_info: "", lineEditor_pointSelected: "", lineEditor_nothingSelected: "", placeImage: "", publishLibrary: "", bindTextToElement: "", deepBoxSelect: "", eraserRevert: "", firefox_clipboard_write: "", disableSnapping: "" }, n = { cannotShowPreview: "無法顯示預覽", canvasTooBig: "塊畫布太大啦,縮細啲先啦?", canvasTooBigTip: "" }, s = { headingMain: "", clearCanvasMessage: "如果重新整理頁面都係睇唔到,你可以<button>清空畫布</button>", clearCanvasCaveat: "(注意:呢個動作會直接丟棄你嘅作品,並且無法復原)", trackedToSentry: "", openIssueMessage: "", sceneContent: "" }, d = { desc_intro: "", desc_privacy: "", button_startSession: "", button_stopSession: "", desc_inProgressIntro: "", desc_shareLink: "", desc_exitSession: "", shareTitle: "" }, c = { title: "" }, F = { disk_title: "", disk_details: "", disk_button: "", link_title: "", link_details: "", link_button: "", excalidrawplus_description: "", excalidrawplus_button: "", excalidrawplus_exportError: "" }, m = { blog: "", click: "", deepSelect: "", deepBoxSelect: "", curvedArrow: "", curvedLine: "", documentation: "", doubleClick: "", drag: "", editor: "", editLineArrowPoints: "", editText: "", github: "", howto: "", or: "", preventBinding: "", tools: "", shortcuts: "", textFinish: "", textNewLine: "", title: "", view: "", zoomToFit: "", zoomToSelection: "", toggleElementLock: "", movePageUpDown: "", movePageLeftRight: "" }, p = { title: "" }, E = { title: "", itemName: "", authorName: "", githubUsername: "", twitterUsername: "", libraryName: "", libraryDesc: "", website: "", placeholder: { authorName: "", libraryName: "", libraryDesc: "", githubHandle: "", twitterHandle: "", website: "" }, errors: { required: "", website: "" }, noteDescription: "", noteGuidelines: "", noteLicense: "", noteItems: "", atleastOneLibItem: "", republishWarning: "" }, g = { title: "", content: "" }, D = { resetLibrary: "", removeItemsFromLib: "" }, b = { header: "", label: { withBackground: "", onlySelected: "", darkMode: "", embedScene: "", scale: "", padding: "" }, tooltip: { embedScene: "" }, title: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" }, button: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" } }, C = { tooltip: "", link: "" }, A = { angle: "", element: "", elements: "", height: "", scene: "", selected: "", storage: "", title: "", total: "", version: "", versionCopy: "", versionNotAvailable: "", width: "" }, B = { addedToLibrary: "", copyStyles: "", copyToClipboard: "", copyToClipboardAsPng: "", fileSaved: "", fileSavedToFilename: "", canvas: "畫布", selection: "", pasteAsSingleElement: "", unableToEmbed: "", unrecognizedLinkFormat: "" }, h = { transparent: "", black: "", white: "", red: "", pink: "", grape: "", violet: "", gray: "", blue: "", cyan: "", teal: "", green: "", yellow: "", orange: "", bronze: "" }, y = { app: { center_heading: "", center_heading_plus: "", menuHint: "" }, defaults: { menuHint: "", center_heading: "", toolbarHint: "", helpHint: "" } }, v = { mostUsedCustomColors: "", colors: "", shades: "", hexCode: "", noShades: "" }, S = { action: { exportToImage: { title: "", button: "", description: "" }, saveToDisk: { title: "", button: "", description: "" }, excalidrawPlus: { title: "", button: "", description: "" } }, modal: { loadFromFile: { title: "", button: "", description: "" }, shareableLink: { title: "", button: "", description: "" } } }, w = { title: "", button: "", description: "", syntax: "", preview: "" }, x = { labels: e, library: u, buttons: a, alerts: o, errors: r, toolBar: t, headings: i, hints: l, canvasError: n, errorSplash: s, roomDialog: d, errorDialog: c, exportDialog: F, helpDialog: m, clearCanvasDialog: p, publishDialog: E, publishSuccessDialog: g, confirmDialog: D, imageExportDialog: b, encrypted: C, stats: A, toast: B, colors: h, welcomeScreen: y, colorPicker: v, overwriteConfirm: S, mermaid: w };
3
3
  export {
4
4
  o as alerts,
@@ -1,4 +1,4 @@
1
- import "./layers.C5WLg9ed.js";
1
+ import "./layers.Ckt3zLwN.js";
2
2
  var u = { paste: "دانانەوە", pasteAsPlaintext: "دایبنێ وەک دەقی سادە", pasteCharts: "دانانەوەی خشتەکان", selectAll: "دیاریکردنی هەموو", multiSelect: "زیادکردنی بۆ دیاریکراوەکان", moveCanvas: "تابلۆ بجوڵێنە", cut: "بڕین", copy: "لەبەرگرتنەوە", copyAsPng: "PNGلەبەرگرتنەوە بۆ تەختەنووس وەک", copyAsSvg: "SVGلەبەرگرتنەوە بۆ تەختەنووس وەک", copyText: "لەبەرگرتنەوە بۆ تەختەنووس وەک نوسین", copySource: "", convertToCode: "", bringForward: "بهێنە پێشتر", sendToBack: "بنێرە دواوە", bringToFront: "بهێنە پێشەوە", sendBackward: "بنێرە دواتر", delete: "سڕینەوە", copyStyles: "لەبەرگرتنەوەی ستایل", pasteStyles: "دانانەوەی ستایل", stroke: "هێڵکار", background: "پاشبنەما", fill: "پڕکردنەوە", strokeWidth: "پانی هێڵکاری", strokeStyle: "ستایلی هێڵکاری", strokeStyle_solid: "سادە", strokeStyle_dashed: "پچڕ پچڕ", strokeStyle_dotted: "خاڵدار", sloppiness: "لێژی", opacity: "ڕوونی", textAlign: "ڕێکخستنی دەق", edges: "لێوارەکان", sharp: "تیژ", round: "چەماوە", arrowheads: "سەرەتیر", arrowhead_none: "هیچیان", arrowhead_arrow: "تیر", arrowhead_bar: "هێڵ", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "سێگۆشە", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "قەبارەی فۆنت", fontFamily: "خێزانی فۆنت", addWatermark: 'زیادبکە "Made with Excalidraw"', handDrawn: "دەست کێشراو", normal: "ئاسایی", code: "کۆد", small: "بچووک", medium: "ناوەند", large: "گه‌وره‌", veryLarge: "زۆر گه‌وره‌", solid: "سادە", hachure: "هاچور", zigzag: "زیگزاگ", crossHatch: "کرۆس هاتچ", thin: "تەنک", bold: "تۆخ", left: "چەپ", center: "ناوه‌ند", right: "ڕاست", extraBold: "زۆر تۆخ", architect: "تەلارساز", artist: "هونەرمەند", cartoonist: "کارتۆنی", fileTitle: "ناوی فایل", colorPicker: "ڕەنگ هەڵگر", canvasColors: "بەکارهاتووە لەسەر تابلۆ", canvasBackground: "پاشبنەمای تابلۆ", drawingCanvas: "کێشانی تابلۆ", layers: "چینەکان", actions: "کردارەکان", language: "زمان", liveCollaboration: "هاوکاریکردنی زیندو...", duplicateSelection: "لەبەرگرتنەوە", untitled: "بێ ناونیشان", name: "ناو", yourName: "ناوەکەت", madeWithExcalidraw: "دروستکراوە بە Excalidraw", group: "دیاریکردنی گروپ", ungroup: "گروپی دیاریکراوەکان لابەرە", collaborators: "هاوکارەکان", showGrid: "گرید نیشانبدە", addToLibrary: "زیادکردن بۆ کتێبخانە", removeFromLibrary: "لابردن لە کتێبخانە", libraryLoadingMessage: "...بارکردنی کتێبخانە", libraries: "گەڕانی کتێبخانە", loadingScene: "...بارکردنی دیمەنەکە", align: "لاچەنکردن", alignTop: "لاچەنکردن بۆ سەرەوە", alignBottom: "لاچەنکردن بۆ خوارەوە", alignLeft: "لاچەنکردن بۆ چەپ", alignRight: "لاچەنکردن بۆ ڕاست", centerVertically: "بە ستونی ناوەند بکە", centerHorizontally: "بە ئاسۆی ناوەند بکە", distributeHorizontally: "بە ئاسۆی دابەشی بکە", distributeVertically: "بە ستونی دابەشی بکە", flipHorizontal: "هەڵگەڕانەوەی ئاسۆیی", flipVertical: "هەڵگەڕانەوەی ستونی", viewMode: "دۆخی بینین", share: "هاوبەشی پێکردن", showStroke: "ڕەنگهەڵگری هێڵکار نیشانبدە", showBackground: "ڕەنگهەڵگری باکگراوند نیشانبدە", toggleTheme: "دۆخی ڕوکار بگۆڕە", personalLib: "کتێبخانەی کەسی", excalidrawLib: "کتێبخانەی Excalidraw", decreaseFontSize: "کەمکردنەوەی قەبارەی فۆنت", increaseFontSize: "زایدکردنی قەبارەی فۆنت", unbindText: "دەقەکە جیابکەرەوە", bindText: "دەقەکە ببەستەوە بە کۆنتەینەرەکەوە", createContainerFromText: "دەق لە چوارچێوەیەکدا بپێچە", link: { edit: "دەستکاریکردنی بەستەر", editEmbed: "", create: "دروستکردنی بەستەر", createEmbed: "", label: "بەستەر", labelEmbed: "", empty: "" }, lineEditor: { edit: "دەستکاری کردنی دێڕ", exit: "دەرچوون لە دەستکاریکەری دێڕ" }, elementLock: { lock: "قفڵکردن", unlock: "کردنەوە", lockAll: "قفڵکردنی هەموو", unlockAll: "کردنەوەی قفلی هەمووی" }, statusPublished: "بڵاوکراوەتەوە", sidebarLock: "هێشتنەوەی شریتی لا بە کراوەیی", selectAllElementsInFrame: "هەموو توخمەکانی ناو چوارچێوەکە دیاری بکە", removeAllElementsFromFrame: "هەموو توخمەکانی ناو چوارچێوەکە لابەرە", eyeDropper: "ڕەنگێک لەسەر تابلۆکە هەڵبژێرە", textToDiagram: "", prompt: "" }, C = { noItems: "هێشتا هیچ بڕگەیەک زیاد نەکراوە...", hint_emptyLibrary: "شتێک لەسەر تابلۆ هەڵبژێرە بۆ ئەوەی لێرە زیادی بکەیت، یان کتێبخانەیەک لە کۆگا گشتیەکەوە دابمەزرێنە، لە خوارەوە.", hint_emptyPrivateLibrary: "شتێک لەسەر تابلۆ هەڵبژێرە بۆ ئەوەی لێرە زیادی بکەیت." }, D = { clearReset: "تابلۆکە وەک سەرەتا لێبکەوە", exportJSON: "هەناردەکردن بۆ فایل", exportImage: "وێنە هەناردە بکە...", export: "پاشەکەوت بکە بۆ...", copyToClipboard: "له‌به‌ری بگره‌وه‌ بۆ ته‌خته‌نووس", save: "پاشەکەوت بکە بۆ فایلی بەردەست", saveAs: "پاشەکەوتکردن وەک", load: "بکەرەوە", getShareableLink: "بەستەری هاوبەشیپێکردن بەدەستبهێنە", close: "داخستن", selectLanguage: "دیاریکردنی زمان", scrollBackToContent: "گەڕاندنەوە بۆ ناوەڕۆک", zoomIn: "نزیک خستنەوە", zoomOut: "دوورخستنەوە", resetZoom: "ڕێستکردنی زووم", menu: "پێڕست", done: "تەواو", edit: "دەستکاری کردن", undo: "گه‌ڕانه‌وه‌ بۆ پێشوو", redo: "گه‌ڕانه‌وه‌ بۆ داهاتوو", resetLibrary: "ڕێکخستنەوەی کتێبخانە", createNewRoom: "ژوورێکی نوێ دروست بکە", fullScreen: "پڕ بە شاشە", darkMode: "دۆخی تاریک", lightMode: "دۆخی ڕووناک", zenMode: "دۆخی زێن", objectsSnapMode: "", exitZenMode: "بەجێهێشتنی دۆخی زێن", cancel: "هەڵوەشاندنەوە", clear: "خاوێنکردنەوە", remove: "لابردن", embed: "", publishLibrary: "بڵاوکردنەوە", submit: "پێشکەشکردن", confirm: "دوپاتکردنەوە", embeddableInteractionButton: "" }, A = { clearReset: "ئەمە هەموو تابلۆکە خاوێن دەکاتەوە، دڵنیایت؟", couldNotCreateShareableLink: "نەتوانرا بەستەری هاوبەشیپێکردن دروستبکرێت", couldNotCreateShareableLinkTooBig: "نەتوانرا بەستەری هاوبەشیپێکردن دروستبکرێت: دیمەنەکە زۆر گەورەیە", couldNotLoadInvalidFile: "ناتوانرا باربکرێت، فایلەکە دروستنییە", importBackendFailed: "هاوردەکردن لە پاشکۆکە سەرکەوتوو نەبوو.", cannotExportEmptyCanvas: "ناتوانرێت تابلۆی بەتاڵ هەناردەبکرێت.", couldNotCopyToClipboard: "ناتوانرا لەبەربگیرێتەوە بۆ تەختەنوس", decryptFailed: "ناتوانرا داتاکان شیبکرێتەوە", uploadedSecurly: "بارکردنەکە بە کۆدکردنی کۆتایی بۆ کۆتایی پارێزراوە، ئەمەش واتە سێرڤەری Excalidraw و لایەنی سێیەم ناتوانن ناوەڕۆکەکە بخوێننەوە.", loadSceneOverridePrompt: "بارکردنی وێنەکێشانی دەرەکی جێگەی ناوەڕۆکی بەردەستت دەگرێتەوە. دەتەوێت بەردەوام بیت؟", collabStopOverridePrompt: `وەستاندنی دانیشتنەکە وێنەکێشانی پێشووت دەنووسێتەوە کە لە ناوخۆدا هەڵگیراوە. ئایا دڵنیایت?
3
3
 
4
4
  (ئەگەر دەتەوێت وێنەکێشانی ناوخۆیی خۆت بهێڵیتەوە، لەبری ئەوە تەنها تابی وێبگەڕەکە دابخە).`, errorAddingToLibrary: "نەیتوانی بڕگە زیاد بکات بۆ کتێبخانە", errorRemovingFromLibrary: "نەیتوانی بڕگە لە کتێبخانە بسڕێتەوە", confirmAddLibrary: "ئەمە {{numShapes}} شێوە(ەکان) زیاد دەکات بۆ کتێبخانەکەت. ئایا دڵنیایت?", imageDoesNotContainScene: "وادیارە ئەم وێنەیە هیچ داتایەکی دیمەنی تێدا نییە. ئایا دیمەنی چەسپاندنت لە کاتی هەناردەدا چالاک کردووە؟", cannotRestoreFromImage: "ناتوانرێت دیمەنەکە بگەڕێندرێتەوە لەم فایلە وێنەیە", invalidSceneUrl: 'ناتوانێت دیمەنەکە هاوردە بکات لە URL ی دابینکراو. یان نادروستە، یان داتای "ئێکسکالیدراو" JSON ی دروستی تێدا نییە.', resetLibrary: "ئەمە کتێبخانەکەت خاوێن دەکاتەوە. ئایا دڵنیایت?", removeItemsFromsLibrary: "سڕینەوەی {{count}} ئایتم(ەکان) لە کتێبخانە؟", invalidEncryptionKey: "کلیلی رەمزاندن دەبێت لە 22 پیت بێت. هاوکاری ڕاستەوخۆ لە کارخراوە.", collabOfflineWarning: `هێڵی ئینتەرنێت بەردەست نییە.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var s=async(t=[{}])=>(Array.isArray(t)||(t=[t]),new Promise((n,c)=>{const e=document.createElement("input");e.type="file";const r=[...t.map(i=>i.mimeTypes||[]),...t.map(i=>i.extensions||[])].join();e.multiple=t[0].multiple||!1,e.accept=r||"";const a=i=>{typeof l=="function"&&l(),n(i)},l=t[0].legacySetup&&t[0].legacySetup(a,()=>l(c),e);e.addEventListener("change",()=>{a(e.multiple?Array.from(e.files):e.files[0])}),e.click()}));exports.default=s;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.rVltGhk6.js");require("./layers.C_CX4lOf.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let U=0,z=0;for(const{source:F,value:K}of v.targetLinks){let q=K*(v.layer-F.layer);U+=M(F,v)*q,z+=q}if(!(z>0))continue;let W=(U/z-v.y0)*f;v.y0+=W,v.y1+=W,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let U=0,z=0;for(const{target:F,value:K}of v.sourceLinks){let q=K*(F.layer-v.layer);U+=R(v,F)*q,z+=q}if(!(z>0))continue;let W=(U/z-v.y0)*f;v.y0+=W,v.y1+=W,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function R(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,R,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),R=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof R<"u")return R;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,b[m]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],V={};const zt=()=>{X=[],Q=[],V={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const Vt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Rt{constructor(n){this.ID=n}}const Ut=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),V[t]||(V[t]=new Rt(t),Q.push(V[t])),V[t]),Wt=()=>Q,Ft=()=>X,qt=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:V,getConfig:()=>L.getConfig().sankey,getNodes:Wt,getLinks:Ft,getGraph:qt,addLink:Vt,findOrCreateNode:Ut,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
7
+ ${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;
@@ -1,10 +1,10 @@
1
- import { f as o, p as a } from "./layers.TdTDbIzb.js";
2
- import { f as t, a as e } from "./layers.DsDjOLHs.js";
3
- import { x as s } from "./layers.jU4W5PG5.js";
1
+ import { f as o, p as a } from "./layers.cttu3sFt.js";
2
+ import { f as t, a as e } from "./layers.CHKv58R7.js";
3
+ import { x as s } from "./layers.2TEubI7B.js";
4
4
  import "lodash-es";
5
5
  import "./layers.BJDrjORS.js";
6
6
  import "./layers.D4T8fTcj.js";
7
- import "./layers.C5WLg9ed.js";
7
+ import "./layers.Ckt3zLwN.js";
8
8
  const h = {
9
9
  parser: a,
10
10
  db: o,
@@ -0,0 +1,61 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.rVltGhk6.js");require("./layers.C_CX4lOf.js");const Y=require("./layers.BjdYJwx4.js");var J=(function(){var n=function(f,i,r,c){for(r=r||{},c=f.length;c--;r[f[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],g={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(i,r,c,d,u,o,I){var b=o.length-1;switch(u){case 1:return o[b-1];case 2:this.$=[];break;case 3:o[b-1].push(o[b]),this.$=o[b-1];break;case 4:case 5:this.$=o[b];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[b].substr(6)),this.$=o[b].substr(6);break;case 9:this.$=o[b].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[b].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[b].substr(8)),this.$=o[b].substr(8);break;case 15:d.addTask(o[b],0,""),this.$=o[b];break;case 16:d.addEvent(o[b].substr(2)),this.$=o[b];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],d=[],u=[null],o=[],I=this.table,b="",$=0,W=0,C=2,P=1,B=o.slice.call(arguments,1),v=Object.create(this.lexer),S={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(S.yy[w]=this.yy[w]);v.setInput(i,S.yy),S.yy.lexer=v,S.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var T=v.yylloc;o.push(T);var A=v.options&&v.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=d.pop()||v.lex()||P,typeof M!="number"&&(M instanceof Array&&(d=M,M=d.pop()),M=r.symbols_[M]||M),M}for(var k,L,E,U,R={},O,N,X,j;;){if(L=c[c.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=z()),E=I[L]&&I[L][k]),typeof E>"u"||!E.length||!E[0]){var Z="";j=[];for(O in I[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");v.showPosition?Z="Parse error on line "+($+1)+`:
2
+ `+v.showPosition()+`
3
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+($+1)+": Unexpected "+(k==P?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:v.match,token:this.terminals_[k]||k,line:v.yylineno,loc:T,expected:j})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+k);switch(E[0]){case 1:c.push(k),u.push(v.yytext),o.push(v.yylloc),c.push(E[1]),k=null,W=v.yyleng,b=v.yytext,$=v.yylineno,T=v.yylloc;break;case 2:if(N=this.productions_[E[1]][1],R.$=u[u.length-N],R._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},A&&(R._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),U=this.performAction.apply(R,[b,W,$,S.yy,E[1],u,o].concat(B)),typeof U<"u")return U;N&&(c=c.slice(0,-1*N*2),u=u.slice(0,-1*N),o=o.slice(0,-1*N)),c.push(this.productions_[E[1]][0]),u.push(R.$),o.push(R._$),X=I[c[c.length-2]][c[c.length-1]],c.push(X);break;case 3:return!0}}return!0}},_=(function(){var f={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+r+"^"},test_match:function(i,r){var c,d,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var o in u)this[o]=u[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,c,d;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),o=0;o<u.length;o++)if(c=this._input.match(this.rules[u[o]]),c&&(!r||c[0].length>r[0].length)){if(r=c,d=o,this.options.backtrack_lexer){if(i=this.test_match(c,u[o]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,u[d]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,c,d,u){switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/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,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f})();g.lexer=_;function m(){this.yy={}}return m.prototype=g,g.Parser=m,new m})();J.parser=J;const yt=J;let F="",nt=0;const K=[],q=[],V=[],st=()=>x.commonDb,it=function(){K.length=0,q.length=0,F="",V.length=0,x.clear()},rt=function(n){F=n,K.push(n)},at=function(){return K},lt=function(){let n=D();const t=100;let e=0;for(;!n&&e<t;)n=D(),e++;return q.push(...V),q},ot=function(n,t,e){const a={id:nt++,section:F,type:F,task:n,score:t||0,events:e?[e]:[]};V.push(a)},ct=function(n){V.find(e=>e.id===nt-1).events.push(n)},ht=function(n){const t={section:F,type:F,description:n,task:n,classes:[]};q.push(t)},D=function(){const n=function(e){return V[e].processed};let t=!0;for(const[e,a]of V.entries())n(e),t=t&&a.processed;return t},gt={clear:it,getCommonDb:st,addSection:rt,getSections:at,getTasks:lt,addTask:ot,addTaskOrg:ht,addEvent:ct},ft=Object.freeze(Object.defineProperty({__proto__:null,addEvent:ct,addSection:rt,addTask:ot,addTaskOrg:ht,clear:it,default:gt,getCommonDb:st,getSections:at,getTasks:lt},Symbol.toStringTag,{value:"Module"})),mt=12,G=function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},xt=function(n,t){const a=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=n.append("g");s.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(y){const g=Y.arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function l(y){const g=Y.arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function p(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return t.score>3?h(s):t.score<3?l(s):p(s),a},bt=function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},dt=function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),a=n.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),a},_t=function(n,t){function e(s,h,l,p,y){return s+","+h+" "+(s+l)+","+h+" "+(s+l)+","+(h+p-y)+" "+(s+l-y*1.2)+","+(h+p)+" "+s+","+(h+p)}const a=n.append("polygon");a.attr("points",e(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,dt(n,t)},kt=function(n,t,e){const a=n.append("g"),s=Q();s.x=t.x,s.y=t.y,s.fill=t.fill,s.width=e.width,s.height=e.height,s.class="journey-section section-type-"+t.num,s.rx=3,s.ry=3,G(a,s),ut(e)(t.text,a,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+t.num},e,t.colour)};let tt=-1;const vt=function(n,t,e){const a=t.x+e.width/2,s=n.append("g");tt++,s.append("line").attr("id","task"+tt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(s,{cx:a,cy:300+(5-t.score)*30,score:t.score});const l=Q();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=e.width,l.height=e.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,G(s,l),t.x+14,ut(e)(t.task,s,l.x,l.y,l.width,l.height,{class:"task"},e,t.colour)},wt=function(n,t){G(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},St=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},Q=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},ut=(function(){function n(s,h,l,p,y,g,_,m){const f=h.append("text").attr("x",l+y/2).attr("y",p+g/2+5).style("font-color",m).style("text-anchor","middle").text(s);a(f,_)}function t(s,h,l,p,y,g,_,m,f){const{taskFontSize:i,taskFontFamily:r}=m,c=s.split(/<br\s*\/?>/gi);for(let d=0;d<c.length;d++){const u=d*i-i*(c.length-1)/2,o=h.append("text").attr("x",l+y/2).attr("y",p).attr("fill",f).style("text-anchor","middle").style("font-size",i).style("font-family",r);o.append("tspan").attr("x",l+y/2).attr("dy",u).text(c[d]),o.attr("y",p+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(o,_)}}function e(s,h,l,p,y,g,_,m){const f=h.append("switch"),r=f.append("foreignObject").attr("x",l).attr("y",p).attr("width",y).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");r.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),t(s,f,l,p,y,g,_,m),a(r,_)}function a(s,h){for(const l in h)l in h&&s.attr(l,h[l])}return function(s){return s.textPlacement==="fo"?e:s.textPlacement==="old"?n:t}})(),Et=function(n){n.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};function pt(n,t){n.each(function(){var e=x.select(this),a=e.text().split(/(\s+|<br>)/).reverse(),s,h=[],l=1.1,p=e.attr("y"),y=parseFloat(e.attr("dy")),g=e.text(null).append("tspan").attr("x",0).attr("y",p).attr("dy",y+"em");for(let _=0;_<a.length;_++)s=a[a.length-1-_],h.push(s),g.text(h.join(" ").trim()),(g.node().getComputedTextLength()>t||s==="<br>")&&(h.pop(),g.text(h.join(" ").trim()),s==="<br>"?h=[""]:h=[s],g=e.append("tspan").attr("x",0).attr("y",p).attr("dy",l+"em").text(s))})}const $t=function(n,t,e,a){const s=e%mt-1,h=n.append("g");t.section=s,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+s));const l=h.append("g"),p=h.append("g"),g=p.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),_=a.fontSize&&a.fontSize.replace?a.fontSize.replace("px",""):a.fontSize;return t.height=g.height+_*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,p.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),It(l,t,s),t},Tt=function(n,t,e){const a=n.append("g"),h=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),l=e.fontSize&&e.fontSize.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),h.height+l*1.1*.5+t.padding},It=function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},H={drawRect:G,drawCircle:bt,drawSection:kt,drawText:dt,drawLabel:_t,drawTask:vt,drawBackgroundRect:wt,getTextObj:St,getNoteRect:Q,initGraphics:Et,drawNode:$t,getVirtualNodeHeight:Tt},Nt=function(n,t,e,a){var s,h;const l=x.getConfig(),p=l.leftMargin??50;x.log$1.debug("timeline",a.db);const y=l.securityLevel;let g;y==="sandbox"&&(g=x.select("#i"+t));const m=(y==="sandbox"?x.select(g.nodes()[0].contentDocument.body):x.select("body")).select("#"+t);m.append("g");const f=a.db.getTasks(),i=a.db.getCommonDb().getDiagramTitle();x.log$1.debug("task",f),H.initGraphics(m);const r=a.db.getSections();x.log$1.debug("sections",r);let c=0,d=0,u=0,o=0,I=50+p,b=50;o=50;let $=0,W=!0;r.forEach(function(S){const w={number:$,descr:S,section:$,width:150,padding:20,maxHeight:c},T=H.getVirtualNodeHeight(m,w,l);x.log$1.debug("sectionHeight before draw",T),c=Math.max(c,T+20)});let C=0,P=0;x.log$1.debug("tasks.length",f.length);for(const[S,w]of f.entries()){const T={number:S,descr:w,section:w.section,width:150,padding:20,maxHeight:d},A=H.getVirtualNodeHeight(m,T,l);x.log$1.debug("taskHeight before draw",A),d=Math.max(d,A+20),C=Math.max(C,w.events.length);let z=0;for(let k=0;k<w.events.length;k++){const E={descr:w.events[k],section:w.section,number:w.section,width:150,padding:20,maxHeight:50};z+=H.getVirtualNodeHeight(m,E,l)}P=Math.max(P,z)}x.log$1.debug("maxSectionHeight before draw",c),x.log$1.debug("maxTaskHeight before draw",d),r&&r.length>0?r.forEach(S=>{const w=f.filter(k=>k.section===S),T={number:$,descr:S,section:$,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:c};x.log$1.debug("sectionNode",T);const A=m.append("g"),z=H.drawNode(A,T,$,l);x.log$1.debug("sectionNode output",z),A.attr("transform",`translate(${I}, ${o})`),b+=c+50,w.length>0&&et(m,w,$,I,b,d,l,C,P,c,!1),I+=200*Math.max(w.length,1),b=o,$++}):(W=!1,et(m,f,$,I,b,d,l,C,P,c,!0));const B=m.node().getBBox();x.log$1.debug("bounds",B),i&&m.append("text").text(i).attr("x",B.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),u=W?c+d+150:d+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",u).attr("x2",B.width+3*p).attr("y2",u).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),x.setupGraphViewbox$1(void 0,m,((s=l.timeline)==null?void 0:s.padding)??50,((h=l.timeline)==null?void 0:h.useMaxWidth)??!1)},et=function(n,t,e,a,s,h,l,p,y,g,_){var m;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};x.log$1.debug("taskNode",i);const r=n.append("g").attr("class","taskWrapper"),d=H.drawNode(r,i,e,l).height;if(x.log$1.debug("taskHeight after draw",d),r.attr("transform",`translate(${a}, ${s})`),h=Math.max(h,d),f.events){const u=n.append("g").attr("class","lineWrapper");let o=h;s+=100,o=o+Mt(n,f.events,e,a,s,l),s-=100,u.append("line").attr("x1",a+190/2).attr("y1",s+h).attr("x2",a+190/2).attr("y2",s+h+(_?h:g)+y+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a=a+200,_&&!((m=l.timeline)!=null&&m.disableMulticolor)&&e++}s=s-10},Mt=function(n,t,e,a,s,h){let l=0;const p=s;s=s+100;for(const y of t){const g={descr:y,section:e,number:e,width:150,padding:20,maxHeight:50};x.log$1.debug("eventNode",g);const _=n.append("g").attr("class","eventWrapper"),f=H.drawNode(_,g,e,h).height;l=l+f,_.attr("transform",`translate(${a}, ${s})`),s=s+10+f}return s=p,l},Lt={setConf:()=>{},draw:Nt},Pt=n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],x.isDark(n["lineColor"+e])?n["lineColor"+e]=x.lighten(n["lineColor"+e],20):n["lineColor"+e]=x.darken(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const a=""+(17-3*e);t+=`
7
+ .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
8
+ fill: ${n["cScale"+e]};
9
+ }
10
+ .section-${e-1} text {
11
+ fill: ${n["cScaleLabel"+e]};
12
+ }
13
+ .node-icon-${e-1} {
14
+ font-size: 40px;
15
+ color: ${n["cScaleLabel"+e]};
16
+ }
17
+ .section-edge-${e-1}{
18
+ stroke: ${n["cScale"+e]};
19
+ }
20
+ .edge-depth-${e-1}{
21
+ stroke-width: ${a};
22
+ }
23
+ .section-${e-1} line {
24
+ stroke: ${n["cScaleInv"+e]} ;
25
+ stroke-width: 3;
26
+ }
27
+
28
+ .lineWrapper line{
29
+ stroke: ${n["cScaleLabel"+e]} ;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ `}return t},At=n=>`
39
+ .edge {
40
+ stroke-width: 3;
41
+ }
42
+ ${Pt(n)}
43
+ .section-root rect, .section-root path, .section-root circle {
44
+ fill: ${n.git0};
45
+ }
46
+ .section-root text {
47
+ fill: ${n.gitBranchLabel0};
48
+ }
49
+ .icon-container {
50
+ height:100%;
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ }
55
+ .edge {
56
+ fill: none;
57
+ }
58
+ .eventWrapper {
59
+ filter: brightness(120%);
60
+ }
61
+ `,Ht=At,Ct={db:ft,renderer:Lt,parser:yt,styles:Ht};exports.diagram=Ct;
@@ -0,0 +1,122 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./layers.rVltGhk6.js"),Ht=require("./layers.C_CX4lOf.js"),et=require("./layers.KFb7ZtXM.js");var St=(function(){var t=function(ct,v,k,L){for(k=k||{},L=ct.length;L--;k[ct[L]]=v);return k},e=[1,2],o=[1,3],s=[1,4],r=[2,4],n=[1,9],c=[1,11],l=[1,13],u=[1,14],i=[1,16],m=[1,17],T=[1,18],g=[1,24],x=[1,25],w=[1,26],_=[1,27],I=[1,28],O=[1,29],S=[1,30],V=[1,31],R=[1,32],W=[1,33],z=[1,34],G=[1,35],Q=[1,36],q=[1,37],H=[1,38],Y=[1,39],F=[1,41],X=[1,42],K=[1,43],J=[1,44],$=[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],Z=[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],tt=[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],Bt=[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],ot=[68,69,70],rt=[1,120],kt={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(v,k,L,b,M,h,mt){var d=h.length-1;switch(M){case 3:return b.apply(h[d]),h[d];case 4:case 9:this.$=[];break;case 5:case 10:h[d-1].push(h[d]),this.$=h[d-1];break;case 6:case 7:case 11:case 12:this.$=h[d];break;case 8:case 13:this.$=[];break;case 15:h[d].type="createParticipant",this.$=h[d];break;case 16: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];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(h[d-2]),sequenceIndexStep:Number(h[d-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(h[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:h[d-1]};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:h[d-1]};break;case 29:b.setDiagramTitle(h[d].substring(6)),this.$=h[d].substring(6);break;case 30:b.setDiagramTitle(h[d].substring(7)),this.$=h[d].substring(7);break;case 31:this.$=h[d].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=h[d].trim(),b.setAccDescription(this.$);break;case 34: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];break;case 35: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];break;case 36: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];break;case 37: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];break;case 38: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];break;case 39: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];break;case 40: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];break;case 41: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];break;case 43:this.$=h[d-3].concat([{type:"option",optionText:b.parseMessage(h[d-1]),signalType:b.LINETYPE.CRITICAL_OPTION},h[d]]);break;case 45:this.$=h[d-3].concat([{type:"and",parText:b.parseMessage(h[d-1]),signalType:b.LINETYPE.PAR_AND},h[d]]);break;case 47:this.$=h[d-3].concat([{type:"else",altText:b.parseMessage(h[d-1]),signalType:b.LINETYPE.ALT_ELSE},h[d]]);break;case 48:h[d-3].draw="participant",h[d-3].type="addParticipant",h[d-3].description=b.parseMessage(h[d-1]),this.$=h[d-3];break;case 49:h[d-1].draw="participant",h[d-1].type="addParticipant",this.$=h[d-1];break;case 50:h[d-3].draw="actor",h[d-3].type="addParticipant",h[d-3].description=b.parseMessage(h[d-1]),this.$=h[d-3];break;case 51:h[d-1].draw="actor",h[d-1].type="addParticipant",this.$=h[d-1];break;case 52:h[d-1].type="destroyParticipant",this.$=h[d-1];break;case 53:this.$=[h[d-1],{type:"addNote",placement:h[d-2],actor:h[d-1].actor,text:h[d]}];break;case 54: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]}];break;case 55:this.$=[h[d-1],{type:"addLinks",actor:h[d-1].actor,text:h[d]}];break;case 56:this.$=[h[d-1],{type:"addALink",actor:h[d-1].actor,text:h[d]}];break;case 57:this.$=[h[d-1],{type:"addProperties",actor:h[d-1].actor,text:h[d]}];break;case 58:this.$=[h[d-1],{type:"addDetails",actor:h[d-1].actor,text:h[d]}];break;case 61:this.$=[h[d-2],h[d]];break;case 62:this.$=h[d];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[h[d-4],h[d-1],{type:"addMessage",from:h[d-4].actor,to:h[d-1].actor,signalType:h[d-3],msg:h[d],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:h[d-1]}];break;case 66:this.$=[h[d-4],h[d-1],{type:"addMessage",from:h[d-4].actor,to:h[d-1].actor,signalType:h[d-3],msg:h[d]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:h[d-4]}];break;case 67: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]}];break;case 68:this.$={type:"addParticipant",actor:h[d]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.DOTTED;break;case 73:this.$=b.LINETYPE.SOLID_CROSS;break;case 74:this.$=b.LINETYPE.DOTTED_CROSS;break;case 75:this.$=b.LINETYPE.SOLID_POINT;break;case 76:this.$=b.LINETYPE.DOTTED_POINT;break;case 77:this.$=b.parseMessage(h[d].trim().substring(1));break}},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],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:c,8:8,9:10,12:12,13:l,14:u,17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},t(y,[2,5]),{9:47,12:12,13:l,14:u,17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:q,52:H,53:Y},{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(Z,r,{7:97}),t(Z,r,{7:98}),t(Z,r,{7:99}),t(tt,r,{40:100,7:101}),t(A,r,{42:102,7:103}),t(A,r,{7:103,42:104}),t(Bt,r,{45:105,7:106}),t(Z,r,{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(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),{22:116,70:N},{22:118,58:117,70:N},{70:[2,63]},{70:[2,64]},{56:119,79:rt},{56:121,79:rt},{56:122,79:rt},{56:123,79:rt},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:q,52:H,53:Y},{5:[1,129]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[1,130],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[1,131],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[1,132],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},{16:[1,133]},{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[2,46],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,49:[1,134],50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},{16:[1,135]},{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[2,44],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,48:[1,136],50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},{16:[1,137]},{16:[1,138]},{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[2,42],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,47:[1,139],50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,70:N},{4:n,5:c,8:8,9:10,12:12,13:l,14:u,16:[1,140],17:15,18:i,21:m,22:40,23:T,24:19,25:20,26:21,27:22,28:23,29:g,30:x,31:w,33:_,35:I,36:O,37:S,38:V,39:R,41:W,43:z,44:G,46:Q,50:q,52:H,53:Y,54:F,59:X,60:K,61:J,62:$,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:rt},{56:146,79:rt},{56:147,79:rt},{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:q,52:H,53:Y},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:rt},{56:156,79:rt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:N},t(P,[2,11]),t(tt,r,{7:101,40:158}),t(A,r,{7:103,42:159}),t(Bt,r,{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]}],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]},parseError:function(v,k){if(k.recoverable)this.trace(v);else{var L=new Error(v);throw L.hash=k,L}},parse:function(v){var k=this,L=[0],b=[],M=[null],h=[],mt=this.table,d="",bt=0,Yt=0,ae=2,Ft=1,oe=h.slice.call(arguments,1),B=Object.create(this.lexer),lt={yy:{}};for(var Lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Lt)&&(lt.yy[Lt]=this.yy[Lt]);B.setInput(v,lt.yy),lt.yy.lexer=B,lt.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var It=B.yylloc;h.push(It);var ce=B.options&&B.options.ranges;typeof lt.yy.parseError=="function"?this.parseError=lt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(){var at;return at=b.pop()||B.lex()||Ft,typeof at!="number"&&(at instanceof Array&&(b=at,at=b.pop()),at=k.symbols_[at]||at),at}for(var U,ht,j,At,gt={},Et,nt,Wt,wt;;){if(ht=L[L.length-1],this.defaultActions[ht]?j=this.defaultActions[ht]:((U===null||typeof U>"u")&&(U=le()),j=mt[ht]&&mt[ht][U]),typeof j>"u"||!j.length||!j[0]){var Nt="";wt=[];for(Et in mt[ht])this.terminals_[Et]&&Et>ae&&wt.push("'"+this.terminals_[Et]+"'");B.showPosition?Nt="Parse error on line "+(bt+1)+`:
2
+ `+B.showPosition()+`
3
+ Expecting `+wt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":Nt="Parse error on line "+(bt+1)+": Unexpected "+(U==Ft?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(Nt,{text:B.match,token:this.terminals_[U]||U,line:B.yylineno,loc:It,expected:wt})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+U);switch(j[0]){case 1:L.push(U),M.push(B.yytext),h.push(B.yylloc),L.push(j[1]),U=null,Yt=B.yyleng,d=B.yytext,bt=B.yylineno,It=B.yylloc;break;case 2:if(nt=this.productions_[j[1]][1],gt.$=M[M.length-nt],gt._$={first_line:h[h.length-(nt||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(nt||1)].first_column,last_column:h[h.length-1].last_column},ce&&(gt._$.range=[h[h.length-(nt||1)].range[0],h[h.length-1].range[1]]),At=this.performAction.apply(gt,[d,Yt,bt,lt.yy,j[1],M,h].concat(oe)),typeof At<"u")return At;nt&&(L=L.slice(0,-1*nt*2),M=M.slice(0,-1*nt),h=h.slice(0,-1*nt)),L.push(this.productions_[j[1]][0]),M.push(gt.$),h.push(gt._$),Wt=mt[L[L.length-2]][L[L.length-1]],L.push(Wt);break;case 3:return!0}}return!0}},ne=(function(){var ct={EOF:1,parseError:function(k,L){if(this.yy.parser)this.yy.parser.parseError(k,L);else throw new Error(k)},setInput:function(v,k){return this.yy=k||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var k=v.match(/(?:\r\n?|\n).*/g);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),v},unput:function(v){var k=v.length,L=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===b.length?this.yylloc.first_column:0)+b[b.length-L.length].length-L[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(v){this.unput(this.match.slice(v))},pastInput:function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var v=this.pastInput(),k=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
5
+ `+k+"^"},test_match:function(v,k){var L,b,M;if(this.options.backtrack_lexer&&(M={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(M.yylloc.range=this.yylloc.range.slice(0))),b=v[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,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(v[0].length),this.matched+=v[0],L=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var h in M)this[h]=M[h];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,k,L,b;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),h=0;h<M.length;h++)if(L=this._input.match(this.rules[M[h]]),L&&(!k||L[0].length>k[0].length)){if(k=L,b=h,this.options.backtrack_lexer){if(v=this.test_match(L,M[h]),v!==!1)return v;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(v=this.test_match(k,M[b]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(k,L,b,M){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return L.yytext=L.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return L.yytext=L.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 71;case 56:return 72;case 57:return 75;case 58:return 76;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 68;case 63:return 69;case 64:return 5;case 65:return"INVALID"}},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],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}}};return ct})();kt.lexer=ne;function Pt(){this.yy={}}return Pt.prototype=kt,kt.Parser=Pt,new Pt})();St.parser=St;const he=St;class de{constructor(e){this.init=e,this.records=this.init()}reset(){this.records=this.init()}}const E=new de(()=>({prevActor:void 0,actors:{},createdActors:{},destroyedActors:{},boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),pe=function(t){E.records.boxes.push({name:t.text,wrap:t.wrap===void 0&&pt()||!!t.wrap,fill:t.color,actorKeys:[]}),E.records.currentBox=E.records.boxes.slice(-1)[0]},Mt=function(t,e,o,s){let r=E.records.currentBox;const n=E.records.actors[t];if(n){if(E.records.currentBox&&n.box&&E.records.currentBox!==n.box)throw new Error("A same participant should only be defined in one Box: "+n.name+" can't be in '"+n.box.name+"' and in '"+E.records.currentBox.name+"' at the same time.");if(r=n.box?n.box:E.records.currentBox,n.box=r,n&&e===n.name&&o==null)return}(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]={box:r,name:e,description:o.text,wrap:o.wrap===void 0&&pt()||!!o.wrap,prevActor:E.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s||"participant"},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},ue=t=>{let e,o=0;for(e=0;e<E.records.messages.length;e++)E.records.messages[e].type===yt.ACTIVE_START&&E.records.messages[e].from.actor===t&&o++,E.records.messages[e].type===yt.ACTIVE_END&&E.records.messages[e].from.actor===t&&o--;return o},ge=function(t,e,o,s){E.records.messages.push({from:t,to:e,message:o.text,wrap:o.wrap===void 0&&pt()||!!o.wrap,answer:s})},C=function(t,e,o={text:void 0,wrap:void 0},s,r=!1){if(s===yt.ACTIVE_END&&ue(t.actor)<1){let c=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw c.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return E.records.messages.push({from:t,to:e,message:o.text,wrap:o.wrap===void 0&&pt()||!!o.wrap,type:s,activate:r}),!0},fe=function(){return E.records.boxes.length>0},xe=function(){return E.records.boxes.some(t=>t.name)},me=function(){return E.records.messages},ye=function(){return E.records.boxes},Te=function(){return E.records.actors},be=function(){return E.records.createdActors},Ee=function(){return E.records.destroyedActors},Tt=function(t){return E.records.actors[t]},we=function(){return Object.keys(E.records.actors)},ve=function(){E.records.sequenceNumbersEnabled=!0},_e=function(){E.records.sequenceNumbersEnabled=!1},ke=()=>E.records.sequenceNumbersEnabled,Pe=function(t){E.records.wrapEnabled=t},pt=()=>E.records.wrapEnabled!==void 0?E.records.wrapEnabled:p.getConfig().sequence.wrap,Le=function(){E.reset(),p.clear()},Ie=function(t){const e=t.trim(),o={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return p.log$1.debug("parseMessage:",o),o},Ae=function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let o=e!=null&&e[1]?e[1].trim():"transparent",s=e!=null&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",o)||(o="transparent",s=t.trim());else{const r=new Option().style;r.color=o,r.color!==o&&(o="transparent",s=t.trim())}return{color:o,text:s!==void 0?p.sanitizeText$2(s.replace(/^:?(?:no)?wrap:/,""),p.getConfig()):void 0,wrap:s!==void 0?s.match(/^:?wrap:/)!==null?!0:s.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},yt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},Ne={FILLED:0,OPEN:1},Se={LEFTOF:0,RIGHTOF:1,OVER:2},Kt=function(t,e,o){const s={actor:t,placement:e,message:o.text,wrap:o.wrap===void 0&&pt()||!!o.wrap},r=[].concat(t,t);E.records.notes.push(s),E.records.messages.push({from:r[0],to:r[1],message:o.text,wrap:o.wrap===void 0&&pt()||!!o.wrap,type:yt.NOTE,placement:e})},Ut=function(t,e){const o=Tt(t);try{let s=p.sanitizeText$2(e.text,p.getConfig());s=s.replace(/&amp;/g,"&"),s=s.replace(/&equals;/g,"=");const r=JSON.parse(s);Dt(o,r)}catch(s){p.log$1.error("error while parsing actor link text",s)}},Me=function(t,e){const o=Tt(t);try{const c={};let l=p.sanitizeText$2(e.text,p.getConfig());var s=l.indexOf("@");l=l.replace(/&amp;/g,"&"),l=l.replace(/&equals;/g,"=");var r=l.slice(0,s-1).trim(),n=l.slice(s+1).trim();c[r]=n,Dt(o,c)}catch(c){p.log$1.error("error while parsing actor link text",c)}};function Dt(t,e){if(t.links==null)t.links=e;else for(let o in e)t.links[o]=e[o]}const Gt=function(t,e){const o=Tt(t);try{let s=p.sanitizeText$2(e.text,p.getConfig());const r=JSON.parse(s);Xt(o,r)}catch(s){p.log$1.error("error while parsing actor properties text",s)}};function Xt(t,e){if(t.properties==null)t.properties=e;else for(let o in e)t.properties[o]=e[o]}function Re(){E.records.currentBox=void 0}const Jt=function(t,e){const o=Tt(t),s=document.getElementById(e.text);try{const r=s.innerHTML,n=JSON.parse(r);n.properties&&Xt(o,n.properties),n.links&&Dt(o,n.links)}catch(r){p.log$1.error("error while parsing actor details text",r)}},Ce=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},Zt=function(t){if(Array.isArray(t))t.forEach(function(e){Zt(e)});else switch(t.type){case"sequenceIndex":E.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":Mt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(E.records.actors[t.actor])throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");E.records.lastCreated=t.actor,Mt(t.actor,t.actor,t.description,t.draw),E.records.createdActors[t.actor]=E.records.messages.length;break;case"destroyParticipant":E.records.lastDestroyed=t.actor,E.records.destroyedActors[t.actor]=E.records.messages.length;break;case"activeStart":C(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":C(t.actor,void 0,void 0,t.signalType);break;case"addNote":Kt(t.actor,t.placement,t.text);break;case"addLinks":Ut(t.actor,t.text);break;case"addALink":Me(t.actor,t.text);break;case"addProperties":Gt(t.actor,t.text);break;case"addDetails":Jt(t.actor,t.text);break;case"addMessage":if(E.records.lastCreated){if(t.to!==E.records.lastCreated)throw new Error("The created participant "+E.records.lastCreated+" does not have an associated creating message after its declaration. Please check the sequence diagram.");E.records.lastCreated=void 0}else if(E.records.lastDestroyed){if(t.to!==E.records.lastDestroyed&&t.from!==E.records.lastDestroyed)throw new Error("The destroyed participant "+E.records.lastDestroyed+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");E.records.lastDestroyed=void 0}C(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":pe(t.boxData);break;case"boxEnd":Re();break;case"loopStart":C(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":C(void 0,void 0,void 0,t.signalType);break;case"rectStart":C(void 0,void 0,t.color,t.signalType);break;case"rectEnd":C(void 0,void 0,void 0,t.signalType);break;case"optStart":C(void 0,void 0,t.optText,t.signalType);break;case"optEnd":C(void 0,void 0,void 0,t.signalType);break;case"altStart":C(void 0,void 0,t.altText,t.signalType);break;case"else":C(void 0,void 0,t.altText,t.signalType);break;case"altEnd":C(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":p.setAccTitle(t.text);break;case"parStart":C(void 0,void 0,t.parText,t.signalType);break;case"and":C(void 0,void 0,t.parText,t.signalType);break;case"parEnd":C(void 0,void 0,void 0,t.signalType);break;case"criticalStart":C(void 0,void 0,t.criticalText,t.signalType);break;case"option":C(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":C(void 0,void 0,void 0,t.signalType);break;case"breakStart":C(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":C(void 0,void 0,void 0,t.signalType);break}},zt={addActor:Mt,addMessage:ge,addSignal:C,addLinks:Ut,addDetails:Jt,addProperties:Gt,autoWrap:pt,setWrap:Pe,enableSequenceNumbers:ve,disableSequenceNumbers:_e,showSequenceNumbers:ke,getMessages:me,getActors:Te,getCreatedActors:be,getDestroyedActors:Ee,getActor:Tt,getActorKeys:we,getActorProperty:Ce,getAccTitle:p.getAccTitle,getBoxes:ye,getDiagramTitle:p.getDiagramTitle,setDiagramTitle:p.setDiagramTitle,getConfig:()=>p.getConfig().sequence,clear:Le,parseMessage:Ie,parseBoxData:Ae,LINETYPE:yt,ARROWTYPE:Ne,PLACEMENT:Se,addNote:Kt,setAccTitle:p.setAccTitle,apply:Zt,setAccDescription:p.setAccDescription,getAccDescription:p.getAccDescription,hasAtLeastOneBox:fe,hasAtLeastOneBoxWithTitle:xe},De=t=>`.actor {
7
+ stroke: ${t.actorBorder};
8
+ fill: ${t.actorBkg};
9
+ }
10
+
11
+ text.actor > tspan {
12
+ fill: ${t.actorTextColor};
13
+ stroke: none;
14
+ }
15
+
16
+ .actor-line {
17
+ stroke: ${t.actorLineColor};
18
+ }
19
+
20
+ .messageLine0 {
21
+ stroke-width: 1.5;
22
+ stroke-dasharray: none;
23
+ stroke: ${t.signalColor};
24
+ }
25
+
26
+ .messageLine1 {
27
+ stroke-width: 1.5;
28
+ stroke-dasharray: 2, 2;
29
+ stroke: ${t.signalColor};
30
+ }
31
+
32
+ #arrowhead path {
33
+ fill: ${t.signalColor};
34
+ stroke: ${t.signalColor};
35
+ }
36
+
37
+ .sequenceNumber {
38
+ fill: ${t.sequenceNumberColor};
39
+ }
40
+
41
+ #sequencenumber {
42
+ fill: ${t.signalColor};
43
+ }
44
+
45
+ #crosshead path {
46
+ fill: ${t.signalColor};
47
+ stroke: ${t.signalColor};
48
+ }
49
+
50
+ .messageText {
51
+ fill: ${t.signalTextColor};
52
+ stroke: none;
53
+ }
54
+
55
+ .labelBox {
56
+ stroke: ${t.labelBoxBorderColor};
57
+ fill: ${t.labelBoxBkgColor};
58
+ }
59
+
60
+ .labelText, .labelText > tspan {
61
+ fill: ${t.labelTextColor};
62
+ stroke: none;
63
+ }
64
+
65
+ .loopText, .loopText > tspan {
66
+ fill: ${t.loopTextColor};
67
+ stroke: none;
68
+ }
69
+
70
+ .loopLine {
71
+ stroke-width: 2px;
72
+ stroke-dasharray: 2, 2;
73
+ stroke: ${t.labelBoxBorderColor};
74
+ fill: ${t.labelBoxBorderColor};
75
+ }
76
+
77
+ .note {
78
+ //stroke: #decc93;
79
+ stroke: ${t.noteBorderColor};
80
+ fill: ${t.noteBkgColor};
81
+ }
82
+
83
+ .noteText, .noteText > tspan {
84
+ fill: ${t.noteTextColor};
85
+ stroke: none;
86
+ }
87
+
88
+ .activation0 {
89
+ fill: ${t.activationBkgColor};
90
+ stroke: ${t.activationBorderColor};
91
+ }
92
+
93
+ .activation1 {
94
+ fill: ${t.activationBkgColor};
95
+ stroke: ${t.activationBorderColor};
96
+ }
97
+
98
+ .activation2 {
99
+ fill: ${t.activationBkgColor};
100
+ stroke: ${t.activationBorderColor};
101
+ }
102
+
103
+ .actorPopupMenu {
104
+ position: absolute;
105
+ }
106
+
107
+ .actorPopupMenuPanel {
108
+ position: absolute;
109
+ fill: ${t.actorBkg};
110
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
111
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
112
+ }
113
+ .actor-man line {
114
+ stroke: ${t.actorBorder};
115
+ fill: ${t.actorBkg};
116
+ }
117
+ .actor-man circle, line {
118
+ stroke: ${t.actorBorder};
119
+ fill: ${t.actorBkg};
120
+ stroke-width: 2px;
121
+ }
122
+ `,Oe=De,dt=36,Qt="actor-top",$t="actor-bottom",Ot=function(t,e){return et.drawRect(t,e)},Ve=function(t,e,o,s,r){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const n=e.links,c=e.actorCnt,l=e.rectData;var u="none";r&&(u="block !important");const i=t.append("g");i.attr("id","actor"+c+"_popup"),i.attr("class","actorPopupMenu"),i.attr("display",u);var m="";l.class!==void 0&&(m=" "+l.class);let T=l.width>o?l.width:o;const g=i.append("rect");if(g.attr("class","actorPopupMenuPanel"+m),g.attr("x",l.x),g.attr("y",l.height),g.attr("fill",l.fill),g.attr("stroke",l.stroke),g.attr("width",T),g.attr("height",l.height),g.attr("rx",l.rx),g.attr("ry",l.ry),n!=null){var x=20;for(let I in n){var w=i.append("a"),_=Ht.distExports.sanitizeUrl(n[I]);w.attr("xlink:href",_),w.attr("target","_blank"),t0(s)(I,w,l.x+10,l.height+x,T,20,{class:"actor"},s),x+=30}}return g.attr("height",x),{height:l.height+x,width:T}},Be=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},vt=async function(t,e,o=null){let s=t.append("foreignObject");const r=await p.renderKatexSanitized(e.text,p.getConfig$1()),c=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(s.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const l=t.node().firstChild;l.setAttribute("height",c.height+2*e.textMargin);const u=l.getBBox();s.attr("x",Math.round(u.x+u.width/2-c.width/2)).attr("y",Math.round(u.y+u.height/2-c.height/2))}else if(o){let{startx:l,stopx:u,starty:i}=o;if(l>u){const m=l;l=u,u=m}s.attr("x",Math.round(l+Math.abs(l-u)/2-c.width/2)),e.class==="loopText"?s.attr("y",Math.round(i)):s.attr("y",Math.round(i-c.height))}return[s]},xt=function(t,e){let o=0,s=0;const r=e.text.split(p.common$1.lineBreakRegex),[n,c]=p.parseFontSize(e.fontSize);let l=[],u=0,i=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":i=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":i=()=>Math.round(e.y+(o+s+e.textMargin)/2);break;case"bottom":case"end":i=()=>Math.round(e.y+(o+s+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[m,T]of r.entries()){e.textMargin!==void 0&&e.textMargin===0&&n!==void 0&&(u=m*n);const g=t.append("text");g.attr("x",e.x),g.attr("y",i()),e.anchor!==void 0&&g.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&g.style("font-family",e.fontFamily),c!==void 0&&g.style("font-size",c),e.fontWeight!==void 0&&g.style("font-weight",e.fontWeight),e.fill!==void 0&&g.attr("fill",e.fill),e.class!==void 0&&g.attr("class",e.class),e.dy!==void 0?g.attr("dy",e.dy):u!==0&&g.attr("dy",u);const x=T||p.ZERO_WIDTH_SPACE;if(e.tspan){const w=g.append("tspan");w.attr("x",e.x),e.fill!==void 0&&w.attr("fill",e.fill),w.text(x)}else g.text(x);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(s+=(g._groups||g)[0][0].getBBox().height,o=s),l.push(g)}return l},jt=function(t,e){function o(r,n,c,l,u){return r+","+n+" "+(r+c)+","+n+" "+(r+c)+","+(n+l-u)+" "+(r+c-u*1.2)+","+(n+l)+" "+r+","+(n+l)}const s=t.append("polygon");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,xt(t,e),s};let it=-1;const te=(t,e,o,s)=>{t.select&&o.forEach(r=>{const n=e[r],c=t.select("#actor"+n.actorCnt);!s.mirrorActors&&n.stopy?c.attr("y2",n.stopy+n.height/2):s.mirrorActors&&c.attr("y2",n.stopy)})},Ye=async function(t,e,o,s){const r=s?e.stopy:e.starty,n=e.x+e.width/2,c=r+5,l=t.append("g").lower();var u=l;s||(it++,Object.keys(e.links||{}).length&&!o.forceMenus&&u.attr("onclick",Be(`actor${it}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+it).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),u=l.append("g"),e.actorCnt=it,e.links!=null&&u.attr("id","root-"+it));const i=et.getNoteRect();var m="actor";e.properties!=null&&e.properties.class?m=e.properties.class:i.fill="#eaeaea",s?m+=` ${$t}`:m+=` ${Qt}`,i.x=e.x,i.y=r,i.width=e.width,i.height=e.height,i.class=m,i.rx=3,i.ry=3,i.name=e.name;const T=Ot(u,i);if(e.rectData=i,e.properties!=null&&e.properties.icon){const x=e.properties.icon.trim();x.charAt(0)==="@"?et.drawEmbeddedImage(u,i.x+i.width-20,i.y+10,x.substr(1)):et.drawImage(u,i.x+i.width-20,i.y+10,x)}await Vt(o,p.hasKatex(e.description))(e.description,u,i.x,i.y,i.width,i.height,{class:"actor"},o);let g=e.height;if(T.node){const x=T.node().getBBox();e.height=x.height,g=x.height}return g},Fe=async function(t,e,o,s){const r=s?e.stopy:e.starty,n=e.x+e.width/2,c=r+80;t.lower(),s||(it++,t.append("line").attr("id","actor"+it).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),e.actorCnt=it);const l=t.append("g");let u="actor-man";s?u+=` ${$t}`:u+=` ${Qt}`,l.attr("class",u),l.attr("name",e.name);const i=et.getNoteRect();i.x=e.x,i.y=r,i.fill="#eaeaea",i.width=e.width,i.height=e.height,i.class="actor",i.rx=3,i.ry=3,l.append("line").attr("id","actor-man-torso"+it).attr("x1",n).attr("y1",r+25).attr("x2",n).attr("y2",r+45),l.append("line").attr("id","actor-man-arms"+it).attr("x1",n-dt/2).attr("y1",r+33).attr("x2",n+dt/2).attr("y2",r+33),l.append("line").attr("x1",n-dt/2).attr("y1",r+60).attr("x2",n).attr("y2",r+45),l.append("line").attr("x1",n).attr("y1",r+45).attr("x2",n+dt/2-2).attr("y2",r+60);const m=l.append("circle");m.attr("cx",e.x+e.width/2),m.attr("cy",r+10),m.attr("r",15),m.attr("width",e.width),m.attr("height",e.height);const T=l.node().getBBox();return e.height=T.height,await Vt(o,p.hasKatex(e.description))(e.description,l,i.x,i.y+35,i.width,i.height,{class:"actor"},o),e.height},We=async function(t,e,o,s){switch(e.type){case"actor":return await Fe(t,e,o,s);case"participant":return await Ye(t,e,o,s)}},ze=async function(t,e,o){const r=t.append("g");ee(r,e),e.name&&await Vt(o)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},o),r.lower()},qe=function(t){return t.append("g")},He=function(t,e,o,s,r){const n=et.getNoteRect(),c=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+r%3,n.width=e.stopx-e.startx,n.height=o-e.starty,Ot(c,n)},Ke=async function(t,e,o,s){const{boxMargin:r,boxTextMargin:n,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:u,messageFontSize:i,messageFontWeight:m}=s,T=t.append("g"),g=function(_,I,O,S){return T.append("line").attr("x1",_).attr("y1",I).attr("x2",O).attr("y2",S).attr("class","loopLine")};g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(_){g(e.startx,_.y,e.stopx,_.y).style("stroke-dasharray","3, 3")});let x=et.getTextObj();x.text=o,x.x=e.startx,x.y=e.starty,x.fontFamily=u,x.fontSize=i,x.fontWeight=m,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=n,x.class="labelText",jt(T,x),x=se(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+r+n,x.anchor="middle",x.valign="middle",x.textMargin=n,x.class="loopText",x.fontFamily=u,x.fontSize=i,x.fontWeight=m,x.wrap=!0;let w=p.hasKatex(x.text)?await vt(T,x,e):xt(T,x);if(e.sectionTitles!==void 0){for(const[_,I]of Object.entries(e.sectionTitles))if(I.message){x.text=I.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[_].y+r+n,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=u,x.fontSize=i,x.fontWeight=m,x.wrap=e.wrap,p.hasKatex(x.text)?(e.starty=e.sections[_].y,await vt(T,x,e)):xt(T,x);let O=Math.round(w.map(S=>(S._groups||S)[0][0].getBBox().height).reduce((S,V)=>S+V));e.sections[_].height+=O-(r+n)}}return e.height=Math.round(e.stopy-e.starty),T},ee=function(t,e){et.drawBackgroundRect(t,e)},Ue=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},Ge=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},Xe=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},Je=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},Ze=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},Qe=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},$e=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},se=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},je=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Vt=(function(){function t(n,c,l,u,i,m,T){const g=c.append("text").attr("x",l+i/2).attr("y",u+m/2+5).style("text-anchor","middle").text(n);r(g,T)}function e(n,c,l,u,i,m,T,g){const{actorFontSize:x,actorFontFamily:w,actorFontWeight:_}=g,[I,O]=p.parseFontSize(x),S=n.split(p.common$1.lineBreakRegex);for(let V=0;V<S.length;V++){const R=V*I-I*(S.length-1)/2,W=c.append("text").attr("x",l+i/2).attr("y",u).style("text-anchor","middle").style("font-size",O).style("font-weight",_).style("font-family",w);W.append("tspan").attr("x",l+i/2).attr("dy",R).text(S[V]),W.attr("y",u+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(W,T)}}function o(n,c,l,u,i,m,T,g){const x=c.append("switch"),_=x.append("foreignObject").attr("x",l).attr("y",u).attr("width",i).attr("height",m).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,x,l,u,i,m,T,g),r(_,T)}async function s(n,c,l,u,i,m,T,g){const x=await p.calculateMathMLDimensions(n,p.getConfig$1()),w=c.append("switch"),I=w.append("foreignObject").attr("x",l+i/2-x.width/2).attr("y",u+m/2-x.height/2).attr("width",x.width).attr("height",x.height).append("xhtml:div").style("height","100%").style("width","100%");I.append("div").style("text-align","center").style("vertical-align","middle").html(await p.renderKatexSanitized(n,p.getConfig$1())),e(n,w,l,u,i,m,T,g),r(I,T)}function r(n,c){for(const l in c)c.hasOwnProperty(l)&&n.attr(l,c[l])}return function(n,c=!1){return c?s:n.textPlacement==="fo"?o:n.textPlacement==="old"?t:e}})(),t0=(function(){function t(r,n,c,l,u,i,m){const T=n.append("text").attr("x",c).attr("y",l).style("text-anchor","start").text(r);s(T,m)}function e(r,n,c,l,u,i,m,T){const{actorFontSize:g,actorFontFamily:x,actorFontWeight:w}=T,_=r.split(p.common$1.lineBreakRegex);for(let I=0;I<_.length;I++){const O=I*g-g*(_.length-1)/2,S=n.append("text").attr("x",c).attr("y",l).style("text-anchor","start").style("font-size",g).style("font-weight",w).style("font-family",x);S.append("tspan").attr("x",c).attr("dy",O).text(_[I]),S.attr("y",l+i/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(S,m)}}function o(r,n,c,l,u,i,m,T){const g=n.append("switch"),w=g.append("foreignObject").attr("x",c).attr("y",l).attr("width",u).attr("height",i).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");w.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),e(r,g,c,l,u,i,m,T),s(w,m)}function s(r,n){for(const c in n)n.hasOwnProperty(c)&&r.attr(c,n[c])}return function(r){return r.textPlacement==="fo"?o:r.textPlacement==="old"?t:e}})(),D={drawRect:Ot,drawText:xt,drawLabel:jt,drawActor:We,drawBox:ze,drawPopup:Ve,anchorElement:qe,drawActivation:He,drawLoop:Ke,drawBackgroundRect:ee,insertArrowHead:Je,insertArrowFilledHead:Ze,insertSequenceNumber:Qe,insertArrowCrossHead:$e,insertDatabaseIcon:Ue,insertComputerIcon:Ge,insertClockIcon:Xe,getTextObj:se,getNoteRect:je,fixLifeLineHeights:te,sanitizeUrl:Ht.distExports.sanitizeUrl};let a={};const f={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(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))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,re(p.getConfig())},updateVal:function(t,e,o,s){t[e]===void 0?t[e]=o:t[e]=s(o,t[e])},updateBounds:function(t,e,o,s){const r=this;let n=0;function c(l){return function(i){n++;const m=r.sequenceItems.length-n+1;r.updateVal(i,"starty",e-m*a.boxMargin,Math.min),r.updateVal(i,"stopy",s+m*a.boxMargin,Math.max),r.updateVal(f.data,"startx",t-m*a.boxMargin,Math.min),r.updateVal(f.data,"stopx",o+m*a.boxMargin,Math.max),l!=="activation"&&(r.updateVal(i,"startx",t-m*a.boxMargin,Math.min),r.updateVal(i,"stopx",o+m*a.boxMargin,Math.max),r.updateVal(f.data,"starty",e-m*a.boxMargin,Math.min),r.updateVal(f.data,"stopy",s+m*a.boxMargin,Math.max))}}this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},insert:function(t,e,o,s){const r=p.common$1.getMin(t,o),n=p.common$1.getMax(t,o),c=p.common$1.getMin(e,s),l=p.common$1.getMax(e,s);this.updateVal(f.data,"startx",r,Math.min),this.updateVal(f.data,"starty",c,Math.min),this.updateVal(f.data,"stopx",n,Math.max),this.updateVal(f.data,"stopy",l,Math.max),this.updateBounds(r,c,n,l)},newActivation:function(t,e,o){const s=o[t.from.actor],r=_t(t.from.actor).length||0,n=s.x+s.width/2+(r-1)*a.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+a.activationWidth,stopy:void 0,actor:t.from.actor,anchored:D.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(o){return o.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:f.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=p.common$1.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},e0=async function(t,e){f.bumpVerticalPos(a.boxMargin),e.height=a.boxMargin,e.starty=f.getVerticalPos();const o=et.getNoteRect();o.x=e.startx,o.y=e.starty,o.width=e.width||a.width,o.class="note";const s=t.append("g"),r=D.drawRect(s,o),n=et.getTextObj();n.x=e.startx,n.y=e.starty,n.width=o.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=a.noteFontFamily,n.fontSize=a.noteFontSize,n.fontWeight=a.noteFontWeight,n.anchor=a.noteAlign,n.textMargin=a.noteMargin,n.valign="center";const c=p.hasKatex(n.text)?await vt(s,n):xt(s,n),l=Math.round(c.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,i)=>u+i));r.attr("height",l+2*a.noteMargin),e.height+=l+2*a.noteMargin,f.bumpVerticalPos(l+2*a.noteMargin),e.stopy=e.starty+l+2*a.noteMargin,e.stopx=e.startx+o.width,f.insert(e.startx,e.starty,e.stopx,e.stopy),f.models.addNote(e)},ut=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),ft=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Rt=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});async function s0(t,e){f.bumpVerticalPos(10);const{startx:o,stopx:s,message:r}=e,n=p.common$1.splitBreaks(r).length,c=p.hasKatex(r),l=c?await p.calculateMathMLDimensions(r,p.getConfig()):p.utils.calculateTextDimensions(r,ut(a));if(!c){const T=l.height/n;e.height+=T,f.bumpVerticalPos(T)}let u,i=l.height-10;const m=l.width;if(o===s){u=f.getVerticalPos()+i,a.rightAngles||(i+=a.boxMargin,u=f.getVerticalPos()+i),i+=30;const T=p.common$1.getMax(m/2,a.width/2);f.insert(o-T,f.getVerticalPos()-10+i,s+T,f.getVerticalPos()+30+i)}else i+=a.boxMargin,u=f.getVerticalPos()+i,f.insert(o,u-10,s,u);return f.bumpVerticalPos(i),e.height+=i,e.stopy=e.starty+e.height,f.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u}const i0=async function(t,e,o,s){const{startx:r,stopx:n,starty:c,message:l,type:u,sequenceIndex:i,sequenceVisible:m}=e,T=p.utils.calculateTextDimensions(l,ut(a)),g=et.getTextObj();g.x=r,g.y=c+10,g.width=n-r,g.class="messageText",g.dy="1em",g.text=l,g.fontFamily=a.messageFontFamily,g.fontSize=a.messageFontSize,g.fontWeight=a.messageFontWeight,g.anchor=a.messageAlign,g.valign="center",g.textMargin=a.wrapPadding,g.tspan=!1,p.hasKatex(g.text)?await vt(t,g,{startx:r,stopx:n,starty:o}):xt(t,g);const x=T.width;let w;r===n?a.rightAngles?w=t.append("path").attr("d",`M ${r},${o} H ${r+p.common$1.getMax(a.width/2,x/2)} V ${o+25} H ${r}`):w=t.append("path").attr("d","M "+r+","+o+" C "+(r+60)+","+(o-10)+" "+(r+60)+","+(o+30)+" "+r+","+(o+20)):(w=t.append("line"),w.attr("x1",r),w.attr("y1",o),w.attr("x2",n),w.attr("y2",o)),u===s.db.LINETYPE.DOTTED||u===s.db.LINETYPE.DOTTED_CROSS||u===s.db.LINETYPE.DOTTED_POINT||u===s.db.LINETYPE.DOTTED_OPEN?(w.style("stroke-dasharray","3, 3"),w.attr("class","messageLine1")):w.attr("class","messageLine0");let _="";a.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),w.attr("stroke-width",2),w.attr("stroke","none"),w.style("fill","none"),(u===s.db.LINETYPE.SOLID||u===s.db.LINETYPE.DOTTED)&&w.attr("marker-end","url("+_+"#arrowhead)"),(u===s.db.LINETYPE.SOLID_POINT||u===s.db.LINETYPE.DOTTED_POINT)&&w.attr("marker-end","url("+_+"#filled-head)"),(u===s.db.LINETYPE.SOLID_CROSS||u===s.db.LINETYPE.DOTTED_CROSS)&&w.attr("marker-end","url("+_+"#crosshead)"),(m||a.showSequenceNumbers)&&(w.attr("marker-start","url("+_+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(i))},r0=async function(t,e,o,s,r,n,c){let l=0,u=0,i,m=0;for(const T of s){const g=e[T],x=g.box;i&&i!=x&&(f.models.addBox(i),u+=a.boxMargin+i.margin),x&&x!=i&&(x.x=l+u,x.y=r,u+=x.margin),g.width=g.width||a.width,g.height=p.common$1.getMax(g.height||a.height,a.height),g.margin=g.margin||a.actorMargin,m=p.common$1.getMax(m,g.height),o[g.name]&&(u+=g.width/2),g.x=l+u,g.starty=f.getVerticalPos(),f.insert(g.x,r,g.x+g.width,g.height),l+=g.width+u,g.box&&(g.box.width=l+x.margin-g.box.x),u=g.margin,i=g.box,f.models.addActor(g)}i&&f.models.addBox(i),f.bumpVerticalPos(m)},Ct=async function(t,e,o,s){if(s){let r=0;f.bumpVerticalPos(a.boxMargin*2);for(const n of o){const c=e[n];c.stopy||(c.stopy=f.getVerticalPos());const l=await D.drawActor(t,c,a,!0);r=p.common$1.getMax(r,l)}f.bumpVerticalPos(r+a.boxMargin)}else for(const r of o){const n=e[r];await D.drawActor(t,n,a,!1)}},ie=function(t,e,o,s){let r=0,n=0;for(const c of o){const l=e[c],u=c0(l),i=D.drawPopup(t,l,u,a,a.forceMenus,s);i.height>r&&(r=i.height),i.width+l.x>n&&(n=i.width+l.x)}return{maxHeight:r,maxWidth:n}},re=function(t){p.assignWithDepth$1(a,t),t.fontFamily&&(a.actorFontFamily=a.noteFontFamily=a.messageFontFamily=t.fontFamily),t.fontSize&&(a.actorFontSize=a.noteFontSize=a.messageFontSize=t.fontSize),t.fontWeight&&(a.actorFontWeight=a.noteFontWeight=a.messageFontWeight=t.fontWeight)},_t=function(t){return f.activations.filter(function(e){return e.actor===t})},qt=function(t,e){const o=e[t],s=_t(t),r=s.reduce(function(c,l){return p.common$1.getMin(c,l.startx)},o.x+o.width/2-1),n=s.reduce(function(c,l){return p.common$1.getMax(c,l.stopx)},o.x+o.width/2+1);return[r,n]};function st(t,e,o,s,r){f.bumpVerticalPos(o);let n=s;if(e.id&&e.message&&t[e.id]){const c=t[e.id].width,l=ut(a);e.message=p.utils.wrapLabel(`[${e.message}]`,c-2*a.wrapPadding,l),e.width=c,e.wrap=!0;const u=p.utils.calculateTextDimensions(e.message,l),i=p.common$1.getMax(u.height,a.labelBoxHeight);n=s+i,p.log$1.debug(`${i} - ${e.message}`)}r(e),f.bumpVerticalPos(n)}function n0(t,e,o,s,r,n,c){function l(i,m){i.x<r[t.from].x?(f.insert(e.stopx-m,e.starty,e.startx,e.stopy+i.height/2+a.noteMargin),e.stopx=e.stopx+m):(f.insert(e.startx,e.starty,e.stopx+m,e.stopy+i.height/2+a.noteMargin),e.stopx=e.stopx-m)}function u(i,m){i.x<r[t.to].x?(f.insert(e.startx-m,e.starty,e.stopx,e.stopy+i.height/2+a.noteMargin),e.startx=e.startx+m):(f.insert(e.stopx,e.starty,e.startx+m,e.stopy+i.height/2+a.noteMargin),e.startx=e.startx-m)}if(n[t.to]==s){const i=r[t.to],m=i.type=="actor"?dt/2+3:i.width/2+3;l(i,m),i.starty=o-i.height/2,f.bumpVerticalPos(i.height/2)}else if(c[t.from]==s){const i=r[t.from];if(a.mirrorActors){const m=i.type=="actor"?dt/2:i.width/2;u(i,m)}i.stopy=o-i.height/2,f.bumpVerticalPos(i.height/2)}else if(c[t.to]==s){const i=r[t.to];if(a.mirrorActors){const m=i.type=="actor"?dt/2+3:i.width/2+3;l(i,m)}i.stopy=o-i.height/2,f.bumpVerticalPos(i.height/2)}}const a0=async function(t,e,o,s){const{securityLevel:r,sequence:n}=p.getConfig();a=n;let c;r==="sandbox"&&(c=p.select("#i"+e));const l=r==="sandbox"?p.select(c.nodes()[0].contentDocument.body):p.select("body"),u=r==="sandbox"?c.nodes()[0].contentDocument:document;f.init(),p.log$1.debug(s.db);const i=r==="sandbox"?l.select(`[id="${e}"]`):p.select(`[id="${e}"]`),m=s.db.getActors(),T=s.db.getCreatedActors(),g=s.db.getDestroyedActors(),x=s.db.getBoxes();let w=s.db.getActorKeys();const _=s.db.getMessages(),I=s.db.getDiagramTitle(),O=s.db.hasAtLeastOneBox(),S=s.db.hasAtLeastOneBoxWithTitle(),V=await o0(m,_,s);if(a.height=await l0(m,V,x),D.insertComputerIcon(i),D.insertDatabaseIcon(i),D.insertClockIcon(i),O&&(f.bumpVerticalPos(a.boxMargin),S&&f.bumpVerticalPos(x[0].textMaxHeight)),a.hideUnusedParticipants===!0){const y=new Set;_.forEach(P=>{y.add(P.from),y.add(P.to)}),w=w.filter(P=>y.has(P))}await r0(i,m,T,w,0);const R=await p0(_,m,V,s);D.insertArrowHead(i),D.insertArrowCrossHead(i),D.insertArrowFilledHead(i),D.insertSequenceNumber(i);function W(y,P){const Z=f.endActivation(y);Z.starty+18>P&&(Z.starty=P-6,P+=12),D.drawActivation(i,Z,P,a,_t(y.from.actor).length),f.insert(Z.startx,P-10,Z.stopx,P)}let z=1,G=1;const Q=[],q=[];let H=0;for(const y of _){let P,Z,tt;switch(y.type){case s.db.LINETYPE.NOTE:f.resetVerticalPos(),Z=y.noteModel,await e0(i,Z);break;case s.db.LINETYPE.ACTIVE_START:f.newActivation(y,i,m);break;case s.db.LINETYPE.ACTIVE_END:W(y,f.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:st(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,A=>f.newLoop(A));break;case s.db.LINETYPE.LOOP_END:P=f.endLoop(),await D.drawLoop(i,P,"loop",a),f.bumpVerticalPos(P.stopy-f.getVerticalPos()),f.models.addLoop(P);break;case s.db.LINETYPE.RECT_START:st(R,y,a.boxMargin,a.boxMargin,A=>f.newLoop(void 0,A.message));break;case s.db.LINETYPE.RECT_END:P=f.endLoop(),q.push(P),f.models.addLoop(P),f.bumpVerticalPos(P.stopy-f.getVerticalPos());break;case s.db.LINETYPE.OPT_START:st(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,A=>f.newLoop(A));break;case s.db.LINETYPE.OPT_END:P=f.endLoop(),await D.drawLoop(i,P,"opt",a),f.bumpVerticalPos(P.stopy-f.getVerticalPos()),f.models.addLoop(P);break;case s.db.LINETYPE.ALT_START:st(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,A=>f.newLoop(A));break;case s.db.LINETYPE.ALT_ELSE:st(R,y,a.boxMargin+a.boxTextMargin,a.boxMargin,A=>f.addSectionToLoop(A));break;case s.db.LINETYPE.ALT_END:P=f.endLoop(),await D.drawLoop(i,P,"alt",a),f.bumpVerticalPos(P.stopy-f.getVerticalPos()),f.models.addLoop(P);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:st(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,A=>f.newLoop(A)),f.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:st(R,y,a.boxMargin+a.boxTextMargin,a.boxMargin,A=>f.addSectionToLoop(A));break;case s.db.LINETYPE.PAR_END:P=f.endLoop(),await D.drawLoop(i,P,"par",a),f.bumpVerticalPos(P.stopy-f.getVerticalPos()),f.models.addLoop(P);break;case s.db.LINETYPE.AUTONUMBER:z=y.message.start||z,G=y.message.step||G,y.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:st(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,A=>f.newLoop(A));break;case s.db.LINETYPE.CRITICAL_OPTION:st(R,y,a.boxMargin+a.boxTextMargin,a.boxMargin,A=>f.addSectionToLoop(A));break;case s.db.LINETYPE.CRITICAL_END:P=f.endLoop(),await D.drawLoop(i,P,"critical",a),f.bumpVerticalPos(P.stopy-f.getVerticalPos()),f.models.addLoop(P);break;case s.db.LINETYPE.BREAK_START:st(R,y,a.boxMargin,a.boxMargin+a.boxTextMargin,A=>f.newLoop(A));break;case s.db.LINETYPE.BREAK_END:P=f.endLoop(),await D.drawLoop(i,P,"break",a),f.bumpVerticalPos(P.stopy-f.getVerticalPos()),f.models.addLoop(P);break;default:try{tt=y.msgModel,tt.starty=f.getVerticalPos(),tt.sequenceIndex=z,tt.sequenceVisible=s.db.showSequenceNumbers();const A=await s0(i,tt);n0(y,tt,A,H,m,T,g),Q.push({messageModel:tt,lineStartY:A}),f.models.addMessage(tt)}catch(A){p.log$1.error("error while drawing message",A)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT].includes(y.type)&&(z=z+G),H++}p.log$1.debug("createdActors",T),p.log$1.debug("destroyedActors",g),await Ct(i,m,w,!1);for(const y of Q)await i0(i,y.messageModel,y.lineStartY,s);a.mirrorActors&&await Ct(i,m,w,!0),q.forEach(y=>D.drawBackgroundRect(i,y)),te(i,m,w,a);for(const y of f.models.boxes)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(i,y,a);O&&f.bumpVerticalPos(a.boxMargin);const Y=ie(i,m,w,u),{bounds:F}=f.getBounds();let X=F.stopy-F.starty;X<Y.maxHeight&&(X=Y.maxHeight);let K=X+2*a.diagramMarginY;a.mirrorActors&&(K=K-a.boxMargin+a.bottomMarginAdj);let J=F.stopx-F.startx;J<Y.maxWidth&&(J=Y.maxWidth);const $=J+2*a.diagramMarginX;I&&i.append("text").text(I).attr("x",(F.stopx-F.startx)/2-2*a.diagramMarginX).attr("y",-25),p.configureSvgSize(i,K,$,a.useMaxWidth);const N=I?40:0;i.attr("viewBox",F.startx-a.diagramMarginX+" -"+(a.diagramMarginY+N)+" "+$+" "+(K+N)),p.log$1.debug("models:",f.models)};async function o0(t,e,o){const s={};for(const r of e)if(t[r.to]&&t[r.from]){const n=t[r.to];if(r.placement===o.db.PLACEMENT.LEFTOF&&!n.prevActor||r.placement===o.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const c=r.placement!==void 0,l=!c,u=c?ft(a):ut(a),i=r.wrap?p.utils.wrapLabel(r.message,a.width-2*a.wrapPadding,u):r.message,T=(p.hasKatex(i)?await p.calculateMathMLDimensions(r.message,p.getConfig()):p.utils.calculateTextDimensions(i,u)).width+2*a.wrapPadding;l&&r.from===n.nextActor?s[r.to]=p.common$1.getMax(s[r.to]||0,T):l&&r.from===n.prevActor?s[r.from]=p.common$1.getMax(s[r.from]||0,T):l&&r.from===r.to?(s[r.from]=p.common$1.getMax(s[r.from]||0,T/2),s[r.to]=p.common$1.getMax(s[r.to]||0,T/2)):r.placement===o.db.PLACEMENT.RIGHTOF?s[r.from]=p.common$1.getMax(s[r.from]||0,T):r.placement===o.db.PLACEMENT.LEFTOF?s[n.prevActor]=p.common$1.getMax(s[n.prevActor]||0,T):r.placement===o.db.PLACEMENT.OVER&&(n.prevActor&&(s[n.prevActor]=p.common$1.getMax(s[n.prevActor]||0,T/2)),n.nextActor&&(s[r.from]=p.common$1.getMax(s[r.from]||0,T/2)))}return p.log$1.debug("maxMessageWidthPerActor:",s),s}const c0=function(t){let e=0;const o=Rt(a);for(const s in t.links){const n=p.utils.calculateTextDimensions(s,o).width+2*a.wrapPadding+2*a.boxMargin;e<n&&(e=n)}return e};async function l0(t,e,o){let s=0;for(const n of Object.keys(t)){const c=t[n];c.wrap&&(c.description=p.utils.wrapLabel(c.description,a.width-2*a.wrapPadding,Rt(a)));const l=p.hasKatex(c.description)?await p.calculateMathMLDimensions(c.description,p.getConfig()):p.utils.calculateTextDimensions(c.description,Rt(a));c.width=c.wrap?a.width:p.common$1.getMax(a.width,l.width+2*a.wrapPadding),c.height=c.wrap?p.common$1.getMax(l.height,a.height):a.height,s=p.common$1.getMax(s,c.height)}for(const n in e){const c=t[n];if(!c)continue;const l=t[c.nextActor];if(!l){const T=e[n]+a.actorMargin-c.width/2;c.margin=p.common$1.getMax(T,a.actorMargin);continue}const i=e[n]+a.actorMargin-c.width/2-l.width/2;c.margin=p.common$1.getMax(i,a.actorMargin)}let r=0;return o.forEach(n=>{const c=ut(a);let l=n.actorKeys.reduce((m,T)=>m+=t[T].width+(t[T].margin||0),0);l-=2*a.boxTextMargin,n.wrap&&(n.name=p.utils.wrapLabel(n.name,l-2*a.wrapPadding,c));const u=p.utils.calculateTextDimensions(n.name,c);r=p.common$1.getMax(u.height,r);const i=p.common$1.getMax(l,u.width+2*a.wrapPadding);if(n.margin=a.boxTextMargin,l<i){const m=(i-l)/2;n.margin+=m}}),o.forEach(n=>n.textMaxHeight=r),p.common$1.getMax(s,a.height)}const h0=async function(t,e,o){const s=e[t.from].x,r=e[t.to].x,n=t.wrap&&t.message;let c=p.hasKatex(t.message)?await p.calculateMathMLDimensions(t.message,p.getConfig()):p.utils.calculateTextDimensions(n?p.utils.wrapLabel(t.message,a.width,ft(a)):t.message,ft(a));const l={width:n?a.width:p.common$1.getMax(a.width,c.width+2*a.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.db.PLACEMENT.RIGHTOF?(l.width=n?p.common$1.getMax(a.width,c.width):p.common$1.getMax(e[t.from].width/2+e[t.to].width/2,c.width+2*a.noteMargin),l.startx=s+(e[t.from].width+a.actorMargin)/2):t.placement===o.db.PLACEMENT.LEFTOF?(l.width=n?p.common$1.getMax(a.width,c.width+2*a.noteMargin):p.common$1.getMax(e[t.from].width/2+e[t.to].width/2,c.width+2*a.noteMargin),l.startx=s-l.width+(e[t.from].width-a.actorMargin)/2):t.to===t.from?(c=p.utils.calculateTextDimensions(n?p.utils.wrapLabel(t.message,p.common$1.getMax(a.width,e[t.from].width),ft(a)):t.message,ft(a)),l.width=n?p.common$1.getMax(a.width,e[t.from].width):p.common$1.getMax(e[t.from].width,a.width,c.width+2*a.noteMargin),l.startx=s+(e[t.from].width-l.width)/2):(l.width=Math.abs(s+e[t.from].width/2-(r+e[t.to].width/2))+a.actorMargin,l.startx=s<r?s+e[t.from].width/2-a.actorMargin/2:r+e[t.to].width/2-a.actorMargin/2),n&&(l.message=p.utils.wrapLabel(t.message,l.width-2*a.wrapPadding,ft(a))),p.log$1.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l},d0=function(t,e,o){if(![o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT].includes(t.type))return{};const[s,r]=qt(t.from,e),[n,c]=qt(t.to,e),l=s<=n,u=l?r:s;let i=l?n:c;const m=Math.abs(n-c)>2,T=_=>l?-_:_;t.from===t.to?i=u:(t.activate&&!m&&(i+=T(a.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(i+=T(3)));const g=[s,r,n,c],x=Math.abs(u-i);t.wrap&&t.message&&(t.message=p.utils.wrapLabel(t.message,p.common$1.getMax(x+2*a.wrapPadding,a.width),ut(a)));const w=p.utils.calculateTextDimensions(t.message,ut(a));return{width:p.common$1.getMax(t.wrap?0:w.width+2*a.wrapPadding,x+2*a.wrapPadding,a.width),height:0,startx:u,stopx:i,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},p0=async function(t,e,o,s){const r={},n=[];let c,l,u;for(const i of t){switch(i.id=p.utils.random({length:10}),i.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:n.push({id:i.id,msg:i.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:i.message&&(c=n.pop(),r[c.id]=c,r[i.id]=c,n.push(c));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:c=n.pop(),r[c.id]=c;break;case s.db.LINETYPE.ACTIVE_START:{const T=e[i.from?i.from.actor:i.to.actor],g=_t(i.from?i.from.actor:i.to.actor).length,x=T.x+T.width/2+(g-1)*a.activationWidth/2,w={startx:x,stopx:x+a.activationWidth,actor:i.from.actor,enabled:!0};f.activations.push(w)}break;case s.db.LINETYPE.ACTIVE_END:{const T=f.activations.map(g=>g.actor).lastIndexOf(i.from.actor);delete f.activations.splice(T,1)[0]}break}i.placement!==void 0?(l=await h0(i,e,s),i.noteModel=l,n.forEach(T=>{c=T,c.from=p.common$1.getMin(c.from,l.startx),c.to=p.common$1.getMax(c.to,l.startx+l.width),c.width=p.common$1.getMax(c.width,Math.abs(c.from-c.to))-a.labelBoxWidth})):(u=d0(i,e,s),i.msgModel=u,u.startx&&u.stopx&&n.length>0&&n.forEach(T=>{if(c=T,u.startx===u.stopx){const g=e[i.from],x=e[i.to];c.from=p.common$1.getMin(g.x-u.width/2,g.x-g.width/2,c.from),c.to=p.common$1.getMax(x.x+u.width/2,x.x+g.width/2,c.to),c.width=p.common$1.getMax(c.width,Math.abs(c.to-c.from))-a.labelBoxWidth}else c.from=p.common$1.getMin(u.startx,c.from),c.to=p.common$1.getMax(u.stopx,c.to),c.width=p.common$1.getMax(c.width,u.width)-a.labelBoxWidth}))}return f.activations=[],p.log$1.debug("Loop type widths:",r),r},u0={bounds:f,drawActors:Ct,drawActorsPopup:ie,setConf:re,draw:a0},g0={parser:he,db:zt,renderer:u0,styles:Oe,init:({wrap:t})=>{zt.setWrap(t)}};exports.diagram=g0;