(function(f){var b=[];b.push('
');b.push(' First');b.push(' ...');b.push(' {{page}}');b.push(' ...'); b.push(' Last');b.push("
");f.component("adv-pagination",{template:b.join(""),data:function(){return{currentPageIndex:1,currentPageSize:10,currentTotalCount:0,pageCount:0,pages:[],windowWidth:window.innerWidth}},props:{pageIndex:{type:Number,"default":1},pageSize:{type:Number,"default":10},totalCount:{type:Number,"default":0}},computed:{halfVissiblePageCount:function(){return Math.floor(this.visiblePageCount/2)},isShowFirst:function(){return this.pageCount<= this.visiblePageCount?!1:this.currentPageIndex>this.halfVissiblePageCount?!0:!1},isShowLast:function(){return this.pageCount<=this.visiblePageCount?!1:this.currentPageIndexe?(d=a-e,c-a<=e&&(d-=e-(c-a))):d=1,c-a<=e||(c=a+e,c-d+1c)this.currentPageIndex=d;for(;d<=c;d++)this.pages.push(d)}},goToFirst:function(){this.currentPageIndex=1;this.$_processPages();this.$emit("index-change",this.currentPageIndex); this.$root.$emit("adv-pagination-index-change",this.currentPageIndex)},goToLast:function(){this.currentPageIndex=this.pageCount;this.$_processPages();this.$emit("index-change",this.currentPageIndex);this.$root.$emit("adv-pagination-index-change",this.currentPageIndex)},goToPage:function(a){1>a||a>this.pageCount||(this.currentPageIndex=a,this.$_processPages(),this.$emit("index-change",this.currentPageIndex),this.$root.$emit("adv-pagination-index-change",this.currentPageIndex))}},watch:{pageIndex:{handler:function(a){a= parseInt(a,10);!isNaN(a)&&-1