Visualización: Usando datos publicados en un sitio web y replicando con IA.
Autor: Andres Rojas
Introducción
En 2016 el periódico The Guardian publicó un informe con una comparativa interactiva de atletas competidoras del heptatlón en los juegos olímpicos Río del mismo año. La publicación es un sitio web que incluye texto con visualizaciones embebidas escritas en lenguaje Javascript. Una de ellas es un selector desplegable con una lista de atletas y un gráfico comparativo de los resultados individuales para cada disciplina del heptatlón.
La fuente
- URL: https://www.theguardian.com/sport/ng-interactive/2016/aug/14/how-nafissatou-thiam-beat-the-odds-to-claim-the-heptathlon-gold-in-rio
- Publicado: 14 agosto 2016
Prompts
Reescribir código
Usando Claude by Anthropic, primeramente pedimos reescriba el código para entender su funcionamiento.
Rewrite the code using intuitive variables and function id names.
Código javascript reescrito
// =================================================================
// HEPTATHLON VISUALIZER — embed.js (rewritten for readability)
// =================================================================
// Sections:
// 1. Module Loader — SystemJS-style module registry & executor
// 2. AMD Shim — define() / require() compatibility layer
// 3. Core-JS Polyfills — Array.from, Symbol, iterators, etc.
// 4. iframeMessenger — iframe ↔ parent resize/navigation bridge
// 5. D3 — select, voronoi, scale, line, color
// 6. roundPathCorners — SVG path corner smoothing utility
// 7. Athlete Data — per-discipline results + final rankings
// 8. Main Application — visualization, table, interactions
// =================================================================
!(function (globalContext) {
// Module loader: registers and executes ES + CommonJS modules
function registerDeclarative(a, b, e) {
return 4 === arguments.length ? registerDynamic.apply(this, arguments) : void addModuleRecoraddModuleRecord(a, { declarative: !0, deps: b, declare: e });
}
function registerDynamic(a, b, c, e) {
addModuleRecord(a, { declarative: !1, deps: b, executingRequire: c, execute: e });
}
function addModuleRecord(a, b) {
(b.name = a), a in moduleRegistry || (moduleRegistry[a] = b), (b.normalizedDeps = b.deps);
}
function assignGroupIndex(a, b) {
if (((groups[a.groupIndex] = groups[a.groupIndex] || []), -1 == p.call(groups[a.groupIndex], a))) {
groups[a.groupIndex].push(a);
for (var c = 0, d = a.normalizedDeps.length; d > c; c++) {
var depId = a.normalizedDeps[c],
depRec = moduleRegistry[depId];
if (depRec && !depRec.evaluated) {
var newIdx = a.groupIndex + (depRec.declarative != a.declarative);
if (void 0 === depRec.groupIndex || depRec.groupIndex < newIdx) {
if (
void 0 !== depRec.groupIndex &&
(groups[depRec.groupIndex].splice(arrayIndexOf.call(groups[depRec.groupIndex], depRec), 1), 0 == groups[depRec.groupIndex].length)
)
throw new TypeError("Mixed dependency cycle detected");
depRec.groupIndex = newIdx;
}
assignGroupIndex(depRec, groups);
}
}
}
}
function buildAndExecuteGroups(a) {
var record = moduleRegistry[a];
record.groupIndex = 0;
var groups = [];
assignGroupIndex(record, groups);
for (var isDecl = !!record.declarative == groups.length % 2, gi = groups.length - 1; gi >= 0; gi--) {
for (var group = groups[gi], mi = 0; mi < group.length; mi++) {
var mod = group[mi];
isDecl ? instantiateDeclarative(mod) : instantiateDynamic(mod);
}
isDecl = !isDecl;
}
}
function getOrCreateModuleBinding(a) {
return moduleBindings[a] || (moduleBindings[a] = { name: a, dependencies: [], exports: {}, importers: [] });
}
function instantiateDeclarative(b) {
if (!b.module) {
var binding = (b.module = getOrCreateModuleBinding(b.name)),
bExports = b.module.exports,
declResult = b.declare.call(
globalContext,
function (a, b) {
if (((binding.locked = true), "object" == typeof k)) for (var p in k) bExports[p] = k[p];
else bExports[k] = v;
for (var ii = 0, il = binding.importers.length; il > ii; ii++) {
var imp = binding.importers[ii];
if (!imp.locked)
for (var si = 0; si < imp.dependencies.length; ++si)
imp.dependencies[si] === binding && imp.setters[si](bExports);
}
return (binding.locked = false), v;
},
{ id: b.name }
);
(binding.setters = declResult.setters), (binding.execute = declResult.execute);
for (var di = 0, dl = b.normalizedDeps.length; dl > di; di++) {
var depExports,
depName = b.normalizedDeps[di],
depRec = moduleRegistry[depName],
depBind = moduleBindings[depName];
depBind
? (depExports = depBind.exports)
: depRec && !depRec.declarative
? (depExports = depRec.esModule)
: depRec
? (instantiateDeclarative(depRec), (depBind = depRec.module), (depExports = depBind.exports))
: (depExports = getExternalModule(depName)),
depBind && depBind.importers ? (depBind.importers.push(binding), binding.dependencies.push(depBind)) : binding.dependencies.push(null),
binding.setters[di] && binding.setters[di](depExports);
}
}
}
function resolveModuleExports(a) {
var modExports,
rec = moduleRegistry[a];
if (rec) rec.declarative ? executeDeclarative(a, []) : rec.evaluated || instantiateDynamic(rec), (modExports = rec.module.exports);
else if (((modExports = getExternalModule(a)), !modExports)) throw new Error("Unable to load dependency " + a + ".");
return (!rec || rec.declarative) && modExports && modExports.__useDefault ? modExports.default : modExports;
}
function instantiateDynamic(b) {
if (!b.module) {
var modExports = {},
moduleObj = (b.module = { exports: modExports, id: b.name });
if (!b.executingRequire)
for (var ei = 0, el = b.normalizedDeps.length; el > ei; ei++) {
var dName = b.normalizedDeps[ei],
dRec = moduleRegistry[dName];
dRec && instantiateDynamic(dRec);
}
b.evaluated = true;
var result = b.execute.call(
globalContext,
function requireDep(depId) {
for (var ri = 0, rl = b.deps.length; rl > ri; ri++) if (b.deps[ri] == depId) return resolveModuleExports(b.normalizedDeps[ri]);
throw new TypeError("Module " + depId + " not declared as a dependency.");
},
modExports,
moduleObj
);
result && (moduleObj.exports = result), (modExports = moduleObj.exports), modExports && modExports.__esModule ? (b.esModule = modExports) : (b.esModule = wrapAsEsModule(modExports));
}
}
function wrapAsEsModule(b) {
var wrapped = {};
if (("object" == typeof b || "function" == typeof b) && b !== globalContext)
if (supportsGetOwnPropertyDescriptor) for (var key in b) "default" !== key && copyPropertyDescriptor(wrapped, b, key);
else {
var hasOwn = b && b.hasOwnProperty;
for (var key in b) "default" === key || (hasOwn && !b.hasOwnProperty(key)) || (wrapped[key] = b[key]);
}
return (wrapped.default = b), defineProperty(wrapped, "__useDefault", { value: true }), wrapped;
}
function copyPropertyDescriptor(a, b, c) {
try {
var desc;
(desc = Object.getOwnPropertyDescriptor(b, c)) && defineProperty(a, c, desc);
} catch (d) {
return (a[c] = b[c]), !1;
}
}
function executeDeclarative(b, c) {
var rec = moduleRegistry[b];
if (rec && !rec.evaluated && rec.declarative) {
c.push(b);
for (var i = 0, len = rec.normalizedDeps.length; len > i; i++) {
var depN = rec.normalizedDeps[i];
-1 == arrayIndexOf.call(c, depN) && (moduleRegistry[depN] ? executeDeclarative(depN, c) : getExternalModule(depN));
}
rec.evaluated || ((rec.evaluated = true), rec.module.execute.call(globalContext));
}
}
function getExternalModule(a) {
if (externalModules[a]) return externalModules[a];
if ("@node/" == a.substr(0, 6)) return (externalModules[a] = wrapAsEsModule(nodeRequire(a.substr(6))));
var rec = moduleRegistry[a];
if (!rec) throw "Module " + a + " not present.";
return (
buildAndExecuteGroups(a),
executeDeclarative(a, []),
(moduleRegistry[a] = void 0),
rec.declarative && defineProperty(rec.module.exports, "__esModule", { value: true }),
(externalModules[a] = rec.declarative ? rec.module.exports : rec.esModule)
);
}
var moduleRegistry = {},
arrayIndexOf =
Array.prototype.indexOf ||
function (item) {
for (var i = 0, len = this.length; len > i; i++) if (this[i] === item) return i;
return -1;
},
supportsGetOwnPropertyDescriptor = true;
try {
Object.getOwnPropertyDescriptor({ a: 0 }, "a");
} catch (a) {
q = !1;
}
var defineProperty;
!(function () {
try {
Object.defineProperty({}, "a", {}) && (defineProperty = Object.defineProperty);
} catch (a) {
defineProperty = function (a, b, c) {
try {
a[b] = c.value || c.get.call(a);
} catch (a) {}
};
}
})();
var moduleBindings = {},
nodeRequire =
("undefined" != typeof System && System._nodeRequire) ||
("undefined" != typeof require && require.resolve && "undefined" != typeof process && require),
externalModules = { "@empty": {} };
return function (entryModules, predefinedModules, useDefault, bundleFactory) {
return function (executeCallback) {
executeCallback(function () {
for (
var loaderApi = {
_nodeRequire: nodeRequire,
register: registerDeclarative,
registerDynamic: registerDynamic,
get: getExternalModule,
set: function (name, mod) {
externalModules[name] = mod;
},
newModule: function (mod) {
return mod;
},
},
i = 0;
i < predefinedModules.length;
i++
)
(function (name, mod) {
mod && mod.__esModule ? (externalModules[name] = mod) : (externalModules[name] = wrapAsEsModule(mod));
})(predefinedModules[i], arguments[i]);
bundleFactory(loaderApi);
var entryExports = getExternalModule(entryModules[0]);
if (entryModules.length > 1) for (var i = 1; i < entryModules.length; i++) getExternalModule(entryModules[i]);
return useDefault ? entryExports.default : entryExports;
});
};
};
// ------ AMD SHIM ------
})("undefined" != typeof self ? self : global)(["1"], [], !1, function (a) {
var moduleExportsRef = (this.require, this.exports, this.module);
!(function (amdGlobal) {
function extractRequireCalls(factorySource, depIndex) {
a = a.replace(h, "");
var c = a.match(k),
d = (c[1].split(",")[b] || "require").replace(l, ""),
e = m[d] || (m[d] = new RegExp(i + d + j, "g"));
e.lastIndex = 0;
for (var f, g = []; (f = e.exec(a)); ) g.push(f[2] || f[3]);
return g;
}
function amdRequire(deps, callback, errback, refId) {
if ("object" == typeof a && !(a instanceof Array))
return d.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));
if (("string" == typeof a && "function" == typeof b && (a = [a]), !(a instanceof Array))) {
if ("string" == typeof a) {
var g = f.get(a);
return g.__useDefault ? g.default : g;
}
throw new TypeError("Invalid require");
}
for (var h = [], i = 0; i < a.length; i++) h.push(f.import(a[i], e));
Promise.all(h).then(function (a) {
b && b.apply(null, a);
}, c);
}
function amdDefine(id, deps, factory) {
"string" != typeof a && ((h = e), (e = a), (a = null)),
e instanceof Array || ((h = e), (e = ["require", "exports", "module"].splice(0, h.length))),
"function" != typeof h &&
(h = (function (a) {
return function () {
return a;
};
})(h)),
void 0 === e[e.length - 1] && e.pop();
var i, j, k;
-1 != (i = g.call(e, "require")) && (e.splice(i, 1), a || (e = e.concat(c(h.toString(), i)))),
-1 != (j = g.call(e, "exports")) && e.splice(j, 1),
-1 != (k = g.call(e, "module")) && e.splice(k, 1);
var l = {
name: a,
deps: e,
execute: function (a, c, g) {
for (var l = [], m = 0; m < e.length; m++) l.push(a(e[m]));
(g.uri = g.id),
(g.config = function () {}),
-1 != k && l.splice(k, 0, g),
-1 != j && l.splice(j, 0, c),
-1 != i &&
l.splice(i, 0, function (b, c, e) {
return "string" == typeof b && "function" != typeof c ? a(b) : d.call(f, b, c, e, g.id);
});
var n = h.apply(-1 == j ? b : c, l);
return "undefined" == typeof n && g && (n = g.exports), "undefined" != typeof n ? n : void 0;
},
};
if (a)
n.anonDefine || n.isBundle
? n.anonDefine && n.anonDefine.name && (n.anonDefine = null)
: (n.anonDefine = l),
(n.isBundle = !0),
f.registerDynamic(l.name, l.deps, !1, l.execute);
else {
if (n.anonDefine && !n.anonDefine.name) throw new Error("Multiple anonymous defines in module " + a);
n.anonDefine = l;
}
}
var loaderInstance = loaderApi,
arrayIndexOf =
Array.prototype.indexOf ||
function (item) {
for (var i = 0, len = this.length; len > i; i++) if (this[i] === item) return i;
return -1;
},
COMMENT_REGEX = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,
REQUIRE_PREFIX = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",
REQUIRE_SUFFIX = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",
PARAMS_REGEX = /\(([^\)]*)\)/,
TRIM_REGEX = /^\s+|\s+$/g,
requirePatternCache = {};
amdDefine.amd = {};
var amdState = { isBundle: false, anonDefine: null };
(loaderInstance.amdDefine = amdDefine), (loaderInstance.amdRequire = amdRequire);
})(typeof self !== "undefined" ? self : global),
// ------ CORE-JS POLYFILLS + D3 + DATA ------
loaderApi.registerDynamic("2", ["3"], !0, function (a, b, c) {
var d = (this || self, a("3"));
return (
(c.exports = function (a) {
return Object(d(a));
}),
c.exports
);
}),
loaderApi.registerDynamic("4", ["5"], !0, function (a, b, c) {
var d = (this || self, a("5"));
return (
(c.exports = function (a, b, c, e) {
try {
return e ? b(d(c)[0], c[1]) : b(c);
} catch (b) {
var f = a.return;
throw (void 0 !== f && d(f.call(a)), b);
}
}),
c.exports
);
}),
loaderApi.registerDynamic("6", ["7", "8"], !0, function (a, b, c) {
var d = (this || self, a("7")),
e = a("8")("iterator"),
f = Array.prototype;
return (
(c.exports = function (a) {
return void 0 !== a && (d.Array === a || f[e] === a);
}),
c.exports
);
}),
loaderApi.registerDynamic("9", ["a"], !0, function (a, b, c) {
var d = (this || self, a("a")),
e = Math.min;
return (
(c.exports = function (a) {
return a > 0 ? e(d(a), 9007199254740991) : 0;
}),
c.exports
);
}),
loaderApi.registerDynamic("b", ["8"], !0, function (a, b, c) {
var d = (this || self, a("8")("iterator")),
e = !1;
try {
var f = [7][d]();
(f.return = function () {
e = !0;
}),
Array.from(f, function () {
throw 2;
});
} catch (a) {}
return (
(c.exports = function (a, b) {
if (!b && !e) return !1;
var c = !1;
try {
var f = [7],
g = f[d]();
(g.next = function () {
c = !0;
}),
(f[d] = function () {
return g;
}),
a(f);
} catch (a) {}
return c;
}),
c.exports
);
}),
loaderApi.registerDynamic("c", ["d", "e", "2", "4", "6", "9", "f", "b"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("d")),
e = a("e"),
f = a("2"),
g = a("4"),
h = a("6"),
i = a("9"),
j = a("f");
return (
e(
e.S +
e.F *
!a("b")(function (a) {
Array.from(a);
}),
"Array",
{
from: function (a) {
var b,
c,
e,
k,
l = f(a),
m = "function" == typeof this ? this : Array,
n = arguments,
o = n.length,
p = o > 1 ? n[1] : void 0,
q = void 0 !== p,
r = 0,
s = j(l);
if ((q && (p = d(p, o > 2 ? n[2] : void 0, 2)), void 0 == s || (m == Array && h(s))))
for (b = i(l.length), c = new m(b); b > r; r++) c[r] = q ? p(l[r], r) : l[r];
else
for (k = s.call(l), c = new m(); !(e = k.next()).done; r++)
c[r] = q ? g(k, p, [e.value, r], !0) : e.value;
return (c.length = r), c;
},
}
),
c.exports
);
}),
loaderApi.registerDynamic("10", ["11", "c", "12"], !0, function (a, b, c) {
this || self;
return a("11"), a("c"), (c.exports = a("12").Array.from), c.exports;
}),
loaderApi.registerDynamic("13", ["10"], !0, function (a, b, c) {
this || self;
return (c.exports = { default: a("10"), __esModule: !0 }), c.exports;
}),
loaderApi.registerDynamic("14", ["13"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("13").default);
return (
(b.default = function (a) {
if (Array.isArray(a)) {
for (var b = 0, c = Array(a.length); b < a.length; b++) c[b] = a[b];
return c;
}
return d(a);
}),
(b.__esModule = !0),
c.exports
);
}),
loaderApi.registerDynamic("15", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = function (a) {
return "object" == typeof a ? null !== a : "function" == typeof a;
}),
c.exports
);
}),
loaderApi.registerDynamic("5", ["15"], !0, function (a, b, c) {
var d = (this || self, a("15"));
return (
(c.exports = function (a) {
if (!d(a)) throw TypeError(a + " is not an object!");
return a;
}),
c.exports
);
}),
loaderApi.registerDynamic("f", ["16", "8", "7", "12"], !0, function (a, b, c) {
var d = (this || self, a("16")),
e = a("8")("iterator"),
f = a("7");
return (
(c.exports = a("12").getIteratorMethod =
function (a) {
if (void 0 != a) return a[e] || a["@@iterator"] || f[d(a)];
}),
c.exports
);
}),
loaderApi.registerDynamic("17", ["5", "f", "12"], !0, function (a, b, c) {
var d = (this || self, a("5")),
e = a("f");
return (
(c.exports = a("12").getIterator =
function (a) {
var b = e(a);
if ("function" != typeof b) throw TypeError(a + " is not iterable!");
return d(b.call(a));
}),
c.exports
);
}),
loaderApi.registerDynamic("18", ["19", "11", "17"], !0, function (a, b, c) {
this || self;
return a("19"), a("11"), (c.exports = a("17")), c.exports;
}),
loaderApi.registerDynamic("1a", ["18"], !0, function (a, b, c) {
this || self;
return (c.exports = { default: a("18"), __esModule: !0 }), c.exports;
}),
loaderApi.registerDynamic("1b", [], !0, function (a, b, c) {
this || self;
return (c.exports = function () {}), c.exports;
}),
loaderApi.registerDynamic("1c", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = function (a, b) {
return { value: b, done: !!a };
}),
c.exports
);
}),
loaderApi.registerDynamic("1d", ["1e"], !0, function (a, b, c) {
var d = (this || self, a("1e"));
return (
(c.exports = Object("z").propertyIsEnumerable(0)
? Object
: function (a) {
return "String" == d(a) ? a.split("") : Object(a);
}),
c.exports
);
}),
loaderApi.registerDynamic("1f", ["1d", "3"], !0, function (a, b, c) {
var d = (this || self, a("1d")),
e = a("3");
return (
(c.exports = function (a) {
return d(e(a));
}),
c.exports
);
}),
loaderApi.registerDynamic("20", ["1b", "1c", "7", "1f", "21"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("1b")),
e = a("1c"),
f = a("7"),
g = a("1f");
return (
(c.exports = a("21")(
Array,
"Array",
function (a, b) {
(this._t = g(a)), (this._i = 0), (this._k = b);
},
function () {
var a = this._t,
b = this._k,
c = this._i++;
return !a || c >= a.length
? ((this._t = void 0), e(1))
: "keys" == b
? e(0, c)
: "values" == b
? e(0, a[c])
: e(0, [c, a[c]]);
},
"values"
)),
(f.Arguments = f.Array),
d("keys"),
d("values"),
d("entries"),
c.exports
);
}),
loaderApi.registerDynamic("19", ["20", "7"], !0, function (a, b, c) {
this || self;
a("20");
var d = a("7");
return (d.NodeList = d.HTMLCollection = d.Array), c.exports;
}),
loaderApi.registerDynamic("a", [], !0, function (a, b, c) {
var d = (this || self, Math.ceil),
e = Math.floor;
return (
(c.exports = function (a) {
return isNaN((a = +a)) ? 0 : (a > 0 ? e : d)(a);
}),
c.exports
);
}),
loaderApi.registerDynamic("3", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = function (a) {
if (void 0 == a) throw TypeError("Can't call method on " + a);
return a;
}),
c.exports
);
}),
loaderApi.registerDynamic("22", ["a", "3"], !0, function (a, b, c) {
var d = (this || self, a("a")),
e = a("3");
return (
(c.exports = function (a) {
return function (b, c) {
var f,
g,
h = String(e(b)),
i = d(c),
j = h.length;
return i < 0 || i >= j
? a
? ""
: void 0
: ((f = h.charCodeAt(i)),
f < 55296 || f > 56319 || i + 1 === j || (g = h.charCodeAt(i + 1)) < 56320 || g > 57343
? a
? h.charAt(i)
: f
: a
? h.slice(i, i + 2)
: ((f - 55296) << 10) + (g - 56320) + 65536);
};
}),
c.exports
);
}),
loaderApi.registerDynamic("23", [], !0, function (a, b, c) {
this || self;
return (c.exports = !0), c.exports;
}),
loaderApi.registerDynamic("24", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = function (a) {
if ("function" != typeof a) throw TypeError(a + " is not a function!");
return a;
}),
c.exports
);
}),
loaderApi.registerDynamic("d", ["24"], !0, function (a, b, c) {
var d = (this || self, a("24"));
return (
(c.exports = function (a, b, c) {
if ((d(a), void 0 === b)) return a;
switch (c) {
case 1:
return function (c) {
return a.call(b, c);
};
case 2:
return function (c, d) {
return a.call(b, c, d);
};
case 3:
return function (c, d, e) {
return a.call(b, c, d, e);
};
}
return function () {
return a.apply(b, arguments);
};
}),
c.exports
);
}),
loaderApi.registerDynamic("e", ["25", "12", "d"], !0, function (a, b, c) {
var d = this || self,
d = a("25"),
e = a("12"),
f = a("d"),
g = "prototype",
h = function (a, b, c) {
var i,
j,
k,
l = a & h.F,
m = a & h.G,
n = a & h.S,
o = a & h.P,
p = a & h.B,
q = a & h.W,
r = m ? e : e[b] || (e[b] = {}),
s = m ? d : n ? d[b] : (d[b] || {})[g];
m && (c = b);
for (i in c)
(j = !l && s && i in s),
(j && i in r) ||
((k = j ? s[i] : c[i]),
(r[i] =
m && "function" != typeof s[i]
? c[i]
: p && j
? f(k, d)
: q && s[i] == k
? (function (a) {
var b = function (b) {
return this instanceof a ? new a(b) : a(b);
};
return (b[g] = a[g]), b;
})(k)
: o && "function" == typeof k
? f(Function.call, k)
: k),
o && ((r[g] || (r[g] = {}))[i] = k));
};
return (h.F = 1), (h.G = 2), (h.S = 4), (h.P = 8), (h.B = 16), (h.W = 32), (c.exports = h), c.exports;
}),
loaderApi.registerDynamic("26", ["27"], !0, function (a, b, c) {
this || self;
return (c.exports = a("27")), c.exports;
}),
loaderApi.registerDynamic("28", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = function (a, b) {
return { enumerable: !(1 & a), configurable: !(2 & a), writable: !(4 & a), value: b };
}),
c.exports
);
}),
loaderApi.registerDynamic("29", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = function (a) {
try {
return !!a();
} catch (a) {
return !0;
}
}),
c.exports
);
}),
loaderApi.registerDynamic("2a", ["29"], !0, function (a, b, c) {
this || self;
return (
(c.exports = !a("29")(function () {
return (
7 !=
Object.defineProperty({}, "a", {
get: function () {
return 7;
},
}).a
);
})),
c.exports
);
}),
loaderApi.registerDynamic("27", ["2b", "28", "2a"], !0, function (a, b, c) {
var d = (this || self, a("2b")),
e = a("28");
return (
(c.exports = a("2a")
? function (a, b, c) {
return d.setDesc(a, b, e(1, c));
}
: function (a, b, c) {
return (a[b] = c), a;
}),
c.exports
);
}),
loaderApi.registerDynamic("2c", ["2b", "28", "2d", "27", "8"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("2b")),
e = a("28"),
f = a("2d"),
g = {};
return (
a("27")(g, a("8")("iterator"), function () {
return this;
}),
(c.exports = function (a, b, c) {
(a.prototype = d.create(g, { next: e(1, c) })), f(a, b + " Iterator");
}),
c.exports
);
}),
loaderApi.registerDynamic("2e", [], !0, function (a, b, c) {
var d = (this || self, {}.hasOwnProperty);
return (
(c.exports = function (a, b) {
return d.call(a, b);
}),
c.exports
);
}),
loaderApi.registerDynamic("2d", ["2b", "2e", "8"], !0, function (a, b, c) {
var d = (this || self, a("2b").setDesc),
e = a("2e"),
f = a("8")("toStringTag");
return (
(c.exports = function (a, b, c) {
a && !e((a = c ? a : a.prototype), f) && d(a, f, { configurable: !0, value: b });
}),
c.exports
);
}),
loaderApi.registerDynamic("21", ["23", "e", "26", "27", "2e", "7", "2c", "2d", "2b", "8"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("23")),
e = a("e"),
f = a("26"),
g = a("27"),
h = a("2e"),
i = a("7"),
j = a("2c"),
k = a("2d"),
l = a("2b").getProto,
m = a("8")("iterator"),
n = !([].keys && "next" in [].keys()),
o = "@@iterator",
p = "keys",
q = "values",
r = function () {
return this;
};
return (
(c.exports = function (a, b, c, s, t, u, v) {
j(c, b, s);
var w,
x,
y = function (a) {
if (!n && a in C) return C[a];
switch (a) {
case p:
return function () {
return new c(this, a);
};
case q:
return function () {
return new c(this, a);
};
}
return function () {
return new c(this, a);
};
},
z = b + " Iterator",
A = t == q,
B = !1,
C = a.prototype,
D = C[m] || C[o] || (t && C[t]),
E = D || y(t);
if (D) {
var F = l(E.call(new a()));
k(F, z, !0),
!d && h(C, o) && g(F, m, r),
A &&
D.name !== q &&
((B = !0),
(E = function () {
return D.call(this);
}));
}
if (((d && !v) || (!n && !B && C[m]) || g(C, m, E), (i[b] = E), (i[z] = r), t))
if (((w = { values: A ? E : y(q), keys: u ? E : y(p), entries: A ? y("entries") : E }), v))
for (x in w) x in C || f(C, x, w[x]);
else e(e.P + e.F * (n || B), b, w);
return w;
}),
c.exports
);
}),
loaderApi.registerDynamic("11", ["22", "21"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("22")(!0));
return (
a("21")(
String,
"String",
function (a) {
(this._t = String(a)), (this._i = 0);
},
function () {
var a,
b = this._t,
c = this._i;
return c >= b.length
? { value: void 0, done: !0 }
: ((a = d(b, c)), (this._i += a.length), { value: a, done: !1 });
}
),
c.exports
);
}),
loaderApi.registerDynamic("1e", [], !0, function (a, b, c) {
var d = (this || self, {}.toString);
return (
(c.exports = function (a) {
return d.call(a).slice(8, -1);
}),
c.exports
);
}),
loaderApi.registerDynamic("16", ["1e", "8"], !0, function (a, b, c) {
var d = (this || self, a("1e")),
e = a("8")("toStringTag"),
f =
"Arguments" ==
d(
(function () {
return arguments;
})()
);
return (
(c.exports = function (a) {
var b, c, g;
return void 0 === a
? "Undefined"
: null === a
? "Null"
: "string" == typeof (c = (b = Object(a))[e])
? c
: f
? d(b)
: "Object" == (g = d(b)) && "function" == typeof b.callee
? "Arguments"
: g;
}),
c.exports
);
}),
loaderApi.registerDynamic("2f", ["25"], !0, function (a, b, c) {
var d = this || self,
d = a("25"),
e = "__core-js_shared__",
f = d[e] || (d[e] = {});
return (
(c.exports = function (a) {
return f[a] || (f[a] = {});
}),
c.exports
);
}),
loaderApi.registerDynamic("30", [], !0, function (a, b, c) {
var d = (this || self, 0),
e = Math.random();
return (
(c.exports = function (a) {
return "Symbol(".concat(void 0 === a ? "" : a, ")_", (++d + e).toString(36));
}),
c.exports
);
}),
loaderApi.registerDynamic("25", [], !0, function (a, b, c) {
var d = this || self,
d = (c.exports =
"undefined" != typeof window && window.Math == Math
? window
: "undefined" != typeof self && self.Math == Math
? self
: Function("return this")());
return "number" == typeof __g && (__g = d), c.exports;
}),
loaderApi.registerDynamic("8", ["2f", "30", "25"], !0, function (a, b, c) {
var d = (this || self, a("2f")("wks")),
e = a("30"),
f = a("25").Symbol;
return (
(c.exports = function (a) {
return d[a] || (d[a] = (f && f[a]) || (f || e)("Symbol." + a));
}),
c.exports
);
}),
loaderApi.registerDynamic("7", [], !0, function (a, b, c) {
this || self;
return (c.exports = {}), c.exports;
}),
loaderApi.registerDynamic("12", [], !0, function (a, b, c) {
var d = (this || self, (c.exports = { version: "1.2.6" }));
return "number" == typeof __e && (__e = d), c.exports;
}),
loaderApi.registerDynamic("31", ["16", "8", "7", "12"], !0, function (a, b, c) {
var d = (this || self, a("16")),
e = a("8")("iterator"),
f = a("7");
return (
(c.exports = a("12").isIterable =
function (a) {
var b = Object(a);
return void 0 !== b[e] || "@@iterator" in b || f.hasOwnProperty(d(b));
}),
c.exports
);
}),
loaderApi.registerDynamic("32", ["19", "11", "31"], !0, function (a, b, c) {
this || self;
return a("19"), a("11"), (c.exports = a("31")), c.exports;
}),
loaderApi.registerDynamic("33", ["32"], !0, function (a, b, c) {
this || self;
return (c.exports = { default: a("32"), __esModule: !0 }), c.exports;
}),
loaderApi.registerDynamic("34", ["1a", "33"], !0, function (a, b, c) {
"use strict";
var d = (this || self, a("1a").default),
e = a("33").default;
return (
(b.default = (function () {
function a(a, b) {
var c = [],
e = !0,
f = !1,
g = void 0;
try {
for (
var h, i = d(a);
!(e = (h = i.next()).done) && (c.push(h.value), !b || c.length !== b);
e = !0
);
} catch (a) {
(f = !0), (g = a);
} finally {
try {
!e && i.return && i.return();
} finally {
if (f) throw g;
}
}
return c;
}
return function (b, c) {
if (Array.isArray(b)) return b;
if (e(Object(b))) return a(b, c);
throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
})()),
(b.__esModule = !0),
c.exports
);
}),
(function () {
var c = a.amdDefine;
!(function (a) {
"use strict";
var d = (function () {
function a(a, c) {
var d = b();
(a.id = d), c && (C[d] = c), window.parent.postMessage(JSON.stringify(a), "*");
}
function b() {
var a = Math.random().toString(36).substr(2, 5);
return B + ":" + a;
}
function c() {
try {
return window.self !== window.top;
} catch (a) {
return !0;
}
}
function d() {
var a = "body::before, body::after{";
(a += 'content: ".";'),
(a += "height: 0;"),
(a += "margin: 0;"),
(a += "overflow: hidden;"),
(a += "visibility: hidden;"),
(a += "display: block;"),
(a += "clear: both;"),
(a += "}"),
(a += "body{"),
(a += "margin: 0 !important;"),
(a += "display: inline-block !important;"),
(a += "float: left !important;"),
(a += "width: 100% !important;"),
(a += "box-sizing: border-box !important;"),
(a += "}");
var b = document.querySelector("head"),
c = document.createElement("style");
c.appendChild(document.createTextNode(a)), b.appendChild(c);
}
function e(b) {
var c = { type: "navigate", value: b };
a(c);
}
function f(a) {
"undefined" == typeof a ? k() : h(a);
}
function g(a) {
"complete" !== document.readyState ? window.addEventListener("load", a, !1) : a();
}
function h(b) {
var c = { type: "set-height", value: b },
d = { sentinel: "amp", type: "embed-size", height: b };
a(c), a(d);
}
function i() {
var a = parseInt(document.body.offsetHeight, 10),
b = document.defaultView.getComputedStyle(document.body);
return (
(a += parseInt(b.getPropertyValue("margin-bottom"), 10)),
(a += parseInt(b.getPropertyValue("margin-top"), 10))
);
}
function j() {
var a = document.querySelectorAll("body *"),
b = 0;
return (
Array.prototype.forEach.call(a, function (a) {
var c = window.getComputedStyle(a),
d = 0;
c.marginBottom &&
!isNaN(parseInt(c.marginBottom), 10) &&
(d = parseInt(c.marginBottom, 10));
var e = a.getBoundingClientRect().bottom,
f = d + e;
f > b && (b = f);
}),
Math.ceil(b)
);
}
function k() {
var a;
(a = E.absoluteHeight ? j() : i()), y !== a && (h(a), (y = a));
}
function l() {
setInterval(k, A);
}
function m() {
var a = document.querySelector("body"),
b = new z(function () {
x(), k();
}),
c = { attributes: !0, childList: !0, characterData: !0, subtree: !0 };
b.observe(a, c);
}
function n(a) {
for (var b in a) a.hasOwnProperty(b) && (E[b] = a[b]);
"undefined" != typeof AdobeEdge && "undefined" != typeof AdobeEdge.bootstrapCallback
? AdobeEdge.bootstrapCallback(o)
: g(o);
}
function o() {
window.addEventListener("resize", k), x(), z ? m() : E.enableUpdateInterval === !0 && l(), k();
}
function p(a) {
if (a.data) {
var b;
try {
b = JSON.parse(a.data);
} catch (a) {
return console.log("iframeMessenger: Error parsing data. " + a.toString());
}
b.hasOwnProperty("id") &&
C.hasOwnProperty(b.id) &&
(C[b.id](b), b.subscribe || delete C[b.id]);
}
}
function q(b) {
a({ type: "get-position" }, b);
}
function r(b) {
a({ type: "get-location" }, b);
}
function s(b, c) {
a({ type: "scroll-to", x: b, y: c });
}
function t(b) {
a({ type: "monitor-position" }, b);
}
function u() {
x(),
d(),
document.body &&
getComputedStyle &&
((document.documentElement.style.height = ""),
(document.body.style.height = ""),
(document.querySelector("html").style.overflow = "hidden"));
}
function v(a) {
if (a && "load" === a.type) {
var b = a.srcElement,
c = D.indexOf(b);
c !== -1 && D.splice(c, 1), k();
}
}
function w(a) {
D.indexOf(a) === -1 && (a.addEventListener("load", v), D.push(a));
}
function x() {
for (var a = document.querySelectorAll("img"), b = 0; b < a.length; b++) {
var c = a[b];
"IMG" === c.nodeName && c.src && c.complete === !1 && 4 !== c.readyState && w(c);
}
}
var y,
z = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
A = 200,
B = "iframeMessenger",
C = {},
D = [],
E = { absoluteHeight: !1, enableUpdateInterval: !0 };
return (
c() && (g(u), window.addEventListener("message", p, !1)),
{
resize: f,
navigate: e,
enableAutoResize: n,
scrollTo: s,
getLocation: r,
getAbsoluteHeight: j,
getPositionInformation: q,
monitorPosition: t,
}
);
})();
"undefined" != typeof b && b.exports
? (b.exports = d)
: "undefined" != typeof c && c.amd
? c("35", [], function () {
return d;
})
: (a.iframeMessenger = d);
})("undefined" != typeof window ? window : this);
})(),
(function () {
var b = a.amdDefine;
b("36", ["35"], function (a) {
return a;
});
})(),
loaderApi.registerDynamic("37", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = [
[
{
e: { name: "Grit Sadeiko", country: "EST", identifier: "1178322", medal: null },
pr: { identifier: "ATW700A" },
},
{
e: { name: "Ekaterina Voronina", country: "UZB", identifier: "1100814", medal: null },
pr: { identifier: "ATW700A", value: "15.21" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700A", value: "14.24" },
},
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700A", value: "14.10" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700A", value: "14.07" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700A", value: "14.07" },
},
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700A", value: "13.99" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700A", value: "13.84" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700A", value: "13.84" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700A", value: "13.81" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700A", value: "13.79" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700A", value: "13.75" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700A", value: "13.69" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700A", value: "13.66" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700A", value: "13.66" },
},
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700A", value: "13.63" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700A", value: "13.61" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700A", value: "13.56" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700A", value: "13.56" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700A", value: "13.48" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700A", value: "13.47" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700A", value: "13.37" },
},
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700A", value: "13.33" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700A", value: "13.19" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700A", value: "13.12" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700A", value: "13.04" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700A", value: "13.02" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700A", value: "13.00" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700A", value: "13.18" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700A", value: "12.84" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700A", value: "13.56" },
},
],
[
{
e: { name: "Grit Sadeiko", country: "EST", identifier: "1178322", medal: null },
pr: { identifier: "ATW700B" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700B", value: "1.98" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700B", value: "1.89" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700B", value: "1.86" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700B", value: "1.86" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700B", value: "1.86" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700B", value: "1.83" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700B", value: "1.83" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700B", value: "1.83" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700B", value: "1.80" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700B", value: "1.80" },
},
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700B", value: "1.80" },
},
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700B", value: "1.77" },
},
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700B", value: "1.74" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700B", value: "1.74" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700B", value: "1.68" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700B", value: "1.68" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700B", value: "1.68" },
},
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700B", value: "1.65" },
},
{
e: { name: "Ekaterina Voronina", country: "UZB", identifier: "1100814", medal: null },
pr: { identifier: "ATW700B", value: "1.65" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700B", value: "1.86" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700B", value: "1.89" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700B", value: "1.98" },
},
],
[
{
e: { name: "Ekaterina Voronina", country: "UZB", identifier: "1100814", medal: null },
pr: { identifier: "ATW700C" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700C", value: "14.88" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700C", value: "14.81" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700C", value: "14.78" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700C", value: "14.57" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700C", value: "14.41" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700C", value: "14.39" },
},
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700C", value: "14.38" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700C", value: "14.28" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700C", value: "14.09" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700C", value: "14.04" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700C", value: "13.78" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700C", value: "13.69" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700C", value: "13.60" },
},
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700C", value: "13.52" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700C", value: "13.43" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700C", value: "13.25" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700C", value: "13.15" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700C", value: "13.06" },
},
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700C", value: "12.97" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700C", value: "12.91" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700C", value: "12.84" },
},
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700C", value: "12.83" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700C", value: "12.38" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700C", value: "11.68" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700C", value: "11.36" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700C", value: "11.21" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700C", value: "13.45" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700C", value: "13.86" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700C", value: "14.91" },
},
],
[
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700D", value: "26.32" },
},
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700D", value: "25.44" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700D", value: "25.38" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700D", value: "25.37" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700D", value: "25.24" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700D", value: "25.07" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700D", value: "24.99" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700D", value: "24.97" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700D", value: "24.94" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700D", value: "24.77" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700D", value: "24.74" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700D", value: "24.67" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700D", value: "24.60" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700D", value: "24.60" },
},
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700D", value: "24.48" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700D", value: "24.35" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700D", value: "24.34" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700D", value: "24.32" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700D", value: "24.26" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700D", value: "24.12" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700D", value: "24.11" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700D", value: "24.09" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700D", value: "23.99" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700D", value: "23.93" },
},
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700D", value: "23.76" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700D", value: "23.26" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700D", value: "24.18" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700D", value: "23.49" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700D", value: "25.10" },
},
],
[
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700E", value: "6.55" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700E", value: "6.51" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700E", value: "6.43" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700E", value: "6.35" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700E", value: "6.31" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700E", value: "6.31" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700E", value: "6.30" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700E", value: "6.25" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700E", value: "6.23" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700E", value: "6.22" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700E", value: "6.20" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700E", value: "6.19" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700E", value: "6.16" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700E", value: "6.15" },
},
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700E", value: "6.12" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700E", value: "6.10" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700E", value: "6.10" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700E", value: "6.08" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700E", value: "6.08" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700E", value: "6.05" },
},
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700E", value: "6.00" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700E", value: "5.91" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700E", value: "5.88" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700E", value: "5.81" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700E", value: "5.72" },
},
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700E", value: "5.51" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700E", value: "6.48" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700E", value: "6.34" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700E", value: "6.58" },
},
],
[
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700F", value: "55.93" },
},
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700F", value: "54.57" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700F", value: "50.80" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700F", value: "49.78" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700F", value: "48.89" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700F", value: "48.76" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700F", value: "48.42" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700F", value: "48.07" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700F", value: "47.99" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700F", value: "47.22" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700F", value: "46.90" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700F", value: "46.85" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700F", value: "46.73" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700F", value: "46.08" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700F", value: "45.05" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700F", value: "42.48" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700F", value: "42.00" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700F", value: "40.93" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700F", value: "40.25" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700F", value: "40.17" },
},
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700F", value: "39.39" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700F", value: "38.10" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700F", value: "37.77" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700F", value: "36.36" },
},
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700F", value: "35.44" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700F", value: "33.42" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700F", value: "47.36" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700F", value: "46.06" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700F", value: "53.13" },
},
],
[
{
e: { name: "Alina Fodorova", country: "UKR", identifier: "1194920", medal: null },
pr: { identifier: "ATW700G" },
},
{
e: { name: "Uhunoma Osazuwa", country: "NGR", identifier: "1433489", medal: null },
pr: { identifier: "ATW700G" },
},
{
e: { name: "Akela Jones", country: "BAR", identifier: "1107221", medal: null },
pr: { identifier: "ATW700G", value: "2:41.12" },
},
{
e: { name: "Sofia Yfantidou", country: "GRE", identifier: "1195391", medal: null },
pr: { identifier: "ATW700G", value: "2:30.08" },
},
{
e: { name: "Eliska Klucinova", country: "CZE", identifier: "1226792", medal: null },
pr: { identifier: "ATW700G", value: "2:22.81" },
},
{
e: {
name: "Antoinette Nana Djimou Ida",
country: "FRA",
identifier: "1162428",
medal: null,
},
pr: { identifier: "ATW700G", value: "2:20.36" },
},
{
e: { name: "Katerina Cachova", country: "CZE", identifier: "1226506", medal: null },
pr: { identifier: "ATW700G", value: "2:18.95" },
},
{
e: { name: "Anouk Vetter", country: "NED", identifier: "1213210", medal: null },
pr: { identifier: "ATW700G", value: "2:17.71" },
},
{
e: { name: "Nadine Broersen", country: "NED", identifier: "1213224", medal: null },
pr: { identifier: "ATW700G", value: "2:17.55" },
},
{
e: { name: "Hanna Kasyanova", country: "UKR", identifier: "1194203", medal: null },
pr: { identifier: "ATW700G", value: "2:16.58" },
},
{
e: { name: "Carolin Schafer", country: "GER", identifier: "1170510", medal: null },
pr: { identifier: "ATW700G", value: "2:16.52" },
},
{
e: { name: "Kendell Williams", country: "USA", identifier: "1127626", medal: null },
pr: { identifier: "ATW700G", value: "2:16.24" },
},
{
e: { name: "Ivona Dadic", country: "AUT", identifier: "1169714", medal: null },
pr: { identifier: "ATW700G", value: "2:15.64" },
},
{
e: { name: "Alysbeth Felix", country: "PUR", identifier: "1136380", medal: null },
pr: { identifier: "ATW700G", value: "2:15.32" },
},
{
e: { name: "Yorgelis Rodriguez", country: "CUB", identifier: "1119468", medal: null },
pr: { identifier: "ATW700G", value: "2:14.65" },
},
{
e: { name: "Nadine Visser", country: "NED", identifier: "1213216", medal: null },
pr: { identifier: "ATW700G", value: "2:14.47" },
},
{
e: { name: "Evelis Aguilar", country: "COL", identifier: "1068391", medal: null },
pr: { identifier: "ATW700G", value: "2:14.32" },
},
{
e: { name: "Vanessa Chefer", country: "BRA", identifier: "1216978", medal: null },
pr: { identifier: "ATW700G", value: "2:14.20" },
},
{
e: { name: "Jennifer Oeser", country: "GER", identifier: "1170345", medal: null },
pr: { identifier: "ATW700G", value: "2:13.82" },
},
{
e: { name: "Xenia Krizsan", country: "HUN", identifier: "1170879", medal: null },
pr: { identifier: "ATW700G", value: "2:13.46" },
},
{
e: { name: "Gyorgyi Zsivoczky-Farkas", country: "HUN", identifier: "1170029", medal: null },
pr: { identifier: "ATW700G", value: "2:11.76" },
},
{
e: { name: "Barbara Nwaba", country: "USA", identifier: "1127434", medal: null },
pr: { identifier: "ATW700G", value: "2:11.61" },
},
{
e: {
name: "Katarina Johnson-Thompson",
country: "GBR",
identifier: "1217677",
medal: null,
},
pr: { identifier: "ATW700G", value: "2:10.47" },
},
{
e: { name: "Laura Ikauniece-Admidina", country: "LAT", identifier: "1219929", medal: null },
pr: { identifier: "ATW700G", value: "2:09.43" },
},
{
e: { name: "Claudia Rath", country: "GER", identifier: "1170373", medal: null },
pr: { identifier: "ATW700G", value: "2:07.22" },
},
{
e: { name: "Heather Miller-Koch", country: "USA", identifier: "1127401", medal: null },
pr: { identifier: "ATW700G", value: "2:06.82" },
},
{
e: {
name: "Brianne Theisen Eaton",
country: "CAN",
identifier: "1109890",
medal: "bronze",
},
pr: { identifier: "ATW700G", value: "2:09.50" },
},
{
e: { name: "Jessica Ennis-Hill", country: "GBR", identifier: "1217637", medal: "silver" },
pr: { identifier: "ATW700G", value: "2:09.07" },
},
{
e: { name: "Nafissatou Thiam", country: "BEL", identifier: "1231399", medal: "gold" },
pr: { identifier: "ATW700G", value: "2:16.54" },
},
],
]),
c.exports
);
}),
loaderApi.registerDynamic("2b", [], !0, function (a, b, c) {
var d = (this || self, Object);
return (
(c.exports = {
create: d.create,
getProto: d.getPrototypeOf,
isEnum: {}.propertyIsEnumerable,
getDesc: d.getOwnPropertyDescriptor,
setDesc: d.defineProperty,
setDescs: d.defineProperties,
getKeys: d.keys,
getNames: d.getOwnPropertyNames,
getSymbols: d.getOwnPropertySymbols,
each: [].forEach,
}),
c.exports
);
}),
loaderApi.registerDynamic("38", ["2b"], !0, function (a, b, c) {
var d = (this || self, a("2b"));
return (
(c.exports = function (a, b) {
return d.create(a, b);
}),
c.exports
);
}),
loaderApi.registerDynamic("39", ["38"], !0, function (a, b, c) {
this || self;
return (c.exports = { default: a("38"), __esModule: !0 }), c.exports;
}),
loaderApi.register("3a", ["39"], function (a) {
function b(a) {
var b = (a += ""),
c = b.indexOf(":");
return (
c >= 0 && "xmlns" !== (b = a.slice(0, c)) && (a = a.slice(c + 1)),
pe.hasOwnProperty(b) ? { space: pe[b], local: a } : a
);
}
function c(a) {
return function () {
var b = this.ownerDocument,
c = this.namespaceURI;
return c === oe && b.documentElement.namespaceURI === oe
? b.createElement(a)
: b.createElementNS(c, a);
};
}
function d(a) {
return function () {
return this.ownerDocument.createElementNS(a.space, a.local);
};
}
function e(a) {
var e = b(a);
return (e.local ? d : c)(e);
}
function f(a, b, c) {
return (
(a = g(a, b, c)),
function (b) {
var c = b.relatedTarget;
(c && (c === this || 8 & c.compareDocumentPosition(this))) || a.call(this, b);
}
);
}
function g(a, b, c) {
return function (d) {
var e = ve;
ve = d;
try {
a.call(this, this.__data__, b, c);
} finally {
ve = e;
}
};
}
function h(a) {
return a
.trim()
.split(/^|\s+/)
.map(function (a) {
var b = "",
c = a.indexOf(".");
return c >= 0 && ((b = a.slice(c + 1)), (a = a.slice(0, c))), { type: a, name: b };
});
}
function i(a) {
return function () {
var b = this.__on;
if (b) {
for (var c, d = 0, e = -1, f = b.length; d < f; ++d)
(c = b[d]),
(a.type && c.type !== a.type) || c.name !== a.name
? (b[++e] = c)
: this.removeEventListener(c.type, c.listener, c.capture);
++e ? (b.length = e) : delete this.__on;
}
};
}
function j(a, b, c) {
var d = ue.hasOwnProperty(a.type) ? f : g;
return function (e, f, g) {
var h,
i = this.__on,
j = d(b, f, g);
if (i)
for (var k = 0, l = i.length; k < l; ++k)
if ((h = i[k]).type === a.type && h.name === a.name)
return (
this.removeEventListener(h.type, h.listener, h.capture),
this.addEventListener(h.type, (h.listener = j), (h.capture = c)),
void (h.value = b)
);
this.addEventListener(a.type, j, c),
(h = { type: a.type, name: a.name, value: b, listener: j, capture: c }),
i ? i.push(h) : (this.__on = [h]);
};
}
function k(a, b, c) {
var d,
e,
f = h(a + ""),
g = f.length;
{
if (!(arguments.length < 2)) {
for (k = b ? j : i, null == c && (c = !1), d = 0; d < g; ++d) this.each(k(f[d], b, c));
return this;
}
var k = this.node().__on;
if (k)
for (var l, m = 0, n = k.length; m < n; ++m)
for (d = 0, l = k[m]; d < g; ++d)
if ((e = f[d]).type === l.type && e.name === l.name) return l.value;
}
}
function l() {}
function m(a) {
return null == a
? l
: function () {
return this.querySelector(a);
};
}
function n(a) {
"function" != typeof a && (a = m(a));
for (var b = this._groups, c = b.length, d = new Array(c), e = 0; e < c; ++e)
for (var f, g, h = b[e], i = h.length, j = (d[e] = new Array(i)), k = 0; k < i; ++k)
(f = h[k]) &&
(g = a.call(f, f.__data__, k, h)) &&
("__data__" in f && (g.__data__ = f.__data__), (j[k] = g));
return new Da(d, this._parents);
}
function o() {
return [];
}
function p(a) {
return null == a
? o
: function () {
return this.querySelectorAll(a);
};
}
function q(a) {
"function" != typeof a && (a = p(a));
for (var b = this._groups, c = b.length, d = [], e = [], f = 0; f < c; ++f)
for (var g, h = b[f], i = h.length, j = 0; j < i; ++j)
(g = h[j]) && (d.push(a.call(g, g.__data__, j, h)), e.push(g));
return new Da(d, e);
}
function r(a) {
"function" != typeof a && (a = te(a));
for (var b = this._groups, c = b.length, d = new Array(c), e = 0; e < c; ++e)
for (var f, g = b[e], h = g.length, i = (d[e] = []), j = 0; j < h; ++j)
(f = g[j]) && a.call(f, f.__data__, j, g) && i.push(f);
return new Da(d, this._parents);
}
function s(a) {
return new Array(a.length);
}
function t() {
return new Da(this._enter || this._groups.map(s), this._parents);
}
function u(a, b) {
(this.ownerDocument = a.ownerDocument),
(this.namespaceURI = a.namespaceURI),
(this._next = null),
(this._parent = a),
(this.__data__ = b);
}
function v(a) {
return function () {
return a;
};
}
function w(a, b, c, d, e, f) {
for (var g, h = 0, i = b.length, j = f.length; h < j; ++h)
(g = b[h]) ? ((g.__data__ = f[h]), (d[h] = g)) : (c[h] = new u(a, f[h]));
for (; h < i; ++h) (g = b[h]) && (e[h] = g);
}
function x(a, b, c, d, e, f, g) {
var h,
i,
j,
k = {},
l = b.length,
m = f.length,
n = new Array(l);
for (h = 0; h < l; ++h)
(i = b[h]) && ((n[h] = j = xe + g.call(i, i.__data__, h, b)), j in k ? (e[h] = i) : (k[j] = i));
for (h = 0; h < m; ++h)
(j = xe + g.call(a, f[h], h, f)),
(i = k[j]) ? ((d[h] = i), (i.__data__ = f[h]), (k[j] = null)) : (c[h] = new u(a, f[h]));
for (h = 0; h < l; ++h) (i = b[h]) && k[n[h]] === i && (e[h] = i);
}
function y(a, b) {
if (!a)
return (
(n = new Array(this.size())),
(j = -1),
this.each(function (a) {
n[++j] = a;
}),
n
);
var c = b ? x : w,
d = this._parents,
e = this._groups;
"function" != typeof a && (a = v(a));
for (var f = e.length, g = new Array(f), h = new Array(f), i = new Array(f), j = 0; j < f; ++j) {
var k = d[j],
l = e[j],
m = l.length,
n = a.call(k, k && k.__data__, j, d),
o = n.length,
p = (h[j] = new Array(o)),
q = (g[j] = new Array(o)),
r = (i[j] = new Array(m));
c(k, l, p, q, r, n, b);
for (var s, t, u = 0, y = 0; u < o; ++u)
if ((s = p[u])) {
for (u >= y && (y = u + 1); !(t = q[y]) && ++y < o; );
s._next = t || null;
}
}
return (g = new Da(g, d)), (g._enter = h), (g._exit = i), g;
}
function z() {
return new Da(this._exit || this._groups.map(s), this._parents);
}
function A(a) {
for (
var b = this._groups,
c = a._groups,
d = b.length,
e = c.length,
f = Math.min(d, e),
g = new Array(d),
h = 0;
h < f;
++h
)
for (var i, j = b[h], k = c[h], l = j.length, m = (g[h] = new Array(l)), n = 0; n < l; ++n)
(i = j[n] || k[n]) && (m[n] = i);
for (; h < d; ++h) g[h] = b[h];
return new Da(g, this._parents);
}
function B() {
for (var a = this._groups, b = -1, c = a.length; ++b < c; )
for (var d, e = a[b], f = e.length - 1, g = e[f]; --f >= 0; )
(d = e[f]) && (g && g !== d.nextSibling && g.parentNode.insertBefore(d, g), (g = d));
return this;
}
function C(a) {
function b(b, c) {
return b && c ? a(b.__data__, c.__data__) : !b - !c;
}
a || (a = D);
for (var c = this._groups, d = c.length, e = new Array(d), f = 0; f < d; ++f) {
for (var g, h = c[f], i = h.length, j = (e[f] = new Array(i)), k = 0; k < i; ++k)
(g = h[k]) && (j[k] = g);
j.sort(b);
}
return new Da(e, this._parents).order();
}
function D(a, b) {
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
}
function E() {
var a = arguments[0];
return (arguments[0] = this), a.apply(null, arguments), this;
}
function F() {
var a = new Array(this.size()),
b = -1;
return (
this.each(function () {
a[++b] = this;
}),
a
);
}
function G() {
for (var a = this._groups, b = 0, c = a.length; b < c; ++b)
for (var d = a[b], e = 0, f = d.length; e < f; ++e) {
var g = d[e];
if (g) return g;
}
return null;
}
function H() {
var a = 0;
return (
this.each(function () {
++a;
}),
a
);
}
function I() {
return !this.node();
}
function J(a) {
for (var b = this._groups, c = 0, d = b.length; c < d; ++c)
for (var e, f = b[c], g = 0, h = f.length; g < h; ++g) (e = f[g]) && a.call(e, e.__data__, g, f);
return this;
}
function K(a) {
return function () {
this.removeAttribute(a);
};
}
function L(a) {
return function () {
this.removeAttributeNS(a.space, a.local);
};
}
function M(a, b) {
return function () {
this.setAttribute(a, b);
};
}
function N(a, b) {
return function () {
this.setAttributeNS(a.space, a.local, b);
};
}
function O(a, b) {
return function () {
var c = b.apply(this, arguments);
null == c ? this.removeAttribute(a) : this.setAttribute(a, c);
};
}
function P(a, b) {
return function () {
var c = b.apply(this, arguments);
null == c ? this.removeAttributeNS(a.space, a.local) : this.setAttributeNS(a.space, a.local, c);
};
}
function Q(a, c) {
var d = b(a);
if (arguments.length < 2) {
var e = this.node();
return d.local ? e.getAttributeNS(d.space, d.local) : e.getAttribute(d);
}
return this.each(
(null == c ? (d.local ? L : K) : "function" == typeof c ? (d.local ? P : O) : d.local ? N : M)(d, c)
);
}
function R(a) {
return (a.ownerDocument && a.ownerDocument.defaultView) || (a.document && a) || a.defaultView;
}
function S(a) {
return function () {
this.style.removeProperty(a);
};
}
function T(a, b, c) {
return function () {
this.style.setProperty(a, b, c);
};
}
function U(a, b, c) {
return function () {
var d = b.apply(this, arguments);
null == d ? this.style.removeProperty(a) : this.style.setProperty(a, d, c);
};
}
function V(a, b, c) {
var d;
return arguments.length > 1
? this.each((null == b ? S : "function" == typeof b ? U : T)(a, b, null == c ? "" : c))
: R((d = this.node()))
.getComputedStyle(d, null)
.getPropertyValue(a);
}
function W(a) {
return function () {
delete this[a];
};
}
function X(a, b) {
return function () {
this[a] = b;
};
}
function Y(a, b) {
return function () {
var c = b.apply(this, arguments);
null == c ? delete this[a] : (this[a] = c);
};
}
function Z(a, b) {
return arguments.length > 1
? this.each((null == b ? W : "function" == typeof b ? Y : X)(a, b))
: this.node()[a];
}
function $(a) {
return a.trim().split(/^|\s+/);
}
function _(a) {
return a.classList || new aa(a);
}
function aa(a) {
(this._node = a), (this._names = $(a.getAttribute("class") || ""));
}
function ba(a, b) {
for (var c = _(a), d = -1, e = b.length; ++d < e; ) c.add(b[d]);
}
function ca(a, b) {
for (var c = _(a), d = -1, e = b.length; ++d < e; ) c.remove(b[d]);
}
function da(a) {
return function () {
ba(this, a);
};
}
function ea(a) {
return function () {
ca(this, a);
};
}
function fa(a, b) {
return function () {
(b.apply(this, arguments) ? ba : ca)(this, a);
};
}
function ga(a, b) {
var c = $(a + "");
if (arguments.length < 2) {
for (var d = _(this.node()), e = -1, f = c.length; ++e < f; ) if (!d.contains(c[e])) return !1;
return !0;
}
return this.each(("function" == typeof b ? fa : b ? da : ea)(c, b));
}
function ha() {
this.textContent = "";
}
function ia(a) {
return function () {
this.textContent = a;
};
}
function ja(a) {
return function () {
var b = a.apply(this, arguments);
this.textContent = null == b ? "" : b;
};
}
function ka(a) {
return arguments.length
? this.each(null == a ? ha : ("function" == typeof a ? ja : ia)(a))
: this.node().textContent;
}
function la() {
this.innerHTML = "";
}
function ma(a) {
return function () {
this.innerHTML = a;
};
}
function na(a) {
return function () {
var b = a.apply(this, arguments);
this.innerHTML = null == b ? "" : b;
};
}
function oa(a) {
return arguments.length
? this.each(null == a ? la : ("function" == typeof a ? na : ma)(a))
: this.node().innerHTML;
}
function pa() {
this.nextSibling && this.parentNode.appendChild(this);
}
function qa() {
return this.each(pa);
}
function ra() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function sa() {
return this.each(ra);
}
function ta(a) {
var b = "function" == typeof a ? a : e(a);
return this.select(function () {
return this.appendChild(b.apply(this, arguments));
});
}
function ua() {
return null;
}
function va(a, b) {
var c = "function" == typeof a ? a : e(a),
d = null == b ? ua : "function" == typeof b ? b : m(b);
return this.select(function () {
return this.insertBefore(c.apply(this, arguments), d.apply(this, arguments) || null);
});
}
function wa() {
var a = this.parentNode;
a && a.removeChild(this);
}
function xa() {
return this.each(wa);
}
function ya(a) {
return arguments.length ? this.property("__data__", a) : this.node().__data__;
}
function za(a, b, c) {
var d = R(a),
e = d.CustomEvent;
e
? (e = new e(b, c))
: ((e = d.document.createEvent("Event")),
c ? (e.initEvent(b, c.bubbles, c.cancelable), (e.detail = c.detail)) : e.initEvent(b, !1, !1)),
a.dispatchEvent(e);
}
function Aa(a, b) {
return function () {
return za(this, a, b);
};
}
function Ba(a, b) {
return function () {
return za(this, a, b.apply(this, arguments));
};
}
function Ca(a, b) {
return this.each(("function" == typeof b ? Ba : Aa)(a, b));
}
function Da(a, b) {
(this._groups = a), (this._parents = b);
}
function Ea() {
return new Da([[document.documentElement]], ye);
}
function Fa(a) {
return "string" == typeof a
? new Da([[document.querySelector(a)]], [document.documentElement])
: new Da([[a]], ye);
}
function Ga(a) {
return "string" == typeof a
? new Da([document.querySelectorAll(a)], [document.documentElement])
: new Da([null == a ? [] : a], ye);
}
function Ha() {
(this._x0 = this._y0 = this._x1 = this._y1 = null), (this._ = []);
}
function Ia() {
return new Ha();
}
function Ja(a) {
return function () {
return a;
};
}
function Ka(a) {
this._context = a;
}
function La(a) {
return new Ka(a);
}
function Ma(a) {
return a[0];
}
function Na(a) {
return a[1];
}
function Oa() {
function a(a) {
var h,
i,
j,
k = a.length,
l = !1;
for (null == e && (g = f((j = Ia()))), h = 0; h <= k; ++h)
!(h < k && d((i = a[h]), h, a)) === l && ((l = !l) ? g.lineStart() : g.lineEnd()),
l && g.point(+b(i, h, a), +c(i, h, a));
if (j) return (g = null), j + "" || null;
}
var b = Ma,
c = Na,
d = Ja(!0),
e = null,
f = La,
g = null;
return (
(a.x = function (c) {
return arguments.length ? ((b = "function" == typeof c ? c : Ja(+c)), a) : b;
}),
(a.y = function (b) {
return arguments.length ? ((c = "function" == typeof b ? b : Ja(+b)), a) : c;
}),
(a.defined = function (b) {
return arguments.length ? ((d = "function" == typeof b ? b : Ja(!!b)), a) : d;
}),
(a.curve = function (b) {
return arguments.length ? ((f = b), null != e && (g = f(e)), a) : f;
}),
(a.context = function (b) {
return arguments.length ? (null == b ? (e = g = null) : (g = f((e = b))), a) : e;
}),
a
);
}
function Pa() {}
function Qa(a, b, c) {
a._context.bezierCurveTo(
(2 * a._x0 + a._x1) / 3,
(2 * a._y0 + a._y1) / 3,
(a._x0 + 2 * a._x1) / 3,
(a._y0 + 2 * a._y1) / 3,
(a._x0 + 4 * a._x1 + b) / 6,
(a._y0 + 4 * a._y1 + c) / 6
);
}
function Ra(a) {
this._context = a;
}
function Sa(a, b) {
(this._basis = new Ra(a)), (this._beta = b);
}
function Ta(a, b, c) {
a._context.bezierCurveTo(
a._x1 + a._k * (a._x2 - a._x0),
a._y1 + a._k * (a._y2 - a._y0),
a._x2 + a._k * (a._x1 - b),
a._y2 + a._k * (a._y1 - c),
a._x2,
a._y2
);
}
function Ua(a, b) {
(this._context = a), (this._k = (1 - b) / 6);
}
function Va(a, b) {
(this._context = a), (this._k = (1 - b) / 6);
}
function Wa(a, b) {
(this._context = a), (this._k = (1 - b) / 6);
}
function Xa(a, b, c) {
var d = a._x1,
e = a._y1,
f = a._x2,
g = a._y2;
if (a._l01_a > De) {
var h = 2 * a._l01_2a + 3 * a._l01_a * a._l12_a + a._l12_2a,
i = 3 * a._l01_a * (a._l01_a + a._l12_a);
(d = (d * h - a._x0 * a._l12_2a + a._x2 * a._l01_2a) / i),
(e = (e * h - a._y0 * a._l12_2a + a._y2 * a._l01_2a) / i);
}
if (a._l23_a > De) {
var j = 2 * a._l23_2a + 3 * a._l23_a * a._l12_a + a._l12_2a,
k = 3 * a._l23_a * (a._l23_a + a._l12_a);
(f = (f * j + a._x1 * a._l23_2a - b * a._l12_2a) / k),
(g = (g * j + a._y1 * a._l23_2a - c * a._l12_2a) / k);
}
a._context.bezierCurveTo(d, e, f, g, a._x2, a._y2);
}
function Ya(a, b) {
(this._context = a), (this._alpha = b);
}
function Za(a, b) {
(this._context = a), (this._alpha = b);
}
function $a(a, b) {
(this._context = a), (this._alpha = b);
}
function _a(a) {
return a < 0 ? -1 : 1;
}
function ab(a, b, c) {
var d = a._x1 - a._x0,
e = b - a._x1,
f = (a._y1 - a._y0) / (d || (e < 0 && -0)),
g = (c - a._y1) / (e || (d < 0 && -0)),
h = (f * e + g * d) / (d + e);
return (_a(f) + _a(g)) * Math.min(Math.abs(f), Math.abs(g), 0.5 * Math.abs(h)) || 0;
}
function bb(a, b) {
var c = a._x1 - a._x0;
return c ? ((3 * (a._y1 - a._y0)) / c - b) / 2 : b;
}
function cb(a, b, c) {
var d = a._x0,
e = a._y0,
f = a._x1,
g = a._y1,
h = (f - d) / 3;
a._context.bezierCurveTo(d + h, e + h * b, f - h, g - h * c, f, g);
}
function db(a) {
this._context = a;
}
function eb(a) {
this._context = new fb(a);
}
function fb(a) {
this._context = a;
}
function gb(a) {
return function () {
return a;
};
}
function hb(a) {
return a[0];
}
function ib(a) {
return a[1];
}
function jb() {
this._ = null;
}
function kb(a) {
a.U = a.C = a.L = a.R = a.P = a.N = null;
}
function lb(a, b) {
var c = b,
d = b.R,
e = c.U;
e ? (e.L === c ? (e.L = d) : (e.R = d)) : (a._ = d),
(d.U = e),
(c.U = d),
(c.R = d.L),
c.R && (c.R.U = c),
(d.L = c);
}
function mb(a, b) {
var c = b,
d = b.L,
e = c.U;
e ? (e.L === c ? (e.L = d) : (e.R = d)) : (a._ = d),
(d.U = e),
(c.U = d),
(c.L = d.R),
c.L && (c.L.U = c),
(d.R = c);
}
function nb(a) {
for (; a.L; ) a = a.L;
return a;
}
function ob(a, b, c, d) {
var e = [null, null],
f = Me.push(e) - 1;
return (
(e.left = a),
(e.right = b),
c && qb(e, a, b, c),
d && qb(e, b, a, d),
Ke[a.index].halfedges.push(f),
Ke[b.index].halfedges.push(f),
e
);
}
function pb(a, b, c) {
var d = [b, c];
return (d.left = a), d;
}
function qb(a, b, c, d) {
a[0] || a[1] ? (a.left === c ? (a[1] = d) : (a[0] = d)) : ((a[0] = d), (a.left = b), (a.right = c));
}
function rb(a, b, c, d, e) {
var f,
g = a[0],
h = a[1],
i = g[0],
j = g[1],
k = h[0],
l = h[1],
m = 0,
n = 1,
o = k - i,
p = l - j;
if (((f = b - i), o || !(f > 0))) {
if (((f /= o), o < 0)) {
if (f < m) return;
f < n && (n = f);
} else if (o > 0) {
if (f > n) return;
f > m && (m = f);
}
if (((f = d - i), o || !(f < 0))) {
if (((f /= o), o < 0)) {
if (f > n) return;
f > m && (m = f);
} else if (o > 0) {
if (f < m) return;
f < n && (n = f);
}
if (((f = c - j), p || !(f > 0))) {
if (((f /= p), p < 0)) {
if (f < m) return;
f < n && (n = f);
} else if (p > 0) {
if (f > n) return;
f > m && (m = f);
}
if (((f = e - j), p || !(f < 0))) {
if (((f /= p), p < 0)) {
if (f > n) return;
f > m && (m = f);
} else if (p > 0) {
if (f < m) return;
f < n && (n = f);
}
return (
!(m > 0 || n < 1) ||
(m > 0 && (a[0] = [i + m * o, j + m * p]),
n < 1 && (a[1] = [i + n * o, j + n * p]),
!0)
);
}
}
}
}
}
function sb(a, b, c, d, e) {
var f = a[1];
if (f) return !0;
var g,
h,
i = a[0],
j = a.left,
k = a.right,
l = j[0],
m = j[1],
n = k[0],
o = k[1],
p = (l + n) / 2,
q = (m + o) / 2;
if (o === m) {
if (p < b || p >= d) return;
if (l > n) {
if (i) {
if (i[1] >= e) return;
} else i = [p, c];
f = [p, e];
} else {
if (i) {
if (i[1] < c) return;
} else i = [p, e];
f = [p, c];
}
} else if (((g = (l - n) / (o - m)), (h = q - g * p), g < -1 || g > 1))
if (l > n) {
if (i) {
if (i[1] >= e) return;
} else i = [(c - h) / g, c];
f = [(e - h) / g, e];
} else {
if (i) {
if (i[1] < c) return;
} else i = [(e - h) / g, e];
f = [(c - h) / g, c];
}
else if (m < o) {
if (i) {
if (i[0] >= d) return;
} else i = [b, g * b + h];
f = [d, g * d + h];
} else {
if (i) {
if (i[0] < b) return;
} else i = [d, g * d + h];
f = [b, g * b + h];
}
return (a[0] = i), (a[1] = f), !0;
}
function tb(a, b, c, d) {
for (var e, f = Me.length; f--; )
(sb((e = Me[f]), a, b, c, d) &&
rb(e, a, b, c, d) &&
(Math.abs(e[0][0] - e[1][0]) > He || Math.abs(e[0][1] - e[1][1]) > He)) ||
delete Me[f];
}
function ub(a) {
return (Ke[a.index] = { site: a, halfedges: [] });
}
function vb(a, b) {
var c = a.site,
d = b.left,
e = b.right;
return (
c === e && ((e = d), (d = c)),
e
? Math.atan2(e[1] - d[1], e[0] - d[0])
: (c === d ? ((d = b[1]), (e = b[0])) : ((d = b[0]), (e = b[1])),
Math.atan2(d[0] - e[0], e[1] - d[1]))
);
}
function wb(a, b) {
return b[+(b.left !== a.site)];
}
function xb(a, b) {
return b[+(b.left === a.site)];
}
function yb() {
for (var a, b, c, d, e = 0, f = Ke.length; e < f; ++e)
if ((a = Ke[e]) && (d = (b = a.halfedges).length)) {
var g = new Array(d),
h = new Array(d);
for (c = 0; c < d; ++c) (g[c] = c), (h[c] = vb(a, Me[b[c]]));
for (
g.sort(function (a, b) {
return h[b] - h[a];
}),
c = 0;
c < d;
++c
)
h[c] = b[g[c]];
for (c = 0; c < d; ++c) b[c] = h[c];
}
}
function zb(a, b, c, d) {
var e,
f,
g,
h,
i,
j,
k,
l,
m,
n,
o,
p,
q = Ke.length,
r = !0;
for (e = 0; e < q; ++e)
if ((f = Ke[e])) {
for (g = f.site, i = f.halfedges, h = i.length; h--; ) Me[i[h]] || i.splice(h, 1);
for (h = 0, j = i.length; h < j; )
(n = xb(f, Me[i[h]])),
(o = n[0]),
(p = n[1]),
(k = wb(f, Me[i[++h % j]])),
(l = k[0]),
(m = k[1]),
(Math.abs(o - l) > He || Math.abs(p - m) > He) &&
(i.splice(
h,
0,
Me.push(
pb(
g,
n,
Math.abs(o - a) < He && d - p > He
? [a, Math.abs(l - a) < He ? m : d]
: Math.abs(p - d) < He && c - o > He
? [Math.abs(m - d) < He ? l : c, d]
: Math.abs(o - c) < He && p - b > He
? [c, Math.abs(l - c) < He ? m : b]
: Math.abs(p - b) < He && o - a > He
? [Math.abs(m - b) < He ? l : a, b]
: null
)
) - 1
),
++j);
j && (r = !1);
}
if (r) {
var s,
t,
u,
v = 1 / 0;
for (e = 0, r = null; e < q; ++e)
(f = Ke[e]) &&
((g = f.site),
(s = g[0] - a),
(t = g[1] - b),
(u = s * s + t * t),
u < v && ((v = u), (r = f)));
if (r) {
var w = [a, b],
x = [a, d],
y = [c, d],
z = [c, b];
r.halfedges.push(
Me.push(pb((g = r.site), w, x)) - 1,
Me.push(pb(g, x, y)) - 1,
Me.push(pb(g, y, z)) - 1,
Me.push(pb(g, z, w)) - 1
);
}
}
for (e = 0; e < q; ++e) (f = Ke[e]) && (f.halfedges.length || delete Ke[e]);
}
function Ab() {
kb(this), (this.x = this.y = this.arc = this.site = this.cy = null);
}
function Bb(a) {
var b = a.P,
c = a.N;
if (b && c) {
var d = b.site,
e = a.site,
f = c.site;
if (d !== f) {
var g = e[0],
h = e[1],
i = d[0] - g,
j = d[1] - h,
k = f[0] - g,
l = f[1] - h,
m = 2 * (i * l - j * k);
if (!(m >= -Ie)) {
var n = i * i + j * j,
o = k * k + l * l,
p = (l * n - j * o) / m,
q = (i * o - k * n) / m,
r = Ee.pop() || new Ab();
(r.arc = a),
(r.site = e),
(r.x = p + g),
(r.y = (r.cy = q + h) + Math.sqrt(p * p + q * q)),
(a.circle = r);
for (var s = null, t = Le._; t; )
if (r.y < t.y || (r.y === t.y && r.x <= t.x)) {
if (!t.L) {
s = t.P;
break;
}
t = t.L;
} else {
if (!t.R) {
s = t;
break;
}
t = t.R;
}
Le.insert(s, r), s || (Fe = r);
}
}
}
}
function Cb(a) {
var b = a.circle;
b && (b.P || (Fe = b.N), Le.remove(b), Ee.push(b), kb(b), (a.circle = null));
}
function Db() {
kb(this), (this.edge = this.site = this.circle = null);
}
function Eb(a) {
var b = Ge.pop() || new Db();
return (b.site = a), b;
}
function Fb(a) {
Cb(a), Je.remove(a), Ge.push(a), kb(a);
}
function Gb(a) {
var b = a.circle,
c = b.x,
d = b.cy,
e = [c, d],
f = a.P,
g = a.N,
h = [a];
Fb(a);
for (var i = f; i.circle && Math.abs(c - i.circle.x) < He && Math.abs(d - i.circle.cy) < He; )
(f = i.P), h.unshift(i), Fb(i), (i = f);
h.unshift(i), Cb(i);
for (var j = g; j.circle && Math.abs(c - j.circle.x) < He && Math.abs(d - j.circle.cy) < He; )
(g = j.N), h.push(j), Fb(j), (j = g);
h.push(j), Cb(j);
var k,
l = h.length;
for (k = 1; k < l; ++k) (j = h[k]), (i = h[k - 1]), qb(j.edge, i.site, j.site, e);
(i = h[0]), (j = h[l - 1]), (j.edge = ob(i.site, j.site, null, e)), Bb(i), Bb(j);
}
function Hb(a) {
for (var b, c, d, e, f = a[0], g = a[1], h = Je._; h; )
if (((d = Ib(h, g) - f), d > He)) h = h.L;
else {
if (((e = f - Jb(h, g)), !(e > He))) {
d > -He ? ((b = h.P), (c = h)) : e > -He ? ((b = h), (c = h.N)) : (b = c = h);
break;
}
if (!h.R) {
b = h;
break;
}
h = h.R;
}
ub(a);
var i = Eb(a);
if ((Je.insert(b, i), b || c)) {
if (b === c)
return (
Cb(b),
(c = Eb(b.site)),
Je.insert(i, c),
(i.edge = c.edge = ob(b.site, i.site)),
Bb(b),
void Bb(c)
);
if (!c) return void (i.edge = ob(b.site, i.site));
Cb(b), Cb(c);
var j = b.site,
k = j[0],
l = j[1],
m = a[0] - k,
n = a[1] - l,
o = c.site,
p = o[0] - k,
q = o[1] - l,
r = 2 * (m * q - n * p),
s = m * m + n * n,
t = p * p + q * q,
u = [(q * s - n * t) / r + k, (m * t - p * s) / r + l];
qb(c.edge, j, o, u), (i.edge = ob(j, a, null, u)), (c.edge = ob(a, o, null, u)), Bb(b), Bb(c);
}
}
function Ib(a, b) {
var c = a.site,
d = c[0],
e = c[1],
f = e - b;
if (!f) return d;
var g = a.P;
if (!g) return -(1 / 0);
c = g.site;
var h = c[0],
i = c[1],
j = i - b;
if (!j) return h;
var k = h - d,
l = 1 / f - 1 / j,
m = k / j;
return l
? (-m + Math.sqrt(m * m - 2 * l * ((k * k) / (-2 * j) - i + j / 2 + e - f / 2))) / l + d
: (d + h) / 2;
}
function Jb(a, b) {
var c = a.N;
if (c) return Ib(c, b);
var d = a.site;
return d[1] === b ? d[0] : 1 / 0;
}
function Kb(a, b, c) {
return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);
}
function Lb(a, b) {
return b[1] - a[1] || b[0] - a[0];
}
function Mb(a, b) {
var c,
d,
e,
f = a.sort(Lb).pop();
for (Me = [], Ke = new Array(a.length), Je = new jb(), Le = new jb(); ; )
if (((e = Fe), f && (!e || f[1] < e.y || (f[1] === e.y && f[0] < e.x))))
(f[0] === c && f[1] === d) || (Hb(f), (c = f[0]), (d = f[1])), (f = a.pop());
else {
if (!e) break;
Gb(e.arc);
}
if ((yb(), b)) {
var g = +b[0][0],
h = +b[0][1],
i = +b[1][0],
j = +b[1][1];
tb(g, h, i, j), zb(g, h, i, j);
}
(this.edges = Me), (this.cells = Ke), (Je = Le = Me = Ke = null);
}
function Nb() {
function a(a) {
return new Mb(
a.map(function (d, e) {
var f = [Math.round(b(d, e, a) / He) * He, Math.round(c(d, e, a) / He) * He];
return (f.index = e), (f.data = d), f;
}),
d
);
}
var b = hb,
c = ib,
d = null;
return (
(a.polygons = function (b) {
return a(b).polygons();
}),
(a.links = function (b) {
return a(b).links();
}),
(a.triangles = function (b) {
return a(b).triangles();
}),
(a.x = function (c) {
return arguments.length ? ((b = "function" == typeof c ? c : gb(+c)), a) : b;
}),
(a.y = function (b) {
return arguments.length ? ((c = "function" == typeof b ? b : gb(+b)), a) : c;
}),
(a.extent = function (b) {
return arguments.length
? ((d =
null == b
? null
: [
[+b[0][0], +b[0][1]],
[+b[1][0], +b[1][1]],
]),
a)
: d && [
[d[0][0], d[0][1]],
[d[1][0], d[1][1]],
];
}),
(a.size = function (b) {
return arguments.length
? ((d =
null == b
? null
: [
[0, 0],
[+b[0], +b[1]],
]),
a)
: d && [d[1][0] - d[0][0], d[1][1] - d[0][1]];
}),
a
);
}
function Ob(a, b) {
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
}
function Pb(a) {
return (
1 === a.length && (a = Qb(a)),
{
left: function (b, c, d, e) {
for (null == d && (d = 0), null == e && (e = b.length); d < e; ) {
var f = (d + e) >>> 1;
a(b[f], c) < 0 ? (d = f + 1) : (e = f);
}
return d;
},
right: function (b, c, d, e) {
for (null == d && (d = 0), null == e && (e = b.length); d < e; ) {
var f = (d + e) >>> 1;
a(b[f], c) > 0 ? (e = f) : (d = f + 1);
}
return d;
},
}
);
}
function Qb(a) {
return function (b, c) {
return Ob(a(b), c);
};
}
function Rb(a, b) {
var c,
d,
e,
f = -1,
g = a.length;
if (null == b) {
for (; ++f < g; )
if (null != (d = a[f]) && d >= d) {
c = e = d;
break;
}
for (; ++f < g; ) null != (d = a[f]) && (c > d && (c = d), e < d && (e = d));
} else {
for (; ++f < g; )
if (null != (d = b(a[f], f, a)) && d >= d) {
c = e = d;
break;
}
for (; ++f < g; ) null != (d = b(a[f], f, a)) && (c > d && (c = d), e < d && (e = d));
}
return [c, e];
}
function Sb(a, b, c) {
(a = +a), (b = +b), (c = (e = arguments.length) < 2 ? ((b = a), (a = 0), 1) : e < 3 ? 1 : +c);
for (var d = -1, e = 0 | Math.max(0, Math.ceil((b - a) / c)), f = new Array(e); ++d < e; )
f[d] = a + d * c;
return f;
}
function Tb(a, b, c) {
var d = Ub(a, b, c);
return Sb(Math.ceil(a / d) * d, Math.floor(b / d) * d + d / 2, d);
}
function Ub(a, b, c) {
var d = Math.abs(b - a) / Math.max(0, c),
e = Math.pow(10, Math.floor(Math.log(d) / Math.LN10)),
f = d / e;
return f >= Pe ? (e *= 10) : f >= Qe ? (e *= 5) : f >= Re && (e *= 2), b < a ? -e : e;
}
function Vb(a, b, c) {
(a.prototype = b.prototype = c), (c.constructor = a);
}
function Wb(a, b) {
var c = ne(a.prototype);
for (var d in b) c[d] = b[d];
return c;
}
function Xb() {}
function Yb(a) {
var b;
return (
(a = (a + "").trim().toLowerCase()),
(b = Xe.exec(a))
? ((b = parseInt(b[1], 16)),
new bc(
((b >> 8) & 15) | ((b >> 4) & 240),
((b >> 4) & 15) | (240 & b),
((15 & b) << 4) | (15 & b),
1
))
: (b = Ye.exec(a))
? Zb(parseInt(b[1], 16))
: (b = Ze.exec(a))
? new bc(b[1], b[2], b[3], 1)
: (b = $e.exec(a))
? new bc((255 * b[1]) / 100, (255 * b[2]) / 100, (255 * b[3]) / 100, 1)
: (b = _e.exec(a))
? $b(b[1], b[2], b[3], b[4])
: (b = af.exec(a))
? $b((255 * b[1]) / 100, (255 * b[2]) / 100, (255 * b[3]) / 100, b[4])
: (b = bf.exec(a))
? cc(b[1], b[2] / 100, b[3] / 100, 1)
: (b = cf.exec(a))
? cc(b[1], b[2] / 100, b[3] / 100, b[4])
: df.hasOwnProperty(a)
? Zb(df[a])
: "transparent" === a
? new bc(NaN, NaN, NaN, 0)
: null
);
}
function Zb(a) {
return new bc((a >> 16) & 255, (a >> 8) & 255, 255 & a, 1);
}
function $b(a, b, c, d) {
return d <= 0 && (a = b = c = NaN), new bc(a, b, c, d);
}
function _b(a) {
return a instanceof Xb || (a = Yb(a)), a ? ((a = a.rgb()), new bc(a.r, a.g, a.b, a.opacity)) : new bc();
}
function ac(a, b, c, d) {
return 1 === arguments.length ? _b(a) : new bc(a, b, c, null == d ? 1 : d);
}
function bc(a, b, c, d) {
(this.r = +a), (this.g = +b), (this.b = +c), (this.opacity = +d);
}
function cc(a, b, c, d) {
return (
d <= 0 ? (a = b = c = NaN) : c <= 0 || c >= 1 ? (a = b = NaN) : b <= 0 && (a = NaN),
new fc(a, b, c, d)
);
}
function dc(a) {
if (a instanceof fc) return new fc(a.h, a.s, a.l, a.opacity);
if ((a instanceof Xb || (a = Yb(a)), !a)) return new fc();
if (a instanceof fc) return a;
a = a.rgb();
var b = a.r / 255,
c = a.g / 255,
d = a.b / 255,
e = Math.min(b, c, d),
f = Math.max(b, c, d),
g = NaN,
h = f - e,
i = (f + e) / 2;
return (
h
? ((g = b === f ? (c - d) / h + 6 * (c < d) : c === f ? (d - b) / h + 2 : (b - c) / h + 4),
(h /= i < 0.5 ? f + e : 2 - f - e),
(g *= 60))
: (h = i > 0 && i < 1 ? 0 : g),
new fc(g, h, i, a.opacity)
);
}
function ec(a, b, c, d) {
return 1 === arguments.length ? dc(a) : new fc(a, b, c, null == d ? 1 : d);
}
function fc(a, b, c, d) {
(this.h = +a), (this.s = +b), (this.l = +c), (this.opacity = +d);
}
function gc(a, b, c) {
return (
255 * (a < 60 ? b + ((c - b) * a) / 60 : a < 180 ? c : a < 240 ? b + ((c - b) * (240 - a)) / 60 : b)
);
}
function hc(a) {
if (a instanceof jc) return new jc(a.l, a.a, a.b, a.opacity);
if (a instanceof qc) {
var b = a.h * ef;
return new jc(a.l, Math.cos(b) * a.c, Math.sin(b) * a.c, a.opacity);
}
a instanceof bc || (a = _b(a));
var c = nc(a.r),
d = nc(a.g),
e = nc(a.b),
f = kc((0.4124564 * c + 0.3575761 * d + 0.1804375 * e) / hf),
g = kc((0.2126729 * c + 0.7151522 * d + 0.072175 * e) / jf),
h = kc((0.0193339 * c + 0.119192 * d + 0.9503041 * e) / kf);
return new jc(116 * g - 16, 500 * (f - g), 200 * (g - h), a.opacity);
}
function ic(a, b, c, d) {
return 1 === arguments.length ? hc(a) : new jc(a, b, c, null == d ? 1 : d);
}
function jc(a, b, c, d) {
(this.l = +a), (this.a = +b), (this.b = +c), (this.opacity = +d);
}
function kc(a) {
return a > of ? Math.pow(a, 1 / 3) : a / nf + lf;
}
function lc(a) {
return a > mf ? a * a * a : nf * (a - lf);
}
function mc(a) {
return 255 * (a <= 0.0031308 ? 12.92 * a : 1.055 * Math.pow(a, 1 / 2.4) - 0.055);
}
function nc(a) {
return (a /= 255) <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
}
function oc(a) {
if (a instanceof qc) return new qc(a.h, a.c, a.l, a.opacity);
a instanceof jc || (a = hc(a));
var b = Math.atan2(a.b, a.a) * ff;
return new qc(b < 0 ? b + 360 : b, Math.sqrt(a.a * a.a + a.b * a.b), a.l, a.opacity);
}
function pc(a, b, c, d) {
return 1 === arguments.length ? oc(a) : new qc(a, b, c, null == d ? 1 : d);
}
function qc(a, b, c, d) {
(this.h = +a), (this.c = +b), (this.l = +c), (this.opacity = +d);
}
function rc(a) {
if (a instanceof tc) return new tc(a.h, a.s, a.l, a.opacity);
a instanceof bc || (a = _b(a));
var b = a.r / 255,
c = a.g / 255,
d = a.b / 255,
e = (wf * d + uf * b - vf * c) / (wf + uf - vf),
f = d - e,
g = (tf * (c - e) - rf * f) / sf,
h = Math.sqrt(g * g + f * f) / (tf * e * (1 - e)),
i = h ? Math.atan2(g, f) * ff - 120 : NaN;
return new tc(i < 0 ? i + 360 : i, h, e, a.opacity);
}
function sc(a, b, c, d) {
return 1 === arguments.length ? rc(a) : new tc(a, b, c, null == d ? 1 : d);
}
function tc(a, b, c, d) {
(this.h = +a), (this.s = +b), (this.l = +c), (this.opacity = +d);
}
function uc(a) {
return function () {
return a;
};
}
function vc(a, b) {
return function (c) {
return a + c * b;
};
}
function wc(a, b, c) {
return (
(a = Math.pow(a, c)),
(b = Math.pow(b, c) - a),
(c = 1 / c),
function (d) {
return Math.pow(a + d * b, c);
}
);
}
function xc(a, b) {
var c = b - a;
return c ? vc(a, c > 180 || c < -180 ? c - 360 * Math.round(c / 360) : c) : uc(isNaN(a) ? b : a);
}
function yc(a) {
return 1 === (a = +a)
? zc
: function (b, c) {
return c - b ? wc(b, c, a) : uc(isNaN(b) ? c : b);
};
}
function zc(a, b) {
var c = b - a;
return c ? vc(a, c) : uc(isNaN(a) ? b : a);
}
function Ac(a, b) {
var c,
d = b ? b.length : 0,
e = a ? Math.min(d, a.length) : 0,
f = new Array(d),
g = new Array(d);
for (c = 0; c < e; ++c) f[c] = Hc(a[c], b[c]);
for (; c < d; ++c) g[c] = b[c];
return function (a) {
for (c = 0; c < e; ++c) g[c] = f[c](a);
return g;
};
}
function Bc(a, b) {
var c = new Date();
return (
(a = +a),
(b -= a),
function (d) {
return c.setTime(a + b * d), c;
}
);
}
function Cc(a, b) {
return (
(a = +a),
(b -= a),
function (c) {
return a + b * c;
}
);
}
function Dc(a, b) {
var c,
d = {},
e = {};
(null !== a && "object" == typeof a) || (a = {}), (null !== b && "object" == typeof b) || (b = {});
for (c in b) c in a ? (d[c] = Hc(a[c], b[c])) : (e[c] = b[c]);
return function (a) {
for (c in d) e[c] = d[c](a);
return e;
};
}
function Ec(a) {
return function () {
return a;
};
}
function Fc(a) {
return function (b) {
return a(b) + "";
};
}
function Gc(a, b) {
var c,
d,
e,
f = (yf.lastIndex = zf.lastIndex = 0),
g = -1,
h = [],
i = [];
for (a += "", b += ""; (c = yf.exec(a)) && (d = zf.exec(b)); )
(e = d.index) > f && ((e = b.slice(f, e)), h[g] ? (h[g] += e) : (h[++g] = e)),
(c = c[0]) === (d = d[0])
? h[g]
? (h[g] += d)
: (h[++g] = d)
: ((h[++g] = null), i.push({ i: g, x: Cc(c, d) })),
(f = zf.lastIndex);
return (
f < b.length && ((e = b.slice(f)), h[g] ? (h[g] += e) : (h[++g] = e)),
h.length < 2
? i[0]
? Fc(i[0].x)
: Ec(b)
: ((b = i.length),
function (a) {
for (var c, d = 0; d < b; ++d) h[(c = i[d]).i] = c.x(a);
return h.join("");
})
);
}
function Hc(a, b) {
var c,
d = typeof b;
return null == b || "boolean" === d
? uc(b)
: ("number" === d
? Cc
: "string" === d
? (c = Yb(b))
? ((b = c), xf)
: Gc
: b instanceof Yb
? xf
: b instanceof Date
? Bc
: Array.isArray(b)
? Ac
: isNaN(b)
? Dc
: Cc)(a, b);
}
function Ic(a, b) {
return (
(a = +a),
(b -= a),
function (c) {
return Math.round(a + b * c);
}
);
}
function Jc(a) {
return (function b(c) {
function d(b, d) {
var e = a((b = sc(b)).h, (d = sc(d)).h),
f = zc(b.s, d.s),
g = zc(b.l, d.l),
h = zc(b.opacity, d.opacity);
return function (a) {
return (b.h = e(a)), (b.s = f(a)), (b.l = g(Math.pow(a, c))), (b.opacity = h(a)), b + "";
};
}
return (c = +c), (d.gamma = b), d;
})(1);
}
function Kc(a) {
return function () {
return a;
};
}
function Lc(a) {
return +a;
}
function Mc(a, b) {
return (b -= a = +a)
? function (c) {
return (c - a) / b;
}
: Kc(b);
}
function Nc(a) {
return function (b, c) {
var d = a((b = +b), (c = +c));
return function (a) {
return a <= b ? 0 : a >= c ? 1 : d(a);
};
};
}
function Oc(a) {
return function (b, c) {
var d = a((b = +b), (c = +c));
return function (a) {
return a <= 0 ? b : a >= 1 ? c : d(a);
};
};
}
function Pc(a, b, c, d) {
var e = a[0],
f = a[1],
g = b[0],
h = b[1];
return (
f < e ? ((e = c(f, e)), (g = d(h, g))) : ((e = c(e, f)), (g = d(g, h))),
function (a) {
return g(e(a));
}
);
}
function Qc(a, b, c, d) {
var e = Math.min(a.length, b.length) - 1,
f = new Array(e),
g = new Array(e),
h = -1;
for (a[e] < a[0] && ((a = a.slice().reverse()), (b = b.slice().reverse())); ++h < e; )
(f[h] = c(a[h], a[h + 1])), (g[h] = d(b[h], b[h + 1]));
return function (b) {
var c = Oe(a, b, 1, e) - 1;
return g[c](f[c](b));
};
}
function Rc(a, b) {
return b.domain(a.domain()).range(a.range()).interpolate(a.interpolate()).clamp(a.clamp());
}
function Sc(a, b) {
function c() {
return (e = Math.min(h.length, i.length) > 2 ? Qc : Pc), (f = g = null), d;
}
function d(b) {
return (f || (f = e(h, i, k ? Nc(a) : a, j)))(+b);
}
var e,
f,
g,
h = Bf,
i = Bf,
j = Hc,
k = !1;
return (
(d.invert = function (a) {
return (g || (g = e(i, h, Mc, k ? Oc(b) : b)))(+a);
}),
(d.domain = function (a) {
return arguments.length ? ((h = Te.call(a, Lc)), c()) : h.slice();
}),
(d.range = function (a) {
return arguments.length ? ((i = Ue.call(a)), c()) : i.slice();
}),
(d.rangeRound = function (a) {
return (i = Ue.call(a)), (j = Ic), c();
}),
(d.clamp = function (a) {
return arguments.length ? ((k = !!a), c()) : k;
}),
(d.interpolate = function (a) {
return arguments.length ? ((j = a), c()) : j;
}),
c()
);
}
function Tc(a, b) {
if ((c = (a = b ? a.toExponential(b - 1) : a.toExponential()).indexOf("e")) < 0) return null;
var c,
d = a.slice(0, c);
return [d.length > 1 ? d[0] + d.slice(2) : d, +a.slice(c + 1)];
}
function Uc(a) {
return (a = Tc(Math.abs(a))), a ? a[1] : NaN;
}
function Vc(a, b) {
return function (c, d) {
for (
var e = c.length, f = [], g = 0, h = a[0], i = 0;
e > 0 &&
h > 0 &&
(i + h + 1 > d && (h = Math.max(1, d - i)),
f.push(c.substring((e -= h), e + h)),
!((i += h + 1) > d));
)
h = a[(g = (g + 1) % a.length)];
return f.reverse().join(b);
};
}
function Wc(a, b) {
a = a.toPrecision(b);
a: for (var c, d = a.length, e = 1, f = -1; e < d; ++e)
switch (a[e]) {
case ".":
f = c = e;
break;
case "0":
0 === f && (f = e), (c = e);
break;
case "e":
break a;
default:
f > 0 && (f = 0);
}
return f > 0 ? a.slice(0, f) + a.slice(c + 1) : a;
}
function Xc(a, b) {
var c = Tc(a, b);
if (!c) return a + "";
var d = c[0],
e = c[1],
f = e - (Cf = 3 * Math.max(-8, Math.min(8, Math.floor(e / 3)))) + 1,
g = d.length;
return f === g
? d
: f > g
? d + new Array(f - g + 1).join("0")
: f > 0
? d.slice(0, f) + "." + d.slice(f)
: "0." + new Array(1 - f).join("0") + Tc(a, Math.max(0, b + f - 1))[0];
}
function Yc(a, b) {
var c = Tc(a, b);
if (!c) return a + "";
var d = c[0],
e = c[1];
return e < 0
? "0." + new Array(-e).join("0") + d
: d.length > e + 1
? d.slice(0, e + 1) + "." + d.slice(e + 1)
: d + new Array(e - d.length + 2).join("0");
}
function Zc(a) {
return new $c(a);
}
function $c(a) {
if (!(b = Ef.exec(a))) throw new Error("invalid format: " + a);
var b,
c = b[1] || " ",
d = b[2] || ">",
e = b[3] || "-",
f = b[4] || "",
g = !!b[5],
h = b[6] && +b[6],
i = !!b[7],
j = b[8] && +b[8].slice(1),
k = b[9] || "";
"n" === k ? ((i = !0), (k = "g")) : Df[k] || (k = ""),
(g || ("0" === c && "=" === d)) && ((g = !0), (c = "0"), (d = "=")),
(this.fill = c),
(this.align = d),
(this.sign = e),
(this.symbol = f),
(this.zero = g),
(this.width = h),
(this.comma = i),
(this.precision = j),
(this.type = k);
}
function _c(a) {
return a;
}
function ad(a) {
function b(a) {
function b(a) {
var b,
e,
i,
s = o,
t = p;
if ("c" === n) (t = q(a) + t), (a = "");
else {
a = +a;
var u = (a < 0 || 1 / a < 0) && ((a *= -1), !0);
if (((a = q(a, m)), u))
for (b = -1, e = a.length, u = !1; ++b < e; )
if (
((i = a.charCodeAt(b)),
(48 < i && i < 58) ||
("x" === n && 96 < i && i < 103) ||
("X" === n && 64 < i && i < 71))
) {
u = !0;
break;
}
if (
((s = (u ? ("(" === h ? h : "-") : "-" === h || "(" === h ? "" : h) + s),
(t = t + ("s" === n ? Ff[8 + Cf / 3] : "") + (u && "(" === h ? ")" : "")),
r)
)
for (b = -1, e = a.length; ++b < e; )
if (((i = a.charCodeAt(b)), 48 > i || i > 57)) {
(t = (46 === i ? f + a.slice(b + 1) : a.slice(b)) + t), (a = a.slice(0, b));
break;
}
}
l && !j && (a = d(a, 1 / 0));
var v = s.length + a.length + t.length,
w = v < k ? new Array(k - v + 1).join(c) : "";
switch ((l && j && ((a = d(w + a, w.length ? k - t.length : 1 / 0)), (w = "")), g)) {
case "<":
return s + a + t + w;
case "=":
return s + w + a + t;
case "^":
return w.slice(0, (v = w.length >> 1)) + s + a + t + w.slice(v);
}
return w + s + a + t;
}
a = Zc(a);
var c = a.fill,
g = a.align,
h = a.sign,
i = a.symbol,
j = a.zero,
k = a.width,
l = a.comma,
m = a.precision,
n = a.type,
o = "$" === i ? e[0] : "#" === i && /[boxX]/.test(n) ? "0" + n.toLowerCase() : "",
p = "$" === i ? e[1] : /[%p]/.test(n) ? "%" : "",
q = Df[n],
r = !n || /[defgprs%]/.test(n);
return (
(m =
null == m
? n
? 6
: 12
: /[gprs]/.test(n)
? Math.max(1, Math.min(21, m))
: Math.max(0, Math.min(20, m))),
(b.toString = function () {
return a + "";
}),
b
);
}
function c(a, c) {
var d = b(((a = Zc(a)), (a.type = "f"), a)),
e = 3 * Math.max(-8, Math.min(8, Math.floor(Uc(c) / 3))),
f = Math.pow(10, -e),
g = Ff[8 + e / 3];
return function (a) {
return d(f * a) + g;
};
}
var d = a.grouping && a.thousands ? Vc(a.grouping, a.thousands) : _c,
e = a.currency,
f = a.decimal;
return { format: b, formatPrefix: c };
}
function bd(a) {
return (Gf = ad(a)), (Hf = Gf.format), (If = Gf.formatPrefix), Gf;
}
function cd(a) {
return Math.max(0, -Uc(Math.abs(a)));
}
function dd(a, b) {
return Math.max(0, 3 * Math.max(-8, Math.min(8, Math.floor(Uc(b) / 3))) - Uc(Math.abs(a)));
}
function ed(a, b) {
return (a = Math.abs(a)), (b = Math.abs(b) - a), Math.max(0, Uc(b) - Uc(a)) + 1;
}
function fd(a, b, c) {
var d,
e = a[0],
f = a[a.length - 1],
g = Ub(e, f, null == b ? 10 : b);
switch (((c = Zc(null == c ? ",f" : c)), c.type)) {
case "s":
var h = Math.max(Math.abs(e), Math.abs(f));
return null != c.precision || isNaN((d = dd(g, h))) || (c.precision = d), If(c, h);
case "":
case "e":
case "g":
case "p":
case "r":
null != c.precision ||
isNaN((d = ed(g, Math.max(Math.abs(e), Math.abs(f))))) ||
(c.precision = d - ("e" === c.type));
break;
case "f":
case "%":
null != c.precision || isNaN((d = cd(g))) || (c.precision = d - 2 * ("%" === c.type));
}
return Hf(c);
}
function gd(a) {
var b = a.domain;
return (
(a.ticks = function (a) {
var c = b();
return Tb(c[0], c[c.length - 1], null == a ? 10 : a);
}),
(a.tickFormat = function (a, c) {
return fd(b(), a, c);
}),
(a.nice = function (c) {
var d = b(),
e = d.length - 1,
f = null == c ? 10 : c,
g = d[0],
h = d[e],
i = Ub(g, h, f);
return (
i &&
((i = Ub(Math.floor(g / i) * i, Math.ceil(h / i) * i, f)),
(d[0] = Math.floor(g / i) * i),
(d[e] = Math.ceil(h / i) * i),
b(d)),
a
);
}),
a
);
}
function hd() {
var a = Sc(Mc, Cc);
return (
(a.copy = function () {
return Rc(a, hd());
}),
gd(a)
);
}
function id(a, b, c, d) {
function e(b) {
return a((b = new Date(+b))), b;
}
return (
(e.floor = e),
(e.ceil = function (c) {
return a((c = new Date(c - 1))), b(c, 1), a(c), c;
}),
(e.round = function (a) {
var b = e(a),
c = e.ceil(a);
return a - b < c - a ? b : c;
}),
(e.offset = function (a, c) {
return b((a = new Date(+a)), null == c ? 1 : Math.floor(c)), a;
}),
(e.range = function (c, d, f) {
var g = [];
if (((c = e.ceil(c)), (f = null == f ? 1 : Math.floor(f)), !(c < d && f > 0))) return g;
do g.push(new Date(+c));
while ((b(c, f), a(c), c < d));
return g;
}),
(e.filter = function (c) {
return id(
function (b) {
for (; a(b), !c(b); ) b.setTime(b - 1);
},
function (a, d) {
for (; --d >= 0; ) for (; b(a, 1), !c(a); );
}
);
}),
c &&
((e.count = function (b, d) {
return Jf.setTime(+b), Kf.setTime(+d), a(Jf), a(Kf), Math.floor(c(Jf, Kf));
}),
(e.every = function (a) {
return (
(a = Math.floor(a)),
isFinite(a) && a > 0
? a > 1
? e.filter(
d
? function (b) {
return d(b) % a === 0;
}
: function (b) {
return e.count(0, b) % a === 0;
}
)
: e
: null
);
})),
e
);
}
function jd(a) {
return id(
function (b) {
b.setDate(b.getDate() - ((b.getDay() + 7 - a) % 7)), b.setHours(0, 0, 0, 0);
},
function (a, b) {
a.setDate(a.getDate() + 7 * b);
},
function (a, b) {
return (b - a - (b.getTimezoneOffset() - a.getTimezoneOffset()) * Nf) / Qf;
}
);
}
function kd(a) {
return id(
function (b) {
b.setUTCDate(b.getUTCDate() - ((b.getUTCDay() + 7 - a) % 7)), b.setUTCHours(0, 0, 0, 0);
},
function (a, b) {
a.setUTCDate(a.getUTCDate() + 7 * b);
},
function (a, b) {
return (b - a) / Qf;
}
);
}
function ld(a) {
if (0 <= a.y && a.y < 100) {
var b = new Date(-1, a.m, a.d, a.H, a.M, a.S, a.L);
return b.setFullYear(a.y), b;
}
return new Date(a.y, a.m, a.d, a.H, a.M, a.S, a.L);
}
function md(a) {
if (0 <= a.y && a.y < 100) {
var b = new Date(Date.UTC(-1, a.m, a.d, a.H, a.M, a.S, a.L));
return b.setUTCFullYear(a.y), b;
}
return new Date(Date.UTC(a.y, a.m, a.d, a.H, a.M, a.S, a.L));
}
function nd(a) {
return { y: a, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0 };
}
function od(a) {
function b(a, b) {
return function (c) {
var d,
e,
f,
g = [],
h = -1,
i = 0,
j = a.length;
for (c instanceof Date || (c = new Date(+c)); ++h < j; )
37 === a.charCodeAt(h) &&
(g.push(a.slice(i, h)),
null != (e = eg[(d = a.charAt(++h))])
? (d = a.charAt(++h))
: (e = "e" === d ? " " : "0"),
(f = b[d]) && (d = f(c, e)),
g.push(d),
(i = h + 1));
return g.push(a.slice(i, h)), g.join("");
};
}
function c(a, b) {
return function (c) {
var e = nd(1900),
f = d(e, a, (c += ""), 0);
if (f != c.length) return null;
if (("p" in e && (e.H = (e.H % 12) + 12 * e.p), "W" in e || "U" in e)) {
"w" in e || (e.w = "W" in e ? 1 : 0);
var g = "Z" in e ? md(nd(e.y)).getUTCDay() : b(nd(e.y)).getDay();
(e.m = 0),
(e.d =
"W" in e
? ((e.w + 6) % 7) + 7 * e.W - ((g + 5) % 7)
: e.w + 7 * e.U - ((g + 6) % 7));
}
return "Z" in e ? ((e.H += (e.Z / 100) | 0), (e.M += e.Z % 100), md(e)) : b(e);
};
}
function d(a, b, c, d) {
for (var e, f, g = 0, h = b.length, i = c.length; g < h; ) {
if (d >= i) return -1;
if (((e = b.charCodeAt(g++)), 37 === e)) {
if (((e = b.charAt(g++)), (f = Q[e in eg ? b.charAt(g++) : e]), !f || (d = f(a, c, d)) < 0))
return -1;
} else if (e != c.charCodeAt(d++)) return -1;
}
return d;
}
function e(a, b, c) {
var d = E.exec(b.slice(c));
return d ? ((a.p = F[d[0].toLowerCase()]), c + d[0].length) : -1;
}
function f(a, b, c) {
var d = I.exec(b.slice(c));
return d ? ((a.w = J[d[0].toLowerCase()]), c + d[0].length) : -1;
}
function g(a, b, c) {
var d = G.exec(b.slice(c));
return d ? ((a.w = H[d[0].toLowerCase()]), c + d[0].length) : -1;
}
function h(a, b, c) {
var d = M.exec(b.slice(c));
return d ? ((a.m = N[d[0].toLowerCase()]), c + d[0].length) : -1;
}
function i(a, b, c) {
var d = K.exec(b.slice(c));
return d ? ((a.m = L[d[0].toLowerCase()]), c + d[0].length) : -1;
}
function j(a, b, c) {
return d(a, w, b, c);
}
function k(a, b, c) {
return d(a, x, b, c);
}
function l(a, b, c) {
return d(a, y, b, c);
}
function m(a) {
return B[a.getDay()];
}
function n(a) {
return A[a.getDay()];
}
function o(a) {
return D[a.getMonth()];
}
function p(a) {
return C[a.getMonth()];
}
function q(a) {
return z[+(a.getHours() >= 12)];
}
function r(a) {
return B[a.getUTCDay()];
}
function s(a) {
return A[a.getUTCDay()];
}
function t(a) {
return D[a.getUTCMonth()];
}
function u(a) {
return C[a.getUTCMonth()];
}
function v(a) {
return z[+(a.getUTCHours() >= 12)];
}
var w = a.dateTime,
x = a.date,
y = a.time,
z = a.periods,
A = a.days,
B = a.shortDays,
C = a.months,
D = a.shortMonths,
E = rd(z),
F = sd(z),
G = rd(A),
H = sd(A),
I = rd(B),
J = sd(B),
K = rd(C),
L = sd(C),
M = rd(D),
N = sd(D),
O = {
a: m,
A: n,
b: o,
B: p,
c: null,
d: Hd,
e: Hd,
H: Id,
I: Jd,
j: Kd,
L: Ld,
m: Md,
M: Nd,
p: q,
S: Od,
U: Pd,
w: Qd,
W: Rd,
x: null,
X: null,
y: Sd,
Y: Td,
Z: Ud,
"%": he,
},
P = {
a: r,
A: s,
b: t,
B: u,
c: null,
d: Vd,
e: Vd,
H: Wd,
I: Xd,
j: Yd,
L: Zd,
m: $d,
M: _d,
p: v,
S: ae,
U: be,
w: ce,
W: de,
x: null,
X: null,
y: ee,
Y: fe,
Z: ge,
"%": he,
},
Q = {
a: f,
A: g,
b: h,
B: i,
c: j,
d: Ad,
e: Ad,
H: Cd,
I: Cd,
j: Bd,
L: Fd,
m: zd,
M: Dd,
p: e,
S: Ed,
U: ud,
w: td,
W: vd,
x: k,
X: l,
y: xd,
Y: wd,
Z: yd,
"%": Gd,
};
return (
(O.x = b(x, O)),
(O.X = b(y, O)),
(O.c = b(w, O)),
(P.x = b(x, P)),
(P.X = b(y, P)),
(P.c = b(w, P)),
{
format: function (a) {
var c = b((a += ""), O);
return (
(c.toString = function () {
return a;
}),
c
);
},
parse: function (a) {
var b = c((a += ""), ld);
return (
(b.toString = function () {
return a;
}),
b
);
},
utcFormat: function (a) {
var c = b((a += ""), P);
return (
(c.toString = function () {
return a;
}),
c
);
},
utcParse: function (a) {
var b = c(a, md);
return (
(b.toString = function () {
return a;
}),
b
);
},
}
);
}
function pd(a, b, c) {
var d = a < 0 ? "-" : "",
e = (d ? -a : a) + "",
f = e.length;
return d + (f < c ? new Array(c - f + 1).join(b) + e : e);
}
function qd(a) {
return a.replace(hg, "\\$&");
}
function rd(a) {
return new RegExp("^(?:" + a.map(qd).join("|") + ")", "i");
}
function sd(a) {
for (var b = {}, c = -1, d = a.length; ++c < d; ) b[a[c].toLowerCase()] = c;
return b;
}
function td(a, b, c) {
var d = fg.exec(b.slice(c, c + 1));
return d ? ((a.w = +d[0]), c + d[0].length) : -1;
}
function ud(a, b, c) {
var d = fg.exec(b.slice(c));
return d ? ((a.U = +d[0]), c + d[0].length) : -1;
}
function vd(a, b, c) {
var d = fg.exec(b.slice(c));
return d ? ((a.W = +d[0]), c + d[0].length) : -1;
}
function wd(a, b, c) {
var d = fg.exec(b.slice(c, c + 4));
return d ? ((a.y = +d[0]), c + d[0].length) : -1;
}
function xd(a, b, c) {
var d = fg.exec(b.slice(c, c + 2));
return d ? ((a.y = +d[0] + (+d[0] > 68 ? 1900 : 2e3)), c + d[0].length) : -1;
}
function yd(a, b, c) {
var d = /^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(b.slice(c, c + 6));
return d ? ((a.Z = d[1] ? 0 : -(d[2] + (d[3] || "00"))), c + d[0].length) : -1;
}
function zd(a, b, c) {
var d = fg.exec(b.slice(c, c + 2));
return d ? ((a.m = d[0] - 1), c + d[0].length) : -1;
}
function Ad(a, b, c) {
var d = fg.exec(b.slice(c, c + 2));
return d ? ((a.d = +d[0]), c + d[0].length) : -1;
}
function Bd(a, b, c) {
var d = fg.exec(b.slice(c, c + 3));
return d ? ((a.m = 0), (a.d = +d[0]), c + d[0].length) : -1;
}
function Cd(a, b, c) {
var d = fg.exec(b.slice(c, c + 2));
return d ? ((a.H = +d[0]), c + d[0].length) : -1;
}
function Dd(a, b, c) {
var d = fg.exec(b.slice(c, c + 2));
return d ? ((a.M = +d[0]), c + d[0].length) : -1;
}
function Ed(a, b, c) {
var d = fg.exec(b.slice(c, c + 2));
return d ? ((a.S = +d[0]), c + d[0].length) : -1;
}
function Fd(a, b, c) {
var d = fg.exec(b.slice(c, c + 3));
return d ? ((a.L = +d[0]), c + d[0].length) : -1;
}
function Gd(a, b, c) {
var d = gg.exec(b.slice(c, c + 1));
return d ? c + d[0].length : -1;
}
function Hd(a, b) {
return pd(a.getDate(), b, 2);
}
function Id(a, b) {
return pd(a.getHours(), b, 2);
}
function Jd(a, b) {
return pd(a.getHours() % 12 || 12, b, 2);
}
function Kd(a, b) {
return pd(1 + Uf.count(Yf(a), a), b, 3);
}
function Ld(a, b) {
return pd(a.getMilliseconds(), b, 3);
}
function Md(a, b) {
return pd(a.getMonth() + 1, b, 2);
}
function Nd(a, b) {
return pd(a.getMinutes(), b, 2);
}
function Od(a, b) {
return pd(a.getSeconds(), b, 2);
}
function Pd(a, b) {
return pd(Vf.count(Yf(a), a), b, 2);
}
function Qd(a) {
return a.getDay();
}
function Rd(a, b) {
return pd(Wf.count(Yf(a), a), b, 2);
}
function Sd(a, b) {
return pd(a.getFullYear() % 100, b, 2);
}
function Td(a, b) {
return pd(a.getFullYear() % 1e4, b, 4);
}
function Ud(a) {
var b = a.getTimezoneOffset();
return (b > 0 ? "-" : ((b *= -1), "+")) + pd((b / 60) | 0, "0", 2) + pd(b % 60, "0", 2);
}
function Vd(a, b) {
return pd(a.getUTCDate(), b, 2);
}
function Wd(a, b) {
return pd(a.getUTCHours(), b, 2);
}
function Xd(a, b) {
return pd(a.getUTCHours() % 12 || 12, b, 2);
}
function Yd(a, b) {
return pd(1 + _f.count(dg(a), a), b, 3);
}
function Zd(a, b) {
return pd(a.getUTCMilliseconds(), b, 3);
}
function $d(a, b) {
return pd(a.getUTCMonth() + 1, b, 2);
}
function _d(a, b) {
return pd(a.getUTCMinutes(), b, 2);
}
function ae(a, b) {
return pd(a.getUTCSeconds(), b, 2);
}
function be(a, b) {
return pd(ag.count(dg(a), a), b, 2);
}
function ce(a) {
return a.getUTCDay();
}
function de(a, b) {
return pd(bg.count(dg(a), a), b, 2);
}
function ee(a, b) {
return pd(a.getUTCFullYear() % 100, b, 2);
}
function fe(a, b) {
return pd(a.getUTCFullYear() % 1e4, b, 4);
}
function ge() {
return "+0000";
}
function he() {
return "%";
}
function ie(a) {
return (ig = od(a)), (jg = ig.format), (kg = ig.parse), (lg = ig.utcFormat), (mg = ig.utcParse), ig;
}
function je(a) {
return a.toISOString();
}
function ke(a) {
var b = new Date(a);
return isNaN(b) ? null : b;
}
function le(a) {
return a.match(/.{6}/g).map(function (a) {
return "#" + a;
});
}
function me(a) {
var b = a.length;
return function (c) {
return a[Math.max(0, Math.min(b - 1, Math.floor(c * b)))];
};
}
var ne,
oe,
pe,
qe,
re,
se,
te,
ue,
ve,
we,
xe,
ye,
ze,
Ae,
Be,
Ce,
De,
Ee,
Fe,
Ge,
He,
Ie,
Je,
Ke,
Le,
Me,
Ne,
Oe,
Pe,
Qe,
Re,
Se,
Te,
Ue,
Ve,
We,
Xe,
Ye,
Ze,
$e,
_e,
af,
bf,
cf,
df,
ef,
ff,
gf,
hf,
jf,
kf,
lf,
mf,
nf,
of,
pf,
qf,
rf,
sf,
tf,
uf,
vf,
wf,
xf,
yf,
zf,
Af,
Bf,
Cf,
Df,
Ef,
Ff,
Gf,
Hf,
If,
Jf,
Kf,
Lf,
Mf,
Nf,
Of,
Pf,
Qf,
Rf,
Sf,
Tf,
Uf,
Vf,
Wf,
Xf,
Yf,
Zf,
$f,
_f,
ag,
bg,
cg,
dg,
eg,
fg,
gg,
hg,
ig,
jg,
kg,
lg,
mg,
ng,
og,
pg,
qg,
rg,
sg,
tg,
ug,
vg;
return {
setters: [
function (a) {
ne = a.default;
},
],
execute: function () {
"use strict";
(oe = "http://www.w3.org/1999/xhtml"),
(pe = {
svg: "http://www.w3.org/2000/svg",
xhtml: oe,
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/",
}),
(qe = function (a) {
return function () {
return this.matches(a);
};
}),
"undefined" != typeof document &&
((re = document.documentElement),
re.matches ||
((se =
re.webkitMatchesSelector ||
re.msMatchesSelector ||
re.mozMatchesSelector ||
re.oMatchesSelector),
(qe = function (a) {
return function () {
return se.call(this, a);
};
}))),
(te = qe),
(ue = {}),
(ve = null),
"undefined" != typeof document &&
((we = document.documentElement),
"onmouseenter" in we || (ue = { mouseenter: "mouseover", mouseleave: "mouseout" })),
(u.prototype = {
constructor: u,
appendChild: function (a) {
return this._parent.insertBefore(a, this._next);
},
insertBefore: function (a, b) {
return this._parent.insertBefore(a, b);
},
querySelector: function (a) {
return this._parent.querySelector(a);
},
querySelectorAll: function (a) {
return this._parent.querySelectorAll(a);
},
}),
(xe = "$"),
(aa.prototype = {
add: function (a) {
var b = this._names.indexOf(a);
b < 0 && (this._names.push(a), this._node.setAttribute("class", this._names.join(" ")));
},
remove: function (a) {
var b = this._names.indexOf(a);
b >= 0 &&
(this._names.splice(b, 1), this._node.setAttribute("class", this._names.join(" ")));
},
contains: function (a) {
return this._names.indexOf(a) >= 0;
},
}),
(ye = [null]),
(Da.prototype = Ea.prototype =
{
constructor: Da,
select: n,
selectAll: q,
filter: r,
data: y,
enter: t,
exit: z,
merge: A,
order: B,
sort: C,
call: E,
nodes: F,
node: G,
size: H,
empty: I,
each: J,
attr: Q,
style: V,
property: Z,
classed: ga,
text: ka,
html: oa,
raise: qa,
lower: sa,
append: ta,
insert: va,
remove: xa,
datum: ya,
on: k,
dispatch: Ca,
}),
(ze = Math.PI),
(Ae = 2 * ze),
(Be = 1e-6),
(Ce = Ae - Be),
(Ha.prototype = Ia.prototype =
{
constructor: Ha,
moveTo: function (a, b) {
this._.push("M", (this._x0 = this._x1 = +a), ",", (this._y0 = this._y1 = +b));
},
closePath: function () {
null !== this._x1 &&
((this._x1 = this._x0), (this._y1 = this._y0), this._.push("Z"));
},
lineTo: function (a, b) {
this._.push("L", (this._x1 = +a), ",", (this._y1 = +b));
},
quadraticCurveTo: function (a, b, c, d) {
this._.push("Q", +a, ",", +b, ",", (this._x1 = +c), ",", (this._y1 = +d));
},
bezierCurveTo: function (a, b, c, d, e, f) {
this._.push(
"C",
+a,
",",
+b,
",",
+c,
",",
+d,
",",
(this._x1 = +e),
",",
(this._y1 = +f)
);
},
arcTo: function (a, b, c, d, e) {
(a = +a), (b = +b), (c = +c), (d = +d), (e = +e);
var f = this._x1,
g = this._y1,
h = c - a,
i = d - b,
j = f - a,
k = g - b,
l = j * j + k * k;
if (e < 0) throw new Error("negative radius: " + e);
if (null === this._x1) this._.push("M", (this._x1 = a), ",", (this._y1 = b));
else if (l > Be)
if (Math.abs(k * h - i * j) > Be && e) {
var m = c - f,
n = d - g,
o = h * h + i * i,
p = m * m + n * n,
q = Math.sqrt(o),
r = Math.sqrt(l),
s = e * Math.tan((ze - Math.acos((o + l - p) / (2 * q * r))) / 2),
t = s / r,
u = s / q;
Math.abs(t - 1) > Be && this._.push("L", a + t * j, ",", b + t * k),
this._.push(
"A",
e,
",",
e,
",0,0,",
+(k * m > j * n),
",",
(this._x1 = a + u * h),
",",
(this._y1 = b + u * i)
);
} else this._.push("L", (this._x1 = a), ",", (this._y1 = b));
else;
},
arc: function (a, b, c, d, e, f) {
(a = +a), (b = +b), (c = +c);
var g = c * Math.cos(d),
h = c * Math.sin(d),
i = a + g,
j = b + h,
k = 1 ^ f,
l = f ? d - e : e - d;
if (c < 0) throw new Error("negative radius: " + c);
null === this._x1
? this._.push("M", i, ",", j)
: (Math.abs(this._x1 - i) > Be || Math.abs(this._y1 - j) > Be) &&
this._.push("L", i, ",", j),
c &&
(l > Ce
? this._.push(
"A",
c,
",",
c,
",0,1,",
k,
",",
a - g,
",",
b - h,
"A",
c,
",",
c,
",0,1,",
k,
",",
(this._x1 = i),
",",
(this._y1 = j)
)
: (l < 0 && (l = (l % Ae) + Ae),
this._.push(
"A",
c,
",",
c,
",0,",
+(l >= ze),
",",
k,
",",
(this._x1 = a + c * Math.cos(e)),
",",
(this._y1 = b + c * Math.sin(e))
)));
},
rect: function (a, b, c, d) {
this._.push(
"M",
(this._x0 = this._x1 = +a),
",",
(this._y0 = this._y1 = +b),
"h",
+c,
"v",
+d,
"h",
-c,
"Z"
);
},
toString: function () {
return this._.join("");
},
}),
(De = 1e-12),
(Ka.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
this._point = 0;
},
lineEnd: function () {
(this._line || (0 !== this._line && 1 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
switch (((a = +a), (b = +b), this._point)) {
case 0:
(this._point = 1),
this._line ? this._context.lineTo(a, b) : this._context.moveTo(a, b);
break;
case 1:
this._point = 2;
default:
this._context.lineTo(a, b);
}
},
}),
(Ra.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
(this._x0 = this._x1 = this._y0 = this._y1 = NaN), (this._point = 0);
},
lineEnd: function () {
switch (this._point) {
case 3:
Qa(this, this._x1, this._y1);
case 2:
this._context.lineTo(this._x1, this._y1);
}
(this._line || (0 !== this._line && 1 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
switch (((a = +a), (b = +b), this._point)) {
case 0:
(this._point = 1),
this._line ? this._context.lineTo(a, b) : this._context.moveTo(a, b);
break;
case 1:
this._point = 2;
break;
case 2:
(this._point = 3),
this._context.lineTo(
(5 * this._x0 + this._x1) / 6,
(5 * this._y0 + this._y1) / 6
);
default:
Qa(this, a, b);
}
(this._x0 = this._x1), (this._x1 = a), (this._y0 = this._y1), (this._y1 = b);
},
}),
(Sa.prototype = {
lineStart: function () {
(this._x = []), (this._y = []), this._basis.lineStart();
},
lineEnd: function () {
var a = this._x,
b = this._y,
c = a.length - 1;
if (c > 0)
for (var d, e = a[0], f = b[0], g = a[c] - e, h = b[c] - f, i = -1; ++i <= c; )
(d = i / c),
this._basis.point(
this._beta * a[i] + (1 - this._beta) * (e + d * g),
this._beta * b[i] + (1 - this._beta) * (f + d * h)
);
(this._x = this._y = null), this._basis.lineEnd();
},
point: function (a, b) {
this._x.push(+a), this._y.push(+b);
},
}),
(function a(b) {
function c(a) {
return 1 === b ? new Ra(a) : new Sa(a, b);
}
return (
(c.beta = function (b) {
return a(+b);
}),
c
);
})(0.85),
(Ua.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
(this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN),
(this._point = 0);
},
lineEnd: function () {
switch (this._point) {
case 2:
this._context.lineTo(this._x2, this._y2);
break;
case 3:
Ta(this, this._x1, this._y1);
}
(this._line || (0 !== this._line && 1 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
switch (((a = +a), (b = +b), this._point)) {
case 0:
(this._point = 1),
this._line ? this._context.lineTo(a, b) : this._context.moveTo(a, b);
break;
case 1:
(this._point = 2), (this._x1 = a), (this._y1 = b);
break;
case 2:
this._point = 3;
default:
Ta(this, a, b);
}
(this._x0 = this._x1),
(this._x1 = this._x2),
(this._x2 = a),
(this._y0 = this._y1),
(this._y1 = this._y2),
(this._y2 = b);
},
}),
(function a(b) {
function c(a) {
return new Ua(a, b);
}
return (
(c.tension = function (b) {
return a(+b);
}),
c
);
})(0),
(Va.prototype = {
areaStart: Pa,
areaEnd: Pa,
lineStart: function () {
(this._x0 =
this._x1 =
this._x2 =
this._x3 =
this._x4 =
this._x5 =
this._y0 =
this._y1 =
this._y2 =
this._y3 =
this._y4 =
this._y5 =
NaN),
(this._point = 0);
},
lineEnd: function () {
switch (this._point) {
case 1:
this._context.moveTo(this._x3, this._y3), this._context.closePath();
break;
case 2:
this._context.lineTo(this._x3, this._y3), this._context.closePath();
break;
case 3:
this.point(this._x3, this._y3),
this.point(this._x4, this._y4),
this.point(this._x5, this._y5);
}
},
point: function (a, b) {
switch (((a = +a), (b = +b), this._point)) {
case 0:
(this._point = 1), (this._x3 = a), (this._y3 = b);
break;
case 1:
(this._point = 2), this._context.moveTo((this._x4 = a), (this._y4 = b));
break;
case 2:
(this._point = 3), (this._x5 = a), (this._y5 = b);
break;
default:
Ta(this, a, b);
}
(this._x0 = this._x1),
(this._x1 = this._x2),
(this._x2 = a),
(this._y0 = this._y1),
(this._y1 = this._y2),
(this._y2 = b);
},
}),
(function a(b) {
function c(a) {
return new Va(a, b);
}
return (
(c.tension = function (b) {
return a(+b);
}),
c
);
})(0),
(Wa.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
(this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN),
(this._point = 0);
},
lineEnd: function () {
(this._line || (0 !== this._line && 3 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
switch (((a = +a), (b = +b), this._point)) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
(this._point = 3),
this._line
? this._context.lineTo(this._x2, this._y2)
: this._context.moveTo(this._x2, this._y2);
break;
case 3:
this._point = 4;
default:
Ta(this, a, b);
}
(this._x0 = this._x1),
(this._x1 = this._x2),
(this._x2 = a),
(this._y0 = this._y1),
(this._y1 = this._y2),
(this._y2 = b);
},
}),
(function a(b) {
function c(a) {
return new Wa(a, b);
}
return (
(c.tension = function (b) {
return a(+b);
}),
c
);
})(0),
(Ya.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
(this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN),
(this._l01_a =
this._l12_a =
this._l23_a =
this._l01_2a =
this._l12_2a =
this._l23_2a =
this._point =
0);
},
lineEnd: function () {
switch (this._point) {
case 2:
this._context.lineTo(this._x2, this._y2);
break;
case 3:
this.point(this, this._x2, this._y2);
}
(this._line || (0 !== this._line && 1 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
if (((a = +a), (b = +b), this._point)) {
var c = this._x2 - a,
d = this._y2 - b;
this._l23_a = Math.sqrt((this._l23_2a = Math.pow(c * c + d * d, this._alpha)));
}
switch (this._point) {
case 0:
(this._point = 1),
this._line ? this._context.lineTo(a, b) : this._context.moveTo(a, b);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
default:
Xa(this, a, b);
}
(this._l01_a = this._l12_a),
(this._l12_a = this._l23_a),
(this._l01_2a = this._l12_2a),
(this._l12_2a = this._l23_2a),
(this._x0 = this._x1),
(this._x1 = this._x2),
(this._x2 = a),
(this._y0 = this._y1),
(this._y1 = this._y2),
(this._y2 = b);
},
}),
(function a(b) {
function c(a) {
return b ? new Ya(a, b) : new Ua(a, 0);
}
return (
(c.alpha = function (b) {
return a(+b);
}),
c
);
})(0.5),
(Za.prototype = {
areaStart: Pa,
areaEnd: Pa,
lineStart: function () {
(this._x0 =
this._x1 =
this._x2 =
this._x3 =
this._x4 =
this._x5 =
this._y0 =
this._y1 =
this._y2 =
this._y3 =
this._y4 =
this._y5 =
NaN),
(this._l01_a =
this._l12_a =
this._l23_a =
this._l01_2a =
this._l12_2a =
this._l23_2a =
this._point =
0);
},
lineEnd: function () {
switch (this._point) {
case 1:
this._context.moveTo(this._x3, this._y3), this._context.closePath();
break;
case 2:
this._context.lineTo(this._x3, this._y3), this._context.closePath();
break;
case 3:
this.point(this._x3, this._y3),
this.point(this._x4, this._y4),
this.point(this._x5, this._y5);
}
},
point: function (a, b) {
if (((a = +a), (b = +b), this._point)) {
var c = this._x2 - a,
d = this._y2 - b;
this._l23_a = Math.sqrt((this._l23_2a = Math.pow(c * c + d * d, this._alpha)));
}
switch (this._point) {
case 0:
(this._point = 1), (this._x3 = a), (this._y3 = b);
break;
case 1:
(this._point = 2), this._context.moveTo((this._x4 = a), (this._y4 = b));
break;
case 2:
(this._point = 3), (this._x5 = a), (this._y5 = b);
break;
default:
Xa(this, a, b);
}
(this._l01_a = this._l12_a),
(this._l12_a = this._l23_a),
(this._l01_2a = this._l12_2a),
(this._l12_2a = this._l23_2a),
(this._x0 = this._x1),
(this._x1 = this._x2),
(this._x2 = a),
(this._y0 = this._y1),
(this._y1 = this._y2),
(this._y2 = b);
},
}),
(function a(b) {
function c(a) {
return b ? new Za(a, b) : new Va(a, 0);
}
return (
(c.alpha = function (b) {
return a(+b);
}),
c
);
})(0.5),
($a.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
(this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN),
(this._l01_a =
this._l12_a =
this._l23_a =
this._l01_2a =
this._l12_2a =
this._l23_2a =
this._point =
0);
},
lineEnd: function () {
(this._line || (0 !== this._line && 3 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
if (((a = +a), (b = +b), this._point)) {
var c = this._x2 - a,
d = this._y2 - b;
this._l23_a = Math.sqrt((this._l23_2a = Math.pow(c * c + d * d, this._alpha)));
}
switch (this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
(this._point = 3),
this._line
? this._context.lineTo(this._x2, this._y2)
: this._context.moveTo(this._x2, this._y2);
break;
case 3:
this._point = 4;
default:
Xa(this, a, b);
}
(this._l01_a = this._l12_a),
(this._l12_a = this._l23_a),
(this._l01_2a = this._l12_2a),
(this._l12_2a = this._l23_2a),
(this._x0 = this._x1),
(this._x1 = this._x2),
(this._x2 = a),
(this._y0 = this._y1),
(this._y1 = this._y2),
(this._y2 = b);
},
}),
(function a(b) {
function c(a) {
return b ? new $a(a, b) : new Wa(a, 0);
}
return (
(c.alpha = function (b) {
return a(+b);
}),
c
);
})(0.5),
(db.prototype = {
areaStart: function () {
this._line = 0;
},
areaEnd: function () {
this._line = NaN;
},
lineStart: function () {
(this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN), (this._point = 0);
},
lineEnd: function () {
switch (this._point) {
case 2:
this._context.lineTo(this._x1, this._y1);
break;
case 3:
cb(this, this._t0, bb(this, this._t0));
}
(this._line || (0 !== this._line && 1 === this._point)) && this._context.closePath(),
(this._line = 1 - this._line);
},
point: function (a, b) {
var c = NaN;
if (((a = +a), (b = +b), a !== this._x1 || b !== this._y1)) {
switch (this._point) {
case 0:
(this._point = 1),
this._line ? this._context.lineTo(a, b) : this._context.moveTo(a, b);
break;
case 1:
this._point = 2;
break;
case 2:
(this._point = 3), cb(this, bb(this, (c = ab(this, a, b))), c);
break;
default:
cb(this, this._t0, (c = ab(this, a, b)));
}
(this._x0 = this._x1),
(this._x1 = a),
(this._y0 = this._y1),
(this._y1 = b),
(this._t0 = c);
}
},
}),
((eb.prototype = ne(db.prototype)).point = function (a, b) {
db.prototype.point.call(this, b, a);
}),
(fb.prototype = {
moveTo: function (a, b) {
this._context.moveTo(b, a);
},
closePath: function () {
this._context.closePath();
},
lineTo: function (a, b) {
this._context.lineTo(b, a);
},
bezierCurveTo: function (a, b, c, d, e, f) {
this._context.bezierCurveTo(b, a, d, c, f, e);
},
}),
(jb.prototype = {
constructor: jb,
insert: function (a, b) {
var c, d, e;
if (a) {
if (((b.P = a), (b.N = a.N), a.N && (a.N.P = b), (a.N = b), a.R)) {
for (a = a.R; a.L; ) a = a.L;
a.L = b;
} else a.R = b;
c = a;
} else
this._
? ((a = nb(this._)), (b.P = null), (b.N = a), (a.P = a.L = b), (c = a))
: ((b.P = b.N = null), (this._ = b), (c = null));
for (b.L = b.R = null, b.U = c, b.C = !0, a = b; c && c.C; )
(d = c.U),
c === d.L
? ((e = d.R),
e && e.C
? ((c.C = e.C = !1), (d.C = !0), (a = d))
: (a === c.R && (lb(this, c), (a = c), (c = a.U)),
(c.C = !1),
(d.C = !0),
mb(this, d)))
: ((e = d.L),
e && e.C
? ((c.C = e.C = !1), (d.C = !0), (a = d))
: (a === c.L && (mb(this, c), (a = c), (c = a.U)),
(c.C = !1),
(d.C = !0),
lb(this, d))),
(c = a.U);
this._.C = !1;
},
remove: function (a) {
a.N && (a.N.P = a.P), a.P && (a.P.N = a.N), (a.N = a.P = null);
var b,
c,
d,
e = a.U,
f = a.L,
g = a.R;
if (
((c = f ? (g ? nb(g) : f) : g),
e ? (e.L === a ? (e.L = c) : (e.R = c)) : (this._ = c),
f && g
? ((d = c.C),
(c.C = a.C),
(c.L = f),
(f.U = c),
c !== g
? ((e = c.U), (c.U = a.U), (a = c.R), (e.L = a), (c.R = g), (g.U = c))
: ((c.U = e), (e = c), (a = c.R)))
: ((d = a.C), (a = c)),
a && (a.U = e),
!d)
) {
if (a && a.C) return void (a.C = !1);
do {
if (a === this._) break;
if (a === e.L) {
if (
((b = e.R),
b.C && ((b.C = !1), (e.C = !0), lb(this, e), (b = e.R)),
(b.L && b.L.C) || (b.R && b.R.C))
) {
(b.R && b.R.C) || ((b.L.C = !1), (b.C = !0), mb(this, b), (b = e.R)),
(b.C = e.C),
(e.C = b.R.C = !1),
lb(this, e),
(a = this._);
break;
}
} else if (
((b = e.L),
b.C && ((b.C = !1), (e.C = !0), mb(this, e), (b = e.L)),
(b.L && b.L.C) || (b.R && b.R.C))
) {
(b.L && b.L.C) || ((b.R.C = !1), (b.C = !0), lb(this, b), (b = e.L)),
(b.C = e.C),
(e.C = b.L.C = !1),
mb(this, e),
(a = this._);
break;
}
(b.C = !0), (a = e), (e = e.U);
} while (!a.C);
a && (a.C = !1);
}
},
}),
(Ee = []),
(Ge = []),
(He = 1e-6),
(Ie = 1e-12),
(Mb.prototype = {
constructor: Mb,
polygons: function () {
var a = this.edges;
return this.cells.map(function (b) {
var c = b.halfedges.map(function (c) {
return wb(b, a[c]);
});
return (c.data = b.site.data), c;
});
},
triangles: function a() {
var a = [],
b = this.edges;
return (
this.cells.forEach(function (c, d) {
for (
var e,
f = c.site,
g = c.halfedges,
h = -1,
i = g.length,
j = b[g[i - 1]],
k = j.left === f ? j.right : j.left;
++h < i;
)
(e = k),
(j = b[g[h]]),
(k = j.left === f ? j.right : j.left),
d < e.index &&
d < k.index &&
Kb(f, e, k) < 0 &&
a.push([f.data, e.data, k.data]);
}),
a
);
},
links: function () {
return this.edges
.filter(function (a) {
return a.right;
})
.map(function (a) {
return { source: a.left.data, target: a.right.data };
});
},
}),
(Ne = Pb(Ob)),
(Oe = Ne.right),
(Pe = Math.sqrt(50)),
(Qe = Math.sqrt(10)),
(Re = Math.sqrt(2)),
(Se = Array.prototype),
(Te = Se.map),
(Ue = Se.slice),
(Ve = 0.7),
(We = 1 / Ve),
(Xe = /^#([0-9a-f]{3})$/),
(Ye = /^#([0-9a-f]{6})$/),
(Ze = /^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/),
($e =
/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/),
(_e =
/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/),
(af =
/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/),
(bf =
/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/),
(cf =
/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/),
(df = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074,
}),
Vb(Xb, Yb, {
displayable: function () {
return this.rgb().displayable();
},
toString: function () {
return this.rgb() + "";
},
}),
Vb(
bc,
ac,
Wb(Xb, {
brighter: function (a) {
return (
(a = null == a ? We : Math.pow(We, a)),
new bc(this.r * a, this.g * a, this.b * a, this.opacity)
);
},
darker: function (a) {
return (
(a = null == a ? Ve : Math.pow(Ve, a)),
new bc(this.r * a, this.g * a, this.b * a, 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
);
},
toString: function () {
var a = this.opacity;
return (
(a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a))),
(1 === a ? "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)) +
(1 === a ? ")" : ", " + a + ")")
);
},
})
),
Vb(
fc,
ec,
Wb(Xb, {
brighter: function (a) {
return (
(a = null == a ? We : Math.pow(We, a)),
new fc(this.h, this.s, this.l * a, this.opacity)
);
},
darker: function (a) {
return (
(a = null == a ? Ve : Math.pow(Ve, a)),
new fc(this.h, this.s, this.l * a, this.opacity)
);
},
rgb: function () {
var a = (this.h % 360) + 360 * (this.h < 0),
b = isNaN(a) || isNaN(this.s) ? 0 : this.s,
c = this.l,
d = c + (c < 0.5 ? c : 1 - c) * b,
e = 2 * c - d;
return new bc(
gc(a >= 240 ? a - 240 : a + 120, e, d),
gc(a, e, d),
gc(a < 120 ? a + 240 : a - 120, e, d),
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
);
},
})
),
(ef = Math.PI / 180),
(ff = 180 / Math.PI),
(gf = 18),
(hf = 0.95047),
(jf = 1),
(kf = 1.08883),
(lf = 4 / 29),
(mf = 6 / 29),
(nf = 3 * mf * mf),
(of = mf * mf * mf),
Vb(
jc,
ic,
Wb(Xb, {
brighter: function (a) {
return new jc(this.l + gf * (null == a ? 1 : a), this.a, this.b, this.opacity);
},
darker: function (a) {
return new jc(this.l - gf * (null == a ? 1 : a), this.a, this.b, this.opacity);
},
rgb: function () {
var a = (this.l + 16) / 116,
b = isNaN(this.a) ? a : a + this.a / 500,
c = isNaN(this.b) ? a : a - this.b / 200;
return (
(a = jf * lc(a)),
(b = hf * lc(b)),
(c = kf * lc(c)),
new bc(
mc(3.2404542 * b - 1.5371385 * a - 0.4985314 * c),
mc(-0.969266 * b + 1.8760108 * a + 0.041556 * c),
mc(0.0556434 * b - 0.2040259 * a + 1.0572252 * c),
this.opacity
)
);
},
})
),
Vb(
qc,
pc,
Wb(Xb, {
brighter: function (a) {
return new qc(this.h, this.c, this.l + gf * (null == a ? 1 : a), this.opacity);
},
darker: function (a) {
return new qc(this.h, this.c, this.l - gf * (null == a ? 1 : a), this.opacity);
},
rgb: function () {
return hc(this).rgb();
},
})
),
(pf = -0.14861),
(qf = 1.78277),
(rf = -0.29227),
(sf = -0.90649),
(tf = 1.97294),
(uf = tf * sf),
(vf = tf * qf),
(wf = qf * rf - sf * pf),
Vb(
tc,
sc,
Wb(Xb, {
brighter: function (a) {
return (
(a = null == a ? We : Math.pow(We, a)),
new tc(this.h, this.s, this.l * a, this.opacity)
);
},
darker: function (a) {
return (
(a = null == a ? Ve : Math.pow(Ve, a)),
new tc(this.h, this.s, this.l * a, this.opacity)
);
},
rgb: function () {
var a = isNaN(this.h) ? 0 : (this.h + 120) * ef,
b = +this.l,
c = isNaN(this.s) ? 0 : this.s * b * (1 - b),
d = Math.cos(a),
e = Math.sin(a);
return new bc(
255 * (b + c * (pf * d + qf * e)),
255 * (b + c * (rf * d + sf * e)),
255 * (b + c * (tf * d)),
this.opacity
);
},
})
),
(xf = (function a(b) {
function c(a, b) {
var c = d((a = ac(a)).r, (b = ac(b)).r),
e = d(a.g, b.g),
f = d(a.b, b.b),
g = d(a.opacity, b.opacity);
return function (b) {
return (a.r = c(b)), (a.g = e(b)), (a.b = f(b)), (a.opacity = g(b)), a + "";
};
}
var d = yc(b);
return (c.gamma = a), c;
})(1)),
(yf = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g),
(zf = new RegExp(yf.source, "g")),
Jc(xc),
(Af = Jc(zc)),
(Bf = [0, 1]),
(Df = {
"": Wc,
"%": function (a, b) {
return (100 * a).toFixed(b);
},
b: function (a) {
return Math.round(a).toString(2);
},
c: function (a) {
return a + "";
},
d: function (a) {
return Math.round(a).toString(10);
},
e: function (a, b) {
return a.toExponential(b);
},
f: function (a, b) {
return a.toFixed(b);
},
g: function (a, b) {
return a.toPrecision(b);
},
o: function (a) {
return Math.round(a).toString(8);
},
p: function (a, b) {
return Yc(100 * a, b);
},
r: Yc,
s: Xc,
X: function (a) {
return Math.round(a).toString(16).toUpperCase();
},
x: function (a) {
return Math.round(a).toString(16);
},
}),
(Ef = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i),
($c.prototype.toString = function () {
return (
this.fill +
this.align +
this.sign +
this.symbol +
(this.zero ? "0" : "") +
(null == this.width ? "" : Math.max(1, 0 | this.width)) +
(this.comma ? "," : "") +
(null == this.precision ? "" : "." + Math.max(0, 0 | this.precision)) +
this.type
);
}),
(Ff = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]),
bd({ decimal: ".", thousands: ",", grouping: [3], currency: ["$", ""] }),
(Jf = new Date()),
(Kf = new Date()),
(Lf = id(
function () {},
function (a, b) {
a.setTime(+a + b);
},
function (a, b) {
return b - a;
}
)),
(Lf.every = function (a) {
return (
(a = Math.floor(a)),
isFinite(a) && a > 0
? a > 1
? id(
function (b) {
b.setTime(Math.floor(b / a) * a);
},
function (b, c) {
b.setTime(+b + c * a);
},
function (b, c) {
return (c - b) / a;
}
)
: Lf
: null
);
}),
(Mf = 1e3),
(Nf = 6e4),
(Of = 36e5),
(Pf = 864e5),
(Qf = 6048e5),
(Rf = id(
function (a) {
a.setTime(Math.floor(a / Mf) * Mf);
},
function (a, b) {
a.setTime(+a + b * Mf);
},
function (a, b) {
return (b - a) / Mf;
},
function (a) {
return a.getUTCSeconds();
}
)),
(Sf = id(
function (a) {
a.setTime(Math.floor(a / Nf) * Nf);
},
function (a, b) {
a.setTime(+a + b * Nf);
},
function (a, b) {
return (b - a) / Nf;
},
function (a) {
return a.getMinutes();
}
)),
(Tf = id(
function (a) {
var b = (a.getTimezoneOffset() * Nf) % Of;
b < 0 && (b += Of), a.setTime(Math.floor((+a - b) / Of) * Of + b);
},
function (a, b) {
a.setTime(+a + b * Of);
},
function (a, b) {
return (b - a) / Of;
},
function (a) {
return a.getHours();
}
)),
(Uf = id(
function (a) {
a.setHours(0, 0, 0, 0);
},
function (a, b) {
a.setDate(a.getDate() + b);
},
function (a, b) {
return (b - a - (b.getTimezoneOffset() - a.getTimezoneOffset()) * Nf) / Pf;
},
function (a) {
return a.getDate() - 1;
}
)),
(Vf = jd(0)),
(Wf = jd(1)),
(Xf = id(
function (a) {
a.setDate(1), a.setHours(0, 0, 0, 0);
},
function (a, b) {
a.setMonth(a.getMonth() + b);
},
function (a, b) {
return b.getMonth() - a.getMonth() + 12 * (b.getFullYear() - a.getFullYear());
},
function (a) {
return a.getMonth();
}
)),
(Yf = id(
function (a) {
a.setMonth(0, 1), a.setHours(0, 0, 0, 0);
},
function (a, b) {
a.setFullYear(a.getFullYear() + b);
},
function (a, b) {
return b.getFullYear() - a.getFullYear();
},
function (a) {
return a.getFullYear();
}
)),
(Yf.every = function (a) {
return isFinite((a = Math.floor(a))) && a > 0
? id(
function (b) {
b.setFullYear(Math.floor(b.getFullYear() / a) * a),
b.setMonth(0, 1),
b.setHours(0, 0, 0, 0);
},
function (b, c) {
b.setFullYear(b.getFullYear() + c * a);
}
)
: null;
}),
(Zf = id(
function (a) {
a.setUTCSeconds(0, 0);
},
function (a, b) {
a.setTime(+a + b * Nf);
},
function (a, b) {
return (b - a) / Nf;
},
function (a) {
return a.getUTCMinutes();
}
)),
($f = id(
function (a) {
a.setUTCMinutes(0, 0, 0);
},
function (a, b) {
a.setTime(+a + b * Of);
},
function (a, b) {
return (b - a) / Of;
},
function (a) {
return a.getUTCHours();
}
)),
(_f = id(
function (a) {
a.setUTCHours(0, 0, 0, 0);
},
function (a, b) {
a.setUTCDate(a.getUTCDate() + b);
},
function (a, b) {
return (b - a) / Pf;
},
function (a) {
return a.getUTCDate() - 1;
}
)),
(ag = kd(0)),
(bg = kd(1)),
(cg = id(
function (a) {
a.setUTCDate(1), a.setUTCHours(0, 0, 0, 0);
},
function (a, b) {
a.setUTCMonth(a.getUTCMonth() + b);
},
function (a, b) {
return (
b.getUTCMonth() - a.getUTCMonth() + 12 * (b.getUTCFullYear() - a.getUTCFullYear())
);
},
function (a) {
return a.getUTCMonth();
}
)),
(dg = id(
function (a) {
a.setUTCMonth(0, 1), a.setUTCHours(0, 0, 0, 0);
},
function (a, b) {
a.setUTCFullYear(a.getUTCFullYear() + b);
},
function (a, b) {
return b.getUTCFullYear() - a.getUTCFullYear();
},
function (a) {
return a.getUTCFullYear();
}
)),
(dg.every = function (a) {
return isFinite((a = Math.floor(a))) && a > 0
? id(
function (b) {
b.setUTCFullYear(Math.floor(b.getUTCFullYear() / a) * a),
b.setUTCMonth(0, 1),
b.setUTCHours(0, 0, 0, 0);
},
function (b, c) {
b.setUTCFullYear(b.getUTCFullYear() + c * a);
}
)
: null;
}),
(eg = { "-": "", _: " ", 0: "0" }),
(fg = /^\s*\d+/),
(gg = /^%/),
(hg = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g),
ie({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
shortMonths: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
}),
(ng = "%Y-%m-%dT%H:%M:%S.%LZ"),
(og = Date.prototype.toISOString ? je : lg(ng)),
(pg = +new Date("2000-01-01T00:00:00.000Z") ? ke : mg(ng)),
le("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),
le(
"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"
),
le(
"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"
),
le(
"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"
),
Af(sc(300, 0.5, 0), sc(-240, 0.5, 1)),
(qg = Af(sc(-100, 0.75, 0.35), sc(80, 1.5, 0.8))),
(rg = Af(sc(260, 0.75, 0.35), sc(80, 1.5, 0.8))),
(sg = sc()),
me(
le(
"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"
)
),
(tg = me(
le(
"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"
)
)),
(ug = me(
le(
"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"
)
)),
(vg = me(
le(
"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"
)
)),
loaderApi("select", Fa),
loaderApi("selectAll", Ga),
loaderApi("line", Oa),
loaderApi("voronoi", Nb),
loaderApi("extent", Rb),
loaderApi("scaleLinear", hd);
},
};
}),
loaderApi.register("3b", [], function (a) {
"use strict";
function b(a, b, c) {
function d(a, b, c) {
for (var d = b.x - a.x, f = b.y - a.y, g = Math.sqrt(d * d + f * f); c > g / 2 && d > 0; ) c -= 1;
return e(a, b, Math.min(1, c / g));
}
function e(a, b, c) {
return { x: a.x + (b.x - a.x) * c, y: a.y + (b.y - a.y) * c };
}
function f(a, b) {
a.length > 2 && ((a[a.length - 2] = b.x), (a[a.length - 1] = b.y));
}
function g(a) {
return { x: parseFloat(a[a.length - 2]), y: parseFloat(a[a.length - 1]) };
}
var h = a.split(/[,\s]/).reduce(function (a, b) {
var c = b.match("([a-zA-Z])(.+)");
return c ? (a.push(c[1]), a.push(c[2])) : a.push(b), a;
}, []),
i = h.reduce(function (a, b) {
return parseFloat(b) == b && a.length ? a[a.length - 1].push(b) : a.push([b]), a;
}, []),
j = [];
if (i.length > 1) {
var k = g(i[0]),
l = null;
"Z" == i[i.length - 1][0] && i[0].length > 2 && ((l = ["L", k.x, k.y]), (i[i.length - 1] = l)),
j.push(i[0]);
for (var m = 1; m < i.length; m++) {
var n = j[j.length - 1],
o = i[m],
p = o == l ? i[1] : i[m + 1];
if (p && n && n.length > 2 && "L" == o[0] && p.length > 2 && "L" == p[0]) {
var q,
r,
s = g(n),
t = g(o),
u = g(p);
c
? ((q = e(t, n.origPoint || s, b)), (r = e(t, p.origPoint || u, b)))
: ((q = d(t, s, b)), (r = d(t, u, b))),
f(o, q),
(o.origPoint = t),
j.push(o);
var v = e(q, t, 0.5),
w = e(t, r, 0.5),
x = ["C", v.x, v.y, w.x, w.y, r.x, r.y];
(x.origPoint = t), j.push(x);
} else j.push(o);
}
if (l) {
var y = g(j[j.length - 1]);
j.push(["Z"]), f(j[0], y);
}
} else j = i;
return j.reduce(function (a, b) {
return a + b.join(" ") + " ";
}, "");
}
return loaderApi("roundPathCorners", b), { setters: [], execute: function () {} };
}),
loaderApi.registerDynamic("3c", [], !0, function (a, b, c) {
this || self;
return (
(c.exports = [
{ _id: "1231399", name: "Nafissatou Thiam", country: "BEL", rank: "1", score: 6810, medal: "gold" },
{
_id: "1217637",
name: "Jessica Ennis-Hill",
country: "GBR",
rank: "2",
score: 6775,
medal: "silver",
},
{
_id: "1109890",
name: "Brianne Theisen Eaton",
country: "CAN",
rank: "3",
score: 6653,
medal: "bronze",
},
{
_id: "1219929",
name: "Laura Ikauniece-Admidina",
country: "LAT",
rank: "4",
score: 6617,
medal: null,
},
{ _id: "1170510", name: "Carolin Schafer", country: "GER", rank: "5", score: 6540, medal: null },
{
_id: "1217677",
name: "Katarina Johnson-Thompson",
country: "GBR",
rank: "6",
score: 6523,
medal: null,
},
{ _id: "1119468", name: "Yorgelis Rodriguez", country: "CUB", rank: "7", score: 6481, medal: null },
{
_id: "1170029",
name: "Gyorgyi Zsivoczky-Farkas",
country: "HUN",
rank: "8",
score: 6442,
medal: null,
},
{ _id: "1170345", name: "Jennifer Oeser", country: "GER", rank: "9", score: 6401, medal: null },
{ _id: "1213210", name: "Anouk Vetter", country: "NED", rank: "10", score: 6394, medal: null },
{
_id: "1162428",
name: "Antoinette Nana Djimou Ida",
country: "FRA",
rank: "11",
score: 6383,
medal: null,
},
{ _id: "1127434", name: "Barbara Nwaba", country: "USA", rank: "12", score: 6309, medal: null },
{ _id: "1213224", name: "Nadine Broersen", country: "NED", rank: "13", score: 6300, medal: null },
{ _id: "1170373", name: "Claudia Rath", country: "GER", rank: "14", score: 6270, medal: null },
{ _id: "1068391", name: "Evelis Aguilar", country: "COL", rank: "15", score: 6263, medal: null },
{ _id: "1170879", name: "Xenia Krizsan", country: "HUN", rank: "16", score: 6257, medal: null },
{ _id: "1127626", name: "Kendell Williams", country: "USA", rank: "17", score: 6221, medal: null },
{
_id: "1127401",
name: "Heather Miller-Koch",
country: "USA",
rank: "18",
score: 6213,
medal: null,
},
{ _id: "1213216", name: "Nadine Visser", country: "NED", rank: "19", score: 6190, medal: null },
{ _id: "1107221", name: "Akela Jones", country: "BAR", rank: "20", score: 6173, medal: null },
{ _id: "1169714", name: "Ivona Dadic", country: "AUT", rank: "21", score: 6155, medal: null },
{ _id: "1226792", name: "Eliska Klucinova", country: "CZE", rank: "22", score: 6077, medal: null },
{ _id: "1216978", name: "Vanessa Chefer", country: "BRA", rank: "23", score: 6024, medal: null },
{ _id: "1226506", name: "Katerina Cachova", country: "CZE", rank: "24", score: 5958, medal: null },
{ _id: "1194203", name: "Hanna Kasyanova", country: "UKR", rank: "25", score: 5951, medal: null },
{ _id: "1136380", name: "Alysbeth Felix", country: "PUR", rank: "26", score: 5805, medal: null },
{ _id: "1195391", name: "Sofia Yfantidou", country: "GRE", rank: "27", score: 5613, medal: null },
{ _id: "1194920", name: "Alina Fodorova", country: "UKR", rank: "28", score: 5038, medal: null },
{ _id: "1433489", name: "Uhunoma Osazuwa", country: "NGR", rank: "29", score: 4916, medal: null },
{ _id: "1100814", name: "Ekaterina Voronina", country: "UZB", score: null, medal: null },
{ _id: "1178322", name: "Grit Sadeiko", country: "EST", score: null, medal: null },
]),
c.exports
);
}),
loaderApi.register("1", ["14", "34", "36", "37", "3a", "3b", "3c"], function (a) {
// ------ MAIN APPLICATION ------
function querySelector(scope, selector) {
return selector || ((selector = scope), (scope = document)), scope.querySelector(selector);
}
function querySelectorAll(scope, selector) {
return selector || ((selector = scope), (scope = document)), [].slice.apply(scope.querySelectorAll(selector));
}
function animateCircleGrow(circles, athleteId, timestamp) {
animationState[athleteId] ? animationState[athleteId].grow || (animationState[athleteId].grow = timestamp) : (animationState[athleteId] = { grow: timestamp });
var elapsed = timestamp - animationState[athleteId].grow;
elapsed < 150
? (circles.forEach(function (circle) {
return circle.setAttribute("r", circleRadius * easeOutFn(elapsed));
}),
window.requestAnimationFrame(function (t) {
animateCircleGrow(circles, athleteId, t);
}))
: (circles.forEach(function (circle) {
return circle.setAttribute("r", circleRadius * easeOutFn(150));
}),
delete animationState[athleteId].grow);
}
function animateCircleShrink(circles, athleteId, timestamp) {
animationState[athleteId] ? animationState[athleteId].shrink || (animationState[athleteId].shrink = timestamp) : (animationState[athleteId] = { shrink: timestamp });
var elapsed = timestamp - animationState[athleteId].shrink;
elapsed < 150
? (circles.forEach(function (circle) {
return circle.setAttribute("r", (circleRadius / easeOutFn(elapsed)) * 2);
}),
window.requestAnimationFrame(function (t) {
animateCircleShrink(circles, athleteId, t);
}))
: (circles.forEach(function (circle) {
return circle.setAttribute("r", (circleRadius / easeOutFn(150)) * 2);
}),
delete animationState[athleteId].shrink);
}
// Module imports (set by setters below)
var toArray, // f: Array.from polyfill
destructureIterator, // g: iterator destructuring helper
iframeMessenger, // h: parent ↔ iframe communication
athleteDataByDiscipline, // i: per-discipline result arrays
d3, // j: D3 library namespace
roundPathCorners, // k: SVG path corner-rounding utility
finalResults; // l: final heptathlon results array
// Application state
var isTouchScrolling, // m: flag to distinguish touch scroll vs tap
formatRunTime, // n: format sprint time with delta vs best
formatRunSeconds, // o: format seconds remainder after minutes
activeAthleteId, // p: currently highlighted athlete _id
windowWidth, // q: current window inner width (for responsive)
disciplines, // r: discipline config array (name, mapper, format)
labelPadding, // s: left-side label offset (responsive)
easeOutCubic, // t: easing function factory
animationState, // u: map of { grow/shrink } animation timestamps
prevActiveId, // v: previously active athlete id (unused)
circleRadius, // w: base circle radius (px)
defaultAthleteIds, // x: default highlighted athlete IDs on load
easeOutFn, // y: computed ease-out function
axisMargin, // z: margin for axis start/end (px)
allResultCircles, // A: cached NodeList of .hepta-result circles
allResultLabels, // B: cached NodeList of .hepta-result-label texts
allDisciplineTitles, // C: cached NodeList of .hepta-discipline-title texts
// D = highlightAthlete function
// E = unhighlightAthlete function
// F = restoreDefaultHighlights function
// G = renderDisciplineRow function
// H = renderConnectingLines function
// I = renderVoronoiOverlay function
// J = renderAllDisciplines function
// K = buildSvgVisualization function
highlightAthlete, unhighlightAthlete, restoreDefaultHighlights,
renderDisciplineRow, renderConnectingLines, renderVoronoiOverlay,
renderAllDisciplines, buildSvgVisualization;
return {
setters: [
function (mod) { toArray = mod.default; },
function (mod) { destructureIterator = mod.default; },
function (mod) { iframeMessenger = mod.default; },
function (mod) { athleteDataByDiscipline = mod.default; },
function (mod) { d3 = mod; },
function (mod) { roundPathCorners = mod.roundPathCorners; },
function (mod) { finalResults = mod.default; },
],
execute: function () {
"use strict";
(isTouchScrolling = false),
(Array.prototype.flatMap = function (a) {
return Array.prototype.concat.apply([], this.map(a));
}),
Array.prototype.find ||
(Array.prototype.find = function (a) {
if (null == this)
throw new TypeError("Array.prototype.find called on null or undefined");
if ("function" != typeof a) throw new TypeError("predicate must be a function");
for (var b, c = Object(this), d = c.length >>> 0, e = arguments[1], f = 0; f < d; f++)
if (((b = c[f]), a.call(e, b, f, c))) return b;
}),
Array.prototype.findIndex ||
(Array.prototype.findIndex = function (a) {
if (null == this)
throw new TypeError("Array.prototype.findIndex called on null or undefined");
if ("function" != typeof a) throw new TypeError("predicate must be a function");
for (var b, c = Object(this), d = c.length >>> 0, e = arguments[1], f = 0; f < d; f++)
if (((b = c[f]), a.call(e, b, f, c))) return f;
return -1;
}),
(Array.prototype.uniqueWith = function (a) {
var b = this;
return this.filter(function (c, d) {
return (
b.findIndex(function (b) {
return a(c, b);
}) === d
);
});
}),
(Array.prototype.sortBy = function (a) {
return this.slice().sort(function (b, c) {
return a(b) > a(c) ? 1 : -1;
});
}),
(Array.prototype.immutableReverse = function () {
return this.slice().reverse();
}),
(formatRunTime = function (rawValue, allValues) {
if (rawValue) {
var delta =
rawValue -
Math.min.apply(
Math,
toArray(
allValues.filter(function (v) {
return v;
})
)
);
return delta > 0 ? rawValue + "s (+" + delta.toFixed(2) + ")" : rawValue + "s";
}
return "";
}),
(formatRunSeconds = function (totalSeconds) {
return (totalSeconds % 60).toFixed(2);
}),
(activeAthleteId = null),
(windowWidth = window.innerWidth),
(disciplines = [
{
name: "100m hurdles",
resMapper: function (a) {
return a;
},
format: formatRunTime,
reverseScale: true,
},
{
name: "High jump",
resMapper: function (a) {
return a;
},
format: function (v) {
return v ? v + "m" : "";
},
},
{
name: "Shot put",
resMapper: function (a) {
return a;
},
format: function (v) {
return v ? v + "m" : "";
},
},
{
name: "200m run",
resMapper: function (a) {
return a;
},
format: formatRunTime,
reverseScale: true,
},
{
name: "Long jump",
resMapper: function (a) {
return a;
},
format: function (v) {
return v ? v + "m" : "";
},
},
{
name: "Javelin throw",
resMapper: function (a) {
return a;
},
format: function (v) {
return v ? v + "m" : "";
},
},
{
name: "800m run",
resMapper: function (timeStr) {
if (timeStr) {
var parts = timeStr.split(":"),
parsed = destructureIterator(parts, 2),
mins = parsed[0],
secs = parsed[1];
return 60 * parseInt(mins) + parseFloat(secs);
}
},
format: function (timeStr, allTimes) {
if (timeStr) {
var parts = timeStr.split(":"),
parsed = destructureIterator(parts, 2),
mins = parsed[0],
secs = parsed[1],
totalSecs = 60 * parseInt(mins) + parseFloat(secs),
bestSecs = Math.min.apply(
Math,
toArray(
allTimes
.filter(function (t) {
return t;
})
.map(function (t) {
var p = t.split(":"),
parsed2 = destructureIterator(p, 2),
m = parsed2[0],
s = parsed2[1];
return 60 * parseInt(m) + parseFloat(s);
})
)
),
delta = totalSecs - bestSecs;
return delta > 0 ? timeStr + " (+" + formatRunSeconds(delta) + ")" : timeStr;
}
return "";
},
reverseScale: !0,
},
]),
(labelPadding = null),
(easeOutCubic = function (duration) {
return function (t) {
var c2 = -2 / (duration * duration * duration),
c1 = 3 / (duration * duration),
c0 = 1;
return c2 * t * t * t + c1 * t * t + c0;
};
}),
(animationState = {}),
(prevActiveId = null),
(circleRadius = 4),
(defaultAthleteIds = [finalResults[0]._id]),
(easeOutFn = null),
(axisMargin = 16),
(allResultCircles = null),
(allResultLabels = null),
(allDisciplineTitles = null),
(highlightAthlete = function (athleteId, forceUpdate) {
(athleteId !== activeAthleteId || forceUpdate) &&
!(function () {
null !== activeAthleteId && unhighlightAthlete(activeAthleteId), (activeAthleteId = athleteId);
var athlete = finalResults.find(function (r) {
return r._id === athleteId;
});
(querySelector(".hepta-select").selectedIndex = finalResults.findIndex(function (r) {
return r._id === athleteId;
})),
(querySelector(".hepta-select").className = athlete.medal
? "hepta-select hepta-select--" + athlete.medal
: "hepta-select"),
querySelector('.hepta-tr[data-id="' + athleteId + '"]').classList.add("hepta-hl");
var line = querySelector('.hepta-line[data-id="' + athleteId + '"]');
line && line.classList.remove("hepta-hidden"),
querySelectorAll(".hepta-discipline").forEach(function (disciplineEl) {
d3.select(disciplineEl)
.selectAll(".hepta-result-group")
.sort(function (a, b) {
var byActive = [athleteId].indexOf(a.e.identifier) - [athleteId].indexOf(b.e.identifier);
return 0 !== byActive
? byActive
: ["bronze", "silver", "gold"].indexOf(a.e.medal) -
["bronze", "silver", "gold"].indexOf(b.e.medal);
});
});
var circles = querySelectorAll('.hepta-result-group[data-id="' + athleteId + '"] circle'),
labels = querySelectorAll('.hepta-result-group[data-id="' + athleteId + '"] text');
athlete.rank ? athlete.rank + "." : "";
window.requestAnimationFrame(function (t) {
animateCircleGrow(circles, athleteId, t);
}),
circles.forEach(function (c) {
c.classList.add("hepta-hl");
}),
labels.forEach(function (lbl) {
lbl.classList.remove("hepta-hidden");
});
})();
}),
(unhighlightAthlete = function (athleteId) {
querySelector('.hepta-tr[data-id="' + athleteId + '"]').classList.remove("hepta-hl");
var line = querySelector('.hepta-line[data-id="' + athleteId + '"]');
line && line.classList.add("hepta-hidden");
var circles = querySelectorAll('.hepta-result-group[data-id="' + athleteId + '"] circle'),
labels = querySelectorAll('.hepta-result-group[data-id="' + athleteId + '"] text');
window.requestAnimationFrame(function (t) {
animateCircleShrink(circles, athleteId, t);
}),
circles.forEach(function (c) {
c.classList.remove("hepta-hl");
}),
labels.forEach(function (lbl) {
lbl.classList.add("hepta-hidden");
});
}),
(restoreDefaultHighlights = function () {
defaultAthleteIds.forEach(function (id) {
highlightAthlete(id, true);
});
}),
(renderDisciplineRow = function (discipline, svgWidth, rowHeight, yOffset, svgSelection) {
var disciplineGroup = svgSelection
.append("g")
.attr(
"class",
discipline.total ? "hepta-discipline hepta-discipline--total" : "hepta-discipline"
),
legendXPositions = windowWidth > 740 ? [axisMargin + labelPadding + 44, svgWidth - axisMargin - 48] : [svgWidth / 2 - 10, svgWidth / 2 + 10];
svgSelection
.append("text")
.attr("class", "hepta-legend")
.text("← worse")
.attr("x", legendXPositions[0])
.attr("y", axisMargin + rowHeight / 2 - 24)
.attr("text-anchor", "end"),
svgSelection
.append("text")
.attr("class", "hepta-legend")
.text("better →")
.attr("x", legendXPositions[1])
.attr("y", axisMargin + rowHeight / 2 - 24)
.attr("text-anchor", "begin"),
disciplineGroup
.append("line")
.attr("x1", axisMargin)
.attr("x2", svgWidth - axisMargin)
.attr("y1", yOffset + rowHeight / 2)
.attr("y2", yOffset + rowHeight / 2)
.attr("class", "hepta-axis");
var valueExtent = d3.extent(
discipline.data.map(function (entry) {
return discipline.resMapper(entry.pr.value);
})
),
scaleRange = discipline.reverseScale ? [svgWidth - axisMargin, axisMargin + labelPadding] : [axisMargin + labelPadding, svgWidth - axisMargin],
xScale = d3.scaleLinear().domain(valueExtent).range(scaleRange),
resultGroups = disciplineGroup
.selectAll(".hepta-result-group")
.data(discipline.data)
.enter()
.append("g")
.attr(
"class",
discipline.total ? "hepta-result-group hepta-result-group--total" : "hepta-result-group"
)
.attr("data-id", function (entry) {
return entry.e.identifier;
})
.attr("data-finished", function (entry) {
return entry.pr.value;
});
resultGroups.append("circle")
.attr("class", "hepta-result")
.attr("class", function (entry) {
var cls = "hepta-result";
return (
entry.pr.value || (cls += " hepta-hidden"),
entry.e.medal && (cls += " hepta-medal--" + entry.e.medal),
cls
);
})
.attr("cx", function (entry) {
var x = entry.pr.value ? xScale(discipline.resMapper(entry.pr.value)) : 0;
return x;
})
.attr("cy", yOffset + rowHeight / 2)
.attr("r", 4)
.attr("data-id", function (entry) {
return entry.e.identifier;
});
resultGroups
.append("text")
.attr("class", "hepta-result-label hepta-hidden")
.text(function (entry) {
return discipline.total
? entry.e.name + " (" + entry.e.country + ")"
: discipline.format(
entry.pr.value,
discipline.data.map(function (d) {
return d.pr.value;
})
);
})
.attr("x", function (entry) {
var offset = xScale(discipline.resMapper(entry.pr.value)) > svgWidth / 2 ? -8 : 8;
"800m run" === discipline.name &&
Math.abs(xScale(discipline.resMapper(entry.pr.value)) - svgWidth / 2) / svgWidth < 0.3 &&
(offset = 0);
var xPos = entry.pr.value ? xScale(discipline.resMapper(entry.pr.value)) + offset : 0;
return xPos;
})
.attr("text-anchor", function (entry) {
return "800m run" === discipline.name &&
Math.abs(xScale(discipline.resMapper(entry.pr.value)) - svgWidth / 2) / svgWidth < 0.25
? "middle"
: xScale(discipline.resMapper(entry.pr.value)) > svgWidth / 2
? "end"
: "start";
})
.attr("y", yOffset + rowHeight / 2 + 32),
disciplineGroup
.append("text")
.text(discipline.name)
.attr("y", yOffset + rowHeight / 2 - 8)
.attr("x", 15)
.attr("class", "hepta-discipline-title");
}),
(renderConnectingLines = function (svgWidth, rowHeight, linesGroup, svgSelection) {
var lineGenerator = d3
.line()
.x(function (pt) { return pt.x; })
.y(function (pt) { return pt.y; })
.defined(function (pt) { return pt.finished; }),
athletePoints = finalResults
.map(function (athlete) { return athlete._id; })
.map(function (id) {
return svgSelection
.selectAll('.hepta-result-group[data-id="' + id + '"]')
.nodes()
.filter(function (node) {
return !node.classList.contains("hepta-result-group--total");
})
.map(function (node) {
return {
_id: node.getAttribute("data-id"),
finished: node.getAttribute("data-finished"),
x: node.querySelector("circle").getAttribute("cx"),
y: node.querySelector("circle").getAttribute("cy"),
};
});
}),
pathData = athletePoints.map(function (points) {
return points.flatMap(function (pt, idx, arr) {
if (arr[idx + 1]) {
var nextPt = arr[idx + 1];
return [
pt,
{
x: parseFloat(pt.x),
y: parseFloat(pt.y) + rowHeight / 2,
_id: pt._id,
finished: pt.finished && nextPt.finished,
},
{
x: parseFloat(nextPt.x),
y: parseFloat(pt.y) + rowHeight / 2,
_id: pt._id,
finished: pt.finished,
},
];
}
return pt;
});
});
linesGroup.selectAll(".hepta-line")
.data(pathData)
.enter()
.append("path")
.attr("d", function (pts) {
return lineGenerator(pts)
? roundPathCorners(
lineGenerator(pts)
.replace(/([A-Za-z])/g, " $1 ")
.replace(/,/g, " ")
.slice(1),
20
)
: "";
})
.attr("data-id", function (pts) {
return pts[0]._id;
})
.attr("class", "hepta-line hepta-hidden");
}),
(renderVoronoiOverlay = function (svgWidth, rowHeight, svgSelection) {
var voronoi = d3
.voronoi()
.extent([
[0, 0],
[svgWidth, 7 * rowHeight],
])
.x(function (pt) { return pt.x; })
.y(function (pt) { return pt.y; }),
finishedPoints = svgSelection
.selectAll(".hepta-result-group")
.nodes()
.filter(function (node) {
return node.getAttribute("data-finished");
})
.map(function (node) {
var medalMatch = node
.querySelector("circle")
.classList.toString()
.match(/medal--(.*)/);
return (
(medalMatch = medalMatch ? medalMatch[1] : null),
{
x: parseFloat(node.querySelector("circle").getAttribute("cx")),
y: parseFloat(node.querySelector("circle").getAttribute("cy")),
_id: node.getAttribute("data-id"),
medal: medalMatch,
}
);
})
.sortBy(function (pt) {
return ["bronze", "silver", "gold"].indexOf(pt.medal);
})
.immutableReverse()
.uniqueWith(function (a, b) {
return a.x === b.x && a.y === b.y;
}),
voronoiPolygons = voronoi(finishedPoints).polygons();
svgSelection.selectAll(".hepta-voronoi")
.data(voronoiPolygons)
.enter()
.append("path")
.attr("d", function (polygon) {
return "M" + polygon.join("L") + "Z";
})
.attr("class", "hepta-voronoi")
.attr("data-id", function (polygon) {
return polygon.data._id;
});
}),
(renderAllDisciplines = function (svgWidth, rowHeight, svgSelection) {
var linesGroupSel = svgSelection
.selectAll(".hepta-lines")
.data([svgWidth])
.enter()
.append("g")
.attr("class", "hepta-lines");
disciplines.forEach(function (disc, discIndex) {
(disc.data = athleteDataByDiscipline[discIndex]),
renderDisciplineRow(disc, svgWidth, rowHeight, axisMargin + rowHeight * discIndex, svgSelection);
}),
renderConnectingLines(svgWidth, rowHeight, linesGroupSel, svgSelection),
renderVoronoiOverlay(svgWidth, rowHeight, svgSelection);
}),
(window.init = function (config, options) {
iframeMessenger.enableAutoResize();
var topDiv = document.createElement("div");
topDiv.classList.add("hepta-top");
var nameHeading = document.createElement("h2");
nameHeading.classList.add("hepta-athlete-name");
var selectEl = querySelector(".hepta-select"),
tableBody = querySelector(".hepta-tbody");
finalResults.forEach(function (athlete) {
var row = document.createElement("tr");
(row.className = athlete.medal ? "hepta-tr hepta-tr--" + athlete.medal : "hepta-tr"),
row.setAttribute("data-id", athlete._id);
var rankCell = document.createElement("td");
rankCell.className = "hepta-td hepta-td--rank";
var nameCell = document.createElement("td");
nameCell.className = "hepta-td hepta-td--athlete";
var scoreCell = document.createElement("td");
(scoreCell.className = "hepta-td hepta-td--score"),
(scoreCell.innerHTML = athlete.score ? athlete.score : "-"),
(rankCell.innerHTML = athlete.medal
? "<span class='hepta-table-medal hepta-medal--" + athlete.medal + "'></span>"
: athlete.rank
? athlete.rank + "."
: "DNF"),
(nameCell.innerHTML = athlete.name + " (" + athlete.country + ")"),
row.appendChild(rankCell),
row.appendChild(nameCell),
row.appendChild(scoreCell),
row.addEventListener("mouseenter", function () {
highlightAthlete(athlete._id);
}),
tableBody.appendChild(row);
var option = document.createElement("option");
option.setAttribute("value", athlete._id),
(option.className = athlete.medal ? "hepta-option hepta-option--" + athlete.medal : "hepta-option"),
(option.innerHTML = athlete.rank
? athlete.rank + ". " + (athlete.name + " (" + athlete.country + ")")
: athlete.name + " (" + athlete.country + ")"),
selectEl.appendChild(option);
}),
selectEl.addEventListener("change", function () {
highlightAthlete(selectEl.value);
});
var vizContainer = querySelector(".hepta-viz-container");
window.addEventListener("resize", function () {
var newWidth = window.innerWidth;
Math.abs(newWidth - windowWidth) > 50 &&
((windowWidth = newWidth), (querySelector(".hepta-viz-container").innerHTML = ""), buildSvgVisualization(vizContainer, options), restoreDefaultHighlights());
}),
window.addEventListener("load", function () {
buildSvgVisualization(vizContainer, options), restoreDefaultHighlights();
});
}),
(buildSvgVisualization = function (container, options) {
var svgEl = d3.select(container).append("svg").attr("class", "hepta-svg"),
TOTAL_HEIGHT = 735,
computedWidth = parseFloat(window.getComputedStyle(querySelector(".hepta-svg")).width);
(labelPadding = windowWidth < 740 ? 80 : 120),
renderAllDisciplines(computedWidth, TOTAL_HEIGHT / 7, svgEl),
(allResultCircles = querySelectorAll(".hepta-result")),
(allResultLabels = querySelectorAll(".hepta-result-label")),
(allDisciplineTitles = querySelectorAll(".hepta-discipline-title")),
(easeOutFn = easeOutCubic(150)),
querySelectorAll(".hepta-voronoi").forEach(function (voronoiEl) {
var id = voronoiEl.getAttribute("data-id");
voronoiEl.addEventListener("mouseenter", function () {
highlightAthlete(id);
}),
voronoiEl.addEventListener("touchstart", function () {
isTouchScrolling = false;
}),
voronoiEl.addEventListener("touchmove", function () {
isTouchScrolling = true;
}),
voronoiEl.addEventListener("touchend", function () {
isTouchScrolling || highlightAthlete(id);
});
});
});
},
};
});
})(function (bootstrapCallback) {
bootstrapCallback();
});
//# sourceMappingURL=embed.js.map
Replicar el documento
https://interactive.guim.co.uk/2016/08/olympics-heptathlon-embeds/embed/embed.html Con el archivo embeds modificado, analiza la visualización interactiva y crea una réplica exacta de la gráfica usando web estática mobile first con HTML, sólo usando un documento HTML, no utilices frameworks. Permite agregar y editar atletas, nombres de atletas, los puntajes en cada disciplina, y agregar y editar disciplinas.
Estructura de datos explicada
ORIGINAL_DISCIPLINES:
- id: identificador de disciplina
- name: nombre de la disciplina
- unit: unidad de medida utilizada en la disciplina
- reverse: si es true a menor valor mejor posición, si es false a mayor valor mejor posición
ORIGINAL_ATHLETES:
- id: identificador de atleta
- name: nombre de atleta
- country: país de origen de atleta
- score: puntaje del atleta
- medal: medalla obtenida
- scores: es una estructura diccionario clave-valor con clave d0, d1, ... d6 disciplinas con sus valores
Estructura de datos generada (embebida en el HTML):
const ORIGINAL_DISCIPLINES = [
{ id: 'd0', name: '100m hurdles', unit: 's', reverse: true },
{ id: 'd1', name: 'High jump', unit: 'm', reverse: false },
{ id: 'd2', name: 'Shot put', unit: 'm', reverse: false },
{ id: 'd3', name: '200m run', unit: 's', reverse: true },
{ id: 'd4', name: 'Long jump', unit: 'm', reverse: false },
{ id: 'd5', name: 'Javelin throw',unit: 'm', reverse: false },
{ id: 'd6', name: '800m run', unit: 'mm:ss', reverse: true },
];
const ORIGINAL_ATHLETES = [
{ id:'a1', name:'Nafissatou Thiam', country:'BEL', score:6810, medal:'gold',
scores:{ d0:'13.32', d1:'1.98', d2:'14.74', d3:'24.61', d4:'6.58', d5:'47.70', d6:'2:17.01' }},
{ id:'a2', name:'Jessica Ennis-Hill', country:'GBR', score:6775, medal:'silver',
scores:{ d0:'12.84', d1:'1.89', d2:'14.28', d3:'23.49', d4:'6.51', d5:'46.83', d6:'2:12.55' }},
{ id:'a3', name:'Brianne Theisen Eaton', country:'CAN', score:6653, medal:'bronze',
scores:{ d0:'13.09', d1:'1.83', d2:'14.56', d3:'24.18', d4:'6.49', d5:'47.17', d6:'2:12.00' }},
{ id:'a4', name:'Laura Ikauniece-Admidina',country:'LAT', score:6617, medal:null,
scores:{ d0:'13.33', d1:'1.89', d2:'14.29', d3:'23.76', d4:'6.30', d5:'47.01', d6:'2:14.28' }},
{ id:'a5', name:'Carolin Schafer', country:'GER', score:6540, medal:null,
scores:{ d0:'13.12', d1:'1.83', d2:'14.33', d3:'23.99', d4:'6.23', d5:'52.07', d6:'2:09.54' }},
{ id:'a6', name:'Katarina Johnson-Thompson',country:'GBR',score:6523, medal:null,
scores:{ d0:'13.48', d1:'1.95', d2:'11.69', d3:'23.26', d4:'6.51', d5:'49.95', d6:'2:23.04' }},
{ id:'a7', name:'Yorgelis Rodriguez', country:'CUB', score:6481, medal:null,
scores:{ d0:'13.61', d1:'1.89', d2:'14.95', d3:'24.26', d4:'6.10', d5:'46.47', d6:'2:15.12' }},
{ id:'a8', name:'Gyorgyi Zsivoczky-Farkas',country:'HUN', score:6442, medal:null,
scores:{ d0:'13.79', d1:'1.86', d2:'16.36', d3:'25.77', d4:'6.31', d5:'45.97', d6:'2:13.47' }},
{ id:'a9', name:'Jennifer Oeser', country:'GER', score:6401, medal:null,
scores:{ d0:'13.69', d1:'1.77', d2:'15.33', d3:'24.99', d4:'6.55', d5:'53.70', d6:'2:14.84' }},
{ id:'a10',name:'Anouk Vetter', country:'NED', score:6394, medal:null,
scores:{ d0:'13.47', d1:'1.86', d2:'15.75', d3:'23.93', d4:'6.30', d5:'51.73', d6:'2:23.43' }},
{ id:'a11',name:'Antoinette Nana Djimou', country:'FRA', score:6383, medal:null,
scores:{ d0:'13.37', d1:'1.83', d2:'15.50', d3:'25.07', d4:'6.43', d5:'48.50', d6:'2:18.54' }},
{ id:'a12',name:'Barbara Nwaba', country:'USA', score:6309, medal:null,
scores:{ d0:'13.81', d1:'1.86', d2:'14.59', d3:'24.77', d4:'6.24', d5:'44.89', d6:'2:12.38' }},
{ id:'a13',name:'Nadine Broersen', country:'NED', score:6300, medal:null,
scores:{ d0:'13.56', d1:'1.89', d2:'14.51', d3:'24.94', d4:'6.20', d5:'47.64', d6:'2:17.66' }},
{ id:'a14',name:'Claudia Rath', country:'GER', score:6270, medal:null,
scores:{ d0:'13.63', d1:'1.83', d2:'14.65', d3:'24.48', d4:'6.55', d5:'43.28', d6:'2:17.47' }},
{ id:'a15',name:'Evelis Aguilar', country:'COL', score:6263, medal:null,
scores:{ d0:'13.84', d1:'1.80', d2:'16.18', d3:'24.12', d4:'6.18', d5:'44.43', d6:'2:15.54' }},
{ id:'a16',name:'Xenia Krizsan', country:'HUN', score:6257, medal:null,
scores:{ d0:'13.66', d1:'1.89', d2:'14.58', d3:'25.24', d4:'6.17', d5:'47.74', d6:'2:17.39' }},
{ id:'a17',name:'Kendell Williams', country:'USA', score:6221, medal:null,
scores:{ d0:'13.04', d1:'1.86', d2:'13.76', d3:'24.09', d4:'6.47', d5:'39.94', d6:'2:18.64' }},
{ id:'a18',name:'Heather Miller-Koch', country:'USA', score:6213, medal:null,
scores:{ d0:'13.56', d1:'1.83', d2:'13.20', d3:'24.97', d4:'6.33', d5:'49.57', d6:'2:13.89' }},
{ id:'a19',name:'Nadine Visser', country:'NED', score:6190, medal:null,
scores:{ d0:'13.02', d1:'1.74', d2:'12.54', d3:'24.34', d4:'6.35', d5:'42.32', d6:'2:18.09' }},
{ id:'a20',name:'Akela Jones', country:'BAR', score:6173, medal:null,
scores:{ d0:'13.00', d1:'1.80', d2:'13.43', d3:'24.35', d4:'6.46', d5:'37.92', d6:'2:17.97' }},
{ id:'a21',name:'Ivona Dadic', country:'AUT', score:6155, medal:null,
scores:{ d0:'13.84', d1:'1.86', d2:'14.52', d3:'24.60', d4:'6.01', d5:'47.58', d6:'2:17.28' }},
{ id:'a22',name:'Eliska Klucinova', country:'CZE', score:6077, medal:null,
scores:{ d0:'14.07', d1:'1.86', d2:'14.90', d3:'25.37', d4:'6.11', d5:'49.82', d6:'2:23.36' }},
{ id:'a23',name:'Vanessa Chefer', country:'BRA', score:6024, medal:null,
scores:{ d0:'14.24', d1:'1.77', d2:'14.01', d3:'24.11', d4:'6.21', d5:'42.06', d6:'2:17.97' }},
{ id:'a24',name:'Katerina Cachova', country:'CZE', score:5958, medal:null,
scores:{ d0:'13.19', d1:'1.83', d2:'12.53', d3:'24.32', d4:'5.97', d5:'47.73', d6:'2:23.41' }},
{ id:'a25',name:'Hanna Kasyanova', country:'UKR', score:5951, medal:null,
scores:{ d0:'13.66', d1:'1.77', d2:'14.28', d3:'24.60', d4:'5.97', d5:'44.79', d6:'2:22.57' }},
{ id:'a26',name:'Alysbeth Felix', country:'PUR', score:5805, medal:null,
scores:{ d0:'14.07', d1:'1.71', d2:'12.59', d3:'24.74', d4:'5.76', d5:'41.34', d6:'2:19.10' }},
{ id:'a27',name:'Sofia Yfantidou', country:'GRE', score:5613, medal:null,
scores:{ d0:'13.99', d1:'1.68', d2:'13.24', d3:'25.38', d4:'5.97', d5:'35.33', d6:'2:20.18' }},
{ id:'a28',name:'Alina Fodorova', country:'UKR', score:5038, medal:null,
scores:{ d0:'14.10', d1:'1.68', d2:'12.23', d3:'26.33', d4:'5.63', d5:'41.90', d6:'2:28.57' }},
{ id:'a29',name:'Uhunoma Osazuwa', country:'NGR', score:4916, medal:null,
scores:{ d0:'13.75', d1:'1.62', d2:'11.10', d3:'24.67', d4:'5.50', d5:'42.63', d6:'2:47.43' }},
{ id:'a30',name:'Ekaterina Voronina', country:'UZB', score:null, medal:null,
scores:{ d0:'15.21', d1:null, d2:null, d3:null, d4:null, d5:null, d6:null }},
{ id:'a31',name:'Grit Sadeiko', country:'EST', score:null, medal:null,
scores:{ d0:null, d1:null, d2:null, d3:null, d4:null, d5:null, d6:null }},
];
Resultado (HTML completo)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Heptathlon · Rio 2016</title>
<style>
/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--gold: #c9a84c;
--silver: #9ba7b0;
--bronze: #b5622a;
--hl: #e8193a;
--bg: #f6f4f0;
--panel: #ffffff;
--ink: #1a1a1a;
--muted: #767676;
--line: #ddd8d0;
--blue: #0084c6;
--dot: #0084c6;
--dot-r: 5px;
--axis: #bbb4a8;
--font-head: 'Georgia', 'Times New Roman', serif;
--font-ui: 'Helvetica Neue', Helvetica, Arial, sans-serif;
--transition: 180ms ease;
}
html { font-size: 16px; background: var(--bg); }
body { font-family: var(--font-ui); color: var(--ink); min-height: 100vh; }
/* ── LAYOUT ───────────────────────────────────────────────── */
.app-wrapper { max-width: 860px; margin: 0 auto; padding: 0 0 60px; }
.app-header {
background: #052962;
color: #fff;
padding: 18px 16px 14px;
border-bottom: 3px solid var(--gold);
}
.app-header h1 {
font-family: var(--font-head);
font-size: clamp(1.15rem, 4vw, 1.6rem);
font-weight: 700;
letter-spacing: -.01em;
line-height: 1.2;
}
.app-header p {
font-size: .78rem;
color: rgba(255,255,255,.7);
margin-top: 4px;
}
/* ── SELECT BAR ───────────────────────────────────────────── */
.select-bar {
background: #fff;
border-bottom: 1px solid var(--line);
padding: 10px 14px;
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.select-bar label { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.select-bar select {
flex: 1 1 160px;
font-family: var(--font-ui);
font-size: .84rem;
border: 1px solid var(--line);
border-radius: 3px;
padding: 6px 8px;
background: #fff;
color: var(--ink);
cursor: pointer;
min-width: 0;
}
.select-bar select:focus { outline: 2px solid var(--blue); }
.select-bar select.medal-gold { border-color: var(--gold); color: var(--gold); }
.select-bar select.medal-silver { border-color: var(--silver); color: var(--silver); }
.select-bar select.medal-bronze { border-color: var(--bronze); color: var(--bronze); }
/* ── CHART CONTAINER ──────────────────────────────────────── */
.chart-outer {
background: var(--panel);
overflow-x: auto;
-webkit-overflow-scrolling: touch;
border-bottom: 1px solid var(--line);
}
.chart-svg { display: block; width: 100%; overflow: visible; }
/* SVG elements */
.axis-line { stroke: var(--axis); stroke-width: 1.5px; }
.disc-title { font-family: var(--font-ui); font-size: 11px; fill: var(--muted); }
.legend-txt { font-family: var(--font-ui); font-size: 10px; fill: var(--muted); }
.result-dot { r: var(--dot-r); fill: var(--dot); transition: r var(--transition); cursor: pointer; }
.result-dot.medal-gold { fill: var(--gold); }
.result-dot.medal-silver { fill: var(--silver); }
.result-dot.medal-bronze { fill: var(--bronze); }
.result-dot.hl { r: 9px; }
.result-label {
font-family: var(--font-ui); font-size: 10.5px; fill: var(--ink);
opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.result-label.hl { opacity: 1; }
.conn-path {
fill: none; stroke: var(--dot); stroke-width: 1.5px;
opacity: 0; pointer-events: none; transition: opacity var(--transition);
stroke-linejoin: round; stroke-linecap: round;
}
.conn-path.hl { opacity: .85; }
.conn-path.medal-gold { stroke: var(--gold); }
.conn-path.medal-silver { stroke: var(--silver); }
.conn-path.medal-bronze { stroke: var(--bronze); }
.voronoi-cell { fill: transparent; cursor: pointer; }
/* ── RESULTS TABLE ────────────────────────────────────────── */
.results-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
thead tr { border-bottom: 2px solid var(--ink); }
thead th {
text-align: left; font-weight: 700; font-size: .72rem;
text-transform: uppercase; letter-spacing: .06em;
padding: 8px 10px; color: var(--muted);
}
tbody tr {
border-bottom: 1px solid var(--line);
cursor: pointer;
transition: background var(--transition);
}
tbody tr:hover, tbody tr.hl { background: #eaf4fb; }
tbody tr.medal-gold { border-left: 3px solid var(--gold); }
tbody tr.medal-silver { border-left: 3px solid var(--silver); }
tbody tr.medal-bronze { border-left: 3px solid var(--bronze); }
tbody tr.no-medal { border-left: 3px solid transparent; }
td { padding: 7px 10px; vertical-align: middle; }
.td-rank { width: 36px; font-weight: 700; color: var(--muted); font-size: .78rem; }
.td-athlete { font-weight: 600; }
.td-country { color: var(--muted); font-size: .78rem; margin-left: 4px; }
.td-score { font-weight: 700; text-align: right; min-width: 52px; }
.medal-pip {
display: inline-block; width: 10px; height: 10px;
border-radius: 50%; vertical-align: middle; margin-right: 2px;
}
.medal-pip.gold { background: var(--gold); }
.medal-pip.silver { background: var(--silver); }
.medal-pip.bronze { background: var(--bronze); }
/* ── EDIT PANEL ───────────────────────────────────────────── */
.edit-toggle-bar {
background: #052962; color: #fff;
display: flex; align-items: center; justify-content: space-between;
padding: 10px 14px; cursor: pointer; user-select: none;
border-top: 3px solid var(--gold);
margin-top: 24px;
}
.edit-toggle-bar span { font-size: .84rem; font-weight: 600; letter-spacing: .04em; }
.edit-toggle-bar .toggle-icon { font-size: 1rem; transition: transform .25s; }
.edit-toggle-bar.open .toggle-icon { transform: rotate(180deg); }
.edit-panel {
background: var(--panel);
border: 1px solid var(--line);
display: none;
padding: 16px;
}
.edit-panel.open { display: block; }
.edit-section-title {
font-size: .72rem; font-weight: 700; text-transform: uppercase;
letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px;
padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.edit-section-title:first-child { margin-top: 0; }
/* Disciplines editor */
.disc-editor { display: flex; flex-direction: column; gap: 6px; }
.disc-row {
display: flex; align-items: center; gap: 6px;
background: var(--bg); border-radius: 4px; padding: 6px 8px;
}
.disc-row input {
font-family: var(--font-ui); font-size: .82rem;
border: 1px solid var(--line); border-radius: 3px; padding: 4px 7px;
background: #fff; width: 140px; flex-shrink: 0;
}
.disc-row .disc-type {
font-size: .75rem; color: var(--muted);
background: #eee; border-radius: 3px; padding: 3px 7px;
}
.disc-row select {
font-size: .78rem; border: 1px solid var(--line); border-radius: 3px;
padding: 4px 6px; background: #fff; color: var(--ink);
}
.disc-row .drag-handle { cursor: grab; color: var(--muted); font-size: 1rem; flex-shrink: 0; }
.disc-row .del-btn {
margin-left: auto; background: none; border: none; cursor: pointer;
color: #c00; font-size: 1.1rem; padding: 2px 6px; border-radius: 3px;
flex-shrink: 0;
}
.disc-row .del-btn:hover { background: #fee; }
.disc-row input:focus, .disc-row select:focus { outline: 2px solid var(--blue); }
/* Athletes editor */
.athletes-editor { display: flex; flex-direction: column; gap: 8px; }
.athlete-edit-row {
background: var(--bg); border-radius: 4px; padding: 8px;
border-left: 3px solid transparent;
}
.athlete-edit-row.medal-gold { border-left-color: var(--gold); }
.athlete-edit-row.medal-silver { border-left-color: var(--silver); }
.athlete-edit-row.medal-bronze { border-left-color: var(--bronze); }
.athlete-edit-header {
display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
margin-bottom: 6px;
}
.athlete-edit-header input {
font-family: var(--font-ui); font-size: .82rem;
border: 1px solid var(--line); border-radius: 3px; padding: 5px 8px;
background: #fff;
}
.athlete-edit-header .inp-name { flex: 1 1 110px; min-width: 80px; font-weight: 600; }
.athlete-edit-header .inp-country { width: 54px; text-transform: uppercase; }
.athlete-edit-header .inp-score { width: 60px; }
.medal-select {
font-size: .78rem; border: 1px solid var(--line); border-radius: 3px;
padding: 4px 6px; background: #fff; color: var(--ink);
}
.athlete-scores-grid {
display: grid; gap: 4px 8px;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.score-field { display: flex; flex-direction: column; gap: 2px; }
.score-field label { font-size: .68rem; color: var(--muted); }
.score-field input {
font-family: var(--font-ui); font-size: .8rem;
border: 1px solid var(--line); border-radius: 3px; padding: 4px 7px;
background: #fff; width: 100%;
}
.score-field input:focus, .athlete-edit-header input:focus,
.medal-select:focus { outline: 2px solid var(--blue); }
.athlete-del-btn {
background: none; border: none; cursor: pointer;
color: #c00; font-size: 1.1rem; padding: 2px 6px;
border-radius: 3px; margin-left: auto; flex-shrink: 0;
}
.athlete-del-btn:hover { background: #fee; }
/* Buttons */
.btn {
font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
border: 1.5px solid currentColor; border-radius: 3px;
padding: 7px 14px; cursor: pointer; transition: background var(--transition);
display: inline-flex; align-items: center; gap: 5px;
}
.btn-primary { background: #052962; color: #fff; border-color: #052962; }
.btn-primary:hover { background: #083a8c; }
.btn-secondary { background: #fff; color: #052962; border-color: #052962; }
.btn-secondary:hover { background: #eaf4fb; }
.btn-danger { background: #fff; color: #c00; border-color: #c00; }
.btn-danger:hover { background: #fee; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* Dragging */
.disc-row.drag-over { outline: 2px dashed var(--blue); }
/* Mobile tweaks */
@media (max-width: 480px) {
.athlete-edit-header .inp-name { flex: 1 1 100%; }
.athlete-scores-grid { grid-template-columns: repeat(2, 1fr); }
.disc-row input { width: 110px; }
}
</style>
</head>
<body>
<div class="app-wrapper">
<!-- HEADER -->
<header class="app-header">
<h1>Women's heptathlon – Rio 2016</h1>
<p>How the athletes performed across all seven disciplines</p>
</header>
<!-- ATHLETE SELECTOR -->
<div class="select-bar">
<label for="athleteSelect">Highlight athlete:</label>
<select id="athleteSelect"></select>
</div>
<!-- CHART -->
<div class="chart-outer">
<svg class="chart-svg" id="chartSvg"></svg>
</div>
<!-- RESULTS TABLE -->
<div class="results-table-wrap">
<table id="resultsTable">
<thead>
<tr>
<th class="td-rank">Rank</th>
<th>Athlete</th>
<th class="td-score" style="text-align:right">Score</th>
</tr>
</thead>
<tbody id="tableBody"></tbody>
</table>
</div>
<!-- EDIT PANEL TOGGLE -->
<div class="edit-toggle-bar" id="editToggle">
<span>✏ Edit data</span>
<span class="toggle-icon">▼</span>
</div>
<!-- EDIT PANEL -->
<div class="edit-panel" id="editPanel">
<div class="edit-section-title">Disciplines</div>
<div class="disc-editor" id="discEditor"></div>
<div class="action-row">
<button class="btn btn-secondary" id="addDiscBtn">+ Add discipline</button>
</div>
<div class="edit-section-title">Athletes</div>
<div class="athletes-editor" id="athletesEditor"></div>
<div class="action-row">
<button class="btn btn-secondary" id="addAthleteBtn">+ Add athlete</button>
</div>
<div class="action-row" style="margin-top:18px; border-top:1px solid var(--line); padding-top:14px;">
<button class="btn btn-primary" id="applyBtn">Apply changes</button>
<button class="btn btn-danger" id="resetBtn">Reset to original</button>
</div>
</div>
</div><!-- .app-wrapper -->
<script>
'use strict';
// ════════════════════════════════════════════════════════
// DATA
// ════════════════════════════════════════════════════════
const ORIGINAL_DISCIPLINES = [
{ id: 'd0', name: '100m hurdles', unit: 's', reverse: true },
{ id: 'd1', name: 'High jump', unit: 'm', reverse: false },
{ id: 'd2', name: 'Shot put', unit: 'm', reverse: false },
{ id: 'd3', name: '200m run', unit: 's', reverse: true },
{ id: 'd4', name: 'Long jump', unit: 'm', reverse: false },
{ id: 'd5', name: 'Javelin throw',unit: 'm', reverse: false },
{ id: 'd6', name: '800m run', unit: 'mm:ss', reverse: true },
];
// scores keyed by discipline id
const ORIGINAL_ATHLETES = [
{ id:'a1', name:'Nafissatou Thiam', country:'BEL', score:6810, medal:'gold',
scores:{ d0:'13.32', d1:'1.98', d2:'14.74', d3:'24.61', d4:'6.58', d5:'47.70', d6:'2:17.01' }},
{ id:'a2', name:'Jessica Ennis-Hill', country:'GBR', score:6775, medal:'silver',
scores:{ d0:'12.84', d1:'1.89', d2:'14.28', d3:'23.49', d4:'6.51', d5:'46.83', d6:'2:12.55' }},
{ id:'a3', name:'Brianne Theisen Eaton', country:'CAN', score:6653, medal:'bronze',
scores:{ d0:'13.09', d1:'1.83', d2:'14.56', d3:'24.18', d4:'6.49', d5:'47.17', d6:'2:12.00' }},
{ id:'a4', name:'Laura Ikauniece-Admidina',country:'LAT', score:6617, medal:null,
scores:{ d0:'13.33', d1:'1.89', d2:'14.29', d3:'23.76', d4:'6.30', d5:'47.01', d6:'2:14.28' }},
{ id:'a5', name:'Carolin Schafer', country:'GER', score:6540, medal:null,
scores:{ d0:'13.12', d1:'1.83', d2:'14.33', d3:'23.99', d4:'6.23', d5:'52.07', d6:'2:09.54' }},
{ id:'a6', name:'Katarina Johnson-Thompson',country:'GBR',score:6523, medal:null,
scores:{ d0:'13.48', d1:'1.95', d2:'11.69', d3:'23.26', d4:'6.51', d5:'49.95', d6:'2:23.04' }},
{ id:'a7', name:'Yorgelis Rodriguez', country:'CUB', score:6481, medal:null,
scores:{ d0:'13.61', d1:'1.89', d2:'14.95', d3:'24.26', d4:'6.10', d5:'46.47', d6:'2:15.12' }},
{ id:'a8', name:'Gyorgyi Zsivoczky-Farkas',country:'HUN', score:6442, medal:null,
scores:{ d0:'13.79', d1:'1.86', d2:'16.36', d3:'25.77', d4:'6.31', d5:'45.97', d6:'2:13.47' }},
{ id:'a9', name:'Jennifer Oeser', country:'GER', score:6401, medal:null,
scores:{ d0:'13.69', d1:'1.77', d2:'15.33', d3:'24.99', d4:'6.55', d5:'53.70', d6:'2:14.84' }},
{ id:'a10',name:'Anouk Vetter', country:'NED', score:6394, medal:null,
scores:{ d0:'13.47', d1:'1.86', d2:'15.75', d3:'23.93', d4:'6.30', d5:'51.73', d6:'2:23.43' }},
{ id:'a11',name:'Antoinette Nana Djimou', country:'FRA', score:6383, medal:null,
scores:{ d0:'13.37', d1:'1.83', d2:'15.50', d3:'25.07', d4:'6.43', d5:'48.50', d6:'2:18.54' }},
{ id:'a12',name:'Barbara Nwaba', country:'USA', score:6309, medal:null,
scores:{ d0:'13.81', d1:'1.86', d2:'14.59', d3:'24.77', d4:'6.24', d5:'44.89', d6:'2:12.38' }},
{ id:'a13',name:'Nadine Broersen', country:'NED', score:6300, medal:null,
scores:{ d0:'13.56', d1:'1.89', d2:'14.51', d3:'24.94', d4:'6.20', d5:'47.64', d6:'2:17.66' }},
{ id:'a14',name:'Claudia Rath', country:'GER', score:6270, medal:null,
scores:{ d0:'13.63', d1:'1.83', d2:'14.65', d3:'24.48', d4:'6.55', d5:'43.28', d6:'2:17.47' }},
{ id:'a15',name:'Evelis Aguilar', country:'COL', score:6263, medal:null,
scores:{ d0:'13.84', d1:'1.80', d2:'16.18', d3:'24.12', d4:'6.18', d5:'44.43', d6:'2:15.54' }},
{ id:'a16',name:'Xenia Krizsan', country:'HUN', score:6257, medal:null,
scores:{ d0:'13.66', d1:'1.89', d2:'14.58', d3:'25.24', d4:'6.17', d5:'47.74', d6:'2:17.39' }},
{ id:'a17',name:'Kendell Williams', country:'USA', score:6221, medal:null,
scores:{ d0:'13.04', d1:'1.86', d2:'13.76', d3:'24.09', d4:'6.47', d5:'39.94', d6:'2:18.64' }},
{ id:'a18',name:'Heather Miller-Koch', country:'USA', score:6213, medal:null,
scores:{ d0:'13.56', d1:'1.83', d2:'13.20', d3:'24.97', d4:'6.33', d5:'49.57', d6:'2:13.89' }},
{ id:'a19',name:'Nadine Visser', country:'NED', score:6190, medal:null,
scores:{ d0:'13.02', d1:'1.74', d2:'12.54', d3:'24.34', d4:'6.35', d5:'42.32', d6:'2:18.09' }},
{ id:'a20',name:'Akela Jones', country:'BAR', score:6173, medal:null,
scores:{ d0:'13.00', d1:'1.80', d2:'13.43', d3:'24.35', d4:'6.46', d5:'37.92', d6:'2:17.97' }},
{ id:'a21',name:'Ivona Dadic', country:'AUT', score:6155, medal:null,
scores:{ d0:'13.84', d1:'1.86', d2:'14.52', d3:'24.60', d4:'6.01', d5:'47.58', d6:'2:17.28' }},
{ id:'a22',name:'Eliska Klucinova', country:'CZE', score:6077, medal:null,
scores:{ d0:'14.07', d1:'1.86', d2:'14.90', d3:'25.37', d4:'6.11', d5:'49.82', d6:'2:23.36' }},
{ id:'a23',name:'Vanessa Chefer', country:'BRA', score:6024, medal:null,
scores:{ d0:'14.24', d1:'1.77', d2:'14.01', d3:'24.11', d4:'6.21', d5:'42.06', d6:'2:17.97' }},
{ id:'a24',name:'Katerina Cachova', country:'CZE', score:5958, medal:null,
scores:{ d0:'13.19', d1:'1.83', d2:'12.53', d3:'24.32', d4:'5.97', d5:'47.73', d6:'2:23.41' }},
{ id:'a25',name:'Hanna Kasyanova', country:'UKR', score:5951, medal:null,
scores:{ d0:'13.66', d1:'1.77', d2:'14.28', d3:'24.60', d4:'5.97', d5:'44.79', d6:'2:22.57' }},
{ id:'a26',name:'Alysbeth Felix', country:'PUR', score:5805, medal:null,
scores:{ d0:'14.07', d1:'1.71', d2:'12.59', d3:'24.74', d4:'5.76', d5:'41.34', d6:'2:19.10' }},
{ id:'a27',name:'Sofia Yfantidou', country:'GRE', score:5613, medal:null,
scores:{ d0:'13.99', d1:'1.68', d2:'13.24', d3:'25.38', d4:'5.97', d5:'35.33', d6:'2:20.18' }},
{ id:'a28',name:'Alina Fodorova', country:'UKR', score:5038, medal:null,
scores:{ d0:'14.10', d1:'1.68', d2:'12.23', d3:'26.33', d4:'5.63', d5:'41.90', d6:'2:28.57' }},
{ id:'a29',name:'Uhunoma Osazuwa', country:'NGR', score:4916, medal:null,
scores:{ d0:'13.75', d1:'1.62', d2:'11.10', d3:'24.67', d4:'5.50', d5:'42.63', d6:'2:47.43' }},
{ id:'a30',name:'Ekaterina Voronina', country:'UZB', score:null, medal:null,
scores:{ d0:'15.21', d1:null, d2:null, d3:null, d4:null, d5:null, d6:null }},
{ id:'a31',name:'Grit Sadeiko', country:'EST', score:null, medal:null,
scores:{ d0:null, d1:null, d2:null, d3:null, d4:null, d5:null, d6:null }},
];
// ════════════════════════════════════════════════════════
// STATE
// ════════════════════════════════════════════════════════
let disciplines = deepClone(ORIGINAL_DISCIPLINES);
let athletes = deepClone(ORIGINAL_ATHLETES);
let activeId = athletes[0].id; // highlighted athlete
// ════════════════════════════════════════════════════════
// UTILITIES
// ════════════════════════════════════════════════════════
function deepClone(x) { return JSON.parse(JSON.stringify(x)); }
function uid() { return 'id_' + Math.random().toString(36).slice(2, 9); }
/** Parse a value to a numeric float for scaling purposes */
function parseVal(str, unit) {
if (!str) return null;
if (unit === 'mm:ss') {
const parts = String(str).split(':');
if (parts.length < 2) return parseFloat(str);
return parseInt(parts[0]) * 60 + parseFloat(parts[1]);
}
return parseFloat(str);
}
/** Format a value for display labels */
function fmtVal(str, unit, allVals) {
if (!str) return '';
if (unit === 'mm:ss') {
const num = parseVal(str, unit);
const best = Math.min(...allVals.filter(v=>v!=null).map(v=>parseVal(v, unit)));
const delta = num - best;
return delta > 0 ? `${str} (+${(delta % 60).toFixed(2)})` : str;
} else {
const num = parseFloat(str);
const best = Math.min(...allVals.filter(v=>v!=null).map(v=>parseFloat(v)));
const delta = num - best;
if (unit === 'm') return delta > 0 ? `${str}m` : `${str}m`;
return delta > 0 ? `${str}s (+${delta.toFixed(2)})` : `${str}s`;
}
}
/** Linear scale: maps [dMin, dMax] → [rMin, rMax] */
function makeScale(dMin, dMax, rMin, rMax) {
const dRange = dMax - dMin || 1;
return v => rMin + (v - dMin) / dRange * (rMax - rMin);
}
// ════════════════════════════════════════════════════════
// SVG HELPERS
// ════════════════════════════════════════════════════════
const SVG_NS = 'http://www.w3.org/2000/svg';
function svgEl(tag, attrs = {}) {
const el = document.createElementNS(SVG_NS, tag);
for (const [k, v] of Object.entries(attrs)) el.setAttribute(k, v);
return el;
}
// ════════════════════════════════════════════════════════
// CHART RENDERING
// ════════════════════════════════════════════════════════
const ROW_H = 100; // height per discipline row
const MARGIN_L = 12;
const MARGIN_R = 12;
const LABEL_PAD_DESKTOP = 96; // left padding for axis start
const LABEL_PAD_MOBILE = 72;
function isMobile() { return window.innerWidth < 640; }
function render() {
renderSelect();
renderChart();
renderTable();
}
/* ── ATHLETE SELECT ── */
function renderSelect() {
const sel = document.getElementById('athleteSelect');
const prev = sel.value;
sel.innerHTML = '';
for (const a of athletes) {
const opt = document.createElement('option');
opt.value = a.id;
opt.textContent = a.rank ? `${a.rank}. ${a.name} (${a.country})` : `${a.name} (${a.country})`;
if (a.medal) opt.className = 'medal-' + a.medal;
sel.appendChild(opt);
}
// restore or default
const ids = athletes.map(a=>a.id);
sel.value = ids.includes(prev) ? prev : (ids.includes(activeId) ? activeId : ids[0]);
activeId = sel.value;
updateSelectStyle();
}
function updateSelectStyle() {
const sel = document.getElementById('athleteSelect');
const a = athletes.find(a=>a.id===sel.value);
sel.className = a && a.medal ? 'medal-'+a.medal : '';
}
/* ── CHART ── */
function renderChart() {
const svg = document.getElementById('chartSvg');
svg.innerHTML = '';
const lp = isMobile() ? LABEL_PAD_MOBILE : LABEL_PAD_DESKTOP;
const W = Math.max(svg.clientWidth || 340, 320);
const numDiscs = disciplines.length;
const H = ROW_H * numDiscs;
svg.setAttribute('viewBox', `0 0 ${W} ${H}`);
svg.setAttribute('height', H);
svg.style.minWidth = '300px';
// For each discipline draw row
disciplines.forEach((disc, di) => {
const yMid = di * ROW_H + ROW_H / 2;
const xMin = MARGIN_L + lp;
const xMax = W - MARGIN_R - 12;
// gather numeric values for this discipline
const vals = athletes.map(a => parseVal(a.scores?.[disc.id], disc.unit));
const validVals = vals.filter(v => v != null);
if (!validVals.length) validVals.push(0, 1);
const dMin = Math.min(...validVals);
const dMax = Math.max(...validVals);
const scale = disc.reverse
? makeScale(dMin, dMax, xMax, xMin)
: makeScale(dMin, dMax, xMin, xMax);
// Axis line
const axisLine = svgEl('line', {
x1: xMin, y1: yMid, x2: xMax, y2: yMid,
class: 'axis-line'
});
svg.appendChild(axisLine);
// Discipline title
const title = svgEl('text', {
x: 10, y: yMid - 8, class: 'disc-title',
'dominant-baseline': 'auto'
});
title.textContent = disc.name;
svg.appendChild(title);
// Legend (← worse / better →) — only first row
if (di === 0) {
const tw = svgEl('text', { class:'legend-txt', 'text-anchor':'end' });
tw.setAttribute('x', disc.reverse ? xMax + 30 : xMin - 4);
tw.setAttribute('y', yMid - 24);
tw.textContent = '← worse';
svg.appendChild(tw);
const tb = svgEl('text', { class:'legend-txt', 'text-anchor':'start' });
tb.setAttribute('x', disc.reverse ? xMin - 4 : xMax - 30);
tb.setAttribute('y', yMid - 24);
tb.textContent = 'better →';
svg.appendChild(tb);
}
// Dots + labels for each athlete
athletes.forEach((a) => {
const rawVal = a.scores?.[disc.id];
const num = parseVal(rawVal, disc.unit);
if (num == null) return;
const cx = scale(num);
const isActive = a.id === activeId;
// dot
const cls = ['result-dot', a.medal ? 'medal-'+a.medal : '', isActive ? 'hl' : ''].filter(Boolean).join(' ');
const dot = svgEl('circle', {
cx, cy: yMid, r: isActive ? 9 : 5,
class: cls,
'data-aid': a.id,
'data-did': disc.id,
});
svg.appendChild(dot);
// label
if (rawVal) {
const allDiscVals = athletes.map(b => b.scores?.[disc.id]).filter(Boolean);
const labelTxt = fmtVal(rawVal, disc.unit, allDiscVals);
const anchor = cx > W / 2 ? 'end' : 'start';
const dx = cx > W / 2 ? -10 : 10;
const lbl = svgEl('text', {
x: cx + dx, y: yMid + 30,
class: 'result-label' + (isActive ? ' hl' : ''),
'text-anchor': anchor,
'dominant-baseline': 'auto',
'data-aid': a.id,
'data-did': disc.id,
});
lbl.textContent = isActive ? labelTxt : '';
if (isActive) lbl.textContent = disc.unit === 'm'
? rawVal + 'm'
: disc.unit === 'mm:ss'
? rawVal
: rawVal + 's';
svg.appendChild(lbl);
}
});
}); // end disciplines loop
// ── CONNECTING PATHS ──────────────────────────────────────
// Compute dot positions for active athlete across disciplines
athletes.forEach(a => {
const lp2 = isMobile() ? LABEL_PAD_MOBILE : LABEL_PAD_DESKTOP;
const xMin0 = MARGIN_L + lp2;
const xMax0 = W - MARGIN_R - 12;
const isActive = a.id === activeId;
const points = disciplines.map((disc, di) => {
const num = parseVal(a.scores?.[disc.id], disc.unit);
if (num == null) return null;
const vals = athletes.map(b => parseVal(b.scores?.[disc.id], disc.unit)).filter(v=>v!=null);
const dMin = Math.min(...vals), dMax = Math.max(...vals);
const scale = disc.reverse
? makeScale(dMin, dMax, xMax0, xMin0)
: makeScale(dMin, dMax, xMin0, xMax0);
return { x: scale(num), y: di * ROW_H + ROW_H / 2, di };
});
// Build SVG path through non-null points (stepped horizontal midpoints)
const nonNull = points.filter(p => p != null);
if (nonNull.length < 2) return;
let d = '';
for (let i = 0; i < nonNull.length; i++) {
const pt = nonNull[i];
if (i === 0) {
d += `M ${pt.x} ${pt.y}`;
} else {
const prev = nonNull[i-1];
const midY = (prev.y + pt.y) / 2;
// Horizontal step: go down to midpoint, across, then down to next dot
d += ` L ${prev.x} ${midY} L ${pt.x} ${midY} L ${pt.x} ${pt.y}`;
}
}
const medalClass = a.medal ? 'medal-'+a.medal : '';
const path = svgEl('path', {
d,
class: ['conn-path', medalClass, isActive ? 'hl' : ''].filter(Boolean).join(' '),
'data-aid': a.id,
});
svg.appendChild(path);
});
// ── VORONOI-LIKE HIT AREAS ─────────────────────────────────
// Use transparent rects + event delegation for simplicity
disciplines.forEach((disc, di) => {
const lp3 = isMobile() ? LABEL_PAD_MOBILE : LABEL_PAD_DESKTOP;
const xMin = MARGIN_L + lp3;
const xMax = W - MARGIN_R - 12;
const yTop = di * ROW_H;
const yMid = di * ROW_H + ROW_H / 2;
const vals = athletes.map(a => parseVal(a.scores?.[disc.id], disc.unit));
const valid = vals.filter(v=>v!=null);
if (!valid.length) return;
const dMin = Math.min(...valid), dMax = Math.max(...valid);
const scale = disc.reverse
? makeScale(dMin, dMax, xMax, xMin)
: makeScale(dMin, dMax, xMin, xMax);
// Place invisible hit rects near each athlete dot
athletes.forEach(a => {
const num = parseVal(a.scores?.[disc.id], disc.unit);
if (num == null) return;
const cx = scale(num);
const hit = svgEl('rect', {
x: cx - 22, y: yTop,
width: 44, height: ROW_H,
class: 'voronoi-cell',
'data-aid': a.id,
});
hit.addEventListener('mouseenter', () => setActive(a.id));
hit.addEventListener('click', () => setActive(a.id));
hit.addEventListener('touchstart', (e) => { e.preventDefault(); setActive(a.id); });
svg.appendChild(hit);
});
});
}
/* ── TABLE ── */
function renderTable() {
const tbody = document.getElementById('tableBody');
tbody.innerHTML = '';
// Sort by score desc (nulls last)
const sorted = [...athletes].sort((a,b) => {
if (a.score == null && b.score == null) return 0;
if (a.score == null) return 1;
if (b.score == null) return -1;
return b.score - a.score;
});
sorted.forEach((a, i) => {
const tr = document.createElement('tr');
tr.dataset.aid = a.id;
const medalClass = a.medal ? 'medal-'+a.medal : 'no-medal';
tr.className = medalClass + (a.id === activeId ? ' hl' : '');
const rankTd = document.createElement('td');
rankTd.className = 'td-rank';
if (a.medal) {
const pip = document.createElement('span');
pip.className = 'medal-pip ' + a.medal;
rankTd.appendChild(pip);
} else if (a.score != null) {
rankTd.textContent = (i+1) + '.';
} else {
rankTd.textContent = 'DNF';
}
const nameTd = document.createElement('td');
nameTd.innerHTML = `<span class="td-athlete">${a.name}</span><span class="td-country">${a.country}</span>`;
const scoreTd = document.createElement('td');
scoreTd.className = 'td-score';
scoreTd.textContent = a.score != null ? a.score.toLocaleString() : '—';
tr.appendChild(rankTd);
tr.appendChild(nameTd);
tr.appendChild(scoreTd);
tr.addEventListener('mouseenter', () => setActive(a.id));
tr.addEventListener('click', () => setActive(a.id));
tbody.appendChild(tr);
});
}
// ════════════════════════════════════════════════════════
// HIGHLIGHT LOGIC
// ════════════════════════════════════════════════════════
function setActive(id) {
if (activeId === id) return;
activeId = id;
// Update select
const sel = document.getElementById('athleteSelect');
sel.value = id;
updateSelectStyle();
// Update SVG dots
document.querySelectorAll('.result-dot').forEach(el => {
const isAct = el.dataset.aid === id;
el.setAttribute('r', isAct ? 9 : 5);
el.classList.toggle('hl', isAct);
});
// Update labels
document.querySelectorAll('.result-label').forEach(el => {
const isAct = el.dataset.aid === id;
el.classList.toggle('hl', isAct);
if (!isAct) el.textContent = '';
else {
// re-set text
const disc = disciplines.find(d => d.id === el.dataset.did);
const a = athletes.find(a => a.id === id);
if (disc && a) {
const raw = a.scores?.[disc.id];
if (raw) {
el.textContent = disc.unit === 'm'
? raw + 'm'
: disc.unit === 'mm:ss'
? raw
: raw + 's';
}
}
}
});
// Update connecting paths
document.querySelectorAll('.conn-path').forEach(el => {
el.classList.toggle('hl', el.dataset.aid === id);
});
// Update table rows
document.querySelectorAll('#tableBody tr').forEach(tr => {
tr.classList.toggle('hl', tr.dataset.aid === id);
});
}
// ════════════════════════════════════════════════════════
// EDIT PANEL
// ════════════════════════════════════════════════════════
function renderEditPanel() {
renderDiscEditor();
renderAthletesEditor();
}
/* ── DISCIPLINES EDITOR ── */
function renderDiscEditor() {
const container = document.getElementById('discEditor');
container.innerHTML = '';
disciplines.forEach((disc, i) => {
const row = document.createElement('div');
row.className = 'disc-row';
row.draggable = true;
row.dataset.idx = i;
row.innerHTML = `
<span class="drag-handle" title="Drag to reorder">⠿</span>
<input type="text" class="disc-name-inp" value="${esc(disc.name)}" placeholder="Discipline name">
<select class="disc-unit-sel">
<option value="s" ${disc.unit==='s'?'selected':''}>seconds (s)</option>
<option value="m" ${disc.unit==='m'?'selected':''}>metres (m)</option>
<option value="mm:ss"${disc.unit==='mm:ss'?'selected':''}>min:sec</option>
</select>
<label style="font-size:.76rem;color:var(--muted);white-space:nowrap;">
<input type="checkbox" class="disc-rev-chk" ${disc.reverse?'checked':''}> lower=worse
</label>
<button class="del-btn" title="Delete discipline">×</button>
`;
// events
row.querySelector('.disc-name-inp').addEventListener('input', e => {
disciplines[i].name = e.target.value;
});
row.querySelector('.disc-unit-sel').addEventListener('change', e => {
disciplines[i].unit = e.target.value;
});
row.querySelector('.disc-rev-chk').addEventListener('change', e => {
disciplines[i].reverse = e.target.checked;
});
row.querySelector('.del-btn').addEventListener('click', () => {
disciplines.splice(i, 1);
renderDiscEditor();
});
// drag-and-drop reordering
row.addEventListener('dragstart', e => {
e.dataTransfer.setData('text/plain', i);
row.style.opacity = '.4';
});
row.addEventListener('dragend', () => { row.style.opacity = ''; });
row.addEventListener('dragover', e => { e.preventDefault(); row.classList.add('drag-over'); });
row.addEventListener('dragleave', () => { row.classList.remove('drag-over'); });
row.addEventListener('drop', e => {
e.preventDefault();
row.classList.remove('drag-over');
const from = parseInt(e.dataTransfer.getData('text/plain'));
const to = i;
if (from === to) return;
const [moved] = disciplines.splice(from, 1);
disciplines.splice(to, 0, moved);
renderDiscEditor();
});
container.appendChild(row);
});
}
/* ── ATHLETES EDITOR ── */
function renderAthletesEditor() {
const container = document.getElementById('athletesEditor');
container.innerHTML = '';
athletes.forEach((a, ai) => {
const row = document.createElement('div');
row.className = 'athlete-edit-row' + (a.medal ? ' medal-'+a.medal : '');
// Scores inputs
const scoresHTML = disciplines.map(disc => `
<div class="score-field">
<label>${esc(disc.name)}</label>
<input type="text" class="score-inp" data-did="${disc.id}"
value="${esc(a.scores?.[disc.id] ?? '')}"
placeholder="${disc.unit === 'mm:ss' ? '2:09.54' : disc.unit === 'm' ? '6.51' : '12.84'}">
</div>`).join('');
row.innerHTML = `
<div class="athlete-edit-header">
<input class="inp-name" type="text" value="${esc(a.name)}" placeholder="Athlete name">
<input class="inp-country" type="text" value="${esc(a.country)}" placeholder="NAT" maxlength="4">
<input class="inp-score" type="number" value="${a.score ?? ''}" placeholder="Score">
<select class="medal-select">
<option value="" ${!a.medal?'selected':''}>No medal</option>
<option value="gold" ${a.medal==='gold'?'selected':''}>🥇 Gold</option>
<option value="silver" ${a.medal==='silver'?'selected':''}>🥈 Silver</option>
<option value="bronze" ${a.medal==='bronze'?'selected':''}>🥉 Bronze</option>
</select>
<button class="athlete-del-btn" title="Remove athlete">×</button>
</div>
<div class="athlete-scores-grid">${scoresHTML}</div>
`;
// Bind header inputs
row.querySelector('.inp-name').addEventListener('input', e => { athletes[ai].name = e.target.value; });
row.querySelector('.inp-country').addEventListener('input', e => { athletes[ai].country = e.target.value.toUpperCase(); });
row.querySelector('.inp-score').addEventListener('input', e => {
const v = parseFloat(e.target.value);
athletes[ai].score = isNaN(v) ? null : v;
});
row.querySelector('.medal-select').addEventListener('change', e => {
athletes[ai].medal = e.target.value || null;
row.className = 'athlete-edit-row' + (athletes[ai].medal ? ' medal-'+athletes[ai].medal : '');
});
row.querySelector('.athlete-del-btn').addEventListener('click', () => {
athletes.splice(ai, 1);
renderAthletesEditor();
});
// Bind score inputs
row.querySelectorAll('.score-inp').forEach(inp => {
inp.addEventListener('input', e => {
const did = e.target.dataset.did;
athletes[ai].scores = athletes[ai].scores || {};
athletes[ai].scores[did] = e.target.value.trim() || null;
});
});
container.appendChild(row);
});
}
// ════════════════════════════════════════════════════════
// ACTIONS
// ════════════════════════════════════════════════════════
function addDiscipline() {
const id = uid();
disciplines.push({ id, name: 'New discipline', unit: 'm', reverse: false });
// add empty score for all athletes
athletes.forEach(a => { a.scores = a.scores || {}; a.scores[id] = null; });
renderDiscEditor();
renderAthletesEditor();
}
function addAthlete() {
const id = uid();
const scores = {};
disciplines.forEach(d => { scores[d.id] = null; });
athletes.push({ id, name: 'New Athlete', country: 'NAT', score: null, medal: null, scores });
renderAthletesEditor();
// scroll to new
document.getElementById('athletesEditor').lastElementChild?.scrollIntoView({ behavior:'smooth' });
}
function applyChanges() {
// recalculate ranks
const withScore = athletes.filter(a => a.score != null).sort((a,b) => b.score - a.score);
withScore.forEach((a, i) => { a.rank = i + 1; });
athletes.filter(a => a.score == null).forEach(a => { a.rank = null; });
if (!athletes.find(a => a.id === activeId)) {
activeId = athletes[0]?.id || null;
}
render();
// Keep edit panel open but scroll to chart
document.getElementById('chartSvg').scrollIntoView({ behavior: 'smooth', block: 'start' });
}
function resetData() {
if (!confirm('Reset all data to original Rio 2016 values?')) return;
disciplines = deepClone(ORIGINAL_DISCIPLINES);
athletes = deepClone(ORIGINAL_ATHLETES);
activeId = athletes[0].id;
render();
renderEditPanel();
}
// ════════════════════════════════════════════════════════
// BOOTSTRAP
// ════════════════════════════════════════════════════════
function esc(str) {
return String(str ?? '').replace(/&/g,'&').replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>');
}
// Set initial ranks
(function initRanks() {
const withScore = athletes.filter(a => a.score != null).sort((a,b)=>b.score-a.score);
withScore.forEach((a,i) => { a.rank = i+1; });
})();
// Wire up controls
document.getElementById('athleteSelect').addEventListener('change', e => {
setActive(e.target.value);
updateSelectStyle();
});
document.getElementById('editToggle').addEventListener('click', () => {
const panel = document.getElementById('editPanel');
const toggle = document.getElementById('editToggle');
const open = panel.classList.toggle('open');
toggle.classList.toggle('open', open);
if (open) renderEditPanel();
});
document.getElementById('addDiscBtn').addEventListener('click', addDiscipline);
document.getElementById('addAthleteBtn').addEventListener('click', addAthlete);
document.getElementById('applyBtn').addEventListener('click', applyChanges);
document.getElementById('resetBtn').addEventListener('click', resetData);
// Responsive redraw
let resizeTimer;
window.addEventListener('resize', () => {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(() => { renderChart(); }, 120);
});
// Initial render
render();
</script>
</body>
</html>