<commit_before>(function () {
  "use strict"
  var root = this,
      $ = root.jQuery;
  if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }

  var filter = {
    _terms: false,
    _regexCache: {},
    _trackTimeout: false,

    init: function(){
      var $filterList = $('.js-filter-list');

      if($filterList.length === 1){
        filter.$form = $('.js-filter-form').show();
        filter.$filterItems = $('.js-filter-item');
        filter.$filterBlock = $('.js-filter-block');

        $filterList.append(filter.$form);
        filter.$form.submit(filter.updateResults);
        filter.$form.find('input').keyup(filter.updateResults);
      }
    },
    updateResults: function(e){
      e.preventDefault();

      var search = filter.$form.find('input').val(),
          itemsToShow = filter.getItems(search);

      $(document).trigger('govuk.hideDepartmentChildren.hideAll');
      filter.$filterItems.hide();
      $(itemsToShow).show();
      filter.hideTransitionStateVisualisations(search);
      filter.hideEmptyBlocks(itemsToShow);
      filter.track(search);
    },
    track: function(search){
      clearTimeout(filter._trackTimeout);
      filter._trackTimeout = root.setTimeout(function(){
        var pagePath = window.location.pathname.split('/').pop();
        if(pagePath){
          window._gaq && _gaq.push(['_trackEvent', 'edd_inside_gov', search, pagePath, 0, true]);
        }
      }, 1000);
    },
    hideEmptyBlocks: function(itemsToShow){
      if(itemsToShow.length === 0){<commit_msg>Update tracking label for consistency<commit_after>(function () {
  "use strict"
  var root = this,
      $ = root.jQuery;
  if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }

  var filter = {
    _terms: false,
    _regexCache: {},
    _trackTimeout: false,

    init: function(){
      var $filterList = $('.js-filter-list');

      if($filterList.length === 1){
        filter.$form = $('.js-filter-form').show();
        filter.$filterItems = $('.js-filter-item');
        filter.$filterBlock = $('.js-filter-block');

        $filterList.append(filter.$form);
        filter.$form.submit(filter.updateResults);
        filter.$form.find('input').keyup(filter.updateResults);
      }
    },
    updateResults: function(e){
      e.preventDefault();

      var search = filter.$form.find('input').val(),
          itemsToShow = filter.getItems(search);

      $(document).trigger('govuk.hideDepartmentChildren.hideAll');
      filter.$filterItems.hide();
      $(itemsToShow).show();
      filter.hideTransitionStateVisualisations(search);
      filter.hideEmptyBlocks(itemsToShow);
      filter.track(search);
    },
    track: function(search){
      clearTimeout(filter._trackTimeout);
      filter._trackTimeout = root.setTimeout(function(){
        var pagePath = window.location.pathname.split('/').pop();
        if(pagePath){
          window._gaq && _gaq.push(['_trackEvent', 'searchBoxFilter', search, pagePath, 0, true]);
        }
      }, 1000);
    },
    hideEmptyBlocks: function(itemsToShow){
      if(itemsToShow.length === 0){
{'fraction_non_alphanumeric': 0.16898672709614762, 'fraction_numerical': 0.004532211071544189, 'mean_word_length': 2.896595208070618, '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': '3431427', 'n_tokens_mistral': 933, 'n_tokens_neox': 893, 'n_words': 141}