<commit_before><#macro searchFilterList filterTypeName searchFilter>
<div>
    <h3>${filterTypeName}</h3>

    <ul class="active-filters" id="activeFilters-${filterTypeName}"><#list  searchFilter.activeFilterItems as activeFilterItem>
    <li>
      <@siteLink handlerName="simpleSearch"
      queryParameters=activeFilterItem.filteredResultsParameters ; href>
          <a href="${href}"
             data-filter-param="${activeFilterItem.filterParamName}"
             data-filter-value="${activeFilterItem.filterValue}">
              <input type="checkbox" checked/> <span> ${activeFilterItem.getDisplayName()} </span>
          </a>
      </li>
      </@siteLink>
    </#list></ul>

    <ul id="searchFilterBy${filterTypeName}">
      <#assign filterSize = 0 />

      <#list searchFilter.inactiveFilterItems as searchFilterItem>
        <#if !suppressSearchFilter(searchFilterItem)>
          <#assign filterSize = filterSize + 1 />

            <li <#if searchFilterItem_index gt 5>data-js-toggle="toggle_target" data-visibility="none"</#if>>
              <@siteLink handlerName="simpleSearch"
              queryParameters=searchFilterItem.filteredResultsParameters ; href>
                  <a href="${href}"
                     data-filter-param="${searchFilterItem.filterParamName}"
                     data-filter-value="${searchFilterItem.filterValue}">
                      <input type="checkbox"/> <span>${searchFilterItem.displayName} (${searchFilterItem.numberOfHits})</span>
                  </a>
              </@siteLink>
            </li>
        </#if>
      </#list>
      <#if filterSize gt 5>
          <li class="toggle-trigger" data-js-toggle="toggle_trigger">
              <a>show more</a>
          </li>
          <li class="toggle-trigger" data-js-toggle="toggle_trigger" data-visibility="none">
              <a>show less</a>
          </li>
      </#if>
    </ul>
</div>
</#macro>

<#if searchResults.numFound != 0>
  <#if searchFilters?? >
  <aside class="search-filters" id="searchFilters">
    <#if searchFilters.journal??>
      <@searchFilterList "Journal", searchFilters.journal/>
    </#if>
    <#if searchFilters.subject_area??><commit_msg>DPRO-1717- add # of visible filters as a property of the macro<commit_after>
<#macro searchFilterList filterTypeName searchFilter visibleFilters=5>
<div>
    <h3>${filterTypeName}</h3>

    <ul class="active-filters" id="activeFilters-${filterTypeName}"><#list  searchFilter.activeFilterItems as activeFilterItem>
    <li>
      <@siteLink handlerName="simpleSearch"
      queryParameters=activeFilterItem.filteredResultsParameters ; href>
          <a href="${href}"
             data-filter-param="${activeFilterItem.filterParamName}"
             data-filter-value="${activeFilterItem.filterValue}">
              <input type="checkbox" checked/> <span> ${activeFilterItem.getDisplayName()} </span>
          </a>
      </li>
      </@siteLink>
    </#list></ul>

    <ul id="searchFilterBy${filterTypeName}">
      <#assign filterSize = 0 />

      <#list searchFilter.inactiveFilterItems as searchFilterItem>
        <#if !suppressSearchFilter(searchFilterItem)>
          <#assign filterSize = filterSize + 1 />
            <li <#if searchFilterItem_index gt visibleFilters>data-js-toggle="toggle_target" data-visibility="none"</#if>>
              <@siteLink handlerName="simpleSearch"
              queryParameters=searchFilterItem.filteredResultsParameters ; href>
                  <a href="${href}"
                     data-filter-param="${searchFilterItem.filterParamName}"
                     data-filter-value="${searchFilterItem.filterValue}">
                      <input type="checkbox"/> <span>${searchFilterItem.displayName} (${searchFilterItem.numberOfHits})</span>
                  </a>
              </@siteLink>
            </li>
        </#if>
      </#list>
      <#if filterSize gt visibleFilters>
          <li class="toggle-trigger" data-js-toggle="toggle_trigger">
              <a>show more</a>
          </li>
          <li class="toggle-trigger" data-js-toggle="toggle_trigger" data-visibility="none">
              <a>show less</a>
          </li>
      </#if>
    </ul>
</div>
</#macro>

<#if searchResults.numFound != 0>
  <#if searchFilters?? >
  <aside class="search-filters" id="searchFilters">
    <#if searchFilters.journal??>
      <@searchFilterList "Journal", searchFilters.journal/>
    </#if>
    <#if searchFilters.subject_area??>
{'fraction_non_alphanumeric': 0.1477832512315271, 'fraction_numerical': 0.00380653828929691, 'mean_word_length': 2.6524938675388388, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, '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': '1219252', 'n_tokens_mistral': 1301, 'n_tokens_neox': 1274, 'n_words': 223}