import{sc as i,tc as w}from"./chunk-GDJMZZ4C.js";import{G as a,Rd as l,ma as d,sa as s}from"./chunk-4HFZZ7HS.js";import{e as u}from"./chunk-SZAW6ZBW.js";var b,m=u(()=>{w();d();l();b=(()=>{class n{getFileNameWithoutExtension(t){if(!t)return"";let o=t.lastIndexOf(".");return o===-1?t:t.substr(0,o)}getFileExtension(t){if(!t)return"";let o=t.lastIndexOf(".");return o===-1?t:t.slice(o)}getFileType(t,o){if(!t)return i.Default;let e=t.split(".").pop().toLocaleLowerCase();if(e===t)return i.Default;let r=o.find(c=>c&&c.extensions.includes(e));return r?r.key:i.Default}getHumanFriendlyFileSize(t){if(t==null)return"n/a";if(t===0)return"0";let o=-1,e=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do t=t/1024,o++;while(t>1024);return Math.max(t,.1).toFixed(1)+e[o]}downloadFile(t,o){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,o);else{let e=window.URL.createObjectURL(t),r=document.createElement("a");document.body.appendChild(r),r.href=e,r.download=o,r.click(),setTimeout(function(){window.URL.revokeObjectURL(e)},100),document.body.removeChild(r)}}viewFile(t,o,e){window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(t,o):(e.location=window.URL.createObjectURL(t),a(500).subscribe(c=>{try{e.location.protocol==="about:"&&e.close()}catch{return}}))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()});export{b as a,m as b};
