@burdenoff/microfe-bigconsole 2026.1008.12 → 2026.1008.13

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.
@@ -6,16 +6,18 @@ import { Section as r, SectionStack as i } from "../components/common/Section.js
6
6
  import "../components/common/index.js";
7
7
  import a from "../hooks/useBigConsoleAnalytics.js";
8
8
  import { isNative as ee, nativeImpact as o, nativeNotify as te } from "../../utils/nativeBridge.js";
9
+ import { isInsightsDraftDirty as ne } from "../utils/insightsDraft.js";
9
10
  /* empty css */
10
- import { memo as s, useCallback as c, useEffect as ne, useState as l } from "react";
11
- import { AlertCircle as u, ArrowRight as d, Ban as re, CheckCircle as f, Clock as p, Eye as ie, History as ae, Lightbulb as oe, Loader2 as m, RefreshCw as se, Sparkles as h, Trash2 as ce, Wand2 as g, X as le, XCircle as _ } from "lucide-react";
12
- import { AuroraBackground as ue, GlassCard as de, GradientText as fe, IllustratedEmptyState as pe, PagePurpose as me } from "@burdenoff/fe-libs/ui";
13
- import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
- import { useMutation as y, useQuery as b } from "@apollo/client/react";
15
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
16
- import { gql as C } from "@apollo/client";
11
+ import { memo as s, useCallback as c, useEffect as re, useState as l } from "react";
12
+ import { AlertCircle as ie, ArrowRight as u, Ban as ae, CheckCircle as d, Clock as f, Eye as oe, History as se, Lightbulb as ce, Loader2 as p, RefreshCw as le, Sparkles as m, Trash2 as ue, Wand2 as h, X as de, XCircle as g } from "lucide-react";
13
+ import { AuroraBackground as fe, GlassCard as pe, GradientText as me, IllustratedEmptyState as he, PagePurpose as ge } from "@burdenoff/fe-libs/ui";
14
+ import { useUnsavedChanges as _e } from "@burdenoff/fe-libs/shared/hooks";
15
+ import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
+ import { useMutation as v, useQuery as y } from "@apollo/client/react";
17
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
18
+ import { gql as S } from "@apollo/client";
17
19
  //#region src/bigconsole/pages/InsightsPage.tsx
18
- var he = C`
20
+ var ve = S`
19
21
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
20
22
  listPromptGenerations(status: $status, first: $first) {
21
23
  edges {
@@ -55,7 +57,7 @@ var he = C`
55
57
  totalCount
56
58
  }
57
59
  }
58
- `, ge = C`
60
+ `, ye = S`
59
61
  query GetPromptSuggestions($category: String, $limit: Int) {
60
62
  getPromptSuggestions(category: $category, limit: $limit) {
61
63
  id
@@ -66,7 +68,7 @@ var he = C`
66
68
  tags
67
69
  }
68
70
  }
69
- `, _e = C`
71
+ `, be = S`
70
72
  mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
71
73
  generateDashboardFromPrompt(input: $input) {
72
74
  id
@@ -74,24 +76,24 @@ var he = C`
74
76
  prompt
75
77
  }
76
78
  }
77
- `, ve = C`
79
+ `, xe = S`
78
80
  mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
79
81
  createDashboardFromGeneration(input: $input) {
80
82
  id
81
83
  }
82
84
  }
83
- `, ye = C`
85
+ `, Se = S`
84
86
  mutation DeletePromptGeneration($generationId: ID!) {
85
87
  deletePromptGeneration(generationId: $generationId)
86
88
  }
87
- `, be = C`
89
+ `, Ce = S`
88
90
  mutation CancelPromptGeneration($generationId: ID!) {
89
91
  cancelPromptGeneration(generationId: $generationId) {
90
92
  id
91
93
  status
92
94
  }
93
95
  }
94
- `, xe = C`
96
+ `, we = S`
95
97
  mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
96
98
  regenerateDashboard(input: $input) {
97
99
  id
@@ -99,7 +101,7 @@ var he = C`
99
101
  prompt
100
102
  }
101
103
  }
102
- `, Se = C`
104
+ `, Te = S`
103
105
  mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
