Initial commit

This commit is contained in:
pasketti
2026-04-05 16:14:49 -04:00
commit ebee3a5534
14059 changed files with 2588797 additions and 0 deletions

27
node_modules/d3-chord/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,27 @@
Copyright 2010-2016 Mike Bostock
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

230
node_modules/d3-chord/build/d3-chord.js generated vendored Normal file
View File

@@ -0,0 +1,230 @@
// https://d3js.org/d3-chord/ Version 1.0.4. Copyright 2017 Mike Bostock.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-path')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-path'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3));
}(this, (function (exports,d3Array,d3Path) { 'use strict';
var cos = Math.cos;
var sin = Math.sin;
var pi = Math.PI;
var halfPi = pi / 2;
var tau = pi * 2;
var max = Math.max;
function compareValue(compare) {
return function(a, b) {
return compare(
a.source.value + a.target.value,
b.source.value + b.target.value
);
};
}
var chord = function() {
var padAngle = 0,
sortGroups = null,
sortSubgroups = null,
sortChords = null;
function chord(matrix) {
var n = matrix.length,
groupSums = [],
groupIndex = d3Array.range(n),
subgroupIndex = [],
chords = [],
groups = chords.groups = new Array(n),
subgroups = new Array(n * n),
k,
x,
x0,
dx,
i,
j;
// Compute the sum.
k = 0, i = -1; while (++i < n) {
x = 0, j = -1; while (++j < n) {
x += matrix[i][j];
}
groupSums.push(x);
subgroupIndex.push(d3Array.range(n));
k += x;
}
// Sort groups…
if (sortGroups) groupIndex.sort(function(a, b) {
return sortGroups(groupSums[a], groupSums[b]);
});
// Sort subgroups…
if (sortSubgroups) subgroupIndex.forEach(function(d, i) {
d.sort(function(a, b) {
return sortSubgroups(matrix[i][a], matrix[i][b]);
});
});
// Convert the sum to scaling factor for [0, 2pi].
// TODO Allow start and end angle to be specified?
// TODO Allow padding to be specified as percentage?
k = max(0, tau - padAngle * n) / k;
dx = k ? padAngle : tau / n;
// Compute the start and end angle for each group and subgroup.
// Note: Opera has a bug reordering object literal properties!
x = 0, i = -1; while (++i < n) {
x0 = x, j = -1; while (++j < n) {
var di = groupIndex[i],
dj = subgroupIndex[di][j],
v = matrix[di][dj],
a0 = x,
a1 = x += v * k;
subgroups[dj * n + di] = {
index: di,
subindex: dj,
startAngle: a0,
endAngle: a1,
value: v
};
}
groups[di] = {
index: di,
startAngle: x0,
endAngle: x,
value: groupSums[di]
};
x += dx;
}
// Generate chords for each (non-empty) subgroup-subgroup link.
i = -1; while (++i < n) {
j = i - 1; while (++j < n) {
var source = subgroups[j * n + i],
target = subgroups[i * n + j];
if (source.value || target.value) {
chords.push(source.value < target.value
? {source: target, target: source}
: {source: source, target: target});
}
}
}
return sortChords ? chords.sort(sortChords) : chords;
}
chord.padAngle = function(_) {
return arguments.length ? (padAngle = max(0, _), chord) : padAngle;
};
chord.sortGroups = function(_) {
return arguments.length ? (sortGroups = _, chord) : sortGroups;
};
chord.sortSubgroups = function(_) {
return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;
};
chord.sortChords = function(_) {
return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;
};
return chord;
};
var slice = Array.prototype.slice;
var constant = function(x) {
return function() {
return x;
};
};
function defaultSource(d) {
return d.source;
}
function defaultTarget(d) {
return d.target;
}
function defaultRadius(d) {
return d.radius;
}
function defaultStartAngle(d) {
return d.startAngle;
}
function defaultEndAngle(d) {
return d.endAngle;
}
var ribbon = function() {
var source = defaultSource,
target = defaultTarget,
radius = defaultRadius,
startAngle = defaultStartAngle,
endAngle = defaultEndAngle,
context = null;
function ribbon() {
var buffer,
argv = slice.call(arguments),
s = source.apply(this, argv),
t = target.apply(this, argv),
sr = +radius.apply(this, (argv[0] = s, argv)),
sa0 = startAngle.apply(this, argv) - halfPi,
sa1 = endAngle.apply(this, argv) - halfPi,
sx0 = sr * cos(sa0),
sy0 = sr * sin(sa0),
tr = +radius.apply(this, (argv[0] = t, argv)),
ta0 = startAngle.apply(this, argv) - halfPi,
ta1 = endAngle.apply(this, argv) - halfPi;
if (!context) context = buffer = d3Path.path();
context.moveTo(sx0, sy0);
context.arc(0, 0, sr, sa0, sa1);
if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?
context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0));
context.arc(0, 0, tr, ta0, ta1);
}
context.quadraticCurveTo(0, 0, sx0, sy0);
context.closePath();
if (buffer) return context = null, buffer + "" || null;
}
ribbon.radius = function(_) {
return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), ribbon) : radius;
};
ribbon.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : startAngle;
};
ribbon.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : endAngle;
};
ribbon.source = function(_) {
return arguments.length ? (source = _, ribbon) : source;
};
ribbon.target = function(_) {
return arguments.length ? (target = _, ribbon) : target;
};
ribbon.context = function(_) {
return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;
};
return ribbon;
};
exports.chord = chord;
exports.ribbon = ribbon;
Object.defineProperty(exports, '__esModule', { value: true });
})));

