<commit_before><table class="table table-responsive table-contract table-contract-list">
    <thead>
        <th></th>
        <th width="50%">Document</th>
        <th></th>
        <th>Country</th>
        <th>Year</th>
        <th>Resource Type</th>
        <th>Contract Type</th> 
    </thead>
    <tbody>
    @forelse($contracts->results as $contract)
        <?php
        $api = app('App\Http\Services\APIService');
        $annotations = $api->getAnnotations($contract->contract_id);
        ?>
        <tr>
            <td></td>
            <td>
                @if(isset($show_advance))<input type="checkbox" class="compare" name="compare[]" value="{{$contract->contract_id}}" />@endif
                <a class="title-{{$contract->contract_id}}" href="{{route('contract.detail',['id'=>$contract->contract_id ])}}">
                    {{ $contract->contract_name or ''}}
                </a>

                @if($annotations->total>0)
                    <div class="annotate-text"> Annotated </div>
                @endif

                <div class="search-text">
                    {!!$contract->text or ''!!}
                    {!!$contract->annotations or ''!!}
                    {!!$contract->metadata or ''!!}
                </div>
                @if($annotations->total>0)
                    @if(\Illuminate\Support\Facades\Input::has('annotation_category'))
                        <?php $annotation_categories = \Illuminate\Support\Facades\Input::get(
                                'annotation_category'
                        )?>
                        @foreach($annotation_categories as $category)
                            <?php
                            $annotation = searchInArray(
                                    $annotations->result,
                                    'category',
                                    $category
                            );
                            ?>
                            @if($annotation)
                                <?php $annotation_type = isset($annotation['shapes']) ? 'pdf' : 'text'; ?>
                                {{str_limit($category,50)}}-<span
                                        style="color: #404040;">{{str_limit($annotation['text'],50)}}</span>
                                <a style="float: none" href="{{route('contract.detail',['id'=>$contract->contract_id])}}#/{{$annotation_type}}/page/{{$annotation['page_no']}}/annotation/{{$annotation['id']}}">
                                    [Pg {{$annotation['page_no']}}]</a>
                                <br>
                            @endif
                        @endforeach

                    @endif
                @endif
                @if(isset($contract->group) && count($contract->group)>0)
                    <div class="contract-group">
                        <label for="">Found in: </label>
                        @foreach($contract->group as $group)
                            <a>{{$group}}</a>
                        @endforeach
                    </div>
                @endif
            </td>
            <td>
                <div class="contract-info-section">
                    <div class="download-main-wrap">
                        <div class="download-wrap">
                            <span>Download</span>
                        </div>
                        <ul class="dropdown-menu">
                            <li><a href="{{route('contract.download.pdf',['id'=> $contract->contract_id])}}" >Pdf</a></li>
                            <li><a href="{{route('contract.download',['id'=> $contract->contract_id])}}" >Word File</a></li>
                        </ul>
                    </div>
                </div>
            </td>
            @if($contract->country_code !='')
                <td>
                    <img style="width: 60px ; height: auto" src="{{getFlagUrl($contract->country_code)}}" />
              
                    {{@trans('country')[$contract->country_code]}}
                </td>
                <td>{{$contract->signature_year}}</td>
            @endif
            <td>
                <ul>
                     @foreach($contract->resource as $resource)
                         <li>{{$resource}}</li>
                     @endforeach
                </ul>
            </td>
            <td>
                {{$contract->contract_type}}
            </td>
        </tr>
    @empty
        <tr><commit_msg>country image size changes<commit_after><table class="table table-responsive table-contract table-contract-list">
    <thead>
        <th></th>
        <th width="50%">Document</th>
        <th></th>
        <th>Country</th>
        <th>Year</th>
        <th>Resource Type</th>
        <th>Contract Type</th> 
    </thead>
    <tbody>
    @forelse($contracts->results as $contract)
        <?php
        $api = app('App\Http\Services\APIService');
        $annotations = $api->getAnnotations($contract->contract_id);
        ?>
        <tr>
            <td></td>
            <td>
                @if(isset($show_advance))<input type="checkbox" class="compare" name="compare[]" value="{{$contract->contract_id}}" />@endif
                <a class="title-{{$contract->contract_id}}" href="{{route('contract.detail',['id'=>$contract->contract_id ])}}">
                    {{ $contract->contract_name or ''}}
                </a>

                @if($annotations->total>0)
                    <div class="annotate-text"> Annotated </div>
                @endif

                <div class="search-text">
                    {!!$contract->text or ''!!}
                    {!!$contract->annotations or ''!!}
                    {!!$contract->metadata or ''!!}
                </div>
                @if($annotations->total>0)
                    @if(\Illuminate\Support\Facades\Input::has('annotation_category'))
                        <?php $annotation_categories = \Illuminate\Support\Facades\Input::get(
                                'annotation_category'
                        )?>
                        @foreach($annotation_categories as $category)
                            <?php
                            $annotation = searchInArray(
                                    $annotations->result,
                                    'category',
                                    $category
                            );
                            ?>
                            @if($annotation)
                                <?php $annotation_type = isset($annotation['shapes']) ? 'pdf' : 'text'; ?>
                                {{str_limit($category,50)}}-<span
                                        style="color: #404040;">{{str_limit($annotation['text'],50)}}</span>
                                <a style="float: none" href="{{route('contract.detail',['id'=>$contract->contract_id])}}#/{{$annotation_type}}/page/{{$annotation['page_no']}}/annotation/{{$annotation['id']}}">
                                    [Pg {{$annotation['page_no']}}]</a>
                                <br>
                            @endif
                        @endforeach

                    @endif
                @endif
                @if(isset($contract->group) && count($contract->group)>0)
                    <div class="contract-group">
                        <label for="">Found in: </label>
                        @foreach($contract->group as $group)
                            <a>{{$group}}</a>
                        @endforeach
                    </div>
                @endif
            </td>
            <td>
                <div class="contract-info-section">
                    <div class="download-main-wrap">
                        <div class="download-wrap">
                            <span>Download</span>
                        </div>
                        <ul class="dropdown-menu">
                            <li><a href="{{route('contract.download.pdf',['id'=> $contract->contract_id])}}" >Pdf</a></li>
                            <li><a href="{{route('contract.download',['id'=> $contract->contract_id])}}" >Word File</a></li>
                        </ul>
                    </div>
                </div>
            </td>
            @if($contract->country_code !='')
                <td>
                    <img style="width: 20px ; height: auto" src="{{getFlagUrl($contract->country_code)}}" />

                    {{@trans('country')[$contract->country_code]}}
                </td>
                <td>{{$contract->signature_year}}</td>
            @endif
            <td>
                <ul>
                     @foreach($contract->resource as $resource)
                         <li>{{$resource}}</li>
                     @endforeach
                </ul>
            </td>
            <td>
                {{$contract->contract_type}}
            </td>
        </tr>
    @empty
        <tr>
{'fraction_non_alphanumeric': 0.1583024587403166, 'fraction_numerical': 0.0038172224093409677, 'mean_word_length': 1.1475409836065573, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 227, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '674236', 'n_tokens_mistral': 2278, 'n_tokens_neox': 2126, 'n_words': 318}