@yorz/cli 0.1.4 → 0.1.6

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 (140) hide show
  1. package/dist/cli/index.js +133 -53
  2. package/dist/gui/assets/{abnfDiagram-VRR7QNED-BlILeZZA.js → abnfDiagram-VRR7QNED-Dk823f-p.js} +1 -1
  3. package/dist/gui/assets/{arc-C-xJpbjF.js → arc-CsAcQvy9.js} +1 -1
  4. package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-QdzNii0b.js → architectureDiagram-ZJ3FMSHR-9d29EB_v.js} +1 -1
  5. package/dist/gui/assets/{blockDiagram-677ZJIJ3-BQTAKTET.js → blockDiagram-677ZJIJ3-C_BdniYG.js} +1 -1
  6. package/dist/gui/assets/{c4Diagram-LMCZKHZV-YRh3fqeb.js → c4Diagram-LMCZKHZV-COHS5O60.js} +1 -1
  7. package/dist/gui/assets/channel-Cdj31qNd.js +1 -0
  8. package/dist/gui/assets/{chunk-2Q5K7J3B-Bgu-eeCS.js → chunk-2Q5K7J3B-CdpNMJAI.js} +1 -1
  9. package/dist/gui/assets/{chunk-32BRIVSS-DTLd8wsP.js → chunk-32BRIVSS-C-5zZ7Xl.js} +1 -1
  10. package/dist/gui/assets/{chunk-5VM5RSS4-Cct8HJoz.js → chunk-5VM5RSS4-DNMuZJaP.js} +1 -1
  11. package/dist/gui/assets/{chunk-EX3LRPZG-DBgaA_1N.js → chunk-EX3LRPZG-BGPzkMUB.js} +1 -1
  12. package/dist/gui/assets/{chunk-JWPE2WC7-DELoF8bV.js → chunk-JWPE2WC7-DKHh8QvM.js} +1 -1
  13. package/dist/gui/assets/{chunk-MOJQB5TN-Du6uREYs.js → chunk-MOJQB5TN-DjfrUCo1.js} +1 -1
  14. package/dist/gui/assets/{chunk-RYQCIY6F-CxO6cQdM.js → chunk-RYQCIY6F-CAOzG_fF.js} +1 -1
  15. package/dist/gui/assets/{chunk-V7JOEXUC-BiILBcGA.js → chunk-V7JOEXUC-CiYl0Zr6.js} +1 -1
  16. package/dist/gui/assets/{chunk-VR4S4FIN-BfY2RvG4.js → chunk-VR4S4FIN-C9R15N13.js} +1 -1
  17. package/dist/gui/assets/{chunk-XXDRQBXY-DmsZw6tB.js → chunk-XXDRQBXY-D08V--b4.js} +1 -1
  18. package/dist/gui/assets/classDiagram-OUVF2IWQ-BiCCYKL9.js +1 -0
  19. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-BiCCYKL9.js +1 -0
  20. package/dist/gui/assets/{cose-bilkent-JH36ORCC-gX-8DSxS.js → cose-bilkent-JH36ORCC-h3WvWy31.js} +1 -1
  21. package/dist/gui/assets/{cynefin-VYW2F7L2-vOfRo7cL.js → cynefin-VYW2F7L2-BJJROAhw.js} +1 -1
  22. package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-Dv66a7Rh.js → cynefinDiagram-TSTJHNR4-Cowr6YON.js} +1 -1
  23. package/dist/gui/assets/{dagre-VKFMJZFB-Rk64dDvT.js → dagre-VKFMJZFB-CHQSayFl.js} +1 -1
  24. package/dist/gui/assets/{diagram-FQU43EPY-CyW3IjmQ.js → diagram-FQU43EPY-Dkjm-gpD.js} +1 -1
  25. package/dist/gui/assets/{diagram-G47NLZAW-Caav47lW.js → diagram-G47NLZAW-CWzLjtMq.js} +1 -1
  26. package/dist/gui/assets/{diagram-NH7WQ7WH-_X3ihqNf.js → diagram-NH7WQ7WH-CJEfCmpn.js} +1 -1
  27. package/dist/gui/assets/{diagram-OA4YK3LP-CjbverOE.js → diagram-OA4YK3LP-DKXL4ZCg.js} +1 -1
  28. package/dist/gui/assets/{diagram-WEI45ONY-B93ZeTtT.js → diagram-WEI45ONY-CLvc8CSB.js} +1 -1
  29. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-CdDt4bWx.js → ebnfDiagram-CCIWWBDH-D6NViEZ2.js} +1 -1
  30. package/dist/gui/assets/{erDiagram-Q63AITRT-Bypq-rvj.js → erDiagram-Q63AITRT-B2mRc5jq.js} +1 -1
  31. package/dist/gui/assets/{flowDiagram-23GEKE2U-b-l8_7KP.js → flowDiagram-23GEKE2U-Bu2CgXeG.js} +1 -1
  32. package/dist/gui/assets/{ganttDiagram-NO4QXBWP-BeZFHLhX.js → ganttDiagram-NO4QXBWP-CLqVFiRj.js} +1 -1
  33. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-C0siPGLA.js → gitGraphDiagram-IHSO6WYX-BCeVlEhg.js} +1 -1
  34. package/dist/gui/assets/index-BCf1jTQa.css +1 -0
  35. package/dist/gui/assets/index-BYq7_4Z-.js +663 -0
  36. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-Bk8DNKgG.js → infoDiagram-FWYZ7A6U-CaGDhrD8.js} +1 -1
  37. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-DyS4wmJu.js → ishikawaDiagram-FXEZZL3T-D-IBVo_N.js} +1 -1
  38. package/dist/gui/assets/{journeyDiagram-5HDEW3XC-4jUY7Bzi.js → journeyDiagram-5HDEW3XC-lxFR0Z8q.js} +1 -1
  39. package/dist/gui/assets/{kanban-definition-HUTT4EX6-BRiI4KbM.js → kanban-definition-HUTT4EX6-C1Quf86J.js} +1 -1
  40. package/dist/gui/assets/{linear-C5JkbjyJ.js → linear-BmiZLs2L.js} +1 -1
  41. package/dist/gui/assets/{mermaid.core-ImB_5gdE.js → mermaid.core-Qqp0pI8e.js} +4 -4
  42. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-9_Awmd2W.js → mindmap-definition-LN4V7U3C-CiuAQSSr.js} +1 -1
  43. package/dist/gui/assets/{pegDiagram-2B236MQR-DF_vIYzp.js → pegDiagram-2B236MQR-BWjeZxVp.js} +1 -1
  44. package/dist/gui/assets/{pieDiagram-ENE6RG2P-3TPwXSjQ.js → pieDiagram-ENE6RG2P-C2aubU3s.js} +1 -1
  45. package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-jzJ30mNi.js → quadrantDiagram-ABIIQ3AL-l-nU_0aa.js} +1 -1
  46. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-B-29q3CI.js → railroadDiagram-RFXS5EU6-CLs3ePNd.js} +1 -1
  47. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-BanWpS6g.js → requirementDiagram-TGXJPOKE-noC5_aOI.js} +1 -1
  48. package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-B_sxc9IV.js → sankeyDiagram-HTMAVEWB-CrVWROCY.js} +1 -1
  49. package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-BNVav9DA.js → sequenceDiagram-DBY2YBRQ-rrdT6eIu.js} +1 -1
  50. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-DbaiKjno.js → sizeCapture-X5ZJPWSS-DvpoOhEJ.js} +1 -1
  51. package/dist/gui/assets/{stateDiagram-2N3HPSRC-jU5WBm6c.js → stateDiagram-2N3HPSRC-B2ui4ZZN.js} +1 -1
  52. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-B_Wcpq2b.js +1 -0
  53. package/dist/gui/assets/{swimlanes-5IMT3BWC-Dcmb64x2.js → swimlanes-5IMT3BWC-DRhf5jKL.js} +2 -2
  54. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-C2fsQgny.js +8 -0
  55. package/dist/gui/assets/{timeline-definition-FHXFAJF6-COm9ow7j.js → timeline-definition-FHXFAJF6-rm68zqM2.js} +1 -1
  56. package/dist/gui/assets/{vennDiagram-L72KCM5P-DliDuTVY.js → vennDiagram-L72KCM5P-BKVMfPvL.js} +1 -1
  57. package/dist/gui/assets/{wardleyDiagram-EHGQE667-C2O_2cpw.js → wardleyDiagram-EHGQE667-eXN3NRZ7.js} +1 -1
  58. package/dist/gui/assets/{xychartDiagram-FW5EYKEG-Ldmt9hoc.js → xychartDiagram-FW5EYKEG-3VtYytF2.js} +1 -1
  59. package/dist/gui/index.html +2 -2
  60. package/package.json +13 -1
  61. package/dist/_commonjsHelpers-DyI1JsEH.js +0 -34
  62. package/dist/abnfDiagram-VRR7QNED-UQS77aUi.js +0 -119
  63. package/dist/api-DrYc_Ds_.js +0 -129852
  64. package/dist/arc-B1cAL3U1.js +0 -132
  65. package/dist/architectureDiagram-ZJ3FMSHR-CfWOhs-q.js +0 -8816
  66. package/dist/blockDiagram-677ZJIJ3-CLOAAFZa.js +0 -3796
  67. package/dist/c4Diagram-LMCZKHZV-BGdELGkb.js +0 -2483
  68. package/dist/certs-BeimSwB3.js +0 -14071
  69. package/dist/certs-C4t5lAmJ.js +0 -14071
  70. package/dist/certs-CLLngjpY.js +0 -14071
  71. package/dist/certs-D3fTB-0_.js +0 -14071
  72. package/dist/channel-_gQD3mZ8.js +0 -8
  73. package/dist/chunk-2Q5K7J3B-DIJkMPWD.js +0 -20
  74. package/dist/chunk-32BRIVSS-CIQb7-9I.js +0 -117
  75. package/dist/chunk-5VM5RSS4-DmlAsh6o.js +0 -20
  76. package/dist/chunk-EX3LRPZG-BEXyn5R-.js +0 -1989
  77. package/dist/chunk-JWPE2WC7-XiIefccF.js +0 -17
  78. package/dist/chunk-MOJQB5TN-CC5OBDWw.js +0 -861
  79. package/dist/chunk-RYQCIY6F-DQacsGpB.js +0 -475
  80. package/dist/chunk-V7JOEXUC-TLRsIUvf.js +0 -2027
  81. package/dist/chunk-VR4S4FIN-9AfN7RDF.js +0 -25
  82. package/dist/chunk-XXDRQBXY-DhWucSRr.js +0 -14
  83. package/dist/classDiagram-OUVF2IWQ-CN55rRkB.js +0 -20
  84. package/dist/classDiagram-v2-EOCWNBFH-CN55rRkB.js +0 -20
  85. package/dist/cose-bilkent-JH36ORCC-8uGYe6_d.js +0 -4944
  86. package/dist/cynefin-VYW2F7L2-BwTeE-TI.js +0 -32061
  87. package/dist/cynefinDiagram-TSTJHNR4-DM7ixE-v.js +0 -454
  88. package/dist/cytoscape.esm-BTopYfIb.js +0 -30347
  89. package/dist/dagre-VKFMJZFB-blEDoYen.js +0 -522
  90. package/dist/defaultLocale-wHUL1xE2.js +0 -207
  91. package/dist/diagram-FQU43EPY-MEZlmmdi.js +0 -633
  92. package/dist/diagram-G47NLZAW-DZOZvHqp.js +0 -857
  93. package/dist/diagram-NH7WQ7WH-ChpmPbZz.js +0 -213
  94. package/dist/diagram-OA4YK3LP-oy4yvrnL.js +0 -489
  95. package/dist/diagram-WEI45ONY-B3nx1cYt.js +0 -305
  96. package/dist/ebnfDiagram-CCIWWBDH-BASj7BoO.js +0 -139
  97. package/dist/erDiagram-Q63AITRT-lujHq-S9.js +0 -1239
  98. package/dist/flowDiagram-23GEKE2U-BdsAVPgU.js +0 -2349
  99. package/dist/ganttDiagram-NO4QXBWP-DUUP4lsu.js +0 -3733
  100. package/dist/gitGraphDiagram-IHSO6WYX-BdIPAtb0.js +0 -1374
  101. package/dist/graph-CE8jV7cI.js +0 -2043
  102. package/dist/gui/assets/channel-DGoXAS0B.js +0 -1
  103. package/dist/gui/assets/classDiagram-OUVF2IWQ-B4zeZ0PC.js +0 -1
  104. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-B4zeZ0PC.js +0 -1
  105. package/dist/gui/assets/index-Bp9JnkhK.css +0 -1
  106. package/dist/gui/assets/index-DKVgyltQ.js +0 -21
  107. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-GXq_r-DG.js +0 -1
  108. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-DDE-INgq.js +0 -8
  109. package/dist/index--GoVvfUP.js +0 -5447
  110. package/dist/index-3-WDiDAh.js +0 -5466
  111. package/dist/index-CHBXZAxg.js +0 -5460
  112. package/dist/index-DeCq8xn7.js +0 -5460
  113. package/dist/infoDiagram-FWYZ7A6U-D9wo93kg.js +0 -32
  114. package/dist/init-DDGa2CQM.js +0 -17
  115. package/dist/ishikawaDiagram-FXEZZL3T-DZh3_kt2.js +0 -968
  116. package/dist/journeyDiagram-5HDEW3XC-C8RWHIn0.js +0 -1256
  117. package/dist/kanban-definition-HUTT4EX6-B7qQtB5a.js +0 -1053
  118. package/dist/katex-WjDlQEfU.js +0 -14500
  119. package/dist/layout-DQAYh_L7.js +0 -2360
  120. package/dist/linear-C_kZRZXS.js +0 -341
  121. package/dist/map-BElV7BMC.js +0 -299
  122. package/dist/mermaid.core-Dy_tFRs7.js +0 -26495
  123. package/dist/mindmap-definition-LN4V7U3C-BzHCd5Ab.js +0 -1181
  124. package/dist/ordinal-C2kkg180.js +0 -77
  125. package/dist/pegDiagram-2B236MQR-B046bQWM.js +0 -127
  126. package/dist/pieDiagram-ENE6RG2P-B5_W2CZy.js +0 -316
  127. package/dist/quadrantDiagram-ABIIQ3AL-Bbpt496h.js +0 -1342
  128. package/dist/railroadDiagram-RFXS5EU6-10XIH3X0.js +0 -93
  129. package/dist/requirementDiagram-TGXJPOKE-Dt1QyccY.js +0 -1205
  130. package/dist/sankeyDiagram-HTMAVEWB-CnqRAq7M.js +0 -1274
  131. package/dist/sequenceDiagram-DBY2YBRQ-DtJLSXoz.js +0 -4515
  132. package/dist/sizeCapture-X5ZJPWSS-DUl5ZEo3.js +0 -63
  133. package/dist/stateDiagram-2N3HPSRC-b-qzcVNj.js +0 -449
  134. package/dist/stateDiagram-v2-6OUMAXLB-KjDlRfc7.js +0 -20
  135. package/dist/swimlanes-5IMT3BWC-CAjGnQLa.js +0 -8553
  136. package/dist/swimlanesDiagram-G3AALYLV-DiOi9bzU.js +0 -16
  137. package/dist/timeline-definition-FHXFAJF6-Bme2FWbh.js +0 -1597
  138. package/dist/vennDiagram-L72KCM5P-BUQgnZDB.js +0 -2516
  139. package/dist/wardleyDiagram-EHGQE667-DHR2Avlu.js +0 -976
  140. package/dist/xychartDiagram-FW5EYKEG-V4K5eBMS.js +0 -2000
