PageSourceSearch

https://cofounderslab.com/_next/static/chunks/7134-d5a3cc0238dd5642.js

js cofounderslab.com collected 2026-09-24 18:02:27 UTC 16,932 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7134],{27134:function(e,s,t){t.d(s,{Z:function(){return C}});var n=t(47568),l=t(26042),i=t(69396),r=t(20414),a=t(85893),o=t(72510),d=t(11355),c=t(67294);let u=c.forwardRef(function(e,s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});var x=t(44740);let m=c.forwardRef(function(e,s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),c.createElement("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}))}),f=c.forwardRef(function(e,s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),c.createElement("path",{fillRule:"evenodd",d:"M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z",clipRule:"evenodd"}))}),v=c.forwardRef(function(e,s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),c.createElement("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}),h=c.forwardRef(function(e,s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),c.createElement("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))});var p=t(8433),g=t(30381),j=t.n(g),w=t(11163),y=t(87536),b=t(95591),N=t(84513),Z=t(84193),_=t(61139),k=t(33206),T=t(46516),E=t(97200),M=t(59967),R=function(e){var s,t,o=e.discussion,d=(0,N.Z)(),c=d.loading,x=d.user,m=(0,b.kY)().mutate,f=(0,y.cI)({defaultValues:{discussion:null==o?void 0:o.id,body:""}}),v=f.register,h=f.handleSubmit,g=f.formState,j=f.reset,w=g.isSubmitting,T=g.isDirty,E=(t=(0,n.Z)(function(e){var s,t;return(0,r.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,p.Z.post("".concat(k.TP,"/api/session/discussion-replies"),e)];case 1:return n.sent(),j(),m("/discussion-replies?discussion=".concat(o.id)),(0,M.x9)("Your reply was posted"),[3,3];case 2:return s=n.sent(),(0,M._N)(null===(t=s.response.data)||void 0===t?void 0:t.message),[3,3];case 3:return[2]}})}),function(e){return t.apply(this,arguments)});return c?(0,a.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,a.jsx)("div",{className:"h-32 w-32 animate-spin rounded-full border-b-2 border-t-2 border-blue-600"})}):x?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-6 flex flex-col items-center",children:[(0,a.jsx)("hr",{className:"w-full"}),(0,a.jsx)("span",{className:"mx-auto -mt-3 flex h-6 items-center justify-center rounded-full border bg-white px-3 text-xs text-blue-600",children:(0,a.jsx)(u,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,a.jsxs)("form",{onSubmit:h(E),className:"flex flex-wrap items-center space-x-4 rounded-md px-2 py-1 focus-within:bg-gray-50 hover:bg-gray-50 xs:flex-nowrap sm:flex-nowrap sm:px-3 sm:py-2 md:px-4 md:py-3",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)(Z.Z,{href:"/profile/".concat(null==x?void 0:null===(s=x.profile)||void 0===s?void 0:s.slug),children:(0,a.jsx)(_.Z,{className:"h-10 w-10 overflow-hidden rounded-full",profile:null==x?void 0:x.profile})})}
1),(0,a.jsx)("div",{className:"w-full flex-grow sm:w-auto",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-end sm:space-x-3",children:[(0,a.jsx)("textarea",(0,i.Z)((0,l.Z)({},v("body",{required:!0})),{disabled:!o,className:"w-full flex-grow resize-none rounded border-gray-300 px-3 text-sm sm:w-auto",placeholder:"Type a comment",rows:2})),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"submit",disabled:!o||w||!T,className:"inline-flex items-center justify-center rounded-md border border-transparent bg-[#377DFF] px-4 py-2.5 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:bg-gray-500",children:"Comment"})})]})})]})]}):null},Y=function(e){var s,t,l,i,o,d,u,x,m,f=e.data,v=(0,N.Z)(),h=(v.loading,v.user),g=(0,c.useState)(!1),w=(g[0],g[1]),y=(0,c.useState)(!1),b=(y[0],y[1]);return(0,c.useEffect)(function(){if(h&&f){var e,s,t,n;(null==f?void 0:null===(e=f.upvotes)||void 0===e?void 0:e.includes(null==h?void 0:null===(s=h.profile)||void 0===s?void 0:s.id))?w(!0):w(!1),(null==f?void 0:null===(t=f.downvotes)||void 0===t?void 0:t.includes(null==h?void 0:null===(n=h.profile)||void 0===n?void 0:n.id))?b(!0):b(!1)}},[h,f]),(0,n.Z)(function(){var e;return(0,r.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,p.Z.post("".concat(k.TP,"/api/session/discussion-replies/").concat(null==f?void 0:f.id,"/vote"),{score:1})];case 1:return s.sent(),(0,M.x9)("You upvoted this comment"),[3,3];case 2:return e=s.sent(),(0,M._N)(e.message),[3,3];case 3:return[2]}})}),(0,n.Z)(function(){var e;return(0,r.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,p.Z.post("".concat(k.TP,"/api/session/discussion-replies/").concat(null==f?void 0:f.id,"/vote"),{score:-1})];case 1:return s.sent(),(0,M.x9)("You downvoted this comment"),[3,3];case 2:return e=s.sent(),(0,M._N)(e.message),[3,3];case 3:return[2]}})}),(0,n.Z)(function(){var e;return(0,r.__generator)(this,function(s){switch(s.label){case 0:if(!0!=confirm("Are you sure you want to delete this comment?"))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,p.Z.delete("".concat(k.TP,"/api/session/discussion-replies/").concat(null==f?void 0:f.id))];case 2:return s.sent(),(0,M.x9)("You deleted this comment"),[3,4];case 3:return e=s.sent(),(0,M._N)(e.message),[3,4];case 4:return[2]}})}),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex space-x-4 rounded-md px-4 py-3 hover:bg-gray-50",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)(Z.Z,{href:h?"/profile/".concat(null==f?void 0:null===(s=f.profile)||void 0===s?void 0:s.slug):"/login",children:(0,a.jsx)(_.Z,{className:"h-10 w-10 overflow-hidden rounded-full",profile:null==f?void 0:f.profile})})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"-mt-1 flex space-x-4",children:(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"flex items-center space-x-4",children:[(0,a.jsx)(Z.Z,{href:h?"/profile/".concat(null==f?void 0:null===(t=f.profile)||void 0===t?void 0:t.slug):"/login",className:"heading-text text-sm font-semibold hover:underline",children:"".concat(null==f?void 0:null===(l=f.profile)||void 0===l?void 0:l.firstName," ").concat(null==f?void 0:null===(i=f.profile)||void 0===i?void 0:i.lastName)}),(null==f?void 0:null===(o=f.profile)||void 0===o?void 0:o.cflTeam)&&(0,a.jsx)("span",{className:"inline-flex items-center rounded bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800",children:"CoFoundersLab Team"}),(0,a.jsx)("time",{dateTime:null==f?void 0:f.createdAt,title:j()(null==f?void 0:f.createdAt).format("MMMM Do YYYY"),className:"body-text text-xs",children:j()(null==f?void 0:f.createdAt).fromNow()})]}),(0,a.jsx)("p",{className:"text-sm text-gray-500 xl:sr-only",children:null==f?void 0:null===(d=f.profile)||void 0===d?void 0:d.tagline})]})}),(0,a.jsx)("div",{className:"heading-text mt-4 text-sm",dangerouslySetInnerHTML:{__html:null==f?void 0:f.body}}),(0,a.jsxs)("div",{className:"body-text mt-3 flex space-x-6 text-xs",children:[(0,a.jsx)("div",{className:"cursor-pointer hover:underline",children:"Like"}),(0,a.jsx)("div",{className:"cursor-pointer hover:underline",children:"Reply"})]})]})]})})};function C(e){var s,t,l,i,u,g,y,C,A=e.data,L=e.loadReplies,F=e.loadVotes,S=e.allowReply,P=(0,w.useRouter)(),z=(0,N.Z)(),B=(z.loading,z.user),D=(0,c.useState)(!1),I=D[0],V=D[1],O=(0,c.useState)(!1),H=O[0],q=O[1],K=(0,b.ZP)(L&&A?"/discussion-replies?discussion=".concat(null==A?void 0:A.id):null,T.h6).data,W=(0,c.useState)(!0),G=W[0],J=W[1],Q=P.query.rid,U=function(){var e=document.getElementById(Q);window.scrollTo({top:null==e?void 0:e.offsetTop,behavior:"smooth"})};(0,c.useEffect)(function(){void 0!==Q&&G&&(null==K?void 0:K.length)>0&&(setTimeout(U,0),J(!1))},[K]),(0,c.useEffect)(function(){if(B&&A){var e,s,t,n;(null==A?void 0:null===(e=A.upvotes)||void 0===e?void 0:e.includes(null==B?void 0:null===(s=B.profile)||void 0===s?void 0:s.id))?V(!0):V(!1),(null==A?void 0:null===(t=A.downvotes)||void 0===t?void 0:t.includes(null==B?void 0:null===(n=B.profile)||void 0===n?void 0:n.id))?q(!0):q(!1)}},[B,A]);var X,$,ee=(C=(0,n.Z)(function(){var e;return(0,r.__generator)(this,function(s){switch(s.label){case 0:if(!B)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,p.Z.post("".concat(k.TP,"/api/session/discussions/").concat(null==A?void 0:A.id,"/vote"),{score:1})];
1case 2:return s.sent(),(0,M.x9)("You upvoted this discussion"),[3,4];case 3:return e=s.sent(),(0,M._N)(e.message),[3,4];case 4:return[3,6];case 5:P.push("/login"),s.label=6;case 6:return[2]}})}),function(){return C.apply(this,arguments)}),es=(X=(0,n.Z)(function(){var e;return(0,r.__generator)(this,function(s){switch(s.label){case 0:if(!B)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,p.Z.post("".concat(k.TP,"/api/session/discussions/").concat(null==A?void 0:A.id,"/vote"),{score:-1})];case 2:return s.sent(),(0,M.x9)("You downvoted this discussion"),[3,4];case 3:return e=s.sent(),(0,M._N)(e.message),[3,4];case 4:return[3,6];case 5:P.push("/login"),s.label=6;case 6:return[2]}})}),function(){return X.apply(this,arguments)}),et=($=(0,n.Z)(function(){var e;return(0,r.__generator)(this,function(s){switch(s.label){case 0:if(!0!=confirm("Are you sure you want to delete this discussion?"))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,p.Z.delete("".concat(k.TP,"/api/session/discussions/").concat(null==A?void 0:A.id))];case 2:return s.sent(),(0,M.x9)("You deleted this discussion"),[3,4];case 3:return e=s.sent(),(0,M._N)(e.message),[3,4];case 4:return[2]}})}),function(){return $.apply(this,arguments)});return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("article",{className:"bg-white px-4 py-6 shadow sm:rounded-lg sm:p-6","aria-labelledby":"question-title-"+(null==A?void 0:A.id),children:[(0,a.jsxs)("div",{className:"flex space-x-3",children:[(0,a.jsx)("h2",{id:"question-title-"+(null==A?void 0:A.id),className:"min-w-0 flex-1",children:(0,a.jsx)(Z.Z,{href:B?"/discuss/".concat(null==A?void 0:A.slug):"/login",className:"text-lg font-bold text-[#4E5D78] hover:underline",children:null==A?void 0:A.title})}),(0,a.jsx)("div",{className:"mt-1 flex flex-shrink-0 self-start",children:(0,a.jsxs)(o.v,{as:"div",className:"relative inline-block text-left",children:[(0,a.jsx)("div",{}),(0,a.jsx)(d.u,{as:c.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,a.jsx)(o.v.Items,{className:"absolute right-0 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:(0,a.jsxs)("div",{className:"py-1",children:[(0,a.jsx)(o.v.Item,{children:function(e){var s=e.active;return(0,a.jsxs)("a",{href:"#",className:(0,E.AK)(s?"bg-gray-100 text-gray-900":"text-gray-700","flex px-4 py-2 text-sm"),children:[(0,a.jsx)(m,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),(0,a.jsx)("span",{children:"Add to favorites"})]})}}),(0,a.jsx)(o.v.Item,{children:function(e){var s=e.active;return(0,a.jsxs)("a",{href:"#",className:(0,E.AK)(s?"bg-gray-100 text-gray-900":"text-gray-700","flex px-4 py-2 text-sm"),children:[(0,a.jsx)(f,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),(0,a.jsx)("span",{children:"Report content"})]})}})]})})})]})})]}),(0,a.jsxs)("div",{className:"my-4 flex space-x-3 ".concat(F?"":"sr-only"),children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)(Z.Z,{href:B?"/profile/".concat(null==A?void 0:null===(s=A.profile)||void 0===s?void 0:s.slug):"/login",children:(0,a.jsx)(_.Z,{className:"h-10 w-10 overflow-hidden rounded-full",profile:null==A?void 0:A.profile})})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"flex space-x-4",children:[(0,a.jsx)(Z.Z,{href:B?"/profile/".concat(null==A?void 0:null===(t=A.profile)||void 0===t?void 0:t.slug):"/login",className:"text-base font-bold text-[#4E5D78] hover:underline",children:"".concat(null==A?void 0:null===(l=A.profile)||void 0===l?void 0:l.firstName," ").concat(null==A?void 0:null===(i=A.profile)||void 0===i?void 0:i.lastName)}),(null==A?void 0:null===(u=A.profile)||void 0===u?void 0:u.cflTeam)&&(0,a.jsx)("span",{className:"inline-flex items-center rounded bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800",children:"CoFoundersLab Team"}),(0,a.jsx)("time",{dateTime:null==A?void 0:A.createdAt,title:j()(null==A?void 0:A.createdAt).format("MMMM Do YYYY"),className:"text-sm text-gray-500",children:j()(null==A?void 0:A.createdAt).fromNow()})]}),(0,a.jsx)("p",{className:"text-base text-[#4e5d7899]",children:null==A?void 0:null===(g=A.profile)||void 0===g?void 0:g.tagline})]})]}),(0,a.jsx)("div",{className:"mt-2 space-y-4 text-lg font-medium text-[#4e5d7899]",dangerouslySetInnerHTML:{__html:null==A?void 0:A.body}}),F&&(0,a.jsx)("div",{className:"mt-6 flex justify-between space-x-8",children:(0,a.jsxs)("div",{className:"flex space-x-6",children:[(0,a.jsx)("span",{className:"inline-flex items-center text-sm",children:(0,a.jsx)("button",{type:"button",onClick:ee,className:(0,E.AK)(I?"text-blue-600 hover:text-blue-300":"text-gray-500 hover:text-blue-300","inline-flex space-x-2"),children:(0,a.jsx)(v,{className:"h-5 w-5","aria-hidden":"true"})})}),(0,a.jsxs)("span",{className:"inline-flex items-center text-sm",children:[(0,a.jsx)("span",{className:"font-medium text-gray-500 hover:text-gray-800",children:null==A?void 0:A.score}),(0,a.jsx)("span",{className:"sr-only",children:"upvotes"})]}),(0,a.jsx)("span",{className:"inline-flex items-center text-sm",children:(0,a.jsx)("button",{type:"button",onClick:es,className:(0,E.AK)(H?"text-blue-600 hover:text-blue-300":"text-gray-500 hover:text-blue-300","inline-flex space-x-2"),children:(0,a.jsx)(h,{className:"h-5 w-5","aria-hidden":"true"})})}),(0,a.jsx)("span",{className:"inline-flex items-center text-sm",children:(0,a.jsxs)(Z.Z,{href:B?"/discuss/".concat(null==A?void 0:A.slug):"/login",className:"inline-flex space-x-2 font-medium text-gray-500 hover:text-gray-500",children:[(0,a.jsx)(x.Z,{className:"h-5 w-5","aria-hidden":"true"}),(0,a.jsx)("span",{children:null==A?void 0:A.repliesCount}),(0,a.jsx)("span",{className:"sr-only",children:"replies"})]})}),(null==B?void 0:null===(y=B.profile)||void 0===y?void 0:y.cflTeam)&&(0,a.jsx)("span",{className:"inline-flex items-center text-sm",children:(0,a.jsx)("button",{type:"button",onClick:et,className:"inline-flex space-x-2 text-gray-500 hover:text-blue-300",children:"Delete"})})]})}),S&&(0,a.jsx)(R,{discussion:A}),K&&K.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-6 flex flex-col items-center",children:[(0,a.jsx)("hr",{className:"w-full"}),(0,a.jsx)("span",{className:"mx-auto -mt-3 flex h-6 items-center justify-center rounded-full border bg-white px-3 text-xs text-blue-600",children:(0,a.jsx)(x.Z,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,a.jsx)("ul",{role:"list",className:"space-y-6",children:K.map(function(e,s){return(0,a.jsx)("li",{id:e.id,children:(0,a.jsx)(Y,{data:e})},e.id)})})]})]})})}},44740:function(e,s,t){var n=t(67294);let l=n.forwardRef(function(e,s){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"}))});s.Z=l}}]);

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.