vibebusiness 1.2.112 → 1.2.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +29 -29
  3. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/prerender-manifest.json +1 -1
  6. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  8. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  9. package/.next/standalone/.next/server/app/briefing/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/index.html +1 -1
  16. package/.next/standalone/.next/server/app/index.rsc +1 -1
  17. package/.next/standalone/.next/server/app/kanban/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/roadmap/investors/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/roadmap/public/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/settings.html +1 -1
  26. package/.next/standalone/.next/server/app/settings.rsc +1 -1
  27. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/social.html +1 -1
  29. package/.next/standalone/.next/server/app/social.rsc +2 -2
  30. package/.next/standalone/.next/server/app/updates/[id]/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/updates/new/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/updates/new.html +1 -1
  33. package/.next/standalone/.next/server/app/updates/new.rsc +2 -2
  34. package/.next/standalone/.next/server/app/updates/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app-paths-manifest.json +16 -16
  36. package/.next/standalone/.next/server/pages/404.html +1 -1
  37. package/.next/standalone/.next/server/pages/500.html +1 -1
  38. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  39. package/.next/standalone/data/implementations.json +0 -56
  40. package/.next/standalone/package.json +1 -1
  41. package/.next/standalone/scripts/implement.ts +80 -19
  42. package/.next/static/chunks/159-82cfa8b54cbd2c11.js +1 -0
  43. package/.next/static/chunks/47-bab84ed5cfb8fd9d.js +1 -0
  44. package/.next/static/chunks/540-1a9c388d2dea210b.js +1 -0
  45. package/.next/static/chunks/879-ae588e66e8e0b1d0.js +1 -0
  46. package/.next/static/chunks/app/briefing/page-53c8cd39f48293ba.js +1 -0
  47. package/.next/static/chunks/app/goals/[id]/page-ce4e225f25e7294d.js +1 -0
  48. package/.next/static/chunks/app/ideas/[id]/page-6b28cf279c62a569.js +1 -0
  49. package/.next/static/chunks/app/roadmap/[id]/page-381809badf3910a3.js +1 -0
  50. package/.next/static/chunks/app/social/page-2d71af5da2476063.js +1 -0
  51. package/.next/static/chunks/app/updates/new/page-0acea8b7d66043a5.js +1 -0
  52. package/dist/scripts/heartbeat.js +15 -1
  53. package/dist/scripts/implement.js +76 -23
  54. package/package.json +1 -1
  55. package/.next/static/chunks/159-4ce492ccac6de8f7.js +0 -1
  56. package/.next/static/chunks/47-eba0f8b4f9b17641.js +0 -1
  57. package/.next/static/chunks/540-5ee93f60a3443df4.js +0 -1
  58. package/.next/static/chunks/879-7fbd95e93ddc4636.js +0 -1
  59. package/.next/static/chunks/app/briefing/page-73793d76c62832cb.js +0 -1
  60. package/.next/static/chunks/app/goals/[id]/page-40818dc7e710eeda.js +0 -1
  61. package/.next/static/chunks/app/ideas/[id]/page-5f33e0ecf590ddec.js +0 -1
  62. package/.next/static/chunks/app/roadmap/[id]/page-9ba8a537e30c633c.js +0 -1
  63. package/.next/static/chunks/app/social/page-21daeca0cf8af46b.js +0 -1
  64. package/.next/static/chunks/app/updates/new/page-ac5b966024ce0ddc.js +0 -1
  65. /package/.next/static/{kPdkRBBK3386OTSEycYet → 7fKlqVwD5C0Ze9IprtQIS}/_buildManifest.js +0 -0
  66. /package/.next/static/{kPdkRBBK3386OTSEycYet → 7fKlqVwD5C0Ze9IprtQIS}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{9830:function(e,t,s){Promise.resolve().then(s.bind(s,4687))},4687:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return C}});var a=s(7437),r=s(2265),l=s(9397),n=s(7168),i=s(9322),d=s(6399),c=s(4743),o=s(1259),x=s(505),m=s(2489),h=s(401),u=s(2135),b=s(875),g=s(6362),p=s(2208),f=s(8997),j=s(1178),N=s(2718),w=s(525),v=s(1239),y=s(5675),_=s(8930),k=s(1994),S=s(6153);function Z(e){let{draft:t,onPublish:s,onEdit:l,onDiscard:n}=e,[i,d]=(0,r.useState)(!1),[o,Z]=(0,r.useState)(t.text),[C,P]=(0,r.useState)(!1),[E,A]=(0,r.useState)(!1),T=i?o.length:t.text.length,R=T>280,D="draft"===t.status;async function I(){P(!0);try{await s(t.id)}finally{P(!1)}}async function F(){if(!R&&o.trim()){P(!0);try{await l(t.id,o),d(!1)}finally{P(!1)}}}async function L(){P(!0);try{await n(t.id)}finally{P(!1)}}return(0,a.jsxs)("div",{className:(0,k.Z)("border rounded-lg p-4 transition-colors",D?"bg-white border-slate-200":"bg-slate-50 border-slate-100"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:(0,k.Z)("text-xs px-2 py-0.5 rounded-full font-medium",S.Q_[t.source]),children:S.PN[t.source]}),t.is_thread&&t.thread_tweets&&(0,a.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded-full font-medium bg-indigo-50 text-indigo-600 border border-indigo-200",children:[t.thread_tweets.length," tweets"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[t.scheduled_date&&(0,a.jsxs)("span",{className:"text-xs text-slate-500 flex items-center gap-1",children:[(0,a.jsx)(x.Z,{className:"w-3 h-3"}),new Date(t.scheduled_date+"T00:00:00").toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})]}),(0,a.jsx)("span",{className:"text-xs text-slate-400",children:new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]}),i?(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("textarea",{value:o,onChange:e=>Z(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,maxLength:300}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,a.jsxs)("span",{className:(0,k.Z)("text-xs",R?"text-red-500 font-medium":"text-slate-400"),children:[T,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{d(!1),Z(t.text)},className:"text-xs text-slate-500 hover:text-slate-700 flex items-center gap-1",disabled:C,children:[(0,a.jsx)(m.Z,{className:"w-3 h-3"})," Cancel"]}),(0,a.jsxs)("button",{onClick:F,className:"text-xs text-blue-600 hover:text-blue-800 flex items-center gap-1 disabled:opacity-50",disabled:C||R||!o.trim(),children:[(0,a.jsx)(h.Z,{className:"w-3 h-3"})," Save"]})]})]})]}):(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"text-sm text-slate-800 whitespace-pre-wrap leading-relaxed",children:t.text}),D&&!t.is_thread&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:(0,k.Z)("text-xs",T>260?"text-amber-500":"text-slate-400"),children:[T,"/280"]})}),t.is_thread&&t.thread_tweets&&t.thread_tweets.length>1&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("button",{onClick:()=>A(!E),className:"text-xs text-indigo-600 hover:text-indigo-800 flex items-center gap-1 transition-colors",children:[E?(0,a.jsx)(u.Z,{className:"w-3 h-3"}):(0,a.jsx)(b.Z,{className:"w-3 h-3"}),E?"Collapse thread":"Show all ".concat(t.thread_tweets.length," tweets")]}),E&&(0,a.jsx)("div",{className:"mt-2 space-y-2 border-l-2 border-indigo-200 pl-3",children:t.thread_tweets.slice(1).map((e,t)=>(0,a.jsxs)("div",{className:"text-sm text-slate-700 whitespace-pre-wrap leading-relaxed",children:[(0,a.jsxs)("span",{className:"text-xs font-medium text-indigo-400 mr-1",children:[t+2,"/"]}),e]},t))})]})]}),"published"===t.status&&t.tweet_url&&(0,a.jsxs)("div",{className:"mb-3 space-y-2",children:[(0,a.jsxs)("a",{href:t.tweet_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,a.jsx)(g.Z,{className:"w-3 h-3"}),"View on X"]}),t.engagement_history&&t.engagement_history.length>0&&(()=>{let e=t.engagement_history[t.engagement_history.length-1],s=100*e.engagement_rate;return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-slate-500 pt-1",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",title:"Impressions",children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),e.impressions.toLocaleString()]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",title:"Likes",children:[(0,a.jsx)(f.Z,{className:"w-3 h-3"}),e.likes]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",title:"Bookmarks (10x algorithm weight)",children:[(0,a.jsx)(j.Z,{className:"w-3 h-3"}),e.bookmarks]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",title:"Replies",children:[(0,a.jsx)(N.Z,{className:"w-3 h-3"}),e.replies]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",title:"Retweets",children:[(0,a.jsx)(w.Z,{className:"w-3 h-3"}),e.retweets]}),(0,a.jsxs)("span",{className:(0,k.Z)("flex items-center gap-1 font-medium",s>=2?"text-emerald-600":s>=1?"text-amber-600":"text-red-500"),title:"Engagement rate",children:[(0,a.jsx)(v.Z,{className:"w-3 h-3"}),s.toFixed(2),"%"]})]})})(),t.self_reply_id&&(0,a.jsxs)("span",{className:"text-xs text-emerald-600 flex items-center gap-1",children:[(0,a.jsx)(v.Z,{className:"w-3 h-3"}),"Algorithm boost active (self-reply)"]})]}),D&&!i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-slate-100",children:[(0,a.jsxs)("button",{onClick:I,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-xs rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:C,children:[(0,a.jsx)(c.Z,{className:"w-3 h-3"}),C?"Publishing...":"Publish"]}),(0,a.jsxs)("button",{onClick:()=>d(!0),className:"flex items-center gap-1.5 px-3 py-1.5 border border-slate-200 text-slate-600 text-xs rounded-md hover:bg-slate-50 disabled:opacity-50 transition-colors",disabled:C,children:[(0,a.jsx)(y.Z,{className:"w-3 h-3"}),"Edit"]}),(0,a.jsxs)("button",{onClick:L,className:"flex items-center gap-1.5 px-3 py-1.5 text-red-500 text-xs rounded-md hover:bg-red-50 disabled:opacity-50 transition-colors ml-auto",disabled:C,children:[(0,a.jsx)(_.Z,{className:"w-3 h-3"}),"Discard"]})]})]})}function C(){var e;let[t,s]=(0,r.useState)(null),[x,m]=(0,r.useState)(!0),[h,u]=(0,r.useState)(null),[b,g]=(0,r.useState)(!1),[p,f]=(0,r.useState)(""),[j,N]=(0,r.useState)(!1),w=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/social"),t=await e.json();t.success?(s(t.data),u(null)):u(t.error||"Failed to load social data")}catch(e){u("Failed to connect to server")}finally{m(!1)}},[]);async function v(e){let t=await fetch("/api/social/".concat(e,"/publish"),{method:"POST"}),s=await t.json();if(!s.success){alert(s.error||"Failed to publish");return}await w()}async function y(e,t){let s=await fetch("/api/social/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t})}),a=await s.json();if(!a.success){alert(a.error||"Failed to update");return}await w()}async function _(e){let t=await fetch("/api/social/".concat(e),{method:"DELETE"}),s=await t.json();if(!s.success){alert(s.error||"Failed to discard");return}await w()}async function k(){if(p.trim()&&!(p.length>280)){N(!0);try{let e=await fetch("/api/social",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:p})}),t=await e.json();t.success?(f(""),g(!1),await w()):alert(t.error||"Failed to create draft")}finally{N(!1)}}}(0,r.useEffect)(()=>{w()},[w]);let S=(null==t?void 0:t.drafts.filter(e=>"draft"===e.status))||[],C=(null==t?void 0:t.drafts.filter(e=>"published"===e.status).sort((e,t)=>(t.published_at||"").localeCompare(e.published_at||"")))||[];return(0,a.jsx)(o.default,{children:(0,a.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900",children:"Social Media"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"Review and publish tweet drafts for your build-in-public journey."})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex items-center gap-1.5 px-3 py-2 bg-slate-900 text-white text-sm rounded-lg hover:bg-slate-800 transition-colors",children:[(0,a.jsx)(l.Z,{className:"w-4 h-4"}),"New Draft"]}),(0,a.jsx)("button",{onClick:()=>{m(!0),w()},className:"p-2 text-slate-400 hover:text-slate-600 transition-colors",title:"Refresh",children:(0,a.jsx)(n.Z,{className:"w-4 h-4 ".concat(x?"animate-spin":"")})})]})]}),t&&!t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg flex items-start gap-3",children:[(0,a.jsx)(i.Z,{className:"w-5 h-5 text-amber-500 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800",children:"X/Twitter not connected"}),(0,a.jsxs)("p",{className:"text-xs text-amber-600 mt-1",children:["Add X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, and X_ACCESS_SECRET to your .env file, then run the ",(0,a.jsx)("code",{className:"bg-amber-100 px-1 rounded",children:"social-setup-x"})," task."]})]})]}),t&&t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 grid grid-cols-4 gap-4",children:[(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Account"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.username||"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Followers"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:null!==(e=t.metrics.followers_count)&&void 0!==e?e:"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsxs)("p",{className:"text-xs text-slate-500 flex items-center justify-center gap-1",children:[(0,a.jsx)(d.Z,{className:"w-3 h-3"})," Streak"]}),(0,a.jsxs)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:[t.metrics.post_streak_days," day",1!==t.metrics.post_streak_days?"s":""]})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Total Posts"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.total_posts})]})]}),b&&(0,a.jsxs)("div",{className:"mb-6 bg-white border border-slate-200 rounded-lg p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900 mb-2",children:"Compose Tweet"}),(0,a.jsx)("textarea",{value:p,onChange:e=>f(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,placeholder:"What's happening with your product?",maxLength:300,autoFocus:!0}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,a.jsxs)("span",{className:"text-xs ".concat(p.length>280?"text-red-500 font-medium":"text-slate-400"),children:[p.length,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>{g(!1),f("")},className:"px-3 py-1.5 text-sm text-slate-500 hover:text-slate-700",children:"Cancel"}),(0,a.jsxs)("button",{onClick:k,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-sm rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:j||!p.trim()||p.length>280,children:[(0,a.jsx)(c.Z,{className:"w-3 h-3"}),"Save Draft"]})]})]})]}),x&&!t&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(n.Z,{className:"w-6 h-6 animate-spin text-slate-400 mx-auto"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-2",children:"Loading drafts..."})]}),h&&(0,a.jsx)("div",{className:"text-center py-12",children:(0,a.jsx)("p",{className:"text-sm text-red-500",children:h})}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Drafts (",S.length,")"]})}),0===S.length?(0,a.jsx)("div",{className:"text-center py-8 bg-slate-50 rounded-lg border border-dashed border-slate-200",children:(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"No pending drafts. The heartbeat will generate drafts as you ship features and hit milestones."})}):(0,a.jsx)("div",{className:"space-y-3 mb-8",children:S.map(e=>(0,a.jsx)(Z,{draft:e,onPublish:v,onEdit:y,onDiscard:_},e.id))}),C.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 mt-8",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Published (",C.length,")"]})}),(0,a.jsx)("div",{className:"space-y-3",children:C.map(e=>(0,a.jsx)(Z,{draft:e,onPublish:v,onEdit:y,onDiscard:_},e.id))})]})]})]})})}},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(7648),l=s(9376),n=s(5929),i=s(5466),d=s(2048),c=s(8896),o=s(8220),x=s(2718),m=s(5621),h=s(8728),u=s(2222),b=s(2023),g=s(1994);let p=[{href:"/briefing",label:"Briefing",icon:(0,a.jsx)(n.Z,{size:18})},{href:"/kanban",label:"Dashboard",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(m.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(h.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,s=(0,l.usePathname)();return(0,a.jsxs)("div",{className:"min-h-screen flex",children:[(0,a.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,a.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,a.jsx)(u.Z,{className:"w-6 h-6 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,a.jsx)("p",{className:"text-xs text-slate-400",children:"AI Product Manager"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:p.map(e=>{let t=s.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(r.default,{href:e.href,className:(0,g.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",t?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,a.jsx)("span",{children:e.label})]})},e.href)})})}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)(b.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:t})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return k},Gs:function(){return o},Hs:function(){return a},PN:function(){return u},PW:function(){return y},Q_:function(){return b},R$:function(){return w},Vr:function(){return x},Wb:function(){return h},aR:function(){return m},bi:function(){return d},en:function(){return N},i2:function(){return j},kT:function(){return g},l5:function(){return p},lE:function(){return v},lv:function(){return n},pG:function(){return r},rF:function(){return c},tV:function(){return f},tl:function(){return _},xP:function(){return S},yb:function(){return l}});let a={product:"Product",ux_design:"UX/Design",growth:"Growth",performance:"Performance",tech_debt:"Tech Debt",security:"Security",infrastructure:"Infrastructure",content:"Content",analytics:"Analytics",integration:"Integration"},r={product:"bg-blue-100 text-blue-800",ux_design:"bg-purple-100 text-purple-800",growth:"bg-green-100 text-green-800",performance:"bg-orange-100 text-orange-800",tech_debt:"bg-yellow-100 text-yellow-800",security:"bg-red-100 text-red-800",infrastructure:"bg-gray-100 text-gray-800",content:"bg-pink-100 text-pink-800",analytics:"bg-cyan-100 text-cyan-800",integration:"bg-indigo-100 text-indigo-800"},l={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},n={inbox:"bg-amber-500",under_review:"bg-blue-500",approved:"bg-emerald-500",in_progress:"bg-violet-500",testing:"bg-cyan-500",shipped:"bg-green-500",deferred:"bg-gray-500",rejected:"bg-red-500",rolled_back:"bg-orange-500"},i=["inbox","under_review","approved","in_progress","testing","shipped"],d={xs:"XS",s:"S",m:"M",l:"L",xl:"XL"},c={critical:"Critical",high:"High",medium:"Medium",low:"Low"},o={critical:"bg-red-100 text-red-800 border-red-300",high:"bg-orange-100 text-orange-800 border-orange-300",medium:"bg-yellow-100 text-yellow-800 border-yellow-300",low:"bg-gray-100 text-gray-800 border-gray-300"},x={codebase_analysis:"Codebase Analysis",metrics_review:"Metrics Review",market_research:"Market Research",seo_audit:"SEO Audit",growth_distribution:"Growth Distribution",manual:"Manual"},m={pending:"bg-slate-100 text-slate-700",validated:"bg-emerald-100 text-emerald-800",needs_investigation:"bg-amber-100 text-amber-800",inconclusive:"bg-slate-100 text-slate-600",invalidated:"bg-red-100 text-red-800"},h={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},u={ship:"Ship",update:"Update",milestone:"Milestone",digest:"Digest",manual:"Manual",thread:"Thread",insight:"Insight"},b={ship:"bg-green-100 text-green-800",update:"bg-blue-100 text-blue-800",milestone:"bg-amber-100 text-amber-800",digest:"bg-purple-100 text-purple-800",manual:"bg-slate-100 text-slate-800",thread:"bg-indigo-100 text-indigo-800",insight:"bg-cyan-100 text-cyan-800"},g={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},p={acquisition:"bg-blue-100 text-blue-800",activation:"bg-emerald-100 text-emerald-800",retention:"bg-purple-100 text-purple-800",revenue:"bg-amber-100 text-amber-800",referral:"bg-pink-100 text-pink-800"},f={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},j={on_track:"bg-emerald-100 text-emerald-800 border-emerald-300",at_risk:"bg-amber-100 text-amber-800 border-amber-300",behind:"bg-red-100 text-red-800 border-red-300",achieved:"bg-blue-100 text-blue-800 border-blue-300"},N={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},w={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},v={stated:"bg-slate-100 text-slate-800 border-slate-300",testing:"bg-amber-100 text-amber-800 border-amber-300",validated:"bg-emerald-100 text-emerald-800 border-emerald-300",invalidated:"bg-red-100 text-red-800 border-red-300",deferred:"bg-slate-100 text-slate-500 border-slate-200"},y={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},_={acquisition:"bg-blue-100 text-blue-800",engagement:"bg-purple-100 text-purple-800",conversion:"bg-amber-100 text-amber-800",monetization:"bg-emerald-100 text-emerald-800"},k={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},S={planned:"bg-slate-100 text-slate-700 border-slate-300",active:"bg-blue-100 text-blue-800 border-blue-300",completed:"bg-emerald-100 text-emerald-800 border-emerald-300",paused:"bg-amber-100 text-amber-800 border-amber-300"}}},function(e){e.O(0,[972,159,971,117,744],function(){return e(e.s=9830)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[940],{3410:function(e,t,s){Promise.resolve().then(s.bind(s,9525))},9205:function(e,t,s){"use strict";s.d(t,{Z:function(){return c}});var a=s(2265);let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter((e,t,s)=>!!e&&s.indexOf(e)===t).join(" ")};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,a.forwardRef)((e,t)=>{let{color:s="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:c,className:d="",children:o,iconNode:m,...h}=e;return(0,a.createElement)("svg",{ref:t,...l,width:r,height:r,stroke:s,strokeWidth:c?24*Number(i)/Number(r):i,className:n("lucide",d),...h},[...m.map(e=>{let[t,s]=e;return(0,a.createElement)(t,s)}),...Array.isArray(o)?o:[o]])}),c=(e,t)=>{let s=(0,a.forwardRef)((s,l)=>{let{className:c,...d}=s;return(0,a.createElement)(i,{ref:l,iconNode:t,className:n("lucide-".concat(r(e)),c),...d})});return s.displayName="".concat(e),s}},2660:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},505:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},401:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},8867:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},2735:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},8736:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("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"}]])},2023:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},7648:function(e,t,s){"use strict";s.d(t,{default:function(){return r.a}});var a=s(2972),r=s.n(a)},9376:function(e,t,s){"use strict";var a=s(5475);s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}})},9525:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return u}});var a=s(7437),r=s(2265),n=s(2660),l=s(505),i=s(2023),c=s(8736),d=s(401),o=s(8867),m=s(2735),h=s(7648),x=s(9376);function u(){let e=(0,x.useRouter)(),[t,s]=(0,r.useState)(!1),[u,p]=(0,r.useState)("last_30"),[g,j]=(0,r.useState)(!0),[f,b]=(0,r.useState)(null),[y,w]=(0,r.useState)(!1),[N,v]=(0,r.useState)(null),k=async()=>{s(!0),v(null);try{let e=await fetch("/api/investor-updates/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dateRange:u,includeAI:g})});if(!e.ok){let t=(await e.json()).error||"Failed to generate update";console.error("API error:",t),v(t);return}let t=await e.json();b(t)}catch(e){console.error("Error generating update:",e),v(e instanceof Error?e.message:"Network error. Please try again.")}finally{s(!1)}},Z=async()=>{f&&(await navigator.clipboard.writeText(f.markdown),w(!0),setTimeout(()=>w(!1),2e3))};return(0,a.jsxs)("div",{className:"min-h-screen bg-slate-50",children:[(0,a.jsx)("div",{className:"bg-white border-b border-slate-200 px-6 py-4",children:(0,a.jsx)("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(h.default,{href:"/updates",className:"text-slate-600 hover:text-slate-900 transition-colors",children:(0,a.jsx)(n.Z,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-bold text-slate-900",children:"Generate Investor Update"}),(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Create a compelling monthly update with AI narrative"})]})]})})}),(0,a.jsx)("div",{className:"max-w-7xl mx-auto p-6",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-6",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-900 mb-4",children:"Configuration"}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:[(0,a.jsx)(l.Z,{className:"w-4 h-4 inline mr-1"}),"Time Period"]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"radio",name:"dateRange",value:"last_30",checked:"last_30"===u,onChange:e=>p(e.target.value),className:"w-4 h-4 text-emerald-600"}),(0,a.jsx)("span",{className:"text-sm text-slate-700",children:"Last 30 Days (Monthly)"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"radio",name:"dateRange",value:"last_90",checked:"last_90"===u,onChange:e=>p(e.target.value),className:"w-4 h-4 text-emerald-600"}),(0,a.jsx)("span",{className:"text-sm text-slate-700",children:"Last 90 Days (Quarterly)"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer opacity-50",children:[(0,a.jsx)("input",{type:"radio",name:"dateRange",value:"custom",disabled:!0,className:"w-4 h-4 text-emerald-600"}),(0,a.jsx)("span",{className:"text-sm text-slate-700",children:"Custom Range (Coming Soon)"})]})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:g,onChange:e=>j(e.target.checked),className:"w-4 h-4 text-emerald-600 rounded"}),(0,a.jsx)(i.Z,{className:"w-4 h-4 text-emerald-500"}),(0,a.jsx)("span",{className:"text-sm font-medium text-slate-700",children:"Include AI Narrative (Recommended)"})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500 ml-6 mt-1",children:"Generates executive summary, strategic context, and asks rationale"})]}),N&&(0,a.jsxs)("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg",children:[(0,a.jsx)("p",{className:"text-sm text-red-700 font-medium",children:"Error"}),(0,a.jsx)("p",{className:"text-xs text-red-600 mt-1",children:N})]}),(0,a.jsx)("button",{onClick:k,disabled:t,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition-colors disabled:bg-slate-300 disabled:cursor-not-allowed",children:t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),(0,a.jsx)("span",{children:"Generating..."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Generate Update"})]})}),(0,a.jsxs)("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-blue-900 mb-2",children:"What's included:"}),(0,a.jsxs)("ul",{className:"text-xs text-blue-700 space-y-1",children:[(0,a.jsx)("li",{children:"• Completed epics and shipped features"}),(0,a.jsx)("li",{children:"• Goal metrics with month-over-month growth"}),(0,a.jsx)("li",{children:"• Upcoming roadmap with strategic priorities"}),(0,a.jsx)("li",{children:"• Strategic insights from MEMORY.md"}),(0,a.jsx)("li",{children:"• AI-generated narrative (if enabled)"})]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-6",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-900 mb-4",children:"Preview"}),f?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("button",{onClick:Z,className:"flex items-center gap-1 px-3 py-2 text-sm bg-slate-100 hover:bg-slate-200 rounded-lg transition-colors",children:y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Z,{className:"w-4 h-4 text-emerald-600"}),(0,a.jsx)("span",{children:"Copied!"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Copy Markdown"})]})}),(0,a.jsxs)("button",{onClick:()=>{if(!f)return;let e=new Blob([f.markdown],{type:"text/markdown"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download="investor-update-".concat(new Date().toISOString().split("T")[0],".md"),s.click(),URL.revokeObjectURL(t)},className:"flex items-center gap-1 px-3 py-2 text-sm bg-slate-100 hover:bg-slate-200 rounded-lg transition-colors",children:[(0,a.jsx)(m.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Download"})]}),(0,a.jsxs)("button",{onClick:()=>{f&&e.push("/updates/".concat(f.id))},className:"flex items-center gap-1 px-3 py-2 text-sm bg-emerald-600 text-white hover:bg-emerald-700 rounded-lg transition-colors ml-auto",children:[(0,a.jsx)(c.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"View Details"})]})]}),(0,a.jsx)("div",{className:"prose prose-sm max-w-none overflow-auto max-h-[600px] p-4 bg-slate-50 rounded-lg border border-slate-200",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap text-xs font-mono",children:f.markdown})})]}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[(0,a.jsx)(c.Z,{className:"w-12 h-12 text-slate-300 mb-4"}),(0,a.jsxs)("p",{className:"text-sm text-slate-500",children:["Configure your update and click Generate",(0,a.jsx)("br",{}),"to see a preview here"]})]})]})]})})]})}}},function(e){e.O(0,[972,971,117,744],function(){return e(e.s=3410)}),_N_E=e.O()}]);