<commit_before>import Event from './Event';
const isCssAnimationSupported = Event.endEvents.length !== 0;
import classes from 'component-classes';

const capitalPrefixes = ['Webkit',
  'Moz',
  'O',
  // ms is special .... !
  'ms'];
const prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', ''];

function getCssProperty(node, name) {
  const style = window.getComputedStyle(node);

  let ret = '';
  for (let i = 0; i < prefixes.length; i++) {
    ret = style.getPropertyValue(prefixes[i] + name);
    if (ret) {
      break;
    }
  }
  return (ret);
}

function fixBrowserByTimeout(node) {
  if (isCssAnimationSupported) {
    const transitionDelay = parseFloat(getCssProperty(node, 'transition-delay')) || 0;
    const transitionDuration = parseFloat(getCssProperty(node, 'transition-duration')) || 0;
    const animationDelay = parseFloat(getCssProperty(node, 'animation-delay')) || 0;
    const animationDuration = parseFloat(getCssProperty(node, 'animation-duration')) || 0;
    const time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);
    // sometimes, browser bug
    node.rcEndAnimTimeout = setTimeout(() => {
      node.rcEndAnimTimeout = null;
      if (node.rcEndListener) {
        node.rcEndListener();
      }
    }, (time) * 1000 + 200);
  }
}

function clearBrowserBugTimeout(node) {
  if (node.rcEndAnimTimeout) {
    clearTimeout(node.rcEndAnimTimeout);
    node.rcEndAnimTimeout = null;
  }
}
<commit_msg>Slightly more consistent name for getStyleProperty<commit_after>import Event from './Event';
const isCssAnimationSupported = Event.endEvents.length !== 0;
import classes from 'component-classes';

const capitalPrefixes = ['Webkit',
  'Moz',
  'O',
  // ms is special .... !
  'ms'];
const prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', ''];

function getStyleProperty(node, name) {
  const style = window.getComputedStyle(node);

  let ret = '';
  for (let i = 0; i < prefixes.length; i++) {
    ret = style.getPropertyValue(prefixes[i] + name);
    if (ret) {
      break;
    }
  }
  return (ret);
}

function fixBrowserByTimeout(node) {
  if (isCssAnimationSupported) {
    const transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0;
    const transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0;
    const animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0;
    const animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0;
    const time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);
    // sometimes, browser bug
    node.rcEndAnimTimeout = setTimeout(() => {
      node.rcEndAnimTimeout = null;
      if (node.rcEndListener) {
        node.rcEndListener();
      }
    }, (time) * 1000 + 200);
  }
}

function clearBrowserBugTimeout(node) {
  if (node.rcEndAnimTimeout) {
    clearTimeout(node.rcEndAnimTimeout);
    node.rcEndAnimTimeout = null;
  }
}

{'fraction_non_alphanumeric': 0.14675193537529452, 'fraction_numerical': 0.008751262201279031, 'mean_word_length': 3.888157894736842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3568769', 'n_tokens_mistral': 941, 'n_tokens_neox': 913, 'n_words': 205}