<commit_before><div ng-show="$ctrl.display_search_interface" class="ng-cloak" ng-cloak>

  <h1>
    <i class="fa fa-search"></i> Results
    <small ng-show="$ctrl.search_in_progress">
      <i class="fa fa-spinner fa-spin"></i>
    </small>
    <small id="metadata-search-status" ng-show="$ctrl.search_in_progress">
      Searching...
    </small>
    <small ng-show="$ctrl.result.hitCount > 0">
      <span ng-if="$ctrl.result.hitCount == 1">1 sequence</span>
      <span ng-if="$ctrl.result.hitCount > 1" id="metasearch-results-count">{{ $ctrl.result.entries.length }} out of {{ $ctrl.result.hitCount | number }} sequences</span>
    </small>

    <small class="pull-right font-size-14-px hidden-xs">

      <a class="text-muted margin-right-10px" ng-href="$ctrl.helpMetadataSearchUrl">Search help</a>

      <div class="btn-group">
        <button type="button" ng-class="$ctrl.search_in_progress ? 'disabled' : ''" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
          Download
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu pull-right" role="menu">
          <li><a href="" ng-click="$ctrl.export_results('fasta')">FASTA</a></li>
          <li><a href="" ng-click="$ctrl.export_results('json')">JSON</a></li>
          <li><a href="" ng-click="$ctrl.export_results('list')">RNAcentral ids</a></li>
        </ul>
      </div>
    </small>
  </h1>

  <div class="row visible-xs">
    <div class="col-xs-12">
      <button class="btn btn-default" ng-click="$ctrl.toggle_facets()" id="toggle-facets">Show facets</button>
      <a class="btn btn-default" ng-href="$ctrl.helpMetadataSearchUrl">Search help</a>
    </div>
  </div> <!-- .visible-xs -->

  <div class="row" ng-if="$ctrl.show_error">
    <div class="col-md-12">
      <div class="alert alert-danger col-md-12">
        There was an error while processing your query
      </div>
    </div>
    <div class="col-md-12">
      <h2>Suggestions</h2>
      <ul>
        <li>
          <p>
            Try reloading the page
          </p>
        </li>
        <li>
          <p>
            <a ng-href="$ctrl.contactUsUrl">Contact us</a> if the problem persists
          </p>
        </li>
      </ul>
    </div>
  </div> <!-- ng-if="show_error" -->

  <div class="row" ng-if="$ctrl.show_export_error">

    <div class="col-md-12">
      <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <i class="fa fa-warning fa-3x pull-left"></i>
        There was an error while exporting search results.
        <br>
        Please try again or <a ng-href="$ctrl.contactUsUrl">contact us</a> if the problem persists.
      </div>
    </div>

  </div> <!-- ng-if="show_export_error" -->

  <div class="row" ng-if="$ctrl.result.hitCount == 0">

    <div class="col-md-12">
      <div class="alert alert-warning col-md-12 metasearch-no-results">
        <strong>No results</strong>
      </div>
    </div>

    <div class="col-md-12">
      <h2><i class="fa fa-lightbulb-o"></i> Suggestions</h2>
      <ul>
        <li>
          <p>
            Make sure your spelling is correct
          </p>
          <p>
            <em>Example</em>: misspelled terms like <code>Esherichia</code> (missing "c") won't find any results
          </p>
        </li>
        <li>
          <p>
            Use full species names
          </p>
          <p>
            <em>Example</em>: use <code>Escherichia coli</code> and not <code>E. coli</code> as your search terms
          </p>
        </li>
        <li>
          <p>
            Make sure to include double quotes in field-specific search using the <code>field:"field value"</code> format
          </p>
        </li>
        <li>
          <p>
            Read more about <a href="/help/metadata-search">query syntax</a>
          </p>
        </li>
      </ul>
    </div>

  </div>

  <div class="row" ng-show="$ctrl.result.hitCount > 0">

    <div class="col-md-3 col-sm-4 hidden-xs metasearch-facets">
      <ul class="list-unstyled">
        <li class="facet" ng-repeat="facet in $ctrl.result.facets">
            <h3>{{ facet.label }}</h3>
            <ul class="list-unstyled metasearch-facet-values metasearch-facet-overflow force-scrollbars" style="overflow-x: hidden;">
                <li ng-repeat="facetValue in facet.facetValues" ng-if="$ctrl.facet.id == 'expert_db'">
                  <!-- This is expert_dbs facet -->
                  <input type="checkbox" name="facet.label" ng-checked="$ctrl.is_facet_applied(facet.id, facetValue.value)" ng-click="$ctrl.facet_search(facet.id, facetValue.value)">
                  <a href="" ng-click="$ctrl.facet_search(facet.id, facetValue.value)" class="metasearch-facet-link" uib-tooltip-template="'/static/js/search/expert-database-tooltip-template.html'" tooltip-placement="bottom-left">{{ facetValue.label }} <small>({{ facetValue.count | number }})</small></a>
                </li>
                <li ng-repeat="facetValue in facet.facetValues" ng-if="facet.id != 'expert_db'">
                  <input type="checkbox" name="facet.label" ng-checked="$ctrl.is_facet_applied(facet.id, facetValue.value)" ng-click="$ctrl.facet_search(facet.id, facetValue.value)"><commit_msg> #134 Bugfix in tooltip.<commit_after><div ng-show="$ctrl.display_search_interface" class="ng-cloak" ng-cloak>

  <h1>
    <i class="fa fa-search"></i> Results
    <small ng-show="$ctrl.search_in_progress">
      <i class="fa fa-spinner fa-spin"></i>
    </small>
    <small id="metadata-search-status" ng-show="$ctrl.search_in_progress">
      Searching...
    </small>
    <small ng-show="$ctrl.result.hitCount > 0">
      <span ng-if="$ctrl.result.hitCount == 1">1 sequence</span>
      <span ng-if="$ctrl.result.hitCount > 1" id="metasearch-results-count">{{ $ctrl.result.entries.length }} out of {{ $ctrl.result.hitCount | number }} sequences</span>
    </small>

    <small class="pull-right font-size-14-px hidden-xs">

      <a class="text-muted margin-right-10px" ng-href="$ctrl.helpMetadataSearchUrl">Search help</a>

      <div class="btn-group">
        <button type="button" ng-class="$ctrl.search_in_progress ? 'disabled' : ''" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
          Download
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu pull-right" role="menu">
          <li><a href="" ng-click="$ctrl.export_results('fasta')">FASTA</a></li>
          <li><a href="" ng-click="$ctrl.export_results('json')">JSON</a></li>
          <li><a href="" ng-click="$ctrl.export_results('list')">RNAcentral ids</a></li>
        </ul>
      </div>
    </small>
  </h1>

  <div class="row visible-xs">
    <div class="col-xs-12">
      <button class="btn btn-default" ng-click="$ctrl.toggle_facets()" id="toggle-facets">Show facets</button>
      <a class="btn btn-default" ng-href="$ctrl.helpMetadataSearchUrl">Search help</a>
    </div>
  </div> <!-- .visible-xs -->

  <div class="row" ng-if="$ctrl.show_error">
    <div class="col-md-12">
      <div class="alert alert-danger col-md-12">
        There was an error while processing your query
      </div>
    </div>
    <div class="col-md-12">
      <h2>Suggestions</h2>
      <ul>
        <li>
          <p>
            Try reloading the page
          </p>
        </li>
        <li>
          <p>
            <a ng-href="$ctrl.contactUsUrl">Contact us</a> if the problem persists
          </p>
        </li>
      </ul>
    </div>
  </div> <!-- ng-if="show_error" -->

  <div class="row" ng-if="$ctrl.show_export_error">

    <div class="col-md-12">
      <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <i class="fa fa-warning fa-3x pull-left"></i>
        There was an error while exporting search results.
        <br>
        Please try again or <a ng-href="$ctrl.contactUsUrl">contact us</a> if the problem persists.
      </div>
    </div>

  </div> <!-- ng-if="show_export_error" -->

  <div class="row" ng-if="$ctrl.result.hitCount == 0">

    <div class="col-md-12">
      <div class="alert alert-warning col-md-12 metasearch-no-results">
        <strong>No results</strong>
      </div>
    </div>

    <div class="col-md-12">
      <h2><i class="fa fa-lightbulb-o"></i> Suggestions</h2>
      <ul>
        <li>
          <p>
            Make sure your spelling is correct
          </p>
          <p>
            <em>Example</em>: misspelled terms like <code>Esherichia</code> (missing "c") won't find any results
          </p>
        </li>
        <li>
          <p>
            Use full species names
          </p>
          <p>
            <em>Example</em>: use <code>Escherichia coli</code> and not <code>E. coli</code> as your search terms
          </p>
        </li>
        <li>
          <p>
            Make sure to include double quotes in field-specific search using the <code>field:"field value"</code> format
          </p>
        </li>
        <li>
          <p>
            Read more about <a href="/help/metadata-search">query syntax</a>
          </p>
        </li>
      </ul>
    </div>

  </div>

  <div class="row" ng-show="$ctrl.result.hitCount > 0">

    <div class="col-md-3 col-sm-4 hidden-xs metasearch-facets">
      <ul class="list-unstyled">
        <li class="facet" ng-repeat="facet in $ctrl.result.facets">
            <h3>{{ facet.label }}</h3>
            <ul class="list-unstyled metasearch-facet-values metasearch-facet-overflow force-scrollbars" style="overflow-x: hidden;">
                <li ng-repeat="facetValue in facet.facetValues" ng-if="facet.id == 'expert_db'">
                  <!-- This is expert_dbs facet -->
                  <input type="checkbox" name="facet.label" ng-checked="$ctrl.is_facet_applied(facet.id, facetValue.value)" ng-click="$ctrl.facet_search(facet.id, facetValue.value)">
                  <a href="" ng-click="$ctrl.facet_search(facet.id, facetValue.value)" class="metasearch-facet-link" uib-tooltip-template="'/static/js/search/expert-database-tooltip-template.html'" tooltip-placement="bottom-left">{{ facetValue.label }} <small>({{ facetValue.count | number }})</small></a>
                </li>
                <li ng-repeat="facetValue in facet.facetValues" ng-if="facet.id != 'expert_db'">
                  <input type="checkbox" name="facet.label" ng-checked="$ctrl.is_facet_applied(facet.id, facetValue.value)" ng-click="$ctrl.facet_search(facet.id, facetValue.value)">
{'fraction_non_alphanumeric': 0.1814969781496978, 'fraction_numerical': 0.007159460715946072, 'mean_word_length': 2.455187921619017, 'pattern_counts': {'":': 0, '<': 319, '<?xml version=': 0, '>': 325, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3632447', 'n_tokens_mistral': 3664, 'n_tokens_neox': 3496, 'n_words': 719}