1import{a as se}from"./chunk-JPRQJCAR.js";import{a as me}from"./chunk-CXACER6L.js";import{a as le}from"./chunk-6W3BC7VQ.js";import{a as T,b as oe,c as re}from"./chunk-XUMMQMK7.js";import{a as y,b as ne}from"./chunk-WBP73L23.js";import"./chunk-JYTLMDS2.js";import{a as q}from"./chunk-JDED4XNO.js";import{a as V,b as W,c as G,d as J,e as K,f as X,g as Y,h as Z,i as ee,j as te,k as ie,l as ae}from"./chunk-EHSKWIZA.js";import{a as N}from"./chunk-5XJN6G4E.js";import"./chunk-ETTGII3S.js";import"./chunk-EFFKYZ4R.js";import"./chunk-S3OUMWH4.js";import{a as j,b as k}from"./chunk-FHSHMNFM.js";import"./chunk-BR7SVKEQ.js";import"./chunk-FBPQG6MS.js";import"./chunk-HYC3WGKD.js";import"./chunk-2PPFUFFT.js";import{a as Q,b as B}from"./chunk-7OXH5EWV.js";import"./chunk-FTXGPRFJ.js";import"./chunk-BRRFPLOY.js";import"./chunk-HGFVTFKX.js";import{Bc as H,C as R,Fc as D,Gc as x,Ib as p,Kb as I,Pb as b,T as z,U as $,Ub as o,V as h,Vb as n,Wb as d,Xb as c,Yb as u,dc as L,f as S,gb as l,kc as v,l as U,lb as C,lc as M,mc as w,p as A,pd as P,qc as m,rc as f,sb as _,sd as O,yb as s,yd as F,z as E}from"./chunk-EL2YAQZX.js";import"./chunk-EQDQRRRY.js";var ce=e=>({display:e});function ue(e,i){e&1&&(o(0,"th",16),m(1,"Name"),n())}function fe(e,i){if(e&1&&(o(0,"td",17)(1,"span",18),m(2),n()()),e&2){let t=i.$implicit;l(2),f(t.name)}}function he(e,i){e&1&&(o(0,"th",19),m(1,"Type"),n())}function ge(e,i){if(e&1&&(o(0,"td",20)(1,"app-badge",21),m(2),n()()),e&2){let t=i.$implicit;l(2),f(t.type)}}function Se(e,i){e&1&&(o(0,"th",22),m(1,"Size"),n())}function Ce(e,i){if(e&1&&(o(0,"td",20)(1,"span",23),m(2),D(3,"size"),n()()),e&2){let t=i.$implicit;l(2),f(x(3,1,t.size))}}function _e(e,i){e&1&&(o(0,"th",22)(1,"mat-icon",24),m(2,"download"),n()())}function be(e,i){if(e&1&&(o(0,"td",20)(1,"span",23),m(2),n()()),e&2){let t=i.$implicit;l(2),f(t.downloads)}}function ye(e,i){e&1&&(o(0,"th",22)(1,"mat-icon",25),m(2,"calendar_month"),n()())}function Te(e,i){if(e&1&&(o(0,"td",20)(1,"span",23),m(2),D(3,"date"),n()()),e&2){let t=i.$implicit;l(2),f(x(3,1,t.created))}}function ve(e,i){e&1&&d(0,"tr",26)}function Me(e,i){e&1&&d(0,"tr",27)}function we(e,i){e&1&&(o(0,"app-card")(1,"p",28),m(2,"No files found for this user"),n()())}var pe=(()=>{class e{constructor(t){this.service=t,this.dataSource=new ae,this.resultsLength=0,this.isLoadingResults=!0,this.displayedColumns=["name","type","size","downloads","created"],this.pageSize=25,this.pageSizeOptions=[10,25,50,100],this.destroy$=new S}ngAfterViewInit(){this.load(),this.sort.sortChange.pipe(h(this.destroy$)).subscribe(()=>this.paginator.pageIndex=0)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}load(){E(this.sort.sortChange,this.paginator.page).pipe(z({}),$(()=>(this.isLoadingResults=!0,this.service.getUserFiles(this.email,{page:this.paginator.pageIndex,pageSize:this.paginator.pageSize,active:this.sort.active,direction:this.sort.direction}).pipe(R(()=>U(null))))),A(t=>(this.isLoadingResults=!1,t?(this.resultsLength=t.totalCount,t.items):(this.resultsLength=0,[]))),h(this.destroy$)).subscribe(t=>{this.dataSource.data=t??[]})}static{this.\u0275fac=function(r){return new(r||e)(C(me))}}static{this.\u0275cmp=_({type:e,selectors:[["app-admin-user-storage-table"]],viewQuery:function(r,a){if(r&1&&(v(T,5),v(y,5)),r&2){let g;M(g=w())&&(a.sort=g.first),M(g=w())&&(a.paginator=g.first)}},inputs:{email:"email"},decls:22,vars:12,consts:[[1,"px-0",3,"ngStyle"],[1,"overflow-x-auto"],["mat-table","","matSort","","matSortActive","created","matSortStart","desc","matSortDisableClear","","matSortDirection","desc",1,"w-full","-mt-[17px]","transition-opacity","duration-500","ease-in-out",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","class","!pl-6",4,"matHeaderCellDef"],["mat-cell","","class","!pl-6",4,"matCellDef"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","size"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","downloads"],["matColumnDef","created"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","hover:bg-[#2b2b2b]",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",1,"pt-2",3,"length","pageSize","pageSizeOptions"],["mat-header-cell","",1,"!pl-6"],["mat-cell","",1,"!pl-6"],[1,"text-white"],["mat-header-cell",""],["mat-cell",""],["variant","primary"],["mat-header-cell","","mat-sort-header",""],[1,"text-gray-400"],["matTooltip","Downloads","matTooltipClass","tooltip","matTooltipPosition","above"],["matTooltip","Uploaded on","matTooltipClass","tooltip","matTooltipPosition","above"],["mat-header-row",""],["mat-row","",1,"hover:bg-[#2b2b2b]"],[1,"text-gray-400","text-center","py-8"]],template:function(r,a){r&1&&(o(0,"app-card",0)(1,"div",1)(2,"table",2),c(3,3),s(4,ue,2,0,"th",4)(5,fe,3,1,"td",5),u(),c(6,6),s(7,he,2,0,"th",7)(8,ge,3,1,"td",8),u(),c(9,9),s(10,Se,2,0,"th",10)(11,Ce,4,3,"td",8),u(),c(12,11),s(13,_e,3,0,"th",10)(14,be,3,1,"td",8),u(),c(15,12),s(16,ye,3,0,"th",10)(17,Te,4,3,"td",8),u(),s(18,ve,1,0,"tr",13)(19,Me,1,0,"tr",14),n()(),d(20,"mat-paginator",15),n(),s(21,we,3,0,"app-card")),r&2&&(p("ngStyle",H(10,ce,a.resultsLength>0?"block":"none")),l(2),I("opacity-50",a.isLoadingResults),p("dataSource",a.dataSource),l(16),p("matHeaderRowDef",a.displayedColumns),l(),p("matRowDefColumns",a.displayedColumns),l(),p("length",a.resultsLength)("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions),l(),b(a.resultsLength===0&&!a.isLoadingResults?21:-1))},dependencies:[ie,V,G,Y,J,W,Z,K,X,ee,te,F,P,O,ne,y,N,B,Q,re,T,oe,k,j,q,se],encapsulation:2})}}return e})();function De(e,i){if(e&1&&d(0,"app-admin-user-storage-table",0),e&2){let t=L();p("email",t.user.email)}}var Ge=(()=>{class e{constructor(t){this.userState=t,this.user=null,this.destroy$=new S}ngOnInit(){this.userState.user$.pipe(h(this.destroy$)).subscribe(t=>{this.user=t})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(r){return new(r||e)(C(le))}}static{this.\u0275cmp=_({type:e,selectors:[["app-admin-user-storage-tab"]],decls:1,vars:1,consts:[[3,"email"]],template:function(r,a){r&1&&s(0,De,1,1,"app-admin-user-storage-table",0),r&2&&b(a.user?0:-1)},dependencies:[pe],encapsulation:2})}}return e})();export{Ge as AdminUserStorageTabComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.