@schmitech/chatbot-widget 0.5.3 → 0.5.4

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 (47) hide show
  1. package/dist/Tableau10-D7jGxypv-BNlEL2G_.js +9 -0
  2. package/dist/arc-D-ZI5fuh-CvDHBzlN.js +84 -0
  3. package/dist/blockDiagram-c4efeb88-DUnNxfIR-Bhh-x1q6.js +1221 -0
  4. package/dist/c4Diagram-c83219d4-cC4OxfBG-DRTO_jy5.js +1580 -0
  5. package/dist/channel-hcYozyrT-BSOc2Hp-.js +6 -0
  6. package/dist/chatbot-widget.bundle.js +3881 -1586
  7. package/dist/chatbot-widget.css +1 -1
  8. package/dist/chatbot-widget.es.js +12 -63659
  9. package/dist/chatbot-widget.umd.js +3880 -1585
  10. package/dist/classDiagram-beda092f-BLYhf5Mr-vk4Ko58U.js +218 -0
  11. package/dist/classDiagram-v2-2358418a-VBkbF8mr-Ca0l1fEs.js +201 -0
  12. package/dist/clone-BZIkCMuw-B9owNq6E.js +9 -0
  13. package/dist/config/index.d.ts +2 -2
  14. package/dist/createText-1719965b-UejsQ47k-B1DYw0WW.js +2955 -0
  15. package/dist/edges-96097737-1M5QvjOd-BpQVVoQN.js +1088 -0
  16. package/dist/erDiagram-0228fc6a-CjBNxHoC-DXDVlH55.js +929 -0
  17. package/dist/flowDb-c6c81e3f-Q2aoOxdz-DfrfI3H1.js +1127 -0
  18. package/dist/flowDiagram-50d868cf-zizL6ppE-BAH-_juu.js +788 -0
  19. package/dist/flowDiagram-v2-4f6560a1-DVx_vlO5-bkcRE0UW.js +18 -0
  20. package/dist/flowchart-elk-definition-6af322e1-Eyez36go-B_lk3oHt.js +48132 -0
  21. package/dist/ganttDiagram-a2739b55-C82Jv-TO-DoS-s1Yu.js +1743 -0
  22. package/dist/gitGraphDiagram-82fe8481-D9o_9-U8-DJF-ZeR8.js +1265 -0
  23. package/dist/graph-BjmGDpTe-DgbYS1Ie.js +848 -0
  24. package/dist/index-5325376f-CJL5w-Sw-BXp44Ej5.js +374 -0
  25. package/dist/index-s6Yb6o1D.js +116386 -0
  26. package/dist/infoDiagram-8eee0895-FpS-TLK_-BnvO_wUe.js +320 -0
  27. package/dist/journeyDiagram-c64418c1-CMj1efQ9-CshcRDhm.js +802 -0
  28. package/dist/layout-D_6hdlf3-B7guhEBN.js +1470 -0
  29. package/dist/mindmap-definition-8da855dc-D4SxHjUd-jFZFomnk.js +21924 -0
  30. package/dist/pieDiagram-a8764435-BF5ZqOjB-Mqzg2J4Q.js +498 -0
  31. package/dist/quadrantDiagram-1e28029f-GtQb80VU-DCy1QjzW.js +903 -0
  32. package/dist/requirementDiagram-08caed73-CHtPj3FO-AHEP0cIt.js +767 -0
  33. package/dist/sankeyDiagram-a04cb91d-CBlXzOgd-CWJTc5AX.js +802 -0
  34. package/dist/sequenceDiagram-c5b8d532-Cs1iyw97-oayOJE8v.js +2235 -0
  35. package/dist/shared/styles.d.ts +1 -1
  36. package/dist/stateDiagram-1ecb1508-CpRKICMQ-C5OFJeRZ.js +266 -0
  37. package/dist/stateDiagram-v2-c2b004d7-BtkhFyQ5-DxzE8Je5.js +185 -0
  38. package/dist/styles-b4e223ce-D0oeHeKH-BmNvk4NR.js +1090 -0
  39. package/dist/styles-ca3715f6-BouNgl-L-_qXsPDP3.js +961 -0
  40. package/dist/styles-d45a18b0-Cvhb8Ltu-43I3Cd_I.js +437 -0
  41. package/dist/svgDrawCommon-b86b1483-mg-1NjZY-DrmnILcc.js +65 -0
  42. package/dist/timeline-definition-faaaa080-3olbep_P-BqKpgsPZ.js +793 -0
  43. package/dist/ui/Message.d.ts +1 -5
  44. package/dist/ui/MessagesList.d.ts +1 -5
  45. package/dist/xychartDiagram-f5964ef8-BN6HXpmW-C-g_F1w2.js +1238 -0
  46. package/package.json +3 -3
  47. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,767 @@
