/*! * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license * * billboard.js, JavaScript chart library * http://naver.github.io/billboard.js/ * * @version 1.9.5 */ !function webpackUniversalModuleDefinition(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("d3-time-format"),require("d3-selection"),require("d3-transition"),require("d3-axis"),require("d3-brush"),require("d3-scale"),require("d3-dsv"),require("d3-drag"),require("d3-shape"),require("d3-interpolate"),require("d3-color"),require("d3-zoom"),require("d3-ease"));else if("function"==typeof define&&define.amd)define(["d3-time-format","d3-selection","d3-transition","d3-axis","d3-brush","d3-scale","d3-dsv","d3-drag","d3-shape","d3-interpolate","d3-color","d3-zoom","d3-ease"],e);else{var i="object"==typeof exports?e(require("d3-time-format"),require("d3-selection"),require("d3-transition"),require("d3-axis"),require("d3-brush"),require("d3-scale"),require("d3-dsv"),require("d3-drag"),require("d3-shape"),require("d3-interpolate"),require("d3-color"),require("d3-zoom"),require("d3-ease")):e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(this,function(i,n,a,r,o,s,c,l,u,d,g,h,f){return x={},__webpack_require__.m=p=[function(t,e,i){i(1),t.exports=i(28)},function(t,e,i){},function(t,e){t.exports=function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,i){var n=i(4),a=i(5),r=i(6);t.exports=function _slicedToArray(t,e){return n(t)||a(t,e)||r()}},function(t,e){t.exports=function _arrayWithHoles(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function _iterableToArrayLimit(t,e){var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!e||i.length!==e);n=!0);}catch(t){a=!0,r=t}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}},function(t,e){t.exports=function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e){function _defineProperties(t,e){for(var i=0;i/g,">"):t}function sc(i,t){var n=2n&&(n=(e=t).values.length)}):e=i?t[0]:null,e},mapToIds:function mapToIds(t){return t.map(function(t){return t.id})},mapToTargetIds:function mapToTargetIds(t){return t?mc(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function hasTarget(t,e){for(var i,n=this.mapToIds(t),a=0;i=n[a];a++)if(i===e)return!0;return!1},isTargetToShow:function isTargetToShow(t){return this.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function isLegendToShow(t){return this.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function filterTargetsToShow(t){var e=this;return(t||e.data.targets).filter(function(t){return e.isTargetToShow(t.id)})},mapTargetsToUniqueXs:function mapTargetsToUniqueXs(t){var e=[];return t&&t.length&&(e=function(t){return t.filter(function(t,e,i){return i.indexOf(t)===e})}(Dc(t.map(function(t){return t.values.map(function(t){return+t.x})}))),e=this.isTimeSeries()?e.map(function(t){return new Date(+t)}):e.map(function(t){return+t})),Fc(e)},addHiddenTargetIds:function addHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},removeHiddenTargetIds:function removeHiddenTargetIds(e){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(t){return e.indexOf(t)<0})},addHiddenLegendIds:function addHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},removeHiddenLegendIds:function removeHiddenLegendIds(e){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(t){return e.indexOf(t)<0})},getValuesAsIdKeyed:function getValuesAsIdKeyed(t){var n=this,e={},a=n.isMultipleX(),r=a?n.mapTargetsToUniqueXs(t).map(function(t){return bc(t)?t:+t}):null;return t.forEach(function(t){var i=[];t.values.forEach(function(t){var e=t.value;mc(e)?i.push.apply(i,S()(e)):nc(e)&&"high"in e?i.push.apply(i,S()(Object.values(e))):a?i[n.getIndexByX(t.x,r)]=e:i.push(e)}),e[t.id]=i}),e},checkValueInTargets:function checkValueInTargets(t,e){for(var i,n=Object.keys(t),a=0;a=c)&&(a=!0,t.preventDefault())})(P.event),dA(this)}else r.unselectRect(),r.callOverOutForTouch()}).on("touchend.eventRect",function(){var t=bA();!t.empty()&&t.classed(B.eventRect)&&(r.hasArcType()||!r.toggleShape||r.cancelClick)&&r.cancelClick&&(r.cancelClick=!1)})},updateEventRect:function updateEventRect(t){var e,i,n,a,r=this,o=r.config,s=r.zoomScale||r.x,c=t||r.eventRect.data(),l=o.axis_rotated;if(r.isMultipleX())i=e=0,n=r.width,a=r.height;else{var u,d;if(r.isCategorized())u=r.getEventRectWidth(),d=function(t){return s(t.x)-u/2};else{r.updateXs();var g=function(t){var e=t.index;return{prev:r.getPrevX(e),next:r.getNextX(e)}};u=function(t){var e=g(t);return null===e.prev&&null===e.next?l?r.height:r.width:(null===e.prev&&(e.prev=s.domain()[0]),null===e.next&&(e.next=s.domain()[1]),Math.max(0,(s(e.next)-s(e.prev))/2))},d=function(t){var e=g(t),i=r.data.xs[t.id][t.index];return null===e.prev&&null===e.next?0:(null===e.prev&&(e.prev=s.domain()[0]),(s(i)+s(e.prev))/2)}}e=l?0:d,i=l?d:0,n=l?r.width:u,a=l?u:r.height}c.attr("class",r.classEvent.bind(r)).attr("x",e).attr("y",i).attr("width",n).attr("height",a)},selectRectForSingle:function selectRectForSingle(i,n,a){var r=this,o=r.config,s=o.data_selection_enabled,c=o.data_selection_grouped,l=o.tooltip_grouped,t=r.getAllValuesOnIndex(a);l&&(r.showTooltip(t,i),r.showXGridFocus(t),!s||c)||r.main.selectAll(".".concat(B.shape,"-").concat(a)).each(function(){Object(P.select)(this).classed(B.EXPANDED,!0),s&&n.style("cursor",c?"pointer":null),l||(r.hideXGridFocus(),r.hideTooltip(),c||r.expandCirclesBars(a))}).filter(function(t){return r.isWithinShape(this,t)}).call(function(t){var e=t.data();s&&(c||o.data_selection_isselectable(e))&&n.style("cursor","pointer"),l||(r.showTooltip(e,i),r.showXGridFocus(e),r.unexpandCircles(),t.each(function(t){return r.expandCirclesBars(a,t.id)}))})},expandCirclesBars:function expandCirclesBars(t,e,i){this.config.point_focus_expand_enabled&&this.expandCircles(t,e,i),this.expandBars(t,e,i)},selectRectForMultipleXs:function selectRectForMultipleXs(t){var e=this,i=e.config,n=e.filterTargetsToShow(e.data.targets);if(!e.dragging&&!e.hasArcType(n)){var a=Object(P.mouse)(t),r=e.findClosestFromTargets(n,a);if(!e.mouseover||r&&r.id===e.mouseover.id||(i.data_onout.call(e.api,e.mouseover),e.mouseover=void 0),!r)return void e.unselectRect();var o=(e.isBubbleType(r)||e.isScatterType(r)||!i.tooltip_grouped?[r]:e.filterByX(n,r.x)).map(function(t){return e.addName(t)});e.showTooltip(o,t),e.expandCirclesBars(r.index,r.id,!0),e.showXGridFocus(o),(e.isBarType(r.id)||e.dist(r,a)i.gauge_max&&(i.gauge_max=o);var s=Math.PI*(i.gauge_fullCircle?2:1),c=i.gauge_startingAngle,l=s*(o/(i.gauge_max-i.gauge_min));n=e.pie.startAngle(c).endAngle(l+c)}return n(e.filterTargetsToShow()).forEach(function(t){r||t.data.id!==a.data.id||(r=!0,a=t)}),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),r?a:null},getSvgArc:function getSvgArc(){function cF(t,e){var i="M 0 0";if(t.value||t.data){cc(r)||(o=o.innerRadius(a.getInnerRadius(t)));var n=!e&&a.updateAngle(t);e?i=o(t):n&&(i=o(n))}return i}var a=this,r=a.getInnerRadius(),o=Object(w.arc)().outerRadius(a.radius).innerRadius(cc(r)?r:0);return cF.centroid=o.centroid,cF},getSvgArcExpanded:function getSvgArcExpanded(t){var i=this,n=Object(w.arc)().outerRadius(i.radiusExpanded*(t||1));return function(t){var e=i.updateAngle(t);return e?n.innerRadius(i.getInnerRadius(t))(e):"M 0 0"}},getArc:function getArc(t,e,i){return i||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function transformForArcLabel(t){var e=this,i=e.config,n=e.updateAngle(t),a="";if(n&&(!e.hasType("gauge")||e.hasMultiTargets())){var r=this.svgArc.centroid(n),o=isNaN(r[0])?0:r[0],s=isNaN(r[1])?0:r[1],c=Math.sqrt(o*o+s*s),l=e.hasType("donut")&&i.donut_label_ratio||e.hasType("pie")&&i.pie_label_ratio;l=l?ac(l)?l(t,e.radius,c):l:e.radius&&(c?(.375<36/e.radius?1.175-36/e.radius:.8)*e.radius/c:0),a="translate(".concat(o*l,",").concat(s*l,")")}return a},convertToArcData:function convertToArcData(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function textForArcLabel(t){var s=this;s.shouldShowArcLabel()&&t.each(function(t){var e=Object(P.select)(this),i=s.updateAngle(t),n=i?i.value:null,a=s.getRatio("arc",i),r=t.data.id;if(s.hasType("gauge")||s.meetsArcLabelThreshold(a)){var o=(s.getArcLabelFormat()||s.defaultArcValueFormat)(n,a,r).toString();sc(e,o)}})},textForGaugeMinMax:function textForGaugeMinMax(t,e){var i=this.getGaugeLabelExtents();return i?i(t,e):t},expandArc:function expandArc(t){var i=this;if(i.transiting)var e=setInterval(function(){i.transiting||(clearInterval(e),0r.width?n=r.width-i.getBoundingClientRect().width:n<0&&(n=4)),s&&(n+=r.getCenteredTextPos(e,t,i)),n+(o.data_labels_position.x||0)},getYForText:function getYForText(t,e,i){var n,a=this,r=a.config,o=r.axis_rotated,s=r.point_r,c=i.getBoundingClientRect(),l=3;if(o)n=(t[0][0]+t[2][0]+.6*c.height)/2;else if(n=t[2][1],cc(s)&&5this.height&&(n=this.height-4)}return o||(n+=a.getCenteredTextPos(e,t,i)),n+(r.data_labels_position.y||0)}});var X={Area:["area","area-spline","area-spline-range","area-line-range","area-step"],AreaRange:["area-spline-range","area-line-range"],Arc:["pie","donut","gauge","radar"],Line:["line","spline","area","area-spline","area-spline-range","area-line-range","step","area-step"],Step:["step","area-step"],Spline:["spline","area-spline","area-spline-range"]};yc(b.prototype,{setTargetType:function setTargetType(t,e){var i=this,n=i.config;i.mapToTargetIds(t).forEach(function(t){i.withoutFadeIn[t]=e===n.data_types[t],n.data_types[t]=e}),t||(n.data_type=e)},hasType:function hasType(i,t){var n=this.config.data_types,e=t||this.data.targets,a=!1;return e&&e.length?e.forEach(function(t){var e=n[t.id];(e&&0<=e.indexOf(i)||!e&&"line"===i)&&(a=!0)}):Object.keys(n).length?Object.keys(n).forEach(function(t){n[t]===i&&(a=!0)}):a=this.config.data_type===i,a},hasTypeOf:function hasTypeOf(t,e,i){var n=this,a=2i&&(n=n.filter(function(t){return(t+"").indexOf(".")<0}));return n},getGridFilterToRemove:function getGridFilterToRemove(t){return t?function(e){var i=!1;return(mc(t)?t.concat():[t]).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(i=!0)}),i}:function(){return!0}},removeGridLines:function removeGridLines(t,e){var i=this.config,n=this.getGridFilterToRemove(t),a=e?B.xgridLines:B.ygridLines,r=e?B.xgridLine:B.ygridLine;this.main.select(".".concat(a)).selectAll(".".concat(r)).filter(n).transition().duration(i.transition_duration).style("opacity","0").remove();var o="grid_".concat(e?"x":"y","_lines");i[o]=i[o].filter(function toShow(t){return!n(t)})}}),yc(b.prototype,{initTooltip:function initTooltip(){var e=this,i=e.config,t=i.tooltip_contents.bindto;if(e.tooltip=Object(P.select)(t),e.tooltip.empty()&&(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",B.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),i.tooltip_init_show){if(e.isTimeSeries()&&bc(i.tooltip_init_x)){var n,a,r=e.data.targets[0];for(i.tooltip_init_x=e.parseDate(i.tooltip_init_x),n=0;(a=r.values[n])&&a.x-i.tooltip_init_x!=0;n++);i.tooltip_init_x=n}e.tooltip.html(e.getTooltipHTML(e.data.targets.map(function(t){return e.addName(t.values[i.tooltip_init_x])}),e.axis.getXAxisTickFormat(),e.getYFormat(e.hasArcType(null,["radar"])),e.color)),t||e.tooltip.style("top",i.tooltip_init_position.top).style("left",i.tooltip_init_position.left).style("display","block")}},getTooltipHTML:function getTooltipHTML(){for(var t,e,i=this,n=i.config,a=arguments.length,r=Array(a),o=0;o'.concat(y,""):""})}if(x=[p.ratio,p.id,p.index,t],v=rc(c.apply(void 0,[gX(p)].concat(S()(x)))),a.isAreaRangeType(p)){var b=["high","low"].map(function(t){return rc(c.apply(void 0,[a.getAreaRangeData(p,t)].concat(S()(x))))}),T=L()(b,2),A=T[0],w=T[1];v="Mid: ".concat(v," High: ").concat(A," Low: ").concat(w)}if(void 0!==v)if("continue"===function(){if(null===p.name)return"continue";var t=rc(s.apply(void 0,[p.name].concat(S()(x)))),e=u(p),i={CLASS_TOOLTIP_NAME:B.tooltipName+a.getTargetSelectorSuffix(p.id),COLOR:g||!a.patterns?e:''),NAME:t,VALUE:v};g&&nc(d.text)&&Object.keys(d.text).forEach(function(t){i[t]=d.text[t][m]}),f+=Jc(_[1],i)}())continue}return"".concat(f,"")},getTooltipContentTemplate:function getTooltipContentTemplate(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t'.concat(this.patterns?"{=COLOR}":'','{=NAME}\n\t\t\t\t\t{=VALUE}\n\t\t\t\t}}\n\t\t\t')).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},tooltipPosition:function tooltipPosition(t,e,i,n){var a=this,r=a.config,o=Object(P.mouse)(n),s=L()(o,2),c=s[0],l=s[1],u=a.getSvgLeft(!0),d=u+a.currentWidth-a.getCurrentPaddingRight();if(l+=20,a.hasArcType()){"touch"===a.inputType||a.hasType("radar")||(l+=a.height/2,c+=(a.width-(a.isLegendRight?a.getLegendWidth():0))/2)}else{var g=a.x(t[0].x);r.axis_rotated?(l=g+20,c+=u+100,d-=u):(l-=5,c=u+a.getCurrentPaddingLeft(!0)+20+(a.zoomScale?c:g))}var h=c+e;return da.currentHeight&&(l-=i+30),l<0&&(l=0),{top:l,left:c}},showTooltip:function showTooltip(t,e){var i=this,n=i.config,a=n.tooltip_contents.bindto,r=i.hasArcType(null,["radar"]),o=t.filter(function(t){return t&&_b(i.getBaseValue(t))}),s=n.tooltip_position||i.tooltipPosition;if(0!==o.length&&n.tooltip_show){var c=i.tooltip.datum(),l=JSON.stringify(t),u=c&&c.width||0,d=c&&c.height||0;if(!c||c.current!==l){var g=t.concat().sort()[0].index;qc(n.tooltip_onshow,i),i.tooltip.html(i.getTooltipHTML(t,i.axis.getXAxisTickFormat(),i.getYFormat(r),i.color)).style("display",null).style("visibility",null).datum({index:g,current:l,width:u=i.tooltip.property("offsetWidth"),height:d=i.tooltip.property("offsetHeight")}),qc(n.tooltip_onshown,i),i._handleLinkedCharts(!0,g)}if(!a){var h=s.call(this,o,u,d,e);i.tooltip.style("top","".concat(h.top,"px")).style("left","".concat(h.left,"px"))}}},hideTooltip:function hideTooltip(t){var e=this.config;e.tooltip_doNotHide&&!t||(qc(e.tooltip_onhide,this),this.tooltip.style("display","none").style("visibility","hidden").datum(null),qc(e.tooltip_onhidden,this))},_handleLinkedCharts:function _handleLinkedCharts(s,c){var l=this;if(l.config.tooltip_linked){var u=l.config.tooltip_linked_name;(l.api.internal.charts||[]).forEach(function(t){if(t!==l.api){var e=t.internal.config,i=e.tooltip_linked,n=e.tooltip_linked_name,a=C.a.body.contains(t.element);if(i&&u===n&&a){var r=t.internal.tooltip.data()[0],o=c!==(r&&r.index);try{s&&o?t.tooltip.show({index:c}):s||t.tooltip.hide()}catch(t){}}}})}}}),yc(b.prototype,{initLegend:function initLegend(){var t=this,e=t.config;t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g"),e.legend_show?(t.legend.attr("transform",t.getTranslate("legend")),t.updateLegend()):(t.legend.style("visibility","hidden"),t.hiddenLegendIds=t.mapToIds(t.data.targets))},updateLegend:function updateLegend(t,e,i){var n=this,a=n.config,r=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};r.withTransition=oc(r,"withTransition",!0),r.withTransitionForTransform=oc(r,"withTransitionForTransform",!0),a.legend_contents_bindto&&a.legend_contents_template?n.updateLegendTemplate():n.updateLegendElement(t||n.mapToIds(n.data.targets),r,i),n.legend.selectAll(".".concat(B.legendItem)).classed(B.legendItemHidden,function(t){return!n.isTargetToShow(t)}),n.updateScales(!1,!n.zoomScale),n.updateSvgSize(),n.transformAll(r.withTransitionForTransform,i),n.legendHasRendered=!0},updateLegendTemplate:function updateLegendTemplate(){var i=this,t=i.config,e=Object(P.select)(t.legend_contents_bindto),n=t.legend_contents_template;if(!e.empty()){var a=i.mapToIds(i.data.targets),r=[],o="";a.forEach(function(t){var e=ac(n)?n.call(i,t,i.color(t),i.api.data(t)[0].values):Jc(n,{COLOR:i.color(t),TITLE:t});e&&(r.push(t),o+=e)});var s=e.html(o).selectAll(function(){return this.childNodes}).data(r);i.setLegendItem(s),i.legend=e}},updateSizeForLegend:function updateSizeForLegend(t){var e=this,i=e.config,n=t.width,a=t.height,r={top:e.isLegendTop?e.getCurrentPaddingTop()+i.legend_inset_y+5.5:e.currentHeight-a-e.getCurrentPaddingBottom()-i.legend_inset_y,left:e.isLegendLeft?e.getCurrentPaddingLeft()+i.legend_inset_x+.5:e.currentWidth-n-e.getCurrentPaddingRight()-i.legend_inset_x+.5};e.margin3={top:e.isLegendRight?0:e.isLegendInset?r.top:e.currentHeight-a,right:NaN,bottom:0,left:e.isLegendRight?e.currentWidth-n:e.isLegendInset?r.left:0}},transformLegend:function transformLegend(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},updateLegendStep:function updateLegendStep(t){this.legendStep=t},updateLegendItemWidth:function updateLegendItemWidth(t){this.legendItemWidth=t},updateLegendItemHeight:function updateLegendItemHeight(t){this.legendItemHeight=t},getLegendWidth:function getLegendWidth(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},getLegendHeight:function getLegendHeight(){var t=this;return t.config.legend_show?t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1):0},opacityForLegend:function opacityForLegend(t){return t.classed(B.legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function opacityForUnfocusedLegend(t){return t.classed(B.legendItemHidden)?null:"0.3"},toggleFocusLegend:function toggleFocusLegend(t,e){var i=this,n=i.mapToTargetIds(t);i.legend.selectAll(".".concat(B.legendItem)).filter(function(t){return 0<=n.indexOf(t)}).classed(B.legendItemFocused,e).transition().duration(100).style("opacity",function(){return(e?i.opacityForLegend:i.opacityForUnfocusedLegend).call(i,Object(P.select)(this))})},revertLegend:function revertLegend(){var t=this;t.legend.selectAll(".".concat(B.legendItem)).classed(B.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend(Object(P.select)(this))})},showLegend:function showLegend(t){var e=this,i=e.config;i.legend_show||(i.legend_show=!0,e.legend.style("visibility","visible"),e.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend(Object(P.select)(this))})},hideLegend:function hideLegend(t){var e=this,i=e.config;i.legend_show&&kc(t)&&(i.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},clearLegendItemTextBoxCache:function clearLegendItemTextBoxCache(){this.legendItemTextBox={}},setLegendItem:function setLegendItem(t){var i=this,e=i.config,n="touch"===i.inputType;t.attr("class",function(t){var e=Object(P.select)(this);return(!e.empty()&&e.attr("class")||"")+i.generateClass(B.legendItem,t)}).style("visibility",function(t){return i.isLegendToShow(t)?"visible":"hidden"}).style("cursor","pointer").on("click",function(t){qc(e.legend_item_onclick,i,t)||(P.event.altKey?(i.api.hide(),i.api.show(t)):(i.api.toggle(t),!n&&i.isTargetToShow(t)?i.api.focus(t):i.api.revert())),n&&i.hideTooltip()}),n||t.on("mouseout",function(t){qc(e.legend_item_onout,i,t)||(Object(P.select)(this).classed(B.legendItemFocused,!1),i.api.revert())}).on("mouseover",function(t){qc(e.legend_item_onover,i,t)||(Object(P.select)(this).classed(B.legendItemFocused,!0),!i.transiting&&i.isTargetToShow(t)&&i.api.focus(t))})},updateLegendElement:function updateLegendElement(t,e){function g$(t,e,i){function J$(t,e){e||(n=(l-x-c)/2)<10&&(n=(l-c)/2,x=0,T++),b[t]=T,y[T]=d.isLegendInset?10:n,v[t]=x,x+=c}var n,a=i===w.length-1,r=function(t,e){return d.legendItemTextBox[e]||(d.legendItemTextBox[e]=d.getTextRect(t,B.legendItem)),d.legendItemTextBox[e]}(t,e),o=r.width+h+(a&&!A?0:10)+g.legend_padding,s=r.height+4,c=A?s:o,l=A?d.getLegendHeight():d.getLegendWidth();if(0===i&&(p=f=T=x=0),g.legend_show&&!d.isLegendToShow(e))return m[e]=0,_[e]=0,b[e]=0,void(v[e]=0);m[e]=o,_[e]=s,(!f||f<=o)&&(f=o),(!p||p<=s)&&(p=s);var u=A?p:f;g.legend_equally?(Object.keys(m).forEach(function(t){return m[t]=f}),Object.keys(_).forEach(function(t){return _[t]=p}),(n=(l-u*w.length)/2)<10?(T=x=0,w.forEach(function(t){return J$(t)})):J$(e,!0)):J$(e)}var i,n,a,d=this,g=d.config,h=g.legend_item_tile_width+5,f=0,p=0,x=0,v={},m={},_={},y=[0],b={},T=0,A=d.isLegendRight||d.isLegendInset,w=t.filter(function(t){return!ec(g.data_names[t])||null!==g.data_names[t]}),r=e.withTransition;d.isLegendInset&&(T=g.legend_inset_step?g.legend_inset_step:w.length,d.updateLegendStep(T)),n=d.isLegendRight?(i=function(t){return f*b[t]},function(t){return y[b[t]]+v[t]}):d.isLegendInset?(i=function(t){return f*b[t]+10},function(t){return y[b[t]]+v[t]}):(i=function(t){return y[b[t]]+v[t]},function(t){return p*b[t]});function h$(t,e){return i(t,e)+4+g.legend_item_tile_width}function i$(t,e){return i(t,e)}function j$(t,e){return i(t,e)-2}function k$(t,e){return i(t,e)-2+g.legend_item_tile_width}function l$(t,e){return n(t,e)+9}function m$(t,e){return n(t,e)-5}function n$(t,e){return n(t,e)+4}var o=-200,s=d.legend.selectAll(".".concat(B.legendItem)).data(w).enter().append("g");d.setLegendItem(s),s.append("text").text(function(t){return ec(g.data_names[t])?g.data_names[t]:t}).each(function(t,e){g$(this,t,e)}).style("pointer-events","none").attr("x",A?h$:o).attr("y",A?o:l$),s.append("rect").attr("class",B.legendItemEvent).style("fill-opacity","0").attr("x",A?i$:o).attr("y",A?o:m$);var c=d.config.legend_usePoint;if(c){var l=[];s.append(function(t){var e=lc(g.point_pattern)?g.point_pattern:[g.point_type];-1===l.indexOf(t)&&l.push(t);var i=e[l.indexOf(t)%e.length];return"rectangle"===i&&(i="rect"),C.a.createElementNS(P.namespaces.svg,d.hasValidPointType(i)?i:"use")}).attr("class",B.legendItemPoint).style("fill",function(t){return d.color(t)}).style("pointer-events","none").attr("href",function(t,e,i){return"use"===i[e].nodeName.toLowerCase()?"#".concat(d.datetimeId,"-point-").concat(t):void 0})}else s.append("line").attr("class",B.legendItemTile).style("stroke",d.color).style("pointer-events","none").attr("x1",A?j$:o).attr("y1",A?o:n$).attr("x2",A?k$:o).attr("y2",A?o:n$).attr("stroke-width",g.legend_item_tile_height);a=d.legend.select(".".concat(B.legendBackground," rect")),d.isLegendInset&&0'":;\[\]\/|~`{}\\]/g,"-"):""},selectorTarget:function selectorTarget(t,e){return"".concat(e||"",".").concat(B.target+this.getTargetSelectorSuffix(t))},selectorTargets:function selectorTargets(t,e){var i=this,n=t||[];return n.length?n.map(function(t){return i.selectorTarget(t,e)}):null},selectorLegend:function selectorLegend(t){return".".concat(B.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function selectorLegends(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null}}),yc(Rc.prototype,{focus:function focus(t){var e=this.internal,i=e.mapToTargetIds(t),n=e.svg.selectAll(e.selectorTargets(i.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),n.classed(B.focused,!0).classed(B.defocused,!1),e.hasArcType()&&e.expandArc(i),e.toggleFocusLegend(i,!0),e.focusedTargetIds=i,e.defocusedTargetIds=e.defocusedTargetIds.filter(function(t){return i.indexOf(t)<0})},defocus:function defocus(t){var e=this.internal,i=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(i.filter(e.isTargetToShow,e))).classed(B.focused,!1).classed(B.defocused,!0),e.hasArcType()&&e.unexpandArc(i),e.toggleFocusLegend(i,!1),e.focusedTargetIds=e.focusedTargetIds.filter(function(t){return i.indexOf(t)<0}),e.defocusedTargetIds=i},revert:function revert(t){var e=this.internal,i=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(i)).classed(B.focused,!1).classed(B.defocused,!1),e.hasArcType()&&e.unexpandArc(i),e.config.legend_show&&(e.showLegend(i.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(i)).filter(function(){return Object(P.select)(this).classed(B.legendItemFocused)}).classed(B.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]}}),yc(Rc.prototype,{_showHide:function _showHide(t,e,i){var n=this.internal,a=n.mapToTargetIds(e);n["".concat(t?"remove":"add","HiddenTargetIds")](a);var r=n.svg.selectAll(n.selectorTargets(a)),o=t?"1":"0";r.transition().style("opacity",o,"important").call(n.endall,function(){r.style("opacity",null).style("opacity",o)}),i.withLegend&&n["".concat(t?"show":"hide","Legend")](a),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},show:function show(t,e){var i=1\n\t\t\t\n\t\t\t\t').concat(s,"\n\t\t\t\t").concat(r.replace(/(url\()[^#]+/g,"$1"),"\n\t\t\t").replace("/\n/g","%0A");return"data:image/svg+xml;base64,".concat(function(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x".concat(e))}))}(c))}yc(Rc.prototype,{export:function _export(i,n){var t=this.internal,a={width:t.currentWidth,height:t.currentHeight},e=td(this.element,a);if(ac(n)){var r=new Image;r.crosssOrigin="Anonymous",r.onload=function(){var t=C.a.createElement("canvas"),e=t.getContext("2d");t.width=a.width,t.height=a.height,e.drawImage(r,0,0),n(t.toDataURL(i))},r.src=e}return e}}),i.d(e,"bb",function(){return N});var V={},N={version:"1.9.5",generate:function generate(t){var e=p({},V,t),i=new Rc(e);return i.internal.charts=this.instance,this.instance.push(i),i},defaults:function defaults(t){return nc(t)&&(V=t),V},instance:[],plugin:{},chart:{fn:Rc.prototype,internal:{fn:b.prototype,axis:{fn:y.prototype}}}};e.default=N}],__webpack_require__.c=x,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(__webpack_require__.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(i,n,function(t){return e[t]}.bind(null,n));return i},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0);function __webpack_require__(t){if(x[t])return x[t].exports;var e=x[t]={i:t,l:!1,exports:{}};return p[t].call(e.exports,e,e.exports,__webpack_require__),e.l=!0,e.exports}var p,x}); //# sourceMappingURL=billboard.min.js.map