gradio-leaderboard 0.0.12rc0__py3-none-any.whl → 0.0.14__py3-none-any.whl
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.
- gradio_leaderboard/leaderboard.pyi +102 -72
- gradio_leaderboard/templates/component/Index-CzS_eGV6.js +34210 -0
- gradio_leaderboard/templates/component/_basePickBy-CPQEc5fh.js +151 -0
- gradio_leaderboard/templates/component/_baseUniq-DlEwemC3.js +615 -0
- gradio_leaderboard/templates/component/arc-4UNMf6Jv.js +83 -0
- gradio_leaderboard/templates/component/architectureDiagram-NQ2NVSRB-ClVp_eQQ.js +4629 -0
- gradio_leaderboard/templates/component/blockDiagram-PHRCVELO-CBZHEIQE.js +2255 -0
- gradio_leaderboard/templates/component/c4Diagram-6F6E4RAY-BcEP_NdH.js +1586 -0
- gradio_leaderboard/templates/component/channel-BK2Jce3b.js +5 -0
- gradio_leaderboard/templates/component/chunk-353BL4L5-D4dVjjbU.js +8 -0
- gradio_leaderboard/templates/component/chunk-67H74DCK-Dd9cOxfN.js +64 -0
- gradio_leaderboard/templates/component/chunk-6OLS64BW-CfumlcA2.js +1376 -0
- gradio_leaderboard/templates/component/chunk-AACKK3MU-4CpiDhxa.js +18 -0
- gradio_leaderboard/templates/component/chunk-BFAMUDN2-C6YyJRb4.js +8 -0
- gradio_leaderboard/templates/component/chunk-E2GYISFI-CbYUJnri.js +19 -0
- gradio_leaderboard/templates/component/chunk-QEP2MXWD-BYLoFCys.js +1380 -0
- gradio_leaderboard/templates/component/chunk-SKB7J2MH-DNiBnZKZ.js +19 -0
- gradio_leaderboard/templates/component/classDiagram-BGRH5UQR-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/classDiagram-v2-O24JOBDK-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/clone-BA6MvtJ3.js +8 -0
- gradio_leaderboard/templates/component/cytoscape.esm-Bdz5CrXX.js +18629 -0
- gradio_leaderboard/templates/component/dagre-FFZHY6LT-6RahWHGr.js +444 -0
- gradio_leaderboard/templates/component/defaultLocale-D7EN2tov.js +171 -0
- gradio_leaderboard/templates/component/diagram-3EMPZRKU-DtoOVTDy.js +526 -0
- gradio_leaderboard/templates/component/diagram-5UYTHUR4-MEp0H-U7.js +137 -0
- gradio_leaderboard/templates/component/diagram-ZTM2IBQH-22c5YuUh.js +217 -0
- gradio_leaderboard/templates/component/erDiagram-R3QVA2FD-DZp2MeDc.js +844 -0
- gradio_leaderboard/templates/component/flowDiagram-PKI6S5ZS-CfK9UZi3.js +1623 -0
- gradio_leaderboard/templates/component/ganttDiagram-EK5VF46D-waaD2Kup.js +2502 -0
- gradio_leaderboard/templates/component/gitGraphDiagram-GW3U2K7C-DJCAxNvz.js +699 -0
- gradio_leaderboard/templates/component/graph-CXm5uxKj.js +247 -0
- gradio_leaderboard/templates/component/index.js +2 -29469
- gradio_leaderboard/templates/component/infoDiagram-RLU2ROGC-_Rx9wF6U.js +24 -0
- gradio_leaderboard/templates/component/init-DjUOC4st.js +16 -0
- gradio_leaderboard/templates/component/journeyDiagram-EWQZEKCU-G-tt0noJ.js +836 -0
- gradio_leaderboard/templates/component/kanban-definition-ILFWEQ3N-2aHifLFR.js +718 -0
- gradio_leaderboard/templates/component/layout-DiZ88ySr.js +1324 -0
- gradio_leaderboard/templates/component/linear-D4M9Dm-w.js +259 -0
- gradio_leaderboard/templates/component/mermaid.core-D36e06XD.js +14941 -0
- gradio_leaderboard/templates/component/mindmap-definition-CZNETY7S-1Jow2c7r.js +3215 -0
- gradio_leaderboard/templates/component/ordinal-DfAQgscy.js +61 -0
- gradio_leaderboard/templates/component/pieDiagram-NIOCPIFQ-DU7jHSoi.js +162 -0
- gradio_leaderboard/templates/component/quadrantDiagram-2OG54O6I-GcojS_If.js +1028 -0
- gradio_leaderboard/templates/component/requirementDiagram-SO3GGRV7-CBRyajan.js +853 -0
- gradio_leaderboard/templates/component/sankeyDiagram-4UZDY2LN-CeZji6oR.js +820 -0
- gradio_leaderboard/templates/component/sequenceDiagram-ZIKVLSP4-DMygkr3Y.js +2284 -0
- gradio_leaderboard/templates/component/stateDiagram-XX37X6EN-DK2vsx2r.js +263 -0
- gradio_leaderboard/templates/component/stateDiagram-v2-GD6S3NHB-BoIkPrjk.js +16 -0
- gradio_leaderboard/templates/component/style.css +1 -1
- gradio_leaderboard/templates/component/timeline-definition-RI47OAVP-BQ_Jr8hZ.js +797 -0
- gradio_leaderboard/templates/component/treemap-FKARHQ26-2Ty0RcZX.js +12981 -0
- gradio_leaderboard/templates/component/xychartDiagram-H2YORKM3--C9dwTwV.js +1368 -0
- gradio_leaderboard/templates/example/index.js +201 -139
- {gradio_leaderboard-0.0.12rc0.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +3 -3
- gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
- {gradio_leaderboard-0.0.12rc0.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
- gradio_leaderboard/templates/component/__vite-browser-external-2447137e.js +0 -4
- gradio_leaderboard/templates/component/wrapper-6f348d45-19fa94bf.js +0 -2453
- gradio_leaderboard-0.0.12rc0.dist-info/RECORD +0 -12
@@ -0,0 +1,1028 @@
|
|
1
|
+
import { _ as r, K as be, C as D, l as qt, d as Et, i as Se, o as te, s as _e, g as Ae, n as ke, b as Fe, c as Pe, t as ve, j as vt, k as Ce } from "./mermaid.core-D36e06XD.js";
|
2
|
+
import { l as $t } from "./linear-D4M9Dm-w.js";
|
3
|
+
var Ct = function() {
|
4
|
+
var t = /* @__PURE__ */ r(function(M, s, l, u) {
|
5
|
+
for (l = l || {}, u = M.length; u--; l[M[u]] = s) ;
|
6
|
+
return l;
|
7
|
+
}, "o"), a = [1, 3], p = [1, 4], f = [1, 5], o = [1, 6], x = [1, 7], _ = [1, 4, 5, 10, 12, 13, 14, 18, 25, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], h = [1, 4, 5, 10, 12, 13, 14, 18, 25, 28, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], c = [55, 56, 57], S = [2, 36], m = [1, 37], b = [1, 36], y = [1, 38], T = [1, 35], q = [1, 43], g = [1, 41], rt = [1, 14], ct = [1, 23], dt = [1, 18], ut = [1, 19], xt = [1, 20], ot = [1, 21], bt = [1, 22], lt = [1, 24], i = [1, 25], Dt = [1, 26], zt = [1, 27], Vt = [1, 28], It = [1, 29], W = [1, 32], U = [1, 33], k = [1, 34], F = [1, 39], P = [1, 40], v = [1, 42], C = [1, 44], O = [1, 62], H = [1, 61], L = [4, 5, 8, 10, 12, 13, 14, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], wt = [1, 65], Bt = [1, 66], Rt = [1, 67], Nt = [1, 68], Wt = [1, 69], Ut = [1, 70], Qt = [1, 71], Ot = [1, 72], Ht = [1, 73], Xt = [1, 74], Mt = [1, 75], Yt = [1, 76], I = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], G = [1, 90], K = [1, 91], Z = [1, 92], J = [1, 99], $ = [1, 93], tt = [1, 96], et = [1, 94], it = [1, 95], at = [1, 97], nt = [1, 98], St = [1, 102], jt = [10, 55, 56, 57], R = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57], _t = {
|
8
|
+
trace: /* @__PURE__ */ r(function() {
|
9
|
+
}, "trace"),
|
10
|
+
yy: {},
|
11
|
+
symbols_: { error: 2, idStringToken: 3, ALPHA: 4, NUM: 5, NODE_STRING: 6, DOWN: 7, MINUS: 8, DEFAULT: 9, COMMA: 10, COLON: 11, AMP: 12, BRKT: 13, MULT: 14, UNICODE_TEXT: 15, styleComponent: 16, UNIT: 17, SPACE: 18, STYLE: 19, PCT: 20, idString: 21, style: 22, stylesOpt: 23, classDefStatement: 24, CLASSDEF: 25, start: 26, eol: 27, QUADRANT: 28, document: 29, line: 30, statement: 31, axisDetails: 32, quadrantDetails: 33, points: 34, title: 35, title_value: 36, acc_title: 37, acc_title_value: 38, acc_descr: 39, acc_descr_value: 40, acc_descr_multiline_value: 41, section: 42, text: 43, point_start: 44, point_x: 45, point_y: 46, class_name: 47, "X-AXIS": 48, "AXIS-TEXT-DELIMITER": 49, "Y-AXIS": 50, QUADRANT_1: 51, QUADRANT_2: 52, QUADRANT_3: 53, QUADRANT_4: 54, NEWLINE: 55, SEMI: 56, EOF: 57, alphaNumToken: 58, textNoTagsToken: 59, STR: 60, MD_STR: 61, alphaNum: 62, PUNCTUATION: 63, PLUS: 64, EQUALS: 65, DOT: 66, UNDERSCORE: 67, $accept: 0, $end: 1 },
|
12
|
+
terminals_: { 2: "error", 4: "ALPHA", 5: "NUM", 6: "NODE_STRING", 7: "DOWN", 8: "MINUS", 9: "DEFAULT", 10: "COMMA", 11: "COLON", 12: "AMP", 13: "BRKT", 14: "MULT", 15: "UNICODE_TEXT", 17: "UNIT", 18: "SPACE", 19: "STYLE", 20: "PCT", 25: "CLASSDEF", 28: "QUADRANT", 35: "title", 36: "title_value", 37: "acc_title", 38: "acc_title_value", 39: "acc_descr", 40: "acc_descr_value", 41: "acc_descr_multiline_value", 42: "section", 44: "point_start", 45: "point_x", 46: "point_y", 47: "class_name", 48: "X-AXIS", 49: "AXIS-TEXT-DELIMITER", 50: "Y-AXIS", 51: "QUADRANT_1", 52: "QUADRANT_2", 53: "QUADRANT_3", 54: "QUADRANT_4", 55: "NEWLINE", 56: "SEMI", 57: "EOF", 60: "STR", 61: "MD_STR", 63: "PUNCTUATION", 64: "PLUS", 65: "EQUALS", 66: "DOT", 67: "UNDERSCORE" },
|
13
|
+
productions_: [0, [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [21, 1], [21, 2], [22, 1], [22, 2], [23, 1], [23, 3], [24, 5], [26, 2], [26, 2], [26, 2], [29, 0], [29, 2], [30, 2], [31, 0], [31, 1], [31, 2], [31, 1], [31, 1], [31, 1], [31, 2], [31, 2], [31, 2], [31, 1], [31, 1], [34, 4], [34, 5], [34, 5], [34, 6], [32, 4], [32, 3], [32, 2], [32, 4], [32, 3], [32, 2], [33, 2], [33, 2], [33, 2], [33, 2], [27, 1], [27, 1], [27, 1], [43, 1], [43, 2], [43, 1], [43, 1], [62, 1], [62, 2], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [59, 1], [59, 1], [59, 1]],
|
14
|
+
performAction: /* @__PURE__ */ r(function(s, l, u, d, A, e, ht) {
|
15
|
+
var n = e.length - 1;
|
16
|
+
switch (A) {
|
17
|
+
case 23:
|
18
|
+
this.$ = e[n];
|
19
|
+
break;
|
20
|
+
case 24:
|
21
|
+
this.$ = e[n - 1] + "" + e[n];
|
22
|
+
break;
|
23
|
+
case 26:
|
24
|
+
this.$ = e[n - 1] + e[n];
|
25
|
+
break;
|
26
|
+
case 27:
|
27
|
+
this.$ = [e[n].trim()];
|
28
|
+
break;
|
29
|
+
case 28:
|
30
|
+
e[n - 2].push(e[n].trim()), this.$ = e[n - 2];
|
31
|
+
break;
|
32
|
+
case 29:
|
33
|
+
this.$ = e[n - 4], d.addClass(e[n - 2], e[n]);
|
34
|
+
break;
|
35
|
+
case 37:
|
36
|
+
this.$ = [];
|
37
|
+
break;
|
38
|
+
case 42:
|
39
|
+
this.$ = e[n].trim(), d.setDiagramTitle(this.$);
|
40
|
+
break;
|
41
|
+
case 43:
|
42
|
+
this.$ = e[n].trim(), d.setAccTitle(this.$);
|
43
|
+
break;
|
44
|
+
case 44:
|
45
|
+
case 45:
|
46
|
+
this.$ = e[n].trim(), d.setAccDescription(this.$);
|
47
|
+
break;
|
48
|
+
case 46:
|
49
|
+
d.addSection(e[n].substr(8)), this.$ = e[n].substr(8);
|
50
|
+
break;
|
51
|
+
case 47:
|
52
|
+
d.addPoint(e[n - 3], "", e[n - 1], e[n], []);
|
53
|
+
break;
|
54
|
+
case 48:
|
55
|
+
d.addPoint(e[n - 4], e[n - 3], e[n - 1], e[n], []);
|
56
|
+
break;
|
57
|
+
case 49:
|
58
|
+
d.addPoint(e[n - 4], "", e[n - 2], e[n - 1], e[n]);
|
59
|
+
break;
|
60
|
+
case 50:
|
61
|
+
d.addPoint(e[n - 5], e[n - 4], e[n - 2], e[n - 1], e[n]);
|
62
|
+
break;
|
63
|
+
case 51:
|
64
|
+
d.setXAxisLeftText(e[n - 2]), d.setXAxisRightText(e[n]);
|
65
|
+
break;
|
66
|
+
case 52:
|
67
|
+
e[n - 1].text += " ⟶ ", d.setXAxisLeftText(e[n - 1]);
|
68
|
+
break;
|
69
|
+
case 53:
|
70
|
+
d.setXAxisLeftText(e[n]);
|
71
|
+
break;
|
72
|
+
case 54:
|
73
|
+
d.setYAxisBottomText(e[n - 2]), d.setYAxisTopText(e[n]);
|
74
|
+
break;
|
75
|
+
case 55:
|
76
|
+
e[n - 1].text += " ⟶ ", d.setYAxisBottomText(e[n - 1]);
|
77
|
+
break;
|
78
|
+
case 56:
|
79
|
+
d.setYAxisBottomText(e[n]);
|
80
|
+
break;
|
81
|
+
case 57:
|
82
|
+
d.setQuadrant1Text(e[n]);
|
83
|
+
break;
|
84
|
+
case 58:
|
85
|
+
d.setQuadrant2Text(e[n]);
|
86
|
+
break;
|
87
|
+
case 59:
|
88
|
+
d.setQuadrant3Text(e[n]);
|
89
|
+
break;
|
90
|
+
case 60:
|
91
|
+
d.setQuadrant4Text(e[n]);
|
92
|
+
break;
|
93
|
+
case 64:
|
94
|
+
this.$ = { text: e[n], type: "text" };
|
95
|
+
break;
|
96
|
+
case 65:
|
97
|
+
this.$ = { text: e[n - 1].text + "" + e[n], type: e[n - 1].type };
|
98
|
+
break;
|
99
|
+
case 66:
|
100
|
+
this.$ = { text: e[n], type: "text" };
|
101
|
+
break;
|
102
|
+
case 67:
|
103
|
+
this.$ = { text: e[n], type: "markdown" };
|
104
|
+
break;
|
105
|
+
case 68:
|
106
|
+
this.$ = e[n];
|
107
|
+
break;
|
108
|
+
case 69:
|
109
|
+
this.$ = e[n - 1] + "" + e[n];
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
}, "anonymous"),
|
113
|
+
table: [{ 18: a, 26: 1, 27: 2, 28: p, 55: f, 56: o, 57: x }, { 1: [3] }, { 18: a, 26: 8, 27: 2, 28: p, 55: f, 56: o, 57: x }, { 18: a, 26: 9, 27: 2, 28: p, 55: f, 56: o, 57: x }, t(_, [2, 33], { 29: 10 }), t(h, [2, 61]), t(h, [2, 62]), t(h, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, t(c, S, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 18: rt, 25: ct, 35: dt, 37: ut, 39: xt, 41: ot, 42: bt, 48: lt, 50: i, 51: Dt, 52: zt, 53: Vt, 54: It, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(_, [2, 34]), { 27: 45, 55: f, 56: o, 57: x }, t(c, [2, 37]), t(c, S, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 46, 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 18: rt, 25: ct, 35: dt, 37: ut, 39: xt, 41: ot, 42: bt, 48: lt, 50: i, 51: Dt, 52: zt, 53: Vt, 54: It, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 39]), t(c, [2, 40]), t(c, [2, 41]), { 36: [1, 47] }, { 38: [1, 48] }, { 40: [1, 49] }, t(c, [2, 45]), t(c, [2, 46]), { 18: [1, 50] }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 43: 51, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 43: 52, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 43: 53, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 43: 54, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 43: 55, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 43: 56, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 44: [1, 57], 47: [1, 58], 58: 60, 59: 59, 63: k, 64: F, 65: P, 66: v, 67: C }, t(L, [2, 64]), t(L, [2, 66]), t(L, [2, 67]), t(L, [2, 70]), t(L, [2, 71]), t(L, [2, 72]), t(L, [2, 73]), t(L, [2, 74]), t(L, [2, 75]), t(L, [2, 76]), t(L, [2, 77]), t(L, [2, 78]), t(L, [2, 79]), t(L, [2, 80]), t(_, [2, 35]), t(c, [2, 38]), t(c, [2, 42]), t(c, [2, 43]), t(c, [2, 44]), { 3: 64, 4: wt, 5: Bt, 6: Rt, 7: Nt, 8: Wt, 9: Ut, 10: Qt, 11: Ot, 12: Ht, 13: Xt, 14: Mt, 15: Yt, 21: 63 }, t(c, [2, 53], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 49: [1, 77], 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 56], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 49: [1, 78], 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 57], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 58], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 59], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 60], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), { 45: [1, 79] }, { 44: [1, 80] }, t(L, [2, 65]), t(L, [2, 81]), t(L, [2, 82]), t(L, [2, 83]), { 3: 82, 4: wt, 5: Bt, 6: Rt, 7: Nt, 8: Wt, 9: Ut, 10: Qt, 11: Ot, 12: Ht, 13: Xt, 14: Mt, 15: Yt, 18: [1, 81] }, t(I, [2, 23]), t(I, [2, 1]), t(I, [2, 2]), t(I, [2, 3]), t(I, [2, 4]), t(I, [2, 5]), t(I, [2, 6]), t(I, [2, 7]), t(I, [2, 8]), t(I, [2, 9]), t(I, [2, 10]), t(I, [2, 11]), t(I, [2, 12]), t(c, [2, 52], { 58: 31, 43: 83, 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 55], { 58: 31, 43: 84, 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), { 46: [1, 85] }, { 45: [1, 86] }, { 4: G, 5: K, 6: Z, 8: J, 11: $, 13: tt, 16: 89, 17: et, 18: it, 19: at, 20: nt, 22: 88, 23: 87 }, t(I, [2, 24]), t(c, [2, 51], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 54], { 59: 59, 58: 60, 4: m, 5: b, 8: O, 10: y, 12: T, 13: q, 14: g, 18: H, 63: k, 64: F, 65: P, 66: v, 67: C }), t(c, [2, 47], { 22: 88, 16: 89, 23: 100, 4: G, 5: K, 6: Z, 8: J, 11: $, 13: tt, 17: et, 18: it, 19: at, 20: nt }), { 46: [1, 101] }, t(c, [2, 29], { 10: St }), t(jt, [2, 27], { 16: 103, 4: G, 5: K, 6: Z, 8: J, 11: $, 13: tt, 17: et, 18: it, 19: at, 20: nt }), t(R, [2, 25]), t(R, [2, 13]), t(R, [2, 14]), t(R, [2, 15]), t(R, [2, 16]), t(R, [2, 17]), t(R, [2, 18]), t(R, [2, 19]), t(R, [2, 20]), t(R, [2, 21]), t(R, [2, 22]), t(c, [2, 49], { 10: St }), t(c, [2, 48], { 22: 88, 16: 89, 23: 104, 4: G, 5: K, 6: Z, 8: J, 11: $, 13: tt, 17: et, 18: it, 19: at, 20: nt }), { 4: G, 5: K, 6: Z, 8: J, 11: $, 13: tt, 16: 89, 17: et, 18: it, 19: at, 20: nt, 22: 105 }, t(R, [2, 26]), t(c, [2, 50], { 10: St }), t(jt, [2, 28], { 16: 103, 4: G, 5: K, 6: Z, 8: J, 11: $, 13: tt, 17: et, 18: it, 19: at, 20: nt })],
|
114
|
+
defaultActions: { 8: [2, 30], 9: [2, 31] },
|
115
|
+
parseError: /* @__PURE__ */ r(function(s, l) {
|
116
|
+
if (l.recoverable)
|
117
|
+
this.trace(s);
|
118
|
+
else {
|
119
|
+
var u = new Error(s);
|
120
|
+
throw u.hash = l, u;
|
121
|
+
}
|
122
|
+
}, "parseError"),
|
123
|
+
parse: /* @__PURE__ */ r(function(s) {
|
124
|
+
var l = this, u = [0], d = [], A = [null], e = [], ht = this.table, n = "", gt = 0, Gt = 0, ye = 2, Kt = 1, Te = e.slice.call(arguments, 1), E = Object.create(this.lexer), Y = { yy: {} };
|
125
|
+
for (var At in this.yy)
|
126
|
+
Object.prototype.hasOwnProperty.call(this.yy, At) && (Y.yy[At] = this.yy[At]);
|
127
|
+
E.setInput(s, Y.yy), Y.yy.lexer = E, Y.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
|
128
|
+
var kt = E.yylloc;
|
129
|
+
e.push(kt);
|
130
|
+
var qe = E.options && E.options.ranges;
|
131
|
+
typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
132
|
+
function me(B) {
|
133
|
+
u.length = u.length - 2 * B, A.length = A.length - B, e.length = e.length - B;
|
134
|
+
}
|
135
|
+
r(me, "popStack");
|
136
|
+
function Zt() {
|
137
|
+
var B;
|
138
|
+
return B = d.pop() || E.lex() || Kt, typeof B != "number" && (B instanceof Array && (d = B, B = d.pop()), B = l.symbols_[B] || B), B;
|
139
|
+
}
|
140
|
+
r(Zt, "lex");
|
141
|
+
for (var w, j, N, Ft, st = {}, pt, X, Jt, yt; ; ) {
|
142
|
+
if (j = u[u.length - 1], this.defaultActions[j] ? N = this.defaultActions[j] : ((w === null || typeof w > "u") && (w = Zt()), N = ht[j] && ht[j][w]), typeof N > "u" || !N.length || !N[0]) {
|
143
|
+
var Pt = "";
|
144
|
+
yt = [];
|
145
|
+
for (pt in ht[j])
|
146
|
+
this.terminals_[pt] && pt > ye && yt.push("'" + this.terminals_[pt] + "'");
|
147
|
+
E.showPosition ? Pt = "Parse error on line " + (gt + 1) + `:
|
148
|
+
` + E.showPosition() + `
|
149
|
+
Expecting ` + yt.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Pt = "Parse error on line " + (gt + 1) + ": Unexpected " + (w == Kt ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Pt, {
|
150
|
+
text: E.match,
|
151
|
+
token: this.terminals_[w] || w,
|
152
|
+
line: E.yylineno,
|
153
|
+
loc: kt,
|
154
|
+
expected: yt
|
155
|
+
});
|
156
|
+
}
|
157
|
+
if (N[0] instanceof Array && N.length > 1)
|
158
|
+
throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + w);
|
159
|
+
switch (N[0]) {
|
160
|
+
case 1:
|
161
|
+
u.push(w), A.push(E.yytext), e.push(E.yylloc), u.push(N[1]), w = null, Gt = E.yyleng, n = E.yytext, gt = E.yylineno, kt = E.yylloc;
|
162
|
+
break;
|
163
|
+
case 2:
|
164
|
+
if (X = this.productions_[N[1]][1], st.$ = A[A.length - X], st._$ = {
|
165
|
+
first_line: e[e.length - (X || 1)].first_line,
|
166
|
+
last_line: e[e.length - 1].last_line,
|
167
|
+
first_column: e[e.length - (X || 1)].first_column,
|
168
|
+
last_column: e[e.length - 1].last_column
|
169
|
+
}, qe && (st._$.range = [
|
170
|
+
e[e.length - (X || 1)].range[0],
|
171
|
+
e[e.length - 1].range[1]
|
172
|
+
]), Ft = this.performAction.apply(st, [
|
173
|
+
n,
|
174
|
+
Gt,
|
175
|
+
gt,
|
176
|
+
Y.yy,
|
177
|
+
N[1],
|
178
|
+
A,
|
179
|
+
e
|
180
|
+
].concat(Te)), typeof Ft < "u")
|
181
|
+
return Ft;
|
182
|
+
X && (u = u.slice(0, -1 * X * 2), A = A.slice(0, -1 * X), e = e.slice(0, -1 * X)), u.push(this.productions_[N[1]][0]), A.push(st.$), e.push(st._$), Jt = ht[u[u.length - 2]][u[u.length - 1]], u.push(Jt);
|
183
|
+
break;
|
184
|
+
case 3:
|
185
|
+
return !0;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
return !0;
|
189
|
+
}, "parse")
|
190
|
+
}, pe = /* @__PURE__ */ function() {
|
191
|
+
var M = {
|
192
|
+
EOF: 1,
|
193
|
+
parseError: /* @__PURE__ */ r(function(l, u) {
|
194
|
+
if (this.yy.parser)
|
195
|
+
this.yy.parser.parseError(l, u);
|
196
|
+
else
|
197
|
+
throw new Error(l);
|
198
|
+
}, "parseError"),
|
199
|
+
// resets the lexer, sets new input
|
200
|
+
setInput: /* @__PURE__ */ r(function(s, l) {
|
201
|
+
return this.yy = l || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
202
|
+
first_line: 1,
|
203
|
+
first_column: 0,
|
204
|
+
last_line: 1,
|
205
|
+
last_column: 0
|
206
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
207
|
+
}, "setInput"),
|
208
|
+
// consumes and returns one char from the input
|
209
|
+
input: /* @__PURE__ */ r(function() {
|
210
|
+
var s = this._input[0];
|
211
|
+
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
|
212
|
+
var l = s.match(/(?:\r\n?|\n).*/g);
|
213
|
+
return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
|
214
|
+
}, "input"),
|
215
|
+
// unshifts one char (or a string) into the input
|
216
|
+
unput: /* @__PURE__ */ r(function(s) {
|
217
|
+
var l = s.length, u = s.split(/(?:\r\n?|\n)/g);
|
218
|
+
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
|
219
|
+
var d = this.match.split(/(?:\r\n?|\n)/g);
|
220
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
|
221
|
+
var A = this.yylloc.range;
|
222
|
+
return this.yylloc = {
|
223
|
+
first_line: this.yylloc.first_line,
|
224
|
+
last_line: this.yylineno + 1,
|
225
|
+
first_column: this.yylloc.first_column,
|
226
|
+
last_column: u ? (u.length === d.length ? this.yylloc.first_column : 0) + d[d.length - u.length].length - u[0].length : this.yylloc.first_column - l
|
227
|
+
}, this.options.ranges && (this.yylloc.range = [A[0], A[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
|
228
|
+
}, "unput"),
|
229
|
+
// When called from action, caches matched text and appends it on next action
|
230
|
+
more: /* @__PURE__ */ r(function() {
|
231
|
+
return this._more = !0, this;
|
232
|
+
}, "more"),
|
233
|
+
// 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.
|
234
|
+
reject: /* @__PURE__ */ r(function() {
|
235
|
+
if (this.options.backtrack_lexer)
|
236
|
+
this._backtrack = !0;
|
237
|
+
else
|
238
|
+
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).
|
239
|
+
` + this.showPosition(), {
|
240
|
+
text: "",
|
241
|
+
token: null,
|
242
|
+
line: this.yylineno
|
243
|
+
});
|
244
|
+
return this;
|
245
|
+
}, "reject"),
|
246
|
+
// retain first n characters of the match
|
247
|
+
less: /* @__PURE__ */ r(function(s) {
|
248
|
+
this.unput(this.match.slice(s));
|
249
|
+
}, "less"),
|
250
|
+
// displays already matched input, i.e. for error messages
|
251
|
+
pastInput: /* @__PURE__ */ r(function() {
|
252
|
+
var s = this.matched.substr(0, this.matched.length - this.match.length);
|
253
|
+
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
|
254
|
+
}, "pastInput"),
|
255
|
+
// displays upcoming input, i.e. for error messages
|
256
|
+
upcomingInput: /* @__PURE__ */ r(function() {
|
257
|
+
var s = this.match;
|
258
|
+
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
|
259
|
+
}, "upcomingInput"),
|
260
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
261
|
+
showPosition: /* @__PURE__ */ r(function() {
|
262
|
+
var s = this.pastInput(), l = new Array(s.length + 1).join("-");
|
263
|
+
return s + this.upcomingInput() + `
|
264
|
+
` + l + "^";
|
265
|
+
}, "showPosition"),
|
266
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
267
|
+
test_match: /* @__PURE__ */ r(function(s, l) {
|
268
|
+
var u, d, A;
|
269
|
+
if (this.options.backtrack_lexer && (A = {
|
270
|
+
yylineno: this.yylineno,
|
271
|
+
yylloc: {
|
272
|
+
first_line: this.yylloc.first_line,
|
273
|
+
last_line: this.last_line,
|
274
|
+
first_column: this.yylloc.first_column,
|
275
|
+
last_column: this.yylloc.last_column
|
276
|
+
},
|
277
|
+
yytext: this.yytext,
|
278
|
+
match: this.match,
|
279
|
+
matches: this.matches,
|
280
|
+
matched: this.matched,
|
281
|
+
yyleng: this.yyleng,
|
282
|
+
offset: this.offset,
|
283
|
+
_more: this._more,
|
284
|
+
_input: this._input,
|
285
|
+
yy: this.yy,
|
286
|
+
conditionStack: this.conditionStack.slice(0),
|
287
|
+
done: this.done
|
288
|
+
}, this.options.ranges && (A.yylloc.range = this.yylloc.range.slice(0))), d = s[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
|
289
|
+
first_line: this.yylloc.last_line,
|
290
|
+
last_line: this.yylineno + 1,
|
291
|
+
first_column: this.yylloc.last_column,
|
292
|
+
last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
|
293
|
+
}, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u)
|
294
|
+
return u;
|
295
|
+
if (this._backtrack) {
|
296
|
+
for (var e in A)
|
297
|
+
this[e] = A[e];
|
298
|
+
return !1;
|
299
|
+
}
|
300
|
+
return !1;
|
301
|
+
}, "test_match"),
|
302
|
+
// return next match in input
|
303
|
+
next: /* @__PURE__ */ r(function() {
|
304
|
+
if (this.done)
|
305
|
+
return this.EOF;
|
306
|
+
this._input || (this.done = !0);
|
307
|
+
var s, l, u, d;
|
308
|
+
this._more || (this.yytext = "", this.match = "");
|
309
|
+
for (var A = this._currentRules(), e = 0; e < A.length; e++)
|
310
|
+
if (u = this._input.match(this.rules[A[e]]), u && (!l || u[0].length > l[0].length)) {
|
311
|
+
if (l = u, d = e, this.options.backtrack_lexer) {
|
312
|
+
if (s = this.test_match(u, A[e]), s !== !1)
|
313
|
+
return s;
|
314
|
+
if (this._backtrack) {
|
315
|
+
l = !1;
|
316
|
+
continue;
|
317
|
+
} else
|
318
|
+
return !1;
|
319
|
+
} else if (!this.options.flex)
|
320
|
+
break;
|
321
|
+
}
|
322
|
+
return l ? (s = this.test_match(l, A[d]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
323
|
+
` + this.showPosition(), {
|
324
|
+
text: "",
|
325
|
+
token: null,
|
326
|
+
line: this.yylineno
|
327
|
+
});
|
328
|
+
}, "next"),
|
329
|
+
// return next match that has a token
|
330
|
+
lex: /* @__PURE__ */ r(function() {
|
331
|
+
var l = this.next();
|
332
|
+
return l || this.lex();
|
333
|
+
}, "lex"),
|
334
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
335
|
+
begin: /* @__PURE__ */ r(function(l) {
|
336
|
+
this.conditionStack.push(l);
|
337
|
+
}, "begin"),
|
338
|
+
// pop the previously active lexer condition state off the condition stack
|
339
|
+
popState: /* @__PURE__ */ r(function() {
|
340
|
+
var l = this.conditionStack.length - 1;
|
341
|
+
return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
342
|
+
}, "popState"),
|
343
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
344
|
+
_currentRules: /* @__PURE__ */ r(function() {
|
345
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
346
|
+
}, "_currentRules"),
|
347
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
348
|
+
topState: /* @__PURE__ */ r(function(l) {
|
349
|
+
return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
|
350
|
+
}, "topState"),
|
351
|
+
// alias for begin(condition)
|
352
|
+
pushState: /* @__PURE__ */ r(function(l) {
|
353
|
+
this.begin(l);
|
354
|
+
}, "pushState"),
|
355
|
+
// return the number of states currently on the stack
|
356
|
+
stateStackSize: /* @__PURE__ */ r(function() {
|
357
|
+
return this.conditionStack.length;
|
358
|
+
}, "stateStackSize"),
|
359
|
+
options: { "case-insensitive": !0 },
|
360
|
+
performAction: /* @__PURE__ */ r(function(l, u, d, A) {
|
361
|
+
switch (d) {
|
362
|
+
case 0:
|
363
|
+
break;
|
364
|
+
case 1:
|
365
|
+
break;
|
366
|
+
case 2:
|
367
|
+
return 55;
|
368
|
+
case 3:
|
369
|
+
break;
|
370
|
+
case 4:
|
371
|
+
return this.begin("title"), 35;
|
372
|
+
case 5:
|
373
|
+
return this.popState(), "title_value";
|
374
|
+
case 6:
|
375
|
+
return this.begin("acc_title"), 37;
|
376
|
+
case 7:
|
377
|
+
return this.popState(), "acc_title_value";
|
378
|
+
case 8:
|
379
|
+
return this.begin("acc_descr"), 39;
|
380
|
+
case 9:
|
381
|
+
return this.popState(), "acc_descr_value";
|
382
|
+
case 10:
|
383
|
+
this.begin("acc_descr_multiline");
|
384
|
+
break;
|
385
|
+
case 11:
|
386
|
+
this.popState();
|
387
|
+
break;
|
388
|
+
case 12:
|
389
|
+
return "acc_descr_multiline_value";
|
390
|
+
case 13:
|
391
|
+
return 48;
|
392
|
+
case 14:
|
393
|
+
return 50;
|
394
|
+
case 15:
|
395
|
+
return 49;
|
396
|
+
case 16:
|
397
|
+
return 51;
|
398
|
+
case 17:
|
399
|
+
return 52;
|
400
|
+
case 18:
|
401
|
+
return 53;
|
402
|
+
case 19:
|
403
|
+
return 54;
|
404
|
+
case 20:
|
405
|
+
return 25;
|
406
|
+
case 21:
|
407
|
+
this.begin("md_string");
|
408
|
+
break;
|
409
|
+
case 22:
|
410
|
+
return "MD_STR";
|
411
|
+
case 23:
|
412
|
+
this.popState();
|
413
|
+
break;
|
414
|
+
case 24:
|
415
|
+
this.begin("string");
|
416
|
+
break;
|
417
|
+
case 25:
|
418
|
+
this.popState();
|
419
|
+
break;
|
420
|
+
case 26:
|
421
|
+
return "STR";
|
422
|
+
case 27:
|
423
|
+
this.begin("class_name");
|
424
|
+
break;
|
425
|
+
case 28:
|
426
|
+
return this.popState(), 47;
|
427
|
+
case 29:
|
428
|
+
return this.begin("point_start"), 44;
|
429
|
+
case 30:
|
430
|
+
return this.begin("point_x"), 45;
|
431
|
+
case 31:
|
432
|
+
this.popState();
|
433
|
+
break;
|
434
|
+
case 32:
|
435
|
+
this.popState(), this.begin("point_y");
|
436
|
+
break;
|
437
|
+
case 33:
|
438
|
+
return this.popState(), 46;
|
439
|
+
case 34:
|
440
|
+
return 28;
|
441
|
+
case 35:
|
442
|
+
return 4;
|
443
|
+
case 36:
|
444
|
+
return 11;
|
445
|
+
case 37:
|
446
|
+
return 64;
|
447
|
+
case 38:
|
448
|
+
return 10;
|
449
|
+
case 39:
|
450
|
+
return 65;
|
451
|
+
case 40:
|
452
|
+
return 65;
|
453
|
+
case 41:
|
454
|
+
return 14;
|
455
|
+
case 42:
|
456
|
+
return 13;
|
457
|
+
case 43:
|
458
|
+
return 67;
|
459
|
+
case 44:
|
460
|
+
return 66;
|
461
|
+
case 45:
|
462
|
+
return 12;
|
463
|
+
case 46:
|
464
|
+
return 8;
|
465
|
+
case 47:
|
466
|
+
return 5;
|
467
|
+
case 48:
|
468
|
+
return 18;
|
469
|
+
case 49:
|
470
|
+
return 56;
|
471
|
+
case 50:
|
472
|
+
return 63;
|
473
|
+
case 51:
|
474
|
+
return 57;
|
475
|
+
}
|
476
|
+
}, "anonymous"),
|
477
|
+
rules: [/^(?:%%(?!\{)[^\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, /^(?:classDef\b)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?::::)/i, /^(?:^\w+)/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],
|
478
|
+
conditions: { class_name: { rules: [28], inclusive: !1 }, point_y: { rules: [33], inclusive: !1 }, point_x: { rules: [32], inclusive: !1 }, point_start: { rules: [30, 31], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, title: { rules: [5], inclusive: !1 }, md_string: { rules: [22, 23], inclusive: !1 }, string: { rules: [25, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 29, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], inclusive: !0 } }
|
479
|
+
};
|
480
|
+
return M;
|
481
|
+
}();
|
482
|
+
_t.lexer = pe;
|
483
|
+
function ft() {
|
484
|
+
this.yy = {};
|
485
|
+
}
|
486
|
+
return r(ft, "Parser"), ft.prototype = _t, _t.Parser = ft, new ft();
|
487
|
+
}();
|
488
|
+
Ct.parser = Ct;
|
489
|
+
var Le = Ct, V = be(), Ee = class {
|
490
|
+
constructor() {
|
491
|
+
this.classes = /* @__PURE__ */ new Map(), this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
|
492
|
+
}
|
493
|
+
static {
|
494
|
+
r(this, "QuadrantBuilder");
|
495
|
+
}
|
496
|
+
getDefaultData() {
|
497
|
+
return {
|
498
|
+
titleText: "",
|
499
|
+
quadrant1Text: "",
|
500
|
+
quadrant2Text: "",
|
501
|
+
quadrant3Text: "",
|
502
|
+
quadrant4Text: "",
|
503
|
+
xAxisLeftText: "",
|
504
|
+
xAxisRightText: "",
|
505
|
+
yAxisBottomText: "",
|
506
|
+
yAxisTopText: "",
|
507
|
+
points: []
|
508
|
+
};
|
509
|
+
}
|
510
|
+
getDefaultConfig() {
|
511
|
+
return {
|
512
|
+
showXAxis: !0,
|
513
|
+
showYAxis: !0,
|
514
|
+
showTitle: !0,
|
515
|
+
chartHeight: D.quadrantChart?.chartWidth || 500,
|
516
|
+
chartWidth: D.quadrantChart?.chartHeight || 500,
|
517
|
+
titlePadding: D.quadrantChart?.titlePadding || 10,
|
518
|
+
titleFontSize: D.quadrantChart?.titleFontSize || 20,
|
519
|
+
quadrantPadding: D.quadrantChart?.quadrantPadding || 5,
|
520
|
+
xAxisLabelPadding: D.quadrantChart?.xAxisLabelPadding || 5,
|
521
|
+
yAxisLabelPadding: D.quadrantChart?.yAxisLabelPadding || 5,
|
522
|
+
xAxisLabelFontSize: D.quadrantChart?.xAxisLabelFontSize || 16,
|
523
|
+
yAxisLabelFontSize: D.quadrantChart?.yAxisLabelFontSize || 16,
|
524
|
+
quadrantLabelFontSize: D.quadrantChart?.quadrantLabelFontSize || 16,
|
525
|
+
quadrantTextTopPadding: D.quadrantChart?.quadrantTextTopPadding || 5,
|
526
|
+
pointTextPadding: D.quadrantChart?.pointTextPadding || 5,
|
527
|
+
pointLabelFontSize: D.quadrantChart?.pointLabelFontSize || 12,
|
528
|
+
pointRadius: D.quadrantChart?.pointRadius || 5,
|
529
|
+
xAxisPosition: D.quadrantChart?.xAxisPosition || "top",
|
530
|
+
yAxisPosition: D.quadrantChart?.yAxisPosition || "left",
|
531
|
+
quadrantInternalBorderStrokeWidth: D.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,
|
532
|
+
quadrantExternalBorderStrokeWidth: D.quadrantChart?.quadrantExternalBorderStrokeWidth || 2
|
533
|
+
};
|
534
|
+
}
|
535
|
+
getDefaultThemeConfig() {
|
536
|
+
return {
|
537
|
+
quadrant1Fill: V.quadrant1Fill,
|
538
|
+
quadrant2Fill: V.quadrant2Fill,
|
539
|
+
quadrant3Fill: V.quadrant3Fill,
|
540
|
+
quadrant4Fill: V.quadrant4Fill,
|
541
|
+
quadrant1TextFill: V.quadrant1TextFill,
|
542
|
+
quadrant2TextFill: V.quadrant2TextFill,
|
543
|
+
quadrant3TextFill: V.quadrant3TextFill,
|
544
|
+
quadrant4TextFill: V.quadrant4TextFill,
|
545
|
+
quadrantPointFill: V.quadrantPointFill,
|
546
|
+
quadrantPointTextFill: V.quadrantPointTextFill,
|
547
|
+
quadrantXAxisTextFill: V.quadrantXAxisTextFill,
|
548
|
+
quadrantYAxisTextFill: V.quadrantYAxisTextFill,
|
549
|
+
quadrantTitleFill: V.quadrantTitleFill,
|
550
|
+
quadrantInternalBorderStrokeFill: V.quadrantInternalBorderStrokeFill,
|
551
|
+
quadrantExternalBorderStrokeFill: V.quadrantExternalBorderStrokeFill
|
552
|
+
};
|
553
|
+
}
|
554
|
+
clear() {
|
555
|
+
this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), this.classes = /* @__PURE__ */ new Map(), qt.info("clear called");
|
556
|
+
}
|
557
|
+
setData(t) {
|
558
|
+
this.data = { ...this.data, ...t };
|
559
|
+
}
|
560
|
+
addPoints(t) {
|
561
|
+
this.data.points = [...t, ...this.data.points];
|
562
|
+
}
|
563
|
+
addClass(t, a) {
|
564
|
+
this.classes.set(t, a);
|
565
|
+
}
|
566
|
+
setConfig(t) {
|
567
|
+
qt.trace("setConfig called with: ", t), this.config = { ...this.config, ...t };
|
568
|
+
}
|
569
|
+
setThemeConfig(t) {
|
570
|
+
qt.trace("setThemeConfig called with: ", t), this.themeConfig = { ...this.themeConfig, ...t };
|
571
|
+
}
|
572
|
+
calculateSpace(t, a, p, f) {
|
573
|
+
const o = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, x = {
|
574
|
+
top: t === "top" && a ? o : 0,
|
575
|
+
bottom: t === "bottom" && a ? o : 0
|
576
|
+
}, _ = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, h = {
|
577
|
+
left: this.config.yAxisPosition === "left" && p ? _ : 0,
|
578
|
+
right: this.config.yAxisPosition === "right" && p ? _ : 0
|
579
|
+
}, c = this.config.titleFontSize + this.config.titlePadding * 2, S = {
|
580
|
+
top: f ? c : 0
|
581
|
+
}, m = this.config.quadrantPadding + h.left, b = this.config.quadrantPadding + x.top + S.top, y = this.config.chartWidth - this.config.quadrantPadding * 2 - h.left - h.right, T = this.config.chartHeight - this.config.quadrantPadding * 2 - x.top - x.bottom - S.top, q = y / 2, g = T / 2;
|
582
|
+
return {
|
583
|
+
xAxisSpace: x,
|
584
|
+
yAxisSpace: h,
|
585
|
+
titleSpace: S,
|
586
|
+
quadrantSpace: {
|
587
|
+
quadrantLeft: m,
|
588
|
+
quadrantTop: b,
|
589
|
+
quadrantWidth: y,
|
590
|
+
quadrantHalfWidth: q,
|
591
|
+
quadrantHeight: T,
|
592
|
+
quadrantHalfHeight: g
|
593
|
+
}
|
594
|
+
};
|
595
|
+
}
|
596
|
+
getAxisLabels(t, a, p, f) {
|
597
|
+
const { quadrantSpace: o, titleSpace: x } = f, {
|
598
|
+
quadrantHalfHeight: _,
|
599
|
+
quadrantHeight: h,
|
600
|
+
quadrantLeft: c,
|
601
|
+
quadrantHalfWidth: S,
|
602
|
+
quadrantTop: m,
|
603
|
+
quadrantWidth: b
|
604
|
+
} = o, y = !!this.data.xAxisRightText, T = !!this.data.yAxisTopText, q = [];
|
605
|
+
return this.data.xAxisLeftText && a && q.push({
|
606
|
+
text: this.data.xAxisLeftText,
|
607
|
+
fill: this.themeConfig.quadrantXAxisTextFill,
|
608
|
+
x: c + (y ? S / 2 : 0),
|
609
|
+
y: t === "top" ? this.config.xAxisLabelPadding + x.top : this.config.xAxisLabelPadding + m + h + this.config.quadrantPadding,
|
610
|
+
fontSize: this.config.xAxisLabelFontSize,
|
611
|
+
verticalPos: y ? "center" : "left",
|
612
|
+
horizontalPos: "top",
|
613
|
+
rotation: 0
|
614
|
+
}), this.data.xAxisRightText && a && q.push({
|
615
|
+
text: this.data.xAxisRightText,
|
616
|
+
fill: this.themeConfig.quadrantXAxisTextFill,
|
617
|
+
x: c + S + (y ? S / 2 : 0),
|
618
|
+
y: t === "top" ? this.config.xAxisLabelPadding + x.top : this.config.xAxisLabelPadding + m + h + this.config.quadrantPadding,
|
619
|
+
fontSize: this.config.xAxisLabelFontSize,
|
620
|
+
verticalPos: y ? "center" : "left",
|
621
|
+
horizontalPos: "top",
|
622
|
+
rotation: 0
|
623
|
+
}), this.data.yAxisBottomText && p && q.push({
|
624
|
+
text: this.data.yAxisBottomText,
|
625
|
+
fill: this.themeConfig.quadrantYAxisTextFill,
|
626
|
+
x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + c + b + this.config.quadrantPadding,
|
627
|
+
y: m + h - (T ? _ / 2 : 0),
|
628
|
+
fontSize: this.config.yAxisLabelFontSize,
|
629
|
+
verticalPos: T ? "center" : "left",
|
630
|
+
horizontalPos: "top",
|
631
|
+
rotation: -90
|
632
|
+
}), this.data.yAxisTopText && p && q.push({
|
633
|
+
text: this.data.yAxisTopText,
|
634
|
+
fill: this.themeConfig.quadrantYAxisTextFill,
|
635
|
+
x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + c + b + this.config.quadrantPadding,
|
636
|
+
y: m + _ - (T ? _ / 2 : 0),
|
637
|
+
fontSize: this.config.yAxisLabelFontSize,
|
638
|
+
verticalPos: T ? "center" : "left",
|
639
|
+
horizontalPos: "top",
|
640
|
+
rotation: -90
|
641
|
+
}), q;
|
642
|
+
}
|
643
|
+
getQuadrants(t) {
|
644
|
+
const { quadrantSpace: a } = t, { quadrantHalfHeight: p, quadrantLeft: f, quadrantHalfWidth: o, quadrantTop: x } = a, _ = [
|
645
|
+
{
|
646
|
+
text: {
|
647
|
+
text: this.data.quadrant1Text,
|
648
|
+
fill: this.themeConfig.quadrant1TextFill,
|
649
|
+
x: 0,
|
650
|
+
y: 0,
|
651
|
+
fontSize: this.config.quadrantLabelFontSize,
|
652
|
+
verticalPos: "center",
|
653
|
+
horizontalPos: "middle",
|
654
|
+
rotation: 0
|
655
|
+
},
|
656
|
+
x: f + o,
|
657
|
+
y: x,
|
658
|
+
width: o,
|
659
|
+
height: p,
|
660
|
+
fill: this.themeConfig.quadrant1Fill
|
661
|
+
},
|
662
|
+
{
|
663
|
+
text: {
|
664
|
+
text: this.data.quadrant2Text,
|
665
|
+
fill: this.themeConfig.quadrant2TextFill,
|
666
|
+
x: 0,
|
667
|
+
y: 0,
|
668
|
+
fontSize: this.config.quadrantLabelFontSize,
|
669
|
+
verticalPos: "center",
|
670
|
+
horizontalPos: "middle",
|
671
|
+
rotation: 0
|
672
|
+
},
|
673
|
+
x: f,
|
674
|
+
y: x,
|
675
|
+
width: o,
|
676
|
+
height: p,
|
677
|
+
fill: this.themeConfig.quadrant2Fill
|
678
|
+
},
|
679
|
+
{
|
680
|
+
text: {
|
681
|
+
text: this.data.quadrant3Text,
|
682
|
+
fill: this.themeConfig.quadrant3TextFill,
|
683
|
+
x: 0,
|
684
|
+
y: 0,
|
685
|
+
fontSize: this.config.quadrantLabelFontSize,
|
686
|
+
verticalPos: "center",
|
687
|
+
horizontalPos: "middle",
|
688
|
+
rotation: 0
|
689
|
+
},
|
690
|
+
x: f,
|
691
|
+
y: x + p,
|
692
|
+
width: o,
|
693
|
+
height: p,
|
694
|
+
fill: this.themeConfig.quadrant3Fill
|
695
|
+
},
|
696
|
+
{
|
697
|
+
text: {
|
698
|
+
text: this.data.quadrant4Text,
|
699
|
+
fill: this.themeConfig.quadrant4TextFill,
|
700
|
+
x: 0,
|
701
|
+
y: 0,
|
702
|
+
fontSize: this.config.quadrantLabelFontSize,
|
703
|
+
verticalPos: "center",
|
704
|
+
horizontalPos: "middle",
|
705
|
+
rotation: 0
|
706
|
+
},
|
707
|
+
x: f + o,
|
708
|
+
y: x + p,
|
709
|
+
width: o,
|
710
|
+
height: p,
|
711
|
+
fill: this.themeConfig.quadrant4Fill
|
712
|
+
}
|
713
|
+
];
|
714
|
+
for (const h of _)
|
715
|
+
h.text.x = h.x + h.width / 2, this.data.points.length === 0 ? (h.text.y = h.y + h.height / 2, h.text.horizontalPos = "middle") : (h.text.y = h.y + this.config.quadrantTextTopPadding, h.text.horizontalPos = "top");
|
716
|
+
return _;
|
717
|
+
}
|
718
|
+
getQuadrantPoints(t) {
|
719
|
+
const { quadrantSpace: a } = t, { quadrantHeight: p, quadrantLeft: f, quadrantTop: o, quadrantWidth: x } = a, _ = $t().domain([0, 1]).range([f, x + f]), h = $t().domain([0, 1]).range([p + o, o]);
|
720
|
+
return this.data.points.map((S) => {
|
721
|
+
const m = this.classes.get(S.className);
|
722
|
+
return m && (S = { ...m, ...S }), {
|
723
|
+
x: _(S.x),
|
724
|
+
y: h(S.y),
|
725
|
+
fill: S.color ?? this.themeConfig.quadrantPointFill,
|
726
|
+
radius: S.radius ?? this.config.pointRadius,
|
727
|
+
text: {
|
728
|
+
text: S.text,
|
729
|
+
fill: this.themeConfig.quadrantPointTextFill,
|
730
|
+
x: _(S.x),
|
731
|
+
y: h(S.y) + this.config.pointTextPadding,
|
732
|
+
verticalPos: "center",
|
733
|
+
horizontalPos: "top",
|
734
|
+
fontSize: this.config.pointLabelFontSize,
|
735
|
+
rotation: 0
|
736
|
+
},
|
737
|
+
strokeColor: S.strokeColor ?? this.themeConfig.quadrantPointFill,
|
738
|
+
strokeWidth: S.strokeWidth ?? "0px"
|
739
|
+
};
|
740
|
+
});
|
741
|
+
}
|
742
|
+
getBorders(t) {
|
743
|
+
const a = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: p } = t, {
|
744
|
+
quadrantHalfHeight: f,
|
745
|
+
quadrantHeight: o,
|
746
|
+
quadrantLeft: x,
|
747
|
+
quadrantHalfWidth: _,
|
748
|
+
quadrantTop: h,
|
749
|
+
quadrantWidth: c
|
750
|
+
} = p;
|
751
|
+
return [
|
752
|
+
// top border
|
753
|
+
{
|
754
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
755
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
756
|
+
x1: x - a,
|
757
|
+
y1: h,
|
758
|
+
x2: x + c + a,
|
759
|
+
y2: h
|
760
|
+
},
|
761
|
+
// right border
|
762
|
+
{
|
763
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
764
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
765
|
+
x1: x + c,
|
766
|
+
y1: h + a,
|
767
|
+
x2: x + c,
|
768
|
+
y2: h + o - a
|
769
|
+
},
|
770
|
+
// bottom border
|
771
|
+
{
|
772
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
773
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
774
|
+
x1: x - a,
|
775
|
+
y1: h + o,
|
776
|
+
x2: x + c + a,
|
777
|
+
y2: h + o
|
778
|
+
},
|
779
|
+
// left border
|
780
|
+
{
|
781
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
782
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
783
|
+
x1: x,
|
784
|
+
y1: h + a,
|
785
|
+
x2: x,
|
786
|
+
y2: h + o - a
|
787
|
+
},
|
788
|
+
// vertical inner border
|
789
|
+
{
|
790
|
+
strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
|
791
|
+
strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
|
792
|
+
x1: x + _,
|
793
|
+
y1: h + a,
|
794
|
+
x2: x + _,
|
795
|
+
y2: h + o - a
|
796
|
+
},
|
797
|
+
// horizontal inner border
|
798
|
+
{
|
799
|
+
strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
|
800
|
+
strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
|
801
|
+
x1: x + a,
|
802
|
+
y1: h + f,
|
803
|
+
x2: x + c - a,
|
804
|
+
y2: h + f
|
805
|
+
}
|
806
|
+
];
|
807
|
+
}
|
808
|
+
getTitle(t) {
|
809
|
+
if (t)
|
810
|
+
return {
|
811
|
+
text: this.data.titleText,
|
812
|
+
fill: this.themeConfig.quadrantTitleFill,
|
813
|
+
fontSize: this.config.titleFontSize,
|
814
|
+
horizontalPos: "top",
|
815
|
+
verticalPos: "center",
|
816
|
+
rotation: 0,
|
817
|
+
y: this.config.titlePadding,
|
818
|
+
x: this.config.chartWidth / 2
|
819
|
+
};
|
820
|
+
}
|
821
|
+
build() {
|
822
|
+
const t = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), a = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), p = this.config.showTitle && !!this.data.titleText, f = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, o = this.calculateSpace(f, t, a, p);
|
823
|
+
return {
|
824
|
+
points: this.getQuadrantPoints(o),
|
825
|
+
quadrants: this.getQuadrants(o),
|
826
|
+
axisLabels: this.getAxisLabels(f, t, a, o),
|
827
|
+
borderLines: this.getBorders(o),
|
828
|
+
title: this.getTitle(p)
|
829
|
+
};
|
830
|
+
}
|
831
|
+
}, Tt = class extends Error {
|
832
|
+
static {
|
833
|
+
r(this, "InvalidStyleError");
|
834
|
+
}
|
835
|
+
constructor(t, a, p) {
|
836
|
+
super(`value for ${t} ${a} is invalid, please use a valid ${p}`), this.name = "InvalidStyleError";
|
837
|
+
}
|
838
|
+
};
|
839
|
+
function Lt(t) {
|
840
|
+
return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);
|
841
|
+
}
|
842
|
+
r(Lt, "validateHexCode");
|
843
|
+
function ee(t) {
|
844
|
+
return !/^\d+$/.test(t);
|
845
|
+
}
|
846
|
+
r(ee, "validateNumber");
|
847
|
+
function ie(t) {
|
848
|
+
return !/^\d+px$/.test(t);
|
849
|
+
}
|
850
|
+
r(ie, "validateSizeInPixels");
|
851
|
+
var De = Et();
|
852
|
+
function Q(t) {
|
853
|
+
return Se(t.trim(), De);
|
854
|
+
}
|
855
|
+
r(Q, "textSanitizer");
|
856
|
+
var z = new Ee();
|
857
|
+
function ae(t) {
|
858
|
+
z.setData({ quadrant1Text: Q(t.text) });
|
859
|
+
}
|
860
|
+
r(ae, "setQuadrant1Text");
|
861
|
+
function ne(t) {
|
862
|
+
z.setData({ quadrant2Text: Q(t.text) });
|
863
|
+
}
|
864
|
+
r(ne, "setQuadrant2Text");
|
865
|
+
function se(t) {
|
866
|
+
z.setData({ quadrant3Text: Q(t.text) });
|
867
|
+
}
|
868
|
+
r(se, "setQuadrant3Text");
|
869
|
+
function re(t) {
|
870
|
+
z.setData({ quadrant4Text: Q(t.text) });
|
871
|
+
}
|
872
|
+
r(re, "setQuadrant4Text");
|
873
|
+
function oe(t) {
|
874
|
+
z.setData({ xAxisLeftText: Q(t.text) });
|
875
|
+
}
|
876
|
+
r(oe, "setXAxisLeftText");
|
877
|
+
function le(t) {
|
878
|
+
z.setData({ xAxisRightText: Q(t.text) });
|
879
|
+
}
|
880
|
+
r(le, "setXAxisRightText");
|
881
|
+
function he(t) {
|
882
|
+
z.setData({ yAxisTopText: Q(t.text) });
|
883
|
+
}
|
884
|
+
r(he, "setYAxisTopText");
|
885
|
+
function ce(t) {
|
886
|
+
z.setData({ yAxisBottomText: Q(t.text) });
|
887
|
+
}
|
888
|
+
r(ce, "setYAxisBottomText");
|
889
|
+
function mt(t) {
|
890
|
+
const a = {};
|
891
|
+
for (const p of t) {
|
892
|
+
const [f, o] = p.trim().split(/\s*:\s*/);
|
893
|
+
if (f === "radius") {
|
894
|
+
if (ee(o))
|
895
|
+
throw new Tt(f, o, "number");
|
896
|
+
a.radius = parseInt(o);
|
897
|
+
} else if (f === "color") {
|
898
|
+
if (Lt(o))
|
899
|
+
throw new Tt(f, o, "hex code");
|
900
|
+
a.color = o;
|
901
|
+
} else if (f === "stroke-color") {
|
902
|
+
if (Lt(o))
|
903
|
+
throw new Tt(f, o, "hex code");
|
904
|
+
a.strokeColor = o;
|
905
|
+
} else if (f === "stroke-width") {
|
906
|
+
if (ie(o))
|
907
|
+
throw new Tt(f, o, "number of pixels (eg. 10px)");
|
908
|
+
a.strokeWidth = o;
|
909
|
+
} else
|
910
|
+
throw new Error(`style named ${f} is not supported.`);
|
911
|
+
}
|
912
|
+
return a;
|
913
|
+
}
|
914
|
+
r(mt, "parseStyles");
|
915
|
+
function de(t, a, p, f, o) {
|
916
|
+
const x = mt(o);
|
917
|
+
z.addPoints([
|
918
|
+
{
|
919
|
+
x: p,
|
920
|
+
y: f,
|
921
|
+
text: Q(t.text),
|
922
|
+
className: a,
|
923
|
+
...x
|
924
|
+
}
|
925
|
+
]);
|
926
|
+
}
|
927
|
+
r(de, "addPoint");
|
928
|
+
function ue(t, a) {
|
929
|
+
z.addClass(t, mt(a));
|
930
|
+
}
|
931
|
+
r(ue, "addClass");
|
932
|
+
function xe(t) {
|
933
|
+
z.setConfig({ chartWidth: t });
|
934
|
+
}
|
935
|
+
r(xe, "setWidth");
|
936
|
+
function fe(t) {
|
937
|
+
z.setConfig({ chartHeight: t });
|
938
|
+
}
|
939
|
+
r(fe, "setHeight");
|
940
|
+
function ge() {
|
941
|
+
const t = Et(), { themeVariables: a, quadrantChart: p } = t;
|
942
|
+
return p && z.setConfig(p), z.setThemeConfig({
|
943
|
+
quadrant1Fill: a.quadrant1Fill,
|
944
|
+
quadrant2Fill: a.quadrant2Fill,
|
945
|
+
quadrant3Fill: a.quadrant3Fill,
|
946
|
+
quadrant4Fill: a.quadrant4Fill,
|
947
|
+
quadrant1TextFill: a.quadrant1TextFill,
|
948
|
+
quadrant2TextFill: a.quadrant2TextFill,
|
949
|
+
quadrant3TextFill: a.quadrant3TextFill,
|
950
|
+
quadrant4TextFill: a.quadrant4TextFill,
|
951
|
+
quadrantPointFill: a.quadrantPointFill,
|
952
|
+
quadrantPointTextFill: a.quadrantPointTextFill,
|
953
|
+
quadrantXAxisTextFill: a.quadrantXAxisTextFill,
|
954
|
+
quadrantYAxisTextFill: a.quadrantYAxisTextFill,
|
955
|
+
quadrantExternalBorderStrokeFill: a.quadrantExternalBorderStrokeFill,
|
956
|
+
quadrantInternalBorderStrokeFill: a.quadrantInternalBorderStrokeFill,
|
957
|
+
quadrantTitleFill: a.quadrantTitleFill
|
958
|
+
}), z.setData({ titleText: te() }), z.build();
|
959
|
+
}
|
960
|
+
r(ge, "getQuadrantData");
|
961
|
+
var ze = /* @__PURE__ */ r(function() {
|
962
|
+
z.clear(), ve();
|
963
|
+
}, "clear"), Ve = {
|
964
|
+
setWidth: xe,
|
965
|
+
setHeight: fe,
|
966
|
+
setQuadrant1Text: ae,
|
967
|
+
setQuadrant2Text: ne,
|
968
|
+
setQuadrant3Text: se,
|
969
|
+
setQuadrant4Text: re,
|
970
|
+
setXAxisLeftText: oe,
|
971
|
+
setXAxisRightText: le,
|
972
|
+
setYAxisTopText: he,
|
973
|
+
setYAxisBottomText: ce,
|
974
|
+
parseStyles: mt,
|
975
|
+
addPoint: de,
|
976
|
+
addClass: ue,
|
977
|
+
getQuadrantData: ge,
|
978
|
+
clear: ze,
|
979
|
+
setAccTitle: _e,
|
980
|
+
getAccTitle: Ae,
|
981
|
+
setDiagramTitle: ke,
|
982
|
+
getDiagramTitle: te,
|
983
|
+
getAccDescription: Fe,
|
984
|
+
setAccDescription: Pe
|
985
|
+
}, Ie = /* @__PURE__ */ r((t, a, p, f) => {
|
986
|
+
function o(i) {
|
987
|
+
return i === "top" ? "hanging" : "middle";
|
988
|
+
}
|
989
|
+
r(o, "getDominantBaseLine");
|
990
|
+
function x(i) {
|
991
|
+
return i === "left" ? "start" : "middle";
|
992
|
+
}
|
993
|
+
r(x, "getTextAnchor");
|
994
|
+
function _(i) {
|
995
|
+
return `translate(${i.x}, ${i.y}) rotate(${i.rotation || 0})`;
|
996
|
+
}
|
997
|
+
r(_, "getTransformation");
|
998
|
+
const h = Et();
|
999
|
+
qt.debug(`Rendering quadrant chart
|
1000
|
+
` + t);
|
1001
|
+
const c = h.securityLevel;
|
1002
|
+
let S;
|
1003
|
+
c === "sandbox" && (S = vt("#i" + a));
|
1004
|
+
const b = (c === "sandbox" ? vt(S.nodes()[0].contentDocument.body) : vt("body")).select(`[id="${a}"]`), y = b.append("g").attr("class", "main"), T = h.quadrantChart?.chartWidth ?? 500, q = h.quadrantChart?.chartHeight ?? 500;
|
1005
|
+
Ce(b, q, T, h.quadrantChart?.useMaxWidth ?? !0), b.attr("viewBox", "0 0 " + T + " " + q), f.db.setHeight(q), f.db.setWidth(T);
|
1006
|
+
const g = f.db.getQuadrantData(), rt = y.append("g").attr("class", "quadrants"), ct = y.append("g").attr("class", "border"), dt = y.append("g").attr("class", "data-points"), ut = y.append("g").attr("class", "labels"), xt = y.append("g").attr("class", "title");
|
1007
|
+
g.title && xt.append("text").attr("x", 0).attr("y", 0).attr("fill", g.title.fill).attr("font-size", g.title.fontSize).attr("dominant-baseline", o(g.title.horizontalPos)).attr("text-anchor", x(g.title.verticalPos)).attr("transform", _(g.title)).text(g.title.text), g.borderLines && ct.selectAll("line").data(g.borderLines).enter().append("line").attr("x1", (i) => i.x1).attr("y1", (i) => i.y1).attr("x2", (i) => i.x2).attr("y2", (i) => i.y2).style("stroke", (i) => i.strokeFill).style("stroke-width", (i) => i.strokeWidth);
|
1008
|
+
const ot = rt.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class", "quadrant");
|
1009
|
+
ot.append("rect").attr("x", (i) => i.x).attr("y", (i) => i.y).attr("width", (i) => i.width).attr("height", (i) => i.height).attr("fill", (i) => i.fill), ot.append("text").attr("x", 0).attr("y", 0).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
|
1010
|
+
"dominant-baseline",
|
1011
|
+
(i) => o(i.text.horizontalPos)
|
1012
|
+
).attr("text-anchor", (i) => x(i.text.verticalPos)).attr("transform", (i) => _(i.text)).text((i) => i.text.text), ut.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((i) => i.text).attr("fill", (i) => i.fill).attr("font-size", (i) => i.fontSize).attr("dominant-baseline", (i) => o(i.horizontalPos)).attr("text-anchor", (i) => x(i.verticalPos)).attr("transform", (i) => _(i));
|
1013
|
+
const lt = dt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class", "data-point");
|
1014
|
+
lt.append("circle").attr("cx", (i) => i.x).attr("cy", (i) => i.y).attr("r", (i) => i.radius).attr("fill", (i) => i.fill).attr("stroke", (i) => i.strokeColor).attr("stroke-width", (i) => i.strokeWidth), lt.append("text").attr("x", 0).attr("y", 0).text((i) => i.text.text).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
|
1015
|
+
"dominant-baseline",
|
1016
|
+
(i) => o(i.text.horizontalPos)
|
1017
|
+
).attr("text-anchor", (i) => x(i.text.verticalPos)).attr("transform", (i) => _(i.text));
|
1018
|
+
}, "draw"), we = {
|
1019
|
+
draw: Ie
|
1020
|
+
}, Ne = {
|
1021
|
+
parser: Le,
|
1022
|
+
db: Ve,
|
1023
|
+
renderer: we,
|
1024
|
+
styles: /* @__PURE__ */ r(() => "", "styles")
|
1025
|
+
};
|
1026
|
+
export {
|
1027
|
+
Ne as diagram
|
1028
|
+
};
|