1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7359],{4923:(e,t,a)=>{a.d(t,{Q:()=>s,s:()=>l});let[l,s]=(0,a(6107).Wh)("Card")},14717:(e,t,a)=>{a.d(t,{A:()=>L});var l=a(37876),s=a(39955),r=a(38061),n=a(99430),i=a(14740),o=a(51362),c=a(18387),d=a(91921),h=a(38890),u=a(61886),x=a(21355),p=a(60383),f=a(89099),m=a(25429),y=a(88392),g=a(59803),b=a(79736),j=a(73156),v=a(17523),S=a(2791),k=a(79247),w=a(34571),E=a(5358),z=a(5881),R=a(50845),A=a(31829);function T(e){let{item:t}=e;return"video"===t.fileType?(0,l.jsx)(g.s,{bg:"blackAlpha.800",align:"center",justify:"center",w:"full",h:"full",children:(0,l.jsx)(c.I,{as:A.A,boxSize:3,color:"white",fill:"white"})}):(0,l.jsx)(E._,{src:t.url,alt:"",objectFit:"cover",w:"full",h:"full",loading:"lazy",fallback:(0,l.jsx)(s.a,{bg:"gray.300",w:"full",h:"full"})})}function C(e){let{items:t,size:a=80}=e,n=(0,r.dU)("slate.200","surface.600"),i=t.length;return 0===i?null:(0,l.jsxs)(s.a,{w:"".concat(a,"px"),h:"".concat(a,"px"),borderRadius:"lg",overflow:"hidden",flexShrink:0,border:"1px solid",borderColor:n,bg:n,children:[1===i&&(0,l.jsx)(z.x,{templateColumns:"1fr",templateRows:"1fr",w:"full",h:"full",children:(0,l.jsx)(R.E,{children:(0,l.jsx)(T,{item:t[0]})})}),2===i&&(0,l.jsx)(z.x,{templateColumns:"1fr",templateRows:"1fr 1fr",w:"full",h:"full",gap:"1px",children:t.slice(0,2).map(e=>(0,l.jsx)(R.E,{children:(0,l.jsx)(T,{item:e})},e.s3Key))}),3===i&&(0,l.jsxs)(z.x,{templateColumns:"1fr 1fr",templateRows:"1fr 1fr",w:"full",h:"full",gap:"1px",children:[(0,l.jsx)(R.E,{colSpan:2,children:(0,l.jsx)(T,{item:t[0]})}),(0,l.jsx)(R.E,{children:(0,l.jsx)(T,{item:t[1]})}),(0,l.jsx)(R.E,{children:(0,l.jsx)(T,{item:t[2]})})]}),i>=4&&(0,l.jsx)(z.x,{templateColumns:"1fr 1fr",templateRows:"1fr 1fr",w:"full",h:"full",gap:"1px",children:t.slice(0,4).map((e,t)=>(0,l.jsxs)(R.E,{position:"relative",children:[(0,l.jsx)(T,{item:e}),3===t&&i>4&&(0,l.jsx)(g.s,{position:"absolute",inset:0,bg:"blackAlpha.600",align:"center",justify:"center",children:(0,l.jsxs)(d.E,{color:"white",fontSize:"xs",fontWeight:"bold",fontFamily:"heading",children:["+",i-4]})})]},e.s3Key))})]})}var _=a(56017),I=a(88705),D=a(79663);let F=u.P.create(m.Z);function P(e){var t,a,n;let{post:i,index:o=0}=e,h=I.N9[i.status]||"gray",u=I.SS[i.status]||i.status,x=(0,r.dU)("slate.100","surface.700"),p=(0,r.dU)("slate.600","slate.300"),f=(0,r.dU)("slate.400","slate.500");return(0,l.jsx)(F,{variant:"elevated",initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.35,delay:.06*o,ease:[.25,.46,.45,.94]},whileHover:{y:-4,boxShadow:"var(--chakra-shadows-card-hover)"},cursor:"pointer",children:(0,l.jsxs)(y.b,{children:[(0,l.jsxs)(g.s,{justify:"space-between",align:"center",mb:3,children:[(0,l.jsxs)(b.z,{spacing:2,children:[(0,l.jsx)(j.m,{label:"DRAFT"===i.status?"Still being worked on. Edit or submit for approval.":"PENDING_APPROVAL"===i.status?"Waiting for admin review":"APPROVED"===i.status?"Approved and ready to publish":"PUBLISHED"===i.status?"Successfully published":"FAILED"===i.status?"Publishing failed. Click to review.":"",hasArrow:!0,openDelay:300,fontSize:"xs",children:(0,l.jsx)(v.E,{variant:"subtle",colorScheme:h,fontSize:"xs",px:2.5,py:.5,children:u})}),i.contentType&&(0,l.jsx)(j.m,{label:"SHORT_FORM_VIDEO"===i.contentType?"Vertical video (TikTok, Reels, Shorts)":"LINKEDIN_POST"===i.contentType?"LinkedIn feed post":"NEWSLETTER"===i.contentType?"Email newsletter":"MICROBLOG"===i.contentType?"Thread for X/Twitter and Threads":"REDDIT_POST"===i.contentType?"Reddit post":"",hasArrow:!0,openDelay:300,fontSize:"xs",children:(0,l.jsx)(v.E,{variant:"outline",colorScheme:"slate",fontSize:"xs",px:2,py:.5,children:(null==(t=I.yw[i.contentType])?void 0:t.label)||i.contentType})})]}),i.scheduledFor&&(0,l.jsx)(j.m,{label:"Scheduled to publish at this date and time",hasArrow:!0,openDelay:300,fontSize:"xs",children:(0,l.jsxs)(b.z,{spacing:1,color:f,children:[(0,l.jsx)(c.I,{as:k.A,boxSize:3}),(0,l.jsx)(d.E,{fontSize:"xs",fontFamily:"heading",fontWeight:"medium",children:(0,D.Yq)(i.scheduledFor)})]})})]}),(0,l.jsxs)(g.s,{gap:3,children:[(0,l.jsxs)(s.a,{flex:1,minW:0,children:[i.title&&(0,l.jsx)(d.E,{fontFamily:"heading",fontWeight:"semibold",fontSize:"sm",color:"text.primary",mb:1.5,noOfLines:1,children:i.title}),(0,l.jsx)(d.E,{fontSize:"sm",noOfLines:3,color:p,lineHeight:"tall",mb:3,children:i.content}),i.hashtags&&i.hashtags.length>0&&(0,l.jsxs)(b.z,{spacing:1,mb:3,flexWrap:"wrap",children:[i.hashtags.slice(0,5).map(e=>(0,l.jsx)(S.vw,{size:"sm",variant:"subtle",colorScheme:"brand",children:(0,l.jsx)(S.d1,{children:(0,l.jsxs)(b.z,{spacing:.5,children:[(0,l.jsx)(c.I,{as:w.A,boxSize:2.5}),(0,l.jsx)(d.E,{children:e})]})})},e)),i.hashtags.length>5&&(0,l.jsxs)(d.E,{fontSize:"xs",color:"text.muted",fontFamily:"heading",children:["+",i.hashtags.length-5]})]})]}),i.mediaReadUrls&&i.mediaReadUrls.length>0&&(0,l.jsx)(C,{items:i.mediaReadUrls})]}),(0,l.jsxs)(g.s,{justify:"space-between",align:"center",mt:"auto",children:[(null==(a=i.campaign)?void 0:a.name)?(0,l.jsx)(j.m,{label:"This post belongs to a campaign",hasArrow:!0,openDelay:300,fontSize:"xs",children:(0,l.jsx)(d.E,{fontSize:"xs",color:"text.muted",fontFamily:"heading",fontWeight:"medium",noOfLines:1,children:i.campaign.name})}):(0,l.jsx)(s.a,{}),i.postPlatforms&&i.postPlatforms.length>0?(0,l.jsx)(b.z,{spacing:1,children:i.postPlatforms.map(e=>{let t=(0,_.e)(e.socialAccount.platform),a="PUBLISHED"===e.status?"green.500":"FAILED"===e.status?"red.500":"gray.400";return(0,l.jsx)(j.m,{label:"".concat(e.socialAccount.accountName," â ").concat(e.status.toLowerCase()),fontSize:"xs",children:(0,l.jsx)(s.a,{children:(0,l.jsx)(c.I,{as:null==t?void 0:t.icon,boxSize:3.5,color:a})})},e.id)})}):(null==(n=i.socialAccount)?void 0:n.platform)?(0,l.jsx)(s.a,{px:2,py:.5,bg:x,borderRadius:"full",children:(0,l.jsx)(d.E,{fontSize:"xs",fontFamily:"heading",fontWeight:"semibold",color:"text.secondary",textTransform:"capitalize",children:i.socialAccount.platform})}):null]})]})})}var N=a(48230),U=a.n(N);let W=u.P.create(s.a);function L(e){let{posts:t,isLoading:a,onCreatePost:u}=e,m=(0,f.useRouter)(),y=(0,r.dU)("slate.300","slate.600"),g=(0,r.dU)("slate.50","surface.700"),b=(0,r.dU)("slate.100","surface.600"),j=(0,r.dU)("slate.100","surface.700"),v=(0,r.dU)("slate.200","surface.600"),S=(0,r.dU)("white","surface.800");return a?(0,l.jsx)(n.r,{columns:{base:1,md:2},spacing:5,children:[1,2,3,4,5,6].map(e=>(0,l.jsx)(i.E,{h:"200px",borderRadius:"xl",startColor:j,endColor:v},e))}):0===t.length?(0,l.jsx)(W,{initial:{opacity:0,scale:.96}
1,animate:{opacity:1,scale:1},transition:{duration:.4},children:(0,l.jsxs)(o.T,{spacing:5,py:16,px:8,bg:g,borderRadius:"2xl",border:"2px dashed",borderColor:b,position:"relative",overflow:"hidden",children:[(0,l.jsx)(s.a,{position:"absolute",top:0,left:0,right:0,bottom:0,opacity:.4,bgImage:"radial-gradient(circle at 1px 1px, var(--chakra-colors-slate-200) 1px, transparent 0)",bgSize:"24px 24px",_dark:{bgImage:"radial-gradient(circle at 1px 1px, var(--chakra-colors-surface-600) 1px, transparent 0)"}}),(0,l.jsx)(s.a,{p:4,borderRadius:"2xl",bg:S,boxShadow:"soft-md",position:"relative",children:(0,l.jsx)(c.I,{as:x.A,boxSize:10,color:y,strokeWidth:1.5})}),(0,l.jsxs)(o.T,{spacing:1.5,position:"relative",children:[(0,l.jsx)(d.E,{fontSize:"lg",fontFamily:"heading",fontWeight:"semibold",color:"text.primary",children:"No posts yet"}),(0,l.jsx)(d.E,{fontSize:"sm",color:"text.muted",textAlign:"center",maxW:"320px",children:"Start creating content for your audience. Posts can be scheduled, drafted, or published immediately."})]}),(0,l.jsx)(h.$,{colorScheme:"accent",leftIcon:(0,l.jsx)(p.A,{size:18}),onClick:()=>u?u():m.push("/posts"),position:"relative",children:"Create Post"})]})}):(0,l.jsx)(n.r,{columns:{base:1,md:2},spacing:5,children:t.map((e,t)=>(0,l.jsx)(U(),{href:"/posts/".concat(e.id),style:{textDecoration:"none"},children:(0,l.jsx)(P,{post:e,index:t})},e.id))})}},14740:(e,t,a)=>{a.d(t,{E:()=>g});var l=a(37876),s=a(14232),r=a(26693),n=a(29185),i=a(75255),o=a(38993),c=a(16674),d=a(56044),h=a(89461),u=a(66394);let x=(0,d.B)("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),p=(0,r.Vg)("skeleton-start-color"),f=(0,r.Vg)("skeleton-end-color"),m=(0,o.i7)({from:{opacity:0}
1,to:{opacity:1}}),y=(0,o.i7)({from:{borderColor:p.reference,background:p.reference},to:{borderColor:f.reference,background:f.reference}}),g=(0,h.R)((e,t)=>{let a={...e,fadeDuration:"number"==typeof e.fadeDuration?e.fadeDuration:.4,speed:"number"==typeof e.speed?e.speed:.8},r=(0,u.V)("Skeleton",a),o=function(){let e=(0,s.useRef)(!0);return(0,s.useEffect)(()=>{e.current=!1},[]),e.current}(),{startColor:h="",endColor:g="",isLoaded:b,fadeDuration:j,speed:v,className:S,fitContent:k,animation:w,...E}=(0,n.M)(a),[z,R]=(0,c.rd)("colors",[h,g]),A=function(e){let t=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{t.current=e},[e]),t.current}(b),T=(0,i.cx)("chakra-skeleton",S),C={...z&&{[p.variable]:z},...R&&{[f.variable]:R}};if(b){let e=o||A?"none":`${m} ${j}s`;return(0,l.jsx)(d.B.div,{ref:t,className:T,__css:{animation:e},...E})}return(0,l.jsx)(x,{ref:t,className:T,...E,__css:{width:k?"fit-content":void 0,...r,...C,_dark:{...r._dark,...C},animation:w||`${v}s linear infinite alternate ${y}`}})});g.displayName="Skeleton"},21355:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(17963).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},25429:(e,t,a)=>{a.d(t,{Z:()=>d});var l=a(37876),s=a(29185),r=a(75255),n=a(4923),i=a(89461),o=a(66394),c=a(56044);let d=(0,i.R)(function(e,t){let{className:a,children:i,direction:d="column",justify:h,align:u,...x}=(0,s.M)(e),p=(0,o.o)("Card",e);return(0,l.jsx)(c.B.div,{ref:t,className:(0,r.cx)("chakra-card",a),__css:{display:"flex",flexDirection:d,justifyContent:h,alignItems:u,position:"relative",minWidth:0,wordWrap:"break-word",...p.container},...x,children:(0,l.jsx)(n.s,{value:p,children:i})})})},34379:(e,t,a)=>{a.d(t,{Y:()=>i,j:()=>n});var l=a(67914),s=a(80192),r=a(73300);let n=e=>{let{organization:t}=(0,s.Z5)();return(0,l.I)({queryKey:["posts",e,null==t?void 0:t.id],queryFn:()=>r.d.list(e),enabled:!!(null==t?void 0:t.id)})},i=e=>{let{organization:t}=(0,s.Z5)();return(0,l.I)({queryKey:["post",e,null==t?void 0:t.id],queryFn:()=>r.d.getById(e),enabled:!!e&&!!(null==t?void 0:t.id)})}},34571:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(17963).A)("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]])},50845:(e,t,a)=>{a.d(t,{E:()=>c});var l=a(37876),s=a(36188),r=a(74715),n=a(89461),i=a(56044);function o(e){return(0,s.bk)(e,e=>"auto"===e?"auto":`span ${e}/span ${e}`)}let c=(0,n.R)(function(e,t){let{area:a,colSpan:s,colStart:n,colEnd:c,rowEnd:d,rowSpan:h,rowStart:u,...x}=e,p=(0,r.o)({gridArea:a,gridColumn:o(s),gridRow:o(h),gridColumnStart:n,gridColumnEnd:c,gridRowStart:u,gridRowEnd:d});return(0,l.jsx)(i.B.div,{ref:t,__css:p,...x})});c.displayName="GridItem"},79247:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(17963).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},88392:(e,t,a)=>{a.d(t,{b:()=>o});var l=a(37876),s=a(75255),r=a(4923),n=a(89461),i=a(56044);let o=(0,n.R)(function(e,t){let{className:a,...n}=e,o=(0,r.Q)();return(0,l.jsx)(i.B.div,{ref:t,className:(0,s.cx)("chakra-card__body",a),__css:o.body,...n})})}}]);
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.