@infinilabs/ai-chat 0.0.1 → 0.0.3

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 (116) hide show
  1. package/README.md +10 -1
  2. package/dist/{_baseUniq-BQcAhV7E.js → _baseUniq-C6eXDRdi.js} +1 -1
  3. package/dist/_baseUniq-VBKGmFNZ.cjs +151 -0
  4. package/dist/arc-C_pZjUl4.cjs +130 -0
  5. package/dist/{arc-2jwvQ2TN.js → arc-D1VL3r-o.js} +1 -1
  6. package/dist/architecture-U656AL7Q-BF5SEVYt.cjs +5 -0
  7. package/dist/{architecture-U656AL7Q-WuSilpZW.js → architecture-U656AL7Q-BU8DDug4.js} +1 -1
  8. package/dist/{architectureDiagram-VXUJARFQ-D6SKNy5z.js → architectureDiagram-VXUJARFQ-BD3g0-L9.js} +3 -3
  9. package/dist/architectureDiagram-VXUJARFQ-DjBxfJaD.cjs +8681 -0
  10. package/dist/blockDiagram-VD42YOAC-B2f1rMqq.cjs +3606 -0
  11. package/dist/{blockDiagram-VD42YOAC-Ct2DD8jj.js → blockDiagram-VD42YOAC-Dco6f43O.js} +5 -5
  12. package/dist/c4Diagram-YG6GDRKO-DNqNYnPR.cjs +2481 -0
  13. package/dist/{c4Diagram-YG6GDRKO-B7wBU4mz.js → c4Diagram-YG6GDRKO-DaatwWsP.js} +2 -2
  14. package/dist/channel-CqaWpJup.cjs +6 -0
  15. package/dist/{channel-BRREX19f.js → channel-DHoS2D4-.js} +1 -1
  16. package/dist/{chunk-4BX2VUAB-BnghU1_v.js → chunk-4BX2VUAB-CJqHiK4X.js} +1 -1
  17. package/dist/chunk-4BX2VUAB-DN2yOkoW.cjs +15 -0
  18. package/dist/chunk-55IACEB6-BdkCWkvA.cjs +12 -0
  19. package/dist/{chunk-55IACEB6-Dduk-DEL.js → chunk-55IACEB6-C6ly5iWy.js} +1 -1
  20. package/dist/{chunk-B4BG7PRW-DeHw-z-x.js → chunk-B4BG7PRW--1XVDmjR.js} +4 -4
  21. package/dist/chunk-B4BG7PRW-CyVGILSL.cjs +1825 -0
  22. package/dist/{chunk-DI55MBZ5-GTHMAr0M.js → chunk-DI55MBZ5-CdspH0FP.js} +3 -3
  23. package/dist/chunk-DI55MBZ5-zfT0HzuJ.cjs +1914 -0
  24. package/dist/chunk-FMBD7UC4-B1XNgXxo.cjs +18 -0
  25. package/dist/{chunk-FMBD7UC4-Bchh4_3W.js → chunk-FMBD7UC4-DwJ0I9NE.js} +1 -1
  26. package/dist/chunk-QN33PNHL-BkRCfP3-.cjs +23 -0
  27. package/dist/{chunk-QN33PNHL-H6S-NYp0.js → chunk-QN33PNHL-ToZ1oMAx.js} +1 -1
  28. package/dist/chunk-QZHKN3VN-Bl6qG9aO.cjs +16 -0
  29. package/dist/{chunk-QZHKN3VN-DdcyNnvM.js → chunk-QZHKN3VN-D6NMZefL.js} +1 -1
  30. package/dist/{chunk-TZMSLE5B-C7te_j4V.js → chunk-TZMSLE5B-CX7F9bum.js} +1 -1
  31. package/dist/chunk-TZMSLE5B-CfLnJLL2.cjs +107 -0
  32. package/dist/{classDiagram-2ON5EDUG-CNkHY_Y7.js → classDiagram-2ON5EDUG-do_fcMxL.js} +2 -2
  33. package/dist/classDiagram-2ON5EDUG-l6iTeY9n.cjs +19 -0
  34. package/dist/{classDiagram-v2-WZHVMYZB-CNkHY_Y7.js → classDiagram-v2-WZHVMYZB-do_fcMxL.js} +2 -2
  35. package/dist/classDiagram-v2-WZHVMYZB-l6iTeY9n.cjs +19 -0
  36. package/dist/{clone-DnOD7gQ4.js → clone-B0NbP06l.js} +1 -1
  37. package/dist/clone-O_UR2EnI.cjs +7 -0
  38. package/dist/cose-bilkent-S5V4N54A-Bj9q8jdP.cjs +4942 -0
  39. package/dist/{cose-bilkent-S5V4N54A-2EKtTYth.js → cose-bilkent-S5V4N54A-Dm15CejI.js} +1 -1
  40. package/dist/cytoscape.esm-D8IBYQeQ.cjs +30238 -0
  41. package/dist/dagre-6UL2VRFP-DlrZJc7j.cjs +693 -0
  42. package/dist/{dagre-6UL2VRFP-oJLNDO4O.js → dagre-6UL2VRFP-DpFJxcQI.js} +5 -5
  43. package/dist/defaultLocale-DwYGIg9G.cjs +203 -0
  44. package/dist/{diagram-PSM6KHXK-DhMgmu9h.js → diagram-PSM6KHXK-BiuW3-I6.js} +4 -4
  45. package/dist/diagram-PSM6KHXK-J1K0HhB0.cjs +845 -0
  46. package/dist/{diagram-QEK2KX5R-pB1vUeno.js → diagram-QEK2KX5R-CKI4v8U1.js} +3 -3
  47. package/dist/diagram-QEK2KX5R-CfZyy8K3.cjs +300 -0
  48. package/dist/{diagram-S2PKOQOG-HTooIr24.js → diagram-S2PKOQOG-BFBmhCiH.js} +3 -3
  49. package/dist/diagram-S2PKOQOG-D99Ax7Ju.cjs +210 -0
  50. package/dist/erDiagram-Q2GNP2WA-CVkYr-Vj.cjs +1158 -0
  51. package/dist/{erDiagram-Q2GNP2WA-CCaN2EHf.js → erDiagram-Q2GNP2WA-qVxQAwwu.js} +4 -4
  52. package/dist/{flowDiagram-NV44I4VS-CG0erQtl.js → flowDiagram-NV44I4VS-5brdnMxu.js} +5 -5
  53. package/dist/flowDiagram-NV44I4VS-7p-zbTbS.cjs +2331 -0
  54. package/dist/{ganttDiagram-JELNMOA3-D3rSLJec.js → ganttDiagram-JELNMOA3-B_6E5yap.js} +2 -2
  55. package/dist/ganttDiagram-JELNMOA3-BqIucWob.cjs +3679 -0
  56. package/dist/{gitGraph-F6HP7TQM-BDWdXs6A.js → gitGraph-F6HP7TQM-5ygKEXa4.js} +1 -1
  57. package/dist/gitGraph-F6HP7TQM-Dqtx4v2X.cjs +5 -0
  58. package/dist/{gitGraphDiagram-NY62KEGX-Ip-PiLDb.js → gitGraphDiagram-NY62KEGX-8yiOWwFX.js} +4 -4
  59. package/dist/gitGraphDiagram-NY62KEGX-DLpTvKWJ.cjs +1203 -0
  60. package/dist/graph-BQ7jHivU.cjs +595 -0
  61. package/dist/{graph-wCViE1vL.js → graph-f7dsdfxH.js} +2 -2
  62. package/dist/index-BZzFD4NG.cjs +120453 -0
  63. package/dist/{index-BQvQI7yA.js → index-TgFTummf.js} +103814 -100678
  64. package/dist/index.cjs +19 -0
  65. package/dist/index.js +13 -1
  66. package/dist/info-NVLQJR56-CBEfMVO2.cjs +5 -0
  67. package/dist/info-NVLQJR56-CXysh6Cg.js +5 -0
  68. package/dist/infoDiagram-WHAUD3N6-D8UJMXYO.cjs +31 -0
  69. package/dist/{infoDiagram-WHAUD3N6-BbVs4x8y.js → infoDiagram-WHAUD3N6-DAhQzmYU.js} +2 -2
  70. package/dist/init-DevvdK2U.cjs +15 -0
  71. package/dist/journeyDiagram-XKPGCS4Q-BTWSe50v.cjs +1254 -0
  72. package/dist/{journeyDiagram-XKPGCS4Q-Cz9ox9GA.js → journeyDiagram-XKPGCS4Q-DF63luuF.js} +4 -4
  73. package/dist/kanban-definition-3W4ZIXB7-Bv1kpXjl.cjs +1047 -0
  74. package/dist/{kanban-definition-3W4ZIXB7-ChdUHO5f.js → kanban-definition-3W4ZIXB7-Byg1KrDf.js} +2 -2
  75. package/dist/katex-BhpYeT3b.cjs +14523 -0
  76. package/dist/{layout-BaZPdTGN.js → layout-Bph_0QZr.js} +4 -4
  77. package/dist/layout-Cbov0jB2.cjs +2182 -0
  78. package/dist/{linear-D_RX7hM-.js → linear-BSz-RTmc.js} +1 -1
  79. package/dist/linear-D36lF41G.cjs +339 -0
  80. package/dist/mermaid-parser.core-BjisUoZL.cjs +18703 -0
  81. package/dist/{mermaid-parser.core-_sn6A3wB.js → mermaid-parser.core-D51-lxGS.js} +10 -10
  82. package/dist/min-D_N_XAer.cjs +40 -0
  83. package/dist/{min-BxeM4Drj.js → min-Sni_KseC.js} +2 -2
  84. package/dist/mindmap-definition-VGOIOE7T-B7_dDBbb.cjs +1126 -0
  85. package/dist/{mindmap-definition-VGOIOE7T-BkjJibdi.js → mindmap-definition-VGOIOE7T-fbR1KpVG.js} +3 -3
  86. package/dist/ordinal-D7sQNqXZ.cjs +75 -0
  87. package/dist/{packet-BFZMPI3H-D3RtU0mc.js → packet-BFZMPI3H-B9lSQ4ue.js} +1 -1
  88. package/dist/packet-BFZMPI3H-DFuV40UT.cjs +5 -0
  89. package/dist/pie-7BOR55EZ-CfhfuSiQ.cjs +5 -0
  90. package/dist/pie-7BOR55EZ-DlYTWEJg.js +5 -0
  91. package/dist/{pieDiagram-ADFJNKIX-2Yr1gkth.js → pieDiagram-ADFJNKIX-BZ-6MLDa.js} +4 -4
  92. package/dist/pieDiagram-ADFJNKIX-ZykBg0LM.cjs +237 -0
  93. package/dist/quadrantDiagram-AYHSOK5B-BuiB_Qh3.cjs +1335 -0
  94. package/dist/{quadrantDiagram-AYHSOK5B-CjicpXRv.js → quadrantDiagram-AYHSOK5B-ClRDM-6s.js} +2 -2
  95. package/dist/{radar-NHE76QYJ-CL0tHnUP.js → radar-NHE76QYJ-Crabb2QS.js} +1 -1
  96. package/dist/radar-NHE76QYJ-D3rgOiIb.cjs +5 -0
  97. package/dist/{requirementDiagram-UZGBJVZJ-DBnhlfjR.js → requirementDiagram-UZGBJVZJ-kA_oq2PA.js} +3 -3
  98. package/dist/requirementDiagram-UZGBJVZJ-mm41geqc.cjs +1161 -0
  99. package/dist/sankeyDiagram-TZEHDZUN-C6izw8f1.cjs +1193 -0
  100. package/dist/{sankeyDiagram-TZEHDZUN-B2FErKCa.js → sankeyDiagram-TZEHDZUN-D-ZqnMWy.js} +1 -1
  101. package/dist/sequenceDiagram-WL72ISMW-CjC76RTk.cjs +3874 -0
  102. package/dist/{sequenceDiagram-WL72ISMW-BkNTlRlB.js → sequenceDiagram-WL72ISMW-DUEVJaIy.js} +3 -3
  103. package/dist/{stateDiagram-FKZM4ZOC-CAAFQtS9.js → stateDiagram-FKZM4ZOC-2IfcY2Ye.js} +4 -4
  104. package/dist/stateDiagram-FKZM4ZOC-DK5kcW23.cjs +447 -0
  105. package/dist/{stateDiagram-v2-4FDKWEC3-lF6kUebI.js → stateDiagram-v2-4FDKWEC3-DXQKznzB.js} +2 -2
  106. package/dist/stateDiagram-v2-4FDKWEC3-hWKPBy9I.cjs +19 -0
  107. package/dist/timeline-definition-IT6M3QCI-DwMBhyGj.cjs +1222 -0
  108. package/dist/{timeline-definition-IT6M3QCI-CQgMFEPA.js → timeline-definition-IT6M3QCI-ohrBFack.js} +2 -2
  109. package/dist/treemap-KMMF4GRG-Bdodyj4b.cjs +5 -0
  110. package/dist/{treemap-KMMF4GRG-B0Mc-u8X.js → treemap-KMMF4GRG-C4kqSdak.js} +1 -1
  111. package/dist/{xychartDiagram-PRI3JC2R-Cee7LdLr.js → xychartDiagram-PRI3JC2R-BBSKFQ3Z.js} +2 -2
  112. package/dist/xychartDiagram-PRI3JC2R-wKIvgX35.cjs +1886 -0
  113. package/package.json +19 -6
  114. package/dist/index.css +0 -3334
  115. package/dist/info-NVLQJR56-pJlVBPs6.js +0 -5
  116. package/dist/pie-7BOR55EZ-xH--CiaM.js +0 -5