1
+ import { v as Fe, y as Me, b as Ce, a as De, g as Te, P as le, W as Pe, m as Ve, O as Ne, c as Ue, l as be } from "./index-s6Yb6o1D.js";
2
+ import { K as Ye } from "./graph-BjmGDpTe-DgbYS1Ie.js";
3
+ import { A as Be } from "./layout-D_6hdlf3-B7guhEBN.js";
4
+ typeof window < "u" && (window.global = window);
5
+ var oe = function() {
6
+ var e = function(x, t, s, r) {
7
+ for (s = s || {}, r = x.length; r--; s[x[r]] = t)
8
+ ;
9
+ return s;
10
+ }, i = [1, 3], l = [1, 4], o = [1, 5], h = [1, 6], u = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], c = [1, 18], a = [2, 7], y = [1, 22], g = [1, 23], f = [1, 24], T = [1, 25], N = [1, 26], A = [1, 27], v = [1, 20], S = [1, 28], q = [1, 29], C = [62, 63], ue = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], ye = [1, 47], de = [1, 48], pe = [1, 49], _e = [1, 50], ge = [1, 51], Ee = [1, 52], fe = [1, 53], L = [53, 54], D = [1, 64], P = [1, 60], V = [1, 61], U = [1, 62], Y = [1, 63], B = [1, 65], j = [1, 69], G = [1, 70], z = [1, 67], X = [1, 68], R = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], te = {
11
+ trace: function() {
12
+ },
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, requirementType: 17, requirementName: 18, STRUCT_START: 19, requirementBody: 20, ID: 21, COLONSEP: 22, id: 23, TEXT: 24, text: 25, RISK: 26, riskLevel: 27, VERIFYMTHD: 28, verifyType: 29, STRUCT_STOP: 30, REQUIREMENT: 31, FUNCTIONAL_REQUIREMENT: 32, INTERFACE_REQUIREMENT: 33, PERFORMANCE_REQUIREMENT: 34, PHYSICAL_REQUIREMENT: 35, DESIGN_CONSTRAINT: 36, LOW_RISK: 37, MED_RISK: 38, HIGH_RISK: 39, VERIFY_ANALYSIS: 40, VERIFY_DEMONSTRATION: 41, VERIFY_INSPECTION: 42, VERIFY_TEST: 43, ELEMENT: 44, elementName: 45, elementBody: 46, TYPE: 47, type: 48, DOCREF: 49, ref: 50, END_ARROW_L: 51, relationship: 52, LINE: 53, END_ARROW_R: 54, CONTAINS: 55, COPIES: 56, DERIVES: 57, SATISFIES: 58, VERIFIES: 59, REFINES: 60, TRACES: 61, unqString: 62, qString: 63, $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", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "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], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]],
17
+ performAction: function(x, t, s, r, d, n, m) {
18
+ var _ = n.length - 1;
19
+ switch (d) {
20
+ case 4:
21
+ this.$ = n[_].trim(), r.setAccTitle(this.$);
22
+ break;
23
+ case 5:
24
+ case 6:
25
+ this.$ = n[_].trim(), r.setAccDescription(this.$);
26
+ break;
27
+ case 7:
28
+ this.$ = [];
29
+ break;
30
+ case 13:
31
+ r.addRequirement(n[_ - 3], n[_ - 4]);
32
+ break;
33
+ case 14:
34
+ r.setNewReqId(n[_ - 2]);
35
+ break;
36
+ case 15:
37
+ r.setNewReqText(n[_ - 2]);
38
+ break;
39
+ case 16:
40
+ r.setNewReqRisk(n[_ - 2]);
41
+ break;
42
+ case 17:
43
+ r.setNewReqVerifyMethod(n[_ - 2]);
44
+ break;
45
+ case 20:
46
+ this.$ = r.RequirementType.REQUIREMENT;
47
+ break;
48
+ case 21:
49
+ this.$ = r.RequirementType.FUNCTIONAL_REQUIREMENT;
50
+ break;
51
+ case 22:
52
+ this.$ = r.RequirementType.INTERFACE_REQUIREMENT;
53
+ break;
54
+ case 23:
55
+ this.$ = r.RequirementType.PERFORMANCE_REQUIREMENT;
56
+ break;
57
+ case 24:
58
+ this.$ = r.RequirementType.PHYSICAL_REQUIREMENT;
59
+ break;
60
+ case 25:
61
+ this.$ = r.RequirementType.DESIGN_CONSTRAINT;
62
+ break;
63
+ case 26:
64
+ this.$ = r.RiskLevel.LOW_RISK;
65
+ break;
66
+ case 27:
67
+ this.$ = r.RiskLevel.MED_RISK;
68
+ break;
69
+ case 28:
70
+ this.$ = r.RiskLevel.HIGH_RISK;
71
+ break;
72
+ case 29:
73
+ this.$ = r.VerifyType.VERIFY_ANALYSIS;
74
+ break;
75
+ case 30:
76
+ this.$ = r.VerifyType.VERIFY_DEMONSTRATION;
77
+ break;
78
+ case 31:
79
+ this.$ = r.VerifyType.VERIFY_INSPECTION;
80
+ break;
81
+ case 32:
82
+ this.$ = r.VerifyType.VERIFY_TEST;
83
+ break;
84
+ case 33:
85
+ r.addElement(n[_ - 3]);
86
+ break;
87
+ case 34:
88
+ r.setNewElementType(n[_ - 2]);
89
+ break;
90
+ case 35:
91
+ r.setNewElementDocRef(n[_ - 2]);
92
+ break;
93
+ case 38:
94
+ r.addRelationship(n[_ - 2], n[_], n[_ - 4]);
95
+ break;
96
+ case 39:
97
+ r.addRelationship(n[_ - 2], n[_ - 4], n[_]);
98
+ break;
99
+ case 40:
100
+ this.$ = r.Relationships.CONTAINS;
101
+ break;
102
+ case 41:
103
+ this.$ = r.Relationships.COPIES;
104
+ break;
105
+ case 42:
106
+ this.$ = r.Relationships.DERIVES;
107
+ break;
108
+ case 43:
109
+ this.$ = r.Relationships.SATISFIES;
110
+ break;
111
+ case 44:
112
+ this.$ = r.Relationships.VERIFIES;
113
+ break;
114
+ case 45:
115
+ this.$ = r.Relationships.REFINES;
116
+ break;
117
+ case 46:
118
+ this.$ = r.Relationships.TRACES;
119
+ break;
120
+ }
121
+ },
122
+ table: [{ 3: 1, 4: 2, 6: i, 9: l, 11: o, 13: h }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: i, 9: l, 11: o, 13: h }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, e(u, [2, 6]), { 3: 12, 4: 2, 6: i, 9: l, 11: o, 13: h }, { 1: [2, 2] }, { 4: 17, 5: c, 7: 13, 8: a, 9: l, 11: o, 13: h, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: y, 32: g, 33: f, 34: T, 35: N, 36: A, 44: v, 62: S, 63: q }, e(u, [2, 4]), e(u, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: c, 7: 31, 8: a, 9: l, 11: o, 13: h, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: y, 32: g, 33: f, 34: T, 35: N, 36: A, 44: v, 62: S, 63: q }, { 4: 17, 5: c, 7: 32, 8: a, 9: l, 11: o, 13: h, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: y, 32: g, 33: f, 34: T, 35: N, 36: A, 44: v, 62: S, 63: q }, { 4: 17, 5: c, 7: 33, 8: a, 9: l, 11: o, 13: h, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: y, 32: g, 33: f, 34: T, 35: N, 36: A, 44: v, 62: S, 63: q }, { 4: 17, 5: c, 7: 34, 8: a, 9: l, 11: o, 13: h, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: y, 32: g, 33: f, 34: T, 35: N, 36: A, 44: v, 62: S, 63: q }, { 4: 17, 5: c, 7: 35, 8: a, 9: l, 11: o, 13: h, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: y, 32: g, 33: f, 34: T, 35: N, 36: A, 44: v, 62: S, 63: q }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, e(C, [2, 20]), e(C, [2, 21]), e(C, [2, 22]), e(C, [2, 23]), e(C, [2, 24]), e(C, [2, 25]), e(ue, [2, 49]), e(ue, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: ye, 56: de, 57: pe, 58: _e, 59: ge, 60: Ee, 61: fe }, { 52: 54, 55: ye, 56: de, 57: pe, 58: _e, 59: ge, 60: Ee, 61: fe }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, e(L, [2, 40]), e(L, [2, 41]), e(L, [2, 42]), e(L, [2, 43]), e(L, [2, 44]), e(L, [2, 45]), e(L, [2, 46]), { 54: [1, 58] }, { 5: D, 20: 59, 21: P, 24: V, 26: U, 28: Y, 30: B }, { 5: j, 30: G, 46: 66, 47: z, 49: X }, { 23: 71, 62: S, 63: q }, { 23: 72, 62: S, 63: q }, e(R, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: D, 20: 77, 21: P, 24: V, 26: U, 28: Y, 30: B }, e(R, [2, 19]), e(R, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: j, 30: G, 46: 80, 47: z, 49: X }, e(R, [2, 37]), e(R, [2, 38]), e(R, [2, 39]), { 23: 81, 62: S, 63: q }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, e(R, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, e(R, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: D, 20: 106, 21: P, 24: V, 26: U, 28: Y, 30: B }, { 5: D, 20: 107, 21: P, 24: V, 26: U, 28: Y, 30: B }, { 5: D, 20: 108, 21: P, 24: V, 26: U, 28: Y, 30: B }, { 5: D, 20: 109, 21: P, 24: V, 26: U, 28: Y, 30: B }, { 5: j, 30: G, 46: 110, 47: z, 49: X }, { 5: j, 30: G, 46: 111, 47: z, 49: X }, e(R, [2, 14]), e(R, [2, 15]), e(R, [2, 16]), e(R, [2, 17]), e(R, [2, 34]), e(R, [2, 35])],
123
+ defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] },
124
+ parseError: function(x, t) {
125
+ if (t.recoverable)
126
+ this.trace(x);
127
+ else {
128
+ var s = new Error(x);
129
+ throw s.hash = t, s;
130
+ }
131
+ },
132
+ parse: function(x) {
133
+ var t = this, s = [0], r = [], d = [null], n = [], m = this.table, _ = "", J = 0, Re = 0, Oe = 2, me = 1, $e = n.slice.call(arguments, 1), E = Object.create(this.lexer), F = { yy: {} };
134
+ for (var re in this.yy)
135
+ Object.prototype.hasOwnProperty.call(this.yy, re) && (F.yy[re] = this.yy[re]);
136
+ E.setInput(x, F.yy), F.yy.lexer = E, F.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
137
+ var ne = E.yylloc;
138
+ n.push(ne);
139
+ var we = E.options && E.options.ranges;
140
+ typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
141
+ function Le() {
142
+ var $;
143
+ return $ = r.pop() || E.lex() || me, typeof $ != "number" && ($ instanceof Array && (r = $, $ = r.pop()), $ = t.symbols_[$] || $), $;
144
+ }
145
+ for (var I, M, k, se, W = {}, Z, O, Ie, ee; ; ) {
146
+ if (M = s[s.length - 1], this.defaultActions[M] ? k = this.defaultActions[M] : ((I === null || typeof I > "u") && (I = Le()), k = m[M] && m[M][I]), typeof k > "u" || !k.length || !k[0]) {
147
+ var ae = "";
148
+ ee = [];
149
+ for (Z in m[M])
150
+ this.terminals_[Z] && Z > Oe && ee.push("'" + this.terminals_[Z] + "'");
151
+ E.showPosition ? ae = "Parse error on line " + (J + 1) + `:
152
+ ` + E.showPosition() + `
153
+ Expecting ` + ee.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : ae = "Parse error on line " + (J + 1) + ": Unexpected " + (I == me ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(ae, {
154
+ text: E.match,
155
+ token: this.terminals_[I] || I,
156
+ line: E.yylineno,
157
+ loc: ne,
158
+ expected: ee
159
+ });
160
+ }
161
+ if (k[0] instanceof Array && k.length > 1)
162
+ throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + I);
163
+ switch (k[0]) {
164
+ case 1:
165
+ s.push(I), d.push(E.yytext), n.push(E.yylloc), s.push(k[1]), I = null, Re = E.yyleng, _ = E.yytext, J = E.yylineno, ne = E.yylloc;
166
+ break;
167
+ case 2:
168
+ if (O = this.productions_[k[1]][1], W.$ = d[d.length - O], W._$ = {
169
+ first_line: n[n.length - (O || 1)].first_line,
170
+ last_line: n[n.length - 1].last_line,
171
+ first_column: n[n.length - (O || 1)].first_column,
172
+ last_column: n[n.length - 1].last_column
173
+ }, we && (W._$.range = [
174
+ n[n.length - (O || 1)].range[0],
175
+ n[n.length - 1].range[1]
176
+ ]), se = this.performAction.apply(W, [
177
+ _,
178
+ Re,
179
+ J,
180
+ F.yy,
181
+ k[1],
182
+ d,
183
+ n
184
+ ].concat($e)), typeof se < "u")
185
+ return se;
186
+ O && (s = s.slice(0, -1 * O * 2), d = d.slice(0, -1 * O), n = n.slice(0, -1 * O)), s.push(this.productions_[k[1]][0]), d.push(W.$), n.push(W._$), Ie = m[s[s.length - 2]][s[s.length - 1]], s.push(Ie);
187
+ break;
188
+ case 3:
189
+ return !0;
190
+ }
191
+ }
192
+ return !0;
193
+ }
194
+ }, qe = /* @__PURE__ */ function() {
195
+ var x = {
196
+ EOF: 1,
197
+ parseError: function(t, s) {
198
+ if (this.yy.parser)
199
+ this.yy.parser.parseError(t, s);
200
+ else
201
+ throw new Error(t);
202
+ },
203
+ // resets the lexer, sets new input
204
+ setInput: function(t, s) {
205
+ return this.yy = s || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
206
+ first_line: 1,
207
+ first_column: 0,
208
+ last_line: 1,
209
+ last_column: 0
210
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
211
+ },
212
+ // consumes and returns one char from the input
213
+ input: function() {
214
+ var t = this._input[0];
215
+ this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
216
+ var s = t.match(/(?:\r\n?|\n).*/g);
217
+ return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
218
+ },
219
+ // unshifts one char (or a string) into the input
220
+ unput: function(t) {
221
+ var s = t.length, r = t.split(/(?:\r\n?|\n)/g);
222
+ this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
223
+ var d = this.match.split(/(?:\r\n?|\n)/g);
224
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), r.length - 1 && (this.yylineno -= r.length - 1);
225
+ var n = this.yylloc.range;
226
+ return this.yylloc = {
227
+ first_line: this.yylloc.first_line,
228
+ last_line: this.yylineno + 1,
229
+ first_column: this.yylloc.first_column,
230
+ last_column: r ? (r.length === d.length ? this.yylloc.first_column : 0) + d[d.length - r.length].length - r[0].length : this.yylloc.first_column - s
231
+ }, this.options.ranges && (this.yylloc.range = [n[0], n[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
232
+ },
233
+ // When called from action, caches matched text and appends it on next action
234
+ more: function() {
235
+ return this._more = !0, this;
236
+ },
237
+ // 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.
238
+ reject: function() {
239
+ if (this.options.backtrack_lexer)
240
+ this._backtrack = !0;
241
+ else
242
+ 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).
243
+ ` + this.showPosition(), {
244
+ text: "",
245
+ token: null,
246
+ line: this.yylineno
247
+ });
248
+ return this;
249
+ },
250
+ // retain first n characters of the match
251
+ less: function(t) {
252
+ this.unput(this.match.slice(t));
253
+ },
254
+ // displays already matched input, i.e. for error messages
255
+ pastInput: function() {
256
+ var t = this.matched.substr(0, this.matched.length - this.match.length);
257
+ return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
258
+ },
259
+ // displays upcoming input, i.e. for error messages
260
+ upcomingInput: function() {
261
+ var t = this.match;
262
+ return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
263
+ },
264
+ // displays the character position where the lexing error occurred, i.e. for error messages
265
+ showPosition: function() {
266
+ var t = this.pastInput(), s = new Array(t.length + 1).join("-");
267
+ return t + this.upcomingInput() + `
268
+ ` + s + "^";
269
+ },
270
+ // test the lexed token: return FALSE when not a match, otherwise return token
271
+ test_match: function(t, s) {
272
+ var r, d, n;
273
+ if (this.options.backtrack_lexer && (n = {
274
+ yylineno: this.yylineno,
275
+ yylloc: {
276
+ first_line: this.yylloc.first_line,
277
+ last_line: this.last_line,
278
+ first_column: this.yylloc.first_column,
279
+ last_column: this.yylloc.last_column
280
+ },
281
+ yytext: this.yytext,
282
+ match: this.match,
283
+ matches: this.matches,
284
+ matched: this.matched,
285
+ yyleng: this.yyleng,
286
+ offset: this.offset,
287
+ _more: this._more,
288
+ _input: this._input,
289
+ yy: this.yy,
290
+ conditionStack: this.conditionStack.slice(0),
291
+ done: this.done
292
+ }, this.options.ranges && (n.yylloc.range = this.yylloc.range.slice(0))), d = t[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
293
+ first_line: this.yylloc.last_line,
294
+ last_line: this.yylineno + 1,
295
+ first_column: this.yylloc.last_column,
296
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
297
+ }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], r = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), r)
298
+ return r;
299
+ if (this._backtrack) {
300
+ for (var m in n)
301
+ this[m] = n[m];
302
+ return !1;
303
+ }
304
+ return !1;
305
+ },
306
+ // return next match in input
307
+ next: function() {
308
+ if (this.done)
309
+ return this.EOF;
310
+ this._input || (this.done = !0);
311
+ var t, s, r, d;
312
+ this._more || (this.yytext = "", this.match = "");
313
+ for (var n = this._currentRules(), m = 0; m < n.length; m++)
314
+ if (r = this._input.match(this.rules[n[m]]), r && (!s || r[0].length > s[0].length)) {
315
+ if (s = r, d = m, this.options.backtrack_lexer) {
316
+ if (t = this.test_match(r, n[m]), t !== !1)
317
+ return t;
318
+ if (this._backtrack) {
319
+ s = !1;
320
+ continue;
321
+ } else
322
+ return !1;
323
+ } else if (!this.options.flex)
324
+ break;
325
+ }
326
+ return s ? (t = this.test_match(s, n[d]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
327
+ ` + this.showPosition(), {
328
+ text: "",
329
+ token: null,
330
+ line: this.yylineno
331
+ });
332
+ },
333
+ // return next match that has a token
334
+ lex: function() {
335
+ var t = this.next();
336
+ return t || this.lex();
337
+ },
338
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
339
+ begin: function(t) {
340
+ this.conditionStack.push(t);
341
+ },
342
+ // pop the previously active lexer condition state off the condition stack
343
+ popState: function() {
344
+ var t = this.conditionStack.length - 1;
345
+ return t > 0 ? this.conditionStack.pop() : this.conditionStack[0];
346
+ },
347
+ // produce the lexer rule set which is active for the currently active lexer condition state
348
+ _currentRules: function() {
349
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
350
+ },
351
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
352
+ topState: function(t) {
353
+ return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
354
+ },
355
+ // alias for begin(condition)
356
+ pushState: function(t) {
357
+ this.begin(t);
358
+ },
359
+ // return the number of states currently on the stack
360
+ stateStackSize: function() {
361
+ return this.conditionStack.length;
362
+ },
363
+ options: { "case-insensitive": !0 },
364
+ performAction: function(t, s, r, d) {
365
+ switch (r) {
366
+ case 0:
367
+ return "title";
368
+ case 1:
369
+ return this.begin("acc_title"), 9;
370
+ case 2:
371
+ return this.popState(), "acc_title_value";
372
+ case 3:
373
+ return this.begin("acc_descr"), 11;
374
+ case 4:
375
+ return this.popState(), "acc_descr_value";
376
+ case 5:
377
+ this.begin("acc_descr_multiline");
378
+ break;
379
+ case 6:
380
+ this.popState();
381
+ break;
382
+ case 7:
383
+ return "acc_descr_multiline_value";
384
+ case 8:
385
+ return 5;
386
+ case 9:
387
+ break;
388
+ case 10:
389
+ break;
390
+ case 11:
391
+ break;
392
+ case 12:
393
+ return 8;
394
+ case 13:
395
+ return 6;
396
+ case 14:
397
+ return 19;
398
+ case 15:
399
+ return 30;
400
+ case 16:
401
+ return 22;
402
+ case 17:
403
+ return 21;
404
+ case 18:
405
+ return 24;
406
+ case 19:
407
+ return 26;
408
+ case 20:
409
+ return 28;
410
+ case 21:
411
+ return 31;
412
+ case 22:
413
+ return 32;
414
+ case 23:
415
+ return 33;
416
+ case 24:
417
+ return 34;
418
+ case 25:
419
+ return 35;
420
+ case 26:
421
+ return 36;
422
+ case 27:
423
+ return 37;
424
+ case 28:
425
+ return 38;
426
+ case 29:
427
+ return 39;
428
+ case 30:
429
+ return 40;
430
+ case 31:
431
+ return 41;
432
+ case 32:
433
+ return 42;
434
+ case 33:
435
+ return 43;
436
+ case 34:
437
+ return 44;
438
+ case 35:
439
+ return 55;
440
+ case 36:
441
+ return 56;
442
+ case 37:
443
+ return 57;
444
+ case 38:
445
+ return 58;
446
+ case 39:
447
+ return 59;
448
+ case 40:
449
+ return 60;
450
+ case 41:
451
+ return 61;
452
+ case 42:
453
+ return 47;
454
+ case 43:
455
+ return 49;
456
+ case 44:
457
+ return 51;
458
+ case 45:
459
+ return 54;
460
+ case 46:
461
+ return 53;
462
+ case 47:
463
+ this.begin("string");
464
+ break;
465
+ case 48:
466
+ this.popState();
467
+ break;
468
+ case 49:
469
+ return "qString";
470
+ case 50:
471
+ return s.yytext = s.yytext.trim(), 62;
472
+ }
473
+ },
474
+ 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, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/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, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i],
475
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, unqString: { rules: [], inclusive: !1 }, token: { rules: [], inclusive: !1 }, string: { rules: [48, 49], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], inclusive: !0 } }
476
+ };
477
+ return x;
478
+ }();
479
+ te.lexer = qe;
480
+ function ie() {
481
+ this.yy = {};
482
+ }
483
+ return ie.prototype = te, te.Parser = ie, new ie();
484
+ }();
485
+ oe.parser = oe;
486
+ const We = oe;
487
+ let ce = [], b = {}, K = {}, w = {}, Q = {};
488
+ const He = {
489
+ REQUIREMENT: "Requirement",
490
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
491
+ INTERFACE_REQUIREMENT: "Interface Requirement",
492
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
493
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
494
+ DESIGN_CONSTRAINT: "Design Constraint"
495
+ }, Ke = {
496
+ LOW_RISK: "Low",
497
+ MED_RISK: "Medium",
498
+ HIGH_RISK: "High"
499
+ }, Qe = {
500
+ VERIFY_ANALYSIS: "Analysis",
501
+ VERIFY_DEMONSTRATION: "Demonstration",
502
+ VERIFY_INSPECTION: "Inspection",
503
+ VERIFY_TEST: "Test"
504
+ }, je = {
505
+ CONTAINS: "contains",
506
+ COPIES: "copies",
507
+ DERIVES: "derives",
508
+ SATISFIES: "satisfies",
509
+ VERIFIES: "verifies",
510
+ REFINES: "refines",
511
+ TRACES: "traces"
512
+ }, Ge = (e, i) => (K[e] === void 0 && (K[e] = {
513
+ name: e,
514
+ type: i,
515
+ id: b.id,
516
+ text: b.text,
517
+ risk: b.risk,
518
+ verifyMethod: b.verifyMethod
519
+ }), b = {}, K[e]), ze = () => K, Xe = (e) => {
520
+ b !== void 0 && (b.id = e);
521
+ }, Je = (e) => {
522
+ b !== void 0 && (b.text = e);
523
+ }, Ze = (e) => {
524
+ b !== void 0 && (b.risk = e);
525
+ }, et = (e) => {
526
+ b !== void 0 && (b.verifyMethod = e);
527
+ }, tt = (e) => (Q[e] === void 0 && (Q[e] = {
528
+ name: e,
529
+ type: w.type,
530
+ docRef: w.docRef
531
+ }, Ne.info("Added new requirement: ", e)), w = {}, Q[e]), it = () => Q, rt = (e) => {
532
+ w !== void 0 && (w.type = e);
533
+ }, nt = (e) => {
534
+ w !== void 0 && (w.docRef = e);
535
+ }, st = (e, i, l) => {
536
+ ce.push({
537
+ type: e,
538
+ src: i,
539
+ dst: l
540
+ });
541
+ }, at = () => ce, lt = () => {
542
+ ce = [], b = {}, K = {}, w = {}, Q = {}, Ve();
543
+ }, ot = {
544
+ RequirementType: He,
545
+ RiskLevel: Ke,
546
+ VerifyType: Qe,
547
+ Relationships: je,
548
+ getConfig: () => Te().req,
549
+ addRequirement: Ge,
550
+ getRequirements: ze,
551
+ setNewReqId: Xe,
552
+ setNewReqText: Je,
553
+ setNewReqRisk: Ze,
554
+ setNewReqVerifyMethod: et,
555
+ setAccTitle: De,
556
+ getAccTitle: Ce,
557
+ setAccDescription: Me,
558
+ getAccDescription: Fe,
559
+ addElement: tt,
560
+ getElements: it,
561
+ setNewElementType: rt,
562
+ setNewElementDocRef: nt,
563
+ addRelationship: st,
564
+ getRelationships: at,
565
+ clear: lt
566
+ }, ht = (e) => `
567
+
568
+ marker {
569
+ fill: ${e.relationColor};
570
+ stroke: ${e.relationColor};
571
+ }
572
+
573
+ marker.cross {
574
+ stroke: ${e.lineColor};
575
+ }
576
+
577
+ svg {
578
+ font-family: ${e.fontFamily};
579
+ font-size: ${e.fontSize};
580
+ }
581
+
582
+ .reqBox {
583
+ fill: ${e.requirementBackground};
584
+ fill-opacity: 1.0;
585
+ stroke: ${e.requirementBorderColor};
586
+ stroke-width: ${e.requirementBorderSize};
587
+ }
588
+
589
+ .reqTitle, .reqLabel{
590
+ fill: ${e.requirementTextColor};
591
+ }
592
+ .reqLabelBox {
593
+ fill: ${e.relationLabelBackground};
594
+ fill-opacity: 1.0;
595
+ }
596
+
597
+ .req-title-line {
598
+ stroke: ${e.requirementBorderColor};
599
+ stroke-width: ${e.requirementBorderSize};
600
+ }
601
+ .relationshipLine {
602
+ stroke: ${e.relationColor};
603
+ stroke-width: 1;
604
+ }
605
+ .relationshipLabel {
606
+ fill: ${e.relationLabelColor};
607
+ }
608
+
609
+ `, ct = ht, he = {
610
+ CONTAINS: "contains",
611
+ ARROW: "arrow"
612
+ }, ut = (e, i) => {
613
+ let l = e.append("defs").append("marker").attr("id", he.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", i.line_height / 2).attr("markerWidth", i.line_height).attr("markerHeight", i.line_height).attr("orient", "auto").append("g");
614
+ l.append("circle").attr("cx", i.line_height / 2).attr("cy", i.line_height / 2).attr("r", i.line_height / 2).attr("fill", "none"), l.append("line").attr("x1", 0).attr("x2", i.line_height).attr("y1", i.line_height / 2).attr("y2", i.line_height / 2).attr("stroke-width", 1), l.append("line").attr("y1", 0).attr("y2", i.line_height).attr("x1", i.line_height / 2).attr("x2", i.line_height / 2).attr("stroke-width", 1), e.append("defs").append("marker").attr("id", he.ARROW + "_line_ending").attr("refX", i.line_height).attr("refY", 0.5 * i.line_height).attr("markerWidth", i.line_height).attr("markerHeight", i.line_height).attr("orient", "auto").append("path").attr(
615
+ "d",
616
+ `M0,0
617
+ L${i.line_height},${i.line_height / 2}
618
+ M${i.line_height},${i.line_height / 2}
619
+ L0,${i.line_height}`
620
+ ).attr("stroke-width", 1);
621
+ }, Se = {
622
+ ReqMarkers: he,
623
+ insertLineEndings: ut
624
+ };
625
+ let p = {}, ke = 0;
626
+ const xe = (e, i) => e.insert("rect", "#" + i).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", p.rect_min_width + "px").attr("height", p.rect_min_height + "px"), Ae = (e, i, l) => {
627
+ let o = p.rect_min_width / 2, h = e.append("text").attr("class", "req reqLabel reqTitle").attr("id", i).attr("x", o).attr("y", p.rect_padding).attr("dominant-baseline", "hanging"), u = 0;
628
+ l.forEach((g) => {
629
+ u == 0 ? h.append("tspan").attr("text-anchor", "middle").attr("x", p.rect_min_width / 2).attr("dy", 0).text(g) : h.append("tspan").attr("text-anchor", "middle").attr("x", p.rect_min_width / 2).attr("dy", p.line_height * 0.75).text(g), u++;
630
+ });
631
+ let c = 1.5 * p.rect_padding, a = u * p.line_height * 0.75, y = c + a;
632
+ return e.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", p.rect_min_width).attr("y1", y).attr("y2", y), {
633
+ titleNode: h,
634
+ y
635
+ };
636
+ }, ve = (e, i, l, o) => {
637
+ let h = e.append("text").attr("class", "req reqLabel").attr("id", i).attr("x", p.rect_padding).attr("y", o).attr("dominant-baseline", "hanging"), u = 0;
638
+ const c = 30;
639
+ let a = [];
640
+ return l.forEach((y) => {
641
+ let g = y.length;
642
+ for (; g > c && u < 3; ) {
643
+ let f = y.substring(0, c);
644
+ y = y.substring(c, y.length), g = y.length, a[a.length] = f, u++;
645
+ }
646
+ if (u == 3) {
647
+ let f = a[a.length - 1];
648
+ a[a.length - 1] = f.substring(0, f.length - 4) + "...";
649
+ } else
650
+ a[a.length] = y;
651
+ u = 0;
652
+ }), a.forEach((y) => {
653
+ h.append("tspan").attr("x", p.rect_padding).attr("dy", p.line_height).text(y);
654
+ }), h;
655
+ }, yt = (e, i, l, o) => {
656
+ const h = i.node().getTotalLength(), u = i.node().getPointAtLength(h * 0.5), c = "rel" + ke;
657
+ ke++;
658
+ const a = e.append("text").attr("class", "req relationshipLabel").attr("id", c).attr("x", u.x).attr("y", u.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(o).node().getBBox();
659
+ e.insert("rect", "#" + c).attr("class", "req reqLabelBox").attr("x", u.x - a.width / 2).attr("y", u.y - a.height / 2).attr("width", a.width).attr("height", a.height).attr("fill", "white").attr("fill-opacity", "85%");
660
+ }, dt = function(e, i, l, o, h) {
661
+ const u = l.edge(H(i.src), H(i.dst)), c = Ue().x(function(y) {
662
+ return y.x;
663
+ }).y(function(y) {
664
+ return y.y;
665
+ }), a = e.insert("path", "#" + o).attr("class", "er relationshipLine").attr("d", c(u.points)).attr("fill", "none");
666
+ i.type == h.db.Relationships.CONTAINS ? a.attr(
667
+ "marker-start",
668
+ "url(" + be.getUrl(p.arrowMarkerAbsolute) + "#" + i.type + "_line_ending)"
669
+ ) : (a.attr("stroke-dasharray", "10,7"), a.attr(
670
+ "marker-end",
671
+ "url(" + be.getUrl(p.arrowMarkerAbsolute) + "#" + Se.ReqMarkers.ARROW + "_line_ending)"
672
+ )), yt(e, a, p, `<<${i.type}>>`);
673
+ }, pt = (e, i, l) => {
674
+ Object.keys(e).forEach((o) => {
675
+ let h = e[o];
676
+ o = H(o), Ne.info("Added new requirement: ", o);
677
+ const u = l.append("g").attr("id", o), c = "req-" + o, a = xe(u, c);
678
+ let y = Ae(u, o + "_title", [
679
+ `<<${h.type}>>`,
680
+ `${h.name}`
681
+ ]);
682
+ ve(
683
+ u,
684
+ o + "_body",
685
+ [
686
+ `Id: ${h.id}`,
687
+ `Text: ${h.text}`,
688
+ `Risk: ${h.risk}`,
689
+ `Verification: ${h.verifyMethod}`
690
+ ],
691
+ y.y
692
+ );
693
+ const g = a.node().getBBox();
694
+ i.setNode(o, {
695
+ width: g.width,
696
+ height: g.height,
697
+ shape: "rect",
698
+ id: o
699
+ });
700
+ });
701
+ }, _t = (e, i, l) => {
702
+ Object.keys(e).forEach((o) => {
703
+ let h = e[o];
704
+ const u = H(o), c = l.append("g").attr("id", u), a = "element-" + u, y = xe(c, a);
705
+ let g = Ae(c, a + "_title", ["<<Element>>", `${o}`]);
706
+ ve(
707
+ c,
708
+ a + "_body",
709
+ [`Type: ${h.type || "Not Specified"}`, `Doc Ref: ${h.docRef || "None"}`],
710
+ g.y
711
+ );
712
+ const f = y.node().getBBox();
713
+ i.setNode(u, {
714
+ width: f.width,
715
+ height: f.height,
716
+ shape: "rect",
717
+ id: u
718
+ });
719
+ });
720
+ }, gt = (e, i) => (e.forEach(function(l) {
721
+ let o = H(l.src), h = H(l.dst);
722
+ i.setEdge(o, h, { relationship: l });
723
+ }), e), Et = function(e, i) {
724
+ i.nodes().forEach(function(l) {
725
+ l !== void 0 && i.node(l) !== void 0 && (e.select("#" + l), e.select("#" + l).attr(
726
+ "transform",
727
+ "translate(" + (i.node(l).x - i.node(l).width / 2) + "," + (i.node(l).y - i.node(l).height / 2) + " )"
728
+ ));
729
+ });
730
+ }, H = (e) => e.replace(/\s/g, "").replace(/\./g, "_"), ft = (e, i, l, o) => {
731
+ p = Te().requirement;
732
+ const h = p.securityLevel;
733
+ let u;
734
+ h === "sandbox" && (u = le("#i" + i));
735
+ const c = (h === "sandbox" ? le(u.nodes()[0].contentDocument.body) : le("body")).select(`[id='${i}']`);
736
+ Se.insertLineEndings(c, p);
737
+ const a = new Ye({
738
+ multigraph: !1,
739
+ compound: !1,
740
+ directed: !0
741
+ }).setGraph({
742
+ rankdir: p.layoutDirection,
743
+ marginx: 20,
744
+ marginy: 20,
745
+ nodesep: 100,
746
+ edgesep: 100,
747
+ ranksep: 100
748
+ }).setDefaultEdgeLabel(function() {
749
+ return {};
750
+ });
751
+ let y = o.db.getRequirements(), g = o.db.getElements(), f = o.db.getRelationships();
752
+ pt(y, a, c), _t(g, a, c), gt(f, a), Be(a), Et(c, a), f.forEach(function(S) {
753
+ dt(c, S, a, i, o);
754
+ });
755
+ const T = p.rect_padding, N = c.node().getBBox(), A = N.width + T * 2, v = N.height + T * 2;
756
+ Pe(c, v, A, p.useMaxWidth), c.attr("viewBox", `${N.x - T} ${N.y - T} ${A} ${v}`);
757
+ }, Rt = {
758
+ draw: ft
759
+ }, kt = {
760
+ parser: We,
761
+ db: ot,
762
+ renderer: Rt,
763
+ styles: ct
764
+ };
765
+ export {
766
+ kt as diagram
767
+ };