@omg-dev/app 0.5.0 → 0.6.1
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.
- package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
- package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
- package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -0,0 +1,859 @@
|
|
|
1
|
+
import { o as kt, p as mt, s as xt, g as _t, b as vt, a as bt, _ as y, c as ot, b8 as St, d as G, ad as wt, q as Lt, k as Et } from "./index-B0neMIbR.js";
|
|
2
|
+
import { o as At } from "./ordinal-DfAQgscy.js";
|
|
3
|
+
function Tt(t) {
|
|
4
|
+
for (var i = t.length / 6 | 0, s = new Array(i), l = 0; l < i; ) s[l] = "#" + t.slice(l * 6, ++l * 6);
|
|
5
|
+
return s;
|
|
6
|
+
}
|
|
7
|
+
const Mt = Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
|
|
8
|
+
function at(t, i) {
|
|
9
|
+
let s;
|
|
10
|
+
if (i === void 0)
|
|
11
|
+
for (const l of t)
|
|
12
|
+
l != null && (s < l || s === void 0 && l >= l) && (s = l);
|
|
13
|
+
else {
|
|
14
|
+
let l = -1;
|
|
15
|
+
for (let u of t)
|
|
16
|
+
(u = i(u, ++l, t)) != null && (s < u || s === void 0 && u >= u) && (s = u);
|
|
17
|
+
}
|
|
18
|
+
return s;
|
|
19
|
+
}
|
|
20
|
+
function dt(t, i) {
|
|
21
|
+
let s;
|
|
22
|
+
if (i === void 0)
|
|
23
|
+
for (const l of t)
|
|
24
|
+
l != null && (s > l || s === void 0 && l >= l) && (s = l);
|
|
25
|
+
else {
|
|
26
|
+
let l = -1;
|
|
27
|
+
for (let u of t)
|
|
28
|
+
(u = i(u, ++l, t)) != null && (s > u || s === void 0 && u >= u) && (s = u);
|
|
29
|
+
}
|
|
30
|
+
return s;
|
|
31
|
+
}
|
|
32
|
+
function J(t, i) {
|
|
33
|
+
let s = 0;
|
|
34
|
+
if (i === void 0)
|
|
35
|
+
for (let l of t)
|
|
36
|
+
(l = +l) && (s += l);
|
|
37
|
+
else {
|
|
38
|
+
let l = -1;
|
|
39
|
+
for (let u of t)
|
|
40
|
+
(u = +i(u, ++l, t)) && (s += u);
|
|
41
|
+
}
|
|
42
|
+
return s;
|
|
43
|
+
}
|
|
44
|
+
function Nt(t) {
|
|
45
|
+
return t.target.depth;
|
|
46
|
+
}
|
|
47
|
+
function Ct(t) {
|
|
48
|
+
return t.depth;
|
|
49
|
+
}
|
|
50
|
+
function Pt(t, i) {
|
|
51
|
+
return i - 1 - t.height;
|
|
52
|
+
}
|
|
53
|
+
function gt(t, i) {
|
|
54
|
+
return t.sourceLinks.length ? t.depth : i - 1;
|
|
55
|
+
}
|
|
56
|
+
function It(t) {
|
|
57
|
+
return t.targetLinks.length ? t.depth : t.sourceLinks.length ? dt(t.sourceLinks, Nt) - 1 : 0;
|
|
58
|
+
}
|
|
59
|
+
function Y(t) {
|
|
60
|
+
return function() {
|
|
61
|
+
return t;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function lt(t, i) {
|
|
65
|
+
return q(t.source, i.source) || t.index - i.index;
|
|
66
|
+
}
|
|
67
|
+
function ct(t, i) {
|
|
68
|
+
return q(t.target, i.target) || t.index - i.index;
|
|
69
|
+
}
|
|
70
|
+
function q(t, i) {
|
|
71
|
+
return t.y0 - i.y0;
|
|
72
|
+
}
|
|
73
|
+
function tt(t) {
|
|
74
|
+
return t.value;
|
|
75
|
+
}
|
|
76
|
+
function Ot(t) {
|
|
77
|
+
return t.index;
|
|
78
|
+
}
|
|
79
|
+
function $t(t) {
|
|
80
|
+
return t.nodes;
|
|
81
|
+
}
|
|
82
|
+
function Dt(t) {
|
|
83
|
+
return t.links;
|
|
84
|
+
}
|
|
85
|
+
function ut(t, i) {
|
|
86
|
+
const s = t.get(i);
|
|
87
|
+
if (!s) throw new Error("missing: " + i);
|
|
88
|
+
return s;
|
|
89
|
+
}
|
|
90
|
+
function ht({ nodes: t }) {
|
|
91
|
+
for (const i of t) {
|
|
92
|
+
let s = i.y0, l = s;
|
|
93
|
+
for (const u of i.sourceLinks)
|
|
94
|
+
u.y0 = s + u.width / 2, s += u.width;
|
|
95
|
+
for (const u of i.targetLinks)
|
|
96
|
+
u.y1 = l + u.width / 2, l += u.width;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function jt() {
|
|
100
|
+
let t = 0, i = 0, s = 1, l = 1, u = 24, x = 8, g, k = Ot, o = gt, a, h, m = $t, _ = Dt, d = 6;
|
|
101
|
+
function v() {
|
|
102
|
+
const n = { nodes: m.apply(null, arguments), links: _.apply(null, arguments) };
|
|
103
|
+
return T(n), A(n), M(n), I(n), S(n), ht(n), n;
|
|
104
|
+
}
|
|
105
|
+
v.update = function(n) {
|
|
106
|
+
return ht(n), n;
|
|
107
|
+
}, v.nodeId = function(n) {
|
|
108
|
+
return arguments.length ? (k = typeof n == "function" ? n : Y(n), v) : k;
|
|
109
|
+
}, v.nodeAlign = function(n) {
|
|
110
|
+
return arguments.length ? (o = typeof n == "function" ? n : Y(n), v) : o;
|
|
111
|
+
}, v.nodeSort = function(n) {
|
|
112
|
+
return arguments.length ? (a = n, v) : a;
|
|
113
|
+
}, v.nodeWidth = function(n) {
|
|
114
|
+
return arguments.length ? (u = +n, v) : u;
|
|
115
|
+
}, v.nodePadding = function(n) {
|
|
116
|
+
return arguments.length ? (x = g = +n, v) : x;
|
|
117
|
+
}, v.nodes = function(n) {
|
|
118
|
+
return arguments.length ? (m = typeof n == "function" ? n : Y(n), v) : m;
|
|
119
|
+
}, v.links = function(n) {
|
|
120
|
+
return arguments.length ? (_ = typeof n == "function" ? n : Y(n), v) : _;
|
|
121
|
+
}, v.linkSort = function(n) {
|
|
122
|
+
return arguments.length ? (h = n, v) : h;
|
|
123
|
+
}, v.size = function(n) {
|
|
124
|
+
return arguments.length ? (t = i = 0, s = +n[0], l = +n[1], v) : [s - t, l - i];
|
|
125
|
+
}, v.extent = function(n) {
|
|
126
|
+
return arguments.length ? (t = +n[0][0], s = +n[1][0], i = +n[0][1], l = +n[1][1], v) : [[t, i], [s, l]];
|
|
127
|
+
}, v.iterations = function(n) {
|
|
128
|
+
return arguments.length ? (d = +n, v) : d;
|
|
129
|
+
};
|
|
130
|
+
function T({ nodes: n, links: f }) {
|
|
131
|
+
for (const [e, r] of n.entries())
|
|
132
|
+
r.index = e, r.sourceLinks = [], r.targetLinks = [];
|
|
133
|
+
const c = new Map(n.map((e, r) => [k(e, r, n), e]));
|
|
134
|
+
for (const [e, r] of f.entries()) {
|
|
135
|
+
r.index = e;
|
|
136
|
+
let { source: p, target: b } = r;
|
|
137
|
+
typeof p != "object" && (p = r.source = ut(c, p)), typeof b != "object" && (b = r.target = ut(c, b)), p.sourceLinks.push(r), b.targetLinks.push(r);
|
|
138
|
+
}
|
|
139
|
+
if (h != null)
|
|
140
|
+
for (const { sourceLinks: e, targetLinks: r } of n)
|
|
141
|
+
e.sort(h), r.sort(h);
|
|
142
|
+
}
|
|
143
|
+
function A({ nodes: n }) {
|
|
144
|
+
for (const f of n)
|
|
145
|
+
f.value = f.fixedValue === void 0 ? Math.max(J(f.sourceLinks, tt), J(f.targetLinks, tt)) : f.fixedValue;
|
|
146
|
+
}
|
|
147
|
+
function M({ nodes: n }) {
|
|
148
|
+
const f = n.length;
|
|
149
|
+
let c = new Set(n), e = /* @__PURE__ */ new Set(), r = 0;
|
|
150
|
+
for (; c.size; ) {
|
|
151
|
+
for (const p of c) {
|
|
152
|
+
p.depth = r;
|
|
153
|
+
for (const { target: b } of p.sourceLinks)
|
|
154
|
+
e.add(b);
|
|
155
|
+
}
|
|
156
|
+
if (++r > f) throw new Error("circular link");
|
|
157
|
+
c = e, e = /* @__PURE__ */ new Set();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function I({ nodes: n }) {
|
|
161
|
+
const f = n.length;
|
|
162
|
+
let c = new Set(n), e = /* @__PURE__ */ new Set(), r = 0;
|
|
163
|
+
for (; c.size; ) {
|
|
164
|
+
for (const p of c) {
|
|
165
|
+
p.height = r;
|
|
166
|
+
for (const { source: b } of p.targetLinks)
|
|
167
|
+
e.add(b);
|
|
168
|
+
}
|
|
169
|
+
if (++r > f) throw new Error("circular link");
|
|
170
|
+
c = e, e = /* @__PURE__ */ new Set();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function N({ nodes: n }) {
|
|
174
|
+
const f = at(n, (r) => r.depth) + 1, c = (s - t - u) / (f - 1), e = new Array(f);
|
|
175
|
+
for (const r of n) {
|
|
176
|
+
const p = Math.max(0, Math.min(f - 1, Math.floor(o.call(null, r, f))));
|
|
177
|
+
r.layer = p, r.x0 = t + p * c, r.x1 = r.x0 + u, e[p] ? e[p].push(r) : e[p] = [r];
|
|
178
|
+
}
|
|
179
|
+
if (a) for (const r of e)
|
|
180
|
+
r.sort(a);
|
|
181
|
+
return e;
|
|
182
|
+
}
|
|
183
|
+
function $(n) {
|
|
184
|
+
const f = dt(n, (c) => (l - i - (c.length - 1) * g) / J(c, tt));
|
|
185
|
+
for (const c of n) {
|
|
186
|
+
let e = i;
|
|
187
|
+
for (const r of c) {
|
|
188
|
+
r.y0 = e, r.y1 = e + r.value * f, e = r.y1 + g;
|
|
189
|
+
for (const p of r.sourceLinks)
|
|
190
|
+
p.width = p.value * f;
|
|
191
|
+
}
|
|
192
|
+
e = (l - e + g) / (c.length + 1);
|
|
193
|
+
for (let r = 0; r < c.length; ++r) {
|
|
194
|
+
const p = c[r];
|
|
195
|
+
p.y0 += e * (r + 1), p.y1 += e * (r + 1);
|
|
196
|
+
}
|
|
197
|
+
w(c);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function S(n) {
|
|
201
|
+
const f = N(n);
|
|
202
|
+
g = Math.min(x, (l - i) / (at(f, (c) => c.length) - 1)), $(f);
|
|
203
|
+
for (let c = 0; c < d; ++c) {
|
|
204
|
+
const e = Math.pow(0.99, c), r = Math.max(1 - e, (c + 1) / d);
|
|
205
|
+
F(f, e, r), C(f, e, r);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function C(n, f, c) {
|
|
209
|
+
for (let e = 1, r = n.length; e < r; ++e) {
|
|
210
|
+
const p = n[e];
|
|
211
|
+
for (const b of p) {
|
|
212
|
+
let L = 0, z = 0;
|
|
213
|
+
for (const { source: W, value: Z } of b.targetLinks) {
|
|
214
|
+
let U = Z * (b.layer - W.layer);
|
|
215
|
+
L += P(W, b) * U, z += U;
|
|
216
|
+
}
|
|
217
|
+
if (!(z > 0)) continue;
|
|
218
|
+
let V = (L / z - b.y0) * f;
|
|
219
|
+
b.y0 += V, b.y1 += V, j(b);
|
|
220
|
+
}
|
|
221
|
+
a === void 0 && p.sort(q), D(p, c);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function F(n, f, c) {
|
|
225
|
+
for (let e = n.length, r = e - 2; r >= 0; --r) {
|
|
226
|
+
const p = n[r];
|
|
227
|
+
for (const b of p) {
|
|
228
|
+
let L = 0, z = 0;
|
|
229
|
+
for (const { target: W, value: Z } of b.sourceLinks) {
|
|
230
|
+
let U = Z * (W.layer - b.layer);
|
|
231
|
+
L += E(b, W) * U, z += U;
|
|
232
|
+
}
|
|
233
|
+
if (!(z > 0)) continue;
|
|
234
|
+
let V = (L / z - b.y0) * f;
|
|
235
|
+
b.y0 += V, b.y1 += V, j(b);
|
|
236
|
+
}
|
|
237
|
+
a === void 0 && p.sort(q), D(p, c);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function D(n, f) {
|
|
241
|
+
const c = n.length >> 1, e = n[c];
|
|
242
|
+
O(n, e.y0 - g, c - 1, f), R(n, e.y1 + g, c + 1, f), O(n, l, n.length - 1, f), R(n, i, 0, f);
|
|
243
|
+
}
|
|
244
|
+
function R(n, f, c, e) {
|
|
245
|
+
for (; c < n.length; ++c) {
|
|
246
|
+
const r = n[c], p = (f - r.y0) * e;
|
|
247
|
+
p > 1e-6 && (r.y0 += p, r.y1 += p), f = r.y1 + g;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function O(n, f, c, e) {
|
|
251
|
+
for (; c >= 0; --c) {
|
|
252
|
+
const r = n[c], p = (r.y1 - f) * e;
|
|
253
|
+
p > 1e-6 && (r.y0 -= p, r.y1 -= p), f = r.y0 - g;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function j({ sourceLinks: n, targetLinks: f }) {
|
|
257
|
+
if (h === void 0) {
|
|
258
|
+
for (const { source: { sourceLinks: c } } of f)
|
|
259
|
+
c.sort(ct);
|
|
260
|
+
for (const { target: { targetLinks: c } } of n)
|
|
261
|
+
c.sort(lt);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function w(n) {
|
|
265
|
+
if (h === void 0)
|
|
266
|
+
for (const { sourceLinks: f, targetLinks: c } of n)
|
|
267
|
+
f.sort(ct), c.sort(lt);
|
|
268
|
+
}
|
|
269
|
+
function P(n, f) {
|
|
270
|
+
let c = n.y0 - (n.sourceLinks.length - 1) * g / 2;
|
|
271
|
+
for (const { target: e, width: r } of n.sourceLinks) {
|
|
272
|
+
if (e === f) break;
|
|
273
|
+
c += r + g;
|
|
274
|
+
}
|
|
275
|
+
for (const { source: e, width: r } of f.targetLinks) {
|
|
276
|
+
if (e === n) break;
|
|
277
|
+
c -= r;
|
|
278
|
+
}
|
|
279
|
+
return c;
|
|
280
|
+
}
|
|
281
|
+
function E(n, f) {
|
|
282
|
+
let c = f.y0 - (f.targetLinks.length - 1) * g / 2;
|
|
283
|
+
for (const { source: e, width: r } of f.targetLinks) {
|
|
284
|
+
if (e === n) break;
|
|
285
|
+
c += r + g;
|
|
286
|
+
}
|
|
287
|
+
for (const { target: e, width: r } of n.sourceLinks) {
|
|
288
|
+
if (e === f) break;
|
|
289
|
+
c -= r;
|
|
290
|
+
}
|
|
291
|
+
return c;
|
|
292
|
+
}
|
|
293
|
+
return v;
|
|
294
|
+
}
|
|
295
|
+
var et = Math.PI, nt = 2 * et, B = 1e-6, zt = nt - B;
|
|
296
|
+
function it() {
|
|
297
|
+
this._x0 = this._y0 = // start of current subpath
|
|
298
|
+
this._x1 = this._y1 = null, this._ = "";
|
|
299
|
+
}
|
|
300
|
+
function pt() {
|
|
301
|
+
return new it();
|
|
302
|
+
}
|
|
303
|
+
it.prototype = pt.prototype = {
|
|
304
|
+
constructor: it,
|
|
305
|
+
moveTo: function(t, i) {
|
|
306
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +i);
|
|
307
|
+
},
|
|
308
|
+
closePath: function() {
|
|
309
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
|
|
310
|
+
},
|
|
311
|
+
lineTo: function(t, i) {
|
|
312
|
+
this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +i);
|
|
313
|
+
},
|
|
314
|
+
quadraticCurveTo: function(t, i, s, l) {
|
|
315
|
+
this._ += "Q" + +t + "," + +i + "," + (this._x1 = +s) + "," + (this._y1 = +l);
|
|
316
|
+
},
|
|
317
|
+
bezierCurveTo: function(t, i, s, l, u, x) {
|
|
318
|
+
this._ += "C" + +t + "," + +i + "," + +s + "," + +l + "," + (this._x1 = +u) + "," + (this._y1 = +x);
|
|
319
|
+
},
|
|
320
|
+
arcTo: function(t, i, s, l, u) {
|
|
321
|
+
t = +t, i = +i, s = +s, l = +l, u = +u;
|
|
322
|
+
var x = this._x1, g = this._y1, k = s - t, o = l - i, a = x - t, h = g - i, m = a * a + h * h;
|
|
323
|
+
if (u < 0) throw new Error("negative radius: " + u);
|
|
324
|
+
if (this._x1 === null)
|
|
325
|
+
this._ += "M" + (this._x1 = t) + "," + (this._y1 = i);
|
|
326
|
+
else if (m > B) if (!(Math.abs(h * k - o * a) > B) || !u)
|
|
327
|
+
this._ += "L" + (this._x1 = t) + "," + (this._y1 = i);
|
|
328
|
+
else {
|
|
329
|
+
var _ = s - x, d = l - g, v = k * k + o * o, T = _ * _ + d * d, A = Math.sqrt(v), M = Math.sqrt(m), I = u * Math.tan((et - Math.acos((v + m - T) / (2 * A * M))) / 2), N = I / M, $ = I / A;
|
|
330
|
+
Math.abs(N - 1) > B && (this._ += "L" + (t + N * a) + "," + (i + N * h)), this._ += "A" + u + "," + u + ",0,0," + +(h * _ > a * d) + "," + (this._x1 = t + $ * k) + "," + (this._y1 = i + $ * o);
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
arc: function(t, i, s, l, u, x) {
|
|
334
|
+
t = +t, i = +i, s = +s, x = !!x;
|
|
335
|
+
var g = s * Math.cos(l), k = s * Math.sin(l), o = t + g, a = i + k, h = 1 ^ x, m = x ? l - u : u - l;
|
|
336
|
+
if (s < 0) throw new Error("negative radius: " + s);
|
|
337
|
+
this._x1 === null ? this._ += "M" + o + "," + a : (Math.abs(this._x1 - o) > B || Math.abs(this._y1 - a) > B) && (this._ += "L" + o + "," + a), s && (m < 0 && (m = m % nt + nt), m > zt ? this._ += "A" + s + "," + s + ",0,1," + h + "," + (t - g) + "," + (i - k) + "A" + s + "," + s + ",0,1," + h + "," + (this._x1 = o) + "," + (this._y1 = a) : m > B && (this._ += "A" + s + "," + s + ",0," + +(m >= et) + "," + h + "," + (this._x1 = t + s * Math.cos(u)) + "," + (this._y1 = i + s * Math.sin(u))));
|
|
338
|
+
},
|
|
339
|
+
rect: function(t, i, s, l) {
|
|
340
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +i) + "h" + +s + "v" + +l + "h" + -s + "Z";
|
|
341
|
+
},
|
|
342
|
+
toString: function() {
|
|
343
|
+
return this._;
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
function ft(t) {
|
|
347
|
+
return function() {
|
|
348
|
+
return t;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function Bt(t) {
|
|
352
|
+
return t[0];
|
|
353
|
+
}
|
|
354
|
+
function Ft(t) {
|
|
355
|
+
return t[1];
|
|
356
|
+
}
|
|
357
|
+
var Rt = Array.prototype.slice;
|
|
358
|
+
function Vt(t) {
|
|
359
|
+
return t.source;
|
|
360
|
+
}
|
|
361
|
+
function Wt(t) {
|
|
362
|
+
return t.target;
|
|
363
|
+
}
|
|
364
|
+
function Ut(t) {
|
|
365
|
+
var i = Vt, s = Wt, l = Bt, u = Ft, x = null;
|
|
366
|
+
function g() {
|
|
367
|
+
var k, o = Rt.call(arguments), a = i.apply(this, o), h = s.apply(this, o);
|
|
368
|
+
if (x || (x = k = pt()), t(x, +l.apply(this, (o[0] = a, o)), +u.apply(this, o), +l.apply(this, (o[0] = h, o)), +u.apply(this, o)), k) return x = null, k + "" || null;
|
|
369
|
+
}
|
|
370
|
+
return g.source = function(k) {
|
|
371
|
+
return arguments.length ? (i = k, g) : i;
|
|
372
|
+
}, g.target = function(k) {
|
|
373
|
+
return arguments.length ? (s = k, g) : s;
|
|
374
|
+
}, g.x = function(k) {
|
|
375
|
+
return arguments.length ? (l = typeof k == "function" ? k : ft(+k), g) : l;
|
|
376
|
+
}, g.y = function(k) {
|
|
377
|
+
return arguments.length ? (u = typeof k == "function" ? k : ft(+k), g) : u;
|
|
378
|
+
}, g.context = function(k) {
|
|
379
|
+
return arguments.length ? (x = k ?? null, g) : x;
|
|
380
|
+
}, g;
|
|
381
|
+
}
|
|
382
|
+
function Gt(t, i, s, l, u) {
|
|
383
|
+
t.moveTo(i, s), t.bezierCurveTo(i = (i + l) / 2, s, i, u, l, u);
|
|
384
|
+
}
|
|
385
|
+
function Yt() {
|
|
386
|
+
return Ut(Gt);
|
|
387
|
+
}
|
|
388
|
+
function qt(t) {
|
|
389
|
+
return [t.source.x1, t.y0];
|
|
390
|
+
}
|
|
391
|
+
function Ht(t) {
|
|
392
|
+
return [t.target.x0, t.y1];
|
|
393
|
+
}
|
|
394
|
+
function Xt() {
|
|
395
|
+
return Yt().source(qt).target(Ht);
|
|
396
|
+
}
|
|
397
|
+
var rt = (function() {
|
|
398
|
+
var t = /* @__PURE__ */ y(function(k, o, a, h) {
|
|
399
|
+
for (a = a || {}, h = k.length; h--; a[k[h]] = o) ;
|
|
400
|
+
return a;
|
|
401
|
+
}, "o"), i = [1, 9], s = [1, 10], l = [1, 5, 10, 12], u = {
|
|
402
|
+
trace: /* @__PURE__ */ y(function() {
|
|
403
|
+
}, "trace"),
|
|
404
|
+
yy: {},
|
|
405
|
+
symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
|
|
406
|
+
terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
|
|
407
|
+
productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
|
|
408
|
+
performAction: /* @__PURE__ */ y(function(o, a, h, m, _, d, v) {
|
|
409
|
+
var T = d.length - 1;
|
|
410
|
+
switch (_) {
|
|
411
|
+
case 7:
|
|
412
|
+
const A = m.findOrCreateNode(d[T - 4].trim().replaceAll('""', '"')), M = m.findOrCreateNode(d[T - 2].trim().replaceAll('""', '"')), I = parseFloat(d[T].trim());
|
|
413
|
+
m.addLink(A, M, I);
|
|
414
|
+
break;
|
|
415
|
+
case 8:
|
|
416
|
+
case 9:
|
|
417
|
+
case 11:
|
|
418
|
+
this.$ = d[T];
|
|
419
|
+
break;
|
|
420
|
+
case 10:
|
|
421
|
+
this.$ = d[T - 1];
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
}, "anonymous"),
|
|
425
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: i, 20: s }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(s, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(l, [2, 8]), t(l, [2, 9]), { 19: [1, 16] }, t(l, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(s, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: i, 20: s }, { 15: 18, 16: 7, 17: 8, 18: i, 20: s }, { 18: [1, 19] }, t(s, [2, 3]), { 12: [1, 20] }, t(l, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: i, 20: s }, t([1, 5, 10], [2, 7])],
|
|
426
|
+
defaultActions: { 11: [2, 1], 12: [2, 5] },
|
|
427
|
+
parseError: /* @__PURE__ */ y(function(o, a) {
|
|
428
|
+
if (a.recoverable)
|
|
429
|
+
this.trace(o);
|
|
430
|
+
else {
|
|
431
|
+
var h = new Error(o);
|
|
432
|
+
throw h.hash = a, h;
|
|
433
|
+
}
|
|
434
|
+
}, "parseError"),
|
|
435
|
+
parse: /* @__PURE__ */ y(function(o) {
|
|
436
|
+
var a = this, h = [0], m = [], _ = [null], d = [], v = this.table, T = "", A = 0, M = 0, I = 2, N = 1, $ = d.slice.call(arguments, 1), S = Object.create(this.lexer), C = { yy: {} };
|
|
437
|
+
for (var F in this.yy)
|
|
438
|
+
Object.prototype.hasOwnProperty.call(this.yy, F) && (C.yy[F] = this.yy[F]);
|
|
439
|
+
S.setInput(o, C.yy), C.yy.lexer = S, C.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
|
|
440
|
+
var D = S.yylloc;
|
|
441
|
+
d.push(D);
|
|
442
|
+
var R = S.options && S.options.ranges;
|
|
443
|
+
typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
444
|
+
function O(L) {
|
|
445
|
+
h.length = h.length - 2 * L, _.length = _.length - L, d.length = d.length - L;
|
|
446
|
+
}
|
|
447
|
+
y(O, "popStack");
|
|
448
|
+
function j() {
|
|
449
|
+
var L;
|
|
450
|
+
return L = m.pop() || S.lex() || N, typeof L != "number" && (L instanceof Array && (m = L, L = m.pop()), L = a.symbols_[L] || L), L;
|
|
451
|
+
}
|
|
452
|
+
y(j, "lex");
|
|
453
|
+
for (var w, P, E, n, f = {}, c, e, r, p; ; ) {
|
|
454
|
+
if (P = h[h.length - 1], this.defaultActions[P] ? E = this.defaultActions[P] : ((w === null || typeof w > "u") && (w = j()), E = v[P] && v[P][w]), typeof E > "u" || !E.length || !E[0]) {
|
|
455
|
+
var b = "";
|
|
456
|
+
p = [];
|
|
457
|
+
for (c in v[P])
|
|
458
|
+
this.terminals_[c] && c > I && p.push("'" + this.terminals_[c] + "'");
|
|
459
|
+
S.showPosition ? b = "Parse error on line " + (A + 1) + `:
|
|
460
|
+
` + S.showPosition() + `
|
|
461
|
+
Expecting ` + p.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : b = "Parse error on line " + (A + 1) + ": Unexpected " + (w == N ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(b, {
|
|
462
|
+
text: S.match,
|
|
463
|
+
token: this.terminals_[w] || w,
|
|
464
|
+
line: S.yylineno,
|
|
465
|
+
loc: D,
|
|
466
|
+
expected: p
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
if (E[0] instanceof Array && E.length > 1)
|
|
470
|
+
throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + w);
|
|
471
|
+
switch (E[0]) {
|
|
472
|
+
case 1:
|
|
473
|
+
h.push(w), _.push(S.yytext), d.push(S.yylloc), h.push(E[1]), w = null, M = S.yyleng, T = S.yytext, A = S.yylineno, D = S.yylloc;
|
|
474
|
+
break;
|
|
475
|
+
case 2:
|
|
476
|
+
if (e = this.productions_[E[1]][1], f.$ = _[_.length - e], f._$ = {
|
|
477
|
+
first_line: d[d.length - (e || 1)].first_line,
|
|
478
|
+
last_line: d[d.length - 1].last_line,
|
|
479
|
+
first_column: d[d.length - (e || 1)].first_column,
|
|
480
|
+
last_column: d[d.length - 1].last_column
|
|
481
|
+
}, R && (f._$.range = [
|
|
482
|
+
d[d.length - (e || 1)].range[0],
|
|
483
|
+
d[d.length - 1].range[1]
|
|
484
|
+
]), n = this.performAction.apply(f, [
|
|
485
|
+
T,
|
|
486
|
+
M,
|
|
487
|
+
A,
|
|
488
|
+
C.yy,
|
|
489
|
+
E[1],
|
|
490
|
+
_,
|
|
491
|
+
d
|
|
492
|
+
].concat($)), typeof n < "u")
|
|
493
|
+
return n;
|
|
494
|
+
e && (h = h.slice(0, -1 * e * 2), _ = _.slice(0, -1 * e), d = d.slice(0, -1 * e)), h.push(this.productions_[E[1]][0]), _.push(f.$), d.push(f._$), r = v[h[h.length - 2]][h[h.length - 1]], h.push(r);
|
|
495
|
+
break;
|
|
496
|
+
case 3:
|
|
497
|
+
return !0;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return !0;
|
|
501
|
+
}, "parse")
|
|
502
|
+
}, x = /* @__PURE__ */ (function() {
|
|
503
|
+
var k = {
|
|
504
|
+
EOF: 1,
|
|
505
|
+
parseError: /* @__PURE__ */ y(function(a, h) {
|
|
506
|
+
if (this.yy.parser)
|
|
507
|
+
this.yy.parser.parseError(a, h);
|
|
508
|
+
else
|
|
509
|
+
throw new Error(a);
|
|
510
|
+
}, "parseError"),
|
|
511
|
+
// resets the lexer, sets new input
|
|
512
|
+
setInput: /* @__PURE__ */ y(function(o, a) {
|
|
513
|
+
return this.yy = a || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
514
|
+
first_line: 1,
|
|
515
|
+
first_column: 0,
|
|
516
|
+
last_line: 1,
|
|
517
|
+
last_column: 0
|
|
518
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
519
|
+
}, "setInput"),
|
|
520
|
+
// consumes and returns one char from the input
|
|
521
|
+
input: /* @__PURE__ */ y(function() {
|
|
522
|
+
var o = this._input[0];
|
|
523
|
+
this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
|
|
524
|
+
var a = o.match(/(?:\r\n?|\n).*/g);
|
|
525
|
+
return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
|
|
526
|
+
}, "input"),
|
|
527
|
+
// unshifts one char (or a string) into the input
|
|
528
|
+
unput: /* @__PURE__ */ y(function(o) {
|
|
529
|
+
var a = o.length, h = o.split(/(?:\r\n?|\n)/g);
|
|
530
|
+
this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
|
531
|
+
var m = this.match.split(/(?:\r\n?|\n)/g);
|
|
532
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1);
|
|
533
|
+
var _ = this.yylloc.range;
|
|
534
|
+
return this.yylloc = {
|
|
535
|
+
first_line: this.yylloc.first_line,
|
|
536
|
+
last_line: this.yylineno + 1,
|
|
537
|
+
first_column: this.yylloc.first_column,
|
|
538
|
+
last_column: h ? (h.length === m.length ? this.yylloc.first_column : 0) + m[m.length - h.length].length - h[0].length : this.yylloc.first_column - a
|
|
539
|
+
}, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
|
540
|
+
}, "unput"),
|
|
541
|
+
// When called from action, caches matched text and appends it on next action
|
|
542
|
+
more: /* @__PURE__ */ y(function() {
|
|
543
|
+
return this._more = !0, this;
|
|
544
|
+
}, "more"),
|
|
545
|
+
// 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.
|
|
546
|
+
reject: /* @__PURE__ */ y(function() {
|
|
547
|
+
if (this.options.backtrack_lexer)
|
|
548
|
+
this._backtrack = !0;
|
|
549
|
+
else
|
|
550
|
+
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).
|
|
551
|
+
` + this.showPosition(), {
|
|
552
|
+
text: "",
|
|
553
|
+
token: null,
|
|
554
|
+
line: this.yylineno
|
|
555
|
+
});
|
|
556
|
+
return this;
|
|
557
|
+
}, "reject"),
|
|
558
|
+
// retain first n characters of the match
|
|
559
|
+
less: /* @__PURE__ */ y(function(o) {
|
|
560
|
+
this.unput(this.match.slice(o));
|
|
561
|
+
}, "less"),
|
|
562
|
+
// displays already matched input, i.e. for error messages
|
|
563
|
+
pastInput: /* @__PURE__ */ y(function() {
|
|
564
|
+
var o = this.matched.substr(0, this.matched.length - this.match.length);
|
|
565
|
+
return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
|
|
566
|
+
}, "pastInput"),
|
|
567
|
+
// displays upcoming input, i.e. for error messages
|
|
568
|
+
upcomingInput: /* @__PURE__ */ y(function() {
|
|
569
|
+
var o = this.match;
|
|
570
|
+
return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
571
|
+
}, "upcomingInput"),
|
|
572
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
573
|
+
showPosition: /* @__PURE__ */ y(function() {
|
|
574
|
+
var o = this.pastInput(), a = new Array(o.length + 1).join("-");
|
|
575
|
+
return o + this.upcomingInput() + `
|
|
576
|
+
` + a + "^";
|
|
577
|
+
}, "showPosition"),
|
|
578
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
579
|
+
test_match: /* @__PURE__ */ y(function(o, a) {
|
|
580
|
+
var h, m, _;
|
|
581
|
+
if (this.options.backtrack_lexer && (_ = {
|
|
582
|
+
yylineno: this.yylineno,
|
|
583
|
+
yylloc: {
|
|
584
|
+
first_line: this.yylloc.first_line,
|
|
585
|
+
last_line: this.last_line,
|
|
586
|
+
first_column: this.yylloc.first_column,
|
|
587
|
+
last_column: this.yylloc.last_column
|
|
588
|
+
},
|
|
589
|
+
yytext: this.yytext,
|
|
590
|
+
match: this.match,
|
|
591
|
+
matches: this.matches,
|
|
592
|
+
matched: this.matched,
|
|
593
|
+
yyleng: this.yyleng,
|
|
594
|
+
offset: this.offset,
|
|
595
|
+
_more: this._more,
|
|
596
|
+
_input: this._input,
|
|
597
|
+
yy: this.yy,
|
|
598
|
+
conditionStack: this.conditionStack.slice(0),
|
|
599
|
+
done: this.done
|
|
600
|
+
}, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), m = o[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
|
|
601
|
+
first_line: this.yylloc.last_line,
|
|
602
|
+
last_line: this.yylineno + 1,
|
|
603
|
+
first_column: this.yylloc.last_column,
|
|
604
|
+
last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
|
|
605
|
+
}, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], h = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
|
|
606
|
+
return h;
|
|
607
|
+
if (this._backtrack) {
|
|
608
|
+
for (var d in _)
|
|
609
|
+
this[d] = _[d];
|
|
610
|
+
return !1;
|
|
611
|
+
}
|
|
612
|
+
return !1;
|
|
613
|
+
}, "test_match"),
|
|
614
|
+
// return next match in input
|
|
615
|
+
next: /* @__PURE__ */ y(function() {
|
|
616
|
+
if (this.done)
|
|
617
|
+
return this.EOF;
|
|
618
|
+
this._input || (this.done = !0);
|
|
619
|
+
var o, a, h, m;
|
|
620
|
+
this._more || (this.yytext = "", this.match = "");
|
|
621
|
+
for (var _ = this._currentRules(), d = 0; d < _.length; d++)
|
|
622
|
+
if (h = this._input.match(this.rules[_[d]]), h && (!a || h[0].length > a[0].length)) {
|
|
623
|
+
if (a = h, m = d, this.options.backtrack_lexer) {
|
|
624
|
+
if (o = this.test_match(h, _[d]), o !== !1)
|
|
625
|
+
return o;
|
|
626
|
+
if (this._backtrack) {
|
|
627
|
+
a = !1;
|
|
628
|
+
continue;
|
|
629
|
+
} else
|
|
630
|
+
return !1;
|
|
631
|
+
} else if (!this.options.flex)
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
return a ? (o = this.test_match(a, _[m]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
635
|
+
` + this.showPosition(), {
|
|
636
|
+
text: "",
|
|
637
|
+
token: null,
|
|
638
|
+
line: this.yylineno
|
|
639
|
+
});
|
|
640
|
+
}, "next"),
|
|
641
|
+
// return next match that has a token
|
|
642
|
+
lex: /* @__PURE__ */ y(function() {
|
|
643
|
+
var a = this.next();
|
|
644
|
+
return a || this.lex();
|
|
645
|
+
}, "lex"),
|
|
646
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
647
|
+
begin: /* @__PURE__ */ y(function(a) {
|
|
648
|
+
this.conditionStack.push(a);
|
|
649
|
+
}, "begin"),
|
|
650
|
+
// pop the previously active lexer condition state off the condition stack
|
|
651
|
+
popState: /* @__PURE__ */ y(function() {
|
|
652
|
+
var a = this.conditionStack.length - 1;
|
|
653
|
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
654
|
+
}, "popState"),
|
|
655
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
656
|
+
_currentRules: /* @__PURE__ */ y(function() {
|
|
657
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
658
|
+
}, "_currentRules"),
|
|
659
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
660
|
+
topState: /* @__PURE__ */ y(function(a) {
|
|
661
|
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
|
662
|
+
}, "topState"),
|
|
663
|
+
// alias for begin(condition)
|
|
664
|
+
pushState: /* @__PURE__ */ y(function(a) {
|
|
665
|
+
this.begin(a);
|
|
666
|
+
}, "pushState"),
|
|
667
|
+
// return the number of states currently on the stack
|
|
668
|
+
stateStackSize: /* @__PURE__ */ y(function() {
|
|
669
|
+
return this.conditionStack.length;
|
|
670
|
+
}, "stateStackSize"),
|
|
671
|
+
options: { "case-insensitive": !0 },
|
|
672
|
+
performAction: /* @__PURE__ */ y(function(a, h, m, _) {
|
|
673
|
+
switch (m) {
|
|
674
|
+
case 0:
|
|
675
|
+
return this.pushState("csv"), 4;
|
|
676
|
+
case 1:
|
|
677
|
+
return this.pushState("csv"), 4;
|
|
678
|
+
case 2:
|
|
679
|
+
return 10;
|
|
680
|
+
case 3:
|
|
681
|
+
return 5;
|
|
682
|
+
case 4:
|
|
683
|
+
return 12;
|
|
684
|
+
case 5:
|
|
685
|
+
return this.pushState("escaped_text"), 18;
|
|
686
|
+
case 6:
|
|
687
|
+
return 20;
|
|
688
|
+
case 7:
|
|
689
|
+
return this.popState("escaped_text"), 18;
|
|
690
|
+
case 8:
|
|
691
|
+
return 19;
|
|
692
|
+
}
|
|
693
|
+
}, "anonymous"),
|
|
694
|
+
rules: [/^(?:sankey-beta\b)/i, /^(?:sankey\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
|
|
695
|
+
conditions: { csv: { rules: [2, 3, 4, 5, 6, 7, 8], inclusive: !1 }, escaped_text: { rules: [7, 8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8], inclusive: !0 } }
|
|
696
|
+
};
|
|
697
|
+
return k;
|
|
698
|
+
})();
|
|
699
|
+
u.lexer = x;
|
|
700
|
+
function g() {
|
|
701
|
+
this.yy = {};
|
|
702
|
+
}
|
|
703
|
+
return y(g, "Parser"), g.prototype = u, u.Parser = g, new g();
|
|
704
|
+
})();
|
|
705
|
+
rt.parser = rt;
|
|
706
|
+
var H = rt, Q = [], K = [], X = /* @__PURE__ */ new Map(), Qt = /* @__PURE__ */ y(() => {
|
|
707
|
+
Q = [], K = [], X = /* @__PURE__ */ new Map(), Lt();
|
|
708
|
+
}, "clear"), Kt = class {
|
|
709
|
+
constructor(t, i, s = 0) {
|
|
710
|
+
this.source = t, this.target = i, this.value = s;
|
|
711
|
+
}
|
|
712
|
+
static {
|
|
713
|
+
y(this, "SankeyLink");
|
|
714
|
+
}
|
|
715
|
+
}, Zt = /* @__PURE__ */ y((t, i, s) => {
|
|
716
|
+
Q.push(new Kt(t, i, s));
|
|
717
|
+
}, "addLink"), Jt = class {
|
|
718
|
+
constructor(t) {
|
|
719
|
+
this.ID = t;
|
|
720
|
+
}
|
|
721
|
+
static {
|
|
722
|
+
y(this, "SankeyNode");
|
|
723
|
+
}
|
|
724
|
+
}, te = /* @__PURE__ */ y((t) => {
|
|
725
|
+
t = Et.sanitizeText(t, ot());
|
|
726
|
+
let i = X.get(t);
|
|
727
|
+
return i === void 0 && (i = new Jt(t), X.set(t, i), K.push(i)), i;
|
|
728
|
+
}, "findOrCreateNode"), ee = /* @__PURE__ */ y(() => K, "getNodes"), ne = /* @__PURE__ */ y(() => Q, "getLinks"), ie = /* @__PURE__ */ y(() => ({
|
|
729
|
+
nodes: K.map((t) => ({ id: t.ID })),
|
|
730
|
+
links: Q.map((t) => ({
|
|
731
|
+
source: t.source.ID,
|
|
732
|
+
target: t.target.ID,
|
|
733
|
+
value: t.value
|
|
734
|
+
}))
|
|
735
|
+
}), "getGraph"), re = {
|
|
736
|
+
nodesMap: X,
|
|
737
|
+
getConfig: /* @__PURE__ */ y(() => ot().sankey, "getConfig"),
|
|
738
|
+
getNodes: ee,
|
|
739
|
+
getLinks: ne,
|
|
740
|
+
getGraph: ie,
|
|
741
|
+
addLink: Zt,
|
|
742
|
+
findOrCreateNode: te,
|
|
743
|
+
getAccTitle: bt,
|
|
744
|
+
setAccTitle: vt,
|
|
745
|
+
getAccDescription: _t,
|
|
746
|
+
setAccDescription: xt,
|
|
747
|
+
getDiagramTitle: mt,
|
|
748
|
+
setDiagramTitle: kt,
|
|
749
|
+
clear: Qt
|
|
750
|
+
}, yt = class st {
|
|
751
|
+
static {
|
|
752
|
+
y(this, "Uid");
|
|
753
|
+
}
|
|
754
|
+
static {
|
|
755
|
+
this.count = 0;
|
|
756
|
+
}
|
|
757
|
+
static next(i) {
|
|
758
|
+
return new st(i + ++st.count);
|
|
759
|
+
}
|
|
760
|
+
constructor(i) {
|
|
761
|
+
this.id = i, this.href = `#${i}`;
|
|
762
|
+
}
|
|
763
|
+
toString() {
|
|
764
|
+
return "url(" + this.href + ")";
|
|
765
|
+
}
|
|
766
|
+
}, se = {
|
|
767
|
+
left: Ct,
|
|
768
|
+
right: Pt,
|
|
769
|
+
center: It,
|
|
770
|
+
justify: gt
|
|
771
|
+
}, oe = /* @__PURE__ */ y((t) => {
|
|
772
|
+
let i = 0, s = 0;
|
|
773
|
+
for (const l of t) {
|
|
774
|
+
const u = l.value ?? 0;
|
|
775
|
+
u > i && (i = u, s = l.layer ?? 0);
|
|
776
|
+
}
|
|
777
|
+
return s;
|
|
778
|
+
}, "findCentralNodeLayer"), ae = /* @__PURE__ */ y(function(t, i, s, l) {
|
|
779
|
+
const { securityLevel: u, sankey: x } = ot(), g = St.sankey;
|
|
780
|
+
let k;
|
|
781
|
+
u === "sandbox" && (k = G("#i" + i));
|
|
782
|
+
const o = u === "sandbox" ? G(k.nodes()[0].contentDocument.body) : G("body"), a = u === "sandbox" ? o.select(`[id="${i}"]`) : G(`[id="${i}"]`), h = x?.width ?? g.width, m = x?.height ?? g.width, _ = x?.useMaxWidth ?? g.useMaxWidth, d = x?.nodeAlignment ?? g.nodeAlignment, v = x?.prefix ?? g.prefix, T = x?.suffix ?? g.suffix, A = x?.showValues ?? g.showValues, M = x?.nodeWidth ?? g.nodeWidth ?? 10, I = x?.nodePadding ?? g.nodePadding ?? 12, N = x?.labelStyle ?? g.labelStyle ?? "legacy", $ = x?.nodeColors ?? {}, S = l.db.getGraph(), C = se[d];
|
|
783
|
+
jt().nodeId((e) => e.id).nodeWidth(M).nodePadding(I + (A ? 15 : 0)).nodeAlign(C).extent([
|
|
784
|
+
[0, 0],
|
|
785
|
+
[h, m]
|
|
786
|
+
])(S);
|
|
787
|
+
const D = oe(S.nodes), R = At(Mt), O = /* @__PURE__ */ y((e) => $[e] ?? R(e), "getNodeColor");
|
|
788
|
+
a.append("g").attr("class", "nodes").selectAll(".node").data(S.nodes).join("g").attr("class", "node").attr("id", (e) => (e.uid = yt.next("node-")).id).attr("transform", function(e) {
|
|
789
|
+
return "translate(" + e.x0 + "," + e.y0 + ")";
|
|
790
|
+
}).attr("x", (e) => e.x0).attr("y", (e) => e.y0).append("rect").attr("height", (e) => e.y1 - e.y0).attr("width", (e) => e.x1 - e.x0).attr("fill", (e) => O(e.id));
|
|
791
|
+
const j = /* @__PURE__ */ y(({ id: e, value: r }) => A ? `${e}
|
|
792
|
+
${v}${Math.round(r * 100) / 100}${T}` : e, "getText"), w = /* @__PURE__ */ y((e) => N === "outlined" ? (e.layer ?? 0) < D ? { x: e.x0 - 6, anchor: "end" } : { x: e.x1 + 6, anchor: "start" } : e.x0 < h / 2 ? { x: e.x1 + 6, anchor: "start" } : { x: e.x0 - 6, anchor: "end" }, "getLabelPosition"), P = a.append("g").attr("class", "node-labels").attr("font-size", 14), E = /* @__PURE__ */ y((e) => P.selectAll(e ? `.${e}` : "text").data(S.nodes).join("text").attr("class", e ?? null).attr("x", (r) => w(r).x).attr("y", (r) => (r.y1 + r.y0) / 2).attr("dy", `${A ? "0" : "0.35"}em`).attr("text-anchor", (r) => w(r).anchor).text(j), "appendLabel");
|
|
793
|
+
N === "outlined" ? (E("sankey-label-bg"), E("sankey-label-fg")) : E();
|
|
794
|
+
const n = a.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(S.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), f = x?.linkColor ?? "gradient";
|
|
795
|
+
if (f === "gradient") {
|
|
796
|
+
const e = n.append("linearGradient").attr("id", (r) => (r.uid = yt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (r) => r.source.x1).attr("x2", (r) => r.target.x0);
|
|
797
|
+
e.append("stop").attr("offset", "0%").attr("stop-color", (r) => O(r.source.id)), e.append("stop").attr("offset", "100%").attr("stop-color", (r) => O(r.target.id));
|
|
798
|
+
}
|
|
799
|
+
let c;
|
|
800
|
+
switch (f) {
|
|
801
|
+
case "gradient":
|
|
802
|
+
c = /* @__PURE__ */ y((e) => e.uid, "coloring");
|
|
803
|
+
break;
|
|
804
|
+
case "source":
|
|
805
|
+
c = /* @__PURE__ */ y((e) => O(e.source.id), "coloring");
|
|
806
|
+
break;
|
|
807
|
+
case "target":
|
|
808
|
+
c = /* @__PURE__ */ y((e) => O(e.target.id), "coloring");
|
|
809
|
+
break;
|
|
810
|
+
default:
|
|
811
|
+
c = f;
|
|
812
|
+
}
|
|
813
|
+
n.append("path").attr("d", Xt()).attr("stroke", c).attr("stroke-width", (e) => Math.max(1, e.width)), wt(void 0, a, 0, _);
|
|
814
|
+
}, "draw"), le = {
|
|
815
|
+
draw: ae
|
|
816
|
+
}, ce = /* @__PURE__ */ y((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
|
|
817
|
+
`).trim(), "prepareTextForParsing"), ue = /* @__PURE__ */ y((t) => `.label {
|
|
818
|
+
font-family: ${t.fontFamily};
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.node-labels {
|
|
822
|
+
font-family: ${t.fontFamily};
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/* Outlined label style - background stroke for better readability */
|
|
826
|
+
.sankey-label-bg {
|
|
827
|
+
stroke: ${t.mainBkg || t.background || "#fff"};
|
|
828
|
+
stroke-width: 4px;
|
|
829
|
+
stroke-linejoin: round;
|
|
830
|
+
paint-order: stroke;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/* Foreground label text */
|
|
834
|
+
.sankey-label-fg {
|
|
835
|
+
fill: ${t.textColor};
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/* Node styling */
|
|
839
|
+
.node rect {
|
|
840
|
+
shape-rendering: crispEdges;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/* Link styling */
|
|
844
|
+
.link {
|
|
845
|
+
fill: none;
|
|
846
|
+
stroke-opacity: 0.5;
|
|
847
|
+
mix-blend-mode: multiply;
|
|
848
|
+
}
|
|
849
|
+
`, "getStyles"), he = ue, fe = H.parse.bind(H);
|
|
850
|
+
H.parse = (t) => fe(ce(t));
|
|
851
|
+
var ge = {
|
|
852
|
+
styles: he,
|
|
853
|
+
parser: H,
|
|
854
|
+
db: re,
|
|
855
|
+
renderer: le
|
|
856
|
+
};
|
|
857
|
+
export {
|
|
858
|
+
ge as diagram
|
|
859
|
+
};
|