import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { DropDownAppendToBodyComponent } from 'ng-devui/dropdown';
import { I18nService } from 'ng-devui/i18n';
import { fromEvent } from 'rxjs';
import * as i0 from "@angular/core";
import * as i1 from "ng-devui/i18n";
import * as i2 from "@angular/common";
import * as i3 from "ng-devui/select";
import * as i4 from "@angular/forms";
import * as i5 from "ng-devui/text-input";
import * as i6 from "ng-devui/icon";
import * as i7 from "ng-devui/dropdown";
import * as i8 from "ng-devui/utils";
export class PaginationComponent {
    constructor(ref, i18n) {
        this.ref = ref;
        this.i18n = i18n;
        /**
         * 【可选】每页显示最大条目数量，默认10条
         */
        this.pageSize = 10;
        /**
         * 【可选】用于选择更改分页每页最大条目数量的下拉框的数据源，默认为`[5, 10, 20, 50]`
         */
        this.pageSizeOptions = [5, 10, 20, 50];
        this.pageSizeDirection = ['rightDown', 'rightUp'];
        /**
         * 【可选】初始化页码
         */
        this.pageIndex = 1;
        /**
         * 页码变化的回调
         */
        this.pageIndexChange = new EventEmitter();
        /**
         * 每页最大条目数量变更时的回调
         */
        this.pageSizeChange = new EventEmitter();
        /**
         * 分页最多显示几个按钮，默认10个
         */
        this.maxItems = 10;
        /**
         * 【可选】分页组件尺寸
         */
        this.size = '';
        // 是否显示跳转按钮，默认不显示
        this.showJumpButton = false;
        // 翻过了页的需求要显示当前真实页面
        this.showTruePageIndex = false;
        this.showPages = [];
        this.totalPage = 1;
        this._total = 0;
        this.jumpPage = null;
        this.rotateDegrees = 0;
        /**
         * @deprecated
         * 下拉菜单默认方向
         */
        this.selectDirection = 'auto';
        /**
         * 极简模式开关
         */
        this.lite = false;
        this.showPageSelector = true;
        this.haveConfigMenu = false;
        this.autoFixPageIndex = true;
        /**
         * 是否自动隐藏
         */
        this.autoHide = false;
        this.litePaginatorOptions = [];
        this.litePaginatorOptionsLengthCache = 0;
        this.showConfig = false;
        this.configButtonLoseFocusHandler = null;
        this.loseFocusListener = null;
    }
    ngOnInit() {
        this.i18nText = this.i18n.getI18nText().pagination;
        this.i18nLocale = this.i18n.getI18nText().locale;
        this.i18nSubscription = this.i18n.langChange().subscribe((data) => {
            this.i18nText = data.pagination;
            this.i18nLocale = data.locale;
            this.ref.markForCheck();
        });
        if (this.lite && this.showPageSelector) {
            this.constructLitePaginatorOptions();
        }
    }
    set total(total) {
        if (total === undefined) {
            this._total = 0;
        }
        else {
            if (!isNaN(parseInt(total, 10))) {
                this._total = parseInt(total, 10);
            }
        }
    }
    get total() {
        return this._total;
    }
    first() {
        if (this.pageIndex !== 1) {
            this.onPageIndexChange(1);
        }
    }
    last() {
        const last = Math.max(this.totalPage, 1);
        if (this.pageIndex !== last) {
            this.onPageIndexChange(last);
        }
    }
    prev() {
        if (this.hasPrev()) {
            this.onPageIndexChange(this.pageIndex - 1);
        }
    }
    next() {
        if (this.hasNext()) {
            this.onPageIndexChange(this.pageIndex + 1);
        }
    }
    jump() {
        const pageInput = parseInt(this.jumpPage, 10);
        if (pageInput) {
            if (pageInput > 0 && pageInput <= this.totalPage) {
                this.onPageIndexChange(pageInput);
            }
        }
    }
    validateInput() {
        if (this.jumpPage === '') {
            return;
        }
        const value = parseInt(this.jumpPage, 10);
        this.jumpPage = value;
        if (isNaN(value)) {
            this.jumpPage = this.pageIndex;
        }
    }
    preRange() {
        const pre = this.showPages[0] - 1;
        this.onPageIndexChange(Math.max(pre, 1));
    }
    nextRange() {
        const next = this.showPages[this.showPages.length - 1] + 1;
        this.onPageIndexChange(Math.min(next, this.totalPage));
    }
    onPageIndexChange(pageIndex) {
        if (this.pageIndex !== pageIndex) {
            if (this.lite) {
                this.litePaginatorIndex = {
                    value: this.pageIndex,
                    label: `${this.pageIndex}/${this.totalPage}`
                };
            }
            this.pageIndexChange.emit(pageIndex);
        }
    }
    onPageSizeChange(size) {
        if (this.pageSize !== size) {
            this.pageSize = size;
            this.pageSizeChange.emit(size);
            if (this.autoFixPageIndex && Math.ceil(this.total / size) < this.totalPage) {
                this.totalPage = Math.ceil(this.total / size);
                this.onPageIndexChange(this.totalPage <= this.pageIndex ? this.totalPage : this.pageIndex);
            }
            this.adjustPaginatorWidth();
        }
        this.dropDownElement.dropDown.toggle();
    }
    hasPrev() {
        return this.pageIndex > 1;
    }
    hasNext() {
        return this.pageIndex < this.totalPage;
    }
    getTotalPage() {
        return Math.ceil(this.total / this.pageSize);
    }
    ngOnChanges(changes) {
        const shouldUpdateRanges = PaginationComponent.EFFECT_PAGE_RANGE_KEYS.some(key => !!changes[key]);
        if (shouldUpdateRanges) {
            this.minPageSizeOptions = Math.min(...this.pageSizeOptions);
            this.totalPage = this.getTotalPage();
            if (!this.showTruePageIndex) {
                this.pageIndex = Math.max(Math.min(this.pageIndex, this.totalPage), 1);
            }
            this.jumpPage = this.pageIndex;
            this.updateShowPageRange();
            if (this.lite && this.showPageSelector) {
                this.constructLitePaginatorOptions();
            }
            this.adjustPaginatorWidth();
        }
    }
    ngAfterViewInit() {
        this.adjustPaginatorWidth();
    }
    updateShowPageRange() {
        if (!this.totalPage) {
            this.showPages = [1];
            return;
        }
        if (this.totalPage <= this.maxItems) {
            this.showPages = new Array(this.totalPage).fill(0).map((_, i) => i + 1);
            return;
        }
        this.showPages = this.extractRange();
    }
    extractRange() {
        const showPages = [this.pageIndex];
        let start = this.pageIndex - 1;
        let end = this.pageIndex + 1;
        const arriveLeftBound = index => index < 1;
        const arriveRightBound = (index) => index > this.totalPage;
        const fullPageRang = (pages) => pages.length >= this.maxItems - 2;
        while (!(fullPageRang(showPages) || (arriveLeftBound(start) && arriveRightBound(end)))) {
            if (!arriveLeftBound(start)) {
                showPages.unshift((start--));
            }
            if (!fullPageRang(showPages) && !arriveRightBound(end)) {
                showPages.push(end++);
            }
        }
        return showPages;
    }
    constructLitePaginatorOptions() {
        if (this.litePaginatorOptions.length === 0 ||
            this.litePaginatorOptions.length !== this.litePaginatorOptionsLengthCache) {
            this.litePaginatorOptions = Array.from({ length: this.totalPage }).map((v, index) => {
                return {
                    label: `${index + 1}/${this.totalPage}`,
                    value: index + 1
                };
            });
        }
        this.litePaginatorIndex = {
            value: this.pageIndex,
            label: `${this.pageIndex}/${this.totalPage}`
        };
    }
    adjustPaginatorWidth() {
        if (this.litePaginator && this.litePaginator.nativeElement && this.litePaginatorOptions.length > 0) {
            const lastOption = this.litePaginatorOptions[this.litePaginatorOptions.length - 1];
            const lastLabel = lastOption ? lastOption['label'] : '';
            const minWidth = 100;
            const width = lastLabel.length * 4 + 80;
            this.litePaginator.nativeElement.style.width = `${Math.max(minWidth, width)}px`;
        }
    }
    onToggle(event) {
        this.rotateDegrees = event ? 180 : 0;
    }
    toggleMenu(force = null) {
        if (force !== null) {
            this.showConfig = force;
        }
        else {
            this.showConfig = !this.showConfig;
        }
        this.ref.markForCheck();
        if (this.showConfig) {
            this.subscribeLoseFocusHandler();
        }
        else {
            this.unsubscribeLoseFocusHandler();
        }
    }
    closeMenu() {
        this.toggleMenu(false);
    }
    unsubscribeLoseFocusHandler() {
        if (this.configButtonLoseFocusHandler) {
            this.configButtonLoseFocusHandler.unsubscribe();
            this.configButtonLoseFocusHandler = null;
        }
    }
    ngOnDestroy() {
        this.unsubscribeLoseFocusHandler();
        if (this.i18nSubscription) {
            this.i18nSubscription.unsubscribe();
        }
    }
    subscribeLoseFocusHandler() {
        if (this.loseFocusListener === null) {
            this.loseFocusListener = fromEvent(document, 'click');
        }
        if (this.configButtonLoseFocusHandler === null) {
            this.configButtonLoseFocusHandler = this.loseFocusListener.subscribe(this.closeMenu.bind(this));
        }
    }
}
PaginationComponent.EFFECT_PAGE_RANGE_KEYS = ['total', 'pageSize', 'pageIndex', 'maxItems', 'pageSizeOptions'];
PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PaginationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.I18nService }], target: i0.ɵɵFactoryTarget.Component });
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PaginationComponent, selector: "d-pagination", inputs: { pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", pageSizeDirection: "pageSizeDirection", pageIndex: "pageIndex", maxItems: "maxItems", preLink: "preLink", nextLink: "nextLink", size: "size", canJumpPage: "canJumpPage", canChangePageSize: "canChangePageSize", canViewTotal: "canViewTotal", cssClass: "cssClass", showJumpButton: "showJumpButton", showTruePageIndex: "showTruePageIndex", id: "id", totalItemText: "totalItemText", goToText: "goToText", selectDirection: "selectDirection", lite: "lite", showPageSelector: "showPageSelector", haveConfigMenu: "haveConfigMenu", autoFixPageIndex: "autoFixPageIndex", autoHide: "autoHide", total: "total" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange" }, viewQueries: [{ propertyName: "litePaginator", first: true, predicate: ["litePaginator"], descendants: true }, { propertyName: "dropDownElement", first: true, predicate: ["dropDownElement"], descendants: true }], exportAs: ["pagination"], usesOnChanges: true, ngImport: i0, template: "<div class=\"devui-pagination\" [class.devui-pagination-hidden]=\"autoHide && total < minPageSizeOptions\">\r\n  <ng-container *ngIf=\"canChangePageSize && !lite\">\r\n    <div dDropDown (toggleEvent)=\"onToggle($event)\" appendToBody [appendToBodyDirections]=\"pageSizeDirection\" #dropDownElement>\r\n      <d-icon\r\n        class=\"devui-dropdown-default devui-dropdown-origin devui-page-size {{ size ? 'devui-page-size-' + size : '' }}\"\r\n        dDropDownToggle\r\n        [icon]=\"'icon-select-arrow'\"\r\n        [rotate]=\"rotateDegrees\"\r\n      >\r\n        <span iconPrefix>{{ pageSize }}</span>\r\n      </d-icon>\r\n      <ul dDropDownMenu class=\"devui-dropdown-menu devui-pagination-dropdown-menu\" role=\"menu\" (click)=\"$event.stopPropagation()\">\r\n        <li *ngFor=\"let item of pageSizeOptions\" class=\"devui-dropdown-item\" (click)=\"onPageSizeChange(item)\">{{ item }}</li>\r\n      </ul>\r\n    </div>\r\n    <span style=\"margin-right: 8px\">{{ i18nText?.perPage }},</span>\r\n  </ng-container>\r\n  <div *ngIf=\"canViewTotal\" class=\"devui-total-size\">{{ totalItemText ? totalItemText + ': ' + total : i18nText?.totalItem(total) }}</div>\r\n  <div *ngIf=\"lite && showPageSelector\" class=\"devui-lite-paginator\" #litePaginator>\r\n    <d-select\r\n      [scrollHight]=\"'200px'\"\r\n      [size]=\"size\"\r\n      [isSearch]=\"false\"\r\n      [ngModel]=\"litePaginatorIndex\"\r\n      [appendToBody]=\"true\"\r\n      [appendToBodyDirections]=\"pageSizeDirection\"\r\n      [options]=\"litePaginatorOptions\"\r\n      [filterKey]=\"'label'\"\r\n      [disabled]=\"!litePaginatorOptions.length\"\r\n      (valueChange)=\"onPageIndexChange($event.value)\"\r\n    ></d-select>\r\n  </div>\r\n  <ul class=\"devui-pagination-list {{ size ? 'devui-pagination-' + size : '' }}\">\r\n    <ng-container *ngIf=\"!lite\">\r\n      <li *ngIf=\"preLink\" [ngClass]=\"{ disabled: pageIndex == totalPage }\">\r\n        <a (click)=\"prev()\" class=\"devui-pagination-link\" [innerHTML]=\"preLink | safe: 'html'\"></a>\r\n      </li>\r\n      <li *ngIf=\"!preLink\" [ngClass]=\"{ disabled: pageIndex == 1 }\">\r\n        <a (click)=\"prev()\" class=\"devui-pagination-link\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                points=\"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n      <li *ngIf=\"showPages[0] > 1\" (click)=\"first()\">\r\n        <a>1</a>\r\n      </li>\r\n      <li *ngIf=\"showPages[0] > 2\" (click)=\"preRange()\">\r\n        <a>...</a>\r\n      </li>\r\n      <li *ngFor=\"let item of showPages\" [ngClass]=\"{ active: item == pageIndex }\">\r\n        <a (click)=\"onPageIndexChange(item)\">{{ item }}</a>\r\n      </li>\r\n      <li *ngIf=\"showPages[showPages.length - 1] < totalPage - 1\" (click)=\"nextRange()\">\r\n        <a>...</a>\r\n      </li>\r\n      <li *ngIf=\"showPages[showPages.length - 1] < totalPage\" (click)=\"last()\">\r\n        <a>{{ totalPage }}</a>\r\n      </li>\r\n      <ng-container *ngIf=\"showTruePageIndex && pageIndex > totalPage && totalPage > 0\">\r\n        <li *ngIf=\"pageIndex > totalPage + 1\" class=\"disabled\"><a>...</a></li>\r\n        <li class=\"active disabled\">\r\n          <a>{{ pageIndex }}</a>\r\n        </li>\r\n      </ng-container>\r\n      <li *ngIf=\"nextLink\" [ngClass]=\"{ disabled: pageIndex == totalPage }\">\r\n        <a (click)=\"next()\" class=\"devui-pagination-link\" [innerHTML]=\"nextLink | safe: 'html'\"></a>\r\n      </li>\r\n      <li *ngIf=\"!nextLink\" [ngClass]=\"{ disabled: pageIndex == totalPage || !total }\">\r\n        <a (click)=\"next()\" class=\"devui-pagination-link\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                transform=\"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) \"\r\n                points=\"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n    </ng-container>\r\n    <ng-container *ngIf=\"lite\">\r\n      <li *ngIf=\"preLink\" [ngClass]=\"{ disabled: pageIndex == totalPage }\">\r\n        <a\r\n          (click)=\"prev()\"\r\n          [attr.aria-label]=\"nextLink\"\r\n          class=\"devui-pagination-link devui-pagination-link-lite\"\r\n          [innerHTML]=\"preLink | safe: 'html'\"\r\n        ></a>\r\n      </li>\r\n      <li *ngIf=\"!preLink\" [ngClass]=\"{ disabled: pageIndex == 1 }\">\r\n        <a (click)=\"prev()\" [attr.aria-label]=\"nextLink\" class=\"devui-pagination-link devui-pagination-link-lite\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                points=\"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n      <li *ngIf=\"nextLink\" [ngClass]=\"{ disabled: pageIndex >= totalPage }\">\r\n        <a\r\n          (click)=\"next()\"\r\n          [attr.aria-label]=\"nextLink\"\r\n          class=\"devui-pagination-link devui-pagination-link-lite\"\r\n          [innerHTML]=\"nextLink | safe: 'html'\"\r\n        ></a>\r\n      </li>\r\n      <li *ngIf=\"!nextLink\" [ngClass]=\"{ disabled: pageIndex >= totalPage }\">\r\n        <a (click)=\"next()\" [attr.aria-label]=\"nextLink\" class=\"devui-pagination-link devui-pagination-link-lite\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                transform=\"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) \"\r\n                points=\"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n    </ng-container>\r\n  </ul>\r\n  <div *ngIf=\"canJumpPage\" class=\"devui-jump-container\">\r\n    {{ goToText ? goToText : i18nText?.goTo }}\r\n    <input\r\n      dTextInput\r\n      type=\"text\"\r\n      autocomplete=\"off\"\r\n      class=\"devui-input {{ size ? 'devui-input-' + size : '' }}\"\r\n      name=\"pageIndex\"\r\n      [(ngModel)]=\"jumpPage\"\r\n      (keyup.enter)=\"jump()\"\r\n      (keyup)=\"validateInput()\"\r\n    />\r\n    {{ i18nLocale === 'zh-cn' && !goToText ? i18nText.page : '' }}\r\n    <div\r\n      *ngIf=\"showJumpButton\"\r\n      class=\"devui-jump-button {{ size ? 'devui-jump-size-' + size : 'devui-jump-size-default' }}\"\r\n      title=\"{{ goToText ? goToText : i18nText?.goTo }}\"\r\n      (click)=\"jump()\"\r\n    >\r\n      <div class=\"devui-pagination-go\"></div>\r\n    </div>\r\n  </div>\r\n  <div class=\"devui-pagination-config\" *ngIf=\"haveConfigMenu\">\r\n    <div class=\"devui-setup-icon\" (click)=\"$event.stopPropagation(); toggleMenu()\">\r\n      <svg\r\n        width=\"16px\"\r\n        height=\"16px\"\r\n        viewBox=\"0 0 16 16\"\r\n        version=\"1.1\"\r\n        xmlns=\"http://www.w3.org/2000/svg\"\r\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n      >\r\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n          <path\r\n            d=\"M8,12 C10.209139,12 12,10.209139 12,8 C12,5.790861 10.209139,4 8,4 C5.790861,4 4,5.790861 4,8 C4,10.209139 5.790861,12 8,12 Z M4.52067059,3.11124369 C5.24511171,2.59473146 6.08922816,2.23522497 7.00334609,2.08239805 C7.00112987,2.05522493 7,2.02774441 7,2 L7,1 C7,0.44771525 7.44771525,1.01453063e-16 8,0 C8.55228475,-1.01453063e-16 9,0.44771525 9,1 L9,2 C9,2.02774441 8.99887013,2.05522493 8.99665391,2.08239805 C9.91077184,2.23522497 10.7548883,2.59473146 11.4793294,3.11124369 C11.4970673,3.09033559 11.5158021,3.06998434 11.5355339,3.05025253 L12.2426407,2.34314575 C12.633165,1.95262146 13.26633,1.95262146 13.6568542,2.34314575 C14.0473785,2.73367004 14.0473785,3.36683502 13.6568542,3.75735931 L12.9497475,4.46446609 C12.9300157,4.4841979 12.9096644,4.50293273 12.8887563,4.52067059 C13.4052685,5.24511171 13.764775,6.08922816 13.917602,7.00334609 C13.9447751,7.00112987 13.9722556,7 14,7 L15,7 C15.5522847,7 16,7.44771525 16,8 C16,8.55228475 15.5522847,9 15,9 L14,9 C13.9722556,9 13.9447751,8.99887013 13.917602,8.99665391 C13.764775,9.91077184 13.4052685,10.7548883 12.8887563,11.4793294 C12.9096644,11.4970673 12.9300157,11.5158021 12.9497475,11.5355339 L13.6568542,12.2426407 C14.0473785,12.633165 14.0473785,13.26633 13.6568542,13.6568542 C13.26633,14.0473785 12.633165,14.0473785 12.2426407,13.6568542 L11.5355339,12.9497475 C11.5158021,12.9300157 11.4970673,12.9096644 11.4793294,12.8887563 C10.7548883,13.4052685 9.91077184,13.764775 8.99665391,13.917602 C8.99887013,13.9447751 9,13.9722556 9,14 L9,15 C9,15.5522847 8.55228475,16 8,16 C7.44771525,16 7,15.5522847 7,15 L7,14 C7,13.9722556 7.00112987,13.9447751 7.00334609,13.917602 C6.08922816,13.764775 5.24511171,13.4052685 4.52067059,12.8887563 C4.50293273,12.9096644 4.4841979,12.9300157 4.46446609,12.9497475 L3.75735931,13.6568542 C3.36683502,14.0473785 2.73367004,14.0473785 2.34314575,13.6568542 C1.95262146,13.26633 1.95262146,12.633165 2.34314575,12.2426407 L3.05025253,11.5355339 C3.06998434,11.5158021 3.09033559,11.4970673 3.11124369,11.4793294 C2.59473146,10.7548883 2.23522497,9.91077184 2.08239805,8.99665391 C2.05522493,8.99887013 2.02774441,9 2,9 L1,9 C0.44771525,9 2.4125371e-16,8.55228475 3.83475851e-17,8 C-1.6455854e-16,7.44771525 0.44771525,7 1,7 L2,7 C2.02774441,7 2.05522493,7.00112987 2.08239805,7.00334609 C2.23522497,6.08922816 2.59473146,5.24511171 3.11124369,4.52067059 C3.09033559,4.50293273 3.06998434,4.4841979 3.05025253,4.46446609 L2.34314575,3.75735931 C1.95262146,3.36683502 1.95262146,2.73367004 2.34314575,2.34314575 C2.73367004,1.95262146 3.36683502,1.95262146 3.75735931,2.34314575 L4.46446609,3.05025253 C4.4841979,3.06998434 4.50293273,3.09033559 4.52067059,3.11124369 Z M8,9 C7.44771525,9 7,8.55228475 7,8 C7,7.44771525 7.44771525,7 8,7 C8.55228475,7 9,7.44771525 9,8 C9,8.55228475 8.55228475,9 8,9 Z\"\r\n            fill=\"#293040\"\r\n            fill-rule=\"nonzero\"\r\n          ></path>\r\n        </g>\r\n      </svg>\r\n    </div>\r\n    <div *ngIf=\"showConfig\" class=\"devui-config-container\">\r\n      <ng-content></ng-content>\r\n      <div class=\"devui-pagination-config-item devui-page-size-config\" *ngIf=\"canChangePageSize\">\r\n        <div class=\"devui-config-item-title\">{{ i18nText?.pageSize }}</div>\r\n        <div class=\"devui-page-number\">\r\n          <ng-container *ngFor=\"let size of pageSizeOptions\">\r\n            <div class=\"number\" [ngClass]=\"{ choosed: size === pageSize }\" (click)=\"onPageSizeChange(size)\">\r\n              {{ size }}\r\n            </div>\r\n          </ng-container>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}:host{display:block}.devui-pagination{display:flex;align-items:center}.devui-pagination .devui-page-size{display:inline-block;vertical-align:middle;margin:0 8px 0 0;position:relative;height:28px}.devui-pagination .devui-page-size.devui-page-size-sm{height:26px}.devui-pagination .devui-page-size.devui-page-size-lg{height:46px}.devui-pagination .devui-page-size.devui-page-size-lg li a.devui-pagination-link{height:46px;line-height:46px}.devui-pagination .devui-total-size{display:inline-block;position:relative;margin:0 12px 0 0;color:#575d6c;color:var(--devui-text-weak, #575d6c)}.devui-pagination .devui-pagination-list{vertical-align:middle;display:inline-flex;align-items:center}.devui-pagination .devui-pagination-list>.disabled>a,.devui-pagination .devui-pagination-list>.disabled>a:hover,.devui-pagination .devui-pagination-list>.disabled>a:focus{cursor:not-allowed}.devui-pagination .devui-pagination-list li{display:inline}.devui-pagination .devui-pagination-list li.disabled a{color:#cfd0d3;color:var(--devui-disabled-text, #cfd0d3)}.devui-pagination .devui-pagination-list li.disabled a svg g polygon{fill:#cfd0d3;fill:var(--devui-disabled-text, #cfd0d3)}.devui-pagination .devui-pagination-list li.disabled:first-child a,.devui-pagination .devui-pagination-list li.disabled:last-child a{border-color:#dfe1e6;border-color:var(--devui-disabled-line, #dfe1e6)}.devui-pagination .devui-pagination-list li:not(.disabled){cursor:pointer}.devui-pagination .devui-pagination-list li:not(.disabled) a:hover,.devui-pagination .devui-pagination-list li:not(.disabled) span:hover,.devui-pagination .devui-pagination-list li:not(.disabled) a:focus,.devui-pagination .devui-pagination-list li:not(.disabled) span:focus{background-color:#f2f2f3;background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:#252b3a;color:var(--devui-list-item-hover-text, #252b3a);text-decoration:none}.devui-pagination .devui-pagination-list li:not(.disabled) a:active{background-color:#f2f5fc;background-color:var(--devui-list-item-active-bg, #f2f5fc);color:#252b3a;color:var(--devui-list-item-active-text, #252b3a)}.devui-pagination .devui-pagination-list li:not(.disabled).active a{background-color:#f2f5fc;background-color:var(--devui-list-item-active-bg, #f2f5fc);color:#252b3a;color:var(--devui-list-item-active-text, #252b3a);cursor:pointer}.devui-pagination .devui-pagination-list li:not(.disabled).active a:hover{background-color:#f2f5fc;background-color:var(--devui-list-item-active-hover-bg, #f2f5fc);color:#252b3a;color:var(--devui-list-item-active-text, #252b3a)}.devui-pagination .devui-pagination-list li:not(.disabled) a.devui-pagination-link:hover:not(:active) svg g polygon{fill:#252b3a;fill:var(--devui-icon-fill-active-hover, #252b3a)}.devui-pagination .devui-pagination-list li:not(.disabled) a.devui-pagination-link:active svg g polygon{fill:#fff;fill:var(--devui-light-text, #ffffff)}.devui-pagination .devui-pagination-list .devui-pagination-link svg{vertical-align:middle}.devui-pagination .devui-pagination-list .devui-pagination-link svg g polygon{fill:#71757f;fill:var(--devui-icon-text, #71757f)}.devui-pagination .devui-pagination-list .devui-pagination-link-lite{border:1px solid transparent!important;border-radius:2px;border-radius:var(--devui-border-radius, 2px)}.devui-pagination .devui-pagination-list>li>a{margin-left:4px;padding:0 8px;line-height:24px;border-radius:2px;border-radius:var(--devui-border-radius, 2px);color:#575d6c;color:var(--devui-text-weak, #575d6c);display:flex;align-items:center;justify-content:center}.devui-pagination .devui-pagination-sm>li>a{padding:0 4px;min-width:18px;line-height:22px;font-size:12px;font-size:var(--devui-font-size-sm, 12px)}.devui-pagination .devui-pagination-lg>li>a{padding:0 12px;font-size:14px;font-size:var(--devui-font-size-lg, 14px);line-height:38px}.devui-pagination .devui-pagination-list>li:first-child>a,.devui-pagination .devui-pagination-list>li:last-child>a{min-width:34px;height:32px;line-height:32px;padding:0 8px}.devui-pagination .devui-pagination-sm>li:first-child>a,.devui-pagination .devui-pagination-sm>li:last-child>a{border-radius:2px;border-radius:var(--devui-border-radius, 2px);min-width:20px;height:30px;line-height:30px;padding:0 4px}.devui-pagination .devui-pagination-lg>li:first-child>a,.devui-pagination .devui-pagination-lg>li:last-child>a{border-radius:2px;border-radius:var(--devui-border-radius, 2px);min-width:46px;height:46px;line-height:46px;padding:0 16px}.devui-pagination .devui-jump-container{display:inline-flex;position:relative;margin:0 12px;vertical-align:middle;align-items:center}.devui-pagination .devui-jump-container .devui-input{display:inline-block;width:3.5em;vertical-align:middle;margin:0 4px}.devui-pagination .devui-jump-button{display:inline-flex;vertical-align:middle;border-radius:2px;border-radius:var(--devui-border-radius, 2px);border:1px solid #d7d8da;border:1px solid var(--devui-line, #d7d8da);cursor:pointer;margin-left:4px;align-items:center;justify-content:center}.devui-pagination .devui-jump-button .devui-pagination-go{width:0;height:0;border-top-style:solid;border-left-style:solid;border-bottom-style:solid}.devui-pagination .devui-jump-button:hover{border-color:#526ecc;border-color:var(--devui-brand-active, #526ecc)}.devui-pagination .devui-jump-button:hover .devui-pagination-go{border-left-color:#526ecc;border-left-color:var(--devui-brand-active, #526ecc)}.devui-pagination .devui-jump-size-default{width:34px;height:34px}.devui-pagination .devui-jump-size-default .devui-pagination-go{width:0;height:0;border-top:12px solid transparent;border-left:12px solid #71757f;border-left:12px solid var(--devui-icon-text, #71757f);border-bottom:12px solid transparent}.devui-pagination .devui-jump-size-sm{width:24px;height:24px}.devui-pagination .devui-jump-size-sm .devui-pagination-go{width:0;height:0;border-top:6px solid transparent;border-left:6px solid #71757f;border-left:6px solid var(--devui-icon-text, #71757f);border-bottom:6px solid transparent}.devui-pagination .devui-jump-size-sm .devui-pagination-link{height:30px;line-height:32px}.devui-pagination .devui-jump-size-lg{width:46px;height:46px}.devui-pagination .devui-jump-size-lg .devui-pagination-go{width:0;height:0;border-top:16px solid transparent;border-left:16px solid #71757f;border-left:16px solid var(--devui-icon-text, #71757f);border-bottom:16px solid transparent}.devui-pagination .devui-lite-paginator{display:inline-block;margin-right:4px;width:100px;vertical-align:middle}.devui-pagination .devui-pagination-config{color:#252b3a;color:var(--devui-text, #252b3a);position:relative;display:inline-block;vertical-align:middle;margin:0 4px}.devui-pagination .devui-pagination-config .devui-setup-icon{line-height:30px;cursor:pointer;display:flex}.devui-pagination .devui-pagination-config .devui-setup-icon svg g path{fill:#71757f;fill:var(--devui-icon-text, #71757f)}.devui-pagination .devui-pagination-config .devui-config-container{padding:4px 0;box-shadow:0 4px 8px #252b3a33;box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));border-radius:2px;border-radius:var(--devui-border-radius, 2px);width:150px;background-color:#fff;background-color:var(--devui-connected-overlay-bg, #ffffff);line-height:26px;position:absolute;left:-136px;top:28px;cursor:auto;z-index:1052;z-index:var(--devui-z-index-dropdown, 1052);-moz-user-select:none;-webkit-user-select:none;user-select:none}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item.devui-page-size-config{border-bottom:none}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item{padding-bottom:8px;padding-top:4px;border-bottom:1px solid #f2f2f3;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-config-item-title{color:#71757f;color:var(--devui-aide-text, #71757f);padding-left:8px;font-size:12px;font-size:var(--devui-font-size, 12px);line-height:22px}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number{padding-left:8px;margin-top:4px;display:flex;display:-ms-flexbox}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number div{color:#252b3a;color:var(--devui-text, #252b3a);cursor:pointer;border-top:1px solid #d7d8da;border-top:1px solid var(--devui-line, #d7d8da);border-bottom:1px solid #d7d8da;border-bottom:1px solid var(--devui-line, #d7d8da);border-right:1px solid #d7d8da;border-right:1px solid var(--devui-line, #d7d8da);text-align:center;height:26px;width:26px}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number div:hover{background-color:#f2f2f3;background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:#252b3a;color:var(--devui-list-item-hover-text, #252b3a)}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number div:first-child{border-left:1px solid #d7d8da;border-left:1px solid var(--devui-line, #d7d8da)}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number .devui-page-number div.choosed:not(:hover):not(:active),.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number .choosed:not(:hover):not(:active){color:#252b3a;color:var(--devui-list-item-active-text, #252b3a);background-color:#f2f5fc!important;background-color:var(--devui-list-item-active-bg, #f2f5fc)!important;cursor:auto!important}.devui-pagination .devui-pagination-list li a{transition:background-color .3s cubic-bezier(.645,.045,.355,1);transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-pagination-hidden{display:none}:host ::ng-deep .devui-input-sm{height:24px;padding:4px;font-size:12px;font-size:var(--devui-font-size, 12px);line-height:1.5;border-radius:2px;border-radius:var(--devui-border-radius, 2px)}:host ::ng-deep .devui-input-lg{height:46px}.devui-pagination-dropdown-menu{min-width:60px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.SelectComponent, selector: "d-select", inputs: ["options", "isSearch", "toggleOnFocus", "scrollHight", "highlightItemClass", "filterKey", "multiple", "isSelectAll", "readonly", "size", "appendToBody", "appendToBodyDirections", "width", "templateItemSize", "disabled", "placeholder", "searchPlaceholder", "searchFn", "valueParser", "formatter", "direction", "overview", "allowClear", "color", "enableLazyLoad", "virtualScroll", "inputItemTemplate", "extraConfig", "optionDisabledKey", "optionImmutableKey", "noResultItemTemplate", "keepMultipleOrder", "customViewTemplate", "customViewDirection", "autoFocus", "notAutoScroll", "loadingTemplateRef", "showAnimation"], outputs: ["valueChange", "toggleChange", "loadMore"], exportAs: ["select"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.TextDirective, selector: "[dTextInput]", inputs: ["error", "size"], exportAs: ["dTextInput"] }, { kind: "component", type: i6.IconComponent, selector: "d-icon", inputs: ["icon", "operable", "disabled", "rotate", "color"] }, { kind: "directive", type: i7.DropDownDirective, selector: "[dDropDown]", inputs: ["isOpen", "disabled", "showAnimation", "trigger", "closeScope", "closeOnMouseLeaveMenu"], outputs: ["toggleEvent"], exportAs: ["d-dropdown"] }, { kind: "directive", type: i7.DropDownMenuDirective, selector: "[dDropDownMenu]", exportAs: ["d-dropdown-menu"] }, { kind: "directive", type: i7.DropDownToggleDirective, selector: "[dDropDownToggle]", inputs: ["toggleOnFocus", "autoFocus"], exportAs: ["d-dropdown-toggle"] }, { kind: "component", type: i7.DropDownAppendToBodyComponent, selector: "[dDropDown][appendToBody]", inputs: ["alignOrigin", "appendToBodyDirections"] }, { kind: "pipe", type: i8.SafePipe, name: "safe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PaginationComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-pagination', exportAs: 'pagination', changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<div class=\"devui-pagination\" [class.devui-pagination-hidden]=\"autoHide && total < minPageSizeOptions\">\r\n  <ng-container *ngIf=\"canChangePageSize && !lite\">\r\n    <div dDropDown (toggleEvent)=\"onToggle($event)\" appendToBody [appendToBodyDirections]=\"pageSizeDirection\" #dropDownElement>\r\n      <d-icon\r\n        class=\"devui-dropdown-default devui-dropdown-origin devui-page-size {{ size ? 'devui-page-size-' + size : '' }}\"\r\n        dDropDownToggle\r\n        [icon]=\"'icon-select-arrow'\"\r\n        [rotate]=\"rotateDegrees\"\r\n      >\r\n        <span iconPrefix>{{ pageSize }}</span>\r\n      </d-icon>\r\n      <ul dDropDownMenu class=\"devui-dropdown-menu devui-pagination-dropdown-menu\" role=\"menu\" (click)=\"$event.stopPropagation()\">\r\n        <li *ngFor=\"let item of pageSizeOptions\" class=\"devui-dropdown-item\" (click)=\"onPageSizeChange(item)\">{{ item }}</li>\r\n      </ul>\r\n    </div>\r\n    <span style=\"margin-right: 8px\">{{ i18nText?.perPage }},</span>\r\n  </ng-container>\r\n  <div *ngIf=\"canViewTotal\" class=\"devui-total-size\">{{ totalItemText ? totalItemText + ': ' + total : i18nText?.totalItem(total) }}</div>\r\n  <div *ngIf=\"lite && showPageSelector\" class=\"devui-lite-paginator\" #litePaginator>\r\n    <d-select\r\n      [scrollHight]=\"'200px'\"\r\n      [size]=\"size\"\r\n      [isSearch]=\"false\"\r\n      [ngModel]=\"litePaginatorIndex\"\r\n      [appendToBody]=\"true\"\r\n      [appendToBodyDirections]=\"pageSizeDirection\"\r\n      [options]=\"litePaginatorOptions\"\r\n      [filterKey]=\"'label'\"\r\n      [disabled]=\"!litePaginatorOptions.length\"\r\n      (valueChange)=\"onPageIndexChange($event.value)\"\r\n    ></d-select>\r\n  </div>\r\n  <ul class=\"devui-pagination-list {{ size ? 'devui-pagination-' + size : '' }}\">\r\n    <ng-container *ngIf=\"!lite\">\r\n      <li *ngIf=\"preLink\" [ngClass]=\"{ disabled: pageIndex == totalPage }\">\r\n        <a (click)=\"prev()\" class=\"devui-pagination-link\" [innerHTML]=\"preLink | safe: 'html'\"></a>\r\n      </li>\r\n      <li *ngIf=\"!preLink\" [ngClass]=\"{ disabled: pageIndex == 1 }\">\r\n        <a (click)=\"prev()\" class=\"devui-pagination-link\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                points=\"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n      <li *ngIf=\"showPages[0] > 1\" (click)=\"first()\">\r\n        <a>1</a>\r\n      </li>\r\n      <li *ngIf=\"showPages[0] > 2\" (click)=\"preRange()\">\r\n        <a>...</a>\r\n      </li>\r\n      <li *ngFor=\"let item of showPages\" [ngClass]=\"{ active: item == pageIndex }\">\r\n        <a (click)=\"onPageIndexChange(item)\">{{ item }}</a>\r\n      </li>\r\n      <li *ngIf=\"showPages[showPages.length - 1] < totalPage - 1\" (click)=\"nextRange()\">\r\n        <a>...</a>\r\n      </li>\r\n      <li *ngIf=\"showPages[showPages.length - 1] < totalPage\" (click)=\"last()\">\r\n        <a>{{ totalPage }}</a>\r\n      </li>\r\n      <ng-container *ngIf=\"showTruePageIndex && pageIndex > totalPage && totalPage > 0\">\r\n        <li *ngIf=\"pageIndex > totalPage + 1\" class=\"disabled\"><a>...</a></li>\r\n        <li class=\"active disabled\">\r\n          <a>{{ pageIndex }}</a>\r\n        </li>\r\n      </ng-container>\r\n      <li *ngIf=\"nextLink\" [ngClass]=\"{ disabled: pageIndex == totalPage }\">\r\n        <a (click)=\"next()\" class=\"devui-pagination-link\" [innerHTML]=\"nextLink | safe: 'html'\"></a>\r\n      </li>\r\n      <li *ngIf=\"!nextLink\" [ngClass]=\"{ disabled: pageIndex == totalPage || !total }\">\r\n        <a (click)=\"next()\" class=\"devui-pagination-link\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                transform=\"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) \"\r\n                points=\"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n    </ng-container>\r\n    <ng-container *ngIf=\"lite\">\r\n      <li *ngIf=\"preLink\" [ngClass]=\"{ disabled: pageIndex == totalPage }\">\r\n        <a\r\n          (click)=\"prev()\"\r\n          [attr.aria-label]=\"nextLink\"\r\n          class=\"devui-pagination-link devui-pagination-link-lite\"\r\n          [innerHTML]=\"preLink | safe: 'html'\"\r\n        ></a>\r\n      </li>\r\n      <li *ngIf=\"!preLink\" [ngClass]=\"{ disabled: pageIndex == 1 }\">\r\n        <a (click)=\"prev()\" [attr.aria-label]=\"nextLink\" class=\"devui-pagination-link devui-pagination-link-lite\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                points=\"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n      <li *ngIf=\"nextLink\" [ngClass]=\"{ disabled: pageIndex >= totalPage }\">\r\n        <a\r\n          (click)=\"next()\"\r\n          [attr.aria-label]=\"nextLink\"\r\n          class=\"devui-pagination-link devui-pagination-link-lite\"\r\n          [innerHTML]=\"nextLink | safe: 'html'\"\r\n        ></a>\r\n      </li>\r\n      <li *ngIf=\"!nextLink\" [ngClass]=\"{ disabled: pageIndex >= totalPage }\">\r\n        <a (click)=\"next()\" [attr.aria-label]=\"nextLink\" class=\"devui-pagination-link devui-pagination-link-lite\">\r\n          <svg width=\"1em\" height=\"1.5em\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <polygon\r\n                fill=\"#293040\"\r\n                fill-rule=\"nonzero\"\r\n                transform=\"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) \"\r\n                points=\"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8\"\r\n              ></polygon>\r\n            </g>\r\n          </svg>\r\n        </a>\r\n      </li>\r\n    </ng-container>\r\n  </ul>\r\n  <div *ngIf=\"canJumpPage\" class=\"devui-jump-container\">\r\n    {{ goToText ? goToText : i18nText?.goTo }}\r\n    <input\r\n      dTextInput\r\n      type=\"text\"\r\n      autocomplete=\"off\"\r\n      class=\"devui-input {{ size ? 'devui-input-' + size : '' }}\"\r\n      name=\"pageIndex\"\r\n      [(ngModel)]=\"jumpPage\"\r\n      (keyup.enter)=\"jump()\"\r\n      (keyup)=\"validateInput()\"\r\n    />\r\n    {{ i18nLocale === 'zh-cn' && !goToText ? i18nText.page : '' }}\r\n    <div\r\n      *ngIf=\"showJumpButton\"\r\n      class=\"devui-jump-button {{ size ? 'devui-jump-size-' + size : 'devui-jump-size-default' }}\"\r\n      title=\"{{ goToText ? goToText : i18nText?.goTo }}\"\r\n      (click)=\"jump()\"\r\n    >\r\n      <div class=\"devui-pagination-go\"></div>\r\n    </div>\r\n  </div>\r\n  <div class=\"devui-pagination-config\" *ngIf=\"haveConfigMenu\">\r\n    <div class=\"devui-setup-icon\" (click)=\"$event.stopPropagation(); toggleMenu()\">\r\n      <svg\r\n        width=\"16px\"\r\n        height=\"16px\"\r\n        viewBox=\"0 0 16 16\"\r\n        version=\"1.1\"\r\n        xmlns=\"http://www.w3.org/2000/svg\"\r\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n      >\r\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n          <path\r\n            d=\"M8,12 C10.209139,12 12,10.209139 12,8 C12,5.790861 10.209139,4 8,4 C5.790861,4 4,5.790861 4,8 C4,10.209139 5.790861,12 8,12 Z M4.52067059,3.11124369 C5.24511171,2.59473146 6.08922816,2.23522497 7.00334609,2.08239805 C7.00112987,2.05522493 7,2.02774441 7,2 L7,1 C7,0.44771525 7.44771525,1.01453063e-16 8,0 C8.55228475,-1.01453063e-16 9,0.44771525 9,1 L9,2 C9,2.02774441 8.99887013,2.05522493 8.99665391,2.08239805 C9.91077184,2.23522497 10.7548883,2.59473146 11.4793294,3.11124369 C11.4970673,3.09033559 11.5158021,3.06998434 11.5355339,3.05025253 L12.2426407,2.34314575 C12.633165,1.95262146 13.26633,1.95262146 13.6568542,2.34314575 C14.0473785,2.73367004 14.0473785,3.36683502 13.6568542,3.75735931 L12.9497475,4.46446609 C12.9300157,4.4841979 12.9096644,4.50293273 12.8887563,4.52067059 C13.4052685,5.24511171 13.764775,6.08922816 13.917602,7.00334609 C13.9447751,7.00112987 13.9722556,7 14,7 L15,7 C15.5522847,7 16,7.44771525 16,8 C16,8.55228475 15.5522847,9 15,9 L14,9 C13.9722556,9 13.9447751,8.99887013 13.917602,8.99665391 C13.764775,9.91077184 13.4052685,10.7548883 12.8887563,11.4793294 C12.9096644,11.4970673 12.9300157,11.5158021 12.9497475,11.5355339 L13.6568542,12.2426407 C14.0473785,12.633165 14.0473785,13.26633 13.6568542,13.6568542 C13.26633,14.0473785 12.633165,14.0473785 12.2426407,13.6568542 L11.5355339,12.9497475 C11.5158021,12.9300157 11.4970673,12.9096644 11.4793294,12.8887563 C10.7548883,13.4052685 9.91077184,13.764775 8.99665391,13.917602 C8.99887013,13.9447751 9,13.9722556 9,14 L9,15 C9,15.5522847 8.55228475,16 8,16 C7.44771525,16 7,15.5522847 7,15 L7,14 C7,13.9722556 7.00112987,13.9447751 7.00334609,13.917602 C6.08922816,13.764775 5.24511171,13.4052685 4.52067059,12.8887563 C4.50293273,12.9096644 4.4841979,12.9300157 4.46446609,12.9497475 L3.75735931,13.6568542 C3.36683502,14.0473785 2.73367004,14.0473785 2.34314575,13.6568542 C1.95262146,13.26633 1.95262146,12.633165 2.34314575,12.2426407 L3.05025253,11.5355339 C3.06998434,11.5158021 3.09033559,11.4970673 3.11124369,11.4793294 C2.59473146,10.7548883 2.23522497,9.91077184 2.08239805,8.99665391 C2.05522493,8.99887013 2.02774441,9 2,9 L1,9 C0.44771525,9 2.4125371e-16,8.55228475 3.83475851e-17,8 C-1.6455854e-16,7.44771525 0.44771525,7 1,7 L2,7 C2.02774441,7 2.05522493,7.00112987 2.08239805,7.00334609 C2.23522497,6.08922816 2.59473146,5.24511171 3.11124369,4.52067059 C3.09033559,4.50293273 3.06998434,4.4841979 3.05025253,4.46446609 L2.34314575,3.75735931 C1.95262146,3.36683502 1.95262146,2.73367004 2.34314575,2.34314575 C2.73367004,1.95262146 3.36683502,1.95262146 3.75735931,2.34314575 L4.46446609,3.05025253 C4.4841979,3.06998434 4.50293273,3.09033559 4.52067059,3.11124369 Z M8,9 C7.44771525,9 7,8.55228475 7,8 C7,7.44771525 7.44771525,7 8,7 C8.55228475,7 9,7.44771525 9,8 C9,8.55228475 8.55228475,9 8,9 Z\"\r\n            fill=\"#293040\"\r\n            fill-rule=\"nonzero\"\r\n          ></path>\r\n        </g>\r\n      </svg>\r\n    </div>\r\n    <div *ngIf=\"showConfig\" class=\"devui-config-container\">\r\n      <ng-content></ng-content>\r\n      <div class=\"devui-pagination-config-item devui-page-size-config\" *ngIf=\"canChangePageSize\">\r\n        <div class=\"devui-config-item-title\">{{ i18nText?.pageSize }}</div>\r\n        <div class=\"devui-page-number\">\r\n          <ng-container *ngFor=\"let size of pageSizeOptions\">\r\n            <div class=\"number\" [ngClass]=\"{ choosed: size === pageSize }\" (click)=\"onPageSizeChange(size)\">\r\n              {{ size }}\r\n            </div>\r\n          </ng-container>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}:host{display:block}.devui-pagination{display:flex;align-items:center}.devui-pagination .devui-page-size{display:inline-block;vertical-align:middle;margin:0 8px 0 0;position:relative;height:28px}.devui-pagination .devui-page-size.devui-page-size-sm{height:26px}.devui-pagination .devui-page-size.devui-page-size-lg{height:46px}.devui-pagination .devui-page-size.devui-page-size-lg li a.devui-pagination-link{height:46px;line-height:46px}.devui-pagination .devui-total-size{display:inline-block;position:relative;margin:0 12px 0 0;color:#575d6c;color:var(--devui-text-weak, #575d6c)}.devui-pagination .devui-pagination-list{vertical-align:middle;display:inline-flex;align-items:center}.devui-pagination .devui-pagination-list>.disabled>a,.devui-pagination .devui-pagination-list>.disabled>a:hover,.devui-pagination .devui-pagination-list>.disabled>a:focus{cursor:not-allowed}.devui-pagination .devui-pagination-list li{display:inline}.devui-pagination .devui-pagination-list li.disabled a{color:#cfd0d3;color:var(--devui-disabled-text, #cfd0d3)}.devui-pagination .devui-pagination-list li.disabled a svg g polygon{fill:#cfd0d3;fill:var(--devui-disabled-text, #cfd0d3)}.devui-pagination .devui-pagination-list li.disabled:first-child a,.devui-pagination .devui-pagination-list li.disabled:last-child a{border-color:#dfe1e6;border-color:var(--devui-disabled-line, #dfe1e6)}.devui-pagination .devui-pagination-list li:not(.disabled){cursor:pointer}.devui-pagination .devui-pagination-list li:not(.disabled) a:hover,.devui-pagination .devui-pagination-list li:not(.disabled) span:hover,.devui-pagination .devui-pagination-list li:not(.disabled) a:focus,.devui-pagination .devui-pagination-list li:not(.disabled) span:focus{background-color:#f2f2f3;background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:#252b3a;color:var(--devui-list-item-hover-text, #252b3a);text-decoration:none}.devui-pagination .devui-pagination-list li:not(.disabled) a:active{background-color:#f2f5fc;background-color:var(--devui-list-item-active-bg, #f2f5fc);color:#252b3a;color:var(--devui-list-item-active-text, #252b3a)}.devui-pagination .devui-pagination-list li:not(.disabled).active a{background-color:#f2f5fc;background-color:var(--devui-list-item-active-bg, #f2f5fc);color:#252b3a;color:var(--devui-list-item-active-text, #252b3a);cursor:pointer}.devui-pagination .devui-pagination-list li:not(.disabled).active a:hover{background-color:#f2f5fc;background-color:var(--devui-list-item-active-hover-bg, #f2f5fc);color:#252b3a;color:var(--devui-list-item-active-text, #252b3a)}.devui-pagination .devui-pagination-list li:not(.disabled) a.devui-pagination-link:hover:not(:active) svg g polygon{fill:#252b3a;fill:var(--devui-icon-fill-active-hover, #252b3a)}.devui-pagination .devui-pagination-list li:not(.disabled) a.devui-pagination-link:active svg g polygon{fill:#fff;fill:var(--devui-light-text, #ffffff)}.devui-pagination .devui-pagination-list .devui-pagination-link svg{vertical-align:middle}.devui-pagination .devui-pagination-list .devui-pagination-link svg g polygon{fill:#71757f;fill:var(--devui-icon-text, #71757f)}.devui-pagination .devui-pagination-list .devui-pagination-link-lite{border:1px solid transparent!important;border-radius:2px;border-radius:var(--devui-border-radius, 2px)}.devui-pagination .devui-pagination-list>li>a{margin-left:4px;padding:0 8px;line-height:24px;border-radius:2px;border-radius:var(--devui-border-radius, 2px);color:#575d6c;color:var(--devui-text-weak, #575d6c);display:flex;align-items:center;justify-content:center}.devui-pagination .devui-pagination-sm>li>a{padding:0 4px;min-width:18px;line-height:22px;font-size:12px;font-size:var(--devui-font-size-sm, 12px)}.devui-pagination .devui-pagination-lg>li>a{padding:0 12px;font-size:14px;font-size:var(--devui-font-size-lg, 14px);line-height:38px}.devui-pagination .devui-pagination-list>li:first-child>a,.devui-pagination .devui-pagination-list>li:last-child>a{min-width:34px;height:32px;line-height:32px;padding:0 8px}.devui-pagination .devui-pagination-sm>li:first-child>a,.devui-pagination .devui-pagination-sm>li:last-child>a{border-radius:2px;border-radius:var(--devui-border-radius, 2px);min-width:20px;height:30px;line-height:30px;padding:0 4px}.devui-pagination .devui-pagination-lg>li:first-child>a,.devui-pagination .devui-pagination-lg>li:last-child>a{border-radius:2px;border-radius:var(--devui-border-radius, 2px);min-width:46px;height:46px;line-height:46px;padding:0 16px}.devui-pagination .devui-jump-container{display:inline-flex;position:relative;margin:0 12px;vertical-align:middle;align-items:center}.devui-pagination .devui-jump-container .devui-input{display:inline-block;width:3.5em;vertical-align:middle;margin:0 4px}.devui-pagination .devui-jump-button{display:inline-flex;vertical-align:middle;border-radius:2px;border-radius:var(--devui-border-radius, 2px);border:1px solid #d7d8da;border:1px solid var(--devui-line, #d7d8da);cursor:pointer;margin-left:4px;align-items:center;justify-content:center}.devui-pagination .devui-jump-button .devui-pagination-go{width:0;height:0;border-top-style:solid;border-left-style:solid;border-bottom-style:solid}.devui-pagination .devui-jump-button:hover{border-color:#526ecc;border-color:var(--devui-brand-active, #526ecc)}.devui-pagination .devui-jump-button:hover .devui-pagination-go{border-left-color:#526ecc;border-left-color:var(--devui-brand-active, #526ecc)}.devui-pagination .devui-jump-size-default{width:34px;height:34px}.devui-pagination .devui-jump-size-default .devui-pagination-go{width:0;height:0;border-top:12px solid transparent;border-left:12px solid #71757f;border-left:12px solid var(--devui-icon-text, #71757f);border-bottom:12px solid transparent}.devui-pagination .devui-jump-size-sm{width:24px;height:24px}.devui-pagination .devui-jump-size-sm .devui-pagination-go{width:0;height:0;border-top:6px solid transparent;border-left:6px solid #71757f;border-left:6px solid var(--devui-icon-text, #71757f);border-bottom:6px solid transparent}.devui-pagination .devui-jump-size-sm .devui-pagination-link{height:30px;line-height:32px}.devui-pagination .devui-jump-size-lg{width:46px;height:46px}.devui-pagination .devui-jump-size-lg .devui-pagination-go{width:0;height:0;border-top:16px solid transparent;border-left:16px solid #71757f;border-left:16px solid var(--devui-icon-text, #71757f);border-bottom:16px solid transparent}.devui-pagination .devui-lite-paginator{display:inline-block;margin-right:4px;width:100px;vertical-align:middle}.devui-pagination .devui-pagination-config{color:#252b3a;color:var(--devui-text, #252b3a);position:relative;display:inline-block;vertical-align:middle;margin:0 4px}.devui-pagination .devui-pagination-config .devui-setup-icon{line-height:30px;cursor:pointer;display:flex}.devui-pagination .devui-pagination-config .devui-setup-icon svg g path{fill:#71757f;fill:var(--devui-icon-text, #71757f)}.devui-pagination .devui-pagination-config .devui-config-container{padding:4px 0;box-shadow:0 4px 8px #252b3a33;box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));border-radius:2px;border-radius:var(--devui-border-radius, 2px);width:150px;background-color:#fff;background-color:var(--devui-connected-overlay-bg, #ffffff);line-height:26px;position:absolute;left:-136px;top:28px;cursor:auto;z-index:1052;z-index:var(--devui-z-index-dropdown, 1052);-moz-user-select:none;-webkit-user-select:none;user-select:none}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item.devui-page-size-config{border-bottom:none}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item{padding-bottom:8px;padding-top:4px;border-bottom:1px solid #f2f2f3;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-config-item-title{color:#71757f;color:var(--devui-aide-text, #71757f);padding-left:8px;font-size:12px;font-size:var(--devui-font-size, 12px);line-height:22px}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number{padding-left:8px;margin-top:4px;display:flex;display:-ms-flexbox}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number div{color:#252b3a;color:var(--devui-text, #252b3a);cursor:pointer;border-top:1px solid #d7d8da;border-top:1px solid var(--devui-line, #d7d8da);border-bottom:1px solid #d7d8da;border-bottom:1px solid var(--devui-line, #d7d8da);border-right:1px solid #d7d8da;border-right:1px solid var(--devui-line, #d7d8da);text-align:center;height:26px;width:26px}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number div:hover{background-color:#f2f2f3;background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:#252b3a;color:var(--devui-list-item-hover-text, #252b3a)}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number div:first-child{border-left:1px solid #d7d8da;border-left:1px solid var(--devui-line, #d7d8da)}.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number .devui-page-number div.choosed:not(:hover):not(:active),.devui-pagination .devui-pagination-config .devui-config-container .devui-pagination-config-item .devui-page-number .choosed:not(:hover):not(:active){color:#252b3a;color:var(--devui-list-item-active-text, #252b3a);background-color:#f2f5fc!important;background-color:var(--devui-list-item-active-bg, #f2f5fc)!important;cursor:auto!important}.devui-pagination .devui-pagination-list li a{transition:background-color .3s cubic-bezier(.645,.045,.355,1);transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-pagination-hidden{display:none}:host ::ng-deep .devui-input-sm{height:24px;padding:4px;font-size:12px;font-size:var(--devui-font-size, 12px);line-height:1.5;border-radius:2px;border-radius:var(--devui-border-radius, 2px)}:host ::ng-deep .devui-input-lg{height:46px}.devui-pagination-dropdown-menu{min-width:60px}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.I18nService }]; }, propDecorators: { pageSize: [{
                type: Input
            }], pageSizeOptions: [{
                type: Input
            }], pageSizeDirection: [{
                type: Input
            }], pageIndex: [{
                type: Input
            }], pageIndexChange: [{
                type: Output
            }], pageSizeChange: [{
                type: Output
            }], maxItems: [{
                type: Input
            }], preLink: [{
                type: Input
            }], nextLink: [{
                type: Input
            }], size: [{
                type: Input
            }], canJumpPage: [{
                type: Input
            }], canChangePageSize: [{
                type: Input
            }], canViewTotal: [{
                type: Input
            }], cssClass: [{
                type: Input
            }], showJumpButton: [{
                type: Input
            }], showTruePageIndex: [{
                type: Input
            }], id: [{
                type: Input
            }], totalItemText: [{
                type: Input
            }], goToText: [{
                type: Input
            }], selectDirection: [{
                type: Input
            }], lite: [{
                type: Input
            }], showPageSelector: [{
                type: Input
            }], haveConfigMenu: [{
                type: Input
            }], autoFixPageIndex: [{
                type: Input
            }], autoHide: [{
                type: Input
            }], litePaginator: [{
                type: ViewChild,
                args: ['litePaginator']
            }], dropDownElement: [{
                type: ViewChild,
                args: ['dropDownElement']
            }], total: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 