<commit_before>/*global define*/

define([
	'jquery',
	'backbone',
	'underscore',
	'epoxy'
], function ($, Backbone, _, Epoxy) {

	'use strict';

	/**
	 * View model
	 */
	var ViewModel = Epoxy.Model.extend({

		/**
		 * Default model values
		 * @type {Object}
		 */
		defaults: {
			loaded: false,
			active: false,
			loadedComponents: {},
			target: '',
			role: '',
			view: '',
			replace: false,
			rendered: false,
			children: undefined,
			default: undefined
		},


		/**
		 * Computed properites
		 * @type {Object}
		 */
		computeds: {
			activeChild: function (children) {
				return this.activeChild();
			}
		},


		/**
		 * Initialize
		 */
		initialize: function () {

			this.set('children', new ViewsCollection());
			this.set('loadedComponents', {
				loader: false,
				children: false
			});
		},


		/**
		 * Get the active child for a role
		 * @param {String} role
		 */
		activeChild: function (role) {
			return this.get('children').active(role || 'primary');
		}


		/**
		 * Triggered by the view on load
		 */
		onLoaded: function () {

			this.trigger('loaded', this);
		}
	});


	/**
	 * Views collection - declared here because of circular dependencies
	 */
	var ViewsCollection = Backbone.Collection.extend({

		/**
		 * Default model
		 * @type {Function}
		 */
		model: ViewModel,


		/**
		 * How many of the children have loaded?
		 * @type {Number}
		 */
		loadedCount: 0,
<commit_msg>bad syntax<commit_after>/*global define*/

define([
	'jquery',
	'backbone',
	'underscore',
	'epoxy'
], function ($, Backbone, _, Epoxy) {

	'use strict';

	/**
	 * View model
	 */
	var ViewModel = Epoxy.Model.extend({

		/**
		 * Default model values
		 * @type {Object}
		 */
		defaults: {
			loaded: false,
			active: false,
			loadedComponents: {},
			target: '',
			role: '',
			view: '',
			replace: false,
			rendered: false,
			children: undefined,
			default: undefined
		},


		/**
		 * Computed properites
		 * @type {Object}
		 */
		computeds: {
			activeChild: function (children) {
				return this.activeChild();
			}
		},


		/**
		 * Initialize
		 */
		initialize: function () {

			this.set('children', new ViewsCollection());
			this.set('loadedComponents', {
				loader: false,
				children: false
			});
		},


		/**
		 * Get the active child for a role
		 * @param {String} role
		 */
		activeChild: function (role) {
			return this.get('children').active(role || 'primary');
		},


		/**
		 * Triggered by the view on load
		 */
		onLoaded: function () {

			this.trigger('loaded', this);
		}
	});


	/**
	 * Views collection - declared here because of circular dependencies
	 */
	var ViewsCollection = Backbone.Collection.extend({

		/**
		 * Default model
		 * @type {Function}
		 */
		model: ViewModel,


		/**
		 * How many of the children have loaded?
		 * @type {Number}
		 */
		loadedCount: 0,

{'fraction_non_alphanumeric': 0.15917076598735067, 'fraction_numerical': 0.0007027406886858749, 'mean_word_length': 2.541044776119403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1259788', 'n_tokens_mistral': 1128, 'n_tokens_neox': 881, 'n_words': 229}