vibebusiness 1.2.49 → 1.2.53

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 (101) hide show
  1. package/.next/standalone/.env +1 -1
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-build-manifest.json +20 -20
  4. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/.next/build-manifest.json +4 -4
  6. package/.next/standalone/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  9. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  10. package/.next/standalone/.next/server/app/api/analyze/route.js +1 -1
  11. package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  13. package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/provider-status/route.js +1 -0
  31. package/.next/standalone/.next/server/app/api/provider-status/route.js.nft.json +1 -0
  32. package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/social/[id]/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/ideas/[id]/page.js +1 -1
  42. package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  52. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/settings.html +1 -1
  54. package/.next/standalone/.next/server/app/settings.rsc +2 -2
  55. package/.next/standalone/.next/server/app/social/page.js +1 -1
  56. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/social.html +1 -1
  58. package/.next/standalone/.next/server/app/social.rsc +2 -2
  59. package/.next/standalone/.next/server/app-paths-manifest.json +12 -11
  60. package/.next/standalone/.next/server/chunks/3794.js +92 -17
  61. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  62. package/.next/standalone/.next/server/pages/404.html +1 -1
  63. package/.next/standalone/.next/server/pages/500.html +1 -1
  64. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  65. package/.next/standalone/data/business-context.json +60 -6
  66. package/.next/standalone/data/goals.json +50 -10
  67. package/.next/standalone/data/ideas.json +1278 -597
  68. package/.next/standalone/data/implementations.json +101 -0
  69. package/.next/standalone/data/posthog.json +68 -0
  70. package/.next/standalone/data/sessions.json +5 -4
  71. package/.next/standalone/data/social.json +86 -3
  72. package/.next/standalone/package.json +1 -1
  73. package/.next/standalone/scripts/analyze.ts +10 -0
  74. package/.next/standalone/scripts/implement.ts +37 -30
  75. package/.next/standalone/scripts/skills/social-media.ts +172 -2
  76. package/.next/static/chunks/59-76eecfb6e8216043.js +1 -0
  77. package/.next/static/chunks/app/goals/[id]/page-051064c3146131cc.js +1 -0
  78. package/.next/static/chunks/app/ideas/[id]/page-adaeb619cd0425e9.js +1 -0
  79. package/.next/static/chunks/app/roadmap/[id]/page-3822586c0d64fff1.js +1 -0
  80. package/.next/static/chunks/app/settings/page-2204cc936ec9474b.js +1 -0
  81. package/.next/static/chunks/app/social/page-018893f87b308651.js +1 -0
  82. package/.next/static/chunks/{main-61d2f25883998186.js → main-c99f3473a63aa803.js} +1 -1
  83. package/.next/static/css/d8bd6d69d1ff97e3.css +3 -0
  84. package/dist/bin/vibebusiness.js +12 -0
  85. package/dist/scripts/analyze.js +170 -68
  86. package/dist/scripts/chat.js +137 -36
  87. package/dist/scripts/heartbeat.js +617 -348
  88. package/dist/scripts/implement.js +218 -70
  89. package/dist/scripts/init.js +164 -16
  90. package/dist/scripts/provider.js +428 -0
  91. package/dist/scripts/scan.js +44 -5
  92. package/package.json +1 -1
  93. package/.next/static/chunks/59-a053b1c0e85128de.js +0 -1
  94. package/.next/static/chunks/app/goals/[id]/page-8dbeab5cc8cf0988.js +0 -1
  95. package/.next/static/chunks/app/ideas/[id]/page-89e3625db9017166.js +0 -1
  96. package/.next/static/chunks/app/roadmap/[id]/page-f437e783039534c4.js +0 -1
  97. package/.next/static/chunks/app/settings/page-d2d630a799b6b495.js +0 -1
  98. package/.next/static/chunks/app/social/page-69e480936711ccf2.js +0 -1
  99. package/.next/static/css/179dd3e0738c2fe4.css +0 -3
  100. /package/.next/static/{zIIaTqrawBK1MmHg37JOr → p1Sl4kPMQcYC3c1LgbNSP}/_buildManifest.js +0 -0
  101. /package/.next/static/{zIIaTqrawBK1MmHg37JOr → p1Sl4kPMQcYC3c1LgbNSP}/_ssgManifest.js +0 -0
@@ -31,6 +31,17 @@ var path4 = __toESM(require("path"));
31
31
  var import_child_process = require("child_process");
32
32
  var fs = __toESM(require("fs"));
33
33
  var path = __toESM(require("path"));
