<commit_before>var _ = require('underscore');
var CoreView = require('backbone/core-view');
var createTemplateTabPane = require('../../tab-pane/create-template-tab-pane');
var tabPaneButtonTemplate = require('./tab-pane-button-template.tpl');
var tabPaneTemplate = require('./tab-pane-template.tpl');

/**
 * View to select widget options to create.
 */
module.exports = CoreView.extend({

  initialize: function (opts) {
    if (!opts.modalModel) throw new Error('modalModel is required');
    if (!opts.analysisOptionsCollection) throw new Error('analysisOptionsCollection is required');
    if (!opts.analysisOptions) throw new Error('analysisOptions is required');
    if (!opts.analysesTypes) throw new Error('analysesTypes is required');
    if (!opts.layerDefinitionModel) throw new Error('layerDefinitionModel is required');
    if (!opts.queryGeometryModel) throw new Error('queryGeometryModel is required');

    this._analysesTypes = opts.analysesTypes;
    this._analysisOptions = opts.analysisOptions;
    this._analysisOptionsCollection = opts.analysisOptionsCollection;
    this._layerDefinitionModel = opts.layerDefinitionModel;
    this._modalModel = opts.modalModel;
    this._queryGeometryModel = opts.queryGeometryModel;
    var availableTypes = _.unique(_.keys(this._analysisOptions));

    this._tabPaneItems = _
    .reduce(this._analysesTypes, function (memo, d) {
      if (_.contains(availableTypes, d.type)) {
        var tabPaneItem = d.createTabPaneItem(this._analysisOptionsCollection, {
          modalModel: this._modalModel,
          analysisOptionsCollection: this._analysisOptionsCollection,
          layerDefinitionModel: this._layerDefinitionModel,
          queryGeometryModel: this._queryGeometryModel
        });
        memo.push(tabPaneItem);<commit_msg>Reformat line to make it more legible<commit_after>var _ = require('underscore');
var CoreView = require('backbone/core-view');
var createTemplateTabPane = require('../../tab-pane/create-template-tab-pane');
var tabPaneButtonTemplate = require('./tab-pane-button-template.tpl');
var tabPaneTemplate = require('./tab-pane-template.tpl');

/**
 * View to select widget options to create.
 */
module.exports = CoreView.extend({

  initialize: function (opts) {
    if (!opts.modalModel) throw new Error('modalModel is required');
    if (!opts.analysisOptionsCollection) throw new Error('analysisOptionsCollection is required');
    if (!opts.analysisOptions) throw new Error('analysisOptions is required');
    if (!opts.analysesTypes) throw new Error('analysesTypes is required');
    if (!opts.layerDefinitionModel) throw new Error('layerDefinitionModel is required');
    if (!opts.queryGeometryModel) throw new Error('queryGeometryModel is required');

    this._analysesTypes = opts.analysesTypes;
    this._analysisOptions = opts.analysisOptions;
    this._analysisOptionsCollection = opts.analysisOptionsCollection;
    this._layerDefinitionModel = opts.layerDefinitionModel;
    this._modalModel = opts.modalModel;
    this._queryGeometryModel = opts.queryGeometryModel;
    var availableTypes = _.unique(_.keys(this._analysisOptions));

    this._tabPaneItems = _.reduce(this._analysesTypes, function (memo, d) {
      if (_.contains(availableTypes, d.type)) {
        var tabPaneItem = d.createTabPaneItem(this._analysisOptionsCollection, {
          modalModel: this._modalModel,
          analysisOptionsCollection: this._analysisOptionsCollection,
          layerDefinitionModel: this._layerDefinitionModel,
          queryGeometryModel: this._queryGeometryModel
        });
        memo.push(tabPaneItem);
{'fraction_non_alphanumeric': 0.11175656984785616, 'fraction_numerical': 0.0, 'mean_word_length': 4.512195121951219, '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': '6989813', 'n_tokens_mistral': 944, 'n_tokens_neox': 921, 'n_words': 211}