<commit_before>(function() {
  'use strict';

  angular.module('dimApp').directive('dimCompare', Compare);

  Compare.$inject = [];

  function Compare() {
    return {
      controller: CompareCtrl,
      controllerAs: 'vm',
      bindToController: true,
      scope: {},
      template: `
        <div id="loadout-drawer" ng-if="vm.show">
          <p>
            <label class="dim-button" ng-click="vm.compareSimilar('archetype')">Compare in archetype</label>
            <label class="dim-button" ng-click="vm.compareSimilar()">Compare all {{ vm.similarTypes[0].typeName }}s</label>
            <label class="dim-button" ng-click="vm.cancel()">Close Compare</label>
          </p>
          <div class="compare-bucket">
            <span class="compare-item fixed-left">
              <div>&nbsp;</div>
              <div ng-repeat="stat in vm.comparisons[0].stats track by $index" ng-bind="::stat.name"></div>
            </span>
            <span ng-repeat="item in vm.comparisons track by item.index" class="compare-item">
              <div ng-bind="::item.name"></div>
              <div class="stat-box-row" ng-repeat="stat in item.stats track by $index">
                <span ng-bind="::stat.value"></span>
              </div>
              <dim-talent-grid ng-if="item.talentGrid" talent-grid="item.talentGrid"></dim-talent-grid>
              <div class="close" ng-click="vm.remove(item, $event); vm.form.name.$rollbackViewValue(); $event.stopPropagation();"></div>
            </span>
          </div>
        </div>
      `
    };
  }

  CompareCtrl.$inject = ['$scope', 'toaster', 'dimCompareService', 'dimItemService'];

  function CompareCtrl($scope, toaster, dimCompareService, dimItemService) {
    var vm = this;
    vm.show = dimCompareService.dialogOpen;

    vm.comparisons = [];

    $scope.$on('dim-store-item-compare', function(event, args) {
      vm.show = true;
      dimCompareService.dialogOpen = true;

      vm.add(args);<commit_msg>minor cleanup<commit_after>(function() {
  'use strict';

  angular.module('dimApp').directive('dimCompare', Compare);

  Compare.$inject = [];

  function Compare() {
    return {
      controller: CompareCtrl,
      controllerAs: 'vm',
      bindToController: true,
      scope: {},
      template: `
        <div id="loadout-drawer" ng-if="vm.show">
          <p>
            <label class="dim-button" ng-click="vm.compareSimilar('archetype')">Compare in archetype</label>
            <label class="dim-button" ng-click="vm.compareSimilar()">Compare all {{ vm.similarTypes[0].typeName }}s</label>
            <label class="dim-button" ng-click="vm.cancel()">Close Compare</label>
          </p>
          <div class="compare-bucket">
            <span class="compare-item fixed-left">
              <div>&nbsp;</div>
              <div ng-repeat="stat in vm.comparisons[0].stats track by $index" ng-bind="::stat.name"></div>
            </span>
            <span ng-repeat="item in vm.comparisons track by item.index" class="compare-item">
              <div ng-bind="::item.name"></div>
              <div class="stat-box-row" ng-repeat="stat in item.stats track by $index" ng-bind="::stat.value"></div>
              <dim-talent-grid ng-if="item.talentGrid" talent-grid="item.talentGrid"></dim-talent-grid>
              <div class="close" ng-click="vm.remove(item);"></div>
            </span>
          </div>
        </div>
      `
    };
  }

  CompareCtrl.$inject = ['$scope', 'toaster', 'dimCompareService', 'dimItemService'];

  function CompareCtrl($scope, toaster, dimCompareService, dimItemService) {
    var vm = this;
    vm.show = dimCompareService.dialogOpen;

    vm.comparisons = [];

    $scope.$on('dim-store-item-compare', function(event, args) {
      vm.show = true;
      dimCompareService.dialogOpen = true;

      vm.add(args);
{'fraction_non_alphanumeric': 0.17171981181390486, 'fraction_numerical': 0.0010454783063251437, 'mean_word_length': 2.5435185185185185, 'pattern_counts': {'":': 6, '<': 61, '<?xml version=': 0, '>': 61, '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': '2224015', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1150, 'n_words': 213}