module.exports=(()=>{"use strict";var t={512:(t,e,r)=>{function n(t,e){if(void 0!==e)return t(e)}function i(t){return t}function o(t,e,r){return void 0===t?e:void 0===e?t:r(t,e)}var a,u;r.r(e),r.d(e,{StorageStatisticsSegmentDto:()=>a,UploadStatisticsCalculator:()=>C,UploadStatisticsDto:()=>u}),function(t){t.empty={firstFileCreated:void 0,lastFileCreated:void 0,totalFileCount:0,totalFileSize:0},t.combine=function(t,e){return{firstFileCreated:n(i,o(t.firstFileCreated,e.firstFileCreated,Math.min)),lastFileCreated:n(i,o(t.lastFileCreated,e.lastFileCreated,Math.max)),totalFileCount:t.totalFileCount+e.totalFileCount,totalFileSize:t.totalFileSize.valueOf()+e.totalFileSize.valueOf()}}}(a||(a={})),function(t){t.empty={all:a.empty,mime:{audio:a.empty,image:a.empty,video:a.empty,document:a.empty,other:a.empty}},t.combine=function(t,e){return{all:a.combine(t.all,e.all),mime:{audio:a.combine(t.mime.audio,e.mime.audio),image:a.combine(t.mime.image,e.mime.image),video:a.combine(t.mime.video,e.mime.video),document:a.combine(t.mime.document,e.mime.document),other:a.combine(t.mime.other,e.mime.other)}}}}(u||(u={}));const l=require("ramda/es/pipe");var m=r.n(l);const c=require("ramda/es/map");var f=r.n(c);const d=require("ramda/es/groupBy");var s=r.n(d);const p=require("ramda/es/sum");var y=r.n(p);function v(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw o}}return r}}(t,e)||g(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(t,e):void 0}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var F=Object.entries({audio:function(t){return t.mime.startsWith("audio/")},image:function(t){return t.mime.startsWith("image/")},video:function(t){return t.mime.startsWith("video/")},document:function(t){return["application/x-abiword","application/msword","application/vnd.ms-","application/vnd.openxmlformats","application/vnd.oasis.opendocument","application/pdf"].some((function(e){return t.mime.startsWith(e)}))}}).map((function(t){var e=h(t,2);return[e[0],e[1]]})),C=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"calculateStatistics",value:function(t,e){var r=function(t){return{firstFileCreated:Math.min.apply(Math,v(t.map((function(t){return t.created})))),lastFileCreated:Math.max.apply(Math,v(t.map((function(t){return t.created})))),totalFileCount:e*t.length,totalFileSize:e*y()(t.map((function(t){return t.size})))}},n=s()((function(t){var e=F.find((function(e){var r=h(e,2);return r[0],(0,r[1])(t)}));return void 0!==e?e[0]:"other"})),i=f()((function(t){return r((e=t,function(t,e){if(!(e.length>0))throw t;return e}(new Error("Expected array to be non-empty, but it was not."),e)));var e})),o=m()(n,i)(t);return{all:r(t),mime:Object.assign(Object.assign({},u.empty.mime),o)}}}],null&&b(e.prototype,null),r&&b(e,r),t}()}},e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}return r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(512)})();