PageSourceSearch

https://mypocketpals.online/vite/DtZ7hv-K.js

js mypocketpals.online collected 2026-10-08 08:52:27 UTC 3,200 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["DVdLXwbu.js","CwP7oRtQ.js","app-BAclpbpz.js","BI8qgwQJ.js","BTqQ_sdn.js","cPPnkASS.css","lQ9B5QVJ.css","AEl_Lkqw.js","Cyjh9VK6.js","Dk2tpR3V.css","FwO50g9w.css"])))=>i.map(i=>d[i]);
2import{F as $,W as I,l as V,C as j,ap as M,i as h,y as S,f as z,g as D,_ as H}from"./app-BAclpbpz.js";import{u as N}from"./ekSX7_HF.js";import{M as R}from"./DKNgDMmf.js";import{n as q}from"./Dq2IE6tM.js";import{b as B,a as n,g as E,h as F,j as g,C as K,X as O,q as m,s as l,d as U}from"./BI8qgwQJ.js";import"./BTqQ_sdn.js";const f="search",L=B({__name:"WidgetSearch",props:{widget:{}},emits:["updateProps"],setup(v,{expose:y,emit:b}){const w={showHeader:{type:"boolean",default:!1}},u=v,_=b,{widgetProps:x,configure:k}=N(f,w,u,_);function C(e){e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),c())}const r=$();let d=n(0),a=n(""),p=n(),W=n(!1),P=n(!0),t=n(null);function A(e){V([{type:"parent",text:"With File",icon:"ph-file ph-bold ph-lg",children:[{type:"button",icon:"ph-image ph-bold ph-lg",text:`With Images ${t.value==="image"?"✔":""}`,action:()=>{t.value="image"}},{type:"button",icon:"ph-music-notes-simple ph-bold ph-lg",text:`With Audios ${t.value==="audio"?"✔":""}`,action:()=>{t.value="audio"}},{type:"button",icon:"ph-video ph-bold ph-lg",text:`With Videos ${t.value==="video"?"✔":""}`,action:()=>{t.value="video"}}]},...t.value?[{text:"Clear Filter",icon:"ph-trash ph-bold ph-lg",action:()=>{t.value=null}}]:[]],e.currentTarget??e.target)}async function c(){const e=a.value.toString().trim();if(e==null||e==="")return;if(e.startsWith("https://")){const s=j("ap/show",{uri:e});M(s,null,null,h.ts.fetchingAsApObject);const i=await s;i.type==="User"?r.push(`/@${i.object.username}@${i.object.host}`):i.type==="Note"&&r.push(`/notes/${i.object.id}`);return}if(e.match(/^@[a-z0-9_.-]+@[a-z0-9_.-]+$/i)){r.push(`/${e}`);return}if(e.startsWith("#")){r.push(`/tags/${encodeURIComponent(e.substring(1))}`);return}if(!q){S({type:"warning",text:h.ts.notesSearchNotAvailable});return}p.value={endpoint:"notes/search",limit:10,params:{query:a,userId:null,order:P.value?"desc":"asc",filetype:t.value}},W.value&&(p.value.params.host="."),d.value++;const{dispose:o}=z(U(()=>D(()=>import("./DVdLXwbu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),{noteKey:d.value,notePagination:p.value},{closed:()=>o()})}return y({name:f,configure:k,id:u.widget?u.widget.id:null}),(e,o)=>(F(),E(R,{showHeader:m(x).showHeader,class:"skw-search"},{default:g(()=>[K(I,{modelValue:m(a),"onUpdate:modelValue":o[0]||(o[0]=s=>O(a)?a.value=s:a=s),large:!0,autofocus:!0,type:"search",onKeydown:C},{suffix:g(()=>[l("button",{style:{border:"none",background:"none","margin-right":"0.5em","z-index":"2","pointer-events":"auto",position:"relative","margin-top":"0 auto"},onClick:A},o[1]||(o[1]=[l("i",{class:"ph-funnel ph-bold ph-lg"},null,-1)])),l("button",{style:{border:"none",background:"none","z-index":"2","pointer-events":"auto",position:"relative",margin:"0 auto"},onClick:c},o[2]||(o[2]=[l("i",{class:"ph-magnifying-glass ph-bold ph-lg"},null,-1)]))]),_:1},8,["modelValue"])]),_:1},8,["showHeader"]))}}),Z=H(L,[["__scopeId","data-v-11085d54"]]);export{Z 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.