import{yc as i,zc as m}from"./chunk-BPZQKZKD.js";import{G as s,be as w,na as l,ta as u}from"./chunk-WL5U2YIT.js";import{e as d}from"./chunk-ADEKKGI2.js";var h,f=d(()=>{m();l();w();h=(()=>{let r=class r{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 n=o.find(a=>a&&a.extensions.includes(e));return n?n.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),n=document.createElement("a");document.body.appendChild(n),n.href=e,n.download=o,n.click(),setTimeout(function(){window.URL.revokeObjectURL(e)},100),document.body.removeChild(n)}}viewFile(t,o,e){window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(t,o):(e.location=window.URL.createObjectURL(t),s(500).subscribe(a=>{try{e.location.protocol==="about:"&&e.close()}catch{return}}))}};r.\u0275fac=function(o){return new(o||r)},r.\u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"});let c=r;return c})()});export{h as a,f as b};
