billboard.js 3.10.3 → 3.11.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +0 -1
  2. package/dist/billboard.css +5 -4
  3. package/dist/billboard.js +598 -220
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +2828 -2456
  7. package/dist/billboard.pkgd.min.js +2 -4
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +31 -15
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +31 -15
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +30 -15
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +30 -15
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2222 -2214
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2252 -2228
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2253 -2229
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2253 -2230
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2259 -2238
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  28. package/dist/theme/dark.css +7 -7
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +7 -7
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +7 -7
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +7 -7
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist/theme/modern.css +7 -7
  37. package/dist/theme/modern.min.css +2 -2
  38. package/dist-esm/billboard.js +517 -180
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +4 -4
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +7 -9
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +3 -4
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -4
  44. package/package.json +42 -46
  45. package/src/Chart/api/zoom.ts +5 -20
  46. package/src/ChartInternal/Axis/Axis.ts +5 -3
  47. package/src/ChartInternal/Axis/AxisRenderer.ts +14 -0
  48. package/src/ChartInternal/ChartInternal.ts +1 -1
  49. package/src/ChartInternal/data/data.ts +12 -5
  50. package/src/ChartInternal/data/load.ts +37 -1
  51. package/src/ChartInternal/interactions/eventrect.ts +11 -4
  52. package/src/ChartInternal/interactions/interaction.ts +2 -1
  53. package/src/ChartInternal/interactions/zoom.ts +28 -0
  54. package/src/ChartInternal/internals/domain.ts +24 -1
  55. package/src/ChartInternal/internals/legend.ts +28 -2
  56. package/src/ChartInternal/internals/scale.ts +3 -3
  57. package/src/ChartInternal/internals/size.axis.ts +8 -3
  58. package/src/ChartInternal/internals/size.ts +14 -1
  59. package/src/ChartInternal/internals/tooltip.ts +12 -6
  60. package/src/ChartInternal/internals/transform.ts +6 -2
  61. package/src/ChartInternal/internals/type.ts +1 -1
  62. package/src/ChartInternal/shape/arc.ts +110 -34
  63. package/src/ChartInternal/shape/gauge.ts +8 -4
  64. package/src/ChartInternal/shape/radar.ts +58 -45
  65. package/src/config/Options/axis/x.ts +27 -1
  66. package/src/config/Options/axis/y2.ts +13 -0
  67. package/src/config/Options/common/legend.ts +17 -0
  68. package/src/config/Options/common/tooltip.ts +1 -0
  69. package/src/config/Options/shape/arc.ts +40 -3
  70. package/src/config/Options/shape/gauge.ts +23 -2
  71. package/src/config/Options/shape/pie.ts +2 -2
  72. package/src/config/classes.ts +1 -0
  73. package/src/module/Cache.ts +1 -0
  74. package/src/module/util.ts +16 -2
  75. package/src/scss/billboard.scss +2 -1
  76. package/src/scss/theme/dark.scss +2 -1
  77. package/src/scss/theme/datalab.scss +2 -1
  78. package/src/scss/theme/graph.scss +2 -1
  79. package/src/scss/theme/insight.scss +2 -1
  80. package/src/scss/theme/modern.scss +2 -1
  81. package/types/options.d.ts +28 -4
  82. package/types/options.shape.d.ts +44 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -186,7 +186,7 @@ let Plugin = /*#__PURE__*/function () {
186
186
  };
187
187
  return Plugin;
188
188
  }();
189
- Plugin.version = "3.10.3";
189
+ Plugin.version = "3.11.0-next.2";
190
190
 
191
191
  ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
192
192
 
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e={288:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(o,{default:function(){return u}});var r=i(288);let s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.10.3";let u=function(i){var o,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(o=u).prototype=Object.create(s.prototype),o.prototype.constructor=o,n(o,s);var c=u.prototype;return c.$init=function(){const t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},c.pointExpandedR=function(t){const e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,r.select)(t.node().parentNode.parentNode).raise()},c.changeCursorPoint=function(){this.$$.$el.eventRect.style("cursor","pointer")},c.findClosest=function(e,n){var i=this;const o=this.$$;return e.filter(function(e){return t(this,i),e&&!o.isBarType(e.id)}.bind(this)).reduce(function(e,r){t(this,i);return o.dist(r,n)<this.getBubbleR(r)?r:e}.bind(this),0)},c.getBubbleR=function(e){var n=this;const i=this.options,o=i.minR,r=i.maxR,s=this.getZData(e);if(!s)return o;const u=this.$$.data.targets.reduce(function(e,i){let o=e[0],r=e[1];t(this,n);const s=this.getZData(i.values[0]);return[Math.min(o,s),Math.max(r,s)]}.bind(this),[1e4,0]),c=u[0],a=u[1],f=c>0&&a===c?0:s/a;return Math.abs(f)*(r-o)+o},c.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),o=o.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e={364:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(o,{default:function(){return u}});var r=i(364);let s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.11.0-next.2";let u=function(i){var o,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(o=u).prototype=Object.create(s.prototype),o.prototype.constructor=o,n(o,s);var c=u.prototype;return c.$init=function(){const t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},c.pointExpandedR=function(t){const e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,r.select)(t.node().parentNode.parentNode).raise()},c.changeCursorPoint=function(){this.$$.$el.eventRect.style("cursor","pointer")},c.findClosest=function(e,n){var i=this;const o=this.$$;return e.filter(function(e){return t(this,i),e&&!o.isBarType(e.id)}.bind(this)).reduce(function(e,r){t(this,i);return o.dist(r,n)<this.getBubbleR(r)?r:e}.bind(this),0)},c.getBubbleR=function(e){var n=this;const i=this.options,o=i.minR,r=i.maxR,s=this.getZData(e);if(!s)return o;const u=this.$$.data.targets.reduce(function(e,i){let o=e[0],r=e[1];t(this,n);const s=this.getZData(i.values[0]);return[Math.min(o,s),Math.max(r,s)]}.bind(this),[1e4,0]),c=u[0],a=u[1],f=c>0&&a===c?0:s/a;return Math.abs(f)*(r-o)+o},c.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),o=o.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -130,27 +130,27 @@ function _typeof(o) {
130
130
  }
131
131
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
132
132
 
