1import{_ as I}from"./Dhcagn-1.js";import{d as L,s as k,D as j,i as c,o as n,a as t,u as a,j as U,w as z,k as D,t as w,B as M,x as J,_ as O,z as P,H as G,I as K,r as p,J as Q,A as W,c as T,p as b,F as N,q as B,g as X}from"./Bww_pLF1.js";import{a as Y,u as Z}from"./Cah9Pbsl.js";import{_ as ee}from"./CLYc6zav.js";import"./DEzBjzH1.js";import{u as H}from"./DfPIxWuJ.js";import{u as te}from"./Du3ZEpVw.js";import"./YGWNKGwQ.js";const se={class:"user-box"},oe={class:"user-header"},ne=["src"],ae={class:"title-bar"},re=["src"],ie={class:"name-stats"},ce=L({__name:"UserCard",props:{user:{}},setup(s){const f=s,{loggedIn:m,user:v}=k(Y()),u=j(),g=M(()=>m.value&&f.user.login===v?.value?.login);return(l,d)=>{const _=J;return n(),c("div",se,[t("div",oe,[t("img",{src:`${a(u).origin}/banners/${s.user.banner}`,alt:"User banner",class:"banner"},null,8,ne),t("div",ae,[t("img",{src:`${a(u).origin}/avatars/${s.user.avatar_file}`,alt:"",class:"profile"},null,8,re),t("div",ie,[U(_,{to:`/user/${s.user.login}`},{default:z(()=>[D(w(s.user.nickname+(a(g)?l.$t("profile.you"):"")),1)]),_:1},8,["to"]),t("div",null,w(l.$t("profile.favorites_count",s.user.favorites_count||0)),1)])])]),t("p",null,w(s.user.bio),1)])}}}),ue=Object.assign(O(ce,[["__scopeId","data-v-366c75d3"]]),{__name:"UserCard"}),le={class:"tile is-parent is-12 is-hidden-desktop"},de={key:1,class:"tile is-parent"},_e={class:"tile is-child"},fe={class:"box"},me={class:"title is-4"},be=L({__name:"index",async setup(s){let f,m;const{search:v}=k(H()),{setSearch:u,setResultsCount:g}=H(),{config:l}=k(te()),d=p(!0),_=p(!1),x=p(-1),e=p({infos:{count:0,from:0,to:0},content:[]});g(0);const q=M(()=>e.value.infos.to===e.value.infos.count);P(v,()=>S()),P(e,r=>g(r.infos.count),{deep:!0}),G(()=>u("")),K(()=>{_.value=!0,window.addEventListener("scroll",C,{passive:!0}),E()}),Q(()=>{_.value=!1,u(""),window.removeEventListener("scroll",C)}),[f,m]=W(()=>R()),await f,m();async function R(){if(l?.value&&!l.value.Users.Enabled)throw X({statusCode:404});await S()}async function y(r=!1){if(!r&&(e.value.infos.to===e.value.infos.count||d.value))return;x.value++,d.value=!0;const o=await Z("/api/users",{query:V()});for(let i=o.infos.from;i<o.infos.to;i++)e.value.content[i]=o.content[i-o.infos.from];e.value.infos.count=o.infos.count,e.value.infos.to=o.infos.to,d.value=!1}function C(){const r=document.documentElement.scrollTop+window.innerHeight;document.documentElement.offsetHeight-r<Math.max(2*window.innerHeight,400)&&y()}function E(){_.value&&setTimeout(async()=>{document.documentElement.clientHeight>=document.documentElement.scrollHeight&&await y(),E()},100)}async function S(){e.value={infos:{count:0,to:0,from:0},content:[]},x.value=-1,await y(!0)}function V(){return{filter:v.value||void 0,from:x.value*12,size:12}}return(r,o)=>{const i=I,A=ue,F=ee;return n(),c("div",null,[t("div",le,[U(i)]),(n(!0),c(N,null,B(Math.ceil(a(e).content.length/2),h=>(n(),c("div",{key:h,class:"tile is-parent is-12"},[(n(),c(N,null,B(2,$=>t("div",{key:`${h}_${$}`,class:"tile is-child is-6"},[a(e).content[(h-1)*2+$-1]?(n(),T(A,{key:0,user:a(e).content[(h-1)*2+$-1]},null,8,["user"])):b("",!0)])),64))]))),128)),a(d)?(n(),T(F,{key:0,class:"tile is-parent is-12"})):b("",!0),a(q)?(n(),c("div",de,[t("div",_e,[t("div",fe,[t("h4",me,w(r.$t("layout.end_users")),1)])])])):b("",!0)])}}});export{be 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.