UNPKG

@ohdsi/atlascharts

Version:

Visualizations is a collection of JavaScript modules to support D3 visualizations in web-based applications

1 lines 86.8 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3"),require("lodash"),require("numeral")):"function"==typeof define&&define.amd?define(["d3","lodash","numeral"],e):"object"==typeof exports?exports.atlascharts=e(require("d3"),require("lodash"),require("numeral")):t.atlascharts=e(t.d3,t._,t.numeral)}(self,(function(t,e,r){return(()=>{var n={605:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(842)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,e);var r,n,a,o=u(f);function f(){return i(this,f),o.apply(this,arguments)}return r=f,(n=[{key:"render",value:function(e,r,n,a,o){l(p(f.prototype),"render",this).call(this,e,r,n,a,o);var i={margin:{top:20,right:30,bottom:20,left:40},yTicks:4,xFormat:t.format(",.0f"),yFormat:t.format("s")},c=n-(o=Object.assign({},i,o)).margin.left-o.margin.right,s=a-o.margin.top-o.margin.bottom,u=t.scaleLinear().domain(t.extent(e,(function(t){return t.x}))).range([0,c]),d=t.scaleLinear().domain([0,t.max(e,(function(t){return t.y}))]).range([s,0]),y=t.axisBottom().scale(u).tickFormat(o.xFormat).ticks(10),h=t.axisLeft().scale(d).tickFormat(o.yFormat).ticks(o.yTicks),m=t.area().x((function(t){return u(t.x)})).y0(s).y1((function(t){return d(t.y)})),g=this.createSvg(r,n,a).append("g").attr("transform","translate("+o.margin.left+","+o.margin.top+")");g.append("path").data([e]).attr("class","area").attr("d",m),g.append("g").attr("class","x axis").attr("transform","translate(0,"+s+")").call(y),g.append("g").attr("class","y axis").call(h)}}])&&c(r.prototype,n),a&&c(r,a),f}(e);return r}.apply(e,n),void 0===a||(t.exports=a)},648:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(842)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,e);var r,n,a,o=u(f);function f(){return i(this,f),o.apply(this,arguments)}return r=f,(n=[{key:"render",value:function(e,r,n,a,o){l(p(f.prototype),"render",this).call(this,e,r,n,a,o);var i=this.getOptions({maxPercent:100},o),c=this.createSvg(r,n,a),s=c.append("g").attr("transform","translate(".concat(n/2,", ").concat(a/2,")")),u=Math.min(n-10,a-10)/2,d=.3*u,y=t.scaleLinear().domain([0,i.maxPercent]).range([d,u]),h=t.arc().innerRadius(d).outerRadius((function(t){return y(t.data.percent)})),m=t.arc().innerRadius(d).outerRadius(u),g=[0,2*Math.PI],v=t.pie().sort(null).startAngle(g[0]).endAngle(g[1]).value((function(t){return t.weight}));e.length>1&&v.padAngle(.01),s.selectAll(".solidArc").data(v(e)).enter().append("path").attr("fill",(function(t){return i.colors(t.data.id)})).attr("class","solidArc").attr("d",h),s.selectAll(".outlineArc").data(v(e)).enter().append("path").attr("fill","none").attr("stroke",(function(t){return i.colors(t.data.id)})).attr("class","outlineArc").attr("d",m),i.asterLabel&&c.append("svg:text").attr("class","aster-label").attr("dy",".35em").attr("text-anchor","middle").text(asterLabel());for(var x=s.append("g").attr("class","axisWrapper"),b=Math.ceil(i.maxPercent/25),w=1;w<b;w++)x.append("circle").attr("class","gridCircle").attr("r",y(25*w)).style("fill","none").style("stroke","#c5c5c5").style("stroke-width",.6),w%2==1&&(x.append("rect").attr("x",-8).attr("y",-y(25*w)-5).attr("width",20).style("height",10).attr("fill","#fff"),x.append("text").attr("class","axisLabel").attr("x",-6).attr("y",-y(25*w)).attr("dy",".4em").style("font-size","8px").attr("fill","#737373").text((function(t,e){return"".concat(25*w,"%")})))}}])&&c(r.prototype,n),a&&c(r,a),f}(e);return r}.apply(e,n),void 0===a||(t.exports=a)},131:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(842)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,e);var r,n,a,o=u(f);function f(){return i(this,f),o.apply(this,arguments)}return r=f,(n=[{key:"render",value:function(e,r,n,a,o){var i=this;l(p(f.prototype),"render",this).call(this,e,r,n,a,o);var c=this.getOptions({label:"label",value:"value",rotate:0,textAnchor:"middle",showLabels:!1},o),s=this.createSvg(r,n,a);this.useTip((function(t){t.attr("class","d3-tip").offset([-10,0]).html((function(t){return t.value}))}));var u=c.label,d=c.value,y=0;e.forEach((function(t){y+=t[d]}));var h=n-c.margins.left-c.margins.right,m=a-c.margins.top-c.margins.bottom,g=t.scaleBand().range([0,h]).padding(.1).round(1/e.length),v=t.scaleLinear().range([m,0]),x=t.axisBottom().scale(g).tickSize(2,0),b=t.axisLeft().scale(v).tickFormat(c.yFormat).ticks(5);g.domain(e.map((function(t){return t[u]}))),v.domain([0,c.yMax||t.max(e,(function(t){return t[d]}))]);var w=s.append("g").attr("class","axis");w.call(x);var O=Math.round(w.node().getBBox().height),P=Math.round(w.node().getBBox().width);m-=O,h-=Math.max(0,P-h),w.remove();var k=s.append("g").attr("class","axis");k.call(b);var S=Math.round(k.node().getBBox().width);h-=S,k.remove(),g.range([0,h]),v.range([m,0]),(s=s.append("g").attr("transform","translate(\n\t ".concat(c.margins.left+S,",\n\t ").concat(c.margins.top,"\n\t )"))).append("g").attr("class","x axis").attr("transform","translate(0, ".concat(m,")")).call(x).selectAll(".tick text").style("text-anchor",c.textAnchor).attr("transform",(function(t){return"rotate(".concat(c.rotate,")")})),c.wrap&&s.selectAll(".tick text").call(this.wrap,g.bandwidth()),s.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(b),s.selectAll(".bar").data(e).enter().append("rect").attr("class","bar").attr("x",(function(t){return g(t[u])})).attr("width",g.bandwidth()).attr("y",(function(t){return v(t[d])})).attr("height",(function(t){return m-v(t[d])})).attr("title",(function(t){var e="".concat(t[u],": ").concat(i.formatters.commaseparated(t[d],","));return e+=" (".concat(y>0?i.formatters.formatpercent(t[d]/y):i.formatters.formatpercent(0),")")})).style("fill",(function(t){return c.colors(t[u])})).on("mouseover",(function(t){return i.tip.show(t,event.target)})).on("mouseout",(function(t){return i.tip.hide(t,event.target)})).exit().remove(),c.showLabels&&s.selectAll(".barlabel").data(e).enter().append("text").attr("class","barlabel").text((function(t){return i.formatters.formatpercent(t[d]/y)})).attr("x",(function(t){return g(t[u])+g.bandwidth()/2})).attr("y",(function(t){return v(t[d])-3})).attr("text-anchor","middle")}},{key:"formatters",get:function(){return{commaseparated:t.format(","),formatpercent:t.format(".1%")}}}])&&c(r.prototype,n),a&&c(r,a),f}(e);return r}.apply(e,n),void 0===a||(t.exports=a)},316:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(842)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,e);var r,n,a,o=u(f);function f(){return i(this,f),o.apply(this,arguments)}return r=f,(n=[{key:"defaultTip",value:function(t,e){t.attr("class","d3-tip").offset((function(t){return t.tipOffset||[-10,0]})).direction((function(t){return t.tipDirection||"n"})).html((function(t){return"<table class='boxplotValues'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Max:</td>\n\t\t\t\t\t\t<td>".concat(e.valueFormatter(t.max),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>P90:</td>\n\t\t\t\t\t\t<td>").concat(e.valueFormatter(t.UIF),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>P75:</td>\n\t\t\t\t\t\t<td>").concat(e.valueFormatter(t.q3),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Median:</td>\n\t\t\t\t\t\t<td>").concat(e.valueFormatter(t.median),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>P25:</td>\n\t\t\t\t\t\t<td>").concat(e.valueFormatter(t.q1),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>P10:</td>\n\t\t\t\t\t\t<td>").concat(e.valueFormatter(t.LIF),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Min:</td>\n\t\t\t\t\t\t<td>").concat(e.valueFormatter(t.min),"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>")}))}},{key:"render",value:function(e,r,n,a,o){l(p(f.prototype),"render",this).call(this,e,r,n,a,o);var i={valueFormatter:this.formatters.formatSI(3)},c=this.getOptions(i,o),s=this.createSvg(r,n,a);c.valueFormatter,this.useTip(this.defaultTip,c);var u=0,d=0;if(c.xLabel){var y=s.append("g").attr("transform","translate(".concat(n/2,", ").concat(a-c.margins.bottom,")"));y.append("text").attr("class","axislabel").style("text-anchor","middle").text(c.xLabel),u=y.node().getBBox().height}if(c.yLabel){var h=s.append("g").attr("transform","translate(\n\t ".concat(c.margins.left,",\n\t ").concat((a-c.margins.bottom-c.margins.top)/2+c.margins.top,"\n\t )"));h.append("text").attr("class","axislabel").attr("transform","rotate(-90)").attr("y",0).attr("x",0).attr("dy","1em").style("text-anchor","middle").text(c.yLabel),d=h.node().getBBox().width}var m=n-c.margins.left-d-c.margins.right,g=a-c.margins.top-u-c.margins.bottom,v=t.scaleBand().range([0,m]).round(1/e.length).domain(e.map((function(t){return t.Category}))),x=t.scaleLinear().range([g,0]).domain([c.yMin||0,c.yMax||t.max(e,(function(t){return t.max}))]),b=t.axisBottom().scale(v),w=t.axisLeft().scale(x).tickFormat(c.yFormat).ticks(5),O=s.append("g").attr("class","axis");O.call(b);var P=Math.round(O.node().getBBox().height),k=Math.round(O.node().getBBox().width);g-=P,m-=Math.max(0,k-m),O.remove();var S=s.append("g").attr("class","axis");S.call(w);var R=Math.round(S.node().getBBox().width);m-=R,S.remove(),v.range([0,m]),x.range([g,0]);var E=v.bandwidth()/2-5,_=v.bandwidth()/2-2.5,L=s.append("g").attr("transform","translate(\n\t ".concat(c.margins.left+d+R,",\n\t ").concat(c.margins.top,"\n\t )")),j=L.selectAll(".boxplot").data(e).enter().append("g").attr("class","boxplot").attr("transform",(function(t){return"translate(".concat(v(t.Category),", 0)")})),B=this;j.each((function(e){var r=t.select(this);e.LIF!=e.q1&&(r.append("line").attr("class","bar").attr("x1",_).attr("y1",x(e.LIF)).attr("x2",_+5).attr("y2",x(e.LIF)),r.append("line").attr("class","whisker").attr("x1",v.bandwidth()/2).attr("y1",x(e.LIF)).attr("x2",v.bandwidth()/2).attr("y2",x(e.q1))),r.append("rect").attr("class","box").attr("x",E).attr("y",x(e.q3)).attr("width",10).attr("height",Math.max(1,x(e.q1)-x(e.q3))).on("mouseover",(function(t){return B.tip.show(t,event.target)})).on("mouseout",(function(t){return B.tip.hide(t,event.target)})),r.append("line").attr("class","median").attr("x1",E).attr("y1",x(e.median)).attr("x2",E+10).attr("y2",x(e.median)),e.UIF!=e.q3&&(r.append("line").attr("class","bar").attr("x1",_).attr("y1",x(e.UIF)).attr("x2",v.bandwidth()-_).attr("y2",x(e.UIF)),r.append("line").attr("class","whisker").attr("x1",v.bandwidth()/2).attr("y1",x(e.UIF)).attr("x2",v.bandwidth()/2).attr("y2",x(e.q3)))})),L.append("g").attr("class","x axis").attr("transform","translate(0, ".concat(g,")")).call(b),L.selectAll(".tick text").call(this.wrap,v.bandwidth()||v.range()),L.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(w)}}])&&c(r.prototype,n),a&&c(r,a),f}(e);return r}.apply(e,n),void 0===a||(t.exports=a)},842:(t,e,r)=>{var n,a;function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n=[r(680),r(92),r(383)],a=function(t,e,r){"use strict";var n=function(){function n(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n)}var a,i,c;return a=n,i=[{key:"render",value:function(t,r,n,a,o){var i=this;"string"==typeof r&&(r=document.querySelector(r)),this.cachedData=t,this.doResize||(this.doResize=e.debounce((function(){i.render(i.cachedData,r,r.clientWidth,r.clientHeight,o)}),250),window.addEventListener("resize",this.doResize))}},{key:"getOptions",value:function(e,r){return Object.assign({},{margins:{top:10,right:10,bottom:10,left:10},xFormat:t.format(",.0f"),yFormat:t.format("s"),colors:t.scaleOrdinal(t.schemeCategory20.concat(t.schemeCategory20c))},Object.assign({},e),Object.assign({},r))}},{key:"createSvg",value:function(e,r,n){this.destroyTipIfExists();var a=t.select(e);a.select("svg").remove();var o=a.append("svg").attr("preserveAspectRatio","xMinYMin meet").attr("viewBox","\n\t 0\n\t 0\n\t ".concat(r,"\n\t ").concat(n)).append("g").attr("class","chart");return this.chart=o,o}},{key:"useTip",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},e=arguments.length>1?arguments[1]:void 0;return this.destroyTipIfExists(),this.tip=r().attr("class","d3-tip"),t(this.tip,e),this.chart&&this.chart.call(this.tip),this.tip}},{key:"destroyTipIfExists",value:function(){this.tip&&this.tip.destroy()}},{key:"truncate",value:function(e,r){e.each((function(){for(var e=t.select(this),n=e.text(),a=e.node().getComputedTextLength(),o=e.text();a>r&&o.length>0;)o=o.slice(0,-1),e.text("".concat(o,"...")),a=e.node().getComputedTextLength();e.append("title").text(n)}))}},{key:"wrap",value:function(e,r,n){e.each((function(){for(var e,a=t.select(this),o=a.text(),i=a.text().split(/\s+/).reverse(),c=[],l=0,s=0,u=a.attr("y"),f=parseFloat(a.attr("dy")),p=a.text(null).append("tspan").attr("x",0).attr("y",u).attr("dy","".concat(f,"em"));e=i.pop();)if(c.push(e),p.text(c.join(" ")),p.node().getComputedTextLength()>r){if(c.length>1){c.pop(),i.push(e);var d=n&&++s===n?"".concat(c.splice(0,c.length-1).join(" "),"..."):c.join(" ");p.text(d)}if(c=[],p=a.append("tspan").attr("x",0).attr("y",u).attr("dy","".concat(1.1*++l+f,"em")),n&&n===s){p.remove();break}}a.append("title").text(o)}))}},{key:"tooltipFactory",value:function(t){return function(e){var r="";if(void 0!==t)for(var n=0;n<t.length;n+=1){var a=t[n].accessor(e);void 0!==t[n].format&&(a=t[n].format(a)),r+="".concat(t[n].label,": ").concat(a,"</br>")}return r}}},{key:"lineDefaultTooltip",value:function(t,e,r,n,a,o,i){return function(c){var l="";return i(c)&&(l="Series: ".concat(i(c),"</br>")),l+="".concat(t,": ").concat(e(r(c)),"</br>"),l+="".concat(n,": ").concat(a(o(c)))}}},{key:"donutDefaultTooltip",value:function(t,e,r){return function(n){return"".concat(t(n),": ").concat(e(n)," (").concat(r(n),")")}}},{key:"dispose",value:function(){this.destroyTipIfExists(),this.doResize&&window.removeEventListener("resize",this.doResize)}},{key:"formatters",get:function(){return{formatSI:function(e){e=e||0;var r=t.format(",.".concat(e,"s"));return function(t){return t<1?t.toFixed(e).replace(/(\.0*|(?<=(\.[0-9]*))0*)$/,""):r(t).replace(/(\.0*|(?<=(\.[0-9]*))0*)$/,"")}}}}}],c=[{key:"normalizeDataframe",value:function(e){var r=t.keys(e),n=Object.assign({},e);return r.forEach((function(t){e[t]instanceof Array||(n[t]=[e[t]])})),n}},{key:"dataframeToArray",value:function(e){var r=t.keys(e);return e[r[0]]instanceof Array?e[r[0]].map((function(t,n){var a={};return r.forEach((function(t){a[t]=e[t][n]})),a})):[e]}},{key:"mapMonthYearDataToSeries",value:function(t,e){var r=Object.assign({},{dateField:"x",yValue:"y",yPercent:"p"},e),n={name:"All Time",values:[]};return t[r.dateField].map((function(e,a){n.values.push({xValue:new Date(Math.floor(t[r.dateField][a]/100),t[r.dateField][a]%100-1,1),yValue:t[r.yValue][a],yPercent:t[r.yPercent][a]})})),n.values.sort((function(t,e){return t.xValue-e.xValue})),[n]}},{key:"prepareData",value:function(t,e){if(e===this.chartTypes.BOXPLOT){if(!t.CATEGORY.length)return null;var r=t.CATEGORY.map((function(e,r){return{Category:t.CATEGORY[r],min:t.MIN_VALUE[r],max:t.MAX_VALUE[r],median:t.MEDIAN_VALUE[r],LIF:t.P10_VALUE[r],q1:t.P25_VALUE[r],q3:t.P75_VALUE[r],UIF:t.P90_VALUE[r]}}),t);return Object.values(r).reduce((function(t,e){return t.concat(e)}),[]).length?r:null}}},{key:"chartTypes",get:function(){return{AREA:"AREA",BOXPLOT:"BOXPLOT",DONUT:"DONUT",HISTOGRAM:"HISTOGRAM",LINE:"LINE",TRELLISLINE:"TRELLISLINE"}}}],i&&o(a.prototype,i),c&&o(a,c),n}();return n}.apply(e,n),void 0===a||(t.exports=a)},535:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(756),r(842)],a=function(t,e,r){"use strict";var n=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(d,r);var n,a,o,f=u(d);function d(){return i(this,d),f.apply(this,arguments)}return n=d,(a=[{key:"render",value:function(r,n,a,o,i){var c=this;l(p(d.prototype),"render",this).call(this,r,n,a,o,i);var s=this.getOptions(i),u=this.createSvg(n,a,o),f=0;r.forEach((function(t){f+=+t.value}));var y=this.donutDefaultTooltip((function(t){return t.label}),(function(t){return e(t.value).format("0,0")}),(function(t){return c.formatters.formatpercent(0!=f?t.value/f:0)}));if(this.useTip((function(t){return t.attr("class","d3-tip").direction("s").offset([3,0]).html(y)})),r.length>0){var h=u.append("g").attr("id","chart"),m=t.drag().on("drag",(function(){var e=t.select(this),r=event.y-parseFloat(e.attr("initialY"));if(isNaN(r))return!1;e.attr("transform","translate(\n\t ".concat(parseFloat(e.attr("initialPositionX")),",\n\t ").concat(parseFloat(e.attr("initialPositionY"))+r,"\n\t )"))})).on("start",(function(){var e=t.select(this);e.attr("initialX",event.x),e.attr("initialY",event.y)})).on("end",(function(){var e=t.select(this);e.transition().duration(300).attr("transform","translate(\n\t ".concat(e.attr("initialPositionX"),",\n\t ").concat(e.attr("initialPositionY"),"\n\t )"))})),g=u.append("g").attr("class","legend").call(m);g.selectAll("rect").data(r).enter().append("rect").attr("x",0).attr("y",(function(t,e){return 15*e})).attr("width",10).attr("height",10).style("fill",(function(t){return s.colors(t.id)}));var v=0,x=g.selectAll("g.legend-item").data(r).enter().append("g").attr("class","legend-item");x.append("text").attr("x",12).attr("y",(function(t,e){return 15*e+9})).text((function(t){return t.label})),x.append("title").attr("x",12).attr("y",(function(t,e){return 15*e+9})).text((function(t){return t.label})),x.each((function(){var t=this.getBBox().width;t>v&&v+t<.75*a&&(v=t)})),v+=12,g.attr("transform","translate(\n\t ".concat(a-v-s.margins.right,",\n\t ").concat(s.margins.top,"\n\t )")).attr("initialPositionX",a-v-s.margins.right).attr("initialPositionY",s.margins.top),h.attr("transform","translate(".concat((a-v)/2,", ").concat(o/2,")"));var b=Math.min(o,a-v)/2-s.margins.top,w=Math.min(o,a-v)/6-s.margins.top,O=t.arc().innerRadius(w).outerRadius(b),P=t.pie().value((function(t){return t.value>0?Math.max(t.value,.015*f):0}));h.selectAll("g.slice").data(P(r)).enter().append("g").attr("class","slice").append("path").attr("fill",(function(t){return s.colors(t.data.id)})).attr("stroke","#fff").attr("stroke-width",5).attr("title",(function(t){return t.label})).on("mouseover",(function(t){return c.tip.show(t.data,event.target)})).on("mouseout",(function(t){return c.tip.hide(t.data,event.target)})).attr("d",O)}else u.append("text").attr("transform","translate(".concat(a/2,", ").concat(o/2,")")).style("text-anchor","middle").text("No Data")}},{key:"formatters",get:function(){return{formatpercent:t.format(".1%")}}}])&&c(n.prototype,a),o&&c(n,o),d}(r);return n}.apply(e,n),void 0===a||(t.exports=a)},502:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(756),r(842)],a=function(t,e,r){"use strict";var n=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(d,r);var n,a,o,f=u(d);function d(){return i(this,d),f.apply(this,arguments)}return n=d,o=[{key:"mapHistogram",value:function(t){for(var e=[],r=t.OFFSET||0,n=t.INTERVAL_SIZE,a=this.normalizeDataframe(t.DATA),o=0;o<t.INTERVALS;o+=1){var i={};i.x=r+1*a.INTERVAL_INDEX[o]*n,i.dx=n,i.y=a.COUNT_VALUE[o]||0,e.push(i)}return e}}],(a=[{key:"drawBoxplot",value:function(t,e,r,n){var a=t,o=this.xScale,i=n/2;e.LIF!==e.q1&&(a.append("line").attr("class","bar").attr("x1",o(e.LIF)).attr("y1",n/2-i/2).attr("x2",o(e.LIF)).attr("y2",n/2+i/2),a.append("line").attr("class","whisker").attr("x1",o(e.LIF)).attr("y1",n/2).attr("x2",o(e.q1)).attr("y2",n/2)),a.append("rect").attr("class","box").attr("x",o(e.q1)).attr("width",o(e.q3)-o(e.q1)).attr("height",n),a.append("line").attr("class","median").attr("x1",o(e.median)).attr("y1",0).attr("x2",o(e.median)).attr("y2",n),e.UIF!==e.q3&&(a.append("line").attr("class","bar").attr("x1",o(e.UIF)).attr("y1",n/2-i/2).attr("x2",o(e.UIF)).attr("y2",n/2+i/2),a.append("line").attr("class","whisker").attr("x1",o(e.q3)).attr("y1",n/2).attr("x2",o(e.UIF)).attr("y2",n/2))}},{key:"render",value:function(r,n,a,o,i){var c=this;l(p(d.prototype),"render",this).call(this,r,n,a,o,i);var s={ticks:10,yTicks:4,yScale:t.scaleLinear(),boxplotHeight:10,getTooltipBuilder:null},u=this.getOptions(s,i),f=this.createSvg(n,a,o);this.xScale={};var y=r||[],h="function"==typeof u.getTooltipBuilder?u.getTooltipBuilder(u):function(t){return e(t.y).format("0,0")};this.useTip((function(t){t.attr("class","d3-tip").offset([-10,0]).html(h)}));var m=0,g=0;if(u.xLabel){var v=f.append("g").attr("transform","translate(".concat(a/2,", ").concat(o-u.margins.bottom,")"));v.append("text").attr("class","axislabel").style("text-anchor","middle").text(u.xLabel),m=v.node().getBBox().height}if(u.yLabel){var x=f.append("g").attr("transform","translate(\n\t ".concat(u.margins.left,",\n\t ").concat((o-u.margins.bottom-u.margins.top)/2+u.margins.top,"\n\t )"));x.append("text").attr("class","axislabel").attr("transform","rotate(-90)").attr("y",0).attr("x",0).attr("dy","1em").style("text-anchor","middle").text(u.yLabel),g=1.5*x.node().getBBox().width}var b=a-u.margins.left-u.margins.right-g,w=o-u.margins.top-u.margins.bottom-m,O=this.xScale=t.scaleLinear().domain(u.xDomain||[t.min(y,(function(t){return t.x})),t.max(y,(function(t){return t.x+t.dx}))]).range([0,b]),P=t.axisBottom().scale(O).ticks(u.ticks).tickFormat(u.xFormat),k=u.yScale.domain([0,u.yMax||t.max(y,(function(t){return t.y}))]).range([w,0]),S=t.axisLeft().scale(k).ticks(u.yTicks).tickFormat(u.yFormat),R=f.append("g").attr("class","axis");R.call(P);var E=Math.round(R.node().getBBox().height),_=Math.round(R.node().getBBox().width);w-=E,b-=Math.max(0,_-b),R.remove();var L=f.append("g").attr("class","axis");L.call(S);var j=Math.round(L.node().getBBox().width);if(b-=j,L.remove(),u.boxplot){w-=12;var B=f.append("g").attr("class","boxplot").attr("transform","translate(".concat(u.margins.left+g+j,",\n\t ").concat(u.margins.top+w+E,")"));this.drawBoxplot(B,u.boxplot,b,8)}O.range([0,b]),k.range([w,0]);var A=f.append("g").attr("transform","translate(\n\t ".concat(u.margins.left+g+j,",\n\t ").concat(u.margins.top,")"));A.selectAll(".bar").data(y).enter().append("g").attr("class","bar").attr("transform",(function(t){return"translate(".concat(O(t.x),", ").concat(k(t.y),")")})).on("mouseover",(function(t){return c.tip.show(t,event.target)})).on("mouseout",(function(t){return c.tip.hide(t,event.target)})).append("rect").attr("x",1).attr("width",(function(t){return Math.max(O(t.x+t.dx)-O(t.x)-1,.5)})).attr("height",(function(t){return w-k(t.y)})),A.append("g").attr("class","x axis").attr("transform","translate(0, ".concat(w,")")).call(P),A.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(S)}}])&&c(n.prototype,a),o&&c(n,o),d}(r);return n}.apply(e,n),void 0===a||(t.exports=a)},487:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return u(this,r)}}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}n=[r(680),r(316)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(u,e);var r,n,a,o=s(u);function u(){return i(this,u),o.apply(this,arguments)}return r=u,(n=[{key:"render",value:function(e,r,n,a,o){var i={showXAxis:!0,showMinMarkers:!0,showMaxMarkers:!0,boxHeight:10,valueFormatter:this.formatters.formatSI(3),margins:{top:0,right:0,bottom:0,left:4}},c=this.getOptions(i,o),l=a<e.length*c.boxHeight?e.length*c.boxHeight:a,s=this.createSvg(r,n,l),u=c.valueFormatter;this.useTip(this.defaultTip,c),e.forEach((function(t){return t.Category=t.Category||"Default"}));var f=n-c.margins.left-c.margins.right;l=l-c.margins.top-c.margins.bottom;var p=t.scaleLinear().range([0,f]).domain([c.xMin||t.min(e,(function(t){return t.min})),c.xMax||t.max(e,(function(t){return t.max}))]).nice(),d=t.scaleBand().range([0,l]).round(1/e.length).domain(e.map((function(t){return t.Category}))),y=t.axisBottom().scale(p).tickFormat(u),h=t.axisLeft().scale(d),m=t.scaleOrdinal().domain(e.map((function(t){return t.Category}))).range(["#ff9315","#0d61ff","gold","blue","green","red","black","orange","brown","grey","slateblue","grey1","darkgreen"]),g=0,v=g;if(c.showXAxis){var x=s.append("g").attr("class","axis");x.call(y),g=Math.round(x.node().getBBox().height)+2,v=Math.round(x.node().getBBox().width)+4,l-=g,f-=Math.max(0,v-f),x.remove()}var b=0;if(c.showYAxis){var w=s.append("g").attr("class","axis");w.call(h),f-=b=Math.round(w.node().getBBox().width),w.remove()}var O=c.boxHeight,P=d.bandwidth()/2-O/2,k=O/2,S=k/10;c.showMinMarkers&&(f-=S>b?2*S-b:S),p.range([0,f]),d.range([l,0]);var R=s.append("g").attr("transform","translate(\n\t ".concat(c.margins.left+Math.max(b,S),",\n\t ").concat(c.margins.top,"\n\t )")),E=R.selectAll(".boxplot").data(e).enter().append("g").attr("class","boxplot").attr("transform",(function(t){return"translate(0, ".concat(d(t.Category),")")})),_=this,L=t.scaleLinear().range([O/2,0]).domain([0,O]);E.each((function(e){var r=e,n=t.select(this).append("g").attr("transform",(function(){return"translate(0, ".concat(P,")")})).append("g").datum(e);r.LIF!=r.q1&&(n.append("line").attr("class","bar").attr("x1",p(r.LIF)).attr("y1",L(1.5*k)).attr("x2",p(r.LIF)).attr("y2",L(.5*k)).style("stroke",m(r.Category)),n.append("line").attr("class","whisker").attr("x1",p(r.LIF)).attr("y1",L(k)).attr("x2",p(r.q1)).attr("y2",L(k)).style("stroke",m(r.Category))),n.append("rect").attr("class","box").attr("x",p(r.q1)).attr("y",Math.min(L(0),L(O))).attr("width",Math.max(1,p(r.q3)-p(r.q1))).attr("height",Math.abs(L(0)-L(O))).style("fill",m(r.Category)).style("stroke",m(r.Category)).style("fill-opacity",.4).on("mouseover",(function(t){return _.tip.show(t,event.target)})).on("mouseout",(function(t){return _.tip.hide(t,event.target)})),n.append("line").attr("class","median").attr("x1",p(r.median)).attr("y1",L(0)).attr("x2",p(r.median)).attr("y2",L(O)).style("stroke",m(r.Category)),r.UIF!=r.q3&&(n.append("line").attr("class","bar").attr("x1",p(r.UIF)).attr("y1",L(1.5*k)).attr("x2",p(r.UIF)).attr("y2",L(.5*k)).style("stroke",m(r.Category)),n.append("line").attr("class","whisker").attr("x1",p(r.q3)).attr("y1",L(k)).attr("x2",p(r.UIF)).attr("y2",L(k)).style("stroke",m(r.Category))),c.showMinMarkers&&n.append("circle").attr("cx",p(r.min)).attr("cy",L(k)).attr("r",S).style("fill",m(r.Category)).style("stroke",m(r.Category)).style("fill-opacity",.4),c.showMaxMarkers&&n.append("circle").attr("cx",p(r.max)).attr("cy",L(k)).attr("r",S).style("fill",m(r.Category)).style("stroke",m(r.Category)).style("fill-opacity",.4)})),c.showXAxis&&R.append("g").attr("class","x axis").attr("transform","translate(0, ".concat(l,")")).call(y),c.showYAxis&&R.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(h).selectAll(".tick text").call(this.wrap,d.bandwidth()||d.range()).selectAll(".tick text tspan").attr("x",-9)}}])&&c(r.prototype,n),a&&c(r,a),u}(e);return r}.apply(e,n),void 0===a||(t.exports=a)},557:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(842)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,e);var r,n,a,o=u(f);function f(){return i(this,f),o.apply(this,arguments)}return r=f,a=[{key:"convertData",value:function(t){return t[0].hasOwnProperty("values")||(t=[{name:"",values:t}]),t}},{key:"getMinValue",value:function(e,r){return t.min(e,(function(e){return t.min(e.values,(function(t){return t[r]}))}))}},{key:"getMaxValue",value:function(e,r){return t.max(e,(function(e){return t.max(e.values,(function(t){return t[r]}))}))}},{key:"getZeroBasedY",value:function(e){var r=e.data,n=e.yValue,a=e.height,o=f.getMaxValue(r,n);return t.scaleLinear().domain([0,o]).range([a,0])}},{key:"getRelativeY",value:function(e){var r=e.data,n=e.yValue,a=void 0===n?"yValue":n,o=e.height,i=e.yRangePadding,c=void 0===i?.1:i,l=e.defaultYRangePadding,s=void 0===l?10:l;r=f.convertData(r);var u=f.getMinValue(r,a),p=f.getMaxValue(r,a),d=(p-u)*c||s;return t.scaleLinear().domain([u-d,p+d]).range([o,0])}}],(n=[{key:"render",value:function(e,r,n,a,o){l(p(f.prototype),"render",this).call(this,e,r,n,a,o),"string"==typeof r&&(r=document.querySelector(r));var i={xFormat:this.formatters.formatSI(3),yFormat:this.formatters.formatSI(3),interpolate:this.interpolation.linear,seriesName:"SERIES_NAME",xValue:"xValue",yValue:"yValue",cssClass:"lineplot",ticks:10,yTicks:4,showSeriesLabel:!1,labelIndexDate:!1,colorBasedOnIndex:!1,getTooltipBuilder:null},c=this.getOptions(i,o),s=this.createSvg(r,n,a),u="function"==typeof c.getTooltipBuilder?c.getTooltipBuilder(c):this.lineDefaultTooltip(c.xLabel||"x",c.xFormat,(function(t){return t[c.xValue]}),c.yLabel||"y",c.yFormat,(function(t){return t[c.yValue]}),(function(t){return t[c.seriesName]}));if(e.length>0){e=f.convertData(e),this.useTip((function(t){t.attr("class","d3-tip").offset([-10,0]).html(u)}));var d=0,y=0;if(c.xLabel){var h=s.append("g").attr("transform","translate(".concat(n/2,", ").concat(a-c.margins.bottom,")"));h.append("text").attr("class","axislabel").style("text-anchor","middle").text(c.xLabel),d+=h.node().getBBox().height}if(c.yLabel){var m=s.append("g").attr("transform","translate(\n\t ".concat(c.margins.left,",\n\t ").concat((a-c.margins.bottom-c.margins.top)/2+c.margins.top,"\n\t )"));m.append("text").attr("class","axislabel").attr("transform","rotate(-90)").attr("y",0).attr("x",0).attr("dy","1em").style("text-anchor","middle").text(c.yLabel),y=1.2*m.node().getBBox().width}var g=0;if(c.showLegend){var v=s.append("g").attr("class","legend"),x=0;e.forEach((function(t,e){v.append("rect").attr("x",0).attr("y",15*e).attr("width",10).attr("height",10).style("fill",c.colors(t.name));var r=v.append("text").attr("x",12).attr("y",15*e+9).text(t.name);x=Math.max(r.node().getBBox().width+12,x)})),v.attr("transform","translate(\n\t ".concat(n-c.margins.right-x,",\n\t ").concat(c.margins.top,"\n\t )")),(g+=x+5)>n/3&&v.style("display","none")}var b=n-c.margins.left-c.margins.right-y-(g>n/5?0:g),w=a-c.margins.top-c.margins.bottom-d,O=c.xScale||t.scaleLinear().domain([t.min(e,(function(e){return t.min(e.values,(function(t){return t[c.xValue]}))})),t.max(e,(function(e){return t.max(e.values,(function(t){return t[c.xValue]}))}))]),P=t.axisBottom().scale(O).ticks(c.ticks);c.tickFormat?P.tickFormat(c.tickFormat):P.tickFormat(c.xFormat),"function"==typeof O.rangePoints?O.rangePoints([0,b]):O.range([0,b]);var k=c.yScale||f.getZeroBasedY({data:e,height:w,yValue:c.yValue}),S=t.axisLeft().scale(k).tickFormat(c.yFormat).ticks(c.yTicks),R=s.append("g").attr("class","axis");R.call(P);var E=Math.round(R.node().getBBox().height),_=Math.round(R.node().getBBox().width);w-=E,b-=Math.max(0,_-b),R.remove();var L=c.yAxisWidth;if(null==c.yAxisWidth){var j=s.append("g").attr("class","axis");j.call(S),L=Math.round(j.node().getBBox().width),j.remove()}b-=L,"function"==typeof O.rangePoints?O.rangePoints([0,b]):O.range([0,b]),k.range([w,0]);var B=t.line().x((function(t){return O(t[c.xValue])})).y((function(t){return k(t[c.yValue])})).curve(c.interpolate),A=s.append("g").attr("class",c.cssClass).attr("transform","translate(\n\t ".concat(c.margins.left+y+L,",\n\t ").concat(c.margins.top,"\n\t )")),T=A.selectAll(".series").data(e).enter().append("g"),M=T.append("path").attr("class","line").attr("d",(function(e){return B(e.values.sort((function(e,r){return t.ascending(e[c.xValue],r[c.xValue])})))}));c.colors&&M.style("stroke",(function(t,e){return c.colors(t.name)})),c.showSeriesLabel&&T.append("text").datum((function(t){return{name:t.name,value:t.values[t.values.length-1]}})).attr("transform",(function(t){return"translate(".concat(O(t.value[c.xValue]),", ").concat(k(t.value[c.yValue]),")")})).attr("x",3).attr("dy",2).style("font-size","8px").text((function(t){return t.name}));var F={x:0,y:0};A.append("g").attr("class","x axis").attr("transform","translate(0, ".concat(w,")")).call(P),A.append("g").attr("class","y axis").call(S),c.labelIndexDate&&A.append("rect").attr("transform","translate(".concat(F.x-.5,", ").concat(F.y,")")).attr("width",1).attr("height",w),this.appendTracker({vis:A,data:e,width:b,height:w,x:O,y:k,options:c})}else s.append("text").attr("transform","translate(".concat(n/2,", ").concat(a/2,")")).style("text-anchor","middle").text("No Data")}},{key:"appendTracker",value:function(e){var r=this,n=e.vis,a=e.data,o=e.width,i=e.height,c=e.x,l=e.y,s=e.options,u=n.append("g").attr("class","current-focus").style("display","none"),f=u.append("line").attr("class","x-hover-line").style("stroke-width","2px").style("stroke-dasharray","3,3").attr("y1",0),p=u.append("circle").attr("r",2),d=n.append("rect").style("opacity",0),y=t.quadtree().x((function(t){return c(t[s.xValue])})).y((function(t){return l(t[s.yValue])})),h=a.reduce((function(t,e){return t.concat(e.values.map((function(t){return t.name=e.name,t})))}),[]);y.addAll(h),d.attr("class","overlay").attr("width",o).attr("height",i).attr("pointer-events","all").on("mouseover",(function(){return u.style("display",null)})).on("mouseout",(function(){u.style("display","none"),r.tip.hide({},u.node())})),d.on("mousemove",(function(){var e=t.event,n=t.mouse(e.target),a=y.find(n[0],n[1]);p.style("fill",s.colors(a.name)),f.style("stroke",s.colors(a.name)),f.attr("y2",i-l(a[s.yValue])),u.attr("transform","translate("+c(a[s.xValue])+","+l(a[s.yValue])+")"),r.tip.show(a,u.node())}))}},{key:"interpolation",get:function(){return{linear:t.curveLinear,curveStep:t.curveStep,curveStepBefore:t.curveStepBefore,curveStepAfter:t.curveStepAfter,curveBasis:t.curveBasis,curveCardinal:t.curveCardinal,curveMonotoneX:t.curveMonotoneX,curveCatmullRom:t.curveCatmullRom}}}])&&c(r.prototype,n),a&&c(r,a),f}(e);return r}.apply(e,n),void 0===a||(t.exports=a)},76:(t,e,r)=>{var n;t=r.nmd(t),n=function(t){"use strict";var e={version:"0.0.1"},n=r(842),a=r(648),o=r(605),i=r(131),c=r(316),l=r(535),s=r(502),u=r(487),f=r(557),p=r(775),d=r(312),y=r(345),h=r(255),m=r(587),g=r(132);return e.chart=n,e.aster=a,e.areachart=o,e.barchart=i,e.boxplot=c,e.donut=l,e.histogram=s,e.horizontalBoxplot=u,e.line=f,e.trellisline=p,e.treemap=d,e.scatterplot=y,e.splitBoxplot=h,e.sunburst=m,e.util=g,e}.call(e,r,e,t),void 0===n||(t.exports=n)},345:(t,e,r)=>{var n,a;function o(t){return o="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},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}},l(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}n=[r(680),r(842)],a=function(t,e){"use strict";var r=function(e){!function(t,e){if("fu