<commit_before>'use strict';

var react = require('react'),
    FluxexObject = require('./fluxobj'),
    FluxexStore = require('./fluxstore'),
    FluxexHtml = require('./fluxhtml'),

countWeight = function (O, N, names) {
    var weight = 1;

    if (N == '_wait') {
        return 0;
    }

    if (!O) {
        return 1;
    }

    if (O._score) {
        return O._score;
    }

    names[N] = true;
    Object.keys(O).forEach(function (K) {
        if (names[K]) {
            throw new Error('Circular waitFor dependency detected on store `' + N + '` (' + Object.keys(names).concat([K]).join('->') + ') !');
        }
        weight += countWeight(O[K], K, names);
    });
    delete names[N];

    return weight;
},

// jscs:disable checkRedundantParams
/**
 * Fluxex object is an isomorphic application
 * @class
 * @augments FluxexObject
 * @param {Object=} state - Serialized Fluxex application state
 */
// jscs:enable
Fluxex = function Fluxex() {
    FluxexObject.apply(this, arguments);

    // !== check failed in IE8, so we use != here.
    if ((this.constructor != Fluxex) && !this.stores) {
        throw new Error('Your app should define this.stores !!');
    }

    this._initStore();
    this._initDispatch();
};

Fluxex.prototype = new FluxexObject();

Object.assign(Fluxex.prototype,
/** @lends Fluxex# */
{<commit_msg>fix IE8<commit_after>'use strict';

var react = require('react'),
    FluxexObject = require('./fluxobj'),
    FluxexStore = require('./fluxstore'),
    FluxexHtml = require('./fluxhtml'),

countWeight = function (O, N, names) {
    var weight = 1;

    if (N == '_wait') {
        return 0;
    }

    if (!O) {
        return 1;
    }

    if (O._score) {
        return O._score;
    }

    names[N] = true;
    Object.keys(O).forEach(function (K) {
        if (names[K]) {
            throw new Error('Circular waitFor dependency detected on store `' + N + '` (' + Object.keys(names).concat([K]).join('->') + ') !');
        }
        weight += countWeight(O[K], K, names);
    });
    delete names[N];

    return weight;
},

// jscs:disable checkRedundantParams
/**
 * Fluxex object is an isomorphic application
 * @class
 * @augments FluxexObject
 * @param {Object=} state - Serialized Fluxex application state
 */
// jscs:enable
Fluxex = function Fluxex() {
    FluxexObject.apply(this, arguments);

    // constructor == check failed in IE8, so we use .match() hack
    if (!this.stores && !this.constructor.toString().match(/__SELF__CHECK__HIT__THIS__/)) {
        throw new Error('Your app should define this.stores !!');
    }

    this._initStore();
    this._initDispatch();
};

Fluxex.prototype = new FluxexObject();

Object.assign(Fluxex.prototype,
/** @lends Fluxex# */
{
{'fraction_non_alphanumeric': 0.16483516483516483, 'fraction_numerical': 0.0032967032967032967, 'mean_word_length': 2.7257844474761255, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3458896', 'n_tokens_mistral': 916, 'n_tokens_neox': 886, 'n_words': 216}