@psnext/design-system 1.0.0

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 (81) hide show
  1. package/README.md +126 -0
  2. package/dist/AiChatPanel.cjs +1603 -0
  3. package/dist/AiChatPanel.cjs.map +1 -0
  4. package/dist/AiChatPanel.js +1526 -0
  5. package/dist/AiChatPanel.js.map +1 -0
  6. package/dist/BodhiLogo.cjs +240 -0
  7. package/dist/BodhiLogo.cjs.map +1 -0
  8. package/dist/BodhiLogo.js +194 -0
  9. package/dist/BodhiLogo.js.map +1 -0
  10. package/dist/Skeleton.cjs +19 -0
  11. package/dist/Skeleton.cjs.map +1 -0
  12. package/dist/Skeleton.js +14 -0
  13. package/dist/Skeleton.js.map +1 -0
  14. package/dist/SustainLogo.cjs +415 -0
  15. package/dist/SustainLogo.cjs.map +1 -0
  16. package/dist/SustainLogo.js +378 -0
  17. package/dist/SustainLogo.js.map +1 -0
  18. package/dist/contexts/index.cjs +60 -0
  19. package/dist/contexts/index.cjs.map +1 -0
  20. package/dist/contexts/index.d.cts +23 -0
  21. package/dist/contexts/index.d.cts.map +1 -0
  22. package/dist/contexts/index.d.ts +23 -0
  23. package/dist/contexts/index.d.ts.map +1 -0
  24. package/dist/contexts/index.js +58 -0
  25. package/dist/contexts/index.js.map +1 -0
  26. package/dist/index.cjs +273 -0
  27. package/dist/index.d.cts +1440 -0
  28. package/dist/index.d.cts.map +1 -0
  29. package/dist/index.d.ts +1440 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +7 -0
  32. package/dist/index2.d.cts +16 -0
  33. package/dist/index2.d.cts.map +1 -0
  34. package/dist/index2.d.ts +16 -0
  35. package/dist/index2.d.ts.map +1 -0
  36. package/dist/layouts/index.cjs +13 -0
  37. package/dist/layouts/index.d.cts +133 -0
  38. package/dist/layouts/index.d.cts.map +1 -0
  39. package/dist/layouts/index.d.ts +133 -0
  40. package/dist/layouts/index.d.ts.map +1 -0
  41. package/dist/layouts/index.js +2 -0
  42. package/dist/layouts.cjs +3245 -0
  43. package/dist/layouts.cjs.map +1 -0
  44. package/dist/layouts.js +3180 -0
  45. package/dist/layouts.js.map +1 -0
  46. package/dist/patterns/index.cjs +7375 -0
  47. package/dist/patterns/index.cjs.map +1 -0
  48. package/dist/patterns/index.d.cts +418 -0
  49. package/dist/patterns/index.d.cts.map +1 -0
  50. package/dist/patterns/index.d.ts +418 -0
  51. package/dist/patterns/index.d.ts.map +1 -0
  52. package/dist/patterns/index.js +7344 -0
  53. package/dist/patterns/index.js.map +1 -0
  54. package/dist/primitives/index.cjs +256 -0
  55. package/dist/primitives/index.d.cts +2 -0
  56. package/dist/primitives/index.d.ts +2 -0
  57. package/dist/primitives/index.js +5 -0
  58. package/dist/primitives.cjs +4292 -0
  59. package/dist/primitives.cjs.map +1 -0
  60. package/dist/primitives.js +2807 -0
  61. package/dist/primitives.js.map +1 -0
  62. package/dist/styles/base/colors.css +300 -0
  63. package/dist/styles/base/component-tokens.css +240 -0
  64. package/dist/styles/base/elevation.css +7 -0
  65. package/dist/styles/base/fonts.css +14 -0
  66. package/dist/styles/base/global.css +305 -0
  67. package/dist/styles/base/radius.css +22 -0
  68. package/dist/styles/base/semantic-aliases.css +53 -0
  69. package/dist/styles/base/spacing.css +33 -0
  70. package/dist/styles/base/typography.css +48 -0
  71. package/dist/styles/generated/bodhi-vars.css +34 -0
  72. package/dist/styles/generated/dark.css +87 -0
  73. package/dist/styles/generated/light.css +87 -0
  74. package/dist/styles/generated/slingshot-vars.css +34 -0
  75. package/dist/styles/generated/sustain-vars.css +34 -0
  76. package/dist/styles/index.css +32 -0
  77. package/dist/styles/theme.css +65 -0
  78. package/dist/styles/themes/bodhi.css +166 -0
  79. package/dist/styles/themes/slingshot.css +144 -0
  80. package/dist/styles/themes/sustain.css +130 -0
  81. package/package.json +131 -0
