grimoire3d 0.0.0-dev.798f2ad → 0.0.0-dev.dbe8204

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 (117) hide show
  1. package/README.md +28 -124
  2. package/cli/cli.js +348 -0
  3. package/cli/content.js +382 -0
  4. package/cli/cover-options.d.ts +15 -0
  5. package/cli/cover-options.js +105 -0
  6. package/cli/markdown.js +139 -0
  7. package/cli/markup.d.ts +3 -0
  8. package/cli/markup.js +60 -0
  9. package/cli/routes.d.ts +6 -0
  10. package/cli/routes.js +19 -0
  11. package/cli/static-pages.js +467 -0
  12. package/cli/video-url.d.ts +5 -0
  13. package/cli/video-url.js +51 -0
  14. package/dist/BookViewer-CwCn-LTn.js +332 -0
  15. package/dist/components/BookModel.d.ts +20 -0
  16. package/dist/components/BookViewer.d.ts +17 -0
  17. package/dist/components/index.d.ts +2 -0
  18. package/dist/components/index.js +5 -0
  19. package/dist/grimoire3d.css +1 -0
  20. package/dist/index.d.ts +8 -0
  21. package/dist/index.js +4 -0
  22. package/dist/main.d.ts +1 -0
  23. package/dist/site/assets/BookReader-BxKrexRZ.js +2 -0
  24. package/dist/site/assets/BookScene-DN1_Kxe3.js +4045 -0
  25. package/dist/site/assets/MermaidDiagram-Dma3Cwvn.js +312 -0
  26. package/dist/site/assets/PageMarkdown-C-gI_dXg.js +37 -0
  27. package/dist/site/assets/abnfDiagram-S7VZAUFO-BIA2ezcb.js +1 -0
  28. package/dist/site/assets/alcove-cyX4Tv3E.avif +0 -0
  29. package/dist/site/assets/architectureDiagram-YGSQEFNW-DMB5UtEZ.js +36 -0
  30. package/dist/site/assets/blockDiagram-APKKGZFW-CeBSUSaW.js +140 -0
  31. package/dist/site/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
  32. package/dist/site/assets/c4Diagram-KJ2TOQU5-BmBo2PHu.js +38 -0
  33. package/dist/site/assets/catalog-07-UR91A.avif +0 -0
  34. package/dist/site/assets/chunk-2Q5K7J3B-BDgDFVbx.js +1 -0
  35. package/dist/site/assets/chunk-5VM5RSS4-CCNs5Q1j.js +15 -0
  36. package/dist/site/assets/chunk-HFQBQIA3-B8uXoLoT.js +1 -0
  37. package/dist/site/assets/chunk-JWPE2WC7-BiKy7CcD.js +1 -0
  38. package/dist/site/assets/chunk-KQLB2F66-D_kpUTKA.js +2 -0
  39. package/dist/site/assets/chunk-KS47KZWR-C_s_qnHf.js +1 -0
  40. package/dist/site/assets/chunk-OY52VR5R-D8f7gl4W.js +88 -0
  41. package/dist/site/assets/chunk-TU62E6Q5-Bm44Znlj.js +1 -0
  42. package/dist/site/assets/chunk-XXDRQBXY-ChLLr56_.js +1 -0
  43. package/dist/site/assets/classDiagram-v2-L25IHNXF-DwKi-r2i.js +217 -0
  44. package/dist/site/assets/cose-bilkent-JH36ORCC-8N6YUm1i.js +1 -0
  45. package/dist/site/assets/cover-blue-Bh8Xp4T5.avif +0 -0
  46. package/dist/site/assets/cover-blue-mobile-YcuYIg0I.avif +0 -0
  47. package/dist/site/assets/cover-green-By13JjUx.avif +0 -0
  48. package/dist/site/assets/cover-green-mobile-BNTgNt7v.avif +0 -0
  49. package/dist/site/assets/cover-red-mobile-DHOCz3wI.avif +0 -0
  50. package/dist/site/assets/cover-red-qvZEk3PI.avif +0 -0
  51. package/dist/site/assets/cynefin-EF2NZ3EQ-Df5ATUPb.js +141 -0
  52. package/dist/site/assets/cynefinDiagram-L36ESFBY-DmAbfxAU.js +62 -0
  53. package/dist/site/assets/cytoscape.esm-BHa1VTXv.js +321 -0
  54. package/dist/site/assets/d3-scale-4DPf7zan.js +1 -0
  55. package/dist/site/assets/dagre-SPEB5RXH-B_2grAE7.js +4 -0
  56. package/dist/site/assets/diagram-3B7GL73J-C9FXwDlf.js +200 -0
  57. package/dist/site/assets/diagram-DNEMPZML-DflAT3gr.js +24 -0
  58. package/dist/site/assets/diagram-L3MUGCDN-B04gjrM_.js +41 -0
  59. package/dist/site/assets/diagram-LA4NIPWU-cfWJg8HX.js +24 -0
  60. package/dist/site/assets/diagram-MHCOC4E2-jRbOs2Df.js +3 -0
  61. package/dist/site/assets/diagram-XPFHEONP-yR45xV59.js +30 -0
  62. package/dist/site/assets/ebnfDiagram-UZSYDL2S-DlmNJUx4.js +1 -0
  63. package/dist/site/assets/elk-XV6XMXQE-cHLdRN7u.js +27 -0
  64. package/dist/site/assets/erDiagram-EYBAPDEH-7HsRsmBI.js +99 -0
  65. package/dist/site/assets/es-DoLiZPBX.js +2 -0
  66. package/dist/site/assets/favicon-C9YRygge.png +0 -0
  67. package/dist/site/assets/flowDiagram-MALGAFMO-DoJjw4RA.js +213 -0
  68. package/dist/site/assets/ganttDiagram-23REXITY-D2uZtX_8.js +292 -0
  69. package/dist/site/assets/gitGraphDiagram-STJD7YCW-CjftfLRK.js +106 -0
  70. package/dist/site/assets/graph-D8UmR1vK.js +1 -0
  71. package/dist/site/assets/index-CqcyU6rA.js +1 -0
  72. package/dist/site/assets/index-DWW-KDWe.css +1 -0
  73. package/dist/site/assets/infoDiagram-KBXO4MBG-HN-1tqq1.js +2 -0
  74. package/dist/site/assets/ishikawaDiagram-M35NCXHK-DcnRwsO0.js +70 -0
  75. package/dist/site/assets/journeyDiagram-OPLOXDXO-CMZGp8mG.js +139 -0
  76. package/dist/site/assets/kanban-definition-BZKZHSQY-C9vGS-EW.js +89 -0
  77. package/dist/site/assets/katex-DLSO0Xi6.js +257 -0
  78. package/dist/site/assets/mindmap-definition-I2QAS2VK-R2SGME7R.js +98 -0
  79. package/dist/site/assets/mobile-cabinet-BUr9vtlo.avif +0 -0
  80. package/dist/site/assets/mobile-cabinet-sm-pauJUfRH.avif +0 -0
  81. package/dist/site/assets/mobile-paper-DF0CuLes.avif +0 -0
  82. package/dist/site/assets/mobile-paper-sm-77eJHX6h.avif +0 -0
  83. package/dist/site/assets/open-nWGD2hyb.glb +0 -0
  84. package/dist/site/assets/pegDiagram-FD4XPPHP-eDMY4Hpd.js +1 -0
  85. package/dist/site/assets/pieDiagram-J4AKIIQI-DoHNiqwi.js +39 -0
  86. package/dist/site/assets/quadrantDiagram-XTYBLID2-Bz5idec8.js +7 -0
  87. package/dist/site/assets/railroadDiagram-MRQ6NCDL-DHJisW8P.js +1 -0
  88. package/dist/site/assets/requirementDiagram-Y7LWUY3S-5aETRIZz.js +84 -0
  89. package/dist/site/assets/resting-amber-BSjsErIg.avif +0 -0
  90. package/dist/site/assets/resting-black-DDQ4XMJI.avif +0 -0
  91. package/dist/site/assets/resting-blue-DDOT8IQ8.avif +0 -0
  92. package/dist/site/assets/resting-green-DkRrV8eX.avif +0 -0
  93. package/dist/site/assets/resting-ivory-CEqoG5yI.avif +0 -0
  94. package/dist/site/assets/resting-plum-B-8tkSmP.avif +0 -0
  95. package/dist/site/assets/resting-red-D0hLpMpz.avif +0 -0
  96. package/dist/site/assets/resting-slate-CH8Z_Rky.avif +0 -0
  97. package/dist/site/assets/resting-teal-CGt6jFmT.avif +0 -0
  98. package/dist/site/assets/resting-walnut-t3WgHgUO.avif +0 -0
  99. package/dist/site/assets/sankeyDiagram-WGJFYUXA-C7O4v9rg.js +40 -0
  100. package/dist/site/assets/search-stage-B8cH1AE_.avif +0 -0
  101. package/dist/site/assets/search-stage-mobile-BZ58ew4F.avif +0 -0
  102. package/dist/site/assets/sequenceDiagram-5NDRBG5M-D4sVU6s6.js +169 -0
  103. package/dist/site/assets/sizeCapture-INFHLROL-Bi2DkFS3.js +1 -0
  104. package/dist/site/assets/stateDiagram-v2-FJ4FJNEA-WqXK7YOd.js +291 -0
  105. package/dist/site/assets/swimlanes-UMQ2AFYF-Czo9WyoV.js +1 -0
  106. package/dist/site/assets/swimlanesDiagram-OMPLPG4O-BH5aEx0X.js +8 -0
  107. package/dist/site/assets/three-core-Dkab0Vtn.js +40 -0
  108. package/dist/site/assets/timeline-definition-SEUHKTQE-KGKDZW_q.js +120 -0
  109. package/dist/site/assets/usecaseDiagram-AFA6YXN4-S0_9S22K.js +370 -0
  110. package/dist/site/assets/vennDiagram-NNMJR3RB-DJOjLlbA.js +34 -0
  111. package/dist/site/assets/wardleyDiagram-S7YFUSEH-BnzYzY-n.js +78 -0
  112. package/dist/site/assets/xychartDiagram-GGNKY7IX-CKOVznoa.js +7 -0
  113. package/dist/site/index.html +14 -0
  114. package/dist/types/index.d.ts +163 -0
  115. package/package.json +27 -11
  116. package/dist/grimoire3d.js +0 -82093
  117. package/dist/grimoire3d.umd.cjs +0 -4470