2
node_modules/d3-chord/build/d3-chord.min.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
// https://d3js.org/d3-chord/ Version 1.0.4. Copyright 2017 Mike Bostock.
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array"),require("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-path"],t):t(n.d3=n.d3||{},n.d3,n.d3)}(this,function(n,t,r){"use strict";function e(n){return function(t,r){return n(t.source.value+t.target.value,r.source.value+r.target.value)}}function u(n){return n.source}function o(n){return n.target}function a(n){return n.radius}function l(n){return n.startAngle}function i(n){return n.endAngle}var c=Math.cos,f=Math.sin,s=Math.PI,p=s/2,h=2*s,d=Math.max,g=function(){function n(n){var e,l,i,c,f,s,p=n.length,g=[],v=t.range(p),y=[],A=[],x=A.groups=new Array(p),b=new Array(p*p);for(e=0,f=-1;++f<p;){for(l=0,s=-1;++s<p;)l+=n[f][s];g.push(l),y.push(t.range(p)),e+=l}for(u&&v.sort(function(n,t){return u(g[n],g[t])}),o&&y.forEach(function(t,r){t.sort(function(t,e){return o(n[r][t],n[r][e])})}),e=d(0,h-r*p)/e,c=e?r:h/p,l=0,f=-1;++f<p;){for(i=l,s=-1;++s<p;){var M=v[f],m=y[M][s],q=n[M][m],_=l,C=l+=q*e;b[m*p+M]={index:M,subindex:m,startAngle:_,endAngle:C,value:q}}x[M]={index:M,startAngle:i,endAngle:l,value:g[M]},l+=c}for(f=-1;++f<p;)for(s=f-1;++s<p;){var P=b[s*p+f],T=b[f*p+s];(P.value||T.value)&&A.push(P.value<T.value?{source:T,target:P}:{source:P,target:T})}return a?A.sort(a):A}var r=0,u=null,o=null,a=null;return n.padAngle=function(t){return arguments.length?(r=d(0,t),n):r},n.sortGroups=function(t){return arguments.length?(u=t,n):u},n.sortSubgroups=function(t){return arguments.length?(o=t,n):o},n.sortChords=function(t){return arguments.length?(null==t?a=null:(a=e(t))._=t,n):a&&a._},n},v=Array.prototype.slice,y=function(n){return function(){return n}},A=function(){function n(){var n,u=v.call(arguments),o=t.apply(this,u),a=e.apply(this,u),l=+s.apply(this,(u[0]=o,u)),i=h.apply(this,u)-p,y=d.apply(this,u)-p,A=l*c(i),x=l*f(i),b=+s.apply(this,(u[0]=a,u)),M=h.apply(this,u)-p,m=d.apply(this,u)-p;if(g||(g=n=r.path()),g.moveTo(A,x),g.arc(0,0,l,i,y),i===M&&y===m||(g.quadraticCurveTo(0,0,b*c(M),b*f(M)),g.arc(0,0,b,M,m)),g.quadraticCurveTo(0,0,A,x),g.closePath(),n)return g=null,n+""||null}var t=u,e=o,s=a,h=l,d=i,g=null;return n.radius=function(t){return arguments.length?(s="function"==typeof t?t:y(+t),n):s},n.startAngle=function(t){return arguments.length?(h="function"==typeof t?t:y(+t),n):h},n.endAngle=function(t){return arguments.length?(d="function"==typeof t?t:y(+t),n):d},n.source=function(r){return arguments.length?(t=r,n):t},n.target=function(t){return arguments.length?(e=t,n):e},n.context=function(t){return arguments.length?(g=null==t?null:t,n):g},n};n.chord=g,n.ribbon=A,Object.defineProperty(n,"__esModule",{value:!0})});

BIN
node_modules/d3-chord/img/chord.png generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

2
node_modules/d3-chord/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {default as chord} from "./src/chord";
export {default as ribbon} from "./src/ribbon";

29
node_modules/d3-chord/package.json generated vendored Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "d3-chord",
"version": "1.0.4",
"description": "Visualize relationships or network flow with an aesthetically-pleasing circular layout.",
"homepage": "https://d3js.org/d3-chord/",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
"url": "http://bost.ocks.org/mike"
},
"main": "build/d3-chord.js",
"module": "index",
"jsnext:main": "index",
"repository": {
"type": "git",
"url": "https://github.com/d3/d3-chord.git"
},
"dependencies": {
"d3-array": "1",
"d3-path": "1"
},
"devDependencies": {
"eslint": "3",
"package-preamble": "0.0",
"rollup": "0.41",
"tape": "4",
"uglify-js": "^2.8.11"
}
}

1
node_modules/d3-chord/src/array.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export var slice = Array.prototype.slice;

121
node_modules/d3-chord/src/chord.js generated vendored Normal file
View File

@@ -0,0 +1,121 @@
import {range} from "d3-array";
import {max, tau} from "./math";
function compareValue(compare) {
return function(a, b) {
return compare(
a.source.value + a.target.value,
b.source.value + b.target.value
);
};
}
export default function() {
var padAngle = 0,
sortGroups = null,
sortSubgroups = null,
sortChords = null;
function chord(matrix) {
var n = matrix.length,
groupSums = [],
groupIndex = range(n),
subgroupIndex = [],
chords = [],
groups = chords.groups = new Array(n),
subgroups = new Array(n * n),
k,
x,
x0,
dx,
i,
j;
// Compute the sum.
k = 0, i = -1; while (++i < n) {
x = 0, j = -1; while (++j < n) {
x += matrix[i][j];
}
groupSums.push(x);
subgroupIndex.push(range(n));
k += x;
}
// Sort groups…
if (sortGroups) groupIndex.sort(function(a, b) {
return sortGroups(groupSums[a], groupSums[b]);
});
// Sort subgroups…
if (sortSubgroups) subgroupIndex.forEach(function(d, i) {
d.sort(function(a, b) {
return sortSubgroups(matrix[i][a], matrix[i][b]);
});
});
// Convert the sum to scaling factor for [0, 2pi].
// TODO Allow start and end angle to be specified?
// TODO Allow padding to be specified as percentage?
k = max(0, tau - padAngle * n) / k;
dx = k ? padAngle : tau / n;
// Compute the start and end angle for each group and subgroup.
// Note: Opera has a bug reordering object literal properties!
x = 0, i = -1; while (++i < n) {
x0 = x, j = -1; while (++j < n) {
var di = groupIndex[i],
dj = subgroupIndex[di][j],
v = matrix[di][dj],
a0 = x,
a1 = x += v * k;
subgroups[dj * n + di] = {
index: di,
subindex: dj,
startAngle: a0,
endAngle: a1,
value: v
};
}
groups[di] = {
index: di,
startAngle: x0,
endAngle: x,
value: groupSums[di]
};
x += dx;
}
// Generate chords for each (non-empty) subgroup-subgroup link.
i = -1; while (++i < n) {
j = i - 1; while (++j < n) {
var source = subgroups[j * n + i],
target = subgroups[i * n + j];
if (source.value || target.value) {
chords.push(source.value < target.value
? {source: target, target: source}
: {source: source, target: target});
}
}
}
return sortChords ? chords.sort(sortChords) : chords;
}
chord.padAngle = function(_) {
return arguments.length ? (padAngle = max(0, _), chord) : padAngle;
};
chord.sortGroups = function(_) {
return arguments.length ? (sortGroups = _, chord) : sortGroups;
};
chord.sortSubgroups = function(_) {
return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;
};
chord.sortChords = function(_) {
return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;
};
return chord;
}

