1import{T as I}from"./TIIconDefaultBy4qT9Q2.js";import{P}from"./PublishedCollectionsByUserC1JbHyjy.js";import{m as w}from"./main.mixinBLnF4qNw.js";import{an as k,ax as C,_ as R}from"./chunkReloadRecoveryrjuMb-b8.js";import{P as D}from"./ProfileImageDs00sQxK.js";import{d as T,a4 as a,f as h,o as s,w as p,b as i,z as l,e as o,l as n,k as d,j as m,F as B,q as U}from"./vue-runtimeBHGad_ZB.js";import"./flickingArrowsDKnYXOiB.js";import"./OperationQueueKzEpmh-u.js";import"./item-name.utilsBH3paGZr.js";import"./dexie2jmnBxhj.js";import"./item.typesx7Q7rrX9.js";import"./content.typesyje91KzF.js";import"./constantsDW26WJ6H.js";import"./extraction.pure.utilsDQPW8yIh.js";import"./url.utils3SlYVg-c.js";import"./refresh.storeCM69jM7x.js";import"./file_utilsBvAXo0vA.js";import"./agentParentalGrantCz4Xs1Ac.js";import"./trackCl4T-c2s.js";import"./common.storeDJ22K8d0.js";import"./adminsite.storeDFHoYU-A.js";import"./modal.mixinD4dgi5bV.js";import"./browserTabsCpW6SD42.js";import"./scopedSettings39hV2RLq.js";import"./subscription.storeCcIX6Rgu.js";import"./bootstrap-vue-nextDXY4qsO1.js";import"./cjs-helpersC4iS2aBk.js";const M=T({name:"UserProfile",mixins:[w],components:{TIIconDefault:I,ProfileImage:D,PublishedCollectionsByUser:P},data(){return{publicId:null,errorMessage:null,loading:!0,profile:null,collections:[],reviews:[],loadingReviews:!0,moreReviews:!1}},mounted(){},computed:{hasActiveProfile(){return this.profile&&this.profile.enabled},hasPublicProfileImage(){var e,t;return((t=(e=this.profile)==null?void 0:e.profileImage)==null?void 0:t.filename)!=null}},methods:{prettyTime:C,dateToMDYFormat:k,async loadData(){this.loading=!0,await this.loadPublicUser(),await this.loadReviews(),this.loading=!1},async loadPublicUser(){try{const e=await this.typedSendReq("/user/public/get",{id:this.publicId});this.profile=e.result}catch(e){console.error("Error:",e.message),this.errorMessage=e.message}},async loadReviews(){this.loadingReviews=!0;try{const e=await this.typedSendReq("/published/reviewsByUser",{userId:this.publicId});this.reviews=e.result}catch(e){console.error("Error:",e.message),this.errorMessage=e.message}this.loadingReviews=!1}},created(){this.publicId=this.$route.params.userId,this.loadData()}}),N={key:0},$={class:"ms-1 h3 d-flex flex-gap-1 align-items-center"},A=["src"],F={class:"d-flex align-items-center"},V={class:"mt-1 text-muted small"},q={key:0},E={key:1},S={key:0,class:"mt-2 mb-4"},Y={class:"row mt-3"},j={class:"col"},z={key:1,class:"row mt-4"},J={class:"col"},L={class:"ms-2 mt-3"},W={class:"small text-muted"},G={class:"small"},H={key:1};function K(e,t,O,Q,X,Z){const b=a("b-icon"),u=a("router-link"),v=a("PublishedCollectionsByUser"),g=a("b-rating"),y=a("b-container");return s(),h(y,{class:"container && profile mt-3"},{default:p(()=>{var c,f;return[!e.loading&&e.hasActiveProfile&&e.publicId?(s(),i("div",N,[o("div",$,[o("div",null,[e.hasPublicProfileImage?(s(),i("img",{key:0,class:"profileImageContainer",src:e.getImagePathWithDefault((f=(c=e.profile)==null?void 0:c.profileImage)==null?void 0:f.filename)},null,8,A)):(s(),h(b,{key:1,class:"h1",icon:"person"}))]),o("div",null,n(e.profile.username),1)]),o("div",F,[o("div",V,[d(" Joined in "+n(e.dateToMDYFormat(e.profile.createdAt,!0))+" ",1),e.profile.curator?(s(),i("span",q,[t[1]||(t[1]=d(", ",-1)),m(u,{to:"/curationInfo",title:"This member has been approved for content curation."},{default:p(()=>[...t[0]||(t[0]=[d(" Curator",-1)])]),_:1})])):l("",!0),e.profile.verifiedType==="contributor"?(s(),i("span",E,[...t[2]||(t[2]=[d(", ",-1),o("span",{title:"Invited to publish collections"},"Contributor",-1)])])):l("",!0)])]),e.profile.about?(s(),i("div",S,n(e.profile.about),1)):l("",!0),t[7]||(t[7]=o("hr",null,null,-1)),o("div",Y,[o("div",j,[t[3]||(t[3]=o("div",{class:"d-flex justify-content-between align-items-center flex-wrap"},[o("h5",{class:"mb-0"},"Collections")],-1)),t[4]||(t[4]=o("div",{class:"mt-3"},null,-1)),m(v,{publicId:e.publicId},null,8,["publicId"])])]),e.reviews.length>0?(s(),i("div",z,[t[6]||(t[6]=o("hr",null,null,-1)),o("div",J,[t[5]||(t[5]=o("h5",null,"Reviews",-1)),o("div",L,[(s(!0),i(B,null,U(e.reviews,(r,_)=>(s(),i("div",{key:_},[o("div",null,[o("div",W,n(e.dateToMDYFormat(r.createdAt)),1),m(u,{to:`/v/${r.publishId}`},{default:p(()=>[d(n(r.publishedName),1)]),_:2}
1,1032,["to"]),o("div",null,[m(g,{class:"ps-0 pe-1","no-border":"",readonly:"",size:"sm",inline:"",value:r.overallRating},null,8,["value"])]),o("p",G,n(r.comment?r.comment:""),1)])]))),128))])])])):l("",!0)])):l("",!0),!e.loading&&!e.hasActiveProfile?(s(),i("div",H,"No such user found")):l("",!0)]}),_:1})}const Re=R(M,[["render",K]]);export{Re as default};
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.