@@ -0,0 +1,40 @@
1
+ import{q as Ae,t as Se,s as Le,g as Ee,b as $e,a as Te,_ as u,c as le,B as Me,k as K,a9 as Ne,A as Ce,m as Pe}from"./MermaidDiagram-Dma3Cwvn.js";import{w as ue,x as W,y as Ie,z as Oe,o as je}from"./d3-scale-4DPf7zan.js";import"./index-CqcyU6rA.js";import"./PageMarkdown-C-gI_dXg.js";function k(e){for(var a=e.length/6|0,d=new Array(a),r=0;r<a;)d[r]="#"+e.slice(r*6,++r*6);return d}k("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");k("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");k("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");k("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0");k("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");k("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");k("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");k("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");k("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");k("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var ze=k("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),A=e=>Oe(e[e.length-1]),De=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(k);A(De);var Be=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(k);A(Be);var Fe=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(k);A(Fe);var Re=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(k);A(Re);var Ve=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(k);A(Ve);var We=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(k);A(We);var Ge=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(k);A(Ge);var Ue=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(k);A(Ue);var qe=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(k);A(qe);var Ye=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(k);A(Ye);var He=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(k);A(He);var Xe=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(k);A(Xe);var Qe=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(k);A(Qe);var Ke=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(k);A(Ke);var Ze=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(k);A(Ze);var Je=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(k);A(Je);var ef=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(k);A(ef);var ff=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(k);A(ff);var af=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(k);A(af);var tf=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(k);A(tf);var cf=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(k);A(cf);var df=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(k);A(df);var nf=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(k);A(nf);var rf=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(k);A(rf);var sf=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(k);A(sf);var bf=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(k);A(bf);var of=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(k);A(of);ue(W(300,.5,0),W(-240,.5,1));ue(W(-100,.75,.35),W(80,1.5,.8));ue(W(260,.75,.35),W(80,1.5,.8));W();Ie();function ae(e){var a=e.length;return function(d){return e[Math.max(0,Math.min(a-1,Math.floor(d*a)))]}}ae(k("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));ae(k("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));ae(k("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));ae(k("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function he(e,a){let d;if(a===void 0)for(const r of e)r!=null&&(d<r||d===void 0&&r>=r)&&(d=r);else{let r=-1;for(let b of e)(b=a(b,++r,e))!=null&&(d<b||d===void 0&&b>=b)&&(d=b)}return d}function _e(e,a){let d;if(a===void 0)for(const r of e)r!=null&&(d>r||d===void 0&&r>=r)&&(d=r);else{let r=-1;for(let b of e)(b=a(b,++r,e))!=null&&(d>b||d===void 0&&b>=b)&&(d=b)}return d}function ne(e,a){let d=0;if(a===void 0)for(let r of e)(r=+r)&&(d+=r);else{let r=-1;for(let b of e)(b=+a(b,++r,e))&&(d+=b)}return d}function lf(e){return e.target.depth}function uf(e){return e.depth}function hf(e,a){return a-1-e.height}function ve(e,a){return e.sourceLinks.length?e.depth:a-1}function yf(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_e(e.sourceLinks,lf)-1:0}function Z(e){return function(){return e}}function ye(e,a){return J(e.source,a.source)||e.index-a.index}function pe(e,a){return J(e.target,a.target)||e.index-a.index}function J(e,a){return e.y0-a.y0}function re(e){return e.value}function pf(e){return e.index}function gf(e){return e.nodes}function mf(e){return e.links}function ge(e,a){const d=e.get(a);if(!d)throw new Error("missing: "+a);return d}function me({nodes:e}){for(const a of e){let d=a.y0,r=d;for(const b of a.sourceLinks)b.y0=d+b.width/2,d+=b.width;for(const b of a.targetLinks)b.y1=r+b.width/2,r+=b.width}}function kf(){let e=0,a=0,d=1,r=1,b=24,x=8,y,g=pf,n=ve,i,o,m=gf,_=mf,h=6;function v(){const t={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return M(t),T(t),N(t),O(t),S(t),me(t),t}v.update=function(t){return me(t),t},v.nodeId=function(t){return arguments.length?(g=typeof t=="function"?t:Z(t),v):g},v.nodeAlign=function(t){return arguments.length?(n=typeof t=="function"?t:Z(t),v):n},v.nodeSort=function(t){return arguments.length?(i=t,v):i},v.nodeWidth=function(t){return arguments.length?(b=+t,v):b},v.nodePadding=function(t){return arguments.length?(x=y=+t,v):x},v.nodes=function(t){return arguments.length?(m=typeof t=="function"?t:Z(t),v):m},v.links=function(t){return arguments.length?(_=typeof t=="function"?t:Z(t),v):_},v.linkSort=function(t){return arguments.length?(o=t,v):o},v.size=function(t){return arguments.length?(e=a=0,d=+t[0],r=+t[1],v):[d-e,r-a]},v.extent=function(t){return arguments.length?(e=+t[0][0],d=+t[1][0],a=+t[0][1],r=+t[1][1],v):[[e,a],[d,r]]},v.iterations=function(t){return arguments.length?(h=+t,v):h};function M({nodes:t,links:l}){for(const[f,c]of t.entries())c.index=f,c.sourceLinks=[],c.targetLinks=[];const s=new Map(t.map((f,c)=>[g(f,c,t),f]));for(const[f,c]of l.entries()){c.index=f;let{source:p,target:w}=c;typeof p!="object"&&(p=c.source=ge(s,p)),typeof w!="object"&&(w=c.target=ge(s,w)),p.sourceLinks.push(c),w.targetLinks.push(c)}if(o!=null)for(const{sourceLinks:f,targetLinks:c}of t)f.sort(o),c.sort(o)}function T({nodes:t}){for(const l of t)l.value=l.fixedValue===void 0?Math.max(ne(l.sourceLinks,re),ne(l.targetLinks,re)):l.fixedValue}function N({nodes:t}){const l=t.length;let s=new Set(t),f=new Set,c=0;for(;s.size;){for(const p of s){p.depth=c;for(const{target:w}of p.sourceLinks)f.add(w)}if(++c>l)throw new Error("circular link");s=f,f=new Set}}function O({nodes:t}){const l=t.length;let s=new Set(t),f=new Set,c=0;for(;s.size;){for(const p of s){p.height=c;for(const{source:w}of p.targetLinks)f.add(w)}if(++c>l)throw new Error("circular link");s=f,f=new Set}}function C({nodes:t}){const l=he(t,c=>c.depth)+1,s=(d-e-b)/(l-1),f=new Array(l);for(const c of t){const p=Math.max(0,Math.min(l-1,Math.floor(n.call(null,c,l))));c.layer=p,c.x0=e+p*s,c.x1=c.x0+b,f[p]?f[p].push(c):f[p]=[c]}if(i)for(const c of f)c.sort(i);return f}function D(t){const l=_e(t,s=>(r-a-(s.length-1)*y)/ne(s,re));for(const s of t){let f=a;for(const c of s){c.y0=f,c.y1=f+c.value*l,f=c.y1+y;for(const p of c.sourceLinks)p.width=p.value*l}f=(r-f+y)/(s.length+1);for(let c=0;c<s.length;++c){const p=s[c];p.y0+=f*(c+1),p.y1+=f*(c+1)}L(s)}}function S(t){const l=C(t);y=Math.min(x,(r-a)/(he(l,s=>s.length)-1)),D(l);for(let s=0;s<h;++s){const f=Math.pow(.99,s),c=Math.max(1-f,(s+1)/h);G(l,f,c),P(l,f,c)}}function P(t,l,s){for(let f=1,c=t.length;f<c;++f){const p=t[f];for(const w of p){let E=0,R=0;for(const{source:X,value:de}of w.targetLinks){let Q=de*(w.layer-X.layer);E+=I(X,w)*Q,R+=Q}if(!(R>0))continue;let H=(E/R-w.y0)*l;w.y0+=H,w.y1+=H,F(w)}i===void 0&&p.sort(J),B(p,s)}}function G(t,l,s){for(let f=t.length,c=f-2;c>=0;--c){const p=t[c];for(const w of p){let E=0,R=0;for(const{target:X,value:de}of w.sourceLinks){let Q=de*(X.layer-w.layer);E+=$(w,X)*Q,R+=Q}if(!(R>0))continue;let H=(E/R-w.y0)*l;w.y0+=H,w.y1+=H,F(w)}i===void 0&&p.sort(J),B(p,s)}}function B(t,l){const s=t.length>>1,f=t[s];j(t,f.y0-y,s-1,l),U(t,f.y1+y,s+1,l),j(t,r,t.length-1,l),U(t,a,0,l)}function U(t,l,s,f){for(;s<t.length;++s){const c=t[s],p=(l-c.y0)*f;p>1e-6&&(c.y0+=p,c.y1+=p),l=c.y1+y}}function j(t,l,s,f){for(;s>=0;--s){const c=t[s],p=(c.y1-l)*f;p>1e-6&&(c.y0-=p,c.y1-=p),l=c.y0-y}}function F({sourceLinks:t,targetLinks:l}){if(o===void 0){for(const{source:{sourceLinks:s}}of l)s.sort(pe);for(const{target:{targetLinks:s}}of t)s.sort(ye)}}function L(t){if(o===void 0)for(const{sourceLinks:l,targetLinks:s}of t)l.sort(pe),s.sort(ye)}function I(t,l){let s=t.y0-(t.sourceLinks.length-1)*y/2;for(const{target:f,width:c}of t.sourceLinks){if(f===l)break;s+=c+y}for(const{source:f,width:c}of l.targetLinks){if(f===t)break;s-=c}return s}function $(t,l){let s=l.y0-(l.targetLinks.length-1)*y/2;for(const{source:f,width:c}of l.targetLinks){if(f===t)break;s+=c+y}for(const{target:f,width:c}of t.sourceLinks){if(f===l)break;s-=c}return s}return v}var ie=Math.PI,se=2*ie,V=1e-6,xf=se-V;function be(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function we(){return new be}be.prototype=we.prototype={constructor:be,moveTo:function(e,a){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,a){this._+="L"+(this._x1=+e)+","+(this._y1=+a)},quadraticCurveTo:function(e,a,d,r){this._+="Q"+ +e+","+ +a+","+(this._x1=+d)+","+(this._y1=+r)},bezierCurveTo:function(e,a,d,r,b,x){this._+="C"+ +e+","+ +a+","+ +d+","+ +r+","+(this._x1=+b)+","+(this._y1=+x)},arcTo:function(e,a,d,r,b){e=+e,a=+a,d=+d,r=+r,b=+b;var x=this._x1,y=this._y1,g=d-e,n=r-a,i=x-e,o=y-a,m=i*i+o*o;if(b<0)throw new Error("negative radius: "+b);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=a);else if(m>V)if(!(Math.abs(o*g-n*i)>V)||!b)this._+="L"+(this._x1=e)+","+(this._y1=a);else{var _=d-x,h=r-y,v=g*g+n*n,M=_*_+h*h,T=Math.sqrt(v),N=Math.sqrt(m),O=b*Math.tan((ie-Math.acos((v+m-M)/(2*T*N)))/2),C=O/N,D=O/T;Math.abs(C-1)>V&&(this._+="L"+(e+C*i)+","+(a+C*o)),this._+="A"+b+","+b+",0,0,"+ +(o*_>i*h)+","+(this._x1=e+D*g)+","+(this._y1=a+D*n)}},arc:function(e,a,d,r,b,x){e=+e,a=+a,d=+d,x=!!x;var y=d*Math.cos(r),g=d*Math.sin(r),n=e+y,i=a+g,o=1^x,m=x?r-b:b-r;if(d<0)throw new Error("negative radius: "+d);this._x1===null?this._+="M"+n+","+i:(Math.abs(this._x1-n)>V||Math.abs(this._y1-i)>V)&&(this._+="L"+n+","+i),d&&(m<0&&(m=m%se+se),m>xf?this._+="A"+d+","+d+",0,1,"+o+","+(e-y)+","+(a-g)+"A"+d+","+d+",0,1,"+o+","+(this._x1=n)+","+(this._y1=i):m>V&&(this._+="A"+d+","+d+",0,"+ +(m>=ie)+","+o+","+(this._x1=e+d*Math.cos(b))+","+(this._y1=a+d*Math.sin(b))))},rect:function(e,a,d,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+a)+"h"+ +d+"v"+ +r+"h"+-d+"Z"},toString:function(){return this._}};function ke(e){return function(){return e}}function _f(e){return e[0]}function vf(e){return e[1]}var wf=Array.prototype.slice;function Af(e){return e.source}function Sf(e){return e.target}function Lf(e){var a=Af,d=Sf,r=_f,b=vf,x=null;function y(){var g,n=wf.call(arguments),i=a.apply(this,n),o=d.apply(this,n);if(x||(x=g=we()),e(x,+r.apply(this,(n[0]=i,n)),+b.apply(this,n),+r.apply(this,(n[0]=o,n)),+b.apply(this,n)),g)return x=null,g+""||null}return y.source=function(g){return arguments.length?(a=g,y):a},y.target=function(g){return arguments.length?(d=g,y):d},y.x=function(g){return arguments.length?(r=typeof g=="function"?g:ke(+g),y):r},y.y=function(g){return arguments.length?(b=typeof g=="function"?g:ke(+g),y):b},y.context=function(g){return arguments.length?(x=g??null,y):x},y}function Ef(e,a,d,r,b){e.moveTo(a,d),e.bezierCurveTo(a=(a+r)/2,d,a,b,r,b)}function $f(){return Lf(Ef)}function Tf(e){return[e.source.x1,e.y0]}function Mf(e){return[e.target.x0,e.y1]}function Nf(){return $f().source(Tf).target(Mf)}var oe=(function(){var e=u(function(g,n,i,o){for(i=i||{},o=g.length;o--;i[g[o]]=n);return i},"o"),a=[1,9],d=[1,10],r=[1,5,10,12],b={trace:u(function(){},"trace"),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:u(function(n,i,o,m,_,h,v){var M=h.length-1;switch(_){case 7:const T=m.findOrCreateNode(h[M-4].trim().replaceAll('""','"')),N=m.findOrCreateNode(h[M-2].trim().replaceAll('""','"')),O=parseFloat(h[M].trim());m.addLink(T,N,O);break;case 8:case 9:case 11:this.$=h[M];break;case 10:this.$=h[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:a,20:d},{1:[2,6],7:11,10:[1,12]},e(d,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(r,[2,8]),e(r,[2,9]),{19:[1,16]},e(r,[2,11]),{1:[2,1]},{1:[2,5]},e(d,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:a,20:d},{15:18,16:7,17:8,18:a,20:d},{18:[1,19]},e(d,[2,3]),{12:[1,20]},e(r,[2,10]),{15:21,16:7,17:8,18:a,20:d},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:u(function(n,i){if(i.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=i,o}},"parseError"),parse:u(function(n){var i=this,o=[0],m=[],_=[null],h=[],v=this.table,M="",T=0,N=0,O=2,C=1,D=h.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(P.yy[G]=this.yy[G]);S.setInput(n,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var B=S.yylloc;h.push(B);var U=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(E){o.length=o.length-2*E,_.length=_.length-E,h.length=h.length-E}u(j,"popStack");function F(){var E;return E=m.pop()||S.lex()||C,typeof E!="number"&&(E instanceof Array&&(m=E,E=m.pop()),E=i.symbols_[E]||E),E}u(F,"lex");for(var L,I,$,t,l={},s,f,c,p;;){if(I=o[o.length-1],this.defaultActions[I]?$=this.defaultActions[I]:((L===null||typeof L>"u")&&(L=F()),$=v[I]&&v[I][L]),typeof $>"u"||!$.length||!$[0]){var w="";p=[];for(s in v[I])this.terminals_[s]&&s>O&&p.push("'"+this.terminals_[s]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+p.join(", ")+", got '"+(this.terminals_[L]||L)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(L==C?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[L]||L,line:S.yylineno,loc:B,expected:p})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+L);switch($[0]){case 1:o.push(L),_.push(S.yytext),h.push(S.yylloc),o.push($[1]),L=null,N=S.yyleng,M=S.yytext,T=S.yylineno,B=S.yylloc;break;case 2:if(f=this.productions_[$[1]][1],l.$=_[_.length-f],l._$={first_line:h[h.length-(f||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(f||1)].first_column,last_column:h[h.length-1].last_column},U&&(l._$.range=[h[h.length-(f||1)].range[0],h[h.length-1].range[1]]),t=this.performAction.apply(l,[M,N,T,P.yy,$[1],_,h].concat(D)),typeof t<"u")return t;f&&(o=o.slice(0,-1*f*2),_=_.slice(0,-1*f),h=h.slice(0,-1*f)),o.push(this.productions_[$[1]][0]),_.push(l.$),h.push(l._$),c=v[o[o.length-2]][o[o.length-1]],o.push(c);break;case 3:return!0}}return!0},"parse")},x=(function(){var g={EOF:1,parseError:u(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:u(function(n,i){return this.yy=i||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var i=n.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:u(function(n){var i=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;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),o.length-1&&(this.yylineno-=o.length-1);var _=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:o?(o.length===m.length?this.yylloc.first_column:0)+m[m.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(n){this.unput(this.match.slice(n))},"less"),pastInput:u(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var n=this.pastInput(),i=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
+ `+i+"^"},"showPosition"),test_match:u(function(n,i){var o,m,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),m=n[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+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var h in _)this[h]=_[h];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,i,o,m;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),h=0;h<_.length;h++)if(o=this._input.match(this.rules[_[h]]),o&&(!i||o[0].length>i[0].length)){if(i=o,m=h,this.options.backtrack_lexer){if(n=this.test_match(o,_[h]),n!==!1)return n;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(n=this.test_match(i,_[m]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var i=this.next();return i||this.lex()},"lex"),begin:u(function(i){this.conditionStack.push(i)},"begin"),popState:u(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:u(function(i){this.begin(i)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(i,o,m,_){switch(m){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\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:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return g})();b.lexer=x;function y(){this.yy={}}return u(y,"Parser"),y.prototype=b,b.Parser=y,new y})();oe.parser=oe;var ee=oe,te=[],ce=[],fe=new Map,Cf=u(()=>{te=[],ce=[],fe=new Map,Ce()},"clear"),q,Pf=(q=class{constructor(a,d,r=0){this.source=a,this.target=d,this.value=r}},u(q,"SankeyLink"),q),If=u((e,a,d)=>{te.push(new Pf(e,a,d))},"addLink"),Y,Of=(Y=class{constructor(a){this.ID=a}},u(Y,"SankeyNode"),Y),jf=u(e=>{e=Pe.sanitizeText(e,le());let a=fe.get(e);return a===void 0&&(a=new Of(e),fe.set(e,a),ce.push(a)),a},"findOrCreateNode"),zf=u(()=>ce,"getNodes"),Df=u(()=>te,"getLinks"),Bf=u(()=>({nodes:ce.map(e=>({id:e.ID})),links:te.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),Ff={nodesMap:fe,getConfig:u(()=>le().sankey,"getConfig"),getNodes:zf,getLinks:Df,getGraph:Bf,addLink:If,findOrCreateNode:jf,getAccTitle:Te,setAccTitle:$e,getAccDescription:Ee,setAccDescription:Le,getDiagramTitle:Se,setDiagramTitle:Ae,clear:Cf},z,xe=(z=class{static next(a){return new z(a+ ++z.count)}constructor(a){this.id=a,this.href=`#${a}`}toString(){return"url("+this.href+")"}},u(z,"Uid"),z.count=0,z),Rf={left:uf,right:hf,center:yf,justify:ve},Vf=u(e=>{let a=0,d=0;for(const r of e){const b=r.value??0;b>a&&(a=b,d=r.layer??0)}return d},"findCentralNodeLayer"),Wf=u(function(e,a,d,r){const{securityLevel:b,sankey:x}=le(),y=Me.sankey;let g;b==="sandbox"&&(g=K("#i"+a));const n=b==="sandbox"?K(g.nodes()[0].contentDocument.body):K("body"),i=b==="sandbox"?n.select(`[id="${a}"]`):K(`[id="${a}"]`),o=x?.width??y.width,m=x?.height??y.width,_=x?.useMaxWidth??y.useMaxWidth,h=x?.nodeAlignment??y.nodeAlignment,v=x?.prefix??y.prefix,M=x?.suffix??y.suffix,T=x?.showValues??y.showValues,N=x?.nodeWidth??y.nodeWidth??10,O=x?.nodePadding??y.nodePadding??12,C=x?.labelStyle??y.labelStyle??"legacy",D=x?.nodeColors??{},S=r.db.getGraph(),P=Rf[h];kf().nodeId(f=>f.id).nodeWidth(N).nodePadding(O+(T?15:0)).nodeAlign(P).extent([[0,0],[o,m]])(S);const B=Vf(S.nodes),U=je(ze),j=u(f=>D[f]??U(f),"getNodeColor");i.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",f=>(f.uid=xe.next("node-")).id).attr("transform",function(f){return"translate("+f.x0+","+f.y0+")"}).attr("x",f=>f.x0).attr("y",f=>f.y0).append("rect").attr("height",f=>f.y1-f.y0).attr("width",f=>f.x1-f.x0).attr("fill",f=>j(f.id));const F=u(({id:f,value:c})=>T?`${f}
7
+ ${v}${Math.round(c*100)/100}${M}`:f,"getText"),L=u(f=>C==="outlined"?(f.layer??0)<B?{x:f.x0-6,anchor:"end"}:{x:f.x1+6,anchor:"start"}:f.x0<o/2?{x:f.x1+6,anchor:"start"}:{x:f.x0-6,anchor:"end"},"getLabelPosition"),I=i.append("g").attr("class","node-labels").attr("font-size",14),$=u(f=>I.selectAll(f?`.${f}`:"text").data(S.nodes).join("text").attr("class",f??null).attr("x",c=>L(c).x).attr("y",c=>(c.y1+c.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",c=>L(c).anchor).text(F),"appendLabel");C==="outlined"?($("sankey-label-bg"),$("sankey-label-fg")):$();const t=i.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),l=x?.linkColor??"gradient";if(l==="gradient"){const f=t.append("linearGradient").attr("id",c=>(c.uid=xe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",c=>c.source.x1).attr("x2",c=>c.target.x0);f.append("stop").attr("offset","0%").attr("stop-color",c=>j(c.source.id)),f.append("stop").attr("offset","100%").attr("stop-color",c=>j(c.target.id))}let s;switch(l){case"gradient":s=u(f=>f.uid,"coloring");break;case"source":s=u(f=>j(f.source.id),"coloring");break;case"target":s=u(f=>j(f.target.id),"coloring");break;default:s=l}t.append("path").attr("d",Nf()).attr("stroke",s).attr("stroke-width",f=>Math.max(1,f.width)),Ne(void 0,i,0,_)},"draw"),Gf={draw:Wf},Uf=u(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),"prepareTextForParsing"),qf=u(e=>`.label {
9
+ font-family: ${e.fontFamily};
10
+ }
11
+
12
+ .node-labels {
13
+ font-family: ${e.fontFamily};
14
+ }
15
+
16
+ /* Outlined label style - background stroke for better readability */
17
+ .sankey-label-bg {
18
+ stroke: ${e.mainBkg||e.background||"#fff"};
19
+ stroke-width: 4px;
20
+ stroke-linejoin: round;
21
+ paint-order: stroke;
22
+ }
23
+
24
+ /* Foreground label text */
25
+ .sankey-label-fg {
26
+ fill: ${e.textColor};
27
+ }
28
+
29
+ /* Node styling */
30
+ .node rect {
31
+ shape-rendering: crispEdges;
32
+ }
33
+
34
+ /* Link styling */
35
+ .link {
36
+ fill: none;
37
+ stroke-opacity: 0.5;
38
+ mix-blend-mode: multiply;
39
+ }
40
+ `,"getStyles"),Yf=qf,Hf=ee.parse.bind(ee);ee.parse=e=>Hf(Uf(e));var Jf={styles:Yf,parser:ee,db:Ff,renderer:Gf};export{Jf as diagram};
@@ -0,0 +1,169 @@
1
+ import{I as pr}from"./chunk-2Q5K7J3B-BDgDFVbx.js";import{_ as f,o as Er,c as j,k as Ht,l as nt,Y as Ue,d as ur,e as fr,m as N,b as He,s as _r,q as gr,a as xr,g as yr,t as Ir,v as Rr,J as Or,A as Lr,j as Ft,u as Q,Z as tt,$ as vt,S as Ge,a0 as br,M as zt,a1 as mr,a2 as Xe}from"./MermaidDiagram-Dma3Cwvn.js";import{a as Sr,g as le,b as pt,d as Ar,e as he,f as de}from"./chunk-HFQBQIA3-B8uXoLoT.js";import"./index-CqcyU6rA.js";import"./PageMarkdown-C-gI_dXg.js";var ne=(function(){var e=f(function(_t,w,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=w);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],h=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],L=[1,25],g=[1,26],R=[1,27],T=[1,28],O=[1,29],x=[1,30],m=[1,31],S=[1,32],b=[1,33],P=[1,34],k=[1,35],B=[1,36],V=[1,37],K=[1,38],z=[1,39],X=[1,40],et=[1,42],rt=[1,43],U=[1,44],ot=[1,45],at=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Z=[1,56],Mt=[1,75],A=[1,81],v=[1,82],dt=[1,83],st=[1,84],H=[1,85],mt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],ye=[1,94],Ie=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],me=[1,100],Se=[1,101],Ae=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[1,106],De=[2,79],ve=[2,78],Pt=[4,5,17,51,53,54],Bt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],$t=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],jt=[5,52],F=[62,70,71,72,73],Be=[62,73],lt=[1,152],te={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(w,C,D,y,G,c,kt){var p=c.length-1;switch(G){case 3:return y.apply(c[p]),c[p];case 4:case 10:this.$=[];break;case 5:case 11:c[p-1].push(c[p]),this.$=c[p-1];break;case 6:case 7:case 12:case 13:this.$=c[p];break;case 8:case 9:case 14:this.$=[];break;case 16:c[p].type="createParticipant",this.$=c[p];break;case 17:c[p-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[p-2])}),c[p-1].push({type:"boxEnd",boxText:c[p-2]}),this.$=c[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-2]),sequenceIndexStep:Number(c[p-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-1].actor};break;case 30:y.setDiagramTitle(c[p].substring(6)),this.$=c[p].substring(6);break;case 31:y.setDiagramTitle(c[p].substring(7)),this.$=c[p].substring(7);break;case 32:this.$=c[p].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[p].trim(),y.setAccDescription(this.$);break;case 35:c[p-1].unshift({type:"loopStart",loopText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.LOOP_START}),c[p-1].push({type:"loopEnd",loopText:c[p-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[p-1];break;case 36:c[p-1].unshift({type:"rectStart",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_START}),c[p-1].push({type:"rectEnd",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[p-1];break;case 37:c[p-1].unshift({type:"optStart",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_START}),c[p-1].push({type:"optEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[p-1];break;case 38:c[p-1].unshift({type:"altStart",altText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.ALT_START}),c[p-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[p-1];break;case 39:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 40:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 41:c[p-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.CRITICAL_START}),c[p-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[p-1];break;case 42:c[p-1].unshift({type:"breakStart",breakText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_START}),c[p-1].push({type:"breakEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[p-1];break;case 44:this.$=c[p-3].concat([{type:"option",optionText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[p]]);break;case 46:this.$=c[p-3].concat([{type:"and",parText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.PAR_AND},c[p]]);break;case 48:this.$=c[p-3].concat([{type:"else",altText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.ALT_ELSE},c[p]]);break;case 49:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 50:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 51:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 52:case 57:c[p-1].draw="actor",c[p-1].type="addParticipant",this.$=c[p-1];break;case 53:c[p-1].type="destroyParticipant",this.$=c[p-1];break;case 54:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 55:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 56:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 58:this.$=[c[p-1],{type:"addNote",placement:c[p-2],actor:c[p-1].actor,text:c[p]}];break;case 59:c[p-2]=[].concat(c[p-1],c[p-1]).slice(0,2),c[p-2][0]=c[p-2][0].actor,c[p-2][1]=c[p-2][1].actor,this.$=[c[p-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[p-2].slice(0,2),text:c[p]}];break;case 60:this.$=[c[p-1],{type:"addLinks",actor:c[p-1].actor,text:c[p]}];break;case 61:this.$=[c[p-1],{type:"addALink",actor:c[p-1].actor,text:c[p]}];break;case 62:this.$=[c[p-1],{type:"addProperties",actor:c[p-1].actor,text:c[p]}];break;case 63:this.$=[c[p-1],{type:"addDetails",actor:c[p-1].actor,text:c[p]}];break;case 66:this.$=[c[p-2],c[p]];break;case 67:this.$=c[p];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor}];break;case 71:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-4].actor}];break;case 72:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor}];break;case 73:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-4].actor}];break;case 74:this.$=[c[p-5],c[p-1],{type:"addMessage",from:c[p-5].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-5].actor}];break;case 75:this.$=[c[p-3],c[p-1],{type:"addMessage",from:c[p-3].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p]}];break;case 76:this.$={type:"addParticipant",actor:c[p-1],config:c[p]};break;case 77:this.$=c[p-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:c[p]};break;case 80:this.$=y.LINETYPE.SOLID_OPEN;break;case 81:this.$=y.LINETYPE.DOTTED_OPEN;break;case 82:this.$=y.LINETYPE.SOLID;break;case 83:this.$=y.LINETYPE.SOLID_TOP;break;case 84:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=y.LINETYPE.STICK_TOP;break;case 86:this.$=y.LINETYPE.STICK_BOTTOM;break;case 87:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=y.LINETYPE.DOTTED;break;case 101:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=y.LINETYPE.SOLID_CROSS;break;case 103:this.$=y.LINETYPE.DOTTED_CROSS;break;case 104:this.$=y.LINETYPE.SOLID_POINT;break;case 105:this.$=y.LINETYPE.DOTTED_POINT;break;case 106:this.$=y.parseMessage(c[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,5]),{9:48,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:K,53:z,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Z,73:W},{23:57,62:Z,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Z,73:Mt},{23:76,55:77,62:Z,73:Mt},{23:78,62:Z,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:st,82:H,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Z,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],De,{23:112,62:Z,73:W}),{23:113,62:Z,73:W},{23:114,62:Z,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ve),e(M,[2,6]),e(M,[2,16]),e(Pt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],De),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Bt,i,{7:121}),e(Bt,i,{7:122}),e(Bt,i,{7:123}),e(Ce,i,{41:124,7:125}),e($t,i,{43:126,7:127}),e($t,i,{7:127,43:128}),e(Me,i,{46:129,7:130}),e(Bt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(jt,ve,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Z,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:st,82:H,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Z,73:W},{23:150,60:149,62:Z,73:W},e(Be,[2,68]),e(Be,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:K,53:z,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,165]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,50:[1,166],51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,167]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,49:[1,168],51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,169]},{17:[1,170]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,48:[1,171],51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:K,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(jt,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Z,73:W},{23:179,62:Z,73:W},{23:180,62:Z,73:W},{58:181,104:lt},{23:182,62:Z,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Pt,[2,11]),{13:187,51:K,53:z,54:X},e(Pt,[2,13]),e(Pt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Z,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Z,73:W},e(Pt,[2,12]),e(Ce,i,{7:125,41:202}),e($t,i,{7:127,43:203}),e(Me,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(jt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(w,C){if(C.recoverable)this.trace(w);else{var D=new Error(w);throw D.hash=C,D}},"parseError"),parse:f(function(w){var C=this,D=[0],y=[],G=[null],c=[],kt=this.table,p="",Vt=0,Ye=0,lr=2,Ve=1,hr=c.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(It.yy[ee]=this.yy[ee]);$.setInput(w,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var re=$.yylloc;c.push(re);var dr=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tr(ct){D.length=D.length-2*ct,G.length=G.length-ct,c.length=c.length-ct}f(Tr,"popStack");function We(){var ct;return ct=y.pop()||$.lex()||Ve,typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=C.symbols_[ct]||ct),ct}f(We,"lex");for(var it,Rt,ht,ae,St={},Wt,Et,Ke,Kt;;){if(Rt=D[D.length-1],this.defaultActions[Rt]?ht=this.defaultActions[Rt]:((it===null||typeof it>"u")&&(it=We()),ht=kt[Rt]&&kt[Rt][it]),typeof ht>"u"||!ht.length||!ht[0]){var se="";Kt=[];for(Wt in kt[Rt])this.terminals_[Wt]&&Wt>lr&&Kt.push("'"+this.terminals_[Wt]+"'");$.showPosition?se="Parse error on line "+(Vt+1)+`:
2
+ `+$.showPosition()+`
3
+ Expecting `+Kt.join(", ")+", got '"+(this.terminals_[it]||it)+"'":se="Parse error on line "+(Vt+1)+": Unexpected "+(it==Ve?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(se,{text:$.match,token:this.terminals_[it]||it,line:$.yylineno,loc:re,expected:Kt})}if(ht[0]instanceof Array&&ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+it);switch(ht[0]){case 1:D.push(it),G.push($.yytext),c.push($.yylloc),D.push(ht[1]),it=null,Ye=$.yyleng,p=$.yytext,Vt=$.yylineno,re=$.yylloc;break;case 2:if(Et=this.productions_[ht[1]][1],St.$=G[G.length-Et],St._$={first_line:c[c.length-(Et||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Et||1)].first_column,last_column:c[c.length-1].last_column},dr&&(St._$.range=[c[c.length-(Et||1)].range[0],c[c.length-1].range[1]]),ae=this.performAction.apply(St,[p,Ye,Vt,It.yy,ht[1],G,c].concat(hr)),typeof ae<"u")return ae;Et&&(D=D.slice(0,-1*Et*2),G=G.slice(0,-1*Et),c=c.slice(0,-1*Et)),D.push(this.productions_[ht[1]][0]),G.push(St.$),c.push(St._$),Ke=kt[D[D.length-2]][D[D.length-1]],D.push(Ke);break;case 3:return!0}}return!0},"parse")},cr=(function(){var _t={EOF:1,parseError:f(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:f(function(w,C){return this.yy=C||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:f(function(w){var C=w.length,D=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),D.length-1&&(this.yylineno-=D.length-1);var G=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:D?(D.length===y.length?this.yylloc.first_column:0)+y[y.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(w){this.unput(this.match.slice(w))},"less"),pastInput:f(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+C+"^"},"showPosition"),test_match:f(function(w,C){var D,y,G;if(this.options.backtrack_lexer&&(G={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&&(G.yylloc.range=this.yylloc.range.slice(0))),y=w[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],D=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var c in G)this[c]=G[c];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,C,D,y;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),c=0;c<G.length;c++)if(D=this._input.match(this.rules[G[c]]),D&&(!C||D[0].length>C[0].length)){if(C=D,y=c,this.options.backtrack_lexer){if(w=this.test_match(D,G[c]),w!==!1)return w;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(w=this.test_match(C,G[y]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var C=this.next();return C||this.lex()},"lex"),begin:f(function(C){this.conditionStack.push(C)},"begin"),popState:f(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:f(function(C){this.begin(C)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(C,D,y,G){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return D.yytext=D.yytext.trim(),73;case 12:return D.yytext=D.yytext.trim(),this.begin("ALIAS"),73;case 13:return D.yytext=D.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return D.yytext=D.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return D.yytext=D.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^<>:\n,;@\s]+(?=\s*@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:link(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:properties(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:details(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return _t})();te.lexer=cr;function Yt(){this.yy={}}return f(Yt,"Parser"),Yt.prototype=te,te.Parser=Yt,new Yt})();ne.parser=ne;var wr=ne,Nr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},Pr={FILLED:0,OPEN:1},kr={LEFTOF:0,RIGHTOF:1,OVER:2},qt={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},wt,Dr=(wt=class{constructor(){this.state=new pr(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=He,this.setAccDescription=_r,this.setDiagramTitle=gr,this.getAccTitle=xr,this.getAccDescription=yr,this.getDiagramTitle=Ir,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(j().wrap),this.LINETYPE=Nr,this.ARROWTYPE=Pr,this.PLACEMENT=kr}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,a,r,i,o){let s=this.state.records.currentBox,n;if(o!==void 0){let d;o.includes(`
7
+ `)?d=o+`
8
+ `:d=`{
9
+ `+o+`
10
+ }`,n=Rr(d,{schema:Or})}i=n?.type??i,n?.alias&&(!r||r.text===a)&&(r={text:n.alias,wrap:r?.wrap,type:i});const h=this.state.records.actors.get(t);if(h){if(this.state.records.currentBox&&h.box&&this.state.records.currentBox!==h.box)throw new Error(`A same participant should only be defined in one Box: ${h.name} can't be in '${h.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=h.box?h.box:this.state.records.currentBox,h.box=s,h&&a===h.name&&r==null)return}if(r?.text==null&&(r={text:a,type:i}),(i==null||r.text==null)&&(r={text:a,type:i}),this.state.records.actors.set(t,{box:s,name:a,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const d=this.state.records.actors.get(this.state.records.prevActor);d&&(d.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let a,r=0;if(!t)return 0;for(a=0;a<this.state.records.messages.length;a++)this.state.records.messages[a].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[a].from===t&&r++,this.state.records.messages[a].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[a].from===t&&r--;return r}addMessage(t,a,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(t,a,r,i,o=!1,s){if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const h=new Error("Trying to inactivate an inactive participant ("+t+")");throw h.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},h}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:a,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:o,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const a=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(a===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:a}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:j().sequence?.wrap??!1}clear(){this.state.reset(),Lr()}parseMessage(t){const a=t.trim(),{wrap:r,cleanedText:i}=this.extractWrap(a),o={text:i,wrap:r};return nt.debug(`parseMessage: ${JSON.stringify(o)}`),o}parseBoxData(t){const a=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=a?.[1]?a[1].trim():"transparent",i=a?.[2]?a[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const n=new Option().style;n.color=r,n.color!==r&&(r="transparent",i=t.trim())}const{wrap:o,cleanedText:s}=this.extractWrap(i);return{text:s?Ft(s,j()):void 0,color:r,wrap:o}}addNote(t,a,r){const i={actor:t,placement:a,message:r.text,wrap:r.wrap??this.autoWrap()},o=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:o[0],to:o[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:a})}addLinks(t,a){const r=this.getActor(t);try{let i=Ft(a.text,j());i=i.replace(/&equals;/g,"="),i=i.replace(/&amp;/g,"&");const o=JSON.parse(i);this.insertLinks(r,o)}catch(i){nt.error("error while parsing actor link text",i)}}addALink(t,a){const r=this.getActor(t);try{const i={};let o=Ft(a.text,j());const s=o.indexOf("@");o=o.replace(/&equals;/g,"="),o=o.replace(/&amp;/g,"&");const n=o.slice(0,s-1).trim(),h=o.slice(s+1).trim();i[n]=h,this.insertLinks(r,i)}catch(i){nt.error("error while parsing actor link text",i)}}insertLinks(t,a){if(t.links==null)t.links=a;else for(const r in a)t.links[r]=a[r]}addProperties(t,a){const r=this.getActor(t);try{const i=Ft(a.text,j()),o=JSON.parse(i);this.insertProperties(r,o)}catch(i){nt.error("error while parsing actor properties text",i)}}insertProperties(t,a){if(t.properties==null)t.properties=a;else for(const r in a)t.properties[r]=a[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,a){const r=this.getActor(t),i=document.getElementById(a.text);try{const o=i.innerHTML,s=JSON.parse(o);s.properties&&this.insertProperties(r,s.properties),s.links&&this.insertLinks(r,s.links)}catch(o){nt.error("error while parsing actor details text",o)}}getActorProperty(t,a){if(t?.properties!==void 0)return t.properties[a]}apply(t){if(Array.isArray(t))t.forEach(a=>{this.apply(a)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":He(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return j().sequence}},f(wt,"SequenceDB"),wt),vr=f(e=>{const t=e.dropShadow??"none",{look:a}=j();return`.actor {
11
+ stroke: ${e.actorBorder};
12
+ fill: ${e.actorBkg};
13
+ stroke-width: ${e.strokeWidth??1};
14
+ }
15
+
16
+ rect.actor.outer-path[data-look="neo"] {
17
+ filter: ${t};
18
+ }
19
+
20
+ rect.note[data-look="neo"] {
21
+ stroke:${e.noteBorderColor};
22
+ fill:${e.noteBkgColor};
23
+ filter: ${t};
24
+ }
25
+
26
+ text.actor > tspan {
27
+ fill: ${e.actorTextColor};
28
+ stroke: none;
29
+ }
30
+
31
+ .actor-line {
32
+ stroke: ${e.actorLineColor};
33
+ }
34
+
35
+ .innerArc {
36
+ stroke-width: 1.5;
37
+ stroke-dasharray: none;
38
+ }
39
+
40
+ .messageLine0 {
41
+ stroke-width: 1.5;
42
+ stroke-dasharray: none;
43
+ stroke: ${e.signalColor};
44
+ }
45
+
46
+ .messageLine1 {
47
+ stroke-width: 1.5;
48
+ stroke-dasharray: 2, 2;
49
+ stroke: ${e.signalColor};
50
+ }
51
+
52
+ [id$="-arrowhead"] path {
53
+ fill: ${e.signalColor};
54
+ stroke: ${e.signalColor};
55
+ }
56
+
57
+ .sequenceNumber {
58
+ fill: ${e.sequenceNumberColor};
59
+ }
60
+
61
+ [id$="-sequencenumber"] {
62
+ fill: ${e.signalColor};
63
+ }
64
+
65
+ [id$="-crosshead"] path {
66
+ fill: ${e.signalColor};
67
+ stroke: ${e.signalColor};
68
+ }
69
+
70
+ .messageText {
71
+ fill: ${e.signalTextColor};
72
+ stroke: none;
73
+ }
74
+
75
+ .labelBox {
76
+ stroke: ${e.labelBoxBorderColor};
77
+ fill: ${e.labelBoxBkgColor};
78
+ filter: ${a==="neo"?t:"none"};
79
+ }
80
+
81
+ .labelText, .labelText > tspan {
82
+ fill: ${e.labelTextColor};
83
+ stroke: none;
84
+ }
85
+
86
+ .loopText, .loopText > tspan {
87
+ fill: ${e.loopTextColor};
88
+ stroke: none;
89
+ }
90
+
91
+ .sectionTitle, .sectionTitle > tspan {
92
+ fill: ${e.loopTextColor};
93
+ stroke: none;
94
+ }
95
+
96
+ .loopLine {
97
+ stroke-width: 2px;
98
+ stroke-dasharray: 2, 2;
99
+ stroke: ${e.labelBoxBorderColor};
100
+ fill: ${e.labelBoxBorderColor};
101
+ }
102
+
103
+ .note {
104
+ //stroke: #decc93;
105
+ stroke: ${e.noteBorderColor};
106
+ fill: ${e.noteBkgColor};
107
+ }
108
+
109
+ /*
110
+ * No font-weight here, deliberately. Note text renders inside tspan elements, and a weight emitted at
111
+ * tspan level outranks the inline style drawText puts on the parent text element from the
112
+ * sequence.noteFontWeight config key -- so that documented key would never reach the glyphs.
113
+ * The theme variable formerly emitted here is a different value from that config key, and
114
+ * git/styles.js reads it as its own bold-label weight under redux and neo, so it cannot be
115
+ * lowered there either.
116
+ */
117
+ .noteText, .noteText > tspan {
118
+ fill: ${e.noteTextColor};
119
+ stroke: none;
120
+ }
121
+
122
+ .activation0 {
123
+ fill: ${e.activationBkgColor};
124
+ stroke: ${e.activationBorderColor};
125
+ }
126
+
127
+ .activation1 {
128
+ fill: ${e.activationBkgColor};
129
+ stroke: ${e.activationBorderColor};
130
+ }
131
+
132
+ .activation2 {
133
+ fill: ${e.activationBkgColor};
134
+ stroke: ${e.activationBorderColor};
135
+ }
136
+
137
+ .actorPopupMenu {
138
+ position: absolute;
139
+ }
140
+
141
+ .actorPopupMenuPanel {
142
+ position: absolute;
143
+ fill: ${e.actorBkg};
144
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
145
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
146
+ }
147
+ .actor-man circle, line {
148
+ fill: ${e.actorBkg};
149
+ stroke-width: 2px;
150
+ }
151
+
152
+ g rect.rect {
153
+ filter: ${t};
154
+ stroke: ${e.nodeBorder};
155
+ }
156
+ `},"getStyles"),Cr=vr,Xt=44,Te=6,Ut=6,Mr=f((e,t)=>e.actorTextHeight??Q.calculateTextDimensions(e.description??"",{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}).height,"actorLabelHeight"),Je=f(e=>Xt+Te+e+Ut,"actorStackHeight"),Br=f((e,t,a)=>{const r=e+t,i=r-Ut-a/2;return{lifelineStartY:r,glyphBottomY:r-Ut-a-Te,labelCenterY:i}},"headerBands"),Yr=f((e,t)=>{const a=e+Ut,r=a+Xt;return{glyphTopY:a,glyphBottomY:r,labelCenterY:r+Te+t/2,stackHeight:Je(t)}},"footerBands"),Ot=36,Vr=-5,Ze=60,Fe=Ze-Vr,Ct=f((e,t,a,r)=>{if(t.look!=="neo")return null;const i=Mr(e,t);return a?Yr(r,i):Br(r,e.height,i)},"neoBands"),gt="actor-top",xt="actor-bottom",Jt="actor-box",Lt="actor-man",ut=new Set(["redux-color","redux-dark-color"]),J=f((e,t)=>e?.length?e[t%e.length]:void 0,"paletteColor"),Dt=f(function(e,t){const a=Ar(e,t);return zt().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Wr=f(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const o=t.links,s=t.actorCnt,n=t.rectData;var h="none";i&&(h="block !important");const d=e.append("g");d.attr("id","actor"+s+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",h);var E="";n.class!==void 0&&(E=" "+n.class);let u=n.width>a?n.width:a;const _=d.append("rect");if(_.attr("class","actorPopupMenuPanel"+E),_.attr("x",n.x),_.attr("y",n.height),_.attr("fill",n.fill),_.attr("stroke",n.stroke),_.attr("width",u),_.attr("height",n.height),_.attr("rx",n.rx),_.attr("ry",n.ry),o!=null){var L=20;for(let T in o){var g=d.append("a"),R=Ue.sanitizeUrl(o[T]);g.attr("xlink:href",R),g.attr("target","_blank"),la(r)(T,g,n.x+10,n.height+L,u,20,{class:"actor"},r),L+=30}}return _.attr("height",L),{height:n.height+L,width:u}},"drawPopup"),Zt=f(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Gt=f(async function(e,t,a=null){let r=e.append("foreignObject");const i=await Xe(t.text,zt()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){const n=e.node().firstChild;n.setAttribute("height",s.height+2*t.textMargin);const h=n.getBBox();r.attr("x",Math.round(h.x+h.width/2-s.width/2)).attr("y",Math.round(h.y+h.height/2-s.height/2))}else if(a){let{startx:n,stopx:h,starty:d}=a;if(n>h){const E=n;n=h,h=E}r.attr("x",Math.round(n+Math.abs(n-h)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(d)):r.attr("y",Math.round(d-s.height))}return[r]},"drawKatex"),Nt=f(function(e,t){let a=0,r=0;const i=t.text.split(N.lineBreakRegex),[o,s]=Ge(t.fontSize);let n=[],h=0,d=f(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":d=f(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":d=f(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":d=f(()=>Math.round(t.y+(a+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[E,u]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&o!==void 0&&(h=E*o);const _=e.append("text");_.attr("x",t.x),_.attr("y",d()),t.anchor!==void 0&&_.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&_.style("font-family",t.fontFamily),s!==void 0&&_.style("font-size",s),t.fontWeight!==void 0&&_.style("font-weight",t.fontWeight),t.fill!==void 0&&_.attr("fill",t.fill),t.class!==void 0&&_.attr("class",t.class),t.dy!==void 0?_.attr("dy",t.dy):h!==0&&_.attr("dy",h);const L=u||br;if(t.tspan){const g=_.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(L)}else _.text(L);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(_._groups||_)[0][0].getBBox().height,a=r),n.push(_)}return n},"drawText"),Qe=f(function(e,t){function a(i,o,s,n,h){return i+","+o+" "+(i+s)+","+o+" "+(i+s)+","+(o+n-h)+" "+(i+s-h*1.2)+","+(o+n)+" "+i+","+(o+n)}f(a,"genPoints");const r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,Nt(e,t),r},"drawLabel"),Y=-1,$e=f((e,t,a,r)=>{e.select&&a.forEach(i=>{const o=t.get(i),s=e.select("#actor"+o.actorCnt);!r.mirrorActors&&o.stopy?s.attr("y2",o.stopy+o.height/2):r.mirrorActors&&s.attr("y2",o.stopy)})},"fixLifeLineHeights"),Kr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:L}=u,g=e.append("g").lower();var R=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",h).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=g.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),d==="neo"&&R.attr("data-look","neo"));const T=pt();var O="actor";t.properties?.class?O=t.properties.class:T.fill="#eaeaea",r?O+=` ${xt}`:O+=` ${gt}`,T.x=t.x,T.y=s,T.width=t.width,T.height=t.height,T.class=O,T.rx=3,T.ry=3,T.name=t.name,d==="neo"&&(T.rx=6,T.ry=6);const x=Dt(R,T),m=o.get(t.name)??0;if(ut.has(E)&&(x.style("stroke",J(L,m)),x.style("fill",J(_,m))),d==="neo"&&x.attr("filter",`url(#${yt(i)})`),t.rectData=T,t.properties?.icon){const b=t.properties.icon.trim();b.charAt(0)==="@"?he(R,T.x+T.width-20,T.y+10,b.substr(1)):de(R,T.x+T.width-20,T.y+10,b)}r||(R.attr("data-et","participant"),R.attr("data-type","participant"),R.attr("data-id",t.name)),ft(a,tt(t.description))(t.description,R,T.x,T.y,T.width,T.height,{class:`actor ${Jt}`},a);let S=t.height;if(x.node){const b=x.node().getBBox();a.look!=="neo"&&(t.height=b.height,S=b.height)}return S},"drawActorTypeParticipant"),Hr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:L}=u,g=e.append("g").lower();var R=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",h).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=g.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),d==="neo"&&R.attr("data-look","neo"));const T=pt();var O="actor";t.properties?.class?O=t.properties.class:T.fill="#eaeaea",r?O+=` ${xt}`:O+=` ${gt}`,T.x=t.x,T.y=s,T.width=t.width,T.height=t.height,T.class=O,T.name=t.name;const x=6;a.look==="neo"&&(T.height=t.height-x);const m={...T,x:T.x+-x,y:T.y+ +x,class:"actor"},S=Dt(R,T),b=Dt(R,m);t.rectData=T,d==="neo"&&R.attr("filter",`url(#${yt(i)})`);const P=o.get(t.name)??0;if(ut.has(E)&&(S.style("stroke",J(L,P)),S.style("fill",J(_,P)),b.style("stroke",J(L,P)),b.style("fill",J(_,P))),t.properties?.icon){const B=t.properties.icon.trim();B.charAt(0)==="@"?he(R,T.x+T.width-20,T.y+10,B.substr(1)):de(R,T.x+T.width-20,T.y+10,B)}ft(a,tt(t.description))(t.description,R,T.x-x,T.y+x,T.width,T.height,{class:`actor ${Jt}`},a);let k=t.height;if(S.node){const B=S.node().getBBox();a.look!=="neo"&&(t.height=B.height,k=B.height)}return r||(R.attr("data-et","participant"),R.attr("data-type","collections"),R.attr("data-id",t.name)),k},"drawActorTypeCollections"),Fr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:L}=u,g=e.append("g").lower();let R=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",h).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=g.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),d==="neo"&&R.attr("data-look","neo"));const T=pt();let O="actor";t.properties?.class?O=t.properties.class:T.fill="#eaeaea",r?O+=` ${xt}`:O+=` ${gt}`,R.attr("class",O),T.x=t.x,T.y=s,T.width=t.width,T.height=t.height,T.name=t.name;const x=T.height/2,m=x/(2.5+T.height/50),S=R.append("g"),b=R.append("g"),P=`M ${T.x},${T.y+x}
157
+ a ${m},${x} 0 0 0 0,${T.height}
158
+ h ${T.width-2*m}
159
+ a ${m},${x} 0 0 0 0,-${T.height}
160
+ Z
161
+ `;S.append("path").attr("d",P),b.append("path").attr("d",`M ${T.x},${T.y+x}
162
+ a ${m},${x} 0 0 0 0,${T.height}`),S.attr("transform",`translate(${m}, ${-(T.height/2)})`),b.attr("transform",`translate(${T.width-m}, ${-T.height/2})`),t.rectData=T,d==="neo"&&S.attr("filter",`url(#${yt(i)})`);const k=o.get(t.name)??0;if(ut.has(E)&&(S.style("stroke",J(L,k)),S.style("fill",J(_,k)),b.style("stroke",J(L,k)),b.style("fill",J(_,k))),t.properties?.icon){const K=t.properties.icon.trim(),z=T.x+T.width-20,X=T.y+10;K.charAt(0)==="@"?he(R,z,X,K.substr(1)):de(R,z,X,K)}ft(a,tt(t.description))(t.description,R,T.x,T.y,T.width,T.height,{class:`actor ${Jt}`},a);let B=t.height;const V=S.select("path:last-child");if(V.node()){const K=V.node().getBBox();a.look!=="neo"&&(t.height=K.height,B=K.height)}return r||(R.attr("data-et","participant"),R.attr("data-type","queue"),R.attr("data-id",t.name)),B},"drawActorTypeQueue"),qr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+75,{look:E,theme:u,themeVariables:_}=a,{bkgColorArray:L,borderColorArray:g,actorBorder:R,actorBkg:T}=_,O=e.append("g").lower();r||(Y++,O.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);const x=e.append("g");let m=Lt;r?m+=` ${xt}`:m+=` ${gt}`,x.attr("class",m),x.attr("name",t.name);const S=pt();S.x=t.x,S.y=s,S.fill="#eaeaea",S.width=t.width,S.height=t.height,S.class="actor";const b=t.x+t.width/2,P=h?h.glyphBottomY-22:s+32,k=22;x.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),x.append("circle").attr("cx",b).attr("cy",P).attr("r",k).attr("filter",`${E==="neo"?`url(#${yt(i)})`:""}`),x.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${b}, ${P-k})`);const B=o.get(t.name)??0;if(ut.has(u)?(x.style("stroke",J(g,B)),x.style("fill",J(L,B))):(x.style("stroke",R),x.style("fill",T)),!h){const V=x.node().getBBox();t.height=V.height+2*(a?.sequence?.labelBoxHeight??0)}return ft(a,tt(t.description))(t.description,x,S.x,h?h.labelCenterY-S.height/2:S.y+k+(r?5:12),S.width,S.height,{class:`actor ${Lt}`},a),r||(x.attr("data-et","participant"),x.attr("data-type","control"),x.attr("data-id",t.name)),t.height},"drawActorTypeControl"),zr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+75,{look:E,theme:u,themeVariables:_}=a,{bkgColorArray:L,borderColorArray:g}=_,R=e.append("g").lower(),T=e.append("g");let O="actor";r?O+=` ${xt}`:O+=` ${gt}`,T.attr("class",O),T.attr("name",t.name);const x=pt();x.x=t.x,x.y=s,x.fill="#eaeaea",x.width=t.width,x.height=t.height,x.class="actor";const m=t.x+t.width/2,S=h?h.glyphBottomY-22:s+(r?10:25),b=22;T.append("circle").attr("cx",m).attr("cy",S).attr("r",b).attr("width",t.width).attr("height",t.height),T.append("line").attr("x1",m-b).attr("x2",m+b).attr("y1",S+b).attr("y2",S+b).attr("stroke-width",2),E==="neo"&&T.attr("filter",`url(#${yt(i)})`);const P=o.get(t.name)??0;if(ut.has(u)&&(T.style("stroke",J(g,P)),T.style("fill",J(L,P))),!h){const k=T.node().getBBox();t.height=k.height+(a?.sequence?.labelBoxHeight??0)}return r||(Y++,R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y),ft(a,tt(t.description))(t.description,T,x.x,h?h.labelCenterY-x.height/2:x.y+(r?15:30),x.width,x.height,{class:`actor ${Lt}`},a),h||T.attr("transform",`translate(0, ${r?b:b/2-5})`),r||(T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Ur=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+t.height+2*a.boxTextMargin,{theme:E,themeVariables:u,look:_}=a,{bkgColorArray:L,borderColorArray:g,actorBorder:R}=u,T=e.append("g").lower();let O=T;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&O.attr("onclick",Zt(`actor${Y}_popup`)).attr("cursor","pointer"),O.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),O=T.append("g"),t.actorCnt=Y,t.links!=null&&O.attr("id","root-"+Y),_==="neo"&&O.attr("data-look","neo"));const x=pt();let m="actor";t.properties?.class?m=t.properties.class:x.fill="#eaeaea",r?m+=` ${xt}`:m+=` ${gt}`,x.x=t.x,x.y=s,x.width=t.width,x.height=t.height,x.class=m,x.name=t.name,x.x=t.x,x.y=s;const S=x.width/3,b=S/2,P=b/(2.5+S/50),k=h?Xt:x.width/3,B=h?h.glyphBottomY-k-P:x.y,V=O.append("g");V.attr("class",m);const K=`
163
+ M ${x.x},${B+P}
164
+ a ${b},${P} 0 0 0 ${S},0
165
+ a ${b},${P} 0 0 0 -${S},0
166
+ l 0,${k-2*P}
167
+ a ${b},${P} 0 0 0 ${S},0
168
+ l 0,-${k-2*P}
169
+ `;V.append("path").attr("d",K),_==="neo"&&V.attr("filter",`url(#${yt(i)})`);const z=o.get(t.name)??0;if(ut.has(E)?(V.style("stroke",J(g,z)),V.style("fill",J(L,z))):V.style("stroke",R),V.attr("transform",`translate(${S}, ${P})`),t.rectData=x,ft(a,tt(t.description))(t.description,O,x.x,h?h.labelCenterY-x.height/2:x.y+35,x.width,x.height,{class:`actor ${Jt}`},a),!h){const X=V.select("path:last-child");if(X.node()){const et=X.node().getBBox();t.height=et.height+(a.sequence.labelBoxHeight??0)}}return r||(O.attr("data-et","participant"),O.attr("data-type","database"),O.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Gr=f(function(e,t,a,r,i,o){const s=r?t.stopy:t.starty,n=t.x+t.width/2,h=Ct(t,a,r,s),d=h?h.lifelineStartY:s+80,E=22,u=h?h.glyphBottomY-E:s+12,_=e.append("g").lower(),{look:L,theme:g,themeVariables:R}=a,{bkgColorArray:T,borderColorArray:O,actorBorder:x}=R;r||(Y++,_.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);const m=e.append("g");let S=Lt;r?S+=` ${xt}`:S+=` ${gt}`,m.attr("class",S),m.attr("name",t.name);const b=pt();b.x=t.x,b.y=s,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor",m.append("line").attr("id","actor-man-torso"+Y).attr("x1",t.x+t.width/2-E*2.5).attr("y1",u).attr("x2",t.x+t.width/2-15).attr("y2",u),m.append("line").attr("id","actor-man-arms"+Y).attr("x1",t.x+t.width/2-E*2.5).attr("y1",u-10).attr("x2",t.x+t.width/2-E*2.5).attr("y2",u+10),m.append("circle").attr("cx",t.x+t.width/2).attr("cy",u).attr("r",E),L==="neo"&&m.attr("filter",`url(#${yt(i)})`);const P=o.get(t.name)??0;if(ut.has(g)?(m.style("stroke",J(O,P)),m.style("fill",J(T,P))):m.style("stroke",x),!h){const k=m.node().getBBox();t.height=k.height+(a.sequence.labelBoxHeight??0)}return ft(a,tt(t.description))(t.description,m,b.x,h?h.labelCenterY-b.height/2:b.y+15,b.width,b.height,{class:`actor ${Lt}`},a),h||m.attr("transform",`translate(0,${E/2+10})`),r||(m.attr("data-et","participant"),m.attr("data-type","boundary"),m.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),Xr=f(function(e,t,a,r,i){const o=r?t.stopy:t.starty,s=t.x+t.width/2,n=Ct(t,a,r,o),h=n?n.lifelineStartY:o+80,{theme:d,themeVariables:E}=a,{bkgColorArray:u,borderColorArray:_,actorBorder:L}=E,g=e.append("g").lower();r||(Y++,g.append("line").attr("id","actor"+Y).attr("x1",s).attr("y1",h).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);const R=e.append("g");let T=Lt;r?T+=` ${xt}`:T+=` ${gt}`,R.attr("class",T),R.attr("name",t.name),r||R.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);const O=n?Xt/Fe:1,x=f(k=>n?n.glyphBottomY-(Ze-k)*O:o+k,"gy"),m=f(k=>s+k*O,"gx");R.append("line").attr("id","actor-man-torso"+Y).attr("x1",s).attr("y1",x(25)).attr("x2",s).attr("y2",x(45)),R.append("line").attr("id","actor-man-arms"+Y).attr("x1",m(-Ot/2)).attr("y1",x(33)).attr("x2",m(Ot/2)).attr("y2",x(33)),R.append("line").attr("x1",m(-Ot/2)).attr("y1",x(60)).attr("x2",s).attr("y2",x(45)),R.append("line").attr("x1",s).attr("y1",x(45)).attr("x2",m(Ot/2-2)).attr("y2",x(60));const S=R.append("circle");S.attr("cx",t.x+t.width/2),S.attr("cy",x(10)),S.attr("r",15*O),S.attr("width",t.width),S.attr("height",t.height),n||(t.height=Fe);const b=pt();b.x=t.x,b.y=o,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor",b.rx=3,b.ry=3;const P=i.get(t.name)??0;return ut.has(d)?(R.style("stroke",J(_,P)),R.style("fill",J(u,P))):R.style("stroke",L),ft(a,tt(t.description))(t.description,R,b.x,n?n.labelCenterY-b.height/2:o+35,b.width,b.height,{class:`actor ${Lt}`},a),t.height},"drawActorTypeActor"),Jr=f(async function(e,t,a,r,i,o,s){const n=s??new Map([...o.db.getActors().values()].map((h,d)=>[h.name,d]));switch(t.type){case"actor":return await Xr(e,t,a,r,n);case"participant":return await Kr(e,t,a,r,i,n);case"boundary":return await Gr(e,t,a,r,i,n);case"control":return await qr(e,t,a,r,i,n);case"entity":return await zr(e,t,a,r,i,n);case"database":return await Ur(e,t,a,r,i,n);case"collections":return await Hr(e,t,a,r,i,n);case"queue":return await Fr(e,t,a,r,i,n)}},"drawActor"),Zr=f(function(e,t,a){const i=e.append("g");je(i,t),t.name&&ft(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Qr=f(function(e){return e.append("g")},"anchorElement"),$r=f(function(e,t,a,r,i,o,s){const{theme:n,themeVariables:h}=r,{bkgColorArray:d,borderColorArray:E,mainBkg:u}=h,_=pt(),L=t.anchored,g=t.actor;_.x=t.startx,_.y=t.starty,_.class="activation"+i%3,_.width=t.stopx-t.startx,_.height=a-t.starty;const R=Dt(L,_),O=(s??new Map([...o.db.getActors().values()].map((x,m)=>[x.name,m]))).get(g)??0;ut.has(n)&&(R.style("stroke",J(E,O)),R.style("fill",J(d,O)??u))},"drawActivation"),jr=f(async function(e,t,a,r,i){const{boxMargin:o,boxTextMargin:s,labelBoxHeight:n,labelBoxWidth:h,messageFontFamily:d,messageFontSize:E,messageFontWeight:u}=r,_=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),L=f(function(T,O,x,m){return _.append("line").attr("x1",T).attr("y1",O).attr("x2",x).attr("y2",m).attr("class","loopLine")},"drawLoopLine");L(t.startx,t.starty,t.stopx,t.starty),L(t.stopx,t.starty,t.stopx,t.stopy),L(t.startx,t.stopy,t.stopx,t.stopy),L(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(T){L(t.startx,T.y,t.stopx,T.y).style("stroke-dasharray","3, 3")});let g=le();g.text=a,g.x=t.startx,g.y=t.starty,g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(h??0,50),g.height=n+(r.look==="neo"?15:0)||20,g.textMargin=s,g.class="labelText",Qe(_,g),g=tr(),g.text=t.title,g.x=t.startx+h/2+(t.stopx-t.startx)/2,g.y=t.starty+o+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.wrap=!0;let R=tt(g.text)?await Gt(_,g,t):Nt(_,g);if(t.sectionTitles!==void 0){for(const[T,O]of Object.entries(t.sectionTitles))if(O.message){g.text=O.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[T].y+o+s,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.wrap=t.wrap,tt(g.text)?(t.starty=t.sections[T].y,await Gt(_,g,t)):Nt(_,g);let x=Math.round(R.map(m=>(m._groups||m)[0][0].getBBox().height).reduce((m,S)=>m+S));t.sections[T].height+=x-(o+s)}}return t.height=Math.round(t.stopy-t.starty),_},"drawLoop"),je=f(function(e,t){Sr(e,t)},"drawBackgroundRect"),ta=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),ea=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),ra=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),aa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),sa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ia=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),na=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),yt=f(e=>e?`${e}-drop-shadow`:"drop-shadow","dropShadowId"),oa=f(function(e,t,a){const{theme:r}=t;e.append("defs").append("filter").attr("id",yt(a)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),tr=f(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),ca=f(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ft=(function(){function e(o,s,n,h,d,E,u){const _=s.append("text").attr("x",n+d/2).attr("y",h+E/2+5).style("text-anchor","middle").text(o);i(_,u)}f(e,"byText");function t(o,s,n,h,d,E,u,_){const{actorFontSize:L,actorFontFamily:g,actorFontWeight:R}=_,[T,O]=Ge(L),x=o.split(N.lineBreakRegex);for(let m=0;m<x.length;m++){const S=m*T-T*(x.length-1)/2,b=s.append("text").attr("x",n+d/2).attr("y",h).style("text-anchor","middle").style("font-size",O).style("font-weight",R).style("font-family",g);b.append("tspan").attr("x",n+d/2).attr("dy",S).text(x[m]),b.attr("y",h+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(b,u)}}f(t,"byTspan");function a(o,s,n,h,d,E,u,_){const L=s.append("switch"),R=L.append("foreignObject").attr("x",n).attr("y",h).attr("width",d).attr("height",E).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");R.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(o),t(o,L,n,h,d,E,u,_),i(R,u)}f(a,"byFo");async function r(o,s,n,h,d,E,u,_){const L=await vt(o,zt()),g=s.append("switch"),T=g.append("foreignObject").attr("x",n+d/2-L.width/2).attr("y",h+E/2-L.height/2).attr("width",L.width).attr("height",L.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await Xe(o,zt())),t(o,g,n,h,d,E,u,_),i(T,u)}f(r,"byKatex");function i(o,s){for(const n in s)s.hasOwnProperty(n)&&o.attr(n,s[n])}return f(i,"_setTextAttrs"),function(o,s=!1){return s?r:o.textPlacement==="fo"?a:o.textPlacement==="old"?e:t}})(),la=(function(){function e(i,o,s,n,h,d,E){const u=o.append("text").attr("x",s).attr("y",n).style("text-anchor","start").text(i);r(u,E)}f(e,"byText");function t(i,o,s,n,h,d,E,u){const{actorFontSize:_,actorFontFamily:L,actorFontWeight:g}=u,R=i.split(N.lineBreakRegex);for(let T=0;T<R.length;T++){const O=T*_-_*(R.length-1)/2,x=o.append("text").attr("x",s).attr("y",n).style("text-anchor","start").style("font-size",_).style("font-weight",g).style("font-family",L);x.append("tspan").attr("x",s).attr("dy",O).text(R[T]),x.attr("y",n+d/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(x,E)}}f(t,"byTspan");function a(i,o,s,n,h,d,E,u){const _=o.append("switch"),g=_.append("foreignObject").attr("x",s).attr("y",n).attr("width",h).attr("height",d).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,s,n,h,d,E,u),r(g,E)}f(a,"byFo");function r(i,o){for(const s in o)o.hasOwnProperty(s)&&i.attr(s,o[s])}return f(r,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),ha=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),da=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),Ta=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),pa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),q={drawRect:Dt,drawText:Nt,drawLabel:Qe,drawActor:Jr,drawBox:Zr,drawPopup:Wr,anchorElement:Qr,drawActivation:$r,drawLoop:jr,drawBackgroundRect:je,insertArrowHead:aa,insertArrowFilledHead:sa,insertSequenceNumber:ia,insertArrowCrossHead:na,insertDatabaseIcon:ta,insertComputerIcon:ea,insertClockIcon:ra,getTextObj:tr,getNoteRect:ca,fixLifeLineHeights:$e,sanitizeUrl:Ue.sanitizeUrl,insertDropShadow:oa,insertSolidTopArrowHead:ha,insertSolidBottomArrowHead:da,insertStickTopArrowHead:Ta,insertStickBottomArrowHead:pa},l={},I={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:f(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:f(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:f(function(e){this.boxes.push(e)},"addBox"),addActor:f(function(e){this.actors.push(e)},"addActor"),addLoop:f(function(e){this.loops.push(e)},"addLoop"),addMessage:f(function(e){this.messages.push(e)},"addMessage"),addNote:f(function(e){this.notes.push(e)},"addNote"),lastActor:f(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:f(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:f(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:f(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:f(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,ar(j())},"init"),updateVal:f(function(e,t,a,r){e[t]===void 0?e[t]=a:e[t]=r(a,e[t])},"updateVal"),updateBounds:f(function(e,t,a,r){const i=this;let o=0;function s(n){return f(function(d){o++;const E=i.sequenceItems.length-o+1;i.updateVal(d,"starty",t-E*l.boxMargin,Math.min),i.updateVal(d,"stopy",r+E*l.boxMargin,Math.max),i.updateVal(I.data,"startx",e-E*l.boxMargin,Math.min),i.updateVal(I.data,"stopx",a+E*l.boxMargin,Math.max),n!=="activation"&&(i.updateVal(d,"startx",e-E*l.boxMargin,Math.min),i.updateVal(d,"stopx",a+E*l.boxMargin,Math.max),i.updateVal(I.data,"starty",t-E*l.boxMargin,Math.min),i.updateVal(I.data,"stopy",r+E*l.boxMargin,Math.max))},"updateItemBounds")}f(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:f(function(e,t,a,r){const i=N.getMin(e,a),o=N.getMax(e,a),s=N.getMin(t,r),n=N.getMax(t,r);this.updateVal(I.data,"startx",i,Math.min),this.updateVal(I.data,"starty",s,Math.min),this.updateVal(I.data,"stopx",o,Math.max),this.updateVal(I.data,"stopy",n,Math.max),this.updateBounds(i,s,o,n)},"insert"),newActivation:f(function(e,t,a){const r=a.get(e.from),i=Qt(e.from).length||0,o=r.x+r.width/2+(i-1)*l.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+l.activationWidth,stopy:void 0,actor:e.from,anchored:q.anchorElement(t)})},"newActivation"),endActivation:f(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:f(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:f(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:f(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:f(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:f(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:I.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:f(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:f(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:f(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=N.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:f(function(){return this.verticalPos},"getVerticalPos"),getBounds:f(function(){return{bounds:this.data,models:this.models}},"getBounds")},Ea=f(async function(e,t,a){I.bumpVerticalPos(l.boxMargin),t.height=l.boxMargin,t.starty=I.getVerticalPos();const r=pt();r.x=t.startx,r.y=t.starty,r.width=t.width||l.width,r.class="note";const i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const o=q.drawRect(i,r),s=le();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=l.noteFontFamily,s.fontSize=l.noteFontSize,s.fontWeight=l.noteFontWeight,s.anchor=l.noteAlign,s.textMargin=l.noteMargin,s.valign="center";const n=tt(s.text)?await Gt(i,s):Nt(i,s),h=Math.round(n.map(d=>(d._groups||d)[0][0].getBBox().height).reduce((d,E)=>d+E));o.attr("height",h+2*l.noteMargin),t.height+=h+2*l.noteMargin,I.bumpVerticalPos(h+2*l.noteMargin),t.stopy=t.starty+h+2*l.noteMargin,t.stopx=t.startx+r.width,I.insert(t.startx,t.starty,t.stopx,t.stopy),I.models.addNote(t)},"drawNote"),qe=f(function(e,t,a,r,i,o,s){const n=r.db.getActors(),h=n.get(t.from),d=n.get(t.to),E=a.sequenceVisible;let u=h.x+h.width/2,_=d.x+d.width/2;const L=u<=_,g=or(t,r),R=e.append("g"),T=16.5,O=f((P,k)=>{const B=P?T:-T;return k?-B:B},"getCircleOffset"),x=f(P=>{R.append("circle").attr("cx",P).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:m,CENTRAL_CONNECTION_REVERSE:S,CENTRAL_CONNECTION_DUAL:b}=r.db.LINETYPE;if(E)switch(t.centralConnection){case m:g&&(_+=O(L,!0));break;case S:g||(u+=O(L,!1));break;case b:g?_+=O(L,!0):u+=O(L,!1);break}switch(t.centralConnection){case m:x(_);break;case S:x(u);break;case b:x(u),x(_);break}},"drawCentralConnection"),bt=f(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),At=f(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),oe=f(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function er(e,t){I.bumpVerticalPos(10);const{startx:a,stopx:r,message:i}=t,o=N.splitBreaks(i).length,s=tt(i),n=s?await vt(i,j()):Q.calculateTextDimensions(i,bt(l));if(!s){const u=n.height/o;t.height+=u,I.bumpVerticalPos(u)}let h,d=n.height-10;const E=n.width;if(a===r){h=I.getVerticalPos()+d,l.rightAngles||(d+=l.boxMargin,h=I.getVerticalPos()+d),d+=30;const u=N.getMax(E/2,l.width/2);I.insert(a-u,I.getVerticalPos()-10+d,r+u,I.getVerticalPos()+30+d)}else d+=l.boxMargin,h=I.getVerticalPos()+d,I.insert(a,h-10,r,h);return I.bumpVerticalPos(d),t.height+=d,t.stopy=t.starty+t.height,I.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),h}f(er,"boundMessage");var ua=f(async function(e,t,a,r,i,o){const{startx:s,stopx:n,starty:h,message:d,type:E,sequenceIndex:u,sequenceVisible:_}=t,L=Q.calculateTextDimensions(d,bt(l)),g=le();g.x=Math.min(s,n),g.y=h+10,g.width=Math.abs(n-s),g.class="messageText",g.dy="1em",g.text=d,g.fontFamily=l.messageFontFamily,g.fontSize=l.messageFontSize,g.fontWeight=l.messageFontWeight,g.anchor=l.messageAlign,g.valign="center",g.textMargin=l.wrapPadding,g.tspan=!1,tt(g.text)?await Gt(e,g,{startx:s,stopx:n,starty:a}):Nt(e,g);const R=L.width;let T;if(s===n){const x=_||l.showSequenceNumbers,m=or(i,r),S=Ra(i,r),b=s+(x&&(m||S)?10:0);l.rightAngles?T=e.append("path").attr("d",`M ${b},${a} H ${s+N.getMax(l.width/2,R/2)} V ${a+25} H ${s}`):T=e.append("path").attr("d","M "+b+","+a+" C "+(b+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)),ie(i,r)&&qe(e,i,t,r,s,n,a)}else T=e.append("line"),T.attr("x1",s),T.attr("y1",a),T.attr("x2",n),T.attr("y2",a),ie(i,r)&&qe(e,i,t,r,s,n,a);E===r.db.LINETYPE.DOTTED||E===r.db.LINETYPE.DOTTED_CROSS||E===r.db.LINETYPE.DOTTED_POINT||E===r.db.LINETYPE.DOTTED_OPEN||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||E===r.db.LINETYPE.SOLID_TOP_DOTTED||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||E===r.db.LINETYPE.STICK_TOP_DOTTED||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(T.style("stroke-dasharray","3, 3"),T.attr("class","messageLine1")):T.attr("class","messageLine0"),T.attr("data-et","message"),T.attr("data-id","i"+t.id),T.attr("data-from",t.from),T.attr("data-to",t.to);let O="";if(l.arrowMarkerAbsolute&&(O=mr(!0)),T.attr("stroke-width",2),T.attr("stroke","none"),T.style("fill","none"),(E===r.db.LINETYPE.SOLID_TOP||E===r.db.LINETYPE.SOLID_TOP_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-solidTopArrowHead)"),(E===r.db.LINETYPE.SOLID_BOTTOM||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.STICK_TOP||E===r.db.LINETYPE.STICK_TOP_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-stickTopArrowHead)"),(E===r.db.LINETYPE.STICK_BOTTOM||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-solidTopArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&T.attr("marker-start","url("+O+"#"+o+"-stickTopArrowHead)"),(E===r.db.LINETYPE.SOLID||E===r.db.LINETYPE.DOTTED)&&T.attr("marker-end","url("+O+"#"+o+"-arrowhead)"),(E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(T.attr("marker-start","url("+O+"#"+o+"-arrowhead)"),T.attr("marker-end","url("+O+"#"+o+"-arrowhead)")),(E===r.db.LINETYPE.SOLID_POINT||E===r.db.LINETYPE.DOTTED_POINT)&&T.attr("marker-end","url("+O+"#"+o+"-filled-head)"),(E===r.db.LINETYPE.SOLID_CROSS||E===r.db.LINETYPE.DOTTED_CROSS)&&T.attr("marker-end","url("+O+"#"+o+"-crosshead)"),_||l.showSequenceNumbers){const x=E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,m=E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,S=6,b=ie(i,r);let P=s,k=n;x?(s<n?P=s+S*2:(P=s-S+(b?-5:0),P+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),T.attr("x1",P)):m?(n>s?k=n-2*S:(k=n-S,P+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),k+=b?15:0,T.attr("x2",k),T.attr("x1",P)):T.attr("x1",s+S);let B=0;const V=s===n,K=s<=n;V?B=t.fromBounds+1:m?B=K?t.toBounds-1:t.fromBounds+1:B=K?t.fromBounds+1:t.toBounds-1;let z="12px";const X=u.toString().length;X>5?z="7px":X>3&&(z="9px"),e.append("line").attr("x1",B).attr("y1",a).attr("x2",B).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+O+"#"+o+"-sequencenumber)"),e.append("text").attr("x",B).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",z).attr("text-anchor","middle").attr("class","sequenceNumber").text(u)}},"drawMessage"),fa=f(function(e,t,a,r,i,o,s){let n=0,h=0,d,E=0;for(const u of r){const _=t.get(u),L=_.box;d&&d!=L&&(s||I.models.addBox(d),h+=l.boxMargin+d.margin),L&&L!=d&&(s||(L.x=n+h,L.y=i),h+=L.margin),_.width=N.getMax(_.width||l.width,l.width),_.height=N.getMax(_.height||l.height,l.height),_.margin=_.margin||l.actorMargin,E=N.getMax(E,_.height),a.get(_.name)&&(h+=_.width/2),_.x=n+h,_.starty=I.getVerticalPos(),I.insert(_.x,i,_.x+_.width,_.height),n+=_.width+h,_.box&&(_.box.width=n+L.margin-_.box.x),h=_.margin,d=_.box,I.models.addActor(_)}d&&!s&&I.models.addBox(d),I.bumpVerticalPos(E)},"addActorRenderingData"),ce=f(async function(e,t,a,r,i,o,s){if(r){let n=0;I.bumpVerticalPos(l.boxMargin*2);for(const h of a){const d=t.get(h);d.stopy||(d.stopy=I.getVerticalPos());const E=await q.drawActor(e,d,l,!0,i,o,s);n=N.getMax(n,E)}I.bumpVerticalPos(n+l.boxMargin)}else for(const n of a){const h=t.get(n);await q.drawActor(e,h,l,!1,i,o,s)}},"drawActors"),rr=f(function(e,t,a,r){let i=0,o=0;for(const s of a){const n=t.get(s),h=ga(n),d=q.drawPopup(e,n,h,l,l.forceMenus,r);d.height>i&&(i=d.height),d.width+n.x>o&&(o=d.width+n.x)}return{maxHeight:i,maxWidth:o}},"drawActorsPopup"),ar=f(function(e){fr(l,e),e.fontFamily&&(l.actorFontFamily=l.noteFontFamily=l.messageFontFamily=e.fontFamily),e.fontSize&&(l.actorFontSize=l.noteFontSize=l.messageFontSize=e.fontSize),e.fontWeight&&(l.actorFontWeight=l.noteFontWeight=l.messageFontWeight=e.fontWeight)},"setConf"),Qt=f(function(e){return I.activations.filter(function(t){return t.actor===e})},"actorActivations"),ze=f(function(e,t){const a=t.get(e),r=Qt(e),i=r.reduce(function(s,n){return N.getMin(s,n.startx)},a.x+a.width/2-1),o=r.reduce(function(s,n){return N.getMax(s,n.stopx)},a.x+a.width/2+1);return[i,o]},"activationBounds");function Tt(e,t,a,r,i){I.bumpVerticalPos(a);let o=r;if(t.id&&t.message&&e[t.id]){const s=e[t.id].width,n=bt(l);t.message=Q.wrapLabel(`[${t.message}]`,s-2*l.wrapPadding,n),t.width=s,t.wrap=!0;const h=Q.calculateTextDimensions(t.message,n),d=N.getMax(h.height,l.labelBoxHeight);o=r+d,nt.debug(`${d} - ${t.message}`)}i(t),I.bumpVerticalPos(o)}f(Tt,"adjustLoopHeightForWrap");function sr(e,t,a,r,i,o,s){function n(E,u){E.x<i.get(e.from).x?(I.insert(t.stopx-u,t.starty,t.startx,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx+u):(I.insert(t.startx,t.starty,t.stopx+u,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx-u)}f(n,"receiverAdjustment");function h(E,u){E.x<i.get(e.to).x?(I.insert(t.startx-u,t.starty,t.stopx,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx+u):(I.insert(t.stopx,t.starty,t.startx+u,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx-u)}f(h,"senderAdjustment");const d=[qt.ACTOR,qt.CONTROL,qt.ENTITY,qt.DATABASE];if(o.get(e.to)==r){const E=i.get(e.to),u=d.includes(E.type)?Ot/2+3:E.width/2+3;n(E,u),E.starty=a-E.height/2,I.bumpVerticalPos(E.height/2)}else if(s.get(e.from)==r){const E=i.get(e.from);if(l.mirrorActors){const u=d.includes(E.type)?Ot/2:E.width/2;h(E,u)}E.stopy=a-E.height/2,I.bumpVerticalPos(E.height/2)}else if(s.get(e.to)==r){const E=i.get(e.to);if(l.mirrorActors){const u=d.includes(E.type)?Ot/2+3:E.width/2+3;n(E,u)}E.stopy=a-E.height/2,I.bumpVerticalPos(E.height/2)}}f(sr,"adjustCreatedDestroyedData");var _a=f(async function(e,t,a,r){const{securityLevel:i,sequence:o,look:s,themeVariables:n}=j();l=o;let h;i==="sandbox"&&(h=Ht("#i"+t));const d=i==="sandbox"?Ht(h.nodes()[0].contentDocument.body):Ht("body"),E=i==="sandbox"?h.nodes()[0].contentDocument:document;I.init(),nt.debug(r.db);const u=i==="sandbox"?d.select(`[id="${t}"]`):Ht(`[id="${t}"]`),_=r.db.getActors(),L=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),R=r.db.getBoxes();let T=r.db.getActorKeys();const O=r.db.getMessages(),x=r.db.getDiagramTitle(),m=r.db.hasAtLeastOneBox(),S=r.db.hasAtLeastOneBoxWithTitle(),b=await ir(_,O,r);if(l.height=await nr(_,b,R),q.insertComputerIcon(u,t),q.insertDatabaseIcon(u,t),q.insertClockIcon(u,t),m&&(I.bumpVerticalPos(l.boxMargin),S&&I.bumpVerticalPos(R[0].textMaxHeight)),l.hideUnusedParticipants===!0){const A=new Set;O.forEach(v=>{A.add(v.from),A.add(v.to)}),T=T.filter(v=>A.has(v))}const P=new Map(T.map((A,v)=>[_.get(A)?.name??A,v]));fa(u,_,L,T,0,O,!1);const k=await La(O,_,b,r);q.insertArrowHead(u,t),q.insertArrowCrossHead(u,t),q.insertArrowFilledHead(u,t),q.insertSequenceNumber(u,t),q.insertSolidTopArrowHead(u,t),q.insertSolidBottomArrowHead(u,t),q.insertStickTopArrowHead(u,t),q.insertStickBottomArrowHead(u,t),s==="neo"&&q.insertDropShadow(u,l,t);function B(A,v){const dt=I.endActivation(A);dt.starty+18>v&&(dt.starty=v-6,v+=12),q.drawActivation(u,dt,v,l,Qt(A.from).length,r,P),I.insert(dt.startx,v-10,dt.stopx,v)}f(B,"activeEnd");let V=1,K=1;const z=[],X=[];let et=0;for(const A of O){let v,dt,st;switch(A.type){case r.db.LINETYPE.NOTE:I.resetVerticalPos(),dt=A.noteModel,await Ea(u,dt,A.id);break;case r.db.LINETYPE.ACTIVE_START:I.newActivation(A,u,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION:I.newActivation(A,u,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:I.newActivation(A,u,_);break;case r.db.LINETYPE.ACTIVE_END:B(A,I.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Tt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.LOOP_END:v=I.endLoop(),await q.drawLoop(u,v,"loop",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.RECT_START:Tt(k,A,l.boxMargin,l.boxMargin,H=>{let mt=H.message;mt||(mt=n?.rectBkgColor||n?.actorBkg||"rgba(128, 128, 128, 0.5)"),I.newLoop(void 0,mt)});break;case r.db.LINETYPE.RECT_END:v=I.endLoop(),X.push(v),I.models.addLoop(v),I.bumpVerticalPos(v.stopy-I.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Tt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.OPT_END:v=I.endLoop(),await q.drawLoop(u,v,"opt",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.ALT_START:Tt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.ALT_ELSE:Tt(k,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.ALT_END:v=I.endLoop(),await q.drawLoop(u,v,"alt",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Tt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H)),I.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Tt(k,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.PAR_END:v=I.endLoop(),await q.drawLoop(u,v,"par",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.AUTONUMBER:V=A.message.start||V,K=A.message.step||K,A.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Tt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.CRITICAL_OPTION:Tt(k,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.CRITICAL_END:v=I.endLoop(),await q.drawLoop(u,v,"critical",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.BREAK_START:Tt(k,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.BREAK_END:v=I.endLoop(),await q.drawLoop(u,v,"break",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;default:try{st=A.msgModel,st.starty=I.getVerticalPos(),st.sequenceIndex=V,st.sequenceVisible=r.db.showSequenceNumbers(),st.id=A.id,st.from=A.from,st.to=A.to;const H=await er(u,st);sr(A,st,H,et,_,L,g),z.push({messageModel:st,lineStartY:H,msg:A}),I.models.addMessage(st)}catch(H){nt.error("error while drawing message",H)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(A.type)&&(V=Math.round((V+K)*100)/100),et++}nt.debug("createdActors",L),nt.debug("destroyedActors",g),await ce(u,_,T,!1,t,r,P);for(const A of z)await ua(u,A.messageModel,A.lineStartY,r,A.msg,t);l.mirrorActors&&await ce(u,_,T,!0,t,r,P),X.forEach(A=>q.drawBackgroundRect(u,A)),$e(u,_,T,l);for(const A of I.models.boxes){A.height=I.getVerticalPos()-A.y,I.insert(A.x,A.y,A.x+A.width,A.height);const v=l.boxMargin*2;A.startx=A.x-v,A.starty=A.y-v*.25,A.stopx=A.startx+A.width+2*v,A.stopy=A.starty+A.height+v*.75,A.stroke="rgb(0,0,0, 0.5)",q.drawBox(u,A,l)}m&&I.bumpVerticalPos(l.boxMargin);const rt=rr(u,_,T,E),{bounds:U}=I.getBounds();U.startx===void 0&&(U.startx=0),U.starty===void 0&&(U.starty=0),U.stopx===void 0&&(U.stopx=0),U.stopy===void 0&&(U.stopy=0);let ot=U.stopy-U.starty;ot<rt.maxHeight&&(ot=rt.maxHeight);let at=ot+2*l.diagramMarginY;l.mirrorActors&&(at=at-l.boxMargin+l.bottomMarginAdj);let W=U.stopx-U.startx;W<rt.maxWidth&&(W=rt.maxWidth);const M=W+2*l.diagramMarginX;x&&u.append("text").text(x).attr("x",(U.stopx-U.startx)/2-2*l.diagramMarginX).attr("y",-25),ur(u,at,M,l.useMaxWidth);const Z=x?40:0,Mt=_.size&&s==="neo"?30:0;u.attr("viewBox",U.startx-l.diagramMarginX+" -"+(l.diagramMarginY+Z)+" "+M+" "+(at+Z+Mt)),nt.debug("models:",I.models)},"draw");async function ir(e,t,a){const r={};for(const i of t)if(e.get(i.to)&&e.get(i.from)){const o=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!o.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!o.nextActor)continue;const s=i.placement!==void 0,n=!s,h=s?At(l):bt(l),d=i.wrap?Q.wrapLabel(i.message,l.width-2*l.wrapPadding,h):i.message,u=(tt(d)?await vt(i.message,j()):Q.calculateTextDimensions(d,h)).width+2*l.wrapPadding;n&&i.from===o.nextActor?r[i.to]=N.getMax(r[i.to]||0,u):n&&i.from===o.prevActor?r[i.from]=N.getMax(r[i.from]||0,u):n&&i.from===i.to?(r[i.from]=N.getMax(r[i.from]||0,u/2),r[i.to]=N.getMax(r[i.to]||0,u/2)):i.placement===a.db.PLACEMENT.RIGHTOF?r[i.from]=N.getMax(r[i.from]||0,u):i.placement===a.db.PLACEMENT.LEFTOF?r[o.prevActor]=N.getMax(r[o.prevActor]||0,u):i.placement===a.db.PLACEMENT.OVER&&(o.prevActor&&(r[o.prevActor]=N.getMax(r[o.prevActor]||0,u/2)),o.nextActor&&(r[i.from]=N.getMax(r[i.from]||0,u/2)))}return nt.debug("maxMessageWidthPerActor:",r),r}f(ir,"getMaxMessageWidthPerActor");var ga=f(function(e){let t=0;const a=oe(l);for(const r in e.links){const o=Q.calculateTextDimensions(r,a).width+2*l.wrapPadding+2*l.boxMargin;t<o&&(t=o)}return t},"getRequiredPopupWidth");async function nr(e,t,a){let r=0;for(const o of e.keys()){const s=e.get(o);s.wrap&&(s.description=Q.wrapLabel(s.description,l.width-2*l.wrapPadding,oe(l)));const n=tt(s.description)?await vt(s.description,j()):Q.calculateTextDimensions(s.description,oe(l));s.width=s.wrap?l.width:N.getMax(l.width,n.width+2*l.wrapPadding),j().look==="neo"?(s.actorTextHeight=n.height,s.height=N.getMax(Je(n.height),l.height)):s.height=s.wrap?N.getMax(n.height,l.height):l.height,r=N.getMax(r,s.height)}for(const o in t){const s=e.get(o);if(!s)continue;const n=e.get(s.nextActor);if(!n){const u=t[o]+l.actorMargin-s.width/2;s.margin=N.getMax(u,l.actorMargin);continue}const d=t[o]+l.actorMargin-s.width/2-n.width/2;s.margin=N.getMax(d,l.actorMargin)}let i=0;return a.forEach(o=>{const s=bt(l);let n=o.actorKeys.reduce((u,_)=>u+=e.get(_).width+(e.get(_).margin||0),0);const h=l.boxMargin*8;n+=h,n-=2*l.boxTextMargin,o.wrap&&(o.name=Q.wrapLabel(o.name,n-2*l.wrapPadding,s));const d=Q.calculateTextDimensions(o.name,s);i=N.getMax(d.height,i);const E=N.getMax(n,d.width+2*l.wrapPadding);if(o.margin=l.boxTextMargin,n<E){const u=(E-n)/2;o.margin+=u}}),a.forEach(o=>o.textMaxHeight=i),N.getMax(r,l.height)}f(nr,"calculateActorMargins");var xa=f(async function(e,t,a){const r=t.get(e.from),i=t.get(e.to),o=r.x,s=i.x,n=e.wrap&&e.message;let h=tt(e.message)?await vt(e.message,j()):Q.calculateTextDimensions(n?Q.wrapLabel(e.message,l.width,At(l)):e.message,At(l));const d={width:n?l.width:N.getMax(l.width,h.width+2*l.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(d.width=n?N.getMax(l.width,h.width):N.getMax(r.width/2+i.width/2,h.width+2*l.noteMargin),d.startx=o+(r.width+l.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(d.width=n?N.getMax(l.width,h.width+2*l.noteMargin):N.getMax(r.width/2+i.width/2,h.width+2*l.noteMargin),d.startx=o-d.width+(r.width-l.actorMargin)/2):e.to===e.from?(h=Q.calculateTextDimensions(n?Q.wrapLabel(e.message,N.getMax(l.width,r.width),At(l)):e.message,At(l)),d.width=n?N.getMax(l.width,r.width):N.getMax(r.width,l.width,h.width+2*l.noteMargin),d.startx=o+(r.width-d.width)/2):(d.width=Math.abs(o+r.width/2-(s+i.width/2))+l.actorMargin,d.startx=o<s?o+r.width/2-l.actorMargin/2:s+i.width/2-l.actorMargin/2),n&&(d.message=Q.wrapLabel(e.message,d.width-2*l.wrapPadding,At(l))),nt.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${e.message}]`),d},"buildNoteModel"),ya=4,ie=f(function(e,t){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,r,i].includes(e.centralConnection)},"hasCentralConnection"),Ia=f(function(e,t,a){const{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:o,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE;let n=0;return(e.centralConnection===r||e.centralConnection===i)&&(n+=ya),(e.centralConnection===r||e.centralConnection===i)&&(e.type===o||e.type===s)&&(n+=a?0:-6),n},"calculateCentralConnectionOffset"),or=f(function(e,t){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:o,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:n,STICK_ARROW_BOTTOM_REVERSE:h,STICK_ARROW_BOTTOM_REVERSE_DOTTED:d}=t.db.LINETYPE;return[a,r,i,o,s,n,h,d].includes(e.type)},"isReverseArrowType"),Ra=f(function(e,t){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[a,r].includes(e.type)},"isBidirectionalArrowType"),Oa=f(function(e,t,a){const{look:r}=j();if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[i,o]=ze(e.from,t),[s,n]=ze(e.to,t),h=i<=s;let d=h?o:i,E=h?s:n;r==="neo"&&(e.type!==a.db.LINETYPE.SOLID_OPEN&&(E+=h?-3:3),(e.type===a.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(d+=h?3:-3)),d+=Ia(e,a,h);const u=Math.abs(s-n)>2,_=f(T=>h?-T:T,"adjustValue");e.from===e.to?E=d:(e.activate&&!u&&(E+=_(l.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(E+=_(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(d-=_(3)));const L=[i,o,s,n],g=Math.abs(d-E);e.wrap&&e.message&&(e.message=Q.wrapLabel(e.message,N.getMax(g+2*l.wrapPadding,l.width),bt(l)));const R=Q.calculateTextDimensions(e.message,bt(l));return{width:N.getMax(e.wrap?0:R.width+2*l.wrapPadding,g+2*l.wrapPadding,l.width),height:0,startx:d,stopx:E,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,L),toBounds:Math.max.apply(null,L)}},"buildMessageModel"),La=f(async function(e,t,a,r){const i={},o=[];let s,n,h;for(const d of e){switch(d.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:d.message&&(s=o.pop(),i[s.id]=s,i[d.id]=s,o.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=o.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const u=t.get(d.from?d.from:d.to.actor),_=Qt(d.from?d.from:d.to.actor).length,L=u.x+u.width/2+(_-1)*l.activationWidth/2,g={startx:L,stopx:L+l.activationWidth,actor:d.from,enabled:!0};I.activations.push(g)}break;case r.db.LINETYPE.ACTIVE_END:{const u=I.activations.map(_=>_.actor).lastIndexOf(d.from);I.activations.splice(u,1).splice(0,1)}break}d.placement!==void 0?(n=await xa(d,t,r),d.noteModel=n,o.forEach(u=>{s=u,s.from=N.getMin(s.from,n.startx),s.to=N.getMax(s.to,n.startx+n.width),s.width=N.getMax(s.width,Math.abs(s.from-s.to))-l.labelBoxWidth})):(h=Oa(d,t,r),d.msgModel=h,h.startx&&h.stopx&&o.length>0&&o.forEach(u=>{if(s=u,h.startx===h.stopx){const _=t.get(d.from),L=t.get(d.to);s.from=N.getMin(_.x-h.width/2,_.x-_.width/2,s.from),s.to=N.getMax(L.x+h.width/2,L.x+_.width/2,s.to),s.width=N.getMax(s.width,Math.abs(s.to-s.from))-l.labelBoxWidth}else s.from=N.getMin(h.startx,s.from),s.to=N.getMax(h.stopx,s.to),s.width=N.getMax(s.width,h.width)-l.labelBoxWidth}))}return I.activations=[],nt.debug("Loop type widths:",i),i},"calculateLoopBounds"),ba={bounds:I,drawActors:ce,drawActorsPopup:rr,setConf:ar,draw:_a},Pa={parser:wr,get db(){return new Dr},renderer:ba,styles:Cr,init:f(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Er({sequence:{wrap:e.wrap}}))},"init")};export{Pa as diagram};
@@ -0,0 +1 @@
1
+ import{_ as o}from"./MermaidDiagram-Dma3Cwvn.js";import"./index-CqcyU6rA.js";import"./PageMarkdown-C-gI_dXg.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes};