You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6102 lines
786 KiB
6102 lines
786 KiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
};
|
|
var __copyProps = (to, from, except, desc) => {
|
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
for (let key of __getOwnPropNames(from))
|
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
}
|
|
return to;
|
|
};
|
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
|
|
// main.ts
|
|
var main_exports = {};
|
|
__export(main_exports, {
|
|
default: () => ScGraphView
|
|
});
|
|
module.exports = __toCommonJS(main_exports);
|
|
var import_obsidian = require("obsidian");
|
|
|
|
// node_modules/d3-array/src/ascending.js
|
|
function ascending(a2, b) {
|
|
return a2 == null || b == null ? NaN : a2 < b ? -1 : a2 > b ? 1 : a2 >= b ? 0 : NaN;
|
|
}
|
|
|
|
// node_modules/d3-array/src/descending.js
|
|
function descending(a2, b) {
|
|
return a2 == null || b == null ? NaN : b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN;
|
|
}
|
|
|
|
// node_modules/d3-array/src/bisector.js
|
|
function bisector(f) {
|
|
let compare1, compare2, delta;
|
|
if (f.length !== 2) {
|
|
compare1 = ascending;
|
|
compare2 = (d, x3) => ascending(f(d), x3);
|
|
delta = (d, x3) => f(d) - x3;
|
|
} else {
|
|
compare1 = f === ascending || f === descending ? f : zero;
|
|
compare2 = f;
|
|
delta = f;
|
|
}
|
|
function left(a2, x3, lo = 0, hi = a2.length) {
|
|
if (lo < hi) {
|
|
if (compare1(x3, x3) !== 0)
|
|
return hi;
|
|
do {
|
|
const mid = lo + hi >>> 1;
|
|
if (compare2(a2[mid], x3) < 0)
|
|
lo = mid + 1;
|
|
else
|
|
hi = mid;
|
|
} while (lo < hi);
|
|
}
|
|
return lo;
|
|
}
|
|
function right(a2, x3, lo = 0, hi = a2.length) {
|
|
if (lo < hi) {
|
|
if (compare1(x3, x3) !== 0)
|
|
return hi;
|
|
do {
|
|
const mid = lo + hi >>> 1;
|
|
if (compare2(a2[mid], x3) <= 0)
|
|
lo = mid + 1;
|
|
else
|
|
hi = mid;
|
|
} while (lo < hi);
|
|
}
|
|
return lo;
|
|
}
|
|
function center(a2, x3, lo = 0, hi = a2.length) {
|
|
const i = left(a2, x3, lo, hi - 1);
|
|
return i > lo && delta(a2[i - 1], x3) > -delta(a2[i], x3) ? i - 1 : i;
|
|
}
|
|
return { left, center, right };
|
|
}
|
|
function zero() {
|
|
return 0;
|
|
}
|
|
|
|
// node_modules/d3-array/src/number.js
|
|
function number(x3) {
|
|
return x3 === null ? NaN : +x3;
|
|
}
|
|
|
|
// node_modules/d3-array/src/bisect.js
|
|
var ascendingBisect = bisector(ascending);
|
|
var bisectRight = ascendingBisect.right;
|
|
var bisectLeft = ascendingBisect.left;
|
|
var bisectCenter = bisector(number).center;
|
|
var bisect_default = bisectRight;
|
|
|
|
// node_modules/d3-array/src/ticks.js
|
|
var e10 = Math.sqrt(50);
|
|
var e5 = Math.sqrt(10);
|
|
var e2 = Math.sqrt(2);
|
|
function tickSpec(start2, stop, count) {
|
|
const step = (stop - start2) / Math.max(0, count), power = Math.floor(Math.log10(step)), error = step / Math.pow(10, power), factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
|
|
let i1, i2, inc;
|
|
if (power < 0) {
|
|
inc = Math.pow(10, -power) / factor;
|
|
i1 = Math.round(start2 * inc);
|
|
i2 = Math.round(stop * inc);
|
|
if (i1 / inc < start2)
|
|
++i1;
|
|
if (i2 / inc > stop)
|
|
--i2;
|
|
inc = -inc;
|
|
} else {
|
|
inc = Math.pow(10, power) * factor;
|
|
i1 = Math.round(start2 / inc);
|
|
i2 = Math.round(stop / inc);
|
|
if (i1 * inc < start2)
|
|
++i1;
|
|
if (i2 * inc > stop)
|
|
--i2;
|
|
}
|
|
if (i2 < i1 && 0.5 <= count && count < 2)
|
|
return tickSpec(start2, stop, count * 2);
|
|
return [i1, i2, inc];
|
|
}
|
|
function ticks(start2, stop, count) {
|
|
stop = +stop, start2 = +start2, count = +count;
|
|
if (!(count > 0))
|
|
return [];
|
|
if (start2 === stop)
|
|
return [start2];
|
|
const reverse = stop < start2, [i1, i2, inc] = reverse ? tickSpec(stop, start2, count) : tickSpec(start2, stop, count);
|
|
if (!(i2 >= i1))
|
|
return [];
|
|
const n = i2 - i1 + 1, ticks2 = new Array(n);
|
|
if (reverse) {
|
|
if (inc < 0)
|
|
for (let i = 0; i < n; ++i)
|
|
ticks2[i] = (i2 - i) / -inc;
|
|
else
|
|
for (let i = 0; i < n; ++i)
|
|
ticks2[i] = (i2 - i) * inc;
|
|
} else {
|
|
if (inc < 0)
|
|
for (let i = 0; i < n; ++i)
|
|
ticks2[i] = (i1 + i) / -inc;
|
|
else
|
|
for (let i = 0; i < n; ++i)
|
|
ticks2[i] = (i1 + i) * inc;
|
|
}
|
|
return ticks2;
|
|
}
|
|
function tickIncrement(start2, stop, count) {
|
|
stop = +stop, start2 = +start2, count = +count;
|
|
return tickSpec(start2, stop, count)[2];
|
|
}
|
|
function tickStep(start2, stop, count) {
|
|
stop = +stop, start2 = +start2, count = +count;
|
|
const reverse = stop < start2, inc = reverse ? tickIncrement(stop, start2, count) : tickIncrement(start2, stop, count);
|
|
return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
|
|
}
|
|
|
|
// node_modules/d3-dispatch/src/dispatch.js
|
|
var noop = { value: () => {
|
|
} };
|
|
function dispatch() {
|
|
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t))
|
|
throw new Error("illegal type: " + t);
|
|
_[t] = [];
|
|
}
|
|
return new Dispatch(_);
|
|
}
|
|
function Dispatch(_) {
|
|
this._ = _;
|
|
}
|
|
function parseTypenames(typenames, types) {
|
|
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
var name = "", i = t.indexOf(".");
|
|
if (i >= 0)
|
|
name = t.slice(i + 1), t = t.slice(0, i);
|
|
if (t && !types.hasOwnProperty(t))
|
|
throw new Error("unknown type: " + t);
|
|
return { type: t, name };
|
|
});
|
|
}
|
|
Dispatch.prototype = dispatch.prototype = {
|
|
constructor: Dispatch,
|
|
on: function(typename, callback) {
|
|
var _ = this._, T = parseTypenames(typename + "", _), t, i = -1, n = T.length;
|
|
if (arguments.length < 2) {
|
|
while (++i < n)
|
|
if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name)))
|
|
return t;
|
|
return;
|
|
}
|
|
if (callback != null && typeof callback !== "function")
|
|
throw new Error("invalid callback: " + callback);
|
|
while (++i < n) {
|
|
if (t = (typename = T[i]).type)
|
|
_[t] = set(_[t], typename.name, callback);
|
|
else if (callback == null)
|
|
for (t in _)
|
|
_[t] = set(_[t], typename.name, null);
|
|
}
|
|
return this;
|
|
},
|
|
copy: function() {
|
|
var copy2 = {}, _ = this._;
|
|
for (var t in _)
|
|
copy2[t] = _[t].slice();
|
|
return new Dispatch(copy2);
|
|
},
|
|
call: function(type2, that) {
|
|
if ((n = arguments.length - 2) > 0)
|
|
for (var args = new Array(n), i = 0, n, t; i < n; ++i)
|
|
args[i] = arguments[i + 2];
|
|
if (!this._.hasOwnProperty(type2))
|
|
throw new Error("unknown type: " + type2);
|
|
for (t = this._[type2], i = 0, n = t.length; i < n; ++i)
|
|
t[i].value.apply(that, args);
|
|
},
|
|
apply: function(type2, that, args) {
|
|
if (!this._.hasOwnProperty(type2))
|
|
throw new Error("unknown type: " + type2);
|
|
for (var t = this._[type2], i = 0, n = t.length; i < n; ++i)
|
|
t[i].value.apply(that, args);
|
|
}
|
|
};
|
|
function get(type2, name) {
|
|
for (var i = 0, n = type2.length, c2; i < n; ++i) {
|
|
if ((c2 = type2[i]).name === name) {
|
|
return c2.value;
|
|
}
|
|
}
|
|
}
|
|
function set(type2, name, callback) {
|
|
for (var i = 0, n = type2.length; i < n; ++i) {
|
|
if (type2[i].name === name) {
|
|
type2[i] = noop, type2 = type2.slice(0, i).concat(type2.slice(i + 1));
|
|
break;
|
|
}
|
|
}
|
|
if (callback != null)
|
|
type2.push({ name, value: callback });
|
|
return type2;
|
|
}
|
|
var dispatch_default = dispatch;
|
|
|
|
// node_modules/d3-selection/src/namespaces.js
|
|
var xhtml = "http://www.w3.org/1999/xhtml";
|
|
var namespaces_default = {
|
|
svg: "http://www.w3.org/2000/svg",
|
|
xhtml,
|
|
xlink: "http://www.w3.org/1999/xlink",
|
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
};
|
|
|
|
// node_modules/d3-selection/src/namespace.js
|
|
function namespace_default(name) {
|
|
var prefix = name += "", i = prefix.indexOf(":");
|
|
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns")
|
|
name = name.slice(i + 1);
|
|
return namespaces_default.hasOwnProperty(prefix) ? { space: namespaces_default[prefix], local: name } : name;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/creator.js
|
|
function creatorInherit(name) {
|
|
return function() {
|
|
var document2 = this.ownerDocument, uri = this.namespaceURI;
|
|
return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name) : document2.createElementNS(uri, name);
|
|
};
|
|
}
|
|
function creatorFixed(fullname) {
|
|
return function() {
|
|
return this.ownerDocument.createElementNS(fullname.space, fullname.local);
|
|
};
|
|
}
|
|
function creator_default(name) {
|
|
var fullname = namespace_default(name);
|
|
return (fullname.local ? creatorFixed : creatorInherit)(fullname);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selector.js
|
|
function none() {
|
|
}
|
|
function selector_default(selector) {
|
|
return selector == null ? none : function() {
|
|
return this.querySelector(selector);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/select.js
|
|
function select_default(select) {
|
|
if (typeof select !== "function")
|
|
select = selector_default(select);
|
|
for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
if ("__data__" in node)
|
|
subnode.__data__ = node.__data__;
|
|
subgroup[i] = subnode;
|
|
}
|
|
}
|
|
}
|
|
return new Selection(subgroups, this._parents);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/array.js
|
|
function array(x3) {
|
|
return x3 == null ? [] : Array.isArray(x3) ? x3 : Array.from(x3);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selectorAll.js
|
|
function empty() {
|
|
return [];
|
|
}
|
|
function selectorAll_default(selector) {
|
|
return selector == null ? empty : function() {
|
|
return this.querySelectorAll(selector);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/selectAll.js
|
|
function arrayAll(select) {
|
|
return function() {
|
|
return array(select.apply(this, arguments));
|
|
};
|
|
}
|
|
function selectAll_default(select) {
|
|
if (typeof select === "function")
|
|
select = arrayAll(select);
|
|
else
|
|
select = selectorAll_default(select);
|
|
for (var groups = this._groups, m2 = groups.length, subgroups = [], parents = [], j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
if (node = group[i]) {
|
|
subgroups.push(select.call(node, node.__data__, i, group));
|
|
parents.push(node);
|
|
}
|
|
}
|
|
}
|
|
return new Selection(subgroups, parents);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/matcher.js
|
|
function matcher_default(selector) {
|
|
return function() {
|
|
return this.matches(selector);
|
|
};
|
|
}
|
|
function childMatcher(selector) {
|
|
return function(node) {
|
|
return node.matches(selector);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/selectChild.js
|
|
var find = Array.prototype.find;
|
|
function childFind(match) {
|
|
return function() {
|
|
return find.call(this.children, match);
|
|
};
|
|
}
|
|
function childFirst() {
|
|
return this.firstElementChild;
|
|
}
|
|
function selectChild_default(match) {
|
|
return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/selectChildren.js
|
|
var filter = Array.prototype.filter;
|
|
function children() {
|
|
return Array.from(this.children);
|
|
}
|
|
function childrenFilter(match) {
|
|
return function() {
|
|
return filter.call(this.children, match);
|
|
};
|
|
}
|
|
function selectChildren_default(match) {
|
|
return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/filter.js
|
|
function filter_default(match) {
|
|
if (typeof match !== "function")
|
|
match = matcher_default(match);
|
|
for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
subgroup.push(node);
|
|
}
|
|
}
|
|
}
|
|
return new Selection(subgroups, this._parents);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/sparse.js
|
|
function sparse_default(update) {
|
|
return new Array(update.length);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/enter.js
|
|
function enter_default() {
|
|
return new Selection(this._enter || this._groups.map(sparse_default), this._parents);
|
|
}
|
|
function EnterNode(parent, datum2) {
|
|
this.ownerDocument = parent.ownerDocument;
|
|
this.namespaceURI = parent.namespaceURI;
|
|
this._next = null;
|
|
this._parent = parent;
|
|
this.__data__ = datum2;
|
|
}
|
|
EnterNode.prototype = {
|
|
constructor: EnterNode,
|
|
appendChild: function(child) {
|
|
return this._parent.insertBefore(child, this._next);
|
|
},
|
|
insertBefore: function(child, next) {
|
|
return this._parent.insertBefore(child, next);
|
|
},
|
|
querySelector: function(selector) {
|
|
return this._parent.querySelector(selector);
|
|
},
|
|
querySelectorAll: function(selector) {
|
|
return this._parent.querySelectorAll(selector);
|
|
}
|
|
};
|
|
|
|
// node_modules/d3-selection/src/constant.js
|
|
function constant_default(x3) {
|
|
return function() {
|
|
return x3;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/data.js
|
|
function bindIndex(parent, group, enter, update, exit, data) {
|
|
var i = 0, node, groupLength = group.length, dataLength = data.length;
|
|
for (; i < dataLength; ++i) {
|
|
if (node = group[i]) {
|
|
node.__data__ = data[i];
|
|
update[i] = node;
|
|
} else {
|
|
enter[i] = new EnterNode(parent, data[i]);
|
|
}
|
|
}
|
|
for (; i < groupLength; ++i) {
|
|
if (node = group[i]) {
|
|
exit[i] = node;
|
|
}
|
|
}
|
|
}
|
|
function bindKey(parent, group, enter, update, exit, data, key) {
|
|
var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
|
|
for (i = 0; i < groupLength; ++i) {
|
|
if (node = group[i]) {
|
|
keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
|
|
if (nodeByKeyValue.has(keyValue)) {
|
|
exit[i] = node;
|
|
} else {
|
|
nodeByKeyValue.set(keyValue, node);
|
|
}
|
|
}
|
|
}
|
|
for (i = 0; i < dataLength; ++i) {
|
|
keyValue = key.call(parent, data[i], i, data) + "";
|
|
if (node = nodeByKeyValue.get(keyValue)) {
|
|
update[i] = node;
|
|
node.__data__ = data[i];
|
|
nodeByKeyValue.delete(keyValue);
|
|
} else {
|
|
enter[i] = new EnterNode(parent, data[i]);
|
|
}
|
|
}
|
|
for (i = 0; i < groupLength; ++i) {
|
|
if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
|
|
exit[i] = node;
|
|
}
|
|
}
|
|
}
|
|
function datum(node) {
|
|
return node.__data__;
|
|
}
|
|
function data_default(value, key) {
|
|
if (!arguments.length)
|
|
return Array.from(this, datum);
|
|
var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
|
|
if (typeof value !== "function")
|
|
value = constant_default(value);
|
|
for (var m2 = groups.length, update = new Array(m2), enter = new Array(m2), exit = new Array(m2), j = 0; j < m2; ++j) {
|
|
var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
|
|
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
if (previous = enterGroup[i0]) {
|
|
if (i0 >= i1)
|
|
i1 = i0 + 1;
|
|
while (!(next = updateGroup[i1]) && ++i1 < dataLength)
|
|
;
|
|
previous._next = next || null;
|
|
}
|
|
}
|
|
}
|
|
update = new Selection(update, parents);
|
|
update._enter = enter;
|
|
update._exit = exit;
|
|
return update;
|
|
}
|
|
function arraylike(data) {
|
|
return typeof data === "object" && "length" in data ? data : Array.from(data);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/exit.js
|
|
function exit_default() {
|
|
return new Selection(this._exit || this._groups.map(sparse_default), this._parents);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/join.js
|
|
function join_default(onenter, onupdate, onexit) {
|
|
var enter = this.enter(), update = this, exit = this.exit();
|
|
if (typeof onenter === "function") {
|
|
enter = onenter(enter);
|
|
if (enter)
|
|
enter = enter.selection();
|
|
} else {
|
|
enter = enter.append(onenter + "");
|
|
}
|
|
if (onupdate != null) {
|
|
update = onupdate(update);
|
|
if (update)
|
|
update = update.selection();
|
|
}
|
|
if (onexit == null)
|
|
exit.remove();
|
|
else
|
|
onexit(exit);
|
|
return enter && update ? enter.merge(update).order() : update;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/merge.js
|
|
function merge_default(context) {
|
|
var selection2 = context.selection ? context.selection() : context;
|
|
for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m2 = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m2; ++j) {
|
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
if (node = group0[i] || group1[i]) {
|
|
merge[i] = node;
|
|
}
|
|
}
|
|
}
|
|
for (; j < m0; ++j) {
|
|
merges[j] = groups0[j];
|
|
}
|
|
return new Selection(merges, this._parents);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/order.js
|
|
function order_default() {
|
|
for (var groups = this._groups, j = -1, m2 = groups.length; ++j < m2; ) {
|
|
for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
|
|
if (node = group[i]) {
|
|
if (next && node.compareDocumentPosition(next) ^ 4)
|
|
next.parentNode.insertBefore(node, next);
|
|
next = node;
|
|
}
|
|
}
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/sort.js
|
|
function sort_default(compare) {
|
|
if (!compare)
|
|
compare = ascending2;
|
|
function compareNode(a2, b) {
|
|
return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
|
|
}
|
|
for (var groups = this._groups, m2 = groups.length, sortgroups = new Array(m2), j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
if (node = group[i]) {
|
|
sortgroup[i] = node;
|
|
}
|
|
}
|
|
sortgroup.sort(compareNode);
|
|
}
|
|
return new Selection(sortgroups, this._parents).order();
|
|
}
|
|
function ascending2(a2, b) {
|
|
return a2 < b ? -1 : a2 > b ? 1 : a2 >= b ? 0 : NaN;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/call.js
|
|
function call_default() {
|
|
var callback = arguments[0];
|
|
arguments[0] = this;
|
|
callback.apply(null, arguments);
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/nodes.js
|
|
function nodes_default() {
|
|
return Array.from(this);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/node.js
|
|
function node_default() {
|
|
for (var groups = this._groups, j = 0, m2 = groups.length; j < m2; ++j) {
|
|
for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
|
|
var node = group[i];
|
|
if (node)
|
|
return node;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/size.js
|
|
function size_default() {
|
|
let size = 0;
|
|
for (const node of this)
|
|
++size;
|
|
return size;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/empty.js
|
|
function empty_default() {
|
|
return !this.node();
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/each.js
|
|
function each_default(callback) {
|
|
for (var groups = this._groups, j = 0, m2 = groups.length; j < m2; ++j) {
|
|
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
|
|
if (node = group[i])
|
|
callback.call(node, node.__data__, i, group);
|
|
}
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/attr.js
|
|
function attrRemove(name) {
|
|
return function() {
|
|
this.removeAttribute(name);
|
|
};
|
|
}
|
|
function attrRemoveNS(fullname) {
|
|
return function() {
|
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
};
|
|
}
|
|
function attrConstant(name, value) {
|
|
return function() {
|
|
this.setAttribute(name, value);
|
|
};
|
|
}
|
|
function attrConstantNS(fullname, value) {
|
|
return function() {
|
|
this.setAttributeNS(fullname.space, fullname.local, value);
|
|
};
|
|
}
|
|
function attrFunction(name, value) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
if (v == null)
|
|
this.removeAttribute(name);
|
|
else
|
|
this.setAttribute(name, v);
|
|
};
|
|
}
|
|
function attrFunctionNS(fullname, value) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
if (v == null)
|
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
else
|
|
this.setAttributeNS(fullname.space, fullname.local, v);
|
|
};
|
|
}
|
|
function attr_default(name, value) {
|
|
var fullname = namespace_default(name);
|
|
if (arguments.length < 2) {
|
|
var node = this.node();
|
|
return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
|
|
}
|
|
return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === "function" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));
|
|
}
|
|
|
|
// node_modules/d3-selection/src/window.js
|
|
function window_default(node) {
|
|
return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/style.js
|
|
function styleRemove(name) {
|
|
return function() {
|
|
this.style.removeProperty(name);
|
|
};
|
|
}
|
|
function styleConstant(name, value, priority) {
|
|
return function() {
|
|
this.style.setProperty(name, value, priority);
|
|
};
|
|
}
|
|
function styleFunction(name, value, priority) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
if (v == null)
|
|
this.style.removeProperty(name);
|
|
else
|
|
this.style.setProperty(name, v, priority);
|
|
};
|
|
}
|
|
function style_default(name, value, priority) {
|
|
return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
|
|
}
|
|
function styleValue(node, name) {
|
|
return node.style.getPropertyValue(name) || window_default(node).getComputedStyle(node, null).getPropertyValue(name);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/property.js
|
|
function propertyRemove(name) {
|
|
return function() {
|
|
delete this[name];
|
|
};
|
|
}
|
|
function propertyConstant(name, value) {
|
|
return function() {
|
|
this[name] = value;
|
|
};
|
|
}
|
|
function propertyFunction(name, value) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
if (v == null)
|
|
delete this[name];
|
|
else
|
|
this[name] = v;
|
|
};
|
|
}
|
|
function property_default(name, value) {
|
|
return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/classed.js
|
|
function classArray(string) {
|
|
return string.trim().split(/^|\s+/);
|
|
}
|
|
function classList(node) {
|
|
return node.classList || new ClassList(node);
|
|
}
|
|
function ClassList(node) {
|
|
this._node = node;
|
|
this._names = classArray(node.getAttribute("class") || "");
|
|
}
|
|
ClassList.prototype = {
|
|
add: function(name) {
|
|
var i = this._names.indexOf(name);
|
|
if (i < 0) {
|
|
this._names.push(name);
|
|
this._node.setAttribute("class", this._names.join(" "));
|
|
}
|
|
},
|
|
remove: function(name) {
|
|
var i = this._names.indexOf(name);
|
|
if (i >= 0) {
|
|
this._names.splice(i, 1);
|
|
this._node.setAttribute("class", this._names.join(" "));
|
|
}
|
|
},
|
|
contains: function(name) {
|
|
return this._names.indexOf(name) >= 0;
|
|
}
|
|
};
|
|
function classedAdd(node, names) {
|
|
var list = classList(node), i = -1, n = names.length;
|
|
while (++i < n)
|
|
list.add(names[i]);
|
|
}
|
|
function classedRemove(node, names) {
|
|
var list = classList(node), i = -1, n = names.length;
|
|
while (++i < n)
|
|
list.remove(names[i]);
|
|
}
|
|
function classedTrue(names) {
|
|
return function() {
|
|
classedAdd(this, names);
|
|
};
|
|
}
|
|
function classedFalse(names) {
|
|
return function() {
|
|
classedRemove(this, names);
|
|
};
|
|
}
|
|
function classedFunction(names, value) {
|
|
return function() {
|
|
(value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
|
|
};
|
|
}
|
|
function classed_default(name, value) {
|
|
var names = classArray(name + "");
|
|
if (arguments.length < 2) {
|
|
var list = classList(this.node()), i = -1, n = names.length;
|
|
while (++i < n)
|
|
if (!list.contains(names[i]))
|
|
return false;
|
|
return true;
|
|
}
|
|
return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/text.js
|
|
function textRemove() {
|
|
this.textContent = "";
|
|
}
|
|
function textConstant(value) {
|
|
return function() {
|
|
this.textContent = value;
|
|
};
|
|
}
|
|
function textFunction(value) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
this.textContent = v == null ? "" : v;
|
|
};
|
|
}
|
|
function text_default(value) {
|
|
return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/html.js
|
|
function htmlRemove() {
|
|
this.innerHTML = "";
|
|
}
|
|
function htmlConstant(value) {
|
|
return function() {
|
|
this.innerHTML = value;
|
|
};
|
|
}
|
|
function htmlFunction(value) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
this.innerHTML = v == null ? "" : v;
|
|
};
|
|
}
|
|
function html_default(value) {
|
|
return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/raise.js
|
|
function raise() {
|
|
if (this.nextSibling)
|
|
this.parentNode.appendChild(this);
|
|
}
|
|
function raise_default() {
|
|
return this.each(raise);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/lower.js
|
|
function lower() {
|
|
if (this.previousSibling)
|
|
this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
}
|
|
function lower_default() {
|
|
return this.each(lower);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/append.js
|
|
function append_default(name) {
|
|
var create2 = typeof name === "function" ? name : creator_default(name);
|
|
return this.select(function() {
|
|
return this.appendChild(create2.apply(this, arguments));
|
|
});
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/insert.js
|
|
function constantNull() {
|
|
return null;
|
|
}
|
|
function insert_default(name, before) {
|
|
var create2 = typeof name === "function" ? name : creator_default(name), select = before == null ? constantNull : typeof before === "function" ? before : selector_default(before);
|
|
return this.select(function() {
|
|
return this.insertBefore(create2.apply(this, arguments), select.apply(this, arguments) || null);
|
|
});
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/remove.js
|
|
function remove() {
|
|
var parent = this.parentNode;
|
|
if (parent)
|
|
parent.removeChild(this);
|
|
}
|
|
function remove_default() {
|
|
return this.each(remove);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/clone.js
|
|
function selection_cloneShallow() {
|
|
var clone = this.cloneNode(false), parent = this.parentNode;
|
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
}
|
|
function selection_cloneDeep() {
|
|
var clone = this.cloneNode(true), parent = this.parentNode;
|
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
}
|
|
function clone_default(deep) {
|
|
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/datum.js
|
|
function datum_default(value) {
|
|
return arguments.length ? this.property("__data__", value) : this.node().__data__;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/on.js
|
|
function contextListener(listener) {
|
|
return function(event) {
|
|
listener.call(this, event, this.__data__);
|
|
};
|
|
}
|
|
function parseTypenames2(typenames) {
|
|
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
var name = "", i = t.indexOf(".");
|
|
if (i >= 0)
|
|
name = t.slice(i + 1), t = t.slice(0, i);
|
|
return { type: t, name };
|
|
});
|
|
}
|
|
function onRemove(typename) {
|
|
return function() {
|
|
var on = this.__on;
|
|
if (!on)
|
|
return;
|
|
for (var j = 0, i = -1, m2 = on.length, o; j < m2; ++j) {
|
|
if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
|
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
} else {
|
|
on[++i] = o;
|
|
}
|
|
}
|
|
if (++i)
|
|
on.length = i;
|
|
else
|
|
delete this.__on;
|
|
};
|
|
}
|
|
function onAdd(typename, value, options) {
|
|
return function() {
|
|
var on = this.__on, o, listener = contextListener(value);
|
|
if (on)
|
|
for (var j = 0, m2 = on.length; j < m2; ++j) {
|
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
this.addEventListener(o.type, o.listener = listener, o.options = options);
|
|
o.value = value;
|
|
return;
|
|
}
|
|
}
|
|
this.addEventListener(typename.type, listener, options);
|
|
o = { type: typename.type, name: typename.name, value, listener, options };
|
|
if (!on)
|
|
this.__on = [o];
|
|
else
|
|
on.push(o);
|
|
};
|
|
}
|
|
function on_default(typename, value, options) {
|
|
var typenames = parseTypenames2(typename + ""), i, n = typenames.length, t;
|
|
if (arguments.length < 2) {
|
|
var on = this.node().__on;
|
|
if (on)
|
|
for (var j = 0, m2 = on.length, o; j < m2; ++j) {
|
|
for (i = 0, o = on[j]; i < n; ++i) {
|
|
if ((t = typenames[i]).type === o.type && t.name === o.name) {
|
|
return o.value;
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
on = value ? onAdd : onRemove;
|
|
for (i = 0; i < n; ++i)
|
|
this.each(on(typenames[i], value, options));
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/dispatch.js
|
|
function dispatchEvent(node, type2, params) {
|
|
var window2 = window_default(node), event = window2.CustomEvent;
|
|
if (typeof event === "function") {
|
|
event = new event(type2, params);
|
|
} else {
|
|
event = window2.document.createEvent("Event");
|
|
if (params)
|
|
event.initEvent(type2, params.bubbles, params.cancelable), event.detail = params.detail;
|
|
else
|
|
event.initEvent(type2, false, false);
|
|
}
|
|
node.dispatchEvent(event);
|
|
}
|
|
function dispatchConstant(type2, params) {
|
|
return function() {
|
|
return dispatchEvent(this, type2, params);
|
|
};
|
|
}
|
|
function dispatchFunction(type2, params) {
|
|
return function() {
|
|
return dispatchEvent(this, type2, params.apply(this, arguments));
|
|
};
|
|
}
|
|
function dispatch_default2(type2, params) {
|
|
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type2, params));
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/iterator.js
|
|
function* iterator_default() {
|
|
for (var groups = this._groups, j = 0, m2 = groups.length; j < m2; ++j) {
|
|
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
|
|
if (node = group[i])
|
|
yield node;
|
|
}
|
|
}
|
|
}
|
|
|
|
// node_modules/d3-selection/src/selection/index.js
|
|
var root = [null];
|
|
function Selection(groups, parents) {
|
|
this._groups = groups;
|
|
this._parents = parents;
|
|
}
|
|
function selection() {
|
|
return new Selection([[document.documentElement]], root);
|
|
}
|
|
function selection_selection() {
|
|
return this;
|
|
}
|
|
Selection.prototype = selection.prototype = {
|
|
constructor: Selection,
|
|
select: select_default,
|
|
selectAll: selectAll_default,
|
|
selectChild: selectChild_default,
|
|
selectChildren: selectChildren_default,
|
|
filter: filter_default,
|
|
data: data_default,
|
|
enter: enter_default,
|
|
exit: exit_default,
|
|
join: join_default,
|
|
merge: merge_default,
|
|
selection: selection_selection,
|
|
order: order_default,
|
|
sort: sort_default,
|
|
call: call_default,
|
|
nodes: nodes_default,
|
|
node: node_default,
|
|
size: size_default,
|
|
empty: empty_default,
|
|
each: each_default,
|
|
attr: attr_default,
|
|
style: style_default,
|
|
property: property_default,
|
|
classed: classed_default,
|
|
text: text_default,
|
|
html: html_default,
|
|
raise: raise_default,
|
|
lower: lower_default,
|
|
append: append_default,
|
|
insert: insert_default,
|
|
remove: remove_default,
|
|
clone: clone_default,
|
|
datum: datum_default,
|
|
on: on_default,
|
|
dispatch: dispatch_default2,
|
|
[Symbol.iterator]: iterator_default
|
|
};
|
|
var selection_default = selection;
|
|
|
|
// node_modules/d3-selection/src/select.js
|
|
function select_default2(selector) {
|
|
return typeof selector === "string" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root);
|
|
}
|
|
|
|
// node_modules/d3-selection/src/sourceEvent.js
|
|
function sourceEvent_default(event) {
|
|
let sourceEvent;
|
|
while (sourceEvent = event.sourceEvent)
|
|
event = sourceEvent;
|
|
return event;
|
|
}
|
|
|
|
// node_modules/d3-selection/src/pointer.js
|
|
function pointer_default(event, node) {
|
|
event = sourceEvent_default(event);
|
|
if (node === void 0)
|
|
node = event.currentTarget;
|
|
if (node) {
|
|
var svg = node.ownerSVGElement || node;
|
|
if (svg.createSVGPoint) {
|
|
var point = svg.createSVGPoint();
|
|
point.x = event.clientX, point.y = event.clientY;
|
|
point = point.matrixTransform(node.getScreenCTM().inverse());
|
|
return [point.x, point.y];
|
|
}
|
|
if (node.getBoundingClientRect) {
|
|
var rect = node.getBoundingClientRect();
|
|
return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
|
|
}
|
|
}
|
|
return [event.pageX, event.pageY];
|
|
}
|
|
|
|
// node_modules/d3-drag/src/noevent.js
|
|
var nonpassive = { passive: false };
|
|
var nonpassivecapture = { capture: true, passive: false };
|
|
function nopropagation(event) {
|
|
event.stopImmediatePropagation();
|
|
}
|
|
function noevent_default(event) {
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
|
|
// node_modules/d3-drag/src/nodrag.js
|
|
function nodrag_default(view) {
|
|
var root2 = view.document.documentElement, selection2 = select_default2(view).on("dragstart.drag", noevent_default, nonpassivecapture);
|
|
if ("onselectstart" in root2) {
|
|
selection2.on("selectstart.drag", noevent_default, nonpassivecapture);
|
|
} else {
|
|
root2.__noselect = root2.style.MozUserSelect;
|
|
root2.style.MozUserSelect = "none";
|
|
}
|
|
}
|
|
function yesdrag(view, noclick) {
|
|
var root2 = view.document.documentElement, selection2 = select_default2(view).on("dragstart.drag", null);
|
|
if (noclick) {
|
|
selection2.on("click.drag", noevent_default, nonpassivecapture);
|
|
setTimeout(function() {
|
|
selection2.on("click.drag", null);
|
|
}, 0);
|
|
}
|
|
if ("onselectstart" in root2) {
|
|
selection2.on("selectstart.drag", null);
|
|
} else {
|
|
root2.style.MozUserSelect = root2.__noselect;
|
|
delete root2.__noselect;
|
|
}
|
|
}
|
|
|
|
// node_modules/d3-drag/src/constant.js
|
|
var constant_default2 = (x3) => () => x3;
|
|
|
|
// node_modules/d3-drag/src/event.js
|
|
function DragEvent(type2, {
|
|
sourceEvent,
|
|
subject,
|
|
target,
|
|
identifier,
|
|
active,
|
|
x: x3,
|
|
y: y3,
|
|
dx,
|
|
dy,
|
|
dispatch: dispatch2
|
|
}) {
|
|
Object.defineProperties(this, {
|
|
type: { value: type2, enumerable: true, configurable: true },
|
|
sourceEvent: { value: sourceEvent, enumerable: true, configurable: true },
|
|
subject: { value: subject, enumerable: true, configurable: true },
|
|
target: { value: target, enumerable: true, configurable: true },
|
|
identifier: { value: identifier, enumerable: true, configurable: true },
|
|
active: { value: active, enumerable: true, configurable: true },
|
|
x: { value: x3, enumerable: true, configurable: true },
|
|
y: { value: y3, enumerable: true, configurable: true },
|
|
dx: { value: dx, enumerable: true, configurable: true },
|
|
dy: { value: dy, enumerable: true, configurable: true },
|
|
_: { value: dispatch2 }
|
|
});
|
|
}
|
|
DragEvent.prototype.on = function() {
|
|
var value = this._.on.apply(this._, arguments);
|
|
return value === this._ ? this : value;
|
|
};
|
|
|
|
// node_modules/d3-drag/src/drag.js
|
|
function defaultFilter(event) {
|
|
return !event.ctrlKey && !event.button;
|
|
}
|
|
function defaultContainer() {
|
|
return this.parentNode;
|
|
}
|
|
function defaultSubject(event, d) {
|
|
return d == null ? { x: event.x, y: event.y } : d;
|
|
}
|
|
function defaultTouchable() {
|
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
}
|
|
function drag_default() {
|
|
var filter2 = defaultFilter, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable, gestures = {}, listeners = dispatch_default("start", "drag", "end"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0;
|
|
function drag(selection2) {
|
|
selection2.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
}
|
|
function mousedowned(event, d) {
|
|
if (touchending || !filter2.call(this, event, d))
|
|
return;
|
|
var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse");
|
|
if (!gesture)
|
|
return;
|
|
select_default2(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture);
|
|
nodrag_default(event.view);
|
|
nopropagation(event);
|
|
mousemoving = false;
|
|
mousedownx = event.clientX;
|
|
mousedowny = event.clientY;
|
|
gesture("start", event);
|
|
}
|
|
function mousemoved(event) {
|
|
noevent_default(event);
|
|
if (!mousemoving) {
|
|
var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;
|
|
mousemoving = dx * dx + dy * dy > clickDistance2;
|
|
}
|
|
gestures.mouse("drag", event);
|
|
}
|
|
function mouseupped(event) {
|
|
select_default2(event.view).on("mousemove.drag mouseup.drag", null);
|
|
yesdrag(event.view, mousemoving);
|
|
noevent_default(event);
|
|
gestures.mouse("end", event);
|
|
}
|
|
function touchstarted(event, d) {
|
|
if (!filter2.call(this, event, d))
|
|
return;
|
|
var touches = event.changedTouches, c2 = container.call(this, event, d), n = touches.length, i, gesture;
|
|
for (i = 0; i < n; ++i) {
|
|
if (gesture = beforestart(this, c2, event, d, touches[i].identifier, touches[i])) {
|
|
nopropagation(event);
|
|
gesture("start", event, touches[i]);
|
|
}
|
|
}
|
|
}
|
|
function touchmoved(event) {
|
|
var touches = event.changedTouches, n = touches.length, i, gesture;
|
|
for (i = 0; i < n; ++i) {
|
|
if (gesture = gestures[touches[i].identifier]) {
|
|
noevent_default(event);
|
|
gesture("drag", event, touches[i]);
|
|
}
|
|
}
|
|
}
|
|
function touchended(event) {
|
|
var touches = event.changedTouches, n = touches.length, i, gesture;
|
|
if (touchending)
|
|
clearTimeout(touchending);
|
|
touchending = setTimeout(function() {
|
|
touchending = null;
|
|
}, 500);
|
|
for (i = 0; i < n; ++i) {
|
|
if (gesture = gestures[touches[i].identifier]) {
|
|
nopropagation(event);
|
|
gesture("end", event, touches[i]);
|
|
}
|
|
}
|
|
}
|
|
function beforestart(that, container2, event, d, identifier, touch) {
|
|
var dispatch2 = listeners.copy(), p = pointer_default(touch || event, container2), dx, dy, s;
|
|
if ((s = subject.call(that, new DragEvent("beforestart", {
|
|
sourceEvent: event,
|
|
target: drag,
|
|
identifier,
|
|
active,
|
|
x: p[0],
|
|
y: p[1],
|
|
dx: 0,
|
|
dy: 0,
|
|
dispatch: dispatch2
|
|
}), d)) == null)
|
|
return;
|
|
dx = s.x - p[0] || 0;
|
|
dy = s.y - p[1] || 0;
|
|
return function gesture(type2, event2, touch2) {
|
|
var p0 = p, n;
|
|
switch (type2) {
|
|
case "start":
|
|
gestures[identifier] = gesture, n = active++;
|
|
break;
|
|
case "end":
|
|
delete gestures[identifier], --active;
|
|
case "drag":
|
|
p = pointer_default(touch2 || event2, container2), n = active;
|
|
break;
|
|
}
|
|
dispatch2.call(
|
|
type2,
|
|
that,
|
|
new DragEvent(type2, {
|
|
sourceEvent: event2,
|
|
subject: s,
|
|
target: drag,
|
|
identifier,
|
|
active: n,
|
|
x: p[0] + dx,
|
|
y: p[1] + dy,
|
|
dx: p[0] - p0[0],
|
|
dy: p[1] - p0[1],
|
|
dispatch: dispatch2
|
|
}),
|
|
d
|
|
);
|
|
};
|
|
}
|
|
drag.filter = function(_) {
|
|
return arguments.length ? (filter2 = typeof _ === "function" ? _ : constant_default2(!!_), drag) : filter2;
|
|
};
|
|
drag.container = function(_) {
|
|
return arguments.length ? (container = typeof _ === "function" ? _ : constant_default2(_), drag) : container;
|
|
};
|
|
drag.subject = function(_) {
|
|
return arguments.length ? (subject = typeof _ === "function" ? _ : constant_default2(_), drag) : subject;
|
|
};
|
|
drag.touchable = function(_) {
|
|
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant_default2(!!_), drag) : touchable;
|
|
};
|
|
drag.on = function() {
|
|
var value = listeners.on.apply(listeners, arguments);
|
|
return value === listeners ? drag : value;
|
|
};
|
|
drag.clickDistance = function(_) {
|
|
return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
|
|
};
|
|
return drag;
|
|
}
|
|
|
|
// node_modules/d3-color/src/define.js
|
|
function define_default(constructor, factory, prototype) {
|
|
constructor.prototype = factory.prototype = prototype;
|
|
prototype.constructor = constructor;
|
|
}
|
|
function extend(parent, definition) {
|
|
var prototype = Object.create(parent.prototype);
|
|
for (var key in definition)
|
|
prototype[key] = definition[key];
|
|
return prototype;
|
|
}
|
|
|
|
// node_modules/d3-color/src/color.js
|
|
function Color() {
|
|
}
|
|
var darker = 0.7;
|
|
var brighter = 1 / darker;
|
|
var reI = "\\s*([+-]?\\d+)\\s*";
|
|
var reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*";
|
|
var reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
|
|
var reHex = /^#([0-9a-f]{3,8})$/;
|
|
var reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`);
|
|
var reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`);
|
|
var reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`);
|
|
var reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`);
|
|
var reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`);
|
|
var reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
|
var named = {
|
|
aliceblue: 15792383,
|
|
antiquewhite: 16444375,
|
|
aqua: 65535,
|
|
aquamarine: 8388564,
|
|
azure: 15794175,
|
|
beige: 16119260,
|
|
bisque: 16770244,
|
|
black: 0,
|
|
blanchedalmond: 16772045,
|
|
blue: 255,
|
|
blueviolet: 9055202,
|
|
brown: 10824234,
|
|
burlywood: 14596231,
|
|
cadetblue: 6266528,
|
|
chartreuse: 8388352,
|
|
chocolate: 13789470,
|
|
coral: 16744272,
|
|
cornflowerblue: 6591981,
|
|
cornsilk: 16775388,
|
|
crimson: 14423100,
|
|
cyan: 65535,
|
|
darkblue: 139,
|
|
darkcyan: 35723,
|
|
darkgoldenrod: 12092939,
|
|
darkgray: 11119017,
|
|
darkgreen: 25600,
|
|
darkgrey: 11119017,
|
|
darkkhaki: 12433259,
|
|
darkmagenta: 9109643,
|
|
darkolivegreen: 5597999,
|
|
darkorange: 16747520,
|
|
darkorchid: 10040012,
|
|
darkred: 9109504,
|
|
darksalmon: 15308410,
|
|
darkseagreen: 9419919,
|
|
darkslateblue: 4734347,
|
|
darkslategray: 3100495,
|
|
darkslategrey: 3100495,
|
|
darkturquoise: 52945,
|
|
darkviolet: 9699539,
|
|
deeppink: 16716947,
|
|
deepskyblue: 49151,
|
|
dimgray: 6908265,
|
|
dimgrey: 6908265,
|
|
dodgerblue: 2003199,
|
|
firebrick: 11674146,
|
|
floralwhite: 16775920,
|
|
forestgreen: 2263842,
|
|
fuchsia: 16711935,
|
|
gainsboro: 14474460,
|
|
ghostwhite: 16316671,
|
|
gold: 16766720,
|
|
goldenrod: 14329120,
|
|
gray: 8421504,
|
|
green: 32768,
|
|
greenyellow: 11403055,
|
|
grey: 8421504,
|
|
honeydew: 15794160,
|
|
hotpink: 16738740,
|
|
indianred: 13458524,
|
|
indigo: 4915330,
|
|
ivory: 16777200,
|
|
khaki: 15787660,
|
|
lavender: 15132410,
|
|
lavenderblush: 16773365,
|
|
lawngreen: 8190976,
|
|
lemonchiffon: 16775885,
|
|
lightblue: 11393254,
|
|
lightcoral: 15761536,
|
|
lightcyan: 14745599,
|
|
lightgoldenrodyellow: 16448210,
|
|
lightgray: 13882323,
|
|
lightgreen: 9498256,
|
|
lightgrey: 13882323,
|
|
lightpink: 16758465,
|
|
lightsalmon: 16752762,
|
|
lightseagreen: 2142890,
|
|
lightskyblue: 8900346,
|
|
lightslategray: 7833753,
|
|
lightslategrey: 7833753,
|
|
lightsteelblue: 11584734,
|
|
lightyellow: 16777184,
|
|
lime: 65280,
|
|
limegreen: 3329330,
|
|
linen: 16445670,
|
|
magenta: 16711935,
|
|
maroon: 8388608,
|
|
mediumaquamarine: 6737322,
|
|
mediumblue: 205,
|
|
mediumorchid: 12211667,
|
|
mediumpurple: 9662683,
|
|
mediumseagreen: 3978097,
|
|
mediumslateblue: 8087790,
|
|
mediumspringgreen: 64154,
|
|
mediumturquoise: 4772300,
|
|
mediumvioletred: 13047173,
|
|
midnightblue: 1644912,
|
|
mintcream: 16121850,
|
|
mistyrose: 16770273,
|
|
moccasin: 16770229,
|
|
navajowhite: 16768685,
|
|
navy: 128,
|
|
oldlace: 16643558,
|
|
olive: 8421376,
|
|
olivedrab: 7048739,
|
|
orange: 16753920,
|
|
orangered: 16729344,
|
|
orchid: 14315734,
|
|
palegoldenrod: 15657130,
|
|
palegreen: 10025880,
|
|
paleturquoise: 11529966,
|
|
palevioletred: 14381203,
|
|
papayawhip: 16773077,
|
|
peachpuff: 16767673,
|
|
peru: 13468991,
|
|
pink: 16761035,
|
|
plum: 14524637,
|
|
powderblue: 11591910,
|
|
purple: 8388736,
|
|
rebeccapurple: 6697881,
|
|
red: 16711680,
|
|
rosybrown: 12357519,
|
|
royalblue: 4286945,
|
|
saddlebrown: 9127187,
|
|
salmon: 16416882,
|
|
sandybrown: 16032864,
|
|
seagreen: 3050327,
|
|
seashell: 16774638,
|
|
sienna: 10506797,
|
|
silver: 12632256,
|
|
skyblue: 8900331,
|
|
slateblue: 6970061,
|
|
slategray: 7372944,
|
|
slategrey: 7372944,
|
|
snow: 16775930,
|
|
springgreen: 65407,
|
|
steelblue: 4620980,
|
|
tan: 13808780,
|
|
teal: 32896,
|
|
thistle: 14204888,
|
|
tomato: 16737095,
|
|
turquoise: 4251856,
|
|
violet: 15631086,
|
|
wheat: 16113331,
|
|
white: 16777215,
|
|
whitesmoke: 16119285,
|
|
yellow: 16776960,
|
|
yellowgreen: 10145074
|
|
};
|
|
define_default(Color, color, {
|
|
copy(channels) {
|
|
return Object.assign(new this.constructor(), this, channels);
|
|
},
|
|
displayable() {
|
|
return this.rgb().displayable();
|
|
},
|
|
hex: color_formatHex,
|
|
// Deprecated! Use color.formatHex.
|
|
formatHex: color_formatHex,
|
|
formatHex8: color_formatHex8,
|
|
formatHsl: color_formatHsl,
|
|
formatRgb: color_formatRgb,
|
|
toString: color_formatRgb
|
|
});
|
|
function color_formatHex() {
|
|
return this.rgb().formatHex();
|
|
}
|
|
function color_formatHex8() {
|
|
return this.rgb().formatHex8();
|
|
}
|
|
function color_formatHsl() {
|
|
return hslConvert(this).formatHsl();
|
|
}
|
|
function color_formatRgb() {
|
|
return this.rgb().formatRgb();
|
|
}
|
|
function color(format2) {
|
|
var m2, l;
|
|
format2 = (format2 + "").trim().toLowerCase();
|
|
return (m2 = reHex.exec(format2)) ? (l = m2[1].length, m2 = parseInt(m2[1], 16), l === 6 ? rgbn(m2) : l === 3 ? new Rgb(m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, (m2 & 15) << 4 | m2 & 15, 1) : l === 8 ? rgba(m2 >> 24 & 255, m2 >> 16 & 255, m2 >> 8 & 255, (m2 & 255) / 255) : l === 4 ? rgba(m2 >> 12 & 15 | m2 >> 8 & 240, m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, ((m2 & 15) << 4 | m2 & 15) / 255) : null) : (m2 = reRgbInteger.exec(format2)) ? new Rgb(m2[1], m2[2], m2[3], 1) : (m2 = reRgbPercent.exec(format2)) ? new Rgb(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, 1) : (m2 = reRgbaInteger.exec(format2)) ? rgba(m2[1], m2[2], m2[3], m2[4]) : (m2 = reRgbaPercent.exec(format2)) ? rgba(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, m2[4]) : (m2 = reHslPercent.exec(format2)) ? hsla(m2[1], m2[2] / 100, m2[3] / 100, 1) : (m2 = reHslaPercent.exec(format2)) ? hsla(m2[1], m2[2] / 100, m2[3] / 100, m2[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
}
|
|
function rgbn(n) {
|
|
return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
|
|
}
|
|
function rgba(r, g, b, a2) {
|
|
if (a2 <= 0)
|
|
r = g = b = NaN;
|
|
return new Rgb(r, g, b, a2);
|
|
}
|
|
function rgbConvert(o) {
|
|
if (!(o instanceof Color))
|
|
o = color(o);
|
|
if (!o)
|
|
return new Rgb();
|
|
o = o.rgb();
|
|
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
}
|
|
function rgb(r, g, b, opacity) {
|
|
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
}
|
|
function Rgb(r, g, b, opacity) {
|
|
this.r = +r;
|
|
this.g = +g;
|
|
this.b = +b;
|
|
this.opacity = +opacity;
|
|
}
|
|
define_default(Rgb, rgb, extend(Color, {
|
|
brighter(k) {
|
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
},
|
|
darker(k) {
|
|
k = k == null ? darker : Math.pow(darker, k);
|
|
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
},
|
|
rgb() {
|
|
return this;
|
|
},
|
|
clamp() {
|
|
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
},
|
|
displayable() {
|
|
return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1);
|
|
},
|
|
hex: rgb_formatHex,
|
|
// Deprecated! Use color.formatHex.
|
|
formatHex: rgb_formatHex,
|
|
formatHex8: rgb_formatHex8,
|
|
formatRgb: rgb_formatRgb,
|
|
toString: rgb_formatRgb
|
|
}));
|
|
function rgb_formatHex() {
|
|
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
|
}
|
|
function rgb_formatHex8() {
|
|
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
}
|
|
function rgb_formatRgb() {
|
|
const a2 = clampa(this.opacity);
|
|
return `${a2 === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a2 === 1 ? ")" : `, ${a2})`}`;
|
|
}
|
|
function clampa(opacity) {
|
|
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
}
|
|
function clampi(value) {
|
|
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
}
|
|
function hex(value) {
|
|
value = clampi(value);
|
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
}
|
|
function hsla(h, s, l, a2) {
|
|
if (a2 <= 0)
|
|
h = s = l = NaN;
|
|
else if (l <= 0 || l >= 1)
|
|
h = s = NaN;
|
|
else if (s <= 0)
|
|
h = NaN;
|
|
return new Hsl(h, s, l, a2);
|
|
}
|
|
function hslConvert(o) {
|
|
if (o instanceof Hsl)
|
|
return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
if (!(o instanceof Color))
|
|
o = color(o);
|
|
if (!o)
|
|
return new Hsl();
|
|
if (o instanceof Hsl)
|
|
return o;
|
|
o = o.rgb();
|
|
var r = o.r / 255, g = o.g / 255, b = o.b / 255, min2 = Math.min(r, g, b), max2 = Math.max(r, g, b), h = NaN, s = max2 - min2, l = (max2 + min2) / 2;
|
|
if (s) {
|
|
if (r === max2)
|
|
h = (g - b) / s + (g < b) * 6;
|
|
else if (g === max2)
|
|
h = (b - r) / s + 2;
|
|
else
|
|
h = (r - g) / s + 4;
|
|
s /= l < 0.5 ? max2 + min2 : 2 - max2 - min2;
|
|
h *= 60;
|
|
} else {
|
|
s = l > 0 && l < 1 ? 0 : h;
|
|
}
|
|
return new Hsl(h, s, l, o.opacity);
|
|
}
|
|
function hsl(h, s, l, opacity) {
|
|
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
}
|
|
function Hsl(h, s, l, opacity) {
|
|
this.h = +h;
|
|
this.s = +s;
|
|
this.l = +l;
|
|
this.opacity = +opacity;
|
|
}
|
|
define_default(Hsl, hsl, extend(Color, {
|
|
brighter(k) {
|
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
},
|
|
darker(k) {
|
|
k = k == null ? darker : Math.pow(darker, k);
|
|
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
},
|
|
rgb() {
|
|
var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
|
|
return new Rgb(
|
|
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
hsl2rgb(h, m1, m2),
|
|
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
this.opacity
|
|
);
|
|
},
|
|
clamp() {
|
|
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
},
|
|
displayable() {
|
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1);
|
|
},
|
|
formatHsl() {
|
|
const a2 = clampa(this.opacity);
|
|
return `${a2 === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a2 === 1 ? ")" : `, ${a2})`}`;
|
|
}
|
|
}));
|
|
function clamph(value) {
|
|
value = (value || 0) % 360;
|
|
return value < 0 ? value + 360 : value;
|
|
}
|
|
function clampt(value) {
|
|
return Math.max(0, Math.min(1, value || 0));
|
|
}
|
|
function hsl2rgb(h, m1, m2) {
|
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/basis.js
|
|
function basis(t1, v0, v1, v2, v3) {
|
|
var t2 = t1 * t1, t3 = t2 * t1;
|
|
return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;
|
|
}
|
|
function basis_default(values) {
|
|
var n = values.length - 1;
|
|
return function(t) {
|
|
var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), v1 = values[i], v2 = values[i + 1], v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
|
|
return basis((t - i / n) * n, v0, v1, v2, v3);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/basisClosed.js
|
|
function basisClosed_default(values) {
|
|
var n = values.length;
|
|
return function(t) {
|
|
var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), v0 = values[(i + n - 1) % n], v1 = values[i % n], v2 = values[(i + 1) % n], v3 = values[(i + 2) % n];
|
|
return basis((t - i / n) * n, v0, v1, v2, v3);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/constant.js
|
|
var constant_default3 = (x3) => () => x3;
|
|
|
|
// node_modules/d3-interpolate/src/color.js
|
|
function linear(a2, d) {
|
|
return function(t) {
|
|
return a2 + t * d;
|
|
};
|
|
}
|
|
function exponential(a2, b, y3) {
|
|
return a2 = Math.pow(a2, y3), b = Math.pow(b, y3) - a2, y3 = 1 / y3, function(t) {
|
|
return Math.pow(a2 + t * b, y3);
|
|
};
|
|
}
|
|
function gamma(y3) {
|
|
return (y3 = +y3) === 1 ? nogamma : function(a2, b) {
|
|
return b - a2 ? exponential(a2, b, y3) : constant_default3(isNaN(a2) ? b : a2);
|
|
};
|
|
}
|
|
function nogamma(a2, b) {
|
|
var d = b - a2;
|
|
return d ? linear(a2, d) : constant_default3(isNaN(a2) ? b : a2);
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/rgb.js
|
|
var rgb_default = function rgbGamma(y3) {
|
|
var color2 = gamma(y3);
|
|
function rgb2(start2, end) {
|
|
var r = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity);
|
|
return function(t) {
|
|
start2.r = r(t);
|
|
start2.g = g(t);
|
|
start2.b = b(t);
|
|
start2.opacity = opacity(t);
|
|
return start2 + "";
|
|
};
|
|
}
|
|
rgb2.gamma = rgbGamma;
|
|
return rgb2;
|
|
}(1);
|
|
function rgbSpline(spline) {
|
|
return function(colors) {
|
|
var n = colors.length, r = new Array(n), g = new Array(n), b = new Array(n), i, color2;
|
|
for (i = 0; i < n; ++i) {
|
|
color2 = rgb(colors[i]);
|
|
r[i] = color2.r || 0;
|
|
g[i] = color2.g || 0;
|
|
b[i] = color2.b || 0;
|
|
}
|
|
r = spline(r);
|
|
g = spline(g);
|
|
b = spline(b);
|
|
color2.opacity = 1;
|
|
return function(t) {
|
|
color2.r = r(t);
|
|
color2.g = g(t);
|
|
color2.b = b(t);
|
|
return color2 + "";
|
|
};
|
|
};
|
|
}
|
|
var rgbBasis = rgbSpline(basis_default);
|
|
var rgbBasisClosed = rgbSpline(basisClosed_default);
|
|
|
|
// node_modules/d3-interpolate/src/numberArray.js
|
|
function numberArray_default(a2, b) {
|
|
if (!b)
|
|
b = [];
|
|
var n = a2 ? Math.min(b.length, a2.length) : 0, c2 = b.slice(), i;
|
|
return function(t) {
|
|
for (i = 0; i < n; ++i)
|
|
c2[i] = a2[i] * (1 - t) + b[i] * t;
|
|
return c2;
|
|
};
|
|
}
|
|
function isNumberArray(x3) {
|
|
return ArrayBuffer.isView(x3) && !(x3 instanceof DataView);
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/array.js
|
|
function genericArray(a2, b) {
|
|
var nb = b ? b.length : 0, na = a2 ? Math.min(nb, a2.length) : 0, x3 = new Array(na), c2 = new Array(nb), i;
|
|
for (i = 0; i < na; ++i)
|
|
x3[i] = value_default(a2[i], b[i]);
|
|
for (; i < nb; ++i)
|
|
c2[i] = b[i];
|
|
return function(t) {
|
|
for (i = 0; i < na; ++i)
|
|
c2[i] = x3[i](t);
|
|
return c2;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/date.js
|
|
function date_default(a2, b) {
|
|
var d = new Date();
|
|
return a2 = +a2, b = +b, function(t) {
|
|
return d.setTime(a2 * (1 - t) + b * t), d;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/number.js
|
|
function number_default(a2, b) {
|
|
return a2 = +a2, b = +b, function(t) {
|
|
return a2 * (1 - t) + b * t;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/object.js
|
|
function object_default(a2, b) {
|
|
var i = {}, c2 = {}, k;
|
|
if (a2 === null || typeof a2 !== "object")
|
|
a2 = {};
|
|
if (b === null || typeof b !== "object")
|
|
b = {};
|
|
for (k in b) {
|
|
if (k in a2) {
|
|
i[k] = value_default(a2[k], b[k]);
|
|
} else {
|
|
c2[k] = b[k];
|
|
}
|
|
}
|
|
return function(t) {
|
|
for (k in i)
|
|
c2[k] = i[k](t);
|
|
return c2;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/string.js
|
|
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
|
|
var reB = new RegExp(reA.source, "g");
|
|
function zero2(b) {
|
|
return function() {
|
|
return b;
|
|
};
|
|
}
|
|
function one(b) {
|
|
return function(t) {
|
|
return b(t) + "";
|
|
};
|
|
}
|
|
function string_default(a2, b) {
|
|
var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
|
|
a2 = a2 + "", b = b + "";
|
|
while ((am = reA.exec(a2)) && (bm = reB.exec(b))) {
|
|
if ((bs = bm.index) > bi) {
|
|
bs = b.slice(bi, bs);
|
|
if (s[i])
|
|
s[i] += bs;
|
|
else
|
|
s[++i] = bs;
|
|
}
|
|
if ((am = am[0]) === (bm = bm[0])) {
|
|
if (s[i])
|
|
s[i] += bm;
|
|
else
|
|
s[++i] = bm;
|
|
} else {
|
|
s[++i] = null;
|
|
q.push({ i, x: number_default(am, bm) });
|
|
}
|
|
bi = reB.lastIndex;
|
|
}
|
|
if (bi < b.length) {
|
|
bs = b.slice(bi);
|
|
if (s[i])
|
|
s[i] += bs;
|
|
else
|
|
s[++i] = bs;
|
|
}
|
|
return s.length < 2 ? q[0] ? one(q[0].x) : zero2(b) : (b = q.length, function(t) {
|
|
for (var i2 = 0, o; i2 < b; ++i2)
|
|
s[(o = q[i2]).i] = o.x(t);
|
|
return s.join("");
|
|
});
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/value.js
|
|
function value_default(a2, b) {
|
|
var t = typeof b, c2;
|
|
return b == null || t === "boolean" ? constant_default3(b) : (t === "number" ? number_default : t === "string" ? (c2 = color(b)) ? (b = c2, rgb_default) : string_default : b instanceof color ? rgb_default : b instanceof Date ? date_default : isNumberArray(b) ? numberArray_default : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object_default : number_default)(a2, b);
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/round.js
|
|
function round_default(a2, b) {
|
|
return a2 = +a2, b = +b, function(t) {
|
|
return Math.round(a2 * (1 - t) + b * t);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/transform/decompose.js
|
|
var degrees = 180 / Math.PI;
|
|
var identity = {
|
|
translateX: 0,
|
|
translateY: 0,
|
|
rotate: 0,
|
|
skewX: 0,
|
|
scaleX: 1,
|
|
scaleY: 1
|
|
};
|
|
function decompose_default(a2, b, c2, d, e, f) {
|
|
var scaleX, scaleY, skewX;
|
|
if (scaleX = Math.sqrt(a2 * a2 + b * b))
|
|
a2 /= scaleX, b /= scaleX;
|
|
if (skewX = a2 * c2 + b * d)
|
|
c2 -= a2 * skewX, d -= b * skewX;
|
|
if (scaleY = Math.sqrt(c2 * c2 + d * d))
|
|
c2 /= scaleY, d /= scaleY, skewX /= scaleY;
|
|
if (a2 * d < b * c2)
|
|
a2 = -a2, b = -b, skewX = -skewX, scaleX = -scaleX;
|
|
return {
|
|
translateX: e,
|
|
translateY: f,
|
|
rotate: Math.atan2(b, a2) * degrees,
|
|
skewX: Math.atan(skewX) * degrees,
|
|
scaleX,
|
|
scaleY
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/transform/parse.js
|
|
var svgNode;
|
|
function parseCss(value) {
|
|
const m2 = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
return m2.isIdentity ? identity : decompose_default(m2.a, m2.b, m2.c, m2.d, m2.e, m2.f);
|
|
}
|
|
function parseSvg(value) {
|
|
if (value == null)
|
|
return identity;
|
|
if (!svgNode)
|
|
svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
svgNode.setAttribute("transform", value);
|
|
if (!(value = svgNode.transform.baseVal.consolidate()))
|
|
return identity;
|
|
value = value.matrix;
|
|
return decompose_default(value.a, value.b, value.c, value.d, value.e, value.f);
|
|
}
|
|
|
|
// node_modules/d3-interpolate/src/transform/index.js
|
|
function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
function pop(s) {
|
|
return s.length ? s.pop() + " " : "";
|
|
}
|
|
function translate(xa, ya, xb, yb, s, q) {
|
|
if (xa !== xb || ya !== yb) {
|
|
var i = s.push("translate(", null, pxComma, null, pxParen);
|
|
q.push({ i: i - 4, x: number_default(xa, xb) }, { i: i - 2, x: number_default(ya, yb) });
|
|
} else if (xb || yb) {
|
|
s.push("translate(" + xb + pxComma + yb + pxParen);
|
|
}
|
|
}
|
|
function rotate(a2, b, s, q) {
|
|
if (a2 !== b) {
|
|
if (a2 - b > 180)
|
|
b += 360;
|
|
else if (b - a2 > 180)
|
|
a2 += 360;
|
|
q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number_default(a2, b) });
|
|
} else if (b) {
|
|
s.push(pop(s) + "rotate(" + b + degParen);
|
|
}
|
|
}
|
|
function skewX(a2, b, s, q) {
|
|
if (a2 !== b) {
|
|
q.push({ i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number_default(a2, b) });
|
|
} else if (b) {
|
|
s.push(pop(s) + "skewX(" + b + degParen);
|
|
}
|
|
}
|
|
function scale(xa, ya, xb, yb, s, q) {
|
|
if (xa !== xb || ya !== yb) {
|
|
var i = s.push(pop(s) + "scale(", null, ",", null, ")");
|
|
q.push({ i: i - 4, x: number_default(xa, xb) }, { i: i - 2, x: number_default(ya, yb) });
|
|
} else if (xb !== 1 || yb !== 1) {
|
|
s.push(pop(s) + "scale(" + xb + "," + yb + ")");
|
|
}
|
|
}
|
|
return function(a2, b) {
|
|
var s = [], q = [];
|
|
a2 = parse(a2), b = parse(b);
|
|
translate(a2.translateX, a2.translateY, b.translateX, b.translateY, s, q);
|
|
rotate(a2.rotate, b.rotate, s, q);
|
|
skewX(a2.skewX, b.skewX, s, q);
|
|
scale(a2.scaleX, a2.scaleY, b.scaleX, b.scaleY, s, q);
|
|
a2 = b = null;
|
|
return function(t) {
|
|
var i = -1, n = q.length, o;
|
|
while (++i < n)
|
|
s[(o = q[i]).i] = o.x(t);
|
|
return s.join("");
|
|
};
|
|
};
|
|
}
|
|
var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
|
|
var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
|
|
|
|
// node_modules/d3-interpolate/src/zoom.js
|
|
var epsilon2 = 1e-12;
|
|
function cosh(x3) {
|
|
return ((x3 = Math.exp(x3)) + 1 / x3) / 2;
|
|
}
|
|
function sinh(x3) {
|
|
return ((x3 = Math.exp(x3)) - 1 / x3) / 2;
|
|
}
|
|
function tanh(x3) {
|
|
return ((x3 = Math.exp(2 * x3)) - 1) / (x3 + 1);
|
|
}
|
|
var zoom_default = function zoomRho(rho, rho2, rho4) {
|
|
function zoom(p0, p1) {
|
|
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;
|
|
if (d2 < epsilon2) {
|
|
S = Math.log(w1 / w0) / rho;
|
|
i = function(t) {
|
|
return [
|
|
ux0 + t * dx,
|
|
uy0 + t * dy,
|
|
w0 * Math.exp(rho * t * S)
|
|
];
|
|
};
|
|
} else {
|
|
var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
|
|
S = (r1 - r0) / rho;
|
|
i = function(t) {
|
|
var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
|
|
return [
|
|
ux0 + u * dx,
|
|
uy0 + u * dy,
|
|
w0 * coshr0 / cosh(rho * s + r0)
|
|
];
|
|
};
|
|
}
|
|
i.duration = S * 1e3 * rho / Math.SQRT2;
|
|
return i;
|
|
}
|
|
zoom.rho = function(_) {
|
|
var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
|
|
return zoomRho(_1, _2, _4);
|
|
};
|
|
return zoom;
|
|
}(Math.SQRT2, 2, 4);
|
|
|
|
// node_modules/d3-timer/src/timer.js
|
|
var frame = 0;
|
|
var timeout = 0;
|
|
var interval = 0;
|
|
var pokeDelay = 1e3;
|
|
var taskHead;
|
|
var taskTail;
|
|
var clockLast = 0;
|
|
var clockNow = 0;
|
|
var clockSkew = 0;
|
|
var clock = typeof performance === "object" && performance.now ? performance : Date;
|
|
var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {
|
|
setTimeout(f, 17);
|
|
};
|
|
function now() {
|
|
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
|
|
}
|
|
function clearNow() {
|
|
clockNow = 0;
|
|
}
|
|
function Timer() {
|
|
this._call = this._time = this._next = null;
|
|
}
|
|
Timer.prototype = timer.prototype = {
|
|
constructor: Timer,
|
|
restart: function(callback, delay, time) {
|
|
if (typeof callback !== "function")
|
|
throw new TypeError("callback is not a function");
|
|
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
if (!this._next && taskTail !== this) {
|
|
if (taskTail)
|
|
taskTail._next = this;
|
|
else
|
|
taskHead = this;
|
|
taskTail = this;
|
|
}
|
|
this._call = callback;
|
|
this._time = time;
|
|
sleep();
|
|
},
|
|
stop: function() {
|
|
if (this._call) {
|
|
this._call = null;
|
|
this._time = Infinity;
|
|
sleep();
|
|
}
|
|
}
|
|
};
|
|
function timer(callback, delay, time) {
|
|
var t = new Timer();
|
|
t.restart(callback, delay, time);
|
|
return t;
|
|
}
|
|
function timerFlush() {
|
|
now();
|
|
++frame;
|
|
var t = taskHead, e;
|
|
while (t) {
|
|
if ((e = clockNow - t._time) >= 0)
|
|
t._call.call(void 0, e);
|
|
t = t._next;
|
|
}
|
|
--frame;
|
|
}
|
|
function wake() {
|
|
clockNow = (clockLast = clock.now()) + clockSkew;
|
|
frame = timeout = 0;
|
|
try {
|
|
timerFlush();
|
|
} finally {
|
|
frame = 0;
|
|
nap();
|
|
clockNow = 0;
|
|
}
|
|
}
|
|
function poke() {
|
|
var now2 = clock.now(), delay = now2 - clockLast;
|
|
if (delay > pokeDelay)
|
|
clockSkew -= delay, clockLast = now2;
|
|
}
|
|
function nap() {
|
|
var t0, t1 = taskHead, t2, time = Infinity;
|
|
while (t1) {
|
|
if (t1._call) {
|
|
if (time > t1._time)
|
|
time = t1._time;
|
|
t0 = t1, t1 = t1._next;
|
|
} else {
|
|
t2 = t1._next, t1._next = null;
|
|
t1 = t0 ? t0._next = t2 : taskHead = t2;
|
|
}
|
|
}
|
|
taskTail = t0;
|
|
sleep(time);
|
|
}
|
|
function sleep(time) {
|
|
if (frame)
|
|
return;
|
|
if (timeout)
|
|
timeout = clearTimeout(timeout);
|
|
var delay = time - clockNow;
|
|
if (delay > 24) {
|
|
if (time < Infinity)
|
|
timeout = setTimeout(wake, time - clock.now() - clockSkew);
|
|
if (interval)
|
|
interval = clearInterval(interval);
|
|
} else {
|
|
if (!interval)
|
|
clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
|
|
frame = 1, setFrame(wake);
|
|
}
|
|
}
|
|
|
|
// node_modules/d3-timer/src/timeout.js
|
|
function timeout_default(callback, delay, time) {
|
|
var t = new Timer();
|
|
delay = delay == null ? 0 : +delay;
|
|
t.restart((elapsed) => {
|
|
t.stop();
|
|
callback(elapsed + delay);
|
|
}, delay, time);
|
|
return t;
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/schedule.js
|
|
var emptyOn = dispatch_default("start", "end", "cancel", "interrupt");
|
|
var emptyTween = [];
|
|
var CREATED = 0;
|
|
var SCHEDULED = 1;
|
|
var STARTING = 2;
|
|
var STARTED = 3;
|
|
var RUNNING = 4;
|
|
var ENDING = 5;
|
|
var ENDED = 6;
|
|
function schedule_default(node, name, id2, index2, group, timing) {
|
|
var schedules = node.__transition;
|
|
if (!schedules)
|
|
node.__transition = {};
|
|
else if (id2 in schedules)
|
|
return;
|
|
create(node, id2, {
|
|
name,
|
|
index: index2,
|
|
// For context during callback.
|
|
group,
|
|
// For context during callback.
|
|
on: emptyOn,
|
|
tween: emptyTween,
|
|
time: timing.time,
|
|
delay: timing.delay,
|
|
duration: timing.duration,
|
|
ease: timing.ease,
|
|
timer: null,
|
|
state: CREATED
|
|
});
|
|
}
|
|
function init(node, id2) {
|
|
var schedule = get2(node, id2);
|
|
if (schedule.state > CREATED)
|
|
throw new Error("too late; already scheduled");
|
|
return schedule;
|
|
}
|
|
function set2(node, id2) {
|
|
var schedule = get2(node, id2);
|
|
if (schedule.state > STARTED)
|
|
throw new Error("too late; already running");
|
|
return schedule;
|
|
}
|
|
function get2(node, id2) {
|
|
var schedule = node.__transition;
|
|
if (!schedule || !(schedule = schedule[id2]))
|
|
throw new Error("transition not found");
|
|
return schedule;
|
|
}
|
|
function create(node, id2, self) {
|
|
var schedules = node.__transition, tween;
|
|
schedules[id2] = self;
|
|
self.timer = timer(schedule, 0, self.time);
|
|
function schedule(elapsed) {
|
|
self.state = SCHEDULED;
|
|
self.timer.restart(start2, self.delay, self.time);
|
|
if (self.delay <= elapsed)
|
|
start2(elapsed - self.delay);
|
|
}
|
|
function start2(elapsed) {
|
|
var i, j, n, o;
|
|
if (self.state !== SCHEDULED)
|
|
return stop();
|
|
for (i in schedules) {
|
|
o = schedules[i];
|
|
if (o.name !== self.name)
|
|
continue;
|
|
if (o.state === STARTED)
|
|
return timeout_default(start2);
|
|
if (o.state === RUNNING) {
|
|
o.state = ENDED;
|
|
o.timer.stop();
|
|
o.on.call("interrupt", node, node.__data__, o.index, o.group);
|
|
delete schedules[i];
|
|
} else if (+i < id2) {
|
|
o.state = ENDED;
|
|
o.timer.stop();
|
|
o.on.call("cancel", node, node.__data__, o.index, o.group);
|
|
delete schedules[i];
|
|
}
|
|
}
|
|
timeout_default(function() {
|
|
if (self.state === STARTED) {
|
|
self.state = RUNNING;
|
|
self.timer.restart(tick, self.delay, self.time);
|
|
tick(elapsed);
|
|
}
|
|
});
|
|
self.state = STARTING;
|
|
self.on.call("start", node, node.__data__, self.index, self.group);
|
|
if (self.state !== STARTING)
|
|
return;
|
|
self.state = STARTED;
|
|
tween = new Array(n = self.tween.length);
|
|
for (i = 0, j = -1; i < n; ++i) {
|
|
if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
|
|
tween[++j] = o;
|
|
}
|
|
}
|
|
tween.length = j + 1;
|
|
}
|
|
function tick(elapsed) {
|
|
var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length;
|
|
while (++i < n) {
|
|
tween[i].call(node, t);
|
|
}
|
|
if (self.state === ENDING) {
|
|
self.on.call("end", node, node.__data__, self.index, self.group);
|
|
stop();
|
|
}
|
|
}
|
|
function stop() {
|
|
self.state = ENDED;
|
|
self.timer.stop();
|
|
delete schedules[id2];
|
|
for (var i in schedules)
|
|
return;
|
|
delete node.__transition;
|
|
}
|
|
}
|
|
|
|
// node_modules/d3-transition/src/interrupt.js
|
|
function interrupt_default(node, name) {
|
|
var schedules = node.__transition, schedule, active, empty2 = true, i;
|
|
if (!schedules)
|
|
return;
|
|
name = name == null ? null : name + "";
|
|
for (i in schedules) {
|
|
if ((schedule = schedules[i]).name !== name) {
|
|
empty2 = false;
|
|
continue;
|
|
}
|
|
active = schedule.state > STARTING && schedule.state < ENDING;
|
|
schedule.state = ENDED;
|
|
schedule.timer.stop();
|
|
schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
|
|
delete schedules[i];
|
|
}
|
|
if (empty2)
|
|
delete node.__transition;
|
|
}
|
|
|
|
// node_modules/d3-transition/src/selection/interrupt.js
|
|
function interrupt_default2(name) {
|
|
return this.each(function() {
|
|
interrupt_default(this, name);
|
|
});
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/tween.js
|
|
function tweenRemove(id2, name) {
|
|
var tween0, tween1;
|
|
return function() {
|
|
var schedule = set2(this, id2), tween = schedule.tween;
|
|
if (tween !== tween0) {
|
|
tween1 = tween0 = tween;
|
|
for (var i = 0, n = tween1.length; i < n; ++i) {
|
|
if (tween1[i].name === name) {
|
|
tween1 = tween1.slice();
|
|
tween1.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
schedule.tween = tween1;
|
|
};
|
|
}
|
|
function tweenFunction(id2, name, value) {
|
|
var tween0, tween1;
|
|
if (typeof value !== "function")
|
|
throw new Error();
|
|
return function() {
|
|
var schedule = set2(this, id2), tween = schedule.tween;
|
|
if (tween !== tween0) {
|
|
tween1 = (tween0 = tween).slice();
|
|
for (var t = { name, value }, i = 0, n = tween1.length; i < n; ++i) {
|
|
if (tween1[i].name === name) {
|
|
tween1[i] = t;
|
|
break;
|
|
}
|
|
}
|
|
if (i === n)
|
|
tween1.push(t);
|
|
}
|
|
schedule.tween = tween1;
|
|
};
|
|
}
|
|
function tween_default(name, value) {
|
|
var id2 = this._id;
|
|
name += "";
|
|
if (arguments.length < 2) {
|
|
var tween = get2(this.node(), id2).tween;
|
|
for (var i = 0, n = tween.length, t; i < n; ++i) {
|
|
if ((t = tween[i]).name === name) {
|
|
return t.value;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
return this.each((value == null ? tweenRemove : tweenFunction)(id2, name, value));
|
|
}
|
|
function tweenValue(transition2, name, value) {
|
|
var id2 = transition2._id;
|
|
transition2.each(function() {
|
|
var schedule = set2(this, id2);
|
|
(schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
|
|
});
|
|
return function(node) {
|
|
return get2(node, id2).value[name];
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/interpolate.js
|
|
function interpolate_default(a2, b) {
|
|
var c2;
|
|
return (typeof b === "number" ? number_default : b instanceof color ? rgb_default : (c2 = color(b)) ? (b = c2, rgb_default) : string_default)(a2, b);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/attr.js
|
|
function attrRemove2(name) {
|
|
return function() {
|
|
this.removeAttribute(name);
|
|
};
|
|
}
|
|
function attrRemoveNS2(fullname) {
|
|
return function() {
|
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
};
|
|
}
|
|
function attrConstant2(name, interpolate, value1) {
|
|
var string00, string1 = value1 + "", interpolate0;
|
|
return function() {
|
|
var string0 = this.getAttribute(name);
|
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
};
|
|
}
|
|
function attrConstantNS2(fullname, interpolate, value1) {
|
|
var string00, string1 = value1 + "", interpolate0;
|
|
return function() {
|
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
};
|
|
}
|
|
function attrFunction2(name, interpolate, value) {
|
|
var string00, string10, interpolate0;
|
|
return function() {
|
|
var string0, value1 = value(this), string1;
|
|
if (value1 == null)
|
|
return void this.removeAttribute(name);
|
|
string0 = this.getAttribute(name);
|
|
string1 = value1 + "";
|
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
};
|
|
}
|
|
function attrFunctionNS2(fullname, interpolate, value) {
|
|
var string00, string10, interpolate0;
|
|
return function() {
|
|
var string0, value1 = value(this), string1;
|
|
if (value1 == null)
|
|
return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
string1 = value1 + "";
|
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
};
|
|
}
|
|
function attr_default2(name, value) {
|
|
var fullname = namespace_default(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate_default;
|
|
return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS2 : attrFunction2)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS2 : attrRemove2)(fullname) : (fullname.local ? attrConstantNS2 : attrConstant2)(fullname, i, value));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/attrTween.js
|
|
function attrInterpolate(name, i) {
|
|
return function(t) {
|
|
this.setAttribute(name, i.call(this, t));
|
|
};
|
|
}
|
|
function attrInterpolateNS(fullname, i) {
|
|
return function(t) {
|
|
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
};
|
|
}
|
|
function attrTweenNS(fullname, value) {
|
|
var t0, i0;
|
|
function tween() {
|
|
var i = value.apply(this, arguments);
|
|
if (i !== i0)
|
|
t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
return t0;
|
|
}
|
|
tween._value = value;
|
|
return tween;
|
|
}
|
|
function attrTween(name, value) {
|
|
var t0, i0;
|
|
function tween() {
|
|
var i = value.apply(this, arguments);
|
|
if (i !== i0)
|
|
t0 = (i0 = i) && attrInterpolate(name, i);
|
|
return t0;
|
|
}
|
|
tween._value = value;
|
|
return tween;
|
|
}
|
|
function attrTween_default(name, value) {
|
|
var key = "attr." + name;
|
|
if (arguments.length < 2)
|
|
return (key = this.tween(key)) && key._value;
|
|
if (value == null)
|
|
return this.tween(key, null);
|
|
if (typeof value !== "function")
|
|
throw new Error();
|
|
var fullname = namespace_default(name);
|
|
return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/delay.js
|
|
function delayFunction(id2, value) {
|
|
return function() {
|
|
init(this, id2).delay = +value.apply(this, arguments);
|
|
};
|
|
}
|
|
function delayConstant(id2, value) {
|
|
return value = +value, function() {
|
|
init(this, id2).delay = value;
|
|
};
|
|
}
|
|
function delay_default(value) {
|
|
var id2 = this._id;
|
|
return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id2, value)) : get2(this.node(), id2).delay;
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/duration.js
|
|
function durationFunction(id2, value) {
|
|
return function() {
|
|
set2(this, id2).duration = +value.apply(this, arguments);
|
|
};
|
|
}
|
|
function durationConstant(id2, value) {
|
|
return value = +value, function() {
|
|
set2(this, id2).duration = value;
|
|
};
|
|
}
|
|
function duration_default(value) {
|
|
var id2 = this._id;
|
|
return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id2, value)) : get2(this.node(), id2).duration;
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/ease.js
|
|
function easeConstant(id2, value) {
|
|
if (typeof value !== "function")
|
|
throw new Error();
|
|
return function() {
|
|
set2(this, id2).ease = value;
|
|
};
|
|
}
|
|
function ease_default(value) {
|
|
var id2 = this._id;
|
|
return arguments.length ? this.each(easeConstant(id2, value)) : get2(this.node(), id2).ease;
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/easeVarying.js
|
|
function easeVarying(id2, value) {
|
|
return function() {
|
|
var v = value.apply(this, arguments);
|
|
if (typeof v !== "function")
|
|
throw new Error();
|
|
set2(this, id2).ease = v;
|
|
};
|
|
}
|
|
function easeVarying_default(value) {
|
|
if (typeof value !== "function")
|
|
throw new Error();
|
|
return this.each(easeVarying(this._id, value));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/filter.js
|
|
function filter_default2(match) {
|
|
if (typeof match !== "function")
|
|
match = matcher_default(match);
|
|
for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
subgroup.push(node);
|
|
}
|
|
}
|
|
}
|
|
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/merge.js
|
|
function merge_default2(transition2) {
|
|
if (transition2._id !== this._id)
|
|
throw new Error();
|
|
for (var groups0 = this._groups, groups1 = transition2._groups, m0 = groups0.length, m1 = groups1.length, m2 = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m2; ++j) {
|
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
if (node = group0[i] || group1[i]) {
|
|
merge[i] = node;
|
|
}
|
|
}
|
|
}
|
|
for (; j < m0; ++j) {
|
|
merges[j] = groups0[j];
|
|
}
|
|
return new Transition(merges, this._parents, this._name, this._id);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/on.js
|
|
function start(name) {
|
|
return (name + "").trim().split(/^|\s+/).every(function(t) {
|
|
var i = t.indexOf(".");
|
|
if (i >= 0)
|
|
t = t.slice(0, i);
|
|
return !t || t === "start";
|
|
});
|
|
}
|
|
function onFunction(id2, name, listener) {
|
|
var on0, on1, sit = start(name) ? init : set2;
|
|
return function() {
|
|
var schedule = sit(this, id2), on = schedule.on;
|
|
if (on !== on0)
|
|
(on1 = (on0 = on).copy()).on(name, listener);
|
|
schedule.on = on1;
|
|
};
|
|
}
|
|
function on_default2(name, listener) {
|
|
var id2 = this._id;
|
|
return arguments.length < 2 ? get2(this.node(), id2).on.on(name) : this.each(onFunction(id2, name, listener));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/remove.js
|
|
function removeFunction(id2) {
|
|
return function() {
|
|
var parent = this.parentNode;
|
|
for (var i in this.__transition)
|
|
if (+i !== id2)
|
|
return;
|
|
if (parent)
|
|
parent.removeChild(this);
|
|
};
|
|
}
|
|
function remove_default2() {
|
|
return this.on("end.remove", removeFunction(this._id));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/select.js
|
|
function select_default3(select) {
|
|
var name = this._name, id2 = this._id;
|
|
if (typeof select !== "function")
|
|
select = selector_default(select);
|
|
for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
if ("__data__" in node)
|
|
subnode.__data__ = node.__data__;
|
|
subgroup[i] = subnode;
|
|
schedule_default(subgroup[i], name, id2, i, subgroup, get2(node, id2));
|
|
}
|
|
}
|
|
}
|
|
return new Transition(subgroups, this._parents, name, id2);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/selectAll.js
|
|
function selectAll_default2(select) {
|
|
var name = this._name, id2 = this._id;
|
|
if (typeof select !== "function")
|
|
select = selectorAll_default(select);
|
|
for (var groups = this._groups, m2 = groups.length, subgroups = [], parents = [], j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
if (node = group[i]) {
|
|
for (var children2 = select.call(node, node.__data__, i, group), child, inherit2 = get2(node, id2), k = 0, l = children2.length; k < l; ++k) {
|
|
if (child = children2[k]) {
|
|
schedule_default(child, name, id2, k, children2, inherit2);
|
|
}
|
|
}
|
|
subgroups.push(children2);
|
|
parents.push(node);
|
|
}
|
|
}
|
|
}
|
|
return new Transition(subgroups, parents, name, id2);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/selection.js
|
|
var Selection2 = selection_default.prototype.constructor;
|
|
function selection_default2() {
|
|
return new Selection2(this._groups, this._parents);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/style.js
|
|
function styleNull(name, interpolate) {
|
|
var string00, string10, interpolate0;
|
|
return function() {
|
|
var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
};
|
|
}
|
|
function styleRemove2(name) {
|
|
return function() {
|
|
this.style.removeProperty(name);
|
|
};
|
|
}
|
|
function styleConstant2(name, interpolate, value1) {
|
|
var string00, string1 = value1 + "", interpolate0;
|
|
return function() {
|
|
var string0 = styleValue(this, name);
|
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
};
|
|
}
|
|
function styleFunction2(name, interpolate, value) {
|
|
var string00, string10, interpolate0;
|
|
return function() {
|
|
var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
|
|
if (value1 == null)
|
|
string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
};
|
|
}
|
|
function styleMaybeRemove(id2, name) {
|
|
var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2;
|
|
return function() {
|
|
var schedule = set2(this, id2), on = schedule.on, listener = schedule.value[key] == null ? remove2 || (remove2 = styleRemove2(name)) : void 0;
|
|
if (on !== on0 || listener0 !== listener)
|
|
(on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
schedule.on = on1;
|
|
};
|
|
}
|
|
function style_default2(name, value, priority) {
|
|
var i = (name += "") === "transform" ? interpolateTransformCss : interpolate_default;
|
|
return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove2(name)) : typeof value === "function" ? this.styleTween(name, styleFunction2(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant2(name, i, value), priority).on("end.style." + name, null);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/styleTween.js
|
|
function styleInterpolate(name, i, priority) {
|
|
return function(t) {
|
|
this.style.setProperty(name, i.call(this, t), priority);
|
|
};
|
|
}
|
|
function styleTween(name, value, priority) {
|
|
var t, i0;
|
|
function tween() {
|
|
var i = value.apply(this, arguments);
|
|
if (i !== i0)
|
|
t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
return t;
|
|
}
|
|
tween._value = value;
|
|
return tween;
|
|
}
|
|
function styleTween_default(name, value, priority) {
|
|
var key = "style." + (name += "");
|
|
if (arguments.length < 2)
|
|
return (key = this.tween(key)) && key._value;
|
|
if (value == null)
|
|
return this.tween(key, null);
|
|
if (typeof value !== "function")
|
|
throw new Error();
|
|
return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/text.js
|
|
function textConstant2(value) {
|
|
return function() {
|
|
this.textContent = value;
|
|
};
|
|
}
|
|
function textFunction2(value) {
|
|
return function() {
|
|
var value1 = value(this);
|
|
this.textContent = value1 == null ? "" : value1;
|
|
};
|
|
}
|
|
function text_default2(value) {
|
|
return this.tween("text", typeof value === "function" ? textFunction2(tweenValue(this, "text", value)) : textConstant2(value == null ? "" : value + ""));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/textTween.js
|
|
function textInterpolate(i) {
|
|
return function(t) {
|
|
this.textContent = i.call(this, t);
|
|
};
|
|
}
|
|
function textTween(value) {
|
|
var t0, i0;
|
|
function tween() {
|
|
var i = value.apply(this, arguments);
|
|
if (i !== i0)
|
|
t0 = (i0 = i) && textInterpolate(i);
|
|
return t0;
|
|
}
|
|
tween._value = value;
|
|
return tween;
|
|
}
|
|
function textTween_default(value) {
|
|
var key = "text";
|
|
if (arguments.length < 1)
|
|
return (key = this.tween(key)) && key._value;
|
|
if (value == null)
|
|
return this.tween(key, null);
|
|
if (typeof value !== "function")
|
|
throw new Error();
|
|
return this.tween(key, textTween(value));
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/transition.js
|
|
function transition_default() {
|
|
var name = this._name, id0 = this._id, id1 = newId();
|
|
for (var groups = this._groups, m2 = groups.length, j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
if (node = group[i]) {
|
|
var inherit2 = get2(node, id0);
|
|
schedule_default(node, name, id1, i, group, {
|
|
time: inherit2.time + inherit2.delay + inherit2.duration,
|
|
delay: 0,
|
|
duration: inherit2.duration,
|
|
ease: inherit2.ease
|
|
});
|
|
}
|
|
}
|
|
}
|
|
return new Transition(groups, this._parents, name, id1);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/end.js
|
|
function end_default() {
|
|
var on0, on1, that = this, id2 = that._id, size = that.size();
|
|
return new Promise(function(resolve, reject) {
|
|
var cancel = { value: reject }, end = { value: function() {
|
|
if (--size === 0)
|
|
resolve();
|
|
} };
|
|
that.each(function() {
|
|
var schedule = set2(this, id2), on = schedule.on;
|
|
if (on !== on0) {
|
|
on1 = (on0 = on).copy();
|
|
on1._.cancel.push(cancel);
|
|
on1._.interrupt.push(cancel);
|
|
on1._.end.push(end);
|
|
}
|
|
schedule.on = on1;
|
|
});
|
|
if (size === 0)
|
|
resolve();
|
|
});
|
|
}
|
|
|
|
// node_modules/d3-transition/src/transition/index.js
|
|
var id = 0;
|
|
function Transition(groups, parents, name, id2) {
|
|
this._groups = groups;
|
|
this._parents = parents;
|
|
this._name = name;
|
|
this._id = id2;
|
|
}
|
|
function transition(name) {
|
|
return selection_default().transition(name);
|
|
}
|
|
function newId() {
|
|
return ++id;
|
|
}
|
|
var selection_prototype = selection_default.prototype;
|
|
Transition.prototype = transition.prototype = {
|
|
constructor: Transition,
|
|
select: select_default3,
|
|
selectAll: selectAll_default2,
|
|
selectChild: selection_prototype.selectChild,
|
|
selectChildren: selection_prototype.selectChildren,
|
|
filter: filter_default2,
|
|
merge: merge_default2,
|
|
selection: selection_default2,
|
|
transition: transition_default,
|
|
call: selection_prototype.call,
|
|
nodes: selection_prototype.nodes,
|
|
node: selection_prototype.node,
|
|
size: selection_prototype.size,
|
|
empty: selection_prototype.empty,
|
|
each: selection_prototype.each,
|
|
on: on_default2,
|
|
attr: attr_default2,
|
|
attrTween: attrTween_default,
|
|
style: style_default2,
|
|
styleTween: styleTween_default,
|
|
text: text_default2,
|
|
textTween: textTween_default,
|
|
remove: remove_default2,
|
|
tween: tween_default,
|
|
delay: delay_default,
|
|
duration: duration_default,
|
|
ease: ease_default,
|
|
easeVarying: easeVarying_default,
|
|
end: end_default,
|
|
[Symbol.iterator]: selection_prototype[Symbol.iterator]
|
|
};
|
|
|
|
// node_modules/d3-ease/src/cubic.js
|
|
function cubicInOut(t) {
|
|
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
}
|
|
|
|
// node_modules/d3-transition/src/selection/transition.js
|
|
var defaultTiming = {
|
|
time: null,
|
|
// Set on use.
|
|
delay: 0,
|
|
duration: 250,
|
|
ease: cubicInOut
|
|
};
|
|
function inherit(node, id2) {
|
|
var timing;
|
|
while (!(timing = node.__transition) || !(timing = timing[id2])) {
|
|
if (!(node = node.parentNode)) {
|
|
throw new Error(`transition ${id2} not found`);
|
|
}
|
|
}
|
|
return timing;
|
|
}
|
|
function transition_default2(name) {
|
|
var id2, timing;
|
|
if (name instanceof Transition) {
|
|
id2 = name._id, name = name._name;
|
|
} else {
|
|
id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
}
|
|
for (var groups = this._groups, m2 = groups.length, j = 0; j < m2; ++j) {
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
if (node = group[i]) {
|
|
schedule_default(node, name, id2, i, group, timing || inherit(node, id2));
|
|
}
|
|
}
|
|
}
|
|
return new Transition(groups, this._parents, name, id2);
|
|
}
|
|
|
|
// node_modules/d3-transition/src/selection/index.js
|
|
selection_default.prototype.interrupt = interrupt_default2;
|
|
selection_default.prototype.transition = transition_default2;
|
|
|
|
// node_modules/d3-brush/src/brush.js
|
|
var { abs, max, min } = Math;
|
|
function number1(e) {
|
|
return [+e[0], +e[1]];
|
|
}
|
|
function number2(e) {
|
|
return [number1(e[0]), number1(e[1])];
|
|
}
|
|
var X = {
|
|
name: "x",
|
|
handles: ["w", "e"].map(type),
|
|
input: function(x3, e) {
|
|
return x3 == null ? null : [[+x3[0], e[0][1]], [+x3[1], e[1][1]]];
|
|
},
|
|
output: function(xy) {
|
|
return xy && [xy[0][0], xy[1][0]];
|
|
}
|
|
};
|
|
var Y = {
|
|
name: "y",
|
|
handles: ["n", "s"].map(type),
|
|
input: function(y3, e) {
|
|
return y3 == null ? null : [[e[0][0], +y3[0]], [e[1][0], +y3[1]]];
|
|
},
|
|
output: function(xy) {
|
|
return xy && [xy[0][1], xy[1][1]];
|
|
}
|
|
};
|
|
var XY = {
|
|
name: "xy",
|
|
handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type),
|
|
input: function(xy) {
|
|
return xy == null ? null : number2(xy);
|
|
},
|
|
output: function(xy) {
|
|
return xy;
|
|
}
|
|
};
|
|
function type(t) {
|
|
return { type: t };
|
|
}
|
|
|
|
// node_modules/d3-force/src/center.js
|
|
function center_default(x3, y3) {
|
|
var nodes, strength = 1;
|
|
if (x3 == null)
|
|
x3 = 0;
|
|
if (y3 == null)
|
|
y3 = 0;
|
|
function force() {
|
|
var i, n = nodes.length, node, sx = 0, sy = 0;
|
|
for (i = 0; i < n; ++i) {
|
|
node = nodes[i], sx += node.x, sy += node.y;
|
|
}
|
|
for (sx = (sx / n - x3) * strength, sy = (sy / n - y3) * strength, i = 0; i < n; ++i) {
|
|
node = nodes[i], node.x -= sx, node.y -= sy;
|
|
}
|
|
}
|
|
force.initialize = function(_) {
|
|
nodes = _;
|
|
};
|
|
force.x = function(_) {
|
|
return arguments.length ? (x3 = +_, force) : x3;
|
|
};
|
|
force.y = function(_) {
|
|
return arguments.length ? (y3 = +_, force) : y3;
|
|
};
|
|
force.strength = function(_) {
|
|
return arguments.length ? (strength = +_, force) : strength;
|
|
};
|
|
return force;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/add.js
|
|
function add_default(d) {
|
|
const x3 = +this._x.call(null, d), y3 = +this._y.call(null, d);
|
|
return add(this.cover(x3, y3), x3, y3, d);
|
|
}
|
|
function add(tree, x3, y3, d) {
|
|
if (isNaN(x3) || isNaN(y3))
|
|
return tree;
|
|
var parent, node = tree._root, leaf = { data: d }, x0 = tree._x0, y0 = tree._y0, x1 = tree._x1, y1 = tree._y1, xm, ym, xp, yp, right, bottom, i, j;
|
|
if (!node)
|
|
return tree._root = leaf, tree;
|
|
while (node.length) {
|
|
if (right = x3 >= (xm = (x0 + x1) / 2))
|
|
x0 = xm;
|
|
else
|
|
x1 = xm;
|
|
if (bottom = y3 >= (ym = (y0 + y1) / 2))
|
|
y0 = ym;
|
|
else
|
|
y1 = ym;
|
|
if (parent = node, !(node = node[i = bottom << 1 | right]))
|
|
return parent[i] = leaf, tree;
|
|
}
|
|
xp = +tree._x.call(null, node.data);
|
|
yp = +tree._y.call(null, node.data);
|
|
if (x3 === xp && y3 === yp)
|
|
return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;
|
|
do {
|
|
parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
|
|
if (right = x3 >= (xm = (x0 + x1) / 2))
|
|
x0 = xm;
|
|
else
|
|
x1 = xm;
|
|
if (bottom = y3 >= (ym = (y0 + y1) / 2))
|
|
y0 = ym;
|
|
else
|
|
y1 = ym;
|
|
} while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | xp >= xm));
|
|
return parent[j] = node, parent[i] = leaf, tree;
|
|
}
|
|
function addAll(data) {
|
|
var d, i, n = data.length, x3, y3, xz = new Array(n), yz = new Array(n), x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;
|
|
for (i = 0; i < n; ++i) {
|
|
if (isNaN(x3 = +this._x.call(null, d = data[i])) || isNaN(y3 = +this._y.call(null, d)))
|
|
continue;
|
|
xz[i] = x3;
|
|
yz[i] = y3;
|
|
if (x3 < x0)
|
|
x0 = x3;
|
|
if (x3 > x1)
|
|
x1 = x3;
|
|
if (y3 < y0)
|
|
y0 = y3;
|
|
if (y3 > y1)
|
|
y1 = y3;
|
|
}
|
|
if (x0 > x1 || y0 > y1)
|
|
return this;
|
|
this.cover(x0, y0).cover(x1, y1);
|
|
for (i = 0; i < n; ++i) {
|
|
add(this, xz[i], yz[i], data[i]);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/cover.js
|
|
function cover_default(x3, y3) {
|
|
if (isNaN(x3 = +x3) || isNaN(y3 = +y3))
|
|
return this;
|
|
var x0 = this._x0, y0 = this._y0, x1 = this._x1, y1 = this._y1;
|
|
if (isNaN(x0)) {
|
|
x1 = (x0 = Math.floor(x3)) + 1;
|
|
y1 = (y0 = Math.floor(y3)) + 1;
|
|
} else {
|
|
var z = x1 - x0 || 1, node = this._root, parent, i;
|
|
while (x0 > x3 || x3 >= x1 || y0 > y3 || y3 >= y1) {
|
|
i = (y3 < y0) << 1 | x3 < x0;
|
|
parent = new Array(4), parent[i] = node, node = parent, z *= 2;
|
|
switch (i) {
|
|
case 0:
|
|
x1 = x0 + z, y1 = y0 + z;
|
|
break;
|
|
case 1:
|
|
x0 = x1 - z, y1 = y0 + z;
|
|
break;
|
|
case 2:
|
|
x1 = x0 + z, y0 = y1 - z;
|
|
break;
|
|
case 3:
|
|
x0 = x1 - z, y0 = y1 - z;
|
|
break;
|
|
}
|
|
}
|
|
if (this._root && this._root.length)
|
|
this._root = node;
|
|
}
|
|
this._x0 = x0;
|
|
this._y0 = y0;
|
|
this._x1 = x1;
|
|
this._y1 = y1;
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/data.js
|
|
function data_default2() {
|
|
var data = [];
|
|
this.visit(function(node) {
|
|
if (!node.length)
|
|
do
|
|
data.push(node.data);
|
|
while (node = node.next);
|
|
});
|
|
return data;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/extent.js
|
|
function extent_default(_) {
|
|
return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/quad.js
|
|
function quad_default(node, x0, y0, x1, y1) {
|
|
this.node = node;
|
|
this.x0 = x0;
|
|
this.y0 = y0;
|
|
this.x1 = x1;
|
|
this.y1 = y1;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/find.js
|
|
function find_default(x3, y3, radius) {
|
|
var data, x0 = this._x0, y0 = this._y0, x1, y1, x22, y22, x32 = this._x1, y32 = this._y1, quads = [], node = this._root, q, i;
|
|
if (node)
|
|
quads.push(new quad_default(node, x0, y0, x32, y32));
|
|
if (radius == null)
|
|
radius = Infinity;
|
|
else {
|
|
x0 = x3 - radius, y0 = y3 - radius;
|
|
x32 = x3 + radius, y32 = y3 + radius;
|
|
radius *= radius;
|
|
}
|
|
while (q = quads.pop()) {
|
|
if (!(node = q.node) || (x1 = q.x0) > x32 || (y1 = q.y0) > y32 || (x22 = q.x1) < x0 || (y22 = q.y1) < y0)
|
|
continue;
|
|
if (node.length) {
|
|
var xm = (x1 + x22) / 2, ym = (y1 + y22) / 2;
|
|
quads.push(
|
|
new quad_default(node[3], xm, ym, x22, y22),
|
|
new quad_default(node[2], x1, ym, xm, y22),
|
|
new quad_default(node[1], xm, y1, x22, ym),
|
|
new quad_default(node[0], x1, y1, xm, ym)
|
|
);
|
|
if (i = (y3 >= ym) << 1 | x3 >= xm) {
|
|
q = quads[quads.length - 1];
|
|
quads[quads.length - 1] = quads[quads.length - 1 - i];
|
|
quads[quads.length - 1 - i] = q;
|
|
}
|
|
} else {
|
|
var dx = x3 - +this._x.call(null, node.data), dy = y3 - +this._y.call(null, node.data), d2 = dx * dx + dy * dy;
|
|
if (d2 < radius) {
|
|
var d = Math.sqrt(radius = d2);
|
|
x0 = x3 - d, y0 = y3 - d;
|
|
x32 = x3 + d, y32 = y3 + d;
|
|
data = node.data;
|
|
}
|
|
}
|
|
}
|
|
return data;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/remove.js
|
|
function remove_default3(d) {
|
|
if (isNaN(x3 = +this._x.call(null, d)) || isNaN(y3 = +this._y.call(null, d)))
|
|
return this;
|
|
var parent, node = this._root, retainer, previous, next, x0 = this._x0, y0 = this._y0, x1 = this._x1, y1 = this._y1, x3, y3, xm, ym, right, bottom, i, j;
|
|
if (!node)
|
|
return this;
|
|
if (node.length)
|
|
while (true) {
|
|
if (right = x3 >= (xm = (x0 + x1) / 2))
|
|
x0 = xm;
|
|
else
|
|
x1 = xm;
|
|
if (bottom = y3 >= (ym = (y0 + y1) / 2))
|
|
y0 = ym;
|
|
else
|
|
y1 = ym;
|
|
if (!(parent = node, node = node[i = bottom << 1 | right]))
|
|
return this;
|
|
if (!node.length)
|
|
break;
|
|
if (parent[i + 1 & 3] || parent[i + 2 & 3] || parent[i + 3 & 3])
|
|
retainer = parent, j = i;
|
|
}
|
|
while (node.data !== d)
|
|
if (!(previous = node, node = node.next))
|
|
return this;
|
|
if (next = node.next)
|
|
delete node.next;
|
|
if (previous)
|
|
return next ? previous.next = next : delete previous.next, this;
|
|
if (!parent)
|
|
return this._root = next, this;
|
|
next ? parent[i] = next : delete parent[i];
|
|
if ((node = parent[0] || parent[1] || parent[2] || parent[3]) && node === (parent[3] || parent[2] || parent[1] || parent[0]) && !node.length) {
|
|
if (retainer)
|
|
retainer[j] = node;
|
|
else
|
|
this._root = node;
|
|
}
|
|
return this;
|
|
}
|
|
function removeAll(data) {
|
|
for (var i = 0, n = data.length; i < n; ++i)
|
|
this.remove(data[i]);
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/root.js
|
|
function root_default() {
|
|
return this._root;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/size.js
|
|
function size_default2() {
|
|
var size = 0;
|
|
this.visit(function(node) {
|
|
if (!node.length)
|
|
do
|
|
++size;
|
|
while (node = node.next);
|
|
});
|
|
return size;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/visit.js
|
|
function visit_default(callback) {
|
|
var quads = [], q, node = this._root, child, x0, y0, x1, y1;
|
|
if (node)
|
|
quads.push(new quad_default(node, this._x0, this._y0, this._x1, this._y1));
|
|
while (q = quads.pop()) {
|
|
if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {
|
|
var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
|
|
if (child = node[3])
|
|
quads.push(new quad_default(child, xm, ym, x1, y1));
|
|
if (child = node[2])
|
|
quads.push(new quad_default(child, x0, ym, xm, y1));
|
|
if (child = node[1])
|
|
quads.push(new quad_default(child, xm, y0, x1, ym));
|
|
if (child = node[0])
|
|
quads.push(new quad_default(child, x0, y0, xm, ym));
|
|
}
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/visitAfter.js
|
|
function visitAfter_default(callback) {
|
|
var quads = [], next = [], q;
|
|
if (this._root)
|
|
quads.push(new quad_default(this._root, this._x0, this._y0, this._x1, this._y1));
|
|
while (q = quads.pop()) {
|
|
var node = q.node;
|
|
if (node.length) {
|
|
var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
|
|
if (child = node[0])
|
|
quads.push(new quad_default(child, x0, y0, xm, ym));
|
|
if (child = node[1])
|
|
quads.push(new quad_default(child, xm, y0, x1, ym));
|
|
if (child = node[2])
|
|
quads.push(new quad_default(child, x0, ym, xm, y1));
|
|
if (child = node[3])
|
|
quads.push(new quad_default(child, xm, ym, x1, y1));
|
|
}
|
|
next.push(q);
|
|
}
|
|
while (q = next.pop()) {
|
|
callback(q.node, q.x0, q.y0, q.x1, q.y1);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/x.js
|
|
function defaultX(d) {
|
|
return d[0];
|
|
}
|
|
function x_default(_) {
|
|
return arguments.length ? (this._x = _, this) : this._x;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/y.js
|
|
function defaultY(d) {
|
|
return d[1];
|
|
}
|
|
function y_default(_) {
|
|
return arguments.length ? (this._y = _, this) : this._y;
|
|
}
|
|
|
|
// node_modules/d3-quadtree/src/quadtree.js
|
|
function quadtree(nodes, x3, y3) {
|
|
var tree = new Quadtree(x3 == null ? defaultX : x3, y3 == null ? defaultY : y3, NaN, NaN, NaN, NaN);
|
|
return nodes == null ? tree : tree.addAll(nodes);
|
|
}
|
|
function Quadtree(x3, y3, x0, y0, x1, y1) {
|
|
this._x = x3;
|
|
this._y = y3;
|
|
this._x0 = x0;
|
|
this._y0 = y0;
|
|
this._x1 = x1;
|
|
this._y1 = y1;
|
|
this._root = void 0;
|
|
}
|
|
function leaf_copy(leaf) {
|
|
var copy2 = { data: leaf.data }, next = copy2;
|
|
while (leaf = leaf.next)
|
|
next = next.next = { data: leaf.data };
|
|
return copy2;
|
|
}
|
|
var treeProto = quadtree.prototype = Quadtree.prototype;
|
|
treeProto.copy = function() {
|
|
var copy2 = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), node = this._root, nodes, child;
|
|
if (!node)
|
|
return copy2;
|
|
if (!node.length)
|
|
return copy2._root = leaf_copy(node), copy2;
|
|
nodes = [{ source: node, target: copy2._root = new Array(4) }];
|
|
while (node = nodes.pop()) {
|
|
for (var i = 0; i < 4; ++i) {
|
|
if (child = node.source[i]) {
|
|
if (child.length)
|
|
nodes.push({ source: child, target: node.target[i] = new Array(4) });
|
|
else
|
|
node.target[i] = leaf_copy(child);
|
|
}
|
|
}
|
|
}
|
|
return copy2;
|
|
};
|
|
treeProto.add = add_default;
|
|
treeProto.addAll = addAll;
|
|
treeProto.cover = cover_default;
|
|
treeProto.data = data_default2;
|
|
treeProto.extent = extent_default;
|
|
treeProto.find = find_default;
|
|
treeProto.remove = remove_default3;
|
|
treeProto.removeAll = removeAll;
|
|
treeProto.root = root_default;
|
|
treeProto.size = size_default2;
|
|
treeProto.visit = visit_default;
|
|
treeProto.visitAfter = visitAfter_default;
|
|
treeProto.x = x_default;
|
|
treeProto.y = y_default;
|
|
|
|
// node_modules/d3-force/src/constant.js
|
|
function constant_default5(x3) {
|
|
return function() {
|
|
return x3;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-force/src/jiggle.js
|
|
function jiggle_default(random) {
|
|
return (random() - 0.5) * 1e-6;
|
|
}
|
|
|
|
// node_modules/d3-force/src/collide.js
|
|
function x(d) {
|
|
return d.x + d.vx;
|
|
}
|
|
function y(d) {
|
|
return d.y + d.vy;
|
|
}
|
|
function collide_default(radius) {
|
|
var nodes, radii, random, strength = 1, iterations = 1;
|
|
if (typeof radius !== "function")
|
|
radius = constant_default5(radius == null ? 1 : +radius);
|
|
function force() {
|
|
var i, n = nodes.length, tree, node, xi, yi, ri, ri2;
|
|
for (var k = 0; k < iterations; ++k) {
|
|
tree = quadtree(nodes, x, y).visitAfter(prepare);
|
|
for (i = 0; i < n; ++i) {
|
|
node = nodes[i];
|
|
ri = radii[node.index], ri2 = ri * ri;
|
|
xi = node.x + node.vx;
|
|
yi = node.y + node.vy;
|
|
tree.visit(apply);
|
|
}
|
|
}
|
|
function apply(quad, x0, y0, x1, y1) {
|
|
var data = quad.data, rj = quad.r, r = ri + rj;
|
|
if (data) {
|
|
if (data.index > node.index) {
|
|
var x3 = xi - data.x - data.vx, y3 = yi - data.y - data.vy, l = x3 * x3 + y3 * y3;
|
|
if (l < r * r) {
|
|
if (x3 === 0)
|
|
x3 = jiggle_default(random), l += x3 * x3;
|
|
if (y3 === 0)
|
|
y3 = jiggle_default(random), l += y3 * y3;
|
|
l = (r - (l = Math.sqrt(l))) / l * strength;
|
|
node.vx += (x3 *= l) * (r = (rj *= rj) / (ri2 + rj));
|
|
node.vy += (y3 *= l) * r;
|
|
data.vx -= x3 * (r = 1 - r);
|
|
data.vy -= y3 * r;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;
|
|
}
|
|
}
|
|
function prepare(quad) {
|
|
if (quad.data)
|
|
return quad.r = radii[quad.data.index];
|
|
for (var i = quad.r = 0; i < 4; ++i) {
|
|
if (quad[i] && quad[i].r > quad.r) {
|
|
quad.r = quad[i].r;
|
|
}
|
|
}
|
|
}
|
|
function initialize() {
|
|
if (!nodes)
|
|
return;
|
|
var i, n = nodes.length, node;
|
|
radii = new Array(n);
|
|
for (i = 0; i < n; ++i)
|
|
node = nodes[i], radii[node.index] = +radius(node, i, nodes);
|
|
}
|
|
force.initialize = function(_nodes, _random) {
|
|
nodes = _nodes;
|
|
random = _random;
|
|
initialize();
|
|
};
|
|
force.iterations = function(_) {
|
|
return arguments.length ? (iterations = +_, force) : iterations;
|
|
};
|
|
force.strength = function(_) {
|
|
return arguments.length ? (strength = +_, force) : strength;
|
|
};
|
|
force.radius = function(_) {
|
|
return arguments.length ? (radius = typeof _ === "function" ? _ : constant_default5(+_), initialize(), force) : radius;
|
|
};
|
|
return force;
|
|
}
|
|
|
|
// node_modules/d3-force/src/link.js
|
|
function index(d) {
|
|
return d.index;
|
|
}
|
|
function find2(nodeById, nodeId) {
|
|
var node = nodeById.get(nodeId);
|
|
if (!node)
|
|
throw new Error("node not found: " + nodeId);
|
|
return node;
|
|
}
|
|
function link_default(links) {
|
|
var id2 = index, strength = defaultStrength, strengths, distance = constant_default5(30), distances, nodes, count, bias, random, iterations = 1;
|
|
if (links == null)
|
|
links = [];
|
|
function defaultStrength(link) {
|
|
return 1 / Math.min(count[link.source.index], count[link.target.index]);
|
|
}
|
|
function force(alpha) {
|
|
for (var k = 0, n = links.length; k < iterations; ++k) {
|
|
for (var i = 0, link, source, target, x3, y3, l, b; i < n; ++i) {
|
|
link = links[i], source = link.source, target = link.target;
|
|
x3 = target.x + target.vx - source.x - source.vx || jiggle_default(random);
|
|
y3 = target.y + target.vy - source.y - source.vy || jiggle_default(random);
|
|
l = Math.sqrt(x3 * x3 + y3 * y3);
|
|
l = (l - distances[i]) / l * alpha * strengths[i];
|
|
x3 *= l, y3 *= l;
|
|
target.vx -= x3 * (b = bias[i]);
|
|
target.vy -= y3 * b;
|
|
source.vx += x3 * (b = 1 - b);
|
|
source.vy += y3 * b;
|
|
}
|
|
}
|
|
}
|
|
function initialize() {
|
|
if (!nodes)
|
|
return;
|
|
var i, n = nodes.length, m2 = links.length, nodeById = new Map(nodes.map((d, i2) => [id2(d, i2, nodes), d])), link;
|
|
for (i = 0, count = new Array(n); i < m2; ++i) {
|
|
link = links[i], link.index = i;
|
|
if (typeof link.source !== "object")
|
|
link.source = find2(nodeById, link.source);
|
|
if (typeof link.target !== "object")
|
|
link.target = find2(nodeById, link.target);
|
|
count[link.source.index] = (count[link.source.index] || 0) + 1;
|
|
count[link.target.index] = (count[link.target.index] || 0) + 1;
|
|
}
|
|
for (i = 0, bias = new Array(m2); i < m2; ++i) {
|
|
link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);
|
|
}
|
|
strengths = new Array(m2), initializeStrength();
|
|
distances = new Array(m2), initializeDistance();
|
|
}
|
|
function initializeStrength() {
|
|
if (!nodes)
|
|
return;
|
|
for (var i = 0, n = links.length; i < n; ++i) {
|
|
strengths[i] = +strength(links[i], i, links);
|
|
}
|
|
}
|
|
function initializeDistance() {
|
|
if (!nodes)
|
|
return;
|
|
for (var i = 0, n = links.length; i < n; ++i) {
|
|
distances[i] = +distance(links[i], i, links);
|
|
}
|
|
}
|
|
force.initialize = function(_nodes, _random) {
|
|
nodes = _nodes;
|
|
random = _random;
|
|
initialize();
|
|
};
|
|
force.links = function(_) {
|
|
return arguments.length ? (links = _, initialize(), force) : links;
|
|
};
|
|
force.id = function(_) {
|
|
return arguments.length ? (id2 = _, force) : id2;
|
|
};
|
|
force.iterations = function(_) {
|
|
return arguments.length ? (iterations = +_, force) : iterations;
|
|
};
|
|
force.strength = function(_) {
|
|
return arguments.length ? (strength = typeof _ === "function" ? _ : constant_default5(+_), initializeStrength(), force) : strength;
|
|
};
|
|
force.distance = function(_) {
|
|
return arguments.length ? (distance = typeof _ === "function" ? _ : constant_default5(+_), initializeDistance(), force) : distance;
|
|
};
|
|
return force;
|
|
}
|
|
|
|
// node_modules/d3-force/src/lcg.js
|
|
var a = 1664525;
|
|
var c = 1013904223;
|
|
var m = 4294967296;
|
|
function lcg_default() {
|
|
let s = 1;
|
|
return () => (s = (a * s + c) % m) / m;
|
|
}
|
|
|
|
// node_modules/d3-force/src/simulation.js
|
|
function x2(d) {
|
|
return d.x;
|
|
}
|
|
function y2(d) {
|
|
return d.y;
|
|
}
|
|
var initialRadius = 10;
|
|
var initialAngle = Math.PI * (3 - Math.sqrt(5));
|
|
function simulation_default(nodes) {
|
|
var simulation, alpha = 1, alphaMin = 1e-3, alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), alphaTarget = 0, velocityDecay = 0.6, forces = /* @__PURE__ */ new Map(), stepper = timer(step), event = dispatch_default("tick", "end"), random = lcg_default();
|
|
if (nodes == null)
|
|
nodes = [];
|
|
function step() {
|
|
tick();
|
|
event.call("tick", simulation);
|
|
if (alpha < alphaMin) {
|
|
stepper.stop();
|
|
event.call("end", simulation);
|
|
}
|
|
}
|
|
function tick(iterations) {
|
|
var i, n = nodes.length, node;
|
|
if (iterations === void 0)
|
|
iterations = 1;
|
|
for (var k = 0; k < iterations; ++k) {
|
|
alpha += (alphaTarget - alpha) * alphaDecay;
|
|
forces.forEach(function(force) {
|
|
force(alpha);
|
|
});
|
|
for (i = 0; i < n; ++i) {
|
|
node = nodes[i];
|
|
if (node.fx == null)
|
|
node.x += node.vx *= velocityDecay;
|
|
else
|
|
node.x = node.fx, node.vx = 0;
|
|
if (node.fy == null)
|
|
node.y += node.vy *= velocityDecay;
|
|
else
|
|
node.y = node.fy, node.vy = 0;
|
|
}
|
|
}
|
|
return simulation;
|
|
}
|
|
function initializeNodes() {
|
|
for (var i = 0, n = nodes.length, node; i < n; ++i) {
|
|
node = nodes[i], node.index = i;
|
|
if (node.fx != null)
|
|
node.x = node.fx;
|
|
if (node.fy != null)
|
|
node.y = node.fy;
|
|
if (isNaN(node.x) || isNaN(node.y)) {
|
|
var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;
|
|
node.x = radius * Math.cos(angle);
|
|
node.y = radius * Math.sin(angle);
|
|
}
|
|
if (isNaN(node.vx) || isNaN(node.vy)) {
|
|
node.vx = node.vy = 0;
|
|
}
|
|
}
|
|
}
|
|
function initializeForce(force) {
|
|
if (force.initialize)
|
|
force.initialize(nodes, random);
|
|
return force;
|
|
}
|
|
initializeNodes();
|
|
return simulation = {
|
|
tick,
|
|
restart: function() {
|
|
return stepper.restart(step), simulation;
|
|
},
|
|
stop: function() {
|
|
return stepper.stop(), simulation;
|
|
},
|
|
nodes: function(_) {
|
|
return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;
|
|
},
|
|
alpha: function(_) {
|
|
return arguments.length ? (alpha = +_, simulation) : alpha;
|
|
},
|
|
alphaMin: function(_) {
|
|
return arguments.length ? (alphaMin = +_, simulation) : alphaMin;
|
|
},
|
|
alphaDecay: function(_) {
|
|
return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;
|
|
},
|
|
alphaTarget: function(_) {
|
|
return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;
|
|
},
|
|
velocityDecay: function(_) {
|
|
return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;
|
|
},
|
|
randomSource: function(_) {
|
|
return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;
|
|
},
|
|
force: function(name, _) {
|
|
return arguments.length > 1 ? (_ == null ? forces.delete(name) : forces.set(name, initializeForce(_)), simulation) : forces.get(name);
|
|
},
|
|
find: function(x3, y3, radius) {
|
|
var i = 0, n = nodes.length, dx, dy, d2, node, closest;
|
|
if (radius == null)
|
|
radius = Infinity;
|
|
else
|
|
radius *= radius;
|
|
for (i = 0; i < n; ++i) {
|
|
node = nodes[i];
|
|
dx = x3 - node.x;
|
|
dy = y3 - node.y;
|
|
d2 = dx * dx + dy * dy;
|
|
if (d2 < radius)
|
|
closest = node, radius = d2;
|
|
}
|
|
return closest;
|
|
},
|
|
on: function(name, _) {
|
|
return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);
|
|
}
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-force/src/manyBody.js
|
|
function manyBody_default() {
|
|
var nodes, node, random, alpha, strength = constant_default5(-30), strengths, distanceMin2 = 1, distanceMax2 = Infinity, theta2 = 0.81;
|
|
function force(_) {
|
|
var i, n = nodes.length, tree = quadtree(nodes, x2, y2).visitAfter(accumulate);
|
|
for (alpha = _, i = 0; i < n; ++i)
|
|
node = nodes[i], tree.visit(apply);
|
|
}
|
|
function initialize() {
|
|
if (!nodes)
|
|
return;
|
|
var i, n = nodes.length, node2;
|
|
strengths = new Array(n);
|
|
for (i = 0; i < n; ++i)
|
|
node2 = nodes[i], strengths[node2.index] = +strength(node2, i, nodes);
|
|
}
|
|
function accumulate(quad) {
|
|
var strength2 = 0, q, c2, weight = 0, x3, y3, i;
|
|
if (quad.length) {
|
|
for (x3 = y3 = i = 0; i < 4; ++i) {
|
|
if ((q = quad[i]) && (c2 = Math.abs(q.value))) {
|
|
strength2 += q.value, weight += c2, x3 += c2 * q.x, y3 += c2 * q.y;
|
|
}
|
|
}
|
|
quad.x = x3 / weight;
|
|
quad.y = y3 / weight;
|
|
} else {
|
|
q = quad;
|
|
q.x = q.data.x;
|
|
q.y = q.data.y;
|
|
do
|
|
strength2 += strengths[q.data.index];
|
|
while (q = q.next);
|
|
}
|
|
quad.value = strength2;
|
|
}
|
|
function apply(quad, x1, _, x22) {
|
|
if (!quad.value)
|
|
return true;
|
|
var x3 = quad.x - node.x, y3 = quad.y - node.y, w = x22 - x1, l = x3 * x3 + y3 * y3;
|
|
if (w * w / theta2 < l) {
|
|
if (l < distanceMax2) {
|
|
if (x3 === 0)
|
|
x3 = jiggle_default(random), l += x3 * x3;
|
|
if (y3 === 0)
|
|
y3 = jiggle_default(random), l += y3 * y3;
|
|
if (l < distanceMin2)
|
|
l = Math.sqrt(distanceMin2 * l);
|
|
node.vx += x3 * quad.value * alpha / l;
|
|
node.vy += y3 * quad.value * alpha / l;
|
|
}
|
|
return true;
|
|
} else if (quad.length || l >= distanceMax2)
|
|
return;
|
|
if (quad.data !== node || quad.next) {
|
|
if (x3 === 0)
|
|
x3 = jiggle_default(random), l += x3 * x3;
|
|
if (y3 === 0)
|
|
y3 = jiggle_default(random), l += y3 * y3;
|
|
if (l < distanceMin2)
|
|
l = Math.sqrt(distanceMin2 * l);
|
|
}
|
|
do
|
|
if (quad.data !== node) {
|
|
w = strengths[quad.data.index] * alpha / l;
|
|
node.vx += x3 * w;
|
|
node.vy += y3 * w;
|
|
}
|
|
while (quad = quad.next);
|
|
}
|
|
force.initialize = function(_nodes, _random) {
|
|
nodes = _nodes;
|
|
random = _random;
|
|
initialize();
|
|
};
|
|
force.strength = function(_) {
|
|
return arguments.length ? (strength = typeof _ === "function" ? _ : constant_default5(+_), initialize(), force) : strength;
|
|
};
|
|
force.distanceMin = function(_) {
|
|
return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);
|
|
};
|
|
force.distanceMax = function(_) {
|
|
return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);
|
|
};
|
|
force.theta = function(_) {
|
|
return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);
|
|
};
|
|
return force;
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatDecimal.js
|
|
function formatDecimal_default(x3) {
|
|
return Math.abs(x3 = Math.round(x3)) >= 1e21 ? x3.toLocaleString("en").replace(/,/g, "") : x3.toString(10);
|
|
}
|
|
function formatDecimalParts(x3, p) {
|
|
if ((i = (x3 = p ? x3.toExponential(p - 1) : x3.toExponential()).indexOf("e")) < 0)
|
|
return null;
|
|
var i, coefficient = x3.slice(0, i);
|
|
return [
|
|
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
|
+x3.slice(i + 1)
|
|
];
|
|
}
|
|
|
|
// node_modules/d3-format/src/exponent.js
|
|
function exponent_default(x3) {
|
|
return x3 = formatDecimalParts(Math.abs(x3)), x3 ? x3[1] : NaN;
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatGroup.js
|
|
function formatGroup_default(grouping, thousands) {
|
|
return function(value, width) {
|
|
var i = value.length, t = [], j = 0, g = grouping[0], length = 0;
|
|
while (i > 0 && g > 0) {
|
|
if (length + g + 1 > width)
|
|
g = Math.max(1, width - length);
|
|
t.push(value.substring(i -= g, i + g));
|
|
if ((length += g + 1) > width)
|
|
break;
|
|
g = grouping[j = (j + 1) % grouping.length];
|
|
}
|
|
return t.reverse().join(thousands);
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatNumerals.js
|
|
function formatNumerals_default(numerals) {
|
|
return function(value) {
|
|
return value.replace(/[0-9]/g, function(i) {
|
|
return numerals[+i];
|
|
});
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatSpecifier.js
|
|
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
function formatSpecifier(specifier) {
|
|
if (!(match = re.exec(specifier)))
|
|
throw new Error("invalid format: " + specifier);
|
|
var match;
|
|
return new FormatSpecifier({
|
|
fill: match[1],
|
|
align: match[2],
|
|
sign: match[3],
|
|
symbol: match[4],
|
|
zero: match[5],
|
|
width: match[6],
|
|
comma: match[7],
|
|
precision: match[8] && match[8].slice(1),
|
|
trim: match[9],
|
|
type: match[10]
|
|
});
|
|
}
|
|
formatSpecifier.prototype = FormatSpecifier.prototype;
|
|
function FormatSpecifier(specifier) {
|
|
this.fill = specifier.fill === void 0 ? " " : specifier.fill + "";
|
|
this.align = specifier.align === void 0 ? ">" : specifier.align + "";
|
|
this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "";
|
|
this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "";
|
|
this.zero = !!specifier.zero;
|
|
this.width = specifier.width === void 0 ? void 0 : +specifier.width;
|
|
this.comma = !!specifier.comma;
|
|
this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision;
|
|
this.trim = !!specifier.trim;
|
|
this.type = specifier.type === void 0 ? "" : specifier.type + "";
|
|
}
|
|
FormatSpecifier.prototype.toString = function() {
|
|
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
};
|
|
|
|
// node_modules/d3-format/src/formatTrim.js
|
|
function formatTrim_default(s) {
|
|
out:
|
|
for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
|
|
switch (s[i]) {
|
|
case ".":
|
|
i0 = i1 = i;
|
|
break;
|
|
case "0":
|
|
if (i0 === 0)
|
|
i0 = i;
|
|
i1 = i;
|
|
break;
|
|
default:
|
|
if (!+s[i])
|
|
break out;
|
|
if (i0 > 0)
|
|
i0 = 0;
|
|
break;
|
|
}
|
|
}
|
|
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatPrefixAuto.js
|
|
var prefixExponent;
|
|
function formatPrefixAuto_default(x3, p) {
|
|
var d = formatDecimalParts(x3, p);
|
|
if (!d)
|
|
return x3 + "";
|
|
var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length;
|
|
return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x3, Math.max(0, p + i - 1))[0];
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatRounded.js
|
|
function formatRounded_default(x3, p) {
|
|
var d = formatDecimalParts(x3, p);
|
|
if (!d)
|
|
return x3 + "";
|
|
var coefficient = d[0], exponent = d[1];
|
|
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
|
|
}
|
|
|
|
// node_modules/d3-format/src/formatTypes.js
|
|
var formatTypes_default = {
|
|
"%": (x3, p) => (x3 * 100).toFixed(p),
|
|
"b": (x3) => Math.round(x3).toString(2),
|
|
"c": (x3) => x3 + "",
|
|
"d": formatDecimal_default,
|
|
"e": (x3, p) => x3.toExponential(p),
|
|
"f": (x3, p) => x3.toFixed(p),
|
|
"g": (x3, p) => x3.toPrecision(p),
|
|
"o": (x3) => Math.round(x3).toString(8),
|
|
"p": (x3, p) => formatRounded_default(x3 * 100, p),
|
|
"r": formatRounded_default,
|
|
"s": formatPrefixAuto_default,
|
|
"X": (x3) => Math.round(x3).toString(16).toUpperCase(),
|
|
"x": (x3) => Math.round(x3).toString(16)
|
|
};
|
|
|
|
// node_modules/d3-format/src/identity.js
|
|
function identity_default(x3) {
|
|
return x3;
|
|
}
|
|
|
|
// node_modules/d3-format/src/locale.js
|
|
var map = Array.prototype.map;
|
|
var prefixes = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
function locale_default(locale2) {
|
|
var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity_default : formatGroup_default(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity_default : formatNumerals_default(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "\u2212" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
|
|
function newFormat(specifier) {
|
|
specifier = formatSpecifier(specifier);
|
|
var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero3 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type2 = specifier.type;
|
|
if (type2 === "n")
|
|
comma = true, type2 = "g";
|
|
else if (!formatTypes_default[type2])
|
|
precision === void 0 && (precision = 12), trim = true, type2 = "g";
|
|
if (zero3 || fill === "0" && align === "=")
|
|
zero3 = true, fill = "0", align = "=";
|
|
var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type2) ? "0" + type2.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type2) ? percent : "";
|
|
var formatType = formatTypes_default[type2], maybeSuffix = /[defgprs%]/.test(type2);
|
|
precision = precision === void 0 ? 6 : /[gprs]/.test(type2) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
function format2(value) {
|
|
var valuePrefix = prefix, valueSuffix = suffix, i, n, c2;
|
|
if (type2 === "c") {
|
|
valueSuffix = formatType(value) + valueSuffix;
|
|
value = "";
|
|
} else {
|
|
value = +value;
|
|
var valueNegative = value < 0 || 1 / value < 0;
|
|
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
|
|
if (trim)
|
|
value = formatTrim_default(value);
|
|
if (valueNegative && +value === 0 && sign !== "+")
|
|
valueNegative = false;
|
|
valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
|
|
valueSuffix = (type2 === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
|
|
if (maybeSuffix) {
|
|
i = -1, n = value.length;
|
|
while (++i < n) {
|
|
if (c2 = value.charCodeAt(i), 48 > c2 || c2 > 57) {
|
|
valueSuffix = (c2 === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
|
|
value = value.slice(0, i);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (comma && !zero3)
|
|
value = group(value, Infinity);
|
|
var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
if (comma && zero3)
|
|
value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
|
|
switch (align) {
|
|
case "<":
|
|
value = valuePrefix + value + valueSuffix + padding;
|
|
break;
|
|
case "=":
|
|
value = valuePrefix + padding + value + valueSuffix;
|
|
break;
|
|
case "^":
|
|
value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
|
|
break;
|
|
default:
|
|
value = padding + valuePrefix + value + valueSuffix;
|
|
break;
|
|
}
|
|
return numerals(value);
|
|
}
|
|
format2.toString = function() {
|
|
return specifier + "";
|
|
};
|
|
return format2;
|
|
}
|
|
function formatPrefix2(specifier, value) {
|
|
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3];
|
|
return function(value2) {
|
|
return f(k * value2) + prefix;
|
|
};
|
|
}
|
|
return {
|
|
format: newFormat,
|
|
formatPrefix: formatPrefix2
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-format/src/defaultLocale.js
|
|
var locale;
|
|
var format;
|
|
var formatPrefix;
|
|
defaultLocale({
|
|
thousands: ",",
|
|
grouping: [3],
|
|
currency: ["$", ""]
|
|
});
|
|
function defaultLocale(definition) {
|
|
locale = locale_default(definition);
|
|
format = locale.format;
|
|
formatPrefix = locale.formatPrefix;
|
|
return locale;
|
|
}
|
|
|
|
// node_modules/d3-format/src/precisionFixed.js
|
|
function precisionFixed_default(step) {
|
|
return Math.max(0, -exponent_default(Math.abs(step)));
|
|
}
|
|
|
|
// node_modules/d3-format/src/precisionPrefix.js
|
|
function precisionPrefix_default(step, value) {
|
|
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step)));
|
|
}
|
|
|
|
// node_modules/d3-format/src/precisionRound.js
|
|
function precisionRound_default(step, max2) {
|
|
step = Math.abs(step), max2 = Math.abs(max2) - step;
|
|
return Math.max(0, exponent_default(max2) - exponent_default(step)) + 1;
|
|
}
|
|
|
|
// node_modules/d3-scale/src/init.js
|
|
function initRange(domain, range) {
|
|
switch (arguments.length) {
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
this.range(domain);
|
|
break;
|
|
default:
|
|
this.range(range).domain(domain);
|
|
break;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// node_modules/d3-scale/src/constant.js
|
|
function constants(x3) {
|
|
return function() {
|
|
return x3;
|
|
};
|
|
}
|
|
|
|
// node_modules/d3-scale/src/number.js
|
|
function number3(x3) {
|
|
return +x3;
|
|
}
|
|
|
|
// node_modules/d3-scale/src/continuous.js
|
|
var unit = [0, 1];
|
|
function identity2(x3) {
|
|
return x3;
|
|
}
|
|
function normalize(a2, b) {
|
|
return (b -= a2 = +a2) ? function(x3) {
|
|
return (x3 - a2) / b;
|
|
} : constants(isNaN(b) ? NaN : 0.5);
|
|
}
|
|
function clamper(a2, b) {
|
|
var t;
|
|
if (a2 > b)
|
|
t = a2, a2 = b, b = t;
|
|
return function(x3) {
|
|
return Math.max(a2, Math.min(b, x3));
|
|
};
|
|
}
|
|
function bimap(domain, range, interpolate) {
|
|
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
|
|
if (d1 < d0)
|
|
d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
|
|
else
|
|
d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
|
|
return function(x3) {
|
|
return r0(d0(x3));
|
|
};
|
|
}
|
|
function polymap(domain, range, interpolate) {
|
|
var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1;
|
|
if (domain[j] < domain[0]) {
|
|
domain = domain.slice().reverse();
|
|
range = range.slice().reverse();
|
|
}
|
|
while (++i < j) {
|
|
d[i] = normalize(domain[i], domain[i + 1]);
|
|
r[i] = interpolate(range[i], range[i + 1]);
|
|
}
|
|
return function(x3) {
|
|
var i2 = bisect_default(domain, x3, 1, j) - 1;
|
|
return r[i2](d[i2](x3));
|
|
};
|
|
}
|
|
function copy(source, target) {
|
|
return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
|
|
}
|
|
function transformer() {
|
|
var domain = unit, range = unit, interpolate = value_default, transform2, untransform, unknown, clamp = identity2, piecewise, output, input;
|
|
function rescale() {
|
|
var n = Math.min(domain.length, range.length);
|
|
if (clamp !== identity2)
|
|
clamp = clamper(domain[0], domain[n - 1]);
|
|
piecewise = n > 2 ? polymap : bimap;
|
|
output = input = null;
|
|
return scale;
|
|
}
|
|
function scale(x3) {
|
|
return x3 == null || isNaN(x3 = +x3) ? unknown : (output || (output = piecewise(domain.map(transform2), range, interpolate)))(transform2(clamp(x3)));
|
|
}
|
|
scale.invert = function(y3) {
|
|
return clamp(untransform((input || (input = piecewise(range, domain.map(transform2), number_default)))(y3)));
|
|
};
|
|
scale.domain = function(_) {
|
|
return arguments.length ? (domain = Array.from(_, number3), rescale()) : domain.slice();
|
|
};
|
|
scale.range = function(_) {
|
|
return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
|
|
};
|
|
scale.rangeRound = function(_) {
|
|
return range = Array.from(_), interpolate = round_default, rescale();
|
|
};
|
|
scale.clamp = function(_) {
|
|
return arguments.length ? (clamp = _ ? true : identity2, rescale()) : clamp !== identity2;
|
|
};
|
|
scale.interpolate = function(_) {
|
|
return arguments.length ? (interpolate = _, rescale()) : interpolate;
|
|
};
|
|
scale.unknown = function(_) {
|
|
return arguments.length ? (unknown = _, scale) : unknown;
|
|
};
|
|
return function(t, u) {
|
|
transform2 = t, untransform = u;
|
|
return rescale();
|
|
};
|
|
}
|
|
function continuous() {
|
|
return transformer()(identity2, identity2);
|
|
}
|
|
|
|
// node_modules/d3-scale/src/tickFormat.js
|
|
function tickFormat(start2, stop, count, specifier) {
|
|
var step = tickStep(start2, stop, count), precision;
|
|
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
switch (specifier.type) {
|
|
case "s": {
|
|
var value = Math.max(Math.abs(start2), Math.abs(stop));
|
|
if (specifier.precision == null && !isNaN(precision = precisionPrefix_default(step, value)))
|
|
specifier.precision = precision;
|
|
return formatPrefix(specifier, value);
|
|
}
|
|
case "":
|
|
case "e":
|
|
case "g":
|
|
case "p":
|
|
case "r": {
|
|
if (specifier.precision == null && !isNaN(precision = precisionRound_default(step, Math.max(Math.abs(start2), Math.abs(stop)))))
|
|
specifier.precision = precision - (specifier.type === "e");
|
|
break;
|
|
}
|
|
case "f":
|
|
case "%": {
|
|
if (specifier.precision == null && !isNaN(precision = precisionFixed_default(step)))
|
|
specifier.precision = precision - (specifier.type === "%") * 2;
|
|
break;
|
|
}
|
|
}
|
|
return format(specifier);
|
|
}
|
|
|
|
// node_modules/d3-scale/src/linear.js
|
|
function linearish(scale) {
|
|
var domain = scale.domain;
|
|
scale.ticks = function(count) {
|
|
var d = domain();
|
|
return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
|
|
};
|
|
scale.tickFormat = function(count, specifier) {
|
|
var d = domain();
|
|
return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
|
|
};
|
|
scale.nice = function(count) {
|
|
if (count == null)
|
|
count = 10;
|
|
var d = domain();
|
|
var i0 = 0;
|
|
var i1 = d.length - 1;
|
|
var start2 = d[i0];
|
|
var stop = d[i1];
|
|
var prestep;
|
|
var step;
|
|
var maxIter = 10;
|
|
if (stop < start2) {
|
|
step = start2, start2 = stop, stop = step;
|
|
step = i0, i0 = i1, i1 = step;
|
|
}
|
|
while (maxIter-- > 0) {
|
|
step = tickIncrement(start2, stop, count);
|
|
if (step === prestep) {
|
|
d[i0] = start2;
|
|
d[i1] = stop;
|
|
return domain(d);
|
|
} else if (step > 0) {
|
|
start2 = Math.floor(start2 / step) * step;
|
|
stop = Math.ceil(stop / step) * step;
|
|
} else if (step < 0) {
|
|
start2 = Math.ceil(start2 * step) / step;
|
|
stop = Math.floor(stop * step) / step;
|
|
} else {
|
|
break;
|
|
}
|
|
prestep = step;
|
|
}
|
|
return scale;
|
|
};
|
|
return scale;
|
|
}
|
|
function linear2() {
|
|
var scale = continuous();
|
|
scale.copy = function() {
|
|
return copy(scale, linear2());
|
|
};
|
|
initRange.apply(scale, arguments);
|
|
return linearish(scale);
|
|
}
|
|
|
|
// node_modules/d3-zoom/src/constant.js
|
|
var constant_default6 = (x3) => () => x3;
|
|
|
|
// node_modules/d3-zoom/src/event.js
|
|
function ZoomEvent(type2, {
|
|
sourceEvent,
|
|
target,
|
|
transform: transform2,
|
|
dispatch: dispatch2
|
|
}) {
|
|
Object.defineProperties(this, {
|
|
type: { value: type2, enumerable: true, configurable: true },
|
|
sourceEvent: { value: sourceEvent, enumerable: true, configurable: true },
|
|
target: { value: target, enumerable: true, configurable: true },
|
|
transform: { value: transform2, enumerable: true, configurable: true },
|
|
_: { value: dispatch2 }
|
|
});
|
|
}
|
|
|
|
// node_modules/d3-zoom/src/transform.js
|
|
function Transform(k, x3, y3) {
|
|
this.k = k;
|
|
this.x = x3;
|
|
this.y = y3;
|
|
}
|
|
Transform.prototype = {
|
|
constructor: Transform,
|
|
scale: function(k) {
|
|
return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
|
|
},
|
|
translate: function(x3, y3) {
|
|
return x3 === 0 & y3 === 0 ? this : new Transform(this.k, this.x + this.k * x3, this.y + this.k * y3);
|
|
},
|
|
apply: function(point) {
|
|
return [point[0] * this.k + this.x, point[1] * this.k + this.y];
|
|
},
|
|
applyX: function(x3) {
|
|
return x3 * this.k + this.x;
|
|
},
|
|
applyY: function(y3) {
|
|
return y3 * this.k + this.y;
|
|
},
|
|
invert: function(location) {
|
|
return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
|
|
},
|
|
invertX: function(x3) {
|
|
return (x3 - this.x) / this.k;
|
|
},
|
|
invertY: function(y3) {
|
|
return (y3 - this.y) / this.k;
|
|
},
|
|
rescaleX: function(x3) {
|
|
return x3.copy().domain(x3.range().map(this.invertX, this).map(x3.invert, x3));
|
|
},
|
|
rescaleY: function(y3) {
|
|
return y3.copy().domain(y3.range().map(this.invertY, this).map(y3.invert, y3));
|
|
},
|
|
toString: function() {
|
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
}
|
|
};
|
|
var identity3 = new Transform(1, 0, 0);
|
|
transform.prototype = Transform.prototype;
|
|
function transform(node) {
|
|
while (!node.__zoom)
|
|
if (!(node = node.parentNode))
|
|
return identity3;
|
|
return node.__zoom;
|
|
}
|
|
|
|
// node_modules/d3-zoom/src/noevent.js
|
|
function nopropagation3(event) {
|
|
event.stopImmediatePropagation();
|
|
}
|
|
function noevent_default3(event) {
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
|
|
// node_modules/d3-zoom/src/zoom.js
|
|
function defaultFilter2(event) {
|
|
return (!event.ctrlKey || event.type === "wheel") && !event.button;
|
|
}
|
|
function defaultExtent() {
|
|
var e = this;
|
|
if (e instanceof SVGElement) {
|
|
e = e.ownerSVGElement || e;
|
|
if (e.hasAttribute("viewBox")) {
|
|
e = e.viewBox.baseVal;
|
|
return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
|
|
}
|
|
return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
|
|
}
|
|
return [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
}
|
|
function defaultTransform() {
|
|
return this.__zoom || identity3;
|
|
}
|
|
function defaultWheelDelta(event) {
|
|
return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * (event.ctrlKey ? 10 : 1);
|
|
}
|
|
function defaultTouchable2() {
|
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
}
|
|
function defaultConstrain(transform2, extent, translateExtent) {
|
|
var dx0 = transform2.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform2.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform2.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform2.invertY(extent[1][1]) - translateExtent[1][1];
|
|
return transform2.translate(
|
|
dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
|
|
dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
|
|
);
|
|
}
|
|
function zoom_default2() {
|
|
var filter2 = defaultFilter2, extent = defaultExtent, constrain = defaultConstrain, wheelDelta = defaultWheelDelta, touchable = defaultTouchable2, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate = zoom_default, listeners = dispatch_default("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;
|
|
function zoom(selection2) {
|
|
selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: false }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
}
|
|
zoom.transform = function(collection, transform2, point, event) {
|
|
var selection2 = collection.selection ? collection.selection() : collection;
|
|
selection2.property("__zoom", defaultTransform);
|
|
if (collection !== selection2) {
|
|
schedule(collection, transform2, point, event);
|
|
} else {
|
|
selection2.interrupt().each(function() {
|
|
gesture(this, arguments).event(event).start().zoom(null, typeof transform2 === "function" ? transform2.apply(this, arguments) : transform2).end();
|
|
});
|
|
}
|
|
};
|
|
zoom.scaleBy = function(selection2, k, p, event) {
|
|
zoom.scaleTo(selection2, function() {
|
|
var k0 = this.__zoom.k, k1 = typeof k === "function" ? k.apply(this, arguments) : k;
|
|
return k0 * k1;
|
|
}, p, event);
|
|
};
|
|
zoom.scaleTo = function(selection2, k, p, event) {
|
|
zoom.transform(selection2, function() {
|
|
var e = extent.apply(this, arguments), t0 = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, p1 = t0.invert(p0), k1 = typeof k === "function" ? k.apply(this, arguments) : k;
|
|
return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
|
|
}, p, event);
|
|
};
|
|
zoom.translateBy = function(selection2, x3, y3, event) {
|
|
zoom.transform(selection2, function() {
|
|
return constrain(this.__zoom.translate(
|
|
typeof x3 === "function" ? x3.apply(this, arguments) : x3,
|
|
typeof y3 === "function" ? y3.apply(this, arguments) : y3
|
|
), extent.apply(this, arguments), translateExtent);
|
|
}, null, event);
|
|
};
|
|
zoom.translateTo = function(selection2, x3, y3, p, event) {
|
|
zoom.transform(selection2, function() {
|
|
var e = extent.apply(this, arguments), t = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
|
|
return constrain(identity3.translate(p0[0], p0[1]).scale(t.k).translate(
|
|
typeof x3 === "function" ? -x3.apply(this, arguments) : -x3,
|
|
typeof y3 === "function" ? -y3.apply(this, arguments) : -y3
|
|
), e, translateExtent);
|
|
}, p, event);
|
|
};
|
|
function scale(transform2, k) {
|
|
k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
|
|
return k === transform2.k ? transform2 : new Transform(k, transform2.x, transform2.y);
|
|
}
|
|
function translate(transform2, p0, p1) {
|
|
var x3 = p0[0] - p1[0] * transform2.k, y3 = p0[1] - p1[1] * transform2.k;
|
|
return x3 === transform2.x && y3 === transform2.y ? transform2 : new Transform(transform2.k, x3, y3);
|
|
}
|
|
function centroid(extent2) {
|
|
return [(+extent2[0][0] + +extent2[1][0]) / 2, (+extent2[0][1] + +extent2[1][1]) / 2];
|
|
}
|
|
function schedule(transition2, transform2, point, event) {
|
|
transition2.on("start.zoom", function() {
|
|
gesture(this, arguments).event(event).start();
|
|
}).on("interrupt.zoom end.zoom", function() {
|
|
gesture(this, arguments).event(event).end();
|
|
}).tween("zoom", function() {
|
|
var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a2 = that.__zoom, b = typeof transform2 === "function" ? transform2.apply(that, args) : transform2, i = interpolate(a2.invert(p).concat(w / a2.k), b.invert(p).concat(w / b.k));
|
|
return function(t) {
|
|
if (t === 1)
|
|
t = b;
|
|
else {
|
|
var l = i(t), k = w / l[2];
|
|
t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
|
|
}
|
|
g.zoom(null, t);
|
|
};
|
|
});
|
|
}
|
|
function gesture(that, args, clean) {
|
|
return !clean && that.__zooming || new Gesture(that, args);
|
|
}
|
|
function Gesture(that, args) {
|
|
this.that = that;
|
|
this.args = args;
|
|
this.active = 0;
|
|
this.sourceEvent = null;
|
|
this.extent = extent.apply(that, args);
|
|
this.taps = 0;
|
|
}
|
|
Gesture.prototype = {
|
|
event: function(event) {
|
|
if (event)
|
|
this.sourceEvent = event;
|
|
return this;
|
|
},
|
|
start: function() {
|
|
if (++this.active === 1) {
|
|
this.that.__zooming = this;
|
|
this.emit("start");
|
|
}
|
|
return this;
|
|
},
|
|
zoom: function(key, transform2) {
|
|
if (this.mouse && key !== "mouse")
|
|
this.mouse[1] = transform2.invert(this.mouse[0]);
|
|
if (this.touch0 && key !== "touch")
|
|
this.touch0[1] = transform2.invert(this.touch0[0]);
|
|
if (this.touch1 && key !== "touch")
|
|
this.touch1[1] = transform2.invert(this.touch1[0]);
|
|
this.that.__zoom = transform2;
|
|
this.emit("zoom");
|
|
return this;
|
|
},
|
|
end: function() {
|
|
if (--this.active === 0) {
|
|
delete this.that.__zooming;
|
|
this.emit("end");
|
|
}
|
|
return this;
|
|
},
|
|
emit: function(type2) {
|
|
var d = select_default2(this.that).datum();
|
|
listeners.call(
|
|
type2,
|
|
this.that,
|
|
new ZoomEvent(type2, {
|
|
sourceEvent: this.sourceEvent,
|
|
target: zoom,
|
|
type: type2,
|
|
transform: this.that.__zoom,
|
|
dispatch: listeners
|
|
}),
|
|
d
|
|
);
|
|
}
|
|
};
|
|
function wheeled(event, ...args) {
|
|
if (!filter2.apply(this, arguments))
|
|
return;
|
|
var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = pointer_default(event);
|
|
if (g.wheel) {
|
|
if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
|
|
g.mouse[1] = t.invert(g.mouse[0] = p);
|
|
}
|
|
clearTimeout(g.wheel);
|
|
} else if (t.k === k)
|
|
return;
|
|
else {
|
|
g.mouse = [p, t.invert(p)];
|
|
interrupt_default(this);
|
|
g.start();
|
|
}
|
|
noevent_default3(event);
|
|
g.wheel = setTimeout(wheelidled, wheelDelay);
|
|
g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
|
|
function wheelidled() {
|
|
g.wheel = null;
|
|
g.end();
|
|
}
|
|
}
|
|
function mousedowned(event, ...args) {
|
|
if (touchending || !filter2.apply(this, arguments))
|
|
return;
|
|
var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = select_default2(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = pointer_default(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
|
|
nodrag_default(event.view);
|
|
nopropagation3(event);
|
|
g.mouse = [p, this.__zoom.invert(p)];
|
|
interrupt_default(this);
|
|
g.start();
|
|
function mousemoved(event2) {
|
|
noevent_default3(event2);
|
|
if (!g.moved) {
|
|
var dx = event2.clientX - x0, dy = event2.clientY - y0;
|
|
g.moved = dx * dx + dy * dy > clickDistance2;
|
|
}
|
|
g.event(event2).zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer_default(event2, currentTarget), g.mouse[1]), g.extent, translateExtent));
|
|
}
|
|
function mouseupped(event2) {
|
|
v.on("mousemove.zoom mouseup.zoom", null);
|
|
yesdrag(event2.view, g.moved);
|
|
noevent_default3(event2);
|
|
g.event(event2).end();
|
|
}
|
|
}
|
|
function dblclicked(event, ...args) {
|
|
if (!filter2.apply(this, arguments))
|
|
return;
|
|
var t0 = this.__zoom, p0 = pointer_default(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
|
|
noevent_default3(event);
|
|
if (duration > 0)
|
|
select_default2(this).transition().duration(duration).call(schedule, t1, p0, event);
|
|
else
|
|
select_default2(this).call(zoom.transform, t1, p0, event);
|
|
}
|
|
function touchstarted(event, ...args) {
|
|
if (!filter2.apply(this, arguments))
|
|
return;
|
|
var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p;
|
|
nopropagation3(event);
|
|
for (i = 0; i < n; ++i) {
|
|
t = touches[i], p = pointer_default(t, this);
|
|
p = [p, this.__zoom.invert(p), t.identifier];
|
|
if (!g.touch0)
|
|
g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
|
|
else if (!g.touch1 && g.touch0[2] !== p[2])
|
|
g.touch1 = p, g.taps = 0;
|
|
}
|
|
if (touchstarting)
|
|
touchstarting = clearTimeout(touchstarting);
|
|
if (started) {
|
|
if (g.taps < 2)
|
|
touchfirst = p[0], touchstarting = setTimeout(function() {
|
|
touchstarting = null;
|
|
}, touchDelay);
|
|
interrupt_default(this);
|
|
g.start();
|
|
}
|
|
}
|
|
function touchmoved(event, ...args) {
|
|
if (!this.__zooming)
|
|
return;
|
|
var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l;
|
|
noevent_default3(event);
|
|
for (i = 0; i < n; ++i) {
|
|
t = touches[i], p = pointer_default(t, this);
|
|
if (g.touch0 && g.touch0[2] === t.identifier)
|
|
g.touch0[0] = p;
|
|
else if (g.touch1 && g.touch1[2] === t.identifier)
|
|
g.touch1[0] = p;
|
|
}
|
|
t = g.that.__zoom;
|
|
if (g.touch1) {
|
|
var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
|
|
t = scale(t, Math.sqrt(dp / dl));
|
|
p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
|
|
l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
|
|
} else if (g.touch0)
|
|
p = g.touch0[0], l = g.touch0[1];
|
|
else
|
|
return;
|
|
g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
|
|
}
|
|
function touchended(event, ...args) {
|
|
if (!this.__zooming)
|
|
return;
|
|
var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t;
|
|
nopropagation3(event);
|
|
if (touchending)
|
|
clearTimeout(touchending);
|
|
touchending = setTimeout(function() {
|
|
touchending = null;
|
|
}, touchDelay);
|
|
for (i = 0; i < n; ++i) {
|
|
t = touches[i];
|
|
if (g.touch0 && g.touch0[2] === t.identifier)
|
|
delete g.touch0;
|
|
else if (g.touch1 && g.touch1[2] === t.identifier)
|
|
delete g.touch1;
|
|
}
|
|
if (g.touch1 && !g.touch0)
|
|
g.touch0 = g.touch1, delete g.touch1;
|
|
if (g.touch0)
|
|
g.touch0[1] = this.__zoom.invert(g.touch0[0]);
|
|
else {
|
|
g.end();
|
|
if (g.taps === 2) {
|
|
t = pointer_default(t, this);
|
|
if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
|
|
var p = select_default2(this).on("dblclick.zoom");
|
|
if (p)
|
|
p.apply(this, arguments);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
zoom.wheelDelta = function(_) {
|
|
return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant_default6(+_), zoom) : wheelDelta;
|
|
};
|
|
zoom.filter = function(_) {
|
|
return arguments.length ? (filter2 = typeof _ === "function" ? _ : constant_default6(!!_), zoom) : filter2;
|
|
};
|
|
zoom.touchable = function(_) {
|
|
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant_default6(!!_), zoom) : touchable;
|
|
};
|
|
zoom.extent = function(_) {
|
|
return arguments.length ? (extent = typeof _ === "function" ? _ : constant_default6([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
|
|
};
|
|
zoom.scaleExtent = function(_) {
|
|
return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
|
|
};
|
|
zoom.translateExtent = function(_) {
|
|
return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
|
|
};
|
|
zoom.constrain = function(_) {
|
|
return arguments.length ? (constrain = _, zoom) : constrain;
|
|
};
|
|
zoom.duration = function(_) {
|
|
return arguments.length ? (duration = +_, zoom) : duration;
|
|
};
|
|
zoom.interpolate = function(_) {
|
|
return arguments.length ? (interpolate = _, zoom) : interpolate;
|
|
};
|
|
zoom.on = function() {
|
|
var value = listeners.on.apply(listeners, arguments);
|
|
return value === listeners ? zoom : value;
|
|
};
|
|
zoom.clickDistance = function(_) {
|
|
return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
|
|
};
|
|
zoom.tapDistance = function(_) {
|
|
return arguments.length ? (tapDistance = +_, zoom) : tapDistance;
|
|
};
|
|
return zoom;
|
|
}
|
|
|
|
// main.ts
|
|
var DEFAULT_NETWORK_SETTINGS = {
|
|
relevanceScoreThreshold: 0.5,
|
|
nodeSize: 4,
|
|
linkThickness: 0.3,
|
|
repelForce: 400,
|
|
linkForce: 0.4,
|
|
linkDistance: 70,
|
|
centerForce: 0.1,
|
|
textFadeThreshold: 1.1,
|
|
minLinkThickness: 0.3,
|
|
maxLinkThickness: 0.6,
|
|
maxLabelCharacters: 18,
|
|
linkLabelSize: 7,
|
|
nodeLabelSize: 6,
|
|
connectionType: "block",
|
|
noteFillColor: "#7c8594",
|
|
blockFillColor: "#926ec9"
|
|
};
|
|
var ScGraphItemView = class extends import_obsidian.ItemView {
|
|
constructor(leaf, plugin) {
|
|
super(leaf);
|
|
this.connectionType = "block";
|
|
this.relevanceScoreThreshold = 0.5;
|
|
this.nodeSize = 4;
|
|
this.linkThickness = 0.3;
|
|
this.repelForce = 400;
|
|
this.linkForce = 0.4;
|
|
this.linkDistance = 70;
|
|
this.centerForce = 0.3;
|
|
this.textFadeThreshold = 1.1;
|
|
this.minScore = 1;
|
|
this.maxScore = 0;
|
|
this.minNodeSize = 3;
|
|
this.maxNodeSize = 6;
|
|
this.minLinkThickness = 0.3;
|
|
this.maxLinkThickness = 0.6;
|
|
this.isCtrlPressed = false;
|
|
this.isAltPressed = false;
|
|
this.isDragging = false;
|
|
this.isChangingConnectionType = true;
|
|
this.maxLabelCharacters = 18;
|
|
this.linkLabelSize = 7;
|
|
this.nodeLabelSize = 6;
|
|
this.blockFillColor = "#926ec9";
|
|
this.noteFillColor = "#7c8594";
|
|
this.startX = 0;
|
|
this.startY = 0;
|
|
this.nodes = [];
|
|
this.links = [];
|
|
this.connections = [];
|
|
this.centerHighlighted = false;
|
|
this.dragging = false;
|
|
this.highlightedNodeId = "-1";
|
|
this.currentNoteChanging = false;
|
|
this.isFiltering = false;
|
|
this.settingsMade = false;
|
|
this.currentNoteKey = "";
|
|
this.isHovering = false;
|
|
this.plugin = plugin;
|
|
this.relevanceScoreThreshold = this.plugin.settings.relevanceScoreThreshold;
|
|
this.nodeSize = this.plugin.settings.nodeSize;
|
|
this.linkThickness = this.plugin.settings.linkThickness;
|
|
this.repelForce = this.plugin.settings.repelForce;
|
|
this.linkForce = this.plugin.settings.linkForce;
|
|
this.linkDistance = this.plugin.settings.linkDistance;
|
|
this.centerForce = this.plugin.settings.centerForce;
|
|
this.textFadeThreshold = this.plugin.settings.textFadeThreshold;
|
|
this.minLinkThickness = this.plugin.settings.minLinkThickness;
|
|
this.maxLinkThickness = this.plugin.settings.maxLinkThickness;
|
|
this.maxLabelCharacters = this.plugin.settings.maxLabelCharacters;
|
|
this.linkLabelSize = this.plugin.settings.linkLabelSize;
|
|
this.nodeLabelSize = this.plugin.settings.nodeLabelSize;
|
|
this.connectionType = this.plugin.settings.connectionType;
|
|
this.noteFillColor = this.plugin.settings.noteFillColor;
|
|
this.blockFillColor = this.plugin.settings.blockFillColor;
|
|
}
|
|
getViewType() {
|
|
return "smart-connections-visualizer";
|
|
}
|
|
getDisplayText() {
|
|
return "Smart connections visualizer";
|
|
}
|
|
getIcon() {
|
|
return "git-fork";
|
|
}
|
|
updateNodeAppearance() {
|
|
this.nodeSelection.transition().duration(500).attr("fill", (d) => d.fill).attr("stroke", (d) => d.selected ? "blanchedalmond" : d.highlighted ? "#d46ebe" : "transparent").attr("stroke-width", (d) => d.selected ? 1.5 : d.highlighted ? 0.3 : 0).attr("opacity", (d) => this.getNodeOpacity(d));
|
|
}
|
|
// getNodeFill(d: any) {
|
|
// if (d.id === this.centralNode.id) return '#7c8594';
|
|
// if (d.highlighted && !d.selected) return '#d46ebe';
|
|
// return d.group === 'note' ? '#7c8594' : '#926ec9';
|
|
// }
|
|
getNodeOpacity(d) {
|
|
if (d.id === this.centralNode.id)
|
|
return 1;
|
|
if (d.selected)
|
|
return 1;
|
|
if (d.highlighted)
|
|
return 0.8;
|
|
return this.isHovering ? 0.1 : 1;
|
|
}
|
|
toggleNodeSelection(nodeId) {
|
|
const node = this.nodeSelection.data().find((d) => d.id === nodeId);
|
|
if (node) {
|
|
node.selected = !node.selected;
|
|
if (!node.selected) {
|
|
node.highlighted = false;
|
|
}
|
|
this.updateNodeAppearance();
|
|
}
|
|
}
|
|
clearSelections() {
|
|
this.nodeSelection.each((d) => {
|
|
d.selected = false;
|
|
d.highlighted = false;
|
|
});
|
|
this.updateNodeAppearance();
|
|
}
|
|
highlightNode(node) {
|
|
if (node.id === this.centralNode.id) {
|
|
this.centerHighlighted = true;
|
|
}
|
|
this.highlightedNodeId = node.id;
|
|
this.nodeSelection.each((d) => {
|
|
if (d.id !== this.centralNode.id) {
|
|
d.highlighted = d.id === node.id || this.validatedLinks.some((link) => link.source.id === node.id && link.target.id === d.id || link.target.id === node.id && link.source.id === d.id);
|
|
}
|
|
});
|
|
this.updateNodeAppearance();
|
|
this.updateLinkAppearance(node);
|
|
this.updateLabelAppearance(node);
|
|
this.updateLinkLabelAppearance(node);
|
|
}
|
|
updateHighlight(d, node) {
|
|
if (d.id !== this.centralNode.id) {
|
|
d.highlighted = d.id === node.id || this.validatedLinks.some((link) => link.source.id === node.id && link.target.id === d.id || link.target.id === node.id && link.source.id === d.id);
|
|
}
|
|
}
|
|
updateLinkAppearance(node) {
|
|
this.linkSelection.transition().duration(500).attr("opacity", (d) => d.source.id === node.id || d.target.id === node.id ? 1 : 0.1);
|
|
}
|
|
updateLabelAppearance(node) {
|
|
this.labelSelection.transition().duration(500).attr("opacity", (d) => this.getLabelOpacity(d, node)).text((d) => d.id === this.highlightedNodeId ? this.formatLabel(d.name, false) : this.formatLabel(d.name, true));
|
|
}
|
|
getLabelOpacity(d, node) {
|
|
if (!node) {
|
|
return 1;
|
|
}
|
|
return d.id === node.id || this.validatedLinks.some((link) => link.source.id === node.id && link.target.id === d.id) || d.id == this.centralNode.id ? 1 : 0.1;
|
|
}
|
|
updateLinkLabelAppearance(node) {
|
|
this.linkLabelSelection.transition().duration(500).attr("opacity", (d) => {
|
|
return d.source.id === node.id || d.target.id === node.id ? 1 : 0;
|
|
});
|
|
}
|
|
unhighlightNode(node) {
|
|
this.highlightedNodeId = "-1";
|
|
this.nodeSelection.each((d) => {
|
|
if (d.id !== this.centralNode.id)
|
|
d.highlighted = false;
|
|
});
|
|
this.updateNodeAppearance();
|
|
this.resetLinkAppearance();
|
|
this.resetLabelAppearance();
|
|
this.resetLinkLabelAppearance();
|
|
this.updateLabelAppearance(null);
|
|
}
|
|
resetLinkAppearance() {
|
|
this.linkSelection.transition().duration(500).attr("opacity", 1);
|
|
}
|
|
resetLabelAppearance() {
|
|
this.labelSelection.transition().duration(500).attr("opacity", 1).text((d) => this.formatLabel(d.name, true));
|
|
}
|
|
resetLinkLabelAppearance() {
|
|
this.linkLabelSelection.transition().duration(500).attr("opacity", 0);
|
|
}
|
|
formatLabel(path, truncate = true) {
|
|
let label = this.extractLabel(path);
|
|
return truncate ? this.truncateLabel(label) : label;
|
|
}
|
|
extractLabel(path) {
|
|
let label = path;
|
|
if (path && path.includes("#")) {
|
|
const parts = path.split("#");
|
|
let lastPart = parts[parts.length - 1];
|
|
if (lastPart === "" || /^\{\d+\}$/.test(lastPart)) {
|
|
lastPart = parts[parts.length - 2] + "#" + lastPart;
|
|
}
|
|
if (lastPart.includes("/")) {
|
|
lastPart = lastPart.split("/").pop() || lastPart;
|
|
}
|
|
label = lastPart;
|
|
} else if (path) {
|
|
label = path.split("/").pop() || label;
|
|
} else {
|
|
return "";
|
|
}
|
|
label = label.replace(/[\[\]]/g, "").replace(/\.[^/#]+#(?=\{\d+\}$)/, "").replace(/\.[^/.]+$/, "");
|
|
return label;
|
|
}
|
|
truncateLabel(label) {
|
|
return label.length > this.maxLabelCharacters ? label.slice(0, this.maxLabelCharacters) + "..." : label;
|
|
}
|
|
get env() {
|
|
var _a, _b;
|
|
return (_b = (_a = window.SmartSearch) == null ? void 0 : _a.main) == null ? void 0 : _b.env;
|
|
}
|
|
get smartNotes() {
|
|
var _a, _b, _c, _d;
|
|
return (_d = (_c = (_b = (_a = window.SmartSearch) == null ? void 0 : _a.main) == null ? void 0 : _b.env) == null ? void 0 : _c.smart_sources) == null ? void 0 : _d.items;
|
|
}
|
|
async onOpen() {
|
|
this.contentEl.createEl("h2", { text: "Smart Visualizer" });
|
|
this.contentEl.createEl("p", { text: "Waiting for Smart Connections to load..." });
|
|
console.log(this.app);
|
|
setTimeout(() => {
|
|
this.render();
|
|
}, 500);
|
|
}
|
|
async render() {
|
|
var _a;
|
|
while (!((_a = this.env) == null ? void 0 : _a.entities_loaded)) {
|
|
await new Promise((resolve) => setTimeout(resolve, 2e3));
|
|
}
|
|
this.contentEl.empty();
|
|
this.initializeVariables();
|
|
if (Object.keys(this.smartNotes).length === 0) {
|
|
return;
|
|
}
|
|
this.setupSettingsMenu();
|
|
this.setupSVG();
|
|
this.addEventListeners();
|
|
this.watchForNoteChanges();
|
|
const currentNodeChange = this.app.workspace.getActiveFile();
|
|
if (currentNodeChange && !this.currentNoteChanging) {
|
|
this.currentNoteKey = currentNodeChange.path;
|
|
this.currentNoteChanging = true;
|
|
this.render();
|
|
return;
|
|
}
|
|
this.updateVisualization();
|
|
}
|
|
async waitForSmartNotes() {
|
|
var _a;
|
|
const maxRetries = 10;
|
|
const delay = 2e3;
|
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
console.log(this.env);
|
|
if ((_a = this.env) == null ? void 0 : _a.entities_loaded) {
|
|
return;
|
|
}
|
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
}
|
|
console.error("Smart notes did not load in time");
|
|
this.contentEl.createEl("p", { text: "Failed to load Smart Connections." });
|
|
}
|
|
initializeVariables() {
|
|
this.minScore = 1;
|
|
this.maxScore = 0;
|
|
}
|
|
setupSVG() {
|
|
const width = this.contentEl.clientWidth;
|
|
const height = this.contentEl.clientHeight;
|
|
const svg = select_default2(this.contentEl).append("svg").attr("width", "100%").attr("height", "98%").attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMid meet").call(zoom_default2().scaleExtent([0.1, 10]).on("zoom", (event) => {
|
|
svgGroup.attr("transform", event.transform);
|
|
this.updateLabelOpacity(event.transform.k);
|
|
}));
|
|
const svgGroup = svg.append("g");
|
|
svgGroup.append("g").attr("class", "smart-connections-visualizer-links");
|
|
svgGroup.append("g").attr("class", "smart-connections-visualizer-node-labels");
|
|
svgGroup.append("g").attr("class", "smart-connections-visualizer-link-labels");
|
|
svgGroup.append("g").attr("class", "smart-connections-visualizer-nodes");
|
|
this.svgGroup = svgGroup;
|
|
this.svg = svg;
|
|
}
|
|
getSVGDimensions() {
|
|
const width = this.contentEl.clientWidth || this.contentEl.getBoundingClientRect().width;
|
|
const height = this.contentEl.clientHeight || this.contentEl.getBoundingClientRect().height;
|
|
return { width, height };
|
|
}
|
|
createSVG(width, height) {
|
|
return select_default2(this.contentEl).append("svg").attr("width", "100%").attr("height", "98%").attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMid meet").style("background", "#2d3039").call(zoom_default2().scaleExtent([0.1, 10]).on("zoom", this.onZoom.bind(this)));
|
|
}
|
|
createSVGGroup(svg) {
|
|
return svg.append("g");
|
|
}
|
|
onZoom(event) {
|
|
select_default2("g").attr("transform", event.transform);
|
|
this.updateLabelOpacity(event.transform.k);
|
|
}
|
|
initializeSimulation(width, height) {
|
|
this.simulation = simulation_default().force("center", center_default(width / 2, height / 2).strength(this.centerForce)).force("charge", manyBody_default().strength(-this.repelForce)).force("link", link_default().id((d) => d.id).distance((d) => this.linkDistanceScale(d.score)).strength(this.linkForce)).force("collide", collide_default().radius(this.nodeSize + 3).strength(0.7)).on("tick", this.simulationTickHandler.bind(this));
|
|
this.simulation.force("labels", this.avoidLabelCollisions.bind(this));
|
|
}
|
|
renderLegend() {
|
|
if (this.validatedLinks.length === 0) {
|
|
return;
|
|
}
|
|
const types = ["block", "note"];
|
|
const counts = types.map((type2) => this.nodes.filter((node) => node.group === type2 && node.id !== this.centralNode.id).length);
|
|
let colors = { "block": DEFAULT_NETWORK_SETTINGS.blockFillColor, "note": DEFAULT_NETWORK_SETTINGS.noteFillColor };
|
|
for (let node of this.nodes) {
|
|
if (colors[node.group]) {
|
|
colors[node.group] = node.fill;
|
|
}
|
|
}
|
|
const tableContainer = this.contentEl.createEl("div", { cls: "smart-connections-visualizer-legend-container" });
|
|
const header = tableContainer.createEl("div", { cls: "smart-connections-visualizer-legend-header" });
|
|
["Connection Type", "Count", "Color"].forEach((headerTitle) => {
|
|
switch (headerTitle) {
|
|
case "Connection Type":
|
|
header.createEl("div", { text: headerTitle, cls: "smart-connections-visualizer-variable-col" });
|
|
break;
|
|
case "Count":
|
|
header.createEl("div", { text: headerTitle, cls: "smart-connections-visualizer-count-col" });
|
|
break;
|
|
case "Color":
|
|
header.createEl("div", { text: headerTitle, cls: "smart-connections-visualizer-color-col" });
|
|
break;
|
|
default:
|
|
header.createEl("div", { text: headerTitle, cls: "smart-connections-visualizer-variable-col" });
|
|
break;
|
|
}
|
|
});
|
|
types.forEach((type2, index2) => {
|
|
if (counts[index2] > 0) {
|
|
const row = tableContainer.createEl("div", { cls: "smart-connections-visualizer-legend-row" });
|
|
row.createEl("div", { text: this.capitalizeFirstLetter(type2), cls: "smart-connections-visualizer-variable-col" });
|
|
row.createEl("div", { text: `${counts[index2]}`, cls: "smart-connections-visualizer-count-col" });
|
|
const colorCell = row.createEl("div", { cls: "smart-connections-visualizer-color-col" });
|
|
const colorPicker = colorCell.createEl("input", { type: "color", value: colors[type2], cls: "smart-connections-visualizer-legend-color-picker" });
|
|
colorPicker.addEventListener("change", (e) => this.updateNodeColors(type2, e.target.value));
|
|
}
|
|
});
|
|
}
|
|
capitalizeFirstLetter(str) {
|
|
if (!str)
|
|
return str;
|
|
console.log("string: ", str);
|
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
}
|
|
updateNodeColors(type2, color2) {
|
|
if (type2 === "note" && color2 !== this.noteFillColor) {
|
|
this.noteFillColor = color2;
|
|
this.plugin.settings.noteFillColor = color2;
|
|
this.plugin.saveSettings();
|
|
}
|
|
if (type2 === "block" && color2 !== this.blockFillColor) {
|
|
this.blockFillColor = color2;
|
|
this.plugin.settings.noteFillColor = color2;
|
|
this.plugin.saveSettings();
|
|
}
|
|
this.nodes.forEach((node) => {
|
|
if (node.group === type2) {
|
|
node.fill = color2;
|
|
}
|
|
});
|
|
this.updateNodeFill();
|
|
}
|
|
updateNodeFill() {
|
|
this.nodeSelection.attr("fill", (d) => d.fill);
|
|
}
|
|
// Ensure node labels dont collide with any elements
|
|
avoidLabelCollisions() {
|
|
const padding = 5;
|
|
return (alpha) => {
|
|
const quadtree2 = quadtree().x((d) => d.x).y((d) => d.y).addAll(this.labelSelection.data());
|
|
this.labelSelection.each((d) => {
|
|
const radius = d.radius + padding;
|
|
const nx1 = d.x - radius, nx2 = d.x + radius, ny1 = d.y - radius, ny2 = d.y + radius;
|
|
quadtree2.visit((quad, x1, y1, x22, y22) => {
|
|
if ("data" in quad && quad.data && quad.data !== d) {
|
|
let x3 = d.x - quad.data.x, y3 = d.y - quad.data.y, l = Math.sqrt(x3 * x3 + y3 * y3), r = radius + quad.data.radius;
|
|
if (l < r) {
|
|
l = (l - r) / l * alpha;
|
|
d.x -= x3 *= l;
|
|
d.y -= y3 *= l;
|
|
quad.data.x += x3;
|
|
quad.data.y += y3;
|
|
}
|
|
}
|
|
return x1 > nx2 || x22 < nx1 || y1 > ny2 || y22 < ny1;
|
|
});
|
|
});
|
|
};
|
|
}
|
|
addEventListeners() {
|
|
this.setupSVGEventListeners();
|
|
this.setupKeyboardEventListeners();
|
|
}
|
|
setupSVGEventListeners() {
|
|
select_default2("svg").on("mousedown", this.onMouseDown.bind(this)).on("mousemove", this.onMouseMove.bind(this)).on("mouseup", this.onMouseUp.bind(this)).on("click", this.onSVGClick.bind(this));
|
|
}
|
|
// TODO: Add back in when ready for multiselect
|
|
onMouseDown(event) {
|
|
}
|
|
onMouseMove(event) {
|
|
}
|
|
onMouseUp() {
|
|
}
|
|
onSVGClick(event) {
|
|
if (!event.defaultPrevented && !event.ctrlKey)
|
|
this.clearSelections();
|
|
}
|
|
setupKeyboardEventListeners() {
|
|
document.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
document.addEventListener("keyup", this.onKeyUp.bind(this));
|
|
}
|
|
// TODO:: Add back when ready for multiselect
|
|
onKeyDown(event) {
|
|
}
|
|
onKeyUp(event) {
|
|
}
|
|
setupSettingsMenu() {
|
|
const existingIcon = this.contentEl.querySelector(".smart-connections-visualizer-settings-icon");
|
|
if (existingIcon) {
|
|
existingIcon.remove();
|
|
}
|
|
const existingDropdownMenu = this.contentEl.querySelector(".sc-visualizer-dropdown-menu");
|
|
if (existingDropdownMenu) {
|
|
existingDropdownMenu.remove();
|
|
}
|
|
this.createSettingsIcon();
|
|
this.createDropdownMenu();
|
|
this.setupAccordionHeaders();
|
|
this.setupSettingsEventListeners();
|
|
}
|
|
createDropdownMenu() {
|
|
const dropdownMenu = this.contentEl.createEl("div", { cls: "sc-visualizer-dropdown-menu" });
|
|
this.buildDropdownMenuContent(dropdownMenu);
|
|
}
|
|
buildDropdownMenuContent(dropdownMenu) {
|
|
const menuHeader = dropdownMenu.createEl("div", { cls: "smart-connections-visualizer-menu-header" });
|
|
const refreshIcon = this.createRefreshIcon();
|
|
refreshIcon.classList.add("smart-connections-visualizer-icon");
|
|
refreshIcon.setAttribute("id", "smart-connections-visualizer-refresh-icon");
|
|
menuHeader.appendChild(refreshIcon);
|
|
const xIcon = this.createNewXIcon();
|
|
xIcon.classList.add("smart-connections-visualizer-icon");
|
|
xIcon.setAttribute("id", "smart-connections-visualizer-close-icon");
|
|
menuHeader.appendChild(xIcon);
|
|
this.addAccordionItem(dropdownMenu, "Filters", this.getFiltersContent.bind(this));
|
|
this.addAccordionItem(dropdownMenu, "Display", this.getDisplayContent.bind(this));
|
|
this.addAccordionItem(dropdownMenu, "Forces", this.getForcesContent.bind(this));
|
|
}
|
|
addAccordionItem(parent, title, buildContent) {
|
|
const accordionItem = parent.createEl("div", { cls: "smart-connections-visualizer-accordion-item" });
|
|
const header = accordionItem.createEl("div", { cls: "smart-connections-visualizer-accordion-header" });
|
|
const arrowIcon = header.createEl("span", { cls: "smart-connections-visualizer-arrow-icon" });
|
|
arrowIcon.appendChild(this.createRightArrow());
|
|
header.createEl("span", { text: title });
|
|
const accordionContent = accordionItem.createEl("div", { cls: "smart-connections-visualizer-accordion-content" });
|
|
buildContent(accordionContent);
|
|
}
|
|
getFiltersContent(parent) {
|
|
const sliderContainer1 = parent.createEl("div", { cls: "smart-connections-visualizer-slider-container" });
|
|
sliderContainer1.createEl("label", {
|
|
text: `Min relevance: ${(this.relevanceScoreThreshold * 100).toFixed(0)}%`,
|
|
attr: { id: "smart-connections-visualizer-scoreThresholdLabel", for: "smart-connections-visualizer-scoreThreshold" }
|
|
});
|
|
const relevanceSlider = sliderContainer1.createEl("input", {
|
|
attr: {
|
|
type: "range",
|
|
id: "smart-connections-visualizer-scoreThreshold",
|
|
class: "smart-connections-visualizer-slider",
|
|
name: "scoreThreshold",
|
|
min: "0",
|
|
max: "0.99",
|
|
step: "0.01"
|
|
}
|
|
});
|
|
relevanceSlider.value = this.relevanceScoreThreshold.toString();
|
|
parent.createEl("label", { text: "Connection type:", cls: "smart-connections-visualizer-settings-item-content-label" });
|
|
const radioContainer = parent.createEl("div", { cls: "smart-connections-visualizer-radio-container" });
|
|
const radioBlockLabel = radioContainer.createEl("label");
|
|
const blockRadio = radioBlockLabel.createEl("input", {
|
|
attr: {
|
|
type: "radio",
|
|
name: "connectionType",
|
|
value: "block"
|
|
}
|
|
});
|
|
blockRadio.checked = this.connectionType === "block";
|
|
radioBlockLabel.appendText(" Block");
|
|
const radioNoteLabel = radioContainer.createEl("label");
|
|
const noteRadio = radioNoteLabel.createEl("input", {
|
|
attr: {
|
|
type: "radio",
|
|
name: "connectionType",
|
|
value: "note"
|
|
}
|
|
});
|
|
noteRadio.checked = this.connectionType === "note";
|
|
radioNoteLabel.appendText(" Note");
|
|
const radioBothLabel = radioContainer.createEl("label");
|
|
const bothRadio = radioBothLabel.createEl("input", {
|
|
attr: {
|
|
type: "radio",
|
|
name: "connectionType",
|
|
value: "both"
|
|
}
|
|
});
|
|
bothRadio.checked = this.connectionType === "both";
|
|
radioBothLabel.appendText(" Both");
|
|
}
|
|
getDisplayContent(parent) {
|
|
const displaySettings = [
|
|
{ id: "smart-connections-visualizer-nodeSize", label: "Node size", value: this.nodeSize, min: 1, max: 15, step: 0.01 },
|
|
{ id: "smart-connections-visualizer-maxLabelCharacters", label: "Max label characters", value: this.maxLabelCharacters, min: 1, max: 50, step: 1 },
|
|
{ id: "smart-connections-visualizer-linkLabelSize", label: "Link label size", value: this.linkLabelSize, min: 1, max: 15, step: 0.01 },
|
|
{ id: "smart-connections-visualizer-nodeLabelSize", label: "Node label size", value: this.nodeLabelSize, min: 1, max: 26, step: 1 },
|
|
{ id: "smart-connections-visualizer-minLinkThickness", label: "Min link thickness", value: this.minLinkThickness, min: 0.1, max: 10, step: 0.01 },
|
|
{ id: "smart-connections-visualizer-maxLinkThickness", label: "Max link thickness", value: this.maxLinkThickness, min: 0.1, max: 10, step: 0.01 },
|
|
{ id: "smart-connections-visualizer-fadeThreshold", label: "Text fade threshold", value: this.textFadeThreshold, min: 0.1, max: 10, step: 0.01 }
|
|
];
|
|
displaySettings.forEach((setting) => {
|
|
const sliderContainer = parent.createEl("div", { cls: "smart-connections-visualizer-slider-container" });
|
|
sliderContainer.createEl("label", { text: `${setting.label}: ${setting.value}`, attr: { id: `${setting.id}Label`, for: setting.id } });
|
|
sliderContainer.createEl("input", { attr: { type: "range", id: setting.id, class: "smart-connections-visualizer-slider", name: setting.id, min: `${setting.min}`, max: `${setting.max}`, value: `${setting.value}`, step: `${setting.step}` } });
|
|
});
|
|
}
|
|
getForcesContent(parent) {
|
|
const forcesSettings = [
|
|
{ id: "smart-connections-visualizer-repelForce", label: "Repel force", value: this.repelForce, min: 0, max: 1500, step: 1 },
|
|
{ id: "smart-connections-visualizer-linkForce", label: "Link force", value: this.linkForce, min: 0, max: 1, step: 0.01 },
|
|
{ id: "smart-connections-visualizer-linkDistance", label: "Link distance", value: this.linkDistance, min: 10, max: 200, step: 1 }
|
|
];
|
|
forcesSettings.forEach((setting) => {
|
|
const sliderContainer = parent.createEl("div", { cls: "smart-connections-visualizer-slider-container" });
|
|
sliderContainer.createEl("label", { text: `${setting.label}: ${setting.value}`, attr: { id: `${setting.id}Label`, for: setting.id } });
|
|
sliderContainer.createEl("input", { attr: { type: "range", id: setting.id, class: "smart-connections-visualizer-slider", name: setting.id, min: `${setting.min}`, max: `${setting.max}`, value: `${setting.value}`, step: `${setting.step}` } });
|
|
});
|
|
}
|
|
toggleDropdownMenu() {
|
|
const dropdownMenu = document.querySelector(".sc-visualizer-dropdown-menu");
|
|
if (dropdownMenu) {
|
|
dropdownMenu.classList.toggle("visible");
|
|
} else {
|
|
console.error("Dropdown menu element not found");
|
|
}
|
|
}
|
|
setupAccordionHeaders() {
|
|
const accordionHeaders = document.querySelectorAll(".smart-connections-visualizer-accordion-header");
|
|
accordionHeaders.forEach((header) => header.addEventListener("click", this.toggleAccordionContent.bind(this)));
|
|
}
|
|
toggleAccordionContent(event) {
|
|
const content = event.currentTarget.nextElementSibling;
|
|
const arrowIcon = event.currentTarget.querySelector(".smart-connections-visualizer-arrow-icon");
|
|
if (content && arrowIcon) {
|
|
content.classList.toggle("show");
|
|
arrowIcon.innerHTML = "";
|
|
arrowIcon.appendChild(content.classList.contains("show") ? this.createDropdownArrow() : this.createRightArrow());
|
|
}
|
|
}
|
|
createDropdownArrow() {
|
|
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
svg.setAttribute("class", "smart-connections-visualizer-dropdown-indicator");
|
|
svg.setAttribute("viewBox", "0 0 16 16");
|
|
svg.setAttribute("fill", "currentColor");
|
|
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path.setAttribute("fill-rule", "evenodd");
|
|
path.setAttribute("d", "M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z");
|
|
svg.appendChild(path);
|
|
return svg;
|
|
}
|
|
createRightArrow() {
|
|
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
svg.setAttribute("class", "smart-connections-visualizer-dropdown-indicator");
|
|
svg.setAttribute("viewBox", "0 0 16 16");
|
|
svg.setAttribute("fill", "currentColor");
|
|
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path.setAttribute("fill-rule", "evenodd");
|
|
path.setAttribute("d", "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z");
|
|
svg.appendChild(path);
|
|
return svg;
|
|
}
|
|
createSettingsIcon() {
|
|
const settingsIcon = this.contentEl.createEl("div", {
|
|
cls: ["smart-connections-visualizer-settings-icon"],
|
|
attr: { "aria-label": "Open graph settings" }
|
|
});
|
|
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
svg.setAttribute("width", "24");
|
|
svg.setAttribute("height", "24");
|
|
svg.setAttribute("viewBox", "0 0 24 24");
|
|
svg.setAttribute("fill", "none");
|
|
svg.setAttribute("stroke", "currentColor");
|
|
svg.setAttribute("stroke-width", "2");
|
|
svg.setAttribute("stroke-linecap", "round");
|
|
svg.setAttribute("stroke-linejoin", "round");
|
|
svg.setAttribute("class", "smart-connections-visualizer-svg-icon smart-connections-visualizer-lucide-settings");
|
|
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path.setAttribute("d", "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z");
|
|
svg.appendChild(path);
|
|
const circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
circle.setAttribute("cx", "12");
|
|
circle.setAttribute("cy", "12");
|
|
circle.setAttribute("r", "3");
|
|
svg.appendChild(circle);
|
|
settingsIcon.appendChild(svg);
|
|
settingsIcon.addEventListener("click", this.toggleDropdownMenu);
|
|
}
|
|
createRefreshIcon() {
|
|
const refreshIcon = this.contentEl.createEl("div", { cls: "smart-connections-visualizer-refresh-icon" });
|
|
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
svg.setAttribute("width", "24");
|
|
svg.setAttribute("height", "24");
|
|
svg.setAttribute("viewBox", "0 0 24 24");
|
|
svg.setAttribute("fill", "none");
|
|
svg.setAttribute("stroke", "currentColor");
|
|
svg.setAttribute("stroke-width", "2");
|
|
svg.setAttribute("stroke-linecap", "round");
|
|
svg.setAttribute("stroke-linejoin", "round");
|
|
svg.setAttribute("class", "smart-connections-visualizer-svg-icon smart-connections-visualizer-lucide-rotate-ccw");
|
|
const path1 = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path1.setAttribute("d", "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8");
|
|
svg.appendChild(path1);
|
|
const path2 = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path2.setAttribute("d", "M3 3v5h5");
|
|
svg.appendChild(path2);
|
|
refreshIcon.appendChild(svg);
|
|
return refreshIcon;
|
|
}
|
|
createNewXIcon() {
|
|
const xIcon = this.contentEl.createEl("div", { cls: "smart-connections-visualizer-x-icon" });
|
|
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
svg.setAttribute("width", "24");
|
|
svg.setAttribute("height", "24");
|
|
svg.setAttribute("viewBox", "0 0 24 24");
|
|
svg.setAttribute("fill", "none");
|
|
svg.setAttribute("stroke", "currentColor");
|
|
svg.setAttribute("stroke-width", "2");
|
|
svg.setAttribute("stroke-linecap", "round");
|
|
svg.setAttribute("stroke-linejoin", "round");
|
|
svg.setAttribute("class", "smart-connections-visualizer-svg-icon smart-connections-visualizer-lucide-x");
|
|
const path1 = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path1.setAttribute("d", "M18 6 6 18");
|
|
svg.appendChild(path1);
|
|
const path2 = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
path2.setAttribute("d", "m6 6 12 12");
|
|
svg.appendChild(path2);
|
|
xIcon.appendChild(svg);
|
|
return xIcon;
|
|
}
|
|
setupSettingsEventListeners() {
|
|
this.setupScoreThresholdSlider();
|
|
this.setupNodeSizeSlider();
|
|
this.setupLineThicknessSlider();
|
|
this.setupCenterForceSlider();
|
|
this.setupRepelForceSlider();
|
|
this.setupLinkForceSlider();
|
|
this.setupLinkDistanceSlider();
|
|
this.setupFadeThresholdSlider();
|
|
this.setupMinLinkThicknessSlider();
|
|
this.setupMaxLinkThicknessSlider();
|
|
this.setupConnectionTypeRadios();
|
|
this.setupMaxLabelCharactersSlider();
|
|
this.setupLinkLabelSizeSlider();
|
|
this.setupNodeLabelSizeSlider();
|
|
this.setupCloseIcon();
|
|
this.setupRefreshIcon();
|
|
}
|
|
setupScoreThresholdSlider() {
|
|
const scoreThresholdSlider = document.getElementById("smart-connections-visualizer-scoreThreshold");
|
|
if (scoreThresholdSlider) {
|
|
scoreThresholdSlider.addEventListener("input", (event) => this.updateScoreThreshold(event));
|
|
const debouncedUpdate = (0, import_obsidian.debounce)((event) => {
|
|
this.updateVisualization(parseFloat(event.target.value));
|
|
}, 500, true);
|
|
scoreThresholdSlider.addEventListener("input", debouncedUpdate);
|
|
}
|
|
}
|
|
updateScoreThreshold(event) {
|
|
const newScoreThreshold = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-scoreThresholdLabel");
|
|
this.plugin.settings.relevanceScoreThreshold = newScoreThreshold;
|
|
this.plugin.saveSettings();
|
|
if (label)
|
|
label.textContent = `Min relevance: ${(newScoreThreshold * 100).toFixed(0)}%`;
|
|
}
|
|
setupNodeSizeSlider() {
|
|
const nodeSizeSlider = document.getElementById("smart-connections-visualizer-nodeSize");
|
|
if (nodeSizeSlider) {
|
|
nodeSizeSlider.addEventListener("input", (event) => this.updateNodeSize(event));
|
|
}
|
|
}
|
|
updateNodeSize(event) {
|
|
const newNodeSize = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-nodeSizeLabel");
|
|
if (label)
|
|
label.textContent = `Node size: ${newNodeSize}`;
|
|
this.plugin.settings.nodeSize = newNodeSize;
|
|
this.plugin.saveSettings();
|
|
this.nodeSize = newNodeSize;
|
|
this.updateNodeSizes();
|
|
}
|
|
setupLineThicknessSlider() {
|
|
const lineThicknessSlider = document.getElementById("smart-connections-visualizer-lineThickness");
|
|
if (lineThicknessSlider) {
|
|
lineThicknessSlider.addEventListener("input", (event) => this.updateLineThickness(event));
|
|
}
|
|
}
|
|
updateLineThickness(event) {
|
|
const newLineThickness = parseFloat(event.target.value);
|
|
const label = document.getElementById("lineThicknessLabel");
|
|
if (label)
|
|
label.textContent = `Line thickness: ${newLineThickness}`;
|
|
this.plugin.settings.linkThickness = newLineThickness;
|
|
this.plugin.saveSettings();
|
|
this.linkThickness = newLineThickness;
|
|
this.updateLinkThickness();
|
|
}
|
|
setupCenterForceSlider() {
|
|
const centerForceSlider = document.getElementById("smart-connections-visualizer-centerForce");
|
|
if (centerForceSlider) {
|
|
centerForceSlider.addEventListener("input", (event) => this.updateCenterForce(event));
|
|
}
|
|
}
|
|
updateCenterForce(event) {
|
|
const newCenterForce = parseFloat(event.target.value);
|
|
const label = document.getElementById("centerForceLabel");
|
|
if (label)
|
|
label.textContent = `Center force: ${newCenterForce}`;
|
|
this.plugin.settings.centerForce = newCenterForce;
|
|
this.plugin.saveSettings();
|
|
this.centerForce = newCenterForce;
|
|
this.updateSimulationForces();
|
|
}
|
|
setupRepelForceSlider() {
|
|
const repelForceSlider = document.getElementById("smart-connections-visualizer-repelForce");
|
|
if (repelForceSlider) {
|
|
repelForceSlider.addEventListener("input", (event) => this.updateRepelForce(event));
|
|
}
|
|
}
|
|
updateRepelForce(event) {
|
|
const newRepelForce = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-repelForceLabel");
|
|
if (label)
|
|
label.textContent = `Repel force: ${newRepelForce}`;
|
|
this.repelForce = newRepelForce;
|
|
this.plugin.settings.repelForce = newRepelForce;
|
|
this.plugin.saveSettings();
|
|
this.updateSimulationForces();
|
|
}
|
|
setupLinkForceSlider() {
|
|
const linkForceSlider = document.getElementById("smart-connections-visualizer-linkForce");
|
|
if (linkForceSlider) {
|
|
linkForceSlider.addEventListener("input", (event) => this.updateLinkForce(event));
|
|
}
|
|
}
|
|
updateLinkForce(event) {
|
|
const newLinkForce = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-linkForceLabel");
|
|
if (label)
|
|
label.textContent = `Link force: ${newLinkForce}`;
|
|
this.linkForce = newLinkForce;
|
|
this.plugin.settings.linkForce = newLinkForce;
|
|
this.plugin.saveSettings();
|
|
this.updateSimulationForces();
|
|
}
|
|
setupLinkDistanceSlider() {
|
|
const linkDistanceSlider = document.getElementById("smart-connections-visualizer-linkDistance");
|
|
if (linkDistanceSlider) {
|
|
linkDistanceSlider.addEventListener("input", (event) => this.updateLinkDistance(event));
|
|
}
|
|
}
|
|
updateLinkDistance(event) {
|
|
const newLinkDistance = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-linkDistanceLabel");
|
|
if (label)
|
|
label.textContent = `Link distance: ${newLinkDistance}`;
|
|
this.linkDistance = newLinkDistance;
|
|
this.plugin.settings.linkDistance = newLinkDistance;
|
|
this.plugin.saveSettings();
|
|
this.updateSimulationForces();
|
|
}
|
|
setupFadeThresholdSlider() {
|
|
const fadeThresholdSlider = document.getElementById("smart-connections-visualizer-fadeThreshold");
|
|
if (fadeThresholdSlider) {
|
|
fadeThresholdSlider.addEventListener("input", (event) => {
|
|
this.updateFadeThreshold(event);
|
|
this.updateLabelOpacity(transform(select_default2("svg").node()).k);
|
|
});
|
|
}
|
|
}
|
|
updateFadeThreshold(event) {
|
|
const newFadeThreshold = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-fadeThresholdLabel");
|
|
if (label)
|
|
label.textContent = `Text fade threshold: ${newFadeThreshold}`;
|
|
this.textFadeThreshold = newFadeThreshold;
|
|
this.plugin.settings.textFadeThreshold = newFadeThreshold;
|
|
this.plugin.saveSettings();
|
|
}
|
|
setupMinLinkThicknessSlider() {
|
|
const minLinkThicknessSlider = document.getElementById("smart-connections-visualizer-minLinkThickness");
|
|
if (minLinkThicknessSlider) {
|
|
minLinkThicknessSlider.addEventListener("input", (event) => this.updateMinLinkThickness(event));
|
|
}
|
|
}
|
|
updateMinLinkThickness(event) {
|
|
const newMinLinkThickness = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-minLinkThicknessLabel");
|
|
if (label)
|
|
label.textContent = `Min link thickness: ${newMinLinkThickness}`;
|
|
this.minLinkThickness = newMinLinkThickness;
|
|
this.plugin.settings.minLinkThickness = newMinLinkThickness;
|
|
this.plugin.saveSettings();
|
|
this.updateLinkThickness();
|
|
}
|
|
setupMaxLinkThicknessSlider() {
|
|
const maxLinkThicknessSlider = document.getElementById("smart-connections-visualizer-maxLinkThickness");
|
|
if (maxLinkThicknessSlider) {
|
|
maxLinkThicknessSlider.addEventListener("input", (event) => this.updateMaxLinkThickness(event));
|
|
}
|
|
}
|
|
updateMaxLinkThickness(event) {
|
|
const newMaxLinkThickness = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-maxLinkThicknessLabel");
|
|
if (label)
|
|
label.textContent = `Max link thickness: ${newMaxLinkThickness}`;
|
|
this.maxLinkThickness = newMaxLinkThickness;
|
|
this.plugin.settings.maxLinkThickness = newMaxLinkThickness;
|
|
this.plugin.saveSettings();
|
|
this.updateLinkThickness();
|
|
}
|
|
setupConnectionTypeRadios() {
|
|
const connectionTypeRadios = document.querySelectorAll('input[name="connectionType"]');
|
|
connectionTypeRadios.forEach((radio) => radio.addEventListener("change", (event) => this.updateConnectionType(event)));
|
|
}
|
|
updateConnectionType(event) {
|
|
this.connectionType = event.target.value;
|
|
this.isChangingConnectionType = true;
|
|
this.plugin.settings.connectionType = this.connectionType;
|
|
this.plugin.saveSettings();
|
|
this.updateVisualization();
|
|
}
|
|
setupMaxLabelCharactersSlider() {
|
|
const maxLabelCharactersSlider = document.getElementById("smart-connections-visualizer-maxLabelCharacters");
|
|
if (maxLabelCharactersSlider) {
|
|
maxLabelCharactersSlider.addEventListener("input", (event) => this.updateMaxLabelCharacters(event));
|
|
}
|
|
}
|
|
updateMaxLabelCharacters(event) {
|
|
const newMaxLabelCharacters = parseInt(event.target.value, 10);
|
|
const label = document.getElementById("smart-connections-visualizer-maxLabelCharactersLabel");
|
|
if (label)
|
|
label.textContent = `Max Label Characters: ${newMaxLabelCharacters}`;
|
|
this.maxLabelCharacters = newMaxLabelCharacters;
|
|
this.updateNodeLabels();
|
|
}
|
|
setupLinkLabelSizeSlider() {
|
|
const linkLabelSizeSlider = document.getElementById("smart-connections-visualizer-linkLabelSize");
|
|
if (linkLabelSizeSlider) {
|
|
linkLabelSizeSlider.addEventListener("input", (event) => this.updateLinkLabelSize(event));
|
|
}
|
|
}
|
|
updateLinkLabelSize(event) {
|
|
const newLinkLabelSize = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-linkLabelSizeLabel");
|
|
if (label)
|
|
label.textContent = `Link Label Size: ${newLinkLabelSize}`;
|
|
this.linkLabelSize = newLinkLabelSize;
|
|
this.updateLinkLabelSizes();
|
|
}
|
|
setupNodeLabelSizeSlider() {
|
|
const nodeLabelSizeSlider = document.getElementById("smart-connections-visualizer-nodeLabelSize");
|
|
if (nodeLabelSizeSlider) {
|
|
nodeLabelSizeSlider.addEventListener("input", (event) => this.updateNodeLabelSize(event));
|
|
}
|
|
}
|
|
updateNodeLabelSize(event) {
|
|
console.log("flounddd");
|
|
const newNodeLabelSize = parseFloat(event.target.value);
|
|
const label = document.getElementById("smart-connections-visualizer-nodeLabelSizeLabel");
|
|
if (label)
|
|
label.textContent = `Node Label Size: ${newNodeLabelSize}`;
|
|
this.nodeLabelSize = newNodeLabelSize;
|
|
this.updateNodeLabelSizes();
|
|
}
|
|
// Updated setupCloseIcon method
|
|
setupCloseIcon() {
|
|
const closeIcon = document.getElementById("smart-connections-visualizer-close-icon");
|
|
if (closeIcon)
|
|
closeIcon.addEventListener("click", () => this.toggleDropdownMenu());
|
|
}
|
|
closeDropdownMenu() {
|
|
const dropdownMenu = document.querySelector(".sc-visualizer-dropdown-menu");
|
|
if (dropdownMenu)
|
|
dropdownMenu.classList.remove("open");
|
|
}
|
|
setupRefreshIcon() {
|
|
const refreshIcon = document.getElementById("smart-connections-visualizer-refresh-icon");
|
|
if (refreshIcon)
|
|
refreshIcon.addEventListener("click", () => this.resetToDefault());
|
|
}
|
|
resetToDefault() {
|
|
this.relevanceScoreThreshold = DEFAULT_NETWORK_SETTINGS.relevanceScoreThreshold;
|
|
this.nodeSize = DEFAULT_NETWORK_SETTINGS.nodeSize;
|
|
this.linkThickness = DEFAULT_NETWORK_SETTINGS.lineThickness;
|
|
this.repelForce = DEFAULT_NETWORK_SETTINGS.repelForce;
|
|
this.linkForce = DEFAULT_NETWORK_SETTINGS.linkForce;
|
|
this.linkDistance = DEFAULT_NETWORK_SETTINGS.linkDistance;
|
|
this.centerForce = DEFAULT_NETWORK_SETTINGS.centerForce;
|
|
this.textFadeThreshold = DEFAULT_NETWORK_SETTINGS.textFadeThreshold;
|
|
this.minLinkThickness = DEFAULT_NETWORK_SETTINGS.minLinkThickness;
|
|
this.maxLinkThickness = DEFAULT_NETWORK_SETTINGS.maxLinkThickness;
|
|
this.maxLabelCharacters = DEFAULT_NETWORK_SETTINGS.maxLabelCharacters;
|
|
this.linkLabelSize = DEFAULT_NETWORK_SETTINGS.linkLabelSize;
|
|
this.nodeLabelSize = DEFAULT_NETWORK_SETTINGS.nodeLabelSize;
|
|
this.connectionType = DEFAULT_NETWORK_SETTINGS.connectionType;
|
|
this.noteFillColor = DEFAULT_NETWORK_SETTINGS.noteFillColor;
|
|
this.blockFillColor = DEFAULT_NETWORK_SETTINGS.blockFillColor;
|
|
this.plugin.settings.relevanceScoreThreshold = DEFAULT_NETWORK_SETTINGS.relevanceScoreThreshold;
|
|
this.plugin.settings.nodeSize = DEFAULT_NETWORK_SETTINGS.nodeSize;
|
|
this.plugin.settings.linkThickness = DEFAULT_NETWORK_SETTINGS.lineThickness;
|
|
this.plugin.settings.repelForce = DEFAULT_NETWORK_SETTINGS.repelForce;
|
|
this.plugin.settings.linkForce = DEFAULT_NETWORK_SETTINGS.linkForce;
|
|
this.plugin.settings.linkDistance = DEFAULT_NETWORK_SETTINGS.linkDistance;
|
|
this.plugin.settings.centerForce = DEFAULT_NETWORK_SETTINGS.centerForce;
|
|
this.plugin.settings.textFadeThreshold = DEFAULT_NETWORK_SETTINGS.textFadeThreshold;
|
|
this.plugin.settings.minLinkThickness = DEFAULT_NETWORK_SETTINGS.minLinkThickness;
|
|
this.plugin.settings.maxLinkThickness = DEFAULT_NETWORK_SETTINGS.maxLinkThickness;
|
|
this.plugin.settings.maxLabelCharacters = DEFAULT_NETWORK_SETTINGS.maxLabelCharacters;
|
|
this.plugin.settings.linkLabelSize = DEFAULT_NETWORK_SETTINGS.linkLabelSize;
|
|
this.plugin.settings.nodeLabelSize = DEFAULT_NETWORK_SETTINGS.nodeLabelSize;
|
|
this.plugin.settings.connectionType = DEFAULT_NETWORK_SETTINGS.connectionType;
|
|
this.plugin.settings.noteFillColor = DEFAULT_NETWORK_SETTINGS.noteFillColor;
|
|
this.plugin.settings.blockFillColor = DEFAULT_NETWORK_SETTINGS.blockFillColor;
|
|
this.plugin.saveSettings();
|
|
this.updateLabelsToDefaults();
|
|
this.updateSliders();
|
|
this.updateNodeSizes();
|
|
this.updateLinkThickness();
|
|
this.updateSimulationForces();
|
|
this.updateVisualization(this.relevanceScoreThreshold);
|
|
}
|
|
updateLabelsToDefaults() {
|
|
const labels = {
|
|
"smart-connections-visualizer-scoreThresholdLabel": `Min relevance: ${(this.relevanceScoreThreshold * 100).toFixed(0)}%`,
|
|
"smart-connections-visualizer-nodeSizeLabel": `Node size: ${this.nodeSize}`,
|
|
"smart-connections-visualizer-maxLabelCharactersLabel": `Max label characters: ${this.maxLabelCharacters}`,
|
|
"smart-connections-visualizer-linkLabelSizeLabel": `Link label size: ${this.linkLabelSize}`,
|
|
"smart-connections-visualizer-smart-connections-visualizer-nodeLabelSizeLabel": `Node label size: ${this.nodeLabelSize}`,
|
|
"smart-connections-visualizer-minLinkThicknessLabel": `Min link thickness: ${this.minLinkThickness}`,
|
|
"smart-connections-visualizer-maxLinkThicknessLabel": `Max link thickness: ${this.maxLinkThickness}`,
|
|
"smart-connections-visualizer-fadeThresholdLabel": `Text fade threshold: ${this.textFadeThreshold}`,
|
|
"smart-connections-visualizer-repelForceLabel": `Repel force: ${this.repelForce}`,
|
|
"smart-connections-visualizer-linkForceLabel": `Link force: ${this.linkForce}`,
|
|
"smart-connections-visualizer-linkDistanceLabel": `Link distance: ${this.linkDistance}`
|
|
};
|
|
for (const [id2, text] of Object.entries(labels)) {
|
|
const label = document.getElementById(id2);
|
|
if (label) {
|
|
label.textContent = text;
|
|
}
|
|
}
|
|
}
|
|
updateSliders() {
|
|
const scoreThresholdSlider = document.getElementById("smart-connections-visualizer-scoreThreshold");
|
|
const nodeSizeSlider = document.getElementById("smart-connections-visualizer-nodeSize");
|
|
const repelForceSlider = document.getElementById("smart-connections-visualizer-repelForce");
|
|
const linkForceSlider = document.getElementById("smart-connections-visualizer-linkForce");
|
|
const linkDistanceSlider = document.getElementById("smart-connections-visualizer-linkDistance");
|
|
const fadeThresholdSlider = document.getElementById("smart-connections-visualizer-fadeThreshold");
|
|
const minLinkThicknessSlider = document.getElementById("smart-connections-visualizer-minLinkThickness");
|
|
const maxLinkThicknessSlider = document.getElementById("smart-connections-visualizer-maxLinkThickness");
|
|
const maxLabelCharactersSlider = document.getElementById("smart-connections-visualizer-maxLabelCharacters");
|
|
const linkLabelSizeSlider = document.getElementById("smart-connections-visualizer-linkLabelSize");
|
|
const nodeLabelSizeSlider = document.getElementById("smart-connections-visualizer-nodeLabelSize");
|
|
scoreThresholdSlider.value = `${this.relevanceScoreThreshold}`;
|
|
nodeSizeSlider.value = `${this.nodeSize}`;
|
|
repelForceSlider.value = `${this.repelForce}`;
|
|
linkForceSlider.value = `${this.linkForce}`;
|
|
linkDistanceSlider.value = `${this.linkDistance}`;
|
|
fadeThresholdSlider.value = `${this.textFadeThreshold}`;
|
|
minLinkThicknessSlider.value = `${this.minLinkThickness}`;
|
|
maxLinkThicknessSlider.value = `${this.maxLinkThickness}`;
|
|
maxLabelCharactersSlider.value = `${this.maxLabelCharacters}`;
|
|
linkLabelSizeSlider.value = `${this.linkLabelSize}`;
|
|
nodeLabelSizeSlider.value = `${this.nodeLabelSize}`;
|
|
}
|
|
watchForNoteChanges() {
|
|
this.app.workspace.on("file-open", (file) => {
|
|
if (file && this.currentNoteKey !== file.path && !this.isHovering && this.containerEl.children[1].checkVisibility()) {
|
|
this.currentNoteKey = file.path;
|
|
this.currentNoteChanging = true;
|
|
this.render();
|
|
}
|
|
});
|
|
}
|
|
updateVisualization(newScoreThreshold) {
|
|
if (this.updatingVisualization && !this.isChangingConnectionType) {
|
|
this.updatingVisualization = false;
|
|
this.currentNoteChanging = false;
|
|
return;
|
|
}
|
|
this.isChangingConnectionType = false;
|
|
if (newScoreThreshold !== void 0) {
|
|
this.relevanceScoreThreshold = newScoreThreshold;
|
|
}
|
|
this.updateConnections();
|
|
const filteredConnections = this.connections.filter((connection) => connection.score >= this.relevanceScoreThreshold);
|
|
const visibleNodes = /* @__PURE__ */ new Set();
|
|
filteredConnections.forEach((connection) => {
|
|
visibleNodes.add(connection.source);
|
|
visibleNodes.add(connection.target);
|
|
});
|
|
visibleNodes.add(this.centralNote.key);
|
|
const nodesData = Array.from(visibleNodes).map((id2) => {
|
|
const node = this.nodes.find((node2) => node2.id === id2);
|
|
return node ? node : null;
|
|
}).filter(Boolean);
|
|
if (!nodesData.some((node) => node.id === this.centralNote.key)) {
|
|
const centralNode = this.nodes.find((node) => node.id === this.centralNote.key);
|
|
if (centralNode) {
|
|
nodesData.push(centralNode);
|
|
}
|
|
}
|
|
nodesData.forEach((node) => {
|
|
if (!node.x || !node.y) {
|
|
console.warn(`Node with invalid position: ${node.id}`);
|
|
node.x = Math.random() * 1e3;
|
|
node.y = Math.random() * 1e3;
|
|
}
|
|
});
|
|
this.validatedLinks = filteredConnections.filter((link) => {
|
|
const sourceNode = nodesData.find((node) => node.id === link.source);
|
|
const targetNode = nodesData.find((node) => node.id === link.target);
|
|
if (!sourceNode || !targetNode) {
|
|
console.warn(`Link source or target node not found: ${link.source}, ${link.target}`);
|
|
}
|
|
return sourceNode && targetNode;
|
|
});
|
|
if (nodesData.length === 0 || this.validatedLinks.length === 0) {
|
|
this.updatingVisualization = false;
|
|
console.warn("No nodes or links to display after filtering. Aborting update.");
|
|
new import_obsidian.Notice("No nodes or links to display after filtering. Adjust filter settings");
|
|
this.nodeSelection = this.svgGroup.select("g.smart-connections-visualizer-nodes").selectAll("circle").data([]).exit().remove();
|
|
this.linkSelection = this.svgGroup.select("g.smart-connections-visualizer-links").selectAll("line").data([]).exit().remove();
|
|
this.linkLabelSelection = this.svgGroup.select("g.smart-connections-visualizer-link-labels").selectAll("text").data([]).exit().remove();
|
|
this.labelSelection = this.svgGroup.select("g.smart-connections-visualizer-node-labels").selectAll("text").data([]).exit().remove();
|
|
return;
|
|
}
|
|
this.updateNodeAndLinkSelection(nodesData);
|
|
if (!this.simulation || this.currentNoteChanging || this.isFiltering) {
|
|
const { width, height } = this.getSVGDimensions();
|
|
this.initializeSimulation(width, height);
|
|
this.currentNoteChanging = false;
|
|
this.isFiltering = false;
|
|
}
|
|
this.simulation.nodes(nodesData).on("tick", this.simulationTickHandler.bind(this));
|
|
this.simulation.force("link").links(this.validatedLinks).distance((d) => this.linkDistanceScale(d.score));
|
|
this.simulation.alpha(1).restart();
|
|
setTimeout(() => {
|
|
this.simulation.alphaTarget(0);
|
|
}, 1e3);
|
|
this.updatingVisualization = false;
|
|
}
|
|
simulationTickHandler() {
|
|
this.nodeSelection.attr("cx", (d) => d.x).attr("cy", (d) => d.y).style("cursor", "pointer");
|
|
this.linkSelection.attr("x1", (d) => d.source.x || 0).attr("y1", (d) => d.source.y || 0).style("cursor", "pointer").attr("x2", (d) => d.target.x || 0).attr("y2", (d) => d.target.y || 0);
|
|
this.linkLabelSelection.attr("x", (d) => (d.source.x + d.target.x) / 2).attr("y", (d) => (d.source.y + d.target.y) / 2);
|
|
this.labelSelection.attr("x", (d) => d.x).attr("y", (d) => d.y);
|
|
}
|
|
updateConnections() {
|
|
this.nodes = [];
|
|
this.links = [];
|
|
this.connections = [];
|
|
this.minScore = 1;
|
|
this.maxScore = 0;
|
|
if (!this.currentNoteKey)
|
|
return;
|
|
this.centralNote = this.smartNotes[this.currentNoteKey];
|
|
console.log("central note: ", this.centralNote);
|
|
const noteConnections = this.centralNote.find_connections().filter(
|
|
(connection) => connection.score >= this.relevanceScoreThreshold
|
|
);
|
|
this.addCentralNode();
|
|
this.addFilteredConnections(noteConnections);
|
|
const isValid = this.validateGraphData(this.nodes, this.links);
|
|
if (!isValid)
|
|
console.error("Graph data validation failed.");
|
|
}
|
|
addCentralNode() {
|
|
if (this.centralNote.key && this.centralNote.key.trim() !== "" && !this.nodes.some((node) => node.id === this.centralNote.key)) {
|
|
const svg = this.svg.node();
|
|
const { width, height } = svg.getBoundingClientRect();
|
|
this.nodes.push({
|
|
id: this.centralNote.key,
|
|
name: this.centralNote.key,
|
|
group: "note",
|
|
x: width / 2,
|
|
y: height / 2,
|
|
fx: null,
|
|
fy: null,
|
|
fill: this.noteFillColor,
|
|
selected: false,
|
|
highlighted: false
|
|
});
|
|
this.centralNode = this.nodes[this.nodes.length - 1];
|
|
} else {
|
|
console.error(`Central node not found or already exists: ${this.centralNote.key}`);
|
|
}
|
|
}
|
|
addFilteredConnections(noteConnections) {
|
|
const filteredConnections = noteConnections.filter((connection) => {
|
|
if (this.connectionType === "both") {
|
|
return true;
|
|
} else {
|
|
return this.connectionType === "block" === connection instanceof this.env.item_types.SmartBlock;
|
|
}
|
|
});
|
|
filteredConnections.forEach((connection, index2) => {
|
|
if (connection && connection.key) {
|
|
const connectionId = connection.key;
|
|
this.addConnectionNode(connectionId, connection);
|
|
this.addConnectionLink(connectionId, connection);
|
|
} else {
|
|
console.warn(`Skipping invalid connection at index ${index2}:`, connection);
|
|
}
|
|
});
|
|
}
|
|
addConnectionNode(connectionId, connection) {
|
|
if (!this.nodes.some((node) => node.id === connectionId)) {
|
|
this.nodes.push({
|
|
id: connectionId,
|
|
name: connectionId,
|
|
group: connection instanceof this.env.item_types.SmartBlock ? "block" : "note",
|
|
x: Math.random() * 1e3,
|
|
y: Math.random() * 1e3,
|
|
fx: null,
|
|
fy: null,
|
|
fill: connection instanceof this.env.item_types.SmartBlock ? this.blockFillColor : this.noteFillColor,
|
|
selected: false,
|
|
highlighted: false
|
|
});
|
|
} else {
|
|
console.log("Node already exists for connection ID:", connectionId);
|
|
}
|
|
}
|
|
addConnectionLink(connectionId, connection) {
|
|
const sourceNode = this.nodes.find((node) => node.id === this.centralNote.key);
|
|
const targetNode = this.nodes.find((node) => node.id === connectionId);
|
|
if (!sourceNode) {
|
|
console.error(`Source node not found: ${this.centralNote.key}`);
|
|
return;
|
|
}
|
|
if (!targetNode) {
|
|
console.error(`Target node not found: ${connectionId}`);
|
|
return;
|
|
}
|
|
this.links.push({
|
|
source: this.centralNote.key,
|
|
target: connectionId,
|
|
value: connection.score || 0
|
|
});
|
|
this.connections.push({
|
|
source: this.centralNote.key,
|
|
target: connectionId,
|
|
score: connection.score || 0
|
|
});
|
|
this.updateScoreRange(connection.score);
|
|
}
|
|
updateScoreRange(score) {
|
|
if (score > this.maxScore)
|
|
this.maxScore = score;
|
|
if (score < this.minScore)
|
|
this.minScore = score;
|
|
}
|
|
validateGraphData(nodes, links) {
|
|
const nodeIds = new Set(nodes.map((node) => node.id));
|
|
let isValid = true;
|
|
links.forEach((link, index2) => {
|
|
if (!nodeIds.has(link.source)) {
|
|
console.error(`Link at index ${index2} has an invalid source: ${link.source}`);
|
|
isValid = false;
|
|
}
|
|
if (!nodeIds.has(link.target)) {
|
|
console.error(`Link at index ${index2} has an invalid target: ${link.target}`);
|
|
isValid = false;
|
|
}
|
|
});
|
|
nodes.forEach((node, index2) => {
|
|
if (!node.hasOwnProperty("id") || !node.hasOwnProperty("name") || !node.hasOwnProperty("group")) {
|
|
console.error(`Node at index ${index2} is missing required properties: ${JSON.stringify(node)}`);
|
|
isValid = false;
|
|
}
|
|
});
|
|
return isValid;
|
|
}
|
|
updateNodeAndLinkSelection(nodesData) {
|
|
const svgGroup = this.svgGroup;
|
|
this.linkSelection = svgGroup.select("g.smart-connections-visualizer-links").selectAll("line").data(this.validatedLinks, (d) => `${d.source}-${d.target}`).join(
|
|
(enter) => this.enterLink(enter),
|
|
(update) => this.updateLink(update),
|
|
(exit) => exit.remove()
|
|
);
|
|
this.linkLabelSelection = svgGroup.select("g.smart-connections-visualizer-link-labels").selectAll("text").data(this.validatedLinks, (d) => `${d.source.id}-${d.target.id}`).join(
|
|
(enter) => this.enterLinkLabel(enter),
|
|
(update) => this.updateLinkLabel(update),
|
|
(exit) => exit.remove()
|
|
);
|
|
this.labelSelection = svgGroup.select("g.smart-connections-visualizer-node-labels").selectAll("text").data(nodesData, (d) => d.id).join(
|
|
(enter) => this.enterLabel(enter),
|
|
(update) => this.updateLabel(update),
|
|
(exit) => exit.remove()
|
|
).attr("x", (d) => d.x).attr("y", (d) => d.y);
|
|
this.nodeSelection = svgGroup.select("g.smart-connections-visualizer-nodes").selectAll("circle").data(nodesData, (d) => {
|
|
return d.id;
|
|
}).join(
|
|
(enter) => this.enterNode(enter),
|
|
(update) => this.updateNode(update),
|
|
(exit) => exit.remove()
|
|
);
|
|
}
|
|
enterNode(enter) {
|
|
const that = this;
|
|
return enter.append("circle").attr("class", "smart-connections-visualizer-node").attr("r", (d) => d.id === this.centralNode.id ? this.nodeSize + 2 : this.nodeSize).attr("fill", (d) => d.fill).attr("stroke", (d) => d.selected ? "blanchedalmond" : "transparent").attr("stroke-width", (d) => d.selected ? 1.5 : 0.3).attr("opacity", 1).attr("cursor", "pointer").call(drag_default().on("start", this.onDragStart.bind(this)).on("drag", this.onDrag.bind(this)).on("end", this.onDragEnd.bind(this))).on("click", this.onNodeClick.bind(this)).on("mouseover", this.onNodeMouseOver.bind(this)).on("mouseout", this.onNodeMouseOut.bind(this));
|
|
}
|
|
updateNode(update) {
|
|
return update.attr("r", (d) => d.id === this.centralNode.id ? this.nodeSize + 2 : this.nodeSize).attr("fill", (d) => d.selected ? "#f3ee5d" : d.fill).attr("stroke", (d) => d.selected ? "blanchedalmond" : "transparent").attr("stroke-width", (d) => d.selected ? 1.5 : 0.3);
|
|
}
|
|
onDragStart(event, d) {
|
|
if (!event.active)
|
|
this.simulation.alphaTarget(0.3).restart();
|
|
this.dragging = true;
|
|
d.fx = d.x;
|
|
d.fy = d.y;
|
|
}
|
|
onDrag(event, d) {
|
|
if (this.isHovering)
|
|
this.isHovering = false;
|
|
d.fx = event.x;
|
|
d.fy = event.y;
|
|
}
|
|
onDragEnd(event, d) {
|
|
if (!event.active)
|
|
this.simulation.alphaTarget(0);
|
|
d.fx = null;
|
|
d.fy = null;
|
|
this.dragging = false;
|
|
}
|
|
onNodeClick(event, d) {
|
|
if (d.id === this.centralNode.id)
|
|
return;
|
|
this.env.plugin.open_note(d.id, event);
|
|
}
|
|
onNodeMouseOver(event, d) {
|
|
if (this.dragging)
|
|
return;
|
|
if (d.id === this.centralNode.id)
|
|
return;
|
|
this.isHovering = true;
|
|
this.highlightNode(d);
|
|
this.updateLinkLabelAppearance(d);
|
|
this.app.workspace.trigger("hover-link", {
|
|
event,
|
|
source: "D3",
|
|
hoverParent: event.currentTarget.parentElement,
|
|
targetEl: event.currentTarget,
|
|
linktext: d.id
|
|
});
|
|
}
|
|
onNodeMouseOut(event, d) {
|
|
if (this.dragging)
|
|
return;
|
|
this.isHovering = false;
|
|
this.centerHighlighted = false;
|
|
this.unhighlightNode(d);
|
|
this.updateLinkLabelAppearance({ id: null });
|
|
}
|
|
updateLinkLabelPositions() {
|
|
this.linkLabelSelection.attr("x", (d) => (d.source.x + d.target.x) / 2).attr("y", (d) => (d.source.y + d.target.y) / 2);
|
|
}
|
|
updateLinkSelection(svgGroup) {
|
|
return svgGroup.select("g.links").selectAll("line").data(this.validatedLinks, (d) => `${d.source}-${d.target}`).style("cursor", "pointer").join(
|
|
(enter) => this.enterLink(enter),
|
|
(update) => this.updateLink(update),
|
|
(exit) => exit.remove()
|
|
);
|
|
}
|
|
enterLink(enter) {
|
|
return enter.append("line").attr("class", "smart-connections-visualizer-link").attr("stroke", "#4c7787").attr("stroke-width", (d) => this.getLinkStrokeWidth(d)).attr("stroke-opacity", 1).attr("opacity", 1);
|
|
}
|
|
updateLink(update) {
|
|
return update.attr("stroke", "#4c7787").attr("stroke-width", (d) => this.getLinkStrokeWidth(d));
|
|
}
|
|
getLinkStrokeWidth(d) {
|
|
return linear2().domain([this.minScore, this.maxScore]).range([this.minLinkThickness, this.maxLinkThickness])(d.score);
|
|
}
|
|
updateLinkLabelSelection(svgGroup) {
|
|
return svgGroup.append("g").attr("class", "smart-connections-visualizer-link-labels").selectAll("text").data(this.validatedLinks, (d) => `${d.source.id}-${d.target.id}`).join(
|
|
(enter) => this.enterLinkLabel(enter),
|
|
(update) => this.updateLinkLabel(update),
|
|
(exit) => exit.remove()
|
|
);
|
|
}
|
|
enterLinkLabel(enter) {
|
|
return enter.append("text").attr("class", "smart-connections-visualizer-link-label").attr("font-size", this.linkLabelSize).attr("fill", "#bbb").attr("opacity", 0).attr("x", (d) => d.x).attr("y", (d) => d.y).text((d) => (d.score * 100).toFixed(1) + "%");
|
|
}
|
|
updateLinkLabel(update) {
|
|
return update.text((d) => (d.score * 100).toFixed(1)).attr("x", (d) => d.x).attr("y", (d) => d.y);
|
|
}
|
|
enterLabel(enter) {
|
|
return enter.append("text").attr("class", "smart-connections-visualizer-label").attr("dx", 0).attr("font-size", this.nodeLabelSize).attr("dy", 12).attr("text-anchor", "middle").attr("fill", "#bbb").attr("data-id", (d) => d.id).attr("opacity", 1).attr("x", (d) => d.x).attr("y", (d) => d.y).text((d) => this.formatLabel(d.name));
|
|
}
|
|
updateLabel(update) {
|
|
return update.attr("dx", 0).attr("data-id", (d) => d.id).attr("text-anchor", "middle").text((d) => d.id === this.highlightedNodeId ? this.formatLabel(d.name, false) : this.formatLabel(d.name, true)).attr("fill", "#bbb").attr("font-size", this.nodeLabelSize).attr("x", (d) => d.x).attr("y", (d) => d.y).attr("opacity", 1);
|
|
}
|
|
updateNodeSizes() {
|
|
this.nodeSelection.attr("r", (d) => d.id === this.centralNode.id ? this.nodeSize + 3 : this.nodeSize);
|
|
}
|
|
updateLinkThickness() {
|
|
const linkStrokeScale = linear2().domain([this.minScore, this.maxScore]).range([this.minLinkThickness, this.maxLinkThickness]);
|
|
this.linkSelection.attr("stroke-width", (d) => linkStrokeScale(d.score));
|
|
}
|
|
updateSimulationForces() {
|
|
if (!this.simulation) {
|
|
console.error("Simulation not initialized");
|
|
return;
|
|
}
|
|
this.simulation.force("charge", manyBody_default().strength(-this.repelForce)).force("link", link_default(this.validatedLinks).id((d) => d.id).distance((d) => this.linkDistanceScale(d.score)).strength(this.linkForce));
|
|
this.simulation.alphaTarget(0.3).restart();
|
|
setTimeout(() => {
|
|
this.simulation.alphaTarget(0);
|
|
}, 1e3);
|
|
}
|
|
normalizeScore(score) {
|
|
if (this.minScore === this.maxScore) {
|
|
return 0.5;
|
|
}
|
|
return (score - this.minScore) / (this.maxScore - this.minScore);
|
|
}
|
|
linkDistanceScale(score) {
|
|
return linear2().domain([0, 1]).range([this.linkDistance * 2, this.linkDistance / 2])(this.normalizeScore(score));
|
|
}
|
|
updateLabelOpacity(zoomLevel) {
|
|
const maxOpacity = 1;
|
|
const minOpacity = 0;
|
|
const minZoom = 0.1;
|
|
const maxZoom = this.textFadeThreshold;
|
|
let newOpacity = (zoomLevel - minZoom) / (maxZoom - minZoom);
|
|
if (zoomLevel <= minZoom)
|
|
newOpacity = minOpacity;
|
|
if (zoomLevel >= maxZoom)
|
|
newOpacity = maxOpacity;
|
|
newOpacity = Math.max(minOpacity, Math.min(maxOpacity, newOpacity));
|
|
if (this.labelSelection) {
|
|
this.labelSelection.transition().duration(300).attr("opacity", newOpacity);
|
|
}
|
|
}
|
|
updateNodeLabels() {
|
|
this.labelSelection.attr("font-size", this.nodeLabelSize).text((d) => this.formatLabel(d.name, true));
|
|
}
|
|
updateLinkLabelSizes() {
|
|
if (this.linkLabelSelection) {
|
|
this.linkLabelSelection.attr("font-size", this.linkLabelSize);
|
|
}
|
|
}
|
|
updateNodeLabelSizes() {
|
|
this.labelSelection.attr("font-size", this.nodeLabelSize);
|
|
}
|
|
updateNodeLabelOpacity(zoomLevel) {
|
|
const maxOpacity = 1;
|
|
const minOpacity = 0;
|
|
const minZoom = 0.1;
|
|
const maxZoom = this.textFadeThreshold;
|
|
let newOpacity = (zoomLevel - minZoom) / (maxZoom - minZoom);
|
|
if (zoomLevel <= minZoom)
|
|
newOpacity = minOpacity;
|
|
if (zoomLevel >= maxZoom)
|
|
newOpacity = maxOpacity;
|
|
newOpacity = Math.max(minOpacity, Math.min(maxOpacity, newOpacity));
|
|
this.labelSelection.transition().duration(300).attr("opacity", newOpacity);
|
|
}
|
|
startBoxSelection(event) {
|
|
if (!this.isCtrlPressed)
|
|
return;
|
|
this.isDragging = true;
|
|
const [x3, y3] = pointer_default(event);
|
|
this.selectionBox = select_default2("svg").append("rect").attr("class", "smart-connections-visualizer-selection-box").attr("x", x3).attr("y", y3).attr("width", 0).attr("height", 0).attr("stroke", "#00f").attr("stroke-width", 1).attr("fill", "rgba(0, 0, 255, 0.3)");
|
|
this.startX = x3;
|
|
this.startY = y3;
|
|
}
|
|
updateBoxSelection(event) {
|
|
if (!this.isDragging)
|
|
return;
|
|
const [x3, y3] = pointer_default(event);
|
|
const newWidth = x3 - this.startX;
|
|
const newHeight = y3 - this.startY;
|
|
this.selectionBox.attr("width", Math.abs(newWidth)).attr("height", Math.abs(newHeight)).attr("x", Math.min(x3, this.startX)).attr("y", Math.min(y3, this.startY));
|
|
this.updateNodeSelectionInBox(newWidth, newHeight);
|
|
this.updateNodeAppearance();
|
|
}
|
|
updateNodeSelectionInBox(newWidth, newHeight) {
|
|
const endX = this.startX + newWidth;
|
|
const endY = this.startY + newHeight;
|
|
const transformedStartX = Math.min(this.startX, endX);
|
|
const transformedStartY = Math.min(this.startY, endY);
|
|
const transformedEndX = Math.max(this.startX, endX);
|
|
const transformedEndY = Math.max(this.startY, endY);
|
|
const transform2 = transform(select_default2("svg").node());
|
|
const zoomedStartX = (transformedStartX - transform2.x) / transform2.k;
|
|
const zoomedStartY = (transformedStartY - transform2.y) / transform2.k;
|
|
const zoomedEndX = (transformedEndX - transform2.x) / transform2.k;
|
|
const zoomedEndY = (transformedEndY - transform2.y) / transform2.k;
|
|
this.nodeSelection.each((d) => {
|
|
const nodeX = d.x;
|
|
const nodeY = d.y;
|
|
d.selected = nodeX >= zoomedStartX && nodeX <= zoomedEndX && nodeY >= zoomedStartY && nodeY <= zoomedEndY;
|
|
});
|
|
}
|
|
endBoxSelection() {
|
|
if (!this.isDragging)
|
|
return;
|
|
this.isDragging = false;
|
|
this.selectionBox.remove();
|
|
}
|
|
// TODO:: Add back in when ready for toolti
|
|
// showTooltip(event: any, d: any) {
|
|
// const tooltip = d3.select('.tooltip');
|
|
// tooltip.text(d.name)
|
|
// .style('visibility', 'visible');
|
|
// const [x, y] = d3.pointer(event);
|
|
// tooltip.style('top', `${y + 10}px`)
|
|
// .style('left', `${x + 10}px`);
|
|
// }
|
|
// hideTooltip() {
|
|
// const tooltip = d3.select('.tooltip');
|
|
// tooltip.style('visibility', 'hidden');
|
|
// }
|
|
};
|
|
var ScGraphView = class extends import_obsidian.Plugin {
|
|
async onload() {
|
|
await this.loadSettings();
|
|
this.registerView("smart-connections-visualizer", (leaf) => new ScGraphItemView(leaf, this));
|
|
this.registerHoverLinkSource("smart-connections-visualizer", {
|
|
display: "Smart connections visualizer hover link source",
|
|
defaultMod: true
|
|
});
|
|
this.addRibbonIcon("git-fork", "Open smart connections visualizer", (evt) => {
|
|
const existingLeaf = this.app.workspace.getLeavesOfType("smart-connections-visualizer")[0];
|
|
if (existingLeaf) {
|
|
this.app.workspace.setActiveLeaf(existingLeaf);
|
|
} else {
|
|
let leaf = this.app.workspace.getLeaf(true);
|
|
leaf.setViewState({
|
|
type: "smart-connections-visualizer",
|
|
active: true
|
|
});
|
|
}
|
|
});
|
|
}
|
|
async loadSettings() {
|
|
this.settings = Object.assign({}, DEFAULT_NETWORK_SETTINGS, await this.loadData());
|
|
}
|
|
async saveSettings() {
|
|
await this.saveData(this.settings);
|
|
}
|
|
onunload() {
|
|
}
|
|
};
|
|
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50cyIsICJub2RlX21vZHVsZXMvZDMtYXJyYXkvc3JjL2FzY2VuZGluZy5qcyIsICJub2RlX21vZHVsZXMvZDMtYXJyYXkvc3JjL2Rlc2NlbmRpbmcuanMiLCAibm9kZV9tb2R1bGVzL2QzLWFycmF5L3NyYy9iaXNlY3Rvci5qcyIsICJub2RlX21vZHVsZXMvZDMtYXJyYXkvc3JjL251bWJlci5qcyIsICJub2RlX21vZHVsZXMvZDMtYXJyYXkvc3JjL2Jpc2VjdC5qcyIsICJub2RlX21vZHVsZXMv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AqIHJobzIgKiBkMSksXG4gICAgICAgICAgYjEgPSAodzEgKiB3MSAtIHcwICogdzAgLSByaG80ICogZDIpIC8gKDIgKiB3MSAqIHJobzIgKiBkMSksXG4gICAgICAgICAgcjAgPSBNYXRoLmxvZyhNYXRoLnNxcnQoYjAgKiBiMCArIDEpIC0gYjApLFxuICAgICAgICAgIHIxID0gTWF0aC5sb2coTWF0aC5zcXJ0KGIxICogYjEgKyAxKSAtIGIxKTtcbiAgICAgIFMgPSAocjEgLSByMCkgLyByaG87XG4gICAgICBpID0gZnVuY3Rpb24odCkge1xuICAgICAgICB2YXIgcyA9IHQgKiBTLFxuICAgICAgICAgICAgY29zaHIwID0gY29zaChyMCksXG4gICAgICAgICAgICB1ID0gdzAgLyAocmhvMiAqIGQxKSAqIChjb3NocjAgKiB0YW5oKHJobyAqIHMgKyByMCkgLSBzaW5oKHIwKSk7XG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgdXgwICsgdSAqIGR4LFxuICAgICAgICAgIHV5MCArIHUgKiBkeSxcbiAgICAgICAgICB3MCAqIGNvc2hyMCAvIGNvc2gocmhvICogcyArIHIwKVxuICAgICAgICBdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGkuZHVyYXRpb24gPSBTICogMTAwMCAqIHJobyAvIE1hdGguU1FSVDI7XG5cbiAgICByZXR1cm4gaTtcbiAgfVxuXG4gIHpvb20ucmhvID0gZnVuY3Rpb24oXykge1xuICAgIHZhciBfMSA9IE1hdGgubWF4KDFlLTMsICtfKSwgXzIgPSBfMSAqIF8xLCBfNCA9IF8yICogXzI7XG4gICAgcmV0dXJuIHpvb21SaG8oXzEsIF8yLCBfNCk7XG4gIH07XG5cbiAgcmV0dXJuIHpvb207XG59KShNYXRoLlNRUlQyLCAyLCA0KTtcbiIsICJ2YXIgZnJhbWUgPSAwLCAvLyBpcyBhbiBhbmltYXRpb24gZnJhbWUgcGVuZGluZz9cbiAgICB0aW1lb3V0ID0gMCwgLy8gaXMgYSB0aW1l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pIHtcbiAgICAgICAgY2FzZSAxNjogeyAvLyBTSElGVFxuICAgICAgICAgIGlmIChzaGlmdGluZykge1xuICAgICAgICAgICAgbG9ja1ggPSBsb2NrWSA9IHNoaWZ0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICBtb3ZlKGV2ZW50KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSAxODogeyAvLyBBTFRcbiAgICAgICAgICBpZiAobW9kZSA9PT0gTU9ERV9DRU5URVIpIHtcbiAgICAgICAgICAgIGlmIChzaWduWCA8IDApIGUwID0gZTE7IGVsc2UgaWYgKHNpZ25YID4gMCkgdzAgPSB3MTtcbiAgICAgICAgICAgIGlmIChzaWduWSA8IDApIHMwID0gczE7IGVsc2UgaWYgKHNpZ25ZID4gMCkgbjAgPSBuMTtcbiAgICAgICAgICAgIG1vZGUgPSBNT0RFX0hBTkRMRTtcbiAgICAgICAgICAgIG1vdmUoZXZlbnQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlIDMyOiB7IC8vIFNQQUNFXG4gICAgICAgICAgaWYgKG1vZGUgPT09IE1PREVfU1BBQ0UpIHtcbiAgICAgICAgICAgIGlmIChldmVudC5hbHRLZXkpIHtcbiAgICAgICAgICAgICAgaWYgKHNpZ25YKSBlMCA9IGUxIC0gZHggKiBzaWduWCwgdzAgPSB3MSArIGR4ICogc2lnblg7XG4gICAgICAgICAgICAgIGlmIChzaWduWSkgczAgPSBzMSAtIGR5ICogc2lnblksIG4wID0gbjEgKyBkeSAqIHNpZ25ZO1xuICAgICAgICAgICAgICBtb2RlID0gTU9ERV9DRU5URVI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAoc2lnblggPCAwKSBlMCA9IGUxOyBlbHNlIGlmIChzaWduWCA+IDApIHcwID0gdzE7XG4gICAgICAgICAgICAgIGlmIChzaWduWS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kge1xuICAgICAgdmFyIGRhdGEgPSBxdWFkLmRhdGEsIHJqID0gcXVhZC5yLCByID0gcmkgKyByajtcbiAgICAgIGlmIChkYXRhKSB7XG4gICAgICAgIGlmIChkYXRhLmluZGV4ID4gbm9kZS5pbmRleCkge1xuICAgICAgICAgIHZhciB4ID0geGkgLSBkYXRhLnggLSBkYXRhLnZ4LFxuICAgICAgICAgICAgICB5ID0geWkgLSBkYXRhLnkgLSBkYXRhLnZ5LFxuICAgICAgICAgICAgICBsID0geCAqIHggKyB5ICogeTtcbiAgICAgICAgICBpZiAobCA8IHIgKiByKSB7XG4gICAgICAgICAgICBpZiAoeCA9PT0gMCkgeCA9IGppZ2dsZShyYW5kb20pLCBsICs9IHggKiB4O1xuICAgICAgICAgICAgaWYgKHkgPT09IDApIHkgPSBqaWdnbGUocmFuZG9tKSwgbCArPSB5ICogeTtcbiAgICAgICAgICAgIGwgPSAociAtIChsID0gTWF0aC5zcXJ0KGwpKSkgLyBsICogc3RyZW5ndGg7XG4gICAgICAgICAgICBub2RlLnZ4ICs9ICh4ICo9IGwpICogKHIgPSAocmogKj0gcmopIC8gKHJpMiArIHJqKSk7XG4gICAgICAgICAgICBub2RlLnZ5ICs9ICh5ICo9IGwpICogcjtcbiAgICAgICAgICAgIGRhdGEudnggLT0geCAqIChyID0gMSAtIHIpO1xuICAgICAgICAgICAgZGF0YS52eSAtPSB5ICogcjtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHgwID4geGkgKyByIHx8IHgxIDwgeGkgLSByIHx8IHkwID4geWkgKyByIHx8IHkxIDwgeWkgLSByO1xuICAgIH1cbiAgfVxuXG4gIGZ1bmN0aW9uIHByZXBhcmUocXVhZCkge1xuICAgIGlmIChxdWFkLmRhdGEpIHJldHVybiBxdWFkLnIgPSByYWRpaVtxdWFkLmRhdGEuaW5kZXhdO1xuICAgIGZvciAodmFyIGkgPSBxdWFkLnI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