@@ -0,0 +1,1161 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const chunk55IACEB6 = require("./chunk-55IACEB6-BdkCWkvA.cjs");
5
+ const chunkQN33PNHL = require("./chunk-QN33PNHL-BkRCfP3-.cjs");
6
+ const index = require("./index-BZzFD4NG.cjs");
7
+ var parser = (function() {
8
+ var o = /* @__PURE__ */ index.__name(function(k, v, o2, l) {
9
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
10
+ return o2;
11
+ }, "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];
12
+ var parser2 = {
13
+ trace: /* @__PURE__ */ index.__name(function trace() {
14
+ }, "trace"),
15
+ yy: {},
16
+ 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 },
17
+ 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" },
18
+ 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]],
19
+ performAction: /* @__PURE__ */ index.__name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
20
+ var $0 = $$.length - 1;
21
+ switch (yystate) {
22
+ case 4:
23
+ this.$ = $$[$0].trim();
24
+ yy.setAccTitle(this.$);
25
+ break;
26
+ case 5:
27
+ case 6:
28
+ this.$ = $$[$0].trim();
29
+ yy.setAccDescription(this.$);
30
+ break;
31
+ case 7:
32
+ this.$ = [];
33
+ break;
34
+ case 17:
35
+ yy.setDirection("TB");
36
+ break;
37
+ case 18:
38
+ yy.setDirection("BT");
39
+ break;
40
+ case 19:
41
+ yy.setDirection("RL");
42
+ break;
43
+ case 20:
44
+ yy.setDirection("LR");
45
+ break;
46
+ case 21:
47
+ yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
48
+ break;
49
+ case 22:
50
+ yy.addRequirement($$[$0 - 5], $$[$0 - 6]);
51
+ yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
52
+ break;
53
+ case 23:
54
+ yy.setNewReqId($$[$0 - 2]);
55
+ break;
56
+ case 24:
57
+ yy.setNewReqText($$[$0 - 2]);
58
+ break;
59
+ case 25:
60
+ yy.setNewReqRisk($$[$0 - 2]);
61
+ break;
62
+ case 26:
63
+ yy.setNewReqVerifyMethod($$[$0 - 2]);
64
+ break;
65
+ case 29:
66
+ this.$ = yy.RequirementType.REQUIREMENT;
67
+ break;
68
+ case 30:
69
+ this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
70
+ break;
71
+ case 31:
72
+ this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
73
+ break;
74
+ case 32:
75
+ this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
76
+ break;
77
+ case 33:
78
+ this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
79
+ break;
80
+ case 34:
81
+ this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
82
+ break;
83
+ case 35:
84
+ this.$ = yy.RiskLevel.LOW_RISK;
85
+ break;
86
+ case 36:
87
+ this.$ = yy.RiskLevel.MED_RISK;
88
+ break;
89
+ case 37:
90
+ this.$ = yy.RiskLevel.HIGH_RISK;
91
+ break;
92
+ case 38:
93
+ this.$ = yy.VerifyType.VERIFY_ANALYSIS;
94
+ break;
95
+ case 39:
96
+ this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
97
+ break;
98
+ case 40:
99
+ this.$ = yy.VerifyType.VERIFY_INSPECTION;
100
+ break;
101
+ case 41:
102
+ this.$ = yy.VerifyType.VERIFY_TEST;
103
+ break;
104
+ case 42:
105
+ yy.addElement($$[$0 - 3]);
106
+ break;
107
+ case 43:
108
+ yy.addElement($$[$0 - 5]);
109
+ yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
110
+ break;
111
+ case 44:
112
+ yy.setNewElementType($$[$0 - 2]);
113
+ break;
114
+ case 45:
115
+ yy.setNewElementDocRef($$[$0 - 2]);
116
+ break;
117
+ case 48:
118
+ yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
119
+ break;
120
+ case 49:
121
+ yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
122
+ break;
123
+ case 50:
124
+ this.$ = yy.Relationships.CONTAINS;
125
+ break;
126
+ case 51:
127
+ this.$ = yy.Relationships.COPIES;
128
+ break;
129
+ case 52:
130
+ this.$ = yy.Relationships.DERIVES;
131
+ break;
132
+ case 53:
133
+ this.$ = yy.Relationships.SATISFIES;
134
+ break;
135
+ case 54:
136
+ this.$ = yy.Relationships.VERIFIES;
137
+ break;
138
+ case 55:
139
+ this.$ = yy.Relationships.REFINES;
140
+ break;
141
+ case 56:
142
+ this.$ = yy.Relationships.TRACES;
143
+ break;
144
+ case 57:
145
+ this.$ = $$[$0 - 2];
146
+ yy.defineClass($$[$0 - 1], $$[$0]);
147
+ break;
148
+ case 58:
149
+ yy.setClass($$[$0 - 1], $$[$0]);
150
+ break;
151
+ case 59:
152
+ yy.setClass([$$[$0 - 2]], $$[$0]);
153
+ break;
154
+ case 60:
155
+ case 62:
156
+ this.$ = [$$[$0]];
157
+ break;
158
+ case 61:
159
+ case 63:
160
+ this.$ = $$[$0 - 2].concat([$$[$0]]);
161
+ break;
162
+ case 64:
163
+ this.$ = $$[$0 - 2];
164
+ yy.setCssStyle($$[$0 - 1], $$[$0]);
165
+ break;
166
+ case 65:
167
+ this.$ = [$$[$0]];
168
+ break;
169
+ case 66:
170
+ $$[$0 - 2].push($$[$0]);
171
+ this.$ = $$[$0 - 2];
172
+ break;
173
+ case 68:
174
+ this.$ = $$[$0 - 1] + $$[$0];
175
+ break;
176
+ }
177
+ }, "anonymous"),
178
+ 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])],
179
+ 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] },
180
+ parseError: /* @__PURE__ */ index.__name(function parseError(str, hash) {
181
+ if (hash.recoverable) {
182
+ this.trace(str);
183
+ } else {
184
+ var error = new Error(str);
185
+ error.hash = hash;
186
+ throw error;
187
+ }
188
+ }, "parseError"),
189
+ parse: /* @__PURE__ */ index.__name(function parse(input) {
190
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
191
+ var args = lstack.slice.call(arguments, 1);
192
+ var lexer2 = Object.create(this.lexer);
193
+ var sharedState = { yy: {} };
194
+ for (var k in this.yy) {
195
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
196
+ sharedState.yy[k] = this.yy[k];
197
+ }
198
+ }
199
+ lexer2.setInput(input, sharedState.yy);
200
+ sharedState.yy.lexer = lexer2;
201
+ sharedState.yy.parser = this;
202
+ if (typeof lexer2.yylloc == "undefined") {
203
+ lexer2.yylloc = {};
204
+ }
205
+ var yyloc = lexer2.yylloc;
206
+ lstack.push(yyloc);
207
+ var ranges = lexer2.options && lexer2.options.ranges;
208
+ if (typeof sharedState.yy.parseError === "function") {
209
+ this.parseError = sharedState.yy.parseError;
210
+ } else {
211
+ this.parseError = Object.getPrototypeOf(this).parseError;
212
+ }
213
+ function popStack(n) {
214
+ stack.length = stack.length - 2 * n;
215
+ vstack.length = vstack.length - n;
216
+ lstack.length = lstack.length - n;
217
+ }
218
+ index.__name(popStack, "popStack");
219
+ function lex() {
220
+ var token;
221
+ token = tstack.pop() || lexer2.lex() || EOF;
222
+ if (typeof token !== "number") {
223
+ if (token instanceof Array) {
224
+ tstack = token;
225
+ token = tstack.pop();
226
+ }
227
+ token = self.symbols_[token] || token;
228
+ }
229
+ return token;
230
+ }
231
+ index.__name(lex, "lex");
232
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
233
+ while (true) {
234
+ state = stack[stack.length - 1];
235
+ if (this.defaultActions[state]) {
236
+ action = this.defaultActions[state];
237
+ } else {
238
+ if (symbol === null || typeof symbol == "undefined") {
239
+ symbol = lex();
240
+ }
241
+ action = table[state] && table[state][symbol];
242
+ }
243
+ if (typeof action === "undefined" || !action.length || !action[0]) {
244
+ var errStr = "";
245
+ expected = [];
246
+ for (p in table[state]) {
247
+ if (this.terminals_[p] && p > TERROR) {
248
+ expected.push("'" + this.terminals_[p] + "'");
249
+ }
250
+ }
251
+ if (lexer2.showPosition) {
252
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
253
+ } else {
254
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
255
+ }
256
+ this.parseError(errStr, {
257
+ text: lexer2.match,
258
+ token: this.terminals_[symbol] || symbol,
259
+ line: lexer2.yylineno,
260
+ loc: yyloc,
261
+ expected
262
+ });
263
+ }
264
+ if (action[0] instanceof Array && action.length > 1) {
265
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
266
+ }
267
+ switch (action[0]) {
268
+ case 1:
269
+ stack.push(symbol);
270
+ vstack.push(lexer2.yytext);
271
+ lstack.push(lexer2.yylloc);
272
+ stack.push(action[1]);
273
+ symbol = null;
274
+ {
275
+ yyleng = lexer2.yyleng;
276
+ yytext = lexer2.yytext;
277
+ yylineno = lexer2.yylineno;
278
+ yyloc = lexer2.yylloc;
279
+ }
280
+ break;
281
+ case 2:
282
+ len = this.productions_[action[1]][1];
283
+ yyval.$ = vstack[vstack.length - len];
284
+ yyval._$ = {
285
+ first_line: lstack[lstack.length - (len || 1)].first_line,
286
+ last_line: lstack[lstack.length - 1].last_line,
287
+ first_column: lstack[lstack.length - (len || 1)].first_column,
288
+ last_column: lstack[lstack.length - 1].last_column
289
+ };
290
+ if (ranges) {
291
+ yyval._$.range = [
292
+ lstack[lstack.length - (len || 1)].range[0],
293
+ lstack[lstack.length - 1].range[1]
294
+ ];
295
+ }
296
+ r = this.performAction.apply(yyval, [
297
+ yytext,
298
+ yyleng,
299
+ yylineno,
300
+ sharedState.yy,
301
+ action[1],
302
+ vstack,
303
+ lstack
304
+ ].concat(args));
305
+ if (typeof r !== "undefined") {
306
+ return r;
307
+ }
308
+ if (len) {
309
+ stack = stack.slice(0, -1 * len * 2);
310
+ vstack = vstack.slice(0, -1 * len);
311
+ lstack = lstack.slice(0, -1 * len);
312
+ }
313
+ stack.push(this.productions_[action[1]][0]);
314
+ vstack.push(yyval.$);
315
+ lstack.push(yyval._$);
316
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
317
+ stack.push(newState);
318
+ break;
319
+ case 3:
320
+ return true;
321
+ }
322
+ }
323
+ return true;
324
+ }, "parse")
325
+ };
326
+ var lexer = /* @__PURE__ */ (function() {
327
+ var lexer2 = {
328
+ EOF: 1,
329
+ parseError: /* @__PURE__ */ index.__name(function parseError(str, hash) {
330
+ if (this.yy.parser) {
331
+ this.yy.parser.parseError(str, hash);
332
+ } else {
333
+ throw new Error(str);
334
+ }
335
+ }, "parseError"),
336
+ // resets the lexer, sets new input
337
+ setInput: /* @__PURE__ */ index.__name(function(input, yy) {
338
+ this.yy = yy || this.yy || {};
339
+ this._input = input;
340
+ this._more = this._backtrack = this.done = false;
341
+ this.yylineno = this.yyleng = 0;
342
+ this.yytext = this.matched = this.match = "";
343
+ this.conditionStack = ["INITIAL"];
344
+ this.yylloc = {
345
+ first_line: 1,
346
+ first_column: 0,
347
+ last_line: 1,
348
+ last_column: 0
349
+ };
350
+ if (this.options.ranges) {
351
+ this.yylloc.range = [0, 0];
352
+ }
353
+ this.offset = 0;
354
+ return this;
355
+ }, "setInput"),
356
+ // consumes and returns one char from the input
357
+ input: /* @__PURE__ */ index.__name(function() {
358
+ var ch = this._input[0];
359
+ this.yytext += ch;
360
+ this.yyleng++;
361
+ this.offset++;
362
+ this.match += ch;
363
+ this.matched += ch;
364
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
365
+ if (lines) {
366
+ this.yylineno++;
367
+ this.yylloc.last_line++;
368
+ } else {
369
+ this.yylloc.last_column++;
370
+ }
371
+ if (this.options.ranges) {
372
+ this.yylloc.range[1]++;
373
+ }
374
+ this._input = this._input.slice(1);
375
+ return ch;
376
+ }, "input"),
377
+ // unshifts one char (or a string) into the input
378
+ unput: /* @__PURE__ */ index.__name(function(ch) {
379
+ var len = ch.length;
380
+ var lines = ch.split(/(?:\r\n?|\n)/g);
381
+ this._input = ch + this._input;
382
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
383
+ this.offset -= len;
384
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
385
+ this.match = this.match.substr(0, this.match.length - 1);
386
+ this.matched = this.matched.substr(0, this.matched.length - 1);
387
+ if (lines.length - 1) {
388
+ this.yylineno -= lines.length - 1;
389
+ }
390
+ var r = this.yylloc.range;
391
+ this.yylloc = {
392
+ first_line: this.yylloc.first_line,
393
+ last_line: this.yylineno + 1,
394
+ first_column: this.yylloc.first_column,
395
+ 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
396
+ };
397
+ if (this.options.ranges) {
398
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
399
+ }
400
+ this.yyleng = this.yytext.length;
401
+ return this;
402
+ }, "unput"),
403
+ // When called from action, caches matched text and appends it on next action
404
+ more: /* @__PURE__ */ index.__name(function() {
405
+ this._more = true;
406
+ return this;
407
+ }, "more"),
408
+ // 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.
409
+ reject: /* @__PURE__ */ index.__name(function() {
410
+ if (this.options.backtrack_lexer) {
411
+ this._backtrack = true;
412
+ } else {
413
+ 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(), {
414
+ text: "",
415
+ token: null,
416
+ line: this.yylineno
417
+ });
418
+ }
419
+ return this;
420
+ }, "reject"),
421
+ // retain first n characters of the match
422
+ less: /* @__PURE__ */ index.__name(function(n) {
423
+ this.unput(this.match.slice(n));
424
+ }, "less"),
425
+ // displays already matched input, i.e. for error messages
426
+ pastInput: /* @__PURE__ */ index.__name(function() {
427
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
428
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
429
+ }, "pastInput"),
430
+ // displays upcoming input, i.e. for error messages
431
+ upcomingInput: /* @__PURE__ */ index.__name(function() {
432
+ var next = this.match;
433
+ if (next.length < 20) {
434
+ next += this._input.substr(0, 20 - next.length);
435
+ }
436
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
437
+ }, "upcomingInput"),
438
+ // displays the character position where the lexing error occurred, i.e. for error messages
439
+ showPosition: /* @__PURE__ */ index.__name(function() {
440
+ var pre = this.pastInput();
441
+ var c = new Array(pre.length + 1).join("-");
442
+ return pre + this.upcomingInput() + "\n" + c + "^";
443
+ }, "showPosition"),
444
+ // test the lexed token: return FALSE when not a match, otherwise return token
445
+ test_match: /* @__PURE__ */ index.__name(function(match, indexed_rule) {
446
+ var token, lines, backup;
447
+ if (this.options.backtrack_lexer) {
448
+ backup = {
449
+ yylineno: this.yylineno,
450
+ yylloc: {
451
+ first_line: this.yylloc.first_line,
452
+ last_line: this.last_line,
453
+ first_column: this.yylloc.first_column,
454
+ last_column: this.yylloc.last_column
455
+ },
456
+ yytext: this.yytext,
457
+ match: this.match,
458
+ matches: this.matches,
459
+ matched: this.matched,
460
+ yyleng: this.yyleng,
461
+ offset: this.offset,
462
+ _more: this._more,
463
+ _input: this._input,
464
+ yy: this.yy,
465
+ conditionStack: this.conditionStack.slice(0),
466
+ done: this.done
467
+ };
468
+ if (this.options.ranges) {
469
+ backup.yylloc.range = this.yylloc.range.slice(0);
470
+ }
471
+ }
472
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
473
+ if (lines) {
474
+ this.yylineno += lines.length;
475
+ }
476
+ this.yylloc = {
477
+ first_line: this.yylloc.last_line,
478
+ last_line: this.yylineno + 1,
479
+ first_column: this.yylloc.last_column,
480
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
481
+ };
482
+ this.yytext += match[0];
483
+ this.match += match[0];
484
+ this.matches = match;
485
+ this.yyleng = this.yytext.length;
486
+ if (this.options.ranges) {
487
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
488
+ }
489
+ this._more = false;
490
+ this._backtrack = false;
491
+ this._input = this._input.slice(match[0].length);
492
+ this.matched += match[0];
493
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
494
+ if (this.done && this._input) {
495
+ this.done = false;
496
+ }
497
+ if (token) {
498
+ return token;
499
+ } else if (this._backtrack) {
500
+ for (var k in backup) {
501
+ this[k] = backup[k];
502
+ }
503
+ return false;
504
+ }
505
+ return false;
506
+ }, "test_match"),
507
+ // return next match in input
508
+ next: /* @__PURE__ */ index.__name(function() {
509
+ if (this.done) {
510
+ return this.EOF;
511
+ }
512
+ if (!this._input) {
513
+ this.done = true;
514
+ }
515
+ var token, match, tempMatch, index2;
516
+ if (!this._more) {
517
+ this.yytext = "";
518
+ this.match = "";
519
+ }
520
+ var rules = this._currentRules();
521
+ for (var i = 0; i < rules.length; i++) {
522
+ tempMatch = this._input.match(this.rules[rules[i]]);
523
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
524
+ match = tempMatch;
525
+ index2 = i;
526
+ if (this.options.backtrack_lexer) {
527
+ token = this.test_match(tempMatch, rules[i]);
528
+ if (token !== false) {
529
+ return token;
530
+ } else if (this._backtrack) {
531
+ match = false;
532
+ continue;
533
+ } else {
534
+ return false;
535
+ }
536
+ } else if (!this.options.flex) {
537
+ break;
538
+ }
539
+ }
540
+ }
541
+ if (match) {
542
+ token = this.test_match(match, rules[index2]);
543
+ if (token !== false) {
544
+ return token;
545
+ }
546
+ return false;
547
+ }
548
+ if (this._input === "") {
549
+ return this.EOF;
550
+ } else {
551
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
552
+ text: "",
553
+ token: null,
554
+ line: this.yylineno
555
+ });
556
+ }
557
+ }, "next"),
558
+ // return next match that has a token
559
+ lex: /* @__PURE__ */ index.__name(function lex() {
560
+ var r = this.next();
561
+ if (r) {
562
+ return r;
563
+ } else {
564
+ return this.lex();
565
+ }
566
+ }, "lex"),
567
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
568
+ begin: /* @__PURE__ */ index.__name(function begin(condition) {
569
+ this.conditionStack.push(condition);
570
+ }, "begin"),
571
+ // pop the previously active lexer condition state off the condition stack
572
+ popState: /* @__PURE__ */ index.__name(function popState() {
573
+ var n = this.conditionStack.length - 1;
574
+ if (n > 0) {
575
+ return this.conditionStack.pop();
576
+ } else {
577
+ return this.conditionStack[0];
578
+ }
579
+ }, "popState"),
580
+ // produce the lexer rule set which is active for the currently active lexer condition state
581
+ _currentRules: /* @__PURE__ */ index.__name(function _currentRules() {
582
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
583
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
584
+ } else {
585
+ return this.conditions["INITIAL"].rules;
586
+ }
587
+ }, "_currentRules"),
588
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
589
+ topState: /* @__PURE__ */ index.__name(function topState(n) {
590
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
591
+ if (n >= 0) {
592
+ return this.conditionStack[n];
593
+ } else {
594
+ return "INITIAL";
595
+ }
596
+ }, "topState"),
597
+ // alias for begin(condition)
598
+ pushState: /* @__PURE__ */ index.__name(function pushState(condition) {
599
+ this.begin(condition);
600
+ }, "pushState"),
601
+ // return the number of states currently on the stack
602
+ stateStackSize: /* @__PURE__ */ index.__name(function stateStackSize() {
603
+ return this.conditionStack.length;
604
+ }, "stateStackSize"),
605
+ options: { "case-insensitive": true },
606
+ performAction: /* @__PURE__ */ index.__name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
607
+ switch ($avoiding_name_collisions) {
608
+ case 0:
609
+ return "title";
610
+ case 1:
611
+ this.begin("acc_title");
612
+ return 9;
613
+ case 2:
614
+ this.popState();
615
+ return "acc_title_value";
616
+ case 3:
617
+ this.begin("acc_descr");
618
+ return 11;
619
+ case 4:
620
+ this.popState();
621
+ return "acc_descr_value";
622
+ case 5:
623
+ this.begin("acc_descr_multiline");
624
+ break;
625
+ case 6:
626
+ this.popState();
627
+ break;
628
+ case 7:
629
+ return "acc_descr_multiline_value";
630
+ case 8:
631
+ return 21;
632
+ case 9:
633
+ return 22;
634
+ case 10:
635
+ return 23;
636
+ case 11:
637
+ return 24;
638
+ case 12:
639
+ return 5;
640
+ case 13:
641
+ break;
642
+ case 14:
643
+ break;
644
+ case 15:
645
+ break;
646
+ case 16:
647
+ return 8;
648
+ case 17:
649
+ return 6;
650
+ case 18:
651
+ return 27;
652
+ case 19:
653
+ return 40;
654
+ case 20:
655
+ return 29;
656
+ case 21:
657
+ return 32;
658
+ case 22:
659
+ return 31;
660
+ case 23:
661
+ return 34;
662
+ case 24:
663
+ return 36;
664
+ case 25:
665
+ return 38;
666
+ case 26:
667
+ return 41;
668
+ case 27:
669
+ return 42;
670
+ case 28:
671
+ return 43;
672
+ case 29:
673
+ return 44;
674
+ case 30:
675
+ return 45;
676
+ case 31:
677
+ return 46;
678
+ case 32:
679
+ return 47;
680
+ case 33:
681
+ return 48;
682
+ case 34:
683
+ return 49;
684
+ case 35:
685
+ return 50;
686
+ case 36:
687
+ return 51;
688
+ case 37:
689
+ return 52;
690
+ case 38:
691
+ return 53;
692
+ case 39:
693
+ return 54;
694
+ case 40:
695
+ return 65;
696
+ case 41:
697
+ return 66;
698
+ case 42:
699
+ return 67;
700
+ case 43:
701
+ return 68;
702
+ case 44:
703
+ return 69;
704
+ case 45:
705
+ return 70;
706
+ case 46:
707
+ return 71;
708
+ case 47:
709
+ return 57;
710
+ case 48:
711
+ return 59;
712
+ case 49:
713
+ this.begin("style");
714
+ return 77;
715
+ case 50:
716
+ return 75;
717
+ case 51:
718
+ return 81;
719
+ case 52:
720
+ return 88;
721
+ case 53:
722
+ return "PERCENT";
723
+ case 54:
724
+ return 86;
725
+ case 55:
726
+ return 84;
727
+ case 56:
728
+ break;
729
+ case 57:
730
+ this.begin("string");
731
+ break;
732
+ case 58:
733
+ this.popState();
734
+ break;
735
+ case 59:
736
+ this.begin("style");
737
+ return 72;
738
+ case 60:
739
+ this.begin("style");
740
+ return 74;
741
+ case 61:
742
+ return 61;
743
+ case 62:
744
+ return 64;
745
+ case 63:
746
+ return 63;
747
+ case 64:
748
+ this.begin("string");
749
+ break;
750
+ case 65:
751
+ this.popState();
752
+ break;
753
+ case 66:
754
+ return "qString";
755
+ case 67:
756
+ yy_.yytext = yy_.yytext.trim();
757
+ return 89;
758
+ case 68:
759
+ return 75;
760
+ case 69:
761
+ return 80;
762
+ case 70:
763
+ return 76;
764
+ }
765
+ }, "anonymous"),
766
+ 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],
767
+ 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 } }
768
+ };
769
+ return lexer2;
770
+ })();
771
+ parser2.lexer = lexer;
772
+ function Parser() {
773
+ this.yy = {};
774
+ }
775
+ index.__name(Parser, "Parser");
776
+ Parser.prototype = parser2;
777
+ parser2.Parser = Parser;
778
+ return new Parser();
779
+ })();
780
+ parser.parser = parser;
781
+ var requirementDiagram_default = parser;
782
+ var RequirementDB = (_a = class {
783
+ constructor() {
784
+ this.relations = [];
785
+ this.latestRequirement = this.getInitialRequirement();
786
+ this.requirements = /* @__PURE__ */ new Map();
787
+ this.latestElement = this.getInitialElement();
788
+ this.elements = /* @__PURE__ */ new Map();
789
+ this.classes = /* @__PURE__ */ new Map();
790
+ this.direction = "TB";
791
+ this.RequirementType = {
792
+ REQUIREMENT: "Requirement",
793
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
794
+ INTERFACE_REQUIREMENT: "Interface Requirement",
795
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
796
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
797
+ DESIGN_CONSTRAINT: "Design Constraint"
798
+ };
799
+ this.RiskLevel = {
800
+ LOW_RISK: "Low",
801
+ MED_RISK: "Medium",
802
+ HIGH_RISK: "High"
803
+ };
804
+ this.VerifyType = {
805
+ VERIFY_ANALYSIS: "Analysis",
806
+ VERIFY_DEMONSTRATION: "Demonstration",
807
+ VERIFY_INSPECTION: "Inspection",
808
+ VERIFY_TEST: "Test"
809
+ };
810
+ this.Relationships = {
811
+ CONTAINS: "contains",
812
+ COPIES: "copies",
813
+ DERIVES: "derives",
814
+ SATISFIES: "satisfies",
815
+ VERIFIES: "verifies",
816
+ REFINES: "refines",
817
+ TRACES: "traces"
818
+ };
819
+ this.setAccTitle = index.setAccTitle;
820
+ this.getAccTitle = index.getAccTitle;
821
+ this.setAccDescription = index.setAccDescription;
822
+ this.getAccDescription = index.getAccDescription;
823
+ this.setDiagramTitle = index.setDiagramTitle;
824
+ this.getDiagramTitle = index.getDiagramTitle;
825
+ this.getConfig = /* @__PURE__ */ index.__name(() => index.getConfig2().requirement, "getConfig");
826
+ this.clear();
827
+ this.setDirection = this.setDirection.bind(this);
828
+ this.addRequirement = this.addRequirement.bind(this);
829
+ this.setNewReqId = this.setNewReqId.bind(this);
830
+ this.setNewReqRisk = this.setNewReqRisk.bind(this);
831
+ this.setNewReqText = this.setNewReqText.bind(this);
832
+ this.setNewReqVerifyMethod = this.setNewReqVerifyMethod.bind(this);
833
+ this.addElement = this.addElement.bind(this);
834
+ this.setNewElementType = this.setNewElementType.bind(this);
835
+ this.setNewElementDocRef = this.setNewElementDocRef.bind(this);
836
+ this.addRelationship = this.addRelationship.bind(this);
837
+ this.setCssStyle = this.setCssStyle.bind(this);
838
+ this.setClass = this.setClass.bind(this);
839
+ this.defineClass = this.defineClass.bind(this);
840
+ this.setAccTitle = this.setAccTitle.bind(this);
841
+ this.setAccDescription = this.setAccDescription.bind(this);
842
+ }
843
+ getDirection() {
844
+ return this.direction;
845
+ }
846
+ setDirection(dir) {
847
+ this.direction = dir;
848
+ }
849
+ resetLatestRequirement() {
850
+ this.latestRequirement = this.getInitialRequirement();
851
+ }
852
+ resetLatestElement() {
853
+ this.latestElement = this.getInitialElement();
854
+ }
855
+ getInitialRequirement() {
856
+ return {
857
+ requirementId: "",
858
+ text: "",
859
+ risk: "",
860
+ verifyMethod: "",
861
+ name: "",
862
+ type: "",
863
+ cssStyles: [],
864
+ classes: ["default"]
865
+ };
866
+ }
867
+ getInitialElement() {
868
+ return {
869
+ name: "",
870
+ type: "",
871
+ docRef: "",
872
+ cssStyles: [],
873
+ classes: ["default"]
874
+ };
875
+ }
876
+ addRequirement(name, type) {
877
+ if (!this.requirements.has(name)) {
878
+ this.requirements.set(name, {
879
+ name,
880
+ type,
881
+ requirementId: this.latestRequirement.requirementId,
882
+ text: this.latestRequirement.text,
883
+ risk: this.latestRequirement.risk,
884
+ verifyMethod: this.latestRequirement.verifyMethod,
885
+ cssStyles: [],
886
+ classes: ["default"]
887
+ });
888
+ }
889
+ this.resetLatestRequirement();
890
+ return this.requirements.get(name);
891
+ }
892
+ getRequirements() {
893
+ return this.requirements;
894
+ }
895
+ setNewReqId(id) {
896
+ if (this.latestRequirement !== void 0) {
897
+ this.latestRequirement.requirementId = id;
898
+ }
899
+ }
900
+ setNewReqText(text) {
901
+ if (this.latestRequirement !== void 0) {
902
+ this.latestRequirement.text = text;
903
+ }
904
+ }
905
+ setNewReqRisk(risk) {
906
+ if (this.latestRequirement !== void 0) {
907
+ this.latestRequirement.risk = risk;
908
+ }
909
+ }
910
+ setNewReqVerifyMethod(verifyMethod) {
911
+ if (this.latestRequirement !== void 0) {
912
+ this.latestRequirement.verifyMethod = verifyMethod;
913
+ }
914
+ }
915
+ addElement(name) {
916
+ if (!this.elements.has(name)) {
917
+ this.elements.set(name, {
918
+ name,
919
+ type: this.latestElement.type,
920
+ docRef: this.latestElement.docRef,
921
+ cssStyles: [],
922
+ classes: ["default"]
923
+ });
924
+ index.log.info("Added new element: ", name);
925
+ }
926
+ this.resetLatestElement();
927
+ return this.elements.get(name);
928
+ }
929
+ getElements() {
930
+ return this.elements;
931
+ }
932
+ setNewElementType(type) {
933
+ if (this.latestElement !== void 0) {
934
+ this.latestElement.type = type;
935
+ }
936
+ }
937
+ setNewElementDocRef(docRef) {
938
+ if (this.latestElement !== void 0) {
939
+ this.latestElement.docRef = docRef;
940
+ }
941
+ }
942
+ addRelationship(type, src, dst) {
943
+ this.relations.push({
944
+ type,
945
+ src,
946
+ dst
947
+ });
948
+ }
949
+ getRelationships() {
950
+ return this.relations;
951
+ }
952
+ clear() {
953
+ this.relations = [];
954
+ this.resetLatestRequirement();
955
+ this.requirements = /* @__PURE__ */ new Map();
956
+ this.resetLatestElement();
957
+ this.elements = /* @__PURE__ */ new Map();
958
+ this.classes = /* @__PURE__ */ new Map();
959
+ index.clear();
960
+ }
961
+ setCssStyle(ids, styles) {
962
+ for (const id of ids) {
963
+ const node = this.requirements.get(id) ?? this.elements.get(id);
964
+ if (!styles || !node) {
965
+ return;
966
+ }
967
+ for (const s of styles) {
968
+ if (s.includes(",")) {
969
+ node.cssStyles.push(...s.split(","));
970
+ } else {
971
+ node.cssStyles.push(s);
972
+ }
973
+ }
974
+ }
975
+ }
976
+ setClass(ids, classNames) {
977
+ for (const id of ids) {
978
+ const node = this.requirements.get(id) ?? this.elements.get(id);
979
+ if (node) {
980
+ for (const _class of classNames) {
981
+ node.classes.push(_class);
982
+ const styles = this.classes.get(_class)?.styles;
983
+ if (styles) {
984
+ node.cssStyles.push(...styles);
985
+ }
986
+ }
987
+ }
988
+ }
989
+ }
990
+ defineClass(ids, style) {
991
+ for (const id of ids) {
992
+ let styleClass = this.classes.get(id);
993
+ if (styleClass === void 0) {
994
+ styleClass = { id, styles: [], textStyles: [] };
995
+ this.classes.set(id, styleClass);
996
+ }
997
+ if (style) {
998
+ style.forEach(function(s) {
999
+ if (/color/.exec(s)) {
1000
+ const newStyle = s.replace("fill", "bgFill");
1001
+ styleClass.textStyles.push(newStyle);
1002
+ }
1003
+ styleClass.styles.push(s);
1004
+ });
1005
+ }
1006
+ this.requirements.forEach((value) => {
1007
+ if (value.classes.includes(id)) {
1008
+ value.cssStyles.push(...style.flatMap((s) => s.split(",")));
1009
+ }
1010
+ });
1011
+ this.elements.forEach((value) => {
1012
+ if (value.classes.includes(id)) {
1013
+ value.cssStyles.push(...style.flatMap((s) => s.split(",")));
1014
+ }
1015
+ });
1016
+ }
1017
+ }
1018
+ getClasses() {
1019
+ return this.classes;
1020
+ }
1021
+ getData() {
1022
+ const config = index.getConfig2();
1023
+ const nodes = [];
1024
+ const edges = [];
1025
+ for (const requirement of this.requirements.values()) {
1026
+ const node = requirement;
1027
+ node.id = requirement.name;
1028
+ node.cssStyles = requirement.cssStyles;
1029
+ node.cssClasses = requirement.classes.join(" ");
1030
+ node.shape = "requirementBox";
1031
+ node.look = config.look;
1032
+ nodes.push(node);
1033
+ }
1034
+ for (const element of this.elements.values()) {
1035
+ const node = element;
1036
+ node.shape = "requirementBox";
1037
+ node.look = config.look;
1038
+ node.id = element.name;
1039
+ node.cssStyles = element.cssStyles;
1040
+ node.cssClasses = element.classes.join(" ");
1041
+ nodes.push(node);
1042
+ }
1043
+ for (const relation of this.relations) {
1044
+ let counter = 0;
1045
+ const isContains = relation.type === this.Relationships.CONTAINS;
1046
+ const edge = {
1047
+ id: `${relation.src}-${relation.dst}-${counter}`,
1048
+ start: this.requirements.get(relation.src)?.name ?? this.elements.get(relation.src)?.name,
1049
+ end: this.requirements.get(relation.dst)?.name ?? this.elements.get(relation.dst)?.name,
1050
+ label: `&lt;&lt;${relation.type}&gt;&gt;`,
1051
+ classes: "relationshipLine",
1052
+ style: ["fill:none", isContains ? "" : "stroke-dasharray: 10,7"],
1053
+ labelpos: "c",
1054
+ thickness: "normal",
1055
+ type: "normal",
1056
+ pattern: isContains ? "normal" : "dashed",
1057
+ arrowTypeStart: isContains ? "requirement_contains" : "",
1058
+ arrowTypeEnd: isContains ? "" : "requirement_arrow",
1059
+ look: config.look
1060
+ };
1061
+ edges.push(edge);
1062
+ counter++;
1063
+ }
1064
+ return { nodes, edges, other: {}, config, direction: this.getDirection() };
1065
+ }
1066
+ }, index.__name(_a, "RequirementDB"), _a);
1067
+ var getStyles = /* @__PURE__ */ index.__name((options) => `
1068
+
1069
+ marker {
1070
+ fill: ${options.relationColor};
1071
+ stroke: ${options.relationColor};
1072
+ }
1073
+
1074
+ marker.cross {
1075
+ stroke: ${options.lineColor};
1076
+ }
1077
+
1078
+ svg {
1079
+ font-family: ${options.fontFamily};
1080
+ font-size: ${options.fontSize};
1081
+ }
1082
+
1083
+ .reqBox {
1084
+ fill: ${options.requirementBackground};
1085
+ fill-opacity: 1.0;
1086
+ stroke: ${options.requirementBorderColor};
1087
+ stroke-width: ${options.requirementBorderSize};
1088
+ }
1089
+
1090
+ .reqTitle, .reqLabel{
1091
+ fill: ${options.requirementTextColor};
1092
+ }
1093
+ .reqLabelBox {
1094
+ fill: ${options.relationLabelBackground};
1095
+ fill-opacity: 1.0;
1096
+ }
1097
+
1098
+ .req-title-line {
1099
+ stroke: ${options.requirementBorderColor};
1100
+ stroke-width: ${options.requirementBorderSize};
1101
+ }
1102
+ .relationshipLine {
1103
+ stroke: ${options.relationColor};
1104
+ stroke-width: 1;
1105
+ }
1106
+ .relationshipLabel {
1107
+ fill: ${options.relationLabelColor};
1108
+ }
1109
+ .divider {
1110
+ stroke: ${options.nodeBorder};
1111
+ stroke-width: 1;
1112
+ }
1113
+ .label {
1114
+ font-family: ${options.fontFamily};
1115
+ color: ${options.nodeTextColor || options.textColor};
1116
+ }
1117
+ .label text,span {
1118
+ fill: ${options.nodeTextColor || options.textColor};
1119
+ color: ${options.nodeTextColor || options.textColor};
1120
+ }
1121
+ .labelBkg {
1122
+ background-color: ${options.edgeLabelBackground};
1123
+ }
1124
+
1125
+ `, "getStyles");
1126
+ var styles_default = getStyles;
1127
+ var requirementRenderer_exports = {};
1128
+ index.__export(requirementRenderer_exports, {
1129
+ draw: () => draw
1130
+ });
1131
+ var draw = /* @__PURE__ */ index.__name(async function(text, id, _version, diag) {
1132
+ index.log.info("REF0:");
1133
+ index.log.info("Drawing requirement diagram (unified)", id);
1134
+ const { securityLevel, state: conf, layout } = index.getConfig2();
1135
+ const data4Layout = diag.db.getData();
1136
+ const svg = chunk55IACEB6.getDiagramElement(id, securityLevel);
1137
+ data4Layout.type = diag.type;
1138
+ data4Layout.layoutAlgorithm = index.getRegisteredLayoutAlgorithm(layout);
1139
+ data4Layout.nodeSpacing = conf?.nodeSpacing ?? 50;
1140
+ data4Layout.rankSpacing = conf?.rankSpacing ?? 50;
1141
+ data4Layout.markers = ["requirement_contains", "requirement_arrow"];
1142
+ data4Layout.diagramId = id;
1143
+ await index.render(data4Layout, svg);
1144
+ const padding = 8;
1145
+ index.utils_default.insertTitle(
1146
+ svg,
1147
+ "requirementDiagramTitleText",
1148
+ conf?.titleTopMargin ?? 25,
1149
+ diag.db.getDiagramTitle()
1150
+ );
1151
+ chunkQN33PNHL.setupViewPortForSVG(svg, padding, "requirementDiagram", conf?.useMaxWidth ?? true);
1152
+ }, "draw");
1153
+ var diagram = {
1154
+ parser: requirementDiagram_default,
1155
+ get db() {
1156
+ return new RequirementDB();
1157
+ },
1158
+ renderer: requirementRenderer_exports,
1159
+ styles: styles_default
1160
+ };
1161
+ exports.diagram = diagram;