<commit_before>/*global window annyang*/
(function plainOldJs(window, annyang) {
  'use strict';

  var Hey = function initHey(settings) {
    /*eslint-disable*/
    var Pointer = new window.Pointer()
    , i
    , that = this
    /*eslint-enable*/
    , onStartEvent = new window.CustomEvent('Hey:start')
    , onEndEvent = new window.CustomEvent('Hey:end')
    , onDetectionEvent = new window.CustomEvent('Hey:detection')
    , onDetectionMatchEvent = new window.CustomEvent('Hey:detection-match')
    , onDetectionNotMatchEvent = new window.CustomEvent('Hey:detection-not-match')
    , onErrorsEvent = new window.CustomEvent('Hey:error')
    , defaultLang = 'en-EN';

    if (settings
      && settings.langs
      && settings.langs.length > 0) {

      for (i; i <= settings.langs.length; i += 1) {
        annyang.setLanguage(settings.langs[i]);
      }
    } else {

      annyang.setLanguage(defaultLang);
    }

    if (settings && settings.debug) {
      annyang.debug(settings.debug);
    }

    this.commands = {
      'select next element': function selectElementByClass(detection) {
        Pointer.dehighlight();
        Pointer.next();
        Pointer.highlight();
        window.console.info('Select next element', detection);
      },
      'select next element by id *detect': function selectElementById(detection) {
        Pointer.dehighlight();
        Pointer.next('#' + detection);
        Pointer.highlight();
        window.console.info('Select next element by id', detection);
      },
      'select next element by tag *detect': function selectElementByTag(detection) {
        Pointer.dehighlight();
        Pointer.next('<' + detection.replace('<', '').replace('>', '') + '>');
        Pointer.highlight();
        window.console.info('Select next element by id', detection);
      },
      'select next element by class *detect': function selectElementByClass(detection) {
        Pointer.dehighlight();
        Pointer.next('.' + detection.replace('.', ''));
        Pointer.highlight();
        window.console.info('Select next element by class', detection);
      },
      'select next element by classes *detect': function selectElementByClasses(detection) {
        Pointer.dehighlight();
        Pointer.next(detection);
        Pointer.highlight();
        window.console.info('Select next element by classes', detection);
      },
      'deselect elements': function deselectAllElements(detection) {
        Pointer.dehighlight();
        Pointer = new window.Pointer();
        window.console.info('Deselect all elements', detection);
      }
    };
    //mic access allowed
    annyang.addCallback('start', function onHeyStartEvent(data) {
      onStartEvent.eventData = data;
      window.dispatchEvent(onStartEvent);
    });
    annyang.addCallback('error', function onHeyErrorEvent(data) {
      onErrorsEvent.eventData = data;
      window.dispatchEvent(onErrorsEvent);
    });
    annyang.addCallback('end', function onHeyEndEvent(data) {
      onEndEvent.eventData = data;
      window.dispatchEvent(onEndEvent);
    });
    annyang.addCallback('result', function onHeyResultEvent(data) {
      onDetectionEvent.eventData = data;
      window.dispatchEvent(onDetectionEvent);
    });
    annyang.addCallback('resultMatch', function onHeyResultMatchEvent(data) {
      onDetectionMatchEvent.eventData = data;
      window.dispatchEvent(onDetectionMatchEvent);
    });
    annyang.addCallback('resultNotMatch', function onHeyResultNotMatchEvent(data) {
      onDetectionNotMatchEvent.eventData = data;
      window.dispatchEvent(onDetectionNotMatchEvent);
    });

    annyang.setLanguage(this.lang);
    annyang.addCommands(this.commands, false);
    that.createHtml();
  };

  Hey.prototype.createHtml = function createHtml() {

    this.html = window.document.createElement('div');
    this.html.innerHTML = '<img height="25" src="data:image/gif;base64,R0lGODlhMAAwAPcAAF9fX2lpaSQkJDg4OLq6uhUVFVNTU0lJSSYmJuXl5QEBAQMDAzIyMv///wsLCysrK8zMzObm5ufn50ZGRgYGBpKSkiIiIuHh4Ts7Oy8vLxsbG6qqqrS0tAICAgcHB3d3dwwMDBkZGRQUFLKysrOzs6amphAQECcnJ8TExCUlJRgYGENDQ9DQ0BYWFlxcXDk5Ofv7+xMTE0JCQnJycn5+foaGhsHBwdjY2OLi4iAgIEVFRfz8/NPT0/7+/lFRUZWVlcPDw8XFxc3Nzd3d3eDg4Pf39x0dHcjIyFRUVBcXF8fHx+rq6uTk5BISEmVlZYeHh8bGxvHx8QQEBAUFBUtLS5mZmbCwsMvLyzo6OjAwMAkJCQ4ODg8PD319fVdXV15eXqOjo/39/XV1dd/f3+/v7/T09EhISBEREZiYmMrKyk1NTePj47m5uYWFhSEhITw8PKCgoL+/v7GxsQoKCpycnCMjI97e3m1tbXt7e4CAgKmpqaurqzExMZ6enp+fnykpKSoqKsnJya+vrz09PQ0NDZaWlk9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x2RkxtnBzGyhJjbpOIaRwFogqBBvNMujRSsLKgQKgwB52puXL2bOzpgDAcgXGDlE6AOQCY2dNGmcKCGVGkxaIACcpCwyAsbItgAMFmngVqoDtDIBG1/DgubVQIDMqhhiB0BaDHGCBAgJ5EIkMCCyAUA4vICCdQCLokgJEDVlgAUcBAQAh+QQFCgAAACwCACcAJQAIAAAInwABCFQRQqDBMyoMKlzIsCEAFZYcCTQiMEAygYAAdDBDR6AvgZEMDhp4y5jAKQCkoFHYSuAFg3IAYAlmUJCFRlUUMphTjKGAhbUgWVF4gQrDXwwlMazkIeRCVsgWEmMIrKGrhbjmACCg8AjDKymQMNTVkNdCBQBepLEFQ9gkAI+OCQxk8JXBWwIpXRK4a2GvhSGoDGvkcGEKhbkc/hQYEAAh+QQFCgABACwCACcAHgAIAAAIhgADBFiQRKBBgUkoHFzI0GCSWAILHSQABc0fgYwQBaiw8NCTg7AWenCysMnCRQxbJQqQYs3BJYMELWTF0IWhhYoU0FpyMMqBhUwCtGE4a+GrDoTYHFTSYqjBNAIYumJIM8CAQAJZrAhgBI7AI0gEfogTiA2AhgdVsFKz8I0ZNwdpyWI44GBAACH5BAUKAAQALBcAKQABAAQAAAIDFDIFACH5BAUKAAAALAMAKQAOAAQAAAQNEMhJZ6lYnlyTIRyFRAA7"/>';
    this.html.style.cssText = 'border:5px solid #444; text-align:center;position:fixed;bottom:2%;margin:0 auto;left:2%;width:200px;background:rgba(0,0,0,0.7); z-index:9999999999999;border-radius:5px;line-height:25px;color:white;';
    window.document.body.appendChild(this.html);
  };

  Hey.prototype.showHtml = function showHtml() {
    this.html.style.visibility = 'visible';<commit_msg>removed awful img<commit_after>/*global window annyang*/
(function plainOldJs(window, annyang) {
  'use strict';

  var Hey = function initHey(settings) {
    /*eslint-disable*/
    var Pointer = new window.Pointer()
    , i
    , that = this
    /*eslint-enable*/
    , onStartEvent = new window.CustomEvent('Hey:start')
    , onEndEvent = new window.CustomEvent('Hey:end')
    , onDetectionEvent = new window.CustomEvent('Hey:detection')
    , onDetectionMatchEvent = new window.CustomEvent('Hey:detection-match')
    , onDetectionNotMatchEvent = new window.CustomEvent('Hey:detection-not-match')
    , onErrorsEvent = new window.CustomEvent('Hey:error')
    , defaultLang = 'en-EN';

    if (settings
      && settings.langs
      && settings.langs.length > 0) {

      for (i; i <= settings.langs.length; i += 1) {
        annyang.setLanguage(settings.langs[i]);
      }
    } else {

      annyang.setLanguage(defaultLang);
    }

    if (settings && settings.debug) {
      annyang.debug(settings.debug);
    }

    this.commands = {
      'select next element': function selectElementByClass(detection) {
        Pointer.dehighlight();
        Pointer.next();
        Pointer.highlight();
        window.console.info('Select next element', detection);
      },
      'select next element by id *detect': function selectElementById(detection) {
        Pointer.dehighlight();
        Pointer.next('#' + detection);
        Pointer.highlight();
        window.console.info('Select next element by id', detection);
      },
      'select next element by tag *detect': function selectElementByTag(detection) {
        Pointer.dehighlight();
        Pointer.next('<' + detection.replace('<', '').replace('>', '') + '>');
        Pointer.highlight();
        window.console.info('Select next element by id', detection);
      },
      'select next element by class *detect': function selectElementByClass(detection) {
        Pointer.dehighlight();
        Pointer.next('.' + detection.replace('.', ''));
        Pointer.highlight();
        window.console.info('Select next element by class', detection);
      },
      'select next element by classes *detect': function selectElementByClasses(detection) {
        Pointer.dehighlight();
        Pointer.next(detection);
        Pointer.highlight();
        window.console.info('Select next element by classes', detection);
      },
      'deselect elements': function deselectAllElements(detection) {
        Pointer.dehighlight();
        Pointer = new window.Pointer();
        window.console.info('Deselect all elements', detection);
      }
    };
    //mic access allowed
    annyang.addCallback('start', function onHeyStartEvent(data) {
      onStartEvent.eventData = data;
      window.dispatchEvent(onStartEvent);
    });
    annyang.addCallback('error', function onHeyErrorEvent(data) {
      onErrorsEvent.eventData = data;
      window.dispatchEvent(onErrorsEvent);
    });
    annyang.addCallback('end', function onHeyEndEvent(data) {
      onEndEvent.eventData = data;
      window.dispatchEvent(onEndEvent);
    });
    annyang.addCallback('result', function onHeyResultEvent(data) {
      onDetectionEvent.eventData = data;
      window.dispatchEvent(onDetectionEvent);
    });
    annyang.addCallback('resultMatch', function onHeyResultMatchEvent(data) {
      onDetectionMatchEvent.eventData = data;
      window.dispatchEvent(onDetectionMatchEvent);
    });
    annyang.addCallback('resultNotMatch', function onHeyResultNotMatchEvent(data) {
      onDetectionNotMatchEvent.eventData = data;
      window.dispatchEvent(onDetectionNotMatchEvent);
    });

    annyang.setLanguage(this.lang);
    annyang.addCommands(this.commands, false);
    that.createHtml();
  };

  Hey.prototype.createHtml = function createHtml() {

    this.html = window.document.createElement('div');
    this.html.innerHTML = 'DETECTION ON';
    this.html.style.cssText = 'border:5px solid #444; text-align:center;position:fixed;bottom:2%;margin:0 auto;left:2%;width:200px;background:rgba(0,0,0,0.7); z-index:9999999999999;border-radius:5px;line-height:25px;color:white;';
    window.document.body.appendChild(this.html);
  };

  Hey.prototype.showHtml = function showHtml() {
    this.html.style.visibility = 'visible';
{'fraction_non_alphanumeric': 0.08613489985136952, 'fraction_numerical': 0.03659140774294005, 'mean_word_length': 6.139969681657402, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, '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': '2506578', 'n_tokens_mistral': 6662, 'n_tokens_neox': 6187, 'n_words': 442}