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