!function(){"use strict";function articleApi(api){return{get:function(articleType,locationId,locationIdToExclude,locationIdForThemeUrl,themeId,themeIdToExclude,authorId,searchText,skipCount,takeCount){return api.get("/api/article/list",{articleType:articleType,authorId:authorId||"",locationId:locationId||"",locationIdToExclude:locationIdToExclude||"",locationIdForThemeUrl:locationIdForThemeUrl||"",themeId:themeId||"",themeIdToExclude:themeIdToExclude||"",searchText:searchText||"",skipCount:skipCount,takeCount:takeCount})},getCount:function(articleType,searchText){return api.get("/api/article/count",{articleType:articleType,searchText:searchText||""})}}}angular.module("app").factory("articleApi",articleApi),articleApi.$inject=["cshApi"]}(),function(){"use strict";function articleListCtrl(articleListService){var vm=this;vm.init=articleListService.init,vm.loadMore=function(){return articleListService.loadMore().then((function(data){return vm._showInitialArticles=!1,vm.eof=articleListService.eof,!vm.eof}))},vm.items=articleListService.items,vm.sections=articleListService.sections,vm._showInitialArticles=!0,vm.showInitialArticles=function(){if(!vm._showInitialArticles)return!1;for(var i=0;i=service.sections.length)return service.eof=!0,util.promiseResolvedWith([]);_.pageNumber+=1;var sessionNumber=_.sessionNumber,section=service.sections[index],themeId=_.searchText?null:section.themeId,themeIdToExclude=_.searchText?null:section.themeIdToExclude;return api.get(_.articleType,section.locationId,section.locationIdToExclude,service.sections[0].locationId,themeId,themeIdToExclude,section.authorId,_.searchText,_.pageNumber*_.pageSize,_.pageSize).then((function(data){if(sessionNumber<_.sessionNumber)return[];service.sections[index].items=service.sections[index].items||[];for(var i=0;i