d3-rails 4.10.0 → 4.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1f9acb8b1a2f3d52ce52e05b338878f77dab8d3
4
- data.tar.gz: 2a8aef7962aa0f9bc1db17a084287c09ee24e28b
3
+ metadata.gz: 63f01246235c371ff02295aa8a8a3043dc0be066
4
+ data.tar.gz: f5e45be710358c6eb8ddd0ecae9c3fbf1bbcd94f
5
5
  SHA512:
6
- metadata.gz: 202a7e91968c3c237d738d797030d536375348cd79d1b39a7329c28024b2cfe618415dc83ff36a24783897aec631418a4f1cfed05d202bb4da5fbd9ac0147b27
7
- data.tar.gz: 1a3a8b24e2ac2b47c871754719719d87484deaff3b7e698ebf9464c98a557881e140dcd3e9fd9896c1deecd37e92dfae34f890c5a5b0bd302f2c4b88e87a4af7
6
+ metadata.gz: cbaedbfc31440afdd67fd9404faeedc3b45c4c3e03d56966a8bfa271d1e028489c9398a83f1142a084fdc36161b4f0a64ac7b169ec25631dc2ccff53d537a8bc
7
+ data.tar.gz: e85087585e9cb062800e9dfcb437027dc36165c4a0af02fc221a587d101452b6bc6db8a47902fb541cdffbc1983b5996ba1bcd8a31380b3fe716447efca59bf8
@@ -1,4 +1,7 @@
1
- ## 4.10.0(19 Jul 2017)
1
+ ## 4.10.2 (11 Sep 2017)
2
+ * Upgrade D3 to 4.10.2
3
+
4
+ ## 4.10.0 (19 Jul 2017)
2
5
  * Upgrade D3 to 4.10.0
3
6
 
4
7
  ## 4.9.1 (16 May 2017)
data/README.md CHANGED
@@ -8,7 +8,7 @@ d3-rails provides D3 for Rails 3.1 and higher.
8
8
 
9
9
  ## Version
10
10
 
11
- d3-rails comes with version 4.10.0 of D3.js. The d3-rails version will
11
+ d3-rails comes with version 4.10.2 of D3.js. The d3-rails version will
12
12
  always mirror the version of D3. If you need a newer version of
13
13
  d3-rails, see section Development (below).
14
14
 
@@ -1,11 +1,11 @@
1
- // https://d3js.org Version 4.10.0. Copyright 2017 Mike Bostock.
1
+ // https://d3js.org Version 4.10.2. Copyright 2017 Mike Bostock.
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
5
  (factory((global.d3 = global.d3 || {})));
