PageSourceSearch

https://pastefy.app/assets/ToolLayout-CwnvJJNc.js

js pastefy.app collected 2026-10-03 23:28:33 UTC 7,127 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Logo-CtJpLblR.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/index-xKWWSADt.js","assets/index-l0xM8UnQ.css"])))=>i.map(i=>d[i]);
2import{d as M,C as V,u as P,J as U,Y as A,S as N,k,e as n,a as o,b as u,w as h,r as I,F as d,f as w,c as p,i as y,h as s,D as C,o as a,Z as R,n as T,t as g,_ as F}from"./index-xKWWSADt.js";import{s as q}from"./index-CK3j_cSe.js";import{s as J}from"./index-CA2rWbZh.js";import{_ as O}from"./LoginModal.vue_vue_type_script_setup_true_lang-C-sM0ZEe.js";import{_ as Y,a as Z}from"./LanguageSwitcher.vue_vue_type_script_setup_true_lang-WnZ7l_hp.js";import{a as G,l as _,t as H,b as K,c as Q,u as W,g as S,d as X}from"./tool-catalog-i18n-BXkuSnv2.js";import"./index-DL0wjmqn.js";import"./index-CUIlFl-c.js";import"./index-D9nt1nxB.js";const ee={class:"min-h-screen bg-white dark:bg-[#121212]"},te={class:"sticky top-0 z-50 bg-white/80 backdrop-blur-xl dark:bg-[#121212]/80"},oe={class:"flex w-full items-center justify-between gap-3 px-4 py-3 md:px-6"},se={class:"flex items-center gap-2 md:gap-3"},le=["src"],ae={class:"hidden items-center gap-1 md:flex"},re={key:0,class:"group relative"},ie={class:"pointer-events-none absolute top-full left-0 pt-2 opacity-0 transition-all duration-150 group-hover:pointer-events-auto group-hover:opacity-100"},ne={class:"grid grid-cols-2 gap-2 xl:grid-cols-3"},ce={class:"flex items-start gap-3"},ue={class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-white text-neutral-700 dark:bg-neutral-900 dark:text-neutral-200"},de={class:"min-w-0"},pe={class:"font-medium"},me={class:"mt-1 line-clamp-2 text-xs text-neutral-500 dark:text-neutral-400"},he={class:"flex items-center gap-2"},ge={class:"relative hidden md:block"},_e={key:0,class:"absolute top-full right-0 mt-2 w-[24rem] rounded-xl border border-neutral-200 bg-white p-2 shadow-xl dark:border-neutral-700 dark:bg-neutral-900"},ve={class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-200"},be={class:"min-w-0"},fe={class:"font-medium"},xe={class:"mt-1 line-clamp-2 text-xs text-neutral-500 dark:text-neutral-400"},ke=["src"],we={class:"mx-auto w-full max-w-[1500px] px-4 py-6 md:px-6 md:py-8"},je=M({__name:"ToolLayout",setup(ye){const E=R(()=>F(()=>import("./Logo-CtJpLblR.js"),__vite__mapDeps([0,1,2,3]))),v=V(!1),m=V(""),c=P(),b=U(),f=A("userMenu"),{t:i}=N(),j=k(()=>G.map(r=>_(r.kind,r,i))),$=k(()=>{const r=m.value.trim().toLowerCase();return r?j.value.filter(e=>[e.title,e.shortTitle,e.description,e.category,...e.keywords].join(" ").toLowerCase().includes(r)).slice(0,8):[]}),B=k(()=>{var r;return[{label:i("tools.categories"),icon:"ti ti-category",to:{name:"tool-home"},panelClass:"w-[56rem]",cards:H.filter(e=>S(e.slug)>0).map(e=>X(e,i)).map(e=>({title:e.title,description:`${e.description} ${S(e.slug)} tools.`,icon:e.icon,to:{name:"tool-category",params:{category:e.slug}}}))},{label:i("tools.previewInspect"),icon:"ti ti-sparkles",to:{name:"tool-home",hash:"#preview-tools"},cards:K.slice(0,6).map(e=>_("preview",e,i)).map(e=>({title:e.shortTitle,description:e.description,icon:e.icon,to:{name:"tool-preview",params:{tool:e.slug}}}))},{label:i("tools.convert"),icon:"ti ti-arrows-exchange",to:{name:"tool-home",hash:"#conversions"},cards:Q.slice(0,6).map(e=>_("conversion",e,i)).map(e=>({title:e.shortTitle,description:e.description,icon:e.icon,to:{name:"tool-conversion",params:{tool:e.slug}}}))},{label:i("tools.utilities"),icon:"ti ti-tool",to:{name:"tool-home",hash:"#utilities"},cards:W.slice(0,6).map(e=>_("utility",e,i)).map(e=>({title:e.shortTitle,description:e.description,icon:e.icon,to:{name:"tool-utility",params:{tool:e.slug}}}))},{label:i("nav.explore"),icon:"ti ti-world",to:{name:"explore"},hidden:!((r=b.appInfo)!=null&&r.public_pastes_enabled)}]});return(r,e)=>{var z,L;const x=I("router-link"),D=I("router-view");return a(),n(d,null,[o("div",ee,[o("header",te,[o("div",oe,[o("div",se,[u(x,{to:{name:"home"},class:"flex items-center gap-2 py-2 transition-opacity hover:opacity-80","aria-label":r.$t("tools.title")},{default:h(()=>{var t;return[(t=s(b).appInfo)!=null&&t.custom_logo?(a(),n("img",{key:0,src:s(b).appInfo.custom_logo,alt:"logo",class:"h-[1.7rem]"},null,8,le)):(a(),p(s(E),{key:1}))]}),_:1},8,["aria-label"]),o("nav",ae,[(a(!0),n(d,null,w(B.value.filter(t=>!t.hidden),t=>(a(),n(d,{key:t.label},["cards"in t?(a(),n("div",re,[u(s(C),{as:"router-link",to:t.to,text:"",severity:"contrast",size:"small",icon:t.icon,label:t.label},null,8,["to","icon","label"]),o("div",ie,[o("div",{class:T(["rounded-xl border border-neutral-200 bg-white p-3 shadow-xl dark:border-neutral-700 dark:bg-neutral-900",t.panelClass||"w-[38rem]"])},[o("div",ne,[(a(!0),n(d,null,w(t.cards,l=>(a(),p(x,{key:l.title,to:l.to,class:"rounded-xl border border-neutral-200 bg-neutral-100 p-3 transition-all hover:bg-white dark:border-neutral-700 dark:bg-neutral-800 dark:hover:bg-neutral-950"},{default:h(()=>[o("div",ce,[o("div",ue,[o("i",{class:T(`ti ti-${l.icon}`)}
2,null,2)]),o("div",de,[o("div",pe,g(l.title),1),o("p",me,g(l.description),1)])])]),_:2},1032,["to"]))),128))])],2)])])):(a(),p(s(C),{key:1,as:"router-link",to:t.to,text:"",severity:"contrast",size:"small",icon:t.icon,label:t.label},null,8,["to","icon","label"]))],64))),128))])]),o("div",he,[u(Y,{class:"hidden max-w-[8rem] sm:flex"}),o("div",ge,[u(s(q),{modelValue:m.value,"onUpdate:modelValue":e[0]||(e[0]=t=>m.value=t),placeholder:r.$t("tools.search"),class:"w-[10rem]",size:"small"},null,8,["modelValue","placeholder"]),$.value.length?(a(),n("div",_e,[(a(!0),n(d,null,w($.value,t=>(a(),p(x,{key:`${t.kind}:${t.slug}`,to:t.to,class:"flex items-start gap-3 rounded-xl p-3 transition-colors hover:bg-neutral-100 dark:hover:bg-neutral-800",onClick:e[1]||(e[1]=l=>m.value="")},{default:h(()=>[o("div",ve,[o("i",{class:T(`ti ti-${t.icon}`)},null,2)]),o("div",be,[o("div",fe,g(t.shortTitle),1),o("p",xe,g(t.description),1)])]),_:2},1032,["to"]))),128))])):y("",!0)]),!s(c).user&&((z=s(c).authTypes)!=null&&z[0])?(a(),p(s(C),{key:0,onClick:e[2]||(e[2]=t=>{var l;return((l=s(c).authTypes)==null?void 0:l.length)>1?v.value=!0:null}),as:((L=s(c).authTypes)==null?void 0:L.length)===1?"a":"button",href:`/api/v2/auth/oauth2/${s(c).authTypes[0]}`,icon:"ti ti-login",label:r.$t("auth.login"),severity:"contrast",outlined:"",size:"small",loading:s(c).userLoading},null,8,["as","href","label","loading"])):y("",!0),s(c).user?(a(),n("button",{key:1,class:"cursor-pointer",onClick:e[3]||(e[3]=t=>{var l;return(l=s(f))==null?void 0:l.toggle(t)})},[o("img",{class:"h-[32px] w-[32px] rounded-full border border-neutral-200 object-cover dark:border-neutral-700",src:s(c).user.profile_picture,alt:"Profile Picture"},null,8,ke)])):y("",!0)])])]),o("main",we,[u(D)])]),u(s(J),{ref_key:"userMenu",ref:f,class:"w-[14rem]",pt:{content:"p-0"}},{default:h(()=>[u(Z,{onElementClicked:e[4]||(e[4]=t=>{var l;return(l=s(f))==null?void 0:l.hide()})})]),_:1},512),u(O,{visible:v.value,"onUpdate:visible":e[5]||(e[5]=t=>v.value=t)},null,8,["visible"])],64)}}});export{je 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.