5
node_modules/d3-chord/src/constant.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export default function(x) {
return function() {
return x;
};
}

6
node_modules/d3-chord/src/math.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export var cos = Math.cos;
export var sin = Math.sin;
export var pi = Math.PI;
export var halfPi = pi / 2;
export var tau = pi * 2;
export var max = Math.max;

87
node_modules/d3-chord/src/ribbon.js generated vendored Normal file
View File

@@ -0,0 +1,87 @@
import {slice} from "./array";
import constant from "./constant";
import {cos, halfPi, sin} from "./math";
import {path} from "d3-path";
function defaultSource(d) {
return d.source;
}
function defaultTarget(d) {
return d.target;
}
function defaultRadius(d) {
return d.radius;
}
function defaultStartAngle(d) {
return d.startAngle;
}
function defaultEndAngle(d) {
return d.endAngle;
}
export default function() {
var source = defaultSource,
target = defaultTarget,
radius = defaultRadius,
startAngle = defaultStartAngle,
endAngle = defaultEndAngle,
context = null;
function ribbon() {
var buffer,
argv = slice.call(arguments),
s = source.apply(this, argv),
t = target.apply(this, argv),
sr = +radius.apply(this, (argv[0] = s, argv)),
sa0 = startAngle.apply(this, argv) - halfPi,
sa1 = endAngle.apply(this, argv) - halfPi,
sx0 = sr * cos(sa0),
sy0 = sr * sin(sa0),
tr = +radius.apply(this, (argv[0] = t, argv)),
ta0 = startAngle.apply(this, argv) - halfPi,
ta1 = endAngle.apply(this, argv) - halfPi;
if (!context) context = buffer = path();
context.moveTo(sx0, sy0);
context.arc(0, 0, sr, sa0, sa1);
if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?
context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0));
context.arc(0, 0, tr, ta0, ta1);
}
context.quadraticCurveTo(0, 0, sx0, sy0);
context.closePath();
if (buffer) return context = null, buffer + "" || null;
}
ribbon.radius = function(_) {
return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), ribbon) : radius;
};
ribbon.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : startAngle;
};
ribbon.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : endAngle;
};
ribbon.source = function(_) {
return arguments.length ? (source = _, ribbon) : source;
};
ribbon.target = function(_) {
return arguments.length ? (target = _, ribbon) : target;
};
ribbon.context = function(_) {
return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;
};
return ribbon;
}