commit b027ca341afaadea5ad9848759393dcc45e4bcf5 Author: Michael Murtaugh Date: Mon May 27 16:05:50 2019 +0200 plum erg diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..86d062e --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ + +dist/wikimap.js: src/*.js + # node_modules/.bin/rollup src/index.js --file dist/index.js --format iife + node_modules/.bin/rollup -c + +dist/%.js: src/%.js src/*.js + # node_modules/.bin/rollup src/index.js --file dist/index.js --format iife + node_modules/.bin/rollup -c \ No newline at end of file diff --git a/cats.json b/cats.json new file mode 100644 index 0000000..4ba9ad9 --- /dev/null +++ b/cats.json @@ -0,0 +1,257 @@ +[ + { + "title": "Actualit\u00e9s", + "depth": 0, + "name": "Cat\u00e9gorie:Actualit\u00e9s" + }, + { + "title": "Actualit\u00e9s (2013)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2013)" + }, + { + "title": "Actualit\u00e9s (2014)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2014)" + }, + { + "title": "Actualit\u00e9s (2015)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2015)" + }, + { + "title": "Actualit\u00e9s (2016)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2016)" + }, + { + "title": "Actualit\u00e9s (2017)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2017)" + }, + { + "title": "Actualit\u00e9s (2018)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2018)" + }, + { + "title": "Actualit\u00e9s (2019)", + "depth": 1, + "parent": "Actualit\u00e9s", + "name": "Cat\u00e9gorie:Actualit\u00e9s (2019)" + }, + { + "title": "Ateliers pluridisciplinaires", + "depth": 0, + "name": "Cat\u00e9gorie:Ateliers pluridisciplinaires" + }, + { + "title": "Ateliers pluridisciplinaires (BA)", + "depth": 0, + "name": "Cat\u00e9gorie:Ateliers pluridisciplinaires (BA)" + }, + { + "title": "Ateliers pluridisciplinaires (MA)", + "depth": 0, + "name": "Cat\u00e9gorie:Ateliers pluridisciplinaires (MA)" + }, + { + "title": "B1", + "depth": 0, + "name": "Cat\u00e9gorie:B1" + }, + { + "title": "B2", + "depth": 0, + "name": "Cat\u00e9gorie:B2" + }, + { + "title": "B3", + "depth": 0, + "name": "Cat\u00e9gorie:B3" + }, + { + "title": "Bachelors", + "depth": 0, + "name": "Cat\u00e9gorie:Bachelors" + }, + { + "title": "Cours de soutien sp\u00e9cifique", + "depth": 0, + "name": "Cat\u00e9gorie:Cours de soutien sp\u00e9cifique" + }, + { + "title": "Cours techniques", + "depth": 0, + "name": "Cat\u00e9gorie:Cours techniques" + }, + { + "title": "Cours th\u00e9oriques", + "depth": 0, + "name": "Cat\u00e9gorie:Cours th\u00e9oriques" + }, + { + "title": "Critique du f\u00e9minisme", + "depth": 0, + "name": "Cat\u00e9gorie:Critique du f\u00e9minisme" + }, + { + "title": "English", + "depth": 0, + "name": "Cat\u00e9gorie:English" + }, + { + "title": "\u00c9quipes", + "depth": 0, + "name": "Cat\u00e9gorie:\u00c9quipes" + }, + { + "title": "Conseil de gestion p\u00e9dagogique", + "depth": 1, + "parent": "\u00c9quipes", + "name": "Cat\u00e9gorie:Conseil de gestion p\u00e9dagogique" + }, + { + "title": "Conseil \u00e9tudiant", + "depth": 1, + "parent": "\u00c9quipes", + "name": "Cat\u00e9gorie:Conseil \u00e9tudiant" + }, + { + "title": "Enseignants", + "depth": 1, + "parent": "\u00c9quipes", + "name": "Cat\u00e9gorie:Enseignants" + }, + { + "title": "\u00c9quipe administrative", + "depth": 1, + "parent": "\u00c9quipes", + "name": "Cat\u00e9gorie:\u00c9quipe administrative" + }, + { + "title": "Essai paru en 1984", + "depth": 0, + "name": "Cat\u00e9gorie:Essai paru en 1984" + }, + { + "title": "\u00c9tudes de genre", + "depth": 0, + "name": "Cat\u00e9gorie:\u00c9tudes de genre" + }, + { + "title": "Index", + "depth": 0, + "name": "Cat\u00e9gorie:Index" + }, + { + "title": "International", + "depth": 0, + "name": "Cat\u00e9gorie:International" + }, + { + "title": "Les lieux de production et d'exp\u00e9rimentation", + "depth": 0, + "name": "Cat\u00e9gorie:Les lieux de production et d'exp\u00e9rimentation" + }, + { + "title": "Livre sur le f\u00e9minisme", + "depth": 0, + "name": "Cat\u00e9gorie:Livre sur le f\u00e9minisme" + }, + { + "title": "Masters", + "depth": 0, + "name": "Cat\u00e9gorie:Masters" + }, + { + "title": "Cours de soutien \u00e0 l'orientation", + "depth": 1, + "parent": "Masters", + "name": "Cat\u00e9gorie:Cours de soutien \u00e0 l'orientation" + }, + { + "title": "M1", + "depth": 1, + "parent": "Masters", + "name": "Cat\u00e9gorie:M1" + }, + { + "title": "M2", + "depth": 1, + "parent": "Masters", + "name": "Cat\u00e9gorie:M2" + }, + { + "title": "Masters sp\u00e9cialis\u00e9s", + "depth": 0, + "name": "Cat\u00e9gorie:Masters sp\u00e9cialis\u00e9s" + }, + { + "title": "Orientations", + "depth": 0, + "name": "Cat\u00e9gorie:Orientations" + }, + { + "title": "Outils collectifs", + "depth": 0, + "name": "Cat\u00e9gorie:Outils collectifs" + }, + { + "title": "Pages avec des erreurs de coloration syntaxique", + "depth": 0, + "name": "Cat\u00e9gorie:Pages avec des erreurs de coloration syntaxique" + }, + { + "title": "Pages avec des liens de fichiers bris\u00e9s", + "depth": 0, + "name": "Cat\u00e9gorie:Pages avec des liens de fichiers bris\u00e9s" + }, + { + "title": "Page web", + "depth": 1, + "parent": "Pages avec des liens de fichiers bris\u00e9s", + "name": "Cat\u00e9gorie:Page web" + }, + { + "title": "Pages d\u00e9passant la profondeur d'expansion maximale", + "depth": 0, + "name": "Cat\u00e9gorie:Pages d\u00e9passant la profondeur d'expansion maximale" + }, + { + "title": "Provenance web", + "depth": 0, + "name": "Cat\u00e9gorie:Provenance web" + }, + { + "title": "Selection", + "depth": 0, + "name": "Cat\u00e9gorie:Selection" + }, + { + "title": "Sites satellites", + "depth": 0, + "name": "Cat\u00e9gorie:Sites satellites" + }, + { + "title": "Sites sattelites", + "depth": 0, + "name": "Cat\u00e9gorie:Sites sattelites" + }, + { + "title": "Stages", + "depth": 0, + "name": "Cat\u00e9gorie:Stages" + }, + { + "title": "Wiki only", + "depth": 0, + "name": "Cat\u00e9gorie:Wiki only" + } +] diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..7e9a93b --- /dev/null +++ b/dist/index.js @@ -0,0 +1,788 @@ +var index = (function (exports) { + 'use strict'; + + if (typeof document !== "undefined") { + var element = document.documentElement; + } + + function tree_add(d) { + var x = +this._x.call(null, d), + y = +this._y.call(null, d); + return add(this.cover(x, y), x, y, d); + } + + function add(tree, x, y, d) { + if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points + + 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 the tree is empty, initialize the root as a leaf. + if (!node) return tree._root = leaf, tree; + + // Find the existing leaf for the new point, or add it. + while (node.length) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; + } + + // Is the new point is exactly coincident with the existing point? + xp = +tree._x.call(null, node.data); + yp = +tree._y.call(null, node.data); + if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; + + // Otherwise, split the leaf node until the old and new point are separated. + do { + parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (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, + x, + y, + xz = new Array(n), + yz = new Array(n), + x0 = Infinity, + y0 = Infinity, + x1 = -Infinity, + y1 = -Infinity; + + // Compute the points and their extent. + for (i = 0; i < n; ++i) { + if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; + xz[i] = x; + yz[i] = y; + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; + } + + // If there were no (valid) points, abort. + if (x0 > x1 || y0 > y1) return this; + + // Expand the tree to cover the new points. + this.cover(x0, y0).cover(x1, y1); + + // Add the new points. + for (i = 0; i < n; ++i) { + add(this, xz[i], yz[i], data[i]); + } + + return this; + } + + function tree_cover(x, y) { + if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + + var x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1; + + // If the quadtree has no extent, initialize them. + // Integer extent are necessary so that if we later double the extent, + // the existing quadrant boundaries don’t change due to floating point error! + if (isNaN(x0)) { + x1 = (x0 = Math.floor(x)) + 1; + y1 = (y0 = Math.floor(y)) + 1; + } + + // Otherwise, double repeatedly to cover. + else { + var z = x1 - x0, + node = this._root, + parent, + i; + + while (x0 > x || x >= x1 || y0 > y || y >= y1) { + i = (y < y0) << 1 | (x < 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; + } + + function tree_data() { + var data = []; + this.visit(function(node) { + if (!node.length) do data.push(node.data); while (node = node.next) + }); + return data; + } + + function tree_extent(_) { + return arguments.length + ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) + : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; + } + + function Quad(node, x0, y0, x1, y1) { + this.node = node; + this.x0 = x0; + this.y0 = y0; + this.x1 = x1; + this.y1 = y1; + } + + function tree_find(x, y, radius) { + var data, + x0 = this._x0, + y0 = this._y0, + x1, + y1, + x2, + y2, + x3 = this._x1, + y3 = this._y1, + quads = [], + node = this._root, + q, + i; + + if (node) quads.push(new Quad(node, x0, y0, x3, y3)); + if (radius == null) radius = Infinity; + else { + x0 = x - radius, y0 = y - radius; + x3 = x + radius, y3 = y + radius; + radius *= radius; + } + + while (q = quads.pop()) { + + // Stop searching if this quadrant can’t contain a closer node. + if (!(node = q.node) + || (x1 = q.x0) > x3 + || (y1 = q.y0) > y3 + || (x2 = q.x1) < x0 + || (y2 = q.y1) < y0) continue; + + // Bisect the current quadrant. + if (node.length) { + var xm = (x1 + x2) / 2, + ym = (y1 + y2) / 2; + + quads.push( + new Quad(node[3], xm, ym, x2, y2), + new Quad(node[2], x1, ym, xm, y2), + new Quad(node[1], xm, y1, x2, ym), + new Quad(node[0], x1, y1, xm, ym) + ); + + // Visit the closest quadrant first. + if (i = (y >= ym) << 1 | (x >= xm)) { + q = quads[quads.length - 1]; + quads[quads.length - 1] = quads[quads.length - 1 - i]; + quads[quads.length - 1 - i] = q; + } + } + + // Visit this point. (Visiting coincident points isn’t necessary!) + else { + var dx = x - +this._x.call(null, node.data), + dy = y - +this._y.call(null, node.data), + d2 = dx * dx + dy * dy; + if (d2 < radius) { + var d = Math.sqrt(radius = d2); + x0 = x - d, y0 = y - d; + x3 = x + d, y3 = y + d; + data = node.data; + } + } + } + + return data; + } + + function tree_remove(d) { + if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points + + var parent, + node = this._root, + retainer, + previous, + next, + x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1, + x, + y, + xm, + ym, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return this; + + // Find the leaf node for the point. + // While descending, also retain the deepest parent with a non-removed sibling. + if (node.length) while (true) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (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; + } + + // Find the point to remove. + while (node.data !== d) if (!(previous = node, node = node.next)) return this; + if (next = node.next) delete node.next; + + // If there are multiple coincident points, remove just the point. + if (previous) return (next ? previous.next = next : delete previous.next), this; + + // If this is the root point, remove it. + if (!parent) return this._root = next, this; + + // Remove this leaf. + next ? parent[i] = next : delete parent[i]; + + // If the parent now contains exactly one leaf, collapse superfluous parents. + 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; + } + + function tree_root() { + return this._root; + } + + function tree_size() { + var size = 0; + this.visit(function(node) { + if (!node.length) do ++size; while (node = node.next) + }); + return size; + } + + function tree_visit(callback) { + var quads = [], q, node = this._root, child, x0, y0, x1, y1; + if (node) quads.push(new Quad(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(child, xm, ym, x1, y1)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + } + } + return this; + } + + function tree_visitAfter(callback) { + var quads = [], next = [], q; + if (this._root) quads.push(new Quad(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(child, x0, y0, xm, ym)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[3]) quads.push(new Quad(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; + } + + function defaultX(d) { + return d[0]; + } + + function tree_x(_) { + return arguments.length ? (this._x = _, this) : this._x; + } + + function defaultY(d) { + return d[1]; + } + + function tree_y(_) { + return arguments.length ? (this._y = _, this) : this._y; + } + + function quadtree(nodes, x, y) { + var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); + return nodes == null ? tree : tree.addAll(nodes); + } + + function Quadtree(x, y, x0, y0, x1, y1) { + this._x = x; + this._y = y; + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + this._root = undefined; + } + + function leaf_copy(leaf) { + var copy = {data: leaf.data}, next = copy; + while (leaf = leaf.next) next = next.next = {data: leaf.data}; + return copy; + } + + var treeProto = quadtree.prototype = Quadtree.prototype; + + treeProto.copy = function() { + var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + node = this._root, + nodes, + child; + + if (!node) return copy; + + if (!node.length) return copy._root = leaf_copy(node), copy; + + nodes = [{source: node, target: copy._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 copy; + }; + + treeProto.add = tree_add; + treeProto.addAll = addAll; + treeProto.cover = tree_cover; + treeProto.data = tree_data; + treeProto.extent = tree_extent; + treeProto.find = tree_find; + treeProto.remove = tree_remove; + treeProto.removeAll = removeAll; + treeProto.root = tree_root; + treeProto.size = tree_size; + treeProto.visit = tree_visit; + treeProto.visitAfter = tree_visitAfter; + treeProto.x = tree_x; + treeProto.y = tree_y; + + var noop = {value: function() {}}; + + function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) 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: name}; + }); + } + + Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + 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 copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, 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(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } + }; + + function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } + } + + function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; + } + + var frame = 0, // is an animation frame pending? + timeout = 0, // is a timeout pending? + interval = 0, // are any timers active? + pokeDelay = 1000, // how frequently we check for clock skew + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance === "object" && performance.now ? performance : Date, + 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(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, 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 now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; + } + + 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; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; // Strictly less than if we recomputed 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); + } + } + + var initialRadius = 10, + initialAngle = Math.PI * (3 - Math.sqrt(5)); + + function forceSimulation(nodes) { + var simulation, + alpha = 1, + alphaMin = 0.001, + alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), + alphaTarget = 0, + velocityDecay = 0.6, + forces = new Map(), + stepper = timer(step), + event = dispatch("tick", "end"); + + 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 === undefined) 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(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); + return force; + } + + initializeNodes(); + + return simulation = { + tick: 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; + }, + + force: function(name, _) { + return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + }, + + find: function(x, y, 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 = x - node.x; + dy = y - 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); + } + }; + } + + // import { test } from './test.js'; + // console.log("in index.js", test); + // test(); + console.log("in index.js"); + // import * as fetchJsonp from 'fetch-jsonp'; + // import { jsonp } from 'jsonp'; + + var jsonp = require("jsonp"); + + console.log("force", forceSimulation); + console.log("fetchJsonp", fetchJsonp); + + + class Map$1 { + constructor (apiurl) { + this.apiurl = apiurl; + } + load (pagetitle) { + console.log("Map.load", pagetitle, this.apiurl); + jsonpP (this.apiurl).then(data => { + console.log("got data", data); + }).catch(err => { + console.log("ERROR", err); + }); + + } + } + + + + // http://erg.activearchives.org/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + // http://erg.activearchives.org/w/api.php?action=query&prop=info&titles=Main%20Page + // Bienvenue_à_l’erg + // http://erg.activearchives.org/mw/index.php/Bienvenue_%C3%A0_l%E2%80%99erg + + exports.Map = Map$1; + + return exports; + +}({})); diff --git a/dist/wikimap.js b/dist/wikimap.js new file mode 100644 index 0000000..7059709 --- /dev/null +++ b/dist/wikimap.js @@ -0,0 +1,3108 @@ +var wikimap = (function (exports) { + 'use strict'; + + var xhtml = "http://www.w3.org/1999/xhtml"; + + var namespaces = { + svg: "http://www.w3.org/2000/svg", + xhtml: xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" + }; + + function namespace(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); + return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; + } + + function creatorInherit(name) { + return function() { + var document = this.ownerDocument, + uri = this.namespaceURI; + return uri === xhtml && document.documentElement.namespaceURI === xhtml + ? document.createElement(name) + : document.createElementNS(uri, name); + }; + } + + function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; + } + + function creator(name) { + var fullname = namespace(name); + return (fullname.local + ? creatorFixed + : creatorInherit)(fullname); + } + + function none() {} + + function selector(selector) { + return selector == null ? none : function() { + return this.querySelector(selector); + }; + } + + function selection_select(select) { + if (typeof select !== "function") select = selector(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++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); + } + + function empty() { + return []; + } + + function selectorAll(selector) { + return selector == null ? empty : function() { + return this.querySelectorAll(selector); + }; + } + + function selection_selectAll(select) { + if (typeof select !== "function") select = selectorAll(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++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); + } + + function matcher(selector) { + return function() { + return this.matches(selector); + }; + } + + function selection_filter(match) { + if (typeof match !== "function") match = matcher(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++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); + } + + function sparse(update) { + return new Array(update.length); + } + + function selection_enter() { + return new Selection(this._enter || this._groups.map(sparse), this._parents); + } + + function EnterNode(parent, datum) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum; + } + + 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); } + }; + + function constant(x) { + return function() { + return x; + }; + } + + var keyPrefix = "$"; // Protect against keys like “__proto__”. + + function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, + node, + groupLength = group.length, + dataLength = data.length; + + // Put any non-null nodes that fit into update. + // Put any null nodes into enter. + // Put any remaining data into enter. + for (; i < dataLength; ++i) { + if (node = group[i]) { + node.__data__ = data[i]; + update[i] = node; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + + // Put any non-null nodes that don’t fit into exit. + for (; i < groupLength; ++i) { + if (node = group[i]) { + exit[i] = node; + } + } + } + + function bindKey(parent, group, enter, update, exit, data, key) { + var i, + node, + nodeByKeyValue = {}, + groupLength = group.length, + dataLength = data.length, + keyValues = new Array(groupLength), + keyValue; + + // Compute the key for each node. + // If multiple nodes have the same key, the duplicates are added to exit. + for (i = 0; i < groupLength; ++i) { + if (node = group[i]) { + keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[keyValue] = node; + } + } + } + + // Compute the key for each datum. + // If there a node associated with this key, join and add it to update. + // If there is not (or the key is a duplicate), add it to enter. + for (i = 0; i < dataLength; ++i) { + keyValue = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + + // Add any remaining nodes that were not bound to data to exit. + for (i = 0; i < groupLength; ++i) { + if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) { + exit[i] = node; + } + } + } + + function selection_data(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function(d) { data[++j] = d; }); + return data; + } + + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; + + if (typeof value !== "function") value = constant(value); + + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], + group = groups[j], + groupLength = group.length, + data = 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); + + // Now connect the enter nodes to their following update node, such that + // appendChild can insert the materialized enter node before this node, + // rather than at the end of the parent node. + 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 selection_exit() { + return new Selection(this._exit || this._groups.map(sparse), this._parents); + } + + function selection_join(onenter, onupdate, onexit) { + var enter = this.enter(), update = this, exit = this.exit(); + enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); + if (onupdate != null) update = onupdate(update); + if (onexit == null) exit.remove(); else onexit(exit); + return enter && update ? enter.merge(update).order() : update; + } + + function selection_merge(selection) { + + for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++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); + } + + function selection_order() { + + for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { + 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; + } + + function selection_sort(compare) { + if (!compare) compare = ascending; + + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++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 ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + + function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; + } + + function selection_nodes() { + var nodes = new Array(this.size()), i = -1; + this.each(function() { nodes[++i] = this; }); + return nodes; + } + + function selection_node() { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node = group[i]; + if (node) return node; + } + } + + return null; + } + + function selection_size() { + var size = 0; + this.each(function() { ++size; }); + return size; + } + + function selection_empty() { + return !this.node(); + } + + function selection_each(callback) { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++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; + } + + 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 selection_attr(name, value) { + var fullname = namespace(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)); + } + + function defaultView(node) { + return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node + || (node.document && node) // node is a Window + || node.defaultView; // node is a Document + } + + 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 selection_style(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) + || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); + } + + 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 selection_property(name, value) { + return arguments.length > 1 + ? this.each((value == null + ? propertyRemove : typeof value === "function" + ? propertyFunction + : propertyConstant)(name, value)) + : this.node()[name]; + } + + 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 selection_classed(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)); + } + + 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 selection_text(value) { + return arguments.length + ? this.each(value == null + ? textRemove : (typeof value === "function" + ? textFunction + : textConstant)(value)) + : this.node().textContent; + } + + 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 selection_html(value) { + return arguments.length + ? this.each(value == null + ? htmlRemove : (typeof value === "function" + ? htmlFunction + : htmlConstant)(value)) + : this.node().innerHTML; + } + + function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); + } + + function selection_raise() { + return this.each(raise); + } + + function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); + } + + function selection_lower() { + return this.each(lower); + } + + function selection_append(name) { + var create = typeof name === "function" ? name : creator(name); + return this.select(function() { + return this.appendChild(create.apply(this, arguments)); + }); + } + + function constantNull() { + return null; + } + + function selection_insert(name, before) { + var create = typeof name === "function" ? name : creator(name), + select = before == null ? constantNull : typeof before === "function" ? before : selector(before); + return this.select(function() { + return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); + }); + } + + function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); + } + + function selection_remove() { + return this.each(remove); + } + + function selection_cloneShallow() { + return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling); + } + + function selection_cloneDeep() { + return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling); + } + + function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); + } + + function selection_datum(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; + } + + var filterEvents = {}; + + var event = null; + + if (typeof document !== "undefined") { + var element = document.documentElement; + if (!("onmouseenter" in element)) { + filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; + } + } + + function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function(event) { + var related = event.relatedTarget; + if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { + listener.call(this, event); + } + }; + } + + function contextListener(listener, index, group) { + return function(event1) { + var event0 = event; // Events can be reentrant (e.g., focus). + event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + event = event0; + } + }; + } + + function parseTypenames(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: name}; + }); + } + + function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i; + else delete this.__on; + }; + } + + function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function(d, i, group) { + var on = this.__on, o, listener = wrap(value, i, group); + if (on) for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; + if (!on) this.__on = [o]; + else on.push(o); + }; + } + + function selection_on(typename, value, capture) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + + if (arguments.length < 2) { + var on = this.node().__on; + if (on) for (var j = 0, m = on.length, o; j < m; ++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; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; + } + + function customEvent(event1, listener, that, args) { + var event0 = event; + event1.sourceEvent = event; + event = event1; + try { + return listener.apply(that, args); + } finally { + event = event0; + } + } + + function dispatchEvent(node, type, params) { + var window = defaultView(node), + event = window.CustomEvent; + + if (typeof event === "function") { + event = new event(type, params); + } else { + event = window.document.createEvent("Event"); + if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; + else event.initEvent(type, false, false); + } + + node.dispatchEvent(event); + } + + function dispatchConstant(type, params) { + return function() { + return dispatchEvent(this, type, params); + }; + } + + function dispatchFunction(type, params) { + return function() { + return dispatchEvent(this, type, params.apply(this, arguments)); + }; + } + + function selection_dispatch(type, params) { + return this.each((typeof params === "function" + ? dispatchFunction + : dispatchConstant)(type, params)); + } + + var root = [null]; + + function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; + } + + function selection() { + return new Selection([[document.documentElement]], root); + } + + Selection.prototype = selection.prototype = { + constructor: Selection, + select: selection_select, + selectAll: selection_selectAll, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch + }; + + function select(selector) { + return typeof selector === "string" + ? new Selection([[document.querySelector(selector)]], [document.documentElement]) + : new Selection([[selector]], root); + } + + function sourceEvent() { + var current = event, source; + while (source = current.sourceEvent) current = source; + return current; + } + + function point(node, event) { + 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]; + } + + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; + } + + function mouse(node) { + var event = sourceEvent(); + if (event.changedTouches) event = event.changedTouches[0]; + return point(node, event); + } + + function touch(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches; + + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return point(node, touch); + } + } + + return null; + } + + var prefix = "$"; + + function Map$1() {} + + Map$1.prototype = map.prototype = { + constructor: Map$1, + has: function(key) { + return (prefix + key) in this; + }, + get: function(key) { + return this[prefix + key]; + }, + set: function(key, value) { + this[prefix + key] = value; + return this; + }, + remove: function(key) { + var property = prefix + key; + return property in this && delete this[property]; + }, + clear: function() { + for (var property in this) if (property[0] === prefix) delete this[property]; + }, + keys: function() { + var keys = []; + for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); + return keys; + }, + values: function() { + var values = []; + for (var property in this) if (property[0] === prefix) values.push(this[property]); + return values; + }, + entries: function() { + var entries = []; + for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); + return entries; + }, + size: function() { + var size = 0; + for (var property in this) if (property[0] === prefix) ++size; + return size; + }, + empty: function() { + for (var property in this) if (property[0] === prefix) return false; + return true; + }, + each: function(f) { + for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); + } + }; + + function map(object, f) { + var map = new Map$1; + + // Copy constructor. + if (object instanceof Map$1) object.each(function(value, key) { map.set(key, value); }); + + // Index array by numeric index or specified key function. + else if (Array.isArray(object)) { + var i = -1, + n = object.length, + o; + + if (f == null) while (++i < n) map.set(i, object[i]); + else while (++i < n) map.set(f(o = object[i], i, object), o); + } + + // Convert object to map. + else if (object) for (var key in object) map.set(key, object[key]); + + return map; + } + + function Set() {} + + var proto = map.prototype; + + Set.prototype = set.prototype = { + constructor: Set, + has: proto.has, + add: function(value) { + value += ""; + this[prefix + value] = value; + return this; + }, + remove: proto.remove, + clear: proto.clear, + values: proto.keys, + size: proto.size, + empty: proto.empty, + each: proto.each + }; + + function set(object, f) { + var set = new Set; + + // Copy constructor. + if (object instanceof Set) object.each(function(value) { set.add(value); }); + + // Otherwise, assume it’s an array. + else if (object) { + var i = -1, n = object.length; + if (f == null) while (++i < n) set.add(object[i]); + else while (++i < n) set.add(f(object[i], i, object)); + } + + return set; + } + + function values(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; + } + + var noop = {value: function() {}}; + + function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); + } + + function Dispatch(_) { + this._ = _; + } + + function parseTypenames$1(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: name}; + }); + } + + Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames$1(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, 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(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } + }; + + function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } + } + + function set$1(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; + } + + function nopropagation() { + event.stopImmediatePropagation(); + } + + function noevent() { + event.preventDefault(); + event.stopImmediatePropagation(); + } + + function nodrag(view) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", noevent, true); + if ("onselectstart" in root) { + selection.on("selectstart.drag", noevent, true); + } else { + root.__noselect = root.style.MozUserSelect; + root.style.MozUserSelect = "none"; + } + } + + function yesdrag(view, noclick) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", null); + if (noclick) { + selection.on("click.drag", noevent, true); + setTimeout(function() { selection.on("click.drag", null); }, 0); + } + if ("onselectstart" in root) { + selection.on("selectstart.drag", null); + } else { + root.style.MozUserSelect = root.__noselect; + delete root.__noselect; + } + } + + function constant$1(x) { + return function() { + return x; + }; + } + + function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { + this.target = target; + this.type = type; + this.subject = subject; + this.identifier = id; + this.active = active; + this.x = x; + this.y = y; + this.dx = dx; + this.dy = dy; + this._ = dispatch; + } + + DragEvent.prototype.on = function() { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; + }; + + // Ignore right-click, since that should open the context menu. + function defaultFilter() { + return !event.button; + } + + function defaultContainer() { + return this.parentNode; + } + + function defaultSubject(d) { + return d == null ? {x: event.x, y: event.y} : d; + } + + function defaultTouchable() { + return "ontouchstart" in this; + } + + function drag() { + var filter = defaultFilter, + container = defaultContainer, + subject = defaultSubject, + touchable = defaultTouchable, + gestures = {}, + listeners = dispatch("start", "drag", "end"), + active = 0, + mousedownx, + mousedowny, + mousemoving, + touchending, + clickDistance2 = 0; + + function drag(selection) { + selection + .on("mousedown.drag", mousedowned) + .filter(touchable) + .on("touchstart.drag", touchstarted) + .on("touchmove.drag", touchmoved) + .on("touchend.drag touchcancel.drag", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var gesture = beforestart("mouse", container.apply(this, arguments), mouse, this, arguments); + if (!gesture) return; + select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); + nodrag(event.view); + nopropagation(); + mousemoving = false; + mousedownx = event.clientX; + mousedowny = event.clientY; + gesture("start"); + } + + function mousemoved() { + noevent(); + if (!mousemoving) { + var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag"); + } + + function mouseupped() { + select(event.view).on("mousemove.drag mouseup.drag", null); + yesdrag(event.view, mousemoving); + noevent(); + gestures.mouse("end"); + } + + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = event.changedTouches, + c = container.apply(this, arguments), + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) { + nopropagation(); + gesture("start"); + } + } + } + + function touchmoved() { + var touches = event.changedTouches, + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + noevent(); + gesture("drag"); + } + } + } + + function touchended() { + var touches = event.changedTouches, + n = touches.length, i, gesture; + + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + nopropagation(); + gesture("end"); + } + } + } + + function beforestart(id, container, point, that, args) { + var p = point(container, id), s, dx, dy, + sublisteners = listeners.copy(); + + if (!customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() { + if ((event.subject = s = subject.apply(that, args)) == null) return false; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return true; + })) return; + + return function gesture(type) { + var p0 = p, n; + switch (type) { + case "start": gestures[id] = gesture, n = active++; break; + case "end": delete gestures[id], --active; // nobreak + case "drag": p = point(container, id), n = active; break; + } + customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + }; + } + + drag.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant$1(!!_), drag) : filter; + }; + + drag.container = function(_) { + return arguments.length ? (container = typeof _ === "function" ? _ : constant$1(_), drag) : container; + }; + + drag.subject = function(_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : constant$1(_), drag) : subject; + }; + + drag.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$1(!!_), 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; + } + + function tree_add(d) { + var x = +this._x.call(null, d), + y = +this._y.call(null, d); + return add(this.cover(x, y), x, y, d); + } + + function add(tree, x, y, d) { + if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points + + 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 the tree is empty, initialize the root as a leaf. + if (!node) return tree._root = leaf, tree; + + // Find the existing leaf for the new point, or add it. + while (node.length) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; + } + + // Is the new point is exactly coincident with the existing point? + xp = +tree._x.call(null, node.data); + yp = +tree._y.call(null, node.data); + if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; + + // Otherwise, split the leaf node until the old and new point are separated. + do { + parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (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, + x, + y, + xz = new Array(n), + yz = new Array(n), + x0 = Infinity, + y0 = Infinity, + x1 = -Infinity, + y1 = -Infinity; + + // Compute the points and their extent. + for (i = 0; i < n; ++i) { + if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; + xz[i] = x; + yz[i] = y; + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; + } + + // If there were no (valid) points, abort. + if (x0 > x1 || y0 > y1) return this; + + // Expand the tree to cover the new points. + this.cover(x0, y0).cover(x1, y1); + + // Add the new points. + for (i = 0; i < n; ++i) { + add(this, xz[i], yz[i], data[i]); + } + + return this; + } + + function tree_cover(x, y) { + if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + + var x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1; + + // If the quadtree has no extent, initialize them. + // Integer extent are necessary so that if we later double the extent, + // the existing quadrant boundaries don’t change due to floating point error! + if (isNaN(x0)) { + x1 = (x0 = Math.floor(x)) + 1; + y1 = (y0 = Math.floor(y)) + 1; + } + + // Otherwise, double repeatedly to cover. + else { + var z = x1 - x0, + node = this._root, + parent, + i; + + while (x0 > x || x >= x1 || y0 > y || y >= y1) { + i = (y < y0) << 1 | (x < 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; + } + + function tree_data() { + var data = []; + this.visit(function(node) { + if (!node.length) do data.push(node.data); while (node = node.next) + }); + return data; + } + + function tree_extent(_) { + return arguments.length + ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) + : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; + } + + function Quad(node, x0, y0, x1, y1) { + this.node = node; + this.x0 = x0; + this.y0 = y0; + this.x1 = x1; + this.y1 = y1; + } + + function tree_find(x, y, radius) { + var data, + x0 = this._x0, + y0 = this._y0, + x1, + y1, + x2, + y2, + x3 = this._x1, + y3 = this._y1, + quads = [], + node = this._root, + q, + i; + + if (node) quads.push(new Quad(node, x0, y0, x3, y3)); + if (radius == null) radius = Infinity; + else { + x0 = x - radius, y0 = y - radius; + x3 = x + radius, y3 = y + radius; + radius *= radius; + } + + while (q = quads.pop()) { + + // Stop searching if this quadrant can’t contain a closer node. + if (!(node = q.node) + || (x1 = q.x0) > x3 + || (y1 = q.y0) > y3 + || (x2 = q.x1) < x0 + || (y2 = q.y1) < y0) continue; + + // Bisect the current quadrant. + if (node.length) { + var xm = (x1 + x2) / 2, + ym = (y1 + y2) / 2; + + quads.push( + new Quad(node[3], xm, ym, x2, y2), + new Quad(node[2], x1, ym, xm, y2), + new Quad(node[1], xm, y1, x2, ym), + new Quad(node[0], x1, y1, xm, ym) + ); + + // Visit the closest quadrant first. + if (i = (y >= ym) << 1 | (x >= xm)) { + q = quads[quads.length - 1]; + quads[quads.length - 1] = quads[quads.length - 1 - i]; + quads[quads.length - 1 - i] = q; + } + } + + // Visit this point. (Visiting coincident points isn’t necessary!) + else { + var dx = x - +this._x.call(null, node.data), + dy = y - +this._y.call(null, node.data), + d2 = dx * dx + dy * dy; + if (d2 < radius) { + var d = Math.sqrt(radius = d2); + x0 = x - d, y0 = y - d; + x3 = x + d, y3 = y + d; + data = node.data; + } + } + } + + return data; + } + + function tree_remove(d) { + if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points + + var parent, + node = this._root, + retainer, + previous, + next, + x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1, + x, + y, + xm, + ym, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return this; + + // Find the leaf node for the point. + // While descending, also retain the deepest parent with a non-removed sibling. + if (node.length) while (true) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (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; + } + + // Find the point to remove. + while (node.data !== d) if (!(previous = node, node = node.next)) return this; + if (next = node.next) delete node.next; + + // If there are multiple coincident points, remove just the point. + if (previous) return (next ? previous.next = next : delete previous.next), this; + + // If this is the root point, remove it. + if (!parent) return this._root = next, this; + + // Remove this leaf. + next ? parent[i] = next : delete parent[i]; + + // If the parent now contains exactly one leaf, collapse superfluous parents. + 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; + } + + function tree_root() { + return this._root; + } + + function tree_size() { + var size = 0; + this.visit(function(node) { + if (!node.length) do ++size; while (node = node.next) + }); + return size; + } + + function tree_visit(callback) { + var quads = [], q, node = this._root, child, x0, y0, x1, y1; + if (node) quads.push(new Quad(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(child, xm, ym, x1, y1)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + } + } + return this; + } + + function tree_visitAfter(callback) { + var quads = [], next = [], q; + if (this._root) quads.push(new Quad(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(child, x0, y0, xm, ym)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[3]) quads.push(new Quad(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; + } + + function defaultX(d) { + return d[0]; + } + + function tree_x(_) { + return arguments.length ? (this._x = _, this) : this._x; + } + + function defaultY(d) { + return d[1]; + } + + function tree_y(_) { + return arguments.length ? (this._y = _, this) : this._y; + } + + function quadtree(nodes, x, y) { + var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); + return nodes == null ? tree : tree.addAll(nodes); + } + + function Quadtree(x, y, x0, y0, x1, y1) { + this._x = x; + this._y = y; + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + this._root = undefined; + } + + function leaf_copy(leaf) { + var copy = {data: leaf.data}, next = copy; + while (leaf = leaf.next) next = next.next = {data: leaf.data}; + return copy; + } + + var treeProto = quadtree.prototype = Quadtree.prototype; + + treeProto.copy = function() { + var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + node = this._root, + nodes, + child; + + if (!node) return copy; + + if (!node.length) return copy._root = leaf_copy(node), copy; + + nodes = [{source: node, target: copy._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 copy; + }; + + treeProto.add = tree_add; + treeProto.addAll = addAll; + treeProto.cover = tree_cover; + treeProto.data = tree_data; + treeProto.extent = tree_extent; + treeProto.find = tree_find; + treeProto.remove = tree_remove; + treeProto.removeAll = removeAll; + treeProto.root = tree_root; + treeProto.size = tree_size; + treeProto.visit = tree_visit; + treeProto.visitAfter = tree_visitAfter; + treeProto.x = tree_x; + treeProto.y = tree_y; + + function constant$2(x) { + return function() { + return x; + }; + } + + function jiggle() { + return (Math.random() - 0.5) * 1e-6; + } + + function index(d) { + return d.index; + } + + function find(nodeById, nodeId) { + var node = nodeById.get(nodeId); + if (!node) throw new Error("missing: " + nodeId); + return node; + } + + function forceLink(links) { + var id = index, + strength = defaultStrength, + strengths, + distance = constant$2(30), + distances, + nodes, + count, + bias, + 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, x, y, l, b; i < n; ++i) { + link = links[i], source = link.source, target = link.target; + x = target.x + target.vx - source.x - source.vx || jiggle(); + y = target.y + target.vy - source.y - source.vy || jiggle(); + l = Math.sqrt(x * x + y * y); + l = (l - distances[i]) / l * alpha * strengths[i]; + x *= l, y *= l; + target.vx -= x * (b = bias[i]); + target.vy -= y * b; + source.vx += x * (b = 1 - b); + source.vy += y * b; + } + } + } + + function initialize() { + if (!nodes) return; + + var i, + n = nodes.length, + m = links.length, + nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), + link; + + for (i = 0, count = new Array(n); i < m; ++i) { + link = links[i], link.index = i; + if (typeof link.source !== "object") link.source = find(nodeById, link.source); + if (typeof link.target !== "object") link.target = find(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(m); i < m; ++i) { + link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + } + + strengths = new Array(m), initializeStrength(); + distances = new Array(m), 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 = _; + initialize(); + }; + + force.links = function(_) { + return arguments.length ? (links = _, initialize(), force) : links; + }; + + force.id = function(_) { + return arguments.length ? (id = _, force) : id; + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant$2(+_), initializeStrength(), force) : strength; + }; + + force.distance = function(_) { + return arguments.length ? (distance = typeof _ === "function" ? _ : constant$2(+_), initializeDistance(), force) : distance; + }; + + return force; + } + + var frame = 0, // is an animation frame pending? + timeout = 0, // is a timeout pending? + interval = 0, // are any timers active? + pokeDelay = 1000, // how frequently we check for clock skew + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance === "object" && performance.now ? performance : Date, + 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(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, 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 now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; + } + + 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; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; // Strictly less than if we recomputed 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); + } + } + + function x(d) { + return d.x; + } + + function y(d) { + return d.y; + } + + var initialRadius = 10, + initialAngle = Math.PI * (3 - Math.sqrt(5)); + + function forceSimulation(nodes) { + var simulation, + alpha = 1, + alphaMin = 0.001, + alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), + alphaTarget = 0, + velocityDecay = 0.6, + forces = new Map(), + stepper = timer(step), + event = dispatch("tick", "end"); + + 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 === undefined) 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(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); + return force; + } + + initializeNodes(); + + return simulation = { + tick: 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; + }, + + force: function(name, _) { + return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + }, + + find: function(x, y, 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 = x - node.x; + dy = y - 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); + } + }; + } + + function forceManyBody() { + var nodes, + node, + alpha, + strength = constant$2(-30), + strengths, + distanceMin2 = 1, + distanceMax2 = Infinity, + theta2 = 0.81; + + function force(_) { + var i, n = nodes.length, tree = quadtree(nodes, x, y).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, node; + strengths = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + } + + function accumulate(quad) { + var strength = 0, q, c, weight = 0, x, y, i; + + // For internal nodes, accumulate forces from child quadrants. + if (quad.length) { + for (x = y = i = 0; i < 4; ++i) { + if ((q = quad[i]) && (c = Math.abs(q.value))) { + strength += q.value, weight += c, x += c * q.x, y += c * q.y; + } + } + quad.x = x / weight; + quad.y = y / weight; + } + + // For leaf nodes, accumulate forces from coincident quadrants. + else { + q = quad; + q.x = q.data.x; + q.y = q.data.y; + do strength += strengths[q.data.index]; + while (q = q.next); + } + + quad.value = strength; + } + + function apply(quad, x1, _, x2) { + if (!quad.value) return true; + + var x = quad.x - node.x, + y = quad.y - node.y, + w = x2 - x1, + l = x * x + y * y; + + // Apply the Barnes-Hut approximation if possible. + // Limit forces for very close nodes; randomize direction if coincident. + if (w * w / theta2 < l) { + if (l < distanceMax2) { + if (x === 0) x = jiggle(), l += x * x; + if (y === 0) y = jiggle(), l += y * y; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + node.vx += x * quad.value * alpha / l; + node.vy += y * quad.value * alpha / l; + } + return true; + } + + // Otherwise, process points directly. + else if (quad.length || l >= distanceMax2) return; + + // Limit forces for very close nodes; randomize direction if coincident. + if (quad.data !== node || quad.next) { + if (x === 0) x = jiggle(), l += x * x; + if (y === 0) y = jiggle(), l += y * y; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + } + + do if (quad.data !== node) { + w = strengths[quad.data.index] * alpha / l; + node.vx += x * w; + node.vy += y * w; + } while (quad = quad.next); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant$2(+_), 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; + } + + function forceRadial(radius, x, y) { + var nodes, + strength = constant$2(0.1), + strengths, + radiuses; + + if (typeof radius !== "function") radius = constant$2(+radius); + if (x == null) x = 0; + if (y == null) y = 0; + + function force(alpha) { + for (var i = 0, n = nodes.length; i < n; ++i) { + var node = nodes[i], + dx = node.x - x || 1e-6, + dy = node.y - y || 1e-6, + r = Math.sqrt(dx * dx + dy * dy), + k = (radiuses[i] - r) * strengths[i] * alpha / r; + node.vx += dx * k; + node.vy += dy * k; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + radiuses = new Array(n); + for (i = 0; i < n; ++i) { + radiuses[i] = +radius(nodes[i], i, nodes); + strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _, initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant$2(+_), initialize(), force) : strength; + }; + + force.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : constant$2(+_), initialize(), force) : radius; + }; + + force.x = function(_) { + return arguments.length ? (x = +_, force) : x; + }; + + force.y = function(_) { + return arguments.length ? (y = +_, force) : y; + }; + + return force; + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var fetchJsonp = createCommonjsModule(function (module, exports) { + (function (global, factory) { + { + factory(exports, module); + } + })(commonjsGlobal, function (exports, module) { + + var defaultOptions = { + timeout: 5000, + jsonpCallback: 'callback', + jsonpCallbackFunction: null + }; + + function generateCallbackFunction() { + return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000); + } + + function clearFunction(functionName) { + // IE8 throws an exception when you try to delete a property on window + // http://stackoverflow.com/a/1824228/751089 + try { + delete window[functionName]; + } catch (e) { + window[functionName] = undefined; + } + } + + function removeScript(scriptId) { + var script = document.getElementById(scriptId); + if (script) { + document.getElementsByTagName('head')[0].removeChild(script); + } + } + + function fetchJsonp(_url) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // to avoid param reassign + var url = _url; + var timeout = options.timeout || defaultOptions.timeout; + var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback; + + var timeoutId = undefined; + + return new Promise(function (resolve, reject) { + var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction(); + var scriptId = jsonpCallback + '_' + callbackFunction; + + window[callbackFunction] = function (response) { + resolve({ + ok: true, + // keep consistent with fetch API + json: function json() { + return Promise.resolve(response); + } + }); + + if (timeoutId) clearTimeout(timeoutId); + + removeScript(scriptId); + + clearFunction(callbackFunction); + }; + + // Check if the user set their own params, and if not add a ? to start a list of params + url += url.indexOf('?') === -1 ? '?' : '&'; + + var jsonpScript = document.createElement('script'); + jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction); + if (options.charset) { + jsonpScript.setAttribute('charset', options.charset); + } + jsonpScript.id = scriptId; + document.getElementsByTagName('head')[0].appendChild(jsonpScript); + + timeoutId = setTimeout(function () { + reject(new Error('JSONP request to ' + _url + ' timed out')); + + clearFunction(callbackFunction); + removeScript(scriptId); + window[callbackFunction] = function () { + clearFunction(callbackFunction); + }; + }, timeout); + + // Caught if got 404/500 + jsonpScript.onerror = function () { + reject(new Error('JSONP request to ' + _url + ' failed')); + + clearFunction(callbackFunction); + removeScript(scriptId); + if (timeoutId) clearTimeout(timeoutId); + }; + }); + } + + // export as global function + /* + let local; + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + local.fetchJsonp = fetchJsonp; + */ + + module.exports = fetchJsonp; + }); + }); + + var NS = { + main: 0, + discussion: 1, + template: 10, + category: 14, + news: 3106, + web: 3116 + }; + + class Wiki { + constructor (apiurl) { + this.apiurl = apiurl; + this.pages_by_title = {}; + this.ns_names = {}; + for (var key in NS) { + var nsid = NS[key]; + this.ns_names[nsid] = key; + } + } + get_page_by_title (title) { + var p = this.pages_by_title[title]; + if (p) { + return p; + } else { + p = new Page(this, {title: title, ns: 0}); + this.pages_by_title[title] = p; + return p; + } + } + page_for_object (n, merge_data) { + if (merge_data === undefined) { merge_data = true; } + var title = n.title, + p = this.pages_by_title[title]; + if (p) { + if (merge_data) { p.merge_data(n); } + return p; + } else { + p = new Page(this, n); + this.pages_by_title[title] = p; + return p; + } + } + get_ns_classname (nsid) { + // console.log("get_ns_classname", nsid, this.ns_names[nsid]); + var ret = this.ns_names[nsid]; + console.log("classname", ret); + if (ret === undefined) { console.log("warning classname undefined for ns", nsid); } + return ret; + } + union (p1, p2) { + var union = map(p1, d=>d.title); + for (var i=0, l=p2.length; i this.wiki.page_for_object(x)); + // console.log("get_backlinks", ret); + console.log("get_prop", pname, prefix, ret); + return ret; + } + async get_links () { + return await this.get_prop("links", "pl"); + // // http://localhost/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + // var ret = []; + // var url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&prop=links&titles="+encodeURIComponent(this.title); + // while (true) { + // var data = await fetchJsonp(url); + // var json = await data.json(); + // // console.log("JSON", json); + // if (json.query.pages[0]) { + // var p = json.query.pages[0]; + // // extract any missing page info + // if (p.ns && !this.ns) { this.ns = p.ns; } + // if (p.pageid && !this.pageid) { this.pageid = p.pageid; } + // } + // if (json.query.pages[0].links) { + // ret.push.apply(ret, json.query.pages[0].links); + // } + // if (!json.continue) { break; } + // url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&prop=links&plcontinue="+json.continue.plcontinue+"&titles="+encodeURIComponent(this.title); + // } + // ret = ret.map(x => this.wiki.page_for_object(x)); + // // map these to page objects + // return ret; + } + async get_linkshere () { + return await this.get_prop("linkshere", "lh"); + } + async get_list () { + // http://localhost/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + var ret = []; + var url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&list=backlinks&bltitle="+encodeURIComponent(this.title); + while (true) { + var data = await fetchJsonp(url); + var json = await data.json(); + // console.log("BACKLINKS.RAW", json); + // filter REDIRECTS + Discussion pages (ns==1) + var backlinks = json.query.backlinks; + // backlink = backlinks.filter(x => (!x.redirect && x.ns != 1); + ret.push.apply(ret, backlinks); + if (!json.continue) { break; } + url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&list=backlinks&blcontinue="+json.continue.blcontinue+"&bltitle="+encodeURIComponent(this.title); + } + ret = ret.map(x => this.wiki.page_for_object(x)); + // console.log("get_backlinks", ret); + return ret; + } + } + + var eventemitter3 = createCommonjsModule(function (module) { + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ + function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; + } + + /** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; + }; + + /** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); + }; + + /** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); + }; + + /** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + { + module.exports = EventEmitter; + } + }); + + class Map$2 { + + constructor (apiurl) { + var width = 600, + height = 600; + this.wiki = new Wiki(apiurl); + this.events = new eventemitter3(); + this.active_page = null; + // this.nodes = {}; + this.simulation = forceSimulation() + .velocityDecay(0.1) + .force("link", forceLink().id(d => d.title)) + .force("charge", forceManyBody()) + .force("radial", forceRadial(180, width/2, height/2)); + // .force("center", forceCenter(width / 2, height / 2)); + this.svg = null; + this.historylinks = {}; + } + + on (message, callback, context) { + this.events.on(message, callback, context); + } + + init_svg (svg) { + this.svg = select(svg || "svg"); + this.linksg = this.svg.append("g") + .attr("class", "links"); + this.nodesg = this.svg.append("g") + .attr("class", "nodes"); + } + + dragstarted (d) { + if (!event.active) this.simulation.alphaTarget(0.3).restart(); + d.fx = d.x; + d.fy = d.y; + } + + dragged (d) { + d.fx = event.x; + d.fy = event.y; + } + + dragended(d) { + if (!event.active) this.simulation.alphaTarget(0); + d.fx = null; + d.fy = null; + } + + update_graph (graph) { + // console.log("UPDATE GRAPH", graph.nodes.length, graph.links.length); + var that = this, + link = this.linksg.selectAll("line") + .data(graph.links, function (d) { return that.link_key(d.source.title, d.target.title) }); + var link_enter = link.enter() + .append("line"); + + link.exit().each(d => { + d.source.linked = false; + d.target.linked = false; + }).remove(); + + link_enter.merge(link).each(d => { + d.source.linked = true; + d.target.linked = true; + }); + + var node = this.nodesg + .selectAll("g.page") + .data(graph.nodes, function (d) { return d.title }); + + var node_enter = node.enter().append("g") + .attr("class", d=>"page "+this.wiki.get_ns_classname(d.ns)) + .on("click", d => { + this.set_active_node(d.title); + }) + .on("mouseover", function (d) { + // console.log("mouseover", this); + select(this).classed("mouse", true); + }) + .on("mouseout", function (d) { + // console.log("mouseout", this); + select(this).classed("mouse", false); + }) + .call(drag() + .on("start", this.dragstarted.bind(this)) + .on("drag", this.dragged.bind(this)) + .on("end", this.dragended.bind(this))); + + node_enter.append("circle") + .attr("r", 6); + + node_enter.append("text") + .text(d => d.title) + .attr("x", 10); + + //node_enter.append("title") + // .text(function(d) { return d.title; }); + + node = node_enter.merge(node); + link = link_enter.merge(link); + + node.classed("active", d=>d.active); + + this.simulation + .nodes(graph.nodes) + .on("tick", ticked); + + this.simulation.force("link") + .links(graph.links); + + this.simulation.force("radial").radius(d => d.linked ? null : 200); + + function ticked() { + link + .attr("x1", function(d) { return d.source.x; }) + .attr("y1", function(d) { return d.source.y; }) + .attr("x2", function(d) { return d.target.x; }) + .attr("y2", function(d) { return d.target.y; }); + + // node + // .attr("cx", function(d) { return d.x; }) + // .attr("cy", function(d) { return d.y; }); + node + .attr("transform", d => `translate(${d.x},${d.y})`); + } + this.simulation.alphaTarget(0.3).restart(); + } + + link_key (a, b) { + return (a < b) ? ("link_"+a+"_"+b) : ("link_"+b+"_"+a); + } + + walk (node, links) { + var links_seen = {}; + // var node = this.ensure_node(nodename); + node.all_links.forEach(x => { + var link_key = this.link_key(node.title, x.title); + if (!links_seen[link_key]) { + links.push({source: node, target: x}); + links_seen[link_key] = true; + } + }); + return; + } + + set_active_title (title) { + this.set_active_node(title); + } + + async set_active_node (page) { + if (typeof(page) === "string") { + page = this.wiki.get_page_by_title(page); + } + + if (page === this.active_page) { + // console.log("page is already the active page", page, this.active_page); + return; + } + if (this.active_page) { + this.active_page.active = false; + var lkey = this.link_key(this.active_page.title, page.title), + source = (this.active_page.title < page.title) ? this.active_page : page, + target = (this.active_page.title < page.title) ? page : this.active_page; + this.historylinks[lkey] = {source: source, target: target}; + } + // n = this.ensure_node(pagetitle); + + this.active_page = page; + this.active_page.active = true; + this.load(this.active_page); + this.events.emit("page", this.active_page.title); + } + + async load (page) { + console.log("loading", page.title); + var links = await page.get_links(), + backlinks = await page.get_linkshere(), + alllinks = this.wiki.union(links, backlinks); + + page.all_links = alllinks; + // console.log("alllinks", alllinks); + var graph = {}; + + graph.nodes = values(this.wiki.pages_by_title); + graph.links = []; + this.walk(page, graph.links); + // activate historylinks + values(this.historylinks).forEach(x => { + graph.links.push(x); + }); + // graph.links = titles.map(t => ({source: pagetitle, target: t})); + this.update_graph(graph); + // console.log("GOT DATA", titles); + // return titles; + } + } + + + + // http://erg.activearchives.org/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + // http://erg.activearchives.org/w/api.php?action=query&prop=info&titles=Main%20Page + // Bienvenue_à_l’erg + // http://erg.activearchives.org/mw/index.php/Bienvenue_%C3%A0_l%E2%80%99erg + + exports.Map = Map$2; + + return exports; + +}({})); diff --git a/dist/wikimaptotal.js b/dist/wikimaptotal.js new file mode 100644 index 0000000..9f0d502 --- /dev/null +++ b/dist/wikimaptotal.js @@ -0,0 +1,5550 @@ +var wikimap = (function (exports) { + 'use strict'; + + var xhtml = "http://www.w3.org/1999/xhtml"; + + var namespaces = { + svg: "http://www.w3.org/2000/svg", + xhtml: xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" + }; + + function namespace(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); + return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; + } + + function creatorInherit(name) { + return function() { + var document = this.ownerDocument, + uri = this.namespaceURI; + return uri === xhtml && document.documentElement.namespaceURI === xhtml + ? document.createElement(name) + : document.createElementNS(uri, name); + }; + } + + function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; + } + + function creator(name) { + var fullname = namespace(name); + return (fullname.local + ? creatorFixed + : creatorInherit)(fullname); + } + + function none() {} + + function selector(selector) { + return selector == null ? none : function() { + return this.querySelector(selector); + }; + } + + function selection_select(select) { + if (typeof select !== "function") select = selector(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++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); + } + + function empty() { + return []; + } + + function selectorAll(selector) { + return selector == null ? empty : function() { + return this.querySelectorAll(selector); + }; + } + + function selection_selectAll(select) { + if (typeof select !== "function") select = selectorAll(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++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); + } + + function matcher(selector) { + return function() { + return this.matches(selector); + }; + } + + function selection_filter(match) { + if (typeof match !== "function") match = matcher(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++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); + } + + function sparse(update) { + return new Array(update.length); + } + + function selection_enter() { + return new Selection(this._enter || this._groups.map(sparse), this._parents); + } + + function EnterNode(parent, datum) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum; + } + + 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); } + }; + + function constant(x) { + return function() { + return x; + }; + } + + var keyPrefix = "$"; // Protect against keys like “__proto__”. + + function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, + node, + groupLength = group.length, + dataLength = data.length; + + // Put any non-null nodes that fit into update. + // Put any null nodes into enter. + // Put any remaining data into enter. + for (; i < dataLength; ++i) { + if (node = group[i]) { + node.__data__ = data[i]; + update[i] = node; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + + // Put any non-null nodes that don’t fit into exit. + for (; i < groupLength; ++i) { + if (node = group[i]) { + exit[i] = node; + } + } + } + + function bindKey(parent, group, enter, update, exit, data, key) { + var i, + node, + nodeByKeyValue = {}, + groupLength = group.length, + dataLength = data.length, + keyValues = new Array(groupLength), + keyValue; + + // Compute the key for each node. + // If multiple nodes have the same key, the duplicates are added to exit. + for (i = 0; i < groupLength; ++i) { + if (node = group[i]) { + keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[keyValue] = node; + } + } + } + + // Compute the key for each datum. + // If there a node associated with this key, join and add it to update. + // If there is not (or the key is a duplicate), add it to enter. + for (i = 0; i < dataLength; ++i) { + keyValue = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + + // Add any remaining nodes that were not bound to data to exit. + for (i = 0; i < groupLength; ++i) { + if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) { + exit[i] = node; + } + } + } + + function selection_data(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function(d) { data[++j] = d; }); + return data; + } + + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; + + if (typeof value !== "function") value = constant(value); + + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], + group = groups[j], + groupLength = group.length, + data = 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); + + // Now connect the enter nodes to their following update node, such that + // appendChild can insert the materialized enter node before this node, + // rather than at the end of the parent node. + 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 selection_exit() { + return new Selection(this._exit || this._groups.map(sparse), this._parents); + } + + function selection_join(onenter, onupdate, onexit) { + var enter = this.enter(), update = this, exit = this.exit(); + enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); + if (onupdate != null) update = onupdate(update); + if (onexit == null) exit.remove(); else onexit(exit); + return enter && update ? enter.merge(update).order() : update; + } + + function selection_merge(selection) { + + for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++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); + } + + function selection_order() { + + for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { + 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; + } + + function selection_sort(compare) { + if (!compare) compare = ascending; + + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++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 ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + + function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; + } + + function selection_nodes() { + var nodes = new Array(this.size()), i = -1; + this.each(function() { nodes[++i] = this; }); + return nodes; + } + + function selection_node() { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node = group[i]; + if (node) return node; + } + } + + return null; + } + + function selection_size() { + var size = 0; + this.each(function() { ++size; }); + return size; + } + + function selection_empty() { + return !this.node(); + } + + function selection_each(callback) { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++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; + } + + 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 selection_attr(name, value) { + var fullname = namespace(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)); + } + + function defaultView(node) { + return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node + || (node.document && node) // node is a Window + || node.defaultView; // node is a Document + } + + 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 selection_style(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) + || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); + } + + 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 selection_property(name, value) { + return arguments.length > 1 + ? this.each((value == null + ? propertyRemove : typeof value === "function" + ? propertyFunction + : propertyConstant)(name, value)) + : this.node()[name]; + } + + 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 selection_classed(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)); + } + + 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 selection_text(value) { + return arguments.length + ? this.each(value == null + ? textRemove : (typeof value === "function" + ? textFunction + : textConstant)(value)) + : this.node().textContent; + } + + 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 selection_html(value) { + return arguments.length + ? this.each(value == null + ? htmlRemove : (typeof value === "function" + ? htmlFunction + : htmlConstant)(value)) + : this.node().innerHTML; + } + + function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); + } + + function selection_raise() { + return this.each(raise); + } + + function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); + } + + function selection_lower() { + return this.each(lower); + } + + function selection_append(name) { + var create = typeof name === "function" ? name : creator(name); + return this.select(function() { + return this.appendChild(create.apply(this, arguments)); + }); + } + + function constantNull() { + return null; + } + + function selection_insert(name, before) { + var create = typeof name === "function" ? name : creator(name), + select = before == null ? constantNull : typeof before === "function" ? before : selector(before); + return this.select(function() { + return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); + }); + } + + function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); + } + + function selection_remove() { + return this.each(remove); + } + + function selection_cloneShallow() { + return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling); + } + + function selection_cloneDeep() { + return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling); + } + + function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); + } + + function selection_datum(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; + } + + var filterEvents = {}; + + var event = null; + + if (typeof document !== "undefined") { + var element = document.documentElement; + if (!("onmouseenter" in element)) { + filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; + } + } + + function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function(event) { + var related = event.relatedTarget; + if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { + listener.call(this, event); + } + }; + } + + function contextListener(listener, index, group) { + return function(event1) { + var event0 = event; // Events can be reentrant (e.g., focus). + event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + event = event0; + } + }; + } + + function parseTypenames(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: name}; + }); + } + + function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i; + else delete this.__on; + }; + } + + function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function(d, i, group) { + var on = this.__on, o, listener = wrap(value, i, group); + if (on) for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; + if (!on) this.__on = [o]; + else on.push(o); + }; + } + + function selection_on(typename, value, capture) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + + if (arguments.length < 2) { + var on = this.node().__on; + if (on) for (var j = 0, m = on.length, o; j < m; ++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; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; + } + + function customEvent(event1, listener, that, args) { + var event0 = event; + event1.sourceEvent = event; + event = event1; + try { + return listener.apply(that, args); + } finally { + event = event0; + } + } + + function dispatchEvent(node, type, params) { + var window = defaultView(node), + event = window.CustomEvent; + + if (typeof event === "function") { + event = new event(type, params); + } else { + event = window.document.createEvent("Event"); + if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; + else event.initEvent(type, false, false); + } + + node.dispatchEvent(event); + } + + function dispatchConstant(type, params) { + return function() { + return dispatchEvent(this, type, params); + }; + } + + function dispatchFunction(type, params) { + return function() { + return dispatchEvent(this, type, params.apply(this, arguments)); + }; + } + + function selection_dispatch(type, params) { + return this.each((typeof params === "function" + ? dispatchFunction + : dispatchConstant)(type, params)); + } + + var root = [null]; + + function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; + } + + function selection() { + return new Selection([[document.documentElement]], root); + } + + Selection.prototype = selection.prototype = { + constructor: Selection, + select: selection_select, + selectAll: selection_selectAll, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch + }; + + function select(selector) { + return typeof selector === "string" + ? new Selection([[document.querySelector(selector)]], [document.documentElement]) + : new Selection([[selector]], root); + } + + function sourceEvent() { + var current = event, source; + while (source = current.sourceEvent) current = source; + return current; + } + + function point(node, event) { + 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]; + } + + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; + } + + function mouse(node) { + var event = sourceEvent(); + if (event.changedTouches) event = event.changedTouches[0]; + return point(node, event); + } + + function touch(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches; + + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return point(node, touch); + } + } + + return null; + } + + var prefix = "$"; + + function Map$1() {} + + Map$1.prototype = map.prototype = { + constructor: Map$1, + has: function(key) { + return (prefix + key) in this; + }, + get: function(key) { + return this[prefix + key]; + }, + set: function(key, value) { + this[prefix + key] = value; + return this; + }, + remove: function(key) { + var property = prefix + key; + return property in this && delete this[property]; + }, + clear: function() { + for (var property in this) if (property[0] === prefix) delete this[property]; + }, + keys: function() { + var keys = []; + for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); + return keys; + }, + values: function() { + var values = []; + for (var property in this) if (property[0] === prefix) values.push(this[property]); + return values; + }, + entries: function() { + var entries = []; + for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); + return entries; + }, + size: function() { + var size = 0; + for (var property in this) if (property[0] === prefix) ++size; + return size; + }, + empty: function() { + for (var property in this) if (property[0] === prefix) return false; + return true; + }, + each: function(f) { + for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); + } + }; + + function map(object, f) { + var map = new Map$1; + + // Copy constructor. + if (object instanceof Map$1) object.each(function(value, key) { map.set(key, value); }); + + // Index array by numeric index or specified key function. + else if (Array.isArray(object)) { + var i = -1, + n = object.length, + o; + + if (f == null) while (++i < n) map.set(i, object[i]); + else while (++i < n) map.set(f(o = object[i], i, object), o); + } + + // Convert object to map. + else if (object) for (var key in object) map.set(key, object[key]); + + return map; + } + + function Set() {} + + var proto = map.prototype; + + Set.prototype = set.prototype = { + constructor: Set, + has: proto.has, + add: function(value) { + value += ""; + this[prefix + value] = value; + return this; + }, + remove: proto.remove, + clear: proto.clear, + values: proto.keys, + size: proto.size, + empty: proto.empty, + each: proto.each + }; + + function set(object, f) { + var set = new Set; + + // Copy constructor. + if (object instanceof Set) object.each(function(value) { set.add(value); }); + + // Otherwise, assume it’s an array. + else if (object) { + var i = -1, n = object.length; + if (f == null) while (++i < n) set.add(object[i]); + else while (++i < n) set.add(f(object[i], i, object)); + } + + return set; + } + + var noop = {value: function() {}}; + + function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); + } + + function Dispatch(_) { + this._ = _; + } + + function parseTypenames$1(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: name}; + }); + } + + Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames$1(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, 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(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } + }; + + function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } + } + + function set$1(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; + } + + function nopropagation() { + event.stopImmediatePropagation(); + } + + function noevent() { + event.preventDefault(); + event.stopImmediatePropagation(); + } + + function dragDisable(view) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", noevent, true); + if ("onselectstart" in root) { + selection.on("selectstart.drag", noevent, true); + } else { + root.__noselect = root.style.MozUserSelect; + root.style.MozUserSelect = "none"; + } + } + + function yesdrag(view, noclick) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", null); + if (noclick) { + selection.on("click.drag", noevent, true); + setTimeout(function() { selection.on("click.drag", null); }, 0); + } + if ("onselectstart" in root) { + selection.on("selectstart.drag", null); + } else { + root.style.MozUserSelect = root.__noselect; + delete root.__noselect; + } + } + + function constant$1(x) { + return function() { + return x; + }; + } + + function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { + this.target = target; + this.type = type; + this.subject = subject; + this.identifier = id; + this.active = active; + this.x = x; + this.y = y; + this.dx = dx; + this.dy = dy; + this._ = dispatch; + } + + DragEvent.prototype.on = function() { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; + }; + + // Ignore right-click, since that should open the context menu. + function defaultFilter() { + return !event.button; + } + + function defaultContainer() { + return this.parentNode; + } + + function defaultSubject(d) { + return d == null ? {x: event.x, y: event.y} : d; + } + + function defaultTouchable() { + return "ontouchstart" in this; + } + + function drag() { + var filter = defaultFilter, + container = defaultContainer, + subject = defaultSubject, + touchable = defaultTouchable, + gestures = {}, + listeners = dispatch("start", "drag", "end"), + active = 0, + mousedownx, + mousedowny, + mousemoving, + touchending, + clickDistance2 = 0; + + function drag(selection) { + selection + .on("mousedown.drag", mousedowned) + .filter(touchable) + .on("touchstart.drag", touchstarted) + .on("touchmove.drag", touchmoved) + .on("touchend.drag touchcancel.drag", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var gesture = beforestart("mouse", container.apply(this, arguments), mouse, this, arguments); + if (!gesture) return; + select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); + dragDisable(event.view); + nopropagation(); + mousemoving = false; + mousedownx = event.clientX; + mousedowny = event.clientY; + gesture("start"); + } + + function mousemoved() { + noevent(); + if (!mousemoving) { + var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag"); + } + + function mouseupped() { + select(event.view).on("mousemove.drag mouseup.drag", null); + yesdrag(event.view, mousemoving); + noevent(); + gestures.mouse("end"); + } + + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = event.changedTouches, + c = container.apply(this, arguments), + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) { + nopropagation(); + gesture("start"); + } + } + } + + function touchmoved() { + var touches = event.changedTouches, + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + noevent(); + gesture("drag"); + } + } + } + + function touchended() { + var touches = event.changedTouches, + n = touches.length, i, gesture; + + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + nopropagation(); + gesture("end"); + } + } + } + + function beforestart(id, container, point, that, args) { + var p = point(container, id), s, dx, dy, + sublisteners = listeners.copy(); + + if (!customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() { + if ((event.subject = s = subject.apply(that, args)) == null) return false; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return true; + })) return; + + return function gesture(type) { + var p0 = p, n; + switch (type) { + case "start": gestures[id] = gesture, n = active++; break; + case "end": delete gestures[id], --active; // nobreak + case "drag": p = point(container, id), n = active; break; + } + customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + }; + } + + drag.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant$1(!!_), drag) : filter; + }; + + drag.container = function(_) { + return arguments.length ? (container = typeof _ === "function" ? _ : constant$1(_), drag) : container; + }; + + drag.subject = function(_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : constant$1(_), drag) : subject; + }; + + drag.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$1(!!_), 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; + } + + function define(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; + } + + function Color() {} + + var darker = 0.7; + var brighter = 1 / darker; + + var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex3 = /^#([0-9a-f]{3})$/, + reHex6 = /^#([0-9a-f]{6})$/, + reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), + reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), + reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), + reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), + reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), + reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + + var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 + }; + + define(Color, color, { + displayable: function() { + return this.rgb().displayable(); + }, + hex: function() { + return this.rgb().hex(); + }, + toString: function() { + return this.rgb() + ""; + } + }); + + function color(format) { + var m; + format = (format + "").trim().toLowerCase(); + return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 + : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; + } + + function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); + } + + function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); + } + + 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(Rgb, rgb, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function() { + return this; + }, + displayable: function() { + return (0 <= this.r && this.r <= 255) + && (0 <= this.g && this.g <= 255) + && (0 <= this.b && this.b <= 255) + && (0 <= this.opacity && this.opacity <= 1); + }, + hex: function() { + return "#" + hex(this.r) + hex(this.g) + hex(this.b); + }, + toString: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + + (a === 1 ? ")" : ", " + a + ")"); + } + })); + + function hex(value) { + value = Math.max(0, Math.min(255, Math.round(value) || 0)); + return (value < 16 ? "0" : "") + value.toString(16); + } + + function hsla(h, s, l, a) { + if (a <= 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, a); + } + + 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, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + 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(Hsl, hsl, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + 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 + ); + }, + displayable: function() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) + && (0 <= this.l && this.l <= 1) + && (0 <= this.opacity && this.opacity <= 1); + } + })); + + /* From FvD 13.37, CSS Color Module Level 3 */ + 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; + } + + var deg2rad = Math.PI / 180; + var rad2deg = 180 / Math.PI; + + // https://beta.observablehq.com/@mbostock/lab-and-rgb + var K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; + + function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * deg2rad; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; + if (r === g && g === b) x = z = y; else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); + } + + function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); + } + + function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; + } + + define(Lab, lab, extend(Color, { + brighter: function(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new Rgb( + lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), + lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); + } + })); + + function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; + } + + function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); + } + + function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); + } + + function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); + } + + function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * rad2deg; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); + } + + function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); + } + + function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; + } + + define(Hcl, hcl, extend(Color, { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return labConvert(this).rgb(); + } + })); + + var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; + + function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); + } + + function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); + } + + function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; + } + + define(Cubehelix, cubehelix, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new Rgb( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } + })); + + function constant$2(x) { + return function() { + return x; + }; + } + + function linear(a, d) { + return function(t) { + return a + t * d; + }; + } + + function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; + } + + function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant$2(isNaN(a) ? b : a); + }; + } + + function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant$2(isNaN(a) ? b : a); + } + + var interpolateRgb = (function rgbGamma(y) { + var color = gamma(y); + + function rgb$1(start, end) { + var r = color((start = rgb(start)).r, (end = rgb(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + + rgb$1.gamma = rgbGamma; + + return rgb$1; + })(1); + + function interpolateNumber(a, b) { + return a = +a, b -= a, function(t) { + return a + b * t; + }; + } + + var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); + + function zero(b) { + return function() { + return b; + }; + } + + function one(b) { + return function(t) { + return b(t) + ""; + }; + } + + function interpolateString(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: interpolateNumber(am, bm)}); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); + } + + var degrees = 180 / Math.PI; + + var identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 + }; + + function decompose(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; + } + + var cssNode, + cssRoot, + cssView, + svgNode; + + function parseCss(value) { + if (value === "none") return identity; + if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; + cssNode.style.transform = value; + value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); + cssRoot.removeChild(cssNode); + value = value.slice(7, -1).split(","); + return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); + } + + 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(value.a, value.b, value.c, value.d, value.e, value.f); + } + + 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: interpolateNumber(xa, xb)}, {i: i - 2, x: interpolateNumber(ya, yb)}); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path + q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b)}); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + + function skewX(a, b, s, q) { + if (a !== b) { + q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, 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: interpolateNumber(xa, xb)}, {i: i - 2, x: interpolateNumber(ya, yb)}); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + + return function(a, b) { + var s = [], // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + 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, ", ", ")", ")"); + + var rho = Math.SQRT2, + rho2 = 2, + rho4 = 4, + epsilon2 = 1e-12; + + function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; + } + + function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; + } + + function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); + } + + // p0 = [ux0, uy0, w0] + // p1 = [ux1, uy1, w1] + function interpolateZoom(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; + + // Special case for u0 ≅ u1. + 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) + ]; + }; + } + + // General case. + 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 * 1000; + + return i; + } + + var frame = 0, // is an animation frame pending? + timeout = 0, // is a timeout pending? + interval = 0, // are any timers active? + pokeDelay = 1000, // how frequently we check for clock skew + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance === "object" && performance.now ? performance : Date, + 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(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, 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 now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; + } + + 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; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; // Strictly less than if we recomputed 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); + } + } + + function timeout$1(callback, delay, time) { + var t = new Timer; + delay = delay == null ? 0 : +delay; + t.restart(function(elapsed) { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; + } + + var emptyOn = dispatch("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(node, name, id, index, group, timing) { + var schedules = node.__transition; + if (!schedules) node.__transition = {}; + else if (id in schedules) return; + create(node, id, { + name: name, + index: index, // For context during callback. + group: 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, id) { + var schedule = get$1(node, id); + if (schedule.state > CREATED) throw new Error("too late; already scheduled"); + return schedule; + } + + function set$2(node, id) { + var schedule = get$1(node, id); + if (schedule.state > STARTED) throw new Error("too late; already running"); + return schedule; + } + + function get$1(node, id) { + var schedule = node.__transition; + if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); + return schedule; + } + + function create(node, id, self) { + var schedules = node.__transition, + tween; + + // Initialize the self timer when the transition is created. + // Note the actual delay is not known until the first callback! + schedules[id] = self; + self.timer = timer(schedule, 0, self.time); + + function schedule(elapsed) { + self.state = SCHEDULED; + self.timer.restart(start, self.delay, self.time); + + // If the elapsed delay is less than our first sleep, start immediately. + if (self.delay <= elapsed) start(elapsed - self.delay); + } + + function start(elapsed) { + var i, j, n, o; + + // If the state is not SCHEDULED, then we previously errored on start. + if (self.state !== SCHEDULED) return stop(); + + for (i in schedules) { + o = schedules[i]; + if (o.name !== self.name) continue; + + // While this element already has a starting transition during this frame, + // defer starting an interrupting transition until that transition has a + // chance to tick (and possibly end); see d3/d3-transition#54! + if (o.state === STARTED) return timeout$1(start); + + // Interrupt the active transition, if any. + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node, node.__data__, o.index, o.group); + delete schedules[i]; + } + + // Cancel any pre-empted transitions. + else if (+i < id) { + o.state = ENDED; + o.timer.stop(); + o.on.call("cancel", node, node.__data__, o.index, o.group); + delete schedules[i]; + } + } + + // Defer the first tick to end of the current frame; see d3/d3#1576. + // Note the transition may be canceled after start and before the first tick! + // Note this must be scheduled before the start event; see d3/d3-transition#16! + // Assuming this is successful, subsequent callbacks go straight to tick. + timeout$1(function() { + if (self.state === STARTED) { + self.state = RUNNING; + self.timer.restart(tick, self.delay, self.time); + tick(elapsed); + } + }); + + // Dispatch the start event. + // Note this must be done before the tween are initialized. + self.state = STARTING; + self.on.call("start", node, node.__data__, self.index, self.group); + if (self.state !== STARTING) return; // interrupted + self.state = STARTED; + + // Initialize the tween, deleting null tween. + 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); + } + + // Dispatch the end event. + 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[id]; + for (var i in schedules) return; // eslint-disable-line no-unused-vars + delete node.__transition; + } + } + + function interrupt(node, name) { + var schedules = node.__transition, + schedule, + active, + empty = true, + i; + + if (!schedules) return; + + name = name == null ? null : name + ""; + + for (i in schedules) { + if ((schedule = schedules[i]).name !== name) { empty = 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 (empty) delete node.__transition; + } + + function selection_interrupt(name) { + return this.each(function() { + interrupt(this, name); + }); + } + + function tweenRemove(id, name) { + var tween0, tween1; + return function() { + var schedule = set$2(this, id), + tween = schedule.tween; + + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + 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(id, name, value) { + var tween0, tween1; + if (typeof value !== "function") throw new Error; + return function() { + var schedule = set$2(this, id), + tween = schedule.tween; + + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = {name: name, value: 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 transition_tween(name, value) { + var id = this._id; + + name += ""; + + if (arguments.length < 2) { + var tween = get$1(this.node(), id).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)(id, name, value)); + } + + function tweenValue(transition, name, value) { + var id = transition._id; + + transition.each(function() { + var schedule = set$2(this, id); + (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); + }); + + return function(node) { + return get$1(node, id).value[name]; + }; + } + + function interpolate(a, b) { + var c; + return (typeof b === "number" ? interpolateNumber + : b instanceof color ? interpolateRgb + : (c = color(b)) ? (b = c, interpolateRgb) + : interpolateString)(a, b); + } + + function attrRemove$1(name) { + return function() { + this.removeAttribute(name); + }; + } + + function attrRemoveNS$1(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; + } + + function attrConstant$1(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 attrConstantNS$1(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 attrFunction$1(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 attrFunctionNS$1(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 transition_attr(name, value) { + var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate; + return this.attrTween(name, typeof value === "function" + ? (fullname.local ? attrFunctionNS$1 : attrFunction$1)(fullname, i, tweenValue(this, "attr." + name, value)) + : value == null ? (fullname.local ? attrRemoveNS$1 : attrRemove$1)(fullname) + : (fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, i, value)); + } + + function attrInterpolate(name, i) { + return function(t) { + this.setAttribute(name, i(t)); + }; + } + + function attrInterpolateNS(fullname, i) { + return function(t) { + this.setAttributeNS(fullname.space, fullname.local, i(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 transition_attrTween(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(name); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); + } + + function delayFunction(id, value) { + return function() { + init(this, id).delay = +value.apply(this, arguments); + }; + } + + function delayConstant(id, value) { + return value = +value, function() { + init(this, id).delay = value; + }; + } + + function transition_delay(value) { + var id = this._id; + + return arguments.length + ? this.each((typeof value === "function" + ? delayFunction + : delayConstant)(id, value)) + : get$1(this.node(), id).delay; + } + + function durationFunction(id, value) { + return function() { + set$2(this, id).duration = +value.apply(this, arguments); + }; + } + + function durationConstant(id, value) { + return value = +value, function() { + set$2(this, id).duration = value; + }; + } + + function transition_duration(value) { + var id = this._id; + + return arguments.length + ? this.each((typeof value === "function" + ? durationFunction + : durationConstant)(id, value)) + : get$1(this.node(), id).duration; + } + + function easeConstant(id, value) { + if (typeof value !== "function") throw new Error; + return function() { + set$2(this, id).ease = value; + }; + } + + function transition_ease(value) { + var id = this._id; + + return arguments.length + ? this.each(easeConstant(id, value)) + : get$1(this.node(), id).ease; + } + + function transition_filter(match) { + if (typeof match !== "function") match = matcher(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++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); + } + + function transition_merge(transition) { + if (transition._id !== this._id) throw new Error; + + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++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); + } + + 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(id, name, listener) { + var on0, on1, sit = start(name) ? init : set$2; + return function() { + var schedule = sit(this, id), + on = schedule.on; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); + + schedule.on = on1; + }; + } + + function transition_on(name, listener) { + var id = this._id; + + return arguments.length < 2 + ? get$1(this.node(), id).on.on(name) + : this.each(onFunction(id, name, listener)); + } + + function removeFunction(id) { + return function() { + var parent = this.parentNode; + for (var i in this.__transition) if (+i !== id) return; + if (parent) parent.removeChild(this); + }; + } + + function transition_remove() { + return this.on("end.remove", removeFunction(this._id)); + } + + function transition_select(select) { + var name = this._name, + id = this._id; + + if (typeof select !== "function") select = selector(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++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(subgroup[i], name, id, i, subgroup, get$1(node, id)); + } + } + } + + return new Transition(subgroups, this._parents, name, id); + } + + function transition_selectAll(select) { + var name = this._name, + id = this._id; + + if (typeof select !== "function") select = selectorAll(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + for (var children = select.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) { + if (child = children[k]) { + schedule(child, name, id, k, children, inherit); + } + } + subgroups.push(children); + parents.push(node); + } + } + } + + return new Transition(subgroups, parents, name, id); + } + + var Selection$1 = selection.prototype.constructor; + + function transition_selection() { + return new Selection$1(this._groups, this._parents); + } + + 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 styleRemove$1(name) { + return function() { + this.style.removeProperty(name); + }; + } + + function styleConstant$1(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 styleFunction$1(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(id, name) { + var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; + return function() { + var schedule = set$2(this, id), + on = schedule.on, + listener = schedule.value[key] == null ? remove || (remove = styleRemove$1(name)) : undefined; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); + + schedule.on = on1; + }; + } + + function transition_style(name, value, priority) { + var i = (name += "") === "transform" ? interpolateTransformCss : interpolate; + return value == null ? this + .styleTween(name, styleNull(name, i)) + .on("end.style." + name, styleRemove$1(name)) + : typeof value === "function" ? this + .styleTween(name, styleFunction$1(name, i, tweenValue(this, "style." + name, value))) + .each(styleMaybeRemove(this._id, name)) + : this + .styleTween(name, styleConstant$1(name, i, value), priority) + .on("end.style." + name, null); + } + + function styleInterpolate(name, i, priority) { + return function(t) { + this.style.setProperty(name, i(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 transition_styleTween(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)); + } + + function textConstant$1(value) { + return function() { + this.textContent = value; + }; + } + + function textFunction$1(value) { + return function() { + var value1 = value(this); + this.textContent = value1 == null ? "" : value1; + }; + } + + function transition_text(value) { + return this.tween("text", typeof value === "function" + ? textFunction$1(tweenValue(this, "text", value)) + : textConstant$1(value == null ? "" : value + "")); + } + + function transition_transition() { + var name = this._name, + id0 = this._id, + id1 = newId(); + + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + var inherit = get$1(node, id0); + schedule(node, name, id1, i, group, { + time: inherit.time + inherit.delay + inherit.duration, + delay: 0, + duration: inherit.duration, + ease: inherit.ease + }); + } + } + } + + return new Transition(groups, this._parents, name, id1); + } + + function transition_end() { + var on0, on1, that = this, id = 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 = set$2(this, id), + on = schedule.on; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0) { + on1 = (on0 = on).copy(); + on1._.cancel.push(cancel); + on1._.interrupt.push(cancel); + on1._.end.push(end); + } + + schedule.on = on1; + }); + }); + } + + var id = 0; + + function Transition(groups, parents, name, id) { + this._groups = groups; + this._parents = parents; + this._name = name; + this._id = id; + } + + function transition(name) { + return selection().transition(name); + } + + function newId() { + return ++id; + } + + var selection_prototype = selection.prototype; + + Transition.prototype = transition.prototype = { + constructor: Transition, + select: transition_select, + selectAll: transition_selectAll, + filter: transition_filter, + merge: transition_merge, + selection: transition_selection, + transition: transition_transition, + 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: transition_on, + attr: transition_attr, + attrTween: transition_attrTween, + style: transition_style, + styleTween: transition_styleTween, + text: transition_text, + remove: transition_remove, + tween: transition_tween, + delay: transition_delay, + duration: transition_duration, + ease: transition_ease, + end: transition_end + }; + + function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; + } + + var pi = Math.PI; + + var tau = 2 * Math.PI; + + var defaultTiming = { + time: null, // Set on use. + delay: 0, + duration: 250, + ease: cubicInOut + }; + + function inherit(node, id) { + var timing; + while (!(timing = node.__transition) || !(timing = timing[id])) { + if (!(node = node.parentNode)) { + return defaultTiming.time = now(), defaultTiming; + } + } + return timing; + } + + function selection_transition(name) { + var id, + timing; + + if (name instanceof Transition) { + id = name._id, name = name._name; + } else { + id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + ""; + } + + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + schedule(node, name, id, i, group, timing || inherit(node, id)); + } + } + } + + return new Transition(groups, this._parents, name, id); + } + + selection.prototype.interrupt = selection_interrupt; + selection.prototype.transition = selection_transition; + + function constant$3(x) { + return function() { + return x; + }; + } + + function ZoomEvent(target, type, transform) { + this.target = target; + this.type = type; + this.transform = transform; + } + + function Transform(k, x, y) { + this.k = k; + this.x = x; + this.y = y; + } + + Transform.prototype = { + constructor: Transform, + scale: function(k) { + return k === 1 ? this : new Transform(this.k * k, this.x, this.y); + }, + translate: function(x, y) { + return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); + }, + apply: function(point) { + return [point[0] * this.k + this.x, point[1] * this.k + this.y]; + }, + applyX: function(x) { + return x * this.k + this.x; + }, + applyY: function(y) { + return y * this.k + this.y; + }, + invert: function(location) { + return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; + }, + invertX: function(x) { + return (x - this.x) / this.k; + }, + invertY: function(y) { + return (y - this.y) / this.k; + }, + rescaleX: function(x) { + return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); + }, + rescaleY: function(y) { + return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } + }; + + var identity$1 = new Transform(1, 0, 0); + + function nopropagation$1() { + event.stopImmediatePropagation(); + } + + function noevent$1() { + event.preventDefault(); + event.stopImmediatePropagation(); + } + + // Ignore right-click, since that should open the context menu. + function defaultFilter$1() { + return !event.button; + } + + function defaultExtent() { + var e = this, w, h; + if (e instanceof SVGElement) { + e = e.ownerSVGElement || e; + w = e.width.baseVal.value; + h = e.height.baseVal.value; + } else { + w = e.clientWidth; + h = e.clientHeight; + } + return [[0, 0], [w, h]]; + } + + function defaultTransform() { + return this.__zoom || identity$1; + } + + function defaultWheelDelta() { + return -event.deltaY * (event.deltaMode ? 120 : 1) / 500; + } + + function defaultTouchable$1() { + return "ontouchstart" in this; + } + + function defaultConstrain(transform, extent, translateExtent) { + var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], + dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], + dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], + dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; + return transform.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() { + var filter = defaultFilter$1, + extent = defaultExtent, + constrain = defaultConstrain, + wheelDelta = defaultWheelDelta, + touchable = defaultTouchable$1, + scaleExtent = [0, Infinity], + translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], + duration = 250, + interpolate = interpolateZoom, + gestures = [], + listeners = dispatch("start", "zoom", "end"), + touchstarting, + touchending, + touchDelay = 500, + wheelDelay = 150, + clickDistance2 = 0; + + function zoom(selection) { + selection + .property("__zoom", defaultTransform) + .on("wheel.zoom", wheeled) + .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("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + + zoom.transform = function(collection, transform) { + var selection = collection.selection ? collection.selection() : collection; + selection.property("__zoom", defaultTransform); + if (collection !== selection) { + schedule(collection, transform); + } else { + selection.interrupt().each(function() { + gesture(this, arguments) + .start() + .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) + .end(); + }); + } + }; + + zoom.scaleBy = function(selection, k) { + zoom.scaleTo(selection, function() { + var k0 = this.__zoom.k, + k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return k0 * k1; + }); + }; + + zoom.scaleTo = function(selection, k) { + zoom.transform(selection, function() { + var e = extent.apply(this, arguments), + t0 = this.__zoom, + p0 = centroid(e), + p1 = t0.invert(p0), + k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); + }); + }; + + zoom.translateBy = function(selection, x, y) { + zoom.transform(selection, function() { + return constrain(this.__zoom.translate( + typeof x === "function" ? x.apply(this, arguments) : x, + typeof y === "function" ? y.apply(this, arguments) : y + ), extent.apply(this, arguments), translateExtent); + }); + }; + + zoom.translateTo = function(selection, x, y) { + zoom.transform(selection, function() { + var e = extent.apply(this, arguments), + t = this.__zoom, + p = centroid(e); + return constrain(identity$1.translate(p[0], p[1]).scale(t.k).translate( + typeof x === "function" ? -x.apply(this, arguments) : -x, + typeof y === "function" ? -y.apply(this, arguments) : -y + ), e, translateExtent); + }); + }; + + function scale(transform, k) { + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); + return k === transform.k ? transform : new Transform(k, transform.x, transform.y); + } + + function translate(transform, p0, p1) { + var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; + return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); + } + + function centroid(extent) { + return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; + } + + function schedule(transition, transform, center) { + transition + .on("start.zoom", function() { gesture(this, arguments).start(); }) + .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); }) + .tween("zoom", function() { + var that = this, + args = arguments, + g = gesture(that, args), + e = extent.apply(that, args), + p = center || centroid(e), + w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), + a = that.__zoom, + b = typeof transform === "function" ? transform.apply(that, args) : transform, + i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); + return function(t) { + if (t === 1) t = b; // Avoid rounding error on end. + 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) { + for (var i = 0, n = gestures.length, g; i < n; ++i) { + if ((g = gestures[i]).that === that) { + return g; + } + } + return new Gesture(that, args); + } + + function Gesture(that, args) { + this.that = that; + this.args = args; + this.index = -1; + this.active = 0; + this.extent = extent.apply(that, args); + } + + Gesture.prototype = { + start: function() { + if (++this.active === 1) { + this.index = gestures.push(this) - 1; + this.emit("start"); + } + return this; + }, + zoom: function(key, transform) { + if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); + if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); + if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); + this.that.__zoom = transform; + this.emit("zoom"); + return this; + }, + end: function() { + if (--this.active === 0) { + gestures.splice(this.index, 1); + this.index = -1; + this.emit("end"); + } + return this; + }, + emit: function(type) { + customEvent(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]); + } + }; + + function wheeled() { + if (!filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + t = this.__zoom, + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), + p = mouse(this); + + // If the mouse is in the same location as before, reuse it. + // If there were recent wheel events, reset the wheel idle timeout. + 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); + } + + // If this wheel event won’t trigger a transform change, ignore it. + else if (t.k === k) return; + + // Otherwise, capture the mouse point and location at the start. + else { + g.mouse = [p, t.invert(p)]; + interrupt(this); + g.start(); + } + + noevent$1(); + 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() { + if (touchending || !filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + v = select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), + p = mouse(this), + x0 = event.clientX, + y0 = event.clientY; + + dragDisable(event.view); + nopropagation$1(); + g.mouse = [p, this.__zoom.invert(p)]; + interrupt(this); + g.start(); + + function mousemoved() { + noevent$1(); + if (!g.moved) { + var dx = event.clientX - x0, dy = event.clientY - y0; + g.moved = dx * dx + dy * dy > clickDistance2; + } + g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = mouse(g.that), g.mouse[1]), g.extent, translateExtent)); + } + + function mouseupped() { + v.on("mousemove.zoom mouseup.zoom", null); + yesdrag(event.view, g.moved); + noevent$1(); + g.end(); + } + } + + function dblclicked() { + if (!filter.apply(this, arguments)) return; + var t0 = this.__zoom, + p0 = mouse(this), + p1 = t0.invert(p0), + k1 = t0.k * (event.shiftKey ? 0.5 : 2), + t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent); + + noevent$1(); + if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0); + else select(this).call(zoom.transform, t1); + } + + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + touches = event.changedTouches, + started, + n = touches.length, i, t, p; + + nopropagation$1(); + for (i = 0; i < n; ++i) { + t = touches[i], p = touch(this, touches, t.identifier); + p = [p, this.__zoom.invert(p), t.identifier]; + if (!g.touch0) g.touch0 = p, started = true; + else if (!g.touch1) g.touch1 = p; + } + + // If this is a dbltap, reroute to the (optional) dblclick.zoom handler. + if (touchstarting) { + touchstarting = clearTimeout(touchstarting); + if (!g.touch1) { + g.end(); + p = select(this).on("dblclick.zoom"); + if (p) p.apply(this, arguments); + return; + } + } + + if (started) { + touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); + interrupt(this); + g.start(); + } + } + + function touchmoved() { + var g = gesture(this, arguments), + touches = event.changedTouches, + n = touches.length, i, t, p, l; + + noevent$1(); + if (touchstarting) touchstarting = clearTimeout(touchstarting); + for (i = 0; i < n; ++i) { + t = touches[i], p = touch(this, touches, t.identifier); + 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() { + var g = gesture(this, arguments), + touches = event.changedTouches, + n = touches.length, i, t; + + nopropagation$1(); + 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(); + } + + zoom.wheelDelta = function(_) { + return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant$3(+_), zoom) : wheelDelta; + }; + + zoom.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant$3(!!_), zoom) : filter; + }; + + zoom.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$3(!!_), zoom) : touchable; + }; + + zoom.extent = function(_) { + return arguments.length ? (extent = typeof _ === "function" ? _ : constant$3([[+_[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); + }; + + return zoom; + } + + function tree_add(d) { + var x = +this._x.call(null, d), + y = +this._y.call(null, d); + return add(this.cover(x, y), x, y, d); + } + + function add(tree, x, y, d) { + if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points + + 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 the tree is empty, initialize the root as a leaf. + if (!node) return tree._root = leaf, tree; + + // Find the existing leaf for the new point, or add it. + while (node.length) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; + } + + // Is the new point is exactly coincident with the existing point? + xp = +tree._x.call(null, node.data); + yp = +tree._y.call(null, node.data); + if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; + + // Otherwise, split the leaf node until the old and new point are separated. + do { + parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (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, + x, + y, + xz = new Array(n), + yz = new Array(n), + x0 = Infinity, + y0 = Infinity, + x1 = -Infinity, + y1 = -Infinity; + + // Compute the points and their extent. + for (i = 0; i < n; ++i) { + if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; + xz[i] = x; + yz[i] = y; + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; + } + + // If there were no (valid) points, abort. + if (x0 > x1 || y0 > y1) return this; + + // Expand the tree to cover the new points. + this.cover(x0, y0).cover(x1, y1); + + // Add the new points. + for (i = 0; i < n; ++i) { + add(this, xz[i], yz[i], data[i]); + } + + return this; + } + + function tree_cover(x, y) { + if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + + var x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1; + + // If the quadtree has no extent, initialize them. + // Integer extent are necessary so that if we later double the extent, + // the existing quadrant boundaries don’t change due to floating point error! + if (isNaN(x0)) { + x1 = (x0 = Math.floor(x)) + 1; + y1 = (y0 = Math.floor(y)) + 1; + } + + // Otherwise, double repeatedly to cover. + else { + var z = x1 - x0, + node = this._root, + parent, + i; + + while (x0 > x || x >= x1 || y0 > y || y >= y1) { + i = (y < y0) << 1 | (x < 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; + } + + function tree_data() { + var data = []; + this.visit(function(node) { + if (!node.length) do data.push(node.data); while (node = node.next) + }); + return data; + } + + function tree_extent(_) { + return arguments.length + ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) + : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; + } + + function Quad(node, x0, y0, x1, y1) { + this.node = node; + this.x0 = x0; + this.y0 = y0; + this.x1 = x1; + this.y1 = y1; + } + + function tree_find(x, y, radius) { + var data, + x0 = this._x0, + y0 = this._y0, + x1, + y1, + x2, + y2, + x3 = this._x1, + y3 = this._y1, + quads = [], + node = this._root, + q, + i; + + if (node) quads.push(new Quad(node, x0, y0, x3, y3)); + if (radius == null) radius = Infinity; + else { + x0 = x - radius, y0 = y - radius; + x3 = x + radius, y3 = y + radius; + radius *= radius; + } + + while (q = quads.pop()) { + + // Stop searching if this quadrant can’t contain a closer node. + if (!(node = q.node) + || (x1 = q.x0) > x3 + || (y1 = q.y0) > y3 + || (x2 = q.x1) < x0 + || (y2 = q.y1) < y0) continue; + + // Bisect the current quadrant. + if (node.length) { + var xm = (x1 + x2) / 2, + ym = (y1 + y2) / 2; + + quads.push( + new Quad(node[3], xm, ym, x2, y2), + new Quad(node[2], x1, ym, xm, y2), + new Quad(node[1], xm, y1, x2, ym), + new Quad(node[0], x1, y1, xm, ym) + ); + + // Visit the closest quadrant first. + if (i = (y >= ym) << 1 | (x >= xm)) { + q = quads[quads.length - 1]; + quads[quads.length - 1] = quads[quads.length - 1 - i]; + quads[quads.length - 1 - i] = q; + } + } + + // Visit this point. (Visiting coincident points isn’t necessary!) + else { + var dx = x - +this._x.call(null, node.data), + dy = y - +this._y.call(null, node.data), + d2 = dx * dx + dy * dy; + if (d2 < radius) { + var d = Math.sqrt(radius = d2); + x0 = x - d, y0 = y - d; + x3 = x + d, y3 = y + d; + data = node.data; + } + } + } + + return data; + } + + function tree_remove(d) { + if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points + + var parent, + node = this._root, + retainer, + previous, + next, + x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1, + x, + y, + xm, + ym, + right, + bottom, + i, + j; + + // If the tree is empty, initialize the root as a leaf. + if (!node) return this; + + // Find the leaf node for the point. + // While descending, also retain the deepest parent with a non-removed sibling. + if (node.length) while (true) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (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; + } + + // Find the point to remove. + while (node.data !== d) if (!(previous = node, node = node.next)) return this; + if (next = node.next) delete node.next; + + // If there are multiple coincident points, remove just the point. + if (previous) return (next ? previous.next = next : delete previous.next), this; + + // If this is the root point, remove it. + if (!parent) return this._root = next, this; + + // Remove this leaf. + next ? parent[i] = next : delete parent[i]; + + // If the parent now contains exactly one leaf, collapse superfluous parents. + 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; + } + + function tree_root() { + return this._root; + } + + function tree_size() { + var size = 0; + this.visit(function(node) { + if (!node.length) do ++size; while (node = node.next) + }); + return size; + } + + function tree_visit(callback) { + var quads = [], q, node = this._root, child, x0, y0, x1, y1; + if (node) quads.push(new Quad(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(child, xm, ym, x1, y1)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); + } + } + return this; + } + + function tree_visitAfter(callback) { + var quads = [], next = [], q; + if (this._root) quads.push(new Quad(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(child, x0, y0, xm, ym)); + if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); + if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); + if (child = node[3]) quads.push(new Quad(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; + } + + function defaultX(d) { + return d[0]; + } + + function tree_x(_) { + return arguments.length ? (this._x = _, this) : this._x; + } + + function defaultY(d) { + return d[1]; + } + + function tree_y(_) { + return arguments.length ? (this._y = _, this) : this._y; + } + + function quadtree(nodes, x, y) { + var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); + return nodes == null ? tree : tree.addAll(nodes); + } + + function Quadtree(x, y, x0, y0, x1, y1) { + this._x = x; + this._y = y; + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + this._root = undefined; + } + + function leaf_copy(leaf) { + var copy = {data: leaf.data}, next = copy; + while (leaf = leaf.next) next = next.next = {data: leaf.data}; + return copy; + } + + var treeProto = quadtree.prototype = Quadtree.prototype; + + treeProto.copy = function() { + var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + node = this._root, + nodes, + child; + + if (!node) return copy; + + if (!node.length) return copy._root = leaf_copy(node), copy; + + nodes = [{source: node, target: copy._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 copy; + }; + + treeProto.add = tree_add; + treeProto.addAll = addAll; + treeProto.cover = tree_cover; + treeProto.data = tree_data; + treeProto.extent = tree_extent; + treeProto.find = tree_find; + treeProto.remove = tree_remove; + treeProto.removeAll = removeAll; + treeProto.root = tree_root; + treeProto.size = tree_size; + treeProto.visit = tree_visit; + treeProto.visitAfter = tree_visitAfter; + treeProto.x = tree_x; + treeProto.y = tree_y; + + function constant$4(x) { + return function() { + return x; + }; + } + + function jiggle() { + return (Math.random() - 0.5) * 1e-6; + } + + function index(d) { + return d.index; + } + + function find(nodeById, nodeId) { + var node = nodeById.get(nodeId); + if (!node) throw new Error("missing: " + nodeId); + return node; + } + + function forceLink(links) { + var id = index, + strength = defaultStrength, + strengths, + distance = constant$4(30), + distances, + nodes, + count, + bias, + 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, x, y, l, b; i < n; ++i) { + link = links[i], source = link.source, target = link.target; + x = target.x + target.vx - source.x - source.vx || jiggle(); + y = target.y + target.vy - source.y - source.vy || jiggle(); + l = Math.sqrt(x * x + y * y); + l = (l - distances[i]) / l * alpha * strengths[i]; + x *= l, y *= l; + target.vx -= x * (b = bias[i]); + target.vy -= y * b; + source.vx += x * (b = 1 - b); + source.vy += y * b; + } + } + } + + function initialize() { + if (!nodes) return; + + var i, + n = nodes.length, + m = links.length, + nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), + link; + + for (i = 0, count = new Array(n); i < m; ++i) { + link = links[i], link.index = i; + if (typeof link.source !== "object") link.source = find(nodeById, link.source); + if (typeof link.target !== "object") link.target = find(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(m); i < m; ++i) { + link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + } + + strengths = new Array(m), initializeStrength(); + distances = new Array(m), 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 = _; + initialize(); + }; + + force.links = function(_) { + return arguments.length ? (links = _, initialize(), force) : links; + }; + + force.id = function(_) { + return arguments.length ? (id = _, force) : id; + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant$4(+_), initializeStrength(), force) : strength; + }; + + force.distance = function(_) { + return arguments.length ? (distance = typeof _ === "function" ? _ : constant$4(+_), initializeDistance(), force) : distance; + }; + + return force; + } + + function x(d) { + return d.x; + } + + function y(d) { + return d.y; + } + + var initialRadius = 10, + initialAngle = Math.PI * (3 - Math.sqrt(5)); + + function forceSimulation(nodes) { + var simulation, + alpha = 1, + alphaMin = 0.001, + alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), + alphaTarget = 0, + velocityDecay = 0.6, + forces = new Map(), + stepper = timer(step), + event = dispatch("tick", "end"); + + 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 === undefined) 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(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); + return force; + } + + initializeNodes(); + + return simulation = { + tick: 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; + }, + + force: function(name, _) { + return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + }, + + find: function(x, y, 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 = x - node.x; + dy = y - 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); + } + }; + } + + function forceManyBody() { + var nodes, + node, + alpha, + strength = constant$4(-30), + strengths, + distanceMin2 = 1, + distanceMax2 = Infinity, + theta2 = 0.81; + + function force(_) { + var i, n = nodes.length, tree = quadtree(nodes, x, y).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, node; + strengths = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + } + + function accumulate(quad) { + var strength = 0, q, c, weight = 0, x, y, i; + + // For internal nodes, accumulate forces from child quadrants. + if (quad.length) { + for (x = y = i = 0; i < 4; ++i) { + if ((q = quad[i]) && (c = Math.abs(q.value))) { + strength += q.value, weight += c, x += c * q.x, y += c * q.y; + } + } + quad.x = x / weight; + quad.y = y / weight; + } + + // For leaf nodes, accumulate forces from coincident quadrants. + else { + q = quad; + q.x = q.data.x; + q.y = q.data.y; + do strength += strengths[q.data.index]; + while (q = q.next); + } + + quad.value = strength; + } + + function apply(quad, x1, _, x2) { + if (!quad.value) return true; + + var x = quad.x - node.x, + y = quad.y - node.y, + w = x2 - x1, + l = x * x + y * y; + + // Apply the Barnes-Hut approximation if possible. + // Limit forces for very close nodes; randomize direction if coincident. + if (w * w / theta2 < l) { + if (l < distanceMax2) { + if (x === 0) x = jiggle(), l += x * x; + if (y === 0) y = jiggle(), l += y * y; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + node.vx += x * quad.value * alpha / l; + node.vy += y * quad.value * alpha / l; + } + return true; + } + + // Otherwise, process points directly. + else if (quad.length || l >= distanceMax2) return; + + // Limit forces for very close nodes; randomize direction if coincident. + if (quad.data !== node || quad.next) { + if (x === 0) x = jiggle(), l += x * x; + if (y === 0) y = jiggle(), l += y * y; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + } + + do if (quad.data !== node) { + w = strengths[quad.data.index] * alpha / l; + node.vx += x * w; + node.vy += y * w; + } while (quad = quad.next); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant$4(+_), 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; + } + + function forceRadial(radius, x, y) { + var nodes, + strength = constant$4(0.1), + strengths, + radiuses; + + if (typeof radius !== "function") radius = constant$4(+radius); + if (x == null) x = 0; + if (y == null) y = 0; + + function force(alpha) { + for (var i = 0, n = nodes.length; i < n; ++i) { + var node = nodes[i], + dx = node.x - x || 1e-6, + dy = node.y - y || 1e-6, + r = Math.sqrt(dx * dx + dy * dy), + k = (radiuses[i] - r) * strengths[i] * alpha / r; + node.vx += dx * k; + node.vy += dy * k; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + radiuses = new Array(n); + for (i = 0; i < n; ++i) { + radiuses[i] = +radius(nodes[i], i, nodes); + strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _, initialize(); + }; + + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : constant$4(+_), initialize(), force) : strength; + }; + + force.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : constant$4(+_), initialize(), force) : radius; + }; + + force.x = function(_) { + return arguments.length ? (x = +_, force) : x; + }; + + force.y = function(_) { + return arguments.length ? (y = +_, force) : y; + }; + + return force; + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var fetchJsonp = createCommonjsModule(function (module, exports) { + (function (global, factory) { + { + factory(exports, module); + } + })(commonjsGlobal, function (exports, module) { + + var defaultOptions = { + timeout: 5000, + jsonpCallback: 'callback', + jsonpCallbackFunction: null + }; + + function generateCallbackFunction() { + return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000); + } + + function clearFunction(functionName) { + // IE8 throws an exception when you try to delete a property on window + // http://stackoverflow.com/a/1824228/751089 + try { + delete window[functionName]; + } catch (e) { + window[functionName] = undefined; + } + } + + function removeScript(scriptId) { + var script = document.getElementById(scriptId); + if (script) { + document.getElementsByTagName('head')[0].removeChild(script); + } + } + + function fetchJsonp(_url) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // to avoid param reassign + var url = _url; + var timeout = options.timeout || defaultOptions.timeout; + var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback; + + var timeoutId = undefined; + + return new Promise(function (resolve, reject) { + var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction(); + var scriptId = jsonpCallback + '_' + callbackFunction; + + window[callbackFunction] = function (response) { + resolve({ + ok: true, + // keep consistent with fetch API + json: function json() { + return Promise.resolve(response); + } + }); + + if (timeoutId) clearTimeout(timeoutId); + + removeScript(scriptId); + + clearFunction(callbackFunction); + }; + + // Check if the user set their own params, and if not add a ? to start a list of params + url += url.indexOf('?') === -1 ? '?' : '&'; + + var jsonpScript = document.createElement('script'); + jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction); + if (options.charset) { + jsonpScript.setAttribute('charset', options.charset); + } + jsonpScript.id = scriptId; + document.getElementsByTagName('head')[0].appendChild(jsonpScript); + + timeoutId = setTimeout(function () { + reject(new Error('JSONP request to ' + _url + ' timed out')); + + clearFunction(callbackFunction); + removeScript(scriptId); + window[callbackFunction] = function () { + clearFunction(callbackFunction); + }; + }, timeout); + + // Caught if got 404/500 + jsonpScript.onerror = function () { + reject(new Error('JSONP request to ' + _url + ' failed')); + + clearFunction(callbackFunction); + removeScript(scriptId); + if (timeoutId) clearTimeout(timeoutId); + }; + }); + } + + // export as global function + /* + let local; + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + local.fetchJsonp = fetchJsonp; + */ + + module.exports = fetchJsonp; + }); + }); + + var eventemitter3 = createCommonjsModule(function (module) { + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ + function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; + } + + /** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; + }; + + /** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); + }; + + /** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); + }; + + /** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + { + module.exports = EventEmitter; + } + }); + + var EOL = {}, + EOF = {}, + QUOTE = 34, + NEWLINE = 10, + RETURN = 13; + + function objectConverter(columns) { + return new Function("d", "return {" + columns.map(function(name, i) { + return JSON.stringify(name) + ": d[" + i + "]"; + }).join(",") + "}"); + } + + function customConverter(columns, f) { + var object = objectConverter(columns); + return function(row, i) { + return f(object(row), i, columns); + }; + } + + // Compute unique columns in order of discovery. + function inferColumns(rows) { + var columnSet = Object.create(null), + columns = []; + + rows.forEach(function(row) { + for (var column in row) { + if (!(column in columnSet)) { + columns.push(columnSet[column] = column); + } + } + }); + + return columns; + } + + function pad(value, width) { + var s = value + "", length = s.length; + return length < width ? new Array(width - length + 1).join(0) + s : s; + } + + function formatYear(year) { + return year < 0 ? "-" + pad(-year, 6) + : year > 9999 ? "+" + pad(year, 6) + : pad(year, 4); + } + + function formatDate(date) { + var hours = date.getUTCHours(), + minutes = date.getUTCMinutes(), + seconds = date.getUTCSeconds(), + milliseconds = date.getUTCMilliseconds(); + return isNaN(date) ? "Invalid Date" + : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) + + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" + : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" + : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" + : ""); + } + + function dsvFormat(delimiter) { + var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), + DELIMITER = delimiter.charCodeAt(0); + + function parse(text, f) { + var convert, columns, rows = parseRows(text, function(row, i) { + if (convert) return convert(row, i - 1); + columns = row, convert = f ? customConverter(row, f) : objectConverter(row); + }); + rows.columns = columns || []; + return rows; + } + + function parseRows(text, f) { + var rows = [], // output rows + N = text.length, + I = 0, // current character index + n = 0, // current line number + t, // current token + eof = N <= 0, // current token followed by EOF? + eol = false; // current token followed by EOL? + + // Strip the trailing newline. + if (text.charCodeAt(N - 1) === NEWLINE) --N; + if (text.charCodeAt(N - 1) === RETURN) --N; + + function token() { + if (eof) return EOF; + if (eol) return eol = false, EOL; + + // Unescape quotes. + var i, j = I, c; + if (text.charCodeAt(j) === QUOTE) { + while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); + if ((i = I) >= N) eof = true; + else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; + else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } + return text.slice(j + 1, i - 1).replace(/""/g, "\""); + } + + // Find next delimiter or newline. + while (I < N) { + if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; + else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } + else if (c !== DELIMITER) continue; + return text.slice(j, i); + } + + // Return last token before EOF. + return eof = true, text.slice(j, N); + } + + while ((t = token()) !== EOF) { + var row = []; + while (t !== EOL && t !== EOF) row.push(t), t = token(); + if (f && (row = f(row, n++)) == null) continue; + rows.push(row); + } + + return rows; + } + + function preformatBody(rows, columns) { + return rows.map(function(row) { + return columns.map(function(column) { + return formatValue(row[column]); + }).join(delimiter); + }); + } + + function format(rows, columns) { + if (columns == null) columns = inferColumns(rows); + return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); + } + + function formatBody(rows, columns) { + if (columns == null) columns = inferColumns(rows); + return preformatBody(rows, columns).join("\n"); + } + + function formatRows(rows) { + return rows.map(formatRow).join("\n"); + } + + function formatRow(row) { + return row.map(formatValue).join(delimiter); + } + + function formatValue(value) { + return value == null ? "" + : value instanceof Date ? formatDate(value) + : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" + : value; + } + + return { + parse: parse, + parseRows: parseRows, + format: format, + formatBody: formatBody, + formatRows: formatRows + }; + } + + var csv = dsvFormat(","); + + var tsv = dsvFormat("\t"); + + function responseJson(response) { + if (!response.ok) throw new Error(response.status + " " + response.statusText); + return response.json(); + } + + function json(input, init) { + return fetch(input, init).then(responseJson); + } + + // import { json } from 'd3-fetch'; + + class ForceNet { + + constructor (symbols) { + var width = 600, + height = 600; + + this.symbols = symbols || {}; + this.events = new eventemitter3(); + this.active_page = null; + // this.nodes = {}; + this.simulation = forceSimulation() + .velocityDecay(0.1) + .force("link", forceLink().id(d => d.title)) + .force("charge", forceManyBody()) + .force("radial", forceRadial(180, width/2, height/2)); + // .force("center", forceCenter(width / 2, height / 2)); + this.svg = null; + // this.historylinks = {}; + } + + on (message, callback, context) { + this.events.on(message, callback, context); + } + + init_svg (svg) { + this.svg = select(svg || "svg"); + this.zoom = zoom() + .scaleExtent([1 / 16, 4]) + .on("zoom", () => { + this.content.attr("transform", event.transform); + // console.log("transform", event.transform, this.content.attr("transform")); + }); + this.rect = this.svg.append("rect") + .attr("width", 1000) + .attr("height", 1000) + .style("fill", "none") + .style("pointer-events", "all") + .call(this.zoom); + this.content = this.svg.append("g") + .attr("id", "content"), + this.linksg = this.content.append("g") + .attr("class", "links"); + this.nodesg = this.content.append("g") + .attr("class", "nodes"); + } + + dragstarted (d) { + if (!event.active) this.simulation.alphaTarget(0.3).restart(); + d.fx = d.x; + d.fy = d.y; + } + + dragged (d) { + d.fx = event.x; + d.fy = event.y; + } + + dragended(d) { + if (!event.active) this.simulation.alphaTarget(0); + d.fx = null; + d.fy = null; + } + + link_key (a, b) { + return (a < b) ? ("link_"+a+"_"+b) : ("link_"+b+"_"+a); + } + + get_symbol (d, def) { + for (var i=0, l=d.cats.length; i { return this.link_key(d.source.title, d.target.title) }); + var link_enter = link.enter() + .append("line"); + + link.exit().each(d => { + d.source.linked = false; + d.target.linked = false; + }).remove(); + + link_enter.merge(link).each(d => { + d.source.linked = true; + d.target.linked = true; + }); + + var node = this.nodesg + .selectAll("g.page") + .data(graph.nodes, function (d) { return d.title }); + + var that = this; + var node_enter = node.enter().append("g") + .attr("class", "page") + // .attr("class", d=>"page "+this.wiki.get_ns_classname(d.ns)) + .on("click", function(d) { + that.events.emit("nodeclick", d, this); + // this.set_active_node(d.title); + }) + .on("mouseover", function (d) { + // console.log("mouseover", this); + select(this).classed("mouse", true); + }) + .on("mouseout", function (d) { + // console.log("mouseout", this); + select(this).classed("mouse", false); + }) + .call(drag() + .on("start", this.dragstarted.bind(this)) + .on("drag", this.dragged.bind(this)) + .on("end", this.dragended.bind(this))); + + node_enter.append("use") + .attr("xlink:href", d => this.get_symbol(d, "default")) + .attr("class", "testcolor"); + // { + // for (var i=0, l=d.cats.length; i d.title) + .attr("x", 10); + + //node_enter.append("title") + // .text(function(d) { return d.title; }); + + node = node_enter.merge(node); + link = link_enter.merge(link); + + node.classed("active", d=>d.active); + + this.simulation + .nodes(graph.nodes) + .on("tick", ticked); + + this.simulation.force("link") + .links(graph.links); + + this.simulation.force("radial").radius(d => d.linked ? null : 200); + + function ticked() { + link + .attr("x1", function(d) { return d.source.x; }) + .attr("y1", function(d) { return d.source.y; }) + .attr("x2", function(d) { return d.target.x; }) + .attr("y2", function(d) { return d.target.y; }); + + // node + // .attr("cx", function(d) { return d.x; }) + // .attr("cy", function(d) { return d.y; }); + node + .attr("transform", d => `translate(${d.x},${d.y})`); + } + this.update_nodes(); + this.update_forces(); + // this.simulation.alphaTarget(0.3).restart(); + } + + update_nodes () { + var nodes = this.nodesg.selectAll("g.page"); + console.log("update_nodes", nodes.size()); + nodes.classed("active", d=>d.active); + nodes.classed("active2", d=>d.active2); + nodes.classed("highlight", d=>d.highlight); + nodes.sort((a, b) => { + // console.log("sort", a, b); + var x = a.active ? 10 : (a.active2 ? 5 : 0), + y = b.active ? 10 : (b.active2 ? 5 : 0); + return x - y; + }); + var links = this.linksg.selectAll("line"); + links.classed("active2", d=>d.active2); + links.classed("history", d=>d.type == "history"); + links.sort((a, b) => { + // console.log("sort", a, b); + var x = a.active2 ? 10 : (a.history ? 5 : 0), + y = b.active2 ? 10 : (b.history ? 5 : 0); + return x - y; + }); + } + + update_forces () { + var force = this.simulation.force("link"); + console.log("update_forces:force", force); + this.simulation.force("link").strength(d => { + if (d.source.active || d.target.active) { + return 1; + } else { + // same as d3.force's defaultStrength + return 0.5 * (1 / Math.min(d.source.count, d.target.count)); + } + }); + this.simulation.alphaTarget(0.3).restart(); + } + + + } + + class SimpleMap { + + constructor (symbols) { + + this.events = new eventemitter3(); + this.active_page = null; + // this.nodes = {}; + this.symbols = symbols; + this.net = new ForceNet(symbols); + this.net.on("nodeclick", this.nodeclick.bind(this)); + // this.simulation = forceSimulation() + // .velocityDecay(0.1) + // .force("link", forceLink().id(d => d.title)) + // .force("charge", forceManyBody()) + // .force("radial", forceRadial(180, width/2, height/2)); + // // .force("center", forceCenter(width / 2, height / 2)); + this.svg = null; + this.historylinks = {}; + this.links = null; + this.highlight_category = null; + this.show_history = false; + } + + nodeclick (d, elt) { + console.log("nodeclick", d, elt, this); + this.set_active_node(d, elt); + } + + init_svg (svg) { + this.net.init_svg(svg); + } + + async load_json (source) { + var data = await json(source); + + // index the nodes by title, init link-arity count + var index = {}; + this.nodes_by_title = index; + for (let i=0, l=data.nodes.length; i { + var source = index[x.source], + target = index[x.target]; + if (source === undefined) { + console.log("bad source", x.source); + return; + } + if (target === undefined) { + console.log("bad target", x.target); + return; + } + source.count += 1; + target.count += 1; + use_links.push({ source: source, target: target }); + }); + data.links = use_links; + this.links = data.links; + // console.log("data", data); + // calculate the node sizes (link arity) + this.net.update_graph(data); + } + + get_symbol_image_path (cname) { + var symbol = this.symbols[cname]; + if (symbol) { + let hpos = symbol.indexOf("#"), + rest = symbol.substr(hpos+1); + rest = rest.replace(/'/g, ''); + return "img/"+rest+".png"; + } + } + async load_cats (src, elt) { + var data = await json(src); + + console.log("indexing categories by title"); + var cats_by_title = {}; + for (let i=0, l=data.length; i d.tcount > 0); + console.log("post filter", data.length); + console.log("load_cats.data", data, elt); + var cat = select(elt) + .selectAll("div.cat") + .data(data) + .enter() + .append("div") + .attr("class", "cat"); + cat.classed("icon", d => this.get_symbol_image_path(d.title)); + cat.append("span").attr("class", "icon").filter(d=> this.get_symbol_image_path(d.title)).style("background-image", d => "url("+this.get_symbol_image_path(d.title)+")"); + cat.append("span").attr("class", "spacing").html(d => { + var d = d.depth, + ret = ""; + while(d) { + ret += "    "; + d-=1; + } + return ret; + }); + cat.append("a").attr("class", "label").html(d => d.title).attr("href", "#").on("click", d => { + event.preventDefault(); + this.category_click(d); + }); + cat.append("span").attr("class", "count").html(d => d.tcount); + } + + category_click (d) { + console.log("category click", d); + if (this.highlight_category) { + // cleanup old pages + this.highlight_category.pages.forEach(d => d.highlight = false); + } + this.highlight_category = d; + this.highlight_category.pages.forEach(d => d.highlight = true); + this.net.update_nodes(); + // set highlight category... + // all nodes with this category get .highlight = true + // make a category index ?! + } + + on (message, callback, context) { + this.events.on(message, callback, context); + } + + /* OLD STYLE with node.all_links + walk (node, links) { + var links_seen = {}; + // var node = this.ensure_node(nodename); + node.all_links.forEach(x => { + var link_key = this.link_key(node.title, x.title); + if (!links_seen[link_key]) { + links.push({source: node, target: x}); + links_seen[link_key] = true; + } + }) + return; + } + */ + set_active_title (title) { + this.set_active_node(title); + } + + activate_linked_nodes (page, active) { + // deactivate linked links/nodes + for (let i=0, l=this.links.length; i { + graph.links.push(x); + }) + // graph.links = titles.map(t => ({source: pagetitle, target: t})); + this.update_graph(graph); + // console.log("GOT DATA", titles); + // return titles; + } + */ + } + + + + // http://erg.activearchives.org/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + // http://erg.activearchives.org/w/api.php?action=query&prop=info&titles=Main%20Page + // Bienvenue_à_l’erg + // http://erg.activearchives.org/mw/index.php/Bienvenue_%C3%A0_l%E2%80%99erg + + exports.SimpleMap = SimpleMap; + + return exports; + +}({})); diff --git a/img/Ateliers_pluridisciplinaires.png b/img/Ateliers_pluridisciplinaires.png new file mode 100644 index 0000000..7af95f0 Binary files /dev/null and b/img/Ateliers_pluridisciplinaires.png differ diff --git a/img/Cours_de_soutien_a_lorientation.png b/img/Cours_de_soutien_a_lorientation.png new file mode 100644 index 0000000..f648128 Binary files /dev/null and b/img/Cours_de_soutien_a_lorientation.png differ diff --git a/img/Cours_de_soutien_specifique.png b/img/Cours_de_soutien_specifique.png new file mode 100644 index 0000000..7a245ef Binary files /dev/null and b/img/Cours_de_soutien_specifique.png differ diff --git a/img/Cours_techniques.png b/img/Cours_techniques.png new file mode 100644 index 0000000..faec804 Binary files /dev/null and b/img/Cours_techniques.png differ diff --git a/img/Cours_theoriques.png b/img/Cours_theoriques.png new file mode 100644 index 0000000..b99f05a Binary files /dev/null and b/img/Cours_theoriques.png differ diff --git a/img/Enseignants.png b/img/Enseignants.png new file mode 100644 index 0000000..db5458d Binary files /dev/null and b/img/Enseignants.png differ diff --git a/img/Main.png b/img/Main.png new file mode 100644 index 0000000..6e68397 Binary files /dev/null and b/img/Main.png differ diff --git a/img/Orientations.png b/img/Orientations.png new file mode 100644 index 0000000..b3a65e4 Binary files /dev/null and b/img/Orientations.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..1bda99b --- /dev/null +++ b/index.html @@ -0,0 +1,84 @@ + + + + + + + + +
+ +
+
+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/map.html b/map.html new file mode 100644 index 0000000..9f20fb8 --- /dev/null +++ b/map.html @@ -0,0 +1,153 @@ + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+
+
+
Liste des catégories
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..71ac795 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,29 @@ +// rollup.config.js +// https://github.com/rollup/rollup-plugin-commonjs +import commonjs from 'rollup-plugin-commonjs'; +import resolve from 'rollup-plugin-node-resolve'; + +export default [{ + input: 'src/wikimap.js', + output: { + file: 'dist/wikimap.js', + format: 'iife', + name: 'wikimap' + }, + plugins: [ + resolve(), + commonjs() + ] +},{ + input: 'src/wikimaptotal.js', + output: { + file: 'dist/wikimaptotal.js', + format: 'iife', + name: 'wikimap' + }, + plugins: [ + resolve(), + commonjs() + ] +} +]; \ No newline at end of file diff --git a/scripts/build_html_with_svg.py b/scripts/build_html_with_svg.py new file mode 100644 index 0000000..3e9effc --- /dev/null +++ b/scripts/build_html_with_svg.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +from __future__ import print_function +import argparse, sys, json, time, os +from jinja2 import Template, DictLoader, Environment, FileSystemLoader + +ap = argparse.ArgumentParser("template + svg = interface") +ap.add_argument("template") +ap.add_argument("svg") +ap.add_argument("--output", type=argparse.FileType('w'), default=sys.stdout) +args = ap.parse_args() + +tpath, tname = os.path.split(args.template) +env = Environment(loader=FileSystemLoader(tpath)) +import jinjafilters +for name, fn in jinjafilters.all.items(): + env.filters[name] = fn + +from xml.etree import ElementTree as ET + +ET.register_namespace("","http://www.w3.org/2000/svg") +ET.register_namespace("xlink","http://www.w3.org/1999/xlink") +with open(args.svg) as f: + svgt = ET.parse(f) + # print ("svgt", svgt) + svg_root = svgt.getroot() + svg_root.attrib['xmlns:xlink'] = 'http://www.w3.org/1999/xlink' + del svg_root.attrib['viewBox'] + svg = ET.tostring(svgt.getroot(), method="xml") + +tvars = {'svg': svg} +template = env.get_template(tname) +print (template.render(**tvars).encode("utf-8"), file=args.output) diff --git a/scripts/buildsitemap.py b/scripts/buildsitemap.py new file mode 100644 index 0000000..0b3c4d9 --- /dev/null +++ b/scripts/buildsitemap.py @@ -0,0 +1,105 @@ +from mwclient import Site, APIError +from mwclient.page import Page +import argparse, json, sys + +ap = argparse.ArgumentParser("") +ap.add_argument("--wikiprotocol", default="http") +ap.add_argument("--wikihost", default="localhost") +ap.add_argument("--wikipath", default="/mw/") +ap.add_argument("--limit", default=None) +ap.add_argument("--output", default=sys.stdout, type=argparse.FileType('w')) +# ap.add_argument("--user", default=None) +# ap.add_argument("--password", default=None) +args = ap.parse_args() + +site = Site((args.wikiprotocol, args.wikihost), path=args.wikipath) + + +def category_subcats (site, cattitle, objects=True): + cmcontinue = None + ret = [] + while True: + if cmcontinue == None: + resp = site.api("query", list="categorymembers", cmtitle=cattitle, cmtype="subcat", cmlimit=50) + else: + resp = site.api("query", list="categorymembers", cmtitle=cattitle, cmtype="subcat", cmlimit=50, cmcontinue=cmcontinue) + ret.extend([x['title'] for x in resp['query']['categorymembers']]) + if 'continue' in resp: + cmcontinue = resp['continue']['cmcontinue'] + else: + break + if objects: + # print "converting to page objects ({0})".format(len(ret)) + ret = [site.pages[x] for x in ret] + return ret + +""" +>>> c.page_title +'Équipes' +>>> c.name +'Catégorie:Équipes' +""" +""" +graph = { + nodes: [ + {name: "Bienvenue"} + ] + links: [ + {source: "name", target: "name2"} + ] +} +""" +redirects = {} +pages = [] +count = 0 +all_links = set() +page_exists = {} + +def resolve (x): + while x in redirects: + x = redirects[x] + return x + +print ("Pass 1") +for p in site.allpages(): + r = p.redirects_to() + if (r): + redirects[p.name] = r.name + else: + page_exists[p.name] = True + +print ("Pass 2") +# pages_by_title = {} +for p in site.allpages(): + if (p.name in redirects): + continue + pd = {} + pd['title'] = p.page_title + pd['ns'] = 0 + print ("Page {0}".format(p.name), file=sys.stderr) + + # categories + cats = [c.page_title for c in p.categories()] + pd['cats'] = cats + + # links + links = [x for x in p.links() if x.namespace == 0] + links = [resolve(x.name) for x in links] + links = [x for x in links if x in page_exists] + for l in links: + if p.name < l: + link = (p.name, l) + else: + link = (l, p.name) + all_links.add(link) + + pages.append(pd) + count += 1 + if args.limit and count >= args.limit: + break + +graph = {} +graph['nodes'] = pages +graph['links'] = [{'source': a, 'target': b} for a, b in all_links] +graph['redirects'] = redirects +print (json.dumps(graph, indent=2), file=args.output) diff --git a/scripts/categories.py b/scripts/categories.py new file mode 100644 index 0000000..97e05cc --- /dev/null +++ b/scripts/categories.py @@ -0,0 +1,91 @@ +from mwclient import Site, APIError +from mwclient.page import Page +import argparse, json, sys + +import unidecode +# unaccented_string = unidecode.unidecode(accented_string) + +ap = argparse.ArgumentParser("") +ap.add_argument("--wikiprotocol", default="http") +ap.add_argument("--wikihost", default="localhost") +ap.add_argument("--wikipath", default="/mw/") +ap.add_argument("--limit", default=None) +ap.add_argument("--output", default=sys.stdout, type=argparse.FileType('w')) +# ap.add_argument("--user", default=None) +# ap.add_argument("--password", default=None) +args = ap.parse_args() + +site = Site((args.wikiprotocol, args.wikihost), path=args.wikipath) + +def category_subcats (site, cattitle, objects=True): + cmcontinue = None + ret = [] + while True: + if cmcontinue == None: + resp = site.api("query", list="categorymembers", cmtitle=cattitle, cmtype="subcat", cmlimit=50) + else: + resp = site.api("query", list="categorymembers", cmtitle=cattitle, cmtype="subcat", cmlimit=50, cmcontinue=cmcontinue) + ret.extend([x['title'] for x in resp['query']['categorymembers']]) + if 'continue' in resp: + cmcontinue = resp['continue']['cmcontinue'] + else: + break + if objects: + # print "converting to page objects ({0})".format(len(ret)) + ret = [site.pages[x] for x in ret] + return ret + +def strip_namespace (x): + if ":" in x: + return x.split(":", 1)[1] + return x + +cats = list(site.allcategories()) +cats.sort(key=lambda x: unidecode.unidecode(x.name)) +# cats_by_name = {} +cats = [{ 'title': cat.page_title, 'name': cat.name } for cat in cats] +index = {} +for c in cats: + index[c['title']] = c + +for c in cats: + sc = category_subcats(site, c['name'], objects=False) + sc = [strip_namespace(x) for x in sc] + if sc: + for subcat in sc: + subcat = index[subcat] + if 'parent' not in subcat: + subcat['parent'] = c + +def make_hierarchy (items): + root = {'children': []} + for item in items: + if 'parent' in item: + if 'children' not in item['parent']: + item['parent']['children'] = [] + item['parent']['children'].append(item) + item['parent'] = item['parent']['title'] + # del item['parent'] + else: + root['children'].append(item) + return root + +def flatten (root, depth=0): + for x in root['children']: + r = {'title': x['title'], 'name': x['name'], 'depth': depth} + if 'parent' in x: + r['parent'] = x['parent'] + yield(r) + if 'children' in x: + for item in flatten(x, depth+1): + yield item + +import json +root = make_hierarchy(cats) +#print (json.dumps(root, indent=2), file=args.output) + +flat = list(flatten(root)) +print (json.dumps(flat, indent=2), file=args.output) + + + diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..e18cf2b --- /dev/null +++ b/sitemap.json @@ -0,0 +1,6116 @@ +{ + "links": [ + { + "source": "Artistic Practices and Scientific Complexity", + "target": "Kobe Matthys" + }, + { + "source": "Drawing", + "target": "Rapha\u00ebl Van Lerberghe" + }, + { + "source": "Narration - Atelier pluridisciplinaire (B1)", + "target": "St\u00e9phane No\u00ebl" + }, + { + "source": "20.000 images sous les yeux", + "target": "Sabine Voglaire" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Nicolas Prignot" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Simona Denicolai" + }, + { + "source": "20.000 images sous les yeux", + "target": "J\u00e9r\u00f4me Degive" + }, + { + "source": "Fr\u00e9d\u00e9ric Gaillard", + "target": "Sculpture Art" + }, + { + "source": "Bachelors", + "target": "Illustration (BA)" + }, + { + "source": "Damien Safie", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Bachelors", + "target": "Typographie (BA)" + }, + { + "source": "Genevi\u00e8ve Casterman", + "target": "LoopRoom - Micro Narrative" + }, + { + "source": "Bachelors", + "target": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 1er bloc du 1er cycle (60 cr\u00e9dits) - B1" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Manu Blondiau" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "Rencontres autour de travaux d'\u00e9tudiants" + }, + { + "source": "Graphisme (BA)", + "target": "Je t\u2019aime, moi non plus (Six le\u00e7ons sur l\u2019image et le texte)" + }, + { + "source": "Le calendrier acad\u00e9mique", + "target": "Pour les \u00e9tudiants" + }, + { + "source": "Je ne construis pas - \u00c9criture mat\u00e9riau \u2013 mat\u00e9riau d\u2019\u00e9criture", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Webring P2P Client, server, auteur sur le web peer to peer", + "target": "Winter School" + }, + { + "source": "Fleur Courtois", + "target": "Theoretical courses" + }, + { + "source": "Digital arts / Coding", + "target": "Marc Wathieu" + }, + { + "source": "Caroline Dath", + "target": "\u00c0 propos" + }, + { + "source": "St\u00e9phanie Vilayphiou", + "target": "Ustensiles num\u00e9riques" + }, + { + "source": "Bande dessin\u00e9e", + "target": "Bande dessin\u00e9e (MA)" + }, + { + "source": "Gilbert Fastenaekens", + "target": "Photographie (MA)" + }, + { + "source": "Gilbert Fastenaekens", + "target": "Photographie (BA)" + }, + { + "source": "Laurent Baudoux", + "target": "Visual and Graphic Communication" + }, + { + "source": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo", + "target": "Typographie (BA)" + }, + { + "source": "Ateliers pluridisciplinaires (MA)", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "Cin\u00e9ma d'animation", + "target": "Cin\u00e9ma d\u2019animation (BA)" + }, + { + "source": "Caroline Dath", + "target": "Teaching To Transgress" + }, + { + "source": "Dessin modulaire", + "target": "Sabine Voglaire" + }, + { + "source": "Ludivine Loiseau", + "target": "Typography" + }, + { + "source": "Arts num\u00e9riques (BA)", + "target": "Bachelors" + }, + { + "source": "Eleanor Ivory Weber", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "Monique Renault", + "target": "Theoretical courses" + }, + { + "source": "Loraine Furter", + "target": "\u00c9tude des artefacts (M1-M2)" + }, + { + "source": "Manu Blondiau", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Informations utiles", + "target": "L\u2019enseignement inclusif \u00e0 l\u2019erg" + }, + { + "source": "Giovanni Guarini", + "target": "Wall In Progress" + }, + { + "source": "Laurent Baudoux", + "target": "Technical courses" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Peinture (BA)" + }, + { + "source": "Bande dessin\u00e9e (BA)", + "target": "Olivier Grenson" + }, + { + "source": "Peggy Pierrot", + "target": "Th\u00e9orie de la communication (M1-M2)" + }, + { + "source": "Creux et relief / mixte technique / aquatinte morsure directe et xylogravure", + "target": "Dani\u00e8le Leclercq" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Bachelors", + "target": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)" + }, + { + "source": "Orientations at erg", + "target": "Visual and Graphic Communication" + }, + { + "source": "Outils techniques", + "target": "Ustensiles num\u00e9riques" + }, + { + "source": "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art (M2)", + "target": "Catherine Mayeur" + }, + { + "source": "Ateliers pluridisciplinaires (BA)", + "target": "Narration - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Lionel Maes", + "target": "Pierre-Philippe Duch\u00e2telet" + }, + { + "source": "Technical courses", + "target": "Xavier Garc\u00eda Bard\u00f3n" + }, + { + "source": "Installation/Performance", + "target": "Installation/Performance (BA)" + }, + { + "source": "Fr\u00e9d\u00e9ric Dupont", + "target": "Outils et pratiques audiovisuels" + }, + { + "source": "Ateliers pluridisciplinaires : Narration", + "target": "Narration - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Ivo Provoost", + "target": "Orly - les man\u0153uvres du ventriloque" + }, + { + "source": "Alain Goffin", + "target": "Bande dessin\u00e9e (MA)" + }, + { + "source": "Typographie", + "target": "Typographie (BA)" + }, + { + "source": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)", + "target": "Rencontres autour de travaux d'\u00e9tudiants" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Graphisme (BA)" + }, + { + "source": "Sculpture", + "target": "Sculpture (MA)" + }, + { + "source": "Giampiero Caiti", + "target": "Je t\u2019aime, moi non plus (Six le\u00e7ons sur l\u2019image et le texte)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Photographie (BA)" + }, + { + "source": "Calendrier acad\u00e9mique", + "target": "Informations utiles" + }, + { + "source": "Cin\u00e9ma-vid\u00e9o (B2)", + "target": "In\u00e8s Rabad\u00e1n" + }, + { + "source": "Bande dessin\u00e9e (BA)", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Dessin de caract\u00e8res : \u00e0 pleins renvers\u00e9s", + "target": "Renaud Huberlant" + }, + { + "source": "Fa, fe, fo, fr, fs, ft, fb, fh, fu, fy", + "target": "Marie-Christophe Lambert" + }, + { + "source": "Manoeuvres s\u00e9rigraphiques", + "target": "Orly - les man\u0153uvres du ventriloque" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Lionel Maes" + }, + { + "source": "Maxime Lambrecht", + "target": "Theoretical courses" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Peinture (BA)" + }, + { + "source": "Image num\u00e9rique", + "target": "St\u00e9phane No\u00ebl" + }, + { + "source": "Dessin", + "target": "Dessin (MA)" + }, + { + "source": "Antoine Meyer", + "target": "Photography" + }, + { + "source": "Ab\u00e9c\u00e9daire et autres lieux", + "target": "Carolina Serra" + }, + { + "source": "In\u00e8s Rabad\u00e1n", + "target": "Technical courses" + }, + { + "source": "Admission 2019-2020", + "target": "Informations utiles" + }, + { + "source": "Le r\u00e8glement des \u00e9tudes", + "target": "Pour les \u00e9tudiants" + }, + { + "source": "Dessin / le fait main num\u00e9rique", + "target": "St\u00e9phanie Vilayphiou" + }, + { + "source": "Narration - Atelier pluridisciplinaire (B1)", + "target": "Photographie (BA)" + }, + { + "source": "Le stage interne", + "target": "S\u00e9rigraphie" + }, + { + "source": "A sitcom workshop", + "target": "Alexander Schellow" + }, + { + "source": "Pratiques Num\u00e9riques B2-B3", + "target": "Programmation num\u00e9rique" + }, + { + "source": "Admission Bachelor 1", + "target": "CAS 2" + }, + { + "source": "Workshop Rideau de perles Erg-bookscanner", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Dessin modulaire" + }, + { + "source": "Outils techniques", + "target": "Son (B2)" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Le blog de multimedialab.be" + }, + { + "source": "Brigitte Ledune", + "target": "Ecriture / cr\u00e9ation textuelle (B3)" + }, + { + "source": "H\u00e9l\u00e8ne Bernard", + "target": "Outils et pratiques audiovisuels" + }, + { + "source": "Alexia de Visscher", + "target": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)" + }, + { + "source": "Alain Goffin", + "target": "Je t\u2019aime, moi non plus (Six le\u00e7ons sur l\u2019image et le texte)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Marie Feyereisen" + }, + { + "source": "AP dramaturgie BAC 1", + "target": "St\u00e9phane No\u00ebl" + }, + { + "source": "Curlybraces", + "target": "Programmation num\u00e9rique" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Ateliers pluridisciplinaires : Media" + }, + { + "source": "Chlo\u00e9 Malcotti", + "target": "Videography" + }, + { + "source": "Contact", + "target": "Informations utiles" + }, + { + "source": "Carolina Serra", + "target": "Sciences humaines et sociales / anthropologie (B2)" + }, + { + "source": "Erg Graphisme Master", + "target": "Graphisme (MA)" + }, + { + "source": "Ateliers pluridisciplinaires : Media", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Permanence quotidienne assur\u00e9e par Rapha\u00ebl Pirenne.", + "target": "Winter School" + }, + { + "source": "Ateliers pluridisciplinaires : Media", + "target": "Media - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Christophe Wavelet", + "target": "Rencontres autour de travaux d'\u00e9tudiants" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Photographie (BA)" + }, + { + "source": "Renaud Huberlant", + "target": "Typographie Master 2" + }, + { + "source": "Marie Feyereisen", + "target": "Orly - les man\u0153uvres du ventriloque" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Ateliers pluridisciplinaires (BA)" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Orientations at erg" + }, + { + "source": "Antoine Meyer", + "target": "Photographie (BA)" + }, + { + "source": "Illustration", + "target": "Illustration (BA)" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "S\u00e9minaire Vid\u00e9o" + }, + { + "source": "Alain Goffin", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Como Abrir Um Site De Vendas", + "target": "The Networked Social" + }, + { + "source": "Du concept \u00e9ditorial \u00e0 l'impression", + "target": "Isabelle Jossa" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Contact" + }, + { + "source": "Orientations at erg", + "target": "Sculpture Art" + }, + { + "source": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo", + "target": "Visual and Graphic Communication" + }, + { + "source": "Workshop Tarot Souriau", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "In\u00e8s Rabad\u00e1n", + "target": "Narration - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 1er bloc du 1er cycle (60 cr\u00e9dits) - B1", + "target": "Programmes d'\u00e9tudes - Grilles de cours" + }, + { + "source": "Dessin modulaire", + "target": "Graphisme (BA)" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Vimeo" + }, + { + "source": "Atelier Pluridisciplinaire Media Bac 3", + "target": "Damien Safie" + }, + { + "source": "Guy Wouet\u00e9", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "S\u00e9minaire Vid\u00e9o", + "target": "Xavier Garc\u00eda Bard\u00f3n" + }, + { + "source": "Arts num\u00e9riques", + "target": "Arts num\u00e9riques (BA)" + }, + { + "source": "AP dramaturgie BAC 1", + "target": "Joanna Lorho" + }, + { + "source": "Guy Wouet\u00e9", + "target": "Theoretical courses" + }, + { + "source": "Laurent Baudoux", + "target": "New Poster Cult" + }, + { + "source": "Graphisme (BA)", + "target": "Une fabrique d\u2019images, un outil de pens\u00e9e" + }, + { + "source": "Maxime Jean-Baptiste", + "target": "Re*enacting Memories Of Struggles" + }, + { + "source": "Ab\u00e9c\u00e9daire et autres lieux", + "target": "Michela Sacchetto" + }, + { + "source": "Caroline Dath", + "target": "Graphisme (BA)" + }, + { + "source": "Theoretical courses", + "target": "Xavier Garc\u00eda Bard\u00f3n" + }, + { + "source": "Dani\u00e8le Leclercq", + "target": "Workshop gravure, Creux et relief / mixte technique / aquatinte morsure directe et xylogravure" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Formats, canons, gaufriers, en marge super max-width!" + }, + { + "source": "Chlo\u00e9 Malcotti", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Cultures num\u00e9riques", + "target": "Th\u00e9orie et pratique des nouvelles technologies / Cultures num\u00e9riques - une bo\u00eete \u00e0 outils (B1)" + }, + { + "source": "Loraine Furter", + "target": "Multiples agencements du politique" + }, + { + "source": "Vid\u00e9ographie", + "target": "Vid\u00e9ographie (MA)" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Multiples agencements du politique" + }, + { + "source": "David Evrard", + "target": "Sculpture Art" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Fr\u00e9d\u00e9ric Gaillard" + }, + { + "source": "Caroline Dath", + "target": "Digital non-binaire" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Interfaces \u00e9lectroniques" + }, + { + "source": "BAC ERG CVG", + "target": "Communication visuelle et graphique" + }, + { + "source": "Dessin modulaire", + "target": "Laurent Baudoux" + }, + { + "source": "Photographie", + "target": "Photographie (BA)" + }, + { + "source": "Caroline Dath", + "target": "Gender fluid : Bye bye binary \u2014 des imaginaires possibles autour d\u2019une typographie inclusive" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Sculpture (BA)" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Typographie (BA)" + }, + { + "source": "Fleur Courtois", + "target": "Workshop Tarot Souriau" + }, + { + "source": "Cin\u00e9ma-vid\u00e9o (B2)", + "target": "Outils techniques" + }, + { + "source": "Fabrique d\u2019images \u2013 Mythologies singuli\u00e8res", + "target": "Graphisme (BA)" + }, + { + "source": "Plan d'\u00e9tude interactif", + "target": "Workshop Juillet 2017" + }, + { + "source": "Caroline Dath", + "target": "Wall In Progress" + }, + { + "source": "Illustration (BA)", + "target": "Joanna Lorho" + }, + { + "source": "Catherine Mayeur", + "target": "Theoretical courses" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Photographie (BA)" + }, + { + "source": "Ressources", + "target": "Xml collection" + }, + { + "source": "Media - Atelier pluridisciplinaire (B3)", + "target": "Typographie (BA)" + }, + { + "source": "Les lieux", + "target": "Plancube" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Laurent Baudoux" + }, + { + "source": "Manon De Boer", + "target": "Vid\u00e9ographie (MA)" + }, + { + "source": "Multiples agencements du politique", + "target": "Pierre-Philippe Duch\u00e2telet" + }, + { + "source": "Hashich, in.", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Erg-succursale", + "target": "Installation/Performance (MA)" + }, + { + "source": "LOOP ROOM", + "target": "Winter School" + }, + { + "source": "Admission 2019-2020", + "target": "Admission Bachelor 1" + }, + { + "source": "Outils et pratiques audiovisuels", + "target": "Outils techniques" + }, + { + "source": "Fran\u00e7oise Tahon", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "St\u00e9phanie Vilayphiou", + "target": "Ustensiles" + }, + { + "source": "Pierre-Philippe Duch\u00e2telet", + "target": "Theoretical courses" + }, + { + "source": "Illustration (BA)", + "target": "Olivier Grenson" + }, + { + "source": "BREAKING NEWS!", + "target": "Manuela Dechamps Otamendi" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Arts num\u00e9riques (BA)" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Lotte Arndt" + }, + { + "source": "Communication visuelle et graphique", + "target": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)" + }, + { + "source": "Juan d\u2019Oultremont", + "target": "Orly - les man\u0153uvres du ventriloque" + }, + { + "source": "Peinture", + "target": "Peinture (BA)" + }, + { + "source": "Sabine Voglaire", + "target": "Visual and Graphic Communication" + }, + { + "source": "Arts num\u00e9riques (BA)", + "target": "Yves Bernard" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Dessin (BA)" + }, + { + "source": "Fran\u00e7oise Tahon", + "target": "Graphisme (MA)" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)" + }, + { + "source": "St\u00e9phane No\u00ebl", + "target": "Technical courses" + }, + { + "source": "Fabrique d\u2019images \u2013 Mythologies singuli\u00e8res", + "target": "Une fabrique d\u2019images, un outil de pens\u00e9e" + }, + { + "source": "Magali Michaux", + "target": "Theoretical courses" + }, + { + "source": "...gira nello spazio senza fine", + "target": "Anne Marquet" + }, + { + "source": "FDDDL", + "target": "Les lieux" + }, + { + "source": "Fran\u00e7ois De Jonge", + "target": "Outils et pratiques audiovisuels" + }, + { + "source": "Sven Augustijnen", + "target": "Theoretical courses" + }, + { + "source": "Caroline Van Damme", + "target": "Sciences humaines et sociales / psychanalyse (B3)" + }, + { + "source": "A sitcom workshop", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Marie Feyereisen", + "target": "S\u00e9rigraphie" + }, + { + "source": "Curlybraces", + "target": "Lionel Maes" + }, + { + "source": "Caroline Dath", + "target": "Du concept \u00e9ditorial \u00e0 l'impression" + }, + { + "source": "Vid\u00e9ographie", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Dessin de caract\u00e8res : \u00e0 pleins renvers\u00e9s", + "target": "Ludivine Loiseau" + }, + { + "source": "AP dramaturgie BAC 1", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Histoire et actualit\u00e9 des arts / m\u00e9dia (B1)", + "target": "Michela Sacchetto" + }, + { + "source": "Genevi\u00e8ve Casterman", + "target": "Illustration (BA)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Ateliers pluridisciplinaires (BA)" + }, + { + "source": "Typographie", + "target": "ZigzagAnimal" + }, + { + "source": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 1er cycle - B2-B3", + "target": "Programmes d'\u00e9tudes - Grilles de cours" + }, + { + "source": "Marie-No\u00eblle Boutin", + "target": "Photography" + }, + { + "source": "...gira nello spazio senza fine", + "target": "Photographie (BA)" + }, + { + "source": "Typographie (BA)", + "target": "Typographie - module" + }, + { + "source": "Fabrique d\u2019images \u2013 Mythologies singuli\u00e8res", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Bachelors", + "target": "Sculpture (BA)" + }, + { + "source": "Ludivine Loiseau", + "target": "Visual and Graphic Communication" + }, + { + "source": "Rapha\u00ebl Pirenne", + "target": "S\u00e9miologie (M1)" + }, + { + "source": "Marcel Berlanger", + "target": "Painting" + }, + { + "source": "Maryam Kolly", + "target": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques" + }, + { + "source": "LoopRoom - Micro Narrative", + "target": "Sylvie Bouteiller" + }, + { + "source": "Dessin modulaire", + "target": "Typographie (BA)" + }, + { + "source": "Giovanni Guarini", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Alexis Zimmer", + "target": "Nicolas Prignot" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Digital non-binaire" + }, + { + "source": "Nicolas Prignot", + "target": "Philosophie contemporaine (M1)" + }, + { + "source": "Droit de la Cr\u00e9ation et de l'Information", + "target": "Maxime Lambrecht" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Manu Blondiau" + }, + { + "source": "Isabelle Jossa", + "target": "Une fabrique d\u2019images, un outil de pens\u00e9e" + }, + { + "source": "Atelier Pluridisciplinaire Media Bac 3", + "target": "Isabelle Jossa" + }, + { + "source": "Alain Goffin", + "target": "Visual and Graphic Communication" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Giampiero Caiti" + }, + { + "source": "Florence Delhaye", + "target": "Man\u0153uvres s\u00e9rigraphiques" + }, + { + "source": "Graphisme (BA)", + "target": "New Poster Cult" + }, + { + "source": "Le stage interne", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Alain Goffin", + "target": "Typography" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Arts num\u00e9riques (BA)" + }, + { + "source": "Graphic Scores", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Digital non-binaire", + "target": "St\u00e9phanie Vilayphiou" + }, + { + "source": "St\u00e9phanie Vilayphiou", + "target": "Technical courses" + }, + { + "source": "Graphisme (BA)", + "target": "Media - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art (M1)", + "target": "Christophe Wavelet" + }, + { + "source": "Outils techniques", + "target": "Programmation num\u00e9rique" + }, + { + "source": "Anne Valkenborgh", + "target": "Creux et relief / mixte technique / aquatinte morsure directe et xylogravure" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Ivo Provoost" + }, + { + "source": "Dessin de caract\u00e8res : poch\u00e9es et variables", + "target": "Marie-Christophe Lambert" + }, + { + "source": "Isabel Burr Raty", + "target": "Theoretical courses" + }, + { + "source": "Kobe Matthys", + "target": "Pratiques artistiques et complexit\u00e9 scientifique (MA)" + }, + { + "source": "Joachim Lacrosse", + "target": "Theoretical courses" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Ivo Provoost" + }, + { + "source": "Ivo Provoost", + "target": "Simona Denicolai" + }, + { + "source": "Media - Atelier pluridisciplinaire (B1)", + "target": "Sabine Voglaire" + }, + { + "source": "DESIGN ECONOMICS", + "target": "Winter School" + }, + { + "source": "Re*enacting Memories Of Struggles", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "BAC ERG CVG", + "target": "Espace culturels polyvalents" + }, + { + "source": "Admission 2019-2020", + "target": "Admission en cours d\u2019\u00e9tudes (Bachelor 2, 3 & Masters)" + }, + { + "source": "Damien Safie", + "target": "Typography" + }, + { + "source": "Christophe Wavelet", + "target": "Theoretical courses" + }, + { + "source": "Outils techniques", + "target": "Techniques fondamentales, dessin (B2)" + }, + { + "source": "Les formes politiques de Shirley Clarke", + "target": "Winter School" + }, + { + "source": "D\u00e9p\u00f4t Local", + "target": "Les lieux" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Document / Monument / m\u00e9moires interm\u00e9diaires" + }, + { + "source": "Gilbert Fastenaekens", + "target": "Photography" + }, + { + "source": "Le s\u00e9minaire de l'erg", + "target": "S\u00e9minaire 2018 : No Commons Without Commoning" + }, + { + "source": "Nicolas Prignot", + "target": "Workshop Tarot Souriau" + }, + { + "source": "Winter School", + "target": "Workshop Rideau de Perles" + }, + { + "source": "St\u00e9phane No\u00ebl", + "target": "Xml collection" + }, + { + "source": "Dani\u00e8le Leclercq", + "target": "Gravure Bois, lino & litho" + }, + { + "source": "Dessin / storyboard", + "target": "G\u00e9rard Goffaux" + }, + { + "source": "Rapha\u00ebl Pirenne", + "target": "Theoretical courses" + }, + { + "source": "Fabrique d\u2019images \u2013 Mythologies singuli\u00e8res", + "target": "Giovanni Guarini" + }, + { + "source": "Informations utiles", + "target": "Minerval" + }, + { + "source": "Vid\u00e9ographie (BA)", + "target": "Yvan Flasse" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Sculpture (BA)" + }, + { + "source": "Catherine Mayeur", + "target": "Histoire et actualit\u00e9 des arts / image (B2)" + }, + { + "source": "Rideau de perles", + "target": "Workshop Rideau de perles Erg-bookscanner" + }, + { + "source": "Elke de Rijcke", + "target": "Litt\u00e9rature contemporaine (B2)" + }, + { + "source": "Cin\u00e9ma-vid\u00e9o Bac 3", + "target": "Outils techniques" + }, + { + "source": "Dessin de caract\u00e8res : poch\u00e9es et variables", + "target": "Ludivine Loiseau" + }, + { + "source": "Eric Angenot", + "target": "Peinture (BA)" + }, + { + "source": "Dessin", + "target": "Dessin (BA)" + }, + { + "source": "Marie-Christophe Lambert", + "target": "Typography" + }, + { + "source": "A sitcom workshop", + "target": "Nicolas Marcon" + }, + { + "source": "Ateliers pluridisciplinaires (BA)", + "target": "Media - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Lionel Maes" + }, + { + "source": "Alexander Schellow", + "target": "Design et Politique du multiple (MA)" + }, + { + "source": "Communication visuelle et graphique (MA)", + "target": "New Poster Cult" + }, + { + "source": "Illustration - Comics", + "target": "Olivier Grenson" + }, + { + "source": "Harrisson", + "target": "New Poster Cult" + }, + { + "source": "Constant", + "target": "Wendy Van Wynsberghe" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Isabelle Jossa" + }, + { + "source": "De l\u2019oeuvre \u00e0 l\u2019imprim\u00e9", + "target": "Outils techniques" + }, + { + "source": "Gravure Bois, lino & litho", + "target": "Le stage interne" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Dessin (BA)" + }, + { + "source": "Media - Atelier pluridisciplinaire (B2)", + "target": "Typographie (BA)" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Marie-Christophe Lambert" + }, + { + "source": "Laurent Baudoux", + "target": "Typography" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Installation/Performance (BA)" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Giovanni Guarini" + }, + { + "source": "Arts num\u00e9riques", + "target": "Arts num\u00e9riques (MA)" + }, + { + "source": "Caroline Van Damme", + "target": "Sciences humaines et sociales / psychanalyse (M1)" + }, + { + "source": "Labobine", + "target": "LoopRoom - Micro Narrative" + }, + { + "source": "Loraine Furter", + "target": "Theoretical courses" + }, + { + "source": "Erg, what is it ?", + "target": "Multidisciplinary Workshops - BA" + }, + { + "source": "Atelier Pluridisciplinaire Media Bac 3", + "target": "Marie-Christophe Lambert" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Typographie (BA)" + }, + { + "source": "Artistic Practices and Scientific Complexity", + "target": "Giampiero Caiti" + }, + { + "source": "Christine Meisner", + "target": "Drawing" + }, + { + "source": "Maxime Jean-Baptiste", + "target": "Theoretical courses" + }, + { + "source": "Narration - Atelier pluridisciplinaire (B1)", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Multiples agencements du politique", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Projet p\u00e9dagogique" + }, + { + "source": "Informations utiles", + "target": "R\u00e8glement des \u00e9tudes" + }, + { + "source": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo", + "target": "Typography" + }, + { + "source": "Ateliers pluridisciplinaires (BA)", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Alexander Schellow", + "target": "Cin\u00e9ma d\u2019animation (MA)" + }, + { + "source": "J\u00e9r\u00f4me Degive", + "target": "Media - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Dominique Goblet", + "target": "Illustration (MA)" + }, + { + "source": "Digital arts / Coding", + "target": "Yves Bernard" + }, + { + "source": "BAC ERG CVG", + "target": "S\u00e9bastien Lacomblez" + }, + { + "source": "...gira nello spazio senza fine", + "target": "Gilbert Fastenaekens" + }, + { + "source": "Eric Angenot", + "target": "Marcel Berlanger" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Simona Denicolai" + }, + { + "source": "Anne Valkenborgh", + "target": "Gravure M\u00e9tal" + }, + { + "source": "BREAKING NEWS!", + "target": "Typographie (BA)" + }, + { + "source": "Alexia de Visscher", + "target": "Visual and Graphic Communication" + }, + { + "source": "Peinture", + "target": "Peinture (MA)" + }, + { + "source": "Installation/Performance (BA)", + "target": "Juan d\u2019Oultremont" + }, + { + "source": "Media - Atelier pluridisciplinaire (B1)", + "target": "Typographie (BA)" + }, + { + "source": "Enseignants", + "target": "O\u00f9? Quoi? Comment? Qui?" + }, + { + "source": "Eleanor Ivory Weber", + "target": "S\u00e9minaire" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Juan d\u2019Oultremont" + }, + { + "source": "Ab\u00e9c\u00e9daire et autres lieux", + "target": "Rapha\u00ebl Pirenne" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Fr\u00e9d\u00e9ric Gaillard" + }, + { + "source": "Drawing", + "target": "Orientations at erg" + }, + { + "source": "Antoine Boute", + "target": "Ecriture / cr\u00e9ation textuelle (B1)" + }, + { + "source": "Mise en page et pratique de l'impression", + "target": "Nicolas Storck" + }, + { + "source": "Performance et r\u00e9gimes performatifs en art depuis le XX\u00e8 si\u00e8cle", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "Harrisson", + "target": "Visual and Graphic Communication" + }, + { + "source": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M2)", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "...gira nello spazio senza fine", + "target": "Marie-No\u00eblle Boutin" + }, + { + "source": "Maryam Kolly", + "target": "Theoretical courses" + }, + { + "source": "Isabelle Jossa", + "target": "Wall In Progress" + }, + { + "source": "Giampiero Caiti", + "target": "Typography" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Installation/Performance (BA)" + }, + { + "source": "Wall In Progress", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Fouilles molles sur disques durs", + "target": "Manu Blondiau" + }, + { + "source": "Bachelors", + "target": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 1er cycle - B2-B3" + }, + { + "source": "Workshop 12h Bande dessin\u00e9e", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Manuela Dechamps Otamendi", + "target": "Typographie (BA)" + }, + { + "source": "Installation - Performance", + "target": "Juan d\u2019Oultremont" + }, + { + "source": "English", + "target": "Multidisciplinary Workshops - BA" + }, + { + "source": "Caroline Dath", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Histoire et actualit\u00e9 des arts / de la Renaissance \u00e0 la fin du 19e si\u00e8cle (B1)", + "target": "Monique Renault" + }, + { + "source": "Bande dessin\u00e9e (BA)", + "target": "Christian Staquet" + }, + { + "source": "Graphisme (BA)", + "target": "Interfaces \u00e9lectroniques" + }, + { + "source": "St\u00e9phane No\u00ebl", + "target": "Workshop 12h Bande dessin\u00e9e" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "Performance et r\u00e9gimes performatifs en art depuis le XX\u00e8 si\u00e8cle" + }, + { + "source": "English", + "target": "Multidisciplinary Workshops - MA" + }, + { + "source": "Labobine - Salle Super 8", + "target": "Les lieux" + }, + { + "source": "Outils et pratiques audiovisuels", + "target": "Sylvie Bouteiller" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "Dialogues" + }, + { + "source": "Animation Department Workshops", + "target": "Winter School" + }, + { + "source": "Ateliers pluridisciplinaires (BA)", + "target": "Narration - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Illustration - Comics", + "target": "Joanna Lorho" + }, + { + "source": "Alain Fran\u00e7ois", + "target": "Theoretical courses" + }, + { + "source": "Christophe Wavelet", + "target": "Performance et r\u00e9gimes performatifs en art depuis le XX\u00e8 si\u00e8cle" + }, + { + "source": "Fa, fe, fo, fr, fs, ft, fb, fh, fu, fy", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Bande dessin\u00e9e (BA)", + "target": "Genevi\u00e8ve Casterman" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Isabelle Jossa" + }, + { + "source": "Histoire et actualit\u00e9 des arts / m\u00e9dias (B2)", + "target": "Isabel Burr Raty" + }, + { + "source": "BAC ERG CVG", + "target": "Manu Blondiau" + }, + { + "source": "Ludivine Loiseau", + "target": "Typographie - module" + }, + { + "source": "Carolina Serra", + "target": "Sciences humaines et sociales / anthropologie (B1)" + }, + { + "source": "Graphisme (BA)", + "target": "Sabine Voglaire" + }, + { + "source": "Laurent Baudoux", + "target": "Son (B3)" + }, + { + "source": "Ab\u00e9c\u00e9daire et autres lieux", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Je t\u2019aime, moi non plus (Six le\u00e7ons sur l\u2019image et le texte)", + "target": "Typographie (BA)" + }, + { + "source": "Eric Angenot", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "Histoire et actualit\u00e9 des arts / arts non-europ\u00e9ens (B3)", + "target": "Toma Muteba Luntumbue" + }, + { + "source": "Ateliers pluridisciplinaires : Media", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Grmbl", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Laurent Baudoux", + "target": "Statuts de l\u2019image / Tourments et d\u00e9tournements" + }, + { + "source": "Biblioth\u00e8que", + "target": "Contact" + }, + { + "source": "Alexander Schellow", + "target": "Cin\u00e9ma d\u2019animation (BA)" + }, + { + "source": "Man\u0153uvres s\u00e9rigraphiques", + "target": "Orly - les man\u0153uvres du ventriloque" + }, + { + "source": "Interfaces \u00e9lectroniques", + "target": "Visual and Graphic Communication" + }, + { + "source": "Orientations at erg", + "target": "Typography" + }, + { + "source": "Denis Deprez", + "target": "Narration - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Babak Afrassiabi", + "target": "Workshop Pages Magazine" + }, + { + "source": "St\u00e9phanie Vilayphiou", + "target": "Workshop Rideau de perles Erg-bookscanner" + }, + { + "source": "Alexia de Visscher", + "target": "Technical courses" + }, + { + "source": "Giampiero Caiti", + "target": "Pratiques artistiques et complexit\u00e9 scientifique (MA)" + }, + { + "source": "Bachelors", + "target": "Graphisme (BA)" + }, + { + "source": "Elke de Rijcke", + "target": "Theoretical courses" + }, + { + "source": "Orientations at erg", + "target": "Painting" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Erg.be" + }, + { + "source": "Fouilles molles sur disques durs", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Bernadette Kluyskens", + "target": "Couleur : analyse et pratiques contextuelles" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Arts num\u00e9riques (BA)" + }, + { + "source": "Les livres parl\u00e9s 2017", + "target": "Livres parl\u00e9s" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Sabine Voglaire" + }, + { + "source": "Antoine Boute", + "target": "Technical courses" + }, + { + "source": "After Howl", + "target": "Sculpture (MA)" + }, + { + "source": "Bachelors", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Sabine Voglaire", + "target": "Typography" + }, + { + "source": "Workshop gravure, Creux et relief / mixte technique / aquatinte morsure directe et xylogravure", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Ergote Radio", + "target": "Les lieux" + }, + { + "source": "Ateliers pluridisciplinaires : Art", + "target": "Orly - les man\u0153uvres du ventriloque" + }, + { + "source": "Bachelors", + "target": "Peinture (BA)" + }, + { + "source": "Antoine Boute", + "target": "\u00c9critures exp\u00e9rimentales" + }, + { + "source": "Bernadette Kluyskens", + "target": "Technical courses" + }, + { + "source": "Ateliers pluridisciplinaires : Narration", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Bande dessin\u00e9e", + "target": "Bande dessin\u00e9e (BA)" + }, + { + "source": "Rapha\u00ebl Pirenne", + "target": "S\u00e9miologie / image (B1)" + }, + { + "source": "Fr\u00e9d\u00e9ric Gaillard", + "target": "Sculpture (BA)" + }, + { + "source": "Alexia de Visscher", + "target": "Workshop Rideau de perles Erg-bookscanner" + }, + { + "source": "David Evrard", + "target": "Sculpture (MA)" + }, + { + "source": "Son (B2)", + "target": "Sylvie Bouteiller" + }, + { + "source": "Bachelors", + "target": "Installation/Performance (BA)" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M2)" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "Geste sp\u00e9culatif" + }, + { + "source": "English", + "target": "Theoretical courses" + }, + { + "source": "Couleur : analyse et pratiques contextuelles", + "target": "Outils techniques" + }, + { + "source": "Gender fluid : Bye bye binary \u2014 des imaginaires possibles autour d\u2019une typographie inclusive", + "target": "Ludivine Loiseau" + }, + { + "source": "Graphisme", + "target": "Graphisme (MA)" + }, + { + "source": "Eric Angenot", + "target": "Painting" + }, + { + "source": "Image num\u00e9rique", + "target": "Outils techniques" + }, + { + "source": "Babak Afrassiabi", + "target": "Theoretical courses" + }, + { + "source": "Alexis Zimmer", + "target": "Theoretical courses" + }, + { + "source": "Photographie", + "target": "Photographie (MA)" + }, + { + "source": "Caroline Van Damme", + "target": "Philosophie g\u00e9n\u00e9rale (B2)" + }, + { + "source": "Atelier \u00e0 la KBR (Biblioth\u00e8que royale de Belgique)", + "target": "Winter School" + }, + { + "source": "O\u00f9? Quoi? Comment? Qui?", + "target": "Tutorat" + }, + { + "source": "Orly - les man\u0153uvres du ventriloque", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Narration - Atelier pluridisciplinaire (B2)", + "target": "Olivier Grenson" + }, + { + "source": "Admission 2019-2020", + "target": "Bienvenue \u00e0 l\u2019erg" + }, + { + "source": "Manu Blondiau", + "target": "Visual and Graphic Communication" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo" + }, + { + "source": "Pratiques artistiques et complexit\u00e9 scientifique (MA)", + "target": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques" + }, + { + "source": "Alain Goffin", + "target": "Statuts de l\u2019image / Tourments et d\u00e9tournements" + }, + { + "source": "Installation - Performance", + "target": "Orientations at erg" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Ateliers pluridisciplinaires : Art" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Dessin / le fait main num\u00e9rique" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Graphisme (BA)" + }, + { + "source": "Les lieux", + "target": "Print lab" + }, + { + "source": "Dessin de caract\u00e8res : \u00e0 pleins renvers\u00e9s", + "target": "Typographie (BA)" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Pierre-Philippe Duch\u00e2telet", + "target": "\u00c9tude des artefacts (M1-M2)" + }, + { + "source": "Bande dessin\u00e9e (BA)", + "target": "Joanna Lorho" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "\u00c9tude des artefacts (M1-M2)" + }, + { + "source": "Histoire et actualit\u00e9 des arts. Histoire des arts contemporains / avant-garde au XXe si\u00e8cle (B3)", + "target": "Monique Renault" + }, + { + "source": "R\u00e9cits et exp\u00e9rimentation\u2192 narration sp\u00e9culative", + "target": "Yvan Flasse" + }, + { + "source": "Nasrin Tabatabai", + "target": "Theoretical courses" + }, + { + "source": "Marie-Christophe Lambert", + "target": "Typographie (MA)" + }, + { + "source": "Bernadette Kluyskens", + "target": "LoopRoom - Micro Narrative" + }, + { + "source": "BREAKING NEWS!", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Introduction au textile et \u00e0 l'\u00e9lectronique (Pratiques num\u00e9riques)", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Graphisme (BA)", + "target": "Wall In Progress" + }, + { + "source": "Histoire et actualit\u00e9 des arts / m\u00e9dias (B2)", + "target": "Maxime Jean-Baptiste" + }, + { + "source": "Pratiques artistiques et complexit\u00e9 scientifique (MA)", + "target": "\u00c9tude des artefacts (M1-M2)" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Pierre-Philippe Duch\u00e2telet" + }, + { + "source": "Dessin de caract\u00e8res : poch\u00e9es et variables", + "target": "Renaud Huberlant" + }, + { + "source": "Alternatives Canvas", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Dessin / mod\u00e8le vivant", + "target": "Le stage interne" + }, + { + "source": "Simona Denicolai", + "target": "Traitement des traces" + }, + { + "source": "Adopter une \u0153uvre", + "target": "Fran\u00e7oise Tahon" + }, + { + "source": "Animated film", + "target": "Orientations at erg" + }, + { + "source": "Ateliers pluridisciplinaires (MA)", + "target": "Design et Politique du multiple (MA)" + }, + { + "source": "Anne Marquet", + "target": "Photographie (BA)" + }, + { + "source": "Raya Baudinet-Lindberg", + "target": "\u00c9criture mat\u00e9riau" + }, + { + "source": "Dialogues", + "target": "Sven Augustijnen" + }, + { + "source": "Anne Marquet", + "target": "Photographie (MA)" + }, + { + "source": "Communication visuelle et graphique (MA)", + "target": "Harrisson" + }, + { + "source": "Giampiero Caiti", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Informations utiles", + "target": "Plans d'\u00e9tude" + }, + { + "source": "Arts num\u00e9riques (MA)", + "target": "Yves Bernard" + }, + { + "source": "Marcel Berlanger", + "target": "Peinture (BA)" + }, + { + "source": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)", + "target": "Yvan Flasse" + }, + { + "source": "Lionel Maes", + "target": "Technical courses" + }, + { + "source": "Bachelors", + "target": "Dessin (BA)" + }, + { + "source": "Brigitte Ledune", + "target": "Technical courses" + }, + { + "source": "Ludivine Loiseau", + "target": "Typographie (MA)" + }, + { + "source": "Bachelors", + "target": "Photographie (BA)" + }, + { + "source": "Arts num\u00e9riques (BA)", + "target": "Graphic Scores" + }, + { + "source": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)", + "target": "S\u00e9minaire Vid\u00e9o" + }, + { + "source": "Typographie", + "target": "Typographie (MA)" + }, + { + "source": "Christine Meisner", + "target": "Dessin (MA)" + }, + { + "source": "Dessin de caract\u00e8res : poch\u00e9es et variables", + "target": "Typographie (BA)" + }, + { + "source": "St\u00e9phane No\u00ebl", + "target": "Theoretical courses" + }, + { + "source": "Alexis Zimmer", + "target": "Geste sp\u00e9culatif" + }, + { + "source": "Cin\u00e9ma-vid\u00e9o Bac 3", + "target": "Xavier Garc\u00eda Bard\u00f3n" + }, + { + "source": "English", + "target": "Technical courses" + }, + { + "source": "Du concept \u00e9ditorial \u00e0 l'impression", + "target": "Graphisme (BA)" + }, + { + "source": "Christian Staquet", + "target": "Illustration (BA)" + }, + { + "source": "Introduction au textile et \u00e0 l'\u00e9lectronique (Pratiques num\u00e9riques)", + "target": "Wendy Van Wynsberghe" + }, + { + "source": "Interfaces \u00e9lectroniques", + "target": "Wendy Van Wynsberghe" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Sculpture (BA)" + }, + { + "source": "Graphisme", + "target": "Graphisme (BA)" + }, + { + "source": "Giovanni Guarini", + "target": "Une fabrique d\u2019images, un outil de pens\u00e9e" + }, + { + "source": "Videography", + "target": "Yvan Flasse" + }, + { + "source": "Chantale Anciaux", + "target": "Narration - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Ateliers pluridisciplinaires : Art" + }, + { + "source": "Eric Angenot", + "target": "Peinture (MA)" + }, + { + "source": "Carolina Serra", + "target": "Theoretical courses" + }, + { + "source": "Animated film", + "target": "Nicolas Marcon" + }, + { + "source": "Dessin modulaire", + "target": "Typography" + }, + { + "source": "Erg-paintings", + "target": "Peinture" + }, + { + "source": "Installation/Performance (MA)", + "target": "Juan d\u2019Oultremont" + }, + { + "source": "Illustration", + "target": "Illustration (MA)" + }, + { + "source": "Actualit\u00e9s culturelles / Actualit\u00e9 et lectures de l\u2019art / Modernit\u00e9 (B2)", + "target": "Rapha\u00ebl Pirenne" + }, + { + "source": "Ateliers pluridisciplinaires (MA)", + "target": "Pratiques artistiques et complexit\u00e9 scientifique (MA)" + }, + { + "source": "Fabrizio Terranova", + "target": "R\u00e9cits et exp\u00e9rimentation\u2192 narration sp\u00e9culative" + }, + { + "source": "Erg-paintings", + "target": "Eric Angenot" + }, + { + "source": "Geste sp\u00e9culatif", + "target": "Nicolas Prignot" + }, + { + "source": "Dessin modulaire", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Alexander Schellow", + "target": "Animated film" + }, + { + "source": "Sylvie Bouteiller", + "target": "Technical courses" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Illustration (BA)", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Informations utiles", + "target": "Tutorat" + }, + { + "source": "Man\u0153uvres s\u00e9rigraphiques", + "target": "Marie Feyereisen" + }, + { + "source": "Ateliers pluridisciplinaires : Narration", + "target": "Narration - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Fouilles molles sur disques durs", + "target": "Lionel Maes" + }, + { + "source": "Isabelle Jossa", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "LoopRoom - Micro Narrative", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo" + }, + { + "source": "Bachelors", + "target": "Bienvenue \u00e0 l\u2019erg" + }, + { + "source": "Fran\u00e7oise Tahon", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Structures temporaires ?", + "target": "Winter School" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Maryam Kolly" + }, + { + "source": "Alternatives Canvas", + "target": "Marcel Berlanger" + }, + { + "source": "Ateliers pluridisciplinaires (MA)", + "target": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)" + }, + { + "source": "Informations utiles", + "target": "Service social" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Typography" + }, + { + "source": "Isabelle Martin", + "target": "Narration - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Fleur Courtois", + "target": "S\u00e9miologie (M2)" + }, + { + "source": "Babak Afrassiabi", + "target": "Pages Magazine" + }, + { + "source": "Dessin de caract\u00e8res : \u00e0 pleins renvers\u00e9s", + "target": "Marie-Christophe Lambert" + }, + { + "source": "Admission Bachelor 1", + "target": "CAS 3" + }, + { + "source": "St\u00e9phanie Vilayphiou", + "target": "Theoretical courses" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Ateliers pluridisciplinaires : Art" + }, + { + "source": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 2\u00e8me cycle - M1-M2", + "target": "Programmes d'\u00e9tudes - Grilles de cours" + }, + { + "source": "Ecriture / cr\u00e9ation textuelle (B3)", + "target": "Outils techniques" + }, + { + "source": "Bachelors", + "target": "Cin\u00e9ma d\u2019animation (BA)" + }, + { + "source": "Arts num\u00e9riques (BA)", + "target": "Marc Wathieu" + }, + { + "source": "Gravure M\u00e9tal", + "target": "Le stage interne" + }, + { + "source": "Graphisme (BA)", + "target": "\u00c0 propos" + }, + { + "source": "Manon De Boer", + "target": "Videography" + }, + { + "source": "Sculpture", + "target": "Sculpture (BA)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Bernadette Kluyskens" + }, + { + "source": "Alain Fran\u00e7ois", + "target": "Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication (B3)" + }, + { + "source": "Joanna Lorho", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Le doctorat \u00e0 l'erg" + }, + { + "source": "Admission Bachelor 1", + "target": "CAS 1" + }, + { + "source": "Outils techniques", + "target": "Techniques fondamentales, dessin (B1)" + }, + { + "source": "Erg, what is it ?", + "target": "Multidisciplinary Workshops - MA" + }, + { + "source": "New Poster Cult", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Digital arts / Coding", + "target": "Orientations at erg" + }, + { + "source": "Renaud Huberlant", + "target": "Typographie (MA)" + }, + { + "source": "Graphisme (BA)", + "target": "Typographie (BA)" + }, + { + "source": "Cin\u00e9ma d\u2019animation (BA)", + "target": "Nicolas Marcon" + }, + { + "source": "Ateliers pluridisciplinaires (BA)", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Communication visuelle et graphique", + "target": "Communication visuelle et graphique (MA)" + }, + { + "source": "De l\u2019oeuvre \u00e0 l\u2019imprim\u00e9", + "target": "Nicolas Storck" + }, + { + "source": "Manuela Dechamps Otamendi", + "target": "Typographie (MA)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Dessin (BA)" + }, + { + "source": "...gira nello spazio senza fine", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Manuela Dechamps Otamendi" + }, + { + "source": "...gira nello spazio senza fine", + "target": "Antoine Meyer" + }, + { + "source": "English", + "target": "Orientations at erg" + }, + { + "source": "O\u00f9? Quoi? Comment? Qui?", + "target": "Rapports de Conseil de gestion p\u00e9dagogique" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Peinture (BA)" + }, + { + "source": "Dessin / le fait main num\u00e9rique", + "target": "Giovanni Guarini" + }, + { + "source": "Anne Valkenborgh", + "target": "Workshop gravure, Creux et relief / mixte technique / aquatinte morsure directe et xylogravure" + }, + { + "source": "Creux et relief / mixte technique / aquatinte morsure directe et xylogravure", + "target": "Gravure M\u00e9tal" + }, + { + "source": "Hashich, in.", + "target": "Sculpture (MA)" + }, + { + "source": "Dani\u00e8le Leclercq", + "target": "Initiation \u00e0 la s\u00e9rigraphie" + }, + { + "source": "Admission 2019-2020", + "target": "Devenir \u00e9tudiant-e \u00e0 l'erg" + }, + { + "source": "Marcel Berlanger", + "target": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Graphic design- Experimental and critical practices" + }, + { + "source": "Peggy Pierrot", + "target": "Theoretical courses" + }, + { + "source": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)", + "target": "Sven Augustijnen" + }, + { + "source": "Man\u0153uvres s\u00e9rigraphiques", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Giovanni Guarini", + "target": "Graphisme (BA)" + }, + { + "source": "Joachim Lacrosse", + "target": "Philosophie g\u00e9n\u00e9rale (B1)" + }, + { + "source": "Joanna Lorho", + "target": "Workshop 12h Bande dessin\u00e9e" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Guy Wouet\u00e9" + }, + { + "source": "Dani\u00e8le Leclercq", + "target": "S\u00e9rigraphie" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Visual and Graphic Communication" + }, + { + "source": "La couleur tomb\u00e9e du ciel", + "target": "Winter School" + }, + { + "source": "Brigitte Ledune", + "target": "Suivi de m\u00e9moire" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Je t\u2019aime, moi non plus (Six le\u00e7ons sur l\u2019image et le texte)" + }, + { + "source": "Pierre-Philippe Duch\u00e2telet", + "target": "Renaud Huberlant" + }, + { + "source": "Orientations at erg", + "target": "Videography" + }, + { + "source": "Caroline Van Damme", + "target": "Theoretical courses" + }, + { + "source": "Christophe Van Rossom", + "target": "Litt\u00e9rature g\u00e9n\u00e9rale (B1)" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "\u00c9tude des artefacts (M1-M2)" + }, + { + "source": "Les lieux", + "target": "Ustensiles" + }, + { + "source": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)", + "target": "S\u00e9minaire" + }, + { + "source": "Theoretical courses", + "target": "\u00c9tude des artefacts (M1-M2)" + }, + { + "source": "Annick Lantenois", + "target": "Design et Politique du multiple (MA)" + }, + { + "source": "Christophe Van Rossom", + "target": "Theoretical courses" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Loraine Furter" + }, + { + "source": "Dominique Goblet", + "target": "Illustration - Comics" + }, + { + "source": "M\u00e9thodologie / m\u00e9moire", + "target": "Rapha\u00ebl Pirenne" + }, + { + "source": "Marc Wathieu", + "target": "PrestiDIGITAL, Pratiques magiques et occultures contemporaines autour de Arduino." + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Wendy Van Wynsberghe" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Masters \u00e0 finalit\u00e9 approfondie" + }, + { + "source": "Graphisme (BA)", + "target": "Laurent Baudoux" + }, + { + "source": "G\u00e9rard Goffaux", + "target": "Technical courses" + }, + { + "source": "Nicolas Prignot", + "target": "Theoretical courses" + }, + { + "source": "Alexander Schellow", + "target": "Labobine - Salle Super 8" + }, + { + "source": "Cin\u00e9ma-vid\u00e9o (B3)", + "target": "Xavier Garc\u00eda Bard\u00f3n" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Ludivine Loiseau" + }, + { + "source": "Installation/Performance", + "target": "Installation/Performance (MA)" + }, + { + "source": "Marie-Christophe Lambert", + "target": "Typographie (BA)" + }, + { + "source": "Ludivine Loiseau", + "target": "Theoretical courses" + }, + { + "source": "Fabrizio Terranova", + "target": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)" + }, + { + "source": "Giampiero Caiti", + "target": "Visual and Graphic Communication" + }, + { + "source": "Nasrin Tabatabai", + "target": "Workshop Pages Magazine" + }, + { + "source": "Marie-Christophe Lambert", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "target": "Media - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Theoretical courses", + "target": "Toma Muteba Lutumbue" + }, + { + "source": "Fabrizio Terranova", + "target": "Suivi de m\u00e9moire" + }, + { + "source": "Graphisme (BA)", + "target": "Isabelle Jossa" + }, + { + "source": "PrestiDIGITAL, Pratiques magiques et occultures contemporaines autour de Arduino.", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Fa, fe, fo, fr, fs, ft, fb, fh, fu, fy", + "target": "Ludivine Loiseau" + }, + { + "source": "BAC ERG CVG", + "target": "Moussa Cheniguel" + }, + { + "source": "BAC ERG CVG", + "target": "Premi\u00e8res recherches et avant-projets" + }, + { + "source": "Bachelors", + "target": "Bande dessin\u00e9e (BA)" + }, + { + "source": "Histoire et actualit\u00e9 des arts / XIXe et XXe si\u00e8cle (B2)", + "target": "Monique Renault" + }, + { + "source": "Actualit\u00e9s culturelles / actualit\u00e9 et lectures de l\u2019art (B3)", + "target": "Elke de Rijcke" + }, + { + "source": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M2)", + "target": "Guy Wouet\u00e9" + }, + { + "source": "Design et Politique du multiple (MA)", + "target": "Renaud Huberlant" + }, + { + "source": "Dessin modulaire", + "target": "Visual and Graphic Communication" + }, + { + "source": "G\u00e9rard Goffaux", + "target": "Techniques fondamentales, dessin (B2)" + }, + { + "source": "Installation - Performance", + "target": "Jo\u00eblle Tuerlinckx" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Pratiques Num\u00e9riques B2-B3" + }, + { + "source": "The (s)Peaking Spots", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Christian Staquet", + "target": "Illustration - Comics" + }, + { + "source": "Gender fluid : Bye bye binary \u2014 des imaginaires possibles autour d\u2019une typographie inclusive", + "target": "Loraine Furter" + }, + { + "source": "Christian Staquet", + "target": "Dessin / atelier" + }, + { + "source": "Florence Delhaye", + "target": "S\u00e9rigraphie" + }, + { + "source": "Ateliers pluridisciplinaires (BA)", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Curlybraces" + }, + { + "source": "Atelier Reliure avec Clara Gevaert et Marie-Christophe Lambert", + "target": "Winter School" + }, + { + "source": "Archives s\u00e9minaires", + "target": "Le s\u00e9minaire de l'erg" + }, + { + "source": "Alexia de Visscher", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Alexis Zimmer", + "target": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques" + }, + { + "source": "COLORING ERG BOOK", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "20.000 images sous les yeux", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Magali Michaux", + "target": "Sciences humaines et sociales / sciences \u00e9conomiques, politiques et sociales (B1)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Bernadette Kluyskens" + }, + { + "source": "Interfaces \u00e9lectroniques", + "target": "Typography" + }, + { + "source": "Graphic design- Experimental and critical practices", + "target": "Interfaces \u00e9lectroniques" + }, + { + "source": "Installation/Performance (MA)", + "target": "Jo\u00eblle Tuerlinckx" + }, + { + "source": "Interfaces \u00e9lectroniques", + "target": "Typographie (BA)" + }, + { + "source": "Loraine Furter", + "target": "Teaching To Transgress" + }, + { + "source": "Genevi\u00e8ve Casterman", + "target": "Pratique du carnet : texte et image" + }, + { + "source": "Manoeuvres s\u00e9rigraphiques", + "target": "Marie Feyereisen" + }, + { + "source": "Isabelle Jossa", + "target": "\u00c0 propos" + }, + { + "source": "Genevi\u00e8ve Casterman", + "target": "Illustration - Comics" + }, + { + "source": "Abbaye de Forest", + "target": "BAC ERG CVG" + }, + { + "source": "Communication visuelle et graphique (MA)", + "target": "Loraine Furter" + }, + { + "source": "Art - Atelier pluridisciplinaire (B1)", + "target": "Ateliers pluridisciplinaires (BA)" + }, + { + "source": "Alexis Zimmer", + "target": "Design et Politique du multiple (MA)" + }, + { + "source": "Le stage interne", + "target": "Photographie (MA)" + }, + { + "source": "Erg-succursale", + "target": "Workshops 25-30 mars 2019" + }, + { + "source": "Geste sp\u00e9culatif", + "target": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)" + }, + { + "source": "Orientations at erg", + "target": "Photography" + }, + { + "source": "Renaud Huberlant", + "target": "Typography" + }, + { + "source": "Florence Delhaye", + "target": "Manoeuvres s\u00e9rigraphiques" + }, + { + "source": "Caroline Van Damme", + "target": "Philosophie esth\u00e9tique (B3)" + }, + { + "source": "Formats, canons, gaufriers, en marge super max-width!", + "target": "Ludivine Loiseau" + }, + { + "source": "Erg-succursale", + "target": "Jo\u00eblle Tuerlinckx" + }, + { + "source": "Typography", + "target": "Wendy Van Wynsberghe" + }, + { + "source": "Je ne construis pas - \u00c9criture mat\u00e9riau \u2013 mat\u00e9riau d\u2019\u00e9criture", + "target": "Raya Baudinet-Lindberg" + }, + { + "source": "Graphisme (BA)", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Cin\u00e9ma d\u2019animation (BA)", + "target": "Narration - Atelier pluridisciplinaire (B1)" + }, + { + "source": "Fabrique d\u2019images \u2013 Mythologies singuli\u00e8res", + "target": "Isabelle Jossa" + }, + { + "source": "Lionel Maes", + "target": "Programmation num\u00e9rique" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Masters \u00e0 finalit\u00e9 didactique" + }, + { + "source": "Admission Bachelor 1", + "target": "CAS 4" + }, + { + "source": "Atelier Pluridisciplinaire Media Bac 3", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Erg, what is it ?", + "target": "Orientations at erg" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Brochure 2019" + }, + { + "source": "Marie-No\u00eblle Boutin", + "target": "Photographie (BA)" + }, + { + "source": "Winter School", + "target": "Workshop Jingle Jungle" + }, + { + "source": "Graphisme (BA)", + "target": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo" + }, + { + "source": "Outils techniques", + "target": "Son (B3)" + }, + { + "source": "Cin\u00e9ma d'animation", + "target": "Cin\u00e9ma d\u2019animation (MA)" + }, + { + "source": "Ecriture / cr\u00e9ation textuelle (B1)", + "target": "Outils techniques" + }, + { + "source": "Alternatives Canvas", + "target": "Eric Angenot" + }, + { + "source": "Manuela Dechamps Otamendi", + "target": "Typography" + }, + { + "source": "Erg Galerie", + "target": "Les lieux" + }, + { + "source": "Art - Atelier pluridisciplinaire (B2)", + "target": "Vid\u00e9ographie (BA)" + }, + { + "source": "Art - Atelier pluridisciplinaire (B3)", + "target": "Installation/Performance (BA)" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "Le stage interne" + }, + { + "source": "Marcel Berlanger", + "target": "Peinture (MA)" + }, + { + "source": "Visual and Graphic Communication", + "target": "Wendy Van Wynsberghe" + }, + { + "source": "Dessin d\u2019observation", + "target": "G\u00e9rard Goffaux" + }, + { + "source": "Giovanni Guarini", + "target": "Media - Atelier pluridisciplinaire (B2)" + }, + { + "source": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "target": "S\u00e9minaire" + }, + { + "source": "Graphisme (BA)", + "target": "Media - Atelier pluridisciplinaire (B3)" + }, + { + "source": "Alain Goffin", + "target": "Illustration - Comics" + }, + { + "source": "Dessin (BA)", + "target": "Rapha\u00ebl Van Lerberghe" + }, + { + "source": "Bienvenue \u00e0 l\u2019erg", + "target": "La pluridisciplinarit\u00e9" + }, + { + "source": "Nicolas Prignot", + "target": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques" + }, + { + "source": "Lionel Maes", + "target": "Visual and Graphic Communication" + }, + { + "source": "G\u00e9rard Goffaux", + "target": "Techniques fondamentales, dessin (B1)" + }, + { + "source": "Illustration - Comics", + "target": "Orientations at erg" + }, + { + "source": "Damien Safie", + "target": "Visual and Graphic Communication" + } + ], + "nodes": [ + { + "cats": [], + "title": "...gira nello spazio senza fine", + "ns": 0 + }, + { + "cats": [], + "title": "20.000 images sous les yeux", + "ns": 0 + }, + { + "cats": [], + "title": "AP : ART & CONTEXTES SIMULTAN\u00c9S", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "AP dramaturgie BAC 1", + "ns": 0 + }, + { + "cats": [], + "title": "A sitcom workshop", + "ns": 0 + }, + { + "cats": [ + "Page web" + ], + "title": "Abbaye de Forest", + "ns": 0 + }, + { + "cats": [], + "title": "Ab\u00e9c\u00e9daire et autres lieux", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M1" + ], + "title": "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art (M1)", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M2" + ], + "title": "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art (M2)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Actualit\u00e9s culturelles / Actualit\u00e9 et lectures de l\u2019art / Modernit\u00e9 (B2)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours th\u00e9oriques" + ], + "title": "Actualit\u00e9s culturelles / actualit\u00e9 et lectures de l\u2019art (B3)", + "ns": 0 + }, + { + "cats": [], + "title": "Admission 2019-2020", + "ns": 0 + }, + { + "cats": [], + "title": "Admission Bachelor 1", + "ns": 0 + }, + { + "cats": [], + "title": "Admission en cours d\u2019\u00e9tudes (Bachelor 2, 3 & Masters)", + "ns": 0 + }, + { + "cats": [], + "title": "Adopter une \u0153uvre", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "After Howl", + "ns": 0 + }, + { + "cats": [], + "title": "Agenda", + "ns": 0 + }, + { + "cats": [], + "title": "Agr\u00e9gation", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Alain Fran\u00e7ois", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Alain Goffin", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Alexander Schellow", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Alexia de Visscher", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Alexis Zimmer", + "ns": 0 + }, + { + "cats": [], + "title": "Alternatives Canvas", + "ns": 0 + }, + { + "cats": [], + "title": "Am\u00e9nagement du local technique", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Animated film", + "ns": 0 + }, + { + "cats": [], + "title": "Animation Department Workshops", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Anne Marquet", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Anne Valkenborgh", + "ns": 0 + }, + { + "cats": [], + "title": "Annick Lantenois", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Antoine Boute", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Antoine Meyer", + "ns": 0 + }, + { + "cats": [], + "title": "Appel au Moniteur", + "ns": 0 + }, + { + "cats": [], + "title": "Archives de l'erg", + "ns": 0 + }, + { + "cats": [], + "title": "Archives s\u00e9minaires", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Art - Atelier pluridisciplinaire (B1)", + "ns": 0 + }, + { + "cats": [ + "B2" + ], + "title": "Art - Atelier pluridisciplinaire (B2)", + "ns": 0 + }, + { + "cats": [ + "B3" + ], + "title": "Art - Atelier pluridisciplinaire (B3)", + "ns": 0 + }, + { + "cats": [], + "title": "Artistic Practices and Scientific Complexity", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Arts num\u00e9riques", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Arts num\u00e9riques (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Arts num\u00e9riques (MA)", + "ns": 0 + }, + { + "cats": [], + "title": "Assembl\u00e9e G\u00e9n\u00e9rale", + "ns": 0 + }, + { + "cats": [], + "title": "Atelier Gravure M\u00e9tal - Winter school", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Atelier Pluridisciplinaire Media Bac 3", + "ns": 0 + }, + { + "cats": [], + "title": "Atelier Reliure avec Clara Gevaert et Marie-Christophe Lambert", + "ns": 0 + }, + { + "cats": [], + "title": "Atelier de gravure m\u00e9tal", + "ns": 0 + }, + { + "cats": [], + "title": "Atelier \u00e0 la KBR (Biblioth\u00e8que royale de Belgique)", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires" + ], + "title": "Ateliers pluridisciplinaires (BA)", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires" + ], + "title": "Ateliers pluridisciplinaires (MA)", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (BA)" + ], + "title": "Ateliers pluridisciplinaires : Art", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (BA)" + ], + "title": "Ateliers pluridisciplinaires : Media", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (BA)" + ], + "title": "Ateliers pluridisciplinaires : Narration", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "BAC ERG CVG", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "BAG", + "ns": 0 + }, + { + "cats": [], + "title": "BREAKING NEWS!", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Babak Afrassiabi", + "ns": 0 + }, + { + "cats": [], + "title": "Bachelors", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Bande dessin\u00e9e", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Bande dessin\u00e9e (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Bande dessin\u00e9e (MA)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Bernadette Kluyskens", + "ns": 0 + }, + { + "cats": [], + "title": "Biblioth\u00e8que", + "ns": 0 + }, + { + "cats": [ + "Pages avec des liens de fichiers bris\u00e9s" + ], + "title": "Bienvenue \u00e0 l\u2019erg", + "ns": 0 + }, + { + "cats": [], + "title": "Blue Key Session", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Brigitte Hardy", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Brigitte Ledune", + "ns": 0 + }, + { + "cats": [], + "title": "Brochure 2019", + "ns": 0 + }, + { + "cats": [], + "title": "CAS 1", + "ns": 0 + }, + { + "cats": [], + "title": "CAS 2", + "ns": 0 + }, + { + "cats": [], + "title": "CAS 3", + "ns": 0 + }, + { + "cats": [], + "title": "CAS 4", + "ns": 0 + }, + { + "cats": [], + "title": "COLORING ERG BOOK", + "ns": 0 + }, + { + "cats": [], + "title": "Calendrier acad\u00e9mique", + "ns": 0 + }, + { + "cats": [ + "Enseignants", + "\u00c9quipe administrative" + ], + "title": "Carolina Serra", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Caroline Dath", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Caroline Van Damme", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Catherine Mayeur", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Catherine Sugg", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Chantale Anciaux", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Chlo\u00e9 Malcotti", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Christian Staquet", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Christine Meisner", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Christophe Van Rossom", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Christophe Wavelet", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours techniques" + ], + "title": "Cin\u00e9ma-vid\u00e9o (B2)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours techniques" + ], + "title": "Cin\u00e9ma-vid\u00e9o (B3)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours techniques" + ], + "title": "Cin\u00e9ma-vid\u00e9o Bac 3", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Cin\u00e9ma d'animation", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Cin\u00e9ma d\u2019animation (B1)", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Cin\u00e9ma d\u2019animation (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Cin\u00e9ma d\u2019animation (MA)", + "ns": 0 + }, + { + "cats": [], + "title": "Cin\u00e9ma v\u00e9rit\u00e9, v\u00e9rit\u00e9s du cin\u00e9ma", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Communication visuelle et graphique", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Communication visuelle et graphique (MA)", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "ns": 0 + }, + { + "cats": [ + "Page web" + ], + "title": "Como Abrir Um Site De Vendas", + "ns": 0 + }, + { + "cats": [], + "title": "Constant", + "ns": 0 + }, + { + "cats": [], + "title": "Contact", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours techniques" + ], + "title": "Couleur : analyse et pratiques contextuelles", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Couleur : espace", + "ns": 0 + }, + { + "cats": [], + "title": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "ns": 0 + }, + { + "cats": [], + "title": "Creux et relief / mixte technique / aquatinte morsure directe et xylogravure", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Cultures num\u00e9riques", + "ns": 0 + }, + { + "cats": [ + "Pages avec des liens de fichiers bris\u00e9s", + "Sites satellites" + ], + "title": "Curlybraces", + "ns": 0 + }, + { + "cats": [], + "title": "DESIGN ECONOMICS", + "ns": 0 + }, + { + "cats": [], + "title": "DESSIN SPORTIF ! - 3 sessions de dessin sportif ponctu\u00e9es de quelques discussions sur le geste", + "ns": 0 + }, + { + "cats": [], + "title": "DRAMATURGIE SPORTIVE ! - Un exercice de dramaturgie qui m\u00e8ne \u00e0 la construction d'un r\u00e9cit collectif", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Damien Safie", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Dani\u00e8le Leclercq", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "David Evrard", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours techniques" + ], + "title": "De l\u2019oeuvre \u00e0 l\u2019imprim\u00e9", + "ns": 0 + }, + { + "cats": [], + "title": "Death is all you need", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Denis Deprez", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (MA)", + "M1", + "M2" + ], + "title": "Design et Politique du multiple (MA)", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Dessin", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Dessin (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Dessin (MA)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Dessin / atelier", + "ns": 0 + }, + { + "cats": [], + "title": "Dessin / le fait main num\u00e9rique", + "ns": 0 + }, + { + "cats": [ + "Stages" + ], + "title": "Dessin / mod\u00e8le vivant", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours techniques" + ], + "title": "Dessin / storyboard", + "ns": 0 + }, + { + "cats": [], + "title": "Dessin de caract\u00e8res : poch\u00e9es et variables", + "ns": 0 + }, + { + "cats": [], + "title": "Dessin de caract\u00e8res : \u00e0 pleins renvers\u00e9s", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Dessin d\u2019observation", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Dessin modulaire", + "ns": 0 + }, + { + "cats": [], + "title": "Devenir \u00e9tudiant-e \u00e0 l'erg", + "ns": 0 + }, + { + "cats": [], + "title": "Dialogues", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Digital arts / Coding", + "ns": 0 + }, + { + "cats": [], + "title": "Digital non-binaire", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Doctorat Third Cycle", + "ns": 0 + }, + { + "cats": [], + "title": "Document / Monument / m\u00e9moires interm\u00e9diaires", + "ns": 0 + }, + { + "cats": [], + "title": "Documents", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Dominique Goblet", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Drawing", + "ns": 0 + }, + { + "cats": [ + "M1" + ], + "title": "Droit de la Cr\u00e9ation et de l'Information", + "ns": 0 + }, + { + "cats": [], + "title": "Du concept \u00e9ditorial \u00e0 l'impression", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "D\u00e9l\u00e9gu\u00e9 \u00e0 la protection des donn\u00e9es (DPO)", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs" + ], + "title": "D\u00e9p\u00f4t Local", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours techniques" + ], + "title": "Ecriture / cr\u00e9ation textuelle (B1)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours techniques" + ], + "title": "Ecriture / cr\u00e9ation textuelle (B3)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Eleanor Ivory Weber", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Elke de Rijcke", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "English", + "ns": 0 + }, + { + "cats": [], + "title": "Enseignants", + "ns": 0 + }, + { + "cats": [], + "title": "Erasmus Belgica", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Erg, what is it ?", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Erg-paintings", + "ns": 0 + }, + { + "cats": [], + "title": "Erg-succursale", + "ns": 0 + }, + { + "cats": [], + "title": "Erg.be", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs" + ], + "title": "Erg Galerie", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Erg Graphisme Master", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Ergote Radio", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Ergoteur", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Eric Angenot", + "ns": 0 + }, + { + "cats": [ + "Page web" + ], + "title": "Espace culturels polyvalents", + "ns": 0 + }, + { + "cats": [], + "title": "Etherbox", + "ns": 0 + }, + { + "cats": [], + "title": "FAUX CMYK : workshop d'impression quadri Riso", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs", + "Sites satellites" + ], + "title": "FDDDL", + "ns": 0 + }, + { + "cats": [ + "Pages avec des liens de fichiers bris\u00e9s", + "Sites satellites" + ], + "title": "FDDDL / Typoth\u00e8que", + "ns": 0 + }, + { + "cats": [], + "title": "Fa, fe, fo, fr, fs, ft, fb, fh, fu, fy", + "ns": 0 + }, + { + "cats": [], + "title": "Fabrique d\u2019images \u2013 Mythologies singuli\u00e8res", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Fabrizio Terranova", + "ns": 0 + }, + { + "cats": [ + "M2" + ], + "title": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M2)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Fleur Courtois", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Florence Delhaye", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Formats, canons, gaufriers, en marge super max-width!", + "ns": 0 + }, + { + "cats": [], + "title": "Fouilles molles sur disques durs", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Fran\u00e7ois De Jonge", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Fran\u00e7oise Tahon", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Fr\u00e9d\u00e9ric Dupont", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Fr\u00e9d\u00e9ric Gaillard", + "ns": 0 + }, + { + "cats": [], + "title": "Gender fluid : Bye bye binary \u2014 des imaginaires possibles autour d\u2019une typographie inclusive", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Genevi\u00e8ve Casterman", + "ns": 0 + }, + { + "cats": [ + "M1", + "M2" + ], + "title": "Geste sp\u00e9culatif", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Giampiero Caiti", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Gilbert Fastenaekens", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Giovanni Guarini", + "ns": 0 + }, + { + "cats": [], + "title": "Graphic Scores", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Graphic design- Experimental and critical practices", + "ns": 0 + }, + { + "cats": [], + "title": "Graphic politics and experimentation", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Graphisme", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Graphisme (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Graphisme (MA)", + "ns": 0 + }, + { + "cats": [ + "Stages" + ], + "title": "Gravure Bois, lino & litho", + "ns": 0 + }, + { + "cats": [ + "Stages" + ], + "title": "Gravure M\u00e9tal", + "ns": 0 + }, + { + "cats": [], + "title": "Grmbl", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Guy Wouet\u00e9", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "G\u00e9rard Goffaux", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Harrisson", + "ns": 0 + }, + { + "cats": [], + "title": "Hashich, in.", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts. Histoire des arts contemporains / avant-garde au XXe si\u00e8cle (B3)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts / XIXe et XXe si\u00e8cle (B2)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts / arts non-europ\u00e9ens (B3)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts / de la Renaissance \u00e0 la fin du 19e si\u00e8cle (B1)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts / image (B2)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts / m\u00e9dia (B1)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des arts / m\u00e9dias (B2)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours th\u00e9oriques" + ], + "title": "Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication (B3)", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Https://erg-type.gitlab.io/le-nerf-de-la-lettre/", + "ns": 0 + }, + { + "cats": [ + "Enseignants", + "\u00c9quipe administrative" + ], + "title": "H\u00e9l\u00e8ne Bernard", + "ns": 0 + }, + { + "cats": [], + "title": "Iceberg", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Illustration", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Illustration (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Illustration (MA)", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Illustration - Comics", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours techniques" + ], + "title": "Image num\u00e9rique", + "ns": 0 + }, + { + "cats": [], + "title": "Images", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Information/Access", + "ns": 0 + }, + { + "cats": [], + "title": "Informations utiles", + "ns": 0 + }, + { + "cats": [], + "title": "Initiation mod\u00e9lisation 3d Zbrush", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Initiation \u00e0 la s\u00e9rigraphie", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Installation/Performance", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Installation/Performance (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Installation/Performance (MA)", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Installation - Performance", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Interfaces \u00e9lectroniques", + "ns": 0 + }, + { + "cats": [], + "title": "Intranet", + "ns": 0 + }, + { + "cats": [], + "title": "Introduction au textile et \u00e0 l'\u00e9lectronique (Pratiques num\u00e9riques)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "In\u00e8s Rabad\u00e1n", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Isabel Burr Raty", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Isabelle Jossa", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Isabelle Martin", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Ivo Provoost", + "ns": 0 + }, + { + "cats": [], + "title": "Je ne construis pas - \u00c9criture mat\u00e9riau \u2013 mat\u00e9riau d\u2019\u00e9criture", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Je t\u2019aime, moi non plus (Six le\u00e7ons sur l\u2019image et le texte)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Joachim Lacrosse", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Joanna Lorho", + "ns": 0 + }, + { + "cats": [], + "title": "Journ\u00e9e de r\u00e9flexion dans le cadre de l\u2019exposition US OR CHAOS", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Jo\u00eblle Tuerlinckx", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Juan d\u2019Oultremont", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "J\u00e9r\u00f4me Degive", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Kelly Josse", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Kobe Matthys", + "ns": 0 + }, + { + "cats": [], + "title": "LOOP ROOM", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs" + ], + "title": "La B\u00e0G", + "ns": 0 + }, + { + "cats": [], + "title": "La couleur tomb\u00e9e du ciel", + "ns": 0 + }, + { + "cats": [], + "title": "La pluridisciplinarit\u00e9", + "ns": 0 + }, + { + "cats": [], + "title": "Labo argentique N&B : D\u00e9veloppement de films argentiques et tirages sur papier N&B", + "ns": 0 + }, + { + "cats": [], + "title": "Labobine", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs" + ], + "title": "Labobine - Salle Super 8", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Laurence Rassel", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Laurent Baudoux", + "ns": 0 + }, + { + "cats": [], + "title": "Le Manisfeste, les origines", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Le blog de multimedialab.be", + "ns": 0 + }, + { + "cats": [], + "title": "Le calendrier acad\u00e9mique", + "ns": 0 + }, + { + "cats": [], + "title": "Le diagramme", + "ns": 0 + }, + { + "cats": [], + "title": "Le doctorat \u00e0 l'erg", + "ns": 0 + }, + { + "cats": [], + "title": "Le r\u00e8glement des \u00e9tudes", + "ns": 0 + }, + { + "cats": [ + "Cours techniques", + "M1" + ], + "title": "Le stage externe", + "ns": 0 + }, + { + "cats": [ + "B2", + "B3", + "M1", + "M2" + ], + "title": "Le stage interne", + "ns": 0 + }, + { + "cats": [], + "title": "Le s\u00e9minaire de l'erg", + "ns": 0 + }, + { + "cats": [], + "title": "Les chaises \u00e9lastiques", + "ns": 0 + }, + { + "cats": [], + "title": "Les cong\u00e9s de la po\u00e9sie (II)", + "ns": 0 + }, + { + "cats": [], + "title": "Les cours th\u00e9oriques communs \u00e0 tous les Masters", + "ns": 0 + }, + { + "cats": [], + "title": "Les formes politiques de Shirley Clarke", + "ns": 0 + }, + { + "cats": [], + "title": "Les lieux", + "ns": 0 + }, + { + "cats": [], + "title": "Les livres parl\u00e9s 2017", + "ns": 0 + }, + { + "cats": [], + "title": "License", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Lionel Maes", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Litt\u00e9rature contemporaine (B2)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Litt\u00e9rature g\u00e9n\u00e9rale (B1)", + "ns": 0 + }, + { + "cats": [], + "title": "Livres parl\u00e9s", + "ns": 0 + }, + { + "cats": [], + "title": "LoopRoom - Micro Narrative", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Loraine Furter", + "ns": 0 + }, + { + "cats": [], + "title": "Lotte Arndt", + "ns": 0 + }, + { + "cats": [ + "Conseil \u00e9tudiant" + ], + "title": "Louis Garrido", + "ns": 0 + }, + { + "cats": [], + "title": "Love Letter", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Ludivine Loiseau", + "ns": 0 + }, + { + "cats": [], + "title": "L\u2019enseignement inclusif \u00e0 l\u2019erg", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Magali Michaux", + "ns": 0 + }, + { + "cats": [], + "title": "Mai Abu ElDahab", + "ns": 0 + }, + { + "cats": [ + "Critique du f\u00e9minisme", + "Essai paru en 1984", + "Livre sur le f\u00e9minisme", + "Pages avec des liens de fichiers bris\u00e9s", + "\u00c9tudes de genre" + ], + "title": "Manifeste Cyborg", + "ns": 0 + }, + { + "cats": [], + "title": "Manifeste erg 1975", + "ns": 0 + }, + { + "cats": [], + "title": "Manoeuvres s\u00e9rigraphiques", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Manon De Boer", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Manu Blondiau", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Manuela Dechamps Otamendi", + "ns": 0 + }, + { + "cats": [], + "title": "Man\u0153uvres s\u00e9rigraphiques", + "ns": 0 + }, + { + "cats": [], + "title": "Map.svg", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Marc Wathieu", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Marcel Berlanger", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Marcos Mateos", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Marie-Christophe Lambert", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Marie-No\u00eblle Boutin", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Marie Feyereisen", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Maryam Kolly", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Maryline Ledoux", + "ns": 0 + }, + { + "cats": [], + "title": "Master Pratique de l'art - Outils critiques", + "ns": 0 + }, + { + "cats": [], + "title": "Masters \u00e0 finalit\u00e9 approfondie", + "ns": 0 + }, + { + "cats": [], + "title": "Masters \u00e0 finalit\u00e9 didactique", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Maxime Jean-Baptiste", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Maxime Lambrecht", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Media - Atelier pluridisciplinaire (B1)", + "ns": 0 + }, + { + "cats": [ + "B2" + ], + "title": "Media - Atelier pluridisciplinaire (B2)", + "ns": 0 + }, + { + "cats": [ + "B3" + ], + "title": "Media - Atelier pluridisciplinaire (B3)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Michela Sacchetto", + "ns": 0 + }, + { + "cats": [], + "title": "Minerval", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Mise en page et pratique de l'impression", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Monique Renault", + "ns": 0 + }, + { + "cats": [ + "Page web" + ], + "title": "Moussa Cheniguel", + "ns": 0 + }, + { + "cats": [], + "title": "Multidisciplinary Workshops - BA", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Multidisciplinary Workshops - MA", + "ns": 0 + }, + { + "cats": [], + "title": "Multiples agencements du politique", + "ns": 0 + }, + { + "cats": [ + "M2" + ], + "title": "M\u00e9thodologie / m\u00e9moire", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Narration - Atelier pluridisciplinaire (B1)", + "ns": 0 + }, + { + "cats": [ + "B2" + ], + "title": "Narration - Atelier pluridisciplinaire (B2)", + "ns": 0 + }, + { + "cats": [ + "B3" + ], + "title": "Narration - Atelier pluridisciplinaire (B3)", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Nasrin Tabatabai", + "ns": 0 + }, + { + "cats": [], + "title": "New Poster Cult", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Nicolas Marcon", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Nicolas Prignot", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Nicolas Storck", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Olivier Grenson", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Orientations at erg", + "ns": 0 + }, + { + "cats": [], + "title": "Orly - les man\u0153uvres du ventriloque", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours techniques" + ], + "title": "Outils et pratiques audiovisuels", + "ns": 0 + }, + { + "cats": [], + "title": "Outils techniques", + "ns": 0 + }, + { + "cats": [], + "title": "Outils th\u00e9oriques et critiques", + "ns": 0 + }, + { + "cats": [], + "title": "O\u00f9? Quoi? Comment? Qui?", + "ns": 0 + }, + { + "cats": [], + "title": "Pages Magazine", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Painting", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Patrizia Tripoli", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Peggy Pierrot", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Peinture", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Peinture (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Peinture (MA)", + "ns": 0 + }, + { + "cats": [ + "M1", + "M2" + ], + "title": "Performance et r\u00e9gimes performatifs en art depuis le XX\u00e8 si\u00e8cle", + "ns": 0 + }, + { + "cats": [], + "title": "Permanence quotidienne assur\u00e9e par Rapha\u00ebl Pirenne.", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M1" + ], + "title": "Philosophie contemporaine (M1)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours th\u00e9oriques" + ], + "title": "Philosophie esth\u00e9tique (B3)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Philosophie g\u00e9n\u00e9rale (B1)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Philosophie g\u00e9n\u00e9rale (B2)", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Photographie", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Photographie (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Photographie (MA)", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Photography", + "ns": 0 + }, + { + "cats": [], + "title": "Physical Computing", + "ns": 0 + }, + { + "cats": [], + "title": "Physical Poetics", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Pierre-Philippe Duch\u00e2telet", + "ns": 0 + }, + { + "cats": [], + "title": "Plan d'\u00e9tude interactif", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs" + ], + "title": "Plancube", + "ns": 0 + }, + { + "cats": [], + "title": "Plans d'\u00e9tude", + "ns": 0 + }, + { + "cats": [], + "title": "Portes ouvertes", + "ns": 0 + }, + { + "cats": [], + "title": "Pour les \u00e9tudiants", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (MA)", + "M1", + "M2" + ], + "title": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Pratique du carnet : texte et image", + "ns": 0 + }, + { + "cats": [ + "Pages avec des liens de fichiers bris\u00e9s", + "Sites satellites" + ], + "title": "Pratiques Num\u00e9riques B2-B3", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (MA)", + "M1", + "M2" + ], + "title": "Pratiques artistiques et complexit\u00e9 scientifique (MA)", + "ns": 0 + }, + { + "cats": [ + "Page web" + ], + "title": "Premi\u00e8res recherches et avant-projets", + "ns": 0 + }, + { + "cats": [], + "title": "PrestiDIGITAL, Pratiques magiques et occultures contemporaines autour de Arduino.", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs" + ], + "title": "Print lab", + "ns": 0 + }, + { + "cats": [ + "B2", + "B3", + "Cours techniques" + ], + "title": "Programmation num\u00e9rique", + "ns": 0 + }, + { + "cats": [], + "title": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 1er bloc du 1er cycle (60 cr\u00e9dits) - B1", + "ns": 0 + }, + { + "cats": [], + "title": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 1er cycle - B2-B3", + "ns": 0 + }, + { + "cats": [], + "title": "Programme d'\u00e9tudes d\u00e9taill\u00e9 du 2\u00e8me cycle - M1-M2", + "ns": 0 + }, + { + "cats": [], + "title": "Programmes d'\u00e9tudes - Grilles de cours", + "ns": 0 + }, + { + "cats": [], + "title": "Projet p\u00e9dagogique", + "ns": 0 + }, + { + "cats": [], + "title": "Pr\u00e9paration de l\u2019exposition \u00ab Images vol\u00e9es \u00bb, du 20/11 au 11 d\u00e9cembre \u00e0 la Cinematek", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Rapha\u00ebl Pirenne", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Rapha\u00ebl Van Lerberghe", + "ns": 0 + }, + { + "cats": [], + "title": "Rapports de Conseil de gestion p\u00e9dagogique", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Raya Baudinet-Lindberg", + "ns": 0 + }, + { + "cats": [], + "title": "Re*enacting Memories Of Struggles", + "ns": 0 + }, + { + "cats": [], + "title": "Recherche, exp\u00e9rimentation et projet personnel", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Renaud Huberlant", + "ns": 0 + }, + { + "cats": [ + "M2" + ], + "title": "Rencontres autour de travaux d'\u00e9tudiants", + "ns": 0 + }, + { + "cats": [], + "title": "Ressources", + "ns": 0 + }, + { + "cats": [], + "title": "Rideau de perles", + "ns": 0 + }, + { + "cats": [], + "title": "R\u00e8glement des \u00e9tudes", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "R\u00e9cits du r\u00e9el", + "ns": 0 + }, + { + "cats": [], + "title": "R\u00e9cits et exp\u00e9rimentation", + "ns": 0 + }, + { + "cats": [ + "Ateliers pluridisciplinaires (MA)", + "M1", + "M2" + ], + "title": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)", + "ns": 0 + }, + { + "cats": [], + "title": "R\u00e9cits et exp\u00e9rimentation\u2192 narration sp\u00e9culative", + "ns": 0 + }, + { + "cats": [], + "title": "R\u00e9seaux", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Sabine Voglaire", + "ns": 0 + }, + { + "cats": [ + "\u00c9quipe administrative" + ], + "title": "Sammy Del Gallo", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Sciences humaines et sociales / anthropologie (B1)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours th\u00e9oriques" + ], + "title": "Sciences humaines et sociales / anthropologie (B2)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours th\u00e9oriques" + ], + "title": "Sciences humaines et sociales / psychanalyse (B3)", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M1" + ], + "title": "Sciences humaines et sociales / psychanalyse (M1)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Sciences humaines et sociales / sciences \u00e9conomiques, politiques et sociales (B1)", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Sculpture", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Sculpture (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Sculpture (MA)", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Sculpture Art", + "ns": 0 + }, + { + "cats": [], + "title": "Service social", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Signe, Image, Ic\u00f4ne, Glyphes, Emojis, Pictos, No-Logo", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Simona Denicolai", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours techniques" + ], + "title": "Son (B2)", + "ns": 0 + }, + { + "cats": [ + "B3", + "Cours techniques" + ], + "title": "Son (B3)", + "ns": 0 + }, + { + "cats": [ + "Selection" + ], + "title": "Sons", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours techniques" + ], + "title": "Statuts de l\u2019image / Tourments et d\u00e9tournements", + "ns": 0 + }, + { + "cats": [], + "title": "Structures temporaires ?", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "St\u00e9phane No\u00ebl", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "St\u00e9phanie Vilayphiou", + "ns": 0 + }, + { + "cats": [ + "Cours techniques", + "M1", + "M2" + ], + "title": "Suivi de m\u00e9moire", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Sven Augustijnen", + "ns": 0 + }, + { + "cats": [ + "B2", + "Enseignants" + ], + "title": "Sylvie Bouteiller", + "ns": 0 + }, + { + "cats": [ + "Page web" + ], + "title": "S\u00e9bastien Lacomblez", + "ns": 0 + }, + { + "cats": [], + "title": "S\u00e9jours d'\u00e9tudes internationaux", + "ns": 0 + }, + { + "cats": [ + "M1", + "M2" + ], + "title": "S\u00e9minaire", + "ns": 0 + }, + { + "cats": [], + "title": "S\u00e9minaire 2018 : No Commons Without Commoning", + "ns": 0 + }, + { + "cats": [ + "M1", + "M2" + ], + "title": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques", + "ns": 0 + }, + { + "cats": [ + "M1", + "M2" + ], + "title": "S\u00e9minaire Vid\u00e9o", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M1" + ], + "title": "S\u00e9miologie (M1)", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M2" + ], + "title": "S\u00e9miologie (M2)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "S\u00e9miologie / image (B1)", + "ns": 0 + }, + { + "cats": [ + "Stages" + ], + "title": "S\u00e9rigraphie", + "ns": 0 + }, + { + "cats": [], + "title": "Teaching To Transgress", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Technical courses", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours techniques" + ], + "title": "Techniques fondamentales, dessin (B1)", + "ns": 0 + }, + { + "cats": [ + "B2", + "Cours techniques" + ], + "title": "Techniques fondamentales, dessin (B2)", + "ns": 0 + }, + { + "cats": [], + "title": "The (s)Peaking Spots", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "The Networked Social", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Theoretical courses", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M1" + ], + "title": "Th\u00e9orie de la communication (M1-M2)", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours th\u00e9oriques" + ], + "title": "Th\u00e9orie et pratique des nouvelles technologies / Cultures num\u00e9riques - une bo\u00eete \u00e0 outils (B1)", + "ns": 0 + }, + { + "cats": [ + "Pages avec des erreurs de coloration syntaxique" + ], + "title": "Tiny Tiny RSS", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Toma Muteba Luntumbue", + "ns": 0 + }, + { + "cats": [], + "title": "Toma Muteba Lutumbue", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Traitement des traces", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Trans/Border", + "ns": 0 + }, + { + "cats": [], + "title": "Tutorat", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Typographie", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Typographie (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Typographie (MA)", + "ns": 0 + }, + { + "cats": [ + "B1" + ], + "title": "Typographie - module", + "ns": 0 + }, + { + "cats": [ + "M2" + ], + "title": "Typographie Master 2", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Typography", + "ns": 0 + }, + { + "cats": [], + "title": "Une fabrique d\u2019images, un outil de pens\u00e9e", + "ns": 0 + }, + { + "cats": [ + "Outils collectifs", + "Sites satellites" + ], + "title": "Ustensiles", + "ns": 0 + }, + { + "cats": [ + "B1", + "Cours de soutien sp\u00e9cifique" + ], + "title": "Ustensiles num\u00e9riques", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Videography", + "ns": 0 + }, + { + "cats": [ + "Orientations" + ], + "title": "Vid\u00e9ographie", + "ns": 0 + }, + { + "cats": [ + "B1", + "B2", + "B3" + ], + "title": "Vid\u00e9ographie (BA)", + "ns": 0 + }, + { + "cats": [ + "Cours de soutien \u00e0 l'orientation", + "M1", + "M2" + ], + "title": "Vid\u00e9ographie (MA)", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "Vimeo", + "ns": 0 + }, + { + "cats": [], + "title": "Visites d'ateliers", + "ns": 0 + }, + { + "cats": [ + "English" + ], + "title": "Visual and Graphic Communication", + "ns": 0 + }, + { + "cats": [], + "title": "Walk + talk'", + "ns": 0 + }, + { + "cats": [], + "title": "Wall In Progress", + "ns": 0 + }, + { + "cats": [], + "title": "Webring P2P Client, server, auteur sur le web peer to peer", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Wendy Van Wynsberghe", + "ns": 0 + }, + { + "cats": [], + "title": "Winter School", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop-rencontre avec Didier Demorcy", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop 12h Bande dessin\u00e9e", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Jingle Jungle", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Juillet 2017", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Media / Son", + "ns": 0 + }, + { + "cats": [ + "M1", + "M2" + ], + "title": "Workshop Pages Magazine", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Rideau de Perles", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Rideau de perles Erg-bookscanner", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Socles", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Son / narration", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop S\u00e9rigraphie", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Tarot Souriau", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop Treviso", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop VIDEO (BAC + MASTERS)", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop gravure, Creux et relief / mixte technique / aquatinte morsure directe et xylogravure", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop micro:bit", + "ns": 0 + }, + { + "cats": [], + "title": "Workshop mix SON & COULEUR - Exp\u00e9rimentations et interactions entre couleurs et sons", + "ns": 0 + }, + { + "cats": [], + "title": "Workshops 25-30 mars 2019", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Xavier Garc\u00eda Bard\u00f3n", + "ns": 0 + }, + { + "cats": [], + "title": "Xml collection", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Yvan Flasse", + "ns": 0 + }, + { + "cats": [ + "Enseignants" + ], + "title": "Yves Bernard", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "ZigzagAnimal", + "ns": 0 + }, + { + "cats": [ + "Sites satellites" + ], + "title": "\u00c0 propos", + "ns": 0 + }, + { + "cats": [ + "Cours techniques", + "M1" + ], + "title": "\u00c9criture mat\u00e9riau", + "ns": 0 + }, + { + "cats": [ + "Cours techniques", + "M1" + ], + "title": "\u00c9critures exp\u00e9rimentales", + "ns": 0 + }, + { + "cats": [ + "Cours th\u00e9oriques", + "M1", + "M2" + ], + "title": "\u00c9tude des artefacts (M1-M2)", + "ns": 0 + } + ], + "redirects": { + "Bande dessin\u00e9e MA": "Bande dessin\u00e9e (MA)", + "Cours g\u00e9n\u00e9ral : Litt\u00e9rature g\u00e9n\u00e9rale": "Litt\u00e9rature g\u00e9n\u00e9rale (B1)", + "S\u00e9minaire Visual Culture": "S\u00e9minaire Visual Culture(s)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des arts. Histoire des arts contemporains / avant-garde au XXe si\u00e8cle": "Histoire et actualit\u00e9 des arts. Histoire des arts contemporains / avant-garde au XXe si\u00e8cle (B3)", + "Etudiants": "Tutorat", + "Pratique de l\u2019art - outils critiques\u2192 art et contextes simultan\u00e9s": "Pratique de l\u2019art - outils critiques\u2192 art et contextes simultan\u00e9s (MA)", + "PUTSCH galerie": "Galerie de l'erg", + "Orientations at erg (BA)": "Orientations at erg", + "Cin\u00e9ma d animation": "Cin\u00e9ma d'animation", + "Cours g\u00e9n\u00e9ral : Actualit\u00e9s culturelles / Actualit\u00e9 et lectures de l\u2019art / Modernit\u00e9": "Actualit\u00e9s culturelles / Actualit\u00e9 et lectures de l\u2019art / Modernit\u00e9 (B2)", + "Ecriture : cr\u00e9ation textuelle": "Ecriture / cr\u00e9ation textuelle (B3)", + "Cours g\u00e9n\u00e9ral : Litt\u00e9rature contemporaine": "Litt\u00e9rature contemporaine (B2)", + "International": "Cat\u00e9gorie:International", + "R\u00e9cits et exp\u00e9rimentation\u2192 narration speculative (MA)": "R\u00e9cits et exp\u00e9rimentation (MA)", + "Narration sp\u00e9culative : Atelier pluridisciplinaire (M1-M2)": "Narration sp\u00e9culative (MA)", + "Pratique de l\u2019art - outils critiques (MA)": "Pratique de l\u2019art - outils critiques, arts et contexte simultan\u00e9s (MA)", + "Ergoteur (feed)": "Ergoteur (flux)", + "Masters": "Cat\u00e9gorie:Masters", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Sciences humaines et sociales / psychanalyse": "Sciences humaines et sociales / psychanalyse (B3)", + "Joanna Lohro": "Joanna Lorho", + "Cours g\u00e9n\u00e9ral : Philosophie esth\u00e9tique": "Philosophie esth\u00e9tique (B3)", + "Dessin de caract\u00e8res": "Dessin de caract\u00e8res : \u00e0 pleins renvers\u00e9s", + "Inscription": "Admission", + "Toma Luntumbue": "Toma Muteba Luntumbue", + "Histoire et actualit\u00e9 des m\u00e9dia / th\u00e9orie de la communication (B3)": "Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication (B3)", + "Ludi Loiseau": "Ludivine Loiseau", + "Books review": "Books review (M1-M2)", + "\u00c9crire dans le langage, les formes et les formats de repr\u00e9sentation que nos soci\u00e9t\u00e9s se donnent d\u2019elles-m\u00eames (pour une \u00e9criture de l\u2019appropriation)": "\u00c9criture", + "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art - Master 1": "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art (M1)", + "Galerie": "PUTSCH galerie", + "S\u00e9minaire Politique du multiple": "S\u00e9minaire Politique et exp\u00e9rimentation graphiques", + "Creux et relief / mixte technique / pointe s\u00e8che xylogravure": "Creux et relief / mixte technique / aquatinte morsure directe et xylogravure", + "Sonographie / Phonographie : Le son dans le syst\u00e8me moderne des arts et communications. - Master 2": "Sonographie / Phonographie : Le son dans le syst\u00e8me moderne des arts et communications", + "Cin\u00e9ma-vid\u00e9o Bac 2": "Cin\u00e9ma-vid\u00e9o (B2)", + "Parler \u00e0 la machine": "Interfaces \u00e9lectroniques", + "Image / Signe / Dessin": "Une fabrique d\u2019images, un outil de pens\u00e9e", + "Sonographie / Phonographie : Le son dans le syst\u00e8me moderne des arts et communications": "S\u00e9miologie (M2)", + "Signe, Dessin, Dessin graphique": "Dessin modulaire", + "Pdf": "Documents", + "Le nerf de la lettre": "Page web:Le nerf de la lettre (gitlab)", + "S\u00e9minaire 2017 : After Empire": "S\u00e9minaire 2018", + "Les chaises \u00e9lastique": "Les chaises \u00e9lastiques", + "Design \u00e9ditorial/erg.edit: Politique du multiple (MA)": "Politique du multiple (MA)", + "Ines Rabadan": "In\u00e8s Rabadan", + "Cin\u00e9ma d\u2019animation MA": "Cin\u00e9ma d\u2019animation (MA)", + "Cours g\u00e9n\u00e9ral : Histoire et actualit\u00e9 des arts / XIXe et XXe si\u00e8cle": "Histoire et actualit\u00e9 des arts / XIXe et XXe si\u00e8cle (B2)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des m\u00e9dia / th\u00e9orie de la communication Bac 3": "Histoire et actualit\u00e9 des m\u00e9dia / th\u00e9orie de la communication (B3)", + "Formats, Matrice, Grille, Gabarit, Lectures \u00e9cran, Responsive Design": "Formats, canons, gaufriers, en marge super max-width!", + "Les lieux de production et d'exp\u00e9rimentation": "Cat\u00e9gorie:Les lieux de production et d'exp\u00e9rimentation", + "Pratiques graphiques et complexit\u00e9 scientifique (MA)": "Pratiques artistiques et complexit\u00e9 scientifique (MA)", + "S\u00e9minaire 2018": "S\u00e9minaire 2018 : No Commons Without Commoning", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication": "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication Bac 2", + "Cours g\u00e9n\u00e9ral : Philosophie g\u00e9n\u00e9rale": "Philosophie g\u00e9n\u00e9rale (B1)", + "Admission en cours d\u2019\u00e9tudes": "Admission en cours d\u2019\u00e9tudes (Bachelor 2, 3 & Masters)", + "Politique et exp\u00e9rimentation graphique\u2192 design \u00e9ditorial / erg.edit : politique du multiple": "Politique et exp\u00e9rimentation graphique\u2192 design \u00e9ditorial / erg.edit : politique du multiple (MA)", + "Le conseil \u00e9tudiant": "Cat\u00e9gorie:Conseil \u00e9tudiant", + "L'\u00e9quipe administratives": "L'\u00e9quipe administrative", + "Alexia De Visscher": "Alexia de Visscher", + "S\u00e9minaire PEG": "S\u00e9minaire PEG : Visual Culture", + "Th\u00e9orie de la communication Master": "Th\u00e9orie de la communication (MA)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Philosophie g\u00e9n\u00e9rale": "Cours g\u00e9n\u00e9ral \u00e0 choix : Philosophie g\u00e9n\u00e9rale (B2)", + "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art - Master 2": "Actualit\u00e9 culturelles / actualit\u00e9 et lecture de l\u2019art (M2)", + "La direction": "Laurence Rassel", + "Cours g\u00e9n\u00e9ral : Actualit\u00e9s culturelles / actualit\u00e9 et lectures de l\u2019art": "Actualit\u00e9s culturelles / actualit\u00e9 et lectures de l\u2019art (B3)", + "Technical courses in Bachelors": "Technical courses", + "Politique du multiple (MA)": "Design et Politique du multiple (MA)", + "Narration sp\u00e9culative (M1-M2)": "Atelier pluridisciplinaire : Narration sp\u00e9culative (M1-M2)", + "Workshop Physical Computing": "PrestiDIGITAL", + "Livres parl\u00e9s 2017": "Les livres parl\u00e9s 2017", + "Workshop Rideau de Perles avec Dubravka Sekulic": "Workshop Rideau de Perles", + "Masters \u00e0 finalit\u00e9 sp\u00e9cialis\u00e9e": "Masters \u00e0 finalit\u00e9 approfondie", + "ADMISSION BACHELOR 1": "Admission Bachelor 1", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Philosophie g\u00e9n\u00e9rale (B2)": "Philosophie g\u00e9n\u00e9rale (B2)", + "Art & contextes simultan\u00e9s : Atelier pluridisciplianire (MA)": "Art & contextes simultan\u00e9s : Atelier pluridisciplinaire (M1-M2)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Sciences humaines et sociales / sciences \u00e9conomiques, politiques et sociales": "Sciences humaines et sociales / sciences \u00e9conomiques, politiques et sociales (B1)", + "Erasmus+": "International", + "Cours g\u00e9n\u00e9ral : Philosophie / G\u00e9n\u00e9rale": "Cours g\u00e9n\u00e9ral : Philosophie g\u00e9n\u00e9rale", + "Techniques fondamentales, dessin": "Techniques fondamentales, dessin (B1)", + "S\u00e9minaire PEG : Visual Culture": "S\u00e9minaire Politique du multiple", + "Philosophie contemporaine": "Philosophie contemporaine (M1)", + "Th\u00e9orie et pratique des nouvelles technologies / Cultures num\u00e9riques - une bo\u00eete \u00e0 outils": "Cours g\u00e9n\u00e9ral : Th\u00e9orie et pratique des nouvelles technologies / Cultures num\u00e9riques - une bo\u00eete \u00e0 outils", + "Espace Public Num\u00e9rique": "The Networked Social", + "\u00c9criture": "\u00c9criture mat\u00e9riau", + "Pour les \u00e9tudiant-e-s": "Intranet", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des arts / XIXe et XXe si\u00e8cle": "Histoire et actualit\u00e9 des arts / XIXe et XXe si\u00e8cle (B2)", + "S\u00e9miologie/Image - Master 1": "S\u00e9miologie (M1)", + "Admission": "Admission 2019-2020", + "Communication visuelle et graphique (BA)": "Communication visuelle et graphique \u2192 Pratiques num\u00e9riques (BA)", + "Multiples agencements du politique (TALOS)": "Multiples agencements du politique", + "S\u00e9minaire Faire Porte F\u00e9conde / pratiques artistiques - critique sociale": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale", + "Galerie de l'erg": "Erg Galerie", + "R\u00e9cits et exp\u00e9rimentation (MA)": "R\u00e9cits et exp\u00e9rimentation - Narration sp\u00e9culative (MA)", + "Suivi du m\u00e9moire": "Suivi de m\u00e9moire", + "Cours g\u00e9n\u00e9ral : Histoire et actualit\u00e9 des arts / Image": "Histoire et actualit\u00e9 des arts / image (B2)", + "R\u00e9cits et exp\u00e9rimentation\u2192 narration speculative": "R\u00e9cits et exp\u00e9rimentation\u2192 narration speculative (MA)", + "Parler \u00e0 la machine, terminal": "Parler \u00e0 la machine", + "Cours g\u00e9n\u00e9ral : Litt\u00e9rature / litt\u00e9rature contemporaine": "Cours g\u00e9n\u00e9ral : Litt\u00e9rature contemporaine", + "Cin\u00e9ma d\u2019animation BA": "Cin\u00e9ma d\u2019animation (BA)", + "Books review (M1-M2)": "Etude des art\u00e9facts (M1-M2)", + "Graphic Practices and Scientific Complexity": "Artistic Practices and Scientific Complexity", + "Cours g\u00e9n\u00e9ral : S\u00e9miologie / image": "S\u00e9miologie / image (B1)", + "Raya Lindberg": "Raya Baudinet-Lindberg", + "Pratique de l\u2019art - outils critiques\u2192 art et contextes simultan\u00e9s (MA)": "Pratique de l\u2019art - outils critiques (MA)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication Bac 2": "Histoire et actualit\u00e9 des m\u00e9dias / th\u00e9orie de la communication (B2)", + "Emmanuel Blondiau": "Manu Blondiau", + "Statut de l'image": "Statuts de l\u2019image / Tourments et d\u00e9tournements", + "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires": "Cours sp\u00e9cifiques li\u00e9s aux ateliers pluridisciplinaires (MA)", + "Techniques fondamentales : dessin": "Techniques fondamentales : dessin (B2)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Sciences humaines et sociales / anthropologie": "Sciences humaines et sociales / anthropologie (B1)", + "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M1-M2)": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M2)", + "Techniques fondamentales : dessin (B2)": "Techniques fondamentales, dessin (B2)", + "Le conseil de gestion p\u00e9dagogique": "Cat\u00e9gorie:Conseil de gestion p\u00e9dagogique", + "Cours g\u00e9n\u00e9ral : Histoire et actualit\u00e9 des arts / arts non-europ\u00e9ens": "Histoire et actualit\u00e9 des arts / arts non-europ\u00e9ens (B3)", + "Accueil": "Bienvenue \u00e0 l\u2019erg", + "Cours g\u00e9n\u00e9ral : Histoire et actualit\u00e9 des arts / Arts non-europ\u00e9ens": "Cours g\u00e9n\u00e9ral : Histoire et actualit\u00e9 des arts / arts non-europ\u00e9ens", + "Cours g\u00e9n\u00e9ral : s\u00e9miologie / image": "Cours g\u00e9n\u00e9ral : S\u00e9miologie / image", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des arts / m\u00e9dia": "Histoire et actualit\u00e9 des arts / m\u00e9dia (B1)", + "Workshop avec F\u00e9licit\u00e9 Landrivon": "Workshop en brigade avec F\u00e9licit\u00e9 Landrivon", + "\u00c9cole doctorale 20": "Le doctorat \u00e0 l'erg", + "Marc Watthieu": "Marc Wathieu", + "Cin\u00e9ma-vid\u00e9o": "Cin\u00e9ma-vid\u00e9o Bac 2", + "Metapost": "Fa, fe, fo, fr, fs, ft, fb, fh, fu, fy", + "L' \u00e9quipe administrative": "Les \u00e9quipes", + "PrestiDIGITAL": "PrestiDIGITAL, Pratiques magiques et occultures contemporaines autour de Arduino.", + "Notions de l\u00e9gislation et de droit": "Droit de la Cr\u00e9ation et de l'Information", + "Xavier Garcia Bardon": "Xavier Garc\u00eda Bard\u00f3n", + "Bande dessin\u00e9e BA": "Bande dessin\u00e9e (BA)", + "Theoretical courses in Bachelors": "Theoretical courses", + "Harrisson / Jo\u00ebl Vermot": "Harrisson", + "AP : DESIGN \u00c9DITORIAL / ERG.EDIT : POLITIQUE DU MULTIPLE": "AP : POLITIQUE DU MULTIPLE", + "Pluridisciplinary workshops": "English", + "Cours g\u00e9n\u00e9ral : Histoire et actualit\u00e9 des arts / de la Renaissance \u00e0 la fin du 19e si\u00e8cle": "Histoire et actualit\u00e9 des arts / de la Renaissance \u00e0 la fin du 19e si\u00e8cle", + "Th\u00e9orie de la communication (MA)": "Th\u00e9orie de la communication (M1-M2)", + "L'\u00e9quipe administrative": "Cat\u00e9gorie:\u00c9quipe administrative", + "Organigramme": "Organisation", + "Cours g\u00e9n\u00e9ral : Litt\u00e9rature / G\u00e9n\u00e9rale": "Cours g\u00e9n\u00e9ral : Litt\u00e9rature g\u00e9n\u00e9rale", + "Ecriture et cr\u00e9ation textuelle": "Ecriture / cr\u00e9ation textuelle (B1)", + "Cours g\u00e9n\u00e9ral \u00e0 choix : Histoire et actualit\u00e9 des arts / m\u00e9dias": "Histoire et actualit\u00e9 des arts / m\u00e9dias (B2)", + "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale": "Faire Porte F\u00e9conde / pratiques artistiques - critique sociale (M1-M2)", + "Politique et exp\u00e9rimentation graphique\u2192 pratiques graphiques et complexit\u00e9 scientifique (MA)": "Pratiques graphiques et complexit\u00e9 scientifique (MA)", + "Etude des art\u00e9facts (M1-M2)": "\u00c9tude des artefacts (M1-M2)", + "Pratique de l\u2019art - outils critiques, arts et contexte simultan\u00e9s (MA)": "Pratique de l\u2019art : outils critiques - arts et contexte simultan\u00e9s (MA)", + "Jo\u00ebl Vermot": "Harrisson / Jo\u00ebl Vermot", + "Cours g\u00e9n\u00e9ral : Th\u00e9orie et pratique des nouvelles technologies / Cultures num\u00e9riques - une bo\u00eete \u00e0 outils": "Th\u00e9orie et pratique des nouvelles technologies / Cultures num\u00e9riques - une bo\u00eete \u00e0 outils (B1)", + "Politique et exp\u00e9rimentation graphique\u2192 pratiques graphiques et complexit\u00e9 scientifique": "Politique et exp\u00e9rimentation graphique\u2192 pratiques graphiques et complexit\u00e9 scientifique (MA)", + "In\u00e8s Rabadan": "In\u00e8s Rabad\u00e1n" + } +} diff --git a/src/forcenet.js b/src/forcenet.js new file mode 100644 index 0000000..4c2c0dc --- /dev/null +++ b/src/forcenet.js @@ -0,0 +1,221 @@ +import { event, select, selectAll} from 'd3-selection'; +import { values, set, map } from 'd3-collection'; +import { drag } from 'd3-drag'; +import { zoom } from 'd3-zoom'; +import { forceSimulation, forceLink, forceManyBody, forceCenter, forceX, forceY, forceRadial } from 'd3-force'; +// import { Wiki, Page } from './wiki.js'; +import EventEmitter from 'eventemitter3'; +// import { json } from 'd3-fetch'; + +export class ForceNet { + + constructor (symbols) { + var width = 600, + height = 600; + + this.symbols = symbols || {}; + this.events = new EventEmitter(); + this.active_page = null; + // this.nodes = {}; + this.simulation = forceSimulation() + .velocityDecay(0.1) + .force("link", forceLink().id(d => d.title)) + .force("charge", forceManyBody()) + .force("radial", forceRadial(180, width/2, height/2)); + // .force("center", forceCenter(width / 2, height / 2)); + this.svg = null; + // this.historylinks = {}; + } + + on (message, callback, context) { + this.events.on(message, callback, context); + } + + init_svg (svg) { + this.svg = select(svg || "svg"); + this.zoom = zoom() + .scaleExtent([1 / 16, 4]) + .on("zoom", () => { + this.content.attr("transform", event.transform); + // console.log("transform", event.transform, this.content.attr("transform")); + }); + this.rect = this.svg.append("rect") + .attr("width", 1000) + .attr("height", 1000) + .style("fill", "none") + .style("pointer-events", "all") + .call(this.zoom); + this.content = this.svg.append("g") + .attr("id", "content"), + this.linksg = this.content.append("g") + .attr("class", "links"); + this.nodesg = this.content.append("g") + .attr("class", "nodes"); + } + + dragstarted (d) { + if (!event.active) this.simulation.alphaTarget(0.3).restart(); + d.fx = d.x; + d.fy = d.y; + } + + dragged (d) { + d.fx = event.x; + d.fy = event.y; + } + + dragended(d) { + if (!event.active) this.simulation.alphaTarget(0); + d.fx = null; + d.fy = null; + } + + link_key (a, b) { + return (a < b) ? ("link_"+a+"_"+b) : ("link_"+b+"_"+a); + } + + get_symbol (d, def) { + for (var i=0, l=d.cats.length; i { return this.link_key(d.source.title, d.target.title) }); + var link_enter = link.enter() + .append("line"); + + link.exit().each(d => { + d.source.linked = false; + d.target.linked = false; + }).remove(); + + link_enter.merge(link).each(d => { + d.source.linked = true; + d.target.linked = true; + }); + + var node = this.nodesg + .selectAll("g.page") + .data(graph.nodes, function (d) { return d.title }); + + var that = this; + var node_enter = node.enter().append("g") + .attr("class", "page") + // .attr("class", d=>"page "+this.wiki.get_ns_classname(d.ns)) + .on("click", function(d) { + that.events.emit("nodeclick", d, this); + // this.set_active_node(d.title); + }) + .on("mouseover", function (d) { + // console.log("mouseover", this); + select(this).classed("mouse", true); + }) + .on("mouseout", function (d) { + // console.log("mouseout", this); + select(this).classed("mouse", false); + }) + .call(drag() + .on("start", this.dragstarted.bind(this)) + .on("drag", this.dragged.bind(this)) + .on("end", this.dragended.bind(this))); + + node_enter.append("use") + .attr("xlink:href", d => this.get_symbol(d, "default")) + .attr("class", "testcolor"); + // { + // for (var i=0, l=d.cats.length; i d.title) + .attr("x", 10); + + //node_enter.append("title") + // .text(function(d) { return d.title; }); + + node = node_enter.merge(node); + link = link_enter.merge(link); + + node.classed("active", d=>d.active); + + this.simulation + .nodes(graph.nodes) + .on("tick", ticked); + + this.simulation.force("link") + .links(graph.links); + + this.simulation.force("radial").radius(d => d.linked ? null : 200); + + function ticked() { + link + .attr("x1", function(d) { return d.source.x; }) + .attr("y1", function(d) { return d.source.y; }) + .attr("x2", function(d) { return d.target.x; }) + .attr("y2", function(d) { return d.target.y; }); + + // node + // .attr("cx", function(d) { return d.x; }) + // .attr("cy", function(d) { return d.y; }); + node + .attr("transform", d => `translate(${d.x},${d.y})`); + } + this.update_nodes(); + this.update_forces(); + // this.simulation.alphaTarget(0.3).restart(); + } + + update_nodes () { + var nodes = this.nodesg.selectAll("g.page"); + console.log("update_nodes", nodes.size()); + nodes.classed("active", d=>d.active); + nodes.classed("active2", d=>d.active2); + nodes.classed("highlight", d=>d.highlight); + nodes.sort((a, b) => { + // console.log("sort", a, b); + var x = a.active ? 10 : (a.active2 ? 5 : 0), + y = b.active ? 10 : (b.active2 ? 5 : 0); + return x - y; + }); + var links = this.linksg.selectAll("line"); + links.classed("active2", d=>d.active2); + links.classed("history", d=>d.type == "history"); + links.sort((a, b) => { + // console.log("sort", a, b); + var x = a.active2 ? 10 : (a.history ? 5 : 0), + y = b.active2 ? 10 : (b.history ? 5 : 0); + return x - y; + }); + } + + update_forces () { + var force = this.simulation.force("link"); + console.log("update_forces:force", force); + this.simulation.force("link").strength(d => { + if (d.source.active || d.target.active) { + return 1; + } else { + // same as d3.force's defaultStrength + return 0.5 * (1 / Math.min(d.source.count, d.target.count)); + } + }); + this.simulation.alphaTarget(0.3).restart(); + } + + +} + diff --git a/src/test.js b/src/test.js new file mode 100644 index 0000000..52f7a98 --- /dev/null +++ b/src/test.js @@ -0,0 +1,3 @@ +export function test () { + alert("testing import"); +} \ No newline at end of file diff --git a/src/wiki.js b/src/wiki.js new file mode 100644 index 0000000..8212438 --- /dev/null +++ b/src/wiki.js @@ -0,0 +1,154 @@ + +import fetchJsonp from 'fetch-jsonp'; +import { map } from 'd3-collection'; + +var NS = { + main: 0, + discussion: 1, + template: 10, + category: 14, + news: 3106, + web: 3116 +} + +export class Wiki { + constructor (apiurl) { + this.apiurl = apiurl; + this.pages_by_title = {}; + this.ns_names = {}; + for (var key in NS) { + var nsid = NS[key]; + this.ns_names[nsid] = key; + } + } + get_page_by_title (title) { + var p = this.pages_by_title[title]; + if (p) { + return p; + } else { + p = new Page(this, {title: title, ns: 0}); + this.pages_by_title[title] = p; + return p; + } + } + page_for_object (n, merge_data) { + if (merge_data === undefined) { merge_data = true; } + var title = n.title, + p = this.pages_by_title[title]; + if (p) { + if (merge_data) { p.merge_data(n); } + return p; + } else { + p = new Page(this, n); + this.pages_by_title[title] = p; + return p; + } + } + get_ns_classname (nsid) { + // console.log("get_ns_classname", nsid, this.ns_names[nsid]); + var ret = this.ns_names[nsid]; + console.log("classname", ret); + if (ret === undefined) { console.log("warning classname undefined for ns", nsid); } + return ret; + } + union (p1, p2) { + var union = map(p1, d=>d.title); + for (var i=0, l=p2.length; i this.wiki.page_for_object(x)); + // console.log("get_backlinks", ret); + console.log("get_prop", pname, prefix, ret); + return ret; + } + async get_links () { + return await this.get_prop("links", "pl"); + // // http://localhost/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + // var ret = []; + // var url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&prop=links&titles="+encodeURIComponent(this.title); + // while (true) { + // var data = await fetchJsonp(url); + // var json = await data.json(); + // // console.log("JSON", json); + // if (json.query.pages[0]) { + // var p = json.query.pages[0]; + // // extract any missing page info + // if (p.ns && !this.ns) { this.ns = p.ns; } + // if (p.pageid && !this.pageid) { this.pageid = p.pageid; } + // } + // if (json.query.pages[0].links) { + // ret.push.apply(ret, json.query.pages[0].links); + // } + // if (!json.continue) { break; } + // url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&prop=links&plcontinue="+json.continue.plcontinue+"&titles="+encodeURIComponent(this.title); + // } + // ret = ret.map(x => this.wiki.page_for_object(x)); + // // map these to page objects + // return ret; + } + async get_linkshere () { + return await this.get_prop("linkshere", "lh"); + } + async get_list () { + // http://localhost/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg + var ret = []; + var url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&list=backlinks&bltitle="+encodeURIComponent(this.title); + while (true) { + var data = await fetchJsonp(url); + var json = await data.json(); + // console.log("BACKLINKS.RAW", json); + // filter REDIRECTS + Discussion pages (ns==1) + var backlinks = json.query.backlinks; + // backlink = backlinks.filter(x => (!x.redirect && x.ns != 1); + ret.push.apply(ret, backlinks); + if (!json.continue) { break; } + url = this.wiki.apiurl+"?action=query&format=json&formatversion=2&list=backlinks&blcontinue="+json.continue.blcontinue+"&bltitle="+encodeURIComponent(this.title); + } + ret = ret.map(x => this.wiki.page_for_object(x)); + // console.log("get_backlinks", ret); + return ret; + } +} diff --git a/src/wikimap.js b/src/wikimap.js new file mode 100644 index 0000000..3246428 --- /dev/null +++ b/src/wikimap.js @@ -0,0 +1,210 @@ +import { event, select, selectAll} from 'd3-selection'; +import { values, set, map } from 'd3-collection'; +import { drag } from 'd3-drag'; +import { forceSimulation, forceLink, forceManyBody, forceCenter, forceX, forceY, forceRadial } from 'd3-force'; +import { Wiki, Page } from './wiki.js'; +import EventEmitter from 'eventemitter3'; + +export class Map { + + constructor (apiurl) { + var width = 600, + height = 600; + this.wiki = new Wiki(apiurl); + this.events = new EventEmitter(); + this.active_page = null; + // this.nodes = {}; + this.simulation = forceSimulation() + .velocityDecay(0.1) + .force("link", forceLink().id(d => d.title)) + .force("charge", forceManyBody()) + .force("radial", forceRadial(180, width/2, height/2)); + // .force("center", forceCenter(width / 2, height / 2)); + this.svg = null; + this.historylinks = {}; + } + + on (message, callback, context) { + this.events.on(message, callback, context); + } + + init_svg (svg) { + this.svg = select(svg || "svg"); + this.linksg = this.svg.append("g") + .attr("class", "links"); + this.nodesg = this.svg.append("g") + .attr("class", "nodes"); + } + + dragstarted (d) { + if (!event.active) this.simulation.alphaTarget(0.3).restart(); + d.fx = d.x; + d.fy = d.y; + } + + dragged (d) { + d.fx = event.x; + d.fy = event.y; + } + + dragended(d) { + if (!event.active) this.simulation.alphaTarget(0); + d.fx = null; + d.fy = null; + } + + update_graph (graph) { + // console.log("UPDATE GRAPH", graph.nodes.length, graph.links.length); + var that = this, + link = this.linksg.selectAll("line") + .data(graph.links, function (d) { return that.link_key(d.source.title, d.target.title) }); + var link_enter = link.enter() + .append("line"); + + link.exit().each(d => { + d.source.linked = false; + d.target.linked = false; + }).remove(); + + link_enter.merge(link).each(d => { + d.source.linked = true; + d.target.linked = true; + }); + + var node = this.nodesg + .selectAll("g.page") + .data(graph.nodes, function (d) { return d.title }); + + var node_enter = node.enter().append("g") + .attr("class", d=>"page "+this.wiki.get_ns_classname(d.ns)) + .on("click", d => { + this.set_active_node(d.title); + }) + .on("mouseover", function (d) { + // console.log("mouseover", this); + select(this).classed("mouse", true); + }) + .on("mouseout", function (d) { + // console.log("mouseout", this); + select(this).classed("mouse", false); + }) + .call(drag() + .on("start", this.dragstarted.bind(this)) + .on("drag", this.dragged.bind(this)) + .on("end", this.dragended.bind(this))); + + node_enter.append("circle") + .attr("r", 6); + + node_enter.append("text") + .text(d => d.title) + .attr("x", 10); + + //node_enter.append("title") + // .text(function(d) { return d.title; }); + + node = node_enter.merge(node); + link = link_enter.merge(link); + + node.classed("active", d=>d.active); + + this.simulation + .nodes(graph.nodes) + .on("tick", ticked); + + this.simulation.force("link") + .links(graph.links); + + this.simulation.force("radial").radius(d => d.linked ? null : 200); + + function ticked() { + link + .attr("x1", function(d) { return d.source.x; }) + .attr("y1", function(d) { return d.source.y; }) + .attr("x2", function(d) { return d.target.x; }) + .attr("y2", function(d) { return d.target.y; }); + + // node + // .attr("cx", function(d) { return d.x; }) + // .attr("cy", function(d) { return d.y; }); + node + .attr("transform", d => `translate(${d.x},${d.y})`); + } + this.simulation.alphaTarget(0.3).restart(); + } + + link_key (a, b) { + return (a < b) ? ("link_"+a+"_"+b) : ("link_"+b+"_"+a); + } + + walk (node, links) { + var links_seen = {}; + // var node = this.ensure_node(nodename); + node.all_links.forEach(x => { + var link_key = this.link_key(node.title, x.title); + if (!links_seen[link_key]) { + links.push({source: node, target: x}); + links_seen[link_key] = true; + } + }) + return; + } + + set_active_title (title) { + this.set_active_node(title); + } + + async set_active_node (page) { + if (typeof(page) === "string") { + page = this.wiki.get_page_by_title(page) + } + + if (page === this.active_page) { + // console.log("page is already the active page", page, this.active_page); + return; + } + if (this.active_page) { + this.active_page.active = false; + var lkey = this.link_key(this.active_page.title, page.title), + source = (this.active_page.title < page.title) ? this.active_page : page, + target = (this.active_page.title < page.title) ? page : this.active_page; + this.historylinks[lkey] = {source: source, target: target}; + } + // n = this.ensure_node(pagetitle); + + this.active_page = page; + this.active_page.active = true; + this.load(this.active_page); + this.events.emit("page", this.active_page.title); + } + + async load (page) { + console.log("loading", page.title); + var links = await page.get_links(), + backlinks = await page.get_linkshere(), + alllinks = this.wiki.union(links, backlinks); + + page.all_links = alllinks; + // console.log("alllinks", alllinks); + var graph = {}; + + graph.nodes = values(this.wiki.pages_by_title); + graph.links = []; + this.walk(page, graph.links); + // activate historylinks + values(this.historylinks).forEach(x => { + graph.links.push(x); + }) + // graph.links = titles.map(t => ({source: pagetitle, target: t})); + this.update_graph(graph); + // console.log("GOT DATA", titles); + // return titles; + } +} + + + +// http://erg.activearchives.org/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg +// http://erg.activearchives.org/w/api.php?action=query&prop=info&titles=Main%20Page +// Bienvenue_à_l’erg +// http://erg.activearchives.org/mw/index.php/Bienvenue_%C3%A0_l%E2%80%99erg diff --git a/src/wikimapsimple.js b/src/wikimapsimple.js new file mode 100644 index 0000000..c3f2d63 --- /dev/null +++ b/src/wikimapsimple.js @@ -0,0 +1,285 @@ +import { event, select, selectAll} from 'd3-selection'; +import { values, set, map } from 'd3-collection'; +import { drag } from 'd3-drag'; +import { zoom } from 'd3-zoom'; +import { forceSimulation, forceLink, forceManyBody, forceCenter, forceX, forceY, forceRadial } from 'd3-force'; +import { Wiki, Page } from './wiki.js'; +import EventEmitter from 'eventemitter3'; +import { json } from 'd3-fetch'; + +import { ForceNet } from './forcenet.js'; + +export class SimpleMap { + + constructor (symbols) { + var width = 600, + height = 600; + + this.events = new EventEmitter(); + this.active_page = null; + // this.nodes = {}; + this.symbols = symbols; + this.net = new ForceNet(symbols); + this.net.on("nodeclick", this.nodeclick.bind(this)); + // this.simulation = forceSimulation() + // .velocityDecay(0.1) + // .force("link", forceLink().id(d => d.title)) + // .force("charge", forceManyBody()) + // .force("radial", forceRadial(180, width/2, height/2)); + // // .force("center", forceCenter(width / 2, height / 2)); + this.svg = null; + this.historylinks = {}; + this.links = null; + this.highlight_category = null; + this.show_history = false; + } + + nodeclick (d, elt) { + console.log("nodeclick", d, elt, this); + this.set_active_node(d, elt); + } + + init_svg (svg) { + this.net.init_svg(svg); + } + + async load_json (source) { + var data = await json(source); + + // index the nodes by title, init link-arity count + var index = {}; + this.nodes_by_title = index; + for (let i=0, l=data.nodes.length; i { + var source = index[x.source], + target = index[x.target]; + if (source === undefined) { + console.log("bad source", x.source); + return; + } + if (target === undefined) { + console.log("bad target", x.target); + return; + } + source.count += 1; + target.count += 1; + use_links.push({ source: source, target: target }); + }); + data.links = use_links; + this.links = data.links; + // console.log("data", data); + // calculate the node sizes (link arity) + this.net.update_graph(data); + } + + get_symbol_image_path (cname) { + var symbol = this.symbols[cname]; + if (symbol) { + let hpos = symbol.indexOf("#"), + rest = symbol.substr(hpos+1); + rest = rest.replace(/'/g, ''); + return "img/"+rest+".png"; + } + } + async load_cats (src, elt) { + var data = await json(src); + + console.log("indexing categories by title"); + var cats_by_title = {}; + for (let i=0, l=data.length; i d.tcount > 0) + console.log("post filter", data.length); + console.log("load_cats.data", data, elt); + var cat = select(elt) + .selectAll("div.cat") + .data(data) + .enter() + .append("div") + .attr("class", "cat"); + cat.classed("icon", d => this.get_symbol_image_path(d.title)); + cat.append("span").attr("class", "icon").filter(d=> this.get_symbol_image_path(d.title)).style("background-image", d => "url("+this.get_symbol_image_path(d.title)+")"); + cat.append("span").attr("class", "spacing").html(d => { + var d = d.depth, + ret = ""; + while(d) { + ret += "    "; + d-=1; + } + return ret; + }); + cat.append("a").attr("class", "label").html(d => d.title).attr("href", "#").on("click", d => { + event.preventDefault(); + this.category_click(d); + }) + cat.append("span").attr("class", "count").html(d => d.tcount) + } + + category_click (d) { + console.log("category click", d); + if (this.highlight_category) { + // cleanup old pages + this.highlight_category.pages.forEach(d => d.highlight = false); + } + this.highlight_category = d; + this.highlight_category.pages.forEach(d => d.highlight = true); + this.net.update_nodes(); + // set highlight category... + // all nodes with this category get .highlight = true + // make a category index ?! + } + + on (message, callback, context) { + this.events.on(message, callback, context); + } + +/* OLD STYLE with node.all_links + walk (node, links) { + var links_seen = {}; + // var node = this.ensure_node(nodename); + node.all_links.forEach(x => { + var link_key = this.link_key(node.title, x.title); + if (!links_seen[link_key]) { + links.push({source: node, target: x}); + links_seen[link_key] = true; + } + }) + return; + } +*/ + set_active_title (title) { + this.set_active_node(title); + } + + activate_linked_nodes (page, active) { + // deactivate linked links/nodes + for (let i=0, l=this.links.length; i { + graph.links.push(x); + }) + // graph.links = titles.map(t => ({source: pagetitle, target: t})); + this.update_graph(graph); + // console.log("GOT DATA", titles); + // return titles; + } +*/ +} + + + +// http://erg.activearchives.org/mw/api.php?action=query&prop=links&titles=Bienvenue_%C3%A0_l%E2%80%99erg +// http://erg.activearchives.org/w/api.php?action=query&prop=info&titles=Main%20Page +// Bienvenue_à_l’erg +// http://erg.activearchives.org/mw/index.php/Bienvenue_%C3%A0_l%E2%80%99erg diff --git a/src/wikimaptotal.js b/src/wikimaptotal.js new file mode 100644 index 0000000..c14c278 --- /dev/null +++ b/src/wikimaptotal.js @@ -0,0 +1,6 @@ + +import { SimpleMap } from './wikimapsimple.js'; + +// gather ALL nodes + links from the wiki via the API + +export { SimpleMap }; diff --git a/style.css b/style.css new file mode 100644 index 0000000..baee288 --- /dev/null +++ b/style.css @@ -0,0 +1,183 @@ +#content { + position: absolute; + left: 0; top: 0; right: 0; bottom: 0; + background: #EEE; +} + +#wiki { + position: absolute; + left: 50%; + right: 0; + top: 0; + bottom: 0; +} +#wiki iframe { + width: 100%; + height: 100%; + border: none; +} +body { + margin: 0; + overflow: hidden; +} + +#controls { + position: absolute; + z-index:10; + bottom: 0; + display: none; +} + +.links line { + /*stroke: #aaa;*/ + stroke: none; +} + +.links line.active2 { + stroke: red; +} + +.links line.history { + stroke: purple; +} + +.active { + stroke: red; +} + +.category circle { + fill: yellow; +} + +.web circle { + fill: purple; +} + +.news circle { + fill: lightgray; +} + +.template circle { + fill: lightgreen; +} + +.discussion circle { + fill: aqua; +} + +svg { + font: 10px sans-serif; +} + +svg g.page { + cursor: pointer; +} + +svg g.page text { + visibility: hidden; + fill: #222; + font: 10px sans-serif; +} + +svg g.active text { + visibility: visible; +} + +svg g.mouse text { + visibility: visible; +} + +#cats { + position: absolute; + left: 0; + bottom: 0; +} +#cats .ocontents { + background: #FFFFFFDD; + display: none; + /*padding: 5px;*/ + /*box-sizing: border-box;*/ +} +#cats.expanded .ocontents { + display: block; +} + +/* showall class */ +#cats div.cat { + display: none; +} +#cats div.cat span.spacing { + display: none; +} +#cats div.cat.icon { + display: block; +} +#cats.showall div.cat { + display: block; +} +#cats.showall div.cat span.spacing { + display: inline; +} + + +#cats .contents { + overflow: auto; + height: 50vh; + min-width: 300px; +} +#cats .contents .scroll { +} +#cats .botright { + position: absolute; + right: 0; + bottom: 0; +} +#cats .botright .thumb { + position: absolute; + left: 0; + bottom: 0; + width: 32px; + height: 32px; + background: #FFFFFFDD; +} +#cats div.cat span.icon { + position: relative; + top: 4px; + display: inline-block; + width: 18px; + height: 18px; + background-repeat: no-repeat; + margin-right: 4px; +} +#cats div.cat span.count { + padding: 0px 3px; + background: #DDD; + color: #444; + font-size: 10px; + margin-left: 4px; +} +#cats div.cat a { + color: black; + text-decoration: none; +} + + +use { + fill: #EEE; + stroke: black; +} +.active use { + fill: #FFF; + stroke: red; +} +.active text { + stroke: black; +} +.active2 use { + fill: #FFF; + stroke: red; +} +.highlight use { + fill: #FFF; + stroke: orange; +} \ No newline at end of file diff --git a/symbols.00.svg b/symbols.00.svg new file mode 100644 index 0000000..6d1248c --- /dev/null +++ b/symbols.00.svg @@ -0,0 +1,241 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/symbols.svg b/symbols.svg new file mode 100644 index 0000000..71e3184 --- /dev/null +++ b/symbols.svg @@ -0,0 +1,239 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + +