specv 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/client/assets/_basePickBy-CSIMrWn0.js +1 -0
  2. package/dist/client/assets/_baseUniq-DS9_HBMG.js +1 -0
  3. package/dist/client/assets/arc-DIZaMnM_.js +1 -0
  4. package/dist/client/assets/architecture-PBZL5I3N-D094VGdH.js +1 -0
  5. package/dist/client/assets/architectureDiagram-2XIMDMQ5-DKPA-V_Y.js +36 -0
  6. package/dist/client/assets/array-B57E4cSs.js +1 -0
  7. package/dist/client/assets/blockDiagram-WCTKOSBZ-8W_tqeZC.js +132 -0
  8. package/dist/client/assets/c4Diagram-IC4MRINW-CTK6yens.js +10 -0
  9. package/dist/client/assets/channel-C1flAtjp.js +1 -0
  10. package/dist/client/assets/chunk-4BX2VUAB-CcBYJeDb.js +1 -0
  11. package/dist/client/assets/chunk-55IACEB6-L9pTAbLx.js +1 -0
  12. package/dist/client/assets/chunk-7E7YKBS2-DrRJz76L.js +1 -0
  13. package/dist/client/assets/chunk-7R4GIKGN-BkJi0iaA.js +81 -0
  14. package/dist/client/assets/chunk-Bj-mKKzh.js +1 -0
  15. package/dist/client/assets/chunk-C72U2L5F-B3l1tjGH.js +1 -0
  16. package/dist/client/assets/chunk-EGIJ26TM-B_KFLtsH.js +1 -0
  17. package/dist/client/assets/{chunk-FMBD7UC4-DC2prbcd.js → chunk-FMBD7UC4-D9ESZW96.js} +2 -2
  18. package/dist/client/assets/chunk-GEFDOKGD-C6_ZIT2u.js +2 -0
  19. package/dist/client/assets/chunk-GLR3WWYH-CPjw0lCF.js +2 -0
  20. package/dist/client/assets/chunk-HHEYEP7N-Bbj7R61_.js +1 -0
  21. package/dist/client/assets/chunk-JSJVCQXG-BoOzhRR0.js +1 -0
  22. package/dist/client/assets/chunk-KX2RTZJC-CbfglzNG.js +1 -0
  23. package/dist/client/assets/chunk-KYZI473N-CE4wlLFN.js +53 -0
  24. package/dist/client/assets/chunk-L3YUKLVL-D-CZP06o.js +1 -0
  25. package/dist/client/assets/chunk-MX3YWQON-CLs1ee2z.js +1 -0
  26. package/dist/client/assets/chunk-NQ4KR5QH-BffWtcfU.js +220 -0
  27. package/dist/client/assets/chunk-O4XLMI2P-DQ4cyvVC.js +7 -0
  28. package/dist/client/assets/chunk-OZEHJAEY-BMIUrFJ-.js +1 -0
  29. package/dist/client/assets/chunk-PQ6SQG4A-BoL5dE49.js +1 -0
  30. package/dist/client/assets/chunk-PU5JKC2W-D-q6bk8q.js +70 -0
  31. package/dist/client/assets/chunk-QZHKN3VN-B0dTomYZ.js +1 -0
  32. package/dist/client/assets/chunk-R5LLSJPH-riaLdH7r.js +1 -0
  33. package/dist/client/assets/chunk-WL4C6EOR-C-Ox-NZw.js +189 -0
  34. package/dist/client/assets/chunk-XIRO2GV7-NA4IsotN.js +1 -0
  35. package/dist/client/assets/chunk-XPW4576I-BPiZrew2.js +32 -0
  36. package/dist/client/assets/chunk-XZSTWKYB-LC3hmT5H.js +94 -0
  37. package/dist/client/assets/chunk-YBOYWFTD-7L-eDyoW.js +1 -0
  38. package/dist/client/assets/classDiagram-VBA2DB6C-Br3HdLiq.js +1 -0
  39. package/dist/client/assets/classDiagram-v2-RAHNMMFH-DSpV_STv.js +1 -0
  40. package/dist/client/assets/clone-BLQRtvQt.js +1 -0
  41. package/dist/client/assets/cose-bilkent-S5V4N54A-C04j_G09.js +1 -0
  42. package/dist/client/assets/cytoscape.esm-CGHh3kiH.js +321 -0
  43. package/dist/client/assets/dagre-CLRc6Nwm.js +1 -0
  44. package/dist/client/assets/dagre-KLK3FWXG-DnwOWmc_.js +4 -0
  45. package/dist/client/assets/defaultLocale-6WHJ3B09.js +1 -0
  46. package/dist/client/assets/diagram-E7M64L7V-CsoHmk1p.js +24 -0
  47. package/dist/client/assets/diagram-IFDJBPK2-CbQmk5xs.js +43 -0
  48. package/dist/client/assets/diagram-P4PSJMXO-dyU-5Pol.js +24 -0
  49. package/dist/client/assets/dist-DR_E4Kst.js +1 -0
  50. package/dist/client/assets/erDiagram-INFDFZHY-CQsFj48p.js +70 -0
  51. package/dist/client/assets/flowDiagram-PKNHOUZH-Di01qXD0.js +162 -0
  52. package/dist/client/assets/ganttDiagram-A5KZAMGK-pHtqsNid.js +292 -0
  53. package/dist/client/assets/gitGraph-HDMCJU4V-DP_-MyCH.js +1 -0
  54. package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-CsQImbT2.js +65 -0
  55. package/dist/client/assets/graphlib-C9-5qMNz.js +1 -0
  56. package/dist/client/assets/index-BhGts6P8.js +214 -0
  57. package/dist/client/assets/index-Cv250fZW.css +1 -0
  58. package/dist/client/assets/info-3K5VOQVL-DQgtS_PZ.js +1 -0
  59. package/dist/client/assets/infoDiagram-LFFYTUFH-CM_MA-DH.js +2 -0
  60. package/dist/client/assets/init-DiYCGS1R.js +1 -0
  61. package/dist/client/assets/isArrayLikeObject-Dp4Ly64k.js +1 -0
  62. package/dist/client/assets/isEmpty-DYhMw56x.js +1 -0
  63. package/dist/client/assets/ishikawaDiagram-PHBUUO56-CEil6JbV.js +70 -0
  64. package/dist/client/assets/journeyDiagram-4ABVD52K-C8D5-7a4.js +139 -0
  65. package/dist/client/assets/kanban-definition-K7BYSVSG-D1Dy_-sr.js +89 -0
  66. package/dist/client/assets/katex-LQIUYz1j.js +261 -0
  67. package/dist/client/assets/line-CVr_gqHO.js +1 -0
  68. package/dist/client/assets/linear-UdA9xx6X.js +1 -0
  69. package/dist/client/assets/math-B1fAsS3f.js +1 -0
  70. package/dist/client/assets/mermaid-block-DNspBXsu.js +11 -0
  71. package/dist/client/assets/mermaid-parser.core-DfrzNpd8.js +4 -0
  72. package/dist/client/assets/mindmap-definition-YRQLILUH-DwQXndKv.js +68 -0
  73. package/dist/client/assets/ordinal-C1FS1Sfe.js +1 -0
  74. package/dist/client/assets/packet-RMMSAZCW-BeKH5fVO.js +1 -0
  75. package/dist/client/assets/path-DL_QDy2X.js +1 -0
  76. package/dist/client/assets/pie-UPGHQEXC-B5IHlfZ0.js +1 -0
  77. package/dist/client/assets/pieDiagram-SKSYHLDU-DgnZPwhp.js +30 -0
  78. package/dist/client/assets/quadrantDiagram-337W2JSQ-CuujoKYe.js +7 -0
  79. package/dist/client/assets/radar-KQ55EAFF-BSNKRbeO.js +1 -0
  80. package/dist/client/assets/requirementDiagram-Z7DCOOCP-a33F13MK.js +73 -0
  81. package/dist/client/assets/rough.esm-By2WpMXC.js +1 -0
  82. package/dist/client/assets/sankeyDiagram-WA2Y5GQK-BdzUYz9Y.js +10 -0
  83. package/dist/client/assets/sequenceDiagram-2WXFIKYE-BUDCDh5e.js +145 -0
  84. package/dist/client/assets/src-D9XCNmfv.js +1 -0
  85. package/dist/client/assets/stateDiagram-RAJIS63D-CWhysv8q.js +1 -0
  86. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-BiPShD7K.js +1 -0
  87. package/dist/client/assets/timeline-definition-YZTLITO2-Bvqbg0-L.js +61 -0
  88. package/dist/client/assets/treemap-KZPCXAKY-DKmbGZbe.js +1 -0
  89. package/dist/client/assets/vennDiagram-LZ73GAT5-BIaIoS9s.js +34 -0
  90. package/dist/client/assets/xychartDiagram-JWTSCODW-COZ4IKsP.js +7 -0
  91. package/dist/client/index.html +4 -2
  92. package/dist/server/cli.d.mts +9 -0
  93. package/dist/server/cli.mjs +401 -0
  94. package/package.json +24 -20
  95. package/dist/client/assets/_basePickBy-JgoM0ooD.js +0 -1
  96. package/dist/client/assets/_baseUniq-BPGBR6vF.js +0 -1
  97. package/dist/client/assets/arc-CThMKSs9.js +0 -1
  98. package/dist/client/assets/architectureDiagram-2XIMDMQ5-DzfSIOvN.js +0 -36
  99. package/dist/client/assets/blockDiagram-WCTKOSBZ-Ddzd1gw8.js +0 -132
  100. package/dist/client/assets/c4Diagram-IC4MRINW-BOFM2FDK.js +0 -10
  101. package/dist/client/assets/channel-YZBi4I_s.js +0 -1
  102. package/dist/client/assets/chunk-4BX2VUAB-DNvTbBhO.js +0 -1
  103. package/dist/client/assets/chunk-55IACEB6-VTl2c3uq.js +0 -1
  104. package/dist/client/assets/chunk-JSJVCQXG-D16D73pg.js +0 -1
  105. package/dist/client/assets/chunk-KX2RTZJC-lzCSppRt.js +0 -1
  106. package/dist/client/assets/chunk-NQ4KR5QH-Dm8-ZfYx.js +0 -220
  107. package/dist/client/assets/chunk-QZHKN3VN-BDJj6ch0.js +0 -1
  108. package/dist/client/assets/chunk-WL4C6EOR-DReLGTEp.js +0 -189
  109. package/dist/client/assets/classDiagram-VBA2DB6C-RXSC8Nxo.js +0 -1
  110. package/dist/client/assets/classDiagram-v2-RAHNMMFH-RXSC8Nxo.js +0 -1
  111. package/dist/client/assets/clone-BfeBigwB.js +0 -1
  112. package/dist/client/assets/cose-bilkent-S5V4N54A-Bg_dM5Mk.js +0 -1
  113. package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +0 -321
  114. package/dist/client/assets/dagre-KLK3FWXG-CA61AJEd.js +0 -4
  115. package/dist/client/assets/defaultLocale-DX6XiGOO.js +0 -1
  116. package/dist/client/assets/diagram-E7M64L7V-C7Myv_34.js +0 -24
  117. package/dist/client/assets/diagram-IFDJBPK2-ClQH9Fha.js +0 -43
  118. package/dist/client/assets/diagram-P4PSJMXO-BsO56LP5.js +0 -24
  119. package/dist/client/assets/erDiagram-INFDFZHY-69ePyd9U.js +0 -70
  120. package/dist/client/assets/flowDiagram-PKNHOUZH-DW5jwimt.js +0 -162
  121. package/dist/client/assets/ganttDiagram-A5KZAMGK-DRkHzN-i.js +0 -292
  122. package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-CnMPsV7V.js +0 -65
  123. package/dist/client/assets/graph-DL9a2Eq1.js +0 -1
  124. package/dist/client/assets/index-CstOaARo.js +0 -367
  125. package/dist/client/assets/index-J2bJsGXA.css +0 -1
  126. package/dist/client/assets/infoDiagram-LFFYTUFH-BsvQO7qE.js +0 -2
  127. package/dist/client/assets/init-Gi6I4Gst.js +0 -1
  128. package/dist/client/assets/ishikawaDiagram-PHBUUO56-Bj1kH8Tq.js +0 -70
  129. package/dist/client/assets/journeyDiagram-4ABVD52K-DN8A8Si0.js +0 -139
  130. package/dist/client/assets/kanban-definition-K7BYSVSG-DHRhIZtq.js +0 -89
  131. package/dist/client/assets/layout-CW2ZoTQx.js +0 -1
  132. package/dist/client/assets/linear-BMTURWKv.js +0 -1
  133. package/dist/client/assets/mermaid-block-mMz1yMUG.js +0 -249
  134. package/dist/client/assets/mindmap-definition-YRQLILUH-uZjEvns8.js +0 -68
  135. package/dist/client/assets/ordinal-Cboi1Yqb.js +0 -1
  136. package/dist/client/assets/pieDiagram-SKSYHLDU-AMNdAR9s.js +0 -30
  137. package/dist/client/assets/quadrantDiagram-337W2JSQ-DP5gFZrq.js +0 -7
  138. package/dist/client/assets/requirementDiagram-Z7DCOOCP-DAfejtVK.js +0 -73
  139. package/dist/client/assets/sankeyDiagram-WA2Y5GQK-DDS6vee1.js +0 -10
  140. package/dist/client/assets/sequenceDiagram-2WXFIKYE-CryP14Kv.js +0 -145
  141. package/dist/client/assets/stateDiagram-RAJIS63D-dHRtI695.js +0 -1
  142. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-B9qPhCGr.js +0 -1
  143. package/dist/client/assets/timeline-definition-YZTLITO2-DW-uUIsR.js +0 -61
  144. package/dist/client/assets/treemap-KZPCXAKY-BSGDMBBN.js +0 -162
  145. package/dist/client/assets/vennDiagram-LZ73GAT5-zBQsJgKs.js +0 -34
  146. package/dist/client/assets/xychartDiagram-JWTSCODW-CrR0K61K.js +0 -7
  147. package/dist/server/cli.d.ts +0 -9
  148. package/dist/server/cli.js +0 -509
