<commit_before>var _ = require("./utils"),
    $Element = require("./element"),
    features = require("./features"),
    importStyles = require("./dom.importstyles"),
    animationEvents = features.WEBKIT_PREFIX ? ["webkitAnimationEnd", "webkitTransitionEnd"] : ["animationend", "transitionend"],
    createCallback = function(el, callback, fn) {
        return function() {
            el.legacy(function(node, el, index, ref) {
                var hidden = typeof fn === "function" ? fn(el) : fn,
                    transitionDelay = parseFloat(el.style("transition-duration")),
                    animationDelay = parseFloat(el.style("animation-duration")),
                    iterationCount = el.style("animation-iteration-count"),
                    completeCallback = (callback || hidden) && function() {
                        // remove temporary inline styles
                        if (hidden) el.style({ visibility: null, position: null });

                        if (callback) callback(el, index, ref);
                    };

                if (features.CSS3_ANIMATIONS && (transitionDelay || animationDelay && iterationCount !== "infinite")) {
                    if (completeCallback) {
                        // choose max delay
                        el.once(animationEvents[animationDelay > transitionDelay ? 0 : 1], completeCallback);
                    }
                } else {
                    // use setTimeout to make a safe call
                    if (completeCallback) setTimeout(completeCallback, 0);
                }

                if (hidden) {
                    // store inline styles because they'll be temporary overwritten
                    el._oldstyle = { visibility: node.style.visibility, position: node.style.position };
                    // set current styles inline to override inherited from
                    // the [aria-hidden=true] rule until the element animation ends
                    el.style(el.style(["visibility", "position"]));
                } else {
                    if (el._oldstyle) {<commit_msg>Opera could return -1 for animation-iteration-count<commit_after>var _ = require("./utils"),
    $Element = require("./element"),
    features = require("./features"),
    importStyles = require("./dom.importstyles"),
    animationEvents = features.WEBKIT_PREFIX ? ["webkitAnimationEnd", "webkitTransitionEnd"] : ["animationend", "transitionend"],
    createCallback = function(el, callback, fn) {
        return function() {
            el.legacy(function(node, el, index, ref) {
                var hidden = typeof fn === "function" ? fn(el) : fn,
                    transitionDelay = parseFloat(el.style("transition-duration")),
                    animationDelay = parseFloat(el.style("animation-duration")),
                    iterationCount = el.style("animation-iteration-count"),
                    completeCallback = (callback || hidden) && function() {
                        // remove temporary inline styles
                        if (hidden) el.style({ visibility: null, position: null });

                        if (callback) callback(el, index, ref);
                    };

                if (features.CSS3_ANIMATIONS && (transitionDelay || animationDelay && iterationCount >= 1)) {
                    if (completeCallback) {
                        // choose max delay
                        el.once(animationEvents[animationDelay > transitionDelay ? 0 : 1], completeCallback);
                    }
                } else {
                    // use setTimeout to make a safe call
                    if (completeCallback) setTimeout(completeCallback, 0);
                }

                if (hidden) {
                    // store inline styles because they'll be temporary overwritten
                    el._oldstyle = { visibility: node.style.visibility, position: node.style.position };
                    // set current styles inline to override inherited from
                    // the [aria-hidden=true] rule until the element animation ends
                    el.style(el.style(["visibility", "position"]));
                } else {
                    if (el._oldstyle) {
{'fraction_non_alphanumeric': 0.11185149928605426, 'fraction_numerical': 0.002379819133745835, 'mean_word_length': 1.7063747585318738, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1043290', 'n_tokens_mistral': 982, 'n_tokens_neox': 910, 'n_words': 247}