@codexhost/cli-win32-x64 0.29.2 → 0.31.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 (122) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +94 -20
  4. package/app/console-web.js +123 -31
  5. package/app/desktop-controller.mjs +113 -37
  6. package/app/host-runtime.mjs +3963 -2280
  7. package/app/plugins/antigravity/plugin.mjs +94 -20
  8. package/app/plugins/claude-code/plugin.mjs +105 -28
  9. package/app/plugins/codebuddy/plugin.mjs +767 -202
  10. package/app/plugins/codex-usage/plugin.mjs +112 -38
  11. package/app/plugins/copilot/plugin.mjs +94 -20
  12. package/app/plugins/cursor-cli/plugin.mjs +94 -20
  13. package/app/plugins/deepseek-harness/plugin.mjs +94 -20
  14. package/app/plugins/devin/plugin.mjs +94 -20
  15. package/app/plugins/grok/plugin.mjs +94 -20
  16. package/app/plugins/hermes/plugin.mjs +94 -20
  17. package/app/plugins/kimi-code/plugin.mjs +94 -20
  18. package/app/plugins/kiro-cli/plugin.mjs +94 -20
  19. package/app/plugins/omp/plugin.mjs +94 -20
  20. package/app/plugins/opencode/plugin.mjs +94 -20
  21. package/app/plugins/pi/plugin.mjs +94 -20
  22. package/app/plugins/qoder/plugin.mjs +94 -20
  23. package/app/plugins/qoder-cn/plugin.mjs +94 -20
  24. package/app/plugins/qwen-code/plugin.mjs +94 -20
  25. package/app/plugins/workbuddy/plugin.mjs +798 -202
  26. package/app/plugins/zcode/plugin.mjs +94 -20
  27. package/app/renderer-extension.js +702 -440
  28. package/app/web/assets/abnfDiagram-XWFEHMT6-Bqy7uOSy.js +1 -0
  29. package/app/web/assets/architectureDiagram-CSQXQB3N-6aaP1YoM.js +36 -0
  30. package/app/web/assets/blockDiagram-BEDRHYPZ-B4QSFXe0.js +140 -0
  31. package/app/web/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
  32. package/app/web/assets/c4Diagram-M2UUVUY5-BYE-C8Gq.js +38 -0
  33. package/app/web/assets/chunk-2Q5K7J3B-CiEM-GTd.js +1 -0
  34. package/app/web/assets/chunk-3GCGMST5-hzY9BiB1.js +1 -0
  35. package/app/web/assets/chunk-5VM5RSS4-DYXznY0H.js +15 -0
  36. package/app/web/assets/chunk-7U7NFRK5-Bzw5MDPr.js +88 -0
  37. package/app/web/assets/chunk-CNRTWJTD-DMbxMfi3.js +1 -0
  38. package/app/web/assets/chunk-D5HYT7QG-By0ZVBtD.js +1 -0
  39. package/app/web/assets/chunk-EBZ3SEQC-Yyu_sMV7.js +2 -0
  40. package/app/web/assets/chunk-JWPE2WC7-DDzqxIPT.js +1 -0
  41. package/app/web/assets/chunk-KTR4FSNJ-GlKqhtpl.js +1 -0
  42. package/app/web/assets/chunk-XXDRQBXY-DNc-CvYu.js +1 -0
  43. package/app/web/assets/classDiagram-v2-KXABOMEV-4_PFS2N_.js +217 -0
  44. package/app/web/assets/cose-bilkent-JH36ORCC-BE3foHUY.js +1 -0
  45. package/app/web/assets/cynefin-EF2NZ3EQ-D2PqrYZ3.js +141 -0
  46. package/app/web/assets/cynefinDiagram-NJNITYFG-DOObpTbq.js +62 -0
  47. package/app/web/assets/cytoscape.esm-Cm0uQArZ.js +332 -0
  48. package/app/web/assets/d3-scale-4DPf7zan.js +1 -0
  49. package/app/web/assets/dagre-KIHZ2IZ3-Znm2jin9.js +4 -0
  50. package/app/web/assets/diagram-7YQZDPLS-ByZMD-uA.js +41 -0
  51. package/app/web/assets/diagram-QBROCOUO-BiRShpnN.js +200 -0
  52. package/app/web/assets/diagram-RJJCUUZO-D9wLVoK2.js +30 -0
  53. package/app/web/assets/diagram-WERXNKYE-BSbIh-yC.js +24 -0
  54. package/app/web/assets/diagram-YHHI257C-DMWrHMc8.js +3 -0
  55. package/app/web/assets/diagram-YR4HJLHV-C4sBAFb1.js +24 -0
  56. package/app/web/assets/ebnfDiagram-N527522P-BZLloaoQ.js +1 -0
  57. package/app/web/assets/elk-O5DQBFGD-Da3e5tn5.js +27 -0
  58. package/app/web/assets/erDiagram-K3K3BIDK-B2lKAIZF.js +99 -0
  59. package/app/web/assets/flowDiagram-Z6JWZHQI-q2EY_kmB.js +213 -0
  60. package/app/web/assets/ganttDiagram-3PRQTZWP-BGrNZ20b.js +292 -0
  61. package/app/web/assets/gitGraphDiagram-VXDFKS5L-DIZNXREy.js +106 -0
  62. package/app/web/assets/graph-D8UmR1vK.js +1 -0
  63. package/app/web/assets/grid-E2QIVN74-0cUkPG69.js +1 -0
  64. package/app/web/assets/{index-aSHN2MIG.css → index-BbmB5VLj.css} +1 -1
  65. package/app/web/assets/{index-0TnaYwHS.js → index-PN7K-15_.js} +78 -78
  66. package/app/web/assets/infoDiagram-EZ3ZOAHP-BHhUTQCn.js +2 -0
  67. package/app/web/assets/ishikawaDiagram-S3EKX5GW-DPOxtl4c.js +70 -0
  68. package/app/web/assets/journeyDiagram-POQNLL5X-D8RyXckG.js +139 -0
  69. package/app/web/assets/kanban-definition-BH5XI6FM-COJv3Hyh.js +89 -0
  70. package/app/web/assets/langs/{graphql-ChAeyPkT.js → graphql-D6Z3qcRW.js} +1 -1
  71. package/app/web/assets/langs/{http-BvreBIbD.js → http-XiU9G9In.js} +1 -1
  72. package/app/web/assets/langs/{php-D8omCIuJ.js → php-DL3xwS-7.js} +1 -1
  73. package/app/web/assets/langs/{rst-Do7RLLCS.js → rst-DudRVJ9g.js} +1 -1
  74. package/app/web/assets/langs/{ruby-rH_O_vse.js → ruby-_FqsfqJi.js} +1 -1
  75. package/app/web/assets/langs/{svelte-xZy73wAj.js → svelte-ClsVJoBT.js} +1 -1
  76. package/app/web/assets/langs/{vue-C4DW8agZ.js → vue-BiKMXCyK.js} +1 -1
  77. package/app/web/assets/mermaid.core-DYdcDKIt.js +314 -0
  78. package/app/web/assets/mindmap-definition-WVAN44T4-DnYIM4ja.js +98 -0
  79. package/app/web/assets/pegDiagram-D4NLKWP3-Ds3GAEJ6.js +1 -0
  80. package/app/web/assets/pieDiagram-36ENHN4W-BhLUJGEB.js +39 -0
  81. package/app/web/assets/quadrantDiagram-ZQUDMS73-DwtX-IxK.js +7 -0
  82. package/app/web/assets/railroadDiagram-JIZHGYPL-D2vmTTnJ.js +1 -0
  83. package/app/web/assets/render-VIF2ZAQL-DGU1ql-Z.js +2 -0
  84. package/app/web/assets/requirementDiagram-AXW2TVFA-u3j1sKkI.js +84 -0
  85. package/app/web/assets/sankeyDiagram-FBCJTAIF-k-An9VHW.js +40 -0
  86. package/app/web/assets/sequenceDiagram-3LA2ROMG-DUjbYb4R.js +169 -0
  87. package/app/web/assets/sizeCapture-2Q2CQKSF-DATTL7FZ.js +1 -0
  88. package/app/web/assets/stateDiagram-v2-ATKHQDJO-cCJX5M2u.js +291 -0
  89. package/app/web/assets/swimlanes-YQL5WMAO-B7grWEWt.js +1 -0
  90. package/app/web/assets/swimlanesDiagram-UCCPES4V-B8Jem9gq.js +8 -0
  91. package/app/web/assets/timeline-definition-7Z437IG3-BhsLa6l1.js +120 -0
  92. package/app/web/assets/usecaseDiagram-RDK6N6HP-CkPQYmQw.js +370 -0
  93. package/app/web/assets/vendor-BKfNgqAm.js +666 -0
  94. package/app/web/assets/vennDiagram-SHRQU5PJ-CufZSwvw.js +34 -0
  95. package/app/web/assets/wardleyDiagram-F3OXNVQS-CSkfpFOA.js +78 -0
  96. package/app/web/assets/xychartDiagram-GDYJKCDI-BhZf9scK.js +7 -0
  97. package/app/web/codexhost-settings.js +57 -57
  98. package/app/web/index.html +3 -3
  99. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +65 -65
  100. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
  101. package/app/web/plugins/deepseek-ai__dsh-api-workspace-controller/client.js +3 -3
  102. package/app/web/plugins/deepseek-ai__dsh-client-locale/client.js +1 -1
  103. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +75 -75
  104. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +12 -12
  105. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +16 -16
  106. package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +3 -3
  107. package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
  108. package/app/web/plugins/deepseek-ai__dsh-client-ui-plan/client.js +1 -1
  109. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.js +9 -9
  110. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
  111. package/app/web/plugins/deepseek-ai__dsh-client-ui-user-questions/client.js +1 -1
  112. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +70 -72
  113. package/app/web-modules/licenses/DSH-THIRD_PARTY_NOTICES.md +1 -1
  114. package/app/web-modules/server.mjs +724 -259
  115. package/bin/codexhost.exe +0 -0
  116. package/libexec/codexhost-node-repl.exe +0 -0
  117. package/libexec/codexhost-screenshot.exe +0 -0
  118. package/libexec/codexhost-shell.exe +0 -0
  119. package/libexec/codexhost-shim.exe +0 -0
  120. package/libexec/codexhost-updater.exe +0 -0
  121. package/package.json +1 -1
  122. package/app/web/assets/vendor-C9g2bw8s.js +0 -410
