<commit_before><div class="col-md-12" data-controller="filter">
    <div class="btn-group ps-4" role="group">
        <button class="btn btn-link dropdown-toggle ps-0"
                data-bs-toggle="dropdown"
                aria-haspopup="true"
                aria-expanded="false">
            <x-orchid-icon path="filter"/>
            {{__('Filters')}}
        </button>

        <div class="dropdown-menu dropdown-menu-left dropdown-menu-arrow"
             aria-labelledby="navbarDropdownMenuLink"
             data-turbo-permanent
             data-action="click->filter#onMenuClick"
        >
            @if($filters->where('display', true)->count() >= 2)
                @foreach($filters->where('display', true) as $idx => $filter)
                    <a class="dropdown-item dropdown-toggle" href="#" data-filter-index="{{$idx}}"
                       data-action="filter#onFilterClick">
                        {{ $filter->name() }}
                    </a>
                    <div class="dropdown-menu" data-action="click->filter#onMenuClick"
                         data-target="filter.filterItem">
                        <div class="px-3 py-2 w-md">
                            {!! $filter->render() !!}
                            <div class="dropdown-divider"></div>
                            <button type="submit"
                                    form="filters"
                                    class="btn btn-sm btn-default">
                                {{ __('Apply') }}
                            </button>
                        </div>
                    </div>
                @endforeach
            @else
                <div class="dropdown-toggle" data-action="click->filter#onMenuClick"
                     data-target="filter.filterItem">
                    <div class="px-3 py-2 w-md">
                        {!! $filters->where('display', true)->first()->render() !!}
                        <div class="dropdown-divider"></div>
                        <button type="submit"
                                form="filters"
                                class="btn btn-sm btn-default"
                                data-action="click->filter#submit">
                            {{ __('Apply') }}
                        </button>
                    </div>
                </div>
            @endif


        </div>
    </div>
    @foreach($filters as $filter)
        @if($filter->display && $filter->isApply())
            <a href="{{ $filter->resetLink() }}" class="badge bg-light border me-1 p-1">
                {{$filter->value()}}
            </a>
        @endif
    @endforeach
</div>

<commit_msg>Add close icon for selected filters<commit_after><div class="col-md-12" data-controller="filter">
    <div class="btn-group ps-4" role="group">
        <button class="btn btn-link dropdown-toggle ps-0"
                data-bs-toggle="dropdown"
                aria-haspopup="true"
                aria-expanded="false">
            <x-orchid-icon path="filter"/>
            {{__('Filters')}}
        </button>

        <div class="dropdown-menu dropdown-menu-left dropdown-menu-arrow"
             aria-labelledby="navbarDropdownMenuLink"
             data-turbo-permanent
             data-action="click->filter#onMenuClick"
        >
            @if($filters->where('display', true)->count() >= 2)
                @foreach($filters->where('display', true) as $idx => $filter)
                    <a class="dropdown-item dropdown-toggle" href="#" data-filter-index="{{$idx}}"
                       data-action="filter#onFilterClick">
                        {{ $filter->name() }}
                    </a>
                    <div class="dropdown-menu" data-action="click->filter#onMenuClick"
                         data-target="filter.filterItem">
                        <div class="px-3 py-2 w-md">
                            {!! $filter->render() !!}
                            <div class="dropdown-divider"></div>
                            <button type="submit"
                                    form="filters"
                                    class="btn btn-sm btn-default">
                                {{ __('Apply') }}
                            </button>
                        </div>
                    </div>
                @endforeach
            @else
                <div class="dropdown-toggle" data-action="click->filter#onMenuClick"
                     data-target="filter.filterItem">
                    <div class="px-3 py-2 w-md">
                        {!! $filters->where('display', true)->first()->render() !!}
                        <div class="dropdown-divider"></div>
                        <button type="submit"
                                form="filters"
                                class="btn btn-sm btn-default"
                                data-action="click->filter#submit">
                            {{ __('Apply') }}
                        </button>
                    </div>
                </div>
            @endif


        </div>
    </div>
    @foreach($filters as $filter)
        @if($filter->display && $filter->isApply())
            <a href="{{ $filter->resetLink() }}" class="badge bg-light border me-1 p-1">
                <x-orchid-icon path="close" width="1.25em" height="1.25em" class="fw-bolder"/>
                {{$filter->value()}}
            </a>
        @endif
    @endforeach
</div>


{'fraction_non_alphanumeric': 0.1471829693521747, 'fraction_numerical': 0.005138557533492384, 'mean_word_length': 1.1843687374749499, 'pattern_counts': {'":': 0, '<': 62, '<?xml version=': 0, '>': 98, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2968799', 'n_tokens_mistral': 1414, 'n_tokens_neox': 1328, 'n_words': 228}