(()=>{function e(t,n,c){var e=[];return{parsers:e,parseFile:function(r){return(t=>_.reduce(e,function(e,r){return e.then(function(e){return e||n.resolve(r.doesSupportFile(t)).then(function(e){return e?r:void 0},function(){})})},n.resolve()))(r).then(function(e){return e?n.resolve(e.parseFile(r)).then(function(e){return t.isDeviceTypeSupported(e.deviceType)?e:n.reject({feedback:{type:"error",summary:c("Unsupported device type.")}})}):n.reject({feedback:{type:"error",summary:c("Unsupported file format.")}})})}}}e.$inject=["c8yDeviceDatabase","$q","gettext"],angular.module("c8y.deviceDatabase4").factory("c8yDeviceTypeParser",e)})();