text: /**
   * vue-paginate v3.6.0
   * (c) 2018 Taha Shashtari
   * @license MIT
   */
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VuePaginate=e()}(this,function(){"use strict";function t(t,e){return(t.showStepLinks?[t.stepLinks.prev].concat(t.listOfPages,[t.stepLinks.next]):t.listOfPages).map(function(n){var i={on:{click:function(e){e.preventDefault(),t.currentPage=r(n,t.limit,t.currentPage,t.listOfPages,t.stepLinks)}}},s=a(n,t.currentPage,t.listOfPages.length-1,t.stepLinks),u=n===t.stepLinks.next||n===t.stepLinks.prev?n:n+1;return e("li",{class:s},[e("a",i,u)])})}function e(t,e){var n=new m(t.listOfPages,t.currentPage,t.limit,t.stepLinks).generate();n=t.showStepLinks?[t.stepLinks.prev].concat(n,[t.stepLinks.next]):n;var i=u(n);return n.map(function(n,s){var u={on:{click:function(e){e.preventDefault(),t.currentPage=r(n,t.limit,t.currentPage,t.listOfPages,t.stepLinks,i[s])}}},o=a(n,t.currentPage,t.listOfPages.length-1,t.stepLinks),l=n===parseInt(n,10)?n+1:n;return e("li",{class:o},[e("a",u,l)])})}function n(t,e){var n=t.listOfPages.length-1,i={on:{click:function(e){e.preventDefault(),t.currentPage>0&&(t.currentPage-=1)}}},s={on:{click:function(e){e.preventDefault(),t.currentPage<n&&(t.currentPage+=1)}}},a={class:["next",t.currentPage>=n?"disabled":""]};return[e("li",{class:["prev",t.currentPage<=0?"disabled":""]},[e("a",i,t.simple.prev)]),e("li",a,[e("a",s,t.simple.next)])]}function i(t,e){return t.filter(function(t){return"paginate"===t.$vnode.componentOptions.tag}).find(function(t){return t.name===e})}function s(t){return Array.apply(null,{length:t}).map(function(t,e){return e})}function a(t,e,n,i){var s=i.prev,a=i.next,r=[];return t===s?r.push("left-arrow"):t===a?r.push("right-arrow"):t===d?r.push("ellipses"):r.push("number"),t===e&&r.push("active"),t===s&&e<=0?r.push("disabled"):t===a&&e>=n&&r.push("disabled"),r}function r(t,e,n,i,s,a){var r=s.prev,u=s.next;void 0===a&&(a=null);var o=Math.floor(n/e);if(t===r)return n-1<0?0:n-1;if(t===u)return n+1>i.length-1?i.length-1:n+1;if(a&&"right-ellipses"===a)return(o+1)*e;if(a&&"left-ellipses"===a){var l=i.slice(o*e,o*e+e);return n===i.length-1&&1===l.length&&o--,(o-1)*e+e-1}return t}function u(t){return t.map(function(e,n){return e===d&&0===t[n-1]?"left-ellipses":e===d&&0!==t[n-1]?"right-ellipses":e})}function o(t,e){Object.keys(e).forEach(function(n){if("ul"===n){var i=e.ul;Array.isArray(i)?i.forEach(function(e){return t.classList.add(e)}):t.classList.add(i)}t.querySelectorAll(n).forEach(function(t){var i=e[n];Array.isArray(i)?i.forEach(function(e){return t.classList.add(e)}):t.classList.add(i)})})}function l(t){return void 0===t&&(t=[]),t.reduce(function(t,e){return t[e]={list:[],page:0},t},{})}var p,h=function(){},c="undefined"!=typeof console;h=function(t,e,n){void 0===n&&(n="error"),c&&console[n]("[vue-paginate]: "+t+" "+(e?f(p(e)):""))},p=function(t){if(t.$root===t)return"root instance";var e=t._isVue?t.$options.name||t.$options._componentTag:t.name;return(e?"component <"+e+">":"anonymous component")+(t._isVue&&t.$options.__file?" at "+t.$options.__file:"")};var f=function(t){return"anonymous component"===t&&(t+=' - use the "name" option for better debugging messages.'),"\n(found in "+t+")"},g={name:"paginate",props:{name:{type:String,required:!0},list:{type:Array,required:!0},per:{type:Number,default:3,validator:function(t){return t>0}},tag:{type:String,default:"ul"},container:{type:Object,default:null}},data:function(){return{initialListSize:this.list.length}},computed:{parent:function(){return this.container?this.container:this.$parent},currentPage:{get:function(){if(this.parent.paginate[this.name])return this.parent.paginate[this.name].page},set:function(t){this.parent.paginate[this.name].page=t}},pageItemsCount:function(){var t=this.list.length;return this.currentPage*this.per+1+"-"+Math.min(this.currentPage*this.per+this.per,t)+" of "+t},lastPage:function(){return Math.ceil(this.list.length/this.per)}},mounted:function(){if(this.per<=0&&h('<paginate name="'+this.name+"\"> 'per' prop can't be 0 or less.",this.parent),!this.parent.paginate[this.name])return void h("'"+this.name+"' is not registered in 'paginate' array.",this.parent);this.paginateList()},watch:{currentPage:function(){this.paginateList()},list:function(){this.currentPage>=this.lastPage&&this.lastPage>0?this.currentPage=this.lastPage-1:this.currentPage=0,this.paginateList()},per:function(){this.currentPage=0,this.paginateList()}},methods:{paginateList:function(){var t=this.currentPage*this.per,e=this.list.slice(t,t+this.per);this.parent.paginate[this.name].list=e},goToPage:function(t){var e=Math.ceil(this.list.length/this.per);if(t>e)return void h("You cannot go to page "+t+". The last page is "+e+".",this.parent);this.currentPage=t-1}},render:function(t){return t(this.tag,{},this.$slots.default)}},d="…",m=function(t,e,n){this.listOfPages=t,this.lastPage=t.length-1,this.currentPage=e===this.lastPage?this.lastPage-1:e,this.limit=n};m.prototype.generate=function(){var t=this._buildFirstHalf(),e=this._buildSecondHalf();return t.concat(e)},m.prototype._buildFirstHalf=function(){var t=this._allPagesButLast().slice(this._currentChunkIndex(),this._currentChunkIndex()+this.limit);return this.currentPage>=this.limit&&(t.unshift(d),t.unshift(0)),this.lastPage-this.limit>this._currentChunkIndex()&&t.push(d),t},m.prototype._buildSecondHalf=function(){return[this.lastPage]},m.prototype._currentChunkIndex=function(){return Math.floor(this.currentPage/this.limit)*this.limit},m.prototype._allPagesButLast=function(){var t=this;return this.listOfPages.filter(function(e){return e!==t.lastPage})};var P={name:"paginate-links",props:{for:{type:String,required:!0},limit:{type:Number,default:0},simple:{type:Object,default:null,validator:function(t){return t.prev&&t.next}},stepLinks:{type:Object,default:function(){return{prev:"«",next:"»"}},validator:function(t){return t.prev&&t.next}},showStepLinks:{type:Boolean},hideSinglePage:{type:Boolean},classes:{type:Object,default:null},async:{type:Boolean,default:!1},container:{type:Object,default:null}},data:function(){return{listOfPages:[],numberOfPages:0,target:null}},computed:{parent:function(){return this.container?this.container.el:this.$parent},state:function(){return this.container?this.container.state:this.$parent.paginate[this.for]},currentPage:{get:function(){if(this.state)return this.state.page},set:function(t){this.state.page=t}}},mounted:function(){var t=this;this.simple&&this.limit&&h('<paginate-links for="'+this.for+"\"> 'simple' and 'limit' props can't be used at the same time. In this case, 'simple' will take precedence, and 'limit' will be ignored.",this.parent,"warn"),this.simple&&!this.simple.next&&h('<paginate-links for="'+this.for+"\"> 'simple' prop doesn't contain 'next' value.",this.parent),this.simple&&!this.simple.prev&&h('<paginate-links for="'+this.for+"\"> 'simple' prop doesn't contain 'prev' value.",this.parent),this.stepLinks&&!this.stepLinks.next&&h('<paginate-links for="'+this.for+"\"> 'step-links' prop doesn't contain 'next' value.",this.parent),this.stepLinks&&!this.stepLinks.prev&&h('<paginate-links for="'+this.for+"\"> 'step-links' prop doesn't contain 'prev' value.",this.parent),this.$nextTick(function(){t.updateListOfPages()})},watch:{state:{handler:function(){this.updateListOfPages()},deep:!0},currentPage:function(t,e){this.$emit("change",t+1,e+1)}},methods:{updateListOfPages:function(){if(this.target=i(this.parent.$children,this.for),!this.target){if(this.async)return;return h('<paginate-links for="'+this.for+'"> can\'t be used without its companion <paginate name="'+this.for+'">',this.parent),void h('To fix that issue you may need to use :async="true" on <paginate-links> component to allow for asyncronous rendering',this.parent,"warn")}this.numberOfPages=Math.ceil(this.target.list.length/this.target.per),this.listOfPages=s(this.numberOfPages)}},render:function(i){var s=this;if(!this.target&&this.async)return null;var a=this.simple?n(this,i):this.limit>1?e(this,i):t(this,i);if(this.hideSinglePage&&this.numberOfPages<=1)return null;var r=i("ul",{class:["paginate-links",this.for]},a);return this.classes&&this.$nextTick(function(){o(r.elm,s.classes)}),r}},v={};return v.install=function(t){t.mixin({created:function(){"undefined"!==this.paginate&&this.paginate instanceof Array&&(this.paginate=l(this.paginate))},methods:{paginated:function(t){return this.paginate&&this.paginate[t]?this.paginate[t].list:void h("'"+t+"' is not registered in 'paginate' array.",this)}}}),t.component("paginate",g),t.component("paginate-links",P)},"undefined"!=typeof window&&window.Vue&&window.Vue.use(v),v});