104
106
  refineGeneratedDashboard(input: $input) {
105
107
  id
@@ -107,11 +109,11 @@ var he = C`
107
109
  prompt
108
110
  }
109
111
  }
110
- `, Ce = [
112
+ `, Ee = [
111
113
  "PENDING",
112
114
  "PROCESSING",
113
115
  "GENERATING"
114
- ], we = 12, Te = 8, Ee = [
116
+ ], De = 12, Oe = 8, ke = [
115
117
  {
116
118
  value: "MODERN",
117
119
  label: "Modern"
@@ -132,7 +134,7 @@ var he = C`
132
134
  value: "VIBRANT",
133
135
  label: "Vibrant"
134
136
  }
135
- ], De = [
137
+ ], Ae = [
136
138
  {
137
139
  value: "GRID",
138
140
  label: "Grid"
@@ -157,20 +159,20 @@ var he = C`
157
159
  value: "THREE_COLUMN",
158
160
  label: "Three column"
159
161
  }
160
- ], Oe = [
162
+ ], je = [
161
163
  6,
162
164
  8,
163
165
  12,
164
166
  16,
165
167
  24
166
- ], ke = [
168
+ ], Me = [
167
169
  4,
168
170
  6,
169
171
  8,
170
172
  12,
171
173
  16,
172
174
  24
173
- ], w = {
175
+ ], C = {
174
176
  display: "inline-flex",
175
177
  alignItems: "center",
176
178
  justifyContent: "center",
@@ -182,35 +184,35 @@ var he = C`
182
184
  fontWeight: "var(--font-weight-medium)",
183
185
  lineHeight: 1.2,
184
186
  cursor: "pointer"
185
- }, T = {
186
- ...w,
187
+ }, w = {
188
+ ...C,
187
189
  border: "1px solid var(--color-border-default)",
188
190
  backgroundColor: "transparent",
189
191
  color: "var(--color-text-primary)"
190
- }, E = {
191
- ...w,
192
+ }, T = {
193
+ ...C,
192
194
  border: "1px solid transparent",
193
195
  backgroundColor: "var(--color-action-primary-bg)",
194
196
  color: "var(--color-action-primary-text)"
195
- }, Ae = {
196
- ...w,
197
+ }, Ne = {
198
+ ...C,
197
199
  border: "1px solid var(--color-status-warning-border)",
198
200
  backgroundColor: "transparent",
199
201
  color: "var(--color-status-warning-text)"
200
- }, D = {
201
- ...w,
202
+ }, Pe = {
203
+ ...C,
202
204
  minWidth: "var(--size-controlHeight-md)",
203
205
  padding: "0 var(--space-controlGap)",
204
206
  border: "1px solid var(--color-border-default)",
205
207
  backgroundColor: "transparent",
206
208
  color: "var(--color-status-error-text)"
207
- }, O = {
209
+ }, E = {
208
210
  display: "block",
209
211
  marginBottom: "2px",
210
212
  fontSize: "var(--font-size-body-sm)",
211
213
  fontWeight: "var(--font-weight-medium)",
212
214
  color: "var(--color-text-secondary)"
213
- }, k = {
215
+ }, D = {
214
216
  width: "100%",
215
217
  minHeight: "var(--size-controlHeight-md)",
216
218
  padding: "0 var(--space-controlGap)",
@@ -219,7 +221,7 @@ var he = C`
219
221
  backgroundColor: "var(--color-bg-canvas)",
220
222
  color: "var(--color-text-primary)",
221
223
  fontSize: "var(--font-size-body-sm)"
222
- }, A = {
224
+ }, O = {
223
225
  display: "inline-flex",
224
226
  alignItems: "center",
225
227
  gap: "var(--space-iconGap)",
@@ -231,7 +233,7 @@ var he = C`
231
233
  backgroundColor: "var(--color-bg-sunken)",
232
234
  color: "var(--color-text-secondary)"
233
235
  };
234
- function j(e) {
236
+ function k(e) {
235
237
  switch (e) {
236
238
  case "COMPLETED": return "success";
237
239
  case "FAILED": return "danger";
@@ -241,7 +243,7 @@ function j(e) {
241
243
  default: return "neutral";
242
244
  }
243
245
  }
244
- var M = {
246
+ var A = {
245
247
  success: {
246
248
  text: "var(--color-status-success-text)",
247
249
  bg: "var(--color-status-success-bgSubtle)",
@@ -263,36 +265,36 @@ var M = {
263
265
  border: "var(--color-border-subtle)"
264
266
  }
265
267
  };
266
- function je(e) {
267
- let t = M[j(e)].text;
268
+ function Fe(e) {
269
+ let t = A[k(e)].text;
268
270
  switch (e) {
269
- case "COMPLETED": return /* @__PURE__ */ x(f, {
271
+ case "COMPLETED": return /* @__PURE__ */ b(d, {
270
272
  size: 14,
271
273
  style: { color: t },
272
274
  "aria-hidden": "true"
273
275
  });
274
276
  case "FAILED":
275
- case "CANCELLED": return /* @__PURE__ */ x(_, {
277
+ case "CANCELLED": return /* @__PURE__ */ b(g, {
276
278
  size: 14,
277
279
  style: { color: t },
278
280
  "aria-hidden": "true"
279
281
  });
280
282
  case "PENDING":
281
283
  case "PROCESSING":
282
- case "GENERATING": return /* @__PURE__ */ x(m, {
284
+ case "GENERATING": return /* @__PURE__ */ b(p, {
283
285
  size: 14,
284
286
  className: "animate-spin",
285
287
  style: { color: t },
286
288
  "aria-hidden": "true"
287
289
  });
288
- default: return /* @__PURE__ */ x(p, {
290
+ default: return /* @__PURE__ */ b(f, {
289
291
  size: 14,
290
292
  style: { color: t },
291
293
  "aria-hidden": "true"
292
294
  });
293
295
  }
294
296
  }
295
- function N(e, t) {
297
+ function j(e, t) {
296
298
  switch (e) {
297
299
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
298
300
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -303,44 +305,44 @@ function N(e, t) {
303
305
  default: return e;
304
306
  }
305
307
  }
306
- var Me = ({ status: e }) => {
307
- let { t } = v(), n = M[j(e)];
308
- return /* @__PURE__ */ S("span", {
308
+ var Ie = ({ status: e }) => {
309
+ let { t } = _(), n = A[k(e)];
310
+ return /* @__PURE__ */ x("span", {
309
311
  "data-status": e,
310
312
  style: {
311
- ...A,
313
+ ...O,
312
314
  border: `1px solid ${n.border}`,
313
315
  backgroundColor: n.bg,
314
316
  color: n.text
315
317
  },
316
- children: [je(e), N(e, t)]
318
+ children: [Fe(e), j(e, t)]
317
319
  });
318
320
  };
319
- function Ne(e) {
320
- let t = M[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
321
+ function Le(e) {
322
+ let t = A[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
321
323
  return {
322
- ...A,
324
+ ...O,
323
325
  border: `1px solid ${t.border}`,
324
326
  backgroundColor: t.bg,
325
327
  color: t.text
326
328
  };
327
329
  }
328
- function P(e) {
330
+ function M(e) {
329
331
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
330
332
  }
331
- function Pe(e) {
333
+ function Re(e) {
332
334
  let t = e?.toUpperCase();
333
335
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
334
336
  }
335
- var Fe = {
337
+ var ze = {
336
338
  HIGH: "success",
337
339
  MEDIUM: "neutral",
338
340
  LOW: "danger"
339
341
  };
340
- function Ie(e) {
342
+ function Be(e) {
341
343
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
342
344
  }
343
- function Le(e, t) {
345
+ function Ve(e, t) {
344
346
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
345
347
  return {
346
348
  "--proposal-column": r + 1,
@@ -349,10 +351,10 @@ function Le(e, t) {
349
351
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
350
352
  };
351
353
  }
352
- function Re(e) {
353
- let t = M[Fe[e]];
354
+ function He(e) {
355
+ let t = A[ze[e]];
354
356
  return {
355
- ...A,
357
+ ...O,
356
358
  padding: "0 var(--space-controlGap)",
357
359
  fontSize: "var(--font-size-xs)",
358
360
  fontWeight: "var(--font-weight-semibold)",
@@ -362,143 +364,155 @@ function Re(e) {
362
364
  color: t.text
363
365
  };
364
366
  }
365
- var F = s(function() {
366
- let { t: s } = v(), f = e(), p = a(), [_, C] = l(""), [w, j] = l("MODERN"), [M, je] = l("GRID"), [N, Fe] = l(we), [F, ze] = l(Te), [I, Be] = l(!1), [Ve, L] = l(null), [R, He] = l(() => /* @__PURE__ */ new Set()), [z, B] = l(null), [V, H] = l(null), [U, W] = l(""), G = c((e) => {
367
- He((t) => new Set(t).add(e));
368
- }, []), K = c((e) => {
369
- He((t) => {
367
+ var N = s(function() {
368
+ let { t: s } = _(), d = e(), f = a(), [g, S] = l(""), [C, k] = l("MODERN"), [A, Fe] = l("GRID"), [j, ze] = l(De), [N, Ue] = l(Oe), [P, F] = l(!1), [I, L] = l(null), [R, z] = l(() => /* @__PURE__ */ new Set()), [B, V] = l(null), [H, U] = l(null), [W, G] = l("");
369
+ _e({
370
+ id: "insights-prompt",
371
+ label: s("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
372
+ dirty: ne({
373
+ promptText: g,
374
+ isGenerating: P,
375
+ refineOpen: H !== null,
376
+ refineText: W,
377
+ refineBusy: H !== null && R.has(H.id)
378
+ })
379
+ });
380
+ let K = c((e) => {
381
+ z((t) => new Set(t).add(e));
382
+ }, []), q = c((e) => {
383
+ z((t) => {
370
384
  let n = new Set(t);
371
385
  return n.delete(e), n;
372
386
  });
373
- }, []), { data: Ue, loading: We, error: q, refetch: J, startPolling: Ge, stopPolling: Y } = b(he, {
387
+ }, []), { data: We, loading: Ge, error: J, refetch: Y, startPolling: Ke, stopPolling: X } = y(ve, {
374
388
  variables: { first: 20 },
375
389
  fetchPolicy: "cache-and-network"
376
- }), X = Ue?.listPromptGenerations?.edges?.some((e) => Ce.includes(e.node.status)) ?? !1, { data: Ke, error: qe, refetch: Je } = b(ge, { variables: { limit: 6 } }), [Ye] = y(_e), [Xe] = y(ve), [Ze] = y(ye), [Qe] = y(be), [$e] = y(xe), [et] = y(Se), Z = Ue?.listPromptGenerations?.edges?.map((e) => e.node) || [], tt = Ke?.getPromptSuggestions || [];
377
- ne(() => (X || I ? Ge(2e3) : Y(), () => Y()), [
378
- X,
379
- I,
380
- Ge,
381
- Y
382
- ]), ne(() => {
383
- if (!z && !V) return;
390
+ }), Z = We?.listPromptGenerations?.edges?.some((e) => Ee.includes(e.node.status)) ?? !1, { data: qe, error: Je, refetch: Ye } = y(ye, { variables: { limit: 6 } }), [Xe] = v(be), [Ze] = v(xe), [Qe] = v(Se), [$e] = v(Ce), [et] = v(we), [tt] = v(Te), Q = We?.listPromptGenerations?.edges?.map((e) => e.node) || [], nt = qe?.getPromptSuggestions || [];
391
+ re(() => (Z || P ? Ke(2e3) : X(), () => X()), [
392
+ Z,
393
+ P,
394
+ Ke,
395
+ X
396
+ ]), re(() => {
397
+ if (!B && !H) return;
384
398
  let e = (e) => {
385
- e.key === "Escape" && (B(null), H(null));
399
+ e.key === "Escape" && (V(null), U(null));
386
400
  };
387
401
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
388
- }, [z, V]);
389
- let nt = c(async () => {
390
- if (!(!_.trim() || I)) {
391
- if (_.length > 2e3) {
402
+ }, [B, H]);
403
+ let rt = c(async () => {
404
+ if (!(!g.trim() || P)) {
405
+ if (g.length > 2e3) {
392
406
  L(s("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
393
407
  return;
394
408
  }
395
- L(null), Be(!0);
409
+ L(null), F(!0);
396
410
  try {
397
- p("bigconsole.ai.generate_clicked", { maxWidgets: F });
398
- let e = await Ye({ variables: { input: {
399
- prompt: _.trim(),
400
- styleType: w,
401
- layoutType: M,
402
- gridColumns: N,
403
- maxWidgets: F
411
+ f("bigconsole.ai.generate_clicked", { maxWidgets: N });
412
+ let e = await Xe({ variables: { input: {
413
+ prompt: g.trim(),
414
+ styleType: C,
415
+ layoutType: A,
416
+ gridColumns: j,
417
+ maxWidgets: N
404
418
  } } });
405
419
  if (t(e, "command")) return;
406
420
  let n = e.data?.generateDashboardFromPrompt?.id;
407
- n && p("bigconsole.ai.dashboard_generated", {
421
+ n && f("bigconsole.ai.dashboard_generated", {
408
422
  generationId: n,
409
- maxWidgets: F
410
- }), C(""), J();
423
+ maxWidgets: N
424
+ }), S(""), Y();
411
425
  } catch (e) {
412
426
  if (t(e, "command")) return;
413
427
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
414
428
  } finally {
415
- Be(!1);
429
+ F(!1);
416
430
  }
417
431
  }
418
432
  }, [
419
- p,
420
- _,
421
- I,
422
- Ye,
423
- J,
424
- w,
425
- M,
433
+ f,
434
+ g,
435
+ P,
436
+ Xe,
437
+ Y,
438
+ C,
439
+ A,
440
+ j,
426
441
  N,
427
- F,
428
442
  s
429
- ]), Q = c(async (e) => {
443
+ ]), it = c(async (e) => {
430
444
  L(null);
431
445
  try {
432
- p("bigconsole.ai.create_dashboard_clicked", { generationId: e });
433
- let n = await Xe({ variables: { input: { generationId: e } } });
446
+ f("bigconsole.ai.create_dashboard_clicked", { generationId: e });
447
+ let n = await Ze({ variables: { input: { generationId: e } } });
434
448
  if (t(n, "project")) return;
435
449
  let r = n.data?.createDashboardFromGeneration?.id;
436
- r && (p("bigconsole.ai.dashboard_created", {
450
+ r && (f("bigconsole.ai.dashboard_created", {
437
451
  generationId: e,
438
452
  dashboardId: r
439
- }), f(`/dashboards/${r}`));
453
+ }), d(`/dashboards/${r}`));
440
454
  } catch (e) {
441
455
  if (t(e, "project")) return;
442
456
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
443
457
  }
444
458
  }, [
445
- Xe,
446
- p,
459
+ Ze,
447
460
  f,
461
+ d,
448
462
  s
449
- ]), rt = c(async (e) => {
463
+ ]), at = c(async (e) => {
450
464
  L(null);
451
465
  try {
452
- await Ze({ variables: { generationId: e } }), ee() && te("success"), J();
466
+ await Qe({ variables: { generationId: e } }), ee() && te("success"), Y();
453
467
  } catch (e) {
454
468
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && te("error");
455
469
  }
456
470
  }, [
457
- Ze,
458
- J,
471
+ Qe,
472
+ Y,
459
473
  s
460
- ]), it = c(async (e) => {
461
- L(null), G(e);
474
+ ]), ot = c(async (e) => {
475
+ L(null), K(e);
462
476
  try {
463
- await Qe({ variables: { generationId: e } }), J();
477
+ await $e({ variables: { generationId: e } }), Y();
464
478
  } catch (e) {
465
479
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
466
480
  } finally {
467
- K(e);
481
+ q(e);
468
482
  }
469
483
  }, [
470
- Qe,
471
- J,
484
+ $e,
485
+ Y,
472
486
  s
473
- ]), at = c(async (e) => {
474
- L(null), G(e);
487
+ ]), st = c(async (e) => {
488
+ L(null), K(e);
475
489
  try {
476
- if (t(await $e({ variables: { input: { generationId: e } } }), "command")) return;
477
- J();
490
+ if (t(await et({ variables: { input: { generationId: e } } }), "command")) return;
491
+ Y();
478
492
  } catch (e) {
479
493
  if (t(e, "command")) return;
480
494
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
481
495
  } finally {
482
- K(e);
496
+ q(e);
483
497
  }
484
498
  }, [
485
- $e,
486
- J,
499
+ et,
500
+ Y,
487
501
  s
488
- ]), ot = c(async () => {
489
- if (!V || !U.trim()) return;
490
- let e = V.id;
491
- L(null), G(e);
502
+ ]), ct = c(async () => {
503
+ if (!H || !W.trim()) return;
504
+ let e = H.id;
505
+ L(null), K(e);
492
506
  let n = !1;
493
507
  try {
494
- if (t(await et({ variables: { input: {
508
+ if (t(await tt({ variables: { input: {
495
509
  generationId: e,
496
- refinementPrompt: U.trim()
510
+ refinementPrompt: W.trim()
497
511
  } } }), "command")) {
498
512
  n = !0;
499
513
  return;
500
514
  }
501
- n = !0, J();
515
+ n = !0, Y();
502
516
  } catch (e) {
503
517
  if (t(e, "command")) {
504
518
  n = !0;
@@ -506,27 +520,27 @@ var F = s(function() {
506
520
  }
507
521
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
508
522
  } finally {
509
- n && (H(null), W("")), K(e);
523
+ n && (U(null), G("")), q(e);
510
524
  }
511
525
  }, [
512
- V,
513
- U,
514
- et,
515
- J,
526
+ H,
527
+ W,
528
+ tt,
529
+ Y,
516
530
  s
517
- ]), st = c((e) => {
518
- C(e);
519
- }, []), $ = z?.generatedSpec;
520
- return /* @__PURE__ */ S("div", {
531
+ ]), lt = c((e) => {
532
+ S(e);
533
+ }, []), $ = B?.generatedSpec;
534
+ return /* @__PURE__ */ x("div", {
521
535
  "data-tour": "bigconsole-ai-insights",
522
536
  className: "min-w-0",
523
537
  style: { backgroundColor: "var(--color-bg-canvas)" },
524
538
  children: [
525
- /* @__PURE__ */ S("header", {
539
+ /* @__PURE__ */ x("header", {
526
540
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
527
- children: [/* @__PURE__ */ x(ue, { intensity: "subtle" }), /* @__PURE__ */ x("div", {
541
+ children: [/* @__PURE__ */ b(fe, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
528
542
  style: { padding: "var(--space-pagePadding)" },
529
- children: /* @__PURE__ */ S("div", {
543
+ children: /* @__PURE__ */ x("div", {
530
544
  style: {
531
545
  display: "flex",
532
546
  alignItems: "center",
@@ -534,7 +548,7 @@ var F = s(function() {
534
548
  flexWrap: "wrap",
535
549
  minWidth: 0
536
550
  },
537
- children: [/* @__PURE__ */ x("div", {
551
+ children: [/* @__PURE__ */ b("div", {
538
552
  style: {
539
553
  display: "flex",
540
554
  height: "var(--size-controlHeight-lg)",
@@ -545,17 +559,17 @@ var F = s(function() {
545
559
  borderRadius: "var(--radius-card)",
546
560
  backgroundColor: "var(--color-action-primary-bg)"
547
561
  },
548
- children: /* @__PURE__ */ x(h, { style: {
562
+ children: /* @__PURE__ */ b(m, { style: {
549
563
  height: "var(--size-icon-lg)",
550
564
  width: "var(--size-icon-lg)",
551
565
  color: "var(--color-action-primary-text)"
552
566
  } })
553
- }), /* @__PURE__ */ S("div", {
567
+ }), /* @__PURE__ */ x("div", {
554
568
  style: { minWidth: 0 },
555
- children: [/* @__PURE__ */ x("h1", {
569
+ children: [/* @__PURE__ */ b("h1", {
556
570
  className: "m-0 text-2xl font-bold text-text-primary",
557
- children: /* @__PURE__ */ x(fe, { children: s("bigconsole.insights.header.title", "AI Insights") })
558
- }), /* @__PURE__ */ x("p", {
571
+ children: /* @__PURE__ */ b(me, { children: s("bigconsole.insights.header.title", "AI Insights") })
572
+ }), /* @__PURE__ */ b("p", {
559
573
  className: "m-0 text-sm text-text-secondary",
560
574
  children: s("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
561
575
  })]
@@ -563,47 +577,47 @@ var F = s(function() {
563
577
  })
564
578
  })]
565
579
  }),
566
- /* @__PURE__ */ S("div", {
580
+ /* @__PURE__ */ x("div", {
567
581
  style: { padding: "var(--space-pagePadding)" },
568
- children: [/* @__PURE__ */ x(me, {
582
+ children: [/* @__PURE__ */ b(ge, {
569
583
  className: "mb-[var(--space-sectionGap)]",
570
584
  children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
571
- }), /* @__PURE__ */ S(i, { children: [
572
- Ve && /* @__PURE__ */ x(r, {
585
+ }), /* @__PURE__ */ x(i, { children: [
586
+ I && /* @__PURE__ */ b(r, {
573
587
  headingLevel: 2,
574
588
  tone: "danger",
575
589
  padding: "compact",
576
590
  title: "That request did not go through",
577
- description: Ve,
578
- icon: /* @__PURE__ */ x(u, { className: "h-icon-sm w-icon-sm" }),
591
+ description: I,
592
+ icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" }),
579
593
  "data-testid": "insights-error",
580
- actions: /* @__PURE__ */ x("button", {
594
+ actions: /* @__PURE__ */ b("button", {
581
595
  type: "button",
582
596
  onClick: () => L(null),
583
597
  "aria-label": s("bigconsole.insights.error.dismiss", "Dismiss error"),
584
598
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
585
- style: T,
599
+ style: w,
586
600
  children: "Dismiss"
587
601
  })
588
602
  }),
589
- (q || qe) && /* @__PURE__ */ x("div", {
603
+ (J || Je) && /* @__PURE__ */ b("div", {
590
604
  role: "alert",
591
- children: /* @__PURE__ */ x(r, {
605
+ children: /* @__PURE__ */ b(r, {
592
606
  tone: "danger",
593
607
  padding: "compact",
594
608
  headingLevel: 2,
595
609
  title: s("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
596
610
  description: s("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
597
611
  "data-testid": "insights-load-error",
598
- actions: /* @__PURE__ */ S("button", {
612
+ actions: /* @__PURE__ */ x("button", {
599
613
  type: "button",
600
614
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
601
- style: T,
615
+ style: w,
602
616
  onClick: () => {
603
- q && J().catch(() => void 0), qe && Je().catch(() => void 0);
617
+ J && Y().catch(() => void 0), Je && Ye().catch(() => void 0);
604
618
  },
605
619
  children: [
606
- /* @__PURE__ */ x(se, {
620
+ /* @__PURE__ */ b(le, {
607
621
  size: 14,
608
622
  "aria-hidden": "true"
609
623
  }),
@@ -613,22 +627,22 @@ var F = s(function() {
613
627
  })
614
628
  })
615
629
  }),
616
- /* @__PURE__ */ x(r, {
630
+ /* @__PURE__ */ b(r, {
617
631
  id: "insights-prompt",
618
632
  emphasis: "primary",
619
633
  headingLevel: 2,
620
634
  title: "Describe your dashboard",
621
635
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
622
- icon: /* @__PURE__ */ x(h, { className: "h-icon-sm w-icon-sm" }),
636
+ icon: /* @__PURE__ */ b(m, { className: "h-icon-sm w-icon-sm" }),
623
637
  "data-testid": "insights-prompt",
624
- children: /* @__PURE__ */ S("div", {
638
+ children: /* @__PURE__ */ x("div", {
625
639
  style: {
626
640
  display: "flex",
627
641
  flexDirection: "column",
628
642
  gap: "var(--space-controlGap)"
629
643
  },
630
644
  children: [
631
- /* @__PURE__ */ x("label", {
645
+ /* @__PURE__ */ b("label", {
632
646
  htmlFor: "prompt-input",
633
647
  style: {
634
648
  display: "block",
@@ -638,10 +652,10 @@ var F = s(function() {
638
652
  },
639
653
  children: s("bigconsole.insights.prompt.label", "Your prompt")
640
654
  }),
641
- /* @__PURE__ */ x("textarea", {
655
+ /* @__PURE__ */ b("textarea", {
642
656
  id: "prompt-input",
643
- value: _,
644
- onChange: (e) => C(e.target.value),
657
+ value: g,
658
+ onChange: (e) => S(e.target.value),
645
659
  placeholder: s("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
646
660
  rows: 3,
647
661
  maxLength: 2e3,
@@ -658,10 +672,10 @@ var F = s(function() {
658
672
  resize: "vertical"
659
673
  },
660
674
  onKeyDown: (e) => {
661
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), nt());
675
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), rt());
662
676
  }
663
677
  }),
664
- /* @__PURE__ */ S("div", {
678
+ /* @__PURE__ */ x("div", {
665
679
  role: "group",
666
680
  "aria-label": s("bigconsole.insights.prompt.optionsLabel", "Generation options"),
667
681
  "data-testid": "insights-generation-options",
@@ -671,69 +685,69 @@ var F = s(function() {
671
685
  gap: "var(--space-controlGap)"
672
686
  },
673
687
  children: [
674
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
688
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
675
689
  htmlFor: "prompt-style",
676
- style: O,
690
+ style: E,
677
691
  children: s("bigconsole.insights.prompt.style", "Style")
678
- }), /* @__PURE__ */ x("select", {
692
+ }), /* @__PURE__ */ b("select", {
679
693
  id: "prompt-style",
680
- value: w,
681
- onChange: (e) => j(e.target.value),
694
+ value: C,
695
+ onChange: (e) => k(e.target.value),
682
696
  className: n,
683
- style: k,
684
- children: Ee.map((e) => /* @__PURE__ */ x("option", {
697
+ style: D,
698
+ children: ke.map((e) => /* @__PURE__ */ b("option", {
685
699
  value: e.value,
686
700
  children: e.label
687
701
  }, e.value))
688
702
  })] }),
689
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
703
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
690
704
  htmlFor: "prompt-layout",
691
- style: O,
705
+ style: E,
692
706
  children: s("bigconsole.insights.prompt.layout", "Layout")
693
- }), /* @__PURE__ */ x("select", {
707
+ }), /* @__PURE__ */ b("select", {
694
708
  id: "prompt-layout",
695
- value: M,
696
- onChange: (e) => je(e.target.value),
709
+ value: A,
710
+ onChange: (e) => Fe(e.target.value),
697
711
  className: n,
698
- style: k,
699
- children: De.map((e) => /* @__PURE__ */ x("option", {
712
+ style: D,
713
+ children: Ae.map((e) => /* @__PURE__ */ b("option", {
700
714
  value: e.value,
701
715
  children: e.label
702
716
  }, e.value))
703
717
  })] }),
704
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
718
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
705
719
  htmlFor: "prompt-columns",
706
- style: O,
720
+ style: E,
707
721
  children: s("bigconsole.insights.prompt.columns", "Columns")
708
- }), /* @__PURE__ */ x("select", {
722
+ }), /* @__PURE__ */ b("select", {
709
723
  id: "prompt-columns",
710
- value: N,
711
- onChange: (e) => Fe(Number(e.target.value)),
724
+ value: j,
725
+ onChange: (e) => ze(Number(e.target.value)),
712
726
  className: n,
713
- style: k,
714
- children: Oe.map((e) => /* @__PURE__ */ x("option", {
727
+ style: D,
728
+ children: je.map((e) => /* @__PURE__ */ b("option", {
715
729
  value: e,
716
730
  children: e
717
731
  }, e))
718
732
  })] }),
719
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
733
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
720
734
  htmlFor: "prompt-max-widgets",
721
- style: O,
735
+ style: E,
722
736
  children: s("bigconsole.insights.prompt.maxWidgets", "Max widgets")
723
- }), /* @__PURE__ */ x("select", {
737
+ }), /* @__PURE__ */ b("select", {
724
738
  id: "prompt-max-widgets",
725
- value: F,
726
- onChange: (e) => ze(Number(e.target.value)),
739
+ value: N,
740
+ onChange: (e) => Ue(Number(e.target.value)),
727
741
  className: n,
728
- style: k,
729
- children: ke.map((e) => /* @__PURE__ */ x("option", {
742
+ style: D,
743
+ children: Me.map((e) => /* @__PURE__ */ b("option", {
730
744
  value: e,
731
745
  children: e
732
746
  }, e))
733
747
  })] })
734
748
  ]
735
749
  }),
736
- /* @__PURE__ */ S("div", {
750
+ /* @__PURE__ */ x("div", {
737
751
  style: {
738
752
  display: "flex",
739
753
  alignItems: "center",
@@ -742,7 +756,7 @@ var F = s(function() {
742
756
  borderTop: "1px solid var(--color-border-subtle)",
743
757
  paddingTop: "var(--space-controlGap)"
744
758
  },
745
- children: [/* @__PURE__ */ S("span", {
759
+ children: [/* @__PURE__ */ x("span", {
746
760
  style: {
747
761
  flex: "1 1 12rem",
748
762
  minWidth: 0,
@@ -752,25 +766,25 @@ var F = s(function() {
752
766
  children: [
753
767
  s("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
754
768
  " · ",
755
- _.length,
769
+ g.length,
756
770
  "/2000"
757
771
  ]
758
- }), /* @__PURE__ */ S("button", {
772
+ }), /* @__PURE__ */ x("button", {
759
773
  type: "button",
760
- onClick: nt,
761
- disabled: !_.trim() || I,
774
+ onClick: rt,
775
+ disabled: !g.trim() || P,
762
776
  className: n,
763
777
  style: {
764
- ...E,
778
+ ...T,
765
779
  marginLeft: "auto",
766
- cursor: !_.trim() || I ? "not-allowed" : "pointer",
767
- opacity: !_.trim() || I ? .5 : 1
780
+ cursor: !g.trim() || P ? "not-allowed" : "pointer",
781
+ opacity: !g.trim() || P ? .5 : 1
768
782
  },
769
- children: [I ? /* @__PURE__ */ x(m, {
783
+ children: [P ? /* @__PURE__ */ b(p, {
770
784
  size: 16,
771
785
  className: "animate-spin",
772
786
  "aria-hidden": "true"
773
- }) : /* @__PURE__ */ x(h, {
787
+ }) : /* @__PURE__ */ b(m, {
774
788
  size: 16,
775
789
  "aria-hidden": "true"
776
790
  }), s("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
@@ -779,22 +793,22 @@ var F = s(function() {
779
793
  ]
780
794
  })
781
795
  }),
782
- tt.length > 0 && /* @__PURE__ */ x(r, {
796
+ nt.length > 0 && /* @__PURE__ */ b(r, {
783
797
  emphasis: "muted",
784
798
  headingLevel: 2,
785
799
  title: s("bigconsole.insights.suggestions.heading", "Starting points"),
786
800
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
787
- icon: /* @__PURE__ */ x(oe, { className: "h-icon-sm w-icon-sm" }),
801
+ icon: /* @__PURE__ */ b(ce, { className: "h-icon-sm w-icon-sm" }),
788
802
  "data-testid": "insights-suggestions",
789
- children: /* @__PURE__ */ x("div", {
803
+ children: /* @__PURE__ */ b("div", {
790
804
  style: {
791
805
  display: "grid",
792
806
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
793
807
  gap: "var(--space-controlGap)"
794
808
  },
795
- children: tt.map((e) => /* @__PURE__ */ S("button", {
809
+ children: nt.map((e) => /* @__PURE__ */ x("button", {
796
810
  type: "button",
797
- onClick: () => st(e.prompt),
811
+ onClick: () => lt(e.prompt),
798
812
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
799
813
  style: {
800
814
  textAlign: "left",
@@ -807,7 +821,7 @@ var F = s(function() {
807
821
  cursor: "pointer"
808
822
  },
809
823
  children: [
810
- /* @__PURE__ */ x("span", {
824
+ /* @__PURE__ */ b("span", {
811
825
  style: {
812
826
  display: "block",
813
827
  fontWeight: "var(--font-weight-medium)",
@@ -817,7 +831,7 @@ var F = s(function() {
817
831
  },
818
832
  children: e.title
819
833
  }),
820
- /* @__PURE__ */ x("span", {
834
+ /* @__PURE__ */ b("span", {
821
835
  style: {
822
836
  display: "block",
823
837
  fontSize: "var(--font-size-body-sm)",
@@ -826,15 +840,15 @@ var F = s(function() {
826
840
  },
827
841
  children: e.exampleDescription || e.prompt
828
842
  }),
829
- e.tags.length > 0 && /* @__PURE__ */ x("span", {
843
+ e.tags.length > 0 && /* @__PURE__ */ b("span", {
830
844
  style: {
831
845
  display: "flex",
832
846
  gap: "var(--space-iconGap)",
833
847
  marginTop: "var(--space-controlGap)",
834
848
  flexWrap: "wrap"
835
849
  },
836
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
837
- style: A,
850
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
851
+ style: O,
838
852
  children: e
839
853
  }, e))
840
854
  })
@@ -842,29 +856,29 @@ var F = s(function() {
842
856
  }, e.id))
843
857
  })
844
858
  }),
845
- /* @__PURE__ */ x(r, {
859
+ /* @__PURE__ */ b(r, {
846
860
  emphasis: "bare",
847
861
  padding: "none",
848
862
  headingLevel: 2,
849
863
  title: s("bigconsole.insights.generations.heading", "Recent generations"),
850
864
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
851
- icon: /* @__PURE__ */ x(ae, { className: "h-icon-sm w-icon-sm" }),
852
- meta: Z.length > 0 ? /* @__PURE__ */ S("span", {
853
- style: A,
865
+ icon: /* @__PURE__ */ b(se, { className: "h-icon-sm w-icon-sm" }),
866
+ meta: Q.length > 0 ? /* @__PURE__ */ x("span", {
867
+ style: O,
854
868
  children: [
855
- Z.length,
869
+ Q.length,
856
870
  " generation",
857
- Z.length === 1 ? "" : "s"
871
+ Q.length === 1 ? "" : "s"
858
872
  ]
859
873
  }) : void 0,
860
874
  "data-testid": "insights-generations",
861
- children: We && Z.length === 0 ? /* @__PURE__ */ x(r, {
875
+ children: Ge && Q.length === 0 ? /* @__PURE__ */ b(r, {
862
876
  emphasis: "muted",
863
877
  headingLevel: 3,
864
878
  "aria-label": "Loading generations",
865
879
  className: "min-h-[10rem]",
866
880
  "data-testid": "insights-generations-loading",
867
- children: /* @__PURE__ */ S("div", {
881
+ children: /* @__PURE__ */ x("div", {
868
882
  style: {
869
883
  display: "flex",
870
884
  minHeight: "8rem",
@@ -874,84 +888,84 @@ var F = s(function() {
874
888
  gap: "var(--space-controlGap)",
875
889
  color: "var(--color-text-muted)"
876
890
  },
877
- children: [/* @__PURE__ */ x(m, {
891
+ children: [/* @__PURE__ */ b(p, {
878
892
  size: 24,
879
893
  className: "animate-spin",
880
894
  "aria-hidden": "true"
881
- }), /* @__PURE__ */ x("p", {
895
+ }), /* @__PURE__ */ b("p", {
882
896
  style: { fontSize: "var(--font-size-body-sm)" },
883
897
  children: s("bigconsole.insights.generations.loading", "Loading generations…")
884
898
  })]
885
899
  })
886
- }) : Z.length === 0 && !I && !q ? /* @__PURE__ */ x(de, {
900
+ }) : Q.length === 0 && !P && !J ? /* @__PURE__ */ b(pe, {
887
901
  treatment: "insight",
888
902
  className: "border-[var(--color-border-seam)]",
889
- children: /* @__PURE__ */ x(pe, {
903
+ children: /* @__PURE__ */ b(he, {
890
904
  illustration: "onboarding",
891
905
  title: s("bigconsole.insights.generations.emptyTitle", "No generations yet"),
892
906
  description: s("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
893
907
  })
894
- }) : /* @__PURE__ */ S("div", {
908
+ }) : /* @__PURE__ */ x("div", {
895
909
  className: "flex flex-col gap-list-gap",
896
- children: [I && !X && /* @__PURE__ */ x(r, {
910
+ children: [P && !Z && /* @__PURE__ */ b(r, {
897
911
  emphasis: "muted",
898
912
  tone: "info",
899
913
  padding: "compact",
900
914
  headingLevel: 3,
901
915
  title: "Sending your prompt…",
902
916
  description: "The new generation appears here as soon as the backend accepts it.",
903
- icon: /* @__PURE__ */ x(m, { className: "h-icon-sm w-icon-sm animate-spin" }),
917
+ icon: /* @__PURE__ */ b(p, { className: "h-icon-sm w-icon-sm animate-spin" }),
904
918
  "data-testid": "insights-generation-pending"
905
- }), Z.map((e) => {
906
- let t = e.generatedSpec, i = R.has(e.id), a = Ce.includes(e.status);
907
- return /* @__PURE__ */ S(r, {
919
+ }), Q.map((e) => {
920
+ let t = e.generatedSpec, i = R.has(e.id), a = Ee.includes(e.status);
921
+ return /* @__PURE__ */ x(r, {
908
922
  emphasis: "standard",
909
923
  padding: "compact",
910
924
  headingLevel: 3,
911
925
  title: t?.name || (a ? s("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
912
- meta: /* @__PURE__ */ x(Me, { status: e.status }),
926
+ meta: /* @__PURE__ */ b(Ie, { status: e.status }),
913
927
  description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
914
928
  "data-testid": "insights-generation-card",
915
929
  bodyClassName: "flex flex-col gap-control-gap",
916
930
  children: [
917
- t && /* @__PURE__ */ S("div", {
931
+ t && /* @__PURE__ */ x("div", {
918
932
  style: {
919
933
  display: "flex",
920
934
  flexWrap: "wrap",
921
935
  gap: "var(--space-iconGap)"
922
936
  },
923
937
  children: [
924
- /* @__PURE__ */ S("span", {
925
- style: A,
938
+ /* @__PURE__ */ x("span", {
939
+ style: O,
926
940
  children: [
927
- P(t),
941
+ M(t),
928
942
  " widget",
929
- P(t) === 1 ? "" : "s"
943
+ M(t) === 1 ? "" : "s"
930
944
  ]
931
945
  }),
932
- /* @__PURE__ */ S("span", {
933
- style: A,
946
+ /* @__PURE__ */ x("span", {
947
+ style: O,
934
948
  children: [
935
949
  t.pages.length,
936
950
  " page",
937
951
  t.pages.length === 1 ? "" : "s"
938
952
  ]
939
953
  }),
940
- /* @__PURE__ */ S("span", {
941
- style: Ne(t.overallConfidence),
954
+ /* @__PURE__ */ x("span", {
955
+ style: Le(t.overallConfidence),
942
956
  children: [Math.round(t.overallConfidence * 100), "% confidence"]
943
957
  })
944
958
  ]
945
959
  }),
946
- e.errorMessage && /* @__PURE__ */ x(r, {
960
+ e.errorMessage && /* @__PURE__ */ b(r, {
947
961
  headingLevel: 4,
948
962
  tone: "danger",
949
963
  padding: "compact",
950
964
  title: "Generation failed",
951
965
  description: e.errorMessage,
952
- icon: /* @__PURE__ */ x(u, { className: "h-icon-sm w-icon-sm" })
966
+ icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" })
953
967
  }),
954
- /* @__PURE__ */ S("div", {
968
+ /* @__PURE__ */ x("div", {
955
969
  style: {
956
970
  display: "flex",
957
971
  flexWrap: "wrap",
@@ -961,20 +975,20 @@ var F = s(function() {
961
975
  paddingTop: "var(--space-controlGap)"
962
976
  },
963
977
  children: [
964
- a && /* @__PURE__ */ S("button", {
978
+ a && /* @__PURE__ */ x("button", {
965
979
  type: "button",
966
980
  onClick: () => {
967
- o("medium"), it(e.id);
981
+ o("medium"), ot(e.id);
968
982
  },
969
983
  disabled: i,
970
984
  title: s("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
971
985
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
972
986
  style: {
973
- ...Ae,
987
+ ...Ne,
974
988
  cursor: i ? "wait" : "pointer"
975
989
  },
976
990
  children: [
977
- /* @__PURE__ */ x(re, {
991
+ /* @__PURE__ */ b(ae, {
978
992
  size: 14,
979
993
  "aria-hidden": "true"
980
994
  }),
@@ -982,14 +996,14 @@ var F = s(function() {
982
996
  s("bigconsole.insights.actions.cancel", "Cancel")
983
997
  ]
984
998
  }),
985
- e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
999
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
986
1000
  type: "button",
987
- onClick: () => B(e),
1001
+ onClick: () => V(e),
988
1002
  title: s("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
989
1003
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
990
- style: T,
1004
+ style: w,
991
1005
  children: [
992
- /* @__PURE__ */ x(ie, {
1006
+ /* @__PURE__ */ b(oe, {
993
1007
  size: 14,
994
1008
  "aria-hidden": "true"
995
1009
  }),
@@ -997,16 +1011,16 @@ var F = s(function() {
997
1011
  s("bigconsole.insights.actions.preview", "Preview")
998
1012
  ]
999
1013
  }),
1000
- e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1014
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1001
1015
  type: "button",
1002
1016
  onClick: () => {
1003
- H(e), W("");
1017
+ U(e), G("");
1004
1018
  },
1005
1019
  title: s("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1006
1020
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1007
- style: T,
1021
+ style: w,
1008
1022
  children: [
1009
- /* @__PURE__ */ x(g, {
1023
+ /* @__PURE__ */ b(h, {
1010
1024
  size: 14,
1011
1025
  "aria-hidden": "true"
1012
1026
  }),
@@ -1014,20 +1028,20 @@ var F = s(function() {
1014
1028
  s("bigconsole.insights.actions.refine", "Refine")
1015
1029
  ]
1016
1030
  }),
1017
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
1031
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1018
1032
  type: "button",
1019
1033
  onClick: () => {
1020
- o("medium"), at(e.id);
1034
+ o("medium"), st(e.id);
1021
1035
  },
1022
1036
  disabled: i,
1023
1037
  title: s("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1024
1038
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1025
1039
  style: {
1026
- ...T,
1040
+ ...w,
1027
1041
  cursor: i ? "wait" : "pointer"
1028
1042
  },
1029
1043
  children: [
1030
- /* @__PURE__ */ x(se, {
1044
+ /* @__PURE__ */ b(le, {
1031
1045
  size: 14,
1032
1046
  className: i ? "animate-spin" : "",
1033
1047
  "aria-hidden": "true"
@@ -1036,7 +1050,7 @@ var F = s(function() {
1036
1050
  s("bigconsole.insights.actions.regenerate", "Regenerate")
1037
1051
  ]
1038
1052
  }),
1039
- /* @__PURE__ */ S("div", {
1053
+ /* @__PURE__ */ x("div", {
1040
1054
  style: {
1041
1055
  display: "flex",
1042
1056
  flexWrap: "wrap",
@@ -1045,44 +1059,44 @@ var F = s(function() {
1045
1059
  marginLeft: "auto"
1046
1060
  },
1047
1061
  children: [
1048
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
1062
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1049
1063
  type: "button",
1050
- onClick: () => Q(e.id),
1064
+ onClick: () => it(e.id),
1051
1065
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1052
- style: E,
1066
+ style: T,
1053
1067
  children: [
1054
1068
  s("bigconsole.insights.actions.create", "Create dashboard"),
1055
1069
  " ",
1056
- /* @__PURE__ */ x(d, {
1070
+ /* @__PURE__ */ b(u, {
1057
1071
  size: 14,
1058
1072
  "aria-hidden": "true"
1059
1073
  })
1060
1074
  ]
1061
1075
  }),
1062
- e.dashboardId && /* @__PURE__ */ S("button", {
1076
+ e.dashboardId && /* @__PURE__ */ x("button", {
1063
1077
  type: "button",
1064
- onClick: () => f(`/dashboards/${e.dashboardId ?? ""}`),
1078
+ onClick: () => d(`/dashboards/${e.dashboardId ?? ""}`),
1065
1079
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1066
- style: T,
1080
+ style: w,
1067
1081
  children: [
1068
1082
  s("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1069
1083
  " ",
1070
- /* @__PURE__ */ x(d, {
1084
+ /* @__PURE__ */ b(u, {
1071
1085
  size: 14,
1072
1086
  "aria-hidden": "true"
1073
1087
  })
1074
1088
  ]
1075
1089
  }),
1076
- /* @__PURE__ */ x("button", {
1090
+ /* @__PURE__ */ b("button", {
1077
1091
  type: "button",
1078
1092
  onClick: () => {
1079
- o("medium"), rt(e.id);
1093
+ o("medium"), at(e.id);
1080
1094
  },
1081
1095
  title: s("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1082
1096
  "aria-label": s("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1083
1097
  className: n,
1084
- style: D,
1085
- children: /* @__PURE__ */ x(ce, {
1098
+ style: Pe,
1099
+ children: /* @__PURE__ */ b(ue, {
1086
1100
  size: 14,
1087
1101
  "aria-hidden": "true"
1088
1102
  })
@@ -1098,11 +1112,11 @@ var F = s(function() {
1098
1112
  })
1099
1113
  ] })]
1100
1114
  }),
1101
- z && $ && /* @__PURE__ */ x("div", {
1115
+ B && $ && /* @__PURE__ */ b("div", {
1102
1116
  role: "dialog",
1103
1117
  "aria-modal": "true",
1104
1118
  "aria-label": s("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1105
- onClick: () => B(null),
1119
+ onClick: () => V(null),
1106
1120
  style: {
1107
1121
  position: "fixed",
1108
1122
  inset: 0,
@@ -1113,7 +1127,7 @@ var F = s(function() {
1113
1127
  justifyContent: "center",
1114
1128
  padding: "var(--space-pagePadding)"
1115
1129
  },
1116
- children: /* @__PURE__ */ S("div", {
1130
+ children: /* @__PURE__ */ x("div", {
1117
1131
  onClick: (e) => e.stopPropagation(),
1118
1132
  style: {
1119
1133
  display: "flex",
@@ -1127,7 +1141,7 @@ var F = s(function() {
1127
1141
  boxShadow: "var(--shadow-elevation-3)"
1128
1142
  },
1129
1143
  children: [
1130
- /* @__PURE__ */ S("div", {
1144
+ /* @__PURE__ */ x("div", {
1131
1145
  style: {
1132
1146
  display: "flex",
1133
1147
  justifyContent: "space-between",
@@ -1136,16 +1150,16 @@ var F = s(function() {
1136
1150
  padding: "var(--space-cardPadding)",
1137
1151
  borderBottom: "1px solid var(--color-border-subtle)"
1138
1152
  },
1139
- children: [/* @__PURE__ */ S("div", {
1153
+ children: [/* @__PURE__ */ x("div", {
1140
1154
  style: { minWidth: 0 },
1141
- children: [/* @__PURE__ */ x("h2", {
1155
+ children: [/* @__PURE__ */ b("h2", {
1142
1156
  style: {
1143
1157
  fontSize: "var(--font-size-heading-h4)",
1144
1158
  fontWeight: "var(--font-weight-semibold)",
1145
1159
  color: "var(--color-text-primary)"
1146
1160
  },
1147
1161
  children: $.name
1148
- }), $.description && /* @__PURE__ */ x("p", {
1162
+ }), $.description && /* @__PURE__ */ b("p", {
1149
1163
  style: {
1150
1164
  fontSize: "var(--font-size-body-sm)",
1151
1165
  color: "var(--color-text-secondary)",
@@ -1153,22 +1167,22 @@ var F = s(function() {
1153
1167
  },
1154
1168
  children: $.description
1155
1169
  })]
1156
- }), /* @__PURE__ */ x("button", {
1170
+ }), /* @__PURE__ */ b("button", {
1157
1171
  type: "button",
1158
- onClick: () => B(null),
1172
+ onClick: () => V(null),
1159
1173
  "aria-label": s("bigconsole.insights.preview.close", "Close preview"),
1160
1174
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1161
1175
  style: {
1162
- ...D,
1176
+ ...Pe,
1163
1177
  color: "var(--color-text-muted)"
1164
1178
  },
1165
- children: /* @__PURE__ */ x(le, {
1179
+ children: /* @__PURE__ */ b(de, {
1166
1180
  size: 18,
1167
1181
  "aria-hidden": "true"
1168
1182
  })
1169
1183
  })]
1170
1184
  }),
1171
- /* @__PURE__ */ S("div", {
1185
+ /* @__PURE__ */ x("div", {
1172
1186
  style: {
1173
1187
  flex: "1 1 auto",
1174
1188
  minHeight: 0,
@@ -1179,38 +1193,38 @@ var F = s(function() {
1179
1193
  gap: "var(--space-controlGap)"
1180
1194
  },
1181
1195
  children: [
1182
- /* @__PURE__ */ S("div", {
1196
+ /* @__PURE__ */ x("div", {
1183
1197
  style: {
1184
1198
  display: "flex",
1185
1199
  flexWrap: "wrap",
1186
1200
  gap: "var(--space-iconGap)"
1187
1201
  },
1188
1202
  children: [
1189
- /* @__PURE__ */ S("span", {
1190
- style: A,
1203
+ /* @__PURE__ */ x("span", {
1204
+ style: O,
1191
1205
  children: [
1192
- P($),
1206
+ M($),
1193
1207
  " widget",
1194
- P($) === 1 ? "" : "s"
1208
+ M($) === 1 ? "" : "s"
1195
1209
  ]
1196
1210
  }),
1197
- /* @__PURE__ */ S("span", {
1198
- style: A,
1211
+ /* @__PURE__ */ x("span", {
1212
+ style: O,
1199
1213
  children: [
1200
1214
  $.pages.length,
1201
1215
  " page",
1202
1216
  $.pages.length === 1 ? "" : "s"
1203
1217
  ]
1204
1218
  }),
1205
- /* @__PURE__ */ S("span", {
1206
- style: Ne($.overallConfidence),
1219
+ /* @__PURE__ */ x("span", {
1220
+ style: Le($.overallConfidence),
1207
1221
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1208
1222
  })
1209
1223
  ]
1210
1224
  }),
1211
- $.reasoning && /* @__PURE__ */ S("details", {
1225
+ $.reasoning && /* @__PURE__ */ x("details", {
1212
1226
  "data-testid": "preview-reasoning",
1213
- children: [/* @__PURE__ */ x("summary", {
1227
+ children: [/* @__PURE__ */ b("summary", {
1214
1228
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1215
1229
  style: {
1216
1230
  cursor: "pointer",
@@ -1220,7 +1234,7 @@ var F = s(function() {
1220
1234
  borderRadius: "var(--radius-button)"
1221
1235
  },
1222
1236
  children: s("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1223
- }), /* @__PURE__ */ x("p", {
1237
+ }), /* @__PURE__ */ b("p", {
1224
1238
  style: {
1225
1239
  marginTop: "var(--space-controlGap)",
1226
1240
  fontSize: "var(--font-size-body-sm)",
@@ -1230,20 +1244,20 @@ var F = s(function() {
1230
1244
  children: $.reasoning
1231
1245
  })]
1232
1246
  }),
1233
- $.pages.map((e, t) => /* @__PURE__ */ S(r, {
1247
+ $.pages.map((e, t) => /* @__PURE__ */ x(r, {
1234
1248
  emphasis: "muted",
1235
1249
  padding: "compact",
1236
1250
  headingLevel: 3,
1237
1251
  title: e.name,
1238
- meta: /* @__PURE__ */ S("span", {
1239
- style: A,
1252
+ meta: /* @__PURE__ */ x("span", {
1253
+ style: O,
1240
1254
  children: [
1241
1255
  e.widgets.length,
1242
1256
  " widget",
1243
1257
  e.widgets.length === 1 ? "" : "s"
1244
1258
  ]
1245
1259
  }),
1246
- children: [/* @__PURE__ */ S("p", {
1260
+ children: [/* @__PURE__ */ x("p", {
1247
1261
  style: {
1248
1262
  fontSize: "var(--font-size-body-sm)",
1249
1263
  color: "var(--color-text-secondary)",
@@ -1259,15 +1273,15 @@ var F = s(function() {
1259
1273
  " ",
1260
1274
  e.layout.toLowerCase().replaceAll("_", " ")
1261
1275
  ]
1262
- }), /* @__PURE__ */ x("div", {
1276
+ }), /* @__PURE__ */ b("div", {
1263
1277
  className: "insights-proposal-grid",
1264
- style: Ie(e.gridColumns),
1278
+ style: Be(e.gridColumns),
1265
1279
  children: e.widgets.map((t, n) => {
1266
- let r = Pe(t.confidence);
1267
- return /* @__PURE__ */ S("div", {
1280
+ let r = Re(t.confidence);
1281
+ return /* @__PURE__ */ x("div", {
1268
1282
  className: "insights-proposal-widget",
1269
1283
  style: {
1270
- ...Le(t.position, e.gridColumns),
1284
+ ...Ve(t.position, e.gridColumns),
1271
1285
  display: "flex",
1272
1286
  flexDirection: "column",
1273
1287
  gap: "2px",
@@ -1276,7 +1290,7 @@ var F = s(function() {
1276
1290
  backgroundColor: "var(--color-bg-surface)",
1277
1291
  border: "1px solid var(--color-border-subtle)"
1278
1292
  },
1279
- children: [/* @__PURE__ */ S("div", {
1293
+ children: [/* @__PURE__ */ x("div", {
1280
1294
  style: {
1281
1295
  display: "flex",
1282
1296
  flexWrap: "wrap",
@@ -1284,7 +1298,7 @@ var F = s(function() {
1284
1298
  gap: "var(--space-iconGap)"
1285
1299
  },
1286
1300
  children: [
1287
- /* @__PURE__ */ x("span", {
1301
+ /* @__PURE__ */ b("span", {
1288
1302
  style: {
1289
1303
  fontSize: "var(--font-size-body-sm)",
1290
1304
  fontWeight: "var(--font-weight-medium)",
@@ -1293,7 +1307,7 @@ var F = s(function() {
1293
1307
  },
1294
1308
  children: t.title
1295
1309
  }),
1296
- /* @__PURE__ */ x("span", {
1310
+ /* @__PURE__ */ b("span", {
1297
1311
  style: {
1298
1312
  fontSize: "var(--font-size-xs)",
1299
1313
  color: "var(--color-text-muted)"
@@ -1301,16 +1315,16 @@ var F = s(function() {
1301
1315
  "data-testid": "preview-widget-type",
1302
1316
  children: t.type
1303
1317
  }),
1304
- r && /* @__PURE__ */ x("span", {
1318
+ r && /* @__PURE__ */ b("span", {
1305
1319
  style: {
1306
- ...Re(r),
1320
+ ...He(r),
1307
1321
  marginLeft: "auto"
1308
1322
  },
1309
1323
  "data-testid": "preview-widget-confidence",
1310
1324
  children: r
1311
1325
  })
1312
1326
  ]
1313
- }), t.reasoning && /* @__PURE__ */ x("p", {
1327
+ }), t.reasoning && /* @__PURE__ */ b("p", {
1314
1328
  style: {
1315
1329
  margin: 0,
1316
1330
  fontSize: "var(--font-size-xs)",
@@ -1325,7 +1339,7 @@ var F = s(function() {
1325
1339
  }, t))
1326
1340
  ]
1327
1341
  }),
1328
- /* @__PURE__ */ S("div", {
1342
+ /* @__PURE__ */ x("div", {
1329
1343
  style: {
1330
1344
  display: "flex",
1331
1345
  justifyContent: "flex-end",
@@ -1335,24 +1349,24 @@ var F = s(function() {
1335
1349
  borderTop: "1px solid var(--color-border-subtle)"
1336
1350
  },
1337
1351
  children: [
1338
- /* @__PURE__ */ x("button", {
1352
+ /* @__PURE__ */ b("button", {
1339
1353
  type: "button",
1340
- onClick: () => B(null),
1354
+ onClick: () => V(null),
1341
1355
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1342
- style: T,
1356
+ style: w,
1343
1357
  children: "Close"
1344
1358
  }),
1345
- z.status === "COMPLETED" && $ && /* @__PURE__ */ S("button", {
1359
+ B.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1346
1360
  type: "button",
1347
1361
  onClick: () => {
1348
- let e = z;
1349
- B(null), H(e), W("");
1362
+ let e = B;
1363
+ V(null), U(e), G("");
1350
1364
  },
1351
1365
  title: s("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1352
1366
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1353
- style: T,
1367
+ style: w,
1354
1368
  children: [
1355
- /* @__PURE__ */ x(g, {
1369
+ /* @__PURE__ */ b(h, {
1356
1370
  size: 14,
1357
1371
  "aria-hidden": "true"
1358
1372
  }),
@@ -1360,18 +1374,18 @@ var F = s(function() {
1360
1374
  s("bigconsole.insights.actions.refine", "Refine")
1361
1375
  ]
1362
1376
  }),
1363
- z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ S("button", {
1377
+ B.status === "COMPLETED" && !B.dashboardId && /* @__PURE__ */ x("button", {
1364
1378
  type: "button",
1365
1379
  onClick: () => {
1366
- let e = z.id;
1367
- B(null), Q(e);
1380
+ let e = B.id;
1381
+ V(null), it(e);
1368
1382
  },
1369
1383
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1370
- style: E,
1384
+ style: T,
1371
1385
  children: [
1372
1386
  s("bigconsole.insights.actions.create", "Create dashboard"),
1373
1387
  " ",
1374
- /* @__PURE__ */ x(d, {
1388
+ /* @__PURE__ */ b(u, {
1375
1389
  size: 14,
1376
1390
  "aria-hidden": "true"
1377
1391
  })
@@ -1382,11 +1396,11 @@ var F = s(function() {
1382
1396
  ]
1383
1397
  })
1384
1398
  }),
1385
- V && /* @__PURE__ */ x("div", {
1399
+ H && /* @__PURE__ */ b("div", {
1386
1400
  role: "dialog",
1387
1401
  "aria-modal": "true",
1388
1402
  "aria-label": s("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1389
- onClick: () => H(null),
1403
+ onClick: () => U(null),
1390
1404
  style: {
1391
1405
  position: "fixed",
1392
1406
  inset: 0,
@@ -1397,7 +1411,7 @@ var F = s(function() {
1397
1411
  justifyContent: "center",
1398
1412
  padding: "var(--space-pagePadding)"
1399
1413
  },
1400
- children: /* @__PURE__ */ S("div", {
1414
+ children: /* @__PURE__ */ x("div", {
1401
1415
  onClick: (e) => e.stopPropagation(),
1402
1416
  style: {
1403
1417
  display: "flex",
@@ -1411,19 +1425,19 @@ var F = s(function() {
1411
1425
  boxShadow: "var(--shadow-elevation-3)"
1412
1426
  },
1413
1427
  children: [
1414
- /* @__PURE__ */ S("div", {
1428
+ /* @__PURE__ */ x("div", {
1415
1429
  style: {
1416
1430
  padding: "var(--space-cardPadding)",
1417
1431
  borderBottom: "1px solid var(--color-border-subtle)"
1418
1432
  },
1419
- children: [/* @__PURE__ */ x("h2", {
1433
+ children: [/* @__PURE__ */ b("h2", {
1420
1434
  style: {
1421
1435
  fontSize: "var(--font-size-heading-h4)",
1422
1436
  fontWeight: "var(--font-weight-semibold)",
1423
1437
  color: "var(--color-text-primary)"
1424
1438
  },
1425
1439
  children: s("bigconsole.insights.refine.heading", "Refine dashboard")
1426
- }), /* @__PURE__ */ x("p", {
1440
+ }), /* @__PURE__ */ b("p", {
1427
1441
  style: {
1428
1442
  fontSize: "var(--font-size-body-sm)",
1429
1443
  color: "var(--color-text-secondary)",
@@ -1432,7 +1446,7 @@ var F = s(function() {
1432
1446
  children: s("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1433
1447
  })]
1434
1448
  }),
1435
- /* @__PURE__ */ S("div", {
1449
+ /* @__PURE__ */ x("div", {
1436
1450
  style: {
1437
1451
  flex: "1 1 auto",
1438
1452
  minHeight: 0,
@@ -1442,20 +1456,20 @@ var F = s(function() {
1442
1456
  flexDirection: "column",
1443
1457
  gap: "var(--space-controlGap)"
1444
1458
  },
1445
- children: [/* @__PURE__ */ x(r, {
1459
+ children: [/* @__PURE__ */ b(r, {
1446
1460
  emphasis: "muted",
1447
1461
  padding: "compact",
1448
1462
  headingLevel: 3,
1449
- title: V.generatedSpec?.name || "Current proposal",
1450
- description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
1451
- icon: /* @__PURE__ */ x(h, { className: "h-icon-sm w-icon-sm" })
1452
- }), /* @__PURE__ */ S("div", {
1463
+ title: H.generatedSpec?.name || "Current proposal",
1464
+ description: H.prompt.length > 240 ? `${H.prompt.slice(0, 240)}…` : H.prompt,
1465
+ icon: /* @__PURE__ */ b(m, { className: "h-icon-sm w-icon-sm" })
1466
+ }), /* @__PURE__ */ x("div", {
1453
1467
  style: {
1454
1468
  display: "flex",
1455
1469
  flexDirection: "column",
1456
1470
  gap: "var(--space-controlGap)"
1457
1471
  },
1458
- children: [/* @__PURE__ */ x("label", {
1472
+ children: [/* @__PURE__ */ b("label", {
1459
1473
  htmlFor: "refine-input",
1460
1474
  style: {
1461
1475
  display: "block",
@@ -1464,10 +1478,10 @@ var F = s(function() {
1464
1478
  color: "var(--color-text-primary)"
1465
1479
  },
1466
1480
  children: "What should change?"
1467
- }), /* @__PURE__ */ x("textarea", {
1481
+ }), /* @__PURE__ */ b("textarea", {
1468
1482
  id: "refine-input",
1469
- value: U,
1470
- onChange: (e) => W(e.target.value),
1483
+ value: W,
1484
+ onChange: (e) => G(e.target.value),
1471
1485
  maxLength: 2e3,
1472
1486
  rows: 4,
1473
1487
  placeholder: s("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
@@ -1486,7 +1500,7 @@ var F = s(function() {
1486
1500
  })]
1487
1501
  })]
1488
1502
  }),
1489
- /* @__PURE__ */ S("div", {
1503
+ /* @__PURE__ */ x("div", {
1490
1504
  style: {
1491
1505
  display: "flex",
1492
1506
  justifyContent: "flex-end",
@@ -1495,27 +1509,27 @@ var F = s(function() {
1495
1509
  padding: "var(--space-cardPadding)",
1496
1510
  borderTop: "1px solid var(--color-border-subtle)"
1497
1511
  },
1498
- children: [/* @__PURE__ */ x("button", {
1512
+ children: [/* @__PURE__ */ b("button", {
1499
1513
  type: "button",
1500
- onClick: () => H(null),
1514
+ onClick: () => U(null),
1501
1515
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1502
- style: T,
1516
+ style: w,
1503
1517
  children: s("bigconsole.insights.actions.cancel", "Cancel")
1504
- }), /* @__PURE__ */ S("button", {
1518
+ }), /* @__PURE__ */ x("button", {
1505
1519
  type: "button",
1506
- onClick: () => void ot(),
1507
- disabled: !U.trim() || R.has(V.id),
1520
+ onClick: () => void ct(),
1521
+ disabled: !W.trim() || R.has(H.id),
1508
1522
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1509
1523
  style: {
1510
- ...E,
1511
- cursor: !U.trim() || R.has(V.id) ? "not-allowed" : "pointer",
1512
- opacity: U.trim() ? 1 : .6
1524
+ ...T,
1525
+ cursor: !W.trim() || R.has(H.id) ? "not-allowed" : "pointer",
1526
+ opacity: W.trim() ? 1 : .6
1513
1527
  },
1514
- children: [R.has(V.id) ? /* @__PURE__ */ x(m, {
1528
+ children: [R.has(H.id) ? /* @__PURE__ */ b(p, {
1515
1529
  size: 14,
1516
1530
  className: "animate-spin",
1517
1531
  "aria-hidden": "true"
1518
- }) : /* @__PURE__ */ x(g, {
1532
+ }) : /* @__PURE__ */ b(h, {
1519
1533
  size: 14,
1520
1534
  "aria-hidden": "true"
1521
1535
  }), s("bigconsole.insights.refine.apply", "Apply refinement")]
@@ -1528,6 +1542,6 @@ var F = s(function() {
1528
1542
  });
1529
1543
  });
1530
1544
  //#endregion
1531
- export { F as InsightsPage, F as default };
1545
+ export { N as InsightsPage, N as default };
1532
1546
 
1533
1547
  //# sourceMappingURL=InsightsPage.js.map