1import{u as S,C,h as I,i as V,a as B,_ as E}from"./index-YqUjisW-.js";import{M as N}from"./MainLayout-IssbuzrT.js";import{P as T}from"./PostModal-CtTH1YAt.js";import{e as A,r as o,c as L,f as F,K as R,p as U,i as _,h as c,a as q,k as z,b as d,n as x,v as K,o as w}from"./vendor-D3ahWMFY.js";import"./PaperAirplaneIcon-CIWf5ciy.js";const W={key:0,class:"container-fluid py-3"},$={class:"post-prompt mx-4"},j={class:"flex items-center"},D={class:"user-avatar-icon mr-3"},G=["onClick"],H=A({__name:"ExploreView",setup(J){const n=S(),a=o(null),m=o(!1),k=()=>{a.value&&(a.value.showSignInModal=!0)},u=o([]),l=o(!1),p=o(1),g=o(!1),b=o(null),M=L(()=>{var t;return((t=a.value)==null?void 0:t.isMobile)??window.innerWidth<768});async function h(){var t,e,s,y;if(!l.value){l.value=!0;try{const i={page:p.value,recordsPerPage:10,postType:"explore_feed",feedhashtag:"explore"};n.userId&&(i.requestorUserId=n.userId);const r=await B.getFeedPosts(i);if(r.success&&r.data){const f=(e=(t=r.data)==null?void 0:t.results)==null?void 0:e[0],v=(f==null?void 0:f.payload)||((s=r.data)==null?void 0:s.payload)||((y=r.data)==null?void 0:y.data)||[];p.value===1?u.value=v:u.value.push(...v),v.length>0&&p.value++}}catch(i){console.error("Error loading explore posts:",i)}finally{l.value=!1}}}function P(){h()}return F(async()=>{n.initializeAuth(),h(),await R(),setTimeout(()=>{!n.isAuthenticated&&a.value&&(m.value=!0,a.value.showSignInModal=!0)},500)}),(t,e)=>(w(),U(N,{"show-category-tabs":!1,"force-login":m.value,ref_key:"layoutRef",ref:a}
1,{"mobile-prompt":_(({openPostComposer:s})=>[M.value?(w(),q("div",W,[d("div",$,[d("div",j,[d("div",D,[c(x(I),{class:"w-5 h-5"})]),d("button",{class:"create-post-btn flex-grow-1 text-left py-2 px-4 rounded-lg border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-300 font-medium transition-all duration-200 hover:text-white dark:hover:bg-gray-800",style:{"background-color":"#f8f9fa"},onClick:s},[c(x(V),{class:"w-4 h-4 inline mr-2"}),e[1]||(e[1]=K(" Create a post... ",-1))],8,G)])])])):z("",!0)]),default:_(()=>[c(C,{posts:u.value,loading:l.value,"card-style":"compact",onLoadMore:P,onShowSignin:k},null,8,["posts","loading"]),c(T,{open:g.value,"onUpdate:open":e[0]||(e[0]=s=>g.value=s),post:b.value},null,8,["open","post"])]),_:1},8,["force-login"]))}}),ee=E(H,[["__scopeId","data-v-a5f35735"]]);export{ee 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.