UNPKG

44 kBJavaScriptView Raw
1import { U as Dt, V as I, l as lt, s as zt, g as Et, z as It, A as kt, a as Bt, b as Vt, c as Tt, m as wt, B as Rt, d as Wt, j as yt, k as Nt } from "./mermaid-9357f3d0.js";
2import { l as St } from "./linear-e84f7512.js";
3import "./init-f9637058.js";
4var qt = function() {
5 var e = function(K, n, r, d) {
6 for (r = r || {}, d = K.length; d--; r[K[d]] = n)
7 ;
8 return r;
9 }, a = [1, 3], h = [1, 5], f = [1, 6], g = [1, 7], x = [1, 8], c = [1, 10], p = [1, 5, 14, 16, 18, 20, 21, 26, 28, 29, 30, 31, 32, 38, 39, 40, 41, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], s = [1, 5, 7, 14, 16, 18, 20, 21, 26, 28, 29, 30, 31, 32, 38, 39, 40, 41, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], o = [38, 39, 40], m = [2, 8], B = [1, 19], V = [1, 23], _ = [1, 24], D = [1, 25], b = [1, 26], H = [1, 27], G = [1, 29], Z = [1, 30], at = [1, 31], nt = [1, 32], et = [1, 33], ct = [1, 34], N = [1, 37], U = [1, 38], q = [1, 39], T = [1, 40], t = [1, 41], A = [1, 42], S = [1, 43], k = [1, 44], F = [1, 45], v = [1, 46], P = [1, 47], L = [1, 48], C = [1, 49], mt = [1, 52], M = [1, 67], X = [1, 68], z = [5, 23, 27, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61], ht = [5, 7, 38, 39, 40, 41], dt = {
10 trace: function() {
11 },
12 yy: {},
13 symbols_: { error: 2, start: 3, eol: 4, SPACE: 5, directive: 6, QUADRANT: 7, document: 8, line: 9, statement: 10, axisDetails: 11, quadrantDetails: 12, points: 13, title: 14, title_value: 15, acc_title: 16, acc_title_value: 17, acc_descr: 18, acc_descr_value: 19, acc_descr_multiline_value: 20, section: 21, text: 22, point_start: 23, point_x: 24, point_y: 25, "X-AXIS": 26, "AXIS-TEXT-DELIMITER": 27, "Y-AXIS": 28, QUADRANT_1: 29, QUADRANT_2: 30, QUADRANT_3: 31, QUADRANT_4: 32, openDirective: 33, typeDirective: 34, closeDirective: 35, ":": 36, argDirective: 37, NEWLINE: 38, SEMI: 39, EOF: 40, open_directive: 41, type_directive: 42, arg_directive: 43, close_directive: 44, alphaNumToken: 45, textNoTagsToken: 46, STR: 47, MD_STR: 48, alphaNum: 49, PUNCTUATION: 50, AMP: 51, NUM: 52, ALPHA: 53, COMMA: 54, PLUS: 55, EQUALS: 56, MULT: 57, DOT: 58, BRKT: 59, UNDERSCORE: 60, MINUS: 61, $accept: 0, $end: 1 },
14 terminals_: { 2: "error", 5: "SPACE", 7: "QUADRANT", 14: "title", 15: "title_value", 16: "acc_title", 17: "acc_title_value", 18: "acc_descr", 19: "acc_descr_value", 20: "acc_descr_multiline_value", 21: "section", 23: "point_start", 24: "point_x", 25: "point_y", 26: "X-AXIS", 27: "AXIS-TEXT-DELIMITER", 28: "Y-AXIS", 29: "QUADRANT_1", 30: "QUADRANT_2", 31: "QUADRANT_3", 32: "QUADRANT_4", 36: ":", 38: "NEWLINE", 39: "SEMI", 40: "EOF", 41: "open_directive", 42: "type_directive", 43: "arg_directive", 44: "close_directive", 47: "STR", 48: "MD_STR", 50: "PUNCTUATION", 51: "AMP", 52: "NUM", 53: "ALPHA", 54: "COMMA", 55: "PLUS", 56: "EQUALS", 57: "MULT", 58: "DOT", 59: "BRKT", 60: "UNDERSCORE", 61: "MINUS" },
15 productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [10, 0], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [13, 4], [11, 4], [11, 3], [11, 2], [11, 4], [11, 3], [11, 2], [12, 2], [12, 2], [12, 2], [12, 2], [6, 3], [6, 5], [4, 1], [4, 1], [4, 1], [33, 1], [34, 1], [37, 1], [35, 1], [22, 1], [22, 2], [22, 1], [22, 1], [49, 1], [49, 2], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [46, 1], [46, 1], [46, 1]],
16 performAction: function(n, r, d, l, y, i, it) {
17 var u = i.length - 1;
18 switch (y) {
19 case 13:
20 this.$ = i[u].trim(), l.setDiagramTitle(this.$);
21 break;
22 case 14:
23 this.$ = i[u].trim(), l.setAccTitle(this.$);
24 break;
25 case 15:
26 case 16:
27 this.$ = i[u].trim(), l.setAccDescription(this.$);
28 break;
29 case 17:
30 l.addSection(i[u].substr(8)), this.$ = i[u].substr(8);
31 break;
32 case 19:
33 l.addPoint(i[u - 3], i[u - 1], i[u]);
34 break;
35 case 20:
36 l.setXAxisLeftText(i[u - 2]), l.setXAxisRightText(i[u]);
37 break;
38 case 21:
39 i[u - 1].text += i[u], l.setXAxisLeftText(i[u - 1]);
40 break;
41 case 22:
42 l.setXAxisLeftText(i[u]);
43 break;
44 case 23:
45 l.setYAxisBottomText(i[u - 2]), l.setYAxisTopText(i[u]);
46 break;
47 case 24:
48 i[u - 1].text += i[u], l.setYAxisBottomText(i[u - 1]);
49 break;
50 case 25:
51 l.setYAxisBottomText(i[u]);
52 break;
53 case 26:
54 l.setQuadrant1Text(i[u]);
55 break;
56 case 27:
57 l.setQuadrant2Text(i[u]);
58 break;
59 case 28:
60 l.setQuadrant3Text(i[u]);
61 break;
62 case 29:
63 l.setQuadrant4Text(i[u]);
64 break;
65 case 35:
66 l.parseDirective("%%{", "open_directive");
67 break;
68 case 36:
69 l.parseDirective(i[u], "type_directive");
70 break;
71 case 37:
72 i[u] = i[u].trim().replace(/'/g, '"'), l.parseDirective(i[u], "arg_directive");
73 break;
74 case 38:
75 l.parseDirective("}%%", "close_directive", "quadrantChart");
76 break;
77 case 39:
78 this.$ = { text: i[u], type: "text" };
79 break;
80 case 40:
81 this.$ = { text: i[u - 1].text + "" + i[u], type: i[u - 1].type };
82 break;
83 case 41:
84 this.$ = { text: i[u], type: "text" };
85 break;
86 case 42:
87 this.$ = { text: i[u], type: "markdown" };
88 break;
89 case 43:
90 this.$ = i[u];
91 break;
92 case 44:
93 this.$ = i[u - 1] + "" + i[u];
94 break;
95 }
96 },
97 table: [{ 3: 1, 4: 2, 5: a, 6: 4, 7: h, 33: 9, 38: f, 39: g, 40: x, 41: c }, { 1: [3] }, { 3: 11, 4: 2, 5: a, 6: 4, 7: h, 33: 9, 38: f, 39: g, 40: x, 41: c }, { 3: 12, 4: 2, 5: a, 6: 4, 7: h, 33: 9, 38: f, 39: g, 40: x, 41: c }, { 3: 13, 4: 2, 5: a, 6: 4, 7: h, 33: 9, 38: f, 39: g, 40: x, 41: c }, e(p, [2, 5], { 8: 14 }), e(s, [2, 32]), e(s, [2, 33]), e(s, [2, 34]), { 34: 15, 42: [1, 16] }, { 42: [2, 35] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, e(o, m, { 33: 9, 9: 17, 10: 18, 11: 20, 12: 21, 13: 22, 6: 28, 22: 35, 45: 36, 1: [2, 4], 5: B, 14: V, 16: _, 18: D, 20: b, 21: H, 26: G, 28: Z, 29: at, 30: nt, 31: et, 32: ct, 41: c, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }), { 35: 50, 36: [1, 51], 44: mt }, e([36, 44], [2, 36]), e(p, [2, 6]), { 4: 53, 38: f, 39: g, 40: x }, e(o, m, { 33: 9, 11: 20, 12: 21, 13: 22, 6: 28, 22: 35, 45: 36, 10: 54, 5: B, 14: V, 16: _, 18: D, 20: b, 21: H, 26: G, 28: Z, 29: at, 30: nt, 31: et, 32: ct, 41: c, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }), e(o, [2, 10]), e(o, [2, 11]), e(o, [2, 12]), { 15: [1, 55] }, { 17: [1, 56] }, { 19: [1, 57] }, e(o, [2, 16]), e(o, [2, 17]), e(o, [2, 18]), { 22: 58, 45: 36, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }, { 22: 59, 45: 36, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }, { 22: 60, 45: 36, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }, { 22: 61, 45: 36, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }, { 22: 62, 45: 36, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }, { 22: 63, 45: 36, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }, { 5: M, 23: [1, 64], 45: 66, 46: 65, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }, e(z, [2, 39]), e(z, [2, 41]), e(z, [2, 42]), e(z, [2, 45]), e(z, [2, 46]), e(z, [2, 47]), e(z, [2, 48]), e(z, [2, 49]), e(z, [2, 50]), e(z, [2, 51]), e(z, [2, 52]), e(z, [2, 53]), e(z, [2, 54]), e(z, [2, 55]), e(ht, [2, 30]), { 37: 69, 43: [1, 70] }, e(ht, [2, 38]), e(p, [2, 7]), e(o, [2, 9]), e(o, [2, 13]), e(o, [2, 14]), e(o, [2, 15]), e(o, [2, 22], { 46: 65, 45: 66, 5: M, 27: [1, 71], 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 25], { 46: 65, 45: 66, 5: M, 27: [1, 72], 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 26], { 46: 65, 45: 66, 5: M, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 27], { 46: 65, 45: 66, 5: M, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 28], { 46: 65, 45: 66, 5: M, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 29], { 46: 65, 45: 66, 5: M, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), { 24: [1, 73] }, e(z, [2, 40]), e(z, [2, 56]), e(z, [2, 57]), e(z, [2, 58]), { 35: 74, 44: mt }, { 44: [2, 37] }, e(o, [2, 21], { 45: 36, 22: 75, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }), e(o, [2, 24], { 45: 36, 22: 76, 47: N, 48: U, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C }), { 25: [1, 77] }, e(ht, [2, 31]), e(o, [2, 20], { 46: 65, 45: 66, 5: M, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 23], { 46: 65, 45: 66, 5: M, 50: q, 51: T, 52: t, 53: A, 54: S, 55: k, 56: F, 57: v, 58: P, 59: L, 60: C, 61: X }), e(o, [2, 19])],
98 defaultActions: { 10: [2, 35], 11: [2, 1], 12: [2, 2], 13: [2, 3], 70: [2, 37] },
99 parseError: function(n, r) {
100 if (r.recoverable)
101 this.trace(n);
102 else {
103 var d = new Error(n);
104 throw d.hash = r, d;
105 }
106 },
107 parse: function(n) {
108 var r = this, d = [0], l = [], y = [null], i = [], it = this.table, u = "", rt = 0, _t = 0, vt = 2, bt = 1, Pt = i.slice.call(arguments, 1), E = Object.create(this.lexer), J = { yy: {} };
109 for (var xt in this.yy)
110 Object.prototype.hasOwnProperty.call(this.yy, xt) && (J.yy[xt] = this.yy[xt]);
111 E.setInput(n, J.yy), J.yy.lexer = E, J.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
112 var ft = E.yylloc;
113 i.push(ft);
114 var Lt = E.options && E.options.ranges;
115 typeof J.yy.parseError == "function" ? this.parseError = J.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
116 function Ct() {
117 var Y;
118 return Y = l.pop() || E.lex() || bt, typeof Y != "number" && (Y instanceof Array && (l = Y, Y = l.pop()), Y = r.symbols_[Y] || Y), Y;
119 }
120 for (var W, $, Q, gt, tt = {}, st, O, At, ot; ; ) {
121 if ($ = d[d.length - 1], this.defaultActions[$] ? Q = this.defaultActions[$] : ((W === null || typeof W > "u") && (W = Ct()), Q = it[$] && it[$][W]), typeof Q > "u" || !Q.length || !Q[0]) {
122 var pt = "";
123 ot = [];
124 for (st in it[$])
125 this.terminals_[st] && st > vt && ot.push("'" + this.terminals_[st] + "'");
126 E.showPosition ? pt = "Parse error on line " + (rt + 1) + `:
127` + E.showPosition() + `
128Expecting ` + ot.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : pt = "Parse error on line " + (rt + 1) + ": Unexpected " + (W == bt ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(pt, {
129 text: E.match,
130 token: this.terminals_[W] || W,
131 line: E.yylineno,
132 loc: ft,
133 expected: ot
134 });
135 }
136 if (Q[0] instanceof Array && Q.length > 1)
137 throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + W);
138 switch (Q[0]) {
139 case 1:
140 d.push(W), y.push(E.yytext), i.push(E.yylloc), d.push(Q[1]), W = null, _t = E.yyleng, u = E.yytext, rt = E.yylineno, ft = E.yylloc;
141 break;
142 case 2:
143 if (O = this.productions_[Q[1]][1], tt.$ = y[y.length - O], tt._$ = {
144 first_line: i[i.length - (O || 1)].first_line,
145 last_line: i[i.length - 1].last_line,
146 first_column: i[i.length - (O || 1)].first_column,
147 last_column: i[i.length - 1].last_column
148 }, Lt && (tt._$.range = [
149 i[i.length - (O || 1)].range[0],
150 i[i.length - 1].range[1]
151 ]), gt = this.performAction.apply(tt, [
152 u,
153 _t,
154 rt,
155 J.yy,
156 Q[1],
157 y,
158 i
159 ].concat(Pt)), typeof gt < "u")
160 return gt;
161 O && (d = d.slice(0, -1 * O * 2), y = y.slice(0, -1 * O), i = i.slice(0, -1 * O)), d.push(this.productions_[Q[1]][0]), y.push(tt.$), i.push(tt._$), At = it[d[d.length - 2]][d[d.length - 1]], d.push(At);
162 break;
163 case 3:
164 return !0;
165 }
166 }
167 return !0;
168 }
169 }, Ft = function() {
170 var K = {
171 EOF: 1,
172 parseError: function(r, d) {
173 if (this.yy.parser)
174 this.yy.parser.parseError(r, d);
175 else
176 throw new Error(r);
177 },
178 // resets the lexer, sets new input
179 setInput: function(n, r) {
180 return this.yy = r || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
181 first_line: 1,
182 first_column: 0,
183 last_line: 1,
184 last_column: 0
185 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
186 },
187 // consumes and returns one char from the input
188 input: function() {
189 var n = this._input[0];
190 this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n;
191 var r = n.match(/(?:\r\n?|\n).*/g);
192 return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n;
193 },
194 // unshifts one char (or a string) into the input
195 unput: function(n) {
196 var r = n.length, d = n.split(/(?:\r\n?|\n)/g);
197 this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
198 var l = this.match.split(/(?:\r\n?|\n)/g);
199 this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
200 var y = this.yylloc.range;
201 return this.yylloc = {
202 first_line: this.yylloc.first_line,
203 last_line: this.yylineno + 1,
204 first_column: this.yylloc.first_column,
205 last_column: d ? (d.length === l.length ? this.yylloc.first_column : 0) + l[l.length - d.length].length - d[0].length : this.yylloc.first_column - r
206 }, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
207 },
208 // When called from action, caches matched text and appends it on next action
209 more: function() {
210 return this._more = !0, this;
211 },
212 // 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.
213 reject: function() {
214 if (this.options.backtrack_lexer)
215 this._backtrack = !0;
216 else
217 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).
218` + this.showPosition(), {
219 text: "",
220 token: null,
221 line: this.yylineno
222 });
223 return this;
224 },
225 // retain first n characters of the match
226 less: function(n) {
227 this.unput(this.match.slice(n));
228 },
229 // displays already matched input, i.e. for error messages
230 pastInput: function() {
231 var n = this.matched.substr(0, this.matched.length - this.match.length);
232 return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
233 },
234 // displays upcoming input, i.e. for error messages
235 upcomingInput: function() {
236 var n = this.match;
237 return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
238 },
239 // displays the character position where the lexing error occurred, i.e. for error messages
240 showPosition: function() {
241 var n = this.pastInput(), r = new Array(n.length + 1).join("-");
242 return n + this.upcomingInput() + `
243` + r + "^";
244 },
245 // test the lexed token: return FALSE when not a match, otherwise return token
246 test_match: function(n, r) {
247 var d, l, y;
248 if (this.options.backtrack_lexer && (y = {
249 yylineno: this.yylineno,
250 yylloc: {
251 first_line: this.yylloc.first_line,
252 last_line: this.last_line,
253 first_column: this.yylloc.first_column,
254 last_column: this.yylloc.last_column
255 },
256 yytext: this.yytext,
257 match: this.match,
258 matches: this.matches,
259 matched: this.matched,
260 yyleng: this.yyleng,
261 offset: this.offset,
262 _more: this._more,
263 _input: this._input,
264 yy: this.yy,
265 conditionStack: this.conditionStack.slice(0),
266 done: this.done
267 }, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), l = n[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = {
268 first_line: this.yylloc.last_line,
269 last_line: this.yylineno + 1,
270 first_column: this.yylloc.last_column,
271 last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
272 }, this.yytext += n[0], this.match += n[0], this.matches = n, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(n[0].length), this.matched += n[0], d = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
273 return d;
274 if (this._backtrack) {
275 for (var i in y)
276 this[i] = y[i];
277 return !1;
278 }
279 return !1;
280 },
281 // return next match in input
282 next: function() {
283 if (this.done)
284 return this.EOF;
285 this._input || (this.done = !0);
286 var n, r, d, l;
287 this._more || (this.yytext = "", this.match = "");
288 for (var y = this._currentRules(), i = 0; i < y.length; i++)
289 if (d = this._input.match(this.rules[y[i]]), d && (!r || d[0].length > r[0].length)) {
290 if (r = d, l = i, this.options.backtrack_lexer) {
291 if (n = this.test_match(d, y[i]), n !== !1)
292 return n;
293 if (this._backtrack) {
294 r = !1;
295 continue;
296 } else
297 return !1;
298 } else if (!this.options.flex)
299 break;
300 }
301 return r ? (n = this.test_match(r, y[l]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
302` + this.showPosition(), {
303 text: "",
304 token: null,
305 line: this.yylineno
306 });
307 },
308 // return next match that has a token
309 lex: function() {
310 var r = this.next();
311 return r || this.lex();
312 },
313 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
314 begin: function(r) {
315 this.conditionStack.push(r);
316 },
317 // pop the previously active lexer condition state off the condition stack
318 popState: function() {
319 var r = this.conditionStack.length - 1;
320 return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
321 },
322 // produce the lexer rule set which is active for the currently active lexer condition state
323 _currentRules: function() {
324 return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
325 },
326 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
327 topState: function(r) {
328 return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
329 },
330 // alias for begin(condition)
331 pushState: function(r) {
332 this.begin(r);
333 },
334 // return the number of states currently on the stack
335 stateStackSize: function() {
336 return this.conditionStack.length;
337 },
338 options: { "case-insensitive": !0 },
339 performAction: function(r, d, l, y) {
340 switch (l) {
341 case 0:
342 return this.begin("open_directive"), 41;
343 case 1:
344 return this.begin("type_directive"), 42;
345 case 2:
346 return this.popState(), this.begin("arg_directive"), 36;
347 case 3:
348 return this.popState(), this.popState(), 44;
349 case 4:
350 return 43;
351 case 5:
352 break;
353 case 6:
354 break;
355 case 7:
356 return 38;
357 case 8:
358 break;
359 case 9:
360 return this.begin("title"), 14;
361 case 10:
362 return this.popState(), "title_value";
363 case 11:
364 return this.begin("acc_title"), 16;
365 case 12:
366 return this.popState(), "acc_title_value";
367 case 13:
368 return this.begin("acc_descr"), 18;
369 case 14:
370 return this.popState(), "acc_descr_value";
371 case 15:
372 this.begin("acc_descr_multiline");
373 break;
374 case 16:
375 this.popState();
376 break;
377 case 17:
378 return "acc_descr_multiline_value";
379 case 18:
380 return 26;
381 case 19:
382 return 28;
383 case 20:
384 return 27;
385 case 21:
386 return 29;
387 case 22:
388 return 30;
389 case 23:
390 return 31;
391 case 24:
392 return 32;
393 case 25:
394 this.begin("md_string");
395 break;
396 case 26:
397 return "MD_STR";
398 case 27:
399 this.popState();
400 break;
401 case 28:
402 this.begin("string");
403 break;
404 case 29:
405 this.popState();
406 break;
407 case 30:
408 return "STR";
409 case 31:
410 return this.begin("point_start"), 23;
411 case 32:
412 return this.begin("point_x"), 24;
413 case 33:
414 this.popState();
415 break;
416 case 34:
417 this.popState(), this.begin("point_y");
418 break;
419 case 35:
420 return this.popState(), 25;
421 case 36:
422 return 7;
423 case 37:
424 return 53;
425 case 38:
426 return "COLON";
427 case 39:
428 return 55;
429 case 40:
430 return 54;
431 case 41:
432 return 56;
433 case 42:
434 return 56;
435 case 43:
436 return 57;
437 case 44:
438 return 59;
439 case 45:
440 return 60;
441 case 46:
442 return 58;
443 case 47:
444 return 51;
445 case 48:
446 return 61;
447 case 49:
448 return 52;
449 case 50:
450 return 5;
451 case 51:
452 return 39;
453 case 52:
454 return 50;
455 case 53:
456 return 40;
457 }
458 },
459 rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
460 conditions: { point_y: { rules: [35], inclusive: !1 }, point_x: { rules: [34], inclusive: !1 }, point_start: { rules: [32, 33], inclusive: !1 }, acc_descr_multiline: { rules: [16, 17], inclusive: !1 }, acc_descr: { rules: [14], inclusive: !1 }, acc_title: { rules: [12], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, title: { rules: [10], inclusive: !1 }, md_string: { rules: [26, 27], inclusive: !1 }, string: { rules: [29, 30], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 11, 13, 15, 18, 19, 20, 21, 22, 23, 24, 25, 28, 31, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53], inclusive: !0 } }
461 };
462 return K;
463 }();
464 dt.lexer = Ft;
465 function ut() {
466 this.yy = {};
467 }
468 return ut.prototype = dt, dt.Parser = ut, new ut();
469}();
470qt.parser = qt;
471const Ut = qt, R = Dt();
472class Qt {
473 constructor() {
474 this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
475 }
476 getDefaultData() {
477 return {
478 titleText: "",
479 quadrant1Text: "",
480 quadrant2Text: "",
481 quadrant3Text: "",
482 quadrant4Text: "",
483 xAxisLeftText: "",
484 xAxisRightText: "",
485 yAxisBottomText: "",
486 yAxisTopText: "",
487 points: []
488 };
489 }
490 getDefaultConfig() {
491 var a, h, f, g, x, c, p, s, o, m, B, V, _, D, b, H, G, Z;
492 return {
493 showXAxis: !0,
494 showYAxis: !0,
495 showTitle: !0,
496 chartHeight: ((a = I.quadrantChart) == null ? void 0 : a.chartWidth) || 500,
497 chartWidth: ((h = I.quadrantChart) == null ? void 0 : h.chartHeight) || 500,
498 titlePadding: ((f = I.quadrantChart) == null ? void 0 : f.titlePadding) || 10,
499 titleFontSize: ((g = I.quadrantChart) == null ? void 0 : g.titleFontSize) || 20,
500 quadrantPadding: ((x = I.quadrantChart) == null ? void 0 : x.quadrantPadding) || 5,
501 xAxisLabelPadding: ((c = I.quadrantChart) == null ? void 0 : c.xAxisLabelPadding) || 5,
502 yAxisLabelPadding: ((p = I.quadrantChart) == null ? void 0 : p.yAxisLabelPadding) || 5,
503 xAxisLabelFontSize: ((s = I.quadrantChart) == null ? void 0 : s.xAxisLabelFontSize) || 16,
504 yAxisLabelFontSize: ((o = I.quadrantChart) == null ? void 0 : o.yAxisLabelFontSize) || 16,
505 quadrantLabelFontSize: ((m = I.quadrantChart) == null ? void 0 : m.quadrantLabelFontSize) || 16,
506 quadrantTextTopPadding: ((B = I.quadrantChart) == null ? void 0 : B.quadrantTextTopPadding) || 5,
507 pointTextPadding: ((V = I.quadrantChart) == null ? void 0 : V.pointTextPadding) || 5,
508 pointLabelFontSize: ((_ = I.quadrantChart) == null ? void 0 : _.pointLabelFontSize) || 12,
509 pointRadius: ((D = I.quadrantChart) == null ? void 0 : D.pointRadius) || 5,
510 xAxisPosition: ((b = I.quadrantChart) == null ? void 0 : b.xAxisPosition) || "top",
511 yAxisPosition: ((H = I.quadrantChart) == null ? void 0 : H.yAxisPosition) || "left",
512 quadrantInternalBorderStrokeWidth: ((G = I.quadrantChart) == null ? void 0 : G.quadrantInternalBorderStrokeWidth) || 1,
513 quadrantExternalBorderStrokeWidth: ((Z = I.quadrantChart) == null ? void 0 : Z.quadrantExternalBorderStrokeWidth) || 2
514 };
515 }
516 getDefaultThemeConfig() {
517 return {
518 quadrant1Fill: R.quadrant1Fill,
519 quadrant2Fill: R.quadrant2Fill,
520 quadrant3Fill: R.quadrant3Fill,
521 quadrant4Fill: R.quadrant4Fill,
522 quadrant1TextFill: R.quadrant1TextFill,
523 quadrant2TextFill: R.quadrant2TextFill,
524 quadrant3TextFill: R.quadrant3TextFill,
525 quadrant4TextFill: R.quadrant4TextFill,
526 quadrantPointFill: R.quadrantPointFill,
527 quadrantPointTextFill: R.quadrantPointTextFill,
528 quadrantXAxisTextFill: R.quadrantXAxisTextFill,
529 quadrantYAxisTextFill: R.quadrantYAxisTextFill,
530 quadrantTitleFill: R.quadrantTitleFill,
531 quadrantInternalBorderStrokeFill: R.quadrantInternalBorderStrokeFill,
532 quadrantExternalBorderStrokeFill: R.quadrantExternalBorderStrokeFill
533 };
534 }
535 clear() {
536 this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), lt.info("clear called");
537 }
538 setData(a) {
539 this.data = { ...this.data, ...a };
540 }
541 addPoints(a) {
542 this.data.points = [...a, ...this.data.points];
543 }
544 setConfig(a) {
545 lt.trace("setConfig called with: ", a), this.config = { ...this.config, ...a };
546 }
547 setThemeConfig(a) {
548 lt.trace("setThemeConfig called with: ", a), this.themeConfig = { ...this.themeConfig, ...a };
549 }
550 calculateSpace(a, h, f, g) {
551 const x = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, c = {
552 top: a === "top" && h ? x : 0,
553 bottom: a === "bottom" && h ? x : 0
554 }, p = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, s = {
555 left: this.config.yAxisPosition === "left" && f ? p : 0,
556 right: this.config.yAxisPosition === "right" && f ? p : 0
557 }, o = this.config.titleFontSize + this.config.titlePadding * 2, m = {
558 top: g ? o : 0
559 }, B = this.config.quadrantPadding + s.left, V = this.config.quadrantPadding + c.top + m.top, _ = this.config.chartWidth - this.config.quadrantPadding * 2 - s.left - s.right, D = this.config.chartHeight - this.config.quadrantPadding * 2 - c.top - c.bottom - m.top, b = _ / 2, H = D / 2;
560 return {
561 xAxisSpace: c,
562 yAxisSpace: s,
563 titleSpace: m,
564 quadrantSpace: {
565 quadrantLeft: B,
566 quadrantTop: V,
567 quadrantWidth: _,
568 quadrantHalfWidth: b,
569 quadrantHeight: D,
570 quadrantHalfHeight: H
571 }
572 };
573 }
574 getAxisLabels(a, h, f, g) {
575 const { quadrantSpace: x, titleSpace: c } = g, {
576 quadrantHalfHeight: p,
577 quadrantHeight: s,
578 quadrantLeft: o,
579 quadrantHalfWidth: m,
580 quadrantTop: B,
581 quadrantWidth: V
582 } = x, _ = this.data.points.length === 0, D = [];
583 return this.data.xAxisLeftText && h && D.push({
584 text: this.data.xAxisLeftText,
585 fill: this.themeConfig.quadrantXAxisTextFill,
586 x: o + (_ ? m / 2 : 0),
587 y: a === "top" ? this.config.xAxisLabelPadding + c.top : this.config.xAxisLabelPadding + B + s + this.config.quadrantPadding,
588 fontSize: this.config.xAxisLabelFontSize,
589 verticalPos: _ ? "center" : "left",
590 horizontalPos: "top",
591 rotation: 0
592 }), this.data.xAxisRightText && h && D.push({
593 text: this.data.xAxisRightText,
594 fill: this.themeConfig.quadrantXAxisTextFill,
595 x: o + m + (_ ? m / 2 : 0),
596 y: a === "top" ? this.config.xAxisLabelPadding + c.top : this.config.xAxisLabelPadding + B + s + this.config.quadrantPadding,
597 fontSize: this.config.xAxisLabelFontSize,
598 verticalPos: _ ? "center" : "left",
599 horizontalPos: "top",
600 rotation: 0
601 }), this.data.yAxisBottomText && f && D.push({
602 text: this.data.yAxisBottomText,
603 fill: this.themeConfig.quadrantYAxisTextFill,
604 x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + o + V + this.config.quadrantPadding,
605 y: B + s - (_ ? p / 2 : 0),
606 fontSize: this.config.yAxisLabelFontSize,
607 verticalPos: _ ? "center" : "left",
608 horizontalPos: "top",
609 rotation: -90
610 }), this.data.yAxisTopText && f && D.push({
611 text: this.data.yAxisTopText,
612 fill: this.themeConfig.quadrantYAxisTextFill,
613 x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + o + V + this.config.quadrantPadding,
614 y: B + p - (_ ? p / 2 : 0),
615 fontSize: this.config.yAxisLabelFontSize,
616 verticalPos: _ ? "center" : "left",
617 horizontalPos: "top",
618 rotation: -90
619 }), D;
620 }
621 getQuadrants(a) {
622 const { quadrantSpace: h } = a, { quadrantHalfHeight: f, quadrantLeft: g, quadrantHalfWidth: x, quadrantTop: c } = h, p = [
623 {
624 text: {
625 text: this.data.quadrant1Text,
626 fill: this.themeConfig.quadrant1TextFill,
627 x: 0,
628 y: 0,
629 fontSize: this.config.quadrantLabelFontSize,
630 verticalPos: "center",
631 horizontalPos: "middle",
632 rotation: 0
633 },
634 x: g + x,
635 y: c,
636 width: x,
637 height: f,
638 fill: this.themeConfig.quadrant1Fill
639 },
640 {
641 text: {
642 text: this.data.quadrant2Text,
643 fill: this.themeConfig.quadrant2TextFill,
644 x: 0,
645 y: 0,
646 fontSize: this.config.quadrantLabelFontSize,
647 verticalPos: "center",
648 horizontalPos: "middle",
649 rotation: 0
650 },
651 x: g,
652 y: c,
653 width: x,
654 height: f,
655 fill: this.themeConfig.quadrant2Fill
656 },
657 {
658 text: {
659 text: this.data.quadrant3Text,
660 fill: this.themeConfig.quadrant3TextFill,
661 x: 0,
662 y: 0,
663 fontSize: this.config.quadrantLabelFontSize,
664 verticalPos: "center",
665 horizontalPos: "middle",
666 rotation: 0
667 },
668 x: g,
669 y: c + f,
670 width: x,
671 height: f,
672 fill: this.themeConfig.quadrant3Fill
673 },
674 {
675 text: {
676 text: this.data.quadrant4Text,
677 fill: this.themeConfig.quadrant4TextFill,
678 x: 0,
679 y: 0,
680 fontSize: this.config.quadrantLabelFontSize,
681 verticalPos: "center",
682 horizontalPos: "middle",
683 rotation: 0
684 },
685 x: g + x,
686 y: c + f,
687 width: x,
688 height: f,
689 fill: this.themeConfig.quadrant4Fill
690 }
691 ];
692 for (const s of p)
693 s.text.x = s.x + s.width / 2, this.data.points.length === 0 ? (s.text.y = s.y + s.height / 2, s.text.horizontalPos = "middle") : (s.text.y = s.y + this.config.quadrantTextTopPadding, s.text.horizontalPos = "top");
694 return p;
695 }
696 getQuadrantPoints(a) {
697 const { quadrantSpace: h } = a, { quadrantHeight: f, quadrantLeft: g, quadrantTop: x, quadrantWidth: c } = h, p = St().domain([0, 1]).range([g, c + g]), s = St().domain([0, 1]).range([f + x, x]);
698 return this.data.points.map((m) => ({
699 x: p(m.x),
700 y: s(m.y),
701 fill: this.themeConfig.quadrantPointFill,
702 radius: this.config.pointRadius,
703 text: {
704 text: m.text,
705 fill: this.themeConfig.quadrantPointTextFill,
706 x: p(m.x),
707 y: s(m.y) + this.config.pointTextPadding,
708 verticalPos: "center",
709 horizontalPos: "top",
710 fontSize: this.config.pointLabelFontSize,
711 rotation: 0
712 }
713 }));
714 }
715 getBorders(a) {
716 const h = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: f } = a, {
717 quadrantHalfHeight: g,
718 quadrantHeight: x,
719 quadrantLeft: c,
720 quadrantHalfWidth: p,
721 quadrantTop: s,
722 quadrantWidth: o
723 } = f;
724 return [
725 // top border
726 {
727 strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
728 strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
729 x1: c - h,
730 y1: s,
731 x2: c + o + h,
732 y2: s
733 },
734 // right border
735 {
736 strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
737 strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
738 x1: c + o,
739 y1: s + h,
740 x2: c + o,
741 y2: s + x - h
742 },
743 // bottom border
744 {
745 strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
746 strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
747 x1: c - h,
748 y1: s + x,
749 x2: c + o + h,
750 y2: s + x
751 },
752 // left border
753 {
754 strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
755 strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
756 x1: c,
757 y1: s + h,
758 x2: c,
759 y2: s + x - h
760 },
761 // vertical inner border
762 {
763 strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
764 strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
765 x1: c + p,
766 y1: s + h,
767 x2: c + p,
768 y2: s + x - h
769 },
770 // horizontal inner border
771 {
772 strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
773 strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
774 x1: c + h,
775 y1: s + g,
776 x2: c + o - h,
777 y2: s + g
778 }
779 ];
780 }
781 getTitle(a) {
782 if (a)
783 return {
784 text: this.data.titleText,
785 fill: this.themeConfig.quadrantTitleFill,
786 fontSize: this.config.titleFontSize,
787 horizontalPos: "top",
788 verticalPos: "center",
789 rotation: 0,
790 y: this.config.titlePadding,
791 x: this.config.chartWidth / 2
792 };
793 }
794 build() {
795 const a = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), h = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), f = this.config.showTitle && !!this.data.titleText, g = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, x = this.calculateSpace(g, a, h, f);
796 return {
797 points: this.getQuadrantPoints(x),
798 quadrants: this.getQuadrants(x),
799 axisLabels: this.getAxisLabels(g, a, h, x),
800 borderLines: this.getBorders(x),
801 title: this.getTitle(f)
802 };
803 }
804}
805const Ht = Tt();
806function j(e) {
807 return Wt(e.trim(), Ht);
808}
809const w = new Qt();
810function Mt(e) {
811 w.setData({ quadrant1Text: j(e.text) });
812}
813function Xt(e) {
814 w.setData({ quadrant2Text: j(e.text) });
815}
816function Ot(e) {
817 w.setData({ quadrant3Text: j(e.text) });
818}
819function Yt(e) {
820 w.setData({ quadrant4Text: j(e.text) });
821}
822function jt(e) {
823 w.setData({ xAxisLeftText: j(e.text) });
824}
825function Gt(e) {
826 w.setData({ xAxisRightText: j(e.text) });
827}
828function Kt(e) {
829 w.setData({ yAxisTopText: j(e.text) });
830}
831function Zt(e) {
832 w.setData({ yAxisBottomText: j(e.text) });
833}
834function Jt(e, a, h) {
835 w.addPoints([{ x: a, y: h, text: j(e.text) }]);
836}
837function $t(e) {
838 w.setConfig({ chartWidth: e });
839}
840function te(e) {
841 w.setConfig({ chartHeight: e });
842}
843function ee() {
844 const e = Tt(), { themeVariables: a, quadrantChart: h } = e;
845 return h && w.setConfig(h), w.setThemeConfig({
846 quadrant1Fill: a.quadrant1Fill,
847 quadrant2Fill: a.quadrant2Fill,
848 quadrant3Fill: a.quadrant3Fill,
849 quadrant4Fill: a.quadrant4Fill,
850 quadrant1TextFill: a.quadrant1TextFill,
851 quadrant2TextFill: a.quadrant2TextFill,
852 quadrant3TextFill: a.quadrant3TextFill,
853 quadrant4TextFill: a.quadrant4TextFill,
854 quadrantPointFill: a.quadrantPointFill,
855 quadrantPointTextFill: a.quadrantPointTextFill,
856 quadrantXAxisTextFill: a.quadrantXAxisTextFill,
857 quadrantYAxisTextFill: a.quadrantYAxisTextFill,
858 quadrantExternalBorderStrokeFill: a.quadrantExternalBorderStrokeFill,
859 quadrantInternalBorderStrokeFill: a.quadrantInternalBorderStrokeFill,
860 quadrantTitleFill: a.quadrantTitleFill
861 }), w.setData({ titleText: kt() }), w.build();
862}
863const ie = function(e, a, h) {
864 wt.parseDirective(this, e, a, h);
865}, ae = function() {
866 w.clear(), Rt();
867}, ne = {
868 setWidth: $t,
869 setHeight: te,
870 setQuadrant1Text: Mt,
871 setQuadrant2Text: Xt,
872 setQuadrant3Text: Ot,
873 setQuadrant4Text: Yt,
874 setXAxisLeftText: jt,
875 setXAxisRightText: Gt,
876 setYAxisTopText: Kt,
877 setYAxisBottomText: Zt,
878 addPoint: Jt,
879 getQuadrantData: ee,
880 parseDirective: ie,
881 clear: ae,
882 setAccTitle: zt,
883 getAccTitle: Et,
884 setDiagramTitle: It,
885 getDiagramTitle: kt,
886 getAccDescription: Bt,
887 setAccDescription: Vt
888}, re = (e, a, h, f) => {
889 var U, q, T;
890 function g(t) {
891 return t === "top" ? "hanging" : "middle";
892 }
893 function x(t) {
894 return t === "left" ? "start" : "middle";
895 }
896 function c(t) {
897 return `translate(${t.x}, ${t.y}) rotate(${t.rotation || 0})`;
898 }
899 const p = Tt();
900 lt.debug(`Rendering quadrant chart
901` + e);
902 const s = p.securityLevel;
903 let o;
904 s === "sandbox" && (o = yt("#i" + a));
905 const B = (s === "sandbox" ? yt(o.nodes()[0].contentDocument.body) : yt("body")).select(`[id="${a}"]`), V = B.append("g").attr("class", "main"), _ = ((U = p.quadrantChart) == null ? void 0 : U.chartWidth) || 500, D = ((q = p.quadrantChart) == null ? void 0 : q.chartHeight) || 500;
906 Nt(B, D, _, ((T = p.quadrantChart) == null ? void 0 : T.useMaxWidth) || !0), B.attr("viewBox", "0 0 " + _ + " " + D), f.db.setHeight(D), f.db.setWidth(_);
907 const b = f.db.getQuadrantData(), H = V.append("g").attr("class", "quadrants"), G = V.append("g").attr("class", "border"), Z = V.append("g").attr("class", "data-points"), at = V.append("g").attr("class", "labels"), nt = V.append("g").attr("class", "title");
908 b.title && nt.append("text").attr("x", 0).attr("y", 0).attr("fill", b.title.fill).attr("font-size", b.title.fontSize).attr("dominant-baseline", g(b.title.horizontalPos)).attr("text-anchor", x(b.title.verticalPos)).attr("transform", c(b.title)).text(b.title.text), b.borderLines && G.selectAll("line").data(b.borderLines).enter().append("line").attr("x1", (t) => t.x1).attr("y1", (t) => t.y1).attr("x2", (t) => t.x2).attr("y2", (t) => t.y2).style("stroke", (t) => t.strokeFill).style("stroke-width", (t) => t.strokeWidth);
909 const et = H.selectAll("g.quadrant").data(b.quadrants).enter().append("g").attr("class", "quadrant");
910 et.append("rect").attr("x", (t) => t.x).attr("y", (t) => t.y).attr("width", (t) => t.width).attr("height", (t) => t.height).attr("fill", (t) => t.fill), et.append("text").attr("x", 0).attr("y", 0).attr("fill", (t) => t.text.fill).attr("font-size", (t) => t.text.fontSize).attr(
911 "dominant-baseline",
912 (t) => g(t.text.horizontalPos)
913 ).attr("text-anchor", (t) => x(t.text.verticalPos)).attr("transform", (t) => c(t.text)).text((t) => t.text.text), at.selectAll("g.label").data(b.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((t) => t.text).attr("fill", (t) => t.fill).attr("font-size", (t) => t.fontSize).attr("dominant-baseline", (t) => g(t.horizontalPos)).attr("text-anchor", (t) => x(t.verticalPos)).attr("transform", (t) => c(t));
914 const N = Z.selectAll("g.data-point").data(b.points).enter().append("g").attr("class", "data-point");
915 N.append("circle").attr("cx", (t) => t.x).attr("cy", (t) => t.y).attr("r", (t) => t.radius).attr("fill", (t) => t.fill), N.append("text").attr("x", 0).attr("y", 0).text((t) => t.text.text).attr("fill", (t) => t.text.fill).attr("font-size", (t) => t.text.fontSize).attr(
916 "dominant-baseline",
917 (t) => g(t.text.horizontalPos)
918 ).attr("text-anchor", (t) => x(t.text.verticalPos)).attr("transform", (t) => c(t.text));
919}, se = {
920 draw: re
921}, he = {
922 parser: Ut,
923 db: ne,
924 renderer: se,
925 styles: () => ""
926};
927export {
928 he as diagram
929};