PageSourceSearch

https://velaflow.com/_next/static/chunks/2489-1f4bda313740f04a.js

js velaflow.com collected 2026-10-01 16:24:43 UTC 33,318 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2489],{15234:(e,t,l)=>{l.d(t,{A:()=>i});var s=l(37876),n=l(14232),r=l(96145),a=l(47716);function i(e){let{isOpen:t=!1,onClose:l=()=>{},children:i,header:o,headerClass:c,customWidth:d,childControlsWidth:u=!1,customWidthData:m="max-w-3xl w-full",gifModal:x=!1}=e,[h,p]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{if(t){let e=window.scrollY;document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.width="100%"}else{let e=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,-1*parseInt(e||"0"))}return()=>{document.body.style.position="",document.body.style.top="",document.body.style.width=""}},[t]),(0,n.useEffect)(()=>{let e;return t?p(!0):e=setTimeout(()=>p(!1),200),()=>clearTimeout(e)},[t]),t||h)?(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 transition-opacity duration-200",children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-xl p-6 sm:p-8 relative transform transition-all duration-200\n  ".concat(t?"scale-100 opacity-100":"scale-95 opacity-0","\n  ").concat(u?"w-auto max-w-full":d?m:"max-w-md w-full"),children:[(0,s.jsx)(r.$n,{onClick:l,"aria-label":"Close",className:"absolute right-4 ".concat(x?"top-3":"top-4"," w-9 h-9 flex items-center justify-center rounded-full text-grey hover:bg-greyLight hover:text-black transition-colors"),children:(0,s.jsx)(a.A,{className:"w-5 h-5"})}),o&&(0,s.jsx)(r.DZ,{type:"h2",text:o,className:c||"text-[40px]"}),(0,s.jsx)("div",{children:i})]})}):null}},42489:(e,t,l)=>{l.d(t,{A:()=>p});var s=l(37876),n=l(14232),r=l(96145),a=l(23290);function i(e){var t,l,n,i;let{userDetails:o,session:c,handleComposeModal:d,setPreviewImage:u}=e,{userDetails:m}=(0,a.o)(),x=m||o,h=null==x?void 0:x.user,p=null==x?void 0:x.stats,{first_name:f,last_name:v,username:g}=h||{},{followers_count:b,following_count:w}=p||{},y="".concat(f," ").concat(v),j=(null==c||null==(l=c.user)||null==(t=l.userData)?void 0:t.cover_image)||"/images/leftCardBg.png",N=(null==c||null==(i=c.user)||null==(n=i.userData)?void 0:n.profile_pic)||"/images/profile-image.jpg";return(0,s.jsx)("aside",{className:"lg:flex flex-col w-full min-h-screen border-r px-4 py-6",children:x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow pb-4 mb-8",children:[(0,s.jsx)("div",{className:"relative w-full h-24 rounded-t-[5px] overflow-hidden",children:(0,s.jsx)("div",{className:"absolute inset-0 cursor-pointer",onClick:()=>u({src:j,type:"cover"}),children:(0,s.jsx)(r.Zc,{src:j,alt:"Profile background",fill:!0,className:"object-cover"})})}),(0,s.jsxs)("div",{className:"flex flex-col items-center mt-[-1.5rem]",children:[(0,s.jsx)("div",{className:"cursor-pointer",onClick:()=>u({src:N,type:"profile"}),children:(0,s.jsx)(r.Zc,{src:N,alt:"avatar",width:56,height:56,className:"w-14 z-10 h-14 rounded-full object-cover transform translate-x-1"})}),(0,s.jsxs)(r.N_,{href:"/profile-details",className:"cursor-pointer",children:[(0,s.jsx)(r.DZ,{type:"h4",text:y||"-",className:"mt-2 capitalize text-black text-14 text-center"}),(0,s.jsx)("p",{className:"text-12 text-black text-center",children:"@".concat(g)||0})]}),(0,s.jsxs)("div",{className:"flex justify-center gap-6 mt-5 text-sm",children:[(0,s.jsxs)(r.N_,{href:"/my-followers",className:"flex flex-col items-center cursor-pointer",children:[(0,s.jsx)("span",{className:"text-black text-14",children:b}),(0,s.jsx)("span",{className:"text-black text-12",children:" followers"})]}),(0,s.jsxs)(r.N_,{href:"/my-following",className:"flex flex-col items-center cursor-pointer",children:[(0,s.jsx)("span",{className:"text-black text-14",children:w}),(0,s.jsx)("span",{className:"text-black text-12",children:" following"})]})]})]})]}),(0,s.jsx)(r.$n,{onClick:d,className:"w-full bg-primary hover:bg-blue-700 transition text-white py-2 rounded-md text-14 shadow",children:"New Post"}),(0,s.jsxs)("div",{className:"hidden sm:block mt-4",children:[(0,s.jsxs)("div",{className:"flex gap-6 text-14 text-black",children:[(0,s.jsx)(r.N_,{href:"/settings/about/",className:"hover:cursor-pointer",children:"About us"}),(0,s.jsx)(r.N_,{href:"/settings/help/",className:"hover:cursor-pointer",children:"Contact us"}),(0,s.jsx)(r.N_,{href:"/settings/faq",className:"hover:cursor-pointer",children:"FAQ"})]}),(0,s.jsxs)("div",{className:"flex flex-row justify-normal gap-5 text-14 mt-1 text-black",children:[(0,s.jsx)(r.N_,{href:"/settings/about/privacy-policy",className:"hover:cursor-pointer",children:"Privacy policy"}),(0,s.jsx)(r.N_,{href:"/settings/about/terms-of-services",className:"hover:cursor-pointer",children:"Terms of service"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col text-[14px] sm:hidden mt-4 gap-2",children:[(0,s.jsx)(r.N_,{href:"/settings/about/",className:"hover:cursor-pointer",children:"About us"}),(0,s.jsx)(r.N_,{href:"/settings/help/",className:"hover:cursor-pointer",children:"Contact us"}),(0,s.jsx)(r.N_,{href:"/settings/faq",className:"hover:cursor-pointer",children:"FAQ"}),(0,s.jsx)(r.N_,{href:"/settings/about/privacy-policy",className:"hover:cursor-pointer",children:"Privacy policy"}),(0,s.jsx)(r.N_,{href:"/settings/about/terms-of-services",className:"hover:cursor-pointer",children:"Terms of service"})]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"bg-white rounded-lg shadow pb-4 mb-8",children:(0,s.jsxs)("div",{className:"flex flex-col items-center mt-5",children:[(0,s.jsx)(r.Zc,{src:"/images/velaflow-filled-blue.jpg",alt:"avatar",className:"w-14 h-14"}),(0,s.jsx)(r.DZ,{type:"h4",text:"Join the Conversation",className:"mt-2 text-black text-14"}),(0,s.jsxs)("div",{className:"flex justify-between mt-5",children:[(0,s.jsx)(r.N_,{href:"/signup",className:"hover:cursor-pointer bg-primary text-white px-3 py-1 text-14 rounded-md",children:"Create account"}),(0,s.jsx)(r.N_,{href:"/login",className:"ml-3 hover:cursor-pointer bg-grey text-greyLight px-3 py-1 text-14 rounded-md",children:"Sign in"})]})]})})})})}var o=l(81220),c=l(54587),d=l.n(c);let u=e=>{let{imageSrc:t="/images/erneroy1-banner.png",href:l="https://erneroy.com/"}=e;return(0,s.jsx)("div",{className:"mx-auto",children:(0,s.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer sponsored",className:"group block bg-white rounded-[5px] border border-black/[0.04] shadow-[0_1px_2px_rgba(16,24,40,0.06)] hover:shadow-[0_8px_24px_-6px_rgba(16,24,40,0.12)] transition-shadow duration-300 overflow-hidden",children:(0,s.jsx)("div",{className:"relative w-full aspect-[2157/729] mt-2",children:(0,s.jsx)(d(),{src:t,alt:"Erneroy - Invest. Learn. Grow.",fill:!0,sizes:"(max-width: 768px) 100vw, 700px",className:"object-cover group-hover:scale-[1.02] transition-transform duration-300"})})})})};function m(e){var t,l;let{suggestionList:i={},tagsList:c={}}=e,d=(null==i||null==(t=i.content)?void 0:t.suggestions)||[],m=(null==c||null==(l=c.content)?void 0:l.tags)||[],[x,h]=(0,n.use
1State)(""),[p,f]=(0,n.useState)([]),[v,g]=(0,n.useState)(!1),[b,w]=(0,n.useState)(!1),[y,j]=(0,n.useState)(d),[N,C]=(0,n.useState)({}),{handleFollow:k,isLoading:_}=(0,a.o)(),A=async()=>{let e=await (0,o.ge)({limit:10,offset:0});if(!e.error){var t;j(null==e||null==(t=e.content)?void 0:t.suggestions)}},S=async e=>{let t=null==e?void 0:e.id;C(e),(await k(t)).success&&(j(e=>e.filter(e=>e.id!==t)),A())};return(0,n.useEffect)(()=>{if((null==x?void 0:x.length)<3){g(!1),f([]);return}(async()=>{w(!0),g(!0);try{let t=await (0,o.x5)({limit:10,offset:0,search:x});if(!(null==t?void 0:t.error)){var e;f((null==t||null==(e=t.content)?void 0:e.users)||[])}}finally{w(!1)}})()},[x]),(0,s.jsxs)("aside",{className:"xl:flex flex-col px-4 py-6 h-full",children:[(0,s.jsxs)("div",{className:"flex items-center w-full px-3 py-2 rounded-[10px] bg-gray-100 border transition-all duration-200 text-black placeholder-black",children:[(0,s.jsx)(r.In,{id:"search-icn",width:16,height:16,className:"text-gray-500 mr-2"}),(0,s.jsx)("input",{type:"text",value:x,onChange:e=>{let{value:t}=e.target;h(t.replace(/\s+/g," "))},placeholder:"Search",className:"bg-gray-100 focus:outline-none focus:border-[#2755FF] "}),x&&(0,s.jsx)(r.$n,{type:"button",onClick:()=>h(""),className:"absolute right-3 top-1/2 -translate-y-1/2 ",children:"✕"})]}),v&&!b&&(0,s.jsx)("div",{className:"bg-[#F8F8F8] rounded-[10px] mt-2",children:(null==p?void 0:p.length)>0?null==p?void 0:p.map(e=>(0,s.jsxs)(r.N_,{href:"/profile-details/".concat(null==e?void 0:e.username),className:"flex px-3 items-center text-black pt-2 pb-2 cursor-pointer hover:bg-secondaryNavy hover:text-white hover:rounded-[10px]",children:[(0,s.jsx)(r.Zc,{className:"w-12 h-12 object-cover rounded-full",src:e.profile_pic}),(0,s.jsx)("p",{className:"pl-4 text-12",children:"".concat(e.first_name," ").concat(e.last_name)})]},"id-".concat(e.id))):(0,s.jsx)("h4",{class:"font-normal text-black text-[14px] p-2 ",children:"No accounts found"})}),(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsx)(r.DZ,{type:"h4",text:"Trending",className:"font-normal text-black text-[14px] mb-2"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[null==m?void 0:m.map((e,t)=>{var l;return(0,s.jsx)(r.N_,{href:"/trending/".concat((l=null==e?void 0:e.name)?l.trim().replace(/^#/,""):""),className:"bg-secondaryNavy text-white text-12 px-5 py-2 rounded-[10px]",children:null==e?void 0:e.name},t)}),(null==m?void 0:m.length)===0&&(0,s.jsx)("div",{className:"flex justify-center text-center text-grey text-12",children:"Follow people to see trending tags"})]})]}),(0,s.jsxs)("div",{className:"mt-6 md:sticky md:top-[76px] bg-white pb-4",children:[(0,s.jsx)(r.DZ,{type:"h4",text:"You might know",className:"font-normal text-black text-[14px] mb-2"}),(0,s.jsx)("ul",{className:"space-y-3 text-sm",children:null==y?void 0:y.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-center justify-between mt-2",children:[(0,s.jsxs)(r.N_,{href:"/profile-details/".concat(null==e?void 0:e.username),className:"flex items-center gap-3 cursor-pointer",children:[(0,s.jsx)(r.Zc,{src:null==e?void 0:e.profile_pic,alt:null==e?void 0:e.first_name,className:"rounded-full w-8 h-8 object-cover shadow-sm"}),(0,s.jsxs)("span",{className:"text-[14px] text-black",children:[null==e?void 0:e.first_name," ",null==e?void 0:e.last_name]})]}),(0,s.jsx)(r.$n,{onClick:()=>S(e),className:"pr-5",children:(null==N?void 0:N.id)===(null==e?void 0:e.id)&&_?(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(r.aH,{className:"text-primary"})}):(0,s.jsx)(r.In,{id:"add-follower-icn",className:"text-primary"})})]},t))}),(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(u,{})})]})]})}var x=l(10553),h=l(87704);function p(e){var t;let{children:l,userDetails:o,suggestionList:c={},hideRightSection:u=!1,tagsList:p={}}=e,{data:f}=(0,x.useSession)(),{updateUserDetails:v}=(0,a.o)(),[g,b]=(0,n.useState)(!1),[w,y]=(0,n.useState)(!1),[j,N]=(0,n.useState)(!0),[C,k]=(0,n.useState)(!1),[_,A]=(0,n.useState)(null),S=()=>{k(!C)},E=(0,n.useRef)(0),L=(0,n.useRef)(null);return(0,n.useEffect)(()=>{o&&v(o)},[o,v]),(0,n.useEffect)(()=>(g||w||_?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>document.body.classList.remove("overflow-hidden")),[g,w,_]),(0,n.useEffect)(()=>{let e=()=>{let e=window.scrollY;L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{e>E.current&&e>80?N(!1):N(!0),E.current=e},20)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e),clearTimeout(L.current)}},[]),(0,s.jsxs)("div",{className:"min-h-screen bg-greyLight flex flex-col relative",children:[(0,s.jsxs)("div",{className:"fixed top-0 left-0 w-full z-50 bg-white shadow-md px-4 py-3 flex items-center justify-between md:hidden transition-transform duration-300 ".concat(j?"translate-y-0":"-translate-y-full"),children:[(0,s.jsx)(r.$n,{onClick:()=>void(y(!1),b(!g)),className:"text-gray-700 focus:outline-none",children:(0,s.jsx)(r.In,{id:"hamburger-icn",width:22,height:22})}),(0,s.jsx)(r.N_,{href:"/",className:"flex items-center",children:(0,s.jsx)(r.Zc,{src:"/images/headerLogo.jpg",alt:"
1Velaflow Logo",width:120,height:30,className:"object-contain"})}),(0,s.jsx)(r.$n,{onClick:()=>void(b(!1),y(!w)),className:"text-gray-700 focus:outline-none",children:(0,s.jsx)(r.Zc,{src:(null==o||null==(t=o.user)?void 0:t.profile_pic)||"/images/profile-image.jpg",alt:"User avatar",className:"w-10 h-10 rounded-full"})})]}),(0,s.jsxs)("div",{className:"flex flex-1 relative pt-[60px] md:pt-0 max-w-7xl mx-auto w-full",children:[(0,s.jsx)("div",{className:"\n    fixed inset-y-0 left-0 z-40 bg-white shadow-md w-64 transform transition-transform duration-300 ease-in-out\n    ".concat(g?"translate-x-0":"-translate-x-full","\n    md:translate-x-0 md:sticky md:top-[60px] md:self-start md:shadow-none md:w-1/4 lg:w-1/4\n  "),children:(0,s.jsx)("div",{className:"h-full md:h-auto mt-[50px] md:mt-0 pb-16 md:pb-0",children:(0,s.jsx)(i,{userDetails:o,session:f,handleComposeModal:S,previewImage:_,setPreviewImage:A})})}),g&&(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-30 z-30 md:hidden",onClick:()=>b(!1)}),(0,s.jsx)("div",{className:"\n            flex-1 w-full overflow-x-hidden transition-all duration-300\n            ".concat(u?"md:w-3/4 lg:w-4/5":"md:w-3/4 lg:w-2/4","\n          "),children:l}),!u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"\n    fixed inset-y-0 right-0 z-40 bg-white shadow-md w-64 transform transition-transform duration-300 ease-in-out\n    ".concat(w?"translate-x-0":"translate-x-full","\n    md:translate-x-0 md:static md:shadow-none md:w-1/4 lg:w-1/4\n  "),children:(0,s.jsx)("div",{className:"h-full md:h-full mt-[75px] md:mt-0 pb-16 md:pb-0",children:(0,s.jsx)(m,{suggestionList:c,tagsList:p})})}),w&&(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-30 z-30 md:hidden",onClick:()=>y(!1)})]})]}),(0,s.jsx)(h.A,{isOpen:C,onClose:S}),_&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center",onClick:()=>A(null),children:[(0,s.jsx)("button",{onClick:()=>A(null),className:" absolute top-4 right-4 w-10 h-10 rounded-full border border-[#2755FF] flex items-center justify-center text-white text-xl bg-black/40 hover:bg-black/60 transition",children:"✕"}),(0,s.jsx)(d(),{src:_.src,alt:"Preview",width:300,height:300,onClick:e=>e.stopPropagation(),className:"\n           ".concat("profile"===_.type?"rounded-full w-72 h-72 object-cover":"rounded-lg object-contain w-2/4 h-2/4","\n         ")})]})]})}},61939:(e,t,l)=>{l.d(t,{CZ:()=>s,D6:()=>n,k3:()=>a,t$:()=>r});let s=e=>{if(!e)return null;let t=e.match(/v=([^&]+)/);if(t)return"https://www.youtube.com/embed/".concat(t[1]);let l=e.match(/youtu\.be\/([^?]+)/);if(l)return"https://www.youtube.com/embed/".concat(l[1]);let s=e.match(/shorts\/([^?]+)/);if(s)return"https://www.youtube.com/embed/".concat(s[1]);let n=e.match(/embed\/([^?]+)/);return n?"https://www.youtube.com/embed/".concat(n[1]):null},n=e=>{if(!e)return null;let t=e.match(/instagram\.com\/(?:p|reel|tv)\/([^/?]+)/);if(t){let e=t[1];return"https://www.instagram.com/p/".concat(e,"/embed")}return null},r=e=>!!e&&/^(https?:\/\/)?(www\.)?(youtube\.com|m\.youtube\.com|youtu\.be)\/(watch\?v=|shorts\/)?[A-Za-z0-9_\-]+/.test(e),a=e=>!!e&&/^(https?:\/\/)?(www\.)?(instagram\.com|instagr\.am)\/(p|reel|tv)\/[A-Za-z0-9_\-]+/.test(e)},87704:(e,t,l)=>{l.d(t,{A:()=>S});var s=l(37876),n=l(14232),r=l(15234),a=l(96145),i=l(10553),o=l(81220),c=l(12227);let d=e=>{let{aiModal:t,handleAIModal:l,getAIGeneratedData:i}
1=e,[d,u]=(0,n.useState)(""),[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(""),f=async()=>{x(!0);let e=new FormData;e.append("prompt",d);let t=await (0,o.Kp)(e);if(!t.error){var l;x(!1),p(null==t||null==(l=t.content)?void 0:l.generated_content)}};return(0,n.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),(0,s.jsxs)(r.A,{isOpen:t,onClose:l,customWidth:!0,children:[(0,s.jsx)(a.DZ,{type:"h4",text:"Generate your post through our AI Assistant",className:"text-14 flex justify-center"}),(0,s.jsx)(a.JU,{className:"mt-6 block text-14 text-black font-medium",children:"Prompt"}),(0,s.jsx)(a.pd,{name:"prompt",value:d,onChange:e=>u(e.target.value),placeholder:"Enter your prompt here",className:"mt-2 w-full px-3 py-2 text-12 border border-grey rounded-[5px] focus:outline-none focus:ring-2 focus:ring-blue-500"}),h&&(0,s.jsx)("div",{className:"relative w-full max-w-2xl bg-white rounded-lg shadow-lg p-5 max-h-[50vh] overflow-y-auto",children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)(a.JU,{className:"block text-14 text-black font-medium",children:"Generated Content"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-100 rounded-[5px] text-12",dangerouslySetInnerHTML:{__html:c.A.sanitize(h)}}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(a.$n,{onClick:()=>{u(""),i(h)},className:"text-12 bg-primary px-6 py-3 text-white rounded-[5px] mt-5 ml-2",children:"Use this content"})})]})}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(a.$n,{onClick:f,className:"text-12 bg-primary px-6 py-3 text-white rounded-[5px] mt-5",disabled:m,children:m?(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(a.aH,{})}):"Generate"})})]})};var u=l(18847),m=l.n(u),x=l(49006);function h(e){let{onGifClick:t}=e;return(0,s.jsx)(x.hP,{apiKey:"C0itnBUQAp2G6P6o6HQzjliZOeK9NDPU",children:(0,s.jsx)(p,{onGifClick:t})})}let p=e=>{let{onGifClick:t}=e,{fetchGifs:l,term:r,channelSearch:a,activeChannel:i}
1=(0,n.useContext)(x.o7),[o,c]=(0,n.useState)(3),[d,u]=(0,n.useState)(500);return(0,n.useEffect)(()=>{let e=()=>{let e=window.innerWidth;e<400?(c(2),u(e-32)):e<768?(c(3),u(e-64)):(c(4),u(500))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,s.jsxs)("div",{className:"bg-white max-h-[80vh] overflow-y-auto p-2 rounded-lg shadow-lg w-full sm:max-w-[520px]",children:[(0,s.jsx)("div",{className:"mb-2 px-2",children:(0,s.jsx)(x.IW,{})}),(0,s.jsx)(x.S3,{}),(0,s.jsx)(x.xA,{columns:o,width:d,fetchGifs:l,onGifClick:t,gutter:8},"".concat(a,"-").concat(r,"-").concat(null==i?void 0:i.user.username))]})};var f=l(95062),v=l.n(f);let g=(0,n.forwardRef)((e,t)=>{let{textValue:l,setTextValue:r,isCommentOnPost:a,isCommentOnComment:i,linkPreviewJSX:o}=e,c=(0,n.useRef)(null),d=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=c.current;e&&e.innerHTML!==l&&(e.innerHTML=l||"")},[l]);let u=()=>{let e=window.getSelection();e&&e.rangeCount>0&&(d.current=e.getRangeAt(0))};return(0,n.useImperativeHandle)(t,()=>({insertEmoji(e){let t=c.current;t.focus();let l=window.getSelection(),s=d.current;s||((s=document.createRange()).selectNodeContents(t),s.collapse(!1)),l.removeAllRanges(),l.addRange(s);let n=document.createTextNode(e);s.insertNode(n),s.setStartAfter(n),s.collapse(!0),l.removeAllRanges(),l.addRange(s),d.current=s,r(t.innerHTML)}})),(0,s.jsxs)("div",{className:"max-h-64 overflow-y-auto modern-scroll",children:[(0,s.jsx)("div",{ref:c,contentEditable:!0,suppressContentEditableWarning:!0,onInput:e=>{r(e.currentTarget.innerHTML),u()},onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){e.preventDefault();let t=window.getSelection(),l=t.getRangeAt(0),s=document.createElement("br");l.insertNode(s),l.setStartAfter(s),l.collapse(!0),t.removeAllRanges(),t.addRange(l),r(e.currentTarget.innerHTML)}},onKeyUp:()=>u(),onMouseUp:()=>u(),className:"w-full p-3 text-12 text-black rounded focus:outline-none ".concat(a||i?"":"min-h-64 border"),"data-placeholder":a||i?"Post your reply":"Enter your thoughts here..."}),o]})});g.displayName="EditableTextarea",g.propTypes={textValue:v().string.isRequired,setTextValue:v().func.isRequired,isCommentOnPost:v().bool,isCommentOnComment:v().bool};var b=l(82103),w=l(63065),y=l(23582),j=l(61939),N=l(97685),C=l(54587),k=l.n(C);let _=m()(()=>Promise.all([l.e(504),l.e(67)]).then(l.bind(l,90067)),{loadableGenerated:{webpack:()=>[90067]},ssr:!1}),A={title:"",description:"",image:"",url:"",isLinkAdded:!1},S=e=>{var t,l;let{isOpen:c=!1,onClose:u=()=>{},selectedPost:m={},commentOn:x="",isEditPost:p=!1,post:f={},handleEditSuccess:v=()=>{}}=e,C="post"===x,S="comment"===x,{data:E}=(0,i.useSession)(),L=null==E||null==(t=E.user)?void 0:t.userData,D=(0,n.useRef)(null),[R,T]=(0,n.use
1State)([]),[Z,z]=(0,n.useState)([]),[F,P]=(0,n.useState)(""),[H,I]=(0,n.useState)(!1),$=(0,n.useRef)(null),[G,M]=(0,n.useState)(!1),[U,V]=(0,n.useState)(!1),[O,W]=(0,n.useState)([]),[Y,K]=(0,n.useState)(!1),[q,B]=(0,n.useState)(A),[J,Q]=(0,n.useState)(!1),[X,ee]=(0,n.useState)([]),[et,el]=(0,n.useState)(0),[es,en]=(0,n.useState)(!1),er=e=>{T([]),z([]),P(""),B(A),I(!1),u(e)};(0,n.useEffect)(()=>{if(c){let e=window.scrollY;document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.left="0",document.body.style.right="0",document.body.style.overflow="hidden",document.body.style.width="100%"}else{let e=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.overflow="",document.body.style.width="",window.scrollTo(0,-1*parseInt(e||"0"))}return()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.overflow="",document.body.style.width=""}},[c]);let ea=n.useCallback(async(e,t)=>{try{let a=await (0,o.Yw)({url:e});if(!a.error){var l,s,n,r;B({url:null==a||null==(l=a.content)?void 0:l.url,title:null==a||null==(s=a.content)?void 0:s.title,description:null==a||null==(n=a.content)?void 0:n.description,image:null==a||null==(r=a.content)?void 0:r.image,isLinkAdded:!0,isYoutubeOrInstaLink:t}),ee([])}}catch(e){ee(["Failed to fetch link preview"])}finally{Q(!1)}},[]);(0,n.useEffect)(()=>{if(q.isLinkAdded)return;let e=(e=>{if(!e)return null;let t="string"==typeof e?e:String(e);if(!t.includes("http"))return null;let l=t.replace(/<[^>]*>/g,"").match(/(https?:\/\/[^\s]+)/);return l?l[0]:null})(F);if(!e)return void B(A);let t=(0,j.t$)(e)||(0,j.k3)(e);Q(!0),ea(e,t)},[F,q.isLinkAdded,ea]),(0,n.useEffect)(()=>{if(p&&f){var e;P(f.content||""),W(f.media||[]),z((null==(e=f.media)?void 0:e.map(e=>e.url))||[]),T([]),B((null==f?void 0:f.link_url)?{title:null==f?void 0:f.link_title,description:null==f?void 0:f.link_description,image:null==f?void 0:f.link_image,url:null==f?void 0:f.url,isLinkAdded:!0}:A)}},[p,f]);let ei=e=>{let t=Array.from(e.target.files).filter(e=>!(e.size>0x40000000)||(alert("".concat(e.name," exceeds the 1GB limit.")),!1));T(e=>[...e,...t])},eo=()=>{D.current.click()},ec=()=>{V(!U)},ed=async()=>{let e;en(!0),el(0),I(!0);let t=new FormData;if(t.append("".concat(C||S?"comment":"content"),F),t.append("title",(e=>e.length<=50?e:e.slice(0,50))(F)),q.isLinkAdded&&(t.append("link_title",q.title),t.append("link_description",q.description),t.append("link_image",q.image),t.append("link_url",q.url)),C&&(e=null==m?void 0:m.id,t.delete("title")),S&&(e=null==m?void 0:m.post_id,t.append("parent_comment_id",null==m?void 0:m.id)),p&&(e=null==f?void 0:f.id),(null==R?void 0:R.length)>0&&R.forEach(e=>{t.append("media[]",e)}),p)(await (0,o.lD)(t,e)).error?I(!1):(I(!1),v());else{var l,s,n,r,a,i,c,d,u;try{let r=C||S?await (0,o.tP)(t,e,el):await (0,o.pD)(t,el);en(!1),el(100),(null==r||null==(l=r.data)?void 0:l.error)?(I(!1),N.Ay.error(null==r||null==(n=r.data)?void 0:n.message)):(N.Ay.success(null==r||null==(s=r.data)?void 0:s.message),I(!1),er("added"))}catch(e){I(!1),(null==e||null==(a=e.response)||null==(r=a.data)?void 0:r.errors)?Object.values(e.response.data.errors).forEach(e=>{e.forEach(e=>N.Ay.error(e))}):(null==e||null==(c=e.response)||null==(i=c.data)?void 0:i.message)&&N.Ay.error(null==e||null==(u=e.response)||null==(d=u.data)?void 0:d.message),en(!1),el(0),console.error("Upload failed:",e)}}};(0,n.useEffect)(()=>{let e=e=>{$.current&&!$.current.contains(e.target)&&M(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);let eu=e=>{ev.current&&ev.current.insertEmoji(e.native||e),M(!1)},em=async(e,t)=>{t.preventDefault();let l=e.images.original.url,s=await fetch(l),n=new File([await s.blob()],"giphy-".concat(Date.now(),".gif"),{type:"image/gif"});T(e=>[...e,n]),V(!1)},ex=()=>{K(!Y)},eh=e=>{P(e),K(!1)};(0,n.useEffect)(()=>{if(!R.length)return void z([]);let e=R.map(e=>URL.createObjectURL(e));return z(e),()=>
1{e.forEach(e=>URL.revokeObjectURL(e))}},[R]);let ep=(0,s.jsxs)(s.Fragment,{children:[J&&(0,s.jsx)("div",{className:"mt-3 text-grey flex justify-center",children:(0,s.jsx)(a.aH,{className:"text-grey"})}),(null==q?void 0:q.isLinkAdded)&&(0,s.jsxs)("div",{className:"relative mt-3 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition",children:[(0,s.jsx)(a.$n,{onClick:()=>B(A),className:"absolute right-2 top-2 bg-black/50 text-white text-xs p-1 rounded-full hover:bg-black/70 transition",children:"✕"}),(0,s.jsxs)("a",{href:null==q?void 0:q.url,target:"_blank",rel:"noopener noreferrer",className:"block",children:[(null==q?void 0:q.image)&&!(0,j.t$)(null==q?void 0:q.url)&&(0,s.jsx)(k(),{width:300,height:300,src:null==q?void 0:q.image,alt:"preview",className:"object-cover w-full h-72 rounded-t-lg"}),(null==q?void 0:q.isYoutubeOrInstaLink)&&(0,s.jsx)("iframe",{width:(0,j.t$)(null==q?void 0:q.url)?"560":"100%",height:(0,j.t$)(null==q?void 0:q.url)?"315":"15",src:(0,j.CZ)(null==q?void 0:q.url),title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0}),(0,s.jsxs)("div",{className:"p-3",children:[(0,s.jsx)("div",{className:"text-sm font-semibold",children:null==q?void 0:q.title}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1 line-clamp-2",children:null==q?void 0:q.description})]})]})]})]}),ef=(null==F||null==(l=F.trim())?void 0:l.length)===0&&(null==R?void 0:R.length)===0,ev=(0,n.useRef)(null),eg=()=>(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)("div",{children:(0,s.jsx)(a.Zc,{src:(null==L?void 0:L.profile_pic)||"/image/profile-image.jpg",alt:null==L?void 0:L.first_name,className:"h-12 w-12 rounded-full object-cover"})}),(0,s.jsxs)("div",{className:"w-full p-3",children:[(0,s.jsx)(g,{ref:ev,textValue:F,setTextValue:P,isCommentOnPost:C,isCommentOnComment:S,linkPreviewJSX:ep}),es&&(null==R?void 0:R.length)>0&&(0,s.jsxs)("div",{className:"mt-3 w-full",children:[(0,s.jsxs)("div",{className:"text-sm mb-1 text-gray-700",children:["Uploading ",(null==R?void 0:R.length)>1?"files":"file","..."," ",et,"%"]}),(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:(0,s.jsx)("div",{className:"bg-primary h-full transition-all duration-150",style:{width:"".concat(et,"%")}})})]}),(null==X?void 0:X.length)>0?(0,s.jsx)("div",{className:"text-red text-12",children:null==X?void 0:X.map((e,t)=>(0,s.jsx)("p",{children:e},"x-".concat(t)))}):null,(0,s.jsxs)("div",{className:"flex flex-wrap gap-4 mt-4 max-h-20 overflow-y-auto modern-scroll",children:[p&&O.length>0&&O.map((e,t)=>"video"===e.media_type?(0,s.jsx)("video",{src:e.url,controls:!0,className:"w-32 h-32 rounded border shadow object-cover"},"existing-video-".concat(e.id)):(0,s.jsx)(a.Zc,{src:e.url,alt:"Existing ".concat(t),className:"w-32 h-32 object-cover rounded border shadow"},"existing-image-".concat(e.id))),R.map((e,t)=>{let l=e.type.startsWith("video/"),n=Z[t+O.length];return(0,s.jsxs)("div",{className:"relative w-32 h-32",children:[l?(0,s.jsx)("video",{src:n,controls:!0,className:"w-full h-full rounded border shadow object-cover"}):(0,s.jsx)(a.Zc,{src:n,alt:"New ".concat(t),className:"w-full h-full object-cover rounded border shadow"}),(0,s.jsx)("button",{onClick:()=>(e=>{T(t=>t.filter((t,l)=>l!==e)),z(t=>t.filter((t,l)=>l!==O.length+e))})(t),className:"absolute top-1 right-1 bg-black/60 hover:bg-black/80 text-white rounded-full w-5 h-5 flex items-center justify-center text-xs",title:"Remove",children:"✕"})]},"preview-".concat(t))})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4 mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)(a.pd,{type:"file",accept:"image/*, video/*",multiple:!0,ref:D,onChange:ei,className:"hidden"}),(0,s.jsx)("button",{type:"button",onClick:eo,"aria-label":"Add photo",className:"w-9 h-9 flex items-center justify-center rounded-full text-grey hover:bg-primary/10 hover:text-primary transition-colors",children:(0,s.jsx)(b.A,{className:"w-5 h-5"})})]}),(0,s.jsxs)("span",{children:[(0,s.jsx)(a.pd,{type:"file",accept:"image/*, video/*",multiple:!0,ref:D,onChange:ei,className:"hidden"}),(0,s.jsx)("button",{type:"button",onClick:eo,"aria-label":"Add video",className:"w-9 h-9 flex items-center justify-center rounded-full text-grey hover:bg-primary/10 hover:text-primary transition-colors",children:(0,s.jsx)(w.A,{className:"w-5 h-5"})})]}),(0,s.jsxs)("span",{className:"relative inline-block",ref:$,children:[(0,s.jsx)("button",{type:"button",onClick:()=>M(e=>!e),"aria-label":"Add emoji",className:"w-9 h-9 flex items-center justify-center rounded-full text-grey hover:bg-primary/10 hover:text-primary transition-colors",children:(0,s.jsx)(y.A,{className:"w-5 h-5"})}),G&&(0,s.jsx)("div",{className:"absolute z-50 left-0 max-w-[full] w-screen bottom-full mb-2",children:(0,s.jsx)(_,{onEmojiSelect:eu})})]}),(0,s.jsx)("button",{type:"button",onClick:ec,"aria-label":"Add GIF",className:"w-9 h-9 flex items-center justify-center rounded-full text-grey hover:bg-primary/10 hover:text-primary transition-colors",children:(0,s.jsx)("svg",{width:"22",height:"13",viewBox:"0 0 29 17",fill:"none",children:(0,s.jsx)("path",{d:"M15.9216 0.566667V16.4333C15.9216 16.5836 15.861
17 16.7278 15.755 16.834C15.6484 16.9403 15.5038 17 15.3529 17C15.2021 17 15.0575 16.9403 14.9509 16.834C14.8442 16.7278 14.7843 16.5836 14.7843 16.4333V0.566667C14.7843 0.416377 14.8442 0.272243 14.9509 0.165972C15.0575 0.0597018 15.2021 0 15.3529 0C15.5038 0 15.6484 0.0597018 15.755 0.165972C15.8617 0.272243 15.9216 0.416377 15.9216 0.566667ZM28.4314 0H21.6078C21.457 7.51379e-06 21.3124 0.0597121 21.2058 0.165981C21.0991 0.27225 21.0392 0.41638 21.0392 0.566667V16.4333C21.0392 16.5836 21.0991 16.7278 21.2058 16.834C21.3124 16.9403 21.457 17 21.6078 17C21.7587 17 21.9033 16.9403 22.0099 16.834C22.1166 16.7278 22.1765 16.5836 22.1765 16.4333V9.06667H26.7255C26.8763 9.06667 27.0209 9.00696 27.1276 8.90069C27.2342 8.79442 27.2941 8.65029 27.2941 8.5C27.2941 8.34971 27.2342 8.20558 27.1276 8.09931C27.0209 7.99304 26.8763 7.93333 26.7255 7.93333H22.1765V1.13333H28.4314C28.5822 1.13333 28.7268 1.07363 28.8335 0.967361C28.9401 0.86109 29 0.716956 29 0.566667C29 0.416377 28.9401 0.272243 28.8335 0.165972C28.7268 0.0597018 28.5822 0 28.4314 0ZM9.66667 7.93333H6.2549C6.10409 7.93333 5.95946 7.99304 5.85282 8.09931C5.74618 8.20558 5.68627 8.34971 5.68627 8.5C5.68627 8.65029 5.74618 8.79442 5.85282 8.90069C5.95946 9.00696 6.10409 9.06667 6.2549 9.06667H9.09804V11.9C9.09804 12.952 8.67868 13.961 7.93221 14.7049C7.18574 15.4488 6.17331 15.8667 5.11765 15.8667C4.06198 15.8667 3.04955 15.4488 2.30309 14.7049C1.55662 13.961 1.13725 12.952 1.13725 11.9V5.1C1.13741 4.13452 1.49085 3.20223 2.13135 2.47783C2.77184 1.75344 3.65543 1.28666 4.61652 1.16497C5.57762 1.04329 6.55026 1.27504 7.35218 1.8168C8.1541 2.35856 8.73025 3.17315 8.97268 4.10792C9.01072 4.25299 9.10489 4.37712 9.23458 4.45314C9.36427 4.52915 9.51891 4.55085 9.66462 4.51347C9.81033 4.4761 9.93524 4.38271 10.012 4.25374C10.0887 4.12478 10.1111 3.97076 10.0741 3.82542C9.76266 2.62344 9.02203 1.57592 7.99104 0.879175C6.96005 0.182431 5.70947 -0.115705 4.47369 0.0406468C3.23792 0.196998 2.10177 0.797103 1.27821 1.72849C0.454636 2.65987 0.000174911 3.8586 0 5.1V11.9C0 13.2526 0.539179 14.5498 1.49892 15.5062C2.45867 16.4627 3.76036 17 5.11765 17C6.47493 17 7.77662 16.4627 8.73637 15.5062C9.69611 14.5498 10.2353 13.2526 10.2353 11.9V8.5C10.2353 8.34971 10.1754 8.20558 10.0687 8.09931C9.9621 7.99305 9.81747 7.93334 9.66667 7.93333Z",fill:"currentColor"})})}),(0,s.jsx)(r.A,{isOpen:U,onClose:ec,customWidth:!0,customWidthData:"",gifModal:!0,children:U&&(0,s.jsx)("div",{className:"z-50 w-screen sm:w-auto max-w-[90vw] sm:max-w-[520px]",children:(0,s.jsx)(h,{onGifClick:em})})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(a.$n,{onClick:ed,disabled:ef||H,className:"text-14 font-medium bg-primary px-6 py-2 text-white rounded-full hover:bg-blue-700 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:H?(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(a.aH,{})}):"Post"}),""===x&&(0,s.jsx)(a.$n,{disabled:H,onClick:ex,className:"rounded-full disabled:cursor-not-allowed disabled:text-grey px-3 py-2 text-12 text-primary hover:bg-primary/10 transition-colors",children:"Generate with AI"})]}),Y&&(0,s.jsx)(d,{aiModal:Y,handleAIModal:ex,getAIGeneratedData:eh})]})]})]});return C||S?(0,s.jsx)("div",{children:eg()}):(0,s.jsx)(r.A,{isOpen:c,onClose:H?()=>{}:er,customWidth:!0,className:"overscroll-contain",children:(0,s.jsx)("div",{className:"min-h-64 mt-6",children:eg()})})}}}]);

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.