@marimo-team/frontend 0.12.9-dev3 → 0.12.9-dev31

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 (136) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-istJv_UB.js → ConnectedDataExplorerComponent-1WOR4L4q.js} +1 -1
  2. package/dist/assets/VegaLite-CVyDrbx6.js +11 -0
  3. package/dist/assets/_baseEach-B-1fmTcv.js +1 -0
  4. package/dist/assets/_baseMap-D1Qznpme.js +1 -0
  5. package/dist/assets/_baseUniq-Br5wKJvi.js +1 -0
  6. package/dist/assets/{any-language-editor-D3JbnhQs.js → any-language-editor-Ckz6Tt_H.js} +1 -1
  7. package/dist/assets/{arc-B5qYPUYs.js → arc-cUKDg37C.js} +1 -1
  8. package/dist/assets/architectureDiagram-IEHRJDOE-Cy4PwpJi.js +1 -0
  9. package/dist/assets/blockDiagram-JOT3LUYC-DqAX_ZTr.js +1 -0
  10. package/dist/assets/c4Diagram-VJAJSXHY-BiTnYfWI.js +1 -0
  11. package/dist/assets/channel-BjA6dlI2.js +1 -0
  12. package/dist/assets/chart-spec-NBjq86uR.js +1 -0
  13. package/dist/assets/{chunk-4BMEZGHF-SIOl3E5i.js → chunk-4BMEZGHF-SgreK5wm.js} +1 -1
  14. package/dist/assets/{chunk-A2AXSNBT-BWn-UB6A.js → chunk-A2AXSNBT-BCdJQ7v1.js} +1 -1
  15. package/dist/assets/{chunk-AEK57VVT-nnTw4HJP.js → chunk-AEK57VVT-IZckWVS4.js} +1 -1
  16. package/dist/assets/{chunk-D6G4REZN-C9kmIC2s.js → chunk-D6G4REZN-BViJk0j3.js} +1 -1
  17. package/dist/assets/{chunk-RZ5BOZE2-CWqsRpa0.js → chunk-RZ5BOZE2-DUEyb94H.js} +1 -1
  18. package/dist/assets/{chunk-XZIHB7SX-DoqEZmhe.js → chunk-XZIHB7SX-CcE3MNM7.js} +1 -1
  19. package/dist/assets/circle-play-Cs_xPlKO.js +7 -0
  20. package/dist/assets/classDiagram-GIVACNV2-E01SG9OW.js +1 -0
  21. package/dist/assets/classDiagram-v2-COTLJTTW-E01SG9OW.js +1 -0
  22. package/dist/assets/clone-Erh-lipZ.js +1 -0
  23. package/dist/assets/compile-DCx3dGoa.js +1 -0
  24. package/dist/assets/dagre-OKDRZEBW-LAkxQF3O.js +1 -0
  25. package/dist/assets/data-editor-BBJPZKfI.js +1 -0
  26. package/dist/assets/diagram-SSKATNLV-BljgJR7o.js +1 -0
  27. package/dist/assets/diagram-VNBRO52H-C49oChbq.js +1 -0
  28. package/dist/assets/edit-page-2Kt3vfqC.js +8 -0
  29. package/dist/assets/erDiagram-Q7BY3M3F-CaIKNkin.js +1 -0
  30. package/dist/assets/flowDiagram-4HSFHLVR-D5rTlj9W.js +1 -0
  31. package/dist/assets/ganttDiagram-APWFNJXF-zR1_vMpJ.js +1 -0
  32. package/dist/assets/gitGraphDiagram-7IBYFJ6S-BAGJuGGB.js +1 -0
  33. package/dist/assets/{graph-09HW66IM.js → graph-Br4o8jnj.js} +1 -1
  34. package/dist/assets/home-page-BqQ5fDgb.js +7 -0
  35. package/dist/assets/{index-JYQIs3XR.js → index-BcuYf2h_.js} +1 -1
  36. package/dist/assets/index-BvUCu8er.css +1 -0
  37. package/dist/assets/{index-DhV4WwhG.js → index-C52zwCtA.js} +1 -1
  38. package/dist/assets/{index-Bt9Dr2Me.js → index-C5ehTg0q.js} +1 -1
  39. package/dist/assets/index-CGSGM4Ci.js +1 -0
  40. package/dist/assets/index-CcdKRCtM.js +1 -0
  41. package/dist/assets/index-CsGTvBMV.js +80 -0
  42. package/dist/assets/{index-BYdDs8x9.js → index-D4cBysw6.js} +1 -1
  43. package/dist/assets/{index-D1sfa0iq.js → index-DCVBcN2Y.js} +1 -1
  44. package/dist/assets/index-DV8eX7G3.js +1 -0
  45. package/dist/assets/{index-Cw7P1ss8.js → index-Db2RdCTW.js} +1 -1
  46. package/dist/assets/{index-DFC-GZya.js → index-DicQt-se.js} +1 -1
  47. package/dist/assets/{index-CyyigBS9.js → index-_0Ju963j.js} +1 -1
  48. package/dist/assets/{index-EefxvYsv.js → index-kxFn8LYh.js} +1 -1
  49. package/dist/assets/{index-Dg2u2pdm.js → index-lLgURsSx.js} +1 -1
  50. package/dist/assets/{index-BHyReRUl.js → index-trC1CIeV.js} +1 -1
  51. package/dist/assets/index-yV-MGwPb.js +1 -0
  52. package/dist/assets/{index-BPYwrcms.js → index-yuN8txY8.js} +1 -1
  53. package/dist/assets/infoDiagram-PH2N3AL5-CKtVGW_B.js +1 -0
  54. package/dist/assets/journeyDiagram-U35MCT3I-BOc4NkrP.js +1 -0
  55. package/dist/assets/kanban-definition-NDS4AKOZ-Df_4qNc4.js +1 -0
  56. package/dist/assets/{layout-2mc1h6iv.js → layout-_qWD0ITP.js} +1 -1
  57. package/dist/assets/linear-B8qjAYfM.js +1 -0
  58. package/dist/assets/{mermaid-Ix95NAzI.js → mermaid-uuycWAqj.js} +2 -2
  59. package/dist/assets/min-lRkZowff.js +1 -0
  60. package/dist/assets/mindmap-definition-ALO5MXBD-916aPFYT.js +1 -0
  61. package/dist/assets/pieDiagram-IB7DONF6-Cv7WX76E.js +1 -0
  62. package/dist/assets/quadrantDiagram-7GDLP6J5-CDymbRyt.js +1 -0
  63. package/dist/assets/{radar-MK3ICKWK-C8eh3l4l.js → radar-MK3ICKWK-CV-pAvE_.js} +1 -1
  64. package/dist/assets/{react-plotly-B-G-2H-u.js → react-plotly-D1ih8LFH.js} +1 -1
  65. package/dist/assets/requirementDiagram-KVF5MWMF-DXl7cwkl.js +1 -0
  66. package/dist/assets/run-page-yniJR1DB.js +1 -0
  67. package/dist/assets/sankeyDiagram-QLVOVGJD-Dedc_7tx.js +1 -0
  68. package/dist/assets/sequenceDiagram-X6HHIX6F-C9YM6hdZ.js +1 -0
  69. package/dist/assets/slides-component-DThWEbQn.js +1 -0
  70. package/dist/assets/{sortBy-DXHjUsXo.js → sortBy-CEpekLd4.js} +1 -1
  71. package/dist/assets/stateDiagram-DGXRK772-Bnv-RquH.js +1 -0
  72. package/dist/assets/stateDiagram-v2-YXO3MK2T-ByP-r4Vl.js +1 -0
  73. package/dist/assets/step-5BjdtTEt.js +1 -0
  74. package/dist/assets/{terminal-OZpu1kLk.js → terminal--RkJJp4_.js} +1 -1
  75. package/dist/assets/time-DWYZmva_.js +1 -0
  76. package/dist/assets/timeline-definition-BDJGKUSR-D6-K4xl7.js +1 -0
  77. package/dist/assets/timer-DFzT7np-.js +1 -0
  78. package/dist/assets/tracing-KBC5Rih3.js +8 -0
  79. package/dist/assets/transform-DjHZbYKP.js +1 -0
  80. package/dist/assets/tree-BJBMG0ej.js +8 -0
  81. package/dist/assets/{useMarimoWebSocket-BX_wqRHE.js → useMarimoWebSocket-nmAkqHTN.js} +4 -4
  82. package/dist/assets/vega-component-DeZm0f2_.js +1 -0
  83. package/dist/assets/xychartDiagram-VJFVF3MP-CUX71FkW.js +1 -0
  84. package/dist/assets/zoom-COrs4lFh.js +1 -0
  85. package/dist/index.html +2 -2
  86. package/package.json +1 -1
  87. package/dist/assets/VegaLite-Bif5GsmA.js +0 -11
  88. package/dist/assets/_baseEach-CK-6xWq3.js +0 -1
  89. package/dist/assets/_baseMap-FtNH_qsX.js +0 -1
  90. package/dist/assets/_baseUniq-BE8Jj2c-.js +0 -1
  91. package/dist/assets/architectureDiagram-IEHRJDOE-kJDHme_f.js +0 -1
  92. package/dist/assets/blockDiagram-JOT3LUYC-CiF-8Jvd.js +0 -1
  93. package/dist/assets/c4Diagram-VJAJSXHY-Dtm89Kd9.js +0 -1
  94. package/dist/assets/channel-B1yplJGU.js +0 -1
  95. package/dist/assets/classDiagram-GIVACNV2-CYxdhreX.js +0 -1
  96. package/dist/assets/classDiagram-v2-COTLJTTW-CYxdhreX.js +0 -1
  97. package/dist/assets/clone-V_fgfffn.js +0 -1
  98. package/dist/assets/compile-B3BKXRp8.js +0 -1
  99. package/dist/assets/dagre-OKDRZEBW-Cj_CLpiE.js +0 -1
  100. package/dist/assets/data-editor-N8x2VMuB.js +0 -1
  101. package/dist/assets/diagram-SSKATNLV-CdD3Q-9b.js +0 -1
  102. package/dist/assets/diagram-VNBRO52H-CJYPImT8.js +0 -1
  103. package/dist/assets/edit-page-HX1_5YHk.js +0 -8
  104. package/dist/assets/erDiagram-Q7BY3M3F-BKkG760f.js +0 -1
  105. package/dist/assets/flowDiagram-4HSFHLVR-CZVmlMUx.js +0 -1
  106. package/dist/assets/ganttDiagram-APWFNJXF-BIylO8if.js +0 -1
  107. package/dist/assets/gitGraphDiagram-7IBYFJ6S-DpKV1P_B.js +0 -1
  108. package/dist/assets/home-page-DzUani_D.js +0 -7
  109. package/dist/assets/index-C9FDJL8i.css +0 -1
  110. package/dist/assets/index-CGFEuydC.js +0 -80
  111. package/dist/assets/index-CL-t3Tji.js +0 -1
  112. package/dist/assets/index-CwGsMMGq.js +0 -1
  113. package/dist/assets/index-DcJ-bhO5.js +0 -1
  114. package/dist/assets/index-DsyWbcNu.js +0 -1
  115. package/dist/assets/infoDiagram-PH2N3AL5-BncHcRnE.js +0 -1
  116. package/dist/assets/journeyDiagram-U35MCT3I--liro2NZ.js +0 -1
  117. package/dist/assets/kanban-definition-NDS4AKOZ-9VwEA4DC.js +0 -1
  118. package/dist/assets/linear-Dww2dxfj.js +0 -1
  119. package/dist/assets/min-DZjVr_dc.js +0 -1
  120. package/dist/assets/mindmap-definition-ALO5MXBD-BKKH2D_V.js +0 -1
  121. package/dist/assets/pieDiagram-IB7DONF6-Dfyd04pQ.js +0 -1
  122. package/dist/assets/quadrantDiagram-7GDLP6J5-BdYpCVYQ.js +0 -1
  123. package/dist/assets/requirementDiagram-KVF5MWMF-RVmzHCpk.js +0 -1
  124. package/dist/assets/run-page-fnwo0Pap.js +0 -1
  125. package/dist/assets/sankeyDiagram-QLVOVGJD-CpG1o61A.js +0 -1
  126. package/dist/assets/sequenceDiagram-X6HHIX6F-BPC_RCpT.js +0 -1
  127. package/dist/assets/slides-component-B_RQHaVA.js +0 -1
  128. package/dist/assets/stateDiagram-DGXRK772-BQy52Fpn.js +0 -1
  129. package/dist/assets/stateDiagram-v2-YXO3MK2T-COEJEylu.js +0 -1
  130. package/dist/assets/step-xJWGRC3d.js +0 -1
  131. package/dist/assets/time-Cy6KrIdJ.js +0 -1
  132. package/dist/assets/timeline-definition-BDJGKUSR-BqYGFq_H.js +0 -1
  133. package/dist/assets/transform-CdY8z5kT.js +0 -1
  134. package/dist/assets/tree-D9cxvmYe.js +0 -8
  135. package/dist/assets/vega-component-NPMGqqjW.js +0 -1
  136. package/dist/assets/xychartDiagram-VJFVF3MP-DSKQBuGh.js +0 -1
