<commit_before><igx-grid-toolbar [style.width.px]="outerWidth" role="rowgroup" *ngIf="showToolbar" [gridID]="id"
    [displayDensity]="displayDensity" #toolbar>
</igx-grid-toolbar>

<div [style.width.px]='outerWidth' class="igx-grid__grouparea"
    *ngIf="groupingExpressions.length > 0 || hasGroupableColumns" #groupArea>
    <igx-chips-area (onReorder)="chipsOrderChanged($event)" (onMoveEnd)="chipsMovingEnded()">
        <ng-container *ngFor="let expr of chipsGoupingExpressions; let last = last;">
            <igx-chip [id]="expr.fieldName" [attr.title]="getGroupByChipTitle(expr)"
                [removable]="getColumnByName(expr.fieldName).groupable"
                [draggable]="getColumnByName(expr.fieldName).groupable" [displayDensity]="displayDensity"
                (onKeyDown)="onChipKeyDown($event)" (onRemove)="onChipRemoved($event)"
                (onClick)="getColumnByName(expr.fieldName).groupable ? onChipClicked($event): null"
                [disabled]='!getColumnByName(expr.fieldName).groupable'>
                <span>{{ getGroupByChipTitle(expr) }}</span>
                <igx-icon igxSuffix>{{ expr.dir == 1 ? 'arrow_upward' : 'arrow_downward' }}</igx-icon>
            </igx-chip>
            <span class="igx-grid__grouparea-connector">
                <igx-icon [style.visibility]="(!last || dropAreaVisible) ? 'visible' : 'hidden'">arrow_forward
                </igx-icon>
            </span>
        </ng-container>
        <div igxGroupAreaDrop [style.visibility]="dropAreaVisible ? 'visible' : 'hidden'" [class]="groupAreaHostClass"
            [attr.gridId]='this.id'>
            <ng-container *ngTemplateOutlet="dropAreaTemplateResolved"></ng-container>
        </div>
    </igx-chips-area>
</div>

<div class="igx-grid__thead">
    <div class="igx-grid__thead-wrapper" [class.igx-grid__tr--mrl]='hasColumnLayouts' role="rowgroup"
        [style.width.px]='calcWidth + 1' #theadRow>
        <div class="igx-grid__tr" role="row" [style.width.px]='calcWidth + 1'>
            <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length <= 0"
                [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
                class="igx-grid__scroll-on-drag-left" [style.left.px]="featureColumnsWidth"></span>
            <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length > 0"
                [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
                class="igx-grid__scroll-on-drag-pinned" [style.left.px]="pinnedWidth"></span>
            <ng-container *ngIf="groupingExpressions.length > 0">
                <div class="igx-grid__header-indentation igx-grid__row-indentation--level-{{groupingExpressions.length}}"
                    [ngClass]="{
                    'igx-grid__header-indentation--no-border': rowSelectable || rowDraggable
                }" #headerGroupContainer>
                    <igx-icon *ngIf="groupsExpanded" role="button" class="igx-grid__group-expand-btn"
                        (click)="toggleAllGroupRows()" [ngClass]="{
                        'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible
                    }">unfold_less</igx-icon>
                    <igx-icon *ngIf="!groupsExpanded" role="button" class="igx-grid__group-expand-btn"
                        (click)="toggleAllGroupRows()" [ngClass]="{
                        'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible
                    }">unfold_more</igx-icon>
                </div>
            </ng-container>
            <ng-container *ngIf="rowDraggable">
                <div class="igx-grid__drag-indicator" [ngClass]="{
                    'igx-grid__drag-indicator--header': !rowSelectable
                }" #headerDragContainer>
                    <div style="visibility: hidden;">
                        <ng-container
                            *ngTemplateOutlet="this.dragIndicatorIconTemplate ? this.dragIndicatorIconTemplate : this.dragIndicatorIconBase">
                        </ng-container>
                    </div>
                </div>
            </ng-container>
            <ng-container *ngIf="showRowCheckboxes">
                <div class="igx-grid__cbx-selection" #headerCheckboxContainer [ngClass]="{
                    'igx-grid__cbx-selection--push': filteringService.isFilterRowVisible
                }">
                    <igx-checkbox [checked]="allRowsSelected" (change)="onHeaderCheckboxClick($event, filteredData)"
                        disableRipple="true" [aria-label]="headerCheckboxAriaLabel" #headerCheckbox></igx-checkbox>
                </div>
            </ng-container>
            <ng-container *ngIf="pinnedColumns.length > 0">
                <ng-template ngFor let-col [ngForOf]="pinnedColumns | igxTopLevel">
                    <igx-grid-header-group [column]="col" [gridID]="id" [style.min-width.px]="getHeaderGroupWidth(col)"
                        [style.flex-basis.px]="getHeaderGroupWidth(col)"></igx-grid-header-group>
                </ng-template>
            </ng-container>
            <ng-template igxGridFor let-col [igxGridForOf]="unpinnedColumns | igxTopLevel"
                [igxForScrollOrientation]="'horizontal'" [igxForScrollContainer]="parentVirtDir"
                [igxForContainerSize]='unpinnedWidth' [igxForTrackBy]='trackColumnChanges'
                [igxForSizePropName]='"calcPixelWidth"' #headerContainer>
                <igx-grid-header-group [column]="col" [gridID]="id" [style.min-width.px]="getHeaderGroupWidth(col)"
                    [style.flex-basis.px]="getHeaderGroupWidth(col)"></igx-grid-header-group>
            </ng-template>
        </div>
        <igx-grid-filtering-row #filteringRow [style.width.px]='calcWidth' *ngIf="filteringService.isFilterRowVisible"
            [column]="filteringService.filteredColumn"></igx-grid-filtering-row>
    </div>
    <span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true"
        id="right" class="igx-grid__scroll-on-drag-right"></span>
    <div class="igx-grid__thead-thumb" [hidden]='!hasVerticalSroll()' [style.width.px]="scrollWidth"></div>
