"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const format = require("../../util/format.js");
const env = require("../../../../../../zrender@5.4.4/node_modules/zrender/lib/core/env.js");
function shouldTooltipConfine(tooltipModel) {
  var confineOption = tooltipModel.get("confine");
  return confineOption != null ? !!confineOption : tooltipModel.get("renderMode") === "richText";
}
function testStyle(styleProps) {
  if (!env.default.domSupported) {
    return;
  }
  var style = document.documentElement.style;
  for (var i = 0, len = styleProps.length; i < len; i++) {
    if (styleProps[i] in style) {
      return styleProps[i];
    }
  }
}
var TRANSFORM_VENDOR = testStyle(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]);
var TRANSITION_VENDOR = testStyle(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
function toCSSVendorPrefix(styleVendor, styleProp) {
  if (!styleVendor) {
    return styleProp;
  }
  styleProp = format.toCamelCase(styleProp, true);
  var idx = styleVendor.indexOf(styleProp);
  styleVendor = idx === -1 ? styleProp : "-" + styleVendor.slice(0, idx) + "-" + styleProp;
  return styleVendor.toLowerCase();
}
function getComputedStyle(el, style) {
  var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);
  return stl ? style ? stl[style] : stl : null;
}
exports.TRANSFORM_VENDOR = TRANSFORM_VENDOR;
exports.TRANSITION_VENDOR = TRANSITION_VENDOR;
exports.getComputedStyle = getComputedStyle;
exports.shouldTooltipConfine = shouldTooltipConfine;
exports.toCSSVendorPrefix = toCSSVendorPrefix;
