1import{aY as W,aZ as Y,i as G,p as X,ab as Z,g as J,c as K,aC as ee,aG as te,aH as ae,aV as se}from"./DdjJ_Nrq.js";import{d as P,x as S,c,aY as ne,E as g,D as r,F as a,P as s,V as u,Y as v,H as _,X as i,h as e,aL as re,S as M,R as oe,C as A,t as ie,b as ce,v as le,aP as de,aq as ue,M as me,N as ge}from"./BasuKg0Z.js";import{u as fe,d as pe,j as _e,a as xe}from"./BbdHyzsU.js";const he={class:"flex flex-wrap rounded-3xl gap-4 group hover:bg-primary/10 base-transition p-4 shadow lg:shadow-none"},ye={class:"grid place-content-center"},ve={class:"flex-1 flex flex-col"},be={class:"flex-1"},we={class:"text-lg lg:text-xl font-medium text-secondary"},Te={key:0,class:"-translate-y-2 inline-flex text-[10px] leading-tight px-[6px] py-[2px] bg-success/10 text-success rounded-xl"},Be={class:"text-xs font-light group-hover:text-secondary text-secondary/50"},ke={class:"flex flex-wrap items-center gap-4 pt-2"},Ae={class:"flex-1 w-full text-gray-600 lg:w-auto flex flex-wrap items-center justify-center lg:justify-start gap-2 text-xs font-light"},Ce={key:1,class:"text-primary font-medium"},$e={class:"text-xs text-primary"},Fe={class:"w-full lg:w-auto justify-center lg:justify-start flex items-center gap-4"},Me={key:1,class:"text-xs font-medium px-2 py-1 bg-helper/10 text-helper rounded-xl capitalize"},Pe=P({__name:"Thread",props:{card:{},self:{type:Boolean}},setup(t){const l=W(),d=t,{user:m}=S(),b=c(()=>d.card?.user_id===m.value?.id),w=Y(d.card?.title),{formatDate:T,DATE_FORMATS:B}=ne(),x=c(()=>d.card?.created_at&&l?l.format(new Date(d.card?.created_at)):null);return(C,$)=>{const h=G,y=re,k=oe;return r(),g("div",he,[a("div",ye,[s(h,{width:"96px",src:t.card?.thumbnail_url||"/assets/images/dm-empty-image.png",class:"w-full lg:size-24 rounded-xl"},null,8,["src"])]),a("div",ve,[a("div",be,[s(y,{to:`/threads/${t.card.slug}`,class:"w-full lg:w-8/12"},{default:u(()=>[a("p",we,[v(i(e(w))+" ",1),t.self?(r(),g("span",Te," My Thread ")):_("",!0)]),a("p",Be,i(t.card?.overview),1)]),_:1},8,["to"])]),a("div",ke,[a("div",Ae,[e(b)?(r(),g("span",{key:0,class:M([t.card.visible?"text-success border-success":"text-danger border-danger","flex gap-1 items-center px-1 py-[1px] border rounded-lg"])},[s(k,{name:t.card.visible?"visibility":"lock",class:"!text-base leading-none"},null,8,["name"]),a("p",{class:M([t.card.visible?"text-success ":"text-danger ","font-medium leading-4"])},i(t.card.visible?"Public":"Private"),3)],2)):_("",!0),e(x)?(r(),g("span",Ce,i(e(x)),1)):_("",!0),v(" ("+i(e(T)(t.card?.created_at,e(B).Pretty))+"), ",1),a("span",$e,"Includes: "+i(t.card?.queries_count)+" Queries",1)]),a("div",Fe,[t.card?.facility?.slug?(r(),A(y,{key:0,to:`/${t.card?.facility?.slug}`,class:"text-xs font-medium px-2 py-1 bg-primary/10 text-primary rounded-xl"},{default:u(()=>[v(i(t.card?.facility?.name),1)]),_:1},8,["to"])):_("",!0),t.card?.language?.name?(r(),g("span",Me,i(t.card?.language?.name),1)):_("",!0)])])])])}}}),Se={class:"grid grid-cols-1 gap-4 lg:gap-0"},je=P({__name:"index",async setup(t){let l,d;const m=ie(),{user:b}=S(),w=c(()=>b.value?.id||0),T=ce(),B=c(()=>Array.isArray(m.facilities)?m.facilities.map(n=>({id:n.id,name:n.name})):[]),x=c(()=>Array.isArray(m.languages)?m.languages.map(n=>({id:n.id,name:n.name})):[]),C=le(),$={filter:"",range:"",language:"",search:"",type:"query",cursor:""},{values:h,setFieldValue:y,setValues:k}=X({formOptions:{initialValues:$},onLoadingData:()=>D(),onBeforeSetQueryItems:(n,o)=>{if(n.cursor===o.cursor)return{cursor:""}}}),{data:F,status:V,error:z,execute:D}=([l,d]=de(async()=>ue("threads-list",async()=>(await C.threads.index({pages:10,...h,facility:T.query?.facility||""}))._data,{default:()=>[],server:!0})),l=await l,d(),l),f=c(()=>F.value?.data||[]),j=c(()=>F.value.meta),I=c(()=>[{name:"Home",to:{name:"mentor"}},{name:"Threads"}]);return fe(),pe(f.value,"prompt","content"),_e(I),(n,o)=>{const U=J,q=Z,L=ee,N=te,R=Pe,O=ae,Q=K,E=se,H=xe;return r(),A(H,null,{default:u(()=>[s(q,{"is-dark":"",code:"",dense:""},{default:u(()=>[s(U,{tag:"h1",size:"48",weight:"700","text-color":"white"},{default:u(()=>[...o[1]||(o[1]=[v(" Threads ",-1)])]),_:1}),o[2]||(o[2]=a("p",{class:"lg:leading-6 text-white text-sm lg:text-base text-center"}," Mentor's Threads go beyond pre-packaged content by empowering users to create and organize their own learning journeys. Through user-driven query formulation and logical organization, Threads become a dynamic tool for both learning and project development. This personalized and interactive approach ensures that Threads remain a versatile resource, catering to the diverse needs and goals of users in the realm of data-related challenges. ",-1))]),_:1}),s(Q,{dense:""},{default:u(()=>[s(L,{items:[{name:"Threads",url:"/threads"}],class:"mb-4"}),s(N,{"initial-filters":e(h),"exist-filters":{instructor:!1,level:!1,visible:!1,search:!0,facility:!1,language:!0,eventType:!0},options:e(B),date:"",type:"threads",languages:e(x),"type-options":[{id:"query",name:"Query"},{id:"playbook",name:"Playbooks"}],class:"mb-7",onUpdate:e(k)},null,8,["initial-filters","options","languages","onUpdate"]),s(O,{"static-slot":"",navigation:e(j),"show-not-found":e(f)&&!e(f).length,status:e(V),items:e(f),errors:e(z),onSetPage:o[0]||(o[0]=p=>e(y)("cursor",p))},{default:u(()=>[a("div",Se,[(r(!0),g(me,null,ge(e(f),p=>(r(),A(R,{key:p.id,self:e(w)==p.user_id,card:p},null,8,["self","card"]))),128))])]),_:1},8,["navigation","show-not-found","status","items","errors"])]),_:1}),s(E,{"dark-bottom":"","dark-top":!1})]),_:1})}}});
1export{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.