@@ -0,0 +1,3180 @@
1
+ import { t as BodhiLogo } from "./BodhiLogo.js";
2
+ import { i as TooltipContent, n as SlingshotLogo, o as TooltipTrigger, r as Tooltip, t as SustainLogo } from "./SustainLogo.js";
3
+ import { a as AIChatPanel, c as defaultSuggestedPrompts, d as useRightPanel, f as ProductSwitcher, i as useActivity, l as svg_9ebyigi4zl_default, n as activityTypeLabels, o as defaultFallbackResponse, p as AccountProjectSwitcher, s as defaultMockResponses } from "./AiChatPanel.js";
4
+ import { Activity, AlertCircle, AlertTriangle, ArrowLeft, BarChart3, Bell, BookOpen, Bot, Briefcase, Check, CheckCircle, ChevronDown, ChevronRight, ChevronsUpDown, Clock, Database, FileText, Filter, FolderOpen, GitBranch, HelpCircle, Home, LayoutDashboard, LayoutGrid, Leaf, Link, LogOut, Menu, MessageSquare, Minimize2, Monitor, Moon, Settings, Sun, Tablet, Target, User, X, Zap } from "lucide-react";
5
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { motion } from "motion/react";
8
+ import { createPortal } from "react-dom";
9
+ //#region src/layouts/AnimatedBackground/AnimatedBackground.tsx
10
+ function AnimatedBackground({ isDarkMode }) {
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx(motion.div, {
13
+ className: "fixed inset-0 -z-10",
14
+ style: { backgroundImage: isDarkMode ? `url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 2352" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><rect x="0" y="0" height="100%" width="100%" fill="url(%23grad)" opacity="1"/><defs><radialGradient id="grad" gradientUnits="userSpaceOnUse" cx="0" cy="0" r="10" gradientTransform="matrix(-48.778 123.5 -72.053 -137.99 1293.7 371.38)"><stop stop-color="rgba(3,7,18,1)" offset="0"/><stop stop-color="rgba(20,8,16,1)" offset="0.1226"/><stop stop-color="rgba(36,9,14,1)" offset="0.24519"/><stop stop-color="rgba(69,10,10,1)" offset="0.49038"/><stop stop-color="rgba(36,9,14,1)" offset="0.71635"/><stop stop-color="rgba(20,8,16,1)" offset="0.82933"/><stop stop-color="rgba(3,7,18,1)" offset="0.94231"/></radialGradient></defs></svg>')` : `url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 2352" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><rect x="0" y="0" height="100%" width="100%" fill="url(%23grad)" opacity="1"/><defs><radialGradient id="grad" gradientUnits="userSpaceOnUse" cx="0" cy="0" r="10" gradientTransform="matrix(-48.778 123.5 -72.053 -137.99 1293.7 371.38)"><stop stop-color="rgba(226,232,240,1)" offset="0"/><stop stop-color="rgba(254,202,202,1)" offset="0.49038"/><stop stop-color="rgba(226,232,240,1)" offset="0.94231"/></radialGradient></defs></svg>')` },
15
+ initial: { opacity: 50 },
16
+ animate: { opacity: 100 },
17
+ transition: { duration: 1.5 }
18
+ }),
19
+ /* @__PURE__ */ jsx(motion.div, {
20
+ className: "fixed inset-0 -z-10",
21
+ style: {
22
+ backgroundImage: isDarkMode ? "radial-gradient(circle at 50% 50%, rgba(11, 223, 181, 0.3) 0%, transparent 50%)" : "radial-gradient(circle at 50% 50%, rgba(52, 13, 125, 0.8) 0%, transparent 50%)",
23
+ backgroundSize: "100% 100%"
24
+ },
25
+ animate: {
26
+ backgroundPosition: [
27
+ "0% 100%",
28
+ "100% 100%",
29
+ "0% 100%",
30
+ "100% 0%",
31
+ "0% 20%"
32
+ ],
33
+ backgroundSize: "100% 100%"
34
+ },
35
+ transition: {
36
+ duration: 50,
37
+ ease: "easeInOut",
38
+ repeat: Number.POSITIVE_INFINITY,
39
+ repeatType: "reverse"
40
+ }
41
+ }),
42
+ /* @__PURE__ */ jsx(motion.div, {
43
+ className: "fixed inset-0 -z-10",
44
+ style: { backgroundImage: isDarkMode ? "radial-gradient(circle at 50% 50%, rgba(36,9,14,0.2) 0%, transparent 60%)" : "radial-gradient(circle at 50% 50%, rgba(25, 73, 135, 0.15) 0%, transparent 60%)" },
45
+ animate: {
46
+ scale: [
47
+ 2,
48
+ 1.1,
49
+ 1
50
+ ],
51
+ opacity: [
52
+ 1.3,
53
+ 5,
54
+ 2
55
+ ]
56
+ },
57
+ transition: {
58
+ duration: 5,
59
+ ease: "easeInOut",
60
+ repeat: Number.POSITIVE_INFINITY,
61
+ repeatType: "reverse"
62
+ }
63
+ })
64
+ ] });
65
+ }
66
+ //#endregion
67
+ //#region src/layouts/AppHeader/AppHeader.tsx
68
+ const BRAND_LOGOS = {
69
+ bodhi: BodhiLogo,
70
+ slingshot: SlingshotLogo,
71
+ sustain: SustainLogo
72
+ };
73
+ const BRAND_ID_PREFIX = {
74
+ bodhi: "bodhi-",
75
+ slingshot: "",
76
+ sustain: "sustain-"
77
+ };
78
+ const ORGS = [
79
+ "Stellar Solutions Inc.",
80
+ "Apex Technologies",
81
+ "Meridian Systems",
82
+ "Nova Enterprises"
83
+ ];
84
+ const PROJECT_TREES = {
85
+ "Stellar Solutions Inc.": [
86
+ {
87
+ id: "engineering",
88
+ label: "Engineering",
89
+ children: [
90
+ {
91
+ id: "stellar-connect",
92
+ label: "Stellar Connect",
93
+ children: [
94
+ {
95
+ id: "stellar-connect-web",
96
+ label: "Web App"
97
+ },
98
+ {
99
+ id: "stellar-connect-mobile",
100
+ label: "Mobile App"
101
+ },
102
+ {
103
+ id: "stellar-connect-api",
104
+ label: "API Gateway"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ id: "stellar-analytics",
110
+ label: "Stellar Analytics",
111
+ children: [{
112
+ id: "stellar-analytics-dashboard",
113
+ label: "Dashboard"
114
+ }, {
115
+ id: "stellar-analytics-reports",
116
+ label: "Reports"
117
+ }]
118
+ },
119
+ {
120
+ id: "stellar-core",
121
+ label: "Stellar Core"
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ id: "product",
127
+ label: "Product",
128
+ children: [{
129
+ id: "mobile-apps",
130
+ label: "Mobile Apps",
131
+ children: [{
132
+ id: "mobile-ios",
133
+ label: "iOS"
134
+ }, {
135
+ id: "mobile-android",
136
+ label: "Android"
137
+ }]
138
+ }, {
139
+ id: "web-platform",
140
+ label: "Web Platform"
141
+ }]
142
+ },
143
+ {
144
+ id: "infrastructure",
145
+ label: "Infrastructure",
146
+ children: [{
147
+ id: "cloud-services",
148
+ label: "Cloud Services"
149
+ }, {
150
+ id: "devops-pipeline",
151
+ label: "DevOps Pipeline"
152
+ }]
153
+ }
154
+ ],
155
+ "Apex Technologies": [{
156
+ id: "platform",
157
+ label: "Platform",
158
+ children: [{
159
+ id: "apex-platform",
160
+ label: "Apex Platform",
161
+ children: [
162
+ {
163
+ id: "apex-platform-core",
164
+ label: "Core Services"
165
+ },
166
+ {
167
+ id: "apex-platform-sdk",
168
+ label: "SDK"
169
+ },
170
+ {
171
+ id: "apex-platform-docs",
172
+ label: "Documentation"
173
+ }
174
+ ]
175
+ }, {
176
+ id: "apex-devops",
177
+ label: "Apex DevOps"
178
+ }]
179
+ }, {
180
+ id: "ai",
181
+ label: "AI & ML",
182
+ children: [
183
+ {
184
+ id: "apex-ai-core",
185
+ label: "Apex AI Core",
186
+ children: [{
187
+ id: "apex-ai-training",
188
+ label: "Training Pipelines"
189
+ }, {
190
+ id: "apex-ai-inference",
191
+ label: "Inference Engine"
192
+ }]
193
+ },
194
+ {
195
+ id: "apex-nlp",
196
+ label: "NLP Pipelines"
197
+ },
198
+ {
199
+ id: "apex-vision",
200
+ label: "Vision Models"
201
+ }
202
+ ]
203
+ }],
204
+ "Meridian Systems": [{
205
+ id: "enterprise",
206
+ label: "Enterprise",
207
+ children: [{
208
+ id: "meridian-erp",
209
+ label: "Meridian ERP",
210
+ children: [
211
+ {
212
+ id: "meridian-erp-finance",
213
+ label: "Finance Module"
214
+ },
215
+ {
216
+ id: "meridian-erp-hr",
217
+ label: "HR Module"
218
+ },
219
+ {
220
+ id: "meridian-erp-supply",
221
+ label: "Supply Chain"
222
+ }
223
+ ]
224
+ }, {
225
+ id: "meridian-crm",
226
+ label: "Meridian CRM",
227
+ children: [{
228
+ id: "meridian-crm-sales",
229
+ label: "Sales"
230
+ }, {
231
+ id: "meridian-crm-support",
232
+ label: "Support"
233
+ }]
234
+ }]
235
+ }, {
236
+ id: "integrations",
237
+ label: "Integrations",
238
+ children: [{
239
+ id: "sap-connector",
240
+ label: "SAP Connector"
241
+ }, {
242
+ id: "salesforce-bridge",
243
+ label: "Salesforce Bridge"
244
+ }]
245
+ }],
246
+ "Nova Enterprises": [{
247
+ id: "nova-suite",
248
+ label: "Nova Suite",
249
+ children: [
250
+ {
251
+ id: "nova-core",
252
+ label: "Nova Core",
253
+ children: [{
254
+ id: "nova-core-auth",
255
+ label: "Auth Service"
256
+ }, {
257
+ id: "nova-core-data",
258
+ label: "Data Layer"
259
+ }]
260
+ },
261
+ {
262
+ id: "nova-insights",
263
+ label: "Nova Insights"
264
+ },
265
+ {
266
+ id: "nova-shield",
267
+ label: "Nova Shield"
268
+ }
269
+ ]
270
+ }, {
271
+ id: "nova-labs",
272
+ label: "Nova Labs",
273
+ children: [{
274
+ id: "nova-experiments",
275
+ label: "Experiments"
276
+ }, {
277
+ id: "nova-sandbox",
278
+ label: "Sandbox"
279
+ }]
280
+ }]
281
+ };
282
+ function getFirstLeaf(nodes) {
283
+ for (const node of nodes) {
284
+ if (!node.children) return node.label;
285
+ const leaf = getFirstLeaf(node.children);
286
+ if (leaf) return leaf;
287
+ }
288
+ return "";
289
+ }
290
+ function TreeNodeRow({ node, depth, expandedIds, onToggle, selectedProject, onSelect }) {
291
+ const isFolder = Boolean(node.children);
292
+ const isExpanded = expandedIds.has(node.id);
293
+ const isSelected = !isFolder && selectedProject === node.label;
294
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("button", {
295
+ onClick: () => isFolder ? onToggle(node.id) : onSelect(node.label),
296
+ className: "flex items-center gap-[6px] w-full text-left transition-colors",
297
+ style: {
298
+ padding: `6px 12px 6px ${12 + depth * 16}px`,
299
+ backgroundColor: isSelected ? "var(--accent)" : "transparent",
300
+ border: "none",
301
+ cursor: "pointer"
302
+ },
303
+ onMouseEnter: (e) => {
304
+ if (!isSelected) e.currentTarget.style.backgroundColor = "var(--accent)";
305
+ },
306
+ onMouseLeave: (e) => {
307
+ if (!isSelected) e.currentTarget.style.backgroundColor = "transparent";
308
+ },
309
+ children: [
310
+ isFolder ? /* @__PURE__ */ jsx("span", {
311
+ style: {
312
+ color: "var(--muted-foreground)",
313
+ flexShrink: 0,
314
+ width: 14,
315
+ display: "flex",
316
+ alignItems: "center"
317
+ },
318
+ children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 12 }) : /* @__PURE__ */ jsx(ChevronRight, { size: 12 })
319
+ }) : /* @__PURE__ */ jsx("span", { style: {
320
+ width: 14,
321
+ flexShrink: 0
322
+ } }),
323
+ /* @__PURE__ */ jsx("span", {
324
+ style: {
325
+ fontFamily: "var(--font-body)",
326
+ fontSize: "var(--text-sm)",
327
+ fontWeight: isFolder ? "var(--font-weight-medium)" : "var(--font-weight-normal)",
328
+ color: isSelected ? "var(--primary)" : "var(--foreground)",
329
+ flex: 1,
330
+ overflow: "hidden",
331
+ textOverflow: "ellipsis",
332
+ whiteSpace: "nowrap"
333
+ },
334
+ children: node.label
335
+ }),
336
+ isSelected && /* @__PURE__ */ jsx(Check, {
337
+ size: 13,
338
+ style: {
339
+ color: "var(--primary)",
340
+ flexShrink: 0
341
+ }
342
+ })
343
+ ]
344
+ }), isFolder && isExpanded && node.children?.map((child) => /* @__PURE__ */ jsx(TreeNodeRow, {
345
+ node: child,
346
+ depth: depth + 1,
347
+ expandedIds,
348
+ onToggle,
349
+ selectedProject,
350
+ onSelect
351
+ }, child.id))] });
352
+ }
353
+ /**
354
+ * Unified product header (logo + org/project switchers + theme toggle + credit
355
+ * badge + avatar menu). Replaces the previously triplicated per-product headers;
356
+ * `BodhiHeader`, `SlingshotHeader`, and `SustainHeader` are thin wrappers around
357
+ * this component.
358
+ */
359
+ function AppHeader({ brand, isDarkMode, onToggleTheme }) {
360
+ const BrandLogo = BRAND_LOGOS[brand];
361
+ const idPrefix = BRAND_ID_PREFIX[brand];
362
+ const orgPanelId = `${idPrefix}org-dropdown-panel`;
363
+ const projectPanelId = `${idPrefix}project-dropdown-panel`;
364
+ const [avatarMenuOpen, setAvatarMenuOpen] = useState(false);
365
+ const [orgDropdownOpen, setOrgDropdownOpen] = useState(false);
366
+ const [projectDropdownOpen, setProjectDropdownOpen] = useState(false);
367
+ const [selectedOrg, setSelectedOrg] = useState(ORGS[0]);
368
+ const [selectedProject, setSelectedProject] = useState(() => getFirstLeaf(PROJECT_TREES[ORGS[0]]));
369
+ const [expandedIds, setExpandedIds] = useState(() => new Set(PROJECT_TREES[ORGS[0]].map((n) => n.id)));
370
+ const [orgPos, setOrgPos] = useState(null);
371
+ const [projectPos, setProjectPos] = useState(null);
372
+ const avatarMenuRef = useRef(null);
373
+ const orgTriggerRef = useRef(null);
374
+ const projectTriggerRef = useRef(null);
375
+ useEffect(() => {
376
+ function handleClickOutside(e) {
377
+ if (avatarMenuRef.current && !avatarMenuRef.current.contains(e.target)) setAvatarMenuOpen(false);
378
+ if (orgDropdownOpen) {
379
+ const panel = document.getElementById(orgPanelId);
380
+ if (panel && !panel.contains(e.target) && orgTriggerRef.current && !orgTriggerRef.current.contains(e.target)) setOrgDropdownOpen(false);
381
+ }
382
+ if (projectDropdownOpen) {
383
+ const panel = document.getElementById(projectPanelId);
384
+ if (panel && !panel.contains(e.target) && projectTriggerRef.current && !projectTriggerRef.current.contains(e.target)) setProjectDropdownOpen(false);
385
+ }
386
+ }
387
+ document.addEventListener("mousedown", handleClickOutside);
388
+ return () => document.removeEventListener("mousedown", handleClickOutside);
389
+ }, [
390
+ orgDropdownOpen,
391
+ projectDropdownOpen,
392
+ orgPanelId,
393
+ projectPanelId
394
+ ]);
395
+ function openOrgDropdown() {
396
+ if (orgDropdownOpen) {
397
+ setOrgDropdownOpen(false);
398
+ return;
399
+ }
400
+ if (orgTriggerRef.current) {
401
+ const r = orgTriggerRef.current.getBoundingClientRect();
402
+ setOrgPos({
403
+ top: r.bottom + 6,
404
+ left: r.left
405
+ });
406
+ }
407
+ setOrgDropdownOpen(true);
408
+ setProjectDropdownOpen(false);
409
+ }
410
+ function openProjectDropdown() {
411
+ if (projectDropdownOpen) {
412
+ setProjectDropdownOpen(false);
413
+ return;
414
+ }
415
+ if (projectTriggerRef.current) {
416
+ const r = projectTriggerRef.current.getBoundingClientRect();
417
+ setProjectPos({
418
+ top: r.bottom + 6,
419
+ left: r.left
420
+ });
421
+ }
422
+ setProjectDropdownOpen(true);
423
+ setOrgDropdownOpen(false);
424
+ }
425
+ function toggleExpanded(id) {
426
+ setExpandedIds((prev) => {
427
+ const next = new Set(prev);
428
+ if (next.has(id)) next.delete(id);
429
+ else next.add(id);
430
+ return next;
431
+ });
432
+ }
433
+ function handleSelectOrg(org) {
434
+ setSelectedOrg(org);
435
+ setSelectedProject(getFirstLeaf(PROJECT_TREES[org]));
436
+ setExpandedIds(new Set(PROJECT_TREES[org].map((n) => n.id)));
437
+ setOrgDropdownOpen(false);
438
+ }
439
+ function handleSelectProject(label) {
440
+ setSelectedProject(label);
441
+ setProjectDropdownOpen(false);
442
+ }
443
+ return /* @__PURE__ */ jsxs("div", {
444
+ className: "backdrop-blur-[45px] flex gap-[12px] h-[60px] items-center px-[12px] py-[8px] rounded-[16px] shrink-0 sticky top-0 w-full z-[2]",
445
+ style: { backgroundColor: "var(--glass-heavy)" },
446
+ children: [
447
+ /* @__PURE__ */ jsxs("div", {
448
+ className: "flex gap-[4px] items-center relative shrink-0",
449
+ children: [/* @__PURE__ */ jsx(BrandLogo, { isDarkMode }), /* @__PURE__ */ jsx(ChevronDown, {
450
+ size: 16,
451
+ style: { color: "var(--muted-foreground)" }
452
+ })]
453
+ }),
454
+ /* @__PURE__ */ jsxs("div", {
455
+ className: "relative shrink-0",
456
+ children: [/* @__PURE__ */ jsxs("button", {
457
+ ref: orgTriggerRef,
458
+ onClick: openOrgDropdown,
459
+ className: "flex items-center gap-[6px] cursor-pointer transition-colors",
460
+ style: {
461
+ backgroundColor: "var(--input-background)",
462
+ border: "1px solid var(--border)",
463
+ borderRadius: "8px",
464
+ padding: "4px 10px"
465
+ },
466
+ "aria-label": "Select organisation",
467
+ "aria-expanded": orgDropdownOpen,
468
+ children: [
469
+ /* @__PURE__ */ jsx("span", {
470
+ style: {
471
+ fontFamily: "var(--font-body)",
472
+ fontSize: "var(--text-xs)",
473
+ fontWeight: "var(--font-weight-normal)",
474
+ color: "var(--muted-foreground)",
475
+ whiteSpace: "nowrap"
476
+ },
477
+ children: "Org:"
478
+ }),
479
+ /* @__PURE__ */ jsx("span", {
480
+ style: {
481
+ fontFamily: "var(--font-body)",
482
+ fontSize: "var(--text-xs)",
483
+ fontWeight: "var(--font-weight-medium)",
484
+ color: "var(--foreground)",
485
+ maxWidth: "120px",
486
+ overflow: "hidden",
487
+ textOverflow: "ellipsis",
488
+ whiteSpace: "nowrap",
489
+ display: "block"
490
+ },
491
+ children: selectedOrg
492
+ }),
493
+ /* @__PURE__ */ jsx(ChevronDown, {
494
+ size: 12,
495
+ style: {
496
+ color: "var(--muted-foreground)",
497
+ flexShrink: 0
498
+ }
499
+ })
500
+ ]
501
+ }), orgDropdownOpen && orgPos && createPortal(/* @__PURE__ */ jsx("div", {
502
+ id: orgPanelId,
503
+ className: "fixed min-w-[200px] rounded-[16px] py-[4px] z-[9999] backdrop-blur-[45px] border overflow-hidden",
504
+ style: {
505
+ top: orgPos.top,
506
+ left: orgPos.left,
507
+ backgroundColor: "var(--glass-subtle)",
508
+ borderColor: "var(--border)"
509
+ },
510
+ children: ORGS.map((org) => /* @__PURE__ */ jsxs("button", {
511
+ onClick: () => handleSelectOrg(org),
512
+ className: "flex items-center justify-between gap-[8px] w-full px-[12px] py-[8px] transition-colors text-left",
513
+ style: { backgroundColor: "transparent" },
514
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
515
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
516
+ children: [/* @__PURE__ */ jsx("span", {
517
+ style: {
518
+ fontFamily: "var(--font-body)",
519
+ fontSize: "var(--text-sm)",
520
+ fontWeight: "var(--font-weight-normal)",
521
+ color: "var(--foreground)"
522
+ },
523
+ children: org
524
+ }), selectedOrg === org && /* @__PURE__ */ jsx(Check, {
525
+ size: 14,
526
+ style: {
527
+ color: "var(--primary)",
528
+ flexShrink: 0
529
+ }
530
+ })]
531
+ }, org))
532
+ }), document.body)]
533
+ }),
534
+ /* @__PURE__ */ jsxs("div", {
535
+ className: "relative shrink-0",
536
+ children: [/* @__PURE__ */ jsxs("button", {
537
+ ref: projectTriggerRef,
538
+ onClick: openProjectDropdown,
539
+ className: "flex items-center gap-[6px] cursor-pointer transition-colors",
540
+ style: {
541
+ backgroundColor: "var(--input-background)",
542
+ border: "1px solid var(--border)",
543
+ borderRadius: "8px",
544
+ padding: "4px 10px"
545
+ },
546
+ "aria-label": "Select project",
547
+ "aria-expanded": projectDropdownOpen,
548
+ children: [
549
+ /* @__PURE__ */ jsx("span", {
550
+ style: {
551
+ fontFamily: "var(--font-body)",
552
+ fontSize: "var(--text-xs)",
553
+ fontWeight: "var(--font-weight-normal)",
554
+ color: "var(--muted-foreground)",
555
+ whiteSpace: "nowrap"
556
+ },
557
+ children: "Project:"
558
+ }),
559
+ /* @__PURE__ */ jsx("span", {
560
+ style: {
561
+ fontFamily: "var(--font-body)",
562
+ fontSize: "var(--text-xs)",
563
+ fontWeight: "var(--font-weight-medium)",
564
+ color: "var(--foreground)",
565
+ maxWidth: "120px",
566
+ overflow: "hidden",
567
+ textOverflow: "ellipsis",
568
+ whiteSpace: "nowrap",
569
+ display: "block"
570
+ },
571
+ children: selectedProject
572
+ }),
573
+ /* @__PURE__ */ jsx(ChevronDown, {
574
+ size: 12,
575
+ style: {
576
+ color: "var(--muted-foreground)",
577
+ flexShrink: 0
578
+ }
579
+ })
580
+ ]
581
+ }), projectDropdownOpen && projectPos && createPortal(/* @__PURE__ */ jsx("div", {
582
+ id: projectPanelId,
583
+ className: "fixed min-w-[240px] rounded-[16px] py-[4px] z-[9999] backdrop-blur-[45px] border overflow-y-auto overflow-x-hidden",
584
+ style: {
585
+ top: projectPos.top,
586
+ left: projectPos.left,
587
+ backgroundColor: "var(--glass-subtle)",
588
+ borderColor: "var(--border)",
589
+ maxHeight: "320px"
590
+ },
591
+ children: PROJECT_TREES[selectedOrg].map((node) => /* @__PURE__ */ jsx(TreeNodeRow, {
592
+ node,
593
+ depth: 0,
594
+ expandedIds,
595
+ onToggle: toggleExpanded,
596
+ selectedProject,
597
+ onSelect: handleSelectProject
598
+ }, node.id))
599
+ }), document.body)]
600
+ }),
601
+ /* @__PURE__ */ jsx("div", { className: "flex-1" }),
602
+ /* @__PURE__ */ jsxs("div", {
603
+ className: "flex items-center gap-[8px]",
604
+ children: [
605
+ /* @__PURE__ */ jsx("button", {
606
+ onClick: onToggleTheme,
607
+ className: "flex items-center justify-center w-[40px] h-[40px] rounded-full bg-transparent transition-colors cursor-pointer",
608
+ style: { color: "var(--foreground)" },
609
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
610
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
611
+ "aria-label": isDarkMode ? "Switch to light mode" : "Switch to dark mode",
612
+ children: isDarkMode ? /* @__PURE__ */ jsx(Sun, { size: 18 }) : /* @__PURE__ */ jsx(Moon, { size: 18 })
613
+ }),
614
+ /* @__PURE__ */ jsxs("div", {
615
+ className: "flex items-center gap-[4px] px-[8px] py-[4px] rounded-[8px] shrink-0",
616
+ style: {
617
+ backgroundColor: "var(--glass-light)",
618
+ border: "1px solid var(--border)"
619
+ },
620
+ children: [/* @__PURE__ */ jsx(Zap, {
621
+ size: 12,
622
+ style: {
623
+ color: "var(--foreground)",
624
+ flexShrink: 0
625
+ }
626
+ }), /* @__PURE__ */ jsx("span", {
627
+ style: {
628
+ fontFamily: "var(--font-body)",
629
+ fontSize: "var(--text-xs)",
630
+ fontWeight: "var(--font-weight-semibold)",
631
+ lineHeight: "var(--leading-body-xs)",
632
+ color: "var(--foreground)",
633
+ whiteSpace: "nowrap"
634
+ },
635
+ children: "1,000"
636
+ })]
637
+ }),
638
+ /* @__PURE__ */ jsxs("div", {
639
+ className: "relative",
640
+ ref: avatarMenuRef,
641
+ children: [/* @__PURE__ */ jsx("button", {
642
+ onClick: () => setAvatarMenuOpen(!avatarMenuOpen),
643
+ className: "flex items-center justify-center w-[40px] h-[40px] rounded-full overflow-hidden cursor-pointer shrink-0 relative",
644
+ style: {
645
+ border: "none",
646
+ padding: 0,
647
+ background: "transparent",
648
+ lineHeight: 0
649
+ },
650
+ "aria-label": "User menu",
651
+ "aria-expanded": avatarMenuOpen,
652
+ children: /* @__PURE__ */ jsx("div", {
653
+ className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-violet-500 to-purple-600 rounded-full",
654
+ children: /* @__PURE__ */ jsx(User, { className: "w-5 h-5 text-white" })
655
+ })
656
+ }), avatarMenuOpen && /* @__PURE__ */ jsxs("div", {
657
+ className: "absolute top-full right-0 mt-[8px] min-w-[180px] rounded-[12px] py-[4px] z-50",
658
+ style: {
659
+ backgroundColor: "var(--card)",
660
+ border: "1px solid var(--border)",
661
+ boxShadow: "0px 4px 16px 0px rgba(0,0,0,0.12)"
662
+ },
663
+ children: [/* @__PURE__ */ jsxs("button", {
664
+ onClick: () => {
665
+ setAvatarMenuOpen(false);
666
+ },
667
+ className: "flex items-center gap-[12px] w-full px-[16px] py-[12px] hover:bg-[var(--muted)] transition-colors text-left",
668
+ children: [/* @__PURE__ */ jsx(User, {
669
+ size: 16,
670
+ style: { color: "var(--foreground)" }
671
+ }), /* @__PURE__ */ jsx("span", {
672
+ style: {
673
+ fontFamily: "var(--font-body)",
674
+ fontSize: "14px",
675
+ fontWeight: "var(--font-weight-normal)",
676
+ color: "var(--foreground)"
677
+ },
678
+ children: "Profile"
679
+ })]
680
+ }), /* @__PURE__ */ jsxs("button", {
681
+ onClick: () => {
682
+ setAvatarMenuOpen(false);
683
+ },
684
+ className: "flex items-center gap-[12px] w-full px-[16px] py-[12px] hover:bg-[var(--muted)] transition-colors text-left border-t",
685
+ style: { borderColor: "var(--border)" },
686
+ children: [/* @__PURE__ */ jsx(LogOut, {
687
+ size: 16,
688
+ style: { color: "var(--foreground)" }
689
+ }), /* @__PURE__ */ jsx("span", {
690
+ style: {
691
+ fontFamily: "var(--font-body)",
692
+ fontSize: "14px",
693
+ fontWeight: "var(--font-weight-normal)",
694
+ color: "var(--foreground)"
695
+ },
696
+ children: "Logout"
697
+ })]
698
+ })]
699
+ })]
700
+ })
701
+ ]
702
+ })
703
+ ]
704
+ });
705
+ }
706
+ //#endregion
707
+ //#region src/layouts/BodhiHeader/BodhiHeader.tsx
708
+ /** Bodhi-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="bodhi" />`. */
709
+ function BodhiHeader({ isDarkMode, onToggleTheme }) {
710
+ return /* @__PURE__ */ jsx(AppHeader, {
711
+ brand: "bodhi",
712
+ isDarkMode,
713
+ onToggleTheme
714
+ });
715
+ }
716
+ //#endregion
717
+ //#region src/layouts/Header/Header.tsx
718
+ const imgAvatar = "";
719
+ function Header({ isDarkMode, onToggleTheme, onLogout }) {
720
+ const [avatarMenuOpen, setAvatarMenuOpen] = useState(false);
721
+ const avatarMenuRef = useRef(null);
722
+ useEffect(() => {
723
+ function handleClickOutside(e) {
724
+ if (avatarMenuRef.current && !avatarMenuRef.current.contains(e.target)) setAvatarMenuOpen(false);
725
+ }
726
+ if (avatarMenuOpen) document.addEventListener("mousedown", handleClickOutside);
727
+ return () => document.removeEventListener("mousedown", handleClickOutside);
728
+ }, [avatarMenuOpen]);
729
+ return /* @__PURE__ */ jsx("div", {
730
+ className: "fixed top-0 left-0 right-0 shrink-0 z-50 px-3 sm:px-4 lg:px-[16px] pt-3 sm:pt-4 lg:pt-[16px]",
731
+ children: /* @__PURE__ */ jsx("div", {
732
+ className: "backdrop-blur-[45px] rounded-xl lg:rounded-[16px]",
733
+ style: { backgroundColor: "var(--glass-heavy)" },
734
+ children: /* @__PURE__ */ jsxs("div", {
735
+ className: "flex items-center px-3 sm:px-4 lg:px-[12px] py-2 lg:py-[8px] gap-2 sm:gap-3 lg:gap-[20px]",
736
+ children: [/* @__PURE__ */ jsxs("div", {
737
+ className: "flex-1 flex items-center gap-1 lg:gap-[8px] overflow-visible",
738
+ children: [/* @__PURE__ */ jsx(ProductSwitcher, { isDarkMode }), /* @__PURE__ */ jsx(AccountProjectSwitcher, {})]
739
+ }), /* @__PURE__ */ jsxs("div", {
740
+ className: "flex items-center gap-[8px]",
741
+ children: [
742
+ /* @__PURE__ */ jsx("button", {
743
+ onClick: onToggleTheme,
744
+ className: "hidden sm:flex items-center justify-center w-9 h-9 lg:w-[40px] lg:h-[40px] rounded-full bg-transparent transition-colors cursor-pointer",
745
+ style: { color: "var(--foreground)" },
746
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
747
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
748
+ "aria-label": isDarkMode ? "Switch to light mode" : "Switch to dark mode",
749
+ children: isDarkMode ? /* @__PURE__ */ jsx(Sun, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx(Moon, { className: "w-4 h-4" })
750
+ }),
751
+ /* @__PURE__ */ jsx("button", {
752
+ className: "hidden sm:flex items-center justify-center w-9 h-9 lg:w-[40px] lg:h-[40px] rounded-full bg-transparent transition-colors cursor-pointer",
753
+ style: { color: "var(--foreground)" },
754
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
755
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
756
+ "aria-label": "Notifications",
757
+ children: /* @__PURE__ */ jsx(Bell, { className: "w-4 h-4" })
758
+ }),
759
+ /* @__PURE__ */ jsxs("div", {
760
+ className: "relative ml-1 lg:ml-0",
761
+ ref: avatarMenuRef,
762
+ children: [/* @__PURE__ */ jsxs("button", {
763
+ onClick: () => setAvatarMenuOpen(!avatarMenuOpen),
764
+ className: "flex items-center justify-center w-9 h-9 lg:w-[40px] lg:h-[40px] rounded-full overflow-hidden cursor-pointer shrink-0 relative",
765
+ style: {
766
+ border: "none",
767
+ padding: 0,
768
+ background: "transparent",
769
+ lineHeight: 0
770
+ },
771
+ "aria-label": "User menu",
772
+ "aria-expanded": avatarMenuOpen,
773
+ children: [/* @__PURE__ */ jsx("div", {
774
+ className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-blue-500 to-purple-600 rounded-full",
775
+ children: /* @__PURE__ */ jsx(User, { className: "w-5 h-5 lg:w-6 lg:h-6 text-white" })
776
+ }), /* @__PURE__ */ jsx("img", {
777
+ src: imgAvatar,
778
+ alt: "Avatar",
779
+ className: "block w-full h-full object-cover opacity-0"
780
+ })]
781
+ }), avatarMenuOpen && /* @__PURE__ */ jsx("div", {
782
+ className: "absolute top-full right-0 mt-[8px] min-w-[180px] rounded-[12px] py-[4px] z-50",
783
+ style: {
784
+ backgroundColor: "var(--card)",
785
+ border: "1px solid var(--border)",
786
+ boxShadow: "0px 4px 16px 0px rgba(0,0,0,0.12)"
787
+ },
788
+ children: /* @__PURE__ */ jsxs("button", {
789
+ onClick: () => {
790
+ setAvatarMenuOpen(false);
791
+ onLogout?.();
792
+ },
793
+ className: "flex items-center gap-[10px] w-full px-[14px] py-[10px] border-0 bg-transparent cursor-pointer transition-colors rounded-[8px] mx-auto",
794
+ style: {
795
+ width: "calc(100% - 8px)",
796
+ marginLeft: "4px",
797
+ marginRight: "4px",
798
+ color: "var(--danger)"
799
+ },
800
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--muted)",
801
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
802
+ children: [/* @__PURE__ */ jsx(LogOut, { className: "w-[16px] h-[16px]" }), /* @__PURE__ */ jsx("span", {
803
+ style: {
804
+ fontFamily: "var(--font-body)",
805
+ fontSize: "var(--text-sm)",
806
+ fontWeight: "var(--font-weight-medium)",
807
+ lineHeight: "20px"
808
+ },
809
+ children: "Logout"
810
+ })]
811
+ })
812
+ })]
813
+ }),
814
+ /* @__PURE__ */ jsx("button", {
815
+ className: "flex sm:hidden items-center justify-center w-9 h-9 rounded-full bg-transparent transition-colors ml-1 cursor-pointer",
816
+ style: { color: "var(--foreground)" },
817
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
818
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
819
+ "aria-label": "Menu",
820
+ children: /* @__PURE__ */ jsx(Menu, { className: "w-5 h-5" })
821
+ })
822
+ ]
823
+ })]
824
+ })
825
+ })
826
+ });
827
+ }
828
+ //#endregion
829
+ //#region src/layouts/LeftNavigation/svg-ye4mpuwoci.ts
830
+ var svg_ye4mpuwoci_default = {
831
+ p1c4b9e80: "M13.558 7.41602C13.7884 7.26395 14.0986 7.32752 14.2507 7.55794C14.4027 7.78838 14.3392 8.09853 14.1087 8.25065C12.0489 9.61057 9.63497 10.3353 7.16669 10.3353C4.69841 10.3353 2.28449 9.61057 0.224633 8.25065C-0.00578628 8.09853 -0.0693641 7.78838 0.082706 7.55794C0.234831 7.32752 0.544975 7.26395 0.775414 7.41602C2.67181 8.66804 4.89427 9.33529 7.16669 9.33529C9.43911 9.33529 11.6616 8.66804 13.558 7.41602Z",
832
+ p22d2dc00: "M4.66667 1.16667C4.66667 1.07462 4.59205 1 4.5 1H1.16667C1.07462 1 1 1.07462 1 1.16667V4.5C1 4.59205 1.07462 4.66667 1.16667 4.66667H4.5C4.59205 4.66667 4.66667 4.59205 4.66667 4.5V1.16667ZM5.66667 4.5C5.66667 5.14433 5.14433 5.66667 4.5 5.66667H1.16667C0.522334 5.66667 0 5.14433 0 4.5V1.16667C0 0.522334 0.522334 0 1.16667 0H4.5C5.14433 0 5.66667 0.522334 5.66667 1.16667V4.5Z",
833
+ p23ebb500: "M12 5.83268C12 5.71152 11.9735 5.59168 11.9225 5.48177C11.8715 5.37187 11.797 5.27418 11.7044 5.19596L11.7018 5.19401L7.03516 1.19466C6.88522 1.06915 6.69562 1 6.5 1C6.30422 1 6.11419 1.0683 5.96419 1.19401L1.29818 5.19401L1.29557 5.19596C1.20303 5.27418 1.12849 5.37187 1.07747 5.48177C1.02648 5.59168 0.999998 5.71152 1 5.83268V11.8327C1 12.0537 1.08786 12.2662 1.24414 12.4225C1.4004 12.5787 1.6124 12.666 1.83333 12.666H11.1667C11.3876 12.666 11.5996 12.5787 11.7559 12.4225C11.9121 12.2662 12 12.0537 12 11.8327V5.83268ZM13 11.8327C13 12.3189 12.8067 12.7857 12.4629 13.1296C12.1191 13.4733 11.6528 13.666 11.1667 13.666H1.83333C1.34718 13.666 0.880909 13.4733 0.537109 13.1296C0.193293 12.7857 0 12.3189 0 11.8327V5.83268C-2.26206e-06 5.56616 0.0583982 5.30297 0.170573 5.0612C0.282817 4.8193 0.446068 4.60443 0.64974 4.43229L5.3138 0.435547L5.31641 0.432943C5.64731 0.153276 6.06674 0 6.5 0C6.87906 0 7.24751 0.117304 7.55534 0.333984L7.68359 0.432943L7.6862 0.435547L12.3496 4.43229C12.5533 4.60444 12.7172 4.81928 12.8294 5.0612C12.9416 5.30297 13 5.56616 13 5.83268V11.8327Z",
834
+ p244a7b00: "M9.33336 3.16667V1.83333C9.33336 1.61232 9.2455 1.40042 9.08922 1.24414C8.93294 1.08786 8.72104 1 8.50002 1H5.83336C5.61234 1 5.40044 1.08786 5.24416 1.24414C5.08788 1.40042 5.00002 1.61232 5.00002 1.83333V3.16667C5.00002 3.44281 4.77617 3.66667 4.50002 3.66667C4.22388 3.66667 4.00002 3.44281 4.00002 3.16667V1.83333C4.00002 1.3471 4.19332 0.880926 4.53713 0.537109C4.88095 0.193293 5.34713 0 5.83336 0H8.50002C8.98625 0 9.45243 0.193293 9.79625 0.537109C10.1401 0.880926 10.3334 1.3471 10.3334 1.83333V3.16667C10.3334 3.44281 10.1095 3.66667 9.83336 3.66667C9.55722 3.66667 9.33336 3.44281 9.33336 3.16667Z",
835
+ p279d1fa0: "M12 8.5C12 8.40795 11.9254 8.33333 11.8333 8.33333H8.5C8.40795 8.33333 8.33333 8.40795 8.33333 8.5V11.8333C8.33333 11.9254 8.40795 12 8.5 12H11.8333C11.9254 12 12 11.9254 12 11.8333V8.5ZM13 11.8333C13 12.4777 12.4777 13 11.8333 13H8.5C7.85567 13 7.33333 12.4777 7.33333 11.8333V8.5C7.33333 7.85567 7.85567 7.33333 8.5 7.33333H11.8333C12.4777 7.33333 13 7.85567 13 8.5V11.8333Z",
836
+ p29ae5900: "M13.3334 4.5C13.3334 4.03976 12.9603 3.66667 12.5 3.66667H1.83336C1.37312 3.66667 1.00002 4.03976 1.00002 4.5V11.1667C1.00002 11.6269 1.37312 12 1.83336 12H12.5C12.9603 12 13.3334 11.6269 13.3334 11.1667V4.5ZM14.3334 11.1667C14.3334 12.1792 13.5125 13 12.5 13H1.83336C0.820835 13 2.37629e-05 12.1792 2.37629e-05 11.1667V4.5C2.37629e-05 3.48748 0.820835 2.66667 1.83336 2.66667H12.5C13.5125 2.66667 14.3334 3.48748 14.3334 4.5V11.1667Z",
837
+ p2bf84500: "M6.5 0C6.82179 0 7.13798 0.0845628 7.41667 0.245443L7.41602 0.246094L12.0814 2.91146L12.0833 2.91211C12.3618 3.07286 12.593 3.30434 12.7539 3.58268C12.9147 3.86098 12.9997 4.17662 13 4.49805V9.83268C12.9996 10.1541 12.9148 10.4698 12.7539 10.748C12.593 11.0264 12.3618 11.2579 12.0833 11.4186L12.0814 11.4193L7.41602 14.0846L7.41667 14.0853C7.138 14.2461 6.82177 14.3307 6.5 14.3307C6.17823 14.3307 5.862 14.2461 5.58333 14.0853L0.91862 11.4193L0.916667 11.4186C0.638241 11.2579 0.406986 11.0264 0.246094 10.748C0.085244 10.4698 0.000365199 10.1541 0 9.83268V4.49805L0.00390625 4.3776C0.0226034 4.09812 0.105401 3.82612 0.246094 3.58268C0.406986 3.30434 0.638241 3.07286 0.916667 2.91211L0.91862 2.91146L5.58333 0.246094C5.86204 0.0851851 6.17818 0 6.5 0ZM6.5 1C6.35377 1 6.20998 1.03824 6.08333 1.11133L6.08138 1.11263L1.41471 3.7793C1.28909 3.85227 1.18474 3.95691 1.11198 4.08268C1.03885 4.2092 1.00015 4.35321 1 4.49935V9.83138L1.00716 9.9401C1.02147 10.0481 1.05713 10.1525 1.11198 10.2474C1.1851 10.3739 1.29015 10.479 1.41667 10.5521L6.08138 13.2181L6.08333 13.2188C6.21002 13.2919 6.35372 13.3307 6.5 13.3307C6.64628 13.3307 6.78998 13.2919 6.91667 13.2188L6.91862 13.2181L11.5833 10.5521C11.7099 10.479 11.8149 10.3739 11.888 10.2474C11.961 10.1211 11.9997 9.97792 12 9.83203V4.49935L11.9928 4.38997C11.9785 4.28212 11.9428 4.17749 11.888 4.08268C11.8153 3.95691 11.7109 3.85227 11.5853 3.7793L6.91862 1.11263L6.91667 1.11133C6.79002 1.03824 6.64623 1 6.5 1Z",
838
+ p2ed383f0: "M0 1.83333C0 1.55719 0.223858 1.33333 0.5 1.33333C0.776142 1.33333 1 1.55719 1 1.83333C1 2.05435 1.08786 2.26625 1.24414 2.42253C1.40042 2.57881 1.61232 2.66667 1.83333 2.66667H3.83333C4.10948 2.66667 4.33333 2.89052 4.33333 3.16667C4.33333 3.44281 4.10948 3.66667 3.83333 3.66667H1.83333C1.3471 3.66667 0.880926 3.47337 0.537109 3.12956C0.193293 2.78574 0 2.31956 0 1.83333Z",
839
+ p2fe7e180: "M8 13.1663V7.83299C8 7.78878 7.98243 7.7464 7.95117 7.71515C7.91992 7.68389 7.87754 7.66632 7.83333 7.66632H5.16667C5.12246 7.66632 5.08008 7.68389 5.04883 7.71515C5.01757 7.7464 5 7.78878 5 7.83299V13.1663C5 13.4425 4.77614 13.6663 4.5 13.6663C4.22386 13.6663 4 13.4425 4 13.1663V7.83299C4 7.52357 4.123 7.22691 4.3418 7.00812C4.56059 6.78932 4.85725 6.66632 5.16667 6.66632H7.83333C8.14275 6.66632 8.43941 6.78932 8.6582 7.00812C8.877 7.22691 9 7.52357 9 7.83299V13.1663C9 13.4425 8.77614 13.6663 8.5 13.6663C8.22386 13.6663 8 13.4425 8 13.1663Z",
840
+ p32fb3800: "M10.6667 12.5C10.6667 11.2181 10.1577 9.98846 9.2513 9.08203C8.34488 8.17561 7.11521 7.66667 5.83333 7.66667C4.55145 7.66667 3.32179 8.17561 2.41536 9.08203C1.50894 9.98846 1 11.2181 1 12.5C1 12.7761 0.776142 13 0.5 13C0.223858 13 0 12.7761 0 12.5C0 10.9529 0.614371 9.46896 1.70833 8.375C2.8023 7.28104 4.28624 6.66667 5.83333 6.66667C7.38043 6.66667 8.86437 7.28104 9.95833 8.375C11.0523 9.46896 11.6667 10.9529 11.6667 12.5C11.6667 12.7761 11.4428 13 11.1667 13C10.8905 13 10.6667 12.7761 10.6667 12.5Z",
841
+ p33696440: "M12.0579 3.39837C12.2974 3.26099 12.6028 3.34382 12.7402 3.58327C12.8776 3.82274 12.7948 4.12811 12.5553 4.26556L6.74867 7.59889C6.5946 7.68726 6.40535 7.68727 6.25128 7.59889L0.444635 4.26556C0.2052 4.12811 0.122387 3.82273 0.25974 3.58327C0.397188 3.34383 0.702567 3.26102 0.942031 3.39837L6.49997 6.58848L12.0579 3.39837Z",
842
+ p34780d00: "M3.06576 1.76392C3.20284 1.52435 3.50842 1.44084 3.74805 1.57772L9.74805 5.01132C9.98768 5.14844 10.0713 5.45395 9.93425 5.69361C9.79713 5.93323 9.49161 6.01617 9.25195 5.87915L3.25195 2.44621C3.01239 2.30913 2.92887 2.00355 3.06576 1.76392Z",
843
+ p36643e00: "M8.66667 3.83333C8.66667 2.26853 7.39814 1 5.83333 1C4.26853 1 3 2.26853 3 3.83333C3 5.39814 4.26853 6.66667 5.83333 6.66667C7.39814 6.66667 8.66667 5.39814 8.66667 3.83333ZM9.66667 3.83333C9.66667 5.95043 7.95042 7.66667 5.83333 7.66667C3.71624 7.66667 2 5.95043 2 3.83333C2 1.71624 3.71624 0 5.83333 0C7.95042 0 9.66667 1.71624 9.66667 3.83333Z",
844
+ p36ca8400: "M6 4.5V1.16667C6 0.857247 6.123 0.560589 6.3418 0.341797C6.56059 0.123004 6.85725 0 7.16667 0H8.5C8.68102 0 8.85956 0.0421328 9.02148 0.123047C9.18348 0.204046 9.32492 0.321901 9.43359 0.466797L10.0332 1.26693C10.0487 1.28758 10.0693 1.3042 10.0924 1.31576C10.1155 1.32724 10.1409 1.33333 10.1667 1.33333H11.8333C12.1428 1.33333 12.4394 1.45634 12.6582 1.67513C12.877 1.89392 13 2.19058 13 2.5V4.5C13 4.80942 12.877 5.10608 12.6582 5.32487C12.4394 5.54366 12.1428 5.66667 11.8333 5.66667H7.16667C6.85725 5.66667 6.56059 5.54366 6.3418 5.32487C6.123 5.10608 6 4.80942 6 4.5ZM7 4.5C7 4.5442 7.01757 4.58658 7.04883 4.61784C7.08008 4.6491 7.12246 4.66667 7.16667 4.66667H11.8333C11.8775 4.66667 11.9199 4.64909 11.9512 4.61784C11.9824 4.58658 12 4.5442 12 4.5V2.5C12 2.4558 11.9824 2.41342 11.9512 2.38216C11.9199 2.35091 11.8775 2.33333 11.8333 2.33333H10.1667C9.98565 2.33333 9.80711 2.2912 9.64518 2.21029C9.48318 2.12929 9.34174 2.01143 9.23307 1.86654L8.63346 1.06641C8.61795 1.04576 8.59732 1.02913 8.57422 1.01758C8.55115 1.00609 8.52578 1 8.5 1H7.16667C7.12246 1 7.08008 1.01757 7.04883 1.04883C7.01757 1.08008 7 1.12246 7 1.16667V4.5Z",
845
+ p36e63380: "M0 9.16667V0.5C0 0.223858 0.223858 0 0.5 0C0.776142 0 1 0.223858 1 0.5V9.16667C1 9.38768 1.08786 9.59958 1.24414 9.75586C1.40042 9.91214 1.61232 10 1.83333 10H3.83333C4.10948 10 4.33333 10.2239 4.33333 10.5C4.33333 10.7761 4.10948 11 3.83333 11H1.83333C1.3471 11 0.880926 10.8067 0.537109 10.4629C0.193293 10.1191 0 9.6529 0 9.16667Z",
846
+ p38866000: "M4.66667 8.5C4.66667 8.40795 4.59205 8.33333 4.5 8.33333H1.16667C1.07462 8.33333 1 8.40795 1 8.5V11.8333C1 11.9254 1.07462 12 1.16667 12H4.5C4.59205 12 4.66667 11.9254 4.66667 11.8333V8.5ZM5.66667 11.8333C5.66667 12.4777 5.14433 13 4.5 13H1.16667C0.522334 13 0 12.4777 0 11.8333V8.5C0 7.85567 0.522334 7.33333 1.16667 7.33333H4.5C5.14433 7.33333 5.66667 7.85567 5.66667 8.5V11.8333Z",
847
+ p3e73ad00: "M7.1732 6.66667C7.44934 6.66667 7.6732 6.89052 7.6732 7.16667C7.6732 7.44281 7.44934 7.66667 7.1732 7.66667H7.16669C6.89055 7.66667 6.66669 7.44281 6.66669 7.16667C6.66669 6.89052 6.89055 6.66667 7.16669 6.66667H7.1732Z",
848
+ p3febec0: "M6 13.832V7.1653C6 6.88916 6.22386 6.6653 6.5 6.6653C6.77614 6.6653 7 6.88916 7 7.1653V13.832C7 14.1081 6.77614 14.332 6.5 14.332C6.22386 14.332 6 14.1081 6 13.832Z",
849
+ p4987580: "M12 1.16667C12 1.07462 11.9254 1 11.8333 1H8.5C8.40795 1 8.33333 1.07462 8.33333 1.16667V4.5C8.33333 4.59205 8.40795 4.66667 8.5 4.66667H11.8333C11.9254 4.66667 12 4.59205 12 4.5V1.16667ZM13 4.5C13 5.14433 12.4777 5.66667 11.8333 5.66667H8.5C7.85567 5.66667 7.33333 5.14433 7.33333 4.5V1.16667C7.33333 0.522334 7.85567 0 8.5 0H11.8333C12.4777 0 13 0.522334 13 1.16667V4.5Z",
850
+ pc279880: "M6 11.8333V8.5C6 8.19058 6.12301 7.89392 6.3418 7.67513C6.56059 7.45634 6.85725 7.33333 7.16667 7.33333H8.41992C8.64704 7.33286 8.86964 7.3987 9.0599 7.52278C9.24382 7.64278 9.38929 7.81258 9.48112 8.01172L9.75977 8.57487C9.77347 8.60206 9.7945 8.62511 9.82031 8.64127C9.84609 8.65738 9.87586 8.66621 9.90625 8.66666H11.8333C12.1428 8.66666 12.4394 8.78967 12.6582 9.00846C12.877 9.22725 13 9.52391 13 9.83333V11.8333C13 12.1427 12.877 12.4394 12.6582 12.6582C12.4394 12.877 12.1428 13 11.8333 13H7.16667C6.85725 13 6.56059 12.877 6.3418 12.6582C6.12301 12.4394 6 12.1427 6 11.8333ZM7 11.8333C7 11.8775 7.01757 11.9199 7.04883 11.9512C7.08008 11.9824 7.12246 12 7.16667 12H11.8333C11.8775 12 11.9199 11.9824 11.9512 11.9512C11.9824 11.9199 12 11.8775 12 11.8333V9.83333C12 9.78913 11.9824 9.74675 11.9512 9.71549C11.9199 9.68424 11.8775 9.66666 11.8333 9.66666H9.89323C9.67988 9.66383 9.47131 9.60265 9.29036 9.48958C9.10934 9.37644 8.96258 9.21539 8.86654 9.02474L8.86523 9.02148L8.58529 8.45507C8.58181 8.44804 8.57801 8.44079 8.57487 8.43359C8.56191 8.4039 8.54076 8.37843 8.51367 8.36067C8.48646 8.34293 8.45436 8.33324 8.42188 8.33333H7.16667C7.12247 8.33333 7.08008 8.3509 7.04883 8.38216C7.01757 8.41341 7 8.4558 7 8.5V11.8333Z",
851
+ pcc5de00: "M13.3335 11.8332C13.3334 9.76626 12.0929 7.82004 10.8667 6.90026C10.7408 6.80584 10.6668 6.65723 10.6668 6.49987C10.6668 6.34257 10.7408 6.19454 10.8667 6.10013C11.2391 5.82069 11.537 5.45372 11.7339 5.03177C11.9307 4.60971 12.0208 4.14525 11.9956 3.68021C11.9704 3.21518 11.8307 2.76339 11.5893 2.3651C11.348 1.96687 11.012 1.63456 10.6115 1.39701C10.374 1.25614 10.2955 0.948965 10.4363 0.711458C10.5772 0.473956 10.8844 0.395477 11.1219 0.536328C11.6638 0.857761 12.1182 1.308 12.4448 1.84688C12.7713 2.38575 12.9602 2.99699 12.9943 3.62617C13.0284 4.25533 12.9065 4.88329 12.6401 5.4543C12.4614 5.8374 12.2195 6.18536 11.9285 6.48815C13.1966 7.66254 14.3334 9.66802 14.3335 11.8332C14.3335 12.1093 14.1095 12.3331 13.8335 12.3332C13.5573 12.3332 13.3335 12.1093 13.3335 11.8332Z"
852
+ };
853
+ //#endregion
854
+ //#region src/layouts/LeftNavigation/LeftNavigation.tsx
855
+ function getSubItems(item, navMode) {
856
+ if (navMode === "home" && item.id === "projects") return [{
857
+ id: "projects",
858
+ label: "Projects",
859
+ description: "Project workspace"
860
+ }, {
861
+ id: "app-access-request",
862
+ label: "App Access Request",
863
+ description: "Request access"
864
+ }];
865
+ if (navMode === "bodhi" && item.id === "bodhi-incidents") return [
866
+ {
867
+ id: "bodhi-incidents-active",
868
+ label: "Active Incidents",
869
+ description: "Currently open"
870
+ },
871
+ {
872
+ id: "bodhi-incidents-triage",
873
+ label: "Triage Queue",
874
+ description: "Pending review"
875
+ },
876
+ {
877
+ id: "bodhi-incidents-resolved",
878
+ label: "Resolved",
879
+ description: "Past 30 days"
880
+ }
881
+ ];
882
+ if (navMode === "bodhi" && item.id === "bodhi-knowledge") return [
883
+ {
884
+ id: "bodhi-knowledge-runbooks",
885
+ label: "Runbooks",
886
+ description: "Automated playbooks"
887
+ },
888
+ {
889
+ id: "bodhi-knowledge-patterns",
890
+ label: "Patterns",
891
+ description: "Issue patterns"
892
+ },
893
+ {
894
+ id: "bodhi-knowledge-config",
895
+ label: "Config Library",
896
+ description: "System configs"
897
+ }
898
+ ];
899
+ if (navMode === "sustain" && item.id === "sustain-dashboard") return [
900
+ {
901
+ id: "sustain-dashboard-overview",
902
+ label: "Overview",
903
+ description: "Summary view"
904
+ },
905
+ {
906
+ id: "sustain-dashboard-reports",
907
+ label: "Reports",
908
+ description: "ESG reports"
909
+ },
910
+ {
911
+ id: "sustain-dashboard-trends",
912
+ label: "Trends",
913
+ description: "Historical data"
914
+ }
915
+ ];
916
+ if (navMode === "sustain" && item.id === "sustain-initiatives") return [
917
+ {
918
+ id: "sustain-initiatives-active",
919
+ label: "Active",
920
+ description: "In progress"
921
+ },
922
+ {
923
+ id: "sustain-initiatives-pipeline",
924
+ label: "Pipeline",
925
+ description: "Planned initiatives"
926
+ },
927
+ {
928
+ id: "sustain-initiatives-completed",
929
+ label: "Completed",
930
+ description: "Past initiatives"
931
+ }
932
+ ];
933
+ return [];
934
+ }
935
+ function getAppModNavItems(activePage) {
936
+ return [
937
+ {
938
+ id: "app-modernization",
939
+ label: "Dashboard",
940
+ active: activePage === "app-modernization",
941
+ icon: "lucide",
942
+ LucideIcon: LayoutGrid
943
+ },
944
+ {
945
+ id: "app-mod-settings",
946
+ label: "Settings",
947
+ active: activePage === "app-mod-settings",
948
+ icon: "lucide",
949
+ LucideIcon: Settings
950
+ },
951
+ {
952
+ id: "app-mod-templates",
953
+ label: "Templates",
954
+ active: activePage === "app-mod-templates",
955
+ icon: "lucide",
956
+ LucideIcon: FileText
957
+ },
958
+ {
959
+ id: "app-mod-docs",
960
+ label: "Docs",
961
+ active: activePage === "app-mod-docs",
962
+ icon: "lucide",
963
+ LucideIcon: BookOpen
964
+ }
965
+ ];
966
+ }
967
+ function getNavMode(activePage) {
968
+ if ([
969
+ "home",
970
+ "projects",
971
+ "workflow",
972
+ "agents",
973
+ "mcp",
974
+ "resources",
975
+ "manage-resources",
976
+ "settings",
977
+ "help",
978
+ "feedback"
979
+ ].includes(activePage)) return "home";
980
+ if ([
981
+ "dashboard",
982
+ "hierarchy",
983
+ "users",
984
+ "roles",
985
+ "manage-accounts",
986
+ "jira-connections"
987
+ ].includes(activePage)) return "onboarding";
988
+ if (activePage.startsWith("bodhi-")) return "bodhi";
989
+ if (activePage.startsWith("sustain-")) return "sustain";
990
+ if ([
991
+ "ecg-landing",
992
+ "ecg-portfolios",
993
+ "ecg-graph",
994
+ "ecg-context-store",
995
+ "ecg-manage-resources",
996
+ "ecg-settings"
997
+ ].includes(activePage)) return "ecg";
998
+ if (activePage.startsWith("app-mod") || activePage === "app-modernization") return "app-mod";
999
+ return "sub-page";
1000
+ }
1001
+ function getHomeNavItems(activePage) {
1002
+ return [
1003
+ {
1004
+ id: "home",
1005
+ label: "Home",
1006
+ active: activePage === "home",
1007
+ icon: "lucide",
1008
+ LucideIcon: Home
1009
+ },
1010
+ {
1011
+ id: "projects",
1012
+ label: "Projects",
1013
+ active: activePage === "projects",
1014
+ icon: "lucide",
1015
+ LucideIcon: FolderOpen
1016
+ },
1017
+ {
1018
+ id: "workflow",
1019
+ label: "Workflow",
1020
+ active: activePage === "workflow",
1021
+ icon: "lucide",
1022
+ LucideIcon: GitBranch
1023
+ },
1024
+ {
1025
+ id: "agents",
1026
+ label: "Agents",
1027
+ active: activePage === "agents",
1028
+ icon: "lucide",
1029
+ LucideIcon: Bot
1030
+ },
1031
+ {
1032
+ id: "mcp",
1033
+ label: "MCP",
1034
+ active: activePage === "mcp",
1035
+ icon: "lucide",
1036
+ LucideIcon: Link
1037
+ },
1038
+ {
1039
+ id: "resources",
1040
+ label: "ECG",
1041
+ active: activePage === "resources" || activePage === "manage-resources",
1042
+ icon: "lucide",
1043
+ LucideIcon: Activity
1044
+ },
1045
+ {
1046
+ id: "settings",
1047
+ label: "Settings",
1048
+ active: activePage === "settings",
1049
+ icon: "lucide",
1050
+ LucideIcon: Settings
1051
+ },
1052
+ {
1053
+ id: "help",
1054
+ label: "Help",
1055
+ active: activePage === "help",
1056
+ icon: "lucide",
1057
+ LucideIcon: HelpCircle
1058
+ },
1059
+ {
1060
+ id: "feedback",
1061
+ label: "Feedback",
1062
+ active: activePage === "feedback",
1063
+ icon: "lucide",
1064
+ LucideIcon: MessageSquare
1065
+ }
1066
+ ];
1067
+ }
1068
+ function getOnboardingNavItems(activePage) {
1069
+ return [
1070
+ {
1071
+ id: "dashboard",
1072
+ label: "Dashboard",
1073
+ active: activePage === "dashboard",
1074
+ icon: "svg",
1075
+ paths: [
1076
+ svg_ye4mpuwoci_default.p22d2dc00,
1077
+ svg_ye4mpuwoci_default.p4987580,
1078
+ svg_ye4mpuwoci_default.p279d1fa0,
1079
+ svg_ye4mpuwoci_default.p38866000
1080
+ ],
1081
+ viewBox: "0 0 13 13",
1082
+ inset: "inset-[9.38%]"
1083
+ },
1084
+ {
1085
+ id: "manage-accounts",
1086
+ label: "Org Management",
1087
+ active: activePage === "manage-accounts",
1088
+ icon: "lucide",
1089
+ LucideIcon: Settings
1090
+ },
1091
+ {
1092
+ id: "jira-connections",
1093
+ label: "Jira Connections",
1094
+ active: activePage === "jira-connections",
1095
+ icon: "lucide",
1096
+ LucideIcon: Link
1097
+ },
1098
+ {
1099
+ id: "hierarchy",
1100
+ label: "Hierarchy",
1101
+ active: activePage === "hierarchy",
1102
+ icon: "svg",
1103
+ paths: [
1104
+ svg_ye4mpuwoci_default.p36ca8400,
1105
+ svg_ye4mpuwoci_default.pc279880,
1106
+ svg_ye4mpuwoci_default.p2ed383f0,
1107
+ svg_ye4mpuwoci_default.p36e63380
1108
+ ],
1109
+ viewBox: "0 0 13 13",
1110
+ inset: "inset-[9.38%]"
1111
+ },
1112
+ {
1113
+ id: "users",
1114
+ label: "Users",
1115
+ active: activePage === "users",
1116
+ icon: "svg",
1117
+ paths: [
1118
+ svg_ye4mpuwoci_default.p32fb3800,
1119
+ svg_ye4mpuwoci_default.p36643e00,
1120
+ svg_ye4mpuwoci_default.pcc5de00
1121
+ ],
1122
+ viewBox: "0 0 14.3335 13",
1123
+ inset: "inset-[9.38%_5.21%]"
1124
+ },
1125
+ {
1126
+ id: "roles",
1127
+ label: "Roles",
1128
+ active: activePage === "roles",
1129
+ icon: "svg",
1130
+ paths: [
1131
+ svg_ye4mpuwoci_default.p3e73ad00,
1132
+ svg_ye4mpuwoci_default.p244a7b00,
1133
+ svg_ye4mpuwoci_default.p1c4b9e80,
1134
+ svg_ye4mpuwoci_default.p29ae5900
1135
+ ],
1136
+ viewBox: "0 0 14.3334 13",
1137
+ inset: "inset-[5.21%_5.21%_13.54%_5.21%]"
1138
+ }
1139
+ ];
1140
+ }
1141
+ function getBodhiNavItems(activePage) {
1142
+ return [
1143
+ {
1144
+ id: "bodhi-home",
1145
+ label: "Home",
1146
+ active: activePage === "bodhi-home",
1147
+ icon: "lucide",
1148
+ LucideIcon: Home
1149
+ },
1150
+ {
1151
+ id: "bodhi-incidents",
1152
+ label: "Incidents",
1153
+ active: activePage.startsWith("bodhi-incidents"),
1154
+ icon: "lucide",
1155
+ LucideIcon: AlertCircle
1156
+ },
1157
+ {
1158
+ id: "bodhi-agents",
1159
+ label: "Agents",
1160
+ active: activePage === "bodhi-agents",
1161
+ icon: "lucide",
1162
+ LucideIcon: Bot
1163
+ },
1164
+ {
1165
+ id: "bodhi-knowledge",
1166
+ label: "Knowledge",
1167
+ active: activePage.startsWith("bodhi-knowledge"),
1168
+ icon: "lucide",
1169
+ LucideIcon: BookOpen
1170
+ },
1171
+ {
1172
+ id: "bodhi-analytics",
1173
+ label: "Analytics",
1174
+ active: activePage === "bodhi-analytics",
1175
+ icon: "lucide",
1176
+ LucideIcon: BarChart3
1177
+ },
1178
+ {
1179
+ id: "bodhi-settings",
1180
+ label: "Settings",
1181
+ active: activePage === "bodhi-settings",
1182
+ icon: "lucide",
1183
+ LucideIcon: Settings
1184
+ },
1185
+ {
1186
+ id: "bodhi-help",
1187
+ label: "Help",
1188
+ active: activePage === "bodhi-help",
1189
+ icon: "lucide",
1190
+ LucideIcon: HelpCircle
1191
+ }
1192
+ ];
1193
+ }
1194
+ function getSustainNavItems(activePage) {
1195
+ return [
1196
+ {
1197
+ id: "sustain-home",
1198
+ label: "Home",
1199
+ active: activePage === "sustain-home",
1200
+ icon: "lucide",
1201
+ LucideIcon: Home
1202
+ },
1203
+ {
1204
+ id: "sustain-dashboard",
1205
+ label: "Dashboard",
1206
+ active: activePage.startsWith("sustain-dashboard"),
1207
+ icon: "lucide",
1208
+ LucideIcon: LayoutDashboard
1209
+ },
1210
+ {
1211
+ id: "sustain-initiatives",
1212
+ label: "Initiatives",
1213
+ active: activePage.startsWith("sustain-initiatives"),
1214
+ icon: "lucide",
1215
+ LucideIcon: Leaf
1216
+ },
1217
+ {
1218
+ id: "sustain-data",
1219
+ label: "Data Sources",
1220
+ active: activePage === "sustain-data",
1221
+ icon: "lucide",
1222
+ LucideIcon: Database
1223
+ },
1224
+ {
1225
+ id: "sustain-goals",
1226
+ label: "Goals",
1227
+ active: activePage === "sustain-goals",
1228
+ icon: "lucide",
1229
+ LucideIcon: Target
1230
+ },
1231
+ {
1232
+ id: "sustain-settings",
1233
+ label: "Settings",
1234
+ active: activePage === "sustain-settings",
1235
+ icon: "lucide",
1236
+ LucideIcon: Settings
1237
+ },
1238
+ {
1239
+ id: "sustain-help",
1240
+ label: "Help",
1241
+ active: activePage === "sustain-help",
1242
+ icon: "lucide",
1243
+ LucideIcon: HelpCircle
1244
+ }
1245
+ ];
1246
+ }
1247
+ function getEcgNavItems(activePage) {
1248
+ return [
1249
+ {
1250
+ id: "ecg-portfolios",
1251
+ label: "Workspaces",
1252
+ active: activePage === "ecg-portfolios" || activePage === "ecg-landing",
1253
+ icon: "lucide",
1254
+ LucideIcon: Briefcase
1255
+ },
1256
+ {
1257
+ id: "ecg-graph",
1258
+ label: "Knowledge Graph",
1259
+ active: activePage === "ecg-graph",
1260
+ icon: "lucide",
1261
+ LucideIcon: GitBranch
1262
+ },
1263
+ {
1264
+ id: "ecg-context-store",
1265
+ label: "Context Store",
1266
+ active: activePage === "ecg-context-store" || activePage === "ecg-manage-resources",
1267
+ icon: "lucide",
1268
+ LucideIcon: Database
1269
+ },
1270
+ {
1271
+ id: "ecg-settings",
1272
+ label: "Settings",
1273
+ active: activePage === "ecg-settings",
1274
+ icon: "lucide",
1275
+ LucideIcon: Settings
1276
+ }
1277
+ ];
1278
+ }
1279
+ function NavButton({ item, onClick, setButtonRef, hideTooltip, hasSubmenu, submenuOpen, tooltipSide = "right" }) {
1280
+ const button = /* @__PURE__ */ jsxs("button", {
1281
+ ref: setButtonRef,
1282
+ onClick,
1283
+ className: "relative flex items-center justify-center w-[40px] h-[40px] rounded-full transition-all cursor-pointer",
1284
+ style: item.active ? { backgroundColor: "var(--nav-active-bg)" } : {},
1285
+ onMouseEnter: (e) => {
1286
+ !item.active && (e.currentTarget.style.backgroundColor = "var(--glass-medium)");
1287
+ },
1288
+ onMouseLeave: (e) => {
1289
+ !item.active && (e.currentTarget.style.backgroundColor = "transparent");
1290
+ },
1291
+ "aria-expanded": hasSubmenu ? submenuOpen : void 0,
1292
+ "aria-haspopup": hasSubmenu ? "menu" : void 0,
1293
+ children: [item.icon === "svg" && item.paths ? /* @__PURE__ */ jsx("div", {
1294
+ className: "overflow-clip relative shrink-0 size-[16px]",
1295
+ children: /* @__PURE__ */ jsx("div", {
1296
+ className: `absolute ${item.inset}`,
1297
+ children: /* @__PURE__ */ jsx("svg", {
1298
+ className: "absolute block size-full",
1299
+ fill: "none",
1300
+ preserveAspectRatio: "none",
1301
+ viewBox: item.viewBox,
1302
+ children: /* @__PURE__ */ jsx("g", { children: item.paths.map((path, i) => /* @__PURE__ */ jsx("path", {
1303
+ d: path,
1304
+ fill: item.active ? "#EF4444" : "var(--foreground)"
1305
+ }, i)) })
1306
+ })
1307
+ })
1308
+ }) : item.LucideIcon ? /* @__PURE__ */ jsx(item.LucideIcon, {
1309
+ className: "size-[16px]",
1310
+ style: { color: item.active ? "#EF4444" : "var(--foreground)" }
1311
+ }) : null, hasSubmenu && /* @__PURE__ */ jsx("span", {
1312
+ className: "absolute right-[-2px] top-1/2 -translate-y-1/2 flex items-center justify-center h-[12px] w-[12px]",
1313
+ children: submenuOpen ? /* @__PURE__ */ jsx(ChevronDown, {
1314
+ className: "size-[10px]",
1315
+ style: { color: "var(--muted-foreground)" }
1316
+ }) : /* @__PURE__ */ jsx(ChevronRight, {
1317
+ className: "size-[10px]",
1318
+ style: { color: "var(--muted-foreground)" }
1319
+ })
1320
+ })]
1321
+ });
1322
+ if (hideTooltip) return button;
1323
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1324
+ asChild: true,
1325
+ children: button
1326
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1327
+ label: item.label,
1328
+ side: tooltipSide
1329
+ })] });
1330
+ }
1331
+ function NavFlyout({ item, subItems, rect, activePage, onNavigate }) {
1332
+ if (!rect || typeof document === "undefined") return null;
1333
+ const estimatedHeight = Math.min(16 + subItems.length * 56, Math.max(160, window.innerHeight - 24));
1334
+ return createPortal(/* @__PURE__ */ jsx("div", {
1335
+ "data-left-nav-flyout": "true",
1336
+ className: "fixed z-50 w-fit min-w-[180px] max-w-[calc(100vw-96px)] rounded-[16px] border backdrop-blur-[45px] overflow-hidden",
1337
+ style: {
1338
+ top: Math.max(12, Math.min(rect.top - 12, window.innerHeight - estimatedHeight - 12)),
1339
+ left: rect.right + 12,
1340
+ backgroundColor: "var(--glass-subtle)",
1341
+ borderColor: "var(--border)",
1342
+ boxShadow: "var(--elevation-sm)"
1343
+ },
1344
+ children: /* @__PURE__ */ jsx("div", {
1345
+ className: "flex flex-col p-[8px] gap-[4px] max-h-[calc(100vh-120px)] overflow-auto",
1346
+ children: subItems.map((subItem) => {
1347
+ const isActive = subItem.id === activePage;
1348
+ return /* @__PURE__ */ jsxs("button", {
1349
+ onClick: () => {
1350
+ onNavigate(subItem.id);
1351
+ },
1352
+ className: "flex items-start justify-between gap-[12px] w-full text-left rounded-[12px] px-[12px] py-[10px] transition-all cursor-pointer",
1353
+ style: { backgroundColor: isActive ? "var(--nav-active-bg)" : "transparent" },
1354
+ onMouseEnter: (e) => !isActive && (e.currentTarget.style.backgroundColor = "var(--glass-medium)"),
1355
+ onMouseLeave: (e) => !isActive && (e.currentTarget.style.backgroundColor = "transparent"),
1356
+ children: [/* @__PURE__ */ jsx("div", {
1357
+ className: "flex flex-col gap-[2px] min-w-0",
1358
+ children: /* @__PURE__ */ jsx("span", {
1359
+ style: {
1360
+ fontFamily: "var(--font-body)",
1361
+ fontSize: "var(--text-sm)",
1362
+ lineHeight: "var(--leading-body-sm)",
1363
+ fontWeight: isActive ? "var(--font-weight-semibold)" : "var(--font-weight-normal)",
1364
+ color: "var(--foreground)"
1365
+ },
1366
+ children: subItem.label
1367
+ })
1368
+ }), /* @__PURE__ */ jsx(ChevronRight, {
1369
+ className: "size-[14px] shrink-0 mt-[2px]",
1370
+ style: { color: "var(--muted-foreground)" }
1371
+ })]
1372
+ }, subItem.id);
1373
+ })
1374
+ })
1375
+ }), document.body);
1376
+ }
1377
+ function NavTooltipContent({ label, side = "right" }) {
1378
+ return /* @__PURE__ */ jsx(TooltipContent, {
1379
+ side,
1380
+ sideOffset: 8,
1381
+ className: "flex gap-[8px] items-center justify-center px-[8px] py-[6px] rounded-[8px] z-50 relative",
1382
+ style: { backgroundColor: "var(--tooltip-bg)" },
1383
+ children: /* @__PURE__ */ jsx("p", {
1384
+ style: {
1385
+ fontFamily: "var(--font-body)",
1386
+ fontSize: "12px",
1387
+ fontWeight: "var(--font-weight-normal)",
1388
+ lineHeight: "16px",
1389
+ color: "var(--tooltip-foreground)"
1390
+ },
1391
+ children: label
1392
+ })
1393
+ });
1394
+ }
1395
+ function NavBlock({ children }) {
1396
+ return /* @__PURE__ */ jsx("div", {
1397
+ className: "backdrop-blur-[45px] rounded-[16px] shrink-0 w-full",
1398
+ style: { backgroundColor: "var(--glass-strong)" },
1399
+ children: /* @__PURE__ */ jsx("div", {
1400
+ className: "flex flex-col gap-[8px] p-[8px]",
1401
+ children
1402
+ })
1403
+ });
1404
+ }
1405
+ function BackButtonBlock({ onClick }) {
1406
+ return /* @__PURE__ */ jsx(NavBlock, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1407
+ asChild: true,
1408
+ children: /* @__PURE__ */ jsx("button", {
1409
+ onClick,
1410
+ className: "flex items-center justify-center w-[40px] h-[40px] rounded-full transition-all cursor-pointer",
1411
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
1412
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
1413
+ children: /* @__PURE__ */ jsx(Home, {
1414
+ className: "size-[16px]",
1415
+ style: { color: "var(--foreground)" }
1416
+ })
1417
+ })
1418
+ }), /* @__PURE__ */ jsx(NavTooltipContent, { label: "Home" })] }) });
1419
+ }
1420
+ function LeftNavigation({ activePage, onNavigate }) {
1421
+ const navMode = getNavMode(activePage);
1422
+ const [openFlyoutItemId, setOpenFlyoutItemId] = useState(null);
1423
+ const [flyoutAnchorRect, setFlyoutAnchorRect] = useState(null);
1424
+ const buttonRefs = useRef({});
1425
+ const homeItems = getHomeNavItems(activePage);
1426
+ const onboardingItems = getOnboardingNavItems(activePage);
1427
+ const bodhiItems = getBodhiNavItems(activePage);
1428
+ const sustainItems = getSustainNavItems(activePage);
1429
+ const ecgItems = getEcgNavItems(activePage);
1430
+ const appModItems = getAppModNavItems(activePage);
1431
+ const currentItems = useMemo(() => {
1432
+ if (navMode === "home") return homeItems;
1433
+ if (navMode === "onboarding") return onboardingItems;
1434
+ if (navMode === "bodhi") return bodhiItems;
1435
+ if (navMode === "sustain") return sustainItems;
1436
+ if (navMode === "ecg") return ecgItems;
1437
+ if (navMode === "app-mod") return appModItems;
1438
+ return [];
1439
+ }, [
1440
+ navMode,
1441
+ homeItems,
1442
+ onboardingItems,
1443
+ bodhiItems,
1444
+ sustainItems,
1445
+ ecgItems,
1446
+ appModItems
1447
+ ]);
1448
+ const flyoutItem = currentItems.find((item) => item.id === openFlyoutItemId) ?? null;
1449
+ const flyoutSubItems = flyoutItem ? getSubItems(flyoutItem, navMode) : [];
1450
+ const closeFlyout = () => {
1451
+ setOpenFlyoutItemId(null);
1452
+ setFlyoutAnchorRect(null);
1453
+ };
1454
+ const openFlyout = (item) => {
1455
+ if (!getSubItems(item, navMode).length) {
1456
+ closeFlyout();
1457
+ return;
1458
+ }
1459
+ const rect = buttonRefs.current[item.id]?.getBoundingClientRect() ?? null;
1460
+ if (!rect) return;
1461
+ setOpenFlyoutItemId(item.id);
1462
+ setFlyoutAnchorRect(rect);
1463
+ };
1464
+ const toggleFlyout = (item) => {
1465
+ if (openFlyoutItemId === item.id) {
1466
+ closeFlyout();
1467
+ return;
1468
+ }
1469
+ openFlyout(item);
1470
+ };
1471
+ useEffect(() => {
1472
+ const handlePointerDown = (event) => {
1473
+ const target = event.target;
1474
+ if (!target) return;
1475
+ const inFlyout = Boolean(target.closest("[data-left-nav-flyout=\"true\"]"));
1476
+ const inRail = Boolean(target.closest("[data-left-nav-rail=\"true\"]"));
1477
+ if (!inFlyout && !inRail) closeFlyout();
1478
+ };
1479
+ const handleEscape = (event) => {
1480
+ if (event.key === "Escape") closeFlyout();
1481
+ };
1482
+ document.addEventListener("pointerdown", handlePointerDown);
1483
+ document.addEventListener("keydown", handleEscape);
1484
+ return () => {
1485
+ document.removeEventListener("pointerdown", handlePointerDown);
1486
+ document.removeEventListener("keydown", handleEscape);
1487
+ };
1488
+ }, []);
1489
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1490
+ /* @__PURE__ */ jsxs("div", {
1491
+ className: "hidden lg:flex flex-col gap-[12px] fixed left-[16px] top-[88px] z-40 w-[56px]",
1492
+ "data-left-nav-rail": "true",
1493
+ children: [(navMode === "onboarding" || navMode === "ecg" || navMode === "app-mod" || navMode === "sub-page") && /* @__PURE__ */ jsx(BackButtonBlock, { onClick: () => onNavigate("home") }), navMode !== "sub-page" && /* @__PURE__ */ jsx(NavBlock, { children: currentItems.map((item, index) => {
1494
+ const hasSubmenu = getSubItems(item, navMode).length > 0;
1495
+ const isSubmenuOpen = openFlyoutItemId === item.id;
1496
+ return /* @__PURE__ */ jsx("div", {
1497
+ className: "nav-item-enter",
1498
+ style: { animationDelay: `${index * 40}ms` },
1499
+ children: /* @__PURE__ */ jsx(NavButton, {
1500
+ item,
1501
+ onClick: () => {
1502
+ if (hasSubmenu) {
1503
+ toggleFlyout(item);
1504
+ return;
1505
+ }
1506
+ closeFlyout();
1507
+ onNavigate(item.id);
1508
+ },
1509
+ setButtonRef: (node) => {
1510
+ buttonRefs.current[item.id] = node;
1511
+ },
1512
+ hideTooltip: false,
1513
+ hasSubmenu,
1514
+ submenuOpen: isSubmenuOpen,
1515
+ tooltipSide: hasSubmenu ? "left" : "right"
1516
+ })
1517
+ }, navMode + "-" + item.id);
1518
+ }) })]
1519
+ }),
1520
+ flyoutItem && flyoutSubItems.length > 0 && navMode !== "sub-page" && /* @__PURE__ */ jsx(NavFlyout, {
1521
+ item: flyoutItem,
1522
+ subItems: flyoutSubItems,
1523
+ rect: flyoutAnchorRect,
1524
+ activePage,
1525
+ onNavigate: (page) => {
1526
+ closeFlyout();
1527
+ onNavigate(page);
1528
+ }
1529
+ }),
1530
+ /* @__PURE__ */ jsx("div", {
1531
+ className: "lg:hidden fixed bottom-0 left-0 right-0 backdrop-blur-[45px] border-t z-40",
1532
+ style: {
1533
+ backgroundColor: "var(--glass-strong)",
1534
+ borderColor: "var(--border)"
1535
+ },
1536
+ children: /* @__PURE__ */ jsxs("div", {
1537
+ className: "flex items-center justify-around p-2 max-w-screen-sm mx-auto",
1538
+ children: [
1539
+ (navMode === "onboarding" || navMode === "ecg" || navMode === "app-mod" || navMode === "sub-page") && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1540
+ asChild: true,
1541
+ children: /* @__PURE__ */ jsx("button", {
1542
+ onClick: () => onNavigate("home"),
1543
+ className: "flex items-center justify-center w-12 h-12 rounded-full transition-all cursor-pointer",
1544
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
1545
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
1546
+ children: /* @__PURE__ */ jsx(ArrowLeft, {
1547
+ className: "size-[16px]",
1548
+ style: { color: "var(--foreground)" }
1549
+ })
1550
+ })
1551
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1552
+ label: "Back",
1553
+ side: "top"
1554
+ })] }),
1555
+ navMode === "home" && homeItems.slice(0, 5).map((item) => /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1556
+ asChild: true,
1557
+ children: /* @__PURE__ */ jsx("button", {
1558
+ onClick: () => onNavigate(item.id),
1559
+ className: "flex items-center justify-center w-12 h-12 rounded-full transition-all cursor-pointer",
1560
+ style: item.active ? { backgroundColor: "var(--nav-active-bg)" } : {},
1561
+ onMouseEnter: (e) => !item.active && (e.currentTarget.style.backgroundColor = "var(--glass-medium)"),
1562
+ onMouseLeave: (e) => !item.active && (e.currentTarget.style.backgroundColor = "transparent"),
1563
+ children: item.LucideIcon && /* @__PURE__ */ jsx(item.LucideIcon, {
1564
+ className: "size-[16px]",
1565
+ style: { color: item.active ? "#EF4444" : "var(--foreground)" }
1566
+ })
1567
+ })
1568
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1569
+ label: item.label,
1570
+ side: "top"
1571
+ })] }, item.id)),
1572
+ navMode === "onboarding" && onboardingItems.map((item) => /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1573
+ asChild: true,
1574
+ children: /* @__PURE__ */ jsx("button", {
1575
+ onClick: () => onNavigate(item.id),
1576
+ className: "flex items-center justify-center w-12 h-12 rounded-full transition-all cursor-pointer",
1577
+ style: item.active ? { backgroundColor: "var(--nav-active-bg)" } : {},
1578
+ onMouseEnter: (e) => !item.active && (e.currentTarget.style.backgroundColor = "var(--glass-medium)"),
1579
+ onMouseLeave: (e) => !item.active && (e.currentTarget.style.backgroundColor = "transparent"),
1580
+ children: item.icon === "svg" && item.paths ? /* @__PURE__ */ jsx("div", {
1581
+ className: "overflow-clip relative shrink-0 size-[16px]",
1582
+ children: /* @__PURE__ */ jsx("div", {
1583
+ className: `absolute ${item.inset}`,
1584
+ children: /* @__PURE__ */ jsx("svg", {
1585
+ className: "absolute block size-full",
1586
+ fill: "none",
1587
+ preserveAspectRatio: "none",
1588
+ viewBox: item.viewBox,
1589
+ children: /* @__PURE__ */ jsx("g", { children: item.paths.map((path, i) => /* @__PURE__ */ jsx("path", {
1590
+ d: path,
1591
+ fill: item.active ? "#EF4444" : "var(--foreground)"
1592
+ }, i)) })
1593
+ })
1594
+ })
1595
+ }) : item.LucideIcon ? /* @__PURE__ */ jsx(item.LucideIcon, {
1596
+ className: "size-[16px]",
1597
+ style: { color: item.active ? "#EF4444" : "var(--foreground)" }
1598
+ }) : null
1599
+ })
1600
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1601
+ label: item.label,
1602
+ side: "top"
1603
+ })] }, item.id)),
1604
+ navMode === "bodhi" && bodhiItems.slice(0, 5).map((item) => /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1605
+ asChild: true,
1606
+ children: /* @__PURE__ */ jsx("button", {
1607
+ onClick: () => onNavigate(item.id),
1608
+ className: "flex items-center justify-center w-12 h-12 rounded-full transition-all cursor-pointer",
1609
+ style: item.active ? { backgroundColor: "var(--nav-active-bg)" } : {},
1610
+ onMouseEnter: (e) => !item.active && (e.currentTarget.style.backgroundColor = "var(--glass-medium)"),
1611
+ onMouseLeave: (e) => !item.active && (e.currentTarget.style.backgroundColor = "transparent"),
1612
+ children: item.LucideIcon && /* @__PURE__ */ jsx(item.LucideIcon, {
1613
+ className: "size-[16px]",
1614
+ style: { color: item.active ? "#EF4444" : "var(--foreground)" }
1615
+ })
1616
+ })
1617
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1618
+ label: item.label,
1619
+ side: "top"
1620
+ })] }, item.id)),
1621
+ navMode === "sustain" && sustainItems.slice(0, 5).map((item) => /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1622
+ asChild: true,
1623
+ children: /* @__PURE__ */ jsx("button", {
1624
+ onClick: () => onNavigate(item.id),
1625
+ className: "flex items-center justify-center w-12 h-12 rounded-full transition-all cursor-pointer",
1626
+ style: item.active ? { backgroundColor: "var(--nav-active-bg)" } : {},
1627
+ onMouseEnter: (e) => !item.active && (e.currentTarget.style.backgroundColor = "var(--glass-medium)"),
1628
+ onMouseLeave: (e) => !item.active && (e.currentTarget.style.backgroundColor = "transparent"),
1629
+ children: item.LucideIcon && /* @__PURE__ */ jsx(item.LucideIcon, {
1630
+ className: "size-[16px]",
1631
+ style: { color: item.active ? "#EF4444" : "var(--foreground)" }
1632
+ })
1633
+ })
1634
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1635
+ label: item.label,
1636
+ side: "top"
1637
+ })] }, item.id)),
1638
+ navMode === "ecg" && ecgItems.map((item) => /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
1639
+ asChild: true,
1640
+ children: /* @__PURE__ */ jsx("button", {
1641
+ onClick: () => onNavigate(item.id),
1642
+ className: "flex items-center justify-center w-12 h-12 rounded-full transition-all cursor-pointer",
1643
+ style: item.active ? { backgroundColor: "var(--nav-active-bg)" } : {},
1644
+ onMouseEnter: (e) => !item.active && (e.currentTarget.style.backgroundColor = "var(--glass-medium)"),
1645
+ onMouseLeave: (e) => !item.active && (e.currentTarget.style.backgroundColor = "transparent"),
1646
+ children: item.LucideIcon && /* @__PURE__ */ jsx(item.LucideIcon, {
1647
+ className: "size-[16px]",
1648
+ style: { color: item.active ? "#EF4444" : "var(--foreground)" }
1649
+ })
1650
+ })
1651
+ }), /* @__PURE__ */ jsx(NavTooltipContent, {
1652
+ label: item.label,
1653
+ side: "top"
1654
+ })] }, item.id))
1655
+ ]
1656
+ })
1657
+ })
1658
+ ] });
1659
+ }
1660
+ //#endregion
1661
+ //#region src/layouts/Logo/Logo.tsx
1662
+ function Logo({ isDarkMode }) {
1663
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("svg", {
1664
+ width: "113",
1665
+ height: "37",
1666
+ viewBox: "0 0 113 37",
1667
+ fill: "none",
1668
+ xmlns: "http://www.w3.org/2000/svg",
1669
+ children: [
1670
+ /* @__PURE__ */ jsxs("g", {
1671
+ "clip-path": "url(#clip0_0_1)",
1672
+ children: [/* @__PURE__ */ jsx("path", {
1673
+ d: "M35.6082 18.2807C35.6082 28.0252 27.6992 36.3105 17.9428 36.3105C8.18644 36.3105 0.277344 28.0252 0.277344 18.2807C0.277344 8.53618 8.18644 0.636719 17.9428 0.636719C27.6992 0.636719 35.6082 8.53618 35.6082 18.2807Z",
1674
+ fill: "white"
1675
+ }), /* @__PURE__ */ jsx("path", {
1676
+ d: "M32.1757 18.2904C32.6898 18.2904 33.1893 18.3359 33.6762 18.4268C33.6294 19.1208 33.5011 19.8088 33.2919 20.4775C32.6416 20.3218 31.9783 20.2385 31.3031 20.2385V20.3063C31.1334 20.0192 30.8321 19.8118 30.4897 19.8118C29.9979 19.8118 29.5809 20.2297 29.5809 20.7207C29.5809 21.2117 29.9979 21.6297 30.4897 21.6297C30.9359 21.6297 31.3194 21.3691 31.4621 20.9985C32.1065 20.9985 32.7389 21.0722 33.3605 21.2079C32.998 22.4014 32.495 23.5646 31.8688 24.6556C31.4937 24.5947 31.1062 24.5683 30.7107 24.5683C27.213 24.5683 24.5052 27.2706 24.5052 30.7648C24.5052 34.2590 24.5243 31.8098 24.5631 32.0945C23.7722 32.4754 22.9625 32.8179 22.1369 33.0709C22.0379 32.6531 21.9787 32.2281 21.9532 31.7961C22.2627 31.6184 22.451 31.2960 22.451 30.9221C22.451 30.4310 22.0346 30.0147 21.5440 30.0147C21.0534 30.0147 20.6370 30.4310 20.6370 30.9221C20.6370 31.4148 20.8762 31.8399 21.2434 32.0087C21.2794 32.5243 21.3463 33.0345 21.4493 33.5365C20.4821 33.7647 19.4717 33.9060 18.4273 33.9668C18.2503 33.1379 18.1669 32.2901 18.1669 31.4187C18.1669 24.4305 23.9833 18.6085 31.0015 18.6085V18.2904ZM1.86157 18.2904C8.87897 18.2904 14.7072 24.1116 14.7072 31.1012C14.7072 31.9726 14.6238 32.8222 14.4473 33.6536C13.3725 33.5946 12.3176 33.4492 11.2913 33.2185C11.4030 32.8457 11.4673 32.4538 11.5007 32.0472C11.9361 31.9015 12.2630 31.5620 12.2630 31.1419C12.2630 30.6508 11.8466 30.2345 11.3560 30.2345C10.8654 30.2345 10.4490 30.6508 10.4490 31.1419C10.4490 31.4753 10.6244 31.7588 10.8977 31.9239C10.8736 32.3575 10.8129 32.7856 10.7172 33.2011C9.89166 32.9306 9.11226 32.6158 8.38256 32.2570C8.41829 31.9148 8.44453 31.5758 8.44453 31.2258C8.44453 27.7316 5.73675 24.8294 2.23875 24.8294C-1.25924 24.8294 1.71048 24.8477 1.42783 24.8863C1.08313 24.1174 0.800262 23.3265 0.563325 22.522C1.13894 22.3755 1.72638 22.2920 2.33195 22.2920C2.47630 22.7369 2.84934 23.0634 3.34102 23.0634C3.83269 23.0634 4.24999 22.6471 4.24999 22.1560C4.24999 21.6650 3.83269 21.2487 3.34102 21.2487C2.84934 21.2487 2.64535 21.5457 2.47605 21.8613V21.7874C1.77819 21.7874 1.10219 21.8923 0.459396 22.0967C0.234978 21.2533 0.0888672 20.391 0 19.5131C0.821876 19.3571 1.66486 19.2751 2.52376 19.2751L2.54399 20.2385V18.2904ZM31.0015 25.0845C31.1750 25.0845 31.3377 25.0838 31.5003 25.1102C30.1267 27.5438 28.1265 29.5387 25.7486 30.8986C25.7374 30.7329 25.7262 30.5737 25.7262 30.4109C25.7262 27.2893 27.8939 24.9819 30.5939 25.0845H31.0015ZM2.54399 25.0845C5.24476 25.0845 7.41343 27.2515 7.41343 30.2314C7.41343 33.2113 7.41343 30.5566 7.39127 30.7120C5.01335 29.3521 3.01313 27.3571 1.63924 25.0845C1.80854 25.0845 1.94971 25.0845 2.12307 25.0845L2.54399 25.0845ZM17.9289 6.83809C19.2770 12.0850 23.5200 16.1023 28.9134 17.2263C23.5200 18.3489 19.2770 22.3721 17.9289 27.6191C16.5809 22.3721 12.3378 18.3489 6.94425 17.2263C12.3378 16.1036 16.5809 12.0850 17.9289 6.83809ZM18.0003 13.5901C18.0003 16.1175 15.9970 18.1190 13.4666 18.1190C15.9970 18.1190 18.0003 20.1205 18.0003 22.6493C18.0003 20.1226 20.0049 18.1190 22.5368 18.1167C20.0049 18.1190 18.0003 16.1175 18.0003 13.5901Z",
1677
+ fill: "#EF4444"
1678
+ })]
1679
+ }),
1680
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", {
1681
+ id: "clip0_0_1",
1682
+ children: /* @__PURE__ */ jsx("rect", {
1683
+ width: "36",
1684
+ height: "36",
1685
+ fill: "white"
1686
+ })
1687
+ }) }),
1688
+ /* @__PURE__ */ jsx("path", {
1689
+ "fill-rule": "evenodd",
1690
+ "clip-rule": "evenodd",
1691
+ d: "M66.2671 5.16847C66.5358 5.16847 66.7542 4.94537 66.7542 4.67017C66.7542 4.39497 66.5351 4.17188 66.2671 4.17188C65.9991 4.17188 65.7793 4.39497 65.7793 4.67017C65.7793 4.94537 65.9984 5.16847 66.2671 5.16847Z",
1692
+ fill: "#030712"
1693
+ }),
1694
+ /* @__PURE__ */ jsx("path", {
1695
+ "fill-rule": "evenodd",
1696
+ "clip-rule": "evenodd",
1697
+ d: "M65.8809 12.7299H66.6424V6.11328H65.8809V12.7291V12.7299Z",
1698
+ fill: "#030712"
1699
+ }),
1700
+ /* @__PURE__ */ jsx("path", {
1701
+ "fill-rule": "evenodd",
1702
+ "clip-rule": "evenodd",
1703
+ d: "M50.7183 9.40396C50.7183 8.01914 51.7808 6.89118 53.0876 6.89118C54.3944 6.89118 55.4569 8.01841 55.4569 9.40396V9.50743C55.4067 10.8739 54.3657 11.9431 53.0876 11.9431C51.8096 11.9431 50.7183 10.8042 50.7183 9.40396ZM53.0869 12.7211C54.0072 12.7211 54.8607 12.3057 55.4555 11.5755V12.7291H56.2177V6.11328H55.4555V7.24638C54.8657 6.52425 54.0122 6.11328 53.0869 6.11328C51.3606 6.11328 49.9561 7.58909 49.9561 9.40396C49.9561 11.2188 51.3606 12.7211 53.0869 12.7211Z",
1704
+ fill: "#030712"
1705
+ }),
1706
+ /* @__PURE__ */ jsx("path", {
1707
+ "fill-rule": "evenodd",
1708
+ "clip-rule": "evenodd",
1709
+ d: "M61.3471 11.9424C60.0698 11.9424 59.0295 10.8732 58.9778 9.5067V9.40322C58.9778 8.01841 60.0403 6.89045 61.3471 6.89045C62.6539 6.89045 63.7157 8.01767 63.7157 9.40322C63.7157 10.7888 62.6532 11.9424 61.3471 11.9424ZM64.4772 9.40396C64.4772 7.58909 63.0727 6.11328 61.3464 6.11328C60.4211 6.11328 59.5676 6.52351 58.9771 7.24638V6.11328H58.2148V15.1142H58.9771V11.5755C59.5719 12.3064 60.4261 12.721 61.3464 12.721C63.0727 12.721 64.4772 11.2335 64.4772 9.40396Z",
1710
+ fill: "#030712"
1711
+ }),
1712
+ /* @__PURE__ */ jsx("path", {
1713
+ "fill-rule": "evenodd",
1714
+ "clip-rule": "evenodd",
1715
+ d: "M78.7283 6.11402C78.0049 6.11402 77.3202 6.41564 76.8245 6.94696V6.11402H76.0889V12.7299H76.8245V8.81172C76.8497 7.74614 77.7031 6.87871 78.7283 6.87871C79.7535 6.87871 80.6185 7.74468 80.6185 8.80952V12.7299H81.367V8.80952C81.367 7.3227 80.1831 6.11328 78.7283 6.11328",
1716
+ fill: "#030712"
1717
+ }),
1718
+ /* @__PURE__ */ jsx("path", {
1719
+ "fill-rule": "evenodd",
1720
+ "clip-rule": "evenodd",
1721
+ d: "M85.3071 11.971L85.2317 11.9923C85.1591 12.0129 85.0363 12.0371 84.8617 12.0371C84.5557 12.0371 84.4242 11.8389 84.4242 11.3737V6.86917H85.3229V6.10961H84.4242V3.88672H83.644V6.10888H82.7402V6.86843H83.644V11.3957C83.644 11.8932 83.7316 12.2176 83.9184 12.415C84.0916 12.6176 84.3574 12.7247 84.6864 12.7247C84.9335 12.7247 85.1527 12.6902 85.3028 12.6264L85.3452 12.6088L85.3071 11.971Z",
1722
+ fill: "#030712"
1723
+ }),
1724
+ /* @__PURE__ */ jsx("path", {
1725
+ "fill-rule": "evenodd",
1726
+ "clip-rule": "evenodd",
1727
+ d: "M71.415 6.88066C72.5314 6.88066 73.4891 7.70553 73.719 8.85184H69.073C69.328 7.68718 70.2806 6.88066 71.4143 6.88066H71.415ZM73.4 10.8201C72.9847 11.5224 72.2247 11.959 71.4143 11.959C70.1549 11.959 69.1168 10.9302 69.0234 9.60332H74.1579C74.3677 9.60332 74.5322 9.44774 74.5322 9.24739V9.18942C74.3979 7.43693 73.0573 6.11523 71.4143 6.11523C69.6815 6.11523 68.2705 7.60352 68.2705 9.43233C68.2705 11.2611 69.6808 12.723 71.4143 12.723C72.4732 12.723 73.4474 12.1667 74.0243 11.2354L73.4 10.8201Z",
1728
+ fill: "#030712"
1729
+ }),
1730
+ /* @__PURE__ */ jsx("path", {
1731
+ "fill-rule": "evenodd",
1732
+ "clip-rule": "evenodd",
1733
+ d: "M48.1994 9.53144C48.1994 9.53144 48.0019 9.37365 47.7878 9.28265C47.5744 9.19092 47.2684 9.08451 46.6333 8.92599C46.5471 8.90471 46.463 8.88636 46.384 8.86582C45.9594 8.7572 45.6239 8.61116 45.3876 8.43063C45.1526 8.22368 45.065 8.05195 45.0751 7.81932C45.0858 7.57347 45.2295 7.33496 45.4817 7.14709C45.7683 6.9306 46.1864 6.82272 46.6599 6.844C47.1965 6.86822 47.6046 7.14195 48.045 7.46999L48.0874 7.50155L48.6413 6.97463C48.5744 6.91005 48.5615 6.89978 48.3762 6.76988C47.9408 6.469 47.4063 6.1505 46.6908 6.11894C46.0679 6.09105 45.5119 6.22095 45.0815 6.49615C44.6153 6.81905 44.3207 7.288 44.315 7.78483C44.3099 8.15543 44.3847 8.50255 44.7475 8.85921C45.1807 9.28559 45.8545 9.51015 46.4709 9.63198C46.9997 9.73619 47.4882 9.93653 47.7339 10.145C48.0277 10.4202 48.1319 10.6198 48.1319 10.906C48.1204 11.1804 47.9451 11.4424 47.6455 11.6281C47.3452 11.8578 46.9156 11.9782 46.4673 11.9576C45.8768 11.9312 45.2669 11.6685 44.6519 11.1768L44.6095 11.1423L44.0664 11.6509L44.1203 11.6986C44.8358 12.3297 45.6146 12.6739 46.4343 12.7208C47.0485 12.7487 47.5838 12.599 48.073 12.2651C48.5788 11.9077 48.8582 11.449 48.8805 10.939C48.9035 10.3967 48.6427 9.85728 48.1994 9.5307",
1734
+ fill: "#030712"
1735
+ }),
1736
+ /* @__PURE__ */ jsx("path", {
1737
+ d: "M52.1064 22.9933L50.7464 24.5933C50.1864 24.1733 49.6464 23.9533 49.1264 23.9533C48.5264 23.9533 48.0664 24.3133 48.0664 24.7733C48.0664 25.2533 48.3264 25.4133 49.6264 25.8733C51.9064 26.6733 52.6064 27.3533 52.6064 28.9133C52.6064 30.9733 50.9064 32.4333 48.5064 32.4333C47.0064 32.4333 45.7664 31.8933 44.7864 30.8133L46.2064 29.1333C46.9664 29.8933 47.7464 30.2933 48.5264 30.2933C49.2264 30.2933 49.7664 29.8333 49.7664 29.2133C49.7664 28.6733 49.5464 28.4333 48.2664 27.9733C45.8864 27.1333 45.4064 26.4933 45.4064 25.0733C45.4064 23.1733 46.9464 21.9533 48.9064 21.9533C50.1064 21.9533 51.1664 22.2933 52.1064 22.9933ZM54.5266 22.3133H57.2866V27.8733C57.2866 29.3533 57.9466 30.0933 59.2666 30.0933C60.6066 30.0933 61.2666 29.3533 61.2666 27.8733V22.3133H64.0066V28.3333C64.0066 30.9533 62.3066 32.4133 59.2666 32.4133C56.2266 32.4133 54.5266 30.9533 54.5266 28.3333V22.3133ZM73.3369 22.9933L71.9769 24.5933C71.4169 24.1733 70.8769 23.9533 70.3569 23.9533C69.7569 23.9533 69.2969 24.3133 69.2969 24.7733C69.2969 25.2533 69.5569 25.4133 70.8569 25.8733C73.1369 26.6733 73.8369 27.3533 73.8369 28.9133C73.8369 30.9733 72.1369 32.4333 69.7369 32.4333C68.2369 32.4333 66.9969 31.8933 66.0169 30.8133L67.4369 29.1333C68.1969 29.8933 68.9769 30.2933 69.7569 30.2933C70.4569 30.2933 70.9969 29.8333 70.9969 29.2133C70.9969 28.6733 70.7769 28.4333 69.4969 27.9733C67.1169 27.1333 66.6369 26.4933 66.6369 25.0733C66.6369 23.1733 68.1769 21.9533 70.1369 21.9533C71.3369 21.9533 72.3969 22.2933 73.3369 22.9933ZM75.777 24.6733H74.697V22.3133H75.777V18.9733H78.537V22.3133H80.457V24.6733H78.537V27.5933C78.537 29.1133 78.717 29.9933 79.737 29.9933C79.917 29.9933 80.097 29.9733 80.237 29.9533V32.3533C79.937 32.3933 79.377 32.4133 79.077 32.4133C76.937 32.4133 75.777 30.8333 75.777 28.5733V24.6733ZM90.0023 27.2333C90.0023 25.7133 88.7623 24.4733 87.2623 24.4733C85.7223 24.4733 84.5223 25.6933 84.5223 27.2133C84.5223 28.7333 85.7223 29.9533 87.2623 29.9533C88.7223 29.9533 90.0023 28.7133 90.0023 27.2333ZM89.7023 23.5733V22.3133H92.4623V32.1133H89.7023V30.8333C88.8623 31.8933 87.8023 32.4133 86.5023 32.4133C83.7423 32.4133 81.6823 30.1533 81.6823 27.1933C81.6823 24.2733 83.7223 21.9933 86.4423 21.9933C87.7223 21.9933 88.8023 22.5333 89.7023 23.5733ZM95.0139 22.3133H97.7739V32.1133H95.0139V22.3133ZM94.7539 18.1733C94.7539 17.2733 95.4939 16.5333 96.3939 16.5333C97.2939 16.5333 98.0339 17.2733 98.0339 18.1733C98.0339 19.0733 97.2939 19.8133 96.3939 19.8133C95.4939 19.8133 94.7539 19.0733 94.7539 18.1733ZM100.327 32.1133V22.3133H103.087V23.5333C103.887 22.5133 104.907 21.9933 106.147 21.9933C108.127 21.9933 109.787 23.1333 109.787 25.7733V32.1133H107.027V26.7333C107.027 25.0933 106.567 24.3333 105.167 24.3333C103.787 24.3333 103.087 25.1933 103.087 27.0333V32.1133H100.327Z",
1738
+ fill: "#030712"
1739
+ })
1740
+ ]
1741
+ }) });
1742
+ }
1743
+ //#endregion
1744
+ //#region src/layouts/MobileGate/MobileGate.tsx
1745
+ function MobileGate() {
1746
+ return /* @__PURE__ */ jsxs("div", {
1747
+ className: "fixed inset-0 flex md:hidden flex-col items-center justify-center px-[32px] py-[48px] gap-[32px]",
1748
+ style: {
1749
+ backgroundColor: "var(--background)",
1750
+ zIndex: 99999
1751
+ },
1752
+ children: [
1753
+ /* @__PURE__ */ jsxs("div", {
1754
+ className: "flex items-center gap-[16px]",
1755
+ children: [/* @__PURE__ */ jsx("div", {
1756
+ className: "flex items-center justify-center w-[56px] h-[56px] rounded-[16px]",
1757
+ style: { backgroundColor: "var(--muted)" },
1758
+ children: /* @__PURE__ */ jsx(Monitor, {
1759
+ className: "size-[28px]",
1760
+ style: { color: "var(--foreground)" }
1761
+ })
1762
+ }), /* @__PURE__ */ jsx("div", {
1763
+ className: "flex items-center justify-center w-[56px] h-[56px] rounded-[16px]",
1764
+ style: { backgroundColor: "var(--muted)" },
1765
+ children: /* @__PURE__ */ jsx(Tablet, {
1766
+ className: "size-[28px]",
1767
+ style: { color: "var(--muted-foreground)" }
1768
+ })
1769
+ })]
1770
+ }),
1771
+ /* @__PURE__ */ jsxs("div", {
1772
+ className: "flex flex-col items-center gap-[12px] max-w-[320px] text-center",
1773
+ children: [/* @__PURE__ */ jsx("span", {
1774
+ style: {
1775
+ fontFamily: "var(--font-heading)",
1776
+ fontSize: "var(--text-2xl)",
1777
+ fontWeight: "var(--font-weight-normal)",
1778
+ lineHeight: "32px",
1779
+ color: "var(--foreground)"
1780
+ },
1781
+ children: "Desktop Experience Only"
1782
+ }), /* @__PURE__ */ jsx("span", {
1783
+ style: {
1784
+ fontFamily: "var(--font-body)",
1785
+ fontSize: "var(--text-base)",
1786
+ fontWeight: "var(--font-weight-normal)",
1787
+ lineHeight: "24px",
1788
+ color: "var(--muted-foreground)"
1789
+ },
1790
+ children: "This portal is optimized for desktop and tablet screens. Please switch to a device with a larger display for the best experience."
1791
+ })]
1792
+ }),
1793
+ /* @__PURE__ */ jsxs("div", {
1794
+ className: "flex items-center gap-[8px] px-[16px] py-[10px] rounded-[9999px]",
1795
+ style: { backgroundColor: "var(--muted)" },
1796
+ children: [/* @__PURE__ */ jsx("div", {
1797
+ className: "w-[8px] h-[8px] rounded-full",
1798
+ style: { backgroundColor: "var(--chart-2)" }
1799
+ }), /* @__PURE__ */ jsx("span", {
1800
+ style: {
1801
+ fontFamily: "var(--font-body)",
1802
+ fontSize: "var(--text-sm)",
1803
+ fontWeight: "var(--font-weight-medium)",
1804
+ lineHeight: "20px",
1805
+ color: "var(--muted-foreground)"
1806
+ },
1807
+ children: "768px minimum width required"
1808
+ })]
1809
+ })
1810
+ ]
1811
+ });
1812
+ }
1813
+ //#endregion
1814
+ //#region src/layouts/PsaiHeader/PsaiHeader.tsx
1815
+ const placeholderAvatar = "data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\"%3E%3Cdefs%3E%3ClinearGradient id=\"av\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\"%3E%3Cstop offset=\"0%\" style=\"stop-color:%237c3aed;stop-opacity:1\" /%3E%3Cstop offset=\"100%\" style=\"stop-color:%235b21b6;stop-opacity:1\" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width=\"40\" height=\"40\" rx=\"20\" fill=\"url(%23av)\" /%3E%3Ctext x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-size=\"20\" fill=\"white\" font-weight=\"bold\"%3EPS%3C/text%3E%3C/svg%3E";
1816
+ function PSAILogoIcon() {
1817
+ return /* @__PURE__ */ jsxs("svg", {
1818
+ width: "151",
1819
+ height: "38",
1820
+ viewBox: "0 0 151 38",
1821
+ fill: "none",
1822
+ xmlns: "http://www.w3.org/2000/svg",
1823
+ style: { fill: "var(--color-red-500)" },
1824
+ children: [
1825
+ /* @__PURE__ */ jsx("path", { d: "M18.0824 0C8.11124 0 0 8.28513 0 18.4701C0 28.655 8.11124 36.9401 18.0824 36.9401C28.0536 36.9401 36.1648 28.655 36.1648 18.4701C36.1648 8.28513 28.0517 0 18.0824 0Z" }),
1826
+ /* @__PURE__ */ jsx("path", {
1827
+ "fill-rule": "evenodd",
1828
+ "clip-rule": "evenodd",
1829
+ d: "M31.5785 24.1953C31.3084 24.8592 30.5627 25.1735 29.9127 24.8976C29.2628 24.6216 28.9551 23.86 29.2234 23.1961C29.4935 22.5322 30.2391 22.2179 30.8891 22.4919C31.5391 22.7678 31.8468 23.5295 31.5766 24.1934",
1830
+ fill: "white"
1831
+ }),
1832
+ /* @__PURE__ */ jsx("path", {
1833
+ "fill-rule": "evenodd",
1834
+ "clip-rule": "evenodd",
1835
+ d: "M23.6623 32.2649C23.0104 32.5389 22.2666 32.2227 21.9965 31.5588C21.7283 30.8949 22.0378 30.1313 22.6878 29.8573C23.3396 29.5833 24.0853 29.8995 24.3535 30.5634C24.6218 31.2292 24.3123 31.989 23.6623 32.2649Z",
1836
+ fill: "white"
1837
+ }),
1838
+ /* @__PURE__ */ jsx("path", {
1839
+ "fill-rule": "evenodd",
1840
+ "clip-rule": "evenodd",
1841
+ d: "M12.4762 32.2553C11.8262 31.9794 11.5186 31.2178 11.7868 30.5538C12.057 29.8899 12.8026 29.5757 13.4545 29.8497C14.1045 30.1256 14.4121 30.8872 14.142 31.5512C13.8719 32.2151 13.1262 32.5312 12.4762 32.2534",
1842
+ fill: "white"
1843
+ }),
1844
+ /* @__PURE__ */ jsx("path", {
1845
+ "fill-rule": "evenodd",
1846
+ "clip-rule": "evenodd",
1847
+ d: "M4.57415 24.1675C4.3059 23.5036 4.61542 22.742 5.26541 22.468C5.91727 22.194 6.66105 22.5101 6.9293 23.174C7.19755 23.8399 6.88803 24.5996 6.23804 24.8755C5.58806 25.1495 4.8424 24.8334 4.57415 24.1694",
1848
+ fill: "white"
1849
+ }),
1850
+ /* @__PURE__ */ jsx("path", {
1851
+ "fill-rule": "evenodd",
1852
+ "clip-rule": "evenodd",
1853
+ d: "M4.58664 12.7439C4.85676 12.0799 5.60242 11.7657 6.25428 12.0397C6.90427 12.3156 7.21191 13.0772 6.94179 13.7412C6.67166 14.4051 5.92601 14.7193 5.27602 14.4434C4.62603 14.1675 4.31839 13.4059 4.58664 12.7419",
1854
+ fill: "white"
1855
+ }),
1856
+ /* @__PURE__ */ jsx("path", {
1857
+ "fill-rule": "evenodd",
1858
+ "clip-rule": "evenodd",
1859
+ d: "M12.5028 4.67236C13.1546 4.39836 13.8984 4.71451 14.1685 5.37844C14.4368 6.04236 14.1272 6.804 13.4763 7.078C12.8263 7.352 12.0807 7.03585 11.8124 6.37192C11.5442 5.70609 11.8537 4.94636 12.5037 4.67044",
1860
+ fill: "white"
1861
+ }),
1862
+ /* @__PURE__ */ jsx("path", {
1863
+ "fill-rule": "evenodd",
1864
+ "clip-rule": "evenodd",
1865
+ d: "M23.6874 4.68482C24.3374 4.96074 24.645 5.72238 24.3749 6.3863C24.1048 7.05022 23.3591 7.36446 22.7091 7.08854C22.0591 6.81263 21.7515 6.05099 22.0197 5.38706C22.2899 4.72314 23.0355 4.40699 23.6855 4.6829",
1866
+ fill: "white"
1867
+ }),
1868
+ /* @__PURE__ */ jsx("path", {
1869
+ "fill-rule": "evenodd",
1870
+ "clip-rule": "evenodd",
1871
+ d: "M31.5894 12.7707C31.8576 13.4365 31.5481 14.1982 30.8981 14.4722C30.2481 14.7462 29.5025 14.43 29.2324 13.7661C28.9641 13.1022 29.2736 12.3405 29.9236 12.0665C30.5755 11.7925 31.3193 12.1087 31.5894 12.7726",
1872
+ fill: "white"
1873
+ }),
1874
+ /* @__PURE__ */ jsx("path", {
1875
+ "fill-rule": "evenodd",
1876
+ "clip-rule": "evenodd",
1877
+ d: "M19.416 20.9658C18.4246 22.3597 17.7193 24.6149 19.0296 25.9524C19.9188 26.8606 19.2481 28.3666 18.0495 28.3666C16.8508 28.3666 16.1802 26.8606 17.0693 25.9524C18.3796 24.614 17.6762 22.3607 16.6829 20.9658C16.5103 20.7234 15.8556 19.9962 15.6362 19.8343C14.2696 18.8217 12.0636 18.1012 10.7542 19.4396C9.86506 20.3478 8.39062 19.6628 8.39062 18.4384C8.39062 17.2141 9.86599 16.5291 10.7542 17.4373C12.0645 18.7757 14.2705 18.0552 15.6362 17.0426C15.8735 16.8663 16.5853 16.1976 16.7439 15.9734C17.7352 14.5775 18.4406 12.3261 17.1303 10.9868C16.2411 10.0786 16.9117 8.57255 18.1104 8.57255C19.3091 8.57255 19.9797 10.0795 19.0906 10.9868C17.7803 12.3252 18.4856 14.5785 19.477 15.9734C19.6496 16.2158 20.3042 16.9429 20.5237 17.1049C21.8903 18.1175 24.0944 18.838 25.4057 17.4996C26.2948 16.5913 27.7692 17.2763 27.7692 18.5007C27.7692 19.7251 26.2948 20.4101 25.4057 19.5019C24.0954 18.1635 21.8893 18.8839 20.5237 19.8966C20.2864 20.0729 19.5745 20.7416 19.416 20.9658Z",
1878
+ fill: "white"
1879
+ }),
1880
+ /* @__PURE__ */ jsx("path", {
1881
+ "fill-rule": "evenodd",
1882
+ "clip-rule": "evenodd",
1883
+ d: "M25.0352 11.3672C25.7846 12.1326 25.7846 13.3723 25.0352 14.1359C24.2858 14.8994 23.0721 14.9014 22.3245 14.1359C21.577 13.3704 21.5751 12.1307 22.3245 11.3672C23.0739 10.6017 24.2876 10.6017 25.0352 11.3672Z",
1884
+ fill: "white"
1885
+ }),
1886
+ /* @__PURE__ */ jsx("path", {
1887
+ "fill-rule": "evenodd",
1888
+ "clip-rule": "evenodd",
1889
+ d: "M25.0373 25.5739C24.2878 26.3394 23.0742 26.3394 22.3248 25.5739C21.5753 24.8085 21.5753 23.5688 22.3248 22.8052C23.0742 22.0397 24.286 22.0397 25.0354 22.8052C25.7848 23.5707 25.7848 24.8104 25.0354 25.5739",
1890
+ fill: "white"
1891
+ }),
1892
+ /* @__PURE__ */ jsx("path", {
1893
+ "fill-rule": "evenodd",
1894
+ "clip-rule": "evenodd",
1895
+ d: "M11.1275 25.5739C10.3781 24.8085 10.3781 23.5688 11.1275 22.8052C11.8769 22.0397 13.0906 22.0397 13.8381 22.8052C14.5875 23.5707 14.5875 24.8104 13.8381 25.5739C13.0887 26.3394 11.875 26.3394 11.1275 25.5739Z",
1896
+ fill: "white"
1897
+ }),
1898
+ /* @__PURE__ */ jsx("path", {
1899
+ "fill-rule": "evenodd",
1900
+ "clip-rule": "evenodd",
1901
+ d: "M11.1275 11.3672C11.8769 10.6017 13.0906 10.6017 13.8381 11.3672C14.5875 12.1326 14.5875 13.3723 13.8381 14.1378C13.0887 14.9033 11.875 14.9033 11.1275 14.1378C10.3781 13.3723 10.3781 12.1345 11.1275 11.3691",
1902
+ fill: "white"
1903
+ }),
1904
+ /* @__PURE__ */ jsx("path", {
1905
+ "fill-rule": "evenodd",
1906
+ "clip-rule": "evenodd",
1907
+ d: "M66.3657 5.63905C66.6344 5.63905 66.8528 5.41596 66.8528 5.14075C66.8528 4.86555 66.6337 4.64246 66.3657 4.64246C66.0978 4.64246 65.8779 4.86555 65.8779 5.14075C65.8779 5.41596 66.097 5.63905 66.3657 5.63905Z",
1908
+ fill: "var(--foreground)"
1909
+ }),
1910
+ /* @__PURE__ */ jsx("path", {
1911
+ "fill-rule": "evenodd",
1912
+ "clip-rule": "evenodd",
1913
+ d: "M65.9785 13.1995H66.74V6.58289H65.9785V13.1987V13.1995Z",
1914
+ fill: "var(--foreground)"
1915
+ }),
1916
+ /* @__PURE__ */ jsx("path", {
1917
+ "fill-rule": "evenodd",
1918
+ "clip-rule": "evenodd",
1919
+ d: "M50.8164 9.87356C50.8164 8.48875 51.879 7.36079 53.1858 7.36079C54.4926 7.36079 55.5551 8.48801 55.5551 9.87356V9.97704C55.5048 11.3435 54.4638 12.4128 53.1858 12.4128C51.9077 12.4128 50.8164 11.2738 50.8164 9.87356ZM53.185 13.1907C54.1053 13.1907 54.9588 12.7753 55.5536 12.0451V13.1987H56.3159V6.58289H55.5536V7.71598C54.9638 6.99385 54.1104 6.58289 53.185 6.58289C51.4587 6.58289 50.0542 8.0587 50.0542 9.87356C50.0542 11.6884 51.4587 13.1907 53.185 13.1907Z",
1920
+ fill: "var(--foreground)"
1921
+ }),
1922
+ /* @__PURE__ */ jsx("path", {
1923
+ "fill-rule": "evenodd",
1924
+ "clip-rule": "evenodd",
1925
+ d: "M61.4458 12.412C60.1684 12.412 59.1282 11.3428 59.0764 9.9763V9.87283C59.0764 8.48801 60.139 7.36005 61.4458 7.36005C62.7525 7.36005 63.8144 8.48728 63.8144 9.87283C63.8144 11.2584 62.7518 12.412 61.4458 12.412ZM64.5759 9.87356C64.5759 8.0587 63.1714 6.58289 61.445 6.58289C60.5197 6.58289 59.6662 6.99312 59.0757 7.71598V6.58289H58.3135V15.5838H59.0757V12.0451C59.6706 12.776 60.5247 13.1907 61.445 13.1907C63.1714 13.1907 64.5759 11.7031 64.5759 9.87356Z",
1926
+ fill: "var(--foreground)"
1927
+ }),
1928
+ /* @__PURE__ */ jsx("path", {
1929
+ "fill-rule": "evenodd",
1930
+ "clip-rule": "evenodd",
1931
+ d: "M78.8265 6.58264C78.103 6.58264 77.4184 6.88426 76.9227 7.41559V6.58264H76.187V13.1985H76.9227V9.28035C76.9478 8.21477 77.8013 7.34734 78.8265 7.34734C79.8516 7.34734 80.7166 8.2133 80.7166 9.27815V13.1985H81.4652V9.27815C81.4652 7.79133 80.2812 6.58191 78.8265 6.58191",
1932
+ fill: "var(--foreground)"
1933
+ }),
1934
+ /* @__PURE__ */ jsx("path", {
1935
+ "fill-rule": "evenodd",
1936
+ "clip-rule": "evenodd",
1937
+ d: "M85.4048 12.4406L85.3294 12.4619C85.2568 12.4825 85.1339 12.5067 84.9594 12.5067C84.6533 12.5067 84.5219 12.3085 84.5219 11.8433V7.33877H85.4206V6.57922H84.5219V4.35632H83.7417V6.57848H82.8379V7.33804H83.7417V11.8653C83.7417 12.3628 83.8293 12.6872 84.0161 12.8846C84.1892 13.0872 84.455 13.1943 84.7841 13.1943C85.0312 13.1943 85.2503 13.1598 85.4005 13.096L85.4429 13.0784L85.4048 12.4406Z",
1938
+ fill: "var(--foreground)"
1939
+ }),
1940
+ /* @__PURE__ */ jsx("path", {
1941
+ "fill-rule": "evenodd",
1942
+ "clip-rule": "evenodd",
1943
+ d: "M71.5131 7.35027C72.6296 7.35027 73.5872 8.17514 73.8171 9.32144H69.1711C69.4262 8.15679 70.3788 7.35027 71.5124 7.35027H71.5131ZM73.4981 11.2897C73.0829 11.992 72.3228 12.4286 71.5124 12.4286C70.253 12.4286 69.2149 11.3998 69.1215 10.0729H74.256C74.4658 10.0729 74.6303 9.91734 74.6303 9.717V9.65902C74.496 7.90654 73.1554 6.58484 71.5124 6.58484C69.7796 6.58484 68.3687 8.07313 68.3687 9.90193C68.3687 11.7307 69.7789 13.1926 71.5124 13.1926C72.5714 13.1926 73.5455 12.6363 74.1224 11.7051L73.4981 11.2897Z",
1944
+ fill: "var(--foreground)"
1945
+ }),
1946
+ /* @__PURE__ */ jsx("path", {
1947
+ "fill-rule": "evenodd",
1948
+ "clip-rule": "evenodd",
1949
+ d: "M48.2976 10.001C48.2976 10.001 48.1 9.84326 47.8859 9.75226C47.6726 9.66053 47.3665 9.55411 46.7314 9.3956C46.6452 9.37432 46.5612 9.35597 46.4821 9.33542C46.0576 9.22681 45.7221 9.08077 45.4857 8.90024C45.2508 8.69328 45.1631 8.52156 45.1732 8.28892C45.184 8.04307 45.3277 7.80457 45.5798 7.6167C45.8665 7.4002 46.2846 7.29233 46.758 7.31361C47.2947 7.33783 47.7027 7.61156 48.1431 7.9396L48.1855 7.97116L48.7394 7.44424C48.6726 7.37966 48.6597 7.36938 48.4743 7.23949C48.039 6.9386 47.5044 6.6201 46.7889 6.58854C46.166 6.56066 45.61 6.69055 45.1797 6.96575C44.7134 7.28866 44.4189 7.7576 44.4131 8.25443C44.4081 8.62503 44.4828 8.97215 44.8456 9.32882C45.2788 9.75519 45.9527 9.97976 46.5691 10.1016C47.0978 10.2058 47.5863 10.4061 47.832 10.6146C48.1259 10.8898 48.23 11.0894 48.23 11.3756C48.2186 11.65 48.0433 11.912 47.7437 12.0977C47.4434 12.3274 47.0138 12.4478 46.5655 12.4272C45.9749 12.4008 45.365 12.1381 44.7501 11.6464L44.7077 11.6119L44.1646 12.1205L44.2184 12.1682C44.934 12.7993 45.7127 13.1435 46.5324 13.1904C47.1467 13.2183 47.6819 13.0686 48.1711 12.7347C48.6769 12.3773 48.9564 11.9186 48.9786 11.4086C49.0016 10.8663 48.7408 10.3269 48.2976 10.0003",
1950
+ fill: "var(--foreground)"
1951
+ }),
1952
+ /* @__PURE__ */ jsx("path", {
1953
+ d: "M53.2646 27.7038C53.2646 26.1838 52.0246 24.9438 50.5246 24.9438C48.9846 24.9438 47.7846 26.1638 47.7846 27.6838C47.7846 29.2038 48.9846 30.4238 50.5246 30.4238C51.9846 30.4238 53.2646 29.1838 53.2646 27.7038ZM52.9646 24.0438V22.7838H55.7246V32.5838H52.9646V31.3038C52.1246 32.3638 51.0646 32.8838 49.7646 32.8838C47.0046 32.8838 44.9446 30.6238 44.9446 27.6638C44.9446 24.7438 46.9846 22.4638 49.7046 22.4638C50.9846 22.4638 52.0646 23.0038 52.9646 24.0438ZM58.2761 22.7838H61.0361V32.5838H58.2761V22.7838ZM58.0161 18.6438C58.0161 17.7438 58.7561 17.0038 59.6561 17.0038C60.5561 17.0038 61.2961 17.7438 61.2961 18.6438C61.2961 19.5438 60.5561 20.2838 59.6561 20.2838C58.7561 20.2838 58.0161 19.5438 58.0161 18.6438ZM75.5214 27.7038C75.5214 26.1838 74.3414 24.9438 72.7814 24.9438C71.2214 24.9438 70.0214 26.2038 70.0214 27.6838C70.0214 29.1638 71.2614 30.4238 72.7814 30.4238C74.2814 30.4238 75.5214 29.1638 75.5214 27.7038ZM70.3214 31.3038V37.8038H67.5614V22.7838H70.3214V24.0438C71.1614 23.0038 72.2214 22.4638 73.5214 22.4638C76.2814 22.4638 78.3414 24.7438 78.3414 27.6838C78.3414 30.6438 76.2614 32.8838 73.5814 32.8838C72.3014 32.8838 71.2214 32.3638 70.3214 31.3038ZM80.4325 32.5838V22.7838H83.1925V24.2638C83.8725 23.0638 84.8125 22.4638 86.0325 22.4638C86.4125 22.4638 86.8125 22.5438 87.2325 22.7038L86.8525 25.2838C86.4325 25.0638 85.9925 24.9438 85.5325 24.9438C83.9725 24.9438 83.1925 25.9238 83.1925 27.8838V32.5838H80.4325ZM90.858 27.6438C90.858 29.2038 92.078 30.4238 93.618 30.4238C95.138 30.4238 96.398 29.1838 96.398 27.6838C96.398 26.2038 95.138 24.9438 93.618 24.9438C92.138 24.9438 90.858 26.2038 90.858 27.6438ZM88.018 27.6038C88.018 24.6238 90.398 22.4638 93.638 22.4638C96.878 22.4638 99.218 24.6238 99.218 27.6638C99.218 30.8238 96.858 32.8838 93.578 32.8838C90.238 32.8838 88.018 30.7038 88.018 27.6038ZM109.111 27.7038C109.111 26.1838 107.871 24.9438 106.371 24.9438C104.871 24.9438 103.631 26.1838 103.631 27.6838C103.631 29.1838 104.871 30.4238 106.371 30.4238C107.831 30.4238 109.111 29.1838 109.111 27.7038ZM108.811 24.0438V15.6238H111.571V32.5838H108.811V31.3038C107.971 32.3638 106.911 32.8838 105.611 32.8838C102.851 32.8838 100.791 30.6638 100.791 27.6638C100.791 24.7438 102.851 22.4638 105.551 22.4638C106.831 22.4638 107.911 23.0038 108.811 24.0438ZM114.163 22.7838H116.923V28.3438C116.923 29.8238 117.583 30.5638 118.903 30.5638C120.243 30.5638 120.903 29.8238 120.903 28.3438V22.7838H123.643V28.8038C123.643 31.4238 121.943 32.8838 118.903 32.8838C115.863 32.8838 114.163 31.4238 114.163 28.8038V22.7838ZM133.593 23.0638V25.7638C132.873 25.2038 132.133 24.9438 131.353 24.9438C129.773 24.9438 128.553 26.0838 128.553 27.6838C128.553 29.2838 129.753 30.4238 131.353 30.4238C132.153 30.4238 132.893 30.1438 133.593 29.6038V32.3038C132.753 32.6838 131.913 32.8838 131.073 32.8838C128.013 32.8838 125.713 30.6438 125.713 27.7238C125.713 24.7438 128.033 22.4638 131.113 22.4638C132.013 22.4638 132.833 22.6638 133.593 23.0638ZM135.687 25.1438H134.607V22.7838H135.687V19.4438H138.447V22.7838H140.367V25.1438H138.447V28.0638C138.447 29.5838 138.627 30.4638 139.647 30.4638C139.827 30.4638 140.007 30.4438 140.147 30.4238V32.8238C139.847 32.8638 139.287 32.8838 138.987 32.8838C136.847 32.8838 135.687 31.3038 135.687 29.0438V25.1438ZM148.852 23.4638L147.492 25.0638C146.932 24.6438 146.392 24.4238 145.872 24.4238C145.272 24.4238 144.812 24.7838 144.812 25.2438C144.812 25.7238 145.072 25.8838 146.372 26.3438C148.652 27.1438 149.352 27.8238 149.352 29.3838C149.352 31.4438 147.652 32.9038 145.252 32.9038C143.752 32.9038 142.512 32.3638 141.532 31.2838L142.952 29.6038C143.712 30.3638 144.492 30.7638 145.272 30.7638C145.972 30.7638 146.512 30.3038 146.512 29.6838C146.512 29.1438 146.292 28.9038 145.012 28.4438C142.632 27.6038 142.152 26.9638 142.152 25.5438C142.152 23.6438 143.692 22.4238 145.652 22.4238C146.852 22.4238 147.912 22.7638 148.852 23.4638Z",
1954
+ fill: "var(--foreground)"
1955
+ })
1956
+ ]
1957
+ });
1958
+ }
1959
+ function PSAIHeader({ isDarkMode, onToggleTheme, onAdminLogin, adminLoginLabel = "Domain Admin Login", onBack, showBackButton = false }) {
1960
+ const [loginHovered, setLoginHovered] = useState(false);
1961
+ const [backHovered, setBackHovered] = useState(false);
1962
+ return /* @__PURE__ */ jsx("div", {
1963
+ className: "backdrop-blur-[45px] rounded-[16px] shrink-0 w-full",
1964
+ style: { backgroundColor: "var(--glass-heavy)" },
1965
+ children: /* @__PURE__ */ jsxs("div", {
1966
+ className: "flex items-center px-[12px] py-[8px] gap-[20px]",
1967
+ children: [/* @__PURE__ */ jsx("div", {
1968
+ className: "flex-1 flex items-center",
1969
+ children: /* @__PURE__ */ jsxs("div", {
1970
+ className: "flex items-center gap-[8px]",
1971
+ children: [showBackButton && onBack && /* @__PURE__ */ jsx("button", {
1972
+ className: "flex items-center justify-center w-[40px] h-[40px] rounded-full transition-all cursor-pointer mr-[8px]",
1973
+ style: {
1974
+ backgroundColor: backHovered ? "var(--glass-medium)" : "transparent",
1975
+ border: "1px solid var(--border)"
1976
+ },
1977
+ onMouseEnter: () => setBackHovered(true),
1978
+ onMouseLeave: () => setBackHovered(false),
1979
+ onClick: onBack,
1980
+ "aria-label": "Go back",
1981
+ children: /* @__PURE__ */ jsxs("svg", {
1982
+ width: "16",
1983
+ height: "16",
1984
+ viewBox: "0 0 24 24",
1985
+ fill: "none",
1986
+ xmlns: "http://www.w3.org/2000/svg",
1987
+ children: [/* @__PURE__ */ jsx("path", {
1988
+ d: "M19 12H5",
1989
+ stroke: "var(--foreground)",
1990
+ strokeWidth: "2",
1991
+ strokeLinecap: "round",
1992
+ strokeLinejoin: "round"
1993
+ }), /* @__PURE__ */ jsx("path", {
1994
+ d: "M12 19L5 12L12 5",
1995
+ stroke: "var(--foreground)",
1996
+ strokeWidth: "2",
1997
+ strokeLinecap: "round",
1998
+ strokeLinejoin: "round"
1999
+ })]
2000
+ })
2001
+ }), /* @__PURE__ */ jsx(PSAILogoIcon, {})]
2002
+ })
2003
+ }), /* @__PURE__ */ jsxs("div", {
2004
+ className: "flex items-center gap-[8px]",
2005
+ children: [
2006
+ onAdminLogin && /* @__PURE__ */ jsxs("button", {
2007
+ className: "hidden sm:flex items-center gap-[8px] px-[24px] py-[10px] min-h-[40px] rounded-full transition-all cursor-pointer relative",
2008
+ style: {
2009
+ backgroundColor: loginHovered ? "var(--glass-medium)" : "transparent",
2010
+ border: "1px solid var(--border)",
2011
+ color: "var(--foreground)"
2012
+ },
2013
+ onMouseEnter: () => setLoginHovered(true),
2014
+ onMouseLeave: () => setLoginHovered(false),
2015
+ onClick: onAdminLogin,
2016
+ children: [/* @__PURE__ */ jsx(User, { className: "size-[16px]" }), /* @__PURE__ */ jsx("span", {
2017
+ style: {
2018
+ fontFamily: "var(--font-heading)",
2019
+ fontSize: "var(--text-sm)",
2020
+ fontWeight: "var(--font-weight-medium)",
2021
+ lineHeight: "20px"
2022
+ },
2023
+ children: adminLoginLabel
2024
+ })]
2025
+ }),
2026
+ /* @__PURE__ */ jsx("button", {
2027
+ onClick: onToggleTheme,
2028
+ className: "flex items-center justify-center w-[40px] h-[40px] rounded-full bg-transparent transition-colors hover:bg-[var(--glass-medium)]",
2029
+ "aria-label": isDarkMode ? "Switch to light mode" : "Switch to dark mode",
2030
+ children: isDarkMode ? /* @__PURE__ */ jsx(Sun, {
2031
+ className: "w-4 h-4",
2032
+ style: { color: "var(--foreground)" }
2033
+ }) : /* @__PURE__ */ jsx(Moon, {
2034
+ className: "w-4 h-4",
2035
+ style: { color: "var(--foreground)" }
2036
+ })
2037
+ }),
2038
+ /* @__PURE__ */ jsx("div", {
2039
+ className: "w-[40px] h-[40px] rounded-full overflow-hidden",
2040
+ children: /* @__PURE__ */ jsx("img", {
2041
+ src: placeholderAvatar,
2042
+ alt: "Avatar",
2043
+ className: "w-full h-full object-cover"
2044
+ })
2045
+ })
2046
+ ]
2047
+ })]
2048
+ })
2049
+ });
2050
+ }
2051
+ //#endregion
2052
+ //#region src/layouts/RightSidebar/RightSidebar.tsx
2053
+ const domainChatConfigs = {
2054
+ slingshot: {
2055
+ suggestedPrompts: defaultSuggestedPrompts,
2056
+ mockResponses: defaultMockResponses,
2057
+ fallbackResponse: defaultFallbackResponse
2058
+ },
2059
+ bodhi: {
2060
+ suggestedPrompts: [
2061
+ "Show active incidents",
2062
+ "Summarize agent activity",
2063
+ "Latest runbook updates",
2064
+ "Top error patterns"
2065
+ ],
2066
+ mockResponses: {
2067
+ "show active incidents": "There are currently 3 active incidents: 2 P2 issues around license provisioning and 1 P3 network timeout. All have been triaged and assigned to agents.",
2068
+ "summarize agent activity": "In the past hour, 12 agent runs completed successfully, 1 failed due to a timeout on the GitHub connector. Overall resolution rate is 91%.",
2069
+ "latest runbook updates": "The VPN timeout runbook was updated 2 hours ago with a new escalation path. The password reset runbook has been auto-resolving at 98% success this week.",
2070
+ "top error patterns": "Top 3 recurring patterns: (1) Password reset loops — 340 tickets/month, auto-resolvable. (2) License provisioning delays — 160 tickets/month, workflow fix available. (3) VPN timeout cascades — 210 tickets/month, correlated to infra config."
2071
+ },
2072
+ fallbackResponse: "I can help with incident triage, agent run summaries, runbook management, and pattern analysis. Could you provide more detail on what you need?"
2073
+ },
2074
+ sustain: {
2075
+ suggestedPrompts: [
2076
+ "Summarize emissions this month",
2077
+ "Show pending ESG reports",
2078
+ "Which initiatives need attention?",
2079
+ "Latest compliance status"
2080
+ ],
2081
+ mockResponses: {
2082
+ "summarize emissions this month": "Total Scope 1+2 emissions this month: 1,240 tCO₂e — down 8% vs last month. Nissan's manufacturing sites account for 63% of total. 2 data sources flagged for quality review.",
2083
+ "show pending esg reports": "There are 2 pending ESG reports: the Q2 GHG Inventory (due Jun 15) and the CSRD disclosure package (due Jun 30). Both are 70% complete.",
2084
+ "which initiatives need attention": "3 initiatives are behind schedule: Solar Panel Rollout (15 days late), Fleet Electrification (waiting on supplier data), and Supply Chain Audit (blocked on vendor responses).",
2085
+ "latest compliance status": "CSRD compliance score: 78/100. 3 data gaps identified in Scope 3 categories 1 and 11. GRI reporting is on track; TCFD disclosures need board sign-off."
2086
+ },
2087
+ fallbackResponse: "I can help with emissions tracking, ESG reporting, initiative progress, and compliance status. Could you provide more detail on what you need?"
2088
+ }
2089
+ };
2090
+ function timeAgo(date) {
2091
+ const seconds = Math.floor((Date.now() - date.getTime()) / 1e3);
2092
+ if (seconds < 60) return "Just now";
2093
+ const minutes = Math.floor(seconds / 60);
2094
+ if (minutes < 60) return `${minutes} min${minutes !== 1 ? "s" : ""} ago`;
2095
+ const hours = Math.floor(minutes / 60);
2096
+ if (hours < 24) return `${hours} hr${hours !== 1 ? "s" : ""} ago`;
2097
+ const days = Math.floor(hours / 24);
2098
+ return `${days} day${days !== 1 ? "s" : ""} ago`;
2099
+ }
2100
+ const severityIcons = {
2101
+ info: /* @__PURE__ */ jsx(Clock, {
2102
+ className: "size-[16px]",
2103
+ style: { color: "var(--foreground)" }
2104
+ }),
2105
+ success: /* @__PURE__ */ jsx(CheckCircle, {
2106
+ className: "size-[16px]",
2107
+ style: { color: "var(--badge-success-text)" }
2108
+ }),
2109
+ warning: /* @__PURE__ */ jsx(AlertTriangle, {
2110
+ className: "size-[16px]",
2111
+ style: { color: "var(--badge-warning-text)" }
2112
+ }),
2113
+ error: /* @__PURE__ */ jsx(AlertCircle, {
2114
+ className: "size-[16px]",
2115
+ style: { color: "var(--badge-danger-text)" }
2116
+ })
2117
+ };
2118
+ const severityColorMap = {
2119
+ info: "var(--badge-info-bg)",
2120
+ success: "var(--badge-success-bg)",
2121
+ warning: "var(--badge-warning-bg)",
2122
+ error: "var(--badge-danger-bg)"
2123
+ };
2124
+ const severityTextMap = {
2125
+ info: "var(--badge-info-text)",
2126
+ success: "var(--badge-success-text)",
2127
+ warning: "var(--badge-warning-text)",
2128
+ error: "var(--badge-danger-text)"
2129
+ };
2130
+ function TabCounter({ count, variant }) {
2131
+ return /* @__PURE__ */ jsx("div", {
2132
+ className: "flex items-center justify-center h-[16px] min-w-[16px] px-[4px] rounded-[10px]",
2133
+ style: { backgroundColor: variant === "warning" ? "var(--tab-counter-warning)" : "var(--tab-counter-danger)" },
2134
+ children: /* @__PURE__ */ jsx("span", {
2135
+ style: {
2136
+ fontFamily: "var(--font-body)",
2137
+ fontSize: "12px",
2138
+ fontWeight: 600,
2139
+ lineHeight: "16px",
2140
+ color: "var(--tab-counter-text)"
2141
+ },
2142
+ children: count
2143
+ })
2144
+ });
2145
+ }
2146
+ function ActivityCard({ item, onViewDetails }) {
2147
+ return /* @__PURE__ */ jsx("div", {
2148
+ className: "relative rounded-[12px] shrink-0 w-full",
2149
+ style: { backgroundColor: "var(--tile-bg)" },
2150
+ children: /* @__PURE__ */ jsx("div", {
2151
+ className: "flex flex-col items-start justify-center p-[16px] w-full",
2152
+ children: /* @__PURE__ */ jsxs("div", {
2153
+ className: "flex flex-col gap-[12px] items-start w-full",
2154
+ children: [/* @__PURE__ */ jsxs("div", {
2155
+ className: "flex flex-col gap-[8px] items-start w-full",
2156
+ children: [/* @__PURE__ */ jsxs("div", {
2157
+ className: "flex gap-[12px] items-center w-full",
2158
+ children: [severityIcons[item.severity], /* @__PURE__ */ jsx("span", {
2159
+ className: "flex-1 min-w-0",
2160
+ style: {
2161
+ fontFamily: "var(--font-body)",
2162
+ fontSize: "var(--text-sm)",
2163
+ fontWeight: "var(--font-weight-medium)",
2164
+ lineHeight: "20px",
2165
+ color: "var(--foreground)",
2166
+ overflow: "hidden",
2167
+ textOverflow: "ellipsis",
2168
+ whiteSpace: "nowrap"
2169
+ },
2170
+ children: activityTypeLabels[item.type]
2171
+ })]
2172
+ }), /* @__PURE__ */ jsxs("span", {
2173
+ style: {
2174
+ fontFamily: "var(--font-body)",
2175
+ fontSize: "12px",
2176
+ fontWeight: "var(--font-weight-normal)",
2177
+ lineHeight: "16px",
2178
+ color: "var(--muted-foreground)"
2179
+ },
2180
+ children: [
2181
+ item.source,
2182
+ " · ",
2183
+ timeAgo(item.timestamp),
2184
+ " · ",
2185
+ item.category
2186
+ ]
2187
+ })]
2188
+ }), /* @__PURE__ */ jsxs("button", {
2189
+ onClick: onViewDetails,
2190
+ className: "relative flex gap-[6px] items-center justify-center min-h-[24px] px-[8px] py-[3px] rounded-[9999px] cursor-pointer transition-colors",
2191
+ style: { backgroundColor: "var(--input-background)" },
2192
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
2193
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "var(--input-background)",
2194
+ children: [/* @__PURE__ */ jsx("div", {
2195
+ "aria-hidden": "true",
2196
+ className: "absolute inset-0 pointer-events-none rounded-[9999px]",
2197
+ style: { border: "1px solid var(--border)" }
2198
+ }), /* @__PURE__ */ jsx("span", {
2199
+ style: {
2200
+ fontFamily: "var(--font-heading)",
2201
+ fontSize: "12px",
2202
+ fontWeight: "var(--font-weight-medium)",
2203
+ lineHeight: "16px",
2204
+ color: "var(--foreground)"
2205
+ },
2206
+ children: "View Details"
2207
+ })]
2208
+ })]
2209
+ })
2210
+ })
2211
+ });
2212
+ }
2213
+ function EmptyState({ tab }) {
2214
+ return /* @__PURE__ */ jsxs("div", {
2215
+ className: "flex flex-col items-center justify-center flex-1 min-h-[200px] gap-[12px]",
2216
+ children: [
2217
+ /* @__PURE__ */ jsx("div", {
2218
+ className: "size-[40px] flex items-center justify-center rounded-full",
2219
+ style: { backgroundColor: "var(--muted)" },
2220
+ children: tab === "errors" ? /* @__PURE__ */ jsx(AlertCircle, {
2221
+ className: "size-[20px]",
2222
+ style: { color: "var(--muted-foreground)" }
2223
+ }) : /* @__PURE__ */ jsx(Activity, {
2224
+ className: "size-[20px]",
2225
+ style: { color: "var(--muted-foreground)" }
2226
+ })
2227
+ }),
2228
+ /* @__PURE__ */ jsx("span", {
2229
+ style: {
2230
+ fontFamily: "var(--font-body)",
2231
+ fontSize: "var(--text-sm)",
2232
+ fontWeight: "var(--font-weight-normal)",
2233
+ lineHeight: "20px",
2234
+ color: "var(--muted-foreground)",
2235
+ textAlign: "center"
2236
+ },
2237
+ children: tab === "errors" ? "No errors detected" : "No activity yet"
2238
+ }),
2239
+ /* @__PURE__ */ jsx("span", {
2240
+ style: {
2241
+ fontFamily: "var(--font-body)",
2242
+ fontSize: "12px",
2243
+ fontWeight: "var(--font-weight-normal)",
2244
+ lineHeight: "16px",
2245
+ color: "var(--muted-foreground)",
2246
+ textAlign: "center"
2247
+ },
2248
+ children: tab === "errors" ? "Errors will appear here when detected during ingestion." : "Add a context source to see activity here."
2249
+ })
2250
+ ]
2251
+ });
2252
+ }
2253
+ function ActivityDetailDrawer({ activity, isOpen, onClose }) {
2254
+ const [isAnimating, setIsAnimating] = useState(false);
2255
+ useEffect(() => {
2256
+ if (isOpen) requestAnimationFrame(() => {
2257
+ requestAnimationFrame(() => setIsAnimating(true));
2258
+ });
2259
+ else setIsAnimating(false);
2260
+ }, [isOpen]);
2261
+ const handleClose = useCallback(() => {
2262
+ setIsAnimating(false);
2263
+ setTimeout(onClose, 300);
2264
+ }, [onClose]);
2265
+ if (!isOpen || !activity) return null;
2266
+ const metadataRows = [];
2267
+ if (activity.metadata) {
2268
+ const m = activity.metadata;
2269
+ if (m.phase) metadataRows.push({
2270
+ label: "Phase",
2271
+ value: m.phase
2272
+ });
2273
+ if (m.filesCount !== void 0) metadataRows.push({
2274
+ label: "Files Discovered",
2275
+ value: String(m.filesCount)
2276
+ });
2277
+ if (m.errorsCount !== void 0) metadataRows.push({
2278
+ label: "Errors",
2279
+ value: String(m.errorsCount)
2280
+ });
2281
+ if (m.completedCount !== void 0) metadataRows.push({
2282
+ label: "Completed",
2283
+ value: String(m.completedCount)
2284
+ });
2285
+ if (m.pendingCount !== void 0) metadataRows.push({
2286
+ label: "Pending",
2287
+ value: String(m.pendingCount)
2288
+ });
2289
+ if (m.activeRepoCount !== void 0) metadataRows.push({
2290
+ label: "Active Repos",
2291
+ value: String(m.activeRepoCount)
2292
+ });
2293
+ if (m.tokenExpiredCount !== void 0) metadataRows.push({
2294
+ label: "Expired Tokens",
2295
+ value: String(m.tokenExpiredCount)
2296
+ });
2297
+ if (m.eta) metadataRows.push({
2298
+ label: "ETA",
2299
+ value: m.eta
2300
+ });
2301
+ }
2302
+ return createPortal(/* @__PURE__ */ jsx("div", {
2303
+ className: "fixed inset-0 z-50 flex items-center justify-end overflow-clip transition-all duration-300",
2304
+ style: {
2305
+ backdropFilter: isAnimating ? "blur(5px)" : "blur(0px)",
2306
+ backgroundColor: isAnimating ? "rgba(31, 40, 50, 0.4)" : "rgba(31, 40, 50, 0)"
2307
+ },
2308
+ onClick: (e) => {
2309
+ if (e.target === e.currentTarget) handleClose();
2310
+ },
2311
+ children: /* @__PURE__ */ jsxs("div", {
2312
+ className: "h-full shrink-0 w-[480px] sm:w-[560px] md:w-[640px] flex flex-col transition-transform duration-300 ease-out rounded-tl-[16px] rounded-bl-[16px]",
2313
+ style: {
2314
+ backgroundColor: "var(--card)",
2315
+ transform: isAnimating ? "translateX(0)" : "translateX(100%)"
2316
+ },
2317
+ children: [
2318
+ /* @__PURE__ */ jsx("div", {
2319
+ className: "shrink-0 px-[24px] py-[16px]",
2320
+ children: /* @__PURE__ */ jsxs("div", {
2321
+ className: "flex items-center justify-between w-full",
2322
+ children: [/* @__PURE__ */ jsx("span", {
2323
+ style: {
2324
+ fontFamily: "var(--font-heading)",
2325
+ fontSize: "var(--text-xl)",
2326
+ fontWeight: "var(--font-weight-normal)",
2327
+ lineHeight: "24px",
2328
+ color: "var(--foreground)"
2329
+ },
2330
+ children: "Activity Details"
2331
+ }), /* @__PURE__ */ jsx("button", {
2332
+ onClick: handleClose,
2333
+ className: "flex items-center justify-center size-[28px] rounded-[8px] transition-colors cursor-pointer",
2334
+ style: { color: "var(--muted-foreground)" },
2335
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--muted)",
2336
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
2337
+ children: /* @__PURE__ */ jsx(X, { className: "size-[16px]" })
2338
+ })]
2339
+ })
2340
+ }),
2341
+ /* @__PURE__ */ jsx("div", {
2342
+ className: "flex-1 min-h-0 overflow-y-auto px-[24px] py-[8px]",
2343
+ children: /* @__PURE__ */ jsxs("div", {
2344
+ className: "flex flex-col gap-[32px]",
2345
+ children: [
2346
+ /* @__PURE__ */ jsxs("div", {
2347
+ className: "flex flex-col gap-[4px]",
2348
+ children: [/* @__PURE__ */ jsx("span", {
2349
+ style: {
2350
+ fontFamily: "var(--font-heading)",
2351
+ fontSize: "var(--text-base)",
2352
+ fontWeight: "var(--font-weight-normal)",
2353
+ lineHeight: "24px",
2354
+ color: "var(--foreground)"
2355
+ },
2356
+ children: activityTypeLabels[activity.type]
2357
+ }), /* @__PURE__ */ jsx("span", {
2358
+ style: {
2359
+ fontFamily: "var(--font-body)",
2360
+ fontSize: "var(--text-sm)",
2361
+ fontWeight: "var(--font-weight-normal)",
2362
+ lineHeight: "20px",
2363
+ color: "var(--muted-foreground)"
2364
+ },
2365
+ children: "Review the details of this activity event"
2366
+ })]
2367
+ }),
2368
+ /* @__PURE__ */ jsxs("div", {
2369
+ className: "flex flex-col gap-[16px]",
2370
+ children: [/* @__PURE__ */ jsx("span", {
2371
+ style: {
2372
+ fontFamily: "var(--font-heading)",
2373
+ fontSize: "var(--text-sm)",
2374
+ fontWeight: "var(--font-weight-normal)",
2375
+ lineHeight: "24px",
2376
+ color: "var(--foreground)"
2377
+ },
2378
+ children: "Status"
2379
+ }), /* @__PURE__ */ jsxs("div", {
2380
+ className: "flex gap-[8px] items-center flex-wrap",
2381
+ children: [/* @__PURE__ */ jsxs("span", {
2382
+ className: "inline-flex items-center gap-[4px] px-[8px] py-[2px] rounded-[8px]",
2383
+ style: { backgroundColor: severityColorMap[activity.severity] },
2384
+ children: [severityIcons[activity.severity], /* @__PURE__ */ jsx("span", {
2385
+ style: {
2386
+ fontFamily: "var(--font-body)",
2387
+ fontSize: "12px",
2388
+ fontWeight: 600,
2389
+ lineHeight: "16px",
2390
+ color: severityTextMap[activity.severity],
2391
+ textTransform: "capitalize"
2392
+ },
2393
+ children: activity.severity
2394
+ })]
2395
+ }), /* @__PURE__ */ jsxs("span", {
2396
+ className: "relative inline-flex items-center px-[8px] py-[2px] rounded-[8px]",
2397
+ style: { backgroundColor: "var(--badge-default-bg)" },
2398
+ children: [/* @__PURE__ */ jsx("div", {
2399
+ "aria-hidden": "true",
2400
+ className: "absolute border border-solid inset-0 pointer-events-none rounded-[8px]",
2401
+ style: { borderColor: "var(--border)" }
2402
+ }), /* @__PURE__ */ jsx("span", {
2403
+ style: {
2404
+ fontFamily: "var(--font-body)",
2405
+ fontSize: "12px",
2406
+ fontWeight: 600,
2407
+ lineHeight: "16px",
2408
+ color: "var(--foreground)"
2409
+ },
2410
+ children: activity.category
2411
+ })]
2412
+ })]
2413
+ })]
2414
+ }),
2415
+ /* @__PURE__ */ jsxs("div", {
2416
+ className: "flex flex-col gap-[16px]",
2417
+ children: [/* @__PURE__ */ jsx("span", {
2418
+ style: {
2419
+ fontFamily: "var(--font-heading)",
2420
+ fontSize: "var(--text-sm)",
2421
+ fontWeight: "var(--font-weight-normal)",
2422
+ lineHeight: "24px",
2423
+ color: "var(--foreground)"
2424
+ },
2425
+ children: "Source Information"
2426
+ }), /* @__PURE__ */ jsxs("div", {
2427
+ className: "relative rounded-[12px] p-[16px] flex flex-col gap-[12px]",
2428
+ style: { backgroundColor: "var(--input-background)" },
2429
+ children: [
2430
+ /* @__PURE__ */ jsx("div", {
2431
+ "aria-hidden": "true",
2432
+ className: "absolute border border-solid inset-0 pointer-events-none rounded-[12px]",
2433
+ style: { borderColor: "var(--border)" }
2434
+ }),
2435
+ /* @__PURE__ */ jsxs("div", {
2436
+ className: "flex items-center gap-[8px]",
2437
+ children: [
2438
+ /* @__PURE__ */ jsx(Zap, {
2439
+ className: "size-[14px] shrink-0",
2440
+ style: { color: "var(--muted-foreground)" }
2441
+ }),
2442
+ /* @__PURE__ */ jsx("span", {
2443
+ style: {
2444
+ fontFamily: "var(--font-body)",
2445
+ fontSize: "var(--text-sm)",
2446
+ fontWeight: "var(--font-weight-normal)",
2447
+ lineHeight: "20px",
2448
+ color: "var(--muted-foreground)"
2449
+ },
2450
+ children: "Source:"
2451
+ }),
2452
+ /* @__PURE__ */ jsx("span", {
2453
+ style: {
2454
+ fontFamily: "var(--font-body)",
2455
+ fontSize: "var(--text-sm)",
2456
+ fontWeight: "var(--font-weight-medium)",
2457
+ lineHeight: "20px",
2458
+ color: "var(--foreground)"
2459
+ },
2460
+ children: activity.source
2461
+ })
2462
+ ]
2463
+ }),
2464
+ /* @__PURE__ */ jsxs("div", {
2465
+ className: "flex items-center gap-[8px]",
2466
+ children: [/* @__PURE__ */ jsx(Clock, {
2467
+ className: "size-[14px] shrink-0",
2468
+ style: { color: "var(--muted-foreground)" }
2469
+ }), /* @__PURE__ */ jsxs("span", {
2470
+ style: {
2471
+ fontFamily: "var(--font-body)",
2472
+ fontSize: "var(--text-sm)",
2473
+ fontWeight: "var(--font-weight-normal)",
2474
+ lineHeight: "20px",
2475
+ color: "var(--muted-foreground)"
2476
+ },
2477
+ children: [
2478
+ timeAgo(activity.timestamp),
2479
+ " · ",
2480
+ activity.timestamp.toLocaleTimeString()
2481
+ ]
2482
+ })]
2483
+ })
2484
+ ]
2485
+ })]
2486
+ }),
2487
+ /* @__PURE__ */ jsxs("div", {
2488
+ className: "flex flex-col gap-[16px]",
2489
+ children: [/* @__PURE__ */ jsx("span", {
2490
+ style: {
2491
+ fontFamily: "var(--font-heading)",
2492
+ fontSize: "var(--text-sm)",
2493
+ fontWeight: "var(--font-weight-normal)",
2494
+ lineHeight: "24px",
2495
+ color: "var(--foreground)"
2496
+ },
2497
+ children: "Description"
2498
+ }), /* @__PURE__ */ jsxs("div", {
2499
+ className: "relative rounded-[12px] p-[16px]",
2500
+ style: { backgroundColor: "var(--input-background)" },
2501
+ children: [/* @__PURE__ */ jsx("div", {
2502
+ "aria-hidden": "true",
2503
+ className: "absolute border border-solid inset-0 pointer-events-none rounded-[12px]",
2504
+ style: { borderColor: "var(--border)" }
2505
+ }), /* @__PURE__ */ jsx("span", {
2506
+ style: {
2507
+ fontFamily: "var(--font-body)",
2508
+ fontSize: "var(--text-sm)",
2509
+ fontWeight: "var(--font-weight-normal)",
2510
+ lineHeight: "20px",
2511
+ color: "var(--foreground)"
2512
+ },
2513
+ children: activity.description
2514
+ })]
2515
+ })]
2516
+ }),
2517
+ metadataRows.length > 0 && /* @__PURE__ */ jsxs("div", {
2518
+ className: "flex flex-col gap-[16px]",
2519
+ children: [/* @__PURE__ */ jsx("span", {
2520
+ style: {
2521
+ fontFamily: "var(--font-heading)",
2522
+ fontSize: "var(--text-sm)",
2523
+ fontWeight: "var(--font-weight-normal)",
2524
+ lineHeight: "24px",
2525
+ color: "var(--foreground)"
2526
+ },
2527
+ children: "Event Metadata"
2528
+ }), /* @__PURE__ */ jsxs("div", {
2529
+ className: "relative rounded-[12px] p-[16px] flex flex-col gap-[12px]",
2530
+ style: { backgroundColor: "var(--input-background)" },
2531
+ children: [/* @__PURE__ */ jsx("div", {
2532
+ "aria-hidden": "true",
2533
+ className: "absolute border border-solid inset-0 pointer-events-none rounded-[12px]",
2534
+ style: { borderColor: "var(--border)" }
2535
+ }), metadataRows.map((row) => /* @__PURE__ */ jsxs("div", {
2536
+ className: "flex items-center justify-between",
2537
+ children: [/* @__PURE__ */ jsx("span", {
2538
+ style: {
2539
+ fontFamily: "var(--font-body)",
2540
+ fontSize: "var(--text-sm)",
2541
+ fontWeight: "var(--font-weight-normal)",
2542
+ lineHeight: "20px",
2543
+ color: "var(--muted-foreground)"
2544
+ },
2545
+ children: row.label
2546
+ }), /* @__PURE__ */ jsx("span", {
2547
+ style: {
2548
+ fontFamily: "var(--font-body)",
2549
+ fontSize: "var(--text-sm)",
2550
+ fontWeight: "var(--font-weight-medium)",
2551
+ lineHeight: "20px",
2552
+ color: "var(--foreground)"
2553
+ },
2554
+ children: row.value
2555
+ })]
2556
+ }, row.label))]
2557
+ })]
2558
+ })
2559
+ ]
2560
+ })
2561
+ }),
2562
+ /* @__PURE__ */ jsx("div", {
2563
+ className: "shrink-0 px-[24px] py-[16px]",
2564
+ children: /* @__PURE__ */ jsx("div", {
2565
+ className: "flex gap-[8px] items-start justify-end w-full",
2566
+ children: /* @__PURE__ */ jsxs("div", {
2567
+ className: "relative flex-1 rounded-[9999px]",
2568
+ children: [/* @__PURE__ */ jsx("div", {
2569
+ "aria-hidden": "true",
2570
+ className: "absolute border border-solid inset-0 pointer-events-none rounded-[9999px]",
2571
+ style: { borderColor: "var(--ring)" }
2572
+ }), /* @__PURE__ */ jsx("button", {
2573
+ onClick: handleClose,
2574
+ className: "flex items-center justify-center w-full px-[32px] py-[12px] rounded-[9999px] cursor-pointer transition-colors",
2575
+ style: { backgroundColor: "transparent" },
2576
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--muted)",
2577
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
2578
+ children: /* @__PURE__ */ jsx("span", {
2579
+ style: {
2580
+ fontFamily: "var(--font-heading)",
2581
+ fontSize: "var(--text-base)",
2582
+ fontWeight: "var(--font-weight-medium)",
2583
+ lineHeight: "24px",
2584
+ color: "var(--foreground)"
2585
+ },
2586
+ children: "Close"
2587
+ })
2588
+ })]
2589
+ })
2590
+ })
2591
+ })
2592
+ ]
2593
+ })
2594
+ }), document.body);
2595
+ }
2596
+ function RecentActivitiesPanel({ onClose, onViewDetails, externalFilterType, externalFilterResourceId, onClearFilter }) {
2597
+ const { activities, markAllRead } = useActivity();
2598
+ const [activeTab, setActiveTab] = useState("logs");
2599
+ useEffect(() => {
2600
+ if (externalFilterType === "errors") setActiveTab("errors");
2601
+ else if (externalFilterType === "token_expired" || externalFilterType === "warnings") setActiveTab("logs");
2602
+ }, [externalFilterType]);
2603
+ const logItems = activities.filter((a) => a.severity !== "error");
2604
+ const errorItems = activities.filter((a) => a.severity === "error");
2605
+ const applyResourceFilter = (items) => {
2606
+ if (!externalFilterResourceId) return items;
2607
+ return items.filter((a) => a.metadata?.resourceId === externalFilterResourceId);
2608
+ };
2609
+ const applyTypeFilter = (items) => {
2610
+ if (!externalFilterType || externalFilterType === "all") return items;
2611
+ if (externalFilterType === "errors") return items;
2612
+ if (externalFilterType === "token_expired") return items.filter((a) => a.type === "token_expired");
2613
+ if (externalFilterType === "warnings") return items.filter((a) => a.severity === "warning");
2614
+ return items;
2615
+ };
2616
+ const items = applyTypeFilter(applyResourceFilter(activeTab === "logs" ? logItems : errorItems));
2617
+ const isFiltered = !!externalFilterResourceId || !!externalFilterType && externalFilterType !== "all";
2618
+ const filterSourceName = isFiltered && externalFilterResourceId && items.length > 0 ? items[0].source : null;
2619
+ const handleOpenPanel = () => {
2620
+ markAllRead();
2621
+ };
2622
+ return /* @__PURE__ */ jsxs("div", {
2623
+ className: "flex flex-col gap-[16px] items-start p-[20px] size-full",
2624
+ onClick: handleOpenPanel,
2625
+ children: [
2626
+ /* @__PURE__ */ jsxs("div", {
2627
+ className: "flex gap-[16px] h-[24px] items-center justify-center shrink-0 w-full",
2628
+ children: [
2629
+ /* @__PURE__ */ jsx(Activity, {
2630
+ className: "size-[20px] shrink-0",
2631
+ style: { color: "var(--foreground)" }
2632
+ }),
2633
+ /* @__PURE__ */ jsx("div", {
2634
+ className: "flex flex-1 min-w-0",
2635
+ children: /* @__PURE__ */ jsx("span", {
2636
+ style: {
2637
+ fontFamily: "var(--font-heading)",
2638
+ fontSize: "var(--text-base)",
2639
+ fontWeight: "var(--font-weight-normal)",
2640
+ lineHeight: "24px",
2641
+ color: "var(--foreground)"
2642
+ },
2643
+ children: "Recent Activities"
2644
+ })
2645
+ }),
2646
+ /* @__PURE__ */ jsx("button", {
2647
+ onClick: (e) => {
2648
+ e.stopPropagation();
2649
+ onClose();
2650
+ },
2651
+ className: "flex items-center justify-center shrink-0 size-[24px] rounded-[24px] cursor-pointer bg-transparent transition-all",
2652
+ "aria-label": "Minimize panel",
2653
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
2654
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
2655
+ children: /* @__PURE__ */ jsx(Minimize2, {
2656
+ className: "size-[16px]",
2657
+ style: { color: "var(--foreground)" }
2658
+ })
2659
+ })
2660
+ ]
2661
+ }),
2662
+ /* @__PURE__ */ jsx("div", {
2663
+ className: "relative rounded-[12px] shrink-0 w-full",
2664
+ style: { backgroundColor: "var(--tab-container-bg)" },
2665
+ children: /* @__PURE__ */ jsxs("div", {
2666
+ className: "flex items-center p-[4px] w-full",
2667
+ children: [/* @__PURE__ */ jsx("button", {
2668
+ onClick: () => setActiveTab("logs"),
2669
+ className: "flex-1 min-h-[32px] min-w-[32px] relative rounded-[10px] cursor-pointer transition-all",
2670
+ style: {
2671
+ backgroundColor: activeTab === "logs" ? "var(--tab-active-bg)" : "transparent",
2672
+ boxShadow: activeTab === "logs" ? "var(--elevation-sm)" : "none"
2673
+ },
2674
+ children: /* @__PURE__ */ jsxs("div", {
2675
+ className: "flex items-center justify-center gap-[8px] px-[10px] py-[5.5px] w-full min-h-[inherit]",
2676
+ children: [/* @__PURE__ */ jsx("span", {
2677
+ style: {
2678
+ fontFamily: "var(--font-body)",
2679
+ fontSize: "var(--text-sm)",
2680
+ fontWeight: "var(--font-weight-medium)",
2681
+ lineHeight: "20px",
2682
+ color: "var(--foreground)"
2683
+ },
2684
+ children: "Logs"
2685
+ }), /* @__PURE__ */ jsx(TabCounter, {
2686
+ count: logItems.length,
2687
+ variant: "warning"
2688
+ })]
2689
+ })
2690
+ }), /* @__PURE__ */ jsx("button", {
2691
+ onClick: () => setActiveTab("errors"),
2692
+ className: "flex-1 min-h-[32px] min-w-[32px] relative rounded-[10px] cursor-pointer transition-all",
2693
+ style: {
2694
+ backgroundColor: activeTab === "errors" ? "var(--tab-active-bg)" : "transparent",
2695
+ boxShadow: activeTab === "errors" ? "var(--elevation-sm)" : "none"
2696
+ },
2697
+ children: /* @__PURE__ */ jsxs("div", {
2698
+ className: "flex items-center justify-center gap-[8px] px-[10px] py-[5.5px] w-full min-h-[inherit]",
2699
+ children: [/* @__PURE__ */ jsx("span", {
2700
+ style: {
2701
+ fontFamily: "var(--font-body)",
2702
+ fontSize: "var(--text-sm)",
2703
+ fontWeight: "var(--font-weight-medium)",
2704
+ lineHeight: "20px",
2705
+ color: "var(--foreground)"
2706
+ },
2707
+ children: "Errors"
2708
+ }), /* @__PURE__ */ jsx(TabCounter, {
2709
+ count: errorItems.length,
2710
+ variant: "danger"
2711
+ })]
2712
+ })
2713
+ })]
2714
+ })
2715
+ }),
2716
+ isFiltered && /* @__PURE__ */ jsxs("div", {
2717
+ className: "flex items-center justify-between gap-[8px] w-full px-[12px] py-[8px] rounded-[10px] shrink-0",
2718
+ style: { backgroundColor: "var(--badge-info-bg)" },
2719
+ children: [/* @__PURE__ */ jsxs("span", {
2720
+ style: {
2721
+ fontFamily: "var(--font-body)",
2722
+ fontSize: "12px",
2723
+ fontWeight: "var(--font-weight-medium)",
2724
+ lineHeight: "16px",
2725
+ color: "var(--badge-info-text)"
2726
+ },
2727
+ children: [
2728
+ "Filtered",
2729
+ filterSourceName ? `: ${filterSourceName}` : "",
2730
+ externalFilterType && externalFilterType !== "all" ? ` · ${externalFilterType.replace("_", " ")}` : ""
2731
+ ]
2732
+ }), onClearFilter && /* @__PURE__ */ jsx("button", {
2733
+ onClick: (e) => {
2734
+ e.stopPropagation();
2735
+ onClearFilter();
2736
+ },
2737
+ className: "flex items-center justify-center size-[20px] rounded-[6px] cursor-pointer transition-colors",
2738
+ style: { color: "var(--badge-info-text)" },
2739
+ onMouseEnter: (e) => e.currentTarget.style.opacity = "0.7",
2740
+ onMouseLeave: (e) => e.currentTarget.style.opacity = "1",
2741
+ "aria-label": "Clear filter",
2742
+ children: /* @__PURE__ */ jsx(X, { className: "size-[12px]" })
2743
+ })]
2744
+ }),
2745
+ /* @__PURE__ */ jsx("div", {
2746
+ className: "flex flex-col gap-[12px] items-start overflow-y-auto flex-1 min-h-0 w-full",
2747
+ children: items.length === 0 ? isFiltered ? /* @__PURE__ */ jsxs("div", {
2748
+ className: "flex flex-col items-center justify-center flex-1 min-h-[200px] gap-[12px]",
2749
+ children: [
2750
+ /* @__PURE__ */ jsx("div", {
2751
+ className: "size-[40px] flex items-center justify-center rounded-full",
2752
+ style: { backgroundColor: "var(--muted)" },
2753
+ children: /* @__PURE__ */ jsx(Filter, {
2754
+ className: "size-[20px]",
2755
+ style: { color: "var(--muted-foreground)" }
2756
+ })
2757
+ }),
2758
+ /* @__PURE__ */ jsx("span", {
2759
+ style: {
2760
+ fontFamily: "var(--font-body)",
2761
+ fontSize: "var(--text-sm)",
2762
+ fontWeight: "var(--font-weight-normal)",
2763
+ lineHeight: "20px",
2764
+ color: "var(--muted-foreground)",
2765
+ textAlign: "center"
2766
+ },
2767
+ children: "No matching activity yet"
2768
+ }),
2769
+ /* @__PURE__ */ jsx("span", {
2770
+ style: {
2771
+ fontFamily: "var(--font-body)",
2772
+ fontSize: "12px",
2773
+ fontWeight: "var(--font-weight-normal)",
2774
+ lineHeight: "16px",
2775
+ color: "var(--muted-foreground)",
2776
+ textAlign: "center"
2777
+ },
2778
+ children: "Events will appear here as the resource progresses through its lifecycle."
2779
+ })
2780
+ ]
2781
+ }) : /* @__PURE__ */ jsx("div", {
2782
+ className: "w-full",
2783
+ children: /* @__PURE__ */ jsx(EmptyState, { tab: activeTab })
2784
+ }) : items.map((item) => /* @__PURE__ */ jsx(ActivityCard, {
2785
+ item,
2786
+ onViewDetails: () => onViewDetails(item)
2787
+ }, item.id))
2788
+ })
2789
+ ]
2790
+ });
2791
+ }
2792
+ function CollapsedActivityBar({ onClick, unreadCount }) {
2793
+ return /* @__PURE__ */ jsx("button", {
2794
+ onClick,
2795
+ className: "backdrop-blur-[45px] flex flex-col items-start overflow-x-clip overflow-y-auto p-[16px] rounded-[16px] shrink-0 w-full cursor-pointer transition-all",
2796
+ style: { backgroundColor: "var(--glass-strong)" },
2797
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
2798
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "var(--glass-strong)",
2799
+ children: /* @__PURE__ */ jsxs("div", {
2800
+ className: "flex gap-[16px] h-[24px] items-center justify-center w-full",
2801
+ children: [
2802
+ /* @__PURE__ */ jsx(Activity, {
2803
+ className: "size-[20px] shrink-0",
2804
+ style: { color: "var(--foreground)" }
2805
+ }),
2806
+ /* @__PURE__ */ jsx("div", {
2807
+ className: "flex flex-1 flex-col gap-[8px] items-start min-w-0",
2808
+ children: /* @__PURE__ */ jsxs("div", {
2809
+ className: "flex gap-[8px] items-center w-full",
2810
+ children: [/* @__PURE__ */ jsx("p", {
2811
+ style: {
2812
+ fontFamily: "var(--font-heading)",
2813
+ fontSize: "var(--text-base)",
2814
+ fontWeight: "var(--font-weight-normal)",
2815
+ lineHeight: "24px",
2816
+ color: "var(--foreground)",
2817
+ whiteSpace: "nowrap",
2818
+ textAlign: "left"
2819
+ },
2820
+ children: "Recent Activities"
2821
+ }), unreadCount > 0 && /* @__PURE__ */ jsx("div", {
2822
+ className: "flex items-center justify-center min-w-[16px] h-[16px] px-[4px] rounded-full",
2823
+ style: { backgroundColor: "var(--destructive)" },
2824
+ children: /* @__PURE__ */ jsx("span", {
2825
+ style: {
2826
+ fontFamily: "var(--font-body)",
2827
+ fontSize: "10px",
2828
+ fontWeight: 600,
2829
+ lineHeight: "12px",
2830
+ color: "var(--destructive-foreground)"
2831
+ },
2832
+ children: unreadCount > 9 ? "9+" : unreadCount
2833
+ })
2834
+ })]
2835
+ })
2836
+ }),
2837
+ /* @__PURE__ */ jsx(ChevronsUpDown, {
2838
+ className: "size-[24px] shrink-0",
2839
+ style: { color: "var(--foreground)" }
2840
+ })
2841
+ ]
2842
+ })
2843
+ });
2844
+ }
2845
+ function CollapsedChatBar({ onClick }) {
2846
+ return /* @__PURE__ */ jsx("button", {
2847
+ onClick,
2848
+ className: "backdrop-blur-[45px] flex flex-col items-start overflow-x-clip overflow-y-auto p-[16px] rounded-[16px] shrink-0 w-full cursor-pointer transition-all",
2849
+ style: { backgroundColor: "var(--glass-strong)" },
2850
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
2851
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "var(--glass-strong)",
2852
+ children: /* @__PURE__ */ jsxs("div", {
2853
+ className: "flex gap-[16px] h-[24px] items-center justify-center w-full",
2854
+ children: [
2855
+ /* @__PURE__ */ jsx("div", {
2856
+ className: "overflow-clip relative rounded-[24px] shrink-0 size-[20px]",
2857
+ children: /* @__PURE__ */ jsx("div", {
2858
+ className: "absolute",
2859
+ style: { inset: "5.21%" },
2860
+ children: /* @__PURE__ */ jsxs("svg", {
2861
+ className: "absolute block size-full",
2862
+ fill: "none",
2863
+ preserveAspectRatio: "none",
2864
+ viewBox: "0 0 17.9175 17.9175",
2865
+ children: [
2866
+ /* @__PURE__ */ jsx("path", {
2867
+ d: svg_9ebyigi4zl_default.p1104e600,
2868
+ fill: "var(--foreground)"
2869
+ }),
2870
+ /* @__PURE__ */ jsx("path", {
2871
+ d: svg_9ebyigi4zl_default.p2fe30c00,
2872
+ fill: "var(--foreground)"
2873
+ }),
2874
+ /* @__PURE__ */ jsx("path", {
2875
+ d: svg_9ebyigi4zl_default.p18accf00,
2876
+ fill: "var(--foreground)"
2877
+ }),
2878
+ /* @__PURE__ */ jsx("path", {
2879
+ d: svg_9ebyigi4zl_default.p2b445ef2,
2880
+ fill: "var(--foreground)"
2881
+ }),
2882
+ /* @__PURE__ */ jsx("path", {
2883
+ d: svg_9ebyigi4zl_default.p29b5f100,
2884
+ fill: "var(--foreground)"
2885
+ })
2886
+ ]
2887
+ })
2888
+ })
2889
+ }),
2890
+ /* @__PURE__ */ jsx("div", {
2891
+ className: "flex flex-1 flex-col gap-[8px] items-start min-w-0",
2892
+ children: /* @__PURE__ */ jsx("div", {
2893
+ className: "flex gap-[8px] items-center w-full",
2894
+ children: /* @__PURE__ */ jsx("p", {
2895
+ style: {
2896
+ fontFamily: "var(--font-heading)",
2897
+ fontSize: "var(--text-base)",
2898
+ fontWeight: "var(--font-weight-normal)",
2899
+ lineHeight: "24px",
2900
+ color: "var(--foreground)",
2901
+ whiteSpace: "nowrap",
2902
+ textAlign: "left"
2903
+ },
2904
+ children: "AI Assistance"
2905
+ })
2906
+ })
2907
+ }),
2908
+ /* @__PURE__ */ jsx(ChevronsUpDown, {
2909
+ className: "size-[24px] shrink-0",
2910
+ style: { color: "var(--foreground)" }
2911
+ })
2912
+ ]
2913
+ })
2914
+ });
2915
+ }
2916
+ function RightSidebar({ domain = "slingshot" }) {
2917
+ const chatConfig = domainChatConfigs[domain] ?? domainChatConfigs.slingshot;
2918
+ const [selectedActivity, setSelectedActivity] = useState(null);
2919
+ const { activePanel, openPanel, closePanel } = useRightPanel();
2920
+ const { unreadCount, panelExpanded, setPanelExpanded, filterType, setFilterType, filterResourceId, setFilterResourceId } = useActivity();
2921
+ const isExpanded = activePanel !== null;
2922
+ const MIN_WIDTH = 320;
2923
+ const MAX_WIDTH = 600;
2924
+ const DEFAULT_WIDTH = 400;
2925
+ const [panelWidth, setPanelWidth] = useState(DEFAULT_WIDTH);
2926
+ const handleHorizontalResizeStart = useCallback((e) => {
2927
+ e.preventDefault();
2928
+ const startX = e.clientX;
2929
+ const startWidth = panelWidth;
2930
+ const onMouseMove = (ev) => {
2931
+ const delta = startX - ev.clientX;
2932
+ setPanelWidth(Math.min(MAX_WIDTH, Math.max(MIN_WIDTH, startWidth + delta)));
2933
+ };
2934
+ const onMouseUp = () => {
2935
+ document.removeEventListener("mousemove", onMouseMove);
2936
+ document.removeEventListener("mouseup", onMouseUp);
2937
+ document.body.style.cursor = "";
2938
+ document.body.style.userSelect = "";
2939
+ };
2940
+ document.body.style.cursor = "col-resize";
2941
+ document.body.style.userSelect = "none";
2942
+ document.addEventListener("mousemove", onMouseMove);
2943
+ document.addEventListener("mouseup", onMouseUp);
2944
+ }, [panelWidth]);
2945
+ const handleDoubleClick = useCallback(() => {
2946
+ setPanelWidth(DEFAULT_WIDTH);
2947
+ }, []);
2948
+ useEffect(() => {
2949
+ if (panelExpanded && activePanel !== "activity") openPanel("activity");
2950
+ }, [
2951
+ panelExpanded,
2952
+ activePanel,
2953
+ openPanel
2954
+ ]);
2955
+ const handleCloseActivity = useCallback(() => {
2956
+ closePanel();
2957
+ setPanelExpanded(false);
2958
+ setFilterType(null);
2959
+ setFilterResourceId(null);
2960
+ }, [
2961
+ closePanel,
2962
+ setPanelExpanded,
2963
+ setFilterType,
2964
+ setFilterResourceId
2965
+ ]);
2966
+ const handleCloseChat = useCallback(() => {
2967
+ closePanel();
2968
+ }, [closePanel]);
2969
+ const handleClearFilter = useCallback(() => {
2970
+ setFilterType(null);
2971
+ setFilterResourceId(null);
2972
+ }, [setFilterType, setFilterResourceId]);
2973
+ const handleViewDetails = useCallback((activity) => {
2974
+ setSelectedActivity(activity);
2975
+ }, []);
2976
+ const handleSwitchToActivity = useCallback(() => {
2977
+ openPanel("activity");
2978
+ }, [openPanel]);
2979
+ const handleSwitchToChat = useCallback(() => {
2980
+ if (activePanel === "activity") {
2981
+ setPanelExpanded(false);
2982
+ setFilterType(null);
2983
+ setFilterResourceId(null);
2984
+ }
2985
+ openPanel("ai-chat");
2986
+ }, [
2987
+ activePanel,
2988
+ openPanel,
2989
+ setPanelExpanded,
2990
+ setFilterType,
2991
+ setFilterResourceId
2992
+ ]);
2993
+ if (!isExpanded) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
2994
+ className: "flex flex-col gap-[8px] shrink-0 sticky top-[88px] z-[1]",
2995
+ children: [/* @__PURE__ */ jsx("div", {
2996
+ className: "backdrop-blur-[45px] rounded-[16px] overflow-hidden",
2997
+ style: {
2998
+ backgroundColor: "var(--glass-strong)",
2999
+ width: "56px",
3000
+ height: "56px"
3001
+ },
3002
+ children: /* @__PURE__ */ jsx("div", {
3003
+ className: "flex items-center justify-center size-[56px]",
3004
+ children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
3005
+ asChild: true,
3006
+ children: /* @__PURE__ */ jsx("button", {
3007
+ className: "relative flex items-center justify-center w-[40px] h-[40px] rounded-full bg-transparent transition-all cursor-pointer",
3008
+ "aria-label": "AI Chat Assistant",
3009
+ onClick: () => openPanel("ai-chat"),
3010
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
3011
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
3012
+ children: /* @__PURE__ */ jsx(Bot, {
3013
+ className: "size-[16px]",
3014
+ style: { color: "var(--foreground)" }
3015
+ })
3016
+ })
3017
+ }), /* @__PURE__ */ jsx(TooltipContent, {
3018
+ side: "left",
3019
+ sideOffset: 8,
3020
+ className: "flex gap-[8px] items-center justify-center px-[8px] py-[6px] rounded-[8px] z-50 relative",
3021
+ style: { backgroundColor: "var(--tooltip-bg)" },
3022
+ children: /* @__PURE__ */ jsx("p", {
3023
+ style: {
3024
+ fontFamily: "var(--font-body)",
3025
+ fontSize: "12px",
3026
+ fontWeight: "var(--font-weight-normal)",
3027
+ lineHeight: "16px",
3028
+ color: "var(--tooltip-foreground)"
3029
+ },
3030
+ children: "AI Chat Assistant"
3031
+ })
3032
+ })] })
3033
+ })
3034
+ }), /* @__PURE__ */ jsx("div", {
3035
+ className: "backdrop-blur-[45px] rounded-[16px] overflow-hidden",
3036
+ style: {
3037
+ backgroundColor: "var(--glass-strong)",
3038
+ width: "56px",
3039
+ height: "56px"
3040
+ },
3041
+ children: /* @__PURE__ */ jsx("div", {
3042
+ className: "flex items-center justify-center size-[56px]",
3043
+ children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
3044
+ asChild: true,
3045
+ children: /* @__PURE__ */ jsxs("button", {
3046
+ className: "relative flex items-center justify-center w-[40px] h-[40px] rounded-full bg-transparent transition-all cursor-pointer",
3047
+ "aria-label": "Activity",
3048
+ onClick: () => openPanel("activity"),
3049
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--glass-medium)",
3050
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
3051
+ children: [/* @__PURE__ */ jsx(Activity, {
3052
+ className: "size-[16px]",
3053
+ style: { color: "var(--foreground)" }
3054
+ }), unreadCount > 0 && /* @__PURE__ */ jsx("div", {
3055
+ className: "absolute top-[4px] right-[4px] flex items-center justify-center min-w-[16px] h-[16px] px-[4px] rounded-full",
3056
+ style: { backgroundColor: "var(--destructive)" },
3057
+ children: /* @__PURE__ */ jsx("span", {
3058
+ style: {
3059
+ fontFamily: "var(--font-body)",
3060
+ fontSize: "10px",
3061
+ fontWeight: 600,
3062
+ lineHeight: "12px",
3063
+ color: "var(--destructive-foreground)"
3064
+ },
3065
+ children: unreadCount > 9 ? "9+" : unreadCount
3066
+ })
3067
+ })]
3068
+ })
3069
+ }), /* @__PURE__ */ jsx(TooltipContent, {
3070
+ side: "left",
3071
+ sideOffset: 8,
3072
+ className: "flex gap-[8px] items-center justify-center px-[8px] py-[6px] rounded-[8px] z-50 relative",
3073
+ style: { backgroundColor: "var(--tooltip-bg)" },
3074
+ children: /* @__PURE__ */ jsx("p", {
3075
+ style: {
3076
+ fontFamily: "var(--font-body)",
3077
+ fontSize: "12px",
3078
+ fontWeight: "var(--font-weight-normal)",
3079
+ lineHeight: "16px",
3080
+ color: "var(--tooltip-foreground)"
3081
+ },
3082
+ children: "Activity"
3083
+ })
3084
+ })] })
3085
+ })
3086
+ })]
3087
+ }), /* @__PURE__ */ jsx(ActivityDetailDrawer, {
3088
+ activity: selectedActivity,
3089
+ isOpen: !!selectedActivity,
3090
+ onClose: () => setSelectedActivity(null)
3091
+ })] });
3092
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
3093
+ className: "flex flex-row items-stretch shrink-0 sticky top-[88px] z-[1]",
3094
+ style: {
3095
+ width: `${panelWidth}px`,
3096
+ height: "calc(100vh - 84px - 16px)"
3097
+ },
3098
+ children: [/* @__PURE__ */ jsx("div", {
3099
+ className: "flex items-center justify-center shrink-0 cursor-col-resize group",
3100
+ style: {
3101
+ width: "8px",
3102
+ marginRight: "0px"
3103
+ },
3104
+ onMouseDown: handleHorizontalResizeStart,
3105
+ onDoubleClick: handleDoubleClick,
3106
+ "aria-label": "Resize panel",
3107
+ children: /* @__PURE__ */ jsx("div", {
3108
+ className: "rounded-full transition-all duration-150",
3109
+ style: {
3110
+ width: "3px",
3111
+ height: "40px",
3112
+ backgroundColor: "var(--border)",
3113
+ opacity: .5
3114
+ },
3115
+ onMouseEnter: (e) => {
3116
+ e.currentTarget.style.opacity = "1";
3117
+ e.currentTarget.style.backgroundColor = "var(--ring)";
3118
+ e.currentTarget.style.width = "4px";
3119
+ },
3120
+ onMouseLeave: (e) => {
3121
+ e.currentTarget.style.opacity = "0.5";
3122
+ e.currentTarget.style.backgroundColor = "var(--border)";
3123
+ e.currentTarget.style.width = "3px";
3124
+ }
3125
+ })
3126
+ }), /* @__PURE__ */ jsxs("div", {
3127
+ className: "flex flex-col gap-[12px] items-start flex-1 min-w-0",
3128
+ children: [/* @__PURE__ */ jsx("div", {
3129
+ className: "backdrop-blur-[45px] flex-1 min-h-0 relative rounded-[16px] w-full overflow-hidden transition-all duration-300 ease-in-out",
3130
+ style: { backgroundColor: "var(--glass-strong)" },
3131
+ children: /* @__PURE__ */ jsx("div", {
3132
+ className: "overflow-x-clip overflow-y-auto size-full",
3133
+ children: activePanel === "ai-chat" ? /* @__PURE__ */ jsx(AIChatPanel, {
3134
+ onClose: handleCloseChat,
3135
+ suggestedPrompts: chatConfig.suggestedPrompts,
3136
+ mockResponses: chatConfig.mockResponses,
3137
+ fallbackResponse: chatConfig.fallbackResponse
3138
+ }) : /* @__PURE__ */ jsx(RecentActivitiesPanel, {
3139
+ onClose: handleCloseActivity,
3140
+ onViewDetails: handleViewDetails,
3141
+ externalFilterType: filterType,
3142
+ externalFilterResourceId: filterResourceId,
3143
+ onClearFilter: handleClearFilter
3144
+ })
3145
+ })
3146
+ }), activePanel === "ai-chat" ? /* @__PURE__ */ jsx(CollapsedActivityBar, {
3147
+ onClick: handleSwitchToActivity,
3148
+ unreadCount
3149
+ }) : /* @__PURE__ */ jsx(CollapsedChatBar, { onClick: handleSwitchToChat })]
3150
+ })]
3151
+ }), /* @__PURE__ */ jsx(ActivityDetailDrawer, {
3152
+ activity: selectedActivity,
3153
+ isOpen: !!selectedActivity,
3154
+ onClose: () => setSelectedActivity(null)
3155
+ })] });
3156
+ }
3157
+ //#endregion
3158
+ //#region src/layouts/SlingshotHeader/SlingshotHeader.tsx
3159
+ /** Slingshot-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="slingshot" />`. */
3160
+ function SlingshotHeader({ isDarkMode, onToggleTheme }) {
3161
+ return /* @__PURE__ */ jsx(AppHeader, {
3162
+ brand: "slingshot",
3163
+ isDarkMode,
3164
+ onToggleTheme
3165
+ });
3166
+ }
3167
+ //#endregion
3168
+ //#region src/layouts/SustainHeader/SustainHeader.tsx
3169
+ /** Sustain-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="sustain" />`. */
3170
+ function SustainHeader({ isDarkMode, onToggleTheme }) {
3171
+ return /* @__PURE__ */ jsx(AppHeader, {
3172
+ brand: "sustain",
3173
+ isDarkMode,
3174
+ onToggleTheme
3175
+ });
3176
+ }
3177
+ //#endregion
3178
+ export { MobileGate as a, Header as c, AnimatedBackground as d, PSAIHeader as i, BodhiHeader as l, SlingshotHeader as n, Logo as o, RightSidebar as r, LeftNavigation as s, SustainHeader as t, AppHeader as u };
3179
+
3180
+ //# sourceMappingURL=layouts.js.map