@@ -1,1205 +0,0 @@
1
- #!/usr/bin/env node
2
- import { g as getDiagramElement } from "./chunk-XXDRQBXY-DhWucSRr.js";
3
- import { s as setupViewPortForSVG } from "./chunk-VR4S4FIN-9AfN7RDF.js";
4
- import { _ as __name, y as getConfig, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, n as setDiagramTitle, o as getDiagramTitle, c as getConfig2, l as log, p as clear, t as __export, u as getRegisteredLayoutAlgorithm, v as render, x as utils_default } from "./mermaid.core-Dy_tFRs7.js";
5
- var parser = (function() {
6
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
7
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
8
- return o2;
9
- }, "o"), $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 77, 89, 90], $V5 = [1, 22], $V6 = [2, 7], $V7 = [1, 26], $V8 = [1, 27], $V9 = [1, 28], $Va = [1, 29], $Vb = [1, 33], $Vc = [1, 34], $Vd = [1, 35], $Ve = [1, 36], $Vf = [1, 37], $Vg = [1, 38], $Vh = [1, 24], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 30], $Vl = [1, 39], $Vm = [1, 40], $Vn = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 77, 89, 90], $Vo = [1, 61], $Vp = [89, 90], $Vq = [5, 8, 9, 11, 13, 21, 22, 23, 24, 27, 29, 41, 42, 43, 44, 45, 46, 54, 61, 63, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], $Vr = [27, 29], $Vs = [1, 70], $Vt = [1, 71], $Vu = [1, 72], $Vv = [1, 73], $Vw = [1, 74], $Vx = [1, 75], $Vy = [1, 76], $Vz = [1, 83], $VA = [1, 80], $VB = [1, 84], $VC = [1, 85], $VD = [1, 86], $VE = [1, 87], $VF = [1, 88], $VG = [1, 89], $VH = [1, 90], $VI = [1, 91], $VJ = [1, 92], $VK = [5, 8, 9, 11, 13, 21, 22, 23, 24, 27, 41, 42, 43, 44, 45, 46, 54, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], $VL = [63, 64], $VM = [1, 101], $VN = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 76, 77, 89, 90], $VO = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], $VP = [1, 110], $VQ = [1, 106], $VR = [1, 107], $VS = [1, 108], $VT = [1, 109], $VU = [1, 111], $VV = [1, 116], $VW = [1, 117], $VX = [1, 114], $VY = [1, 115];
10
- var parser2 = {
11
- trace: /* @__PURE__ */ __name(function trace() {
12
- }, "trace"),
13
- yy: {},
14
- symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "direction": 17, "styleStatement": 18, "classDefStatement": 19, "classStatement": 20, "direction_tb": 21, "direction_bt": 22, "direction_rl": 23, "direction_lr": 24, "requirementType": 25, "requirementName": 26, "STRUCT_START": 27, "requirementBody": 28, "STYLE_SEPARATOR": 29, "idList": 30, "ID": 31, "COLONSEP": 32, "id": 33, "TEXT": 34, "text": 35, "RISK": 36, "riskLevel": 37, "VERIFYMTHD": 38, "verifyType": 39, "STRUCT_STOP": 40, "REQUIREMENT": 41, "FUNCTIONAL_REQUIREMENT": 42, "INTERFACE_REQUIREMENT": 43, "PERFORMANCE_REQUIREMENT": 44, "PHYSICAL_REQUIREMENT": 45, "DESIGN_CONSTRAINT": 46, "LOW_RISK": 47, "MED_RISK": 48, "HIGH_RISK": 49, "VERIFY_ANALYSIS": 50, "VERIFY_DEMONSTRATION": 51, "VERIFY_INSPECTION": 52, "VERIFY_TEST": 53, "ELEMENT": 54, "elementName": 55, "elementBody": 56, "TYPE": 57, "type": 58, "DOCREF": 59, "ref": 60, "END_ARROW_L": 61, "relationship": 62, "LINE": 63, "END_ARROW_R": 64, "CONTAINS": 65, "COPIES": 66, "DERIVES": 67, "SATISFIES": 68, "VERIFIES": 69, "REFINES": 70, "TRACES": 71, "CLASSDEF": 72, "stylesOpt": 73, "CLASS": 74, "ALPHA": 75, "COMMA": 76, "STYLE": 77, "style": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "MINUS": 86, "LABEL": 87, "SEMICOLON": 88, "unqString": 89, "qString": 90, "$accept": 0, "$end": 1 },
15
- terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 21: "direction_tb", 22: "direction_bt", 23: "direction_rl", 24: "direction_lr", 27: "STRUCT_START", 29: "STYLE_SEPARATOR", 31: "ID", 32: "COLONSEP", 34: "TEXT", 36: "RISK", 38: "VERIFYMTHD", 40: "STRUCT_STOP", 41: "REQUIREMENT", 42: "FUNCTIONAL_REQUIREMENT", 43: "INTERFACE_REQUIREMENT", 44: "PERFORMANCE_REQUIREMENT", 45: "PHYSICAL_REQUIREMENT", 46: "DESIGN_CONSTRAINT", 47: "LOW_RISK", 48: "MED_RISK", 49: "HIGH_RISK", 50: "VERIFY_ANALYSIS", 51: "VERIFY_DEMONSTRATION", 52: "VERIFY_INSPECTION", 53: "VERIFY_TEST", 54: "ELEMENT", 57: "TYPE", 59: "DOCREF", 61: "END_ARROW_L", 63: "LINE", 64: "END_ARROW_R", 65: "CONTAINS", 66: "COPIES", 67: "DERIVES", 68: "SATISFIES", 69: "VERIFIES", 70: "REFINES", 71: "TRACES", 72: "CLASSDEF", 74: "CLASS", 75: "ALPHA", 76: "COMMA", 77: "STYLE", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 86: "MINUS", 87: "LABEL", 88: "SEMICOLON", 89: "unqString", 90: "qString" },
16
- productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [17, 1], [17, 1], [17, 1], [17, 1], [14, 5], [14, 7], [28, 5], [28, 5], [28, 5], [28, 5], [28, 2], [28, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [37, 1], [37, 1], [37, 1], [39, 1], [39, 1], [39, 1], [39, 1], [15, 5], [15, 7], [56, 5], [56, 5], [56, 2], [56, 1], [16, 5], [16, 5], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [19, 3], [20, 3], [20, 3], [30, 1], [30, 3], [30, 1], [30, 3], [18, 3], [73, 1], [73, 3], [78, 1], [78, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [26, 1], [26, 1], [33, 1], [33, 1], [35, 1], [35, 1], [55, 1], [55, 1], [58, 1], [58, 1], [60, 1], [60, 1]],
17
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
18
- var $0 = $$.length - 1;
19
- switch (yystate) {
20
- case 4:
21
- this.$ = $$[$0].trim();
22
- yy.setAccTitle(this.$);
23
- break;
24
- case 5:
25
- case 6:
26
- this.$ = $$[$0].trim();
27
- yy.setAccDescription(this.$);
28
- break;
29
- case 7:
30
- this.$ = [];
31
- break;
32
- case 17:
33
- yy.setDirection("TB");
34
- break;
35
- case 18:
36
- yy.setDirection("BT");
37
- break;
38
- case 19:
39
- yy.setDirection("RL");
40
- break;
41
- case 20:
42
- yy.setDirection("LR");
43
- break;
44
- case 21:
45
- yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
46
- break;
47
- case 22:
48
- yy.addRequirement($$[$0 - 5], $$[$0 - 6]);
49
- yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
50
- break;
51
- case 23:
52
- yy.setNewReqId($$[$0 - 2]);
53
- break;
54
- case 24:
55
- yy.setNewReqText($$[$0 - 2]);
56
- break;
57
- case 25:
58
- yy.setNewReqRisk($$[$0 - 2]);
59
- break;
60
- case 26:
61
- yy.setNewReqVerifyMethod($$[$0 - 2]);
62
- break;
63
- case 29:
64
- this.$ = yy.RequirementType.REQUIREMENT;
65
- break;
66
- case 30:
67
- this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
68
- break;
69
- case 31:
70
- this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
71
- break;
72
- case 32:
73
- this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
74
- break;
75
- case 33:
76
- this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
77
- break;
78
- case 34:
79
- this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
80
- break;
81
- case 35:
82
- this.$ = yy.RiskLevel.LOW_RISK;
83
- break;
84
- case 36:
85
- this.$ = yy.RiskLevel.MED_RISK;
86
- break;
87
- case 37:
88
- this.$ = yy.RiskLevel.HIGH_RISK;
89
- break;
90
- case 38:
91
- this.$ = yy.VerifyType.VERIFY_ANALYSIS;
92
- break;
93
- case 39:
94
- this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
95
- break;
96
- case 40:
97
- this.$ = yy.VerifyType.VERIFY_INSPECTION;
98
- break;
99
- case 41:
100
- this.$ = yy.VerifyType.VERIFY_TEST;
101
- break;
102
- case 42:
103
- yy.addElement($$[$0 - 3]);
104
- break;
105
- case 43:
106
- yy.addElement($$[$0 - 5]);
107
- yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
108
- break;
109
- case 44:
110
- yy.setNewElementType($$[$0 - 2]);
111
- break;
112
- case 45:
113
- yy.setNewElementDocRef($$[$0 - 2]);
114
- break;
115
- case 48:
116
- yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
117
- break;
118
- case 49:
119
- yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
120
- break;
121
- case 50:
122
- this.$ = yy.Relationships.CONTAINS;
123
- break;
124
- case 51:
125
- this.$ = yy.Relationships.COPIES;
126
- break;
127
- case 52:
128
- this.$ = yy.Relationships.DERIVES;
129
- break;
130
- case 53:
131
- this.$ = yy.Relationships.SATISFIES;
132
- break;
133
- case 54:
134
- this.$ = yy.Relationships.VERIFIES;
135
- break;
136
- case 55:
137
- this.$ = yy.Relationships.REFINES;
138
- break;
139
- case 56:
140
- this.$ = yy.Relationships.TRACES;
141
- break;
142
- case 57:
143
- this.$ = $$[$0 - 2];
144
- yy.defineClass($$[$0 - 1], $$[$0]);
145
- break;
146
- case 58:
147
- yy.setClass($$[$0 - 1], $$[$0]);
148
- break;
149
- case 59:
150
- yy.setClass([$$[$0 - 2]], $$[$0]);
151
- break;
152
- case 60:
153
- case 62:
154
- this.$ = [$$[$0]];
155
- break;
156
- case 61:
157
- case 63:
158
- this.$ = $$[$0 - 2].concat([$$[$0]]);
159
- break;
160
- case 64:
161
- this.$ = $$[$0 - 2];
162
- yy.setCssStyle($$[$0 - 1], $$[$0]);
163
- break;
164
- case 65:
165
- this.$ = [$$[$0]];
166
- break;
167
- case 66:
168
- $$[$0 - 2].push($$[$0]);
169
- this.$ = $$[$0 - 2];
170
- break;
171
- case 68:
172
- this.$ = $$[$0 - 1] + $$[$0];
173
- break;
174
- }
175
- }, "anonymous"),
176
- table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 41] }, { 4: 17, 5: $V5, 7: 42, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 43, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 44, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 45, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 46, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 47, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 48, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 49, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 50, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 26: 51, 89: [1, 52], 90: [1, 53] }, { 55: 54, 89: [1, 55], 90: [1, 56] }, { 29: [1, 59], 61: [1, 57], 63: [1, 58] }, o($Vn, [2, 17]), o($Vn, [2, 18]), o($Vn, [2, 19]), o($Vn, [2, 20]), { 30: 60, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 30: 63, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 30: 64, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, o($Vp, [2, 29]), o($Vp, [2, 30]), o($Vp, [2, 31]), o($Vp, [2, 32]), o($Vp, [2, 33]), o($Vp, [2, 34]), o($Vq, [2, 81]), o($Vq, [2, 82]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 8: [2, 13] }, { 8: [2, 14] }, { 8: [2, 15] }, { 8: [2, 16] }, { 27: [1, 65], 29: [1, 66] }, o($Vr, [2, 79]), o($Vr, [2, 80]), { 27: [1, 67], 29: [1, 68] }, o($Vr, [2, 85]), o($Vr, [2, 86]), { 62: 69, 65: $Vs, 66: $Vt, 67: $Vu, 68: $Vv, 69: $Vw, 70: $Vx, 71: $Vy }, { 62: 77, 65: $Vs, 66: $Vt, 67: $Vu, 68: $Vv, 69: $Vw, 70: $Vx, 71: $Vy }, { 30: 78, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 73: 79, 75: $Vz, 76: $VA, 78: 81, 79: 82, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }, o($VK, [2, 60]), o($VK, [2, 62]), { 73: 93, 75: $Vz, 76: $VA, 78: 81, 79: 82, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }, { 30: 94, 33: 62, 75: $Vo, 76: $VA, 89: $Vl, 90: $Vm }, { 5: [1, 95] }, { 30: 96, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 5: [1, 97] }, { 30: 98, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 63: [1, 99] }, o($VL, [2, 50]), o($VL, [2, 51]), o($VL, [2, 52]), o($VL, [2, 53]), o($VL, [2, 54]), o($VL, [2, 55]), o($VL, [2, 56]), { 64: [1, 100] }, o($Vn, [2, 59], { 76: $VA }), o($Vn, [2, 64], { 76: $VM }), { 33: 103, 75: [1, 102], 89: $Vl, 90: $Vm }, o($VN, [2, 65], { 79: 104, 75: $Vz, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }), o($VO, [2, 67]), o($VO, [2, 69]), o($VO, [2, 70]), o($VO, [2, 71]), o($VO, [2, 72]), o($VO, [2, 73]), o($VO, [2, 74]), o($VO, [2, 75]), o($VO, [2, 76]), o($VO, [2, 77]), o($VO, [2, 78]), o($Vn, [2, 57], { 76: $VM }), o($Vn, [2, 58], { 76: $VA }), { 5: $VP, 28: 105, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 27: [1, 112], 76: $VA }, { 5: $VV, 40: $VW, 56: 113, 57: $VX, 59: $VY }, { 27: [1, 118], 76: $VA }, { 33: 119, 89: $Vl, 90: $Vm }, { 33: 120, 89: $Vl, 90: $Vm }, { 75: $Vz, 78: 121, 79: 82, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }, o($VK, [2, 61]), o($VK, [2, 63]), o($VO, [2, 68]), o($Vn, [2, 21]), { 32: [1, 122] }, { 32: [1, 123] }, { 32: [1, 124] }, { 32: [1, 125] }, { 5: $VP, 28: 126, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, o($Vn, [2, 28]), { 5: [1, 127] }, o($Vn, [2, 42]), { 32: [1, 128] }, { 32: [1, 129] }, { 5: $VV, 40: $VW, 56: 130, 57: $VX, 59: $VY }, o($Vn, [2, 47]), { 5: [1, 131] }, o($Vn, [2, 48]), o($Vn, [2, 49]), o($VN, [2, 66], { 79: 104, 75: $Vz, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }), { 33: 132, 89: $Vl, 90: $Vm }, { 35: 133, 89: [1, 134], 90: [1, 135] }, { 37: 136, 47: [1, 137], 48: [1, 138], 49: [1, 139] }, { 39: 140, 50: [1, 141], 51: [1, 142], 52: [1, 143], 53: [1, 144] }, o($Vn, [2, 27]), { 5: $VP, 28: 145, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 58: 146, 89: [1, 147], 90: [1, 148] }, { 60: 149, 89: [1, 150], 90: [1, 151] }, o($Vn, [2, 46]), { 5: $VV, 40: $VW, 56: 152, 57: $VX, 59: $VY }, { 5: [1, 153] }, { 5: [1, 154] }, { 5: [2, 83] }, { 5: [2, 84] }, { 5: [1, 155] }, { 5: [2, 35] }, { 5: [2, 36] }, { 5: [2, 37] }, { 5: [1, 156] }, { 5: [2, 38] }, { 5: [2, 39] }, { 5: [2, 40] }, { 5: [2, 41] }, o($Vn, [2, 22]), { 5: [1, 157] }, { 5: [2, 87] }, { 5: [2, 88] }, { 5: [1, 158] }, { 5: [2, 89] }, { 5: [2, 90] }, o($Vn, [2, 43]), { 5: $VP, 28: 159, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VP, 28: 160, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VP, 28: 161, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VP, 28: 162, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VV, 40: $VW, 56: 163, 57: $VX, 59: $VY }, { 5: $VV, 40: $VW, 56: 164, 57: $VX, 59: $VY }, o($Vn, [2, 23]), o($Vn, [2, 24]), o($Vn, [2, 25]), o($Vn, [2, 26]), o($Vn, [2, 44]), o($Vn, [2, 45])],
177
- defaultActions: { 8: [2, 2], 12: [2, 1], 41: [2, 3], 42: [2, 8], 43: [2, 9], 44: [2, 10], 45: [2, 11], 46: [2, 12], 47: [2, 13], 48: [2, 14], 49: [2, 15], 50: [2, 16], 134: [2, 83], 135: [2, 84], 137: [2, 35], 138: [2, 36], 139: [2, 37], 141: [2, 38], 142: [2, 39], 143: [2, 40], 144: [2, 41], 147: [2, 87], 148: [2, 88], 150: [2, 89], 151: [2, 90] },
178
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
179
- if (hash.recoverable) {
180
- this.trace(str);
181
- } else {
182
- var error = new Error(str);
183
- error.hash = hash;
184
- throw error;
185
- }
186
- }, "parseError"),
187
- parse: /* @__PURE__ */ __name(function parse(input) {
188
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
189
- var args = lstack.slice.call(arguments, 1);
190
- var lexer2 = Object.create(this.lexer);
191
- var sharedState = { yy: {} };
192
- for (var k in this.yy) {
193
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
194
- sharedState.yy[k] = this.yy[k];
195
- }
196
- }
197
- lexer2.setInput(input, sharedState.yy);
198
- sharedState.yy.lexer = lexer2;
199
- sharedState.yy.parser = this;
200
- if (typeof lexer2.yylloc == "undefined") {
201
- lexer2.yylloc = {};
202
- }
203
- var yyloc = lexer2.yylloc;
204
- lstack.push(yyloc);
205
- var ranges = lexer2.options && lexer2.options.ranges;
206
- if (typeof sharedState.yy.parseError === "function") {
207
- this.parseError = sharedState.yy.parseError;
208
- } else {
209
- this.parseError = Object.getPrototypeOf(this).parseError;
210
- }
211
- function popStack(n) {
212
- stack.length = stack.length - 2 * n;
213
- vstack.length = vstack.length - n;
214
- lstack.length = lstack.length - n;
215
- }
216
- __name(popStack, "popStack");
217
- function lex() {
218
- var token;
219
- token = tstack.pop() || lexer2.lex() || EOF;
220
- if (typeof token !== "number") {
221
- if (token instanceof Array) {
222
- tstack = token;
223
- token = tstack.pop();
224
- }
225
- token = self.symbols_[token] || token;
226
- }
227
- return token;
228
- }
229
- __name(lex, "lex");
230
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
231
- while (true) {
232
- state = stack[stack.length - 1];
233
- if (this.defaultActions[state]) {
234
- action = this.defaultActions[state];
235
- } else {
236
- if (symbol === null || typeof symbol == "undefined") {
237
- symbol = lex();
238
- }
239
- action = table[state] && table[state][symbol];
240
- }
241
- if (typeof action === "undefined" || !action.length || !action[0]) {
242
- var errStr = "";
243
- expected = [];
244
- for (p in table[state]) {
245
- if (this.terminals_[p] && p > TERROR) {
246
- expected.push("'" + this.terminals_[p] + "'");
247
- }
248
- }
249
- if (lexer2.showPosition) {
250
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
251
- } else {
252
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
253
- }
254
- this.parseError(errStr, {
255
- text: lexer2.match,
256
- token: this.terminals_[symbol] || symbol,
257
- line: lexer2.yylineno,
258
- loc: yyloc,
259
- expected
260
- });
261
- }
262
- if (action[0] instanceof Array && action.length > 1) {
263
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
264
- }
265
- switch (action[0]) {
266
- case 1:
267
- stack.push(symbol);
268
- vstack.push(lexer2.yytext);
269
- lstack.push(lexer2.yylloc);
270
- stack.push(action[1]);
271
- symbol = null;
272
- {
273
- yyleng = lexer2.yyleng;
274
- yytext = lexer2.yytext;
275
- yylineno = lexer2.yylineno;
276
- yyloc = lexer2.yylloc;
277
- }
278
- break;
279
- case 2:
280
- len = this.productions_[action[1]][1];
281
- yyval.$ = vstack[vstack.length - len];
282
- yyval._$ = {
283
- first_line: lstack[lstack.length - (len || 1)].first_line,
284
- last_line: lstack[lstack.length - 1].last_line,
285
- first_column: lstack[lstack.length - (len || 1)].first_column,
286
- last_column: lstack[lstack.length - 1].last_column
287
- };
288
- if (ranges) {
289
- yyval._$.range = [
290
- lstack[lstack.length - (len || 1)].range[0],
291
- lstack[lstack.length - 1].range[1]
292
- ];
293
- }
294
- r = this.performAction.apply(yyval, [
295
- yytext,
296
- yyleng,
297
- yylineno,
298
- sharedState.yy,
299
- action[1],
300
- vstack,
301
- lstack
302
- ].concat(args));
303
- if (typeof r !== "undefined") {
304
- return r;
305
- }
306
- if (len) {
307
- stack = stack.slice(0, -1 * len * 2);
308
- vstack = vstack.slice(0, -1 * len);
309
- lstack = lstack.slice(0, -1 * len);
310
- }
311
- stack.push(this.productions_[action[1]][0]);
312
- vstack.push(yyval.$);
313
- lstack.push(yyval._$);
314
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
315
- stack.push(newState);
316
- break;
317
- case 3:
318
- return true;
319
- }
320
- }
321
- return true;
322
- }, "parse")
323
- };
324
- var lexer = /* @__PURE__ */ (function() {
325
- var lexer2 = {
326
- EOF: 1,
327
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
328
- if (this.yy.parser) {
329
- this.yy.parser.parseError(str, hash);
330
- } else {
331
- throw new Error(str);
332
- }
333
- }, "parseError"),
334
- // resets the lexer, sets new input
335
- setInput: /* @__PURE__ */ __name(function(input, yy) {
336
- this.yy = yy || this.yy || {};
337
- this._input = input;
338
- this._more = this._backtrack = this.done = false;
339
- this.yylineno = this.yyleng = 0;
340
- this.yytext = this.matched = this.match = "";
341
- this.conditionStack = ["INITIAL"];
342
- this.yylloc = {
343
- first_line: 1,
344
- first_column: 0,
345
- last_line: 1,
346
- last_column: 0
347
- };
348
- if (this.options.ranges) {
349
- this.yylloc.range = [0, 0];
350
- }
351
- this.offset = 0;
352
- return this;
353
- }, "setInput"),
354
- // consumes and returns one char from the input
355
- input: /* @__PURE__ */ __name(function() {
356
- var ch = this._input[0];
357
- this.yytext += ch;
358
- this.yyleng++;
359
- this.offset++;
360
- this.match += ch;
361
- this.matched += ch;
362
- var lines = ch.match(/(?:\r\n?|\n).*/g);
363
- if (lines) {
364
- this.yylineno++;
365
- this.yylloc.last_line++;
366
- } else {
367
- this.yylloc.last_column++;
368
- }
369
- if (this.options.ranges) {
370
- this.yylloc.range[1]++;
371
- }
372
- this._input = this._input.slice(1);
373
- return ch;
374
- }, "input"),
375
- // unshifts one char (or a string) into the input
376
- unput: /* @__PURE__ */ __name(function(ch) {
377
- var len = ch.length;
378
- var lines = ch.split(/(?:\r\n?|\n)/g);
379
- this._input = ch + this._input;
380
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
381
- this.offset -= len;
382
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
383
- this.match = this.match.substr(0, this.match.length - 1);
384
- this.matched = this.matched.substr(0, this.matched.length - 1);
385
- if (lines.length - 1) {
386
- this.yylineno -= lines.length - 1;
387
- }
388
- var r = this.yylloc.range;
389
- this.yylloc = {
390
- first_line: this.yylloc.first_line,
391
- last_line: this.yylineno + 1,
392
- first_column: this.yylloc.first_column,
393
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
394
- };
395
- if (this.options.ranges) {
396
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
397
- }
398
- this.yyleng = this.yytext.length;
399
- return this;
400
- }, "unput"),
401
- // When called from action, caches matched text and appends it on next action
402
- more: /* @__PURE__ */ __name(function() {
403
- this._more = true;
404
- return this;
405
- }, "more"),
406
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
407
- reject: /* @__PURE__ */ __name(function() {
408
- if (this.options.backtrack_lexer) {
409
- this._backtrack = true;
410
- } else {
411
- 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).\n" + this.showPosition(), {
412
- text: "",
413
- token: null,
414
- line: this.yylineno
415
- });
416
- }
417
- return this;
418
- }, "reject"),
419
- // retain first n characters of the match
420
- less: /* @__PURE__ */ __name(function(n) {
421
- this.unput(this.match.slice(n));
422
- }, "less"),
423
- // displays already matched input, i.e. for error messages
424
- pastInput: /* @__PURE__ */ __name(function() {
425
- var past = this.matched.substr(0, this.matched.length - this.match.length);
426
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
427
- }, "pastInput"),
428
- // displays upcoming input, i.e. for error messages
429
- upcomingInput: /* @__PURE__ */ __name(function() {
430
- var next = this.match;
431
- if (next.length < 20) {
432
- next += this._input.substr(0, 20 - next.length);
433
- }
434
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
435
- }, "upcomingInput"),
436
- // displays the character position where the lexing error occurred, i.e. for error messages
437
- showPosition: /* @__PURE__ */ __name(function() {
438
- var pre = this.pastInput();
439
- var c = new Array(pre.length + 1).join("-");
440
- return pre + this.upcomingInput() + "\n" + c + "^";
441
- }, "showPosition"),
442
- // test the lexed token: return FALSE when not a match, otherwise return token
443
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
444
- var token, lines, backup;
445
- if (this.options.backtrack_lexer) {
446
- backup = {
447
- yylineno: this.yylineno,
448
- yylloc: {
449
- first_line: this.yylloc.first_line,
450
- last_line: this.last_line,
451
- first_column: this.yylloc.first_column,
452
- last_column: this.yylloc.last_column
453
- },
454
- yytext: this.yytext,
455
- match: this.match,
456
- matches: this.matches,
457
- matched: this.matched,
458
- yyleng: this.yyleng,
459
- offset: this.offset,
460
- _more: this._more,
461
- _input: this._input,
462
- yy: this.yy,
463
- conditionStack: this.conditionStack.slice(0),
464
- done: this.done
465
- };
466
- if (this.options.ranges) {
467
- backup.yylloc.range = this.yylloc.range.slice(0);
468
- }
469
- }
470
- lines = match[0].match(/(?:\r\n?|\n).*/g);
471
- if (lines) {
472
- this.yylineno += lines.length;
473
- }
474
- this.yylloc = {
475
- first_line: this.yylloc.last_line,
476
- last_line: this.yylineno + 1,
477
- first_column: this.yylloc.last_column,
478
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
479
- };
480
- this.yytext += match[0];
481
- this.match += match[0];
482
- this.matches = match;
483
- this.yyleng = this.yytext.length;
484
- if (this.options.ranges) {
485
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
486
- }
487
- this._more = false;
488
- this._backtrack = false;
489
- this._input = this._input.slice(match[0].length);
490
- this.matched += match[0];
491
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
492
- if (this.done && this._input) {
493
- this.done = false;
494
- }
495
- if (token) {
496
- return token;
497
- } else if (this._backtrack) {
498
- for (var k in backup) {
499
- this[k] = backup[k];
500
- }
501
- return false;
502
- }
503
- return false;
504
- }, "test_match"),
505
- // return next match in input
506
- next: /* @__PURE__ */ __name(function() {
507
- if (this.done) {
508
- return this.EOF;
509
- }
510
- if (!this._input) {
511
- this.done = true;
512
- }
513
- var token, match, tempMatch, index;
514
- if (!this._more) {
515
- this.yytext = "";
516
- this.match = "";
517
- }
518
- var rules = this._currentRules();
519
- for (var i = 0; i < rules.length; i++) {
520
- tempMatch = this._input.match(this.rules[rules[i]]);
521
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
522
- match = tempMatch;
523
- index = i;
524
- if (this.options.backtrack_lexer) {
525
- token = this.test_match(tempMatch, rules[i]);
526
- if (token !== false) {
527
- return token;
528
- } else if (this._backtrack) {
529
- match = false;
530
- continue;
531
- } else {
532
- return false;
533
- }
534
- } else if (!this.options.flex) {
535
- break;
536
- }
537
- }
538
- }
539
- if (match) {
540
- token = this.test_match(match, rules[index]);
541
- if (token !== false) {
542
- return token;
543
- }
544
- return false;
545
- }
546
- if (this._input === "") {
547
- return this.EOF;
548
- } else {
549
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
550
- text: "",
551
- token: null,
552
- line: this.yylineno
553
- });
554
- }
555
- }, "next"),
556
- // return next match that has a token
557
- lex: /* @__PURE__ */ __name(function lex() {
558
- var r = this.next();
559
- if (r) {
560
- return r;
561
- } else {
562
- return this.lex();
563
- }
564
- }, "lex"),
565
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
566
- begin: /* @__PURE__ */ __name(function begin(condition) {
567
- this.conditionStack.push(condition);
568
- }, "begin"),
569
- // pop the previously active lexer condition state off the condition stack
570
- popState: /* @__PURE__ */ __name(function popState() {
571
- var n = this.conditionStack.length - 1;
572
- if (n > 0) {
573
- return this.conditionStack.pop();
574
- } else {
575
- return this.conditionStack[0];
576
- }
577
- }, "popState"),
578
- // produce the lexer rule set which is active for the currently active lexer condition state
579
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
580
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
581
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
582
- } else {
583
- return this.conditions["INITIAL"].rules;
584
- }
585
- }, "_currentRules"),
586
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
587
- topState: /* @__PURE__ */ __name(function topState(n) {
588
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
589
- if (n >= 0) {
590
- return this.conditionStack[n];
591
- } else {
592
- return "INITIAL";
593
- }
594
- }, "topState"),
595
- // alias for begin(condition)
596
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
597
- this.begin(condition);
598
- }, "pushState"),
599
- // return the number of states currently on the stack
600
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
601
- return this.conditionStack.length;
602
- }, "stateStackSize"),
603
- options: { "case-insensitive": true },
604
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
605
- switch ($avoiding_name_collisions) {
606
- case 0:
607
- return "title";
608
- case 1:
609
- this.begin("acc_title");
610
- return 9;
611
- case 2:
612
- this.popState();
613
- return "acc_title_value";
614
- case 3:
615
- this.begin("acc_descr");
616
- return 11;
617
- case 4:
618
- this.popState();
619
- return "acc_descr_value";
620
- case 5:
621
- this.begin("acc_descr_multiline");
622
- break;
623
- case 6:
624
- this.popState();
625
- break;
626
- case 7:
627
- return "acc_descr_multiline_value";
628
- case 8:
629
- return 21;
630
- case 9:
631
- return 22;
632
- case 10:
633
- return 23;
634
- case 11:
635
- return 24;
636
- case 12:
637
- return 5;
638
- case 13:
639
- break;
640
- case 14:
641
- break;
642
- case 15:
643
- break;
644
- case 16:
645
- return 8;
646
- case 17:
647
- return 6;
648
- case 18:
649
- return 27;
650
- case 19:
651
- return 40;
652
- case 20:
653
- return 29;
654
- case 21:
655
- return 32;
656
- case 22:
657
- return 31;
658
- case 23:
659
- return 34;
660
- case 24:
661
- return 36;
662
- case 25:
663
- return 38;
664
- case 26:
665
- return 41;
666
- case 27:
667
- return 42;
668
- case 28:
669
- return 43;
670
- case 29:
671
- return 44;
672
- case 30:
673
- return 45;
674
- case 31:
675
- return 46;
676
- case 32:
677
- return 47;
678
- case 33:
679
- return 48;
680
- case 34:
681
- return 49;
682
- case 35:
683
- return 50;
684
- case 36:
685
- return 51;
686
- case 37:
687
- return 52;
688
- case 38:
689
- return 53;
690
- case 39:
691
- return 54;
692
- case 40:
693
- return 65;
694
- case 41:
695
- return 66;
696
- case 42:
697
- return 67;
698
- case 43:
699
- return 68;
700
- case 44:
701
- return 69;
702
- case 45:
703
- return 70;
704
- case 46:
705
- return 71;
706
- case 47:
707
- return 57;
708
- case 48:
709
- return 59;
710
- case 49:
711
- this.begin("style");
712
- return 77;
713
- case 50:
714
- return 75;
715
- case 51:
716
- return 81;
717
- case 52:
718
- return 88;
719
- case 53:
720
- return "PERCENT";
721
- case 54:
722
- return 86;
723
- case 55:
724
- return 84;
725
- case 56:
726
- break;
727
- case 57:
728
- this.begin("string");
729
- break;
730
- case 58:
731
- this.popState();
732
- break;
733
- case 59:
734
- this.begin("style");
735
- return 72;
736
- case 60:
737
- this.begin("style");
738
- return 74;
739
- case 61:
740
- return 61;
741
- case 62:
742
- return 64;
743
- case 63:
744
- return 63;
745
- case 64:
746
- this.begin("string");
747
- break;
748
- case 65:
749
- this.popState();
750
- break;
751
- case 66:
752
- return "qString";
753
- case 67:
754
- yy_.yytext = yy_.yytext.trim();
755
- return 89;
756
- case 68:
757
- return 75;
758
- case 69:
759
- return 80;
760
- case 70:
761
- return 76;
762
- }
763
- }, "anonymous"),
764
- rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::{3})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:style\b)/i, /^(?:\w+)/i, /^(?::)/i, /^(?:;)/i, /^(?:%)/i, /^(?:-)/i, /^(?:#)/i, /^(?: )/i, /^(?:["])/i, /^(?:\n)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i, /^(?:\w+)/i, /^(?:[0-9]+)/i, /^(?:,)/i],
765
- conditions: { "acc_descr_multiline": { "rules": [6, 7, 68, 69, 70], "inclusive": false }, "acc_descr": { "rules": [4, 68, 69, 70], "inclusive": false }, "acc_title": { "rules": [2, 68, 69, 70], "inclusive": false }, "style": { "rules": [50, 51, 52, 53, 54, 55, 56, 57, 58, 68, 69, 70], "inclusive": false }, "unqString": { "rules": [68, 69, 70], "inclusive": false }, "token": { "rules": [68, 69, 70], "inclusive": false }, "string": { "rules": [65, 66, 68, 69, 70], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 59, 60, 61, 62, 63, 64, 67, 68, 69, 70], "inclusive": true } }
766
- };
767
- return lexer2;
768
- })();
769
- parser2.lexer = lexer;
770
- function Parser() {
771
- this.yy = {};
772
- }
773
- __name(Parser, "Parser");
774
- Parser.prototype = parser2;
775
- parser2.Parser = Parser;
776
- return new Parser();
777
- })();
778
- parser.parser = parser;
779
- var requirementDiagram_default = parser;
780
- var RequirementDB = class {
781
- constructor() {
782
- this.relations = [];
783
- this.latestRequirement = this.getInitialRequirement();
784
- this.requirements = /* @__PURE__ */ new Map();
785
- this.latestElement = this.getInitialElement();
786
- this.elements = /* @__PURE__ */ new Map();
787
- this.classes = /* @__PURE__ */ new Map();
788
- this.direction = "TB";
789
- this.RequirementType = {
790
- REQUIREMENT: "Requirement",
791
- FUNCTIONAL_REQUIREMENT: "Functional Requirement",
792
- INTERFACE_REQUIREMENT: "Interface Requirement",
793
- PERFORMANCE_REQUIREMENT: "Performance Requirement",
794
- PHYSICAL_REQUIREMENT: "Physical Requirement",
795
- DESIGN_CONSTRAINT: "Design Constraint"
796
- };
797
- this.RiskLevel = {
798
- LOW_RISK: "Low",
799
- MED_RISK: "Medium",
800
- HIGH_RISK: "High"
801
- };
802
- this.VerifyType = {
803
- VERIFY_ANALYSIS: "Analysis",
804
- VERIFY_DEMONSTRATION: "Demonstration",
805
- VERIFY_INSPECTION: "Inspection",
806
- VERIFY_TEST: "Test"
807
- };
808
- this.Relationships = {
809
- CONTAINS: "contains",
810
- COPIES: "copies",
811
- DERIVES: "derives",
812
- SATISFIES: "satisfies",
813
- VERIFIES: "verifies",
814
- REFINES: "refines",
815
- TRACES: "traces"
816
- };
817
- this.setAccTitle = setAccTitle;
818
- this.getAccTitle = getAccTitle;
819
- this.setAccDescription = setAccDescription;
820
- this.getAccDescription = getAccDescription;
821
- this.setDiagramTitle = setDiagramTitle;
822
- this.getDiagramTitle = getDiagramTitle;
823
- this.getConfig = /* @__PURE__ */ __name(() => getConfig2().requirement, "getConfig");
824
- this.clear();
825
- this.setDirection = this.setDirection.bind(this);
826
- this.addRequirement = this.addRequirement.bind(this);
827
- this.setNewReqId = this.setNewReqId.bind(this);
828
- this.setNewReqRisk = this.setNewReqRisk.bind(this);
829
- this.setNewReqText = this.setNewReqText.bind(this);
830
- this.setNewReqVerifyMethod = this.setNewReqVerifyMethod.bind(this);
831
- this.addElement = this.addElement.bind(this);
832
- this.setNewElementType = this.setNewElementType.bind(this);
833
- this.setNewElementDocRef = this.setNewElementDocRef.bind(this);
834
- this.addRelationship = this.addRelationship.bind(this);
835
- this.setCssStyle = this.setCssStyle.bind(this);
836
- this.setClass = this.setClass.bind(this);
837
- this.defineClass = this.defineClass.bind(this);
838
- this.setAccTitle = this.setAccTitle.bind(this);
839
- this.setAccDescription = this.setAccDescription.bind(this);
840
- }
841
- static {
842
- __name(this, "RequirementDB");
843
- }
844
- getDirection() {
845
- return this.direction;
846
- }
847
- setDirection(dir) {
848
- this.direction = dir;
849
- }
850
- resetLatestRequirement() {
851
- this.latestRequirement = this.getInitialRequirement();
852
- }
853
- resetLatestElement() {
854
- this.latestElement = this.getInitialElement();
855
- }
856
- getInitialRequirement() {
857
- return {
858
- requirementId: "",
859
- text: "",
860
- risk: "",
861
- verifyMethod: "",
862
- name: "",
863
- type: "",
864
- cssStyles: [],
865
- classes: ["default"]
866
- };
867
- }
868
- getInitialElement() {
869
- return {
870
- name: "",
871
- type: "",
872
- docRef: "",
873
- cssStyles: [],
874
- classes: ["default"]
875
- };
876
- }
877
- addRequirement(name, type) {
878
- if (!this.requirements.has(name)) {
879
- this.requirements.set(name, {
880
- name,
881
- type,
882
- requirementId: this.latestRequirement.requirementId,
883
- text: this.latestRequirement.text,
884
- risk: this.latestRequirement.risk,
885
- verifyMethod: this.latestRequirement.verifyMethod,
886
- cssStyles: [],
887
- classes: ["default"]
888
- });
889
- }
890
- this.resetLatestRequirement();
891
- return this.requirements.get(name);
892
- }
893
- getRequirements() {
894
- return this.requirements;
895
- }
896
- setNewReqId(id) {
897
- if (this.latestRequirement !== void 0) {
898
- this.latestRequirement.requirementId = id;
899
- }
900
- }
901
- setNewReqText(text) {
902
- if (this.latestRequirement !== void 0) {
903
- this.latestRequirement.text = text;
904
- }
905
- }
906
- setNewReqRisk(risk) {
907
- if (this.latestRequirement !== void 0) {
908
- this.latestRequirement.risk = risk;
909
- }
910
- }
911
- setNewReqVerifyMethod(verifyMethod) {
912
- if (this.latestRequirement !== void 0) {
913
- this.latestRequirement.verifyMethod = verifyMethod;
914
- }
915
- }
916
- addElement(name) {
917
- if (!this.elements.has(name)) {
918
- this.elements.set(name, {
919
- name,
920
- type: this.latestElement.type,
921
- docRef: this.latestElement.docRef,
922
- cssStyles: [],
923
- classes: ["default"]
924
- });
925
- log.info("Added new element: ", name);
926
- }
927
- this.resetLatestElement();
928
- return this.elements.get(name);
929
- }
930
- getElements() {
931
- return this.elements;
932
- }
933
- setNewElementType(type) {
934
- if (this.latestElement !== void 0) {
935
- this.latestElement.type = type;
936
- }
937
- }
938
- setNewElementDocRef(docRef) {
939
- if (this.latestElement !== void 0) {
940
- this.latestElement.docRef = docRef;
941
- }
942
- }
943
- addRelationship(type, src, dst) {
944
- this.relations.push({
945
- type,
946
- src,
947
- dst
948
- });
949
- }
950
- getRelationships() {
951
- return this.relations;
952
- }
953
- clear() {
954
- this.relations = [];
955
- this.resetLatestRequirement();
956
- this.requirements = /* @__PURE__ */ new Map();
957
- this.resetLatestElement();
958
- this.elements = /* @__PURE__ */ new Map();
959
- this.classes = /* @__PURE__ */ new Map();
960
- clear();
961
- }
962
- setCssStyle(ids, styles) {
963
- for (const id of ids) {
964
- const node = this.requirements.get(id) ?? this.elements.get(id);
965
- if (!styles || !node) {
966
- return;
967
- }
968
- for (const s of styles) {
969
- if (s.includes(",")) {
970
- node.cssStyles.push(...s.split(","));
971
- } else {
972
- node.cssStyles.push(s);
973
- }
974
- }
975
- }
976
- }
977
- setClass(ids, classNames) {
978
- for (const id of ids) {
979
- const node = this.requirements.get(id) ?? this.elements.get(id);
980
- if (node) {
981
- for (const _class of classNames) {
982
- node.classes.push(_class);
983
- const styles = this.classes.get(_class)?.styles;
984
- if (styles) {
985
- node.cssStyles.push(...styles);
986
- }
987
- }
988
- }
989
- }
990
- }
991
- defineClass(ids, style) {
992
- for (const id of ids) {
993
- let styleClass = this.classes.get(id);
994
- if (styleClass === void 0) {
995
- styleClass = { id, styles: [], textStyles: [] };
996
- this.classes.set(id, styleClass);
997
- }
998
- if (style) {
999
- style.forEach(function(s) {
1000
- if (/color/.exec(s)) {
1001
- const newStyle = s.replace("fill", "bgFill");
1002
- styleClass.textStyles.push(newStyle);
1003
- }
1004
- styleClass.styles.push(s);
1005
- });
1006
- }
1007
- this.requirements.forEach((value) => {
1008
- if (value.classes.includes(id)) {
1009
- value.cssStyles.push(...style.flatMap((s) => s.split(",")));
1010
- }
1011
- });
1012
- this.elements.forEach((value) => {
1013
- if (value.classes.includes(id)) {
1014
- value.cssStyles.push(...style.flatMap((s) => s.split(",")));
1015
- }
1016
- });
1017
- }
1018
- }
1019
- getClasses() {
1020
- return this.classes;
1021
- }
1022
- getData() {
1023
- const config = getConfig2();
1024
- const nodes = [];
1025
- const edges = [];
1026
- for (const requirement of this.requirements.values()) {
1027
- const node = requirement;
1028
- node.id = requirement.name;
1029
- node.cssStyles = requirement.cssStyles;
1030
- node.cssClasses = requirement.classes.join(" ");
1031
- node.shape = "requirementBox";
1032
- node.look = config.look;
1033
- node.colorIndex = nodes.length;
1034
- nodes.push(node);
1035
- }
1036
- for (const element of this.elements.values()) {
1037
- const node = element;
1038
- node.shape = "requirementBox";
1039
- node.look = config.look;
1040
- node.id = element.name;
1041
- node.cssStyles = element.cssStyles;
1042
- node.cssClasses = element.classes.join(" ");
1043
- node.colorIndex = nodes.length;
1044
- nodes.push(node);
1045
- }
1046
- for (const relation of this.relations) {
1047
- let counter = 0;
1048
- const isContains = relation.type === this.Relationships.CONTAINS;
1049
- const edge = {
1050
- id: `${relation.src}-${relation.dst}-${counter}`,
1051
- start: this.requirements.get(relation.src)?.name ?? this.elements.get(relation.src)?.name,
1052
- end: this.requirements.get(relation.dst)?.name ?? this.elements.get(relation.dst)?.name,
1053
- label: `&lt;&lt;${relation.type}&gt;&gt;`,
1054
- classes: "relationshipLine",
1055
- style: ["fill:none", isContains ? "" : "stroke-dasharray: 10,7"],
1056
- labelpos: "c",
1057
- thickness: "normal",
1058
- type: "normal",
1059
- pattern: isContains ? "normal" : "dashed",
1060
- arrowTypeStart: isContains ? "requirement_contains" : "",
1061
- arrowTypeEnd: isContains ? "" : "requirement_arrow",
1062
- look: config.look,
1063
- labelType: "markdown"
1064
- };
1065
- edges.push(edge);
1066
- counter++;
1067
- }
1068
- return { nodes, edges, other: {}, config, direction: this.getDirection() };
1069
- }
1070
- };
1071
- var genColor = /* @__PURE__ */ __name((options) => {
1072
- const config = getConfig();
1073
- const { themeVariables, look } = config;
1074
- const { bkgColorArray, borderColorArray } = themeVariables;
1075
- if (!borderColorArray?.length) {
1076
- return "";
1077
- }
1078
- let sections = "";
1079
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1080
- sections += `
1081
-
1082
- [data-look="${look}"][data-color-id="color-${i}"].node path {
1083
- stroke: ${borderColorArray[i]};
1084
- fill: ${bkgColorArray?.length ? bkgColorArray[i] : ""};
1085
- }
1086
-
1087
- [data-look="${look}"][data-color-id="color-${i}"].node rect {
1088
- stroke: ${borderColorArray[i]};
1089
- fill: ${bkgColorArray?.length ? bkgColorArray[i] : ""};
1090
- }
1091
- `;
1092
- }
1093
- return sections;
1094
- }, "genColor");
1095
- var getStyles = /* @__PURE__ */ __name((options) => {
1096
- const config = getConfig();
1097
- const { look, themeVariables } = config;
1098
- const { requirementEdgeLabelBackground } = themeVariables;
1099
- return `
1100
- ${genColor(options)}
1101
- marker {
1102
- fill: ${options.relationColor};
1103
- stroke: ${options.relationColor};
1104
- }
1105
-
1106
- marker.cross {
1107
- stroke: ${options.lineColor};
1108
- }
1109
-
1110
- svg {
1111
- font-family: ${options.fontFamily};
1112
- font-size: ${options.fontSize};
1113
- }
1114
-
1115
- .reqBox {
1116
- fill: ${options.requirementBackground};
1117
- fill-opacity: 1.0;
1118
- stroke: ${options.requirementBorderColor};
1119
- stroke-width: ${options.requirementBorderSize};
1120
- }
1121
-
1122
- .reqTitle, .reqLabel{
1123
- fill: ${options.requirementTextColor};
1124
- }
1125
- .reqLabelBox {
1126
- fill: ${options.relationLabelBackground};
1127
- fill-opacity: 1.0;
1128
- }
1129
-
1130
- .req-title-line {
1131
- stroke: ${options.requirementBorderColor};
1132
- stroke-width: ${options.requirementBorderSize};
1133
- }
1134
- .relationshipLine {
1135
- stroke: ${options.relationColor};
1136
- stroke-width: ${look === "neo" ? options.strokeWidth : "1px"};
1137
- }
1138
- .relationshipLabel {
1139
- fill: ${options.relationLabelColor};
1140
- }
1141
- .edgeLabel {
1142
- background-color: ${options.edgeLabelBackground};
1143
- }
1144
- .edgeLabel .label rect {
1145
- fill: ${options.edgeLabelBackground};
1146
- }
1147
- .edgeLabel .label text {
1148
- fill: ${options.relationLabelColor};
1149
- }
1150
- .divider {
1151
- stroke: ${options.nodeBorder};
1152
- stroke-width: 1;
1153
- }
1154
- .label {
1155
- font-family: ${options.fontFamily};
1156
- color: ${options.nodeTextColor || options.textColor};
1157
- }
1158
- .label text,span {
1159
- fill: ${options.nodeTextColor || options.textColor};
1160
- color: ${options.nodeTextColor || options.textColor};
1161
- }
1162
- .labelBkg {
1163
- background-color: ${requirementEdgeLabelBackground ?? options.edgeLabelBackground};
1164
- }
1165
-
1166
- `;
1167
- }, "getStyles");
1168
- var styles_default = getStyles;
1169
- var requirementRenderer_exports = {};
1170
- __export(requirementRenderer_exports, {
1171
- draw: () => draw
1172
- });
1173
- var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
1174
- log.info("REF0:");
1175
- log.info("Drawing requirement diagram (unified)", id);
1176
- const { securityLevel, state: conf, layout, look } = getConfig2();
1177
- const data4Layout = diag.db.getData();
1178
- const svg = getDiagramElement(id, securityLevel);
1179
- data4Layout.type = diag.type;
1180
- data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
1181
- data4Layout.nodeSpacing = conf?.nodeSpacing ?? 50;
1182
- data4Layout.rankSpacing = conf?.rankSpacing ?? 50;
1183
- data4Layout.markers = look === "neo" ? ["requirement_contains_neo", "requirement_arrow_neo"] : ["requirement_contains", "requirement_arrow"];
1184
- data4Layout.diagramId = id;
1185
- await render(data4Layout, svg);
1186
- const padding = 8;
1187
- utils_default.insertTitle(
1188
- svg,
1189
- "requirementDiagramTitleText",
1190
- conf?.titleTopMargin ?? 25,
1191
- diag.db.getDiagramTitle()
1192
- );
1193
- setupViewPortForSVG(svg, padding, "requirementDiagram", conf?.useMaxWidth ?? true);
1194
- }, "draw");
1195
- var diagram = {
1196
- parser: requirementDiagram_default,
1197
- get db() {
1198
- return new RequirementDB();
1199
- },
1200
- renderer: requirementRenderer_exports,
1201
- styles: styles_default
1202
- };
1203
- export {
1204
- diagram
1205
- };