PageSourceSearch

https://soshlabs.ai/_next/static/chunks/pages/posts-b62fa1b1dad3c0f1.js

js soshlabs.ai collected 2026-10-05 12:40:36 UTC 4,231 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8497],{28482:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>N});var a=t(37876),n=t(39955),i=t(24836),l=t(38061),o=t(59803),r=t(79736),d=t(18387),c=t(82736),u=t(91921),h=t(38890),m=t(32985),g=t(97491),f=t(84940),x=t(17523),p=t(61886),j=t(60383),b=t(19163),A=t(89099),y=t(14232),w=t(67768),P=t(72105),z=t(14717),v=t(96964),D=t(34379),S=t(50485),F=t(9552),E=t(29053);let _=function(e){let{page:s,totalPages:t,onPageChange:n}=e,i=(0,l.dU)("gray.500","gray.400");if(t<=1)return null;let d=function(e,s){if(s<=5)return Array.from({length:s},(e,s)=>s+1);let t=[],a=new Set;a.add(1),a.add(s);for(let t=e-1;t<=e+1;t++)t>=1&&t<=s&&a.add(t);let n=Array.from(a).sort((e,s)=>e-s);for(let e=0;e<n.length;e++)e>0&&n[e]-n[e-1]>1&&t.push("..."),t.push(n[e]);return t}(s,t);return(0,a.jsx)(o.s,{justify:"center",mt:6,children:(0,a.jsxs)(r.z,{spacing:1,children:[(0,a.jsx)(S.K,{"aria-label":"Previous page",icon:(0,a.jsx)(F.A,{size:16}),size:"sm",variant:"ghost",fontFamily:"heading",fontSize:"sm",isDisabled:1===s,onClick:()=>n(s-1)}),d.map((e,t)=>"..."===e?(0,a.jsx)(u.E,{px:2,fontSize:"sm",fontFamily:"heading",color:i,userSelect:"none",children:"..."},"ellipsis-".concat(t)):(0,a.jsx)(h.$,{size:"sm",fontFamily:"heading",fontSize:"sm",colorScheme:e===s?"brand":void 0,variant:e===s?"solid":"ghost",onClick:()=>n(e),minW:"8",children:e},e)),(0,a.jsx)(S.K,{"aria-label":"Next page",icon:(0,a.jsx)(E.A,{size:16}),size:"sm",variant:"ghost",fontFamily:"heading",fontSize:"sm",isDisabled:s===t,onClick:()=>n(s+1)})]})})},C=p.P.create(n.a),k=[{label:"All",statuses:null},{label:"In Progress",statuses:["DRAFT","PENDING_APPROVAL"]},{label:"Queued",statuses:["APPROVED"]},{label:"Published",statuses:["PUBLISHED"]},{label:"Failed",statuses:["FAILED"]}];function N(){var e;(0,A.useRouter)();let s=(0,w.jE)(),[t,p]=(0,y.useState)(0),[S,F]=(0,y.useState)(1),{isOpen:E,onOpen:N,onClose:T}=(0,i.j)(),O=k[t],I=(null==(e=O.statuses)?void 0:e.length)===1?O.statuses[0]:void 0,{data:R,isLoading:K}=(0,D.j)({page:S,limit:20,...I?{status:I}:{}}),L=(null==R?void 0:R.data)||[],Q=null==R?void 0:R.meta,U=[...O.statuses&&O.statuses.length>1?L.filter(e=>O.statuses.includes(e.status)):L].sort((e,s)=>{if(2===t)return e.scheduledFor||s.scheduledFor?e.scheduledFor?s.scheduledFor?new Date(e.scheduledFor).getTime()-new Date(s.scheduledFor).getTime():-1:1:0;if(3===t){let t=e.publishedAt||e.createdAt;return new Date(s.publishedAt||s.createdAt).getTime()-new Date(t).getTime()}return new Date(s.createdAt).getTime()-new Date(e.createdAt).getTime()}),q=(0,l.dU)("slate.500","slate.400");return(0,a.jsxs)(P.A,{children:[(0,a.jsxs)(C,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.3},children:[(0,a.jsxs)(o.s,{justify:"space-between",align:{base:"flex-start",md:"center"},direction:{base:"column",md:"row"},gap:4,mb:6,children:[(0,a.jsxs)(n.a,{children:[(0,a.jsxs)(r.z,{spacing:3,mb:1,children:[(0,a.jsx)(d.I,{as:b.A,boxSize:6,color:"brand.emphasis",strokeWidth:2}),(0,a.jsx)(c.D,{size:"lg",fontFamily:"heading",color:"text.primary",children:"Posts"})]}),(0,a.jsx)(u.E,{fontSize:"sm",color:q,pl:9,children:"Create, schedule, and manage your social media content"})]}),(0,a.jsx)(h.$,{colorScheme:"accent",leftIcon:(0,a.jsx)(j.A,{size:18}),onClick:N,size:"md",fontFamily:"heading",children:"New Post"})]}),(0,a.jsx)(m.t,{index:t,onChange:e=>{p(e),F(1)},variant:"line",mb:6,children:(0,a.jsx)(g.w,{children:k.map((e,s)=>(0,a.jsxs)(f.o,{fontSize:"sm",children:[e.label,0!==s&&s===t&&(null==Q?void 0:Q.total)?(0,a.jsx)(x.E,{variant:"solid",borderRadius:"full",fontSize:"xs",ml:2,colorScheme:"brand",children:Q.total}):null]},e.label))})}),(0,a.jsx)(z.A,{posts:U,isLoading:K,onCreatePost:N}),Q&&Q.totalPages>1&&(0,a.jsx)(_,{page:S,totalPages:Q.totalPages,onPageChange:F})]}),(0,a.jsx)(v.A,{isOpen:E,onClose:T,selectedDate:E?new Date(Date.now()+72e5):null,onSaved:()=>{s.invalidateQueries({queryKey:["calendar"]}),s.invalidateQueries({queryKey:["posts"]})}})]})}},99789:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/posts",function(){return t(28482)}])}},e=>{e.O(0,[2710,3302,5533,5768,2900,6152,9161,6418,7914,5057,6109,1594,1250,8892,8977,2105,7359,636,6593,8792],()=>e(e.s=99789)),_N_E=e.O()}]);

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.