34
+ var CREDENTIALS_DIR = path.join(process.env.HOME || "", ".vibebusiness");
35
+ var CREDENTIALS_FILE = path.join(CREDENTIALS_DIR, "credentials.json");
36
+ function loadCredentials() {
37
+ try {
38
+ if (fs.existsSync(CREDENTIALS_FILE)) {
39
+ return JSON.parse(fs.readFileSync(CREDENTIALS_FILE, "utf-8"));
40
+ }
41
+ } catch {
42
+ }
43
+ return {};
44
+ }
34
45
  function detectClaudeCLI(customPath) {
35
46
  const claudeBin = customPath || "claude";
36
47
  try {
@@ -63,13 +74,27 @@ function detectClaudeCLI(customPath) {
63
74
  }
64
75
  function detectBYOKKeys() {
65
76
  if (process.env.ANTHROPIC_API_KEY) {
66
- return { provider: "anthropic-api", key: process.env.ANTHROPIC_API_KEY };
77
+ return { provider: "anthropic-api", key: process.env.ANTHROPIC_API_KEY, source: "env" };
67
78
  }
68
79
  if (process.env.OPENAI_API_KEY) {
69
- return { provider: "openai-api", key: process.env.OPENAI_API_KEY };
80
+ return { provider: "openai-api", key: process.env.OPENAI_API_KEY, source: "env" };
70
81
  }
71
82
  if (process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY) {
72
- return { provider: "google-api", key: process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY };
83
+ return { provider: "google-api", key: process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY, source: "env" };
84
+ }
85
+ const creds = loadCredentials();
86
+ if (creds.ANTHROPIC_API_KEY) {
87
+ process.env.ANTHROPIC_API_KEY = creds.ANTHROPIC_API_KEY;
88
+ return { provider: "anthropic-api", key: creds.ANTHROPIC_API_KEY, source: "credentials" };
89
+ }
90
+ if (creds.OPENAI_API_KEY) {
91
+ process.env.OPENAI_API_KEY = creds.OPENAI_API_KEY;
92
+ return { provider: "openai-api", key: creds.OPENAI_API_KEY, source: "credentials" };
93
+ }
94
+ if (creds.GOOGLE_API_KEY || creds.GEMINI_API_KEY) {
95
+ const key = creds.GOOGLE_API_KEY || creds.GEMINI_API_KEY;
96
+ process.env.GOOGLE_API_KEY = key;
97
+ return { provider: "google-api", key, source: "credentials" };
73
98
  }
74
99
  return null;
75
100
  }
@@ -118,6 +143,9 @@ function invokeClaudeCLI(options, claudePath) {
118
143
  if (options.model) {
119
144
  args.push("--model", options.model);
120
145
  }
146
+ if (options.jsonSchema) {
147
+ args.push("--output-format", "json", "--json-schema", JSON.stringify(options.jsonSchema));
148
+ }
121
149
  if (options.claudeFlags) {
122
150
  args.push(...options.claudeFlags);
123
151
  }
@@ -186,7 +214,18 @@ async function invokeAnthropicAPI(options) {
186
214
  };
187
215
  }
188
216
  try {
189
- const model = options.model || "claude-sonnet-4-5-20250929";
217
+ const model = options.model || "claude-sonnet-4-6";
218
+ let prompt = options.prompt;
219
+ if (options.jsonSchema) {
220
+ prompt += `
221
+
222
+ IMPORTANT: Respond with valid JSON matching this schema:
223
+ ${JSON.stringify(options.jsonSchema, null, 2)}
224
+
225
+ Output ONLY the JSON object, no markdown code blocks or other text.`;
226
+ } else if (options.expectJson) {
227
+ prompt += "\n\nIMPORTANT: Respond with valid JSON only. No markdown code blocks or other text.";
228
+ }
190
229
  const response = await fetch("https://api.anthropic.com/v1/messages", {
191
230
  method: "POST",
192
231
  headers: {
@@ -197,7 +236,7 @@ async function invokeAnthropicAPI(options) {
197
236
  body: JSON.stringify({
198
237
  model,
199
238
  max_tokens: 16384,
200
- messages: [{ role: "user", content: options.prompt }]
239
+ messages: [{ role: "user", content: prompt }]
201
240
  }),
202
241
  signal: AbortSignal.timeout(options.timeoutMs || 3e5)
203
242
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibebusiness",
3
- "version": "1.2.49",
3
+ "version": "1.2.53",
4
4
  "description": "AI-powered autonomous product manager. Research. Build. Ship. Grow.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59],{2660:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},505:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(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(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},875:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},407:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},1671:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},2934:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},5368:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},9388:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},519:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},1723:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},8867:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(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"}]])},6362:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},1947:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]])},8736:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(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"}]])},3781:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])},5846:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},5554:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},1817:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},1047:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},1102:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("OctagonAlert",[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},9227:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]])},3276:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},7168:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},6076:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]])},9076:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},4743:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]])},4286:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},933:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("SquareCheckBig",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]])},221:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},7829:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("TestTube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]])},525:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])},6865:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},2369:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},1239:function(t,e,n){n.d(e,{Z:function(){return c}});let c=(0,n(9205).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[945],{1806:function(e,t,s){Promise.resolve().then(s.bind(s,8935))},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"}]])},6362:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},5846:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},1047:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},8935:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return Z}});var a=s(7437),l=s(2265),r=s(9376),i=s(7648),n=s(525),c=s(6865),d=s(3085),x=s(2934),o=s(7168),h=s(2660),m=s(8896),u=s(505),p=s(5846),j=s(6362),g=s(1994),f=s(1259),N=s(104),b=s(1047),v=s(9397),y=s(6153),w=s(281);function k(e){let{kpis:t,goalId:s,onUpdateKPI:r}=e,[i,c]=(0,l.useState)(null),[x,o]=(0,l.useState)(null),[h,m]=(0,l.useState)(""),[u,p]=(0,l.useState)(!1),j=async e=>{if(!r||!h.trim())return;let t=parseFloat(h);if(!isNaN(t)){p(!0);try{await r(e,t),o(null),m("")}catch(e){console.error("Failed to update KPI:",e)}finally{p(!1)}}};return(0,a.jsx)("div",{className:"bg-white rounded-lg border border-slate-200 overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{className:"bg-slate-50 border-b border-slate-200",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3",children:"KPI"}),(0,a.jsx)("th",{className:"text-center text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3 w-24",children:"Trend"}),(0,a.jsx)("th",{className:"text-right text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3 w-24",children:"Current"}),(0,a.jsx)("th",{className:"text-right text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3 w-24",children:"Target"}),(0,a.jsx)("th",{className:"text-center text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3 w-20",children:"Progress"}),(0,a.jsx)("th",{className:"text-center text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3 w-16",children:"Source"}),r&&(0,a.jsx)("th",{className:"text-center text-xs font-medium text-slate-500 uppercase tracking-wider px-4 py-3 w-16",children:"Action"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-slate-100",children:t.map(e=>{let t=function(e){if(e.history.length<2)return{icon:b.Z,color:"text-slate-400",label:"No trend"};let t=e.history[0].value,s=e.history[e.history.length-1].value,a="higher_is_better"===e.direction?s>t:s<t;return t===s?{icon:b.Z,color:"text-slate-400",label:"Stable"}:a?{icon:n.Z,color:"text-emerald-500",label:"Improving"}:{icon:d.Z,color:"text-red-500",label:"Declining"}}(e),s=null===e.current_value||null===e.target_value?null:"higher_is_better"===e.direction?e.current_value/e.target_value*100:e.current_value<=e.target_value?100:e.target_value/e.current_value*100,l=t.icon,p=i===e.id,f=x===e.id;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("tr",{className:(0,g.Z)("hover:bg-slate-50 cursor-pointer transition-colors",p&&"bg-slate-50"),onClick:()=>c(p?null:e.id),children:[(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-16 h-8",children:(0,a.jsx)(w.Z,{kpi:e,height:32,width:64})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900",children:e.name}),(0,a.jsx)("p",{className:"text-xs text-slate-500 line-clamp-1",children:e.description})]})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-center",children:(0,a.jsx)("span",{className:(0,g.Z)("inline-flex items-center gap-1",t.color),title:t.label,children:(0,a.jsx)(l,{className:"w-4 h-4"})})}),(0,a.jsx)("td",{className:"px-4 py-3 text-right",children:(0,a.jsx)("span",{className:"text-sm font-medium text-slate-900",children:null!==e.current_value?"".concat(e.current_value).concat(e.unit):"--"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-right",children:(0,a.jsx)("span",{className:"text-sm text-slate-500",children:null!==e.target_value?"".concat(e.target_value).concat(e.unit):"--"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:null!==s?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)("div",{className:"w-12 h-1.5 bg-slate-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:(0,g.Z)("h-full rounded-full",s>=100?"bg-emerald-500":s>=70?"bg-amber-500":"bg-red-500"),style:{width:"".concat(Math.min(s,100),"%")}})})}):(0,a.jsx)("span",{className:"text-xs text-slate-400 text-center block",children:"--"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-center",children:(0,a.jsx)("span",{className:(0,g.Z)("text-xs px-1.5 py-0.5 rounded","manual"===e.source?"bg-slate-100 text-slate-600":"bg-blue-50 text-blue-600"),children:y.en[e.source]})}),r&&(0,a.jsx)("td",{className:"px-4 py-3 text-center",onClick:e=>e.stopPropagation(),children:"manual"===e.source&&(0,a.jsx)("button",{onClick:t=>{var s;t.stopPropagation(),o(e.id),m((null===(s=e.current_value)||void 0===s?void 0:s.toString())||"")},className:"p-1 text-slate-400 hover:text-emerald-600 transition-colors",title:"Add value",children:(0,a.jsx)(v.Z,{className:"w-4 h-4"})})})]},e.id),p&&(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{colSpan:r?7:6,className:"px-4 py-4 bg-slate-50",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-medium text-slate-500 uppercase mb-2",children:"History"}),e.history.length>0?(0,a.jsx)("div",{className:"h-32 bg-white rounded border border-slate-200 p-2",children:(0,a.jsx)(w.Z,{kpi:e,height:112,showTarget:!0})}):(0,a.jsx)("div",{className:"h-32 bg-white rounded border border-slate-200 flex items-center justify-center text-sm text-slate-400",children:"No historical data"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-medium text-slate-500 uppercase mb-2",children:"Details"}),(0,a.jsxs)("dl",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-slate-500",children:"Direction"}),(0,a.jsx)("dd",{className:"text-slate-900",children:"higher_is_better"===e.direction?"Higher is better":"Lower is better"})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-slate-500",children:"Data points"}),(0,a.jsx)("dd",{className:"text-slate-900",children:e.history.length})]}),e.history.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-slate-500",children:"First recorded"}),(0,a.jsx)("dd",{className:"text-slate-900",children:e.history[0].date})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-slate-500",children:"Last updated"}),(0,a.jsx)("dd",{className:"text-slate-900",children:e.history[e.history.length-1].date})]})]})]}),(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)("h4",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Query"}),(0,a.jsx)("pre",{className:"text-xs text-slate-600 bg-white p-2 rounded border border-slate-200 overflow-x-auto",children:e.query})]})]})]}),f&&"manual"===e.source&&r&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-slate-200 flex items-center gap-3",children:[(0,a.jsx)("label",{className:"text-sm text-slate-600",children:"Add new value:"}),(0,a.jsx)("input",{type:"number",value:h,onChange:e=>m(e.target.value),className:"w-24 px-2 py-1 text-sm border border-slate-300 rounded focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500",placeholder:"Value",step:"any"}),(0,a.jsx)("span",{className:"text-sm text-slate-500",children:e.unit}),(0,a.jsx)("button",{onClick:()=>j(e.id),disabled:u||!h.trim(),className:"px-3 py-1 text-sm bg-emerald-600 text-white rounded hover:bg-emerald-700 disabled:opacity-50 disabled:cursor-not-allowed",children:u?"Saving...":"Save"}),(0,a.jsx)("button",{onClick:()=>{o(null),m("")},className:"px-3 py-1 text-sm text-slate-600 hover:text-slate-900",children:"Cancel"})]})]})},"".concat(e.id,"-expanded"))]})})})]})})}function _(e){let{status:t}=e;switch(t){case"on_track":return(0,a.jsx)(n.Z,{className:"w-5 h-5"});case"at_risk":return(0,a.jsx)(c.Z,{className:"w-5 h-5"});case"behind":return(0,a.jsx)(d.Z,{className:"w-5 h-5"});case"achieved":return(0,a.jsx)(x.Z,{className:"w-5 h-5"})}}function Z(e){let{params:t}=e;(0,r.useRouter)();let{id:s}=t,[n,c]=(0,l.useState)(null),[d,x]=(0,l.useState)([]),[b,v]=(0,l.useState)(!0),[w,Z]=(0,l.useState)(!1),[S,C]=(0,l.useState)(null),P=async()=>{try{let e=await fetch("/api/goals/".concat(s)),t=await e.json();if(!t.success){C(t.error||"Failed to load goal");return}if(c(t.data),t.data.related_ideas.length>0){let e=await fetch("/api/ideas"),s=await e.json();if(s.success){let e=s.data.filter(e=>t.data.related_ideas.includes(e.id));x(e)}}}catch(e){C("Failed to load goal"),console.error("Error fetching goal:",e)}finally{v(!1)}};(0,l.useEffect)(()=>{P()},[s]);let I=async(e,t)=>{try{let a=await fetch("/api/goals/".concat(s,"/kpis"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kpi_id:e,action:"add_history",value:t})}),l=await a.json();if(l.success)await P();else throw Error(l.error)}catch(e){throw console.error("Failed to update KPI:",e),e}},M=async e=>{try{let t=await fetch("/api/goals/".concat(s),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})}),a=await t.json();a.success&&c(a.data)}catch(e){console.error("Failed to update status:",e)}},T=async()=>{Z(!0);try{let e=await fetch("/api/kpis/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({goal_id:s})}),t=await e.json();t.success||console.error("KPI refresh failed:",t.error),await P()}catch(e){console.error("Error refreshing KPIs:",e)}finally{Z(!1)}};return b?(0,a.jsx)(f.default,{children:(0,a.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,a.jsx)(o.Z,{className:"w-8 h-8 text-slate-400 animate-spin"})})}):S||!n?(0,a.jsx)(f.default,{children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)(i.default,{href:"/goals",className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[(0,a.jsx)(h.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Back to Goals"})]}),(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center",children:(0,a.jsx)("p",{className:"text-red-600",children:S||"Goal not found"})})]})}):(0,a.jsx)(f.default,{children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)(i.default,{href:"/goals",className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[(0,a.jsx)(h.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Back to Goals"})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-6",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"w-14 h-14 bg-emerald-100 rounded-xl flex items-center justify-center flex-shrink-0",children:(0,a.jsx)(m.Z,{className:"w-7 h-7 text-emerald-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,a.jsx)("span",{className:(0,g.Z)("text-xs px-2 py-0.5 rounded-full",y.l5[n.category]),children:y.kT[n.category]})}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900 mb-1",children:n.title}),(0,a.jsx)("p",{className:"text-slate-500",children:n.description})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(0,a.jsxs)("span",{className:(0,g.Z)("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm font-medium border",y.i2[n.status]),children:[(0,a.jsx)(_,{status:n.status}),(0,a.jsx)("span",{children:y.tV[n.status]})]}),(0,a.jsxs)("select",{value:n.status,onChange:e=>M(e.target.value),className:"text-xs border border-slate-200 rounded px-2 py-1 text-slate-600",children:[(0,a.jsx)("option",{value:"on_track",children:"On Track"}),(0,a.jsx)("option",{value:"at_risk",children:"At Risk"}),(0,a.jsx)("option",{value:"behind",children:"Behind"}),(0,a.jsx)("option",{value:"achieved",children:"Achieved"})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-6 text-sm text-slate-500 mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:["Deadline: ",(0,a.jsx)("span",{className:"font-medium text-slate-700",children:n.deadline})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(p.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[n.related_ideas.length," linked ideas"]})]})]}),(0,a.jsx)(N.Z,{current:n.current_value,target:n.target_value,unit:n.target_unit,status:n.status})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,a.jsxs)("div",{className:"lg:col-span-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Key Performance Indicators (",n.kpis.length,")"]}),(0,a.jsxs)("button",{onClick:T,disabled:w,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm text-slate-600 hover:text-slate-900 border border-slate-200 rounded-lg hover:bg-slate-50 disabled:opacity-50",children:[(0,a.jsx)(o.Z,{className:(0,g.Z)("w-4 h-4",w&&"animate-spin")}),(0,a.jsx)("span",{children:w?"Refreshing...":"Refresh KPIs"})]})]}),n.kpis.length>0?(0,a.jsx)(k,{kpis:n.kpis,goalId:n.id,onUpdateKPI:I}):(0,a.jsx)("div",{className:"bg-white rounded-lg border border-slate-200 p-8 text-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No KPIs defined for this goal."})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-900 mb-4",children:"Related Ideas"}),d.length>0?(0,a.jsx)("div",{className:"space-y-3",children:d.map(e=>(0,a.jsxs)(i.default,{href:"/ideas/".concat(e.id),className:"block bg-white rounded-lg border border-slate-200 p-4 hover:border-emerald-300 hover:shadow-sm transition-all",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900 mb-1",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-slate-500 line-clamp-2",children:e.summary})]}),(0,a.jsx)(j.Z,{className:"w-4 h-4 text-slate-400 flex-shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,a.jsx)("span",{className:(0,g.Z)("text-xs px-1.5 py-0.5 rounded","shipped"===e.stage?"bg-green-100 text-green-700":"in_progress"===e.stage?"bg-violet-100 text-violet-700":"bg-slate-100 text-slate-600"),children:e.stage.replace("_"," ")}),e.expected_impact&&(0,a.jsx)("span",{className:"text-xs text-slate-400",children:e.expected_impact})]})]},e.id))}):(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-6 text-center",children:[(0,a.jsx)(p.Z,{className:"w-8 h-8 text-slate-300 mx-auto mb-2"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-3",children:"No ideas linked to this goal yet."}),(0,a.jsx)(i.default,{href:"/",className:"text-sm text-emerald-600 hover:text-emerald-700",children:"Browse Ideas"})]}),(0,a.jsxs)("div",{className:"mt-6 bg-slate-50 rounded-lg border border-slate-200 p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-700 mb-2",children:"Tip: Link Ideas to Goals"}),(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"When approving ideas, link them to this goal to track which improvements support your business objectives. Ideas linked to goals are prioritized in the analysis process."})]})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-xs text-slate-400",children:[(0,a.jsxs)("p",{children:["Created: ",new Date(n.created_at).toLocaleString()]}),(0,a.jsxs)("p",{children:["Last updated: ",new Date(n.updated_at).toLocaleString()]})]})]})})}}},function(e){e.O(0,[746,444,971,117,744],function(){return e(e.s=1806)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[594],{703:function(e,t,s){Promise.resolve().then(s.bind(s,1259)),Promise.resolve().then(s.bind(s,9534))},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return j}});var a=s(7437),r=s(7648),l=s(9376),n=s(5466),i=s(2048),c=s(8896),d=s(8220),o=s(2718),m=s(5621),x=s(8728),h=s(2222),u=s(2023),p=s(1994),b=s(257);let g=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(n.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.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)(d.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.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)(x.Z,{className:"w-5 h-5"})}];function j(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)(h.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:b.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:g.map(e=>{let t="/"===e.href?"/"===s:s.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(r.default,{href:e.href,className:(0,p.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)(u.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})]})}},9534:function(e,t,s){"use strict";s.d(t,{default:function(){return el}});var a=s(7437),r=s(7648),l=s(2265),n=s(519),i=s(1817),c=s(2934),d=s(9388),o=s(5554),m=s(6865),x=s(875),h=s(407),u=s(1723),p=s(1947),b=s(221),g=s(5368),j=s(1047),f=s(4286),N=s(1102),v=s(2660),w=s(505),_=s(1239),y=s(525),Z=s(8736),S=s(3781),k=s(6362),C=s(5846),R=s(8896),P=s(933),I=s(1994),T=s(6153),A=s(9376),D=s(1671),F=s(9227),M=s(3276),q=s(7829),E=s(9076),O=s(6076);let U={primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",warning:"bg-amber-500 text-white hover:bg-amber-600 focus:ring-amber-500"};function L(e){let{ideaId:t,currentStage:s}=e,r=(0,A.useRouter)(),[n,c]=(0,l.useState)(!1),[o,m]=(0,l.useState)(null),[x,h]=(0,l.useState)(null),[p,b]=(0,l.useState)(""),g=function(e){switch(e){case"inbox":return[{toStage:"under_review",label:"Start Review",icon:(0,a.jsx)(u.Z,{className:"w-4 h-4"}),variant:"primary"},{toStage:"rejected",label:"Reject",icon:(0,a.jsx)(d.Z,{className:"w-4 h-4"}),variant:"danger",requiresComment:!0}];case"under_review":return[{toStage:"approved",label:"Approve",icon:(0,a.jsx)(D.Z,{className:"w-4 h-4"}),variant:"primary"},{toStage:"deferred",label:"Defer",icon:(0,a.jsx)(F.Z,{className:"w-4 h-4"}),variant:"warning",requiresComment:!0},{toStage:"rejected",label:"Reject",icon:(0,a.jsx)(d.Z,{className:"w-4 h-4"}),variant:"danger",requiresComment:!0}];case"approved":return[{toStage:"in_progress",label:"Start Implementation",icon:(0,a.jsx)(M.Z,{className:"w-4 h-4"}),variant:"primary",triggerImplementation:!0},{toStage:"deferred",label:"Defer",icon:(0,a.jsx)(F.Z,{className:"w-4 h-4"}),variant:"warning",requiresComment:!0}];case"in_progress":return[{toStage:"testing",label:"Move to Testing",icon:(0,a.jsx)(q.Z,{className:"w-4 h-4"}),variant:"primary"},{toStage:"approved",label:"Back to Approved",icon:(0,a.jsx)(E.Z,{className:"w-4 h-4"}),variant:"secondary"}];case"testing":return[{toStage:"shipped",label:"Ship It!",icon:(0,a.jsx)(O.Z,{className:"w-4 h-4"}),variant:"primary"},{toStage:"in_progress",label:"Back to In Progress",icon:(0,a.jsx)(E.Z,{className:"w-4 h-4"}),variant:"secondary"}];case"shipped":return[{toStage:"rolled_back",label:"Roll Back",icon:(0,a.jsx)(E.Z,{className:"w-4 h-4"}),variant:"danger",requiresComment:!0}];case"deferred":return[{toStage:"under_review",label:"Reopen Review",icon:(0,a.jsx)(u.Z,{className:"w-4 h-4"}),variant:"primary"},{toStage:"rejected",label:"Reject",icon:(0,a.jsx)(d.Z,{className:"w-4 h-4"}),variant:"danger",requiresComment:!0}];case"rejected":case"rolled_back":return[{toStage:"inbox",label:"Reopen",icon:(0,a.jsx)(E.Z,{className:"w-4 h-4"}),variant:"secondary"}];default:return[]}}(s),j=async(e,s)=>{c(!0),m(e);try{(await fetch("/api/ideas/".concat(t,"/transition"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({to_stage:e,comment:s})})).ok&&r.refresh()}catch(e){console.error("Failed to transition stage:",e)}finally{c(!1),m(null),h(null),b("")}},f=async()=>{c(!0),m("in_progress");try{let e=await fetch("/api/ideas/".concat(t,"/implement"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),s=await e.json();s.success?r.refresh():(console.error("Failed to start implementation:",s.error),alert(s.error||"Failed to start implementation"))}catch(e){console.error("Failed to start implementation:",e),alert("Failed to start implementation")}finally{c(!1),m(null)}},N=e=>{e.triggerImplementation?f():e.requiresComment?h(e):j(e.toStage)};return 0===g.length?null:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"text-sm text-slate-500",children:["Current stage: ",(0,a.jsx)("span",{className:"font-medium text-slate-700",children:T.yb[s]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:g.map(e=>(0,a.jsxs)("button",{onClick:()=>N(e),disabled:n,className:(0,I.Z)("btn gap-2",U[e.variant],n&&"opacity-75"),children:[o===e.toStage?(0,a.jsx)(i.Z,{className:"w-4 h-4 animate-spin"}):e.icon,(0,a.jsx)("span",{children:e.label})]},e.toStage))}),x&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-full max-w-md animate-slide-in",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:x.label}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-4",children:"Please provide a reason for this action."}),(0,a.jsx)("textarea",{value:p,onChange:e=>b(e.target.value),placeholder:"Enter your comment...",className:"textarea h-24 mb-4",autoFocus:!0}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{onClick:()=>{h(null),b("")},className:"btn btn-secondary",disabled:n,children:"Cancel"}),(0,a.jsxs)("button",{onClick:()=>j(x.toStage,p),disabled:n||!p.trim(),className:(0,I.Z)("btn gap-2",U[x.variant]),children:[n?(0,a.jsx)(i.Z,{className:"w-4 h-4 animate-spin"}):x.icon,(0,a.jsx)("span",{children:"Confirm"})]})]})]})})]})}var G=s(2222),z=s(2369),B=s(4743);function V(e){let{ideaId:t,comments:s}=e,r=(0,A.useRouter)(),[n,c]=(0,l.useState)(""),[d,o]=(0,l.useState)(!1),m=async e=>{if(e.preventDefault(),n.trim()&&!d){o(!0);try{(await fetch("/api/ideas/".concat(t,"/comments"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:"human",author_name:"Founder",content:n.trim()})})).ok&&(c(""),r.refresh())}catch(e){console.error("Failed to add comment:",e)}finally{o(!1)}}};return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h3",{className:"font-semibold text-slate-900",children:"Discussion"}),(0,a.jsx)("div",{className:"space-y-3",children:0===s.length?(0,a.jsx)("p",{className:"text-sm text-slate-400 italic",children:"No comments yet"}):s.map(e=>(0,a.jsxs)("div",{className:(0,I.Z)("comment-bubble",e.author),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:["ai"===e.author?(0,a.jsx)("div",{className:"w-6 h-6 bg-emerald-100 rounded-full flex items-center justify-center",children:(0,a.jsx)(G.Z,{className:"w-3.5 h-3.5 text-emerald-600"})}):(0,a.jsx)("div",{className:"w-6 h-6 bg-blue-100 rounded-full flex items-center justify-center",children:(0,a.jsx)(z.Z,{className:"w-3.5 h-3.5 text-blue-600"})}),(0,a.jsx)("span",{className:"text-sm font-medium text-slate-700",children:e.author_name}),(0,a.jsx)("span",{className:"text-xs text-slate-400",children:new Date(e.created_at).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),(0,a.jsx)("p",{className:"text-sm text-slate-600 whitespace-pre-wrap",children:e.content})]},e.id))}),(0,a.jsxs)("form",{onSubmit:m,className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>c(e.target.value),placeholder:"Add a comment...",className:"input flex-1",disabled:d}),(0,a.jsx)("button",{type:"submit",disabled:!n.trim()||d,className:"btn btn-primary",children:d?(0,a.jsx)(i.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(B.Z,{className:"w-4 h-4"})})]})]})}var H=s(7168),W=s(401),X=s(8867);let J={cloning:{label:"Cloning repository...",color:"text-blue-600"},branching:{label:"Creating branch...",color:"text-blue-600"},decomposing:{label:"Decomposing into sub-tasks...",color:"text-amber-600"},implementing:{label:"Implementing changes...",color:"text-violet-600"},testing:{label:"Running tests...",color:"text-cyan-600"},creating_pr:{label:"Creating PR...",color:"text-cyan-600"},completed:{label:"Completed",color:"text-emerald-600"},failed:{label:"Failed",color:"text-red-600"}};function K(e){let{ideaId:t,onComplete:s}=e,[r,n]=(0,l.useState)(null),[c,o]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!1),[h,u]=(0,l.useState)(!1),p=async()=>{try{let e=await fetch("/api/ideas/".concat(t,"/implement")),a=await e.json();a.success&&a.data?(n(a.data),("completed"===a.data.status||"failed"===a.data.status)&&(null==s||s())):n(null)}catch(e){console.error("Failed to fetch implementation status:",e)}finally{o(!1)}};if((0,l.useEffect)(()=>{p();let e=setInterval(()=>{r&&"completed"!==r.status&&"failed"!==r.status&&p()},3e3);return()=>clearInterval(e)},[t]),(0,l.useEffect)(()=>{if(r&&("completed"===r.status||"failed"===r.status))return;let e=setInterval(p,3e3);return()=>clearInterval(e)},[null==r?void 0:r.status]),c)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-slate-500",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm",children:"Loading..."})]});if(!r)return null;let g=J[r.status]||{label:r.status,color:"text-slate-600"},j=!["completed","failed"].includes(r.status);return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("h3",{className:"font-semibold text-slate-900 flex items-center gap-2",children:[(0,a.jsx)(b.Z,{className:"w-4 h-4"}),"Implementation Progress"]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[j?(0,a.jsx)(i.Z,{className:(0,I.Z)("w-5 h-5 animate-spin",g.color)}):"completed"===r.status?(0,a.jsx)(D.Z,{className:"w-5 h-5 text-emerald-600"}):(0,a.jsx)(d.Z,{className:"w-5 h-5 text-red-600"}),(0,a.jsx)("span",{className:(0,I.Z)("font-medium",g.color),children:g.label}),j&&(0,a.jsx)("button",{onClick:p,className:"p-1 text-slate-400 hover:text-slate-600",title:"Refresh",children:(0,a.jsx)(H.Z,{className:"w-4 h-4"})})]}),(0,a.jsxs)("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)(S.Z,{className:"w-4 h-4 text-slate-500"}),(0,a.jsx)("code",{className:"flex-1 bg-slate-200 px-2 py-0.5 rounded font-mono text-xs",children:r.branch_name}),(0,a.jsx)("button",{onClick:()=>{(null==r?void 0:r.branch_name)&&(navigator.clipboard.writeText(r.branch_name),u(!0),setTimeout(()=>u(!1),2e3))},className:"p-1 text-slate-400 hover:text-slate-600",title:"Copy branch name",children:h?(0,a.jsx)(W.Z,{className:"w-4 h-4 text-emerald-600"}):(0,a.jsx)(X.Z,{className:"w-4 h-4"})})]}),(0,a.jsxs)("div",{className:"mt-2 text-xs text-slate-500",children:["Repo: ",r.repo_name," • Workspace: ",r.workspace_path]}),r.pr_url&&(0,a.jsxs)("a",{href:r.pr_url,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-sm text-blue-600 hover:underline",children:[(0,a.jsx)("span",{children:"View Pull Request"}),(0,a.jsx)(k.Z,{className:"w-3 h-3"})]})]}),r.error_message&&(0,a.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg text-sm text-red-700",children:r.error_message}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("button",{onClick:()=>x(!m),className:"text-sm text-slate-500 hover:text-slate-700",children:[m?"Hide":"Show"," logs (",r.logs.length,")"]}),m&&(0,a.jsx)("div",{className:"mt-2 p-3 bg-slate-900 rounded-lg max-h-64 overflow-y-auto",children:(0,a.jsx)("pre",{className:"text-xs text-slate-300 font-mono whitespace-pre-wrap",children:r.logs.join("\n")})})]})]})}function Q(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}function $(e){let{title:t,icon:s,children:r}=e;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("h3",{className:"flex items-center gap-2 font-semibold text-slate-900",children:[s,(0,a.jsx)("span",{children:t})]}),(0,a.jsx)("div",{className:"text-sm text-slate-600",children:r})]})}function Y(e){let{status:t}=e;switch(t){case"pending":return(0,a.jsx)(n.Z,{className:"w-4 h-4 text-slate-400"});case"in_progress":return(0,a.jsx)(i.Z,{className:"w-4 h-4 text-violet-500 animate-spin"});case"completed":return(0,a.jsx)(c.Z,{className:"w-4 h-4 text-emerald-500"});case"failed":return(0,a.jsx)(d.Z,{className:"w-4 h-4 text-red-500"})}}function ee(e){return e?new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}):""}function et(e){let{failureType:t}=e;if(!t)return null;let s={timeout:{text:"timeout",className:"bg-orange-100 text-orange-700"},error:{text:"error",className:"bg-red-100 text-red-700"},tests_failed:{text:"tests failed",className:"bg-amber-100 text-amber-700"}}[t];return(0,a.jsx)("span",{className:(0,I.Z)("text-xs px-1.5 py-0.5 rounded font-medium",s.className),children:s.text})}function es(e){let{subTasks:t}=e,[s,r]=(0,l.useState)(null);if(0===t.length)return null;let n=t.filter(e=>"completed"===e.status).length,i=t.filter(e=>"failed"===e.status).length,c=Math.round(n/t.length*100);return(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsxs)($,{title:"Sub-Tasks",icon:(0,a.jsx)(o.Z,{className:"w-4 h-4 text-violet-500"}),children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs mb-1",children:[(0,a.jsxs)("span",{className:"text-slate-500",children:[n,"/",t.length," done",i>0&&(0,a.jsxs)("span",{className:"text-red-500 ml-1",children:["(",i," failed)"]})]}),(0,a.jsxs)("span",{className:"text-slate-500",children:[c,"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-slate-200 rounded-full h-2",children:(0,a.jsx)("div",{className:(0,I.Z)("h-2 rounded-full transition-all",i>0?"bg-red-500":"bg-emerald-500"),style:{width:"".concat(c,"%")}})})]}),(0,a.jsx)("ul",{className:"space-y-2",children:t.map(e=>{let t=s===e.id;return(0,a.jsxs)("li",{className:"border border-slate-100 rounded-lg",children:[(0,a.jsxs)("button",{onClick:()=>r(t?null:e.id),className:"w-full flex items-center gap-2 p-2 text-left hover:bg-slate-50 rounded-lg",children:[(0,a.jsx)(Y,{status:e.status}),(0,a.jsx)("span",{className:(0,I.Z)("flex-1 text-sm","completed"===e.status&&"line-through text-slate-400","failed"===e.status&&"text-red-600"),children:e.title}),"failed"===e.status&&e.failure_type&&(0,a.jsx)(et,{failureType:e.failure_type}),e.has_uncommitted_changes&&(0,a.jsx)("span",{title:"Uncommitted changes in workspace",children:(0,a.jsx)(m.Z,{className:"w-3.5 h-3.5 text-amber-500"})}),t?(0,a.jsx)(x.Z,{className:"w-3 h-3 text-slate-400"}):(0,a.jsx)(h.Z,{className:"w-3 h-3 text-slate-400"})]}),t&&(0,a.jsxs)("div",{className:"px-8 pb-3 space-y-3",children:[(0,a.jsx)("p",{className:"text-xs text-slate-600 whitespace-pre-wrap",children:e.description}),(e.duration_ms||e.lines_added||e.lines_removed)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-slate-500",children:[e.duration_ms&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(u.Z,{className:"w-3 h-3"}),function(e){if(!e)return"";let t=Math.floor(e/1e3),s=Math.floor(t/60),a=Math.floor(s/60);return a>0?"".concat(a,"h ").concat(s%60,"m"):s>0?"".concat(s,"m ").concat(t%60,"s"):"".concat(t,"s")}(e.duration_ms)]}),(e.lines_added||e.lines_removed)&&(0,a.jsxs)("span",{className:"flex items-center gap-1 font-mono",children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),(0,a.jsxs)("span",{className:"text-emerald-600",children:["+",e.lines_added||0]}),(0,a.jsxs)("span",{className:"text-red-600",children:["-",e.lines_removed||0]})]})]}),e.files_changed&&e.files_changed.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"text-xs font-medium text-emerald-600 flex items-center gap-1",children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),"Files Changed:"]}),(0,a.jsx)("ul",{className:"mt-1",children:e.files_changed.map(e=>(0,a.jsx)("li",{className:"text-xs text-slate-600 font-mono",children:e},e))})]}),e.files_to_modify.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-medium text-slate-500",children:"Planned Files:"}),(0,a.jsx)("ul",{className:"mt-1",children:e.files_to_modify.map(e=>(0,a.jsx)("li",{className:"text-xs text-slate-400 font-mono",children:e},e))})]}),e.error_message&&(0,a.jsx)("div",{className:"p-2 bg-red-50 border border-red-200 rounded text-xs text-red-700 whitespace-pre-wrap",children:e.error_message}),e.output_snippet&&(0,a.jsxs)("details",{className:"group",children:[(0,a.jsxs)("summary",{className:"text-xs font-medium text-slate-500 cursor-pointer flex items-center gap-1",children:[(0,a.jsx)(b.Z,{className:"w-3 h-3"}),"Output",(0,a.jsx)(h.Z,{className:"w-3 h-3 group-open:rotate-90 transition-transform"})]}),(0,a.jsx)("pre",{className:"mt-1 p-2 bg-slate-50 border border-slate-200 rounded text-xs text-slate-600 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:e.output_snippet})]}),e.has_uncommitted_changes&&(0,a.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-amber-50 border border-amber-200 rounded text-xs text-amber-700",children:[(0,a.jsx)(m.Z,{className:"w-3.5 h-3.5"}),"Uncommitted changes in workspace"]}),e.commit_hash&&(0,a.jsxs)("div",{className:"text-xs text-slate-400",children:["Commit: ",(0,a.jsx)("code",{className:"bg-slate-100 px-1 rounded",children:e.commit_hash.slice(0,8)})]}),(e.started_at||e.completed_at)&&(0,a.jsxs)("div",{className:"text-xs text-slate-400",children:[e.started_at&&(0,a.jsxs)("span",{children:["Started: ",ee(e.started_at)]}),e.completed_at&&(0,a.jsxs)("span",{className:"ml-3",children:["Finished: ",ee(e.completed_at)]})]})]})]},e.id)})})]})})}function ea(e){let{status:t}=e;switch(t){case"met":return(0,a.jsx)(c.Z,{className:"w-4 h-4 text-emerald-500"});case"partially_met":return(0,a.jsx)(m.Z,{className:"w-4 h-4 text-amber-500"});case"not_met":return(0,a.jsx)(d.Z,{className:"w-4 h-4 text-red-500"});case"no_data":return(0,a.jsx)(g.Z,{className:"w-4 h-4 text-slate-400"});default:return(0,a.jsx)(j.Z,{className:"w-4 h-4 text-slate-400"})}}function er(e){let{verification:t}=e;return(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsxs)($,{title:"Post-Ship Verification",icon:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-emerald-500"}),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,a.jsx)("span",{className:(0,I.Z)("text-xs font-medium px-2 py-1 rounded",T.aR[t.status]),children:T.Wb[t.status]}),t.confidence&&(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:["Confidence: ",t.confidence]})]}),t.summary&&(0,a.jsx)("p",{className:"text-sm text-slate-700 mb-4",children:t.summary}),t.requires_human_review&&(0,a.jsxs)("div",{className:"flex items-center gap-2 p-2 mb-4 bg-amber-50 border border-amber-200 rounded text-xs text-amber-700",children:[(0,a.jsx)(N.Z,{className:"w-3.5 h-3.5 flex-shrink-0"}),(0,a.jsxs)("span",{children:["Requires human review: ",t.human_review_reason||"Review needed"]})]}),t.metric_evaluations.length>0&&(0,a.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-slate-500 uppercase",children:"Metric Results"}),(0,a.jsx)("ul",{className:"space-y-1.5",children:t.metric_evaluations.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)(ea,{status:e.status}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-xs text-slate-700",children:e.metric}),(0,a.jsx)("p",{className:"text-xs text-slate-500 mt-0.5",children:e.evidence})]})]},t))})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-4 text-xs text-slate-400 pt-3 border-t border-slate-100",children:[t.first_evaluated_at&&(0,a.jsxs)("span",{children:["First evaluated: ",Q(t.first_evaluated_at)]}),t.evaluation_count>0&&(0,a.jsxs)("span",{children:["Evaluations: ",t.evaluation_count]}),t.next_evaluation_after&&(0,a.jsxs)("span",{children:["Next check: ",new Date(t.next_evaluation_after).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),t.follow_up_idea_ids.length>0&&(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-slate-100",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-slate-500",children:"Follow-up ideas:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-1",children:t.follow_up_idea_ids.map(e=>(0,a.jsx)(r.default,{href:"/ideas/".concat(e),className:"text-xs text-blue-600 hover:underline bg-blue-50 px-1.5 py-0.5 rounded",children:e},e))})]})]})})}function el(e){let{idea:t,linkedGoal:s}=e;return(0,a.jsxs)("div",{className:"max-w-4xl mx-auto p-6",children:[(0,a.jsxs)(r.default,{href:"/",className:"inline-flex items-center gap-2 text-sm text-slate-500 hover:text-slate-700 mb-6",children:[(0,a.jsx)(v.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Back to Dashboard"})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mb-6",children:[(0,a.jsx)("div",{className:"flex items-start justify-between mb-4",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:(0,I.Z)("priority-badge",T.Gs[t.priority]),children:T.rF[t.priority]}),(0,a.jsx)("span",{className:(0,I.Z)("category-badge",T.pG[t.category]),children:T.Hs[t.category]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("div",{className:(0,I.Z)("stage-indicator",T.lv[t.stage])}),(0,a.jsx)("span",{className:"text-xs text-slate-500",children:T.yb[t.stage]})]})]}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900 mb-2",children:t.title}),(0,a.jsx)("p",{className:"text-slate-600",children:t.summary})]})}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-6 text-sm text-slate-500 pt-4 border-t border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(w.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:["Created ",Q(t.created_at)]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(_.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:["Effort: ",T.bi[t.effort]]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(y.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:["Impact: ",T.bi[t.impact]]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Z.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:["Source: ",T.Vr[t.source.type]]})]})]}),t.tags.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-4",children:t.tags.map(e=>(0,a.jsx)("span",{className:"px-2 py-1 bg-slate-100 text-slate-600 text-xs rounded",children:e},e))}),t.implementation.branch_name&&(0,a.jsx)("div",{className:"mt-4 p-3 bg-slate-50 rounded-lg border border-slate-200",children:(0,a.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-slate-600",children:[(0,a.jsx)(S.Z,{className:"w-4 h-4"}),(0,a.jsx)("code",{className:"bg-slate-200 px-2 py-0.5 rounded",children:t.implementation.branch_name})]}),t.implementation.pr_url&&(0,a.jsxs)("a",{href:t.implementation.pr_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 hover:underline",children:[(0,a.jsx)("span",{children:"View PR"}),(0,a.jsx)(k.Z,{className:"w-3 h-3"})]})]})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,a.jsxs)("div",{className:"lg:col-span-2 space-y-6",children:[(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)($,{title:"Context",icon:(0,a.jsx)(C.Z,{className:"w-4 h-4 text-amber-500"}),children:(0,a.jsx)("p",{className:"whitespace-pre-wrap",children:t.context})})}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)($,{title:"Rationale",icon:(0,a.jsx)(R.Z,{className:"w-4 h-4 text-blue-500"}),children:(0,a.jsx)("p",{className:"whitespace-pre-wrap",children:t.rationale})})}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)($,{title:"Implementation Plan",icon:(0,a.jsx)(P.Z,{className:"w-4 h-4 text-emerald-500"}),children:(0,a.jsx)("div",{className:"whitespace-pre-wrap",children:t.implementation_plan})})}),t.implementation.sub_tasks&&t.implementation.sub_tasks.length>0&&(0,a.jsx)(es,{subTasks:t.implementation.sub_tasks}),"shipped"===t.stage&&t.verification&&(0,a.jsx)(er,{verification:t.verification}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)($,{title:"Success Metrics",icon:(0,a.jsx)(y.Z,{className:"w-4 h-4 text-violet-500"}),children:(0,a.jsx)("ul",{className:"list-disc list-inside space-y-1",children:t.success_metrics.map((e,t)=>(0,a.jsx)("li",{children:e},t))})})})]}),(0,a.jsxs)("div",{className:"space-y-6",children:[(s||t.expected_impact)&&(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[(0,a.jsxs)("h3",{className:"flex items-center gap-2 font-semibold text-slate-900 mb-3",children:[(0,a.jsx)(R.Z,{className:"w-4 h-4 text-emerald-500"}),(0,a.jsx)("span",{children:"Goal Alignment"})]}),s?(0,a.jsxs)(r.default,{href:"/goals/".concat(s.id),className:"block p-3 bg-emerald-50 border border-emerald-200 rounded-lg hover:border-emerald-300 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-emerald-800",children:s.title}),(0,a.jsx)(k.Z,{className:"w-3 h-3 text-emerald-600"})]}),(0,a.jsx)("p",{className:"text-xs text-emerald-600 line-clamp-2",children:s.description})]}):t.goal_id?(0,a.jsxs)("p",{className:"text-sm text-slate-500",children:["Linked to goal: ",(0,a.jsx)("code",{className:"text-xs bg-slate-100 px-1 rounded",children:t.goal_id})]}):null,t.expected_impact&&(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-slate-100",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500 uppercase font-medium mb-1",children:"Expected Impact"}),(0,a.jsx)("p",{className:"text-sm text-slate-700",children:t.expected_impact})]})]}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)(L,{ideaId:t.id,currentStage:t.stage})}),["in_progress","testing","shipped","rolled_back"].includes(t.stage)&&(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)(K,{ideaId:t.id})}),(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:(0,a.jsx)(V,{ideaId:t.id,comments:t.comments})}),t.source.files_analyzed&&t.source.files_analyzed.length>0&&(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[(0,a.jsx)("h3",{className:"font-semibold text-slate-900 mb-3",children:"Files Analyzed"}),(0,a.jsx)("ul",{className:"space-y-1",children:t.source.files_analyzed.map((e,t)=>(0,a.jsx)("li",{className:"text-xs text-slate-500 font-mono truncate",children:e},t))})]})]})]})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return Z},Gs:function(){return o},Hs:function(){return a},PN:function(){return u},PW:function(){return _},Q_:function(){return p},R$:function(){return v},Vr:function(){return m},Wb:function(){return h},aR:function(){return x},bi:function(){return c},en:function(){return N},i2:function(){return f},kT:function(){return b},l5:function(){return g},lE:function(){return w},lv:function(){return n},pG:function(){return r},rF:function(){return d},tV:function(){return j},tl:function(){return y},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"],c={xs:"XS",s:"S",m:"M",l:"L",xl:"XL"},d={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"},m={codebase_analysis:"Codebase Analysis",metrics_review:"Metrics Review",market_research:"Market Research",seo_audit:"SEO Audit",manual:"Manual"},x={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"},p={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"},b={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},g={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"},j={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},f={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"},v={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},w={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"},_={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},y={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"},Z={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,[746,59,971,117,744],function(){return e(e.s=703)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25],{9375:function(e,t,a){Promise.resolve().then(a.bind(a,47))},2660:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},505:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(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"}]])},6362:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},5846:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},47:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return m}});var s=a(7437),r=a(2265),n=a(7648),l=a(2660);let i=(0,a(9205).Z)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);var d=a(5846),c=a(8896),o=a(505),x=a(6362),u=a(1994),h=a(1259),p=a(6153);function m(e){let{params:t}=e,{id:a}=t,[m,b]=(0,r.useState)(null),[g,f]=(0,r.useState)([]),[j,v]=(0,r.useState)(null),[N,y]=(0,r.useState)(!0),[w,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{!async function(){try{let e=await fetch("/api/epics/".concat(a)),t=await e.json();if(!t.success){_(t.error||"Failed to load epic");return}if(b(t.data),t.data.idea_ids.length>0){let e=await fetch("/api/ideas"),a=await e.json();if(a.success){let e=t.data.idea_ids.map(e=>a.data.find(t=>t.id===e)).filter(Boolean);f(e)}}if(t.data.goal_id){let e=await fetch("/api/goals/".concat(t.data.goal_id)),a=await e.json();a.success&&v(a.data)}}catch(e){_("Failed to load epic"),console.error("Error fetching epic:",e)}finally{y(!1)}}()},[a]);let k=async e=>{try{let t=await fetch("/api/epics/".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e,status_override:!0})}),s=await t.json();s.success&&b(s.data)}catch(e){console.error("Failed to update status:",e)}};return N?(0,s.jsx)(h.default,{children:(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-blue-500 rounded-full animate-spin"})})}):w||!m?(0,s.jsx)(h.default,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)(n.default,{href:"/roadmap",className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[(0,s.jsx)(l.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Back to Roadmap"})]}),(0,s.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center",children:(0,s.jsx)("p",{className:"text-red-600",children:w||"Epic not found"})})]})}):(0,s.jsx)(h.default,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)(n.default,{href:"/roadmap",className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[(0,s.jsx)(l.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Back to Roadmap"})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-6",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,s.jsxs)("div",{className:"flex items-start gap-4",children:[(0,s.jsx)("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center flex-shrink-0",children:(0,s.jsx)(i,{className:"w-7 h-7 text-blue-600"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,s.jsx)("span",{className:(0,u.Z)("text-xs px-2 py-0.5 rounded-full",p.pG[m.category]),children:p.Hs[m.category]})}),(0,s.jsx)("h1",{className:"text-2xl font-bold text-slate-900 mb-1",children:m.title}),(0,s.jsx)("p",{className:"text-slate-500",children:m.description})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(0,s.jsx)("span",{className:(0,u.Z)("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm font-medium border",p.xP[m.status]),children:p.GK[m.status]}),(0,s.jsxs)("select",{value:m.status,onChange:e=>k(e.target.value),className:"text-xs border border-slate-200 rounded px-2 py-1 text-slate-600",children:[(0,s.jsx)("option",{value:"planned",children:"Planned"}),(0,s.jsx)("option",{value:"active",children:"Active"}),(0,s.jsx)("option",{value:"completed",children:"Completed"}),(0,s.jsx)("option",{value:"paused",children:"Paused"})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-6 text-sm text-slate-500 mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(d.Z,{className:"w-4 h-4"}),(0,s.jsxs)("span",{children:[m.idea_ids.length," ideas"]})]}),j&&(0,s.jsxs)(n.default,{href:"/goals/".concat(j.id),className:"flex items-center gap-2 text-emerald-600 hover:text-emerald-700",children:[(0,s.jsx)(c.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:j.title})]})]}),(0,s.jsxs)("div",{className:"flex items-start gap-4 mb-4",children:[(0,s.jsx)(o.Z,{className:"w-4 h-4 text-slate-400 mt-2"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-slate-500 mb-1",children:"Target Start"}),(0,s.jsx)("input",{type:"date",value:m.target_start||"",onChange:async e=>{let t=e.target.value||null;try{let e=await fetch("/api/epics/".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({target_start:t})}),s=await e.json();s.success&&b(s.data)}catch(e){console.error("Failed to update target_start:",e)}},className:"text-sm border border-slate-200 rounded px-2 py-1 text-slate-700"}),!m.target_start&&(0,s.jsx)("span",{className:"text-[10px] text-slate-400 block mt-0.5",children:"auto-estimated"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-slate-500 mb-1",children:"Target End"}),(0,s.jsx)("input",{type:"date",value:m.target_end||"",onChange:async e=>{let t=e.target.value||null;try{let e=await fetch("/api/epics/".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({target_end:t})}),s=await e.json();s.success&&b(s.data)}catch(e){console.error("Failed to update target_end:",e)}},className:"text-sm border border-slate-200 rounded px-2 py-1 text-slate-700"}),!m.target_end&&(0,s.jsx)("span",{className:"text-[10px] text-slate-400 block mt-0.5",children:"auto-estimated"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("span",{className:"text-xs text-slate-500",children:[m.progress.shipped_count,"/",m.progress.total_ideas," ideas shipped"]}),(0,s.jsxs)("span",{className:"text-xs font-medium text-slate-700",children:[m.progress.progress_pct,"%"]})]}),(0,s.jsx)("div",{className:"relative h-2 bg-slate-100 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:(0,u.Z)("absolute left-0 top-0 h-full rounded-full transition-all duration-500","completed"===m.status?"bg-emerald-500":"active"===m.status?"bg-blue-500":"bg-slate-300"),style:{width:"".concat(m.progress.progress_pct,"%")}})}),m.progress.effort_total>0&&(0,s.jsxs)("p",{className:"text-xs text-slate-400 mt-1",children:["Effort: ",m.progress.effort_completed,"/",m.progress.effort_total," points completed"]})]})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200",children:[(0,s.jsx)("div",{className:"px-6 py-4 border-b border-slate-200",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Ideas (",g.length,")"]})}),g.length>0?(0,s.jsx)("div",{className:"divide-y divide-slate-100",children:g.map((e,t)=>(0,s.jsxs)(n.default,{href:"/ideas/".concat(e.id),className:"flex items-center gap-4 px-6 py-3 hover:bg-slate-50 transition-colors",children:[(0,s.jsx)("span",{className:"text-xs text-slate-400 w-6 text-center",children:t+1}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-slate-900 truncate",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-slate-500 truncate",children:e.summary})]}),(0,s.jsx)("span",{className:(0,u.Z)("text-xs px-2 py-0.5 rounded-full text-white",p.lv[e.stage]),children:p.yb[e.stage]}),(0,s.jsx)("span",{className:"text-xs text-slate-400 w-8 text-center",children:p.bi[e.effort]}),(0,s.jsx)(x.Z,{className:"w-4 h-4 text-slate-300 flex-shrink-0"})]},e.id))}):(0,s.jsxs)("div",{className:"p-8 text-center",children:[(0,s.jsx)(d.Z,{className:"w-8 h-8 text-slate-300 mx-auto mb-2"}),(0,s.jsx)("p",{className:"text-sm text-slate-500",children:"No ideas in this epic yet. Add ideas via the API."})]})]}),(0,s.jsxs)("div",{className:"mt-6 text-xs text-slate-400",children:[(0,s.jsxs)("p",{children:["Created: ",new Date(m.created_at).toLocaleString()]}),(0,s.jsxs)("p",{children:["Last updated: ",new Date(m.updated_at).toLocaleString()]})]})]})})}},1259:function(e,t,a){"use strict";a.d(t,{default:function(){return f}});var s=a(7437),r=a(7648),n=a(9376),l=a(5466),i=a(2048),d=a(8896),c=a(8220),o=a(2718),x=a(5621),u=a(8728),h=a(2222),p=a(2023),m=a(1994),b=a(257);let g=[{href:"/",label:"Dashboard",icon:(0,s.jsx)(l.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,s.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,s.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,s.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,s.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,s.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,s.jsx)(u.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,a=(0,n.usePathname)();return(0,s.jsxs)("div",{className:"min-h-screen flex",children:[(0,s.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,s.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,s.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,s.jsx)(h.Z,{className:"w-6 h-6 text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,s.jsx)("p",{className:"text-xs text-slate-400",children:b.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,s.jsx)("nav",{className:"flex-1 p-4",children:(0,s.jsx)("ul",{className:"space-y-1",children:g.map(e=>{let t="/"===e.href?"/"===a:a.startsWith(e.href);return(0,s.jsx)("li",{children:(0,s.jsxs)(r.default,{href:e.href,className:(0,m.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,s.jsx)("span",{children:e.label})]})},e.href)})})}),(0,s.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,s.jsx)(p.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,s.jsx)("main",{className:"flex-1 overflow-auto",children:t})]})}},6153:function(e,t,a){"use strict";a.d(t,{G:function(){return i},GK:function(){return k},Gs:function(){return o},Hs:function(){return s},PN:function(){return p},PW:function(){return w},Q_:function(){return m},R$:function(){return N},Vr:function(){return x},Wb:function(){return h},aR:function(){return u},bi:function(){return d},en:function(){return v},i2:function(){return j},kT:function(){return b},l5:function(){return g},lE:function(){return y},lv:function(){return l},pG:function(){return r},rF:function(){return c},tV:function(){return f},tl:function(){return _},xP:function(){return Z},yb:function(){return n}});let s={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"},n={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},l={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",manual:"Manual"},u={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"},p={ship:"Ship",update:"Update",milestone:"Milestone",digest:"Digest",manual:"Manual",thread:"Thread",insight:"Insight"},m={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"},b={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},g={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"},v={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},N={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},y={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"},w={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"},Z={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,[746,971,117,744],function(){return e(e.s=9375)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{8645:function(e,s,t){Promise.resolve().then(t.bind(t,8619))},1723:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},6362:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},1817:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9397:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},3247:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},8930:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(9205).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},8619:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return y}});var a=t(7437),l=t(2265),n=t(1817),r=t(7168),i=t(9205);let c=(0,i.Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),d=(0,i.Z)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);var o=t(9397),m=t(8930),x=t(3247),h=t(1723);let u=(0,i.Z)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var p=t(6362);let b=(0,i.Z)("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);var f=t(1259),j=t(1994);function y(){let[e,s]=(0,l.useState)(null),[t,i]=(0,l.useState)(!0),[y,g]=(0,l.useState)(!1),[N,v]=(0,l.useState)(null),[k,w]=(0,l.useState)(""),[Z,C]=(0,l.useState)(!1),[S,_]=(0,l.useState)(null),[M,A]=(0,l.useState)(null),[P,T]=(0,l.useState)(null),[E,L]=(0,l.useState)(null),[O,R]=(0,l.useState)(""),[H,D]=(0,l.useState)(!1),[F,q]=(0,l.useState)(null);(0,l.useEffect)(()=>{U(),V()},[]);let U=async()=>{try{let e=await fetch("/api/config"),t=await e.json();t.success&&s(t.data)}catch(e){console.error("Failed to load config:",e)}finally{i(!1)}},V=async()=>{try{let e=await fetch("/api/license"),s=await e.json();s.success&&L(s.data)}catch(e){}},z=async()=>{if(O.trim()){D(!0),q(null);try{let e=await fetch("/api/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:O.trim()})}),s=await e.json();s.success?(q({type:"success",text:s.data.message}),L(s.data),R("")):q({type:"error",text:s.error||"Activation failed"})}catch(e){q({type:"error",text:"Failed to activate license"})}finally{D(!1),setTimeout(()=>q(null),5e3)}}},K=async()=>{if(e){g(!0),v(null);try{(await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok?v({type:"success",text:"Settings saved successfully"}):v({type:"error",text:"Failed to save settings"})}catch(e){v({type:"error",text:"Failed to save settings"})}finally{g(!1),setTimeout(()=>v(null),3e3)}}},B=(t,a,l)=>{if(!e)return;let n=[...e.repos];n[t]={...n[t],[a]:l},s({...e,repos:n})},I=t=>{if(!e)return;let a=e.repos.filter((e,s)=>s!==t);s({...e,repos:a})},J=async()=>{if(k.trim()){C(!0),_(null),A(null),T(null);try{let e=await fetch("/api/config/detect-repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rootDir:k.trim()})}),s=await e.json();if(!s.success){T(s.error||"Scan failed");return}_(s.data.repos),s.data.warning&&A(s.data.warning)}catch(e){T("Failed to scan directory")}finally{C(!1)}}},G=t=>{if(!e)return;let a=new Set(e.repos.map(e=>e.path)),l=t.filter(e=>!a.has(e.path)).map(e=>({name:e.name,path:e.path,type:e.type,default_branch:"main"}));s({...e,repos:[...e.repos,...l]}),_(null),A(null)},W=t=>{e&&(s({...e,repos:t.map(e=>({name:e.name,path:e.path,type:e.type,default_branch:"main"}))}),_(null),A(null))},X=(t,a,l)=>{if(!e)return;let n={...e.schedules};"focus"===a?n[t]={...n[t],focus:l.split(",").map(e=>e.trim())}:"max_ideas"===a&&(n[t]={...n[t],max_ideas:l}),s({...e,schedules:n})};return t?(0,a.jsx)(f.default,{children:(0,a.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,a.jsx)(n.Z,{className:"w-8 h-8 text-slate-400 animate-spin"})})}):e?(0,a.jsx)(f.default,{children:(0,a.jsxs)("div",{className:"p-6 max-w-4xl",children:[(0,a.jsxs)("header",{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:"Settings"}),(0,a.jsx)("p",{className:"text-slate-500 mt-1",children:"Configure analysis settings and repositories"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("button",{onClick:U,className:"btn btn-secondary gap-2",disabled:t,children:[(0,a.jsx)(r.Z,{className:(0,j.Z)("w-4 h-4",t&&"animate-spin")}),"Reload"]}),(0,a.jsxs)("button",{onClick:K,className:"btn btn-primary gap-2",disabled:y,children:[y?(0,a.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(c,{className:"w-4 h-4"}),"Save Changes"]})]})]}),N&&(0,a.jsx)("div",{className:(0,j.Z)("mb-6 p-4 rounded-lg border animate-slide-in","success"===N.type?"bg-emerald-50 border-emerald-200 text-emerald-700":"bg-red-50 border-red-200 text-red-700"),children:N.text}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mb-6",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900 mb-4",children:[(0,a.jsx)(d,{className:"w-5 h-5"}),"Implementation Workspace"]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-4",children:"Directory where the analyst clones repositories for implementation work (separate from your working copies)."}),(0,a.jsx)("input",{type:"text",value:e.workspace_dir||"",onChange:t=>s({...e,workspace_dir:t.target.value}),className:"input font-mono text-sm",placeholder:"/Users/you/Code/analyst-workspaces"})]}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,a.jsx)(d,{className:"w-5 h-5"}),"Repositories"]}),(0,a.jsxs)("button",{onClick:()=>{e&&s({...e,repos:[...e.repos,{name:"",path:"",type:"nodejs",default_branch:"main"}]})},className:"btn btn-secondary gap-2 text-sm",children:[(0,a.jsx)(o.Z,{className:"w-4 h-4"}),"Add Repository"]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[e.repos.map((e,s)=>(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg space-y-3 relative group",children:[(0,a.jsx)("button",{onClick:()=>I(s),className:"absolute top-3 right-3 p-1.5 text-slate-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",title:"Remove repository",children:(0,a.jsx)(m.Z,{className:"w-4 h-4"})}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4 pr-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Name"}),(0,a.jsx)("input",{type:"text",value:e.name,onChange:e=>B(s,"name",e.target.value),className:"input",placeholder:"my-repo"})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Local Path (for analysis)"}),(0,a.jsx)("input",{type:"text",value:e.path,onChange:e=>B(s,"path",e.target.value),className:"input font-mono text-sm",placeholder:"/Users/you/Code/my-repo"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4 pr-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Type"}),(0,a.jsx)("input",{type:"text",value:e.type||"",onChange:e=>B(s,"type",e.target.value),className:"input text-sm",placeholder:"nextjs"})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"GitHub URL (for cloning to workspace)"}),(0,a.jsx)("input",{type:"text",value:e.github_url||"",onChange:e=>B(s,"github_url",e.target.value),className:"input font-mono text-sm",placeholder:"git@github.com:user/repo.git"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Default Branch"}),(0,a.jsx)("input",{type:"text",value:e.default_branch||"main",onChange:e=>B(s,"default_branch",e.target.value),className:"input",placeholder:"main"})]})]})]},s)),0===e.repos.length&&(0,a.jsx)("div",{className:"text-center py-8 text-slate-400",children:"No repositories configured. Add one manually or scan a directory below."})]}),(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-slate-200",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-slate-700 mb-2",children:"Scan Directory"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-3",children:"Auto-detect repositories in a directory."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:k,onChange:e=>w(e.target.value),className:"input font-mono text-sm flex-1",placeholder:"/Users/you/Code/my-project",onKeyDown:e=>"Enter"===e.key&&J()}),(0,a.jsxs)("button",{onClick:J,className:"btn btn-secondary gap-2 text-sm whitespace-nowrap",disabled:Z||!k.trim(),children:[Z?(0,a.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(x.Z,{className:"w-4 h-4"}),"Scan"]})]}),P&&(0,a.jsx)("div",{className:"mt-3 p-3 bg-red-50 border border-red-200 rounded-lg text-sm text-red-700",children:P}),M&&(0,a.jsx)("div",{className:"mt-3 p-3 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-700",children:M}),S&&(0,a.jsx)("div",{className:"mt-3",children:0===S.length?(0,a.jsx)("div",{className:"p-3 bg-slate-50 rounded-lg text-sm text-slate-500",children:"No repositories detected in that directory."}):(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg space-y-3",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-slate-700",children:["Found ",S.length," repo",1!==S.length?"s":"",":"]}),(0,a.jsx)("div",{className:"space-y-1",children:S.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center gap-3 text-sm",children:[(0,a.jsx)("span",{className:(0,j.Z)("inline-block w-2 h-2 rounded-full","high"===e.confidence?"bg-emerald-500":"bg-amber-500")}),(0,a.jsx)("span",{className:"font-medium text-slate-900",children:e.name}),(0,a.jsxs)("span",{className:"text-slate-500",children:["(",e.type,")"]}),(0,a.jsx)("span",{className:"text-slate-400 font-mono text-xs truncate",children:e.path})]},s))}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)("button",{onClick:()=>G(S),className:"btn btn-secondary text-sm",children:"Add to existing"}),(0,a.jsx)("button",{onClick:()=>W(S),className:"btn btn-secondary text-sm text-red-600 hover:text-red-700",children:"Replace all"}),(0,a.jsx)("button",{onClick:()=>{_(null),A(null)},className:"btn btn-secondary text-sm",children:"Dismiss"})]})]})})]})]}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900 mb-4",children:[(0,a.jsx)(h.Z,{className:"w-5 h-5"}),"Analysis Schedules"]}),(0,a.jsx)("div",{className:"space-y-6",children:Object.keys(e.schedules).map(s=>(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg",children:[(0,a.jsxs)("h3",{className:"font-medium text-slate-900 mb-3 capitalize",children:[s," Analysis"]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Focus Areas (comma-separated)"}),(0,a.jsx)("input",{type:"text",value:e.schedules[s].focus.join(", "),onChange:e=>X(s,"focus",e.target.value),className:"input"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Max Ideas"}),(0,a.jsx)("input",{type:"number",value:e.schedules[s].max_ideas,onChange:e=>X(s,"max_ideas",parseInt(e.target.value,10)),className:"input",min:1,max:50})]})]})]},s))})]}),(0,a.jsxs)("section",{className:"mt-6 p-4 bg-slate-100 rounded-lg",children:[(0,a.jsx)("h3",{className:"font-medium text-slate-700 mb-2",children:"Cron Setup"}),(0,a.jsx)("p",{className:"text-sm text-slate-600 mb-2",children:"To enable automated analysis, run the setup script:"}),(0,a.jsx)("pre",{className:"bg-slate-800 text-slate-100 p-3 rounded text-sm font-mono overflow-x-auto",children:"./scripts/setup-cron.sh"})]}),(0,a.jsxs)("section",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6 mt-6",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-slate-900 mb-4",children:[(0,a.jsx)(u,{className:"w-5 h-5"}),"Subscription & Billing"]}),E?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"Plan"}),(0,a.jsx)("p",{className:"text-sm font-semibold text-slate-900 capitalize",children:E.tier})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"Status"}),(0,a.jsx)("span",{className:(0,j.Z)("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium","valid"===E.status&&"bg-emerald-100 text-emerald-700","trial"===E.status&&"bg-blue-100 text-blue-700","expired"===E.status&&"bg-red-100 text-red-700",(!E.status||"unknown"===E.status)&&"bg-slate-100 text-slate-600"),children:E.status})]}),E.keyMasked&&"(trial)"!==E.keyMasked&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"License Key"}),(0,a.jsx)("p",{className:"text-sm font-mono text-slate-700",children:E.keyMasked})]}),E.email&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-500 mb-1",children:"Email"}),(0,a.jsx)("p",{className:"text-sm text-slate-700",children:E.email})]})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500 mt-3",children:E.message})]}),(0,a.jsxs)("a",{href:"https://vibebusiness.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-emerald-600 hover:text-emerald-700 font-medium",children:[(0,a.jsx)(p.Z,{className:"w-3.5 h-3.5"}),"Manage Subscription"]})]}):(0,a.jsxs)("p",{className:"text-sm text-slate-500",children:["License information unavailable. Run ",(0,a.jsx)("code",{className:"text-xs bg-slate-100 px-1.5 py-0.5 rounded",children:"vibebusiness init"})," to set up."]}),(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-slate-200",children:[(0,a.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-slate-700 mb-2",children:[(0,a.jsx)(b,{className:"w-4 h-4"}),"Enter License Key"]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-3",children:"Activate a license key purchased from vibebusiness.com."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:O,onChange:e=>R(e.target.value),className:"input font-mono text-sm flex-1",placeholder:"PRO-xxxxxxxxxxxx",onKeyDown:e=>"Enter"===e.key&&z()}),(0,a.jsxs)("button",{onClick:z,className:"btn btn-primary gap-2 text-sm whitespace-nowrap",disabled:H||!O.trim(),children:[H?(0,a.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(b,{className:"w-4 h-4"}),"Activate"]})]}),F&&(0,a.jsx)("div",{className:(0,j.Z)("mt-3 p-3 rounded-lg text-sm","success"===F.type?"bg-emerald-50 border border-emerald-200 text-emerald-700":"bg-red-50 border border-red-200 text-red-700"),children:F.text})]})]})]})}):(0,a.jsx)(f.default,{children:(0,a.jsx)("div",{className:"p-6",children:(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:"Failed to load configuration. Please check that data/config.json exists."})})})}},1259:function(e,s,t){"use strict";t.d(s,{default:function(){return j}});var a=t(7437),l=t(7648),n=t(9376),r=t(5466),i=t(2048),c=t(8896),d=t(8220),o=t(2718),m=t(5621),x=t(8728),h=t(2222),u=t(2023),p=t(1994),b=t(257);let f=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(r.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.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)(d.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.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)(x.Z,{className:"w-5 h-5"})}];function j(e){let{children:s}=e,t=(0,n.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)(l.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)(h.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:b.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:f.map(e=>{let s="/"===e.href?"/"===t:t.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(l.default,{href:e.href,className:(0,p.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",s?"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)(u.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:s})]})}}},function(e){e.O(0,[746,971,117,744],function(){return e(e.s=8645)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{337:function(e,t,s){Promise.resolve().then(s.bind(s,2612))},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"}]])},9322:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},6362:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4743:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]])},8930:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},2489:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},2612:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return v}});var a=s(7437),r=s(2265),n=s(9397),l=s(7168),i=s(9322),d=s(9205);let c=(0,d.Z)("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);var o=s(4743),x=s(1259),u=s(2489),m=s(401),h=s(6362);let b=(0,d.Z)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var p=s(8930),g=s(1994),f=s(6153);function j(e){let{draft:t,onPublish:s,onEdit:n,onDiscard:l}=e,[i,d]=(0,r.useState)(!1),[c,x]=(0,r.useState)(t.text),[j,v]=(0,r.useState)(!1),y=i?c.length:t.text.length,N=y>280,w="draft"===t.status;async function k(){v(!0);try{await s(t.id)}finally{v(!1)}}async function _(){if(!N&&c.trim()){v(!0);try{await n(t.id,c),d(!1)}finally{v(!1)}}}async function Z(){v(!0);try{await l(t.id)}finally{v(!1)}}return(0,a.jsxs)("div",{className:(0,g.Z)("border rounded-lg p-4 transition-colors",w?"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.jsx)("span",{className:(0,g.Z)("text-xs px-2 py-0.5 rounded-full font-medium",f.Q_[t.source]),children:f.PN[t.source]}),(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:c,onChange:e=>x(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,g.Z)("text-xs",N?"text-red-500 font-medium":"text-slate-400"),children:[y,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{d(!1),x(t.text)},className:"text-xs text-slate-500 hover:text-slate-700 flex items-center gap-1",disabled:j,children:[(0,a.jsx)(u.Z,{className:"w-3 h-3"})," Cancel"]}),(0,a.jsxs)("button",{onClick:_,className:"text-xs text-blue-600 hover:text-blue-800 flex items-center gap-1 disabled:opacity-50",disabled:j||N||!c.trim(),children:[(0,a.jsx)(m.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}),w&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",y>260?"text-amber-500":"text-slate-400"),children:[y,"/280"]})})]}),"published"===t.status&&t.tweet_url&&(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 mb-3",children:[(0,a.jsx)(h.Z,{className:"w-3 h-3"}),"View on X"]}),w&&!i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-slate-100",children:[(0,a.jsxs)("button",{onClick:k,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:j,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),j?"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:j,children:[(0,a.jsx)(b,{className:"w-3 h-3"}),"Edit"]}),(0,a.jsxs)("button",{onClick:Z,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:j,children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),"Discard"]})]})]})}function v(){var e;let[t,s]=(0,r.useState)(null),[d,u]=(0,r.useState)(!0),[m,h]=(0,r.useState)(null),[b,p]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),N=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/social"),t=await e.json();t.success?(s(t.data),h(null)):h(t.error||"Failed to load social data")}catch(e){h("Failed to connect to server")}finally{u(!1)}},[]);async function w(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 N()}async function k(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 N()}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 N()}async function Z(){if(g.trim()&&!(g.length>280)){y(!0);try{let e=await fetch("/api/social",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:g})}),t=await e.json();t.success?(f(""),p(!1),await N()):alert(t.error||"Failed to create draft")}finally{y(!1)}}}(0,r.useEffect)(()=>{N()},[N]);let C=(null==t?void 0:t.drafts.filter(e=>"draft"===e.status))||[],S=(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)(x.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:()=>p(!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)(n.Z,{className:"w-4 h-4"}),"New Draft"]}),(0,a.jsx)("button",{onClick:()=>{u(!0),N()},className:"p-2 text-slate-400 hover:text-slate-600 transition-colors",title:"Refresh",children:(0,a.jsx)(l.Z,{className:"w-4 h-4 ".concat(d?"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)(c,{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:g,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(g.length>280?"text-red-500 font-medium":"text-slate-400"),children:[g.length,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>{p(!1),f("")},className:"px-3 py-1.5 text-sm text-slate-500 hover:text-slate-700",children:"Cancel"}),(0,a.jsxs)("button",{onClick:Z,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:v||!g.trim()||g.length>280,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),"Save Draft"]})]})]})]}),d&&!t&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(l.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..."})]}),m&&(0,a.jsx)("div",{className:"text-center py-12",children:(0,a.jsx)("p",{className:"text-sm text-red-500",children:m})}),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 (",C.length,")"]})}),0===C.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:C.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))}),S.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 (",S.length,")"]})}),(0,a.jsx)("div",{className:"space-y-3",children:S.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))})]})]})]})})}},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(7648),n=s(9376),l=s(5466),i=s(2048),d=s(8896),c=s(8220),o=s(2718),x=s(5621),u=s(8728),m=s(2222),h=s(2023),b=s(1994),p=s(257);let g=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(l.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(u.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,s=(0,n.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)(m.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:p.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:g.map(e=>{let t="/"===e.href?"/"===s:s.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(r.default,{href:e.href,className:(0,b.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)(h.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 _},Gs:function(){return o},Hs:function(){return a},PN:function(){return h},PW:function(){return w},Q_:function(){return b},R$:function(){return y},Vr:function(){return x},Wb:function(){return m},aR:function(){return u},bi:function(){return d},en:function(){return v},i2:function(){return j},kT:function(){return p},l5:function(){return g},lE:function(){return N},lv:function(){return l},pG:function(){return r},rF:function(){return c},tV:function(){return f},tl:function(){return k},xP:function(){return Z},yb:function(){return n}});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"},n={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},l={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",manual:"Manual"},u={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"},m={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},h={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"},p={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},g={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"},v={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},y={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},N={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"},w={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},k={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"},_={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},Z={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,[746,971,117,744],function(){return e(e.s=337)}),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
- ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-0{bottom:0}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-3{right:.75rem}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}.min-h-screen{min-height:100vh}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[700px\]{min-width:700px}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(241 245 249/var(--tw-divide-opacity,1))}.divide-slate-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(248 250 252/var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.border-t-blue-500{--tw-border-opacity:1;border-top-color:rgb(59 130 246/var(--tw-border-opacity,1))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pl-10{padding-left:2.5rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.line-through{text-decoration-line:line-through}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-500{transition-duration:.5s}:root{--background:#f8fafc;--foreground:#0f172a}body{color:var(--foreground);background:var(--background);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f1f5f9;border-radius:4px}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#94a3b8}.kanban-column{min-height:500px;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1));padding:.75rem}.kanban-column-header{margin-bottom:.75rem;display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1));padding-bottom:.5rem}.idea-card{margin-bottom:.5rem;cursor:pointer;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.75rem;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.idea-card,.idea-card:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.idea-card:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1));--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);transform:translateY(-1px)}.priority-badge{border-radius:.25rem;border-width:1px}.category-badge,.priority-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500}.category-badge,.size-badge{border-radius:.25rem}.size-badge{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1));font-size:.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.stage-indicator{height:.5rem;width:.5rem;border-radius:9999px}.comment-bubble{margin-bottom:.75rem;border-radius:.5rem;padding:.75rem}.comment-bubble.human{margin-left:2rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.comment-bubble.ai{margin-right:2rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:.5rem;padding:.5rem 1rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-offset-width:2px}.btn-primary{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.btn-primary:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.btn-primary:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.btn-secondary{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.btn-secondary:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.btn-secondary:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity,1))}.btn-danger{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.btn-danger:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.btn-danger:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.btn-ghost{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.btn-ghost:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.btn-ghost:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity,1))}.input{width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1));padding:.5rem .75rem}.input:focus{border-color:transparent;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.textarea{width:100%;resize:none;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1));padding:.5rem .75rem}.textarea:focus{border-color:transparent;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}@keyframes pulse-subtle{0%,to{opacity:1}50%{opacity:.7}}.animate-pulse-subtle{animation:pulse-subtle 2s ease-in-out infinite}@keyframes slide-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.animate-slide-in{animation:slide-in .2s ease-out}.hover\:border-amber-300:hover{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\:border-emerald-300:hover{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.hover\:bg-amber-600:hover{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.hover\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.hover\:shadow-md:hover,.hover\:shadow-sm:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.focus\:border-emerald-500:focus{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-amber-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(245 158 11/var(--tw-ring-opacity,1))}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-emerald-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\:rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.group:hover .group-hover\:ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.group:hover .group-hover\:ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}@media (min-width:640px){.sm\:inline-block{display:inline-block}}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width:1024px){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}