<commit_before>/**
 * Fixes for shitty browsers.
 */

import 'core-js/fn/array/from'
import 'core-js/fn/object/assign'


/*
 * Promise polyfill.
 */
import Promise from 'promise-polyfill'

if (!window.Promise) {
  window.Promise = Promise
}


/**
 * Fetch polyfill (requires Promise polyfill).
 */
import 'whatwg-fetch'


/*
 * closest polyfill from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
 */
if (window.Element && !Element.prototype.closest) {
  Element.prototype.closest = function(s) {
    var i, el = this,
      matches = (this.document || this.ownerDocument).querySelectorAll(s)

    do {
      i = matches.length
      while (--i >= 0 && matches.item(i) !== el) {}
    } while ((i < 0) && (el = el.parentElement))
    return el
  }
}


/*
 * Performance polyfill.
 */

// @license http://opensource.org/licenses/MIT
// copyright <NAME> 2015


// Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
//   github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values

// if you want values similar to what you'd get with real perf.now, place this towards the head of the page
// but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed

if ('performance' in window === false) {
    window.performance = {}
}

Date.now = (Date.now || function () {  // thanks IE8
  return new Date().getTime()
})
<commit_msg>Cleaned polyfill file<commit_after>/**
 * Fixes for shitty browsers.
 */

import 'core-js/fn/array/from'
import 'core-js/fn/object/assign'


/*
 * Promise polyfill.
 */
import Promise from 'promise-polyfill'

if (!window.Promise) {
  window.Promise = Promise
}


/*
 * Fetch polyfill (requires Promise polyfill).
 */
import 'whatwg-fetch'


/*
 * Element.matches and Elements.closest polyfill
 * from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
 */
if (!Element.prototype.matches) {
  Element.prototype.matches = Element.prototype.msMatchesSelector
                              || Element.prototype.webkitMatchesSelector
}

if (!Element.prototype.closest) {
  Element.prototype.closest = function(s) {
    var el = this
    var ancestor = this

    if (!document.documentElement.contains(el)) {
      return null
    }

    do {
      if (ancestor.matches(s)) {
        return ancestor
      }

      ancestor = ancestor.parentElement
    } while (ancestor !== null)

    return null
  }
}


/*
 * Performance polyfill.
 * @license http://opensource.org/licenses/MIT
 * copyright <NAME> 2015
 */

if ('performance' in window === false) {
    window.performance = {}
}

{'fraction_non_alphanumeric': 0.1373546511627907, 'fraction_numerical': 0.005087209302325582, 'mean_word_length': 3.0248538011695905, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1020037', 'n_tokens_mistral': 898, 'n_tokens_neox': 846, 'n_words': 225}