(()=>{function t(c,i){var l={seconds:"s",minutes:"m",hours:"h"};return function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"{{value}} {{unit}}",n=c(n),o=Math.floor(t/86400),r=moment.utc(1e3*t).format("HH:mm"),e=Math.floor(t/3600),u=Math.floor((t-3600*e)/60),t=Math.floor(t-3600*e-60*u),a=((t,n)=>{var o=i.getString("seconds");return 0<t?o=i.getString("hours"):g(t,n)&&(o=i.getString("minutes")),o})(e,u);return n({d:o,HHmm:r,h:e,m:u,s:t,u:l[a],value:((t,n,o)=>(t=>0<t?"".concat(m(t),":"):"")(t)+((t,n)=>g(t,n)?"".concat(m(n),":"):"")(t,n)+((t,n,o)=>g(t,n)?m(o):o)(t,n,o))(e,u,t),time:"".concat(m(e),":").concat(m(u),":").concat(m(t)),unit:a})};function m(t){return 10<=t?t:"0".concat(t)}function g(t,n){return 0<t||0<n}}t.$inject=["$interpolate","gettextCatalog"],angular.module("c8y.ui").filter("duration",t)})();