1import{jc as b}from"./chunk-N7KTQTKB.js";import{e as g,n as v,t as h,z as _}from"./chunk-UGMVLOKV.js";import{Fb as n,Gb as o,Hb as l,Ib as u,Ta as x,Vb as f,Xa as s,fb as a,ha as I,ic as y,jc as S,lb as p,lc as U,qb as d,ra as c}from"./chunk-MBQH3G52.js";function T(r,t){r&1&&(I(),o(0,"svg",3),u(1,"path",4),l())}function P(r,t){if(r&1&&u(0,"img",5),r&2){let e=f();n("src",e.image(),x)}}var C=class r{constructor(t,e,i){this.http=t;this.sanitizer=e;this.userService=i}user;image=c(void 0);char;ngOnInit(){if(this.user&&!this.image()){let t=this.user.data?.id??this.user.data?.userId??this.user.data?.userPrincipalName??this.user.user_id??this.user.id??this.user.userPrincipalName,e=this.userService.userObj()[t]||this.user,i=e.image||e.data?.image||this.userService.userImages()[t];i?this.image.set(i):(this.char=(e?.data?.givenName||e?.data?.email||e?.data?.given_name||e?.given_name||e?.email||e?.userPrincipalName||e?.givenName||"")[0]?.toUpperCase(),this.userService.userImages()[t]||this.loadImage(t))}}loadImage(t){if(console.log("loadImage",t),t){if(this.userService.userImages()[t]){this.image.set(this.userService.userImages()[t]);return}let e="https://graph.microsoft.com/v1.0/users/"+t+"/photo/$value";this.http.get(e,{responseType:"blob"}).subscribe(i=>{let m=window.URL.createObjectURL(i);this.image.set(this.sanitizer.bypassSecurityTrustUrl(m)),this.userService.setUserImage(t,this.image())})}}static \u0275fac=function(e){return new(e||r)(a(h),a(_),a(b))};static \u0275cmp=p({type:r,selectors:[["lib-user-image"]],inputs:{user:"user"},decls:3,vars:2,consts:[[1,"w-full","h-full","bg-gray-100","userCircle","dark:bg-gray-800","fxCenter"],["class","h-[60%] color-black","viewBox","0 0 24 24","fill","currentColor",4,"ngIf"],["class","w-full h-auto","alt","User",3,"src",4,"ngIf"],["viewBox","0 0 24 24","fill","currentColor",1,"h-[60%]","color-black"],["fill-rule","evenodd","d","M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z","clip-rule","evenodd"],["alt","User",1,"w-full","h-auto",3,"src"]],template:function(e,i){e&1&&(o(0,"div",0),d(1,T,2,0,"svg",1)(2,P,1,1,"img",2),l()),e&2&&(s(),n("ngIf",!i.image()),s(),n("ngIf",i.image()))},dependencies:[v,g],styles:["svg[_ngcontent-%COMP%]{margin:0!important}"]})};function z(r,t){if(r&1&&(o(0,"span",2)(1,"span",3),y(2),l(),o(3,"span",4),y(4),l()()),r&2){let e,i,m=f();s(2),U("",(e=m.data())==null?null:e.givenName," ",(e=m.data())==null?null:e.surname),s(2),S((i=m.data())==null?null:i.userPrincipalName)}}function H(r,t){r&1&&(o(0,"div",5)(1,"div",6)(2,"div",7),u(3,"div",8)(4,"div",9),l()()())}var D=class r{constructor(t,e){this.http=t;this.userService=e}user;data=c(null);ngOnInit(){if(this.user&&typeof this.user=="string"){this.loadData(this.user);return}}loadData(t){if(t){if(this.userService.userObj()[t]){this.data.set(this.userService.userObj()[t]);return}let e="https://graph.microsoft.com/v1.0/users/"+t;this.http.get(e).subscribe(i=>{this.userService.setUserObj([i]),this.data.set(i)})}}static \u0275fac=function(e){return new(e||r)(a(h),a(b))};static \u0275cmp=p({type:r,selectors:[["lib-user-details"]],inputs:{user:"user"},decls:2,vars:2,consts:[["class","flex flex-col items-start flex-1 min-w-0","style","line-height: 1;",4,"ngIf"],["class","mx-auto w-full max-w-sm",4,"ngIf"],[1,"flex","flex-col","items-start","flex-1","min-w-0",2,"line-height","1"],[1,"w-full","text-sm","font-semibold","leading-4","text-left","truncate","color-black"],[1,"w-full","text-xs","font-semibold","leading-4","text-left","truncate","color-gray"],[1,"mx-auto","w-full","max-w-sm"],[1,"flex","animate-pulse","space-x-4"],[1,"flex-1","space-y-1"],[1,"h-4","rounded","bg-gray-200"],[1,"h-3","rounded","bg-gray-200"]],template:function(e,i){e&1&&d(0,z,5,3,"span",0)(1,H,5,0,"div",1),e&2&&(n("ngIf",i.data()),s(),n("ngIf",!i.data()))},dependencies:[v,g],encapsulation:2})};export{C as a,D as b};
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.