@@ -0,0 +1,132 @@
1
+ import{T as e,c as t,h as n,i as r}from"./chunk-GEFDOKGD-C6_ZIT2u.js";import{t as i}from"./clone-BLQRtvQt.js";import{t as a}from"./graphlib-C9-5qMNz.js";import{g as o,h as s,p as c}from"./src-D9XCNmfv.js";import{D as l,L as u,a as d,b as f,c as p,nt as m,s as h,w as g,y as _}from"./chunk-7R4GIKGN-BkJi0iaA.js";import{t as v}from"./channel-C1flAtjp.js";import{t as y}from"./line-CVr_gqHO.js";import"./dist-DR_E4Kst.js";import{n as b}from"./chunk-PU5JKC2W-D-q6bk8q.js";import{t as x}from"./chunk-FMBD7UC4-D9ESZW96.js";import{n as S,t as C}from"./chunk-MX3YWQON-CLs1ee2z.js";import{n as w,t as T}from"./chunk-YBOYWFTD-7L-eDyoW.js";var E=(function(){var e=s(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],a=[1,19],o=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:s(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:s(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]);this.$={id:r.generateId(),type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let n=r.edgeStrToEdgeData(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,directions:a[s].directions,arrowTypeEnd:n,arrowTypeStart:`arrow_open`},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]),this.$={id:r.generateId(),type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:a,39:o,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:s(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:s(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}s(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}s(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:s(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:s(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:s(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:s(function(e){var t=e.length,n=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 r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:s(function(){return this._more=!0,this},`more`),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:s(function(e){this.unput(this.match.slice(e))},`less`),pastInput:s(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:s(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:s(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:s(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:s(function(){return this.next()||this.lex()},`lex`),begin:s(function(e){this.conditionStack.push(e)},`begin`),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:s(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:s(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:s(function(e){this.begin(e)},`pushState`),stateStackSize:s(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:s(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return s(v,`Parser`),v.prototype=_,_.Parser=v,new v})();E.parser=E;var D=E,O=new Map,k=[],A=new Map,j=`color`,M=`fill`,ee=`bgFill`,te=`,`,ne=f(),N=new Map,re=s(e=>h.sanitizeText(e,ne),`sanitizeText`),ie=s(function(e,t=``){let n=N.get(e);n||(n={id:e,styles:[],textStyles:[]},N.set(e,n)),t?.split(te).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(j).exec(e)){let e=t.replace(M,ee).replace(j,M);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),ae=s(function(e,t=``){let n=O.get(e);t!=null&&(n.styles=t.split(te))},`addStyle2Node`),oe=s(function(e,t){e.split(`,`).forEach(function(e){let n=O.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},O.set(t,n)}n.classes||=[],n.classes.push(t)})},`setCssClass`),se=s((e,t)=>{let n=e.flat(),r=[],a=n.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of n){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&o.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=re(e.label),e.type===`classDef`){ie(e.id,e.css);continue}if(e.type===`applyClass`){oe(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&ae(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(A.get(e.id)??0)+1;A.set(e.id,t),e.id=t+`-`+e.id,k.push(e)}else{e.label||(e.type===`composite`?e.label=``:e.label=e.id);let t=O.get(e.id);if(t===void 0?O.set(e.id,e):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&se(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n<t;n++){let t=i(e);t.id=t.id+`-`+n,O.set(t.id,t),r.push(t)}}else t===void 0&&r.push(e)}}t.children=r},`populateBlockDatabase`),P=[],F={id:`root`,type:`composite`,children:[],columns:-1},ce=s(()=>{o.debug(`Clear called`),d(),F={id:`root`,type:`composite`,children:[],columns:-1},O=new Map([[`root`,F]]),P=[],N=new Map,k=[],A=new Map},`clear`);function le(e){switch(o.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return o.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}s(le,`typeStr2Type`);function ue(e){switch(o.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}s(ue,`edgeTypeStr2Type`);function de(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,``)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}s(de,`edgeStrToEdgeData`);var fe=0,pe={getConfig:s(()=>_().block,`getConfig`),typeStr2Type:le,edgeTypeStr2Type:ue,edgeStrToEdgeData:de,getLogger:s(()=>o,`getLogger`),getBlocksFlat:s(()=>[...O.values()],`getBlocksFlat`),getBlocks:s(()=>P||[],`getBlocks`),getEdges:s(()=>k,`getEdges`),setHierarchy:s(e=>{F.children=e,se(e,F),P=F.children},`setHierarchy`),getBlock:s(e=>O.get(e),`getBlock`),setBlock:s(e=>{O.set(e.id,e)},`setBlock`),getColumns:s(e=>{let t=O.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:s(function(){return N},`getClasses`),clear:ce,generateId:s(()=>(fe++,`id-`+Math.random().toString(36).substr(2,12)+`-`+fe),`generateId`)},I=s((e,t)=>{let n=v;return m(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),me=s(e=>`.label {
7
+ font-family: ${e.fontFamily};
8
+ color: ${e.nodeTextColor||e.textColor};
9
+ }
10
+ .cluster-label text {
11
+ fill: ${e.titleColor};
12
+ }
13
+ .cluster-label span,p {
14
+ color: ${e.titleColor};
15
+ }
16
+
17
+
18
+
19
+ .label text,span,p {
20
+ fill: ${e.nodeTextColor||e.textColor};
21
+ color: ${e.nodeTextColor||e.textColor};
22
+ }
23
+
24
+ .node rect,
25
+ .node circle,
26
+ .node ellipse,
27
+ .node polygon,
28
+ .node path {
29
+ fill: ${e.mainBkg};
30
+ stroke: ${e.nodeBorder};
31
+ stroke-width: 1px;
32
+ }
33
+ .flowchart-label text {
34
+ text-anchor: middle;
35
+ }
36
+ // .flowchart-label .text-outer-tspan {
37
+ // text-anchor: middle;
38
+ // }
39
+ // .flowchart-label .text-inner-tspan {
40
+ // text-anchor: start;
41
+ // }
42
+
43
+ .node .label {
44
+ text-align: center;
45
+ }
46
+ .node.clickable {
47
+ cursor: pointer;
48
+ }
49
+
50
+ .arrowheadPath {
51
+ fill: ${e.arrowheadColor};
52
+ }
53
+
54
+ .edgePath .path {
55
+ stroke: ${e.lineColor};
56
+ stroke-width: 2.0px;
57
+ }
58
+
59
+ .flowchart-link {
60
+ stroke: ${e.lineColor};
61
+ fill: none;
62
+ }
63
+
64
+ .edgeLabel {
65
+ background-color: ${e.edgeLabelBackground};
66
+ /*
67
+ * This is for backward compatibility with existing code that didn't
68
+ * add a \`<p>\` around edge labels.
69
+ *
70
+ * TODO: We should probably remove this in a future release.
71
+ */
72
+ p {
73
+ margin: 0;
74
+ padding: 0;
75
+ display: inline;
76
+ }
77
+ rect {
78
+ opacity: 0.5;
79
+ background-color: ${e.edgeLabelBackground};
80
+ fill: ${e.edgeLabelBackground};
81
+ }
82
+ text-align: center;
83
+ }
84
+
85
+ /* For html labels only */
86
+ .labelBkg {
87
+ background-color: ${e.edgeLabelBackground};
88
+ }
89
+
90
+ .node .cluster {
91
+ // fill: ${I(e.mainBkg,.5)};
92
+ fill: ${I(e.clusterBkg,.5)};
93
+ stroke: ${I(e.clusterBorder,.2)};
94
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
95
+ stroke-width: 1px;
96
+ }
97
+
98
+ .cluster text {
99
+ fill: ${e.titleColor};
100
+ }
101
+
102
+ .cluster span,p {
103
+ color: ${e.titleColor};
104
+ }
105
+ /* .cluster div {
106
+ color: ${e.titleColor};
107
+ } */
108
+
109
+ div.mermaidTooltip {
110
+ position: absolute;
111
+ text-align: center;
112
+ max-width: 200px;
113
+ padding: 2px;
114
+ font-family: ${e.fontFamily};
115
+ font-size: 12px;
116
+ background: ${e.tertiaryColor};
117
+ border: 1px solid ${e.border2};
118
+ border-radius: 2px;
119
+ pointer-events: none;
120
+ z-index: 100;
121
+ }
122
+
123
+ .flowchartTitleText {
124
+ text-anchor: middle;
125
+ font-size: 18px;
126
+ fill: ${e.textColor};
127
+ }
128
+ ${x()}
129
+ `,`getStyles`),he=s((e,t,n,r)=>{t.forEach(t=>{ge[t](e,n,r)})},`insertMarkers`),ge={extension:s((e,t,n)=>{o.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`)},`extension`),composition:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).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`)},`dependency`),lollipop:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6)},`lollipop`),point:s((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,6).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`point`),circle:s((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`circle`),cross:s((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`)},`cross`),barb:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`)},_e=he,L=f()?.block?.padding??8;function R(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}s(R,`calculateBlockPosition`);var ve=s(e=>{let t=0,n=0;for(let r of e.children){let{width:e,height:i,x:a,y:s}=r.size??{width:0,height:0,x:0,y:0};o.debug(`getMaxChildSize abc95 child:`,r.id,`width:`,e,`height:`,i,`x:`,a,`y:`,s,r.type),r.type!==`space`&&(e>t&&(t=e/(r.widthInColumns??1)),i>n&&(n=i))}return{width:t,height:n}},`getMaxChildSize`);function z(e,t,n=0,r=0){o.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,n),e?.size?.width||(e.size={width:n,height:r,x:0,y:0});let i=0,a=0;if(e.children?.length>0){for(let n of e.children)z(n,t);let s=ve(e);i=s.width,a=s.height,o.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,i,a);for(let t of e.children)t.size&&(o.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${i} ${a} ${JSON.stringify(t.size)}`),t.size.width=i*(t.widthInColumns??1)+L*((t.widthInColumns??1)-1),t.size.height=a,t.size.x=0,t.size.y=0,o.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${i} maxHeight:${a}`));for(let n of e.children)z(n,t,i,a);let c=e.columns??-1,l=0;for(let t of e.children)l+=t.widthInColumns??1;let u=e.children.length;c>0&&c<l&&(u=c);let d=Math.ceil(l/u),f=u*(i+L)+L,p=d*(a+L)+L;if(f<n){o.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`),f=n,p=r;let t=(n-u*L-L)/u,s=(r-d*L-L)/d;o.debug(`Size indata abc88`,e.id,`childWidth`,t,`maxWidth`,i),o.debug(`Size indata abc88`,e.id,`childHeight`,s,`maxHeight`,a),o.debug(`Size indata abc88 xSize`,u,`padding`,L);for(let n of e.children)n.size&&(n.size.width=t,n.size.height=s,n.size.x=0,n.size.y=0)}if(o.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${d} columns ${c}${e.children.length} width=${Math.max(f,e.size?.width||0)}`),f<(e?.size?.width||0)){f=e?.size?.width||0;let t=c>0?Math.min(e.children.length,c):e.children.length;if(t>0){let n=(f-t*L-L)/t;o.debug(`abc95 (growing to fit) width`,e.id,f,e.size?.width,n);for(let t of e.children)t.size&&(t.size.width=n)}}e.size={width:f,height:p,x:0,y:0}}o.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}s(z,`setBlockSizes`);function ye(e,t){o.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let n=e.columns??-1;if(o.debug(`layoutBlocks columns abc95`,e.id,`=>`,n,e),e.children&&e.children.length>0){let r=e?.children[0]?.size?.width??0,i=e.children.length*r+(e.children.length-1)*L;o.debug(`widthOfChildren 88`,i,`posX`);let a=new Map;{let t=0;for(let r of e.children){if(!r.size)continue;let{py:e}=R(n,t),i=a.get(e)??0;r.size.height>i&&a.set(e,r.size.height);let o=r?.widthInColumns??1;n>0&&(o=Math.min(o,n-t%n)),t+=o}}let s=new Map;{let e=0,t=[...a.keys()].sort((e,t)=>e-t);for(let n of t)s.set(n,e),e+=(a.get(n)??0)+L}let c=0;o.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-L,u=0;for(let r of e.children){let i=e;if(!r.size)continue;let{width:d,height:f}=r.size,{px:p,py:m}=R(n,c);if(m!=u&&(u=m,l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-L,o.debug(`New row in layout for block`,e.id,` and child `,r.id,u)),o.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${c} (px, py) ${p},${m} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${d}${L}`),i.size){let e=d/2;r.size.x=l+L+e,o.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${l} new startingPosX${r.size.x} ${e} padding=${L} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d*(r?.widthInColumns??1)/2}`),l=r.size.x+e;let t=s.get(m)??0,n=a.get(m)??f;r.size.y=i.size.y-i.size.height/2+t+n/2+L,o.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${l}${L}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d*(r?.widthInColumns??1)/2}`)}r.children&&ye(r,t);let h=r?.widthInColumns??1;n>0&&(h=Math.min(h,n-c%n)),c+=h,o.debug(`abc88 columnsPos`,r,c)}}o.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}s(ye,`layoutBlocks`);function be(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2<t&&(t=a-s/2),o-c/2<n&&(n=o-c/2),a+s/2>r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=be(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}s(be,`findBounds`);function xe(e){let t=e.getBlock(`root`);if(!t)return;z(t,e,0,0),ye(t,e),o.debug(`getBlocks`,JSON.stringify(t,null,2));let{minX:n,minY:r,maxX:i,maxY:a}=be(t),s=a-r;return{x:n,y:r,width:i-n,height:s}}s(xe,`layout`);var B=s(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=f(),s=g(o);return await b(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),Se=s((e,t,n,r,i)=>{t.arrowTypeStart&&we(e,`start`,t.arrowTypeStart,n,r,i),t.arrowTypeEnd&&we(e,`end`,t.arrowTypeEnd,n,r,i)},`addEdgeMarkers`),Ce={arrow_cross:`cross`,arrow_point:`point`,arrow_barb:`barb`,arrow_circle:`circle`,aggregation:`aggregation`,extension:`extension`,composition:`composition`,dependency:`dependency`,lollipop:`lollipop`},we=s((e,t,n,r,i,a)=>{let s=Ce[n];if(!s){o.warn(`Unknown arrow type: ${n}`);return}let c=t===`start`?`Start`:`End`;e.attr(`marker-${t}`,`url(${r}#${i}_${a}-${s}${c})`)},`addEdgeMarker`),V={},H={},Te=s(async(e,t)=>{let n=f(),r=g(n),i=e.insert(`g`).attr(`class`,`edgeLabel`),a=i.insert(`g`).attr(`class`,`label`),o=t.labelType===`markdown`,s=await b(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:o,isNode:!1,markdown:o,width:o?void 0:1/0},n);a.node().appendChild(s);let l=s.getBBox(),u=l;if(r){let e=s.children[0],t=c(s);l=e.getBoundingClientRect(),u=l,t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=c(s).select(`text`).node();e&&typeof e.getBBox==`function`&&(u=e.getBBox())}a.attr(`transform`,C(u,r)),V[t.id]=i,t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await B(i,t.startLabelLeft,t.labelStyle);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=c(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),H[t.id]||(H[t.id]={}),H[t.id].startLeft=n,U(d,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await B(n,t.startLabelRight,t.labelStyle);d=a,i.node().appendChild(a);let o=a.getBBox();if(r){let e=a.children[0],t=c(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),H[t.id]||(H[t.id]={}),H[t.id].startRight=n,U(d,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await B(i,t.endLabelLeft,t.labelStyle);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=c(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),n.node().appendChild(a),H[t.id]||(H[t.id]={}),H[t.id].endLeft=n,U(d,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await B(i,t.endLabelRight,t.labelStyle);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=c(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),n.node().appendChild(a),H[t.id]||(H[t.id]={}),H[t.id].endRight=n,U(d,t.endLabelRight)}return s},`insertEdgeLabel`);function U(e,t){g(f())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}s(U,`setTerminalWidth`);var Ee=s((e,t)=>{o.debug(`Moving label abc88 `,e.id,e.label,V[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:i}=w(f());if(e.label){let a=V[e.id],s=e.x,c=e.y;if(r){let i=n.calcLabelPosition(r);o.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,i.x,`,`,i.y,`) abc88`),t.updatedPath&&(s=i.x,c=i.y)}a.attr(`transform`,`translate(${s}, ${c+i/2})`)}if(e.startLabelLeft){let t=H[e.id].startLeft,i=e.x,a=e.y;if(r){let t=n.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);i=t.x,a=t.y}t.attr(`transform`,`translate(${i}, ${a})`)}if(e.startLabelRight){let t=H[e.id].startRight,i=e.x,a=e.y;if(r){let t=n.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);i=t.x,a=t.y}t.attr(`transform`,`translate(${i}, ${a})`)}if(e.endLabelLeft){let t=H[e.id].endLeft,i=e.x,a=e.y;if(r){let t=n.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);i=t.x,a=t.y}t.attr(`transform`,`translate(${i}, ${a})`)}if(e.endLabelRight){let t=H[e.id].endRight,i=e.x,a=e.y;if(r){let t=n.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);i=t.x,a=t.y}t.attr(`transform`,`translate(${i}, ${a})`)}},`positionEdgeLabel`),De=s((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),Oe=s((e,t,n)=>{o.debug(`intersection calc abc89:
130
+ outsidePoint: ${JSON.stringify(t)}
131
+ insidePoint : ${JSON.stringify(n)}
132
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),s=e.width/2,c=n.x<t.x?s-a:s+a,l=e.height/2,u=Math.abs(t.y-n.y),d=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*s>Math.abs(r-t.x)*l){let e=n.y<t.y?t.y-l-i:i-l-t.y;c=d*e/u;let r={x:n.x<t.x?n.x+c:n.x-d+c,y:n.y<t.y?n.y+u-e:n.y-u+e};return c===0&&(r.x=t.x,r.y=t.y),d===0&&(r.x=t.x),u===0&&(r.y=t.y),o.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`,r),r}else{c=n.x<t.x?t.x-s-r:r-s-t.x;let e=u*c/d,i=n.x<t.x?n.x+d-c:n.x-d+c,a=n.y<t.y?n.y+e:n.y-e;return o.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`,{_x:i,_y:a}),c===0&&(i=t.x,a=t.y),d===0&&(i=t.x),u===0&&(a=t.y),{x:i,y:a}}},`intersection`),ke=s((e,t)=>{o.debug(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(!De(t,e)&&!i){let a=Oe(t,r,e),o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)||n.push(a),i=!0}else r=e,i||n.push(e)}),n},`cutPathAtIntersect`),Ae=s(function(t,n,r,i,a,s,c){let u=r.points;o.debug(`abc88 InsertEdge: edge=`,r,`e=`,n);let d=!1,p=s.node(n.v);var m=s.node(n.w);m?.intersect&&p?.intersect&&(u=u.slice(1,r.points.length-1),u.unshift(p.intersect(u[0])),u.push(m.intersect(u[u.length-1]))),r.toCluster&&(o.debug(`to cluster abc88`,i[r.toCluster]),u=ke(r.points,i[r.toCluster].node),d=!0),r.fromCluster&&(o.debug(`from cluster abc88`,i[r.fromCluster]),u=ke(u.reverse(),i[r.fromCluster].node).reverse(),d=!0);let h=u.filter(e=>!Number.isNaN(e.y)),g=e;r.curve&&(a===`graph`||a===`flowchart`)&&(g=r.curve);let{x:_,y:v}=S(r),b=y().x(_).y(v).curve(g),x;switch(r.thickness){case`normal`:x=`edge-thickness-normal`;break;case`thick`:x=`edge-thickness-thick`;break;case`invisible`:x=`edge-thickness-thick`;break;default:x=``}switch(r.pattern){case`solid`:x+=` edge-pattern-solid`;break;case`dotted`:x+=` edge-pattern-dotted`;break;case`dashed`:x+=` edge-pattern-dashed`;break}let C=t.append(`path`).attr(`d`,b(h)).attr(`id`,r.id).attr(`class`,` `+x+(r.classes?` `+r.classes:``)).attr(`style`,r.style),w=``;(f().flowchart.arrowMarkerAbsolute||f().state.arrowMarkerAbsolute)&&(w=l(!0)),Se(C,r,w,c,a);let T={};return d&&(T.updatedPath=u),T.originalPath=r.points,T},`insertEdge`),je=s(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),Me=s((e,t,n)=>{let r=je(e),i=t.height+2*n.padding,a=i/2,o=t.width+2*a+n.padding,s=n.padding/2;return r.has(`right`)&&r.has(`left`)&&r.has(`up`)&&r.has(`down`)?[{x:0,y:0},{x:a,y:0},{x:o/2,y:2*s},{x:o-a,y:0},{x:o,y:0},{x:o,y:-i/3},{x:o+2*s,y:-i/2},{x:o,y:-2*i/3},{x:o,y:-i},{x:o-a,y:-i},{x:o/2,y:-i-2*s},{x:a,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*s,y:-i/2},{x:0,y:-i/3}]:r.has(`right`)&&r.has(`left`)&&r.has(`up`)?[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}]:r.has(`right`)&&r.has(`left`)&&r.has(`down`)?[{x:0,y:0},{x:a,y:-i},{x:o-a,y:-i},{x:o,y:0}]:r.has(`right`)&&r.has(`up`)&&r.has(`down`)?[{x:0,y:0},{x:o,y:-a},{x:o,y:-i+a},{x:0,y:-i}]:r.has(`left`)&&r.has(`up`)&&r.has(`down`)?[{x:o,y:0},{x:0,y:-a},{x:0,y:-i+a},{x:o,y:-i}]:r.has(`right`)&&r.has(`left`)?[{x:a,y:0},{x:a,y:-s},{x:o-a,y:-s},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:o-a,y:-i+s},{x:a,y:-i+s},{x:a,y:-i},{x:0,y:-i/2}]:r.has(`up`)&&r.has(`down`)?[{x:o/2,y:0},{x:0,y:-s},{x:a,y:-s},{x:a,y:-i+s},{x:0,y:-i+s},{x:o/2,y:-i},{x:o,y:-i+s},{x:o-a,y:-i+s},{x:o-a,y:-s},{x:o,y:-s}]:r.has(`right`)&&r.has(`up`)?[{x:0,y:0},{x:o,y:-a},{x:0,y:-i}]:r.has(`right`)&&r.has(`down`)?[{x:0,y:0},{x:o,y:0},{x:0,y:-i}]:r.has(`left`)&&r.has(`up`)?[{x:o,y:0},{x:0,y:-a},{x:o,y:-i}]:r.has(`left`)&&r.has(`down`)?[{x:o,y:0},{x:0,y:0},{x:o,y:-i}]:r.has(`right`)?[{x:a,y:-s},{x:a,y:-s},{x:o-a,y:-s},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:o-a,y:-i+s},{x:a,y:-i+s},{x:a,y:-i+s}]:r.has(`left`)?[{x:a,y:0},{x:a,y:-s},{x:o-a,y:-s},{x:o-a,y:-i+s},{x:a,y:-i+s},{x:a,y:-i},{x:0,y:-i/2}]:r.has(`up`)?[{x:a,y:-s},{x:a,y:-i+s},{x:0,y:-i+s},{x:o/2,y:-i},{x:o,y:-i+s},{x:o-a,y:-i+s},{x:o-a,y:-s}]:r.has(`down`)?[{x:o/2,y:0},{x:0,y:-s},{x:a,y:-s},{x:a,y:-i+s},{x:o-a,y:-i+s},{x:o-a,y:-s},{x:o,y:-s}]:[{x:0,y:0}]},`getArrowPoints`);function Ne(e,t){return e.intersect(t)}s(Ne,`intersectNode`);var Pe=Ne;function Fe(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}s(Fe,`intersectEllipse`);var Ie=Fe;function Le(e,t,n){return Ie(e,t,t,n)}s(Le,`intersectCircle`);var Re=Le;function ze(e,t,n,r){var i=t.y-e.y,a,o=e.x-t.x,s,c=t.x*e.y-e.x*t.y,l,u,d,f=i*n.x+o*n.y+c,p=i*r.x+o*r.y+c,m,h,g,_,v;if(!(f!==0&&p!==0&&W(f,p))&&(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*e.x+s*e.y+l,d=a*t.x+s*t.y+l,!(u!==0&&d!==0&&W(u,d))&&(m=i*s-a*o,m!==0)))return h=Math.abs(m/2),g=o*l-s*c,_=g<0?(g-h)/m:(g+h)/m,g=a*c-i*l,v=g<0?(g-h)/m:(g+h)/m,{x:_,y:v}}s(ze,`intersectLine`);function W(e,t){return e*t>0}s(W,`sameSign`);var Be=ze,Ve=He;function He(e,t,n){var r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));for(var c=r-e.width/2-o,l=i-e.height/2-s,u=0;u<t.length;u++){var d=t[u],f=t[u<t.length-1?u+1:0],p=Be(e,n,{x:c+d.x,y:l+d.y},{x:c+f.x,y:l+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(e,t){var r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}s(He,`intersectPolygon`);var G={node:Pe,circle:Re,ellipse:Ie,polygon:Ve,rect:s((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`)},K=s(async(e,t,n,i)=>{let a=f(),o,s=t.useHtmlLabels||g(a);o=n||`node default`;let l=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),d=l.insert(`g`).attr(`class`,`label`).attr(`style`,t.labelStyle),p;p=t.labelText===void 0?``:typeof t.labelText==`string`?t.labelText:t.labelText[0];let m;m=t.labelType===`markdown`?b(d,u(r(p),a),{useHtmlLabels:s,width:t.width||a.flowchart.wrappingWidth,classes:`markdown-node-label`},a):await B(d,u(r(p),a),t.labelStyle,!1,i);let h=m.getBBox(),_=t.padding/2;if(g(a)){let e=m.children[0],t=c(m);await T(e,p),h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}return s?d.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):d.attr(`transform`,`translate(0, `+-h.height/2+`)`),t.centerLabel&&d.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),d.insert(`rect`,`:first-child`),{shapeSvg:l,bbox:h,halfPadding:_,label:d}},`labelHelper`),q=s((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`);function J(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}s(J,`insertPolygonShape`);var Ue=s(async(e,t)=>{t.useHtmlLabels||g(f())||(t.centerLabel=!0);let{shapeSvg:n,bbox:r,halfPadding:i}=await K(e,t,`node `+t.classes,!0);o.info(`Classes = `,t.classes);let a=n.insert(`rect`,`:first-child`);return a.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,-r.width/2-i).attr(`y`,-r.height/2-i).attr(`width`,r.width+t.padding).attr(`height`,r.height+t.padding),q(t,a),t.intersect=function(e){return G.rect(t,e)},n},`note`),We=s(e=>e?` `+e:``,`formatClass`),Y=s((e,t)=>`${t||`node default`}${We(e.classes)} ${We(e.class)}`,`getClassesFromNode`),Ge=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding+(r.height+t.padding),a=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];o.info(`Question main (Circle)`);let s=J(n,i,i,a);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return o.warn(`Intersect called`),G.polygon(t,a,e)},n},`question`),Ke=s((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id);return n.insert(`polygon`,`:first-child`).attr(`points`,[{x:0,y:28/2},{x:28/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}].map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`state-start`).attr(`r`,7).attr(`width`,28).attr(`height`,28),t.width=28,t.height=28,t.intersect=function(e){return G.circle(t,14,e)},n},`choice`),qe=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.height+t.padding,a=i/4,o=r.width+2*a+t.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],c=J(n,o,i,s);return c.attr(`style`,t.style),q(t,c),t.intersect=function(e){return G.polygon(t,s,e)},n},`hexagon`),Je=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,void 0,!0),i=r.height+2*t.padding,a=i/2,o=r.width+2*a+t.padding,s=Me(t.directions,r,t),c=J(n,o,i,s);return c.attr(`style`,t.style),q(t,c),t.intersect=function(e){return G.polygon(t,s,e)},n},`block_arrow`),Ye=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return J(n,i,a,o).attr(`style`,t.style),t.width=i+a,t.height=a,t.intersect=function(e){return G.polygon(t,o,e)},n},`rect_left_inv_arrow`),Xe=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`lean_right`),Ze=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`lean_left`),Qe=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`trapezoid`),$e=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`inv_trapezoid`),et=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`rect_right_inv_arrow`),tt=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=i/2,o=a/(2.5+i/50),s=r.height+o+t.padding,c=`M 0,`+o+` a `+a+`,`+o+` 0,0,0 `+i+` 0 a `+a+`,`+o+` 0,0,0 `+-i+` 0 l 0,`+s+` a `+a+`,`+o+` 0,0,0 `+i+` 0 l 0,`+-s;return q(t,n.attr(`label-offset-y`,o).insert(`path`,`:first-child`).attr(`style`,t.style).attr(`d`,c).attr(`transform`,`translate(`+-i/2+`,`+-(s/2+o)+`)`)),t.intersect=function(e){let n=G.rect(t,e),r=n.x-t.x;if(a!=0&&(Math.abs(r)<t.width/2||Math.abs(r)==t.width/2&&Math.abs(n.y-t.y)>t.height/2-o)){let i=o*o*(1-r*r/(a*a));i!=0&&(i=Math.sqrt(i)),i=o-i,e.y-t.y>0&&(i=-i),n.y+=i}return n},n},`cylinder`),nt=s(async(e,t)=>{let{shapeSvg:n,bbox:r,halfPadding:i}=await K(e,t,`node `+t.classes+` `+t.class,!0),a=n.insert(`rect`,`:first-child`),s=t.positioned?t.width:r.width+t.padding,c=t.positioned?t.height:r.height+t.padding,l=t.positioned?-s/2:-r.width/2-i,u=t.positioned?-c/2:-r.height/2-i;if(a.attr(`class`,`basic label-container`).attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(X(a,t.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{o.warn(`Unknown node property ${e}`)})}return q(t,a),t.intersect=function(e){return G.rect(t,e)},n},`rect`),rt=s(async(e,t)=>{let{shapeSvg:n,bbox:r,halfPadding:i}=await K(e,t,`node `+t.classes,!0),a=n.insert(`rect`,`:first-child`),s=t.positioned?t.width:r.width+t.padding,c=t.positioned?t.height:r.height+t.padding,l=t.positioned?-s/2:-r.width/2-i,u=t.positioned?-c/2:-r.height/2-i;if(a.attr(`class`,`basic cluster composite label-container`).attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(X(a,t.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{o.warn(`Unknown node property ${e}`)})}return q(t,a),t.intersect=function(e){return G.rect(t,e)},n},`composite`),it=s(async(e,t)=>{let{shapeSvg:n}=await K(e,t,`label`,!0);o.trace(`Classes = `,t.class);let r=n.insert(`rect`,`:first-child`);if(r.attr(`width`,0).attr(`height`,0),n.attr(`class`,`label edgeLabel`),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(X(r,t.props.borders,0,0),e.delete(`borders`)),e.forEach(e=>{o.warn(`Unknown node property ${e}`)})}return q(t,r),t.intersect=function(e){return G.rect(t,e)},n},`labelRect`);function X(e,t,n,r){let i=[],a=s(e=>{i.push(e,0)},`addBorder`),c=s(e=>{i.push(0,e)},`skipBorder`);t.includes(`t`)?(o.debug(`add top border`),a(n)):c(n),t.includes(`r`)?(o.debug(`add right border`),a(r)):c(r),t.includes(`b`)?(o.debug(`add bottom border`),a(n)):c(n),t.includes(`l`)?(o.debug(`add left border`),a(r)):c(r),e.attr(`stroke-dasharray`,i.join(` `))}s(X,`applyNodePropertyBorders`);var at=s(async(e,t)=>{let n;n=t.classes?`node `+t.classes:`node default`;let r=e.insert(`g`).attr(`class`,n).attr(`id`,t.domId||t.id),i=r.insert(`rect`,`:first-child`),a=r.insert(`line`),s=r.insert(`g`).attr(`class`,`label`),l=t.labelText.flat?t.labelText.flat():t.labelText,u=``;u=typeof l==`object`?l[0]:l,o.info(`Label text abc79`,u,l,typeof l==`object`);let d=await B(s,u,t.labelStyle,!0,!0),p={width:0,height:0};if(g(f())){let e=d.children[0],t=c(d);p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}o.info(`Text 2`,l);let m=l.slice(1,l.length),h=d.getBBox(),_=await B(s,m.join?m.join(`<br/>`):m,t.labelStyle,!0,!0);if(g(f())){let e=_.children[0],t=c(_);p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}let v=t.padding/2;return c(_).attr(`transform`,`translate( `+(p.width>h.width?0:(h.width-p.width)/2)+`, `+(h.height+v+5)+`)`),c(d).attr(`transform`,`translate( `+(p.width<h.width?0:-(h.width-p.width)/2)+`, 0)`),p=s.node().getBBox(),s.attr(`transform`,`translate(`+-p.width/2+`, `+(-p.height/2-v+3)+`)`),i.attr(`class`,`outer title-state`).attr(`x`,-p.width/2-v).attr(`y`,-p.height/2-v).attr(`width`,p.width+t.padding).attr(`height`,p.height+t.padding),a.attr(`class`,`divider`).attr(`x1`,-p.width/2-v).attr(`x2`,p.width/2+v).attr(`y1`,-p.height/2-v+h.height+v).attr(`y2`,-p.height/2-v+h.height+v),q(t,i),t.intersect=function(e){return G.rect(t,e)},r},`rectWithTitle`),ot=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.height+t.padding,a=r.width+i/4+t.padding;return q(t,n.insert(`rect`,`:first-child`).attr(`style`,t.style).attr(`rx`,i/2).attr(`ry`,i/2).attr(`x`,-a/2).attr(`y`,-i/2).attr(`width`,a).attr(`height`,i)),t.intersect=function(e){return G.rect(t,e)},n},`stadium`),st=s(async(e,t)=>{let{shapeSvg:n,bbox:r,halfPadding:i}=await K(e,t,Y(t,void 0),!0),a=n.insert(`circle`,`:first-child`);return a.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,r.width/2+i).attr(`width`,r.width+t.padding).attr(`height`,r.height+t.padding),o.info(`Circle main`),q(t,a),t.intersect=function(e){return o.info(`Circle intersect`,t,r.width/2+i,e),G.circle(t,r.width/2+i,e)},n},`circle`),ct=s(async(e,t)=>{let{shapeSvg:n,bbox:r,halfPadding:i}=await K(e,t,Y(t,void 0),!0),a=n.insert(`g`,`:first-child`),s=a.insert(`circle`),c=a.insert(`circle`);return a.attr(`class`,t.class),s.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,r.width/2+i+5).attr(`width`,r.width+t.padding+10).attr(`height`,r.height+t.padding+10),c.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,r.width/2+i).attr(`width`,r.width+t.padding).attr(`height`,r.height+t.padding),o.info(`DoubleCircle main`),q(t,s),t.intersect=function(e){return o.info(`DoubleCircle intersect`,t,r.width/2+i+5,e),G.circle(t,r.width/2+i+5,e)},n},`doublecircle`),lt=s(async(e,t)=>{let{shapeSvg:n,bbox:r}=await K(e,t,Y(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=J(n,i,a,o);return s.attr(`style`,t.style),q(t,s),t.intersect=function(e){return G.polygon(t,o,e)},n},`subroutine`),ut=s((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`);return r.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),q(t,r),t.intersect=function(e){return G.circle(t,7,e)},n},`start`),dt=s((e,t,n)=>{let r=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),i=70,a=10;return n===`LR`&&(i=10,a=70),q(t,r.append(`rect`).attr(`x`,-1*i/2).attr(`y`,-1*a/2).attr(`width`,i).attr(`height`,a).attr(`class`,`fork-join`)),t.height+=t.padding/2,t.width+=t.padding/2,t.intersect=function(e){return G.rect(t,e)},r},`forkJoin`),ft={rhombus:Ge,composite:rt,question:Ge,rect:nt,labelRect:it,rectWithTitle:at,choice:Ke,circle:st,doublecircle:ct,stadium:ot,hexagon:qe,block_arrow:Je,rect_left_inv_arrow:Ye,lean_right:Xe,lean_left:Ze,trapezoid:Qe,inv_trapezoid:$e,rect_right_inv_arrow:et,cylinder:tt,start:ut,end:s((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`),i=n.insert(`circle`,`:first-child`);return i.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),r.attr(`class`,`state-end`).attr(`r`,5).attr(`width`,10).attr(`height`,10),q(t,i),t.intersect=function(e){return G.circle(t,7,e)},n},`end`),note:Ue,subroutine:lt,fork:dt,join:dt,class_box:s(async(e,t)=>{let n=t.padding/2,r;r=t.classes?`node `+t.classes:`node default`;let i=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),a=i.insert(`rect`,`:first-child`),o=i.insert(`line`),s=i.insert(`line`),l=0,u=4,d=i.insert(`g`).attr(`class`,`label`),p=0,m=t.classData.annotations?.[0],h=await B(d,t.classData.annotations[0]?`«`+t.classData.annotations[0]+`»`:``,t.labelStyle,!0,!0),_=h.getBBox();if(g(f())){let e=h.children[0],t=c(h);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}t.classData.annotations[0]&&(u+=_.height+4,l+=_.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==``&&(g(f())?v+=`&lt;`+t.classData.type+`&gt;`:v+=`<`+t.classData.type+`>`);let y=await B(d,v,t.labelStyle,!0,!0);c(y).attr(`class`,`classTitle`);let b=y.getBBox();if(g(f())){let e=y.children[0],t=c(y);b=e.getBoundingClientRect(),t.attr(`width`,b.width),t.attr(`height`,b.height)}u+=b.height+4,b.width>l&&(l=b.width);let x=[];t.classData.members.forEach(async e=>{let n=e.getDisplayDetails(),r=n.displayText;g(f())&&(r=r.replace(/</g,`&lt;`).replace(/>/g,`&gt;`));let i=await B(d,r,n.cssStyle?n.cssStyle:t.labelStyle,!0,!0),a=i.getBBox();if(g(f())){let e=i.children[0],t=c(i);a=e.getBoundingClientRect(),t.attr(`width`,a.width),t.attr(`height`,a.height)}a.width>l&&(l=a.width),u+=a.height+4,x.push(i)}),u+=8;let S=[];if(t.classData.methods.forEach(async e=>{let n=e.getDisplayDetails(),r=n.displayText;g(f())&&(r=r.replace(/</g,`&lt;`).replace(/>/g,`&gt;`));let i=await B(d,r,n.cssStyle?n.cssStyle:t.labelStyle,!0,!0),a=i.getBBox();if(g(f())){let e=i.children[0],t=c(i);a=e.getBoundingClientRect(),t.attr(`width`,a.width),t.attr(`height`,a.height)}a.width>l&&(l=a.width),u+=a.height+4,S.push(i)}),u+=8,m){let e=(l-_.width)/2;c(h).attr(`transform`,`translate( `+(-1*l/2+e)+`, `+-1*u/2+`)`),p=_.height+4}let C=(l-b.width)/2;return c(y).attr(`transform`,`translate( `+(-1*l/2+C)+`, `+(-1*u/2+p)+`)`),p+=b.height+4,o.attr(`class`,`divider`).attr(`x1`,-l/2-n).attr(`x2`,l/2+n).attr(`y1`,-u/2-n+8+p).attr(`y2`,-u/2-n+8+p),p+=8,x.forEach(e=>{c(e).attr(`transform`,`translate( `+-l/2+`, `+(-1*u/2+p+8/2)+`)`);let t=e?.getBBox();p+=(t?.height??0)+4}),p+=8,s.attr(`class`,`divider`).attr(`x1`,-l/2-n).attr(`x2`,l/2+n).attr(`y1`,-u/2-n+8+p).attr(`y2`,-u/2-n+8+p),p+=8,S.forEach(e=>{c(e).attr(`transform`,`translate( `+-l/2+`, `+(-1*u/2+p)+`)`);let t=e?.getBBox();p+=(t?.height??0)+4}),a.attr(`style`,t.style).attr(`class`,`outer title-state`).attr(`x`,-l/2-n).attr(`y`,-(u/2)-n).attr(`width`,l+t.padding).attr(`height`,u+t.padding),q(t,a),t.intersect=function(e){return G.rect(t,e)},i},`class_box`)},Z={},pt=s(async(e,t,n)=>{let r,i;if(t.link){let a;f().securityLevel===`sandbox`?a=`_top`:t.linkTarget&&(a=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,a),i=await ft[t.shape](r,t,n)}else i=await ft[t.shape](e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),t.class&&i.attr(`class`,`node default `+t.class),Z[t.id]=r,t.haveCallback&&Z[t.id].attr(`class`,Z[t.id].attr(`class`)+` clickable`),r},`insertNode`),mt=s(e=>{let t=Z[e.id];o.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`);function Q(e,n,r=!1){let i=e,a=`default`;(i?.classes?.length||0)>0&&(a=(i?.classes??[]).join(` `)),a+=` flowchart-label`;let o=0,s=``,c;switch(i.type){case`round`:o=5,s=`rect`;break;case`composite`:o=0,s=`composite`,c=0;break;case`square`:s=`rect`;break;case`diamond`:s=`question`;break;case`hexagon`:s=`hexagon`;break;case`block_arrow`:s=`block_arrow`;break;case`odd`:s=`rect_left_inv_arrow`;break;case`lean_right`:s=`lean_right`;break;case`lean_left`:s=`lean_left`;break;case`trapezoid`:s=`trapezoid`;break;case`inv_trapezoid`:s=`inv_trapezoid`;break;case`rect_left_inv_arrow`:s=`rect_left_inv_arrow`;break;case`circle`:s=`circle`;break;case`ellipse`:s=`ellipse`;break;case`stadium`:s=`stadium`;break;case`subroutine`:s=`subroutine`;break;case`cylinder`:s=`cylinder`;break;case`group`:s=`rect`;break;case`doublecircle`:s=`doublecircle`;break;default:s=`rect`}let l=t(i?.styles??[]),u=i.label,d=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:o,ry:o,class:a,style:l.style,id:i.id,directions:i.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:r,intersect:void 0,type:i.type,padding:c??_()?.block?.padding??0}}s(Q,`getNodeFromBlock`);async function ht(e,t,n){let r=Q(t,n,!1);if(r.type===`group`)return;let i=await pt(e,r,{config:_()}),a=i.node().getBBox(),o=n.getBlock(r.id);o.size={width:a.width,height:a.height,x:0,y:0,node:i},n.setBlock(o),i.remove()}s(ht,`calculateBlockSize`);async function gt(e,t,n){let r=Q(t,n,!0);n.getBlock(r.id).type!==`space`&&(await pt(e,r,{config:_()}),t.intersect=r?.intersect,mt(r))}s(gt,`insertBlockPositioned`);async function $(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await $(e,i.children,n,r)}s($,`performOperations`);async function _t(e,t,n){await $(e,t,n,ht)}s(_t,`calculateBlockSizes`);async function vt(e,t,n){await $(e,t,n,gt)}s(vt,`insertBlocks`);async function yt(e,t,n,r,i){let o=new a({multigraph:!0,compound:!0});o.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),a=r.getBlock(n.end);if(t?.size&&a?.size){let r=t.size,s=a.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}];Ae(e,{v:n.start,w:n.end,name:n.id},{...n,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:`edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1`},void 0,`block`,o,i),n.label&&(await Te(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:`edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1`}),Ee({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}s(yt,`insertEdges`);var bt={parser:D,db:pe,renderer:{draw:s(async function(e,t,n,r){let{securityLevel:i,block:a}=_(),s=r.db,l;i===`sandbox`&&(l=c(`#i`+t));let u=c(i===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=i===`sandbox`?u.select(`[id="${t}"]`):c(`[id="${t}"]`);_e(d,[`point`,`circle`,`cross`],r.type,t);let f=s.getBlocks(),m=s.getBlocksFlat(),h=s.getEdges(),g=d.insert(`g`).attr(`class`,`block`);await _t(g,f,s);let v=xe(s);if(await vt(g,f,s),await yt(g,h,m,s,t),v){let e=v,t=Math.max(1,Math.round(.125*(e.width/e.height))),n=e.height+t+10,r=e.width+10,{useMaxWidth:i}=a;p(d,n,r,!!i),o.debug(`Here Bounds`,v,e),d.attr(`viewBox`,`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}},`draw`),getClasses:s(function(e,t){return t.db.getClasses()},`getClasses`)},styles:me};export{bt as diagram};
@@ -0,0 +1,10 @@
1
+ import{g as e,n as t,t as n}from"./chunk-GEFDOKGD-C6_ZIT2u.js";import{g as r,h as i,p as a}from"./src-D9XCNmfv.js";import{B as o,L as s,V as l,_ as u,b as d,c as f,r as p,s as m,v as h}from"./chunk-7R4GIKGN-BkJi0iaA.js";import{t as g}from"./dist-DR_E4Kst.js";import{a as _,s as v}from"./chunk-JSJVCQXG-BoOzhRR0.js";var y=g(),b=(function(){var e=i(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],r=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],ee=[1,58],te=[1,59],ne=[1,60],re=[14,42],ie=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ae=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],U=[1,82],W=[1,83],G=[1,84],K=[1,85],q=[12,14,42],oe=[12,14,33,42],se=[12,14,33,42,76,77,79,80],ce=[12,33],le=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J={trace:i(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:i(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:r,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:70,19:20,20:21,21:22,22:t,23:n,24:r,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:71,19:20,20:21,21:22,22:t,23:n,24:r,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:72,19:20,20:21,21:22,22:t,23:n,24:r,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:73,19:20,20:21,21:22,22:t,23:n,24:r,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{14:[1,74]},e(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne}),e(re,[2,14]),e(ie,[2,16],{12:[1,76]}),e(re,[2,36],{12:[1,77]}),e(ae,[2,19]),e(ae,[2,20]),{25:[1,78]},{27:[1,79]},e(ae,[2,23]),{35:80,75:81,76:U,77:W,79:G,80:K},{35:86,75:81,76:U,77:W,79:G,80:K},{35:87,75:81,76:U,77:W,79:G,80:K},{35:88,75:81,76:U,77:W,79:G,80:K},{35:89,75:81,76:U,77:W,79:G,80:K},{35:90,75:81,76:U,77:W,79:G,80:K},{35:91,75:81,76:U,77:W,79:G,80:K},{35:92,75:81,76:U,77:W,79:G,80:K},{35:93,75:81,76:U,77:W,79:G,80:K},{35:94,75:81,76:U,77:W,79:G,80:K},{35:95,75:81,76:U,77:W,79:G,80:K},{35:96,75:81,76:U,77:W,79:G,80:K},{35:97,75:81,76:U,77:W,79:G,80:K},{35:98,75:81,76:U,77:W,79:G,80:K},{35:99,75:81,76:U,77:W,79:G,80:K},{35:100,75:81,76:U,77:W,79:G,80:K},{35:101,75:81,76:U,77:W,79:G,80:K},{35:102,75:81,76:U,77:W,79:G,80:K},{35:103,75:81,76:U,77:W,79:G,80:K},{35:104,75:81,76:U,77:W,79:G,80:K},e(q,[2,59]),{35:105,75:81,76:U,77:W,79:G,80:K},{35:106,75:81,76:U,77:W,79:G,80:K},{35:107,75:81,76:U,77:W,79:G,80:K},{35:108,75:81,76:U,77:W,79:G,80:K},{35:109,75:81,76:U,77:W,79:G,80:K},{35:110,75:81,76:U,77:W,79:G,80:K},{35:111,75:81,76:U,77:W,79:G,80:K},{35:112,75:81,76:U,77:W,79:G,80:K},{35:113,75:81,76:U,77:W,79:G,80:K},{35:114,75:81,76:U,77:W,79:G,80:K},{35:115,75:81,76:U,77:W,79:G,80:K},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{12:[1,118],33:[1,117]},{35:119,75:81,76:U,77:W,79:G,80:K},{35:120,75:81,76:U,77:W,79:G,80:K},{35:121,75:81,76:U,77:W,79:G,80:K},{35:122,75:81,76:U,77:W,79:G,80:K},{35:123,75:81,76:U,77:W,79:G,80:K},{35:124,75:81,76:U,77:W,79:G,80:K},{35:125,75:81,76:U,77:W,79:G,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(re,[2,15]),e(ie,[2,17],{21:22,19:130,22:t,23:n,24:r,26:a,28:o}),e(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:r,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne}),e(ae,[2,21]),e(ae,[2,22]),e(q,[2,39]),e(oe,[2,71],{75:81,35:132,76:U,77:W,79:G,80:K}),e(se,[2,73]),{78:[1,133]},e(se,[2,75]),e(se,[2,76]),e(q,[2,40]),e(q,[2,41]),e(q,[2,42]),e(q,[2,43]),e(q,[2,44]),e(q,[2,45]),e(q,[2,46]),e(q,[2,47]),e(q,[2,48]),e(q,[2,49]),e(q,[2,50]),e(q,[2,51]),e(q,[2,52]),e(q,[2,53]),e(q,[2,54]),e(q,[2,55]),e(q,[2,56]),e(q,[2,57]),e(q,[2,58]),e(q,[2,60]),e(q,[2,61]),e(q,[2,62]),e(q,[2,63]),e(q,[2,64]),e(q,[2,65]),e(q,[2,66]),e(q,[2,67]),e(q,[2,68]),e(q,[2,69]),e(q,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ce,[2,28]),e(ce,[2,29]),e(ce,[2,30]),e(ce,[2,31]),e(ce,[2,32]),e(ce,[2,33]),e(ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ie,[2,18]),e(re,[2,38]),e(oe,[2,72]),e(se,[2,74]),e(q,[2,24]),e(q,[2,35]),e(le,[2,25]),e(le,[2,26],{12:[1,138]}),e(le,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:i(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:i(function(e){var t=this,n=[0],r=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,a.length-=e,o.length-=e}i(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}i(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
2
+ `+g.showPosition()+`
3
+ Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),a.push(g.yytext),o.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};J.lexer=(function(){return{EOF:1,parseError:i(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`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,n=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 r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:i(function(){return this._more=!0,this},`more`),reject:i(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less: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=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:i(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:i(function(){return this.next()||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),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:i(function(e){this.begin(e)},`pushState`),stateStackSize:i(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:i(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin(`acc_title`),24;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),26;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin(`person_ext`),45;case 23:return this.begin(`person`),44;case 24:return this.begin(`system_ext_queue`),51;case 25:return this.begin(`system_ext_db`),50;case 26:return this.begin(`system_ext`),49;case 27:return this.begin(`system_queue`),48;case 28:return this.begin(`system_db`),47;case 29:return this.begin(`system`),46;case 30:return this.begin(`boundary`),37;case 31:return this.begin(`enterprise_boundary`),34;case 32:return this.begin(`system_boundary`),36;case 33:return this.begin(`container_ext_queue`),57;case 34:return this.begin(`container_ext_db`),56;case 35:return this.begin(`container_ext`),55;case 36:return this.begin(`container_queue`),54;case 37:return this.begin(`container_db`),53;case 38:return this.begin(`container`),52;case 39:return this.begin(`container_boundary`),38;case 40:return this.begin(`component_ext_queue`),63;case 41:return this.begin(`component_ext_db`),62;case 42:return this.begin(`component_ext`),61;case 43:return this.begin(`component_queue`),60;case 44:return this.begin(`component_db`),59;case 45:return this.begin(`component`),58;case 46:return this.begin(`node`),39;case 47:return this.begin(`node`),39;case 48:return this.begin(`node_l`),40;case 49:return this.begin(`node_r`),41;case 50:return this.begin(`rel`),64;case 51:return this.begin(`birel`),65;case 52:return this.begin(`rel_u`),66;case 53:return this.begin(`rel_u`),66;case 54:return this.begin(`rel_d`),67;case 55:return this.begin(`rel_d`),67;case 56:return this.begin(`rel_l`),68;case 57:return this.begin(`rel_l`),68;case 58:return this.begin(`rel_r`),69;case 59:return this.begin(`rel_r`),69;case 60:return this.begin(`rel_b`),70;case 61:return this.begin(`rel_index`),71;case 62:return this.begin(`update_el_style`),72;case 63:return this.begin(`update_rel_style`),73;case 64:return this.begin(`update_layout_config`),74;case 65:return`EOF_IN_STRUCT`;case 66:return this.begin(`attribute`),`ATTRIBUTE_EMPTY`;case 67:this.begin(`attribute`);break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin(`string`);break;case 73:this.popState();break;case 74:return`STR`;case 75:this.begin(`string_kv`);break;case 76:return this.begin(`string_kv_key`),`STR_KEY`;case 77:this.popState(),this.begin(`string_kv_value`);break;case 78:return`STR_VALUE`;case 79:this.popState(),this.popState();break;case 80:return`STR`;case 81:return`LBRACE`;case 82:return`RBRACE`;case 83:return`SPACE`;case 84:return`EOL`;case 85:return 14}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,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,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}})();function ue(){this.yy={}}return i(ue,`Parser`),ue.prototype=J,J.Parser=ue,new ue})();b.parser=b;var x=b,S=[],C=[``],w=`global`,T=``,E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],D=[],O=``,k=!1,A=4,j=2,M,N=i(function(){return M},`getC4Type`),P=i(function(e){M=s(e,d())},`setC4Type`),F=i(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=D.find(e=>e.from===t&&e.to===n);if(d?u=d:D.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]={text:t}}else u.techn={text:i};if(a==null)u.descr={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]={text:t}}else u.descr={text:a};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];u[e]=t}else u.sprite=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];u[e]=t}else u.tags=s;if(typeof l==`object`){let[e,t]=Object.entries(l)[0];u[e]=t}else u.link=l;u.wrap=J()},`addRel`),I=i(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=S.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,S.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]={text:t}}else s.descr={text:r};if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.sprite=i;if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=t}else s.tags=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=t}else s.link=o;s.typeC4Shape={text:e},s.parentBoundary=w,s.wrap=J()},`addPersonOrSystem`),L=i(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addContainer`),R=i(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addComponent`),z=i(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addPersonOrSystemBoundary`),B=i(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addContainerBoundary`),V=i(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=E.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,E.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.type={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.nodeType=e,l.parentBoundary=w,l.wrap=J(),T=w,w=t,C.push(T)},`addDeploymentNode`),H=i(function(){w=T,C.pop(),T=C.pop(),C.push(T)},`popBoundaryParseStack`),ee=i(function(e,t,n,r,i,a,o,s,l,u,d){let f=S.find(e=>e.alias===t);if(!(f===void 0&&(f=E.find(e=>e.alias===t),f===void 0))){if(n!=null)if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n;if(r!=null)if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r;if(i!=null)if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i;if(a!=null)if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a;if(o!=null)if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o;if(s!=null)if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s;if(l!=null)if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l;if(u!=null)if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u;if(d!=null)if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}},`updateElStyle`),te=i(function(e,t,n,r,i,a,o){let s=D.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null)if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r;if(i!=null)if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i;if(a!=null)if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a);if(o!=null)if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}},`updateRelStyle`),ne=i(function(e,t,n){let r=A,i=j;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(A=r),i>=1&&(j=i)},`updateLayoutConfig`),re=i(function(){return A},`getC4ShapeInRow`),ie=i(function(){return j},`getC4BoundaryInRow`),ae=i(function(){return w},`getCurrentBoundaryParse`),U=i(function(){return T},`getParentBoundaryParse`),W=i(function(e){return e==null?S:S.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),G=i(function(e){return S.find(t=>t.alias===e)},`getC4Shape`),K=i(function(e){return Object.keys(W(e))},`getC4ShapeKeys`),q=i(function(e){return e==null?E:E.filter(t=>t.parentBoundary===e)},`getBoundaries`),oe=q,se=i(function(){return D},`getRels`),ce=i(function(){return O},`getTitle`),le=i(function(e){k=e},`setWrap`),J=i(function(){return k},`autoWrap`),ue={addPersonOrSystem:I,addPersonOrSystemBoundary:z,addContainer:L,addContainerBoundary:B,addComponent:R,addDeploymentNode:V,popBoundaryParseStack:H,addRel:F,updateElStyle:ee,updateRelStyle:te,updateLayoutConfig:ne,autoWrap:J,setWrap:le,getC4ShapeArray:W,getC4Shape:G,getC4ShapeKeys:K,getBoundaries:q,getBoundarys:oe,getCurrentBoundaryParse:ae,getParentBoundaryParse:U,getRels:se,getTitle:ce,getC4Type:N,getC4ShapeInRow:re,getC4BoundaryInRow:ie,setAccTitle:l,getAccTitle:h,getAccDescription:u,setAccDescription:o,getConfig:i(()=>d().c4,`getConfig`),clear:i(function(){S=[],E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],T=``,w=`global`,C=[``],D=[],C=[``],O=``,k=!1,A=4,j=2},`clear`),LINETYPE:{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},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:i(function(e){O=s(e,d())},`setTitle`),setC4Type:P},de=i(function(e,t){return _(e,t)},`drawRect`),fe=i(function(e,t,n,r,i,a){let o=e.append(`image`);o.attr(`width`,t),o.attr(`height`,n),o.attr(`x`,r),o.attr(`y`,i);let s=a.startsWith(`data:image/png;base64`)?a:(0,y.sanitizeUrl)(a);o.attr(`xlink:href`,s)},`drawImage`),pe=i((e,t,n)=>{let r=e.append(`g`),i=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,a=e.lineColor?e.lineColor:`#444444`,o=e.offsetX?parseInt(e.offsetX):0,s=e.offsetY?parseInt(e.offsetY):0;if(i===0){let t=r.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,a),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#arrowend)`),i=-1}else{let t=r.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,a).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#arrowend)`)}let l=n.messageFont();Y(n)(e.label.text,r,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+o,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+s,e.label.width,e.label.height,{fill:t},l),e.techn&&e.techn.text!==``&&(l=n.messageFont(),Y(n)(`[`+e.techn.text+`]`,r,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+o,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+s,Math.max(e.label.width,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},l))}},`drawRels`),me=i(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),de(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,Y(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,Y(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,Y(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),he=i(function(e,t,n){let r=t.bgColor?t.bgColor:n[t.typeC4Shape.text+`_bg_color`],i=t.borderColor?t.borderColor:n[t.typeC4Shape.text+`_border_color`],a=t.fontColor?t.fontColor:`#FFFFFF`,o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;switch(t.typeC4Shape.text){case`person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;break;case`external_person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=`;break}let s=e.append(`g`);s.attr(`class`,`person-man`);let l=v();switch(t.typeC4Shape.text){case`person`:case`external_person`:case`system`:case`external_system`:case`container`:case`external_container`:case`component`:case`external_component`:l.x=t.x,l.y=t.y,l.fill=r,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},de(s,l);break;case`system_db`:case`external_system_db`:case`container_db`:case`external_container_db`:case`component_db`:case`external_component_db`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2).replaceAll(`height`,t.height)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2));break;case`system_queue`:case`external_system_queue`:case`container_queue`:case`external_container_queue`:case`component_queue`:case`external_component_queue`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`width`,t.width).replaceAll(`half`,t.height/2)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half`.replaceAll(`startx`,t.x+t.width).replaceAll(`starty`,t.y).replaceAll(`half`,t.height/2));break}let u=we(n,t.typeC4Shape.text);switch(s.append(`text`).attr(`fill`,a).attr(`font-family`,u.fontFamily).attr(`font-size`,u.fontSize-2).attr(`font-style`,`italic`).attr(`lengthAdjust`,`spacing`).attr(`textLength`,t.typeC4Shape.width).attr(`x`,t.x+t.width/2-t.typeC4Shape.width/2).attr(`y`,t.y+t.typeC4Shape.Y).text(`<<`+t.typeC4Shape.text+`>>`),t.typeC4Shape.text){case`person`:case`external_person`:fe(s,48,48,t.x+t.width/2-24,t.y+t.image.Y,o);break}let d=n[t.typeC4Shape.text+`Font`]();return d.fontWeight=`bold`,d.fontSize+=2,d.fontColor=a,Y(n)(t.label.text,s,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=n[t.typeC4Shape.text+`Font`](),d.fontColor=a,t.techn&&t.techn?.text!==``?Y(n)(t.techn.text,s,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":`italic`},d):t.type&&t.type.text!==``&&Y(n)(t.type.text,s,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":`italic`},d),t.descr&&t.descr.text!==``&&(d=n.personFont(),d.fontColor=a,Y(n)(t.descr.text,s,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},`drawC4Shape`),ge=i(function(e){e.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`),_e=i(function(e){e.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`),ve=i(function(e){e.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`),ye=i(function(e){e.append(`defs`).append(`marker`).attr(`id`,`arrowhead`).attr(`refX`,9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`)},`insertArrowHead`),be=i(function(e){e.append(`defs`).append(`marker`).attr(`id`,`arrowend`).attr(`refX`,1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`)},`insertArrowEnd`),xe=i(function(e){e.append(`defs`).append(`marker`).attr(`id`,`filled-head`).attr(`refX`,18).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`),Se=i(function(e){e.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)},`insertDynamicNumber`),Ce=i(function(e){let t=e.append(`defs`).append(`marker`).attr(`id`,`crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);t.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),t.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),we=i((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`getC4ShapeFont`),Y=(function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`text-anchor`,`middle`).text(e),s)}i(e,`byText`);function t(e,t,n,i,a,o,s,l){let{fontSize:u,fontFamily:d,fontWeight:f}=l,p=e.split(m.lineBreakRegex);for(let e=0;e<p.length;e++){let o=e*u-u*(p.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,i).style(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).style(`font-size`,u).style(`font-weight`,f).style(`font-family`,d);l.append(`tspan`).attr(`dy`,o).text(p[e]).attr(`alignment-baseline`,`mathematical`),r(l,s)}}i(t,`byTspan`);function n(e,n,i,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,i,a,o,s,l,u),r(f,l)}i(n,`byFo`);function r(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return i(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),X={drawRect:de,drawBoundary:me,drawC4Shape:he,drawRels:pe,drawImage:fe,insertArrowHead:ye,insertArrowEnd:be,insertArrowFilledHead:xe,insertDynamicNumber:Se,insertArrowCrossHead:Ce,insertDatabaseIcon:ge,insertComputerIcon:_e,insertClockIcon:ve},Te=0,Ee=0,De=4,Oe=2;b.yy=ue;var Z={},ke=class{static{i(this,`Bounds`)}constructor(e){this.name=``,this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Ae(e.db.getConfig())}setData(e,t,n,r){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=t+e.width,r=this.nextData.starty+e.margin*2,i=r+e.height;(t>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>De)&&(t=this.nextData.startx+e.margin+Z.nextLinePaddingX,r=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+e.height,this.nextData.cnt=1),e.x=t,e.y=r,this.updateVal(this.data,`startx`,t,Math.min),this.updateVal(this.data,`starty`,r,Math.min),this.updateVal(this.data,`stopx`,n,Math.max),this.updateVal(this.data,`stopy`,i,Math.max),this.updateVal(this.nextData,`startx`,t,Math.min),this.updateVal(this.nextData,`starty`,r,Math.min),this.updateVal(this.nextData,`stopx`,n,Math.max),this.updateVal(this.nextData,`stopy`,i,Math.max)}init(e){this.name=``,this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Ae(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},Ae=i(function(e){p(Z,e),e.fontFamily&&(Z.personFontFamily=Z.systemFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.personFontSize=Z.systemFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.personFontWeight=Z.systemFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),je=i((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`c4ShapeFont`),Me=i(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),Ne=i(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`);function Q(r,i,a,o,s){if(!i[r].width)if(a)i[r].text=e(i[r].text,s,o),i[r].textLines=i[r].text.split(m.lineBreakRegex).length,i[r].width=s,i[r].height=n(i[r].text,o);else{let e=i[r].text.split(m.lineBreakRegex);i[r].textLines=e.length;let a=0;i[r].height=0,i[r].width=0;for(let s of e)i[r].width=Math.max(t(s,o),i[r].width),a=n(s,o),i[r].height=i[r].height+a}}i(Q,`calcC4ShapeTextWH`);var Pe=i(function(e,n,r){n.x=r.data.startx,n.y=r.data.starty,n.width=r.data.stopx-r.data.startx,n.height=r.data.stopy-r.data.starty,n.label.y=Z.c4ShapeMargin-35;let i=n.wrap&&Z.wrap,a=Me(Z);a.fontSize+=2,a.fontWeight=`bold`,Q(`label`,n,i,a,t(n.label.text,a)),X.drawBoundary(e,n,Z)},`drawBoundary`),Fe=i(function(e,n,r,i){let a=0;for(let o of i){a=0;let i=r[o],s=je(Z,i.typeC4Shape.text);switch(s.fontSize-=2,i.typeC4Shape.width=t(`«`+i.typeC4Shape.text+`»`,s),i.typeC4Shape.height=s.fontSize+2,i.typeC4Shape.Y=Z.c4ShapePadding,a=i.typeC4Shape.Y+i.typeC4Shape.height-4,i.image={width:0,height:0,Y:0},i.typeC4Shape.text){case`person`:case`external_person`:i.image.width=48,i.image.height=48,i.image.Y=a,a=i.image.Y+i.image.height;break}i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=a,a=i.image.Y+i.image.height);let l=i.wrap&&Z.wrap,u=Z.width-Z.c4ShapePadding*2,d=je(Z,i.typeC4Shape.text);d.fontSize+=2,d.fontWeight=`bold`,Q(`label`,i,l,d,u),i.label.Y=a+8,a=i.label.Y+i.label.height,i.type&&i.type.text!==``?(i.type.text=`[`+i.type.text+`]`,Q(`type`,i,l,je(Z,i.typeC4Shape.text),u),i.type.Y=a+5,a=i.type.Y+i.type.height):i.techn&&i.techn.text!==``&&(i.techn.text=`[`+i.techn.text+`]`,Q(`techn`,i,l,je(Z,i.techn.text),u),i.techn.Y=a+5,a=i.techn.Y+i.techn.height);let f=a,p=i.label.width;i.descr&&i.descr.text!==``&&(Q(`descr`,i,l,je(Z,i.typeC4Shape.text),u),i.descr.Y=a+20,a=i.descr.Y+i.descr.height,p=Math.max(i.label.width,i.descr.width),f=a-i.descr.textLines*5),p+=Z.c4ShapePadding,i.width=Math.max(i.width||Z.width,p,Z.width),i.height=Math.max(i.height||Z.height,f,Z.height),i.margin=i.margin||Z.c4ShapeMargin,e.insert(i),X.drawC4Shape(n,i,Z)}e.bumpLastMargin(Z.c4ShapeMargin)},`drawC4ShapeArray`),$=class{static{i(this,`Point`)}constructor(e,t){this.x=e,this.y=t}},Ie=i(function(e,t){let n=e.x,r=e.y,i=t.x,a=t.y,o=n+e.width/2,s=r+e.height/2,l=Math.abs(n-i),u=Math.abs(r-a),d=u/l,f=e.height/e.width,p=null;return r==a&&n<i?p=new $(n+e.width,s):r==a&&n>i?p=new $(n,s):n==i&&r<a?p=new $(o,r+e.height):n==i&&r>a&&(p=new $(o,r)),n>i&&r<a?p=f>=d?new $(n,s+d*e.width/2):new $(o-l/u*e.height/2,r+e.height):n<i&&r<a?p=f>=d?new $(n+e.width,s+d*e.width/2):new $(o+l/u*e.height/2,r+e.height):n<i&&r>a?p=f>=d?new $(n+e.width,s-d*e.width/2):new $(o+e.height/2*l/u,r):n>i&&r>a&&(p=f>=d?new $(n,s-e.width/2*d):new $(o-e.height/2*l/u,r)),p},`getIntersectPoint`),Le=i(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=Ie(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:Ie(t,n)}},`getIntersectPoints`),Re=i(function(e,n,r,i){let a=0;for(let e of n){a+=1;let n=e.wrap&&Z.wrap,o=Ne(Z);i.db.getC4Type()===`C4Dynamic`&&(e.label.text=a+`: `+e.label.text);let s=t(e.label.text,o);Q(`label`,e,n,o,s),e.techn&&e.techn.text!==``&&(s=t(e.techn.text,o),Q(`techn`,e,n,o,s)),e.descr&&e.descr.text!==``&&(s=t(e.descr.text,o),Q(`descr`,e,n,o,s));let l=Le(r(e.from),r(e.to));e.startPoint=l.startPoint,e.endPoint=l.endPoint}X.drawRels(e,n,Z)},`drawRels`);function ze(e,t,n,r,i){let a=new ke(i);a.data.widthLimit=n.data.widthLimit/Math.min(Oe,r.length);for(let[o,s]of r.entries()){let r=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=r,r=s.image.Y+s.image.height);let l=s.wrap&&Z.wrap,u=Me(Z);if(u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,s,l,u,a.data.widthLimit),s.label.Y=r+8,r=s.label.Y+s.label.height,s.type&&s.type.text!==``&&(s.type.text=`[`+s.type.text+`]`,Q(`type`,s,l,Me(Z),a.data.widthLimit),s.type.Y=r+5,r=s.type.Y+s.type.height),s.descr&&s.descr.text!==``){let e=Me(Z);e.fontSize-=2,Q(`descr`,s,l,e,a.data.widthLimit),s.descr.Y=r+20,r=s.descr.Y+s.descr.height}if(o==0||o%Oe===0){let e=n.data.startx+Z.diagramMarginX,t=n.data.stopy+Z.diagramMarginY+r;a.setData(e,e,t,t)}else{let e=a.data.stopx===a.data.startx?a.data.startx:a.data.stopx+Z.diagramMarginX,t=a.data.starty;a.setData(e,e,t,t)}a.name=s.alias;let d=i.db.getC4ShapeArray(s.alias),f=i.db.getC4ShapeKeys(s.alias);f.length>0&&Fe(a,e,d,f),t=s.alias;let p=i.db.getBoundaries(t);p.length>0&&ze(e,t,a,p,i),s.alias!==`global`&&Pe(e,s,a),n.data.stopy=Math.max(a.data.stopy+Z.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+Z.c4ShapeMargin,n.data.stopx),Te=Math.max(Te,n.data.stopx),Ee=Math.max(Ee,n.data.stopy)}}i(ze,`drawInsideBoundary`);var Be={drawPersonOrSystemArray:Fe,drawBoundary:Pe,setConf:Ae,draw:i(function(e,t,n,i){Z=d().c4;let o=d().securityLevel,s;o===`sandbox`&&(s=a(`#i`+t));let l=a(o===`sandbox`?s.nodes()[0].contentDocument.body:`body`),u=i.db;i.db.setWrap(Z.wrap),De=u.getC4ShapeInRow(),Oe=u.getC4BoundaryInRow(),r.debug(`C:${JSON.stringify(Z,null,2)}`);let p=o===`sandbox`?l.select(`[id="${t}"]`):a(`[id="${t}"]`);X.insertComputerIcon(p),X.insertDatabaseIcon(p),X.insertClockIcon(p);let m=new ke(i);m.setData(Z.diagramMarginX,Z.diagramMarginX,Z.diagramMarginY,Z.diagramMarginY),m.data.widthLimit=screen.availWidth,Te=Z.diagramMarginX,Ee=Z.diagramMarginY;let h=i.db.getTitle();ze(p,``,m,i.db.getBoundaries(``),i),X.insertArrowHead(p),X.insertArrowEnd(p),X.insertArrowCrossHead(p),X.insertArrowFilledHead(p),Re(p,i.db.getRels(),i.db.getC4Shape,i),m.data.stopx=Te,m.data.stopy=Ee;let g=m.data,_=g.stopy-g.starty+2*Z.diagramMarginY,v=g.stopx-g.startx+2*Z.diagramMarginX;h&&p.append(`text`).text(h).attr(`x`,(g.stopx-g.startx)/2-4*Z.diagramMarginX).attr(`y`,g.starty+Z.diagramMarginY),f(p,_,v,Z.useMaxWidth);let y=h?60:0;p.attr(`viewBox`,g.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+y)+` `+v+` `+(_+y)),r.debug(`models:`,g)},`draw`)},Ve={parser:x,db:ue,renderer:Be,styles:i(e=>`.person {
7
+ stroke: ${e.personBorder};
8
+ fill: ${e.personBkg};
9
+ }
10
+ `,`getStyles`),init:i(({c4:e,wrap:t})=>{Be.setConf(e),ue.setWrap(t)},`init`)};export{Ve as diagram};
@@ -0,0 +1 @@
1
+ import{it as e,rt as t}from"./chunk-7R4GIKGN-BkJi0iaA.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
@@ -0,0 +1 @@
1
+ import{h as e}from"./src-D9XCNmfv.js";function t(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}e(t,`populateCommonDb`);export{t};
@@ -0,0 +1 @@
1
+ import{h as e,p as t}from"./src-D9XCNmfv.js";var n=e((e,n)=>{let r;return n===`sandbox`&&(r=t(`#i`+e)),t(n===`sandbox`?r.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`);export{n as t};
@@ -0,0 +1 @@
1
+ import{a as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-XZSTWKYB-LC3hmT5H.js";var l=class extends c{static{t(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},u={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new i,`ValueConverter`)}};function d(t=o){let i=a(n(t),s),c=a(r({shared:i}),e,u);return i.ServiceRegistry.register(c),{shared:i,GitGraph:c}}t(d,`createGitGraphServices`);export{d as n,u as t};