</div>

<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
    <div class="igx-grid__tbody-content" role="rowgroup" (onDragStop)="selectionService.dragMode = $event"
        (onDragScroll)="dragScroll($event)" [igxGridDragSelect]="selectionService.dragMode"
        [style.height.px]='calcHeight' [style.width.px]='calcWidth + 1' #tbody (scroll)='scrollHandler($event)'
        (wheel)="wheelHandler()">
        <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length <= 0"
            [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
            class="igx-grid__scroll-on-drag-left"></span>
        <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length > 0"
            [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
            class="igx-grid__scroll-on-drag-pinned" [style.left.px]="pinnedWidth"></span>
        <ng-template igxGridFor let-rowData [igxGridForOf]="data
        | gridTransaction:id:pipeTrigger
        | gridFiltering:filteringExpressionsTree:id:pipeTrigger
        | gridSort:sortingExpressions:id:pipeTrigger
        | gridGroupBy:groupingExpressions:groupingExpansionState:groupsExpanded:id:groupsRecords:pipeTrigger
        | gridPaging:page:perPage:id:pipeTrigger
        | gridSummary:hasSummarizedColumns:summaryCalculationMode:summaryPosition:id:pipeTrigger:summaryPipeTrigger"
            let-rowIndex="index" [igxForScrollOrientation]="'vertical'" [igxForScrollContainer]='verticalScroll'
            [igxForContainerSize]='calcHeight'
            [igxForItemSize]="hasColumnLayouts ? rowHeight * multiRowLayoutRowSize + 1 : renderedRowHeight"
            #verticalScrollContainer (onChunkPreload)="dataLoading($event)">
            <ng-template #record_template>
                <igx-grid-row [gridID]="id" [index]="rowIndex" [rowData]="rowData" #row>
                </igx-grid-row>
            </ng-template>
            <ng-template #group_template>
                <igx-grid-groupby-row [gridID]="id" [index]="rowIndex" [groupRow]="rowData" #row>
                </igx-grid-groupby-row>
            </ng-template>
            <ng-template #summary_template>
                <igx-grid-summary-row [gridID]="id" [summaries]="rowData.summaries" [index]="rowIndex"
                    class="igx-grid__summaries--body" #summaryRow>
                </igx-grid-summary-row>
            </ng-template>
            <ng-template
                [igxTemplateOutlet]='isGroupByRecord(rowData) ? group_template : isSummaryRow(rowData) ? summary_template : record_template'
                [igxTemplateOutletContext]='getContext(rowData, rowIndex)'
                (onCachedViewLoaded)='cachedViewLoaded($event)'>
            </ng-template>
        </ng-template>
        <ng-container *ngTemplateOutlet="template"></ng-container>
        <div class="igx-grid__row-editing-outlet" igxOverlayOutlet #igxRowEditingOverlayOutlet></div>
    </div>
    <span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true"
        id="right" class="igx-grid__scroll-on-drag-right"></span>
    <div [hidden]='!hasVerticalSroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
        [style.height.px]='calcHeight'>
        <ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>
    </div>
</div>


<div class="igx-grid__tfoot" role="rowgroup" [style.height.px]='summariesHeight' #tfoot>
    <igx-grid-summary-row [style.width.px]='calcWidth' [style.height.px]='summariesHeight'
        *ngIf="hasSummarizedColumns && rootSummariesEnabled" [gridID]="id"
        [summaries]="id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe" [index]="0"
        class="igx-grid__summaries" #summaryRow>
    </igx-grid-summary-row>
    <div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalSroll()' [style.height.px]='summariesHeight'
        [style.width.px]="scrollWidth"></div>
</div>

<div class="igx-grid__scroll" [style.height]="'18px'" #scr [hidden]="unpinnedWidth - totalWidth >= 0">
    <div class="igx-grid__scroll-start" [style.width.px]='pinnedWidth' [hidden]="pinnedWidth === 0"></div>
    <div class="igx-grid__scroll-main" [style.width.px]='unpinnedWidth'>
        <ng-template igxGridFor [igxGridForOf]='[]' #scrollContainer>
        </ng-template>
    </div>
</div>

<div class="igx-grid__footer" #footer>
    <ng-content select="igx-grid-footer"></ng-content>
    <ng-container *ngIf="paging && totalRecords">
        <ng-container
            *ngTemplateOutlet="paginationTemplate ? paginationTemplate : defaultPaginator; context: {$implicit: this}">
        </ng-container>
    </ng-container>
</div>

<ng-template #defaultPaginator>
    <igx-paginator [displayDensity]="displayDensity" [(page)]="page"
        [totalRecords]="filteredData ? filteredData.length : totalRecords" [(perPage)]="perPage">
    </igx-paginator>
</ng-template><commit_msg>fix(grid): resolving paginator total pages issue #5469<commit_after><igx-grid-toolbar [style.width.px]="outerWidth" role="rowgroup" *ngIf="showToolbar" [gridID]="id"
    [displayDensity]="displayDensity" #toolbar>
</igx-grid-toolbar>

<div [style.width.px]='outerWidth' class="igx-grid__grouparea"
    *ngIf="groupingExpressions.length > 0 || hasGroupableColumns" #groupArea>
    <igx-chips-area (onReorder)="chipsOrderChanged($event)" (onMoveEnd)="chipsMovingEnded()">
        <ng-container *ngFor="let expr of chipsGoupingExpressions; let last = last;">
            <igx-chip [id]="expr.fieldName" [attr.title]="getGroupByChipTitle(expr)"
                [removable]="getColumnByName(expr.fieldName).groupable"
                [draggable]="getColumnByName(expr.fieldName).groupable" [displayDensity]="displayDensity"
                (onKeyDown)="onChipKeyDown($event)" (onRemove)="onChipRemoved($event)"
                (onClick)="getColumnByName(expr.fieldName).groupable ? onChipClicked($event): null"
                [disabled]='!getColumnByName(expr.fieldName).groupable'>
                <span>{{ getGroupByChipTitle(expr) }}</span>
                <igx-icon igxSuffix>{{ expr.dir == 1 ? 'arrow_upward' : 'arrow_downward' }}</igx-icon>
            </igx-chip>
            <span class="igx-grid__grouparea-connector">
                <igx-icon [style.visibility]="(!last || dropAreaVisible) ? 'visible' : 'hidden'">arrow_forward
                </igx-icon>
            </span>
        </ng-container>
        <div igxGroupAreaDrop [style.visibility]="dropAreaVisible ? 'visible' : 'hidden'" [class]="groupAreaHostClass"
            [attr.gridId]='this.id'>
            <ng-container *ngTemplateOutlet="dropAreaTemplateResolved"></ng-container>
        </div>
    </igx-chips-area>
</div>

<div class="igx-grid__thead">
    <div class="igx-grid__thead-wrapper" [class.igx-grid__tr--mrl]='hasColumnLayouts' role="rowgroup"
        [style.width.px]='calcWidth + 1' #theadRow>
        <div class="igx-grid__tr" role="row" [style.width.px]='calcWidth + 1'>
            <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length <= 0"
                [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
                class="igx-grid__scroll-on-drag-left" [style.left.px]="featureColumnsWidth"></span>
            <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length > 0"
                [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
                class="igx-grid__scroll-on-drag-pinned" [style.left.px]="pinnedWidth"></span>
            <ng-container *ngIf="groupingExpressions.length > 0">
                <div class="igx-grid__header-indentation igx-grid__row-indentation--level-{{groupingExpressions.length}}"
                    [ngClass]="{
                    'igx-grid__header-indentation--no-border': rowSelectable || rowDraggable
                }" #headerGroupContainer>
                    <igx-icon *ngIf="groupsExpanded" role="button" class="igx-grid__group-expand-btn"
                        (click)="toggleAllGroupRows()" [ngClass]="{
                        'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible
                    }">unfold_less</igx-icon>
                    <igx-icon *ngIf="!groupsExpanded" role="button" class="igx-grid__group-expand-btn"
                        (click)="toggleAllGroupRows()" [ngClass]="{
                        'igx-grid__group-expand-btn--push': filteringService.isFilterRowVisible
                    }">unfold_more</igx-icon>
                </div>
            </ng-container>
            <ng-container *ngIf="rowDraggable">
                <div class="igx-grid__drag-indicator" [ngClass]="{
                    'igx-grid__drag-indicator--header': !rowSelectable
                }" #headerDragContainer>
                    <div style="visibility: hidden;">
                        <ng-container
                            *ngTemplateOutlet="this.dragIndicatorIconTemplate ? this.dragIndicatorIconTemplate : this.dragIndicatorIconBase">
                        </ng-container>
                    </div>
                </div>
            </ng-container>
            <ng-container *ngIf="showRowCheckboxes">
                <div class="igx-grid__cbx-selection" #headerCheckboxContainer [ngClass]="{
                    'igx-grid__cbx-selection--push': filteringService.isFilterRowVisible
                }">
                    <igx-checkbox [checked]="allRowsSelected" (change)="onHeaderCheckboxClick($event, filteredData)"
                        disableRipple="true" [aria-label]="headerCheckboxAriaLabel" #headerCheckbox></igx-checkbox>
                </div>
            </ng-container>
            <ng-container *ngIf="pinnedColumns.length > 0">
                <ng-template ngFor let-col [ngForOf]="pinnedColumns | igxTopLevel">
                    <igx-grid-header-group [column]="col" [gridID]="id" [style.min-width.px]="getHeaderGroupWidth(col)"
                        [style.flex-basis.px]="getHeaderGroupWidth(col)"></igx-grid-header-group>
                </ng-template>
            </ng-container>
            <ng-template igxGridFor let-col [igxGridForOf]="unpinnedColumns | igxTopLevel"
                [igxForScrollOrientation]="'horizontal'" [igxForScrollContainer]="parentVirtDir"
                [igxForContainerSize]='unpinnedWidth' [igxForTrackBy]='trackColumnChanges'
                [igxForSizePropName]='"calcPixelWidth"' #headerContainer>
                <igx-grid-header-group [column]="col" [gridID]="id" [style.min-width.px]="getHeaderGroupWidth(col)"
                    [style.flex-basis.px]="getHeaderGroupWidth(col)"></igx-grid-header-group>
            </ng-template>
        </div>
        <igx-grid-filtering-row #filteringRow [style.width.px]='calcWidth' *ngIf="filteringService.isFilterRowVisible"
            [column]="filteringService.filteredColumn"></igx-grid-filtering-row>
    </div>
    <span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true"
        id="right" class="igx-grid__scroll-on-drag-right"></span>
    <div class="igx-grid__thead-thumb" [hidden]='!hasVerticalSroll()' [style.width.px]="scrollWidth"></div>