6
6
  }(this, (function (exports) { 'use strict';
7
7
 
8
- var version = "4.10.0";
8
+ var version = "4.10.2";
9
9
 
10
10
  var ascending = function(a, b) {
11
11
  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -44,7 +44,7 @@ function ascendingComparator(f) {
44
44
  }
45
45
 
46
46
  var ascendingBisect = bisector(ascending);
47
- var bisectRight = ascendingBisect.right;
47
+ var bisectRight$1 = ascendingBisect.right;
48
48
  var bisectLeft = ascendingBisect.left;
49
49
 
50
50
  var pairs = function(array, f) {
@@ -290,7 +290,7 @@ var histogram = function() {
290
290
  for (i = 0; i < n; ++i) {
291
291
  x = values[i];
292
292
  if (x0 <= x && x <= x1) {
293
- bins[bisectRight(tz, x, 0, m)].push(data[i]);
293
+ bins[bisectRight$1(tz, x, 0, m)].push(data[i]);
294
294
  }
295
295
  }
296
296
 
@@ -1775,9 +1775,9 @@ var noevent = function() {
1775
1775
 
1776
1776
  var dragDisable = function(view) {
1777
1777
  var root = view.document.documentElement,
1778
- selection$$1 = select(view).on("dragstart.drag", noevent, true);
1778
+ selection = select(view).on("dragstart.drag", noevent, true);
1779
1779
  if ("onselectstart" in root) {
1780
- selection$$1.on("selectstart.drag", noevent, true);
1780
+ selection.on("selectstart.drag", noevent, true);
1781
1781
  } else {
1782
1782
  root.__noselect = root.style.MozUserSelect;
1783
1783
  root.style.MozUserSelect = "none";
@@ -1786,13 +1786,13 @@ var dragDisable = function(view) {
1786
1786
 
1787
1787
  function yesdrag(view, noclick) {
1788
1788
  var root = view.document.documentElement,
1789
- selection$$1 = select(view).on("dragstart.drag", null);
1789
+ selection = select(view).on("dragstart.drag", null);
1790
1790
  if (noclick) {
1791
- selection$$1.on("click.drag", noevent, true);
1792
- setTimeout(function() { selection$$1.on("click.drag", null); }, 0);
1791
+ selection.on("click.drag", noevent, true);
1792
+ setTimeout(function() { selection.on("click.drag", null); }, 0);
1793
1793
  }
1794
1794
  if ("onselectstart" in root) {
1795
- selection$$1.on("selectstart.drag", null);
1795
+ selection.on("selectstart.drag", null);
1796
1796
  } else {
1797
1797
  root.style.MozUserSelect = root.__noselect;
1798
1798
  delete root.__noselect;
@@ -1895,12 +1895,12 @@ var drag = function() {
1895
1895
 
1896
1896
  function touchstarted() {
1897
1897
  if (!filter.apply(this, arguments)) return;
1898
- var touches$$1 = exports.event.changedTouches,
1898
+ var touches = exports.event.changedTouches,
1899
1899
  c = container.apply(this, arguments),
1900
- n = touches$$1.length, i, gesture;
1900
+ n = touches.length, i, gesture;
1901
1901
 
1902
1902
  for (i = 0; i < n; ++i) {
1903
- if (gesture = beforestart(touches$$1[i].identifier, c, touch, this, arguments)) {
1903
+ if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {
1904
1904
  nopropagation();
1905
1905
  gesture("start");
1906
1906
  }
@@ -1908,11 +1908,11 @@ var drag = function() {
1908
1908
  }
1909
1909
 
1910
1910
  function touchmoved() {
1911
- var touches$$1 = exports.event.changedTouches,
1912
- n = touches$$1.length, i, gesture;
1911
+ var touches = exports.event.changedTouches,
1912
+ n = touches.length, i, gesture;
1913
1913
 
1914
1914
  for (i = 0; i < n; ++i) {
1915
- if (gesture = gestures[touches$$1[i].identifier]) {
1915
+ if (gesture = gestures[touches[i].identifier]) {
1916
1916
  noevent();
1917
1917
  gesture("drag");
1918
1918
  }
@@ -1920,13 +1920,13 @@ var drag = function() {
1920
1920
  }
1921
1921
 
1922
1922
  function touchended() {
1923
- var touches$$1 = exports.event.changedTouches,
1924
- n = touches$$1.length, i, gesture;
1923
+ var touches = exports.event.changedTouches,
1924
+ n = touches.length, i, gesture;
1925
1925
 
1926
1926
  if (touchending) clearTimeout(touchending);
1927
1927
  touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
1928
1928
  for (i = 0; i < n; ++i) {
1929
- if (gesture = gestures[touches$$1[i].identifier]) {
1929
+ if (gesture = gestures[touches[i].identifier]) {
1930
1930
  nopropagation();
1931
1931
  gesture("end");
1932
1932
  }
@@ -3097,12 +3097,12 @@ function nap() {
3097
3097
  function sleep(time) {
3098
3098
  if (frame) return; // Soonest alarm already set, or will be.
3099
3099
  if (timeout) timeout = clearTimeout(timeout);
3100
- var delay = time - clockNow;
3100
+ var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
3101
3101
  if (delay > 24) {
3102
- if (time < Infinity) timeout = setTimeout(wake, delay);
3102
+ if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
3103
3103
  if (interval) interval = clearInterval(interval);
3104
3104
  } else {
3105
- if (!interval) clockLast = clockNow, interval = setInterval(poke, pokeDelay);
3105
+ if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
3106
3106
  frame = 1, setFrame(wake);
3107
3107
  }
3108
3108
  }
@@ -3634,15 +3634,15 @@ var transition_remove = function() {
3634
3634
  return this.on("end.remove", removeFunction(this._id));
3635
3635
  };
3636
3636
 
3637
- var transition_select = function(select$$1) {
3637
+ var transition_select = function(select) {
3638
3638
  var name = this._name,
3639
3639
  id = this._id;
3640
3640
 
3641
- if (typeof select$$1 !== "function") select$$1 = selector(select$$1);
3641
+ if (typeof select !== "function") select = selector(select);
3642
3642
 
3643
3643
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3644
3644
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
3645
- if ((node = group[i]) && (subnode = select$$1.call(node, node.__data__, i, group))) {
3645
+ if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
3646
3646
  if ("__data__" in node) subnode.__data__ = node.__data__;
3647
3647
  subgroup[i] = subnode;
3648
3648
  schedule(subgroup[i], name, id, i, subgroup, get$1(node, id));
@@ -3653,16 +3653,16 @@ var transition_select = function(select$$1) {
3653
3653
  return new Transition(subgroups, this._parents, name, id);
3654
3654
  };
3655
3655
 
3656
- var transition_selectAll = function(select$$1) {
3656
+ var transition_selectAll = function(select) {
3657
3657
  var name = this._name,
3658
3658
  id = this._id;
3659
3659
 
3660
- if (typeof select$$1 !== "function") select$$1 = selectorAll(select$$1);
3660
+ if (typeof select !== "function") select = selectorAll(select);
3661
3661
 
3662
3662
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
3663
3663
  for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3664
3664
  if (node = group[i]) {
3665
- for (var children = select$$1.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) {
3665
+ for (var children = select.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) {
3666
3666
  if (child = children[k]) {
3667
3667
  schedule(child, name, id, k, children, inherit);
3668
3668
  }
@@ -4232,7 +4232,7 @@ function defaultExtent() {
4232
4232
  }
4233
4233
 
4234
4234
  // Like d3.local, but with the name “__brush” rather than auto-generated.
4235
- function local$$1(node) {
4235
+ function local(node) {
4236
4236
  while (!node.__brush) if (!(node = node.parentNode)) return;
4237
4237
  return node.__brush;
4238
4238
  }
@@ -4278,7 +4278,7 @@ function brush$1(dim) {
4278
4278
  .attr("cursor", cursors.overlay)
4279
4279
  .merge(overlay)
4280
4280
  .each(function() {
4281
- var extent = local$$1(this).extent;
4281
+ var extent = local(this).extent;
4282
4282
  select(this)
4283
4283
  .attr("x", extent[0][0])
4284
4284
  .attr("y", extent[0][1])
@@ -4353,7 +4353,7 @@ function brush$1(dim) {
4353
4353
 
4354
4354
  function redraw() {
4355
4355
  var group = select(this),
4356
- selection = local$$1(this).selection;
4356
+ selection = local(this).selection;
4357
4357
 
4358
4358
  if (selection) {
4359
4359
  group.selectAll(".selection")
@@ -4424,7 +4424,7 @@ function brush$1(dim) {
4424
4424
  mode = (exports.event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (exports.event.altKey ? MODE_CENTER : MODE_HANDLE),
4425
4425
  signX = dim === Y ? null : signsX[type],
4426
4426
  signY = dim === X ? null : signsY[type],
4427
- state = local$$1(that),
4427
+ state = local(that),
4428
4428
  extent = state.extent,
4429
4429
  selection = state.selection,
4430
4430
  W = extent[0][0], w0, w1,
@@ -5211,6 +5211,12 @@ var entries = function(map) {
5211
5211
  return entries;
5212
5212
  };
5213
5213
 
5214
+ var EOL = {};
5215
+ var EOF = {};
5216
+ var QUOTE = 34;
5217
+ var NEWLINE = 10;
5218
+ var RETURN = 13;
5219
+
5214
5220
  function objectConverter(columns) {
5215
5221
  return new Function("d", "return {" + columns.map(function(name, i) {
5216
5222
  return JSON.stringify(name) + ": d[" + i + "]";
@@ -5242,7 +5248,7 @@ function inferColumns(rows) {
5242
5248
 
5243
5249
  var dsv = function(delimiter) {
5244
5250
  var reFormat = new RegExp("[\"" + delimiter + "\n\r]"),
5245
- delimiterCode = delimiter.charCodeAt(0);
5251
+ DELIMITER = delimiter.charCodeAt(0);
5246
5252
 
5247
5253
  function parse(text, f) {
5248
5254
  var convert, columns, rows = parseRows(text, function(row, i) {
@@ -5254,62 +5260,49 @@ var dsv = function(delimiter) {
5254
5260
  }
5255
5261
 
5256
5262
  function parseRows(text, f) {
5257
- var EOL = {}, // sentinel value for end-of-line
5258
- EOF = {}, // sentinel value for end-of-file
5259
- rows = [], // output rows
5263
+ var rows = [], // output rows
5260
5264
  N = text.length,
5261
5265
  I = 0, // current character index
5262
- n = 0, // the current line number
5263
- t, // the current token
5264
- eol; // is the current token followed by EOL?
5266
+ n = 0, // current line number
5267
+ t, // current token
5268
+ eof = N <= 0, // current token followed by EOF?
5269
+ eol = false; // current token followed by EOL?
5270
+
5271
+ // Strip the trailing newline.
5272
+ if (text.charCodeAt(N - 1) === NEWLINE) --N;
5273
+ if (text.charCodeAt(N - 1) === RETURN) --N;
5265
5274
 
5266
5275
  function token() {
5267
- if (I >= N) return EOF; // special case: end of file
5268
- if (eol) return eol = false, EOL; // special case: end of line
5269
-
5270
- // special case: quotes
5271
- var j = I, c;
5272
- if (text.charCodeAt(j) === 34) {
5273
- var i = j;
5274
- while (i++ < N) {
5275
- if (text.charCodeAt(i) === 34) {
5276
- if (text.charCodeAt(i + 1) !== 34) break;
5277
- ++i;
5278
- }
5279
- }
5280
- I = i + 2;
5281
- c = text.charCodeAt(i + 1);
5282
- if (c === 13) {
5283
- eol = true;
5284
- if (text.charCodeAt(i + 2) === 10) ++I;
5285
- } else if (c === 10) {
5286
- eol = true;
5287
- }
5288
- return text.slice(j + 1, i).replace(/""/g, "\"");
5276
+ if (eof) return EOF;
5277
+ if (eol) return eol = false, EOL;
5278
+
5279
+ // Unescape quotes.
5280
+ var i, j = I, c;
5281
+ if (text.charCodeAt(j) === QUOTE) {
5282
+ while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);
5283
+ if ((i = I) >= N) eof = true;
5284
+ else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;
5285
+ else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
5286
+ return text.slice(j + 1, i - 1).replace(/""/g, "\"");
5289
5287
  }
5290
5288
 
5291
- // common case: find next delimiter or newline
5289
+ // Find next delimiter or newline.
5292
5290
  while (I < N) {
5293
- var k = 1;
5294
- c = text.charCodeAt(I++);
5295
- if (c === 10) eol = true; // \n
5296
- else if (c === 13) { eol = true; if (text.charCodeAt(I) === 10) ++I, ++k; } // \r|\r\n
5297
- else if (c !== delimiterCode) continue;
5298
- return text.slice(j, I - k);
5291
+ if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;
5292
+ else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
5293
+ else if (c !== DELIMITER) continue;
5294
+ return text.slice(j, i);
5299
5295
  }
5300
5296
 
5301
- // special case: last token before EOF
5302
- return text.slice(j);
5297
+ // Return last token before EOF.
5298
+ return eof = true, text.slice(j, N);
5303
5299
  }
5304
5300
 
5305
5301
  while ((t = token()) !== EOF) {
5306
- var a = [];
5307
- while (t !== EOL && t !== EOF) {
5308
- a.push(t);
5309
- t = token();
5310
- }
5311
- if (f && (a = f(a, n++)) == null) continue;
5312
- rows.push(a);
5302
+ var row = [];
5303
+ while (t !== EOL && t !== EOF) row.push(t), t = token();
5304
+ if (f && (row = f(row, n++)) == null) continue;
5305
+ rows.push(row);
5313
5306
  }
5314
5307
 
5315
5308
  return rows;
@@ -5334,7 +5327,7 @@ var dsv = function(delimiter) {
5334
5327
 
5335
5328
  function formatValue(text) {
5336
5329
  return text == null ? ""
5337
- : reFormat.test(text += "") ? "\"" + text.replace(/\"/g, "\"\"") + "\""
5330
+ : reFormat.test(text += "") ? "\"" + text.replace(/"/g, "\"\"") + "\""
5338
5331
  : text;
5339
5332
  }
5340
5333
 
@@ -5830,7 +5823,7 @@ treeProto.visitAfter = tree_visitAfter;
5830
5823
  treeProto.x = tree_x;
5831
5824
  treeProto.y = tree_y;
5832
5825
 
5833
- function x(d) {
5826
+ function x$1(d) {
5834
5827
  return d.x + d.vx;
5835
5828
  }
5836
5829
 
@@ -5856,7 +5849,7 @@ var collide = function(radius) {
5856
5849
  ri2;
5857
5850
 
5858
5851
  for (var k = 0; k < iterations; ++k) {
5859
- tree = quadtree(nodes, x, y).visitAfter(prepare);
5852
+ tree = quadtree(nodes, x$1, y).visitAfter(prepare);
5860
5853
  for (i = 0; i < n; ++i) {
5861
5854
  node = nodes[i];
5862
5855
  ri = radii[node.index], ri2 = ri * ri;
@@ -6038,7 +6031,7 @@ var link = function(links) {
6038
6031
  return force;
6039
6032
  };
6040
6033
 
6041
- function x$1(d) {
6034
+ function x$2(d) {
6042
6035
  return d.x;
6043
6036
  }
6044
6037
 
@@ -6189,7 +6182,7 @@ var manyBody = function() {
6189
6182
  theta2 = 0.81;
6190
6183
 
6191
6184
  function force(_) {
6192
- var i, n = nodes.length, tree = quadtree(nodes, x$1, y$1).visitAfter(accumulate);
6185
+ var i, n = nodes.length, tree = quadtree(nodes, x$2, y$1).visitAfter(accumulate);
6193
6186
  for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
6194
6187
  }
6195
6188
 
@@ -6288,7 +6281,7 @@ var manyBody = function() {
6288
6281
  return force;
6289
6282
  };
6290
6283
 
6291
- var x$2 = function(x) {
6284
+ var x$3 = function(x) {
6292
6285
  var strength = constant$6(0.1),
6293
6286
  nodes,
6294
6287
  strengths,
@@ -11454,7 +11447,7 @@ function band() {
11454
11447
  var scale = ordinal().unknown(undefined),
11455
11448
  domain = scale.domain,
11456
11449
  ordinalRange = scale.range,
11457
- range = [0, 1],
11450
+ range$$1 = [0, 1],
11458
11451
  step,
11459
11452
  bandwidth,
11460
11453
  round = false,
@@ -11466,9 +11459,9 @@ function band() {
11466
11459
 
11467
11460
  function rescale() {
11468
11461
  var n = domain().length,
11469
- reverse = range[1] < range[0],
11470
- start = range[reverse - 0],
11471
- stop = range[1 - reverse];
11462
+ reverse = range$$1[1] < range$$1[0],
11463
+ start = range$$1[reverse - 0],
11464
+ stop = range$$1[1 - reverse];
11472
11465
  step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
11473
11466
  if (round) step = Math.floor(step);
11474
11467
  start += (stop - start - step * (n - paddingInner)) * align;
@@ -11483,11 +11476,11 @@ function band() {
11483
11476
  };
11484
11477
 
11485
11478
  scale.range = function(_) {
11486
- return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
11479
+ return arguments.length ? (range$$1 = [+_[0], +_[1]], rescale()) : range$$1.slice();
11487
11480
  };
11488
11481
 
11489
11482
  scale.rangeRound = function(_) {
11490
- return range = [+_[0], +_[1]], round = true, rescale();
11483
+ return range$$1 = [+_[0], +_[1]], round = true, rescale();
11491
11484
  };
11492
11485
 
11493
11486
  scale.bandwidth = function() {
@@ -11521,7 +11514,7 @@ function band() {
11521
11514
  scale.copy = function() {
11522
11515
  return band()
11523
11516
  .domain(domain())
11524
- .range(range)
11517
+ .range(range$$1)
11525
11518
  .round(round)
11526
11519
  .paddingInner(paddingInner)
11527
11520
  .paddingOuter(paddingOuter)
@@ -11574,21 +11567,21 @@ function deinterpolateClamp(deinterpolate) {
11574
11567
  };
11575
11568
  }
11576
11569
 
11577
- function reinterpolateClamp(reinterpolate$$1) {
11570
+ function reinterpolateClamp(reinterpolate) {
11578
11571
  return function(a, b) {
11579
- var r = reinterpolate$$1(a = +a, b = +b);
11572
+ var r = reinterpolate(a = +a, b = +b);
11580
11573
  return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
11581
11574
  };
11582
11575
  }
11583
11576
 
11584
- function bimap(domain, range, deinterpolate, reinterpolate$$1) {
11577
+ function bimap(domain, range, deinterpolate, reinterpolate) {
11585
11578
  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
11586
- if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate$$1(r1, r0);
11587
- else d0 = deinterpolate(d0, d1), r0 = reinterpolate$$1(r0, r1);
11579
+ if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
11580
+ else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
11588
11581
  return function(x) { return r0(d0(x)); };
11589
11582
  }
11590
11583
 
11591
- function polymap(domain, range, deinterpolate, reinterpolate$$1) {
11584
+ function polymap(domain, range, deinterpolate, reinterpolate) {
11592
11585
  var j = Math.min(domain.length, range.length) - 1,
11593
11586
  d = new Array(j),
11594
11587
  r = new Array(j),
@@ -11602,11 +11595,11 @@ function polymap(domain, range, deinterpolate, reinterpolate$$1) {
11602
11595
 
11603
11596
  while (++i < j) {
11604
11597
  d[i] = deinterpolate(domain[i], domain[i + 1]);
11605
- r[i] = reinterpolate$$1(range[i], range[i + 1]);
11598
+ r[i] = reinterpolate(range[i], range[i + 1]);
11606
11599
  }
11607
11600
 
11608
11601
  return function(x) {
11609
- var i = bisectRight(domain, x, 1, j) - 1;
11602
+ var i = bisectRight$1(domain, x, 1, j) - 1;
11610
11603
  return r[i](d[i](x));
11611
11604
  };
11612
11605
  }
@@ -11621,10 +11614,10 @@ function copy(source, target) {
11621
11614
 
11622
11615
  // deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
11623
11616
  // reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
11624
- function continuous(deinterpolate, reinterpolate$$1) {
11617
+ function continuous(deinterpolate, reinterpolate) {
11625
11618
  var domain = unit,
11626
11619
  range = unit,
11627
- interpolate = interpolateValue,
11620
+ interpolate$$1 = interpolateValue,
11628
11621
  clamp = false,
11629
11622
  piecewise,
11630
11623
  output,
@@ -11637,11 +11630,11 @@ function continuous(deinterpolate, reinterpolate$$1) {
11637
11630
  }
11638
11631
 
11639
11632
  function scale(x) {
11640
- return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);
11633
+ return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);
11641
11634
  }
11642
11635
 
11643
11636
  scale.invert = function(y) {
11644
- return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate$$1) : reinterpolate$$1)))(+y);
11637
+ return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
11645
11638
  };
11646
11639
 
11647
11640
  scale.domain = function(_) {
@@ -11653,7 +11646,7 @@ function continuous(deinterpolate, reinterpolate$$1) {
11653
11646
  };
11654
11647
 
11655
11648
  scale.rangeRound = function(_) {
11656
- return range = slice$5.call(_), interpolate = interpolateRound, rescale();
11649
+ return range = slice$5.call(_), interpolate$$1 = interpolateRound, rescale();
11657
11650
  };
11658
11651
 
11659
11652
  scale.clamp = function(_) {
@@ -11661,7 +11654,7 @@ function continuous(deinterpolate, reinterpolate$$1) {
11661
11654
  };
11662
11655
 
11663
11656
  scale.interpolate = function(_) {
11664
- return arguments.length ? (interpolate = _, rescale()) : interpolate;
11657
+ return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;
11665
11658
  };
11666
11659
 
11667
11660
  return rescale();
@@ -11958,7 +11951,7 @@ function sqrt$1() {
11958
11951
  return pow$1().exponent(0.5);
11959
11952
  }
11960
11953
 
11961
- function quantile() {
11954
+ function quantile$$1() {
11962
11955
  var domain = [],
11963
11956
  range = [],
11964
11957
  thresholds = [];
@@ -11971,7 +11964,7 @@ function quantile() {
11971
11964
  }
11972
11965
 
11973
11966
  function scale(x) {
11974
- if (!isNaN(x = +x)) return range[bisectRight(thresholds, x)];
11967
+ if (!isNaN(x = +x)) return range[bisectRight$1(thresholds, x)];
11975
11968
  }
11976
11969
 
11977
11970
  scale.invertExtent = function(y) {
@@ -11999,7 +11992,7 @@ function quantile() {
11999
11992
  };
12000
11993
 
12001
11994
  scale.copy = function() {
12002
- return quantile()
11995
+ return quantile$$1()
12003
11996
  .domain(domain)
12004
11997
  .range(range);
12005
11998
  };
@@ -12015,7 +12008,7 @@ function quantize$1() {
12015
12008
  range = [0, 1];
12016
12009
 
12017
12010
  function scale(x) {
12018
- if (x <= x) return range[bisectRight(domain, x, 0, n)];
12011
+ if (x <= x) return range[bisectRight$1(domain, x, 0, n)];
12019
12012
  }
12020
12013
 
12021
12014
  function rescale() {
@@ -12056,7 +12049,7 @@ function threshold$1() {
12056
12049
  n = 1;
12057
12050
 
12058
12051
  function scale(x) {
12059
- if (x <= x) return range[bisectRight(domain, x, 0, n)];
12052
+ if (x <= x) return range[bisectRight$1(domain, x, 0, n)];
12060
12053
  }
12061
12054
 
12062
12055
  scale.domain = function(_) {
@@ -13017,39 +13010,39 @@ function calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1
13017
13010
  [ year$$1, 1, durationYear ]
13018
13011
  ];
13019
13012
 
13020
- function tickFormat(date$$1) {
13021
- return (second$$1(date$$1) < date$$1 ? formatMillisecond
13022
- : minute$$1(date$$1) < date$$1 ? formatSecond
13023
- : hour$$1(date$$1) < date$$1 ? formatMinute
13024
- : day$$1(date$$1) < date$$1 ? formatHour
13025
- : month$$1(date$$1) < date$$1 ? (week(date$$1) < date$$1 ? formatDay : formatWeek)
13026
- : year$$1(date$$1) < date$$1 ? formatMonth
13027
- : formatYear)(date$$1);
13013
+ function tickFormat(date) {
13014
+ return (second$$1(date) < date ? formatMillisecond
13015
+ : minute$$1(date) < date ? formatSecond
13016
+ : hour$$1(date) < date ? formatMinute
13017
+ : day$$1(date) < date ? formatHour
13018
+ : month$$1(date) < date ? (week(date) < date ? formatDay : formatWeek)
13019
+ : year$$1(date) < date ? formatMonth
13020
+ : formatYear)(date);
13028
13021
  }
13029
13022
 
13030
- function tickInterval(interval$$1, start, stop, step) {
13031
- if (interval$$1 == null) interval$$1 = 10;
13023
+ function tickInterval(interval, start, stop, step) {
13024
+ if (interval == null) interval = 10;
13032
13025
 
13033
13026
  // If a desired tick count is specified, pick a reasonable tick interval
13034
13027
  // based on the extent of the domain and a rough estimate of tick size.
13035
13028
  // Otherwise, assume interval is already a time interval and use it.
13036
- if (typeof interval$$1 === "number") {
13037
- var target = Math.abs(stop - start) / interval$$1,
13029
+ if (typeof interval === "number") {
13030
+ var target = Math.abs(stop - start) / interval,
13038
13031
  i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
13039
13032
  if (i === tickIntervals.length) {
13040
- step = tickStep(start / durationYear, stop / durationYear, interval$$1);
13041
- interval$$1 = year$$1;
13033
+ step = tickStep(start / durationYear, stop / durationYear, interval);
13034
+ interval = year$$1;
13042
13035
  } else if (i) {
13043
13036
  i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
13044
13037
  step = i[1];
13045
- interval$$1 = i[0];
13038
+ interval = i[0];
13046
13039
  } else {
13047
- step = tickStep(start, stop, interval$$1);
13048
- interval$$1 = millisecond$$1;
13040
+ step = tickStep(start, stop, interval);
13041
+ interval = millisecond$$1;
13049
13042
  }
13050
13043
  }
13051
13044
 
13052
- return step == null ? interval$$1 : interval$$1.every(step);
13045
+ return step == null ? interval : interval.every(step);
13053
13046
  }
13054
13047
 
13055
13048
  scale.invert = function(y) {
@@ -13060,14 +13053,14 @@ function calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1
13060
13053
  return arguments.length ? domain(map$3.call(_, number$3)) : domain().map(date$1);
13061
13054
  };
13062
13055
 
13063
- scale.ticks = function(interval$$1, step) {
13056
+ scale.ticks = function(interval, step) {
13064
13057
  var d = domain(),
13065
13058
  t0 = d[0],
13066
13059
  t1 = d[d.length - 1],
13067
13060
  r = t1 < t0,
13068
13061
  t;
13069
13062
  if (r) t = t0, t0 = t1, t1 = t;
13070
- t = tickInterval(interval$$1, t0, t1, step);
13063
+ t = tickInterval(interval, t0, t1, step);
13071
13064
  t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
13072
13065
  return r ? t.reverse() : t;
13073
13066
  };
@@ -13076,10 +13069,10 @@ function calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1
13076
13069
  return specifier == null ? tickFormat : format(specifier);
13077
13070
  };
13078
13071
 
13079
- scale.nice = function(interval$$1, step) {
13072
+ scale.nice = function(interval, step) {
13080
13073
  var d = domain();
13081
- return (interval$$1 = tickInterval(interval$$1, d[0], d[d.length - 1], step))
13082
- ? domain(nice(d, interval$$1))
13074
+ return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
13075
+ ? domain(nice(d, interval))
13083
13076
  : scale;
13084
13077
  };
13085
13078
 
@@ -13488,7 +13481,7 @@ var curveLinear = function(context) {
13488
13481
  return new Linear(context);
13489
13482
  };
13490
13483
 
13491
- function x$3(p) {
13484
+ function x$4(p) {
13492
13485
  return p[0];
13493
13486
  }
13494
13487
 
@@ -13497,8 +13490,8 @@ function y$3(p) {
13497
13490
  }
13498
13491
 
13499
13492
  var line = function() {
13500
- var x = x$3,
13501
- y = y$3,
13493
+ var x$$1 = x$4,
13494
+ y$$1 = y$3,
13502
13495
  defined = constant$10(true),
13503
13496
  context = null,
13504
13497
  curve = curveLinear,
@@ -13518,18 +13511,18 @@ var line = function() {
13518
13511
  if (defined0 = !defined0) output.lineStart();
13519
13512
  else output.lineEnd();
13520
13513
  }
13521
- if (defined0) output.point(+x(d, i, data), +y(d, i, data));
13514
+ if (defined0) output.point(+x$$1(d, i, data), +y$$1(d, i, data));
13522
13515
  }
13523
13516
 
13524
13517
  if (buffer) return output = null, buffer + "" || null;
13525
13518
  }
13526
13519
 
13527
13520
  line.x = function(_) {
13528
- return arguments.length ? (x = typeof _ === "function" ? _ : constant$10(+_), line) : x;
13521
+ return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$10(+_), line) : x$$1;
13529
13522
  };
13530
13523
 
13531
13524
  line.y = function(_) {
13532
- return arguments.length ? (y = typeof _ === "function" ? _ : constant$10(+_), line) : y;
13525
+ return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$10(+_), line) : y$$1;
13533
13526
  };
13534
13527
 
13535
13528
  line.defined = function(_) {
@@ -13548,7 +13541,7 @@ var line = function() {
13548
13541
  };
13549
13542
 
13550
13543
  var area$2 = function() {
13551
- var x0 = x$3,
13544
+ var x0 = x$4,
13552
13545
  x1 = null,
13553
13546
  y0 = constant$10(0),
13554
13547
  y1 = y$3,
@@ -13829,14 +13822,14 @@ function linkTarget(d) {
13829
13822
  function link$2(curve) {
13830
13823
  var source = linkSource,
13831
13824
  target = linkTarget,
13832
- x = x$3,
13833
- y = y$3,
13825
+ x$$1 = x$4,
13826
+ y$$1 = y$3,
13834
13827
  context = null;
13835
13828
 
13836
13829
  function link() {
13837
13830
  var buffer, argv = slice$6.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
13838
13831
  if (!context) context = buffer = path();
13839
- curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));
13832
+ curve(context, +x$$1.apply(this, (argv[0] = s, argv)), +y$$1.apply(this, argv), +x$$1.apply(this, (argv[0] = t, argv)), +y$$1.apply(this, argv));
13840
13833
  if (buffer) return context = null, buffer + "" || null;
13841
13834
  }
13842
13835
 
@@ -13849,11 +13842,11 @@ function link$2(curve) {
13849
13842
  };
13850
13843
 
13851
13844
  link.x = function(_) {
13852
- return arguments.length ? (x = typeof _ === "function" ? _ : constant$10(+_), link) : x;
13845
+ return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$10(+_), link) : x$$1;
13853
13846
  };
13854
13847
 
13855
13848
  link.y = function(_) {
13856
- return arguments.length ? (y = typeof _ === "function" ? _ : constant$10(+_), link) : y;
13849
+ return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$10(+_), link) : y$$1;
13857
13850
  };
13858
13851
 
13859
13852
  link.context = function(_) {
@@ -15053,7 +15046,7 @@ var constant$11 = function(x) {
15053
15046
  };
15054
15047
  };
15055
15048
 
15056
- function x$4(d) {
15049
+ function x$5(d) {
15057
15050
  return d[0];
15058
15051
  }
15059
15052
 
@@ -15990,13 +15983,13 @@ Diagram.prototype = {
15990
15983
  };
15991
15984
 
15992
15985
  var voronoi = function() {
15993
- var x = x$4,
15994
- y = y$4,
15986
+ var x$$1 = x$5,
15987
+ y$$1 = y$4,
15995
15988
  extent = null;
15996
15989
 
15997
15990
  function voronoi(data) {
15998
15991
  return new Diagram(data.map(function(d, i) {
15999
- var s = [Math.round(x(d, i, data) / epsilon$4) * epsilon$4, Math.round(y(d, i, data) / epsilon$4) * epsilon$4];
15992
+ var s = [Math.round(x$$1(d, i, data) / epsilon$4) * epsilon$4, Math.round(y$$1(d, i, data) / epsilon$4) * epsilon$4];
16000
15993
  s.index = i;
16001
15994
  s.data = d;
16002
15995
  return s;
@@ -16016,11 +16009,11 @@ var voronoi = function() {
16016
16009
  };
16017
16010
 
16018
16011
  voronoi.x = function(_) {
16019
- return arguments.length ? (x = typeof _ === "function" ? _ : constant$11(+_), voronoi) : x;
16012
+ return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$11(+_), voronoi) : x$$1;
16020
16013
  };
16021
16014
 
16022
16015
  voronoi.y = function(_) {
16023
- return arguments.length ? (y = typeof _ === "function" ? _ : constant$11(+_), voronoi) : y;
16016
+ return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$11(+_), voronoi) : y$$1;
16024
16017
  };
16025
16018
 
16026
16019
  voronoi.extent = function(_) {
@@ -16156,8 +16149,8 @@ var zoom = function() {
16156
16149
  wheelDelay = 150,
16157
16150
  clickDistance2 = 0;
16158
16151
 
16159
- function zoom(selection$$1) {
16160
- selection$$1
16152
+ function zoom(selection) {
16153
+ selection
16161
16154
  .property("__zoom", defaultTransform)
16162
16155
  .on("wheel.zoom", wheeled)
16163
16156
  .on("mousedown.zoom", mousedowned)
@@ -16171,12 +16164,12 @@ var zoom = function() {
16171
16164
  }
16172
16165
 
16173
16166
  zoom.transform = function(collection, transform$$1) {
16174
- var selection$$1 = collection.selection ? collection.selection() : collection;
16175
- selection$$1.property("__zoom", defaultTransform);
16176
- if (collection !== selection$$1) {
16167
+ var selection = collection.selection ? collection.selection() : collection;
16168
+ selection.property("__zoom", defaultTransform);
16169
+ if (collection !== selection) {
16177
16170
  schedule(collection, transform$$1);
16178
16171
  } else {
16179
- selection$$1.interrupt().each(function() {
16172
+ selection.interrupt().each(function() {
16180
16173
  gesture(this, arguments)
16181
16174
  .start()
16182
16175
  .zoom(null, typeof transform$$1 === "function" ? transform$$1.apply(this, arguments) : transform$$1)
@@ -16185,16 +16178,16 @@ var zoom = function() {
16185
16178
  }
16186
16179
  };
16187
16180
 
16188
- zoom.scaleBy = function(selection$$1, k) {
16189
- zoom.scaleTo(selection$$1, function() {
16181
+ zoom.scaleBy = function(selection, k) {
16182
+ zoom.scaleTo(selection, function() {
16190
16183
  var k0 = this.__zoom.k,
16191
16184
  k1 = typeof k === "function" ? k.apply(this, arguments) : k;
16192
16185
  return k0 * k1;
16193
16186
  });
16194
16187
  };
16195
16188
 
16196
- zoom.scaleTo = function(selection$$1, k) {
16197
- zoom.transform(selection$$1, function() {
16189
+ zoom.scaleTo = function(selection, k) {
16190
+ zoom.transform(selection, function() {
16198
16191
  var e = extent.apply(this, arguments),
16199
16192
  t0 = this.__zoom,
16200
16193
  p0 = centroid(e),
@@ -16204,8 +16197,8 @@ var zoom = function() {
16204
16197
  });
16205
16198
  };
16206
16199
 
16207
- zoom.translateBy = function(selection$$1, x, y) {
16208
- zoom.transform(selection$$1, function() {
16200
+ zoom.translateBy = function(selection, x, y) {
16201
+ zoom.transform(selection, function() {
16209
16202
  return constrain(this.__zoom.translate(
16210
16203
  typeof x === "function" ? x.apply(this, arguments) : x,
16211
16204
  typeof y === "function" ? y.apply(this, arguments) : y
@@ -16213,8 +16206,8 @@ var zoom = function() {
16213
16206
  });
16214
16207
  };
16215
16208
 
16216
- zoom.translateTo = function(selection$$1, x, y) {
16217
- zoom.transform(selection$$1, function() {
16209
+ zoom.translateTo = function(selection, x, y) {
16210
+ zoom.transform(selection, function() {
16218
16211
  var e = extent.apply(this, arguments),
16219
16212
  t = this.__zoom,
16220
16213
  p = centroid(e);
@@ -16250,8 +16243,8 @@ var zoom = function() {
16250
16243
  return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
16251
16244
  }
16252
16245
 
16253
- function schedule(transition$$1, transform$$1, center) {
16254
- transition$$1
16246
+ function schedule(transition, transform$$1, center) {
16247
+ transition
16255
16248
  .on("start.zoom", function() { gesture(this, arguments).start(); })
16256
16249
  .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); })
16257
16250
  .tween("zoom", function() {
@@ -16401,13 +16394,13 @@ var zoom = function() {
16401
16394
  function touchstarted() {
16402
16395
  if (!filter.apply(this, arguments)) return;
16403
16396
  var g = gesture(this, arguments),
16404
- touches$$1 = exports.event.changedTouches,
16397
+ touches = exports.event.changedTouches,
16405
16398
  started,
16406
- n = touches$$1.length, i, t, p;
16399
+ n = touches.length, i, t, p;
16407
16400
 
16408
16401
  nopropagation$2();
16409
16402
  for (i = 0; i < n; ++i) {
16410
- t = touches$$1[i], p = touch(this, touches$$1, t.identifier);
16403
+ t = touches[i], p = touch(this, touches, t.identifier);
16411
16404
  p = [p, this.__zoom.invert(p), t.identifier];
16412
16405
  if (!g.touch0) g.touch0 = p, started = true;
16413
16406
  else if (!g.touch1) g.touch1 = p;
@@ -16433,13 +16426,13 @@ var zoom = function() {
16433
16426
 
16434
16427
  function touchmoved() {
16435
16428
  var g = gesture(this, arguments),
16436
- touches$$1 = exports.event.changedTouches,
16437
- n = touches$$1.length, i, t, p, l;
16429
+ touches = exports.event.changedTouches,
16430
+ n = touches.length, i, t, p, l;
16438
16431
 
16439
16432
  noevent$2();
16440
16433
  if (touchstarting) touchstarting = clearTimeout(touchstarting);
16441
16434
  for (i = 0; i < n; ++i) {
16442
- t = touches$$1[i], p = touch(this, touches$$1, t.identifier);
16435
+ t = touches[i], p = touch(this, touches, t.identifier);
16443
16436
  if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
16444
16437
  else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
16445
16438
  }
@@ -16460,14 +16453,14 @@ var zoom = function() {
16460
16453
 
16461
16454
  function touchended() {
16462
16455
  var g = gesture(this, arguments),
16463
- touches$$1 = exports.event.changedTouches,
16464
- n = touches$$1.length, i, t;
16456
+ touches = exports.event.changedTouches,
16457
+ n = touches.length, i, t;
16465
16458
 
16466
16459
  nopropagation$2();
16467
16460
  if (touchending) clearTimeout(touchending);
16468
16461
  touchending = setTimeout(function() { touchending = null; }, touchDelay);
16469
16462
  for (i = 0; i < n; ++i) {
16470
- t = touches$$1[i];
16463
+ t = touches[i];
16471
16464
  if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
16472
16465
  else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
16473
16466
  }
@@ -16517,8 +16510,8 @@ var zoom = function() {
16517
16510
  };
16518
16511
 
16519
16512
  exports.version = version;
16520
- exports.bisect = bisectRight;
16521
- exports.bisectRight = bisectRight;
16513
+ exports.bisect = bisectRight$1;
16514
+ exports.bisectRight = bisectRight$1;
16522
16515
  exports.bisectLeft = bisectLeft;
16523
16516
  exports.ascending = ascending;
16524
16517
  exports.bisector = bisector;
@@ -16625,7 +16618,7 @@ exports.forceCollide = collide;
16625
16618
  exports.forceLink = link;
16626
16619
  exports.forceManyBody = manyBody;
16627
16620
  exports.forceSimulation = simulation;
16628
- exports.forceX = x$2;
16621
+ exports.forceX = x$3;
16629
16622
  exports.forceY = y$2;
16630
16623
  exports.formatDefaultLocale = defaultLocale;
16631
16624
  exports.formatLocale = formatLocale;
@@ -16743,7 +16736,7 @@ exports.scaleOrdinal = ordinal;
16743
16736
  exports.scaleImplicit = implicit;
16744
16737
  exports.scalePow = pow$1;
16745
16738
  exports.scaleSqrt = sqrt$1;
16746
- exports.scaleQuantile = quantile;
16739
+ exports.scaleQuantile = quantile$$1;
16747
16740
  exports.scaleQuantize = quantize$1;
16748
16741
  exports.scaleThreshold = threshold$1;
16749
16742
  exports.scaleTime = time;