@@ -0,0 +1,99 @@
1
+ import{g as zt}from"./chunk-XXDRQBXY-DNc-CvYu.js";import{s as Ut}from"./chunk-CNRTWJTD-DMbxMfi3.js";import{_ as p,M as St,b as Kt,a as Zt,s as jt,g as qt,v as Wt,x as Ht,c as $,l as M,m as Qt,C as Xt,A as Jt,F as $t,G as te,H as ee,N as se,K as ie,L as re,O as ne,r as ae,t as oe,k as ce,u as le}from"./mermaid.core-DYdcDKIt.js";import"./index-PN7K-15_.js";import"./vendor-BKfNgqAm.js";var Tt=(function(){var e=p(function(V,n,o,u){for(o=o||{},u=V.length;u--;o[V[u]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],h=[2,2],r=[1,7],c=[1,9],f=[1,10],k=[1,11],b=[1,12],m=[1,30],d=[1,23],g=[1,24],C=[1,25],B=[1,26],Y=[1,27],E=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],ut=[1,36],dt=[1,37],pt=[1,38],ft=[1,39],bt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],Ct=[69,70,71,72,73],Nt=[1,91],xt=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],gt=[18,61,64,66],yt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,u,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,h,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:f,25:k,27:b,28:13,29:14,30:15,31:16,32:17,34:m,37:d,38:g,39:C,40:B,41:Y,43:E,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:ut,70:dt,71:pt,72:ft,73:bt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,h,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:E,51:N,53:I,54:R,55:v},{10:51,43:E,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:E,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:f,25:k,27:b,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:m,37:d,38:g,39:C,40:B,41:Y,43:E,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:ut,70:dt,71:pt,72:ft,73:bt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:ut,70:dt,71:pt,72:ft,73:bt},e(Ct,[2,82]),e(Ct,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(xt,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:E,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:E,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:E,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(gt,[2,72]),e(X,[2,75]),e(gt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(xt,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(gt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var u=new Error(n);throw u.hash=o,u}},"parseError"),parse:p(function(n){var o=this,u=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(G.yy[_t]=this.yy[_t]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var kt=_.yylloc;t.push(kt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){u.length=u.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var S,F,O,mt,z={},lt,x,wt,ht;;){if(F=u[u.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((S===null||typeof S>"u")&&(S=Lt()),O=J[F]&&J[F][S]),typeof O>"u"||!O.length||!O[0]){var Et="";ht=[];for(lt in J[F])this.terminals_[lt]&&lt>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?Et="Parse error on line "+(ct+1)+`:
2
+ `+_.showPosition()+`
3
+ Expecting `+ht.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Et="Parse error on line "+(ct+1)+": Unexpected "+(S==Dt?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Et,{text:_.match,token:this.terminals_[S]||S,line:_.yylineno,loc:kt,expected:ht})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+S);switch(O[0]){case 1:u.push(S),y.push(_.yytext),t.push(_.yylloc),u.push(O[1]),S=null,vt=_.yyleng,s=_.yytext,ct=_.yylineno,kt=_.yylloc;break;case 2:if(x=this.productions_[O[1]][1],z.$=y[y.length-x],z._$={first_line:t[t.length-(x||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(x||1)].first_column,last_column:t[t.length-1].last_column},Yt&&(z._$.range=[t[t.length-(x||1)].range[0],t[t.length-1].range[1]]),mt=this.performAction.apply(z,[s,vt,ct,G.yy,O[1],y,t].concat(Ft)),typeof mt<"u")return mt;x&&(u=u.slice(0,-1*x*2),y=y.slice(0,-1*x),t=t.slice(0,-1*x)),u.push(this.productions_[O[1]][0]),y.push(z.$),t.push(z._$),wt=J[u[u.length-2]][u[u.length-1]],u.push(wt);break;case 3:return!0}}return!0},"parse")},Bt=(function(){var V={EOF:1,parseError:p(function(o,u){if(this.yy.parser)this.yy.parser.parseError(o,u);else throw new Error(o)},"parseError"),setInput:p(function(n,o){return this.yy=o||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var o=n.length,u=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var y=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:u?(u.length===i.length?this.yylloc.first_column:0)+i[i.length-u.length].length-u[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),o=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
+ `+o+"^"},"showPosition"),test_match:p(function(n,o){var u,i,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),i=n[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],u=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,o,u,i;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;t<y.length;t++)if(u=this._input.match(this.rules[y[t]]),u&&(!o||u[0].length>o[0].length)){if(o=u,i=t,this.options.backtrack_lexer){if(n=this.test_match(u,y[t]),n!==!1)return n;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(n=this.test_match(o,y[i]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:p(function(){var o=this.next();return o||this.lex()},"lex"),begin:p(function(o){this.conditionStack.push(o)},"begin"),popState:p(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(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:p(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:p(function(o){this.begin(o)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:p(function(o,u,i,y){switch(i){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return u.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return u.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,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,75,76,77,80,81,82],inclusive:!0}}};return V})();yt.lexer=Bt;function ot(){this.yy={}}return p(ot,"Parser"),ot.prototype=yt,yt.Parser=ot,new ot})();Tt.parser=Tt;var he=Tt,ue=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Kt,this.getAccTitle=Zt,this.setAccDescription=jt,this.getAccDescription=qt,this.setDiagramTitle=Wt,this.getDiagramTitle=Ht,this.getConfig=p(()=>$().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{p(this,"ErDB")}addEntity(e,a=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&a&&(this.entities.get(e).alias=a,M.info(`Add alias '${a}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,placementId:e,label:e,attributes:[],alias:a,shape:"erBox",look:$().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),M.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,a){const h=this.addEntity(e);let r;for(r=a.length-1;r>=0;r--)a[r].keys||(a[r].keys=[]),a[r].comment||(a[r].comment=""),h.attributes.push(a[r]),M.debug("Added attribute ",a[r].name)}addRelationship(e,a,h,r){let c;if(this.subGraphLookup.has(e))c=e;else{const b=this.addEntity(e);if(!b)return;c=b.id}let f;if(this.subGraphLookup.has(h))f=h;else{const b=this.addEntity(h);if(!b)return;f=b.id}const k={entityA:c,roleA:a,entityB:f,relSpec:r};this.relationships.push(k),M.debug("Added new relationship :",k)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let a=[];for(const h of e){const r=this.classes.get(h);r?.styles&&(a=[...a,...r.styles??[]].map(c=>c.trim())),r?.textStyles&&(a=[...a,...r.textStyles??[]].map(c=>c.trim()))}return a}addCssStyles(e,a){for(const h of e){const r=this.entities.get(h),c=this.subGraphLookup.get(h);if(a){if(r)for(const f of a)r.cssStyles.push(f);if(c){c.cssStyles||(c.cssStyles=[]);for(const f of a)c.cssStyles.push(f)}}}}addClass(e,a){e.forEach(h=>{let r=this.classes.get(h);r===void 0&&(r={id:h,styles:[],textStyles:[]},this.classes.set(h,r)),a&&a.forEach(function(c){if(/color/.exec(c)){const f=c.replace("fill","bgFill");r.textStyles.push(f)}r.styles.push(c)})})}addSubGraph(e,a,h){let r=e.text.trim(),c=h.text;const k=p(g=>{const C=new Set;let B;return{nodeList:g.filter(E=>{if(E?.stmt)return E.stmt==="dir"&&(B=E.value),!1;if(typeof E!="string")return!1;const A=E.trim();return!A||C.has(A)?!1:(C.add(A),!0)}),dir:B}},"uniq")(a.flat()),b=k.nodeList,m=k.dir;r=r??"subGraph"+this.subCount,c=c||"",c=this.sanitizeText(c),this.subCount=this.subCount+1;const d={id:r,nodes:b,title:c.trim(),classes:[],cssStyles:[],dir:m,labelType:this.sanitizeNodeLabelType(h?.type)};return M.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes,this.subGraphs.push(d),this.subGraphLookup.set(r,d),r}getSubGraphs(){return this.subGraphs}setClass(e,a){for(const h of e){const r=this.entities.get(h);if(r)for(const f of a)r.cssClasses+=" "+f;const c=this.subGraphLookup.get(h);if(c)for(const f of a)c.classes.push(f)}}subgraphNodeCache(e){const a=new Set;for(const h of e)for(const r of h.nodes)a.add(r);return a}makeUniq(e,a){const h=this.subgraphNodeCache(a),r=[];return e.nodes.forEach((c,f)=>{h.has(c)?M.warn(`Entity '${c}' already belongs to another subgraph and will be ignored`):r.push(e.nodes[f])}),{nodes:r}}sanitizeText(e){return Qt.sanitizeText(e,$())}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,Xt()}getData(){const e=[],a=[],h=$(),r=this.getSubGraphs(),c=new Map,f=new Map;for(let d=r.length-1;d>=0;d--){const g=r[d];g.nodes.length>0&&f.set(g.id,!0);for(const C of g.nodes)c.set(C,g.id)}for(let d=r.length-1;d>=0;d--){const g=r[d];e.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:c.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssStyles:g.cssStyles,cssClasses:g.classes.join(" "),shape:"rect",dir:g.dir,isGroup:!0,look:h.look})}const k=new Set(r.map(d=>d.id));let b=0;for(const d of this.entities.keys()){if(k.has(d))continue;const g=this.entities.get(d);g&&(g.cssCompiledStyles=this.getCompiledStyles(g.cssClasses.split(" ")),g.colorIndex=b++,e.push({...g,parentId:c.get(d),isGroup:!1}))}let m=0;for(const d of this.relationships){const g={id:Jt(d.entityA,d.entityB,{prefix:"id",counter:m++}),type:"normal",curve:"basis",start:d.entityA,end:d.entityB,label:d.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:d.relSpec.cardB.toLowerCase(),arrowTypeEnd:d.relSpec.cardA.toLowerCase(),pattern:d.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:h.look,labelType:"markdown"};a.push(g)}return{nodes:e,edges:a,other:{},config:h,direction:this.direction}}},Mt={};ne(Mt,{draw:()=>de});var de=p(async function(e,a,h,r){M.info("REF0:"),M.info("Drawing er diagram (unified)",a);const{securityLevel:c,er:f,layout:k}=$(),b=r.db.getData(),m=zt(a,c);b.type=r.type,b.layoutAlgorithm=ae(k),b.config.flowchart.nodeSpacing=f?.nodeSpacing||140,b.config.flowchart.rankSpacing=f?.rankSpacing||80,b.direction=r.db.getDirection();const{config:d}=b,{look:g}=d;g==="neo"?b.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:b.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],b.diagramId=a,await oe(b,m);const C=m.selectAll('[id*="-background"]');Array.from(C).length>0&&C.each(function(){const Y=ce(this),A=Y.attr("id").replace("-background",""),U=m.select(`#${CSS.escape(A)}`);if(!U.empty()){const N=U.attr("transform");Y.attr("transform",N)}});const B=8;le.insertTitle(m,"erDiagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),Ut(m,B,"erDiagram",f?.useMaxWidth??!0)},"draw"),Vt=p((e,a)=>{const h=re,r=h(e,"r"),c=h(e,"g"),f=h(e,"b");return ie(r,c,f,a)},"fade"),pe=p(e=>{const{theme:a,bkgColorArray:h,borderColorArray:r}=e;if(!$t(a,r))return"";const c=te(e.look),f=ee(h);let k="";for(let b=0;b<se(r);b++){const m=r[b],d=f?`fill: ${h[b%h.length]};`:"";k+=`
7
+
8
+ [data-look="${c}"][data-color-id="color-${b}"].node path {
9
+ stroke: ${m};
10
+ ${d}
11
+ }
12
+
13
+ [data-look="${c}"][data-color-id="color-${b}"].node rect {
14
+ stroke: ${m};
15
+ ${d}
16
+ }
17
+ `}return k},"genColor"),fe=p(e=>{const{look:a,theme:h,erEdgeLabelBackground:r,strokeWidth:c}=e;return`
18
+ ${pe(e)}
19
+ .entityBox {
20
+ fill: ${e.mainBkg};
21
+ stroke: ${e.nodeBorder};
22
+ }
23
+
24
+ .relationshipLabelBox {
25
+ fill: ${e.tertiaryColor};
26
+ opacity: 0.7;
27
+ background-color: ${e.tertiaryColor};
28
+ rect {
29
+ opacity: 0.5;
30
+ }
31
+ }
32
+
33
+ .labelBkg {
34
+ background-color: ${St.has(h)&&r?r:Vt(e.tertiaryColor,.5)};
35
+ }
36
+
37
+ .edgeLabel {
38
+ background-color: ${St.has(h)&&r?r:e.edgeLabelBackground};
39
+ }
40
+ .edgeLabel .label rect {
41
+ fill: ${St.has(h)&&r?r:e.edgeLabelBackground};
42
+ }
43
+ .edgeLabel .label text {
44
+ fill: ${e.textColor};
45
+ }
46
+
47
+ .edgeLabel .label {
48
+ fill: ${e.nodeBorder};
49
+ font-size: 14px;
50
+ }
51
+
52
+ .label {
53
+ font-family: ${e.fontFamily};
54
+ color: ${e.nodeTextColor||e.textColor};
55
+ }
56
+
57
+ .edge-pattern-dashed {
58
+ stroke-dasharray: 8,8;
59
+ }
60
+
61
+ .node rect,
62
+ .node circle,
63
+ .node ellipse,
64
+ .node polygon
65
+ {
66
+ fill: ${e.mainBkg};
67
+ stroke: ${e.nodeBorder};
68
+ stroke-width: ${a==="neo"?c:"1px"};
69
+ }
70
+
71
+ .relationshipLine {
72
+ stroke: ${e.lineColor};
73
+ stroke-width: ${a==="neo"?c:"1px"};
74
+ fill: none;
75
+ }
76
+
77
+ .marker {
78
+ fill: none !important;
79
+ stroke: ${e.lineColor} !important;
80
+ stroke-width: 1;
81
+ }
82
+ [data-look=neo].labelBkg {
83
+ background-color: ${Vt(e.tertiaryColor,.5)};
84
+ }
85
+
86
+ .cluster rect {
87
+ fill: ${e.clusterBkg??e.mainBkg};
88
+ stroke: ${e.clusterBorder??e.nodeBorder};
89
+ stroke-width: 1px;
90
+ }
91
+
92
+ .cluster text {
93
+ fill: ${e.titleColor??e.textColor};
94
+ }
95
+
96
+ .cluster-label text {
97
+ fill: ${e.titleColor??e.textColor};
98
+ }
99
+ `},"getStyles"),be=fe,Ee={parser:he,get db(){return new ue},renderer:Mt,styles:be};export{Ee as diagram};
@@ -0,0 +1,213 @@
1
+ import{s as t1}from"./chunk-KTR4FSNJ-GlKqhtpl.js";import{g as s1}from"./chunk-5VM5RSS4-DYXznY0H.js";import{g as i1}from"./chunk-XXDRQBXY-DNc-CvYu.js";import{s as r1}from"./chunk-CNRTWJTD-DMbxMfi3.js";import{_ as m,q as a1,l as J,c as pe,r as n1,t as o1,u as at,b as u1,s as l1,v as c1,a as h1,g as d1,x as p1,m as f1,y as g1,J as b1,bj as st,z as k1,A as it,k as rt,B as A1,C as m1,bk as D1,D as C1,E as S1,F as T1,G as y1,H as E1,I as x1,K as F1,L as _1}from"./mermaid.core-DYdcDKIt.js";import{c as v1}from"./chunk-D5HYT7QG-By0ZVBtD.js";var B1="flowchart-",Kt=["row","column","horizontalAlign","verticalAlign"],L1=new Set(["shape","label","icon","form","pos","img","w","h","constraint","priority","assigned","ticket","labelType","view",...Kt]);function nt(e,i=!1){if(!e)return;const a=e,r={};for(const n of Kt)Object.hasOwn(a,n)&&(r[n]=a[n]);return i&&Object.hasOwn(a,"algorithm")&&(r.algorithm=a.algorithm),Object.keys(r).length>0?r:void 0}m(nt,"pickFlowchartLayoutMetadata");var w1=["laneRole","laneIndex","drawnExtent"];function Yt(e){if(!e||typeof e!="object")return e;const i={...e};for(const a of w1)Reflect.deleteProperty(i,a);return i}m(Yt,"withoutInternalKeys");var V1=class{constructor(){this.vertexCounter=0,this.config=pe(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=u1,this.setAccDescription=l1,this.setDiagramTitle=c1,this.getAccTitle=h1,this.getAccDescription=d1,this.getDiagramTitle=p1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{m(this,"FlowDB")}sanitizeText(e){return f1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,a,r,n,d,l={},g){if(!e||e.trim().length===0)return;let c;if(g!==void 0){let b;g.includes(`
2
+ `)?b=g+`
3
+ `:b=`{
4
+ `+g+`
5
+ }`,c=Yt(t1(g1(b,{schema:b1})))}const B=this.subGraphLookup.get(e);if(B&&c){Object.keys(c).length>0&&(B.metadata={...B.metadata,...c});return}const D=this.edges.find(b=>b.id===e);if(D){const b=c;b?.animate!==void 0&&(D.animate=b.animate),b?.animation!==void 0&&(D.animation=b.animation),b?.curve!==void 0&&(D.interpolate=b.curve),b?.step!==void 0&&(st(b)?D.step=b.step:J.warn(`Ignoring step on edge ${e}: expected a positive integer`,b.step));return}let V,A=this.vertices.get(e);if(A===void 0&&(i===void 0&&a===void 0&&r!==void 0&&r!==null&&J.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),A={id:e,labelType:"text",domId:B1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,A)),this.vertexCounter++,i!==void 0?(this.config=pe(),V=this.sanitizeText(i.text.trim()),A.labelType=i.type,V.startsWith('"')&&V.endsWith('"')&&(V=V.substring(1,V.length-1)),A.text=V):A.text===void 0&&(A.text=e),a!==void 0&&(A.type=a),r?.forEach(b=>{A.styles.push(b)}),n?.forEach(b=>{A.classes.push(b)}),d!==void 0&&(A.dir=d),A.props===void 0?A.props=l:l!==void 0&&Object.assign(A.props,l),c!==void 0){if(A.metadata={...A.metadata,...c},c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw new Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!k1(c.shape))throw new Error(`No such shape: ${c.shape}.`);A.type=c?.shape}c?.label&&(A.text=c?.label,A.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(A.icon=c?.icon,!c.label?.trim()&&A.text===e&&(A.text="")),c?.form&&(A.form=c?.form),c?.pos&&(A.pos=c?.pos),c?.img&&(A.img=c?.img,!c.label?.trim()&&A.text===e&&(A.text="")),c?.constraint&&(A.constraint=c.constraint),c.w&&(A.assetWidth=Number(c.w)),c.h&&(A.assetHeight=Number(c.h))}}addSingleLink(e,i,a,r){const l={start:e,end:i,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};J.info("abc78 Got edge...",l);const g=a.text;if(g!==void 0&&(l.text=this.sanitizeText(g.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(g.type)),a!==void 0&&(l.type=a.type,l.stroke=a.stroke,l.length=a.length>10?10:a.length),r&&!this.edges.some(c=>c.id===r))l.id=r,l.isUserDefinedId=!0;else{const c=this.edges.filter(B=>B.start===l.start&&B.end===l.end);c.length===0?l.id=it(l.start,l.end,{counter:0,prefix:"L"}):l.id=it(l.start,l.end,{counter:c.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))J.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
6
+
7
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
8
+ You cannot set this config via configuration inside the diagram as it is a secure config.
9
+ You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,i,a){const r=this.isLinkData(a)?a.id.replace("@",""):void 0;J.info("addLink",e,i,r);for(const n of e)for(const d of i){const l=n===e[e.length-1],g=d===i[0];l&&g?this.addSingleLink(n,d,a,r):this.addSingleLink(n,d,a,void 0)}}updateLinkInterpolate(e,i){e.forEach(a=>{a==="default"?this.edges.defaultInterpolate=i:this.edges[a].interpolate=i})}updateLink(e,i){e.forEach(a=>{if(typeof a=="number"&&a>=this.edges.length)throw new Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);a==="default"?this.edges.defaultStyle=i:(this.edges[a].style=i,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some(r=>r?.startsWith("fill"))&&this.edges[a]?.style?.push("fill:none"))})}addClass(e,i){const a=i.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(r=>{let n=this.classes.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.classes.set(r,n)),a?.forEach(d=>{if(/color/.exec(d)){const l=d.replace("fill","bgFill");n.textStyles.push(l)}n.styles.push(d)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,i){for(const a of e.split(",")){const r=this.vertices.get(a);r&&r.classes.push(i);const n=this.edges.find(l=>l.id===a);n&&n.classes.push(i);const d=this.subGraphLookup.get(a);d&&d.classes.push(i)}}setTooltip(e,i){if(i!==void 0){i=this.sanitizeText(i);for(const a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,i)}}setClickFun(e,i,a){if(pe().securityLevel!=="loose"||i===void 0)return;let r=[];if(typeof a=="string"){r=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let d=0;d<r.length;d++){let l=r[d].trim();l.startsWith('"')&&l.endsWith('"')&&(l=l.substr(1,l.length-2)),r[d]=l}}r.length===0&&r.push(e);const n=this.vertices.get(e);n&&(n.haveCallback=!0,this.funs.push(()=>{const d=this.lookUpDomId(e),l=document.querySelector(`[id="${d}"]`);l!==null&&l.addEventListener("click",()=>{at.runFunc(i,...r)},!1)}))}setLink(e,i,a){e.split(",").forEach(r=>{const n=this.vertices.get(r);n!==void 0&&(n.link=at.formatUrl(i,this.config),n.linkTarget=a)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,i,a){e.split(",").forEach(r=>{this.setClickFun(r,i,a)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(i=>{i(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){const i=v1();rt(e).select("svg").selectAll("g.node").on("mouseover",n=>{const d=rt(n.currentTarget),l=d.attr("title");if(l===null)return;const g=n.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.text(d.attr("title")).style("left",window.scrollX+g.left+(g.right-g.left)/2+"px").style("top",window.scrollY+g.bottom+"px"),i.html(A1.sanitize(l)),d.classed("hover",!0)}).on("mouseout",n=>{i.transition().duration(500).style("opacity",0),rt(n.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=pe(),m1()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,i,a){let r=e.text.trim(),n=a.text;e===a&&/\s/.exec(a.text)&&(r=void 0);const l=m(b=>{const E={boolean:{},number:{},string:{}},I=[];let Z;return{nodeList:b.filter(function(W){const $=typeof W;return W.stmt&&W.stmt==="dir"?(Z=W.value,!1):W.trim()===""?!1:$ in E?E[$].hasOwnProperty(W)?!1:E[$][W]=!0:I.includes(W)?!1:I.push(W)}),dir:Z}},"uniq")(i.flat()),g=l.nodeList;let c=l.dir;const B=pe().flowchart??{};if(c=c??(B.inheritDir?this.getDirection()??pe().direction??void 0:void 0),this.version==="gen-1")for(let b=0;b<g.length;b++)g[b]=this.lookUpDomId(g[b]);r=r??"subGraph"+this.subCount,n=n||"",n=this.sanitizeText(n),this.subCount=this.subCount+1;const D={id:r,nodes:g,title:n.trim(),classes:[],dir:c,labelType:this.sanitizeNodeLabelType(a?.type)};J.info("Adding",D.id,D.nodes,D.dir);const V=this.makeUniq(D,this.subGraphs).nodes;this.recordDroppedMembers(D,V),D.nodes=V.filter(b=>b!==r);const A=this.subGraphs.find(b=>b.id===r);return A?A.nodes.push(...D.nodes):this.subGraphs.push(D),this.subGraphLookup.set(r,A??D),r}recordDroppedMembers(e,i){const a=new Set(i);for(const r of e.nodes){if(a.has(r)||r===e.id)continue;const n=this.subGraphs.find(d=>d.nodes.includes(r));n&&n.id!==e.id&&!this.isNestedIn(n.id,e)&&this.droppedSubGraphMembers.push({node:r,keptBy:n.id,droppedFrom:e.id})}}isNestedIn(e,i){const a=new Set;let r=e;for(;r!==void 0&&!a.has(r);){if(i.nodes.includes(r))return!0;a.add(r);const n=r;r=this.subGraphs.find(d=>d.nodes.includes(n))?.id}return!1}getPosForId(e){for(const[i,a]of this.subGraphs.entries())if(a.id===e)return i;return-1}indexNodes2(e,i){const a=this.subGraphs[i].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=i,this.subGraphs[i].id===e)return{result:!0,count:0};let r=0,n=1;for(;r<a.length;){const d=this.getPosForId(a[r]);if(d>=0){const l=this.indexNodes2(e,d);if(l.result)return{result:!0,count:n+l.count};n=n+l.count}r=r+1}return{result:!1,count:n}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let i=e.trim(),a="arrow_open";switch(i[0]){case"<":a="arrow_point",i=i.slice(1);break;case"x":a="arrow_cross",i=i.slice(1);break;case"o":a="arrow_circle",i=i.slice(1);break}let r="normal";return i.includes("=")&&(r="thick"),i.includes(".")&&(r="dotted"),{type:a,stroke:r}}countChar(e,i){const a=i.length;let r=0;for(let n=0;n<a;++n)i[n]===e&&++r;return r}destructEndLink(e){const i=e.trim();let a=i.slice(0,-1),r="arrow_open";switch(i.slice(-1)){case"x":r="arrow_cross",i.startsWith("x")&&(r="double_"+r,a=a.slice(1));break;case">":r="arrow_point",i.startsWith("<")&&(r="double_"+r,a=a.slice(1));break;case"o":r="arrow_circle",i.startsWith("o")&&(r="double_"+r,a=a.slice(1));break}let n="normal",d=a.length-1;a.startsWith("=")&&(n="thick"),a.startsWith("~")&&(n="invisible");const l=this.countChar(".",a);return l&&(n="dotted",d=l),{type:r,stroke:n,length:d}}destructLink(e,i){const a=this.destructEndLink(e);let r;if(i){if(r=this.destructStartLink(i),r.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(r.type==="arrow_open")r.type=a.type;else{if(r.type!==a.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return r.type==="double_arrow"&&(r.type="double_arrow_point"),r.length=a.length,r}return a}exists(e,i){for(const a of e)if(a.nodes.includes(i))return!0;return!1}makeUniq(e,i){const a=[];return e.nodes.forEach((r,n)=>{this.exists(i,r)||a.push(e.nodes[n])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,i){return e.find(a=>a.id===i)}destructEdgeType(e){let i="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":i=e.replace("double_",""),a=i;break}return{arrowTypeStart:i,arrowTypeEnd:a}}addNodeFromVertex(e,i,a,r,n,d){const l=a.get(e.id),g=r.get(e.id)??!1,c=this.findNode(i,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.cssClasses=e.classes.join(" ");else{const B={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:l,padding:n.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint,metadata:nt(e.metadata)};g?i.push({...B,isGroup:!0,shape:"rect"}):i.push({...B,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:n.flowchart?.minNodeWidth})}}getCompiledStyles(e){let i=[];for(const a of e){const r=this.classes.get(a);r?.styles&&(i=[...i,...r.styles??[]].map(n=>n.trim())),r?.textStyles&&(i=[...i,...r.textStyles??[]].map(n=>n.trim()))}return i}getData(){const e=pe(),i=[],a=[],r=this.getSubGraphs(),n=new Map,d=new Map,l=new Map;for(const u of r)for(const h of u.nodes)this.subGraphLookup.has(h)&&l.set(h,u.id);const g=new Map,c=new Map;for(const u of r){const h=l.get(u.id);h!==void 0&&c.set(h,[...c.get(h)??[],u.id])}let B=0;const D=m(u=>{g.set(u,B++);for(const h of c.get(u)??[])D(h)},"walk");for(const u of r)l.has(u.id)||D(u.id);const V=m(u=>this.subGraphLookup.get(u)?.metadata?.view==="collapsed","isCollapsed"),A=m(u=>{let h;const x=new Set;let F=u;for(;F!==void 0&&!x.has(F);)x.add(F),V(F)&&(h=F),F=l.get(F);return h},"outermostCollapsed"),b=new Set,E=new Map;for(const u of r){const h=A(u.id);if(h!==void 0){u.id!==h&&(b.add(u.id),E.set(u.id,h));for(const x of u.nodes)x!==h&&(b.add(x),E.set(x,h))}}for(let u=r.length-1;u>=0;u--){const h=r[u];if(!b.has(h.id)){h.nodes.length>0&&d.set(h.id,!0);for(const x of h.nodes)n.set(x,h.id)}}for(let u=r.length-1;u>=0;u--){const h=r[u];b.has(h.id)||(h.metadata?.view==="collapsed"?i.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:n.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"collapsedGroup",dir:h.dir,isGroup:!1,look:e.look,colorIndex:g.get(h.id)}):i.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:n.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:e.look,colorIndex:g.get(h.id),metadata:nt(h.metadata,!0)}))}this.getVertices().forEach(u=>{b.has(u.id)||this.addNodeFromVertex(u,i,n,d,e,e.look||"classic")});const Z=this.getEdges(),ke=Z.reduce((u,h)=>st(h)?Math.max(u,h.step):u,0),W=D1(e.flowchart?.stepDuration),$=e.flowchart?.stepNumbers===!0?{showStepNumber:!0}:{};Z.forEach((u,h)=>{const{arrowTypeStart:x,arrowTypeEnd:F}=this.destructEdgeType(u.type),R=[...Z.defaultStyle??[]],N=E.get(u.start)??u.start,G=E.get(u.end)??u.end;if(N===G&&(E.has(u.start)||E.has(u.end)))return;u.style&&R.push(...u.style);const M={id:it(N,G,{counter:h,prefix:"L"},u.id),isUserDefinedId:u.isUserDefinedId,start:N,end:G,type:u.type??"normal",label:u.text,labelType:u.labelType,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":x,arrowTypeEnd:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":F,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(u.classes),labelStyle:R,style:R,pattern:u.stroke,look:e.look,animate:u.animate,animation:u.animation,...st(u)?{step:u.step,stepCount:ke,stepDuration:W,...$}:{},curve:u.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(M)});const Se=this.droppedSubGraphMembers.length>0?{droppedSubGraphMembers:[...this.droppedSubGraphMembers]}:{};return{nodes:i,edges:a,other:Se,config:e}}validate(){if(pe().layout!=="grid")return;const i=[...this.vertices.values(),...this.subGraphs];C1(void 0,i);for(const a of i){const r=this.subGraphLookup.has(a.id);for(const n of Object.keys(a.metadata??{}))L1.has(n)||r&&n==="algorithm"||J.warn(`Unknown metadata key "${n}" on ${r?"subgraph":"node"} "${a.id}" with grid layout.`)}}defaultConfig(){return S1.flowchart}},I1=m(function(e,i){return i.db.getClasses()},"getClasses"),R1=m(async function(e,i,a,r){J.info("REF0:"),J.info("Drawing state diagram (v2)",i);const{securityLevel:n,flowchart:d,layout:l}=pe();r.db.setDiagramId(i),J.debug("Before getData: ");const g=r.db.getData();J.debug("Data: ",g);const c=i1(i,n),B=r.db.getDirection();g.type=r.type,g.layoutAlgorithm=n1(l),g.direction=B,g.nodeSpacing=d?.nodeSpacing||50,g.rankSpacing=d?.rankSpacing||50,g.markers=["point","circle","cross"],g.diagramId=i,J.debug("REF1:",g),await o1(g,c);const D=g.config.flowchart?.diagramPadding??8;at.insertTitle(c,"flowchartTitleText",d?.titleTopMargin||0,r.db.getDiagramTitle()),r1(c,D,"flowchart",d?.useMaxWidth||!1)},"draw"),N1={getClasses:I1,draw:R1},ot=(function(){var e=m(function(be,p,f,k){for(f=f||{},k=be.length;k--;f[be[k]]=p);return f},"o"),i=[1,4],a=[1,3],r=[1,5],n=[1,8,9,10,11,27,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],d=[2,2],l=[1,13],g=[1,14],c=[1,15],B=[1,16],D=[1,23],V=[1,25],A=[1,26],b=[1,27],E=[1,51],I=[1,50],Z=[1,30],ke=[1,31],W=[1,32],$=[1,33],Se=[1,34],u=[1,46],h=[1,48],x=[1,44],F=[1,49],R=[1,45],N=[1,52],G=[1,47],M=[1,53],O=[1,54],Pe=[1,35],Oe=[1,36],Ue=[1,37],je=[1,38],We=[1,39],Ae=[1,59],_=[1,8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],te=[1,63],se=[1,62],ie=[1,64],fe=[8,9,11,76,78,79],ut=[1,80],Xe=[1,81],Te=[1,95],ye=[1,100],Ee=[1,99],xe=[1,96],Fe=[1,92],_e=[1,98],ve=[1,94],Be=[1,101],Le=[1,97],we=[1,102],Ve=[1,93],me=[8,9,10,11,40,76,78,79],j=[8,9,10,11,40,47,76,78,79],H=[8,9,10,11,29,40,45,47,49,51,53,55,57,59,61,64,66,68,69,71,76,78,79,90,103,106,107,110,112,115,116,117],lt=[8,9,11,45,61,76,78,79,90,103,106,107,110,112,115,116,117],ct=[2,26],Ie=[45,61,90,103,106,107,110,112,115,116,117],ht=[1,126],dt=[1,127],ze=[1,129],Ke=[1,128],pt=[45,61,63,75,90,103,106,107,110,112,115,116,117],ft=[1,138],gt=[1,152],bt=[1,153],kt=[1,154],At=[1,155],mt=[1,140],Dt=[1,142],Ct=[1,146],St=[1,147],Tt=[1,148],yt=[1,149],Et=[1,150],xt=[1,151],Ft=[1,156],_t=[1,157],vt=[1,136],Bt=[1,137],Lt=[1,144],wt=[1,139],Vt=[1,143],It=[1,141],Qe=[8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],Rt=[1,159],Nt=[8,9,10,11,76,78,79],Gt=[1,160],Mt=[1,162],w=[8,9,11],q=[8,9,10,11,14,45,61,90,106,107,110,112,115,116,117],C=[1,182],z=[1,178],K=[1,179],S=[1,183],T=[1,180],y=[1,181],Re=[78,117,120],v=[8,9,10,11,12,14,27,29,32,45,61,76,85,86,87,88,89,90,91,106,110,112,115,116,117],Pt=[10,107],ge=[31,50,52,54,56,58,63,65,67,68,70,72,117,118,119],re=[1,253],ae=[1,251],ne=[1,255],oe=[1,249],ue=[1,250],le=[1,252],ce=[1,254],he=[1,256],Ne=[1,273],Ot=[8,9,11,107],ee=[8,9,10,11,61,85,106,107,110,111,112,113],Je={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,withShape:41,node:42,link:43,styledVertex:44,AMP:45,vertex:46,STYLE_SEPARATOR:47,idString:48,DOUBLECIRCLESTART:49,DOUBLECIRCLEEND:50,PS:51,PE:52,"(-":53,"-)":54,STADIUMSTART:55,STADIUMEND:56,SUBROUTINESTART:57,SUBROUTINEEND:58,VERTEX_WITH_PROPS_START:59,"NODE_STRING[field]":60,COLON:61,"NODE_STRING[value]":62,PIPE:63,CYLINDERSTART:64,CYLINDEREND:65,DIAMOND_START:66,DIAMOND_STOP:67,TAGEND:68,TRAPSTART:69,TRAPEND:70,INVTRAPSTART:71,INVTRAPEND:72,linkStatement:73,arrowText:74,TESTSTR:75,START_LINK:76,edgeText:77,LINK:78,LINK_ID:79,edgeTextToken:80,STR:81,MD_STR:82,textToken:83,keywords:84,STYLE:85,LINKSTYLE:86,CLASSDEF:87,CLASS:88,CLICK:89,DOWN:90,UP:91,textNoTagsToken:92,stylesOpt:93,"idString[vertex]":94,"idString[class]":95,CALLBACKNAME:96,CALLBACKARGS:97,HREF:98,LINK_TARGET:99,"STR[link]":100,"STR[tooltip]":101,alphaNum:102,DEFAULT:103,numList:104,INTERPOLATE:105,NUM:106,COMMA:107,style:108,styleComponent:109,NODE_STRING:110,UNIT:111,BRKT:112,PCT:113,idStringToken:114,MINUS:115,MULT:116,UNICODE_TEXT:117,TEXT:118,TAGSTART:119,EDGE_TEXT:120,alphaNumToken:121,direction_tb:122,direction_bt:123,direction_rl:124,direction_lr:125,direction_td:126,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",45:"AMP",47:"STYLE_SEPARATOR",49:"DOUBLECIRCLESTART",50:"DOUBLECIRCLEEND",51:"PS",52:"PE",53:"(-",54:"-)",55:"STADIUMSTART",56:"STADIUMEND",57:"SUBROUTINESTART",58:"SUBROUTINEEND",59:"VERTEX_WITH_PROPS_START",60:"NODE_STRING[field]",61:"COLON",62:"NODE_STRING[value]",63:"PIPE",64:"CYLINDERSTART",65:"CYLINDEREND",66:"DIAMOND_START",67:"DIAMOND_STOP",68:"TAGEND",69:"TRAPSTART",70:"TRAPEND",71:"INVTRAPSTART",72:"INVTRAPEND",75:"TESTSTR",76:"START_LINK",78:"LINK",79:"LINK_ID",81:"STR",82:"MD_STR",85:"STYLE",86:"LINKSTYLE",87:"CLASSDEF",88:"CLASS",89:"CLICK",90:"DOWN",91:"UP",94:"idString[vertex]",95:"idString[class]",96:"CALLBACKNAME",97:"CALLBACKARGS",98:"HREF",99:"LINK_TARGET",100:"STR[link]",101:"STR[tooltip]",103:"DEFAULT",105:"INTERPOLATE",106:"NUM",107:"COMMA",110:"NODE_STRING",111:"UNIT",112:"BRKT",113:"PCT",115:"MINUS",116:"MULT",117:"UNICODE_TEXT",118:"TEXT",119:"TAGSTART",120:"EDGE_TEXT",122:"direction_tb",123:"direction_bt",124:"direction_rl",125:"direction_lr",126:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[41,2],[41,3],[20,3],[20,4],[20,3],[20,4],[20,2],[20,1],[20,2],[20,1],[42,1],[42,5],[42,5],[44,1],[44,3],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,8],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[43,2],[43,3],[43,3],[43,1],[43,3],[43,4],[77,1],[77,2],[77,1],[77,1],[73,1],[73,2],[74,3],[30,1],[30,2],[30,1],[30,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[104,1],[104,3],[93,1],[93,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[83,1],[83,1],[83,1],[83,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[80,1],[80,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[48,1],[48,2],[102,1],[102,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:m(function(p,f,k,o,L,t,Me){var s=t.length-1;switch(L){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 187:this.$=t[s];break;case 11:o.setDirection("TB"),this.$="TB";break;case 12:o.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=o.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=o.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=o.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),o.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),o.setAccDescription(this.$);break;case 43:this.$=t[s-1]+t[s];break;case 44:this.$=t[s];break;case 45:this.$={nodes:t[s-1],shapeData:t[s]};break;case 46:this.$={nodes:t[s-2],shapeData:t[s]};break;case 47:o.addVertex(t[s].nodes[t[s].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[s].shapeData),o.addLink(t[s-2].stmt,t[s].nodes,t[s-1]),this.$={stmt:t[s].nodes,nodes:t[s].nodes.concat(t[s-2].nodes)};break;case 48:o.addVertex(t[s-1].nodes[t[s-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[s-1].shapeData),o.addLink(t[s-3].stmt,t[s-1].nodes,t[s-2]),this.$={stmt:t[s-1].nodes,nodes:t[s-1].nodes.concat(t[s-3].nodes)};break;case 49:o.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 50:o.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 51:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 52:o.addVertex(t[s].nodes[t[s].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[s].shapeData),this.$={stmt:t[s].nodes,nodes:t[s].nodes,shapeData:t[s].shapeData};break;case 53:o.addVertex(t[s-1].nodes[t[s-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[s-1].shapeData),this.$={stmt:t[s-1].nodes,nodes:t[s-1].nodes,shapeData:t[s-1].shapeData};break;case 54:this.$={stmt:t[s],nodes:t[s]};break;case 55:this.$=[t[s]];break;case 56:o.addVertex(t[s-4].nodes[t[s-4].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[s-4].shapeData),this.$=t[s-4].nodes.concat(t[s]);break;case 57:this.$=t[s-4].concat(t[s]);break;case 58:this.$=t[s];break;case 59:this.$=t[s-2],o.setClass(t[s-2],t[s]);break;case 60:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"square");break;case 61:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"doublecircle");break;case 62:this.$=t[s-5],o.addVertex(t[s-5],t[s-2],"circle");break;case 63:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"ellipse");break;case 64:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"stadium");break;case 65:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"subroutine");break;case 66:this.$=t[s-7],o.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 67:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"cylinder");break;case 68:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"round");break;case 69:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"diamond");break;case 70:this.$=t[s-5],o.addVertex(t[s-5],t[s-2],"hexagon");break;case 71:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"odd");break;case 72:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"trapezoid");break;case 73:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 74:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"lean_right");break;case 75:this.$=t[s-3],o.addVertex(t[s-3],t[s-1],"lean_left");break;case 76:this.$=t[s],o.addVertex(t[s]);break;case 77:t[s-1].text=t[s],this.$=t[s-1];break;case 78:case 79:t[s-2].text=t[s-1],this.$=t[s-2];break;case 80:this.$=t[s];break;case 81:var P=o.destructLink(t[s],t[s-2]);this.$={type:P.type,stroke:P.stroke,length:P.length,text:t[s-1]};break;case 82:var P=o.destructLink(t[s],t[s-2]);this.$={type:P.type,stroke:P.stroke,length:P.length,text:t[s-1],id:t[s-3]};break;case 83:this.$={text:t[s],type:"text"};break;case 84:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 85:this.$={text:t[s],type:"string"};break;case 86:this.$={text:t[s],type:"markdown"};break;case 87:var P=o.destructLink(t[s]);this.$={type:P.type,stroke:P.stroke,length:P.length};break;case 88:var P=o.destructLink(t[s]);this.$={type:P.type,stroke:P.stroke,length:P.length,id:t[s-1]};break;case 89:this.$=t[s-1];break;case 90:this.$={text:t[s],type:"text"};break;case 91:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 92:this.$={text:t[s],type:"string"};break;case 93:case 108:this.$={text:t[s],type:"markdown"};break;case 105:this.$={text:t[s],type:"text"};break;case 106:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 107:this.$={text:t[s],type:"text"};break;case 109:this.$=t[s-4],o.addClass(t[s-2],t[s]);break;case 110:this.$=t[s-4],o.setClass(t[s-2],t[s]);break;case 111:case 119:this.$=t[s-1],o.setClickEvent(t[s-1],t[s]);break;case 112:case 120:this.$=t[s-3],o.setClickEvent(t[s-3],t[s-2]),o.setTooltip(t[s-3],t[s]);break;case 113:this.$=t[s-2],o.setClickEvent(t[s-2],t[s-1],t[s]);break;case 114:this.$=t[s-4],o.setClickEvent(t[s-4],t[s-3],t[s-2]),o.setTooltip(t[s-4],t[s]);break;case 115:this.$=t[s-2],o.setLink(t[s-2],t[s]);break;case 116:this.$=t[s-4],o.setLink(t[s-4],t[s-2]),o.setTooltip(t[s-4],t[s]);break;case 117:this.$=t[s-4],o.setLink(t[s-4],t[s-2],t[s]);break;case 118:this.$=t[s-6],o.setLink(t[s-6],t[s-4],t[s]),o.setTooltip(t[s-6],t[s-2]);break;case 121:this.$=t[s-1],o.setLink(t[s-1],t[s]);break;case 122:this.$=t[s-3],o.setLink(t[s-3],t[s-2]),o.setTooltip(t[s-3],t[s]);break;case 123:this.$=t[s-3],o.setLink(t[s-3],t[s-2],t[s]);break;case 124:this.$=t[s-5],o.setLink(t[s-5],t[s-4],t[s]),o.setTooltip(t[s-5],t[s-2]);break;case 125:this.$=t[s-4],o.addVertex(t[s-2],void 0,void 0,t[s]);break;case 126:this.$=t[s-4],o.updateLink([t[s-2]],t[s]);break;case 127:this.$=t[s-4],o.updateLink(t[s-2],t[s]);break;case 128:this.$=t[s-8],o.updateLinkInterpolate([t[s-6]],t[s-2]),o.updateLink([t[s-6]],t[s]);break;case 129:this.$=t[s-8],o.updateLinkInterpolate(t[s-6],t[s-2]),o.updateLink(t[s-6],t[s]);break;case 130:this.$=t[s-6],o.updateLinkInterpolate([t[s-4]],t[s]);break;case 131:this.$=t[s-6],o.updateLinkInterpolate(t[s-4],t[s]);break;case 132:case 134:this.$=[t[s]];break;case 133:case 135:t[s-2].push(t[s]),this.$=t[s-2];break;case 137:this.$=t[s-1]+t[s];break;case 185:this.$=t[s];break;case 186:this.$=t[s-1]+""+t[s];break;case 188:this.$=t[s-1]+""+t[s];break;case 189:this.$={stmt:"dir",value:"TB"};break;case 190:this.$={stmt:"dir",value:"BT"};break;case 191:this.$={stmt:"dir",value:"RL"};break;case 192:this.$={stmt:"dir",value:"LR"};break;case 193:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:a,12:r},{1:[3]},e(n,d,{5:6}),{4:7,9:i,10:a,12:r},{4:8,9:i,10:a,12:r},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:l,9:g,10:c,11:B,20:17,22:18,23:19,24:20,25:21,26:22,27:D,33:24,34:V,36:A,38:b,41:29,42:28,44:40,45:E,46:41,48:42,61:I,85:Z,86:ke,87:W,88:$,89:Se,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O,122:Pe,123:Oe,124:Ue,125:je,126:We},e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),{8:[1,56],9:[1,57],10:Ae,15:55,18:58},e(_,[2,3]),e(_,[2,4]),e(_,[2,5]),e(_,[2,6]),e(_,[2,7]),e(_,[2,8]),{8:te,9:se,11:ie,21:60,43:61,73:65,76:[1,66],78:[1,68],79:[1,67]},{8:te,9:se,11:ie,21:69},{8:te,9:se,11:ie,21:70},{8:te,9:se,11:ie,21:71},{8:te,9:se,11:ie,21:72},{8:te,9:se,11:ie,21:73},{8:te,9:se,10:[1,74],11:ie,21:75},e(_,[2,36]),{35:[1,76]},{37:[1,77]},e(_,[2,39]),e(fe,[2,54],{18:78,39:79,10:ut,40:Xe}),e(fe,[2,52],{18:82,10:Ae}),{10:[1,83]},{10:[1,84]},{10:[1,85]},{10:[1,86]},{14:Te,45:ye,61:Ee,81:[1,90],90:xe,96:[1,87],98:[1,88],102:89,106:Fe,107:_e,110:ve,112:Be,115:Le,116:we,117:Ve,121:91},e(_,[2,189]),e(_,[2,190]),e(_,[2,191]),e(_,[2,192]),e(_,[2,193]),e(me,[2,55]),e(me,[2,58],{47:[1,103]}),e(j,[2,76],{114:116,29:[1,104],45:E,49:[1,105],51:[1,106],53:[1,107],55:[1,108],57:[1,109],59:[1,110],61:I,64:[1,111],66:[1,112],68:[1,113],69:[1,114],71:[1,115],90:u,103:h,106:x,107:F,110:R,112:N,115:G,116:M,117:O}),e(H,[2,185]),e(H,[2,146]),e(H,[2,147]),e(H,[2,148]),e(H,[2,149]),e(H,[2,150]),e(H,[2,151]),e(H,[2,152]),e(H,[2,153]),e(H,[2,154]),e(H,[2,155]),e(H,[2,156]),e(n,[2,12]),e(n,[2,18]),e(n,[2,19]),{9:[1,117]},e(lt,ct,{18:118,10:Ae}),e(_,[2,27]),{41:119,42:120,44:40,45:E,46:41,48:42,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},e(_,[2,40]),e(_,[2,41]),e(_,[2,42]),e(Ie,[2,80],{74:121,63:[1,123],75:[1,122]}),{77:124,80:125,81:ht,82:dt,117:ze,120:Ke},{76:[1,130],78:[1,131]},e(pt,[2,87]),e(_,[2,28]),e(_,[2,29]),e(_,[2,30]),e(_,[2,31]),e(_,[2,32]),{10:ft,12:gt,14:bt,27:kt,28:132,32:At,45:mt,61:Dt,76:Ct,81:[1,134],82:[1,135],84:145,85:St,86:Tt,87:yt,88:Et,89:xt,90:Ft,91:_t,92:133,106:vt,110:Bt,112:Lt,115:wt,116:Vt,117:It},e(Qe,d,{5:158}),e(_,[2,37]),e(_,[2,38]),e(fe,[2,51],{45:Rt}),e(Nt,[2,45],{40:Gt}),e([8,9,11,45,76,78,79],ct,{18:118,39:161,10:Ae,40:Xe}),e(me,[2,44]),e(fe,[2,53],{45:Mt}),{45:E,48:163,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},{103:[1,164],104:165,106:[1,166]},{45:E,48:167,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},{45:E,48:168,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},e(w,[2,111],{10:[1,169],97:[1,170]}),{81:[1,171]},e(w,[2,119],{121:173,10:[1,172],14:Te,45:ye,61:Ee,90:xe,106:Fe,107:_e,110:ve,112:Be,115:Le,116:we,117:Ve}),e(w,[2,121],{10:[1,174]}),e(q,[2,187]),e(q,[2,174]),e(q,[2,175]),e(q,[2,176]),e(q,[2,177]),e(q,[2,178]),e(q,[2,179]),e(q,[2,180]),e(q,[2,181]),e(q,[2,182]),e(q,[2,183]),e(q,[2,184]),{45:E,48:175,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},{30:176,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:184,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:186,51:[1,185],68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:187,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:188,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:189,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{110:[1,190]},{30:191,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:192,66:[1,193],68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:194,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:195,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{30:196,68:C,81:z,82:K,83:177,117:S,118:T,119:y},e(H,[2,186]),e(n,[2,20]),e(lt,[2,25]),e(fe,[2,47],{18:197,10:Ae}),e(fe,[2,49],{39:79,18:198,10:ut,40:Xe}),e(Ie,[2,77],{10:[1,199]}),{10:[1,200]},{30:201,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{78:[1,202],80:203,117:ze,120:Ke},e(Re,[2,83]),e(Re,[2,85]),e(Re,[2,86]),e(Re,[2,172]),e(Re,[2,173]),{77:204,80:125,81:ht,82:dt,117:ze,120:Ke},e(pt,[2,88]),{8:te,9:se,10:ft,11:ie,12:gt,14:bt,21:206,27:kt,29:[1,205],32:At,45:mt,61:Dt,76:Ct,84:145,85:St,86:Tt,87:yt,88:Et,89:xt,90:Ft,91:_t,92:207,106:vt,110:Bt,112:Lt,115:wt,116:Vt,117:It},e(v,[2,105]),e(v,[2,107]),e(v,[2,108]),e(v,[2,161]),e(v,[2,162]),e(v,[2,163]),e(v,[2,164]),e(v,[2,165]),e(v,[2,166]),e(v,[2,167]),e(v,[2,168]),e(v,[2,169]),e(v,[2,170]),e(v,[2,171]),e(v,[2,94]),e(v,[2,95]),e(v,[2,96]),e(v,[2,97]),e(v,[2,98]),e(v,[2,99]),e(v,[2,100]),e(v,[2,101]),e(v,[2,102]),e(v,[2,103]),e(v,[2,104]),{6:11,7:12,8:l,9:g,10:c,11:B,20:17,22:18,23:19,24:20,25:21,26:22,27:D,32:[1,208],33:24,34:V,36:A,38:b,41:29,42:28,44:40,45:E,46:41,48:42,61:I,85:Z,86:ke,87:W,88:$,89:Se,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O,122:Pe,123:Oe,124:Ue,125:je,126:We},{10:Ae,18:209},e(me,[2,43]),e(Nt,[2,46],{40:Gt}),{10:Ae,18:210},{10:[1,211],45:E,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:116,115:G,116:M,117:O},{10:[1,212]},{10:[1,213],107:[1,214]},e(Pt,[2,132]),{10:[1,215],45:E,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:116,115:G,116:M,117:O},{10:[1,216],45:E,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:116,115:G,116:M,117:O},{81:[1,217]},e(w,[2,113],{10:[1,218]}),e(w,[2,115],{10:[1,219]}),{81:[1,220]},e(q,[2,188]),{81:[1,221],99:[1,222]},e(me,[2,59],{114:116,45:E,61:I,90:u,103:h,106:x,107:F,110:R,112:N,115:G,116:M,117:O}),{31:[1,223],68:C,83:224,117:S,118:T,119:y},e(ge,[2,90]),e(ge,[2,92]),e(ge,[2,93]),e(ge,[2,157]),e(ge,[2,158]),e(ge,[2,159]),e(ge,[2,160]),{50:[1,225],68:C,83:224,117:S,118:T,119:y},{30:226,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{52:[1,227],68:C,83:224,117:S,118:T,119:y},{54:[1,228],68:C,83:224,117:S,118:T,119:y},{56:[1,229],68:C,83:224,117:S,118:T,119:y},{58:[1,230],68:C,83:224,117:S,118:T,119:y},{61:[1,231]},{65:[1,232],68:C,83:224,117:S,118:T,119:y},{67:[1,233],68:C,83:224,117:S,118:T,119:y},{30:234,68:C,81:z,82:K,83:177,117:S,118:T,119:y},{31:[1,235],68:C,83:224,117:S,118:T,119:y},{68:C,70:[1,236],72:[1,237],83:224,117:S,118:T,119:y},{68:C,70:[1,239],72:[1,238],83:224,117:S,118:T,119:y},e(fe,[2,48],{45:Mt}),e(fe,[2,50],{45:Rt}),e(Ie,[2,79]),e(Ie,[2,78]),{63:[1,240],68:C,83:224,117:S,118:T,119:y},e(Ie,[2,81]),e(Re,[2,84]),{78:[1,241],80:203,117:ze,120:Ke},{30:242,68:C,81:z,82:K,83:177,117:S,118:T,119:y},e(Qe,d,{5:243}),e(v,[2,106]),e(_,[2,35]),{44:244,45:E,46:41,48:42,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},{44:245,45:E,46:41,48:42,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},{10:re,61:ae,85:ne,93:246,106:oe,108:247,109:248,110:ue,111:le,112:ce,113:he},{10:re,61:ae,85:ne,93:257,105:[1,258],106:oe,108:247,109:248,110:ue,111:le,112:ce,113:he},{10:re,61:ae,85:ne,93:259,105:[1,260],106:oe,108:247,109:248,110:ue,111:le,112:ce,113:he},{106:[1,261]},{10:re,61:ae,85:ne,93:262,106:oe,108:247,109:248,110:ue,111:le,112:ce,113:he},{45:E,48:263,61:I,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O},e(w,[2,112]),{81:[1,264]},{81:[1,265],99:[1,266]},e(w,[2,120]),e(w,[2,122],{10:[1,267]}),e(w,[2,123]),e(j,[2,60]),e(ge,[2,91]),e(j,[2,61]),{52:[1,268],68:C,83:224,117:S,118:T,119:y},e(j,[2,68]),e(j,[2,63]),e(j,[2,64]),e(j,[2,65]),{110:[1,269]},e(j,[2,67]),e(j,[2,69]),{67:[1,270],68:C,83:224,117:S,118:T,119:y},e(j,[2,71]),e(j,[2,72]),e(j,[2,74]),e(j,[2,73]),e(j,[2,75]),e([10,45,61,90,103,106,107,110,112,115,116,117],[2,89]),e(Ie,[2,82]),{31:[1,271],68:C,83:224,117:S,118:T,119:y},{6:11,7:12,8:l,9:g,10:c,11:B,20:17,22:18,23:19,24:20,25:21,26:22,27:D,32:[1,272],33:24,34:V,36:A,38:b,41:29,42:28,44:40,45:E,46:41,48:42,61:I,85:Z,86:ke,87:W,88:$,89:Se,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O,122:Pe,123:Oe,124:Ue,125:je,126:We},e(me,[2,57]),e(me,[2,56]),e(w,[2,125],{107:Ne}),e(Ot,[2,134],{109:274,10:re,61:ae,85:ne,106:oe,110:ue,111:le,112:ce,113:he}),e(ee,[2,136]),e(ee,[2,138]),e(ee,[2,139]),e(ee,[2,140]),e(ee,[2,141]),e(ee,[2,142]),e(ee,[2,143]),e(ee,[2,144]),e(ee,[2,145]),e(w,[2,126],{107:Ne}),{10:[1,275]},e(w,[2,127],{107:Ne}),{10:[1,276]},e(Pt,[2,133]),e(w,[2,109],{107:Ne}),e(w,[2,110],{114:116,45:E,61:I,90:u,103:h,106:x,107:F,110:R,112:N,115:G,116:M,117:O}),e(w,[2,114]),e(w,[2,116],{10:[1,277]}),e(w,[2,117]),{99:[1,278]},{52:[1,279]},{63:[1,280]},{67:[1,281]},{8:te,9:se,11:ie,21:282},e(_,[2,34]),{10:re,61:ae,85:ne,106:oe,108:283,109:248,110:ue,111:le,112:ce,113:he},e(ee,[2,137]),{14:Te,45:ye,61:Ee,90:xe,102:284,106:Fe,107:_e,110:ve,112:Be,115:Le,116:we,117:Ve,121:91},{14:Te,45:ye,61:Ee,90:xe,102:285,106:Fe,107:_e,110:ve,112:Be,115:Le,116:we,117:Ve,121:91},{99:[1,286]},e(w,[2,124]),e(j,[2,62]),{30:287,68:C,81:z,82:K,83:177,117:S,118:T,119:y},e(j,[2,70]),e(Qe,d,{5:288}),e(Ot,[2,135],{109:274,10:re,61:ae,85:ne,106:oe,110:ue,111:le,112:ce,113:he}),e(w,[2,130],{121:173,10:[1,289],14:Te,45:ye,61:Ee,90:xe,106:Fe,107:_e,110:ve,112:Be,115:Le,116:we,117:Ve}),e(w,[2,131],{121:173,10:[1,290],14:Te,45:ye,61:Ee,90:xe,106:Fe,107:_e,110:ve,112:Be,115:Le,116:we,117:Ve}),e(w,[2,118]),{31:[1,291],68:C,83:224,117:S,118:T,119:y},{6:11,7:12,8:l,9:g,10:c,11:B,20:17,22:18,23:19,24:20,25:21,26:22,27:D,32:[1,292],33:24,34:V,36:A,38:b,41:29,42:28,44:40,45:E,46:41,48:42,61:I,85:Z,86:ke,87:W,88:$,89:Se,90:u,103:h,106:x,107:F,110:R,112:N,114:43,115:G,116:M,117:O,122:Pe,123:Oe,124:Ue,125:je,126:We},{10:re,61:ae,85:ne,93:293,106:oe,108:247,109:248,110:ue,111:le,112:ce,113:he},{10:re,61:ae,85:ne,93:294,106:oe,108:247,109:248,110:ue,111:le,112:ce,113:he},e(j,[2,66]),e(_,[2,33]),e(w,[2,128],{107:Ne}),e(w,[2,129],{107:Ne})],defaultActions:{},parseError:m(function(p,f){if(f.recoverable)this.trace(p);else{var k=new Error(p);throw k.hash=f,k}},"parseError"),parse:m(function(p){var f=this,k=[0],o=[],L=[null],t=[],Me=this.table,s="",P=0,Ut=0,Jt=2,jt=1,Zt=t.slice.call(arguments,1),U=Object.create(this.lexer),De={yy:{}};for(var Ze in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ze)&&(De.yy[Ze]=this.yy[Ze]);U.setInput(p,De.yy),De.yy.lexer=U,De.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var $e=U.yylloc;t.push($e);var $t=U.options&&U.options.ranges;typeof De.yy.parseError=="function"?this.parseError=De.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function e1(X){k.length=k.length-2*X,L.length=L.length-X,t.length=t.length-X}m(e1,"popStack");function Wt(){var X;return X=o.pop()||U.lex()||jt,typeof X!="number"&&(X instanceof Array&&(o=X,X=o.pop()),X=f.symbols_[X]||X),X}m(Wt,"lex");for(var Y,Ce,Q,et,Ge={},He,de,zt,qe;;){if(Ce=k[k.length-1],this.defaultActions[Ce]?Q=this.defaultActions[Ce]:((Y===null||typeof Y>"u")&&(Y=Wt()),Q=Me[Ce]&&Me[Ce][Y]),typeof Q>"u"||!Q.length||!Q[0]){var tt="";qe=[];for(He in Me[Ce])this.terminals_[He]&&He>Jt&&qe.push("'"+this.terminals_[He]+"'");U.showPosition?tt="Parse error on line "+(P+1)+`:
10
+ `+U.showPosition()+`
11
+ Expecting `+qe.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":tt="Parse error on line "+(P+1)+": Unexpected "+(Y==jt?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(tt,{text:U.match,token:this.terminals_[Y]||Y,line:U.yylineno,loc:$e,expected:qe})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ce+", token: "+Y);switch(Q[0]){case 1:k.push(Y),L.push(U.yytext),t.push(U.yylloc),k.push(Q[1]),Y=null,Ut=U.yyleng,s=U.yytext,P=U.yylineno,$e=U.yylloc;break;case 2:if(de=this.productions_[Q[1]][1],Ge.$=L[L.length-de],Ge._$={first_line:t[t.length-(de||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(de||1)].first_column,last_column:t[t.length-1].last_column},$t&&(Ge._$.range=[t[t.length-(de||1)].range[0],t[t.length-1].range[1]]),et=this.performAction.apply(Ge,[s,Ut,P,De.yy,Q[1],L,t].concat(Zt)),typeof et<"u")return et;de&&(k=k.slice(0,-1*de*2),L=L.slice(0,-1*de),t=t.slice(0,-1*de)),k.push(this.productions_[Q[1]][0]),L.push(Ge.$),t.push(Ge._$),zt=Me[k[k.length-2]][k[k.length-1]],k.push(zt);break;case 3:return!0}}return!0},"parse")},Qt=(function(){var be={EOF:1,parseError:m(function(f,k){if(this.yy.parser)this.yy.parser.parseError(f,k);else throw new Error(f)},"parseError"),setInput:m(function(p,f){return this.yy=f||this.yy||{},this._input=p,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:m(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var f=p.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:m(function(p){var f=p.length,k=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var o=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),k.length-1&&(this.yylineno-=k.length-1);var L=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:k?(k.length===o.length?this.yylloc.first_column:0)+o[o.length-k.length].length-k[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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).
12
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(p){this.unput(this.match.slice(p))},"less"),pastInput:m(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var p=this.pastInput(),f=new Array(p.length+1).join("-");return p+this.upcomingInput()+`
13
+ `+f+"^"},"showPosition"),test_match:m(function(p,f){var k,o,L;if(this.options.backtrack_lexer&&(L={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&&(L.yylloc.range=this.yylloc.range.slice(0))),o=p[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],k=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var t in L)this[t]=L[t];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,f,k,o;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),t=0;t<L.length;t++)if(k=this._input.match(this.rules[L[t]]),k&&(!f||k[0].length>f[0].length)){if(f=k,o=t,this.options.backtrack_lexer){if(p=this.test_match(k,L[t]),p!==!1)return p;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(p=this.test_match(f,L[o]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
14
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var f=this.next();return f||this.lex()},"lex"),begin:m(function(f){this.conditionStack.push(f)},"begin"),popState:m(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(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:m(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:m(function(f){this.begin(f)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:m(function(f,k,o,L){switch(o){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),k.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return k.yytext=k.yytext.replace(t,"<br/>"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 96;case 17:this.popState();break;case 18:return 97;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 85;case 26:return 103;case 27:return 86;case 28:return 105;case 29:return 87;case 30:return 88;case 31:return 98;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 89;case 35:return f.lex.firstGraph()&&this.begin("dir"),12;case 36:return f.lex.firstGraph()&&this.begin("dir"),12;case 37:return f.lex.firstGraph()&&this.begin("dir"),12;case 38:return f.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:return 99;case 42:return 99;case 43:return 99;case 44:return 99;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 126;case 61:return 79;case 62:return 106;case 63:return 112;case 64:return 47;case 65:return 61;case 66:return 45;case 67:return 8;case 68:return 107;case 69:return 116;case 70:return this.popState(),78;case 71:return this.pushState("edgeText"),76;case 72:return 120;case 73:return this.popState(),78;case 74:return this.pushState("thickEdgeText"),76;case 75:return 120;case 76:return this.popState(),78;case 77:return this.pushState("dottedEdgeText"),76;case 78:return 120;case 79:return 78;case 80:return this.popState(),54;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),53;case 83:return this.popState(),56;case 84:return this.pushState("text"),55;case 85:return this.popState(),58;case 86:return this.pushState("text"),57;case 87:return 59;case 88:return this.pushState("text"),68;case 89:return this.popState(),65;case 90:return this.pushState("text"),64;case 91:return this.popState(),50;case 92:return this.pushState("text"),49;case 93:return this.popState(),70;case 94:return this.popState(),72;case 95:return 118;case 96:return this.pushState("trapText"),69;case 97:return this.pushState("trapText"),71;case 98:return 119;case 99:return 68;case 100:return 91;case 101:return"SEP";case 102:return 90;case 103:return 116;case 104:return 112;case 105:return 45;case 106:return 110;case 107:return 115;case 108:return 117;case 109:return this.popState(),63;case 110:return this.pushState("text"),63;case 111:return this.popState(),52;case 112:return this.pushState("text"),51;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),67;case 116:return this.pushState("text"),66;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"\[\]\(\)\{\}\|]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return be})();Je.lexer=Qt;function Ye(){this.yy={}}return m(Ye,"Parser"),Ye.prototype=Je,Je.Parser=Ye,new Ye})();ot.parser=ot;var Ht=ot,qt=Object.assign({},Ht);qt.parse=e=>{const i=e.replace(/}\s*\n/g,`}
15
+ `);return Ht.parse(i)};var G1=qt,M1=m(e=>{const{theme:i,bkgColorArray:a,borderColorArray:r}=e;if(!T1(i,r))return"";const n=y1(e.look),d=E1(a);let l="";for(let g=0;g<x1(e.THEME_COLOR_LIMIT,r);g++){const c=r[g%r.length],B=d?`fill: ${a[g%a.length]};`:"",D=`[data-look="${n}"][data-color-id="color-${g}"]`,V=m(b=>`${D}.node ${b}, ${D}.rough-node ${b}`,"collapsedRule"),A=m(b=>`${D}.swimlane.cluster .swimlane-title${b}, ${D}.swimlane.cluster .swimlane-body${b}`,"laneRule");l+=`
16
+
17
+ ${D}.cluster:not(.swimlane) rect {
18
+ stroke: ${c};
19
+ ${B}
20
+ }
21
+
22
+ ${D}.cluster:not(.swimlane) path {
23
+ stroke: ${c};
24
+ ${B}
25
+ }
26
+
27
+ /* Lane, classic and neo. */
28
+ ${D}.swimlane.cluster rect.swimlane-title,
29
+ ${D}.swimlane.cluster rect.swimlane-body {
30
+ stroke: ${c};
31
+ ${B}
32
+ }
33
+
34
+ /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
35
+ ${A(" path:nth-of-type(2)")} {
36
+ stroke: ${c};
37
+ }
38
+ ${d?`
39
+ /* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */
40
+ ${A(" path:first-of-type")} {
41
+ stroke: ${a[g%a.length]};
42
+ }
43
+ `:""}
44
+ ${V(".collapsed-group")},
45
+ ${V(".collapsed-group path")} {
46
+ stroke: ${c};
47
+ ${B}
48
+ }
49
+
50
+ /* The ellipsis dots and the separator take clusterBorder further down, so without
51
+ these the container is palette-coloured while its own markers are not. */
52
+ ${V(".collapsed-indicator")} {
53
+ fill: ${c};
54
+ }
55
+
56
+ ${V(".collapsed-separator")} {
57
+ stroke: ${c};
58
+ }
59
+ `}return l},"genColor"),P1=m((e,i)=>{const a=_1,r=a(e,"r"),n=a(e,"g"),d=a(e,"b");return F1(r,n,d,i)},"fade"),O1=m(e=>`${M1(e)}
60
+ .label {
61
+ font-family: ${e.fontFamily};
62
+ color: ${e.nodeTextColor||e.textColor};
63
+ }
64
+ .cluster-label text {
65
+ fill: ${e.titleColor};
66
+ }
67
+ .cluster-label span {
68
+ color: ${e.titleColor};
69
+ }
70
+ .cluster-label span p {
71
+ background-color: transparent;
72
+ }
73
+
74
+ .label text,span {
75
+ fill: ${e.nodeTextColor||e.textColor};
76
+ color: ${e.nodeTextColor||e.textColor};
77
+ }
78
+
79
+ .node rect,
80
+ .node circle,
81
+ .node ellipse,
82
+ .node polygon,
83
+ .node path {
84
+ fill: ${e.mainBkg};
85
+ stroke: ${e.nodeBorder};
86
+ stroke-width: ${e.strokeWidth??1}px;
87
+ }
88
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
89
+ text-anchor: middle;
90
+ }
91
+
92
+ .node .katex path {
93
+ fill: #000;
94
+ stroke: #000;
95
+ stroke-width: 1px;
96
+ }
97
+
98
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
99
+ text-align: center;
100
+ }
101
+ .node.clickable {
102
+ cursor: pointer;
103
+ }
104
+
105
+
106
+ .root .anchor path {
107
+ fill: ${e.lineColor} !important;
108
+ stroke-width: 0;
109
+ stroke: ${e.lineColor};
110
+ }
111
+
112
+ .arrowheadPath {
113
+ fill: ${e.arrowheadColor};
114
+ }
115
+
116
+ .edgePaths .path {
117
+ stroke: ${e.lineColor};
118
+ stroke-width: ${e.strokeWidth??2}px;
119
+ }
120
+
121
+ .flowchart-link {
122
+ stroke: ${e.lineColor};
123
+ fill: none;
124
+ }
125
+
126
+ .edgeLabel {
127
+ background-color: ${e.edgeLabelBackground};
128
+ p {
129
+ background-color: ${e.edgeLabelBackground};
130
+ }
131
+ rect {
132
+ opacity: 0.5;
133
+ background-color: ${e.edgeLabelBackground};
134
+ fill: ${e.edgeLabelBackground};
135
+ }
136
+ text-align: center;
137
+ }
138
+
139
+ /* For html labels only */
140
+ .labelBkg {
141
+ background-color: ${P1(e.edgeLabelBackground,.5)};
142
+ // background-color:
143
+ }
144
+
145
+ .cluster rect {
146
+ fill: ${e.clusterBkg};
147
+ stroke: ${e.clusterBorder};
148
+ stroke-width: 1px;
149
+ }
150
+
151
+ .cluster text {
152
+ fill: ${e.titleColor};
153
+ }
154
+
155
+ .cluster span {
156
+ color: ${e.titleColor};
157
+ }
158
+ /* .cluster div {
159
+ color: ${e.titleColor};
160
+ } */
161
+
162
+ /* Collapsed subgraph node (@{ view: collapsed }) */
163
+ .node .collapsed-indicator {
164
+ fill: ${e.clusterBorder};
165
+ stroke: none;
166
+ opacity: 0.6;
167
+ }
168
+
169
+ .node .collapsed-separator {
170
+ stroke: ${e.clusterBorder};
171
+ stroke-width: 0.75px;
172
+ }
173
+
174
+ div.mermaidTooltip {
175
+ position: absolute;
176
+ text-align: center;
177
+ max-width: 200px;
178
+ padding: 2px;
179
+ font-family: ${e.fontFamily};
180
+ font-size: 12px;
181
+ background: ${e.tertiaryColor};
182
+ border: 1px solid ${e.border2};
183
+ border-radius: 2px;
184
+ pointer-events: none;
185
+ z-index: 100;
186
+ }
187
+
188
+ .flowchartTitleText {
189
+ text-anchor: middle;
190
+ font-size: 18px;
191
+ fill: ${e.textColor};
192
+ }
193
+
194
+ rect.text {
195
+ fill: none;
196
+ stroke-width: 0;
197
+ }
198
+
199
+ .icon-shape, .image-shape {
200
+ background-color: ${e.edgeLabelBackground};
201
+ p {
202
+ background-color: ${e.edgeLabelBackground};
203
+ padding: 2px;
204
+ }
205
+ .label rect {
206
+ opacity: 0.5;
207
+ background-color: ${e.edgeLabelBackground};
208
+ fill: ${e.edgeLabelBackground};
209
+ }
210
+ text-align: center;
211
+ }
212
+ ${s1()}
213
+ `,"getStyles"),U1=O1,Xt=m(({styles:e=U1}={})=>({parser:G1,get db(){return new V1},renderer:N1,styles:e,init:m(i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,a1({flowchart:{arrowMarkerAbsolute:i.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),j1=Xt();const X1=Object.freeze(Object.defineProperty({__proto__:null,createFlowDiagram:Xt,diagram:j1},Symbol.toStringTag,{value:"Module"}));export{Xt as c,X1 as f,U1 as s};