</div>

<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
    <div class="igx-grid__tbody-content" role="rowgroup" (onDragStop)="selectionService.dragMode = $event"
        (onDragScroll)="dragScroll($event)" [igxGridDragSelect]="selectionService.dragMode"
        [style.height.px]='calcHeight' [style.width.px]='calcWidth + 1' #tbody (scroll)='scrollHandler($event)'
        (wheel)="wheelHandler()">
        <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length <= 0"
            [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
            class="igx-grid__scroll-on-drag-left"></span>
        <span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length > 0"
            [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left"
            class="igx-grid__scroll-on-drag-pinned" [style.left.px]="pinnedWidth"></span>
        <ng-template igxGridFor let-rowData [igxGridForOf]="data
        | gridTransaction:id:pipeTrigger
        | gridFiltering:filteringExpressionsTree:id:pipeTrigger
        | gridSort:sortingExpressions:id:pipeTrigger
        | gridGroupBy:groupingExpressions:groupingExpansionState:groupsExpanded:id:groupsRecords:pipeTrigger
        | gridPaging:page:perPage:id:pipeTrigger
        | gridSummary:hasSummarizedColumns:summaryCalculationMode:summaryPosition:id:pipeTrigger:summaryPipeTrigger"
            let-rowIndex="index" [igxForScrollOrientation]="'vertical'" [igxForScrollContainer]='verticalScroll'
            [igxForContainerSize]='calcHeight'
            [igxForItemSize]="hasColumnLayouts ? rowHeight * multiRowLayoutRowSize + 1 : renderedRowHeight"
            #verticalScrollContainer (onChunkPreload)="dataLoading($event)">
            <ng-template #record_template>
                <igx-grid-row [gridID]="id" [index]="rowIndex" [rowData]="rowData" #row>
                </igx-grid-row>
            </ng-template>
            <ng-template #group_template>
                <igx-grid-groupby-row [gridID]="id" [index]="rowIndex" [groupRow]="rowData" #row>
                </igx-grid-groupby-row>
            </ng-template>
            <ng-template #summary_template>
                <igx-grid-summary-row [gridID]="id" [summaries]="rowData.summaries" [index]="rowIndex"
                    class="igx-grid__summaries--body" #summaryRow>
                </igx-grid-summary-row>
            </ng-template>
            <ng-template
                [igxTemplateOutlet]='isGroupByRecord(rowData) ? group_template : isSummaryRow(rowData) ? summary_template : record_template'
                [igxTemplateOutletContext]='getContext(rowData, rowIndex)'
                (onCachedViewLoaded)='cachedViewLoaded($event)'>
            </ng-template>
        </ng-template>
        <ng-container *ngTemplateOutlet="template"></ng-container>
        <div class="igx-grid__row-editing-outlet" igxOverlayOutlet #igxRowEditingOverlayOutlet></div>
    </div>
    <span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true"
        id="right" class="igx-grid__scroll-on-drag-right"></span>
    <div [hidden]='!hasVerticalSroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
        [style.height.px]='calcHeight'>
        <ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>
    </div>
</div>


<div class="igx-grid__tfoot" role="rowgroup" [style.height.px]='summariesHeight' #tfoot>
    <igx-grid-summary-row [style.width.px]='calcWidth' [style.height.px]='summariesHeight'
        *ngIf="hasSummarizedColumns && rootSummariesEnabled" [gridID]="id"
        [summaries]="id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe" [index]="0"
        class="igx-grid__summaries" #summaryRow>
    </igx-grid-summary-row>
    <div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalSroll()' [style.height.px]='summariesHeight'
        [style.width.px]="scrollWidth"></div>
</div>

<div class="igx-grid__scroll" [style.height]="'18px'" #scr [hidden]="unpinnedWidth - totalWidth >= 0">
    <div class="igx-grid__scroll-start" [style.width.px]='pinnedWidth' [hidden]="pinnedWidth === 0"></div>
    <div class="igx-grid__scroll-main" [style.width.px]='unpinnedWidth'>
        <ng-template igxGridFor [igxGridForOf]='[]' #scrollContainer>
        </ng-template>
    </div>
</div>

<div class="igx-grid__footer" #footer>
    <ng-content select="igx-grid-footer"></ng-content>
    <ng-container *ngIf="paging && totalRecords">
        <ng-container
            *ngTemplateOutlet="paginationTemplate ? paginationTemplate : defaultPaginator; context: {$implicit: this}">
        </ng-container>
    </ng-container>
</div>

<ng-template #defaultPaginator>
    <igx-paginator [displayDensity]="displayDensity" [(page)]="page" [totalRecords]="totalRecords" [(perPage)]="perPage">
    </igx-paginator>
</ng-template>
{'fraction_non_alphanumeric': 0.15421933416414457, 'fraction_numerical': 0.0016912942852056257, 'mean_word_length': 3.0601734730755332, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 275, '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': '5395546', 'n_tokens_mistral': 7188, 'n_tokens_neox': 6931, 'n_words': 841}