@mui/x-charts-vendor 8.19.0 → 8.22.0

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.
@@ -1,329 +0,0 @@
1
- "use strict";
2
-
3
- // https://github.com/d3/d3-sankey v0.12.3 Copyright 2019 Mike Bostock
4
- !function (n, t) {
5
- "object" == typeof exports && "undefined" != typeof module ? t(exports, require("../../../lib-vendor/d3-array/src/index.js"), require("../../../lib-vendor/d3-shape/src/index.js")) : "function" == typeof define && define.amd ? define(["exports", "d3-array", "d3-shape"], t) : t((n = n || self).d3 = n.d3 || {}, n.d3, n.d3);
6
- }(this, function (n, t, e) {
7
- "use strict";
8
-
9
- function o(n) {
10
- return n.target.depth;
11
- }
12
- function r(n, t) {
13
- return n.sourceLinks.length ? n.depth : t - 1;
14
- }
15
- function i(n) {
16
- return function () {
17
- return n;
18
- };
19
- }
20
- function s(n, t) {
21
- return u(n.source, t.source) || n.index - t.index;
22
- }
23
- function f(n, t) {
24
- return u(n.target, t.target) || n.index - t.index;
25
- }
26
- function u(n, t) {
27
- return n.y0 - t.y0;
28
- }
29
- function c(n) {
30
- return n.value;
31
- }
32
- function l(n) {
33
- return n.index;
34
- }
35
- function a(n) {
36
- return n.nodes;
37
- }
38
- function d(n) {
39
- return n.links;
40
- }
41
- function h(n, t) {
42
- const e = n.get(t);
43
- if (!e) throw new Error("missing: " + t);
44
- return e;
45
- }
46
- function g({
47
- nodes: n
48
- }) {
49
- for (const t of n) {
50
- let n = t.y0,
51
- e = n;
52
- for (const e of t.sourceLinks) e.y0 = n + e.width / 2, n += e.width;
53
- for (const n of t.targetLinks) n.y1 = e + n.width / 2, e += n.width;
54
- }
55
- }
56
- function y(n) {
57
- return [n.source.x1, n.y0];
58
- }
59
- function k(n) {
60
- return [n.target.x0, n.y1];
61
- }
62
- n.sankey = function () {
63
- let n,
64
- e,
65
- o,
66
- y = 0,
67
- k = 0,
68
- L = 1,
69
- p = 1,
70
- w = 24,
71
- x = 8,
72
- m = l,
73
- v = r,
74
- M = a,
75
- b = d,
76
- S = 6;
77
- function z() {
78
- const r = {
79
- nodes: M.apply(null, arguments),
80
- links: b.apply(null, arguments)
81
- };
82
- return function ({
83
- nodes: n,
84
- links: t
85
- }) {
86
- for (const [t, e] of n.entries()) e.index = t, e.sourceLinks = [], e.targetLinks = [];
87
- const e = new Map(n.map((t, e) => [m(t, e, n), t]));
88
- for (const [n, o] of t.entries()) {
89
- o.index = n;
90
- let {
91
- source: t,
92
- target: r
93
- } = o;
94
- "object" != typeof t && (t = o.source = h(e, t)), "object" != typeof r && (r = o.target = h(e, r)), t.sourceLinks.push(o), r.targetLinks.push(o);
95
- }
96
- if (null != o) for (const {
97
- sourceLinks: t,
98
- targetLinks: e
99
- } of n) t.sort(o), e.sort(o);
100
- }(r), function ({
101
- nodes: n
102
- }) {
103
- for (const e of n) e.value = void 0 === e.fixedValue ? Math.max(t.sum(e.sourceLinks, c), t.sum(e.targetLinks, c)) : e.fixedValue;
104
- }(r), function ({
105
- nodes: n
106
- }) {
107
- const t = n.length;
108
- let e = new Set(n),
109
- o = new Set(),
110
- r = 0;
111
- for (; e.size;) {
112
- for (const n of e) {
113
- n.depth = r;
114
- for (const {
115
- target: t
116
- } of n.sourceLinks) o.add(t);
117
- }
118
- if (++r > t) throw new Error("circular link");
119
- e = o, o = new Set();
120
- }
121
- }(r), function ({
122
- nodes: n
123
- }) {
124
- const t = n.length;
125
- let e = new Set(n),
126
- o = new Set(),
127
- r = 0;
128
- for (; e.size;) {
129
- for (const n of e) {
130
- n.height = r;
131
- for (const {
132
- source: t
133
- } of n.targetLinks) o.add(t);
134
- }
135
- if (++r > t) throw new Error("circular link");
136
- e = o, o = new Set();
137
- }
138
- }(r), function (o) {
139
- const r = function ({
140
- nodes: n
141
- }) {
142
- const o = t.max(n, n => n.depth) + 1,
143
- r = (L - y - w) / (o - 1),
144
- i = new Array(o);
145
- for (const t of n) {
146
- const n = Math.max(0, Math.min(o - 1, Math.floor(v.call(null, t, o))));
147
- t.layer = n, t.x0 = y + n * r, t.x1 = t.x0 + w, i[n] ? i[n].push(t) : i[n] = [t];
148
- }
149
- if (e) for (const n of i) n.sort(e);
150
- return i;
151
- }(o);
152
- n = Math.min(x, (p - k) / (t.max(r, n => n.length) - 1)), function (e) {
153
- const o = t.min(e, e => (p - k - (e.length - 1) * n) / t.sum(e, c));
154
- for (const t of e) {
155
- let e = k;
156
- for (const r of t) {
157
- r.y0 = e, r.y1 = e + r.value * o, e = r.y1 + n;
158
- for (const n of r.sourceLinks) n.width = n.value * o;
159
- }
160
- e = (p - e + n) / (t.length + 1);
161
- for (let n = 0; n < t.length; ++n) {
162
- const o = t[n];
163
- o.y0 += e * (n + 1), o.y1 += e * (n + 1);
164
- }
165
- V(t);
166
- }
167
- }(r);
168
- for (let n = 0; n < S; ++n) {
169
- const t = Math.pow(.99, n),
170
- e = Math.max(1 - t, (n + 1) / S);
171
- E(r, t, e), j(r, t, e);
172
- }
173
- }(r), g(r), r;
174
- }
175
- function j(n, t, o) {
176
- for (let r = 1, i = n.length; r < i; ++r) {
177
- const i = n[r];
178
- for (const n of i) {
179
- let e = 0,
180
- o = 0;
181
- for (const {
182
- source: t,
183
- value: r
184
- } of n.targetLinks) {
185
- let i = r * (n.layer - t.layer);
186
- e += _(t, n) * i, o += i;
187
- }
188
- if (!(o > 0)) continue;
189
- let r = (e / o - n.y0) * t;
190
- n.y0 += r, n.y1 += r, P(n);
191
- }
192
- void 0 === e && i.sort(u), q(i, o);
193
- }
194
- }
195
- function E(n, t, o) {
196
- for (let r = n.length - 2; r >= 0; --r) {
197
- const i = n[r];
198
- for (const n of i) {
199
- let e = 0,
200
- o = 0;
201
- for (const {
202
- target: t,
203
- value: r
204
- } of n.sourceLinks) {
205
- let i = r * (t.layer - n.layer);
206
- e += C(n, t) * i, o += i;
207
- }
208
- if (!(o > 0)) continue;
209
- let r = (e / o - n.y0) * t;
210
- n.y0 += r, n.y1 += r, P(n);
211
- }
212
- void 0 === e && i.sort(u), q(i, o);
213
- }
214
- }
215
- function q(t, e) {
216
- const o = t.length >> 1,
217
- r = t[o];
218
- H(t, r.y0 - n, o - 1, e), A(t, r.y1 + n, o + 1, e), H(t, p, t.length - 1, e), A(t, k, 0, e);
219
- }
220
- function A(t, e, o, r) {
221
- for (; o < t.length; ++o) {
222
- const i = t[o],
223
- s = (e - i.y0) * r;
224
- s > 1e-6 && (i.y0 += s, i.y1 += s), e = i.y1 + n;
225
- }
226
- }
227
- function H(t, e, o, r) {
228
- for (; o >= 0; --o) {
229
- const i = t[o],
230
- s = (i.y1 - e) * r;
231
- s > 1e-6 && (i.y0 -= s, i.y1 -= s), e = i.y0 - n;
232
- }
233
- }
234
- function P({
235
- sourceLinks: n,
236
- targetLinks: t
237
- }) {
238
- if (void 0 === o) {
239
- for (const {
240
- source: {
241
- sourceLinks: n
242
- }
243
- } of t) n.sort(f);
244
- for (const {
245
- target: {
246
- targetLinks: t
247
- }
248
- } of n) t.sort(s);
249
- }
250
- }
251
- function V(n) {
252
- if (void 0 === o) for (const {
253
- sourceLinks: t,
254
- targetLinks: e
255
- } of n) t.sort(f), e.sort(s);
256
- }
257
- function _(t, e) {
258
- let o = t.y0 - (t.sourceLinks.length - 1) * n / 2;
259
- for (const {
260
- target: r,
261
- width: i
262
- } of t.sourceLinks) {
263
- if (r === e) break;
264
- o += i + n;
265
- }
266
- for (const {
267
- source: n,
268
- width: r
269
- } of e.targetLinks) {
270
- if (n === t) break;
271
- o -= r;
272
- }
273
- return o;
274
- }
275
- function C(t, e) {
276
- let o = e.y0 - (e.targetLinks.length - 1) * n / 2;
277
- for (const {
278
- source: r,
279
- width: i
280
- } of e.targetLinks) {
281
- if (r === t) break;
282
- o += i + n;
283
- }
284
- for (const {
285
- target: n,
286
- width: r
287
- } of t.sourceLinks) {
288
- if (n === e) break;
289
- o -= r;
290
- }
291
- return o;
292
- }
293
- return z.update = function (n) {
294
- return g(n), n;
295
- }, z.nodeId = function (n) {
296
- return arguments.length ? (m = "function" == typeof n ? n : i(n), z) : m;
297
- }, z.nodeAlign = function (n) {
298
- return arguments.length ? (v = "function" == typeof n ? n : i(n), z) : v;
299
- }, z.nodeSort = function (n) {
300
- return arguments.length ? (e = n, z) : e;
301
- }, z.nodeWidth = function (n) {
302
- return arguments.length ? (w = +n, z) : w;
303
- }, z.nodePadding = function (t) {
304
- return arguments.length ? (x = n = +t, z) : x;
305
- }, z.nodes = function (n) {
306
- return arguments.length ? (M = "function" == typeof n ? n : i(n), z) : M;
307
- }, z.links = function (n) {
308
- return arguments.length ? (b = "function" == typeof n ? n : i(n), z) : b;
309
- }, z.linkSort = function (n) {
310
- return arguments.length ? (o = n, z) : o;
311
- }, z.size = function (n) {
312
- return arguments.length ? (y = k = 0, L = +n[0], p = +n[1], z) : [L - y, p - k];
313
- }, z.extent = function (n) {
314
- return arguments.length ? (y = +n[0][0], L = +n[1][0], k = +n[0][1], p = +n[1][1], z) : [[y, k], [L, p]];
315
- }, z.iterations = function (n) {
316
- return arguments.length ? (S = +n, z) : S;
317
- }, z;
318
- }, n.sankeyCenter = function (n) {
319
- return n.targetLinks.length ? n.depth : n.sourceLinks.length ? t.min(n.sourceLinks, o) - 1 : 0;
320
- }, n.sankeyJustify = r, n.sankeyLeft = function (n) {
321
- return n.depth;
322
- }, n.sankeyLinkHorizontal = function () {
323
- return e.linkHorizontal().source(y).target(k);
324
- }, n.sankeyRight = function (n, t) {
325
- return t - 1 - n.height;
326
- }, Object.defineProperty(n, "__esModule", {
327
- value: !0
328
- });
329
- });
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.center = center;
7
- exports.justify = justify;
8
- exports.left = left;
9
- exports.right = right;
10
- var _index = require("../../../lib-vendor/d3-array/src/index.js");
11
- function targetDepth(d) {
12
- return d.target.depth;
13
- }
14
- function left(node) {
15
- return node.depth;
16
- }
17
- function right(node, n) {
18
- return n - 1 - node.height;
19
- }
20
- function justify(node, n) {
21
- return node.sourceLinks.length ? node.depth : n - 1;
22
- }
23
- function center(node) {
24
- return node.targetLinks.length ? node.depth : node.sourceLinks.length ? (0, _index.min)(node.sourceLinks, targetDepth) - 1 : 0;
25
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = constant;
7
- function constant(x) {
8
- return function () {
9
- return x;
10
- };
11
- }
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "sankey", {
8
- enumerable: true,
9
- get: function () {
10
- return _sankey.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "sankeyCenter", {
14
- enumerable: true,
15
- get: function () {
16
- return _align.center;
17
- }
18
- });
19
- Object.defineProperty(exports, "sankeyJustify", {
20
- enumerable: true,
21
- get: function () {
22
- return _align.justify;
23
- }
24
- });
25
- Object.defineProperty(exports, "sankeyLeft", {
26
- enumerable: true,
27
- get: function () {
28
- return _align.left;
29
- }
30
- });
31
- Object.defineProperty(exports, "sankeyLinkHorizontal", {
32
- enumerable: true,
33
- get: function () {
34
- return _sankeyLinkHorizontal.default;
35
- }
36
- });
37
- Object.defineProperty(exports, "sankeyRight", {
38
- enumerable: true,
39
- get: function () {
40
- return _align.right;
41
- }
42
- });
43
- var _sankey = _interopRequireDefault(require("./sankey.js"));
44
- var _align = require("./align.js");
45
- var _sankeyLinkHorizontal = _interopRequireDefault(require("./sankeyLinkHorizontal.js"));