"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash");exports.enableHighchartsDelayedTooltip=function(r){var t={},o=function(e){return e.map((function(e){return"".concat(e.category," ").concat(e.series.name,": ").concat(e.x," ").concat(e.y)})).join(", ")};function a(e,r){return e===r||Array.isArray(r)&&r.some((function(r){return r===e}))}r.wrap(r.Tooltip.prototype,"refresh",(function(r){for(var i=this,n=arguments.length,s=new Array(n>1?n-1:0),c=1;c<n;c++)s[c-1]=arguments[c];var p=this.chart.options.tooltip.delayForDisplay;if(p>0){var l=Array.isArray(s[0])?o(s[0]):s[0].series.name;t[l]&&(clearTimeout(t[l]),delete t[l]),this.chart.tooltip.hide(),t[l]=setTimeout((function(){a(i.chart.hoverPoint,s[0])&&(e.every(s[0],e.isEmpty)||r.apply(i,s))}),p)}else r.apply(this,s)}))};