@@ -1 +0,0 @@
1
- var t,e;import{_ as i,s as a,g as n,q as s,p as r,a as o,b as l,c as h,l as c,d,y as u,G as x,L as g,h as f}from"./mermaid-Ix95NAzI.js";import{s as p}from"./transform-CdY8z5kT.js";import{l as y}from"./linear-Dww2dxfj.js";import"./index-CGFEuydC.js";import"./step-xJWGRC3d.js";import"./init-DLRA0X12.js";var T=function(){var t=i((function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i}),"o"),e=[1,3],a=[1,4],n=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],v=[1,28],C=[1,29],L=[1,32],E=[1,33],D=[1,34],z=[1,39],I=[1,40],w=[1,42],N=[1,44],W=[1,62],B=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$=[1,65],U=[1,66],Q=[1,67],O=[1,68],X=[1,69],H=[1,70],M=[1,71],Y=[1,72],j=[1,73],G=[1,74],K=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:i((function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:a,55:n,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:a,55:n,56:s,57:r},{18:e,26:9,27:2,28:a,55:n,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:v,54:C,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),t(o,[2,34]),{27:45,55:n,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:v,54:C,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,44:[1,57],47:[1,58],58:60,59:59,63:D,64:z,65:I,66:w,67:N},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:$,5:U,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:K,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,49:[1,77],63:D,64:z,65:I,66:w,67:N}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,49:[1,78],63:D,64:z,65:I,66:w,67:N}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:$,5:U,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:K,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:i((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:i((function(t){var e=this,a=[0],n=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=r.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(x.yy[g]=this.yy[g]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;r.push(f);var p=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){a.length=a.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),i(y,"lex");for(var T,m,q,A,_,b,S,k,F={};;){if(m=a[a.length-1],this.defaultActions[m]?q=this.defaultActions[m]:(null==T&&(T=y()),q=o[m]&&o[m][T]),void 0===q||!q.length||!q[0]){var P="";for(_ in k=[],o[m])this.terminals_[_]&&_>2&&k.push("'"+this.terminals_[_]+"'");P=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(P,{text:u.match,token:this.terminals_[T]||T,line:u.yylineno,loc:f,expected:k})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+T);switch(q[0]){case 1:a.push(T),s.push(u.yytext),r.push(u.yylloc),a.push(q[1]),T=null,c=u.yyleng,l=u.yytext,h=u.yylineno,f=u.yylloc;break;case 2:if(b=this.productions_[q[1]][1],F.$=s[s.length-b],F._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},p&&(F._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(A=this.performAction.apply(F,[l,c,h,x.yy,q[1],s,r].concat(d))))return A;b&&(a=a.slice(0,-1*b*2),s=s.slice(0,-1*b),r=r.slice(0,-1*b)),a.push(this.productions_[q[1]][0]),s.push(F.$),r.push(F._$),S=o[a[a.length-2]][a[a.length-1]],a.push(S);break;case 3:return!0}}return!0}),"parse")},xt=function(){return{EOF:1,parseError:i((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:i((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:i((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:i((function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,i(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();T.parser=T;var m=T,q=g(),A=(i(t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,e,i,a,n,s,r,o,l,h,c,d,u,g,f,p,y,T;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=x.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(e=x.quadrantChart)?void 0:e.chartHeight)||500,titlePadding:(null==(i=x.quadrantChart)?void 0:i.titlePadding)||10,titleFontSize:(null==(a=x.quadrantChart)?void 0:a.titleFontSize)||20,quadrantPadding:(null==(n=x.quadrantChart)?void 0:n.quadrantPadding)||5,xAxisLabelPadding:(null==(s=x.quadrantChart)?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(r=x.quadrantChart)?void 0:r.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(o=x.quadrantChart)?void 0:o.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(l=x.quadrantChart)?void 0:l.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(h=x.quadrantChart)?void 0:h.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(c=x.quadrantChart)?void 0:c.quadrantTextTopPadding)||5,pointTextPadding:(null==(d=x.quadrantChart)?void 0:d.pointTextPadding)||5,pointLabelFontSize:(null==(u=x.quadrantChart)?void 0:u.pointLabelFontSize)||12,pointRadius:(null==(g=x.quadrantChart)?void 0:g.pointRadius)||5,xAxisPosition:(null==(f=x.quadrantChart)?void 0:f.xAxisPosition)||"top",yAxisPosition:(null==(p=x.quadrantChart)?void 0:p.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(y=x.quadrantChart)?void 0:y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(T=x.quadrantChart)?void 0:T.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:q.quadrant1Fill,quadrant2Fill:q.quadrant2Fill,quadrant3Fill:q.quadrant3Fill,quadrant4Fill:q.quadrant4Fill,quadrant1TextFill:q.quadrant1TextFill,quadrant2TextFill:q.quadrant2TextFill,quadrant3TextFill:q.quadrant3TextFill,quadrant4TextFill:q.quadrant4TextFill,quadrantPointFill:q.quadrantPointFill,quadrantPointTextFill:q.quadrantPointTextFill,quadrantXAxisTextFill:q.quadrantXAxisTextFill,quadrantYAxisTextFill:q.quadrantYAxisTextFill,quadrantTitleFill:q.quadrantTitleFill,quadrantInternalBorderStrokeFill:q.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:q.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,c.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){c.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){c.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const o of r)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:s}=e,r=y().domain([0,1]).range([a,s+a]),o=y().domain([0,1]).range([i+n,n]);return this.data.points.map((t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:r(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:r(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}}))}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},"QuadrantBuilder"),t),_=(e=class extends Error{constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}},i(e,"InvalidStyleError"),e);function b(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function S(t){return!/^\d+$/.test(t)}function k(t){return!/^\d+px$/.test(t)}i(b,"validateHexCode"),i(S,"validateNumber"),i(k,"validateSizeInPixels");var F=h();function P(t){return f(t.trim(),F)}i(P,"textSanitizer");var v=new A;function C(t){v.setData({quadrant1Text:P(t.text)})}function L(t){v.setData({quadrant2Text:P(t.text)})}function E(t){v.setData({quadrant3Text:P(t.text)})}function D(t){v.setData({quadrant4Text:P(t.text)})}function z(t){v.setData({xAxisLeftText:P(t.text)})}function I(t){v.setData({xAxisRightText:P(t.text)})}function w(t){v.setData({yAxisTopText:P(t.text)})}function N(t){v.setData({yAxisBottomText:P(t.text)})}function W(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(S(a))throw new _(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(b(a))throw new _(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(b(a))throw new _(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(k(a))throw new _(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function B(t,e,i,a,n){const s=W(n);v.addPoints([{x:i,y:a,text:P(t.text),className:e,...s}])}function R(t,e){v.addClass(t,W(e))}function $(t){v.setConfig({chartWidth:t})}function U(t){v.setConfig({chartHeight:t})}function Q(){const t=h(),{themeVariables:e,quadrantChart:i}=t;return i&&v.setConfig(i),v.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),v.setData({titleText:s()}),v.build()}i(C,"setQuadrant1Text"),i(L,"setQuadrant2Text"),i(E,"setQuadrant3Text"),i(D,"setQuadrant4Text"),i(z,"setXAxisLeftText"),i(I,"setXAxisRightText"),i(w,"setYAxisTopText"),i(N,"setYAxisBottomText"),i(W,"parseStyles"),i(B,"addPoint"),i(R,"addClass"),i($,"setWidth"),i(U,"setHeight"),i(Q,"getQuadrantData");var O={parser:m,db:{setWidth:$,setHeight:U,setQuadrant1Text:C,setQuadrant2Text:L,setQuadrant3Text:E,setQuadrant4Text:D,setXAxisLeftText:z,setXAxisRightText:I,setYAxisTopText:w,setYAxisBottomText:N,parseStyles:W,addPoint:B,addClass:R,getQuadrantData:Q,clear:i((function(){v.clear(),u()}),"clear"),setAccTitle:l,getAccTitle:o,setDiagramTitle:r,getDiagramTitle:s,getAccDescription:n,setAccDescription:a},renderer:{draw:i(((t,e,a,n)=>{var s,r,o;function l(t){return"top"===t?"hanging":"middle"}function u(t){return"left"===t?"start":"middle"}function x(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}i(l,"getDominantBaseLine"),i(u,"getTextAnchor"),i(x,"getTransformation");const g=h();c.debug("Rendering quadrant chart\n"+t);const f=g.securityLevel;let y;"sandbox"===f&&(y=p("#i"+e));const T=p("sandbox"===f?y.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`),m=T.append("g").attr("class","main"),q=(null==(s=g.quadrantChart)?void 0:s.chartWidth)??500,A=(null==(r=g.quadrantChart)?void 0:r.chartHeight)??500;d(T,A,q,(null==(o=g.quadrantChart)?void 0:o.useMaxWidth)??!0),T.attr("viewBox","0 0 "+q+" "+A),n.db.setHeight(A),n.db.setWidth(q);const _=n.db.getQuadrantData(),b=m.append("g").attr("class","quadrants"),S=m.append("g").attr("class","border"),k=m.append("g").attr("class","data-points"),F=m.append("g").attr("class","labels"),P=m.append("g").attr("class","title");_.title&&P.append("text").attr("x",0).attr("y",0).attr("fill",_.title.fill).attr("font-size",_.title.fontSize).attr("dominant-baseline",l(_.title.horizontalPos)).attr("text-anchor",u(_.title.verticalPos)).attr("transform",x(_.title)).text(_.title.text),_.borderLines&&S.selectAll("line").data(_.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const v=b.selectAll("g.quadrant").data(_.quadrants).enter().append("g").attr("class","quadrant");v.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),v.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>l(t.text.horizontalPos))).attr("text-anchor",(t=>u(t.text.verticalPos))).attr("transform",(t=>x(t.text))).text((t=>t.text.text));F.selectAll("g.label").data(_.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.horizontalPos))).attr("text-anchor",(t=>u(t.verticalPos))).attr("transform",(t=>x(t)));const C=k.selectAll("g.data-point").data(_.points).enter().append("g").attr("class","data-point");C.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeColor)).attr("stroke-width",(t=>t.strokeWidth)),C.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>l(t.text.horizontalPos))).attr("text-anchor",(t=>u(t.text.verticalPos))).attr("transform",(t=>x(t.text)))}),"draw")},styles:i((()=>""),"styles")};export{O as diagram};
@@ -1 +0,0 @@
1
- var e;import{g as t,s}from"./chunk-RZ5BOZE2-CWqsRpa0.js";import{_ as i,b as n,a as r,s as a,g as l,p as c,q as o,c as h,l as u,y,B as m,o as E,r as p,u as d}from"./mermaid-Ix95NAzI.js";import"./transform-CdY8z5kT.js";import"./step-xJWGRC3d.js";import"./index-CGFEuydC.js";var R=function(){var e=i((function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s}),"o"),t=[1,3],s=[1,4],n=[1,5],r=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],l=[1,22],c=[2,7],o=[1,26],h=[1,27],u=[1,28],y=[1,29],m=[1,33],E=[1,34],p=[1,35],d=[1,36],R=[1,37],f=[1,38],_=[1,24],g=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],v=[1,70],L=[1,71],O=[1,72],x=[1,73],w=[1,74],D=[1,75],M=[1,76],$=[1,83],F=[1,80],P=[1,84],U=[1,85],V=[1,86],Y=[1,87],B=[1,88],Q=[1,89],H=[1,90],K=[1,91],j=[1,92],W=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],ee=[1,106],te=[1,107],se=[1,108],ie=[1,109],ne=[1,111],re=[1,116],ae=[1,117],le=[1,114],ce=[1,115],oe={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:i((function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}}),"anonymous"),table:[{3:1,4:2,6:t,9:s,11:n,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:n,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:s,11:n,13:r},{1:[2,2]},{4:17,5:l,7:13,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:l,7:42,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:43,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:44,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:45,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:46,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:47,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:48,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:49,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:50,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:v,66:L,67:O,68:x,69:w,70:D,71:M},{62:77,65:v,66:L,67:O,68:x,69:w,70:D,71:M},{30:78,33:62,75:N,89:b,90:T},{73:79,75:$,76:F,78:81,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j},e(W,[2,60]),e(W,[2,62]),{73:93,75:$,76:F,78:81,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(G,[2,54]),e(G,[2,55]),e(G,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:z}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:$,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j}),e(Z,[2,67]),e(Z,[2,69]),e(Z,[2,70]),e(Z,[2,71]),e(Z,[2,72]),e(Z,[2,73]),e(Z,[2,74]),e(Z,[2,75]),e(Z,[2,76]),e(Z,[2,77]),e(Z,[2,78]),e(k,[2,57],{76:z}),e(k,[2,58],{76:F}),{5:J,28:105,31:ee,34:te,36:se,38:ie,40:ne},{27:[1,112],76:F},{5:re,40:ae,56:113,57:le,59:ce},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:$,78:121,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j},e(W,[2,61]),e(W,[2,63]),e(Z,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:ee,34:te,36:se,38:ie,40:ne},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:ae,56:130,57:le,59:ce},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:$,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:J,28:145,31:ee,34:te,36:se,38:ie,40:ne},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:re,40:ae,56:152,57:le,59:ce},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:J,28:159,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:160,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:161,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:162,31:ee,34:te,36:se,38:ie,40:ne},{5:re,40:ae,56:163,57:le,59:ce},{5:re,40:ae,56:164,57:le,59:ce},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:i((function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)}),"parseError"),parse:i((function(e){var t=this,s=[0],n=[],r=[null],a=[],l=this.table,c="",o=0,h=0,u=a.slice.call(arguments,1),y=Object.create(this.lexer),m={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(m.yy[E]=this.yy[E]);y.setInput(e,m.yy),m.yy.lexer=y,m.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var p=y.yylloc;a.push(p);var d=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=n.pop()||y.lex()||1)&&(e instanceof Array&&(e=(n=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(e){s.length=s.length-2*e,r.length=r.length-e,a.length=a.length-e}),"popStack"),i(R,"lex");for(var f,_,g,S,I,b,T,k,N={};;){if(_=s[s.length-1],this.defaultActions[_]?g=this.defaultActions[_]:(null==f&&(f=R()),g=l[_]&&l[_][f]),void 0===g||!g.length||!g[0]){var q="";for(I in k=[],l[_])this.terminals_[I]&&I>2&&k.push("'"+this.terminals_[I]+"'");q=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(q,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:p,expected:k})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+f);switch(g[0]){case 1:s.push(f),r.push(y.yytext),a.push(y.yylloc),s.push(g[1]),f=null,h=y.yyleng,c=y.yytext,o=y.yylineno,p=y.yylloc;break;case 2:if(b=this.productions_[g[1]][1],N.$=r[r.length-b],N._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},d&&(N._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(S=this.performAction.apply(N,[c,h,o,m.yy,g[1],r,a].concat(u))))return S;b&&(s=s.slice(0,-1*b*2),r=r.slice(0,-1*b),a=a.slice(0,-1*b)),s.push(this.productions_[g[1]][0]),r.push(N.$),a.push(N._$),T=l[s[s.length-2]][s[s.length-1]],s.push(T);break;case 3:return!0}}return!0}),"parse")},he=function(){return{EOF:1,parseError:i((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:i((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:i((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:i((function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=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),s.length-1&&(this.yylineno-=s.length-1);var n=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:i((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:i((function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var e=this.next();return e||this.lex()}),"lex"),begin:i((function(e){this.conditionStack.push(e)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:i((function(e){this.begin(e)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ue(){this.yy={}}return oe.lexer=he,i(ue,"Parser"),ue.prototype=oe,oe.Parser=ue,new ue}();R.parser=R;var f=R,_=(i(e=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=n,this.getAccTitle=r,this.setAccDescription=a,this.getAccDescription=l,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=i((()=>h().requirement),"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),u.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,y()}setCssStyle(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(const s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){var s;for(const i of e){const e=this.requirements.get(i)??this.elements.get(i);if(e)for(const i of t){e.classes.push(i);const t=null==(s=this.classes.get(i))?void 0:s.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(const s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach((function(t){if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})),this.requirements.forEach((e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap((e=>e.split(","))))})),this.elements.forEach((e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap((e=>e.split(","))))}))}}getClasses(){return this.classes}getData(){var e,t,s,i;const n=h(),r=[],a=[];for(const l of this.requirements.values()){const e=l;e.id=l.name,e.cssStyles=l.cssStyles,e.cssClasses=l.classes.join(" "),e.shape="requirementBox",e.look=n.look,r.push(e)}for(const l of this.elements.values()){const e=l;e.shape="requirementBox",e.look=n.look,e.id=l.name,e.cssStyles=l.cssStyles,e.cssClasses=l.classes.join(" "),r.push(e)}for(const l of this.relations){let r=0;const c=l.type===this.Relationships.CONTAINS,o={id:`${l.src}-${l.dst}-${r}`,start:(null==(e=this.requirements.get(l.src))?void 0:e.name)??(null==(t=this.elements.get(l.src))?void 0:t.name),end:(null==(s=this.requirements.get(l.dst))?void 0:s.name)??(null==(i=this.elements.get(l.dst))?void 0:i.name),label:`&lt;&lt;${l.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",c?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:c?"normal":"dashed",arrowTypeStart:c?"requirement_contains":"",arrowTypeEnd:c?"":"requirement_arrow",look:n.look};a.push(o),r++}return{nodes:r,edges:a,other:{},config:n,direction:this.getDirection()}}},"RequirementDB"),e),g=i((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n .divider {\n stroke: ${e.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n`),"getStyles"),S={};m(S,{draw:()=>I});var I=i((async function(e,i,n,r){u.info("REF0:"),u.info("Drawing requirement diagram (unified)",i);const{securityLevel:a,state:l,layout:c}=h(),o=r.db.getData(),y=t(i,a);o.type=r.type,o.layoutAlgorithm=E(c),o.nodeSpacing=(null==l?void 0:l.nodeSpacing)??50,o.rankSpacing=(null==l?void 0:l.rankSpacing)??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=i,await p(o,y);d.insertTitle(y,"requirementDiagramTitleText",(null==l?void 0:l.titleTopMargin)??25,r.db.getDiagramTitle()),s(y,8,"requirementDiagram",(null==l?void 0:l.useMaxWidth)??!0)}),"draw"),b={parser:f,get db(){return new _},renderer:S,styles:g};export{b as diagram};
@@ -1 +0,0 @@
1
- import{G as e,H as s,J as a,K as o,M as t,O as r,P as n,Q as i,S as l,T as c,U as m,V as d,W as h,X as b,Y as x,Z as f,_ as y,$ as p,a0 as u,a1 as g,a2 as _,a3 as j,a4 as k,a5 as v,a6 as w,a7 as S}from"./index-CGFEuydC.js";import{u as N,A as C,R as I,a as P,C as T}from"./useMarimoWebSocket-BX_wqRHE.js";const A=n=>{const l=e.c(14),{appConfig:c}=n,{setCells:m}=s();let d,h,b;l[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],l[0]=d):d=l[0],a.useEffect(E,d),l[1]===Symbol.for("react.memo_cache_sentinel")?(h=i(),l[1]=h):h=l[1],l[2]!==m?(b={autoInstantiate:!0,setCells:m,sessionId:h},l[2]=m,l[3]=b):b=l[3];const{connection:x}=N(b),f=o(t);let y,p,u;return l[4]!==x?(y=r.jsx(P,{connection:x,className:"sm:pt-8"}),l[4]=x,l[5]=y):y=l[5],l[6]!==c?(p=r.jsx(T,{appConfig:c,mode:"read"}),l[6]=c,l[7]=p):p=l[7],l[8]!==c.width||l[9]!==x||l[10]!==f||l[11]!==y||l[12]!==p?(u=r.jsxs(C,{connection:x,isRunning:f,width:c.width,children:[y,p]}),l[8]=c.width,l[9]=x,l[10]=f,l[11]=y,l[12]=p,l[13]=u):u=l[13],u};function W(){I.INSTANCE.stop()}function E(){return I.INSTANCE.start(n),W}const R=()=>{const s=e.c(4);if(!l())return null;let a;s[0]===Symbol.for("react.memo_cache_sentinel")?(a=c(),s[0]=a):a=s[0];const o=a;if(!o)return null;let t,n,i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("a",{href:m.githubPage,target:"_blank",className:"underline",rel:"noreferrer",children:"marimo"}),s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs("span",{children:["This is a static Python notebook built using"," ",t,".",r.jsx("br",{}),"Some interactive features may not work, see ways to run or edit this."]}),s[2]=n):n=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsxs("div",{className:"px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print",children:[n,r.jsx("span",{className:"flex-shrink-0",children:r.jsx(F,{code:o})})]}),s[3]=i):i=s[3],i},F=s=>{const a=e.c(81),{code:o}=s;let t;if(a[0]===Symbol.for("react.memo_cache_sentinel")){t=d()||"notebook.py";const e=t.lastIndexOf("/");-1!==e&&(t=t.slice(e+1)),a[0]=t}else t=a[0];const n=window.location.href;let i,l,c,S,N,C,I,P,T,A,W,E,R,F,M,O,Y,z,B,D,G,H,J,K,Q,U,V,X,Z,$,q,L,ee,se,ae,oe,te;if(a[1]!==o){const e=h({code:o});let s;S=b,a[25]===Symbol.for("react.memo_cache_sentinel")?(M=r.jsx(x,{asChild:!0,children:r.jsx(f,{"data-testid":"static-notebook-dialog-trigger",variant:"secondary",children:"Run or edit this notebook"})}),a[25]=M):M=a[25],c=y,l=p,a[26]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(u,{children:t}),a[26]=F):F=a[26],i=g,D="pt-4 text-md text-left",G="This is a static notebook built using",H=" ",a[27]===Symbol.for("react.memo_cache_sentinel")?(J=r.jsx("a",{href:m.githubPage,target:"_blank",className:"text-link hover:underline",rel:"noreferrer",children:"marimo"}),a[27]=J):J=a[27],C=". marimo is an open-source next-generation Python notebook.",a[28]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx("hr",{className:"my-3"}),a[28]=I):I=a[28],P="In order to edit this notebook, you will need to download the code locally, install marimo, and run the following in your terminal:",a[29]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("br",{}),a[29]=s):s=a[29],a[30]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)]",children:["pip install marimo",s,"marimo edit ",t]}),A=!n.endsWith(".html")&&r.jsxs(r.Fragment,{children:["or",r.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)] break-all",children:["marimo edit ",window.location.href]})]}),W=r.jsx("hr",{className:"my-3"}),a[30]=T,a[31]=A,a[32]=W):(T=a[30],A=a[31],W=a[32]),E="You may also be able to run this notebook entirely in the browser via WebAssembly at:",R=" ",N=e,O="_blank",Y="text-link hover:underline",z="noreferrer",B=e.slice(0,40),a[1]=o,a[2]=i,a[3]=l,a[4]=c,a[5]=S,a[6]=N,a[7]=C,a[8]=I,a[9]=P,a[10]=T,a[11]=A,a[12]=W,a[13]=E,a[14]=R,a[15]=F,a[16]=M,a[17]=O,a[18]=Y,a[19]=z,a[20]=B,a[21]=D,a[22]=G,a[23]=H,a[24]=J}else i=a[2],l=a[3],c=a[4],S=a[5],N=a[6],C=a[7],I=a[8],P=a[9],T=a[10],A=a[11],W=a[12],E=a[13],R=a[14],F=a[15],M=a[16],O=a[17],Y=a[18],z=a[19],B=a[20],D=a[21],G=a[22],H=a[23],J=a[24];return a[33]!==N||a[34]!==O||a[35]!==Y||a[36]!==z||a[37]!==B?(K=r.jsxs("a",{href:N,target:O,className:Y,rel:z,children:[B,"..."]}),a[33]=N,a[34]=O,a[35]=Y,a[36]=z,a[37]=B,a[38]=K):K=a[38],a[39]===Symbol.for("react.memo_cache_sentinel")?(Q=r.jsx("br",{}),a[39]=Q):Q=a[39],a[40]===Symbol.for("react.memo_cache_sentinel")?(U=r.jsxs("div",{className:"text-sm text-muted-foreground pt-2",children:[r.jsx("strong",{children:"Note:"})," This feature is experimental and may not work for all notebooks. Additionally, some dependencies may not be available in the browser."]}),a[40]=U):U=a[40],a[41]!==i||a[42]!==C||a[43]!==I||a[44]!==P||a[45]!==T||a[46]!==A||a[47]!==W||a[48]!==E||a[49]!==R||a[50]!==K||a[51]!==D||a[52]!==G||a[53]!==H||a[54]!==J?(V=r.jsxs(i,{className:D,children:[G,H,J,C,I,P,T,A,W,E,R,K,Q,U]}),a[41]=i,a[42]=C,a[43]=I,a[44]=P,a[45]=T,a[46]=A,a[47]=W,a[48]=E,a[49]=R,a[50]=K,a[51]=D,a[52]=G,a[53]=H,a[54]=J,a[55]=V):V=a[55],a[56]!==l||a[57]!==F||a[58]!==V?(X=r.jsxs(l,{children:[F,V]}),a[56]=l,a[57]=F,a[58]=V,a[59]=X):X=a[59],a[60]!==o?(Z=async()=>{await _(o),j({title:"Copied to clipboard"})},a[60]=o,a[61]=Z):Z=a[61],a[62]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(k,{className:"w-4 h-4 mr-1"}),a[62]=$):$=a[62],a[63]!==Z?(q=r.jsxs(f,{"data-testid":"copy-static-notebook-dialog-button",variant:"secondary",onClick:Z,children:[$,"Copy code"]}),a[63]=Z,a[64]=q):q=a[64],a[65]!==o?(L=()=>{v(new Blob([o],{type:"text/plain"}),t)},a[65]=o,a[66]=L):L=a[66],a[67]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(w,{className:"w-4 h-4 mr-1"}),a[67]=ee):ee=a[67],a[68]!==L?(se=r.jsxs(f,{"data-testid":"download-static-notebook-dialog-button",variant:"secondary",onClick:L,children:[ee,"Download code"]}),a[68]=L,a[69]=se):se=a[69],a[70]!==q||a[71]!==se?(ae=r.jsxs("div",{className:"flex gap-4 flex-wrap",children:[q,se]}),a[70]=q,a[71]=se,a[72]=ae):ae=a[72],a[73]!==c||a[74]!==X||a[75]!==ae?(oe=r.jsxs(c,{children:[X,ae]}),a[73]=c,a[74]=X,a[75]=ae,a[76]=oe):oe=a[76],a[77]!==S||a[78]!==M||a[79]!==oe?(te=r.jsxs(S,{children:[M,oe]}),a[77]=S,a[78]=M,a[79]=oe,a[80]=te):te=a[80],te},M=S()||l(),O=s=>{const a=e.c(6);let o,t,n,i;return a[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),a[0]=o):o=a[0],a[1]!==s.appConfig?(t=r.jsx(A,{appConfig:s.appConfig}),a[1]=s.appConfig,a[2]=t):t=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(n=M&&r.jsx(Y,{}),a[3]=n):n=a[3],a[4]!==t?(i=r.jsxs(r.Fragment,{children:[o,t,n]}),a[4]=t,a[5]=i):i=a[5],i},Y=()=>{const s=e.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"fixed bottom-0 right-0 z-50",children:r.jsxs("a",{href:m.githubPage,target:"_blank",className:"text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2",rel:"noreferrer",children:[r.jsx("span",{className:"pb-[2px]",children:"made with marimo"}),r.jsx("img",{src:"./favicon.ico",alt:"marimo",className:"h-4 w-auto"})]})}),s[0]=a):a=s[0],a};export{O as default};
@@ -1 +0,0 @@
1
- var t,n,e;import{_ as i,p as r,q as s,s as o,g as l,b as a,a as c,c as h,z as u,S as f,y,j as d}from"./mermaid-Ix95NAzI.js";import{s as p}from"./transform-CdY8z5kT.js";import{o as g}from"./ordinal-DDUp3AbE.js";import{c as _}from"./colors-bszWmPJw.js";import"./index-CGFEuydC.js";import"./step-xJWGRC3d.js";import"./init-DLRA0X12.js";const m=_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var k,v;function b(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&e>i&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&e>i&&(i=e);return i}function w(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&i>e&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&i>e&&(i=e);return i}function S(t,n){var e,i=t.length,r=-1,s=0;if(null==n)for(;++r<i;)(e=+t[r])&&(s+=e);else for(;++r<i;)(e=+n(t[r],r,t))&&(s+=e);return s}function E(t){return t.target.depth}function L(t,n){return t.sourceLinks.length?t.depth:n-1}function A(t){return function(){return t}}function M(t,n){return T(t.source,n.source)||t.index-n.index}function I(t,n){return T(t.target,n.target)||t.index-n.index}function T(t,n){return t.y0-n.y0}function N(t){return t.value}function j(t){return t.index}function P(t){return t.nodes}function O(t){return t.links}function C(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function D({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function $(){let t,n,e,i=0,r=0,s=1,o=1,l=24,a=8,c=j,h=L,u=P,f=O,y=6;function d(){const d={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const i=new Map(t.map(((n,e)=>[c(n,e,t),n])));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=C(i,t)),"object"!=typeof n&&(n=r.target=C(i,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:s}of t)r.sort(e),s.sort(e)}(d),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(S(n.sourceLinks,N),S(n.targetLinks,N)):n.fixedValue}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function(e){const c=function({nodes:t}){const e=b(t,(t=>t.depth))+1,r=(s-i-l)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+l,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(a,(o-r)/(b(c,(t=>t.length))-1)),function(n){const e=w(n,(n=>(o-r-(n.length-1)*t)/S(n,N)));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(o-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}v(i)}}(c);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);g(c,n,e),p(c,n,e)}}(d),D(d),d}function p(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=E(e,t)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function g(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function _(n,e){const i=n.length>>1,s=n[i];x(n,s.y0-t,i-1,e),m(n,s.y1+t,i+1,e),x(n,o,n.length-1,e),m(n,r,0,e)}function m(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function x(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function k({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(I);for(const{target:{targetLinks:n}}of t)n.sort(M)}}function v(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(I),e.sort(M)}function E(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return d.update=function(t){return D(t),t},d.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:A(t),d):c},d.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:A(t),d):h},d.nodeSort=function(t){return arguments.length?(n=t,d):n},d.nodeWidth=function(t){return arguments.length?(l=+t,d):l},d.nodePadding=function(n){return arguments.length?(a=t=+n,d):a},d.nodes=function(t){return arguments.length?(u="function"==typeof t?t:A(t),d):u},d.links=function(t){return arguments.length?(f="function"==typeof t?t:A(t),d):f},d.linkSort=function(t){return arguments.length?(e=t,d):e},d.size=function(t){return arguments.length?(i=r=0,s=+t[0],o=+t[1],d):[s-i,o-r]},d.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],o=+t[1][1],d):[[i,r],[s,o]]},d.iterations=function(t){return arguments.length?(y=+t,d):y},d}1===(k=x).length&&(v=k,k=function(t,n){return x(v(t),n)});var z=Math.PI,F=2*z,U=1e-6,W=F-U;function G(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function V(){return new G}function q(t){return function(){return t}}function X(t){return t[0]}function Q(t){return t[1]}G.prototype=V.prototype={constructor:G,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,l=e-t,a=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>U)if(Math.abs(h*l-a*c)>U&&r){var f=e-s,y=i-o,d=l*l+a*a,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),m=r*Math.tan((z-Math.acos((d+u-p)/(2*g*_)))/2),x=m/_,k=m/g;Math.abs(x-1)>U&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+k*l)+","+(this._y1=n+k*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>U||Math.abs(this._y1-c)>U)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%F+F),u>W?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>U&&(this._+="A"+e+","+e+",0,"+ +(u>=z)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var R=Array.prototype.slice;function Y(t){return t.source}function B(t){return t.target}function K(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function Z(){return function(t){var n=Y,e=B,i=X,r=Q,s=null;function o(){var o,l=R.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(s||(s=o=V()),t(s,+i.apply(this,(l[0]=a,l)),+r.apply(this,l),+i.apply(this,(l[0]=c,l)),+r.apply(this,l)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:q(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:q(+t),o):r},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}(K)}function H(t){return[t.source.x1,t.y0]}function J(t){return[t.target.x0,t.y1]}var tt=function(){var t=i((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],r=[1,5,10,12],s={trace:i((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:i((function(t,n,e,i,r,s,o){var l=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),e=parseFloat(s[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:i((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:i((function(t){var n=this,e=[0],r=[],s=[null],o=[],l=this.table,a="",c=0,h=0,u=o.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var p=f.yylloc;o.push(p);var g=f.options&&f.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||f.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),i(_,"lex");for(var m,x,k,v,b,w,S,E,L={};;){if(x=e[e.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==m&&(m=_()),k=l[x]&&l[x][m]),void 0===k||!k.length||!k[0]){var A="";for(b in E=[],l[x])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");A=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[m]||m,line:f.yylineno,loc:p,expected:E})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+m);switch(k[0]){case 1:e.push(m),s.push(f.yytext),o.push(f.yylloc),e.push(k[1]),m=null,h=f.yyleng,a=f.yytext,c=f.yylineno,p=f.yylloc;break;case 2:if(w=this.productions_[k[1]][1],L.$=s[s.length-w],L._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},g&&(L._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(v=this.performAction.apply(L,[a,h,c,y.yy,k[1],s,o].concat(u))))return v;w&&(e=e.slice(0,-1*w*2),s=s.slice(0,-1*w),o=o.slice(0,-1*w)),e.push(this.productions_[k[1]][0]),s.push(L.$),o.push(L._$),S=l[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:i((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:i((function(t,n){return this.yy=n||this.yy||{},this._input=t,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:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:i((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=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),e.length-1&&(this.yylineno-=e.length-1);var r=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:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:i((function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function l(){this.yy={}}return s.lexer=o,i(l,"Parser"),l.prototype=s,s.Parser=l,new l}();tt.parser=tt;var nt=tt,et=[],it=[],rt=new Map,st=i((()=>{et=[],it=[],rt=new Map,y()}),"clear"),ot=(i(t=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}},"SankeyLink"),t),lt=i(((t,n,e)=>{et.push(new ot(t,n,e))}),"addLink"),at=(i(n=class{constructor(t){this.ID=t}},"SankeyNode"),n),ct=i((t=>{t=d.sanitizeText(t,h());let n=rt.get(t);return void 0===n&&(n=new at(t),rt.set(t,n),it.push(n)),n}),"findOrCreateNode"),ht=i((()=>it),"getNodes"),ut=i((()=>et),"getLinks"),ft=i((()=>({nodes:it.map((t=>({id:t.ID}))),links:et.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),yt={nodesMap:rt,getConfig:i((()=>h().sankey),"getConfig"),getNodes:ht,getLinks:ut,getGraph:ft,addLink:lt,findOrCreateNode:ct,getAccTitle:c,setAccTitle:a,getAccDescription:l,setAccDescription:o,getDiagramTitle:s,setDiagramTitle:r,clear:st},dt=(i(e=class{static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},"Uid"),e.count=0,e),pt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?w(t.sourceLinks,E)-1:0},justify:L},gt={draw:i((function(t,n,e,r){const{securityLevel:s,sankey:o}=h(),l=u.sankey;let a;"sandbox"===s&&(a=p("#i"+n));const c=p("sandbox"===s?a.nodes()[0].contentDocument.body:"body"),y="sandbox"===s?c.select(`[id="${n}"]`):p(`[id="${n}"]`),d=(null==o?void 0:o.width)??l.width,_=(null==o?void 0:o.height)??l.width,x=(null==o?void 0:o.useMaxWidth)??l.useMaxWidth,k=(null==o?void 0:o.nodeAlignment)??l.nodeAlignment,v=(null==o?void 0:o.prefix)??l.prefix,b=(null==o?void 0:o.suffix)??l.suffix,w=(null==o?void 0:o.showValues)??l.showValues,S=r.db.getGraph(),E=pt[k];$().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(w?15:0)).nodeAlign(E).extent([[0,0],[d,_]])(S);const L=g(m);y.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=dt.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>L(t.id)));const A=i((({id:t,value:n})=>w?`${t}\n${v}${Math.round(100*n)/100}${b}`:t),"getText");y.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(S.nodes).join("text").attr("x",(t=>t.x0<d/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(w?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<d/2?"start":"end")).text(A);const M=y.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"),I=(null==o?void 0:o.linkColor)??"gradient";if("gradient"===I){const t=M.append("linearGradient").attr("id",(t=>(t.uid=dt.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>L(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>L(t.target.id)))}let T;switch(I){case"gradient":T=i((t=>t.uid),"coloring");break;case"source":T=i((t=>L(t.source.id)),"coloring");break;case"target":T=i((t=>L(t.target.id)),"coloring");break;default:T=I}M.append("path").attr("d",Z().source(H).target(J)).attr("stroke",T).attr("stroke-width",(t=>Math.max(1,t.width))),f(void 0,y,0,x)}),"draw")},_t=i((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),mt=i((t=>`.label {\n font-family: ${t.fontFamily};\n }`),"getStyles"),xt=nt.parse.bind(nt);nt.parse=t=>xt(_t(t));var kt={styles:mt,parser:nt,db:yt,renderer:gt};export{kt as diagram};
@@ -1 +0,0 @@
1
- var t;import{a as e,b as a,g as s,d as r,c as i,e as n}from"./chunk-D6G4REZN-C9kmIC2s.js";import{I as o}from"./chunk-XZIHB7SX-DoqEZmhe.js";import{_ as c,n as l,c as d,l as h,i as p,d as g,e as u,j as x,b as y,s as m,p as b,a as T,g as E,q as f,y as w,h as I,u as L,M as P,N as _,O as v,Z as N,P as A,F as k}from"./mermaid-Ix95NAzI.js";import{s as M}from"./transform-CdY8z5kT.js";import"./index-CGFEuydC.js";import"./step-xJWGRC3d.js";var O=function(){var t=c((function(t,e,a,s){for(a=a||{},s=t.length;s--;a[t[s]]=e);return a}),"o"),e=[1,2],a=[1,3],s=[1,4],r=[2,4],i=[1,9],n=[1,11],o=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],E=[1,31],f=[1,32],w=[1,33],I=[1,34],L=[1,35],P=[1,36],_=[1,37],v=[1,38],N=[1,39],A=[1,41],k=[1,42],M=[1,43],O=[1,44],S=[1,45],D=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],C=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],F=[68,69,70],W=[1,122],q={trace:c((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:c((function(t,e,a,s,r,i,n){var o=i.length-1;switch(r){case 3:return s.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:s.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:s.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:s.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:s.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),s.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),s.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:s.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:s.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:s.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:s.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=s.PLACEMENT.LEFTOF;break;case 64:this.$=s.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=s.LINETYPE.SOLID_OPEN;break;case 70:this.$=s.LINETYPE.DOTTED_OPEN;break;case 71:this.$=s.LINETYPE.SOLID;break;case 72:this.$=s.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=s.LINETYPE.DOTTED;break;case 74:this.$=s.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=s.LINETYPE.SOLID_CROSS;break;case 76:this.$=s.LINETYPE.DOTTED_CROSS;break;case 77:this.$=s.LINETYPE.SOLID_POINT;break;case 78:this.$=s.LINETYPE.DOTTED_POINT;break;case 79:this.$=s.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:s},{1:[3]},{3:5,4:e,5:a,6:s},{3:6,4:e,5:a,6:s},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},t(R,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:_,52:v,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:D},{22:55,70:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:D},{22:72,70:D},{22:73,70:D},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:D},{22:90,70:D},{22:91,70:D},{22:92,70:D},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(C,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(B,r,{7:99}),t(B,r,{7:100}),t(B,r,{7:101}),t(Y,r,{40:102,7:103}),t($,r,{42:104,7:105}),t($,r,{7:105,42:106}),t(V,r,{45:107,7:108}),t(B,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:D},t(F,[2,69]),t(F,[2,70]),t(F,[2,71]),t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),{22:118,70:D},{22:120,58:119,70:D},{70:[2,63]},{70:[2,64]},{56:121,81:W},{56:123,81:W},{56:124,81:W},{56:125,81:W},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:_,52:v,53:N},{5:[1,131]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,135]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,49:[1,136],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,137]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,48:[1,138],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,139]},{16:[1,140]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,47:[1,141],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(R,[2,52]),{22:145,70:D},{22:146,70:D},{56:147,81:W},{56:148,81:W},{56:149,81:W},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(R,[2,16]),t(C,[2,10]),{12:151,50:_,52:v,53:N},t(C,[2,12]),t(C,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:W},{56:158,81:W},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:D},t(C,[2,11]),t(Y,r,{7:103,40:160}),t($,r,{7:105,42:161}),t(V,r,{7:108,45:162}),t(R,[2,48]),t(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:c((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:c((function(t){var e=this,a=[0],s=[],r=[null],i=[],n=this.table,o="",l=0,d=0,h=i.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(g.yy[u]=this.yy[u]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var x=p.yylloc;i.push(x);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,c((function(t){a.length=a.length-2*t,r.length=r.length-t,i.length=i.length-t}),"popStack"),c(m,"lex");for(var b,T,E,f,w,I,L,P,_={};;){if(T=a[a.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(null==b&&(b=m()),E=n[T]&&n[T][b]),void 0===E||!E.length||!E[0]){var v="";for(w in P=[],n[T])this.terminals_[w]&&w>2&&P.push("'"+this.terminals_[w]+"'");v=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:x,expected:P})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(E[0]){case 1:a.push(b),r.push(p.yytext),i.push(p.yylloc),a.push(E[1]),b=null,d=p.yyleng,o=p.yytext,l=p.yylineno,x=p.yylloc;break;case 2:if(I=this.productions_[E[1]][1],_.$=r[r.length-I],_._$={first_line:i[i.length-(I||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(I||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(I||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.apply(_,[o,d,l,g.yy,E[1],r,i].concat(h))))return f;I&&(a=a.slice(0,-1*I*2),r=r.slice(0,-1*I),i=i.slice(0,-1*I)),a.push(this.productions_[E[1]][0]),r.push(_.$),i.push(_._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0}),"parse")},z=function(){return{EOF:1,parseError:c((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:c((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:c((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:c((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=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),a.length-1&&(this.yylineno-=a.length-1);var r=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:a?(a.length===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:c((function(){return this._more=!0,this}),"more"),reject:c((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:c((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:c((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:c((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:c((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:c((function(t,e){var a,s,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1}),"test_match"),next:c((function(){if(this.done)return this.EOF;var t,e,a,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;i<r.length;i++)if((a=this._input.match(this.rules[r[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:c((function(){var t=this.next();return t||this.lex()}),"lex"),begin:c((function(t){this.conditionStack.push(t)}),"begin"),popState:c((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:c((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:c((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:c((function(t){this.begin(t)}),"pushState"),stateStackSize:c((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:c((function(t,e,a,s){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function H(){this.yy={}}return q.lexer=z,c(H,"Parser"),H.prototype=q,q.Parser=H,new H}();O.parser=O;var S=O,D={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},R={FILLED:0,OPEN:1},C={LEFTOF:0,RIGHTOF:1,OVER:2},B=(c(t=class{constructor(){this.state=new o((()=>({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=y,this.setAccDescription=m,this.setDiagramTitle=b,this.getAccTitle=T,this.getAccDescription=E,this.getDiagramTitle=f,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(d().wrap),this.LINETYPE=D,this.ARROWTYPE=R,this.PLACEMENT=C}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,e,a,s){let r=this.state.records.currentBox;const i=this.state.records.actors.get(t);if(i){if(this.state.records.currentBox&&i.box&&this.state.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(r=i.box?i.box:this.state.records.currentBox,i.box=r,i&&e===i.name&&null==a)return}if(null==(null==a?void 0:a.text)&&(a={text:e,type:s}),null!=s&&null!=a.text||(a={text:e,type:s}),this.state.records.actors.set(t,{box:r,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,s){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:s})}addSignal(t,e,a,s,r=!1){if(s===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:(null==a?void 0:a.text)??"",wrap:(null==a?void 0:a.wrap)??this.autoWrap(),type:s,activate:r}),!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(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){var t;return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(null==(t=d().sequence)?void 0:t.wrap)??!1}clear(){this.state.reset(),w()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:s}=this.extractWrap(e),r={text:s,wrap:a};return h.debug(`parseMessage: ${JSON.stringify(r)}`),r}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=(null==e?void 0:e[1])?e[1].trim():"transparent",s=(null==e?void 0:e[2])?e[2].trim():void 0;if(null==window?void 0:window.CSS)window.CSS.supports("color",a)||(a="transparent",s=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",s=t.trim())}const{wrap:r,cleanedText:i}=this.extractWrap(s);return{text:i?I(i,d()):void 0,color:a,wrap:r}}addNote(t,e,a){const s={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},r=[].concat(t,t);this.state.records.notes.push(s),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r[0],to:r[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=I(e.text,d());t=t.replace(/&equals;/g,"="),t=t.replace(/&amp;/g,"&");const s=JSON.parse(t);this.insertLinks(a,s)}catch(s){h.error("error while parsing actor link text",s)}}addALink(t,e){const a=this.getActor(t);try{const t={};let s=I(e.text,d());const r=s.indexOf("@");s=s.replace(/&equals;/g,"="),s=s.replace(/&amp;/g,"&");const i=s.slice(0,r-1).trim(),n=s.slice(r+1).trim();t[i]=n,this.insertLinks(a,t)}catch(s){h.error("error while parsing actor link text",s)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=I(e.text,d()),s=JSON.parse(t);this.insertProperties(a,s)}catch(s){h.error("error while parsing actor properties text",s)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),s=document.getElementById(e.text);try{const t=s.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(r){h.error("error while parsing actor details text",r)}}getActorProperty(t,e){if(void 0!==(null==t?void 0:t.properties))return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach((t=>{this.apply(t)}));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);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),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":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);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":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":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"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":y(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,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"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return d().sequence}},"SequenceDB"),t),Y=c((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),$="actor-top",V="actor-bottom",F="actor-man",W=c((function(t,e){return r(t,e)}),"drawRect"),q=c((function(t,e,a,s,r){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";r&&(c="block !important");const l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c);var d="";void 0!==o.class&&(d=" "+o.class);let h=o.width>a?o.width:a;const g=l.append("rect");if(g.attr("class","actorPopupMenuPanel"+d),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",h),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=l.append("a"),y=p.sanitizeUrl(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),ut(s)(t,x,o.x+10,o.height+u,h,20,{class:"actor"},s),u+=30}}return g.attr("height",u),{height:o.height+u,width:h}}),"drawPopup"),z=c((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),H=c((async function(t,e,a=null){let s=t.append("foreignObject");const r=await A(e.text,k()),i=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(s.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const r=a.getBBox();s.attr("x",Math.round(r.x+r.width/2-i.width/2)).attr("y",Math.round(r.y+r.height/2-i.height/2))}else if(a){let{startx:t,stopx:r,starty:n}=a;if(t>r){const e=t;t=r,r=e}s.attr("x",Math.round(t+Math.abs(t-r)/2-i.width/2)),"loopText"===e.class?s.attr("y",Math.round(n)):s.attr("y",Math.round(n-i.height))}return[s]}),"drawKatex"),j=c((function(t,e){let a=0,s=0;const r=e.text.split(x.lineBreakRegex),[i,n]=v(e.fontSize);let o=[],l=0,d=c((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=c((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":d=c((()=>Math.round(e.y+(a+s+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":d=c((()=>Math.round(e.y+(a+s+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[c,h]of r.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(l=c*i);const r=t.append("text");r.attr("x",e.x),r.attr("y",d()),void 0!==e.anchor&&r.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&r.style("font-family",e.fontFamily),void 0!==n&&r.style("font-size",n),void 0!==e.fontWeight&&r.style("font-weight",e.fontWeight),void 0!==e.fill&&r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class),void 0!==e.dy?r.attr("dy",e.dy):0!==l&&r.attr("dy",l);const p=h||N;if(e.tspan){const t=r.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(p)}else r.text(p);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(s+=(r._groups||r)[0][0].getBBox().height,a=s),o.push(r)}return o}),"drawText"),U=c((function(t,e){function a(t,e,a,s,r){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+s-r)+" "+(t+a-1.2*r)+","+(e+s)+" "+t+","+(e+s)}c(a,"genPoints");const s=t.append("polygon");return s.attr("points",a(e.x,e.y,e.width,e.height,7)),s.attr("class","labelBox"),e.y=e.y+e.height/2,j(t,e),s}),"drawLabel"),K=-1,X=c(((t,e,a,s)=>{t.select&&a.forEach((a=>{const r=e.get(a),i=t.select("#actor"+r.actorCnt);!s.mirrorActors&&r.stopy?i.attr("y2",r.stopy+r.height/2):s.mirrorActors&&i.attr("y2",r.stopy)}))}),"fixLifeLineHeights"),G=c((function(t,e,a,r){var o,c;const l=r?e.stopy:e.starty,d=e.x+e.width/2,h=l+e.height,p=t.append("g").lower();var g=p;r||(K++,Object.keys(e.links||{}).length&&!a.forceMenus&&g.attr("onclick",z(`actor${K}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+K).attr("x1",d).attr("y1",h).attr("x2",d).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),g=p.append("g"),e.actorCnt=K,null!=e.links&&g.attr("id","root-"+K));const u=s();var x="actor";(null==(o=e.properties)?void 0:o.class)?x=e.properties.class:u.fill="#eaeaea",x+=r?` ${V}`:` ${$}`,u.x=e.x,u.y=l,u.width=e.width,u.height=e.height,u.class=x,u.rx=3,u.ry=3,u.name=e.name;const y=W(g,u);if(e.rectData=u,null==(c=e.properties)?void 0:c.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?i(g,u.x+u.width-20,u.y+10,t.substr(1)):n(g,u.x+u.width-20,u.y+10,t)}gt(a,P(e.description))(e.description,g,u.x,u.y,u.width,u.height,{class:"actor actor-box"},a);let m=e.height;if(y.node){const t=y.node().getBBox();e.height=t.height,m=t.height}return m}),"drawActorTypeParticipant"),J=c((function(t,e,a,r){const i=r?e.stopy:e.starty,n=e.x+e.width/2,o=i+80,c=t.append("g").lower();r||(K++,c.append("line").attr("id","actor"+K).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=K);const l=t.append("g");let d=F;d+=r?` ${V}`:` ${$}`,l.attr("class",d),l.attr("name",e.name);const h=s();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+K).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+K).attr("x1",n-18).attr("y1",i+33).attr("x2",n+18).attr("y2",i+33),l.append("line").attr("x1",n-18).attr("y1",i+60).attr("x2",n).attr("y2",i+45),l.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+18-2).attr("y2",i+60);const p=l.append("circle");p.attr("cx",e.x+e.width/2),p.attr("cy",i+10),p.attr("r",15),p.attr("width",e.width),p.attr("height",e.height);const g=l.node().getBBox();return e.height=g.height,gt(a,P(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${F}`},a),e.height}),"drawActorTypeActor"),Z=c((async function(t,e,a,s){switch(e.type){case"actor":return await J(t,e,a,s);case"participant":return await G(t,e,a,s)}}),"drawActor"),Q=c((function(t,e,a){const s=t.append("g");st(s,e),e.name&&gt(a)(e.name,s,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),s.lower()}),"drawBox"),tt=c((function(t){return t.append("g")}),"anchorElement"),et=c((function(t,e,a,r,i){const n=s(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,W(o,n)}),"drawActivation"),at=c((async function(t,e,s,r){const{boxMargin:i,boxTextMargin:n,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=r,g=t.append("g"),u=c((function(t,e,a,s){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",s).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=a();x.text=s,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=o||20,x.textMargin=n,x.class="labelText",U(g,x),x=ht(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+n,x.anchor="middle",x.valign="middle",x.textMargin=n,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=P(x.text)?await H(g,x,e):j(g,x);if(void 0!==e.sectionTitles)for(const[a,c]of Object.entries(e.sectionTitles))if(c.message){x.text=c.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[a].y+i+n,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,P(x.text)?(e.starty=e.sections[a].y,await H(g,x,e)):j(g,x);let t=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[a].height+=t-(i+n)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),st=c((function(t,a){e(t,a)}),"drawBackgroundRect"),rt=c((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),it=c((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),nt=c((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),ot=c((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),ct=c((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),lt=c((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),dt=c((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),ht=c((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"),pt=c((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),gt=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a+i/2).attr("y",s+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,s,i,n,o,c){const{actorFontSize:l,actorFontFamily:d,actorFontWeight:h}=c,[p,g]=v(l),u=t.split(x.lineBreakRegex);for(let x=0;x<u.length;x++){const t=x*p-p*(u.length-1)/2,c=e.append("text").attr("x",a+i/2).attr("y",s).style("text-anchor","middle").style("font-size",g).style("font-weight",h).style("font-family",d);c.append("tspan").attr("x",a+i/2).attr("dy",t).text(u[x]),c.attr("y",s+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(c,o)}}function a(t,a,s,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,i,n,o,c,l),r(h,c)}async function s(t,a,s,i,n,o,c,l){const d=await _(t,k()),h=a.append("switch"),p=h.append("foreignObject").attr("x",s+n/2-d.width/2).attr("y",i+o/2-d.height/2).attr("width",d.width).attr("height",d.height).append("xhtml:div").style("height","100%").style("width","100%");p.append("div").style("text-align","center").style("vertical-align","middle").html(await A(t,k())),e(t,h,s,i,n,o,c,l),r(p,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return c(t,"byText"),c(e,"byTspan"),c(a,"byFo"),c(s,"byKatex"),c(r,"_setTextAttrs"),function(r,i=!1){return i?s:"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),ut=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").text(t),o)}function e(t,e,a,r,i,n,o,c){const{actorFontSize:l,actorFontFamily:d,actorFontWeight:h}=c,p=t.split(x.lineBreakRegex);for(let g=0;g<p.length;g++){const t=g*l-l*(p.length-1)/2,i=e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",d);i.append("tspan").attr("x",a).attr("dy",t).text(p[g]),i.attr("y",r+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(i,o)}}function a(t,a,r,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,r,i,0,o,c,l),s(h,c)}function s(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return c(t,"byText"),c(e,"byTspan"),c(a,"byFo"),c(s,"_setTextAttrs"),function(s){return"fo"===s.textPlacement?a:"old"===s.textPlacement?t:e}}(),xt={drawRect:W,drawText:j,drawLabel:U,drawActor:Z,drawBox:Q,drawPopup:q,anchorElement:tt,drawActivation:et,drawLoop:at,drawBackgroundRect:st,insertArrowHead:ot,insertArrowFilledHead:ct,insertSequenceNumber:lt,insertArrowCrossHead:dt,insertDatabaseIcon:rt,insertComputerIcon:it,insertClockIcon:nt,getTextObj:ht,getNoteRect:pt,fixLifeLineHeights:X,sanitizeUrl:p.sanitizeUrl},yt={},mt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:c((function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:c((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:c((function(t){this.boxes.push(t)}),"addBox"),addActor:c((function(t){this.actors.push(t)}),"addActor"),addLoop:c((function(t){this.loops.push(t)}),"addLoop"),addMessage:c((function(t){this.messages.push(t)}),"addMessage"),addNote:c((function(t){this.notes.push(t)}),"addNote"),lastActor:c((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:c((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:c((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:c((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:c((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,vt(d())}),"init"),updateVal:c((function(t,e,a,s){void 0===t[e]?t[e]=a:t[e]=s(a,t[e])}),"updateVal"),updateBounds:c((function(t,e,a,s){const r=this;let i=0;function n(n){return c((function(o){i++;const c=r.sequenceItems.length-i+1;r.updateVal(o,"starty",e-c*yt.boxMargin,Math.min),r.updateVal(o,"stopy",s+c*yt.boxMargin,Math.max),r.updateVal(mt.data,"startx",t-c*yt.boxMargin,Math.min),r.updateVal(mt.data,"stopx",a+c*yt.boxMargin,Math.max),"activation"!==n&&(r.updateVal(o,"startx",t-c*yt.boxMargin,Math.min),r.updateVal(o,"stopx",a+c*yt.boxMargin,Math.max),r.updateVal(mt.data,"starty",e-c*yt.boxMargin,Math.min),r.updateVal(mt.data,"stopy",s+c*yt.boxMargin,Math.max))}),"updateItemBounds")}c(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))}),"updateBounds"),insert:c((function(t,e,a,s){const r=x.getMin(t,a),i=x.getMax(t,a),n=x.getMin(e,s),o=x.getMax(e,s);this.updateVal(mt.data,"startx",r,Math.min),this.updateVal(mt.data,"starty",n,Math.min),this.updateVal(mt.data,"stopx",i,Math.max),this.updateVal(mt.data,"stopy",o,Math.max),this.updateBounds(r,n,i,o)}),"insert"),newActivation:c((function(t,e,a){const s=a.get(t.from),r=Nt(t.from).length||0,i=s.x+s.width/2+(r-1)*yt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+yt.activationWidth,stopy:void 0,actor:t.from,anchored:xt.anchorElement(e)})}),"newActivation"),endActivation:c((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:c((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:c((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:c((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:c((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:c((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:mt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:c((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:c((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:c((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=x.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:c((function(){return this.verticalPos}),"getVerticalPos"),getBounds:c((function(){return{bounds:this.data,models:this.models}}),"getBounds")},bt=c((async function(t,e){mt.bumpVerticalPos(yt.boxMargin),e.height=yt.boxMargin,e.starty=mt.getVerticalPos();const r=s();r.x=e.startx,r.y=e.starty,r.width=e.width||yt.width,r.class="note";const i=t.append("g"),n=xt.drawRect(i,r),o=a();o.x=e.startx,o.y=e.starty,o.width=r.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=yt.noteFontFamily,o.fontSize=yt.noteFontSize,o.fontWeight=yt.noteFontWeight,o.anchor=yt.noteAlign,o.textMargin=yt.noteMargin,o.valign="center";const c=P(o.text)?await H(i,o):j(i,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));n.attr("height",l+2*yt.noteMargin),e.height+=l+2*yt.noteMargin,mt.bumpVerticalPos(l+2*yt.noteMargin),e.stopy=e.starty+l+2*yt.noteMargin,e.stopx=e.startx+r.width,mt.insert(e.startx,e.starty,e.stopx,e.stopy),mt.models.addNote(e)}),"drawNote"),Tt=c((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),Et=c((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),ft=c((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function wt(t,e){mt.bumpVerticalPos(10);const{startx:a,stopx:s,message:r}=e,i=x.splitBreaks(r).length,n=P(r),o=n?await _(r,d()):L.calculateTextDimensions(r,Tt(yt));if(!n){const t=o.height/i;e.height+=t,mt.bumpVerticalPos(t)}let c,l=o.height-10;const h=o.width;if(a===s){c=mt.getVerticalPos()+l,yt.rightAngles||(l+=yt.boxMargin,c=mt.getVerticalPos()+l),l+=30;const t=x.getMax(h/2,yt.width/2);mt.insert(a-t,mt.getVerticalPos()-10+l,s+t,mt.getVerticalPos()+30+l)}else l+=yt.boxMargin,c=mt.getVerticalPos()+l,mt.insert(a,c-10,s,c);return mt.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,mt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),c}c(wt,"boundMessage");var It=c((async function(t,e,s,r){const{startx:i,stopx:n,starty:o,message:c,type:l,sequenceIndex:d,sequenceVisible:h}=e,p=L.calculateTextDimensions(c,Tt(yt)),g=a();g.x=i,g.y=o+10,g.width=n-i,g.class="messageText",g.dy="1em",g.text=c,g.fontFamily=yt.messageFontFamily,g.fontSize=yt.messageFontSize,g.fontWeight=yt.messageFontWeight,g.anchor=yt.messageAlign,g.valign="center",g.textMargin=yt.wrapPadding,g.tspan=!1,P(g.text)?await H(t,g,{startx:i,stopx:n,starty:s}):j(t,g);const u=p.width;let y;i===n?y=yt.rightAngles?t.append("path").attr("d",`M ${i},${s} H ${i+x.getMax(yt.width/2,u/2)} V ${s+25} H ${i}`):t.append("path").attr("d","M "+i+","+s+" C "+(i+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20)):(y=t.append("line"),y.attr("x1",i),y.attr("y1",s),y.attr("x2",n),y.attr("y2",s)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let m="";yt.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),l!==r.db.LINETYPE.SOLID&&l!==r.db.LINETYPE.DOTTED||y.attr("marker-end","url("+m+"#arrowhead)"),l!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&l!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(y.attr("marker-start","url("+m+"#arrowhead)"),y.attr("marker-end","url("+m+"#arrowhead)")),l!==r.db.LINETYPE.SOLID_POINT&&l!==r.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+m+"#filled-head)"),l!==r.db.LINETYPE.SOLID_CROSS&&l!==r.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+m+"#crosshead)"),(h||yt.showSequenceNumbers)&&(y.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",s+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(d))}),"drawMessage"),Lt=c((function(t,e,a,s,r,i,n){let o,c=0,l=0,d=0;for(const h of s){const t=e.get(h),s=t.box;o&&o!=s&&(n||mt.models.addBox(o),l+=yt.boxMargin+o.margin),s&&s!=o&&(n||(s.x=c+l,s.y=r),l+=s.margin),t.width=t.width||yt.width,t.height=x.getMax(t.height||yt.height,yt.height),t.margin=t.margin||yt.actorMargin,d=x.getMax(d,t.height),a.get(t.name)&&(l+=t.width/2),t.x=c+l,t.starty=mt.getVerticalPos(),mt.insert(t.x,r,t.x+t.width,t.height),c+=t.width+l,t.box&&(t.box.width=c+s.margin-t.box.x),l=t.margin,o=t.box,mt.models.addActor(t)}o&&!n&&mt.models.addBox(o),mt.bumpVerticalPos(d)}),"addActorRenderingData"),Pt=c((async function(t,e,a,s){if(s){let s=0;mt.bumpVerticalPos(2*yt.boxMargin);for(const r of a){const a=e.get(r);a.stopy||(a.stopy=mt.getVerticalPos());const i=await xt.drawActor(t,a,yt,!0);s=x.getMax(s,i)}mt.bumpVerticalPos(s+yt.boxMargin)}else for(const r of a){const a=e.get(r);await xt.drawActor(t,a,yt,!1)}}),"drawActors"),_t=c((function(t,e,a,s){let r=0,i=0;for(const n of a){const a=e.get(n),o=Dt(a),c=xt.drawPopup(t,a,o,yt,yt.forceMenus,s);c.height>r&&(r=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:r,maxWidth:i}}),"drawActorsPopup"),vt=c((function(t){u(yt,t),t.fontFamily&&(yt.actorFontFamily=yt.noteFontFamily=yt.messageFontFamily=t.fontFamily),t.fontSize&&(yt.actorFontSize=yt.noteFontSize=yt.messageFontSize=t.fontSize),t.fontWeight&&(yt.actorFontWeight=yt.noteFontWeight=yt.messageFontWeight=t.fontWeight)}),"setConf"),Nt=c((function(t){return mt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),At=c((function(t,e){const a=e.get(t),s=Nt(t);return[s.reduce((function(t,e){return x.getMin(t,e.startx)}),a.x+a.width/2-1),s.reduce((function(t,e){return x.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function kt(t,e,a,s,r){mt.bumpVerticalPos(a);let i=s;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,r=Tt(yt);e.message=L.wrapLabel(`[${e.message}]`,a-2*yt.wrapPadding,r),e.width=a,e.wrap=!0;const n=L.calculateTextDimensions(e.message,r),o=x.getMax(n.height,yt.labelBoxHeight);i=s+o,h.debug(`${o} - ${e.message}`)}r(e),mt.bumpVerticalPos(i)}function Mt(t,e,a,s,r,i,n){function o(a,s){a.x<r.get(t.from).x?(mt.insert(e.stopx-s,e.starty,e.startx,e.stopy+a.height/2+yt.noteMargin),e.stopx=e.stopx+s):(mt.insert(e.startx,e.starty,e.stopx+s,e.stopy+a.height/2+yt.noteMargin),e.stopx=e.stopx-s)}function l(a,s){a.x<r.get(t.to).x?(mt.insert(e.startx-s,e.starty,e.stopx,e.stopy+a.height/2+yt.noteMargin),e.startx=e.startx+s):(mt.insert(e.stopx,e.starty,e.startx+s,e.stopy+a.height/2+yt.noteMargin),e.startx=e.startx-s)}if(c(o,"receiverAdjustment"),c(l,"senderAdjustment"),i.get(t.to)==s){const e=r.get(t.to);o(e,"actor"==e.type?21:e.width/2+3),e.starty=a-e.height/2,mt.bumpVerticalPos(e.height/2)}else if(n.get(t.from)==s){const e=r.get(t.from);if(yt.mirrorActors){l(e,"actor"==e.type?18:e.width/2)}e.stopy=a-e.height/2,mt.bumpVerticalPos(e.height/2)}else if(n.get(t.to)==s){const e=r.get(t.to);if(yt.mirrorActors){o(e,"actor"==e.type?21:e.width/2+3)}e.stopy=a-e.height/2,mt.bumpVerticalPos(e.height/2)}}c(kt,"adjustLoopHeightForWrap"),c(Mt,"adjustCreatedDestroyedData");var Ot=c((async function(t,e,a,s){const{securityLevel:r,sequence:i}=d();let n;yt=i,"sandbox"===r&&(n=M("#i"+e));const o=M("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),l="sandbox"===r?n.nodes()[0].contentDocument:document;mt.init(),h.debug(s.db);const p="sandbox"===r?o.select(`[id="${e}"]`):M(`[id="${e}"]`),u=s.db.getActors(),x=s.db.getCreatedActors(),y=s.db.getDestroyedActors(),m=s.db.getBoxes();let b=s.db.getActorKeys();const T=s.db.getMessages(),E=s.db.getDiagramTitle(),f=s.db.hasAtLeastOneBox(),w=s.db.hasAtLeastOneBoxWithTitle(),I=await St(u,T,s);if(yt.height=await Rt(u,I,m),xt.insertComputerIcon(p),xt.insertDatabaseIcon(p),xt.insertClockIcon(p),f&&(mt.bumpVerticalPos(yt.boxMargin),w&&mt.bumpVerticalPos(m[0].textMaxHeight)),!0===yt.hideUnusedParticipants){const t=new Set;T.forEach((e=>{t.add(e.from),t.add(e.to)})),b=b.filter((e=>t.has(e)))}Lt(p,u,x,b,0,T,!1);const L=await Yt(T,u,I,s);function P(t,e){const a=mt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),xt.drawActivation(p,a,e,yt,Nt(t.from).length),mt.insert(a.startx,e-10,a.stopx,e)}xt.insertArrowHead(p),xt.insertArrowCrossHead(p),xt.insertArrowFilledHead(p),xt.insertSequenceNumber(p),c(P,"activeEnd");let _=1,v=1;const N=[],A=[];let k=0;for(const c of T){let t,e,a;switch(c.type){case s.db.LINETYPE.NOTE:mt.resetVerticalPos(),e=c.noteModel,await bt(p,e);break;case s.db.LINETYPE.ACTIVE_START:mt.newActivation(c,p,u);break;case s.db.LINETYPE.ACTIVE_END:P(c,mt.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.LOOP_END:t=mt.endLoop(),await xt.drawLoop(p,t,"loop",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.RECT_START:kt(L,c,yt.boxMargin,yt.boxMargin,(t=>mt.newLoop(void 0,t.message)));break;case s.db.LINETYPE.RECT_END:t=mt.endLoop(),A.push(t),mt.models.addLoop(t),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos());break;case s.db.LINETYPE.OPT_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.OPT_END:t=mt.endLoop(),await xt.drawLoop(p,t,"opt",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.ALT_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.ALT_ELSE:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.ALT_END:t=mt.endLoop(),await xt.drawLoop(p,t,"alt",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t))),mt.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.PAR_END:t=mt.endLoop(),await xt.drawLoop(p,t,"par",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.AUTONUMBER:_=c.message.start||_,v=c.message.step||v,c.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.CRITICAL_OPTION:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.CRITICAL_END:t=mt.endLoop(),await xt.drawLoop(p,t,"critical",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.BREAK_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.BREAK_END:t=mt.endLoop(),await xt.drawLoop(p,t,"break",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;default:try{a=c.msgModel,a.starty=mt.getVerticalPos(),a.sequenceIndex=_,a.sequenceVisible=s.db.showSequenceNumbers();const t=await wt(0,a);Mt(c,a,t,k,u,x,y),N.push({messageModel:a,lineStartY:t}),mt.models.addMessage(a)}catch($){h.error("error while drawing message",$)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(c.type)&&(_+=v),k++}h.debug("createdActors",x),h.debug("destroyedActors",y),await Pt(p,u,b,!1);for(const c of N)await It(p,c.messageModel,c.lineStartY,s);yt.mirrorActors&&await Pt(p,u,b,!0),A.forEach((t=>xt.drawBackgroundRect(p,t))),X(p,u,b,yt);for(const c of mt.models.boxes)c.height=mt.getVerticalPos()-c.y,mt.insert(c.x,c.y,c.x+c.width,c.height),c.startx=c.x,c.starty=c.y,c.stopx=c.startx+c.width,c.stopy=c.starty+c.height,c.stroke="rgb(0,0,0, 0.5)",xt.drawBox(p,c,yt);f&&mt.bumpVerticalPos(yt.boxMargin);const O=_t(p,u,b,l),{bounds:S}=mt.getBounds();void 0===S.startx&&(S.startx=0),void 0===S.starty&&(S.starty=0),void 0===S.stopx&&(S.stopx=0),void 0===S.stopy&&(S.stopy=0);let D=S.stopy-S.starty;D<O.maxHeight&&(D=O.maxHeight);let R=D+2*yt.diagramMarginY;yt.mirrorActors&&(R=R-yt.boxMargin+yt.bottomMarginAdj);let C=S.stopx-S.startx;C<O.maxWidth&&(C=O.maxWidth);const B=C+2*yt.diagramMarginX;E&&p.append("text").text(E).attr("x",(S.stopx-S.startx)/2-2*yt.diagramMarginX).attr("y",-25),g(p,R,B,yt.useMaxWidth);const Y=E?40:0;p.attr("viewBox",S.startx-yt.diagramMarginX+" -"+(yt.diagramMarginY+Y)+" "+B+" "+(R+Y)),h.debug("models:",mt.models)}),"draw");async function St(t,e,a){const s={};for(const r of e)if(t.get(r.to)&&t.get(r.from)){const e=t.get(r.to);if(r.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(r.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const i=void 0!==r.placement,n=!i,o=i?Et(yt):Tt(yt),c=r.wrap?L.wrapLabel(r.message,yt.width-2*yt.wrapPadding,o):r.message,l=(P(c)?await _(r.message,d()):L.calculateTextDimensions(c,o)).width+2*yt.wrapPadding;n&&r.from===e.nextActor?s[r.to]=x.getMax(s[r.to]||0,l):n&&r.from===e.prevActor?s[r.from]=x.getMax(s[r.from]||0,l):n&&r.from===r.to?(s[r.from]=x.getMax(s[r.from]||0,l/2),s[r.to]=x.getMax(s[r.to]||0,l/2)):r.placement===a.db.PLACEMENT.RIGHTOF?s[r.from]=x.getMax(s[r.from]||0,l):r.placement===a.db.PLACEMENT.LEFTOF?s[e.prevActor]=x.getMax(s[e.prevActor]||0,l):r.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(s[e.prevActor]=x.getMax(s[e.prevActor]||0,l/2)),e.nextActor&&(s[r.from]=x.getMax(s[r.from]||0,l/2)))}return h.debug("maxMessageWidthPerActor:",s),s}c(St,"getMaxMessageWidthPerActor");var Dt=c((function(t){let e=0;const a=ft(yt);for(const s in t.links){const t=L.calculateTextDimensions(s,a).width+2*yt.wrapPadding+2*yt.boxMargin;e<t&&(e=t)}return e}),"getRequiredPopupWidth");async function Rt(t,e,a){let s=0;for(const i of t.keys()){const e=t.get(i);e.wrap&&(e.description=L.wrapLabel(e.description,yt.width-2*yt.wrapPadding,ft(yt)));const a=P(e.description)?await _(e.description,d()):L.calculateTextDimensions(e.description,ft(yt));e.width=e.wrap?yt.width:x.getMax(yt.width,a.width+2*yt.wrapPadding),e.height=e.wrap?x.getMax(a.height,yt.height):yt.height,s=x.getMax(s,e.height)}for(const i in e){const a=t.get(i);if(!a)continue;const s=t.get(a.nextActor);if(!s){const t=e[i]+yt.actorMargin-a.width/2;a.margin=x.getMax(t,yt.actorMargin);continue}const r=e[i]+yt.actorMargin-a.width/2-s.width/2;a.margin=x.getMax(r,yt.actorMargin)}let r=0;return a.forEach((e=>{const a=Tt(yt);let s=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);s-=2*yt.boxTextMargin,e.wrap&&(e.name=L.wrapLabel(e.name,s-2*yt.wrapPadding,a));const i=L.calculateTextDimensions(e.name,a);r=x.getMax(i.height,r);const n=x.getMax(s,i.width+2*yt.wrapPadding);if(e.margin=yt.boxTextMargin,s<n){const t=(n-s)/2;e.margin+=t}})),a.forEach((t=>t.textMaxHeight=r)),x.getMax(s,yt.height)}c(Rt,"calculateActorMargins");var Ct=c((async function(t,e,a){const s=e.get(t.from),r=e.get(t.to),i=s.x,n=r.x,o=t.wrap&&t.message;let c=P(t.message)?await _(t.message,d()):L.calculateTextDimensions(o?L.wrapLabel(t.message,yt.width,Et(yt)):t.message,Et(yt));const l={width:o?yt.width:x.getMax(yt.width,c.width+2*yt.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(l.width=o?x.getMax(yt.width,c.width):x.getMax(s.width/2+r.width/2,c.width+2*yt.noteMargin),l.startx=i+(s.width+yt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(l.width=o?x.getMax(yt.width,c.width+2*yt.noteMargin):x.getMax(s.width/2+r.width/2,c.width+2*yt.noteMargin),l.startx=i-l.width+(s.width-yt.actorMargin)/2):t.to===t.from?(c=L.calculateTextDimensions(o?L.wrapLabel(t.message,x.getMax(yt.width,s.width),Et(yt)):t.message,Et(yt)),l.width=o?x.getMax(yt.width,s.width):x.getMax(s.width,yt.width,c.width+2*yt.noteMargin),l.startx=i+(s.width-l.width)/2):(l.width=Math.abs(i+s.width/2-(n+r.width/2))+yt.actorMargin,l.startx=i<n?i+s.width/2-yt.actorMargin/2:n+r.width/2-yt.actorMargin/2),o&&(l.message=L.wrapLabel(t.message,l.width-2*yt.wrapPadding,Et(yt))),h.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l}),"buildNoteModel"),Bt=c((function(t,e,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,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(t.type))return{};const[s,r]=At(t.from,e),[i,n]=At(t.to,e),o=s<=i;let l=o?r:s,d=o?i:n;const h=Math.abs(i-n)>2,p=c((t=>o?-t:t),"adjustValue");t.from===t.to?d=l:(t.activate&&!h&&(d+=p(yt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=p(3)));const g=[s,r,i,n],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=L.wrapLabel(t.message,x.getMax(u+2*yt.wrapPadding,yt.width),Tt(yt)));const y=L.calculateTextDimensions(t.message,Tt(yt));return{width:x.getMax(t.wrap?0:y.width+2*yt.wrapPadding,u+2*yt.wrapPadding,yt.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}}),"buildMessageModel"),Yt=c((async function(t,e,a,s){const r={},i=[];let n,o,c;for(const l of t){switch(l.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:i.push({id:l.id,msg:l.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:l.message&&(n=i.pop(),r[n.id]=n,r[l.id]=n,i.push(n));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:n=i.pop(),r[n.id]=n;break;case s.db.LINETYPE.ACTIVE_START:{const t=e.get(l.from?l.from:l.to.actor),a=Nt(l.from?l.from:l.to.actor).length,s=t.x+t.width/2+(a-1)*yt.activationWidth/2,r={startx:s,stopx:s+yt.activationWidth,actor:l.from,enabled:!0};mt.activations.push(r)}break;case s.db.LINETYPE.ACTIVE_END:{const t=mt.activations.map((t=>t.actor)).lastIndexOf(l.from);mt.activations.splice(t,1).splice(0,1)}}void 0!==l.placement?(o=await Ct(l,e,s),l.noteModel=o,i.forEach((t=>{n=t,n.from=x.getMin(n.from,o.startx),n.to=x.getMax(n.to,o.startx+o.width),n.width=x.getMax(n.width,Math.abs(n.from-n.to))-yt.labelBoxWidth}))):(c=Bt(l,e,s),l.msgModel=c,c.startx&&c.stopx&&i.length>0&&i.forEach((t=>{if(n=t,c.startx===c.stopx){const t=e.get(l.from),a=e.get(l.to);n.from=x.getMin(t.x-c.width/2,t.x-t.width/2,n.from),n.to=x.getMax(a.x+c.width/2,a.x+t.width/2,n.to),n.width=x.getMax(n.width,Math.abs(n.to-n.from))-yt.labelBoxWidth}else n.from=x.getMin(c.startx,n.from),n.to=x.getMax(c.stopx,n.to),n.width=x.getMax(n.width,c.width)-yt.labelBoxWidth})))}return mt.activations=[],h.debug("Loop type widths:",r),r}),"calculateLoopBounds"),$t={bounds:mt,drawActors:Pt,drawActorsPopup:_t,setConf:vt,draw:Ot},Vt={parser:S,get db(){return new B},renderer:$t,styles:Y,init:c((t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,l({sequence:{wrap:t.wrap}}))}),"init")};export{Vt as diagram};