PageSourceSearch

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

js elk-zone.netlify.app collected 2026-10-03 10:41:40 UTC 4,437 bytes, 1 lines download raw bytes

1import{_ as K}from"./8R9WQNKl.js";import{d as $,c as t,e as l,n as m,N as L,D as r,a2 as O,h as i,aL as F,m as b,aN as W,aO as z,a0 as N,w as H,j as M,u as q,cC as G,av as J,an as T,aG as U,i as o,bV as g,am as S,ay as P,t as R,F as B,E as Q,J as y,K as X}from"./DREHXjTd.js";import{_ as Y}from"./Bq_sSO39.js";import{_ as Z}from"./GctFFk09.js";import{u as ee,_ as te}from"./CLLOk-G4.js";const ne={flex:"","gap-2":"","items-center":""},oe={flex:"~ col gap1",shrink:"","h-full":"","overflow-hidden":"","leading-none":""},ae={flex:"~","gap-2":""},se=$({__name:"SearchAccountInfo",props:{account:{}},setup(e){return(f,a)=>{const _=L,p=O,v=F,h=W,s=z;return t(),l("div",ne,[m(_,{"w-10":"","h-10":"",account:e.account,"shrink-0":""},null,8,["account"]),r("div",oe,[r("div",ae,[m(p,{account:e.account,"line-clamp-1":"","ws-pre-wrap":"","break-all":"","text-base":""},null,8,["account"]),e.account.locked?(t(),i(v,{key:0,"text-xs":""})):b("",!0),e.account.bot?(t(),i(h,{key:1,"text-xs":""})):b("",!0)]),m(s,{"text-sm":"",account:e.account,"text-secondary-light":""},null,8,["account"])])])}}}),ce=Object.assign(se,{__name:"SearchAccountInfo"}),ue=$({__name:"SearchResult",props:{result:{},active:{type:Boolean}},setup(e){function f(){document.activeElement.blur()}return(a,_)=>{const p=K,v=ce,h=Y,s=Z;return t(),i(s,{as:"RouterLink","hover:bg-active":"",active:e.active,to:e.result.to,py2:"",block:"",px2:"","aria-selected":e.active,class:N({"bg-active":e.active}),onClick:_[0]||(_[0]=()=>f())},{default:H(()=>[e.result.type==="hashtag"?(t(),i(p,{key:0,hashtag:e.result.data},null,8,["hashtag"])):e.result.type==="account"?(t(),i(v,{key:1,account:e.result.data},null,8,["account"])):e.result.type==="status"?(t(),i(h,{key:2,status:e.result.data,actions:!1,"show-reply-to":!1},null,8,["status"])):b("",!0)]),_:1},8,["active","to","aria-selected","class"])}}}),le=Object.assign(ue,{__name:"SearchResult"}),re={"bg-base":"",border:"~ base",h10:"","ps-4":"","pe-1":"","rounded-3":"",flex:"~ row","items-center":"",relative:"","focus-within:box-shadow-outline":""},ie=["placeholder"],_e={"left-0":"","top-11":"",absolute:"","w-full":"","z-10":"","group-focus-within":"pointer-events-auto visible",invisible:"","pointer-events-none":""},de={key:0,block:"","text-center":"","text-sm":"","text-secondary":""},me={key:1,block:"","text-center":"","text-sm":"","text-secondary":""},pe={key:2},ve=$({__name:"SearchWidget",setup(e,{expose:f}){const a=y(""),{accounts:_,hashtags:p,loading:v,statuses:h}=ee(a),s=y(0),{t:k}=M(),A=y(),x=y(),V=q(),{focused:I}=G(A);f({input:x});const c=X(()=>a.value.length===0?[]:[...p.value.slice(0,3),..._.value,...h.value]);J([c,I],()=>s.value=-1);function C(d){return s.value=(s.value+d%c.value.length+c.value.length)%c.value.length}function j(){const d=s.value;if(a.value.length!==0){if(d===-1){s.value=0;return}document.activeElement.blur(),s.value=-1,V.push(c.value[d].to)}}return(d,n)=>{const D=le,w=te;return t(),l("div",{ref_key:"el",ref:A,relative:"",group:""},[r("div",re,[n[6]||(n[6]=r("div",{"i-ri:search-2-line":"","pointer-events-none":"","text-secondary":"",mt:"1px",class:"rtl-flip"},null,-1)),T(r("input",{ref_key:"input",ref:x,"onUpdate:modelValue":n[0]||(n[0]=u=>P(a)?a.value=u:null),"h-full":"","rounded-3":"","w-full":"","bg-transparent":"",outline:"focus:none","ps-3":"","pe-1":"","ml-1":"",placeholder:o(k)("nav.search"),pb:"1px","placeholder-text-secondary":"",onKeydown:[n[1]||(n[1]=g(S(u=>C(1),["prevent"]),["down"])),n[2]||(n[2]=g(S(u=>C(-1),["prevent"]),["up"])),n[3]||(n[3]=g(S(u=>o(x)?.blur(),["prevent"]),["esc"]))],onKeypress:g(j,["enter"])},null,40,ie),[[U,o(a)]]),o(a).length?(t(),l("button",{key:0,"btn-action-icon":"","text-secondary":"",onClick:n[4]||(n[4]=u=>{a.value="",o(x)?.focus()})},[...n[5]||(n[5]=[r("span",{"aria-hidden":"true",class:"i-ri:close-line"},null,-1)])])):b("",!0)]),r("div",_e,[r("div",{"w-full":"","bg-base":"",border:"~ base","rounded-3":"","max-h-100":"","overflow-auto":"",class:N(o(c).length===0?"py2":null)},[o(a).trim().length===0?(t(),l("span",de,R(o(k)("search.search_desc")),1)):o(v)?(t(),l("div",pe,[m(w),m(w),m(w)])):(t(),l(B,{key:1},[o(c).length>0?(t(!0),l(B,{key:0},Q(o(c),(u,E)=>(t(),i(D,{key:u.id,active:o(s)===parseInt(E.toString()),result:u,tabindex:o(I)?0:-1},null,8,["active","result","tabindex"]))),128)):(t(),l("span",me,R(o(k)("search.search_empty")),1))],64))],2)])],512)}}}),be=Object.assign(ve,{__name:"SearchWidget"});export{be as _,le as a};

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.