133
- function _toPrimitive(input, hint) {
134
- if (_typeof(input) !== "object" || input === null) return input;
135
- var prim = input[Symbol.toPrimitive];
136
- if (prim !== undefined) {
137
- var res = prim.call(input, hint || "default");
138
- if (_typeof(res) !== "object") return res;
133
+ function toPrimitive(t, r) {
134
+ if ("object" != _typeof(t) || !t) return t;
135
+ var e = t[Symbol.toPrimitive];
136
+ if (void 0 !== e) {
137
+ var i = e.call(t, r || "default");
138
+ if ("object" != _typeof(i)) return i;
139
139
  throw new TypeError("@@toPrimitive must return a primitive value.");
140
140
  }
141
- return (hint === "string" ? String : Number)(input);
141
+ return ("string" === r ? String : Number)(t);
142
142
  }
143
143
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
144
144
 
145
145
 
146
- function _toPropertyKey(arg) {
147
- var key = _toPrimitive(arg, "string");
148
- return _typeof(key) === "symbol" ? key : String(key);
146
+ function toPropertyKey(t) {
147
+ var i = toPrimitive(t, "string");
148
+ return "symbol" == _typeof(i) ? i : String(i);
149
149
  }
150
150
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
151
151
 
152
152
  function _defineProperty(obj, key, value) {
153
- key = _toPropertyKey(key);
153
+ key = toPropertyKey(key);
154
154
  if (key in obj) {
155
155
  Object.defineProperty(obj, key, {
156
156
  value: value,
@@ -186,6 +186,7 @@ const $COMMON = {
186
186
  const $ARC = {
187
187
  arc: "bb-arc",
188
188
  arcLabelLine: "bb-arc-label-line",
189
+ arcRange: "bb-arc-range",
189
190
  arcs: "bb-arcs",
190
191
  chartArc: "bb-chart-arc",
191
192
  chartArcs: "bb-chart-arcs",
@@ -401,7 +402,7 @@ let Plugin = /*#__PURE__*/function () {
401
402
  };
402
403
  return Plugin;
403
404
  }();
404
- Plugin.version = "3.10.3";
405
+ Plugin.version = "3.11.0-next.2";
405
406
 
406
407
  ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
407
408
  /**
@@ -992,13 +993,14 @@ const toArray = function (v) {
992
993
  */
993
994
  function addCssRules(style, selector, prop) {
994
995
  var _this9 = this;
995
- const rootSelctor = style.rootSelctor,
996
+ const _style$rootSelector = style.rootSelector,
997
+ rootSelector = _style$rootSelector === void 0 ? "" : _style$rootSelector,
996
998
  sheet = style.sheet,
997
999
  getSelector = function (s) {
998
1000
  _newArrowCheck(this, _this9);
999
1001
  return s.replace(/\s?(bb-)/g, ".$1").replace(/\.+/g, ".");
1000
1002
  }.bind(this),
1001
- rule = rootSelctor + " " + getSelector(selector) + " {" + prop.join(";") + "}";
1003
+ rule = rootSelector + " " + getSelector(selector) + " {" + prop.join(";") + "}";
1002
1004
  return sheet[sheet.insertRule ? "insertRule" : "addRule"](rule, sheet.cssRules.length);
1003
1005
  }
1004
1006
 
@@ -1025,6 +1027,20 @@ function getCssRules(styleSheets) {
1025
1027
  return rules;
1026
1028
  }
1027
1029
 
1030
+ /**
1031
+ * Get current window and container scroll position
1032
+ * @param {HTMLElement} node Target element
1033
+ * @returns {object} window scroll position
1034
+ * @private
1035
+ */
1036
+ function getScrollPosition(node) {
1037
+ var _ref2, _ref3, _window$pageXOffset, _ref4, _ref5, _window$pageYOffset;
1038
+ return {
1039
+ x: (_ref2 = ((_ref3 = (_window$pageXOffset = win.pageXOffset) != null ? _window$pageXOffset : win.scrollX) != null ? _ref3 : 0) + node.scrollLeft) != null ? _ref2 : 0,
1040
+ y: (_ref4 = ((_ref5 = (_window$pageYOffset = win.pageYOffset) != null ? _window$pageYOffset : win.scrollY) != null ? _ref5 : 0) + node.scrollTop) != null ? _ref4 : 0
1041
+ };
1042
+ }
1043
+
1028
1044
  /**
1029
1045
  * Gets the SVGMatrix of an SVGGElement
1030
1046
  * @param {SVGElement} node Node element
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.sparkline=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return n[t](o,o.exports,r),o.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e,n=1;n<arguments.length;n++)e=null!=arguments[n]?arguments[n]:{},n%2?c(Object(e),!0).forEach((function(n){var i,r,o;i=t,r=n,o=e[n],(r=s(r))in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}r.d(o,{default:function(){return _}});const l={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"};a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},l),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"});let b=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();b.version="3.10.3";let u=function(){return{selector:void 0}};r(288),r(514);const d="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),h=null==d?void 0:d.document,f=function(e){var n=this;const i="function"==typeof(null==e?void 0:e.requestAnimationFrame)&&"function"==typeof(null==e?void 0:e.cancelAnimationFrame),r="function"==typeof(null==e?void 0:e.requestIdleCallback)&&"function"==typeof(null==e?void 0:e.cancelIdleCallback),o=function(e){return t(this,n),setTimeout(e,1)}.bind(this),s=function(e){return t(this,n),clearTimeout(e)}.bind(this);return[i?e.requestAnimationFrame:o,i?e.cancelAnimationFrame:s,r?e.requestIdleCallback:o,r?e.cancelIdleCallback:s]}(d);f[0],f[1],f[2],f[3];var p=void 0;(function(e){return t(this,p),e||0===e}).bind(void 0),function(e){return t(this,p),"function"==typeof e}.bind(void 0);const g=function(e){return t(this,p),"string"==typeof e}.bind(void 0),v=function(e){return t(this,p),"number"==typeof e}.bind(void 0),y=function(e){return t(this,p),void 0===e}.bind(void 0),m=function(e){return t(this,p),void 0!==e}.bind(void 0),x=(function(e){return t(this,p),"boolean"==typeof e}.bind(void 0),function(e){return t(this,p),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,p),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,p),e[1]-e[0]}.bind(void 0),function(e){return t(this,p),"object"==typeof e}.bind(void 0)),O=function(e){return t(this,p),y(e)||null===e||g(e)&&0===e.length||x(e)&&!(e instanceof Date)&&0===Object.keys(e).length||v(e)&&isNaN(e)}.bind(void 0),w=(function(e){return t(this,p),!O(e)}.bind(void 0),function(e){return t(this,p),Array.isArray(e)}.bind(void 0)),j=function(e){return t(this,p),e&&!(null!=e&&e.nodeType)&&x(e)&&!w(e)}.bind(void 0);(function(e){return t(this,p),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,p),[].slice.call(e)}).bind(void 0);function $(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;const s=r.shift();return j(e)&&j(s)&&Object.keys(s).forEach(function(i){t(this,n);const r=s[i];j(r)?(e[i]||(e[i]={}),e[i]=$(e[i],r)):e[i]=w(r)?r.concat():r}.bind(this)),$.apply(void 0,[e].concat(r))}(function(e,n,i){void 0===i&&(i=1),t(this,p);const r=[],o=0|Math.max(0,Math.ceil((n-e)/i));for(let t=e;t<o;t++)r.push(e+t*i);return r}).bind(void 0),function(){var e=this;t(this,p);const n=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),t(this,e),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),t(this,e);const s=h.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,d,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}.bind(void 0)(),function(e,n,i){t(this,p);const r=new Touch($({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function E(e){var n=this;const i=this.config;let r,o,s;const c=function(){t(this,n);const e=o.shift();return e&&r&&x(r)&&e in r?(r=r[e],c()):e?void 0:r}.bind(this);Object.keys(i).forEach(function(a){t(this,n),r=e,o=a.split("_"),s=c(),m(s)&&(i[a]=s)}.bind(this)),this.api&&(this.state.orgConfig=e)}let _=function(i){var r,o;function s(t){var n=i.call(this,t)||this;return n.config=void 0,n.element=void 0,n.config=new u,e(n)||e(n)}o=i,(r=s).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var c=s.prototype;return c.$beforeInit=function(){E.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},c.validate=function(){const t=this.$$,e=this.config;let n="";if(e.selector&&document.querySelector(e.selector)||(n="No holder elements found from given selector option."),(t.hasType("bubble")||t.hasType("scatter")||t.hasArcType(t.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},c.overrideInternals=function(){const t=this.$$,e=t.getBarW,n=t.getIndices;t.getIndices=function(t,e,i){return"getShapeX"===i?{}:n.call(this,t,e)},t.getBarW=function(t,n){return e.call(this,t,n,1)}},c.overrideOptions=function(){var e=this;const n=this.$$.config;if(n.legend_show=!1,n.resize_auto=!1,n.axis_x_show=!1,!1!==n.padding){const i=function(n){return t(this,e),Object.keys(n||{}).length>0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(t,e,n){const i=this.internal.state.event;let r=i.pageY-1.35*n,o=i.pageX-e/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},c.$init=function(){var t;const e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(t=e.tooltip)?void 0:t.node())&&document.body.appendChild(e.tooltip.node())},c.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},c.bindEvents=function(e){var n=this;void 0===e&&(e=!0);const i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){const i=(e?"add":"remove")+"EventListener";this.element.forEach(function(e){t(this,n);const r=e.querySelector("svg");r[i]("mouseover",this.overHandler),r[i]("mousemove",this.moveHandler),r[i]("mouseout",this.outHandler)}.bind(this))}},c.overHandler=function(t){this.$$.state.eventReceiver.rect=t.target.getBoundingClientRect()},c.moveHandler=function(t){var e,n;const i=this.$$,r=i.getDataIndexFromEvent(t),o=null==(e=i.api.data(t.target.__id))?void 0:e[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=t,null!=i.isPointFocusOnly&&i.isPointFocusOnly()&&s&&(null==i.showCircleFocus||i.showCircleFocus([s])),i.setExpand(r,o.id,!0),i.showTooltip([s],t.target)},c.outHandler=function(t){const e=this.$$;e.state.event=t,e.isPointFocusOnly()?e.hideCircleFocus():e.unexpandCircles(),e.hideTooltip()},c.$redraw=function(){var e,n=this;const i=this.$$,r=i.$el;let o=this.element;const s=i.api.data(),c=null==(e=r.chart.html().match(/<svg[^>]*>/))?void 0:e[0];if(o.length<s.length){const t=r.chart.node();for(let e=s.length-o.length;e>0;e--)t.parentNode.insertBefore(o[0].cloneNode(),t.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(e){return t(this,n),e.id}.bind(this)).forEach(function(e,i){t(this,n);const s="."+l.target+"-"+e,a=r.main.selectAll(s);let b=o[i].querySelector("svg");b||(o[i].innerHTML=c+"</svg>",b=o[i].querySelector("svg"),b.__id=e),b.querySelector(s)||a.style("opacity",null),a.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(a.node())}.bind(this))},c.$willDestroy=function(){var e=this;this.bindEvents(!1),this.element.forEach(function(n){t(this,e),n.innerHTML=""}.bind(this))},s}(b);_.version="0.0.1"}(),o=o.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.sparkline=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={624:function(t){t.exports=e},364:function(e){e.exports=t}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return n[t](o,o.exports,r),o.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:String(e)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e,n=1;n<arguments.length;n++)e=null!=arguments[n]?arguments[n]:{},n%2?c(Object(e),!0).forEach((function(n){var i,r,o;i=t,r=n,o=e[n],(r=s(r))in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}r.d(o,{default:function(){return _}});const l={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"};a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},l),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"});let b=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();b.version="3.11.0-next.2";let u=function(){return{selector:void 0}};r(364),r(624);const d="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),h=null==d?void 0:d.document,f=function(e){var n=this;const i="function"==typeof(null==e?void 0:e.requestAnimationFrame)&&"function"==typeof(null==e?void 0:e.cancelAnimationFrame),r="function"==typeof(null==e?void 0:e.requestIdleCallback)&&"function"==typeof(null==e?void 0:e.cancelIdleCallback),o=function(e){return t(this,n),setTimeout(e,1)}.bind(this),s=function(e){return t(this,n),clearTimeout(e)}.bind(this);return[i?e.requestAnimationFrame:o,i?e.cancelAnimationFrame:s,r?e.requestIdleCallback:o,r?e.cancelIdleCallback:s]}(d);f[0],f[1],f[2],f[3];var p=void 0;(function(e){return t(this,p),e||0===e}).bind(void 0),function(e){return t(this,p),"function"==typeof e}.bind(void 0);const g=function(e){return t(this,p),"string"==typeof e}.bind(void 0),v=function(e){return t(this,p),"number"==typeof e}.bind(void 0),y=function(e){return t(this,p),void 0===e}.bind(void 0),m=function(e){return t(this,p),void 0!==e}.bind(void 0),x=(function(e){return t(this,p),"boolean"==typeof e}.bind(void 0),function(e){return t(this,p),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,p),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,p),e[1]-e[0]}.bind(void 0),function(e){return t(this,p),"object"==typeof e}.bind(void 0)),O=function(e){return t(this,p),y(e)||null===e||g(e)&&0===e.length||x(e)&&!(e instanceof Date)&&0===Object.keys(e).length||v(e)&&isNaN(e)}.bind(void 0),w=(function(e){return t(this,p),!O(e)}.bind(void 0),function(e){return t(this,p),Array.isArray(e)}.bind(void 0)),j=function(e){return t(this,p),e&&!(null!=e&&e.nodeType)&&x(e)&&!w(e)}.bind(void 0);(function(e){return t(this,p),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,p),[].slice.call(e)}).bind(void 0);function $(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;const s=r.shift();return j(e)&&j(s)&&Object.keys(s).forEach(function(i){t(this,n);const r=s[i];j(r)?(e[i]||(e[i]={}),e[i]=$(e[i],r)):e[i]=w(r)?r.concat():r}.bind(this)),$.apply(void 0,[e].concat(r))}(function(e,n,i){void 0===i&&(i=1),t(this,p);const r=[],o=0|Math.max(0,Math.ceil((n-e)/i));for(let t=e;t<o;t++)r.push(e+t*i);return r}).bind(void 0),function(){var e=this;t(this,p);const n=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),t(this,e),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),t(this,e);const s=h.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,d,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}.bind(void 0)(),function(e,n,i){t(this,p);const r=new Touch($({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function E(e){var n=this;const i=this.config;let r,o,s;const c=function(){t(this,n);const e=o.shift();return e&&r&&x(r)&&e in r?(r=r[e],c()):e?void 0:r}.bind(this);Object.keys(i).forEach(function(a){t(this,n),r=e,o=a.split("_"),s=c(),m(s)&&(i[a]=s)}.bind(this)),this.api&&(this.state.orgConfig=e)}let _=function(i){var r,o;function s(t){var n=i.call(this,t)||this;return n.config=void 0,n.element=void 0,n.config=new u,e(n)||e(n)}o=i,(r=s).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var c=s.prototype;return c.$beforeInit=function(){E.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},c.validate=function(){const t=this.$$,e=this.config;let n="";if(e.selector&&document.querySelector(e.selector)||(n="No holder elements found from given selector option."),(t.hasType("bubble")||t.hasType("scatter")||t.hasArcType(t.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},c.overrideInternals=function(){const t=this.$$,e=t.getBarW,n=t.getIndices;t.getIndices=function(t,e,i){return"getShapeX"===i?{}:n.call(this,t,e)},t.getBarW=function(t,n){return e.call(this,t,n,1)}},c.overrideOptions=function(){var e=this;const n=this.$$.config;if(n.legend_show=!1,n.resize_auto=!1,n.axis_x_show=!1,!1!==n.padding){const i=function(n){return t(this,e),Object.keys(n||{}).length>0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(t,e,n){const i=this.internal.state.event;let r=i.pageY-1.35*n,o=i.pageX-e/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},c.$init=function(){var t;const e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(t=e.tooltip)?void 0:t.node())&&document.body.appendChild(e.tooltip.node())},c.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},c.bindEvents=function(e){var n=this;void 0===e&&(e=!0);const i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){const i=(e?"add":"remove")+"EventListener";this.element.forEach(function(e){t(this,n);const r=e.querySelector("svg");r[i]("mouseover",this.overHandler),r[i]("mousemove",this.moveHandler),r[i]("mouseout",this.outHandler)}.bind(this))}},c.overHandler=function(t){this.$$.state.eventReceiver.rect=t.target.getBoundingClientRect()},c.moveHandler=function(t){var e,n;const i=this.$$,r=i.getDataIndexFromEvent(t),o=null==(e=i.api.data(t.target.__id))?void 0:e[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=t,null!=i.isPointFocusOnly&&i.isPointFocusOnly()&&s&&(null==i.showCircleFocus||i.showCircleFocus([s])),i.setExpand(r,o.id,!0),i.showTooltip([s],t.target)},c.outHandler=function(t){const e=this.$$;e.state.event=t,e.isPointFocusOnly()?e.hideCircleFocus():e.unexpandCircles(),e.hideTooltip()},c.$redraw=function(){var e,n=this;const i=this.$$,r=i.$el;let o=this.element;const s=i.api.data(),c=null==(e=r.chart.html().match(/<svg[^>]*>/))?void 0:e[0];if(o.length<s.length){const t=r.chart.node();for(let e=s.length-o.length;e>0;e--)t.parentNode.insertBefore(o[0].cloneNode(),t.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(e){return t(this,n),e.id}.bind(this)).forEach(function(e,i){t(this,n);const s="."+l.target+"-"+e,a=r.main.selectAll(s);let b=o[i].querySelector("svg");b||(o[i].innerHTML=c+"</svg>",b=o[i].querySelector("svg"),b.__id=e),b.querySelector(s)||a.style("opacity",null),a.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(a.node())}.bind(this))},c.$willDestroy=function(){var e=this;this.bindEvents(!1),this.element.forEach(function(n){t(this,e),n.innerHTML=""}.bind(this))},s}(b);_.version="0.0.1"}(),o=o.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -167,27 +167,27 @@ function _typeof(o) {
167
167
  }
168
168
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
169
169
 
170
- function _toPrimitive(input, hint) {
171
- if (_typeof(input) !== "object" || input === null) return input;
172
- var prim = input[Symbol.toPrimitive];
173
- if (prim !== undefined) {
174
- var res = prim.call(input, hint || "default");
175
- if (_typeof(res) !== "object") return res;
170
+ function toPrimitive(t, r) {
171
+ if ("object" != _typeof(t) || !t) return t;
172
+ var e = t[Symbol.toPrimitive];
173
+ if (void 0 !== e) {
174
+ var i = e.call(t, r || "default");
175
+ if ("object" != _typeof(i)) return i;
176
176
  throw new TypeError("@@toPrimitive must return a primitive value.");
177
177
  }
178
- return (hint === "string" ? String : Number)(input);
178
+ return ("string" === r ? String : Number)(t);
179
179
  }
180
180
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
181
181
 
182
182
 
183
- function _toPropertyKey(arg) {
184
- var key = _toPrimitive(arg, "string");
185
- return _typeof(key) === "symbol" ? key : String(key);
183
+ function toPropertyKey(t) {
184
+ var i = toPrimitive(t, "string");
185
+ return "symbol" == _typeof(i) ? i : String(i);
186
186
  }
187
187
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
188
188
 
189
189
  function _defineProperty(obj, key, value) {
190
- key = _toPropertyKey(key);
190
+ key = toPropertyKey(key);
191
191
  if (key in obj) {
192
192
  Object.defineProperty(obj, key, {
193
193
  value: value,
@@ -223,6 +223,7 @@ const $COMMON = {
223
223
  const $ARC = {
224
224
  arc: "bb-arc",
225
225
  arcLabelLine: "bb-arc-label-line",
226
+ arcRange: "bb-arc-range",
226
227
  arcs: "bb-arcs",
227
228
  chartArc: "bb-chart-arc",
228
229
  chartArcs: "bb-chart-arcs",
@@ -925,13 +926,14 @@ const toArray = function (v) {
925
926
  */
926
927
  function addCssRules(style, selector, prop) {
927
928
  var _this9 = this;
928
- const rootSelctor = style.rootSelctor,
929
+ const _style$rootSelector = style.rootSelector,
930
+ rootSelector = _style$rootSelector === void 0 ? "" : _style$rootSelector,
929
931
  sheet = style.sheet,
930
932
  getSelector = function (s) {
931
933
  _newArrowCheck(this, _this9);
932
934
  return s.replace(/\s?(bb-)/g, ".$1").replace(/\.+/g, ".");
933
935
  }.bind(this),
934
- rule = rootSelctor + " " + getSelector(selector) + " {" + prop.join(";") + "}";
936
+ rule = rootSelector + " " + getSelector(selector) + " {" + prop.join(";") + "}";
935
937
  return sheet[sheet.insertRule ? "insertRule" : "addRule"](rule, sheet.cssRules.length);
936
938
  }
937
939
 
@@ -958,6 +960,20 @@ function getCssRules(styleSheets) {
958
960
  return rules;
959
961
  }
960
962
 
963
+ /**
964
+ * Get current window and container scroll position
965
+ * @param {HTMLElement} node Target element
966
+ * @returns {object} window scroll position
967
+ * @private
968
+ */
969
+ function getScrollPosition(node) {
970
+ var _ref2, _ref3, _window$pageXOffset, _ref4, _ref5, _window$pageYOffset;
971
+ return {
972
+ x: (_ref2 = ((_ref3 = (_window$pageXOffset = win.pageXOffset) != null ? _window$pageXOffset : win.scrollX) != null ? _ref3 : 0) + node.scrollLeft) != null ? _ref2 : 0,
973
+ y: (_ref4 = ((_ref5 = (_window$pageYOffset = win.pageYOffset) != null ? _window$pageYOffset : win.scrollY) != null ? _ref5 : 0) + node.scrollTop) != null ? _ref4 : 0
974
+ };
975
+ }
976
+
961
977
  /**
962
978
  * Gets the SVGMatrix of an SVGGElement
963
979
  * @param {SVGElement} node Node element
@@ -1414,7 +1430,7 @@ let Plugin = /*#__PURE__*/function () {
1414
1430
  };
1415
1431
  return Plugin;
1416
1432
  }();
1417
- Plugin.version = "3.10.3";
1433
+ Plugin.version = "3.11.0-next.2";
1418
1434
 
1419
1435
  ;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts
1420
1436
  /**
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,n,i,r,o,s){return function(){"use strict";var a={272:function(t){t.exports=o},514:function(t){t.exports=r},947:function(t){t.exports=e},936:function(t){t.exports=s},560:function(e){e.exports=t},379:function(t){t.exports=n},288:function(t){t.exports=i}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var n=c[t]={exports:{}};return a[t](n,n.exports,l),n.exports}l.d=function(t,e){for(var n in e)l.o(e,n)&&!l.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}l.d(b,{default:function(){return G}});var i=l(560),r=l(947),o=l(379);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function u(t){for(var e,n=1;n<arguments.length;n++)e=null!=arguments[n]?arguments[n]:{},n%2?c(Object(e),!0).forEach((function(n){var i,r,o;i=t,r=n,o=e[n],(r=a(r))in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}const d={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"};u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u({},{button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"}),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),d),{treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),l(288),l(514);const h="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),f=null==h?void 0:h.document,p=function(e){var n=this;const i="function"==typeof(null==e?void 0:e.requestAnimationFrame)&&"function"==typeof(null==e?void 0:e.cancelAnimationFrame),r="function"==typeof(null==e?void 0:e.requestIdleCallback)&&"function"==typeof(null==e?void 0:e.cancelIdleCallback),o=function(e){return t(this,n),setTimeout(e,1)}.bind(this),s=function(e){return t(this,n),clearTimeout(e)}.bind(this);return[i?e.requestAnimationFrame:o,i?e.cancelAnimationFrame:s,r?e.requestIdleCallback:o,r?e.cancelIdleCallback:s]}(h);p[0],p[1],p[2],p[3];var g=void 0;(function(e){return t(this,g),e||0===e}).bind(void 0);const v=function(e){return t(this,g),"function"==typeof e}.bind(void 0),y=function(e){return t(this,g),"string"==typeof e}.bind(void 0),m=function(e){return t(this,g),"number"==typeof e}.bind(void 0),x=function(e){return t(this,g),void 0===e}.bind(void 0),w=function(e){return t(this,g),void 0!==e}.bind(void 0),S=(function(e){return t(this,g),"boolean"==typeof e}.bind(void 0),function(e){return t(this,g),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,g),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,g),e[1]-e[0]}.bind(void 0),function(e){return t(this,g),"object"==typeof e}.bind(void 0)),_=function(e){return t(this,g),x(e)||null===e||y(e)&&0===e.length||S(e)&&!(e instanceof Date)&&0===Object.keys(e).length||m(e)&&isNaN(e)}.bind(void 0),E=(function(e){return t(this,g),!_(e)}.bind(void 0),function(e){return t(this,g),Array.isArray(e)}.bind(void 0)),j=function(e){return t(this,g),e&&!(null!=e&&e.nodeType)&&S(e)&&!E(e)}.bind(void 0);(function(e){return t(this,g),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,g),[].slice.call(e)}).bind(void 0);function O(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;const s=r.shift();return j(e)&&j(s)&&Object.keys(s).forEach(function(i){t(this,n);const r=s[i];j(r)?(e[i]||(e[i]={}),e[i]=O(e[i],r)):e[i]=E(r)?r.concat():r}.bind(this)),O.apply(void 0,[e].concat(r))}const C=function(e,n,i){void 0===i&&(i=1),t(this,g);const r=[],o=0|Math.max(0,Math.ceil((n-e)/i));for(let t=e;t<o;t++)r.push(e+t*i);return r}.bind(void 0);(function(){var e=this;t(this,g);const n=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),t(this,e),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),t(this,e);const s=f.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,h,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}).bind(void 0)(),function(e,n,i){t(this,g);const r=new Touch(O({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function $(t){let e;if(t instanceof Date)e=t;else if(y(t)){var n;const i=this.config;e=null!=(n=this.format.dataTime(i.data_xFormat)(t))?n:new Date(t)}else m(t)&&!isNaN(t)&&(e=new Date(+t));return e&&!isNaN(+e)||console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function k(e){var n=this;const i=this.config;let r,o,s;const a=function(){t(this,n);const e=o.shift();return e&&r&&S(r)&&e in r?(r=r[e],a()):e?void 0:r}.bind(this);Object.keys(i).forEach(function(c){t(this,n),r=e,o=c.split("_"),s=a(),w(s)&&(i[c]=s)}.bind(this)),this.api&&(this.state.orgConfig=e)}let T=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();T.version="3.10.3";let M=function(){return{colors:void 0,epochs:[],lines:[],scale_min:void 0,scale_max:void 0,scale_width:20,scale_format:void 0,padding_top:0,padding_right:0,padding_bottom:0,padding_left:0,regions:[]}};var P="bb-colorscale",A="bb-stanford-elements",D="bb-stanford-line",q="bb-stanford-lines",L="bb-stanford-region",F="bb-stanford-regions";function N(t,e){return t.epochs<e.epochs?-1:t.epochs>e.epochs?1:0}function I(t){const e=function(t){let e,n,i=0;for(let r=0,o=t.length,s=o-1;r<o;s=r,r++)e=t[r],n=t[s],i+=e.x*n.y,i-=e.y*n.x;return i/=2,i}(t);let n,i=0,r=0;for(let e=0,o=t.length,s=o-1;e<o;s=e,e++){const o=t[e],a=t[s];n=o.x*a.y-a.x*o.y,i+=(o.x+a.x)*n,r+=(o.y+a.y)*n}return n=6*e,{x:i/n,y:r/n}}let R=function(){function e(t){this.owner=void 0,this.owner=t;const e=t.$$.$el.main.select(".bb-chart").append("g").attr("class",A);e.append("g").attr("class",q),e.append("g").attr("class",F)}var n=e.prototype;return n.updateStanfordLines=function(e){var n=this;const i=this.owner.$$,r=i.config,o=i.$el.main,s=r.axis_rotated,a=this.xvCustom.bind(i),c=this.yvCustom.bind(i),l=o.select("."+q).style("shape-rendering","geometricprecision").selectAll("."+D).data(this.owner.config.lines);l.exit().transition().duration(e).style("opacity","0").remove();const b=l.enter().append("g");b.append("line").style("opacity","0"),b.merge(l).attr("class",function(e){return t(this,n),D+(e.class?" "+e.class:"")}.bind(this)).select("line").transition().duration(e).attr("x1",function(e){t(this,n);return s?c(e,"y1"):a(e,"x1")}.bind(this)).attr("x2",function(e){return t(this,n),s?c(e,"y2"):a(e,"x2")}.bind(this)).attr("y1",function(e){t(this,n);return s?a(e,"x1"):c(e,"y1")}.bind(this)).attr("y2",function(e){return t(this,n),s?a(e,"x2"):c(e,"y2")}.bind(this)).transition().style("opacity",null)},n.updateStanfordRegions=function(e){var n=this;const i=this.owner.$$,r=i.config,o=i.$el.main,s=r.axis_rotated,a=this.xvCustom.bind(i),c=this.yvCustom.bind(i),l=this.owner.countEpochsInRegion.bind(i);let b=o.select("."+F).selectAll("."+L).data(this.owner.config.regions);b.exit().transition().duration(e).style("opacity","0").remove();const u=b.enter().append("g");u.append("polygon").style("opacity","0"),u.append("text").attr("transform",s?"rotate(-90)":"").style("opacity","0"),b=u.merge(b),b.attr("class",function(e){return t(this,n),L+(e.class?" "+e.class:"")}.bind(this)).select("polygon").transition().duration(e).attr("points",function(e){var i=this;return t(this,n),e.points.map(function(e){return t(this,i),[s?c(e,"y"):a(e,"x"),s?a(e,"x"):c(e,"y")].join(",")}.bind(this)).join(" ")}.bind(this)).transition().style("opacity",function(e){return t(this,n),(e.opacity?e.opacity:.2)+""}.bind(this)),b.select("text").transition().duration(e).attr("x",function(e){return t(this,n),s?c(I(e.points),"y"):a(I(e.points),"x")}.bind(this)).attr("y",function(e){return t(this,n),s?a(I(e.points),"x"):c(I(e.points),"y")}.bind(this)).text(function(e){if(t(this,n),e.text){const t=l(e.points),n=t.value,i=t.percentage;return e.text(n,i)}return""}.bind(this)).attr("text-anchor","middle").attr("dominant-baseline","middle").transition().style("opacity",null)},n.updateStanfordElements=function(t){void 0===t&&(t=0),this.updateStanfordLines(t),this.updateStanfordRegions(t)},n.xvCustom=function(t,e){const n=this,i=n.axis,r=n.config;let o=e?t[e]:n.getBaseValue(t);return i.isTimeSeries()?o=$.call(n,o):i.isCategorized()&&y(o)&&(o=r.axis_x_categories.indexOf(t.value)),Math.ceil(n.scale.x(o))},n.yvCustom=function(t,e){const n=this,i=t.axis&&"y2"===t.axis?n.scale.y2:n.scale.y,r=e?t[e]:n.getBaseValue(t);return Math.ceil(i(r))},e}();var B=l(272),X=l(936);let Y=function(){function e(t){this.owner=void 0,this.colorScale=void 0,this.owner=t}var n=e.prototype;return n.drawColorScale=function(){var e=this;const n=this.owner,i=n.$$,r=n.config,s=i.data.targets[0],a=i.state.height-r.padding_bottom-r.padding_top,c=r.scale_width,l=C(r.padding_bottom,a,5),b=(0,o.scaleSequential)(s.colors).domain([l[l.length-1],l[0]]);this.colorScale&&this.colorScale.remove(),this.colorScale=i.$el.svg.append("g").attr("width",50).attr("height",a).attr("class",P),this.colorScale.append("g").attr("transform","translate(0, "+r.padding_top+")").selectAll("bars").data(l).enter().append("rect").attr("y",function(n,i){return t(this,e),5*i}.bind(this)).attr("x",0).attr("width",c).attr("height",5).attr("fill",function(n){return t(this,e),b(n)}.bind(this));const u=(0,o.scaleSymlog)().domain([s.minEpochs,s.maxEpochs]).range([l[0]+r.padding_top+l[l.length-1]+5-1,l[0]+r.padding_top]),d=(0,B.axisRight)(u),h=r.scale_format;"pow10"===h?d.tickValues([1,10,100,1e3,1e4,1e5,1e6,1e7]):v(h)?d.tickFormat(h):d.tickFormat((0,X.format)("d"));const f=this.colorScale.append("g").attr("class","legend axis").attr("transform","translate("+c+",0)").call(d);"pow10"===h&&f.selectAll(".tick text").text(null).filter(function(n){return t(this,e),n/Math.pow(10,Math.ceil(Math.log(n)/Math.LN10-1e-12))==1}.bind(this)).text(10).append("tspan").attr("dy","-.7em").text(function(n){return t(this,e),Math.round(Math.log(n)/Math.LN10)}.bind(this)),this.colorScale.attr("transform","translate("+(i.state.current.width-this.xForColorScale())+", 0)")},n.xForColorScale=function(){return this.owner.config.padding_right+this.colorScale.node().getBBox().width},n.getColorScalePadding=function(){return this.xForColorScale()+this.owner.config.padding_left+20},e}(),G=function(s){var a,c;function l(t){var n=s.call(this,t)||this;return n.config=void 0,n.colorScale=void 0,n.elements=void 0,n.config=new M,e(n)||e(n)}c=s,(a=l).prototype=Object.create(c.prototype),a.prototype.constructor=a,n(a,c);var b=l.prototype;return b.$beforeInit=function(){var e=this;const n=this.$$;n.config.data_xSort=!1,n.isMultipleX=function(){return t(this,e),!0}.bind(this),n.showGridFocus=function(){t(this,e)}.bind(this),n.labelishData=function(n){return t(this,e),n.values}.bind(this),n.opacityForCircle=function(){return t(this,e),1}.bind(this);const i=n.getCurrentPadding.bind(n);n.getCurrentPadding=function(){t(this,e);const n=i();return n.right+=this.colorScale?this.colorScale.getColorScalePadding():0,n}.bind(this)},b.$init=function(){const t=this.$$;k.call(this,this.options),t.color=this.getStanfordPointColor.bind(t),this.colorScale=new Y(this),this.elements=new R(this),this.convertData(),this.initStanfordData(),this.setStanfordTooltip(),this.colorScale.drawColorScale(),t.right+=this.colorScale?this.colorScale.getColorScalePadding():0,this.$redraw()},b.$redraw=function(t){var e,n;null==(e=this.colorScale)||e.drawColorScale(),null==(n=this.elements)||n.updateStanfordElements(t)},b.getOptions=function(){return new M},b.convertData=function(){var e=this;const n=this.$$.data.targets,i=this.options.epochs;n.forEach(function(n){var r=this;t(this,e),n.values.forEach(function(e,n){t(this,r),e.epochs=i[n]}.bind(this)),n.minEpochs=void 0,n.maxEpochs=void 0,n.colors=void 0,n.colorscale=void 0}.bind(this))},b.initStanfordData=function(){var e=this;const n=this.config,s=this.$$.data.targets[0];s.values.sort(N);const a=s.values.map(function(n){return t(this,e),n.epochs}.bind(this));s.minEpochs=isNaN(n.scale_min)?Math.min.apply(Math,a):n.scale_min,s.maxEpochs=isNaN(n.scale_max)?Math.max.apply(Math,a):n.scale_max,s.colors=v(n.colors)?n.colors:(0,i.interpolateHslLong)((0,r.hsl)(250,1,.5),(0,r.hsl)(0,1,.5)),s.colorscale=(0,o.scaleSequentialLog)(s.colors).domain([s.minEpochs,s.maxEpochs])},b.getStanfordPointColor=function(t){return this.data.targets[0].colorscale(t.epochs)},b.setStanfordTooltip=function(){const e=this.$$.config;_(e.tooltip_contents)&&(e.tooltip_contents=function(n,i,r,o){var s=this;const a=e.data_x;let c='<table class="'+d.tooltip+'"><tbody>';return n.forEach(function(e){t(this,s);const n=e.id,l=void 0===n?"":n,b=e.value,u=void 0===b?0:b,h=e.epochs,f=void 0===h?0:h,p=e.x;c+="<tr>\n\t\t\t\t\t\t\t<th>"+(a||"")+'</th>\n\t\t\t\t\t\t\t<th class="value">'+i(void 0===p?"":p)+"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>"+e.id+'</th>\n\t\t\t\t\t\t\t<th class="value">'+r(u)+'</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class="'+d.tooltipName+"-"+l+'">\n\t\t\t\t\t\t\t<td class="name"><span style="background-color:'+o(e)+'"></span>Epochs</td>\n\t\t\t\t\t\t\t<td class="value">'+r(f)+"</td>\n\t\t\t\t\t\t</tr>"}.bind(this)),c+"</tbody></table>"})},b.countEpochsInRegion=function(e){var n=this;const i=this.data.targets[0],r=i.values.reduce(function(e,i){return t(this,n),e+ +i.epochs}.bind(this),0),o=i.values.reduce(function(i,r){return t(this,n),function(t,e){const n=t.x,i=t.value;let r=!1;for(let t=0,o=e.length-1;t<e.length;o=t++){const s=e[t].x,a=e[t].y,c=e[o].x,l=e[o].y;a>i!=l>i&&n<(c-s)*(i-a)/(l-a)+s&&(r=!r)}return r}(r,e)?i+ +r.epochs:i}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(T)}(),b=b.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,n,i,r,o,s){return function(){"use strict";var a={640:function(t){t.exports=o},624:function(t){t.exports=r},240:function(t){t.exports=e},368:function(t){t.exports=s},720:function(e){e.exports=t},568:function(t){t.exports=n},364:function(t){t.exports=i}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var n=c[t]={exports:{}};return a[t](n,n.exports,l),n.exports}l.d=function(t,e){for(var n in e)l.o(e,n)&&!l.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}l.d(b,{default:function(){return G}});var i=l(720),r=l(240),o=l(568);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:String(e)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function u(t){for(var e,n=1;n<arguments.length;n++)e=null!=arguments[n]?arguments[n]:{},n%2?c(Object(e),!0).forEach((function(n){var i,r,o;i=t,r=n,o=e[n],(r=a(r))in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}const d={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"};u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u({},{button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"}),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),d),{treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),l(364),l(624);const h="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),f=null==h?void 0:h.document,p=function(e){var n=this;const i="function"==typeof(null==e?void 0:e.requestAnimationFrame)&&"function"==typeof(null==e?void 0:e.cancelAnimationFrame),r="function"==typeof(null==e?void 0:e.requestIdleCallback)&&"function"==typeof(null==e?void 0:e.cancelIdleCallback),o=function(e){return t(this,n),setTimeout(e,1)}.bind(this),s=function(e){return t(this,n),clearTimeout(e)}.bind(this);return[i?e.requestAnimationFrame:o,i?e.cancelAnimationFrame:s,r?e.requestIdleCallback:o,r?e.cancelIdleCallback:s]}(h);p[0],p[1],p[2],p[3];var g=void 0;(function(e){return t(this,g),e||0===e}).bind(void 0);const v=function(e){return t(this,g),"function"==typeof e}.bind(void 0),y=function(e){return t(this,g),"string"==typeof e}.bind(void 0),m=function(e){return t(this,g),"number"==typeof e}.bind(void 0),x=function(e){return t(this,g),void 0===e}.bind(void 0),w=function(e){return t(this,g),void 0!==e}.bind(void 0),S=(function(e){return t(this,g),"boolean"==typeof e}.bind(void 0),function(e){return t(this,g),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,g),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,g),e[1]-e[0]}.bind(void 0),function(e){return t(this,g),"object"==typeof e}.bind(void 0)),_=function(e){return t(this,g),x(e)||null===e||y(e)&&0===e.length||S(e)&&!(e instanceof Date)&&0===Object.keys(e).length||m(e)&&isNaN(e)}.bind(void 0),E=(function(e){return t(this,g),!_(e)}.bind(void 0),function(e){return t(this,g),Array.isArray(e)}.bind(void 0)),j=function(e){return t(this,g),e&&!(null!=e&&e.nodeType)&&S(e)&&!E(e)}.bind(void 0);(function(e){return t(this,g),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,g),[].slice.call(e)}).bind(void 0);function O(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;const s=r.shift();return j(e)&&j(s)&&Object.keys(s).forEach(function(i){t(this,n);const r=s[i];j(r)?(e[i]||(e[i]={}),e[i]=O(e[i],r)):e[i]=E(r)?r.concat():r}.bind(this)),O.apply(void 0,[e].concat(r))}const C=function(e,n,i){void 0===i&&(i=1),t(this,g);const r=[],o=0|Math.max(0,Math.ceil((n-e)/i));for(let t=e;t<o;t++)r.push(e+t*i);return r}.bind(void 0);(function(){var e=this;t(this,g);const n=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),t(this,e),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),t(this,e);const s=f.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,h,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}).bind(void 0)(),function(e,n,i){t(this,g);const r=new Touch(O({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function $(t){let e;if(t instanceof Date)e=t;else if(y(t)){var n;const i=this.config;e=null!=(n=this.format.dataTime(i.data_xFormat)(t))?n:new Date(t)}else m(t)&&!isNaN(t)&&(e=new Date(+t));return e&&!isNaN(+e)||console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function k(e){var n=this;const i=this.config;let r,o,s;const a=function(){t(this,n);const e=o.shift();return e&&r&&S(r)&&e in r?(r=r[e],a()):e?void 0:r}.bind(this);Object.keys(i).forEach(function(c){t(this,n),r=e,o=c.split("_"),s=a(),w(s)&&(i[c]=s)}.bind(this)),this.api&&(this.state.orgConfig=e)}let T=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();T.version="3.11.0-next.2";let M=function(){return{colors:void 0,epochs:[],lines:[],scale_min:void 0,scale_max:void 0,scale_width:20,scale_format:void 0,padding_top:0,padding_right:0,padding_bottom:0,padding_left:0,regions:[]}};var P="bb-colorscale",A="bb-stanford-elements",D="bb-stanford-line",q="bb-stanford-lines",L="bb-stanford-region",F="bb-stanford-regions";function N(t,e){return t.epochs<e.epochs?-1:t.epochs>e.epochs?1:0}function I(t){const e=function(t){let e,n,i=0;for(let r=0,o=t.length,s=o-1;r<o;s=r,r++)e=t[r],n=t[s],i+=e.x*n.y,i-=e.y*n.x;return i/=2,i}(t);let n,i=0,r=0;for(let e=0,o=t.length,s=o-1;e<o;s=e,e++){const o=t[e],a=t[s];n=o.x*a.y-a.x*o.y,i+=(o.x+a.x)*n,r+=(o.y+a.y)*n}return n=6*e,{x:i/n,y:r/n}}let R=function(){function e(t){this.owner=void 0,this.owner=t;const e=t.$$.$el.main.select(".bb-chart").append("g").attr("class",A);e.append("g").attr("class",q),e.append("g").attr("class",F)}var n=e.prototype;return n.updateStanfordLines=function(e){var n=this;const i=this.owner.$$,r=i.config,o=i.$el.main,s=r.axis_rotated,a=this.xvCustom.bind(i),c=this.yvCustom.bind(i),l=o.select("."+q).style("shape-rendering","geometricprecision").selectAll("."+D).data(this.owner.config.lines);l.exit().transition().duration(e).style("opacity","0").remove();const b=l.enter().append("g");b.append("line").style("opacity","0"),b.merge(l).attr("class",function(e){return t(this,n),D+(e.class?" "+e.class:"")}.bind(this)).select("line").transition().duration(e).attr("x1",function(e){t(this,n);return s?c(e,"y1"):a(e,"x1")}.bind(this)).attr("x2",function(e){return t(this,n),s?c(e,"y2"):a(e,"x2")}.bind(this)).attr("y1",function(e){t(this,n);return s?a(e,"x1"):c(e,"y1")}.bind(this)).attr("y2",function(e){return t(this,n),s?a(e,"x2"):c(e,"y2")}.bind(this)).transition().style("opacity",null)},n.updateStanfordRegions=function(e){var n=this;const i=this.owner.$$,r=i.config,o=i.$el.main,s=r.axis_rotated,a=this.xvCustom.bind(i),c=this.yvCustom.bind(i),l=this.owner.countEpochsInRegion.bind(i);let b=o.select("."+F).selectAll("."+L).data(this.owner.config.regions);b.exit().transition().duration(e).style("opacity","0").remove();const u=b.enter().append("g");u.append("polygon").style("opacity","0"),u.append("text").attr("transform",s?"rotate(-90)":"").style("opacity","0"),b=u.merge(b),b.attr("class",function(e){return t(this,n),L+(e.class?" "+e.class:"")}.bind(this)).select("polygon").transition().duration(e).attr("points",function(e){var i=this;return t(this,n),e.points.map(function(e){return t(this,i),[s?c(e,"y"):a(e,"x"),s?a(e,"x"):c(e,"y")].join(",")}.bind(this)).join(" ")}.bind(this)).transition().style("opacity",function(e){return t(this,n),(e.opacity?e.opacity:.2)+""}.bind(this)),b.select("text").transition().duration(e).attr("x",function(e){return t(this,n),s?c(I(e.points),"y"):a(I(e.points),"x")}.bind(this)).attr("y",function(e){return t(this,n),s?a(I(e.points),"x"):c(I(e.points),"y")}.bind(this)).text(function(e){if(t(this,n),e.text){const t=l(e.points),n=t.value,i=t.percentage;return e.text(n,i)}return""}.bind(this)).attr("text-anchor","middle").attr("dominant-baseline","middle").transition().style("opacity",null)},n.updateStanfordElements=function(t){void 0===t&&(t=0),this.updateStanfordLines(t),this.updateStanfordRegions(t)},n.xvCustom=function(t,e){const n=this,i=n.axis,r=n.config;let o=e?t[e]:n.getBaseValue(t);return i.isTimeSeries()?o=$.call(n,o):i.isCategorized()&&y(o)&&(o=r.axis_x_categories.indexOf(t.value)),Math.ceil(n.scale.x(o))},n.yvCustom=function(t,e){const n=this,i=t.axis&&"y2"===t.axis?n.scale.y2:n.scale.y,r=e?t[e]:n.getBaseValue(t);return Math.ceil(i(r))},e}();var B=l(640),X=l(368);let Y=function(){function e(t){this.owner=void 0,this.colorScale=void 0,this.owner=t}var n=e.prototype;return n.drawColorScale=function(){var e=this;const n=this.owner,i=n.$$,r=n.config,s=i.data.targets[0],a=i.state.height-r.padding_bottom-r.padding_top,c=r.scale_width,l=C(r.padding_bottom,a,5),b=(0,o.scaleSequential)(s.colors).domain([l[l.length-1],l[0]]);this.colorScale&&this.colorScale.remove(),this.colorScale=i.$el.svg.append("g").attr("width",50).attr("height",a).attr("class",P),this.colorScale.append("g").attr("transform","translate(0, "+r.padding_top+")").selectAll("bars").data(l).enter().append("rect").attr("y",function(n,i){return t(this,e),5*i}.bind(this)).attr("x",0).attr("width",c).attr("height",5).attr("fill",function(n){return t(this,e),b(n)}.bind(this));const u=(0,o.scaleSymlog)().domain([s.minEpochs,s.maxEpochs]).range([l[0]+r.padding_top+l[l.length-1]+5-1,l[0]+r.padding_top]),d=(0,B.axisRight)(u),h=r.scale_format;"pow10"===h?d.tickValues([1,10,100,1e3,1e4,1e5,1e6,1e7]):v(h)?d.tickFormat(h):d.tickFormat((0,X.format)("d"));const f=this.colorScale.append("g").attr("class","legend axis").attr("transform","translate("+c+",0)").call(d);"pow10"===h&&f.selectAll(".tick text").text(null).filter(function(n){return t(this,e),n/Math.pow(10,Math.ceil(Math.log(n)/Math.LN10-1e-12))==1}.bind(this)).text(10).append("tspan").attr("dy","-.7em").text(function(n){return t(this,e),Math.round(Math.log(n)/Math.LN10)}.bind(this)),this.colorScale.attr("transform","translate("+(i.state.current.width-this.xForColorScale())+", 0)")},n.xForColorScale=function(){return this.owner.config.padding_right+this.colorScale.node().getBBox().width},n.getColorScalePadding=function(){return this.xForColorScale()+this.owner.config.padding_left+20},e}(),G=function(s){var a,c;function l(t){var n=s.call(this,t)||this;return n.config=void 0,n.colorScale=void 0,n.elements=void 0,n.config=new M,e(n)||e(n)}c=s,(a=l).prototype=Object.create(c.prototype),a.prototype.constructor=a,n(a,c);var b=l.prototype;return b.$beforeInit=function(){var e=this;const n=this.$$;n.config.data_xSort=!1,n.isMultipleX=function(){return t(this,e),!0}.bind(this),n.showGridFocus=function(){t(this,e)}.bind(this),n.labelishData=function(n){return t(this,e),n.values}.bind(this),n.opacityForCircle=function(){return t(this,e),1}.bind(this);const i=n.getCurrentPadding.bind(n);n.getCurrentPadding=function(){t(this,e);const n=i();return n.right+=this.colorScale?this.colorScale.getColorScalePadding():0,n}.bind(this)},b.$init=function(){const t=this.$$;k.call(this,this.options),t.color=this.getStanfordPointColor.bind(t),this.colorScale=new Y(this),this.elements=new R(this),this.convertData(),this.initStanfordData(),this.setStanfordTooltip(),this.colorScale.drawColorScale(),t.right+=this.colorScale?this.colorScale.getColorScalePadding():0,this.$redraw()},b.$redraw=function(t){var e,n;null==(e=this.colorScale)||e.drawColorScale(),null==(n=this.elements)||n.updateStanfordElements(t)},b.getOptions=function(){return new M},b.convertData=function(){var e=this;const n=this.$$.data.targets,i=this.options.epochs;n.forEach(function(n){var r=this;t(this,e),n.values.forEach(function(e,n){t(this,r),e.epochs=i[n]}.bind(this)),n.minEpochs=void 0,n.maxEpochs=void 0,n.colors=void 0,n.colorscale=void 0}.bind(this))},b.initStanfordData=function(){var e=this;const n=this.config,s=this.$$.data.targets[0];s.values.sort(N);const a=s.values.map(function(n){return t(this,e),n.epochs}.bind(this));s.minEpochs=isNaN(n.scale_min)?Math.min.apply(Math,a):n.scale_min,s.maxEpochs=isNaN(n.scale_max)?Math.max.apply(Math,a):n.scale_max,s.colors=v(n.colors)?n.colors:(0,i.interpolateHslLong)((0,r.hsl)(250,1,.5),(0,r.hsl)(0,1,.5)),s.colorscale=(0,o.scaleSequentialLog)(s.colors).domain([s.minEpochs,s.maxEpochs])},b.getStanfordPointColor=function(t){return this.data.targets[0].colorscale(t.epochs)},b.setStanfordTooltip=function(){const e=this.$$.config;_(e.tooltip_contents)&&(e.tooltip_contents=function(n,i,r,o){var s=this;const a=e.data_x;let c='<table class="'+d.tooltip+'"><tbody>';return n.forEach(function(e){t(this,s);const n=e.id,l=void 0===n?"":n,b=e.value,u=void 0===b?0:b,h=e.epochs,f=void 0===h?0:h,p=e.x;c+="<tr>\n\t\t\t\t\t\t\t<th>"+(a||"")+'</th>\n\t\t\t\t\t\t\t<th class="value">'+i(void 0===p?"":p)+"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>"+e.id+'</th>\n\t\t\t\t\t\t\t<th class="value">'+r(u)+'</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class="'+d.tooltipName+"-"+l+'">\n\t\t\t\t\t\t\t<td class="name"><span style="background-color:'+o(e)+'"></span>Epochs</td>\n\t\t\t\t\t\t\t<td class="value">'+r(f)+"</td>\n\t\t\t\t\t\t</tr>"}.bind(this)),c+"</tbody></table>"})},b.countEpochsInRegion=function(e){var n=this;const i=this.data.targets[0],r=i.values.reduce(function(e,i){return t(this,n),e+ +i.epochs}.bind(this),0),o=i.values.reduce(function(i,r){return t(this,n),function(t,e){const n=t.x,i=t.value;let r=!1;for(let t=0,o=e.length-1;t<e.length;o=t++){const s=e[t].x,a=e[t].y,c=e[o].x,l=e[o].y;a>i!=l>i&&n<(c-s)*(i-a)/(l-a)+s&&(r=!r)}return r}(r,e)?i+ +r.epochs:i}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(T)}(),b=b.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -102,27 +102,27 @@ function _typeof(o) {
102
102
  }
103
103
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
104
104
 
105
- function _toPrimitive(input, hint) {
106
- if (_typeof(input) !== "object" || input === null) return input;
107
- var prim = input[Symbol.toPrimitive];
108
- if (prim !== undefined) {
109
- var res = prim.call(input, hint || "default");
110
- if (_typeof(res) !== "object") return res;
105
+ function toPrimitive(t, r) {
106
+ if ("object" != _typeof(t) || !t) return t;
107
+ var e = t[Symbol.toPrimitive];
108
+ if (void 0 !== e) {
109
+ var i = e.call(t, r || "default");
110
+ if ("object" != _typeof(i)) return i;
111
111
  throw new TypeError("@@toPrimitive must return a primitive value.");
112
112
  }
113
- return (hint === "string" ? String : Number)(input);
113
+ return ("string" === r ? String : Number)(t);
114
114
  }
115
115
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
116
116
 
117
117
 
118
- function _toPropertyKey(arg) {
119
- var key = _toPrimitive(arg, "string");
120
- return _typeof(key) === "symbol" ? key : String(key);
118
+ function toPropertyKey(t) {
119
+ var i = toPrimitive(t, "string");
120
+ return "symbol" == _typeof(i) ? i : String(i);
121
121
  }
122
122
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
123
123
 
124
124
  function _defineProperty(obj, key, value) {
125
- key = _toPropertyKey(key);
125
+ key = toPropertyKey(key);
126
126
  if (key in obj) {
127
127
  Object.defineProperty(obj, key, {
128
128
  value: value,
@@ -236,7 +236,7 @@ let Plugin = /*#__PURE__*/function () {
236
236
  };
237
237
  return Plugin;
238
238
  }();
239
- Plugin.version = "3.10.3";
239
+ Plugin.version = "3.11.0-next.2";
240
240
 
241
241
  ;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts
242
242
  /**
@@ -928,13 +928,14 @@ const toArray = function (v) {
928
928
  */
929
929
  function addCssRules(style, selector, prop) {
930
930
  var _this9 = this;
931
- const rootSelctor = style.rootSelctor,
931
+ const _style$rootSelector = style.rootSelector,
932
+ rootSelector = _style$rootSelector === void 0 ? "" : _style$rootSelector,
932
933
  sheet = style.sheet,
933
934
  getSelector = function (s) {
934
935
  _newArrowCheck(this, _this9);
935
936
  return s.replace(/\s?(bb-)/g, ".$1").replace(/\.+/g, ".");
936
937
  }.bind(this),
937
- rule = rootSelctor + " " + getSelector(selector) + " {" + prop.join(";") + "}";
938
+ rule = rootSelector + " " + getSelector(selector) + " {" + prop.join(";") + "}";
938
939
  return sheet[sheet.insertRule ? "insertRule" : "addRule"](rule, sheet.cssRules.length);
939
940
  }
940
941
 
@@ -961,6 +962,20 @@ function getCssRules(styleSheets) {
961
962
  return rules;
962
963
  }
963
964
 
965
+ /**
966
+ * Get current window and container scroll position
967
+ * @param {HTMLElement} node Target element
968
+ * @returns {object} window scroll position
969
+ * @private
970
+ */
971
+ function getScrollPosition(node) {
972
+ var _ref2, _ref3, _window$pageXOffset, _ref4, _ref5, _window$pageYOffset;
973
+ return {
974
+ x: (_ref2 = ((_ref3 = (_window$pageXOffset = win.pageXOffset) != null ? _window$pageXOffset : win.scrollX) != null ? _ref3 : 0) + node.scrollLeft) != null ? _ref2 : 0,
975
+ y: (_ref4 = ((_ref5 = (_window$pageYOffset = win.pageYOffset) != null ? _window$pageYOffset : win.scrollY) != null ? _ref5 : 0) + node.scrollTop) != null ? _ref4 : 0
976
+ };
977
+ }
978
+
964
979
  /**
965
980
  * Gets the SVGMatrix of an SVGGElement
966
981
  * @param {SVGElement} node Node element
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.10.3
8
+ * @version 3.11.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}o.d(r,{default:function(){return _}});let s=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(e){n(this,t),this[e]=null,delete this[e]}.bind(this))},t}();s.version="3.10.3";let l=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-"}};const u="__tableview-style__",a="bb-tableview",f=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",b="<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",d='<th scope="col">{=title}</th>',h='<th scope="row">{=value}</th>',p="<td>{=value}</td>";o(288),o(514);const v="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),g=null==v?void 0:v.document,y=function(t){var e=this;const i="function"==typeof(null==t?void 0:t.requestAnimationFrame)&&"function"==typeof(null==t?void 0:t.cancelAnimationFrame),o="function"==typeof(null==t?void 0:t.requestIdleCallback)&&"function"==typeof(null==t?void 0:t.cancelIdleCallback),r=function(t){return n(this,e),setTimeout(t,1)}.bind(this),c=function(t){return n(this,e),clearTimeout(t)}.bind(this);return[i?t.requestAnimationFrame:r,i?t.cancelAnimationFrame:c,o?t.requestIdleCallback:r,o?t.cancelIdleCallback:c]}(v);y[0],y[1],y[2],y[3];var m=void 0;(function(t){return n(this,m),t||0===t}).bind(void 0),function(t){return n(this,m),"function"==typeof t}.bind(void 0);const w=function(t){return n(this,m),"string"==typeof t}.bind(void 0),O=function(t){return n(this,m),"number"==typeof t}.bind(void 0),j=function(t){return n(this,m),void 0===t}.bind(void 0),E=function(t){return n(this,m),void 0!==t}.bind(void 0),T=(function(t){return n(this,m),"boolean"==typeof t}.bind(void 0),function(t){return n(this,m),10*Math.ceil(t/10)}.bind(void 0),function(t){return n(this,m),Math.ceil(t)+.5}.bind(void 0),function(t){return n(this,m),t[1]-t[0]}.bind(void 0),function(t){return n(this,m),"object"==typeof t}.bind(void 0)),$=function(t){return n(this,m),j(t)||null===t||w(t)&&0===t.length||T(t)&&!(t instanceof Date)&&0===Object.keys(t).length||O(t)&&isNaN(t)}.bind(void 0),x=(function(t){return n(this,m),!$(t)}.bind(void 0),function(t){return n(this,m),Array.isArray(t)}.bind(void 0)),S=function(t){return n(this,m),t&&!(null!=t&&t.nodeType)&&T(t)&&!x(t)}.bind(void 0);(function(t){return n(this,m),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return n(this,m),[].slice.call(t)}).bind(void 0);function P(t){for(var e=this,i=arguments.length,o=Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];if(!o.length||1===o.length&&!o[0])return t;const c=o.shift();return S(t)&&S(c)&&Object.keys(c).forEach(function(i){n(this,e);const o=c[i];S(o)?(t[i]||(t[i]={}),t[i]=P(t[i],o)):t[i]=x(o)?o.concat():o}.bind(this)),P.apply(void 0,[t].concat(o))}(function(t,e,i){void 0===i&&(i=1),n(this,m);const o=[],r=0|Math.max(0,Math.ceil((e-t)/i));for(let e=t;e<r;e++)o.push(t+e*i);return o}).bind(void 0),function(){var t=this;n(this,m);const e=function(){return n(this,t),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,o,r){void 0===r&&(r=e()),n(this,t),i.dispatchEvent(new MouseEvent(o,r))}.bind(this)}catch(i){return function(i,o,r){void 0===r&&(r=e()),n(this,t);const c=g.createEvent("MouseEvent");c.initMouseEvent(o,r.bubbles,r.cancelable,v,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(c)}.bind(this)}}.bind(void 0)(),function(t,e,i){n(this,m);const o=new Touch(P({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}.bind(void 0);function C(t,e){let n=t;for(const t in e)n=n.replace(new RegExp("{="+t+"}","g"),e[t]);return n}function k(t){var e=this;const i=this.config;let o,r,c;const s=function(){n(this,e);const t=r.shift();return t&&o&&T(o)&&t in o?(o=o[t],s()):t?void 0:o}.bind(this);Object.keys(i).forEach(function(l){n(this,e),o=t,r=l.split("_"),c=s(),E(c)&&(i[l]=c)}.bind(this)),this.api&&(this.state.orgConfig=t)}function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function M(t){for(var n,i=1;i<arguments.length;i++)n=null!=arguments[i]?arguments[i]:{},i%2?A(Object(n),!0).forEach((function(i){var o,r,c;o=t,r=i,c=n[i],(r=e(r))in o?Object.defineProperty(o,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[r]=c})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}));return t}let _=function(t){var e,o;function r(e){var n=t.call(this,e)||this;return n.config=void 0,n.element=void 0,n.config=new l,i(n)||i(n)}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,c(e,o);var s=r.prototype;return s.$beforeInit=function(){k.call(this,this.options)},s.$init=function(){var t;const e=this.config,n=e.class,i=e.selector,o=e.style;let r=document.querySelector(i||"."+(n||a));if(!r){const t=this.$$.$el.chart.node();r=document.createElement("table"),t.parentNode.insertBefore(r,t.nextSibling)}if("TABLE"!==r.tagName){const t=document.createElement("table");r.appendChild(t),r=t}if(o&&!document.getElementById(u)){const t=document.createElement("style");t.id=u,t.innerHTML=f,(document.head||document.getElementsByTagName("head")[0]).appendChild(t)}(t=r.classList).add.apply(t,[o&&a,n].filter(Boolean)),this.element=r},s.generateTable=function(){var t=this;const e=this.$$,i=this.config,o=this.element,r=e.filterTargetsToShow(e.data.targets);let c=C(d,{title:r.length?this.config.categoryTitle:""}),s="";const l=[];r.forEach(function(e){var i=this;n(this,t),c+=C(d,{title:e.id}),e.values.forEach(function(t,e){n(this,i),l[e]||(l[e]=[t.x]),l[e].push(t.value)}.bind(this))}.bind(this)),l.forEach(function(e){var o=this;n(this,t),s+="<tr>"+e.map(function(t,e){return n(this,o),C(e?p:h,{value:0===e?i.categoryFormat.bind(this)(t):O(t)?t.toLocaleString():i.nullString})}.bind(this)).join("")+"</tr>"}.bind(this));const u=C(b,M(M({},i),{},{title:i.title||e.config.title_text||"",thead:c,tbody:s})).replace(/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/gi,"");o.innerHTML=u},s.$redraw=function(){const t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},s.$willDestroy=function(){var t;if(null==(t=this.element.parentNode)||t.removeChild(this.element),1===this.$$.charts.length){var e;const t=document.getElementById(u);null==t||null==(e=t.parentNode)||e.removeChild(t)}},r}(s)}(),r=r.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={624:function(t){t.exports=e},364:function(e){e.exports=t}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:String(n)}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}o.d(r,{default:function(){return _}});let s=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(e){n(this,t),this[e]=null,delete this[e]}.bind(this))},t}();s.version="3.11.0-next.2";let l=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-"}};const u="__tableview-style__",a="bb-tableview",f=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",b="<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",d='<th scope="col">{=title}</th>',h='<th scope="row">{=value}</th>',p="<td>{=value}</td>";o(364),o(624);const v="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),g=null==v?void 0:v.document,y=function(t){var e=this;const i="function"==typeof(null==t?void 0:t.requestAnimationFrame)&&"function"==typeof(null==t?void 0:t.cancelAnimationFrame),o="function"==typeof(null==t?void 0:t.requestIdleCallback)&&"function"==typeof(null==t?void 0:t.cancelIdleCallback),r=function(t){return n(this,e),setTimeout(t,1)}.bind(this),c=function(t){return n(this,e),clearTimeout(t)}.bind(this);return[i?t.requestAnimationFrame:r,i?t.cancelAnimationFrame:c,o?t.requestIdleCallback:r,o?t.cancelIdleCallback:c]}(v);y[0],y[1],y[2],y[3];var m=void 0;(function(t){return n(this,m),t||0===t}).bind(void 0),function(t){return n(this,m),"function"==typeof t}.bind(void 0);const w=function(t){return n(this,m),"string"==typeof t}.bind(void 0),O=function(t){return n(this,m),"number"==typeof t}.bind(void 0),j=function(t){return n(this,m),void 0===t}.bind(void 0),E=function(t){return n(this,m),void 0!==t}.bind(void 0),T=(function(t){return n(this,m),"boolean"==typeof t}.bind(void 0),function(t){return n(this,m),10*Math.ceil(t/10)}.bind(void 0),function(t){return n(this,m),Math.ceil(t)+.5}.bind(void 0),function(t){return n(this,m),t[1]-t[0]}.bind(void 0),function(t){return n(this,m),"object"==typeof t}.bind(void 0)),$=function(t){return n(this,m),j(t)||null===t||w(t)&&0===t.length||T(t)&&!(t instanceof Date)&&0===Object.keys(t).length||O(t)&&isNaN(t)}.bind(void 0),x=(function(t){return n(this,m),!$(t)}.bind(void 0),function(t){return n(this,m),Array.isArray(t)}.bind(void 0)),S=function(t){return n(this,m),t&&!(null!=t&&t.nodeType)&&T(t)&&!x(t)}.bind(void 0);(function(t){return n(this,m),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return n(this,m),[].slice.call(t)}).bind(void 0);function P(t){for(var e=this,i=arguments.length,o=Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];if(!o.length||1===o.length&&!o[0])return t;const c=o.shift();return S(t)&&S(c)&&Object.keys(c).forEach(function(i){n(this,e);const o=c[i];S(o)?(t[i]||(t[i]={}),t[i]=P(t[i],o)):t[i]=x(o)?o.concat():o}.bind(this)),P.apply(void 0,[t].concat(o))}(function(t,e,i){void 0===i&&(i=1),n(this,m);const o=[],r=0|Math.max(0,Math.ceil((e-t)/i));for(let e=t;e<r;e++)o.push(t+e*i);return o}).bind(void 0),function(){var t=this;n(this,m);const e=function(){return n(this,t),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,o,r){void 0===r&&(r=e()),n(this,t),i.dispatchEvent(new MouseEvent(o,r))}.bind(this)}catch(i){return function(i,o,r){void 0===r&&(r=e()),n(this,t);const c=g.createEvent("MouseEvent");c.initMouseEvent(o,r.bubbles,r.cancelable,v,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(c)}.bind(this)}}.bind(void 0)(),function(t,e,i){n(this,m);const o=new Touch(P({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}.bind(void 0);function C(t,e){let n=t;for(const t in e)n=n.replace(new RegExp("{="+t+"}","g"),e[t]);return n}function k(t){var e=this;const i=this.config;let o,r,c;const s=function(){n(this,e);const t=r.shift();return t&&o&&T(o)&&t in o?(o=o[t],s()):t?void 0:o}.bind(this);Object.keys(i).forEach(function(l){n(this,e),o=t,r=l.split("_"),c=s(),E(c)&&(i[l]=c)}.bind(this)),this.api&&(this.state.orgConfig=t)}function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function M(t){for(var n,i=1;i<arguments.length;i++)n=null!=arguments[i]?arguments[i]:{},i%2?A(Object(n),!0).forEach((function(i){var o,r,c;o=t,r=i,c=n[i],(r=e(r))in o?Object.defineProperty(o,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[r]=c})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}));return t}let _=function(t){var e,o;function r(e){var n=t.call(this,e)||this;return n.config=void 0,n.element=void 0,n.config=new l,i(n)||i(n)}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,c(e,o);var s=r.prototype;return s.$beforeInit=function(){k.call(this,this.options)},s.$init=function(){var t;const e=this.config,n=e.class,i=e.selector,o=e.style;let r=document.querySelector(i||"."+(n||a));if(!r){const t=this.$$.$el.chart.node();r=document.createElement("table"),t.parentNode.insertBefore(r,t.nextSibling)}if("TABLE"!==r.tagName){const t=document.createElement("table");r.appendChild(t),r=t}if(o&&!document.getElementById(u)){const t=document.createElement("style");t.id=u,t.innerHTML=f,(document.head||document.getElementsByTagName("head")[0]).appendChild(t)}(t=r.classList).add.apply(t,[o&&a,n].filter(Boolean)),this.element=r},s.generateTable=function(){var t=this;const e=this.$$,i=this.config,o=this.element,r=e.filterTargetsToShow(e.data.targets);let c=C(d,{title:r.length?this.config.categoryTitle:""}),s="";const l=[];r.forEach(function(e){var i=this;n(this,t),c+=C(d,{title:e.id}),e.values.forEach(function(t,e){n(this,i),l[e]||(l[e]=[t.x]),l[e].push(t.value)}.bind(this))}.bind(this)),l.forEach(function(e){var o=this;n(this,t),s+="<tr>"+e.map(function(t,e){return n(this,o),C(e?p:h,{value:0===e?i.categoryFormat.bind(this)(t):O(t)?t.toLocaleString():i.nullString})}.bind(this)).join("")+"</tr>"}.bind(this));const u=C(b,M(M({},i),{},{title:i.title||e.config.title_text||"",thead:c,tbody:s})).replace(/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/gi,"");o.innerHTML=u},s.$redraw=function(){const t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},s.$willDestroy=function(){var t;if(null==(t=this.element.parentNode)||t.removeChild(this.element),1===this.$$.charts.length){var e;const t=document.getElementById(u);null==t||null==(e=t.parentNode)||e.removeChild(t)}},r}(s)}(),r=r.default}()}));