PageSourceSearch

https://elk-zone.netlify.app/_nuxt/Ca6RToE0.js

js elk-zone.netlify.app collected 2026-10-03 10:42:47 UTC 5,483 bytes, 1 lines download raw bytes

1import{d as I,aH as P,f as A,c as r,e as l,n as u,b4 as K,i as t,a1 as U,D as s,ad as M,w as k,a0 as w,J as v,h as V,m as N,a as Q,W as X,cC as Y,av as Z,an as ee,aG as te,bV as j,am as E,ay as ne,t as D,F as $,E as oe,K as F}from"./DREHXjTd.js";import{u as ae,_ as se}from"./CLLOk-G4.js";import{_ as ce}from"./BNMhYjt1.js";import{_ as ie}from"./GctFFk09.js";const re={flex:"","justify-between":"","hover:bg-active":"","transition-100":"","items-center":""},le=I({__name:"Account",props:{account:{},hoverCard:{type:Boolean},list:{}},setup(n){P(n.account);const p=A(),c=v(!1);async function m(){try{c.value?await p.v1.lists.$select(n.list).accounts.create({accountIds:[n.account.id]}):await p.v1.lists.$select(n.list).accounts.remove({accountIds:[n.account.id]}),c.value=!c.value}catch{}}return(i,R)=>{const f=K,_=M;return r(),l("div",re,[u(f,{account:n.account,hover:"",p1:"",as:"router-link","hover-card":n.hoverCard,shrink:"","overflow-hidden":"",to:("getAccountRoute"in i?i.getAccountRoute:t(U))(n.account)},null,8,["account","hover-card","to"]),s("div",null,[u(_,{content:t(c)?i.$t("list.add_account"):i.$t("list.remove_account"),hover:t(c)?"text-green":"text-red"},{default:k(()=>[s("button",{"text-sm":"",p2:"","border-1":"","transition-colors":"","border-dark":"","bg-base":"","btn-action-icon":"",onClick:m},[s("span",{class:w(t(c)?"i-ri:add-line":"i-ri:check-line")},null,2)])]),_:1},8,["content","hover"])])])}}}),ue=Object.assign(le,{__name:"ListAccount"}),de=I({__name:"AccountSearchResult",props:{result:{},active:{type:Boolean}},setup(n){return(p,c)=>{const m=K,i=ie;return r(),V(i,{as:"div",active:n.active,py2:"",block:"",px2:"","aria-selected":n.active,class:w({"bg-active":n.active})},{default:k(()=>[n.result.type==="account"?(r(),V(m,{key:0,account:n.result.data},null,8,["account"])):N("",!0)]),_:1},8,["active","aria-selected","class"])}}}),ve=Object.assign(de,{__name:"ListAccountSearchResult"}),me={border:"t base","p-4":"","w-full":"",flex:"~ wrap",relative:"","gap-3":""},pe={"bg-base":"",border:"~ base","flex-1":"",h10:"","ps-1":"","pe-4":"","rounded-2":"","w-full":"",flex:"~ row","items-center":"",relative:"","focus-within:box-shadow-outline":"","gap-3":"","ps-4":""},fe=["placeholder"],_e={"left-0":"","top-18":"",absolute:"","w-full":"","z-10":"","group-focus-within":"pointer-events-auto visible",invisible:"","pointer-events-none":""},he={key:0,block:"","text-center":"","text-sm":"","text-secondary":""},be=["hover","onClick"],ye={key:1,block:"","text-center":"","text-sm":"","text-secondary":""},ge={key:2},$e=I({__name:"accounts",async setup(n,{expose:p}){let c,m;const i=v();p({inputRef:i});const R=Q().params,f=F(()=>R.list),_=A().v1.lists.$select(f.value).accounts,O=_.list(),b=v(([c,m]=X(()=>A().v1.lists.$select(f.value).accounts.list({limit:1e3})),c=await c,m(),c)),C=v(),d=v(""),L=v(),{accounts:T,loading:z}=ae(d,{following:!0}),{focused:S}=Y(L),B=v(0);function y(o){return b.value.map(e=>e.id).includes(o)}const g=F(()=>d.value.length===0?[]:[...T.value]);Z([g,S],()=>B.value=-1);function W(o){try{_.create({accountIds:[o.id]}),b.value.push(o),C.value?.createEntry(o)}catch{}}function q(o){try{_.remove({accountIds:[o.id]});const x=b.value.map(h=>h.id).indexOf(o.id);x>-1&&(b.value.splice(x,1),C.value?.removeEntry(o.id))}catch{}}return(o,e)=>{const x=M,h=se,G=ue,H=ce;return r(),l($,null,[s("div",{ref_key:"el",ref:L,relative:"",group:""},[s("form",me,[s("div",pe,[e[5]||(e[5]=s("div",{"i-ri:search-2-line":"","pointer-events-none":"","text-secondary":"",mt:"1px",class:"rtl-flip"},null,-1)),ee(s("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":e[0]||(e[0]=a=>ne(d)?d.value=a:null),"bg-transparent":"",outline:"focus:none","ps-3":"","rounded-3":"",pb:"1px","h-full":"","w-full":"","placeholder-text-secondary":"",placeholder:o.$t("list.search_following_placeholder"),onKeydown:[e[1]||(e[1]=j(E(a=>t(i)?.blur(),["prevent"]),["esc"])),e[2]||(e[2]=j(E(()=>{},["prevent"]),["enter"]))]},null,40,fe),[[te,t(d)]]),t(d).length?(r(),l("button",{key:0,"btn-action-icon":"","text-secondary":"",onClick:e[3]||(e[3]=a=>{d.value="",t(i)?.focus()})},[...e[4]||(e[4]=[s("span",{"aria-hidden":"true",class:"i-ri:close-line"},null,-1)])])):N("",!0)])]),s("div",_e,[s("div",{"w-full":"","bg-base":"",border:"~ dark","rounded-3":"","max-h-100":"","overflow-auto":"",class:w(t(g).length===0?"py2":null)},[t(d).trim().length===0?(r(),l("span",he,D(o.$t("list.search_following_desc")),1
1)):t(z)?(r(),l("div",ge,[u(h),u(h),u(h)])):(r(),l($,{key:1},[t(g).length>0?(r(!0),l($,{key:0},oe(t(g),(a,J)=>(r(),l("div",{key:a.id,flex:"",border:"b base",py2:"",px4:"","hover:bg-active":"","justify-between":"","transition-100":"","items-center":""},[u(ve,{active:t(B)===parseInt(J.toString()),result:a,tabindex:t(S)?0:-1},null,8,["active","result","tabindex"]),u(x,{content:y(a.id)?o.$t("list.remove_account"):o.$t("list.add_account")},{default:k(()=>[s("button",{"text-sm":"",p2:"","border-1":"","transition-colors":"","border-dark":"","btn-action-icon":"","bg-base":"",hover:y(a.id)?"text-red":"text-green",onClick:()=>y(a.id)?q(a.data):W(a.data)},[s("span",{class:w(y(a.id)?"i-ri:check-line":"i-ri:add-line")},null,2)],8,be)]),_:2},1032,["content"])]))),128)):(r(),l("span",ye,D(o.$t("search.search_empty")),1))],64))],2)])],512),u(H,{ref_key:"paginatorRef",ref:C,paginator:t(O)},{default:k(({item:a})=>[u(G,{account:a,list:t(f),"hover-card":"",border:"b base",py2:"",px4:""},null,8,["account","list"])]),_:1},8,["paginator"])],64)}}});export{$e 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.