(()=>{angular.module("c8y.cockpit.assetcount").factory("assetCount",["c8yInventory","c8yDevices","c8yDeviceStatus","c8yAlarms",function(t,e,n,u){return{totalGroups:function(){return t.getCount({fragmentType:r})},totalDevices:function(){return e.getCount()},online:function(){return e.list({pageSize:1e3}).then(function(t){return _.filter(t,function(t){return n.isDeviceAvailable(t)}).length})},withCritical:function(){return t=u.status.CRITICAL,e=u.status.ACTIVE,u.list({severity:t,status:e,pageSize:1e3}).then(function(t){return _.reduce(t,function(t,e){e=e.source.id;return-1===t.indexOf(e)&&t.push(e),t},[]).length});var t,e}}}]);var r="c8y_IsDeviceGroup"})();