"use client";
import { isWellBehavedNumber as m } from "../../../util/isWellBehavedNumber.js";
var v = (e, r) => {
  var i = e?.index;
  if (i == null)
    return null;
  var n = Number(i);
  if (!m(n))
    return i;
  var u = 0, l = 1 / 0;
  return r.length > 0 && (l = r.length - 1), String(Math.max(u, Math.min(n, l)));
};
export {
  v as combineActiveTooltipIndex
};
